feat: Armarium full customization and 4-language i18n (v0.8.0)

Replaces Astro Rocket demo content with Armarium branding and adds
complete DE/FR/IT/EN translations across all pages.

Branding & content (v0.7.0):
- Add horizontal SVG logo to navbar with currentColor dark mode support
- Rewrite homepage with Armarium hero, 6 feature cards, trust bar,
  Zürich coat of arms SVG, and CTA; shared HomePage.astro component
- Add privacy page (/datenschutz) with 6 Infomaniak certification cards
  and 8-section policy (ISO 27001:2022, Swiss Hosting, nDSG/GDPR, etc.)
- Add legal notice page (/impressum)
- Rewrite about, contact, 404 pages with Armarium content
- Add features page (/projects) from projects content collection
- Add language switcher dropdown (LanguageSwitcherDropdown.astro)
- Add single launch blog post; remove all demo blog/project content
- Set up i18n foundation: astro.config.mjs, ui.ts, utils.ts

Full i18n (v0.8.0):
- Add all pages in FR/IT/EN: about, contact, blog, features, privacy,
  legal notice — 28 locale variants total
- Language switcher visible in every layout (PageLayout, BlogLayout,
  ProjectLayout, LandingLayout) with translated nav items
- Locale-aware nav and footer hrefs via nav.*.href keys in ui.ts
- Shared page components (AboutPage, ContactPage, FeaturesIndexPage,
  BlogIndexPage) accept locale prop; locale pages are 4-line wrappers
- Extend content.config.ts locale enum with de and it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel Krähenbühl
2026-04-13 21:51:21 +02:00
parent 4053bdfbc5
commit d668aa0fdf
75 changed files with 3126 additions and 3619 deletions
+131
View File
@@ -0,0 +1,131 @@
---
/**
* Shared home page component — renders in all 4 locales.
*/
import { Hero } from '@/components/hero';
import Button from '@/components/ui/form/Button/Button.astro';
import Badge from '@/components/ui/data-display/Badge/Badge.astro';
import Card from '@/components/ui/data-display/Card/Card.astro';
import Icon from '@/components/ui/primitives/Icon/Icon.astro';
import { useTranslations } from '@/i18n/utils';
import type { Locale } from '@/i18n/ui';
interface Props {
locale: Locale;
}
const { locale } = Astro.props;
const t = useTranslations(locale);
const features = [
{ key: 'f1', icon: 'layout-dashboard' },
{ key: 'f2', icon: 'list' },
{ key: 'f3', icon: 'pie-chart' },
{ key: 'f4', icon: 'wallet' },
{ key: 'f5', icon: 'target' },
{ key: 'f6', icon: 'shield-check' },
] as const;
---
<!-- Hero -->
<Hero layout="centered" size="xl" class="hero-dark-gradient">
<Badge slot="badge" variant="brand" pill pulse class="dark:text-brand-200">
{t('hero.badge')}
</Badge>
<h1 slot="title">
<span class="text-foreground [-webkit-text-fill-color:currentColor]">Armarium Suite —</span><br />
<span class="text-brand-500 [-webkit-text-fill-color:var(--color-brand-500)] dark:text-foreground dark:[-webkit-text-fill-color:currentColor]">Budget</span><span class="text-foreground [-webkit-text-fill-color:currentColor]"> &amp; More</span>
</h1>
<p slot="description">{t('hero.description')}</p>
<Fragment slot="actions">
<Button size="lg" href="/register">
{t('hero.register')}
<Icon name="arrow-right" size="sm" />
</Button>
<Button size="lg" variant="outline" href="#features">
{t('hero.login')}
</Button>
</Fragment>
</Hero>
<!-- Trust bar -->
<div class="relative z-10 py-5 bg-background border-t border-border">
<div class="mx-auto max-w-6xl px-6">
<div class="flex flex-wrap justify-center gap-x-8 gap-y-3 text-sm text-foreground-muted">
<span class="flex items-center gap-2">
<svg class="w-5 h-6 shrink-0" viewBox="0 0 32 36" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="Zürich" role="img">
<defs><clipPath id="zh-home"><path d="M16 1L1 7V23L6 30L16 34L26 30L31 23V7L16 1Z"/></clipPath></defs>
<path d="M16 1L1 7V23L6 30L16 34L26 30L31 23V7L16 1Z" fill="white"/>
<polygon points="1,7 16,1 31,7 1,34" fill="#003DA5" clip-path="url(#zh-home)"/>
<path d="M16 1L1 7V23L6 30L16 34L26 30L31 23V7L16 1Z" fill="none" stroke="#003DA5" stroke-width="1.5"/>
</svg>
Made in Zürich, Switzerland
</span>
<span class="flex items-center gap-2">
<Icon name="shield-check" size="sm" class="text-brand-500" />
{t('trust.privacy')}
</span>
<span class="flex items-center gap-2">
<Icon name="check-circle" size="sm" class="text-brand-500" />
{t('trust.free')}
</span>
</div>
</div>
</div>
<!-- Features -->
<section id="features" class="relative z-10 py-[var(--space-section-md)] bg-background-secondary border-t border-border">
<div class="mx-auto max-w-6xl px-6 flex flex-col gap-8">
<div class="flex flex-col items-center gap-4 text-center" data-reveal>
<div class="flex flex-col items-center gap-6">
<Badge variant="brand" pill>{t('features.badge')}</Badge>
<h2 class="font-display text-3xl md:text-4xl font-bold text-foreground">
{t('features.title')}
</h2>
</div>
<p class="text-lg text-foreground-muted max-w-2xl mx-auto">
{t('features.description')}
</p>
</div>
<div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3" data-reveal data-reveal-delay="1">
{features.map(({ key, icon }) => (
<Card hover>
<div class="flex items-start gap-4">
<div class="w-10 h-10 rounded-xl bg-gradient-to-br from-brand-500/20 to-brand-500/5 flex items-center justify-center text-brand-500 shrink-0">
<Icon name={icon} size="sm" />
</div>
<div class="flex-1 min-w-0">
<h3 class="text-base font-semibold text-foreground">{t(`${key}.title` as any)}</h3>
<p class="text-sm text-foreground-muted leading-relaxed mt-1.5">{t(`${key}.desc` as any)}</p>
</div>
</div>
</Card>
))}
</div>
</div>
</section>
<!-- CTA -->
<section class="relative z-10 py-[var(--space-section-md)] bg-background border-t border-border">
<div class="mx-auto max-w-2xl px-6 text-center" data-reveal>
<h2 class="font-display text-4xl font-bold text-foreground mb-4 text-balance">
{t('cta.title')}
</h2>
<p class="text-lg text-foreground-muted mb-8 text-balance">
{t('cta.desc')}
</p>
<div class="flex flex-col sm:flex-row gap-4 justify-center">
<Button size="lg" href="/register">
{t('cta.register')}
<Icon name="arrow-right" size="sm" />
</Button>
<Button size="lg" variant="outline" href="/login">
{t('cta.login')}
</Button>
</div>
</div>
</section>