diff --git a/src/components/HeroCard.astro b/src/components/HeroCard.astro index 5c2123b..c92ceab 100644 --- a/src/components/HeroCard.astro +++ b/src/components/HeroCard.astro @@ -32,9 +32,9 @@ const link = translatePath(`/${collection}/${slug.split("/")[0]}`); --- - + {icon && } {title} diff --git a/src/components/Image.astro b/src/components/Image.astro index ef94280..d18dd9d 100644 --- a/src/components/Image.astro +++ b/src/components/Image.astro @@ -5,6 +5,7 @@ import { generateThumbHash } from "@helpers/image"; interface Props { src: ImageMetadata; alt: string; + pictureClass?: string; class?: string; caption?: string; hash?: boolean; @@ -12,7 +13,14 @@ interface Props { maxWidth?: number; } -const { src: image, loader = true, hash = true, alt, maxWidth } = Astro.props; +const { + src: image, + loader = true, + pictureClass = "", + hash = true, + alt, + maxWidth, +} = Astro.props; let thumbhash = hash ? await generateThumbHash(image) : ""; @@ -40,7 +48,7 @@ const sizes = [ alt={alt} data-thumbhash={thumbhash} pictureAttributes={{ - class: `${hash ? "block h-full relative" : ""} ${loader ? "thumb" : ""}`, + class: `${hash ? "block h-full relative" : ""} ${loader ? "thumb" : ""} ${pictureClass}`, }} class={Astro.props.class} widths={sizes.map((size) => size.width)} diff --git a/src/components/LanguagePicker.astro b/src/components/LanguagePicker.astro index b3b2b5a..1048bed 100644 --- a/src/components/LanguagePicker.astro +++ b/src/components/LanguagePicker.astro @@ -24,19 +24,15 @@ const flags = { const t = useTranslations(Astro.url); --- - +{ + Object.entries(locales).map(([lang, label]) => ( + + {flags[label as keyof typeof flags]} + {t(label as "de")} + + )) +} diff --git a/src/components/Max.astro b/src/components/Max.astro index c91f89e..f6d8c35 100644 --- a/src/components/Max.astro +++ b/src/components/Max.astro @@ -10,12 +10,15 @@ const t = useTranslations(Astro.url); --- -
+
its mee
-
+

{t("home.title")}

{t("home.subtitle")}

@@ -36,13 +39,11 @@ const t = useTranslations(Astro.url); diff --git a/src/components/SmallGrid.astro b/src/components/SmallGrid.astro new file mode 100644 index 0000000..8446bbf --- /dev/null +++ b/src/components/SmallGrid.astro @@ -0,0 +1,3 @@ +
+ +
diff --git a/src/components/arrows/ArrowA.astro b/src/components/arrows/ArrowA.astro index 75204fb..64b0a0c 100644 --- a/src/components/arrows/ArrowA.astro +++ b/src/components/arrows/ArrowA.astro @@ -3,7 +3,7 @@ import { useTranslations } from "@i18n/utils"; const t = useTranslations(Astro.url); --- -
+ diff --git a/src/components/arrows/ArrowB.astro b/src/components/arrows/ArrowB.astro index 16cf642..bcefb06 100644 --- a/src/components/arrows/ArrowB.astro +++ b/src/components/arrows/ArrowB.astro @@ -3,7 +3,7 @@ import { useTranslations } from "@i18n/utils"; const t = useTranslations(Astro.url); --- -
+ diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index d5732f4..b5d2525 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -16,6 +16,7 @@ export const ui = { "latest-posts": "Latest Posts", "latest-projects": "Latest Projects", 'home.title': 'Hi, I’m Max :)', + 'website-source': 'source', 'home.subtitle': 'Trained Media Designer, Blender Nerd, Developer and Hardware Tinkerer.', 'nav.blog': 'Blog', 'nav.projects': 'Projects', @@ -31,6 +32,7 @@ export const ui = { "latest-projects": "Neueste Projekte", "read-more": "weiterlesen", 'home.title': 'Hi, ich bin Max :)', + 'website-source': 'Sourcecode', 'home.subtitle': 'Ausgebildeter Mediengestalter, Blender Nerd, Entwickler und Hardware Bastler.', 'nav.blog': 'Blog', 'nav.projects': 'Projekte', diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index ab181e5..d11fbcf 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,10 +2,12 @@ import LanguagePicker from "../components/LanguagePicker.astro"; import { AstroFont } from "astro-font"; import Nav from "../components/Nav.astro"; +import { useTranslations } from "@i18n/utils"; interface Props { title: string; width?: "full" | "compact"; } +const t = useTranslations(Astro.url); const { title, width = "compact" } = Astro.props; --- @@ -123,8 +125,14 @@ const { title, width = "compact" } = Astro.props;
-