fix: upgrade waline to v3.5.7 (fixes #10), remove unused titlegap configuration

This commit is contained in:
radishzzz 2025-05-08 01:57:40 +01:00
parent d3d6561f4d
commit bf20fb4014
12 changed files with 443 additions and 577 deletions

View file

@ -17,15 +17,15 @@
"@astrojs/partytown": "^2.1.4",
"@astrojs/rss": "^4.0.11",
"@astrojs/sitemap": "^3.3.1",
"@waline/client": "^3.5.6",
"astro": "^5.7.10",
"@waline/client": "^3.5.7",
"astro": "^5.7.11",
"astro-og-canvas": "^0.7.0",
"astro-robots-txt": "^1.0.0",
"canvaskit-wasm": "^0.40.0",
"katex": "^0.16.22",
"markdown-it": "^14.1.0",
"mdast-util-to-string": "^4.0.0",
"overlayscrollbars": "^2.11.1",
"overlayscrollbars": "^2.11.2",
"photoswipe": "^5.4.4",
"reading-time": "^1.5.0",
"rehype-external-links": "^3.0.0",
@ -37,18 +37,18 @@
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"@antfu/eslint-config": "^4.12.0",
"@antfu/eslint-config": "^4.13.0",
"@astrojs/check": "^0.9.4",
"@types/markdown-it": "^14.1.2",
"@types/node": "^22.15.3",
"@types/sanitize-html": "^2.15.0",
"@types/node": "^22.15.15",
"@types/sanitize-html": "^2.16.0",
"@unocss/eslint-plugin": "66.1.0",
"@unocss/preset-attributify": "66.1.0",
"@unocss/reset": "66.1.0",
"astro-eslint-parser": "^1.2.2",
"eslint": "^9.26.0",
"eslint-plugin-astro": "^1.3.1",
"lint-staged": "^15.5.1",
"lint-staged": "^15.5.2",
"sharp": "^0.34.1",
"typescript": "~5.8.3",
"unocss": "66.1.0",

970
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -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}
>

View file

@ -61,8 +61,6 @@ export const themeConfig: ThemeConfig = {
fontStyle: 'sans', // sans, serif
// date format for posts
dateFormat: 'YYYY-MM-DD', // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
// gap between title and subtitle
titleGap: 2, // 1, 2, 3
// enable KaTeX for mathematical formulas rendering
katex: true, // true, false
},

View file

@ -82,8 +82,6 @@ global: {
fontStyle: 'sans' // sans, serif
// date format for posts
dateFormat: 'YYYY-MM-DD' // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
// gap between title and subtitle
titleGap: 2 // 1, 2, 3
// enable KaTeX for mathematical formulas rendering
katex: true // true, false
}

View file

@ -82,8 +82,6 @@ global: {
fontStyle: 'sans' // sans, serif
// formato de fecha para publicaciones
dateFormat: 'YYYY-MM-DD' // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
// espacio entre título y subtítulo
titleGap: 2 // 1, 2, 3
// habilitar KaTeX para renderizar fórmulas matemáticas
katex: true // true, false
}

View file

@ -82,8 +82,6 @@ global: {
fontStyle: 'sans' // sans, serif
// 記事の日付フォーマット
dateFormat: 'YYYY-MM-DD' // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
// タイトルとサブタイトルの間隔
titleGap: 2 // 1, 2, 3
// 数式表示のためのKaTeXを有効化
katex: true // true, false
}

View file

@ -82,8 +82,6 @@ global: {
fontStyle: 'sans' // sans, serif
// формат даты для постов
dateFormat: 'YYYY-MM-DD' // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
// промежуток между заголовком и подзаголовком
titleGap: 2 // 1, 2, 3
// включить KaTeX для отображения математических формул
katex: true // true, false
}

View file

@ -82,8 +82,6 @@ global: {
fontStyle: 'sans' // sans, serif
// 文章日期格式
dateFormat: 'YYYY-MM-DD' // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
// 標題與副標題之間的距離
titleGap: 2 // 1, 2, 3
// 啟用 KaTeX 數學公式渲染
katex: true // true, false
}

View file

@ -82,8 +82,6 @@ global: {
fontStyle: 'sans' // sans, serif
// 文章日期格式
dateFormat: 'YYYY-MM-DD' // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
// 标题与副标题之间的距离
titleGap: 2 // 1, 2, 3
// 启用 KaTeX 数学公式渲染
katex: true // true, false
}

View file

@ -8,4 +8,6 @@ import Layout from '@/layouts/Layout.astro'
<!-- Page Not Found -->
<h3 class="mt--1.3 text-8 text-primary font-bold leading-1.2em font-navbar lg:text-9">PAGE<br>NOT<br>FOUND</h3>
<p class="mt-3.6 text-3.6 leading-1.4em font-navbar lg:(mt-4 text-4)">It looks like the page you're looking for<br>does not exist or has been moved.</p>
<!-- Unused Div -->
<!-- <div class=""></div> -->
</Layout>

View file

@ -33,7 +33,6 @@ export interface ThemeConfig {
moreLocales: typeof supportedLangs[number][]
fontStyle: 'sans' | 'serif'
dateFormat: 'YYYY-MM-DD' | 'MM-DD-YYYY' | 'DD-MM-YYYY' | 'MONTH DAY YYYY' | 'DAY MONTH YYYY'
titleGap: 1 | 2 | 3
katex: boolean
}