mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 19:51:07 +02:00
refactor: enhance theme configuration and path handling
- Update config.ts with more descriptive comments and simplified settings - Remove about page content section - Add new path utility functions for localization and page type detection - Introduce SiteTitle component for mobile post page navigation - Modify Header and Layout components to use new path utilities - Adjust title spacing and font sizes - Update VSCode settings with new dictionary words
This commit is contained in:
parent
35b2542ec8
commit
f8bf077948
8 changed files with 130 additions and 93 deletions
|
@ -1,25 +1,29 @@
|
|||
---
|
||||
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-2',
|
||||
3: 'mb-3',
|
||||
4: 'mb-4',
|
||||
2: 'mb-3',
|
||||
3: 'mb-5',
|
||||
}[titleSpace] || 'mb-3'
|
||||
---
|
||||
|
||||
<header>
|
||||
<h1 class={`${marginBottom} mt--5.2 text-12 c-primary font-bold font-title`}>
|
||||
<a href="/">
|
||||
<h1 class={`${marginBottom} mt--5 text-12.8 c-primary font-bold font-title`}>
|
||||
<a href={getLocalizedPath('/')}>
|
||||
{title}
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<h2 class="text-5.6 c-secondary font-navbar">
|
||||
{subtitle}
|
||||
</h2>
|
||||
|
||||
{subtitle && (
|
||||
<h2 class="text-5.6 c-secondary font-navbar">
|
||||
{subtitle}
|
||||
</h2>
|
||||
)}
|
||||
</header>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue