diff --git a/astro.config.mjs b/astro.config.mjs index 703d679..42dd9c2 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -3,6 +3,7 @@ import react from "@astrojs/react"; import tailwind from "@astrojs/tailwind"; import icon from "astro-icon"; import { defineConfig } from "astro/config"; +import { isRegistrationEnabled } from "./src/config"; import { defaultLang, languages } from "./src/i18n/constants"; // https://astro.build/config @@ -14,6 +15,7 @@ export default defineConfig({ integrations: [tailwind(), react(), icon()], site: "https://blz-it.de", redirects: { + ...(isRegistrationEnabled ? {} : { "/de/anmeldung": "/" }), "/de/skill08": "/mobile-applications-development", "/de/skill09": "/software-applications-development", "/it-software-solutions-for-business": "/software-applications-development", diff --git a/src/components/EventCard.astro b/src/components/EventCard.astro index efe1731..51af29e 100644 --- a/src/components/EventCard.astro +++ b/src/components/EventCard.astro @@ -8,7 +8,7 @@ interface Props { title: string; img: ImageMetadata; date: string; - link: string; + link?: string; hoverTextColor?: "black" | "white"; } @@ -27,25 +27,31 @@ const hoverTextShadowColor =
@@ -53,7 +59,7 @@ const hoverTextShadowColor = class={clsx( "card-title peer md:text-lg md:font-bold mt-1 text-left", "transition-all duration-300", - "group-hover:mt-0 group-hover:text-base group-hover:font-normal", + "group-hover:mt-0 group-hover:text-base group-hover:font-normal" )} > {title} @@ -63,7 +69,7 @@ const hoverTextShadowColor = class={clsx( "card-date", "text-center md:text-base text-gray-200 tracking-wider mt-8 sm:mt-4 md:mt-8", - "transition-all group-hover:opacity-0 group-hover:mt-0", + "transition-all group-hover:opacity-0 group-hover:mt-0" )} />
diff --git a/src/components/Header.astro b/src/components/Header.astro index d33adec..3b27018 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -2,6 +2,7 @@ import { Image } from "astro:assets"; import { getRelativeLocaleUrl } from "astro:i18n"; import WsgHandsWhiteImage from "~/assets/img/wsg-hands-white.svg"; +import { isRegistrationEnabled } from "~/config"; import { getLangFromUrl, getLocalePaths, useTranslations } from "~/i18n/utils"; import { LanguageDropdown } from "./dropdowns/LanguageDropdown"; import { SkillsDropdown } from "./dropdowns/SkillsDropdown"; @@ -52,14 +53,18 @@ const skills = [ {t({ de: "Startseite", en: "Home" })}
- + { + isRegistrationEnabled && ( + + ) + } -
- - {t({ de: "Anmeldung", en: "Registration" })} - -
+ { + isRegistrationEnabled && ( +
+ + {t({ de: "Anmeldung", en: "Registration" })} + +
+ ) + }

-

- { - t({ - de: "Du bist interessiert?", - en: "You are interested?", - }) - } - - {t({ de: "Jetzt anmelden!", en: "Register now!" })} - -

+ { + isRegistrationEnabled && ( +

+ {t({ + de: "Du bist interessiert?", + en: "You are interested?", + })} + + {t({ de: "Jetzt anmelden!", en: "Register now!" })} + +

+ ) + }