mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 19:22:52 +02:00

- Add view transitions for site title - Update Navbar with hover effects and improved typography - Modify index page layout with decorative lines and date formatting - Adjust post publication dates - Update VSCode dictionary with new terms
32 lines
668 B
Text
32 lines
668 B
Text
---
|
|
import themeConfig from '@/config'
|
|
import { getPagePath } from '@/utils/path'
|
|
|
|
const { title, subtitle } = themeConfig.site
|
|
const { titleSpace } = themeConfig.global
|
|
const currentPath = Astro.url.pathname
|
|
const { getLocalizedPath } = getPagePath(currentPath)
|
|
|
|
const marginBottom = {
|
|
1: 'mb-1',
|
|
2: 'mb-3',
|
|
3: 'mb-5',
|
|
}[titleSpace] || 'mb-3'
|
|
---
|
|
|
|
<header>
|
|
<h1 class={`${marginBottom} mt--5 text-12.8 c-primary font-bold font-title`}>
|
|
<a
|
|
href={getLocalizedPath('/')}
|
|
transition:name="site-title"
|
|
>
|
|
{title}
|
|
</a>
|
|
</h1>
|
|
|
|
{subtitle && (
|
|
<h2 class="text-5.6 c-secondary font-navbar">
|
|
{subtitle}
|
|
</h2>
|
|
)}
|
|
</header>
|