diff --git a/.eslintrc.cjs b/.eslintrc.cjs index c54ada6..309474d 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -4,7 +4,7 @@ module.exports = { // ... "plugin:astro/recommended", ], - ignorePatterns: ["dist/"], + ignorePatterns: ["dist/", "*.config.js"], // ... overrides: [ { diff --git a/astro.config.mjs b/astro.config.mjs index 0123017..8bac5d1 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,8 +1,11 @@ -import { defineConfig } from 'astro/config'; +import { defineConfig } from "astro/config"; import react from "@astrojs/react"; // https://astro.build/config export default defineConfig({ - integrations: [react()] -}); \ No newline at end of file + integrations: [react()], + redirects: { + "/legal": "/legal/privacy", + }, +}); diff --git a/package.json b/package.json index 9bb6ed6..8257d94 100644 --- a/package.json +++ b/package.json @@ -12,18 +12,19 @@ }, "dependencies": { "@astrojs/react": "^3.0.2", - "@types/react": "^18.2.23", - "@types/react-dom": "^18.2.7", - "astro": "^3.1.2", + "@types/react": "^18.2.25", + "@types/react-dom": "^18.2.8", + "astro": "^3.2.2", "classnames": "^2.3.2", "react": "^18.0.0", "react-dom": "^18.0.0" }, "devDependencies": { + "@typescript-eslint/parser": "^6.7.3", + "prettier-plugin-astro": "^0.12.0", "eslint": "^8.50.0", "eslint-plugin-astro": "^0.29.0", "eslint-plugin-jsx-a11y": "^6.7.1", - "@typescript-eslint/parser": "^6.7.2", "sass": "^1.68.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a2aeea8..7227006 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,22 +1,18 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - dependencies: '@astrojs/react': specifier: ^3.0.2 - version: 3.0.2(@types/react-dom@18.2.7)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0)(vite@4.4.9) + version: 3.0.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0)(vite@4.4.9) '@types/react': - specifier: ^18.2.23 - version: 18.2.23 + specifier: ^18.2.25 + version: 18.2.25 '@types/react-dom': - specifier: ^18.2.7 - version: 18.2.7 + specifier: ^18.2.8 + version: 18.2.8 astro: - specifier: ^3.1.2 - version: 3.1.2(sass@1.68.0) + specifier: ^3.2.2 + version: 3.2.2(sass@1.68.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -29,8 +25,8 @@ dependencies: devDependencies: '@typescript-eslint/parser': - specifier: ^6.7.2 - version: 6.7.2(eslint@8.50.0)(typescript@5.1.3) + specifier: ^6.7.3 + version: 6.7.3(eslint@8.50.0)(typescript@5.1.3) eslint: specifier: ^8.50.0 version: 8.50.0 @@ -40,6 +36,9 @@ devDependencies: eslint-plugin-jsx-a11y: specifier: ^6.7.1 version: 6.7.1(eslint@8.50.0) + prettier-plugin-astro: + specifier: ^0.12.0 + version: 0.12.0 sass: specifier: ^1.68.0 version: 1.68.0 @@ -59,6 +58,10 @@ packages: '@jridgewell/trace-mapping': 0.3.18 dev: false + /@astrojs/compiler@1.8.2: + resolution: {integrity: sha512-o/ObKgtMzl8SlpIdzaxFnt7SATKPxu4oIP/1NL+HDJRzxfJcAkOTAb/ZKMRyULbz4q+1t2/DAebs2Z1QairkZw==} + dev: true + /@astrojs/compiler@2.1.0: resolution: {integrity: sha512-Mp+qrNhly+27bL/Zq8lGeUY+YrdoU0eDfIlAeGIPrzt0PnI/jGpvPUdCaugv4zbCrDkOUScFfcbeEiYumrdJnw==} @@ -66,13 +69,13 @@ packages: resolution: {integrity: sha512-NQ4ppp1CM0HNkKbJNM4saVSfmUYzGlRalF6wx7F6T/MYHYSWGuojY89/oFTy4t8VlOGUCUijlsVNNeziWaUo5g==} dev: false - /@astrojs/markdown-remark@3.2.0(astro@3.1.2): + /@astrojs/markdown-remark@3.2.0(astro@3.2.2): resolution: {integrity: sha512-jigyLfefUZPKgVmmraCkVpdUuFH1R3SrpgQO13axsgwLDBgkggaQpNR5Ag4O9PDualeBtbdt30aYSfvnBKx9Hg==} peerDependencies: astro: ^3.1.0 dependencies: '@astrojs/prism': 3.0.0 - astro: 3.1.2(sass@1.68.0) + astro: 3.2.2(sass@1.68.0) github-slugger: 2.0.0 import-meta-resolve: 3.0.0 mdast-util-definitions: 6.0.0 @@ -97,7 +100,7 @@ packages: prismjs: 1.29.0 dev: false - /@astrojs/react@3.0.2(@types/react-dom@18.2.7)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0)(vite@4.4.9): + /@astrojs/react@3.0.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0)(vite@4.4.9): resolution: {integrity: sha512-aooNIuQxTg+IWGMZPuIEwBeBi4/TCPCMsr3714zuLjAjukVd5ZrX/bCNxJqDWU4HNwUm4XFU1OhcEvYOHa5uMQ==} engines: {node: '>=18.14.1'} peerDependencies: @@ -106,8 +109,8 @@ packages: react: ^17.0.2 || ^18.0.0 react-dom: ^17.0.2 || ^18.0.0 dependencies: - '@types/react': 18.2.23 - '@types/react-dom': 18.2.7 + '@types/react': 18.2.25 + '@types/react-dom': 18.2.8 '@vitejs/plugin-react': 4.0.4(vite@4.4.9) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -982,14 +985,14 @@ packages: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: false - /@types/react-dom@18.2.7: - resolution: {integrity: sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==} + /@types/react-dom@18.2.8: + resolution: {integrity: sha512-bAIvO5lN/U8sPGvs1Xm61rlRHHaq5rp5N3kp9C+NJ/Q41P8iqjkXSu0+/qu8POsjH9pNWb0OYabFez7taP7omw==} dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.25 dev: false - /@types/react@18.2.23: - resolution: {integrity: sha512-qHLW6n1q2+7KyBEYnrZpcsAmU/iiCh9WGCKgXvMxx89+TYdJWRjZohVIo9XTcoLhfX3+/hP0Pbulu3bCZQ9PSA==} + /@types/react@18.2.25: + resolution: {integrity: sha512-24xqse6+VByVLIr+xWaQ9muX1B4bXJKXBbjszbld/UEDslGLY53+ZucF44HCmLbMPejTzGG9XgR+3m2/Wqu1kw==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.3 @@ -1012,8 +1015,8 @@ packages: resolution: {integrity: sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==} dev: false - /@typescript-eslint/parser@6.7.2(eslint@8.50.0)(typescript@5.1.3): - resolution: {integrity: sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw==} + /@typescript-eslint/parser@6.7.3(eslint@8.50.0)(typescript@5.1.3): + resolution: {integrity: sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1022,10 +1025,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.7.2 - '@typescript-eslint/types': 6.7.2 - '@typescript-eslint/typescript-estree': 6.7.2(typescript@5.1.3) - '@typescript-eslint/visitor-keys': 6.7.2 + '@typescript-eslint/scope-manager': 6.7.3 + '@typescript-eslint/types': 6.7.3 + '@typescript-eslint/typescript-estree': 6.7.3(typescript@5.1.3) + '@typescript-eslint/visitor-keys': 6.7.3 debug: 4.3.4 eslint: 8.50.0 typescript: 5.1.3 @@ -1041,12 +1044,12 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true - /@typescript-eslint/scope-manager@6.7.2: - resolution: {integrity: sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw==} + /@typescript-eslint/scope-manager@6.7.3: + resolution: {integrity: sha512-wOlo0QnEou9cHO2TdkJmzF7DFGvAKEnB82PuPNHpT8ZKKaZu6Bm63ugOTn9fXNJtvuDPanBc78lGUGGytJoVzQ==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.2 - '@typescript-eslint/visitor-keys': 6.7.2 + '@typescript-eslint/types': 6.7.3 + '@typescript-eslint/visitor-keys': 6.7.3 dev: true /@typescript-eslint/types@5.62.0: @@ -1054,13 +1057,13 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@6.7.2: - resolution: {integrity: sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg==} + /@typescript-eslint/types@6.7.3: + resolution: {integrity: sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.7.2(typescript@5.1.3): - resolution: {integrity: sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ==} + /@typescript-eslint/typescript-estree@6.7.3(typescript@5.1.3): + resolution: {integrity: sha512-YLQ3tJoS4VxLFYHTw21oe1/vIZPRqAO91z6Uv0Ss2BKm/Ag7/RVQBcXTGcXhgJMdA4U+HrKuY5gWlJlvoaKZ5g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1068,8 +1071,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.7.2 - '@typescript-eslint/visitor-keys': 6.7.2 + '@typescript-eslint/types': 6.7.3 + '@typescript-eslint/visitor-keys': 6.7.3 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1088,11 +1091,11 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@6.7.2: - resolution: {integrity: sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ==} + /@typescript-eslint/visitor-keys@6.7.3: + resolution: {integrity: sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.2 + '@typescript-eslint/types': 6.7.3 eslint-visitor-keys: 3.4.3 dev: true @@ -1260,14 +1263,14 @@ packages: - supports-color dev: true - /astro@3.1.2(sass@1.68.0): - resolution: {integrity: sha512-9rlKyk6Qmw50Pc188+ey7JAEYBsJGh5an46AXGPMHIdEkH6YOc4b2z9Rr+TNF8QmM/U+C2ZQFRVQyCKU4i8/pg==} + /astro@3.2.2(sass@1.68.0): + resolution: {integrity: sha512-vLOOGyD2g1HRkCQAFHmHUrVAbMI5sgUqKignBMtXNantgEq1P17sL2cvH0Yy2ibNN9DHZ/4TknXmwHAig8PJNg==} engines: {node: '>=18.14.1', npm: '>=6.14.0'} hasBin: true dependencies: '@astrojs/compiler': 2.1.0 '@astrojs/internal-helpers': 0.2.0 - '@astrojs/markdown-remark': 3.2.0(astro@3.1.2) + '@astrojs/markdown-remark': 3.2.0(astro@3.2.2) '@astrojs/telemetry': 3.0.2 '@babel/core': 7.22.11 '@babel/generator': 7.22.10 @@ -3770,6 +3773,21 @@ packages: engines: {node: '>= 0.8.0'} dev: true + /prettier-plugin-astro@0.12.0: + resolution: {integrity: sha512-8E+9YQR6/5CPZJs8XsfBw579zrwZkc0Wb7x0fRVm/51JC8Iys4lBw4ecV8fHwpbQnzve86TUa4fJ08BJzqfWnA==} + engines: {node: ^14.15.0 || >=16.0.0} + dependencies: + '@astrojs/compiler': 1.8.2 + prettier: 3.0.3 + sass-formatter: 0.7.8 + dev: true + + /prettier@3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + engines: {node: '>=14'} + hasBin: true + dev: true + /prismjs@1.29.0: resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} engines: {node: '>=6'} @@ -4043,6 +4061,10 @@ packages: dependencies: queue-microtask: 1.2.3 + /s.color@0.0.15: + resolution: {integrity: sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==} + dev: true + /sade@1.8.1: resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} engines: {node: '>=6'} @@ -4066,6 +4088,12 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: false + /sass-formatter@0.7.8: + resolution: {integrity: sha512-7fI2a8THglflhhYis7k06eUf92VQuJoXzEs2KRP0r1bluFxKFvLx0Ns7c478oYGM0fPfrr846ZRWVi2MAgHt9Q==} + dependencies: + suf-log: 2.5.3 + dev: true + /sass@1.68.0: resolution: {integrity: sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==} engines: {node: '>=14.0.0'} @@ -4353,6 +4381,12 @@ packages: engines: {node: '>=8'} dev: true + /suf-log@2.5.3: + resolution: {integrity: sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==} + dependencies: + s.color: 0.0.15 + dev: true + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -4842,3 +4876,7 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} dev: false + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..7e61930 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,12 @@ +/** @type {import("prettier").Config} */ +export default { + plugins: ["prettier-plugin-astro"], + overrides: [ + { + files: "*.astro", + options: { + parser: "astro", + }, + }, + ], +}; diff --git a/public/icons/facebook.svg b/public/icons/facebook.svg deleted file mode 100644 index 5649d17..0000000 --- a/public/icons/facebook.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/github.svg b/public/icons/github.svg deleted file mode 100644 index e8e51c4..0000000 --- a/public/icons/github.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/inovex.svg b/public/icons/inovex.svg deleted file mode 100644 index 38ac551..0000000 --- a/public/icons/inovex.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/public/icons/instagram.svg b/public/icons/instagram.svg deleted file mode 100644 index c082b8e..0000000 --- a/public/icons/instagram.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/linkedin.svg b/public/icons/linkedin.svg deleted file mode 100644 index 3dbc703..0000000 --- a/public/icons/linkedin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/podcast.svg b/public/icons/podcast.svg deleted file mode 100644 index 7c1555a..0000000 --- a/public/icons/podcast.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/twitter.svg b/public/icons/twitter.svg deleted file mode 100644 index 04f2063..0000000 --- a/public/icons/twitter.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/xing.svg b/public/icons/xing.svg deleted file mode 100644 index 823876b..0000000 --- a/public/icons/xing.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/components/Choices.scss b/src/components/Choices.scss index 180ff50..b70c98e 100644 --- a/src/components/Choices.scss +++ b/src/components/Choices.scss @@ -115,16 +115,18 @@ } } -[theme="dark"] .choices__content { - background-image: url("/assets/backgrounds/bg_cloud_dark.svg"); +@media (prefers-color-scheme: dark) { + .choices__content { + background-image: url("/assets/backgrounds/bg_cloud_dark.svg"); - .choices__video-button { - background: var(--darkmode-blue); - } + .choices__video-button { + background: var(--darkmode-blue); + } - .choices__video-position-buttons { - button { - background: var(--darkmode-pink); + .choices__video-position-buttons { + button { + background: var(--darkmode-pink); + } } } } diff --git a/src/components/Choices.tsx b/src/components/Choices.tsx index 65ade99..e006e65 100644 --- a/src/components/Choices.tsx +++ b/src/components/Choices.tsx @@ -7,20 +7,15 @@ import Icon from "./Icon"; const Choices = () => { const [position, setPosition] = useState(0); - const [theme, setTheme] = useState("dark"); + const theme = useMediaQuery("(prefers-color-scheme: dark)") + ? "dark" + : "light"; const [duration, setDuration] = useState(4000); const isMobile = useMediaQuery("(max-width: 850px)") ?? true; const setVideoDuration = (duration: number) => isMobile && setDuration(duration * 1000); - useEffect(() => { - const theme = document.documentElement.getAttribute("theme"); - if (theme) { - setTheme(theme); - } - }, []); - useEffect(() => { setPosition(0); if (isMobile) setDuration(12012); @@ -42,7 +37,7 @@ const Choices = () => { }, [position, duration, isMobile]); return ( -
+

Euer Board – Eure Entscheidungen.

Wählt eine beliebige Retrospektive, die zu eurem Team passt.

diff --git a/src/components/Footer/Footer.scss b/src/components/Footer/Footer.scss index 00e8794..9ac42c3 100644 --- a/src/components/Footer/Footer.scss +++ b/src/components/Footer/Footer.scss @@ -61,6 +61,7 @@ footer { align-items: center; a { + color: var(--white); height: 32px; width: 32px; display: block; @@ -140,23 +141,32 @@ footer a { border: 2px solid transparent; border-radius: 4px; + &:hover { + color: var(--lightmode-pink); + } + &:focus-visible { outline: none; border-color: var(--lightmode-pink); } - &:hover { - color: var(--lightmode-pink); - } } -[theme="dark"] { +@media (prefers-color-scheme: dark) { footer { background-color: var(--darkmode-blue); + + a:hover { + color: var(--darkmode-pink); + } + + a:focus-visible { + border-color: var(--darkmode-pink); + } } - a:hover { - color: var(--darkmode-pink); - color: var(--white); + .footer__legal-links a, + .footer__bottom { + color: var(--darkmode-blue); } } diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index c90846c..f626fa3 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -1,3 +1,11 @@ +import { Facebook } from "../../icons/Facebook"; +import { Github } from "../../icons/Github"; +import { Instagram } from "../../icons/Instagram"; +import { Linkedin } from "../../icons/Linkedin"; +import { Podcast } from "../../icons/Podcast"; +import { X } from "../../icons/X"; +import { Xing } from "../../icons/Xing"; +import { Inovex } from "../../icons/Inovex"; import "./Footer.scss"; export const Footer = () => { @@ -5,7 +13,7 @@ export const Footer = () => {