diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 8a48fcc..0000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -# Editor configuration, see http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 69f2040..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: monthly - - - package-ecosystem: npm - directory: / - schedule: - interval: monthly diff --git a/.github/workflows/pages.yml b/.github/workflows/cd.yml similarity index 54% rename from .github/workflows/pages.yml rename to .github/workflows/cd.yml index 6f7702a..5c39945 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: Deploy Astro Project to GitHub Pages +name: Continuous Deployment on: push: @@ -13,10 +13,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - name: Install, Build, and Upload - uses: withastro/action@v1 + - uses: actions/checkout@v4 + - uses: withastro/action@v3 + with: + node-version: 20 deploy: needs: build @@ -27,5 +27,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - # Can't upgrade to v4 yet: https://github.com/withastro/action/issues/40 - uses: actions/deploy-pages@v3 + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index c9fab14..0000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Pull Request - -on: - pull_request_target: - types: [opened] - -jobs: - assign-author: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - name: Assign author to PR - uses: technote-space/assign-author@v1 - - approve-dependabot-pr: - if: github.event.pull_request.user.login == 'dependabot[bot]' - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - name: Enable auto-merge - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - # If we'd use `secrets.GITHUB_TOKEN`, our CI isn't triggered on the - # merge's push event. - # https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow - GITHUB_TOKEN: ${{ secrets.PR_AUTOMERGE_TOKEN }} - - uses: dependabot/fetch-metadata@v1.6.0 - id: dependabot-metadata - - name: Approve patch and minor updates - if: steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor' - run: gh pr review "$PR_URL" --approve - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 48affd1..fbe5201 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ -.direnv/ - # build output dist/ -.output/ + +# generated types +.astro/ # dependencies node_modules/ @@ -13,10 +13,15 @@ yarn-debug.log* yarn-error.log* pnpm-debug.log* - # environment variables .env .env.production # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ + +# direnv +.direnv/ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..e14bbde --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +dist +node_modules +.github +.changeset diff --git a/.prettierrc.mjs b/.prettierrc.mjs new file mode 100644 index 0000000..b3030b2 --- /dev/null +++ b/.prettierrc.mjs @@ -0,0 +1,12 @@ +/** @type {import("prettier").Config} */ +export default { + plugins: ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], + overrides: [ + { + files: "*.astro", + options: { + parser: "astro", + }, + }, + ], +}; diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0954e85..f86d654 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,4 +1,8 @@ { - "recommendations": ["astro-build.astro-vscode", "editorconfig.editorconfig"], + "recommendations": [ + "astro-build.astro-vscode", + "bradlc.vscode-tailwindcss", + "esbenp.prettier-vscode" + ], "unwantedRecommendations": [] } diff --git a/astro-i18next.config.ts b/astro-i18next.config.ts deleted file mode 100644 index aa8749f..0000000 --- a/astro-i18next.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { AstroI18nextConfig } from "astro-i18next"; - -const config: AstroI18nextConfig = { - defaultLocale: "de", - locales: ["de", "en"], - load: ["client", "server"], - i18nextClientPlugins: { - "{initReactI18next}": "react-i18next", - }, - i18nextServerPlugins: { - "{initReactI18next}": "react-i18next", - }, -}; - -export default config; diff --git a/astro.config.mjs b/astro.config.mjs index 9132aff..f9c5a25 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,9 +1,17 @@ +// @ts-check import react from "@astrojs/react"; import tailwind from "@astrojs/tailwind"; -import astroI18next from "astro-i18next"; +import icon from "astro-icon"; import { defineConfig } from "astro/config"; +import { defaultLang, languages } from "./src/i18n/constants"; +// https://astro.build/config export default defineConfig({ + i18n: { + defaultLocale: defaultLang, + locales: Object.keys(languages), + routing: "manual", // see: src/middleware.ts + }, + integrations: [tailwind(), react(), icon()], site: "https://blz-it.de", - integrations: [tailwind(), astroI18next(), react()], }); diff --git a/package.json b/package.json index 265cf0e..39b7c99 100644 --- a/package.json +++ b/package.json @@ -1,35 +1,34 @@ { - "name": "@example/basics", + "name": "@blz-it/blz-it.de", "type": "module", "version": "0.0.1", - "private": true, "scripts": { "dev": "astro dev", "start": "astro dev", - "build": "astro build", + "build": "astro check && astro build", "preview": "astro preview", - "astro": "astro", - "gen-i18n": "astro-i18next generate" + "astro": "astro" }, "dependencies": { - "@astrojs/react": "^1.2.2", - "@astrojs/tailwind": "^2.1.3", - "@headlessui/react": "^1.7.19", - "@heroicons/react": "^2.1.3", - "@hookform/resolvers": "^3.3.4", - "@tailwindcss/forms": "^0.5.7", - "@tailwindcss/typography": "^0.5.13", - "@types/react": "^18.2.78", - "@types/react-dom": "^18.2.23", - "astro": "^1.9.2", - "astro-i18next": "^1.0.0-beta.21", - "astro-icon": "^0.8.1", - "classnames": "^2.5.1", - "react": "^18.0.0", - "react-dom": "^18.0.0", - "react-hook-form": "^7.51.3", - "react-i18next": "^12.1.4", - "tailwindcss": "^3.4.3", - "zod": "^3.23.0" + "@astrojs/check": "^0.9.4", + "@astrojs/react": "^3.6.2", + "@astrojs/tailwind": "^5.1.1", + "@fontsource/poppins": "^5.1.0", + "@headlessui/react": "^2.1.10", + "@heroicons/react": "^2.1.5", + "@iconify-json/mdi": "^1.2.1", + "@tailwindcss/typography": "^0.5.15", + "@types/react": "^18.3.11", + "@types/react-dom": "^18.3.0", + "astro": "^4.15.11", + "astro-icon": "^1.1.1", + "clsx": "^2.1.1", + "prettier": "^3.3.3", + "prettier-plugin-astro": "^0.14.1", + "prettier-plugin-tailwindcss": "^0.6.8", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "tailwindcss": "^3.4.13", + "typescript": "^5.6.2" } } diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json deleted file mode 100644 index d325063..0000000 --- a/public/locales/de/translation.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "dmRegistration": { - "title": "Registrierung für die Deutsche Meisterschaft 2025", - "requirements": "Die Registrierung startet Anfang 2025.", - "ageDisclaimer": "Bitte beachte, dass du im Wettkampfjahr 2026 nicht älter als 22 Jahre werden darfst, d. h. Jahrgänge 01.01.2004 und aufwärts.", - "form": { - "personalInformation": { - "title": "Persönliche Informationen", - "subtitle": "Die folgenden Angaben sind für die Anmeldung verpflichtend." - }, - "additionalPersonalInformation": { - "title": "Zusätzliche Persönliche Informationen", - "subtitle": "Die folgenden Angaben sind vollkommen optional." - }, - "companyInformation": { - "title": "Deine Firma", - "subtitle": "Falls du in einer Firma arbeitest, kannst du diese hier angeben." - }, - "submit": "Absenden", - "fields": { - "firstName": "Vorname", - "lastName": "Nachname", - "birthday": "Geburtstag", - "email": "E-Mail-Adresse", - "phone": "Telefonnummer", - "street": "Straße", - "zip": "Postleitzahl", - "city": "Stadt", - "companyName": "Firmenname", - "occupation": { - "title": "Beruf", - "apprentice": "Auszubildende*r", - "pupil": "Schüler*in", - "student": "Student*in", - "employee": "Angestellte*r", - "other": "Sonstiges" - }, - "state": { - "title": "Bundesland", - "badenWuerttemberg": "Baden-Württemberg", - "bavaria": "Bayern", - "berlin": "Berlin", - "brandenburg": "Brandenburg", - "bremen": "Bremen", - "hamburg": "Hamburg", - "hesse": "Hessen", - "mecklenburgWesternPomerania": "Mecklenburg-Vorpommern", - "lowerSaxony": "Niedersachsen", - "northRhineWestphalia": "Nordrhein-Westfalen", - "rhinelandPalatinate": "Rheinland-Pfalz", - "saarland": "Saarland", - "saxony": "Sachsen", - "saxonyAnhalt": "Sachsen-Anhalt", - "schleswigHolstein": "Schleswig-Holstein", - "thuringia": "Thüringen" - } - } - } - }, - "home": { - "title": "Willkommen bei den Bundesleistungszentren der Softwareentwicklung", - "subtitle": "Wir bereiten auf die Weltmeisterschaften vor!", - "general": { - "title": "Allgemeine Informationen", - "subtitle": "Wer sind wir und was ist unser Ziel?", - "text": "<0>WorldSkills International hat es sich zur Aufgabe gemacht, nachhaltig die Attraktivität der beruflichen Bildung zu verbessern. Zu diesem Zweck werden alle zwei Jahre die “Weltmeisterschaften der Berufe“ ausgetragen in der sich talentierte, junge Menschen untereinander messen. Die deutsche Ausprägung dieser Initiative ist <1>WorldSkills Germany, die beispielsweise selbst nationale und internationale Wettbewerbe veranstaltet. Zu den einzelnen Berufen gehört in Deutschland jeweils ein Bundesleistungszentrum.

