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 && (
+
+ )
+ }
-
+ {
+ isRegistrationEnabled && (
+
+ )
+ }
-
- {
- 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!" })}
+
+
+ )
+ }
@@ -54,7 +57,9 @@ const t = useTranslations(lang);
de: "28. Dezember 2024 – 28. Februar 2025",
en: "28 December 2024 – 28 February 2025",
})}
- link={getRelativeLocaleUrl(lang, "anmeldung")}
+ link={isRegistrationEnabled
+ ? getRelativeLocaleUrl(lang, "anmeldung")
+ : undefined}
className="md:float-right md:mt-[-4rem]"
hoverTextColor="white"
/>
@@ -86,9 +91,15 @@ const t = useTranslations(lang);
-
-
- {t({ de: "Du meldest dich an", en: "You register yourself" })}
-
+ {
+ isRegistrationEnabled ? (
+
+ {t({ de: "Du meldest dich an", en: "You register yourself" })}
+
+ ) : (
+ t({ de: "Du meldest dich an", en: "You register yourself" })
+ )
+ }
{
t({
de: "und erhältst vor dem Start des Online-Vorausscheides deine Zugangsdaten.",
diff --git a/src/config.ts b/src/config.ts
new file mode 100644
index 0000000..671fbe9
--- /dev/null
+++ b/src/config.ts
@@ -0,0 +1 @@
+export const isRegistrationEnabled = false;
diff --git a/src/pages/en/index.astro b/src/pages/en/index.astro
index 1bf6541..364436a 100644
--- a/src/pages/en/index.astro
+++ b/src/pages/en/index.astro
@@ -6,6 +6,7 @@ import Link from "~/components/Link.astro";
import HeadedSection from "~/components/sections/HeadedSection.astro";
import WavedSection from "~/components/sections/WavedSection.astro";
import SkillCard from "~/components/skill/SkillCard.astro";
+import { isRegistrationEnabled } from "~/config";
import { defaultLang, type Language } from "~/i18n";
import Layout from "~/layouts/Layout.astro";
@@ -82,14 +83,18 @@ const lang = (Astro.currentLocale || defaultLang) as Language;
/>
-
-
-
+ {
+ isRegistrationEnabled && (
+
+
+
+ )
+ }
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 6a7d2d7..499bf45 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -6,6 +6,7 @@ import Link from "~/components/Link.astro";
import HeadedSection from "~/components/sections/HeadedSection.astro";
import WavedSection from "~/components/sections/WavedSection.astro";
import SkillCard from "~/components/skill/SkillCard.astro";
+import { isRegistrationEnabled } from "~/config";
import { defaultLang, type Language } from "~/i18n";
import Layout from "~/layouts/Layout.astro";
@@ -83,14 +84,18 @@ const lang = (Astro.currentLocale || defaultLang) as Language;
/>
-
-
-
+ {
+ isRegistrationEnabled && (
+
+
+
+ )
+ }