chore: update dependencies and enhance theme configuration

- Bump versions of several dependencies in package.json and pnpm-lock.yaml, including astro (5.1.9), @types/node (22.10.10), and lint-staged (15.4.2).
- Introduce new Header, Footer, and Navigation components for improved layout structure.
- Update theme configuration to clarify supported font styles and title spacing options.
- Refactor theme toggle button for better accessibility and visual consistency.
- Minor adjustments to CSS for improved button scaling effects and layout responsiveness.
This commit is contained in:
radishzzz 2025-01-24 08:21:38 +00:00
parent d4e5fda5d1
commit 23b819319d
13 changed files with 220 additions and 93 deletions

View file

@ -21,7 +21,7 @@
"@astrojs/sitemap": "^3.2.1",
"@rehype-pretty/transformers": "^0.13.2",
"@unocss/reset": "^65.4.3",
"astro": "^5.1.8",
"astro": "^5.1.9",
"astro-compress": "^2.3.6",
"astro-robots-txt": "^1.0.0",
"hastscript": "^9.0.0",
@ -47,14 +47,14 @@
"devDependencies": {
"@antfu/eslint-config": "^3.16.0",
"@types/markdown-it": "^14.1.2",
"@types/node": "^22.10.9",
"@types/node": "^22.10.10",
"@types/sanitize-html": "^2.13.0",
"@unocss/eslint-plugin": "^65.4.3",
"@unocss/preset-attributify": "^65.4.3",
"astro-eslint-parser": "^1.1.0",
"eslint": "^9.18.0",
"eslint-plugin-astro": "^1.3.1",
"lint-staged": "^15.4.1",
"lint-staged": "^15.4.2",
"mdast-util-to-string": "^4.0.0",
"reading-time": "^1.5.0",
"unocss": "^65.4.3",

144
pnpm-lock.yaml generated
View file

@ -13,7 +13,7 @@ importers:
version: 0.9.4(typescript@5.7.3)
'@astrojs/mdx':
specifier: ^4.0.7
version: 4.0.7(astro@5.1.8(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0))
version: 4.0.7(astro@5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0))
'@astrojs/partytown':
specifier: ^2.1.3
version: 2.1.3
@ -30,11 +30,11 @@ importers:
specifier: ^65.4.3
version: 65.4.3
astro:
specifier: ^5.1.8
version: 5.1.8(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
specifier: ^5.1.9
version: 5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
astro-compress:
specifier: ^2.3.6
version: 2.3.6(@types/node@22.10.9)(jiti@2.4.2)(rollup@4.31.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
version: 2.3.6(@types/node@22.10.10)(jiti@2.4.2)(rollup@4.31.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
astro-robots-txt:
specifier: ^1.0.0
version: 1.0.0
@ -94,7 +94,7 @@ importers:
version: 5.0.0
vite:
specifier: ^6.0.11
version: 6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
version: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
devDependencies:
'@antfu/eslint-config':
specifier: ^3.16.0
@ -103,8 +103,8 @@ importers:
specifier: ^14.1.2
version: 14.1.2
'@types/node':
specifier: ^22.10.9
version: 22.10.9
specifier: ^22.10.10
version: 22.10.10
'@types/sanitize-html':
specifier: ^2.13.0
version: 2.13.0
@ -124,8 +124,8 @@ importers:
specifier: ^1.3.1
version: 1.3.1(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)
lint-staged:
specifier: ^15.4.1
version: 15.4.1
specifier: ^15.4.2
version: 15.4.2
mdast-util-to-string:
specifier: ^4.0.0
version: 4.0.0
@ -134,7 +134,7 @@ importers:
version: 1.5.0
unocss:
specifier: ^65.4.3
version: 65.4.3(postcss@8.5.1)(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))
version: 65.4.3(postcss@8.5.1)(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))
unocss-preset-theme:
specifier: ^0.14.1
version: 0.14.1(@unocss/core@65.4.3)
@ -650,8 +650,8 @@ packages:
resolution: {integrity: sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/markdown@6.2.1':
resolution: {integrity: sha512-cKVd110hG4ICHmWhIwZJfKmmJBvbiDWyrHODJknAtudKgZtlROGoLX9UEOA0o746zC0hCY4UV4vR+aOGW9S6JQ==}
'@eslint/markdown@6.2.2':
resolution: {integrity: sha512-U0/KgzI9BVUuHDQ9M2fuVgB0QZ1fSyzwm8jKmHr1dlsLHGHYzoeIA9yqLMdTbV3ivZfp6rTdt6zqre3TfNExUQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/object-schema@2.1.5':
@ -1049,12 +1049,12 @@ packages:
'@types/node@17.0.45':
resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==}
'@types/node@22.10.10':
resolution: {integrity: sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==}
'@types/node@22.10.5':
resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==}
'@types/node@22.10.9':
resolution: {integrity: sha512-Ir6hwgsKyNESl/gLOcEz3krR4CBGgliDqBQ2ma4wIhEx0w+xnoeTq3tdrNw15kU3SxogDjOgv9sqdtLW8mIHaw==}
'@types/normalize-package-data@2.4.4':
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
@ -1117,8 +1117,8 @@ packages:
resolution: {integrity: sha512-BkLMNpdV6prozk8LlyK/SOoWLmUFi+ZD+pcqti9ILCbVvHGk1ui1g4jJOc2WDLaeExz2qWwojxlPce5PljcT3w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@ungap/structured-clone@1.2.1':
resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==}
'@ungap/structured-clone@1.3.0':
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
'@unocss/astro@65.4.3':
resolution: {integrity: sha512-yhPKH4CT2CFjvKR8lL6oS/7jarMWp4iSnYcNlTlZLmvTIS3dGxyhAsVy/xkdzdJ6sM+6FS0hUuQNv+NYvArRNg==}
@ -1360,8 +1360,8 @@ packages:
astro-robots-txt@1.0.0:
resolution: {integrity: sha512-6JQSLid4gMhoWjOm85UHLkgrw0+hHIjnJVIUqxjU2D6feKlVyYukMNYjH44ZDZBK1P8hNxd33PgWlHzCASvedA==}
astro@5.1.8:
resolution: {integrity: sha512-7fNNceI/dXqGIkkZQjxhH31alAfgf33cDv34cPLCGFVSHHOpYG0NSrofnxdYf0BvWRlddqkq393UqDM5cJlv1w==}
astro@5.1.9:
resolution: {integrity: sha512-QB3MH7Ul3gEvmHXEfvPkGpTZyyB/TBKQbm0kTHpo0BTEB7BvaY+wrcWiGEJBVDpVdEAKY9fM3zrJ0c7hZSXVlw==}
engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'}
hasBin: true
@ -1531,14 +1531,14 @@ packages:
resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
engines: {node: '>=14'}
commander@12.1.0:
resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}
engines: {node: '>=18'}
commander@13.0.0:
resolution: {integrity: sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==}
engines: {node: '>=18'}
commander@13.1.0:
resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==}
engines: {node: '>=18'}
commander@2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
@ -1717,8 +1717,8 @@ packages:
duplexer@0.1.2:
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
electron-to-chromium@1.5.86:
resolution: {integrity: sha512-/D7GAAaCRBQFBBcop6SfAAGH37djtpWkOuYhyAajw0l5vsfeSsUQYxaFPwr1c/mC/flARCDdKFo5gpFqNI+18w==}
electron-to-chromium@1.5.87:
resolution: {integrity: sha512-mPFwmEWmRivw2F8x3w3l2m6htAUN97Gy0kwpO++2m9iT1Gt8RCFVUfv9U/sIbHJ6rY4P6/ooqFL/eL7ock+pPg==}
emmet@2.4.11:
resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==}
@ -1855,8 +1855,8 @@ packages:
peerDependencies:
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
eslint-plugin-jsonc@2.18.2:
resolution: {integrity: sha512-SDhJiSsWt3nItl/UuIv+ti4g3m4gpGkmnUJS9UWR3TrpyNsIcnJoBRD7Kof6cM4Rk3L0wrmY5Tm3z7ZPjR2uGg==}
eslint-plugin-jsonc@2.19.0:
resolution: {integrity: sha512-Y2H5CCaXWkvh4/RnXrd5RYNdiJg6tFeCs2mMDXQtigZ3WbTc1pA+avpYR1jpL9kAxK4GtqXfzEqjK3Y/v7HkCg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '>=6.0.0'
@ -2487,8 +2487,8 @@ packages:
linkify-it@5.0.0:
resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
lint-staged@15.4.1:
resolution: {integrity: sha512-P8yJuVRyLrm5KxCtFx+gjI5Bil+wO7wnTl7C3bXhvtTaAFGirzeB24++D0wGoUwxrUKecNiehemgCob9YL39NA==}
lint-staged@15.4.2:
resolution: {integrity: sha512-gCqzB/Li281uZJgReNci+oXXqUEdrFAQAzTE/LwoxxiEuP41vozNe4BATS+4ehdqkWn+Z6bGc3EDcBja3npBVw==}
engines: {node: '>=18.12.0'}
hasBin: true
@ -3886,11 +3886,6 @@ packages:
resolution: {integrity: sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==}
engines: {node: '>= 14'}
yaml@2.6.1:
resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==}
engines: {node: '>= 14'}
hasBin: true
yaml@2.7.0:
resolution: {integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==}
engines: {node: '>= 14'}
@ -3949,7 +3944,7 @@ snapshots:
'@antfu/install-pkg': 1.0.0
'@clack/prompts': 0.9.1
'@eslint-community/eslint-plugin-eslint-comments': 4.4.1(eslint@9.18.0(jiti@2.4.2))
'@eslint/markdown': 6.2.1
'@eslint/markdown': 6.2.2
'@stylistic/eslint-plugin': 2.13.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)
'@typescript-eslint/eslint-plugin': 8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)
'@typescript-eslint/parser': 8.21.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)
@ -3962,7 +3957,7 @@ snapshots:
eslint-plugin-command: 2.1.0(eslint@9.18.0(jiti@2.4.2))
eslint-plugin-import-x: 4.6.1(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)
eslint-plugin-jsdoc: 50.6.2(eslint@9.18.0(jiti@2.4.2))
eslint-plugin-jsonc: 2.18.2(eslint@9.18.0(jiti@2.4.2))
eslint-plugin-jsonc: 2.19.0(eslint@9.18.0(jiti@2.4.2))
eslint-plugin-n: 17.15.1(eslint@9.18.0(jiti@2.4.2))
eslint-plugin-no-only-tests: 3.3.0
eslint-plugin-perfectionist: 4.7.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)
@ -4070,12 +4065,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@astrojs/mdx@4.0.7(astro@5.1.8(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0))':
'@astrojs/mdx@4.0.7(astro@5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0))':
dependencies:
'@astrojs/markdown-remark': 6.0.2
'@mdx-js/mdx': 3.1.0(acorn@8.14.0)
acorn: 8.14.0
astro: 5.1.8(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
astro: 5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
es-module-lexer: 1.6.0
estree-util-visit: 2.0.0
hast-util-to-html: 9.0.4
@ -4390,8 +4385,9 @@ snapshots:
'@eslint/js@9.18.0': {}
'@eslint/markdown@6.2.1':
'@eslint/markdown@6.2.2':
dependencies:
'@eslint/core': 0.10.0
'@eslint/plugin-kit': 0.2.5
mdast-util-from-markdown: 2.0.2
mdast-util-gfm: 3.0.0
@ -4767,11 +4763,11 @@ snapshots:
'@types/node@17.0.45': {}
'@types/node@22.10.5':
'@types/node@22.10.10':
dependencies:
undici-types: 6.20.0
'@types/node@22.10.9':
'@types/node@22.10.5':
dependencies:
undici-types: 6.20.0
@ -4783,7 +4779,7 @@ snapshots:
'@types/sax@1.2.7':
dependencies:
'@types/node': 22.10.9
'@types/node': 22.10.10
'@types/unist@2.0.11': {}
@ -4866,15 +4862,15 @@ snapshots:
'@typescript-eslint/types': 8.21.0
eslint-visitor-keys: 4.2.0
'@ungap/structured-clone@1.2.1': {}
'@ungap/structured-clone@1.3.0': {}
'@unocss/astro@65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))':
'@unocss/astro@65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))':
dependencies:
'@unocss/core': 65.4.3
'@unocss/reset': 65.4.3
'@unocss/vite': 65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))
'@unocss/vite': 65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))
optionalDependencies:
vite: 6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
vite: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
transitivePeerDependencies:
- rollup
- supports-color
@ -5024,7 +5020,7 @@ snapshots:
dependencies:
'@unocss/core': 65.4.3
'@unocss/vite@65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))':
'@unocss/vite@65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))':
dependencies:
'@ampproject/remapping': 2.3.0
'@rollup/pluginutils': 5.1.4(rollup@4.31.0)
@ -5034,7 +5030,7 @@ snapshots:
chokidar: 3.6.0
magic-string: 0.30.17
tinyglobby: 0.2.10
vite: 6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
vite: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
transitivePeerDependencies:
- rollup
- supports-color
@ -5212,12 +5208,12 @@ snapshots:
astring@1.9.0: {}
astro-compress@2.3.6(@types/node@22.10.9)(jiti@2.4.2)(rollup@4.31.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0):
astro-compress@2.3.6(@types/node@22.10.10)(jiti@2.4.2)(rollup@4.31.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0):
dependencies:
'@playform/pipe': 0.1.2
'@types/csso': 5.0.4
'@types/html-minifier-terser': 7.0.2
astro: 5.1.8(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
astro: 5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
commander: 13.0.0
csso: 5.0.5
deepmerge-ts: 7.1.3
@ -5284,7 +5280,7 @@ snapshots:
valid-filename: 4.0.0
zod: 3.24.1
astro@5.1.8(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0):
astro@5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.31.0)(terser@5.37.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0):
dependencies:
'@astrojs/compiler': 2.10.3
'@astrojs/internal-helpers': 0.4.2
@ -5336,8 +5332,8 @@ snapshots:
unist-util-visit: 5.0.0
unstorage: 1.14.4
vfile: 6.0.3
vite: 6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
vitefu: 1.0.5(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))
vite: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
vitefu: 1.0.5(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))
which-pm: 3.0.0
xxhash-wasm: 1.1.0
yargs-parser: 21.1.1
@ -5425,7 +5421,7 @@ snapshots:
browserslist@4.24.4:
dependencies:
caniuse-lite: 1.0.30001695
electron-to-chromium: 1.5.86
electron-to-chromium: 1.5.87
node-releases: 2.0.19
update-browserslist-db: 1.1.2(browserslist@4.24.4)
@ -5537,10 +5533,10 @@ snapshots:
commander@10.0.1: {}
commander@12.1.0: {}
commander@13.0.0: {}
commander@13.1.0: {}
commander@2.20.3: {}
commander@7.2.0: {}
@ -5687,7 +5683,7 @@ snapshots:
duplexer@0.1.2: {}
electron-to-chromium@1.5.86: {}
electron-to-chromium@1.5.87: {}
emmet@2.4.11:
dependencies:
@ -5899,7 +5895,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
eslint-plugin-jsonc@2.18.2(eslint@9.18.0(jiti@2.4.2)):
eslint-plugin-jsonc@2.19.0(eslint@9.18.0(jiti@2.4.2)):
dependencies:
'@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0(jiti@2.4.2))
eslint: 9.18.0(jiti@2.4.2)
@ -6328,7 +6324,7 @@ snapshots:
dependencies:
'@types/hast': 3.0.4
'@types/unist': 3.0.3
'@ungap/structured-clone': 1.2.1
'@ungap/structured-clone': 1.3.0
hast-util-from-parse5: 8.0.2
hast-util-to-parse5: 8.0.0
html-void-elements: 3.0.0
@ -6658,10 +6654,10 @@ snapshots:
dependencies:
uc.micro: 2.1.0
lint-staged@15.4.1:
lint-staged@15.4.2:
dependencies:
chalk: 5.4.1
commander: 12.1.0
commander: 13.1.0
debug: 4.4.0
execa: 8.0.1
lilconfig: 3.1.3
@ -6669,7 +6665,7 @@ snapshots:
micromatch: 4.0.8
pidtree: 0.6.0
string-argv: 0.3.2
yaml: 2.6.1
yaml: 2.7.0
transitivePeerDependencies:
- supports-color
@ -6923,7 +6919,7 @@ snapshots:
dependencies:
'@types/hast': 3.0.4
'@types/mdast': 4.0.4
'@ungap/structured-clone': 1.2.1
'@ungap/structured-clone': 1.3.0
devlop: 1.1.0
micromark-util-sanitize-uri: 2.0.1
trim-lines: 3.0.1
@ -7602,7 +7598,7 @@ snapshots:
rehype-autolink-headings@7.1.0:
dependencies:
'@types/hast': 3.0.4
'@ungap/structured-clone': 1.2.1
'@ungap/structured-clone': 1.3.0
hast-util-heading-rank: 3.0.0
hast-util-is-element: 3.0.0
unified: 11.0.5
@ -7616,7 +7612,7 @@ snapshots:
rehype-external-links@3.0.0:
dependencies:
'@types/hast': 3.0.4
'@ungap/structured-clone': 1.2.1
'@ungap/structured-clone': 1.3.0
hast-util-is-element: 3.0.0
is-absolute-url: 4.0.1
space-separated-tokens: 2.0.2
@ -8225,9 +8221,9 @@ snapshots:
'@unocss/core': 65.4.3
'@unocss/rule-utils': 0.63.6
unocss@65.4.3(postcss@8.5.1)(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3)):
unocss@65.4.3(postcss@8.5.1)(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3)):
dependencies:
'@unocss/astro': 65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))
'@unocss/astro': 65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))
'@unocss/cli': 65.4.3(rollup@4.31.0)
'@unocss/core': 65.4.3
'@unocss/postcss': 65.4.3(postcss@8.5.1)
@ -8243,9 +8239,9 @@ snapshots:
'@unocss/transformer-compile-class': 65.4.3
'@unocss/transformer-directives': 65.4.3
'@unocss/transformer-variant-group': 65.4.3
'@unocss/vite': 65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))
'@unocss/vite': 65.4.3(rollup@4.31.0)(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))
optionalDependencies:
vite: 6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
vite: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
transitivePeerDependencies:
- postcss
- rollup
@ -8299,13 +8295,13 @@ snapshots:
'@types/unist': 3.0.3
vfile-message: 4.0.2
vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0):
vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0):
dependencies:
esbuild: 0.24.2
postcss: 8.5.1
rollup: 4.31.0
optionalDependencies:
'@types/node': 22.10.9
'@types/node': 22.10.10
fsevents: 2.3.3
jiti: 2.4.2
lightningcss: 1.28.2
@ -8313,9 +8309,9 @@ snapshots:
tsx: 4.19.2
yaml: 2.7.0
vitefu@1.0.5(vite@6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)):
vitefu@1.0.5(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)):
optionalDependencies:
vite: 6.0.11(@types/node@22.10.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
vite: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
volar-service-css@0.0.62(@volar/language-service@2.4.11):
dependencies:
@ -8512,8 +8508,6 @@ snapshots:
yaml@2.2.2: {}
yaml@2.6.1: {}
yaml@2.7.0: {}
yargs-parser@21.1.1: {}

View file

View file

@ -0,0 +1,30 @@
---
import themeConfig from '@/config'
const { title, subtitle } = themeConfig.site
const { titleSpace = 2 } = themeConfig.global
const marginClass = {
1: 'mb-1',
2: 'mb-2',
3: 'mb-3',
4: 'mb-4',
}[titleSpace] || 'mb-3'
---
<header>
<h1
class={`${marginClass} mt--1.6 text-12 c-primary font-bold font-title`}
aria-label="Title Tag"
>
<a href="/">
{title}
</a>
</h1>
<h3
class="text-5.6 c-primary font-navbar opacity-50"
aria-label="Meta Description"
>
{subtitle}
</h3>
</header>

View file

@ -0,0 +1,87 @@
---
import themeConfig from '@/config'
import { ui } from '@/utils/ui'
// Configuration
const defaultLocale = themeConfig.global.locale
const moreLocales = themeConfig.global.moreLocale
const currentPath = Astro.url.pathname
// Path utilities
const cleanPath = (path: string) => path.replace(/^\/+|\/+$/g, '')
// Language utilities
function getLangFromPath(path: string) {
const secondaryLang = moreLocales.find(lang =>
path.startsWith(`/${lang}/`) || path === `/${lang}` || path === `/${lang}/`,
)
return secondaryLang || defaultLocale
}
const currentLang = getLangFromPath(currentPath)
const currentUI = ui[currentLang as keyof typeof ui]
// Localization utilities
function getLocalizedPath(path: string) {
const clean = cleanPath(path)
return currentLang === defaultLocale ? `/${clean}` : `/${currentLang}/${clean}`
}
// Page type detection utilities
function isHomePage(path: string) {
const clean = cleanPath(path)
return clean === '' || moreLocales.includes(clean)
}
function isPostPage(path: string) {
const clean = cleanPath(path)
return clean.startsWith('posts') || moreLocales.some(lang => clean.startsWith(`${lang}/posts`))
}
function isTagPage(path: string) {
const clean = cleanPath(path)
return clean.startsWith('tags') || moreLocales.some(lang => clean.startsWith(`${lang}/tags`))
}
function isAboutPage(path: string) {
const clean = cleanPath(path)
return clean.startsWith('about') || moreLocales.some(lang => clean.startsWith(`${lang}/about`))
}
// Active state detection
const isPostActive = isHomePage(currentPath) || isPostPage(currentPath)
const isTagActive = isTagPage(currentPath)
const isAboutActive = isAboutPage(currentPath)
---
<nav class="mb-18 mt-10 text-5.6 text-secondary font-semibold leading-11.4 font-navbar">
<ul>
<li>
<a
href={getLocalizedPath('/')}
class:list={[
isPostActive ? 'font-bold opacity-100' : 'opacity-25',
]}
>
{currentUI.posts}
</a>
</li>
<li>
<a
href={getLocalizedPath('/tags')}
class:list={[
isTagActive ? 'font-bold opacity-100' : 'opacity-25',
]}
>
{currentUI.tags}
</a>
</li>
<li>
<a
href={getLocalizedPath('/about')}
class:list={[
isAboutActive ? 'font-bold opacity-100' : 'opacity-25',
]}
>
{currentUI.about}
</a>
</li>
</ul>
</nav>

View file

@ -46,7 +46,7 @@ window.addEventListener('pageshow', (event) => {
<button
aria-pressed="false"
aria-label="Theme Toggle Button"
class="absolute right-10 top-10 z-999 aspect-square w-8 c-secondary"
class="absolute right-9.6 top-21 z-999 aspect-square w-8 c-secondary active:scale-92"
>
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path d="m12 1c-6.1 0-11 4.9-11 11s4.9 11 11 11 11-4.9 11-11-4.9-11-11-11m0 20c-5.8 0-10.5-4-10.5-9s4.7-9 10.5-9 10.5 4 10.5 9-4.7 9-10.5 9" />

View file

@ -14,7 +14,7 @@ export const themeConfig: ThemeConfig = {
// COLOR SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
color: {
mode: 'light', // light, dark. Default to match system theme
mode: 'light', // light, dark. Matches system theme by default, falls back to configured theme mode if not available.
light: {
primary: '#17191A', // title text color in light mode
secondary: '#505050', // post text color in light mode
@ -32,9 +32,10 @@ export const themeConfig: ThemeConfig = {
// GLOBAL SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
global: {
locale: 'zh', // zh, zh-tw, ja, en, es, ru. Default locale setting
locale: 'zh', // Support only zh, zh-tw, ja, en, es, ru. Default locale setting
moreLocale: ['zh-tw', 'ja', 'en', 'es', 'ru'], // ['zh', 'zh-tw', 'ja', 'en', 'es', 'ru']. NOT fill in the default locale code again
font: 'sans', // sans, serif, italic. Choose the font style for posts
font: 'sans', // Support only sans, serif. Choose the font style for posts
titleSpace: 4, // Support only 1, 2, 3, 4. Space between title and subtitle, 1 is the smallest, 4 is the largest
},
// GLOBAL SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END

View file

@ -15,6 +15,7 @@ const { verification = {}, twitterID = '', facebookID = '', facebookLink = '', g
const { google = '', bing = '', yandex = '', baidu = '' } = verification
const { cdn, commentURL = '', imageHostURL = '', customGoogleAnalyticsURL = '', customUmamiAnalyticsURL = '', customUmamiAnalyticsJS = '' } = themeConfig.preload
---
<head>
<!-- Basic -->
<meta charset="utf-8" />

View file

@ -1,4 +1,7 @@
---
import Footer from '@/components/Footer.astro'
import Header from '@/components/Header.astro'
import Navigation from '@/components/Navigation.astro'
import PhotoSwipe from '@/components/PhotoSwipe.astro'
import Scrollbar from '@/components/Scrollbar.astro'
import ThemeToggle from '@/components/ThemeToggle.astro'
@ -14,7 +17,6 @@ interface Props {
}
const { postTitle, postDescription, postImage } = Astro.props
const fontStyle = `font-${themeConfig.global.font}`
---
@ -25,14 +27,25 @@ const fontStyle = `font-${themeConfig.global.font}`
>
<Head {postTitle} {postDescription} {postImage} />
<body data-overlayscrollbars-initialize>
<ThemeToggle />
<main
class="mx-a max-w-123rem h-dvh"
lg="grid gap-x-6 cols-[3fr_1fr] rows-[1fr_9rem]"
<div
class="mx-a max-w-492 h-dvh"
p="x-[calc(9.94vw-1.1784rem)] y-[calc(5.42vw+2.4488rem)] lg:(x-36 y-10.4167dvh)"
lg="grid cols-[1fr_22rem] rows-1 gap-[min(calc(16.8269vw-6.2727rem),18rem)]"
>
<slot />
</main>
<div>
<Header />
<Navigation />
<Footer />
</div>
<main class="col-start-1 row-start-1">
<slot />
</main>
</div>
<ThemeToggle />
<Scrollbar />
<PhotoSwipe />
</body>
</html>

View file

@ -3,5 +3,5 @@ import Layout from '@/layouts/Layout.astro'
---
<Layout>
<h1 class="font-bold font-title">重新编排Retypeset</h1>
about me
</Layout>

View file

@ -3,7 +3,7 @@
}
.pswp__button--zoom,
.pswp__button--close {
--at-apply: 'mt-2 lg:mt-4 active:scale-90';
--at-apply: 'mt-2 lg:mt-4 active:scale-92';
}
.pswp__button--zoom svg:hover,
.pswp__button--close svg:hover {

View file

@ -30,7 +30,8 @@ export interface ThemeConfig {
global: {
locale: typeof langPath[number]
moreLocale: typeof langPath[number][]
font: 'sans' | 'serif' | 'italic'
font: 'sans' | 'serif'
titleSpace: 1 | 2 | 3 | 4
}
comment?: {

View file

@ -31,7 +31,7 @@ export default defineConfig({
title: ['Snell-Black', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
date: ['Snell-Bold', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
serif: ['STIX', 'EarlySummer', 'Georgia', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
italic: ['STIX-italic', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
navbar: ['STIX-italic', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
custom: ['EarlySummer-custom', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
},
},