Die Bundesleistungszentren von WorldSkills Germany haben die Aufgabe, zusätzlich zu den Trainings nach WorldSkills-Prinzipien für eine möglichst breite Teilnehmerschaft auch die zukünftigen Mitglieder der deutschen Nationalmannschaft und somit Teilnehmer an internationalen Wettbewerben zu trainieren. Sie werden pro Skill-Disziplin exklusiv nur einmal ernannt. Die Ernennung erfolgt durch die Skills-Paten (Verbände, Unternehmen, Institutionen) gemeinsam mit WorldSkills Germany." - }, - "skills": { - "title": "Unsere Skills", - "text": "Die Bundesleistungszentren der Softwareentwicklung haben ihren Standort am <0>Albert-Einstein-Gymnasium Neubrandenburg. An diesem Standort sind <1>Skill 08: Mobile Applications Development und <2>Skill 09: IT Software Solutions for Business vertreten. Mehr Informationen zu den einzelnen Skills sind auf den jeweiligen Unterseiten.", - "skill08": "Als Softwareentwickler*in mit der Spezialisierung auf Mobile Applications bist du Programmierer*in und Designer*in in einem. Du sorgst dafür, dass die Apps auf den mobilen Endgeräten der Benutzer*innen funktionieren, ansprechend aussehen und Spaß machen.", - "skill09": "Die Disziplin IT Software Solutions for Business bildet das gesamte Spektrum der Software-entwickelnden IT-Berufe ab. Geeignet sind alle Full-Stack-Programmierer*innen. Dazu zählen Desktop-, Server-, Datenbank-, Mobile-App- und Webentwicklung." - }, - "cta": { - "title": "Werde Teil unseres Nationalteams", - "subtitle": "Wolltest du schon immer an einem Wettbewerb im Bereich der Softwareentwicklung teilnehmen und dich mit den Besten der Besten messen? Die nächste Registrierung startet Anfang 2025.", - "button": "Registriere dich jetzt" - } - }, - "layout": { - "footer": { - "allRightsReserved": "Alle Rechte vorbehalten", - "contact": "Kontakt", - "imprint": "Impressum", - "legal": "Rechtliches", - "privacy": "Datenschutz", - "website": "Webseite" - }, - "header": { - "home": "Startseite", - "skills": "Unsere Disziplinen" - } - }, - "legal": { - "imprint": "Impressum", - "privacy": "Datenschutz" - }, - "redirect": { - "hint": "Wenn Du nicht automatisch weitergeleitet wirst, klicke bitte auf <0>diesen Link.", - "thisLink": "" - }, - "warnings": { - "maintenance": "Diese Webseite befindet sich derzeit in Wartung und wird in Kürze wieder verfügbar sein." - }, - "errors": { - "404": { - "title": "Seite nicht gefunden", - "subtitle": "Bitte überprüfe die URL in der Adressleiste und versuche es erneut.", - "toHome": "Zur Startseite", - "back": "Zurück zur letzten Seite" - } - }, - "skills": { - "general": { - "title": "Allgemeine Informationen", - "subtitle": "Alles, was du über diesen Skill wissen musst", - "interested": "Du bist interessiert? <0>Registriere dich jetzt!" - }, - "nationalTeam": { - "title": "Das Nationalteam", - "noTeam": "Derzeit gibt es kein Nationalteam. <0>Registriere dich jetzt!" - }, - "nextWSC": { - "title": "WorldSkills Lyon 2024", - "registration": { - "title": "Registrierung", - "date": "25. Januar – 24. Februar 2023", - "description": "<0>Du registrierst dich und erhältst weitere Informationen sowie nach Abschluss des Registrierungszeitraumes deine Zugangsdaten." - }, - "onlineCompetition": { - "title": "Online-Vorausscheid", - "date": "28. Februar – 27. März 2023", - "description": "Innerhalb der Laufzeit des Online-Ausscheids löst du zu einem Zeitpunkt deiner Wahl mehrere anspruchsvolle Testaufgaben, die jeweils ca. 60 – 120 Minuten dauern. Diese kannst du auch über mehrere Tage verteilen. Die Wahl deiner Programmiersprache spielt hierbei noch keine Rolle." - }, - "germanChampionship": { - "title": "Deutsche Meisterschaft", - "date": "22. – 25. Mai 2023", - "description": "Die gemeinsame Deutsche Meisterschaft für beide Skills findet am Bundesleistungszentrum in Neubrandenburg statt. Hier werden über vier Tage anspruchsvolle Desktopanwendungen und Android-Apps programmiert. Damit wird das gemeinsame vier- bis sechsköpfige Nationalteam bestimmt. Es sind nur noch die folgenden Entwicklungsumgebungen/Programmiersprachen zugelassen:<0><1>Visual Studio (C#) für Desktopanwendungen<2>Xamarin (C#), Flutter (Dart) und Android Studio (Kotlin bzw. Java) für Android-App-Entwicklung<3>Microsoft SQL Server" - }, - "einsteinCup": { - "title": "Albert-Einstein-Cup", - "date": "27. – 30. Mai 2024", - "description": "Das gemeinsame Nationalteam wird von unserem Trainerteam in mehreren Trainingslagern und online auf die weiteren Wettkämpfe vorbereitet und im Februar 2024 im Rahmen eines Wettkampfes auf die beiden Skill-Teams aufgeteilt.

Beim Albert-Einstein-Cup treten beide Nationalteams in ihren Wettbewerbsberufen gegen die besten Softwareentwickler*innen Europas und anderer Kontinente an. Im Ergebnis werden die beiden deutschen Teilnehmer*innen für die WorldSkills Lyon 2024 bestimmt." - }, - "wsc": { - "title": "WorldSkills Lyon", - "date": "10. – 15. September 2024", - "description": "Jeweils ein*e Teilnehmer*in vertritt Deutschland in den beiden Skills bei den WorldSkills in Lyon. Der Wettkampf geht über vier Tage." - } - }, - "history": "Geschichte", - "additionalLinks": "Weitere Links", - "contact": "Kontakt", - "08": { - "video": "https://www.youtube.com/embed/v7I124lty3s", - "short": "Entwickler*innen mobiler Anwendungen nutzen Technologie und Design, um ansprechende und gut funktionierende Anwendungen für Handys zu entwickeln.", - "description": "Als Softwareentwickler*in mit der Spezialisierung auf Mobile Applications bist du Programmierer*in und Designer*in in einem. Du sorgst dafür, dass die Apps auf den mobilen Endgeräten der Benutzer*innen funktionieren, ansprechend aussehen und Spaß machen.

Für den Beruf brauchst du ein gewisses Verständnis für Technologie und Design. Du musst die Anforderungen und Wünsche der Auftraggeber*innen verstehen und ein Produkt entwickeln, das zuverlässig, aktualisierbar und für Benutzer*innen leicht zu verstehen und zu verwenden ist.", - "requirementsTitle": "Was solltest du an Erfahrungen mitbringen?", - "requirements": "Du beherrschst mindestens eine Programmiersprache, z. B. Dart oder Kotlin, und programmierst Android-Apps, auch mit Verknüpfung zu Webschnittstellen und der Verwendung integrierter Sensoren. Du verstehst englischsprachige Aufgabenstellungen.", - "occupation": { - "title": "Ein Beruf mit Zukunft und stets am Puls der Zeit", - "text": "Die Möglichkeiten der Kommunikation und des Informationsaustauschs nehmen stetig zu. Mit einem Abschluss in der IT bist du gefragt: Im Jahr 2021 wurden ca. 12 % mehr IT-Talente gesucht als im Vorjahr. Der Mobile Applications Developer ist somit einer der am schnellsten wachsenden Berufe.

Dein Hauptarbeitsmittel ist dein Laptop. Du bist also in Sachen Arbeitsort und -zeit fast ungebunden, sofern kein Kundentermin ansteht. Das Einzige, was du brauchst, ist eine stabile Internetverbindung." - }, - "links": { - "wsi": "Skill 08 bei WorldSkills International", - "wsc2024": "Skill 08 bei den WorldSkills Lyon 2024" - } - }, - "09": { - "video": "https://www.youtube.com/embed/3F0T3nOrp70", - "short": "Erstellen neuer Systeme und Modifizieren bestehender Systeme, um Softwarelösungen für große und kleine Unternehmen bereitzustellen.", - "description": "Die Disziplin IT Software Solutions for Business bildet das gesamte Spektrum der Software-entwickelnden IT-Berufe ab. Geeignet sind alle Full-Stack-Programmierer*innen. Dazu zählen Desktop-, Server-, Datenbank-, Mobile-App- und Webentwicklung.

Für den Beruf brauchst du ein gutes technisches Verständnis und logisches Denkvermögen. Du musst die Anforderungen und Wünsche der Auftraggeber*innen verstehen und Programme entwickeln, die zuverlässig, aktualisierbar und für Benutzer*innen leicht zu verstehen und zu verwenden sind.", - "requirementsTitle": "Was solltest du an Erfahrungen mitbringen?", - "requirements": "Du beherrschst mindestens eine Programmiersprache, z. B. C#, programmierst Desktop-, Server-, Web- und mobile Anwendungen, hast Kenntnisse in UML und Datenbanken (SQL) und verstehst englischsprachige Aufgabenstellungen.", - "occupation": { - "title": "Ein Beruf mit Zukunft und stets am Puls der Zeit", - "text": "Die Möglichkeiten der Kommunikation und des Informationsaustauschs nehmen stetig zu. Mit einem Abschluss in der IT bist du gefragt: Im Jahr 2021 wurden ca. 12 % mehr IT-Talente gesucht als im Vorjahr. Als Softwareentwickler*in gehörst du somit zu einer der am schnellsten wachsenden Berufsgruppen.

Dein Hauptarbeitsmittel ist der Computer. Du bist also in Sachen Arbeitsort und -zeit fast ungebunden, sofern kein Kundentermin ansteht. Das einzige, was du brauchst, ist eine stabile Internetverbindung." - }, - "links": { - "wsi": "Skill 09 bei WorldSkills International", - "wsc2024": "Skill 09 bei den WorldSkills Lyon 2024" - } - } - } -} diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json deleted file mode 100644 index d8aaea3..0000000 --- a/public/locales/en/translation.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "dmRegistration": { - "title": "Registration for the German Nationals 2025", - "requirements": "The registration opens in the beginning of 2025.", - "ageDisclaimer": "Please note that you must not be older than 22 years in the competition year 2023, i.e., born 01 January 2002 or later.", - "form": { - "personalInformation": { - "title": "Personal Information", - "subtitle": "The following information is required for registration." - }, - "additionalPersonalInformation": { - "title": "Additional Personal Information", - "subtitle": "The following information is optional." - }, - "companyInformation": { - "title": "Your Company", - "subtitle": "If you work in a company, you can enter it here." - }, - "submit": "Submit", - "fields": { - "firstName": "First name", - "lastName": "Last name", - "birthday": "Birthday", - "email": "Email address", - "phone": "Phone", - "street": "Street", - "zip": "Zip code", - "city": "City", - "companyName": "Company name", - "occupation": { - "title": "Occupation", - "apprentice": "Apprentice", - "pupil": "Pupil", - "student": "Student", - "employee": "Employee", - "other": "Other" - }, - "state": { - "title": "State", - "badenWuerttemberg": "Baden-Württemberg", - "bavaria": "Bavaria", - "berlin": "Berlin", - "brandenburg": "Brandenburg", - "bremen": "Bremen", - "hamburg": "Hamburg", - "hesse": "Hesse", - "mecklenburgWesternPomerania": "Mecklenburg-Western Pomerania", - "lowerSaxony": "Lower Saxony", - "northRhineWestphalia": "North Rhine-Westphalia", - "rhinelandPalatinate": "Rhineland-Palatinate", - "saarland": "Saarland", - "saxony": "Saxony", - "saxonyAnhalt": "Saxony-Anhalt", - "schleswigHolstein": "Schleswig-Holstein", - "thuringia": "Thuringia" - } - } - } - }, - "home": { - "title": "Welcome to the national centers of software development", - "subtitle": "We offer preparation for the world championships!", - "general": { - "title": "General Information", - "subtitle": "Who are we and what is our goal?", - "text": "<0>WorldSkills International have made it their mission to increase the attractivity of vocational education. For this purpose, the “world championships of skills“ are held every two years, in which talented, young people compete with each other. The German manifestation of this initiative is <1>WorldSkills Germany, which for example also hosts national and international competitions. In Germany, a National Training Centre belongs to a each skill respectively.

The National Training Centres by WorldSkills Germany have the task of training future members of the German national team and thus participants in international competitions, in addition to training according to WorldSkills principles for as broad a group of participants as possible. They are appointed exclusively only once per skills discipline. The appointment is made by the skills mentors (associations, companies, institutions) together with WorldSkills Germany." - }, - "skills": { - "title": "Our Skills", - "text": "The Federal Centres of Excellence in Software Development are located at the <0>Albert-Einstein-Gymnasium Neubrandenburg. At this location, <1>Skill 08: Mobile Applications Development and <2>Skill 09: IT Software Solutions for Business are represented. More information on the individual skills can be found on the respective subpages.", - "skill08": "As a software developer with a specialization in mobile applications, you are a programmer and designer in one. You ensure that the apps work on users' mobile devices, look appealing, and are fun to use.", - "skill09": "The skill IT Software Solutions for Business represents the entire spectrum of software-developing IT professions. All full-stack programmers are suitable. This includes desktop, server, database, mobile app and web development." - }, - "cta": { - "title": "Become part of our national team", - "subtitle": "Have you always wanted to take part in a software development competition and compete with the best of the best? The next registration starts in the beginning of 2025.", - "button": "Register now" - } - }, - "layout": { - "footer": { - "allRightsReserved": "All rights reserved", - "contact": "Contact", - "imprint": "Imprint", - "legal": "Legal", - "privacy": "Privacy Policy", - "website": "Website" - }, - "header": { - "home": "Home", - "skills": "Our Skills" - } - }, - "legal": { - "imprint": "Imprint", - "privacy": "Privacy Policy" - }, - "redirect": { - "hint": "If you are not automatically redirected, please click on <0>this link." - }, - "warnings": { - "maintenance": "This website is currently under maintenance and will be available again soon." - }, - "errors": { - "404": { - "title": "Page not found", - "subtitle": "Please check the URL in the address bar and try again.", - "toHome": "To home page", - "back": "Back to last page" - } - }, - "skills": { - "general": { - "title": "General Information", - "subtitle": "Everything you need to know about this Skill", - "interested": "You are interested? <0>Register now!" - }, - "nationalTeam": { - "title": "Our national team", - "noTeam": "There is currently no national team. <0>Register now!" - }, - "nextWSC": { - "title": "WorldSkills Lyon 2024", - "registration": { - "title": "Registration", - "date": "25 January  – 24 February 2023", - "description": "<0>You register yourself and receive further information as well as, after the registration is closed, your credentials." - }, - "onlineCompetition": { - "title": "Online Competition", - "date": "28 February  – 27 March 2023", - "description": "During this month, you solve multiple complex tasks at a time of your choosing. Each task takes around 60 – 120 minutes, but you can distribute them across multiple days. The programming language that you use is not relevant." - }, - "germanChampionship": { - "title": "German Championship", - "date": "22 – 25 May 2023", - "description": "The shared German Championship for both Skills takes place at the National Training Centre in Neubrandenburg. Over four competition days, you will develop complex desktop and Android applications. This determines the joint four- to six-strong national team. Only the following development environments / programming languages can be used:<0><1>Visual Studio (C#) for desktop applications<2>Xamarin (C#), Flutter (Dart), and Android Studio (Kotlin or Java) for Android app development<3>Microsoft SQL Server" - }, - "einsteinCup": { - "title": "Albert Einstein Cup", - "date": "27 – 30 May 2024", - "description": "The joint national team is being prepared for the following competitions online and in multiple training camps by our trainer team. In February 2024, the Competitors are divided into two separate national teams, one for each Skill.

At the Albert Einstein Cup, both national teams compete against the best software developers of Europe and other continents in their respective Skill. As a result, the two German Competitors for the WorldSkills Lyon 2024 will be determined." - }, - "wsc": { - "title": "WorldSkills Lyon", - "date": "10 – 15 September 2024", - "description": "In each of the two Skills, one Competitor represents Germany at the WorldSkills in Lyon. The Competition takes place over four days." - } - }, - "history": "History", - "additionalLinks": "Additional Links", - "contact": "Contact", - "08": { - "video": "https://www.youtube.com/embed/Qe0ZaQAOQUY", - "short": "Mobile Applications Developers use technology and design to create apps which are appealing and function well on phones.", - "description": "As a software developer with a specialization in mobile applications, you are a programmer and designer in one. You ensure that the apps work on users' mobile devices, look appealing, and are fun to use.

For the job, you need a certain understanding of technology and design. You need to understand the requirements and wishes of the clients and develop a product that is reliable, updatable, and easy for users to understand and use.", - "requirementsTitle": "What experience should you bring with you?", - "requirements": "You master at least one programming language, e.g. Dart or Kotlin, and program mobile apps, including the connection to online APIs and the use of integrated sensors. You understand task in English.", - "occupation": { - "title": "A Career with a future and always on the cutting edge", - "text": "The possibilities of communication and information exchange are constantly increasing. With a degree in IT, you are in demand: in 2021, about 12 % more IT talents were sought than in the previous year. The Mobile Applications Developer is therefore one of the fastest growing occupations.

Your main working tool is your laptop, so you are almost unrestricted in terms of work location and time, as long as there is no customer appointment. The only thing you need is a stable internet connection." - }, - "links": { - "wsi": "Skill 08 at WorldSkills International", - "wsc2024": "Skill 08 at the WorldSkills Lyon 2024" - } - }, - "09": { - "video": "https://www.youtube.com/embed/tSGg8S-_I4k", - "short": "Creating new systems and modifying existing ones to provide software solutions to large and small businesses.", - "description": "The skill IT Software Solutions for Business represents the entire spectrum of software-developing IT professions. All full-stack programmers are suitable. This includes desktop, server, database, mobile app and web development.

For this job you need a good technical understanding and logical thinking. You need to understand the requirements and wishes of the client and develop programs that are reliable, updatable, and easy for users to understand and use.", - "requirementsTitle": "What experience should you bring with you?", - "requirements": "You are proficient in at least one programming language, e.g., C#, can program desktop, server, web, and mobile applications, have knowledge of UML and databases (SQL), and understand English-language tasks.", - "occupation": { - "title": "A Career with a future and always on the cutting edge", - "text": "The possibilities for communication and information exchange are constantly increasing. With a degree in IT, you are in demand: In 2021, approximately 12 % more IT talents were sought than in the previous year. As a software developer, you belong to one of the fastest growing occupational groups.

Your main working tool is the computer. This means that you are almost unrestricted in terms of where and when you work, as long as you don't have a customer appointment. The only thing you need is a stable Internet connection." - }, - "links": { - "wsi": "Skill 09 at WorldSkills International", - "wsc2024": "Skill 09 at the WorldSkills Lyon 2024" - } - } - } -} diff --git a/public/data/history.json b/src/assets/data/history.json similarity index 95% rename from public/data/history.json rename to src/assets/data/history.json index b1edb73..01a0c16 100644 --- a/public/data/history.json +++ b/src/assets/data/history.json @@ -56,7 +56,7 @@ "einsteinCup2024": { "date": "27 Mai – 30 Mai 2024", "title": "Albert-Einstein-Cup", - "text": "Jongwon Kim (Südkorea), Daniel Kalisch (Deutschland) und [Schweiz] sind die Gewinner des Albert-Einstein-Cups. Stefan Kornel (Ungarn) gewinnt die zusätzliche Disziplin Speed-Programming. Der “Hungarian Speed Test“ wurde das erste mal durchgeführt und von Nils Jakubzick (Deutschland) gewonnen." + "text": "Simon Brebeck (Deutschland), Lukas Hertkorn (Deutschland) und Besart Memeti (Schweiz) sind die Gewinner des Albert-Einstein-Cups. Kornél Stefán (Ungarn) gewinnt die zusätzliche Disziplin Speed-Programming. Der “Hungarian Speed Test“ wurde das erste Mal durchgeführt und von Nils Jakubzick (Deutschland) gewonnen." }, "wsc2024": { "date": "10 – 15 September 2024", diff --git a/public/imgs/aec.webp b/src/assets/img/aec.webp similarity index 100% rename from public/imgs/aec.webp rename to src/assets/img/aec.webp diff --git a/public/imgs/germanChampionship.webp b/src/assets/img/german-championship.webp similarity index 100% rename from public/imgs/germanChampionship.webp rename to src/assets/img/german-championship.webp diff --git a/public/img/hero-bg.jpg b/src/assets/img/hero-bg.jpg similarity index 100% rename from public/img/hero-bg.jpg rename to src/assets/img/hero-bg.jpg diff --git a/public/imgs/online_competition.webp b/src/assets/img/online-competition.webp similarity index 100% rename from public/imgs/online_competition.webp rename to src/assets/img/online-competition.webp diff --git a/public/imgs/registration.webp b/src/assets/img/registration.webp similarity index 100% rename from public/imgs/registration.webp rename to src/assets/img/registration.webp diff --git a/src/assets/img/skill-08.jpg b/src/assets/img/skill-08.jpg new file mode 100644 index 0000000..a6db807 Binary files /dev/null and b/src/assets/img/skill-08.jpg differ diff --git a/src/assets/img/skill-09.jpg b/src/assets/img/skill-09.jpg new file mode 100644 index 0000000..56b9c4d Binary files /dev/null and b/src/assets/img/skill-09.jpg differ diff --git a/public/img/wsg_hands_white.svg b/src/assets/img/wsg-hands-white.svg similarity index 100% rename from public/img/wsg_hands_white.svg rename to src/assets/img/wsg-hands-white.svg diff --git a/public/img/wsg_hands.svg b/src/assets/img/wsg-hands.svg similarity index 100% rename from public/img/wsg_hands.svg rename to src/assets/img/wsg-hands.svg diff --git a/public/img/wsg_horizontal.svg b/src/assets/img/wsg-horizontal.svg similarity index 100% rename from public/img/wsg_horizontal.svg rename to src/assets/img/wsg-horizontal.svg diff --git a/src/components/Cta.astro b/src/components/Cta.astro index 2d602be..2787e27 100644 --- a/src/components/Cta.astro +++ b/src/components/Cta.astro @@ -1,12 +1,11 @@ --- -interface Action { - label: string; - url: string; -} -export interface Props { +interface Props { title: string; subtitle?: string | null; - action?: Action; + action?: { + label: string; + url: string; + }; } const { title, subtitle, action } = Astro.props; @@ -16,7 +15,7 @@ const { title, subtitle, action } = Astro.props; class="overflow-hidden bg-wsi-blue-300 px-6 py-20 text-center shadow-2xl sm:rounded-3xl sm:px-16" >

{title}

@@ -32,7 +31,7 @@ const { title, subtitle, action } = Astro.props;
{action.label} diff --git a/src/components/EventCard.astro b/src/components/EventCard.astro index f5e31aa..efe1731 100644 --- a/src/components/EventCard.astro +++ b/src/components/EventCard.astro @@ -1,108 +1,110 @@ ---- -import classNames from "classnames"; - -type Props = { - className?: string; - title: string; - img: string; - date: string; - link: string; - hoverTextColor?: "black" | "white"; -}; - -const { - className, - title, - img, - date, - link, - hoverTextColor = "black", -} = Astro.props; -const hoverTextShadowColor = - hoverTextColor === "black" ? "#ffffff7f" : "#0000007f"; ---- - -
- - - -
-

- {title} -

-

-

-
-
- -
-
- - +--- +import type { ImageMetadata } from "astro"; +import { Image } from "astro:assets"; +import { clsx } from "clsx"; + +interface Props { + className?: string; + title: string; + img: ImageMetadata; + date: string; + link: string; + hoverTextColor?: "black" | "white"; +} + +const { + className, + title, + img, + date, + link, + hoverTextColor = "black", +} = Astro.props; +const hoverTextShadowColor = + hoverTextColor === "black" ? "#ffffff7f" : "#0000007f"; +--- + +
+ + + +
+

+ {title} +

+

+

+
+
+ +
+
+ + diff --git a/src/components/Footer.astro b/src/components/Footer.astro index de3b7a3..ca7bab5 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,18 +1,18 @@ --- -import { Icon } from "astro-icon"; -import i18next, { t } from "i18next"; -import { buildLink } from "../routing/buildLink"; +import { Icon } from "astro-icon/components"; +import { Image } from "astro:assets"; +import { getRelativeLocaleUrl } from "astro:i18n"; +import WsgHorizontalImage from "~/assets/img/wsg-horizontal.svg"; +import { getLangFromUrl, useTranslations } from "~/i18n"; -interface Social { - name: string; - href: string; - icon: string; -} -const socials: Social[] = [ +const lang = getLangFromUrl(Astro.url); +const t = useTranslations(lang); + +const socials = [ { name: "YouTube", href: "https://youtube.de/@GermanITSkills", - icon: "bi:youtube", + icon: "mdi:youtube", }, { name: "Instagram", @@ -22,7 +22,7 @@ const socials: Social[] = [ { name: "Facebook", href: "https://facebook.com/GermanITSkills", - icon: "ic:baseline-facebook", + icon: "mdi:facebook", }, ]; --- @@ -30,9 +30,13 @@ const socials: Social[] = [
-
+ - +
diff --git a/src/components/Hero.astro b/src/components/Hero.astro index 4160023..352425b 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -1,45 +1,46 @@ --- -import classNames from "classnames"; +import type { ImageMetadata } from "astro"; +import { Image } from "astro:assets"; +import { clsx } from "clsx"; +import HeroBgImage from "~/assets/img/hero-bg.jpg"; -export interface Props { +interface Props { title: string; - subtitle?: string | null; - img: string; - textCenter?: boolean; + subtitle: string; + img?: ImageMetadata; size?: "md" | "lg"; } -const { title, subtitle, img, textCenter, size = "md" } = Astro.props; +const { title, subtitle, img = HeroBgImage, size = "lg" } = Astro.props; --- -
+
- +

{title}

-

+

{subtitle}

- - +--- +import { clsx } from "clsx"; + +interface Props { + href: string; + isExternal?: boolean; +} + +const { href, isExternal } = Astro.props; +--- + + diff --git a/src/components/LinkCard.astro b/src/components/LinkCard.astro index 1368b94..48ceb38 100644 --- a/src/components/LinkCard.astro +++ b/src/components/LinkCard.astro @@ -1,40 +1,33 @@ ---- -import { Icon } from "astro-icon"; -import classNames from "classnames"; - -type Props = { - name: string; - text: string; - href: string; -}; - -const { name, text, href } = Astro.props; ---- - - -
-
- {name} -
-
- {text} -
-
- - +--- +import { Icon } from "astro-icon/components"; + +interface Props { + name: string; + text: string; + href: string; +} + +const { name, text, href } = Astro.props; +--- + + +
+
+ {name} +
+
+ {text} +
+
+ +
diff --git a/src/components/NoTranslate.astro b/src/components/NoTranslate.astro new file mode 100644 index 0000000..54c80a1 --- /dev/null +++ b/src/components/NoTranslate.astro @@ -0,0 +1,44 @@ +--- +import { getLangFromUrl, useTranslations, type Language } from "~/i18n"; + +interface Props { + availableLanguages: Language[]; +} + +const { availableLanguages } = Astro.props; + +const lang = getLangFromUrl(Astro.url); +const t = useTranslations(lang); +--- + +{ + !availableLanguages.includes(lang) && ( +
+
+
+ +
+
+

+ {t({ + de: "Diese Seite ist in der gewählten Sprache nicht verfügbar.", + en: "This page is not available in the selected language.", + })} +

+
+
+
+ ) +} diff --git a/src/components/Redirect.astro b/src/components/Redirect.astro deleted file mode 100644 index de64ba5..0000000 --- a/src/components/Redirect.astro +++ /dev/null @@ -1,26 +0,0 @@ ---- -import { Trans } from "astro-i18next/components"; -import i18next from "i18next"; - -export interface Props { - url: string; -} - -const { url } = Astro.props; ---- - - - - - - - -

- - If you are not automatically redirected, please click on this link. - -

- - diff --git a/src/components/dividers/WaveDivider.astro b/src/components/dividers/WaveDivider.astro index 619577e..5262dc4 100644 --- a/src/components/dividers/WaveDivider.astro +++ b/src/components/dividers/WaveDivider.astro @@ -1,50 +1,50 @@ ---- -type Props = { - type: "top" | "bottom"; - color: string; - bgColor: string; -}; -const { type, color, bgColor } = Astro.props; ---- - -
- { - type === "top" ? ( - - - - ) : ( - <> - - - - - - - - ) - } -
- - +--- +interface Props { + type: "top" | "bottom"; + color: string; + bgColor: string; +} +const { type, color, bgColor } = Astro.props; +--- + +
+ { + type === "top" ? ( + + + + ) : ( + <> + + + + + + + + ) + } +
+ + diff --git a/src/components/dropdowns/Dropdown.tsx b/src/components/dropdowns/Dropdown.tsx index 6678709..005e010 100644 --- a/src/components/dropdowns/Dropdown.tsx +++ b/src/components/dropdowns/Dropdown.tsx @@ -1,85 +1,87 @@ -import { Fragment } from "react"; -import { Listbox, Transition } from "@headlessui/react"; -import { CheckIcon, ChevronUpDownIcon } from "@heroicons/react/20/solid/index"; -import classNames from "classnames"; - -export type DropDownProps = { - item: string; - options: readonly string[]; - onChange: (option: string) => void; - label?: string; - icon: JSX.Element; -}; - -export const Dropdown = ({ item, options, icon, onChange, label }: DropDownProps) => { - return ( - option !== item && onChange(option)} - > - {({ open }) => ( -
- {label && ( - - {label} - - )} -
- - - {item} - - - {icon} - - - - - - {options.map((option) => ( - - {({ selected }) => ( - <> - - {option} - - - {selected ? ( - - - ) : null} - - )} - - ))} - - -
-
- )} -
- ); -}; +import { + Label, + Listbox, + ListboxButton, + ListboxOption, + ListboxOptions, + Transition, +} from "@headlessui/react"; +import { CheckIcon } from "@heroicons/react/20/solid/index"; +import { clsx } from "clsx"; +import { Fragment } from "react"; + +interface Props { + item: string; + options: readonly string[]; + onChange: (option: string) => void; + label?: string; + icon: JSX.Element; +} + +export const Dropdown = ({ item, options, icon, onChange, label }: Props) => { + return ( + option !== item && onChange(option)} + > + {({ open }) => ( +
+ {label && ( + + )} +
+ + + {item} + + + {icon} + + + + + + {options.map((option) => ( + + {({ selected }) => ( + <> + + {option} + + + {selected ? ( + + + ) : null} + + )} + + ))} + + +
+
+ )} +
+ ); +}; diff --git a/src/components/dropdowns/LanguageDropdown.tsx b/src/components/dropdowns/LanguageDropdown.tsx index c03557e..cb030df 100644 --- a/src/components/dropdowns/LanguageDropdown.tsx +++ b/src/components/dropdowns/LanguageDropdown.tsx @@ -1,39 +1,21 @@ import { ChevronUpDownIcon } from "@heroicons/react/20/solid"; -import { useEffect, useState } from "react"; -import { useTranslation } from "react-i18next"; -import { getPathLang, pathWithoutLanguage } from "../../routing/lang"; +import type { LocalePath } from "~/i18n"; import { Dropdown } from "./Dropdown"; -type LanguageDropdownProps = { - astroPath: string; -}; +interface Props { + lang: string; + paths: LocalePath[]; +} -const upDownChevron = ( -