blog/src/components/Header.astro
radishzzz ae39d7b08c feat: enhance post listing and reading time display
- Implement dynamic post listing grouped by year with improved date formatting
- Add reading time display for each post
- Update index pages for both default and localized routes
- Modify content utility functions to support reading time metadata
- Refactor global styles and type definitions to support new features
2025-01-26 02:59:39 +00:00

25 lines
453 B
Text

---
import themeConfig from '@/config'
const { title, subtitle } = themeConfig.site
const { titleSpace } = themeConfig.global
const marginBottom = {
1: 'mb-1',
2: 'mb-2',
3: 'mb-3',
4: 'mb-4',
}[titleSpace] || 'mb-3'
---
<header>
<h1 class={`${marginBottom} mt--5.2 text-12 c-primary font-bold font-title`}>
<a href="/">
{title}
</a>
</h1>
<h2 class="text-5.6 c-secondary font-navbar">
{subtitle}
</h2>
</header>