blog/src/components/Header.astro
radishzzz b46534419b feat: add language switcher component and update layout
- Introduced a new LanguageSwitcher component to facilitate language switching in the application.
- Added an SVG icon for the language switcher button.
- Updated the Header component to adjust margin for better spacing.
- Modified the Navigation component's margin and top properties for improved layout.
- Adjusted the ThemeToggle button size for consistency with the new design.
2025-01-24 10:11:56 +00:00

30 lines
536 B
Text

---
import themeConfig from '@/config'
const { title, subtitle } = themeConfig.site
const { titleSpace = 2 } = themeConfig.global
const marginClass = {
1: 'mb-1',
2: 'mb-2',
3: 'mb-3',
4: 'mb-4',
}[titleSpace] || 'mb-3'
---
<header>
<h1
class={`${marginClass} mt--3.2 text-12 c-primary font-bold font-title`}
aria-label="Title Tag"
>
<a href="/">
{title}
</a>
</h1>
<h3
class="text-5.6 c-primary font-navbar opacity-50"
aria-label="Meta Description"
>
{subtitle}
</h3>
</header>