mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 19:51:07 +02:00
fix: upgrade waline to v3.5.7 (fixes #10), remove unused titlegap configuration
This commit is contained in:
parent
d3d6561f4d
commit
bf20fb4014
12 changed files with 443 additions and 577 deletions
|
@ -5,24 +5,11 @@ import { getPageInfo } from '@/utils/page'
|
|||
|
||||
const { currentLang, getLocalizedPath, isPost } = getPageInfo(Astro.url.pathname)
|
||||
const { title, subtitle, i18nTitle } = themeConfig.site
|
||||
const { titleGap } = themeConfig.global
|
||||
|
||||
const currentUI = ui[currentLang as keyof typeof ui]
|
||||
const headerTitle = i18nTitle ? currentUI.title : title
|
||||
const headerSubtitle = i18nTitle ? currentUI.subtitle : subtitle
|
||||
|
||||
const marginBottom = {
|
||||
1: 'mb-0.9',
|
||||
2: 'mb-1.8',
|
||||
3: 'mb-2.7',
|
||||
}[titleGap] || 'mb-1.8 '
|
||||
|
||||
const postMarginBottom = {
|
||||
1: 'mb-1.9 lg:mb-0.9',
|
||||
2: 'mb-2.8 lg:mb-1.8',
|
||||
3: 'mb-3.7 lg:mb-2.7',
|
||||
}[titleGap] || 'mb-2.8 lg:mb-1.8'
|
||||
|
||||
const TitleTag = isPost ? 'h2' : 'h1'
|
||||
const SubtitleTag = isPost ? 'div' : 'h2'
|
||||
---
|
||||
|
@ -36,8 +23,8 @@ const SubtitleTag = isPost ? 'div' : 'h2'
|
|||
<TitleTag
|
||||
class:list={[
|
||||
isPost
|
||||
? `${postMarginBottom} mt-3.2 text-5.375 c-secondary lg:(mt-0 text-9 c-primary)`
|
||||
: `${marginBottom} text-8 w-75% c-primary lg:(text-9 w-full)`,
|
||||
? `mb-2.8 mt-3.2 text-5.375 c-secondary lg:(mb-1.8 mt-0 text-9 c-primary)`
|
||||
: `mb-1.8 w-75% text-8 c-primary lg:(w-full text-9)`,
|
||||
'font-bold font-title',
|
||||
]}
|
||||
>
|
||||
|
@ -62,7 +49,7 @@ const SubtitleTag = isPost ? 'div' : 'h2'
|
|||
isPost
|
||||
? `op-0 lg:op-100`
|
||||
: 'w-75% lg:w-full',
|
||||
'c-secondary font-navbar text-3.5 lg:text-4',
|
||||
'text-3.5 c-secondary font-navbar lg:text-4',
|
||||
]}
|
||||
aria-hidden={isPost}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue