feature: global view animation

- Updated Header component to adjust title margin and changed subtitle from h3 to h2 for better semantic structure.
- Refined LanguageSwitcher component to enhance language switching functionality and improved accessibility.
- Adjusted Navigation component's margin and link styles for better visual hierarchy.
- Enhanced ThemeToggle component with view transition effects for smoother theme changes.
- Updated global CSS to support new transition styles for theme toggling.
- Bumped rollup version in pnpm-lock.yaml for improved build performance.
This commit is contained in:
radishzzz 2025-01-24 12:57:30 +00:00
parent b46534419b
commit bca8b9b1cf
7 changed files with 189 additions and 172 deletions

212
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.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))
version: 4.0.7(astro@5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.32.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
@ -31,10 +31,10 @@ importers:
version: 65.4.3
astro:
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)
version: 5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.32.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.10)(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.32.0)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0)
astro-robots-txt:
specifier: ^1.0.0
version: 1.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.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))
version: 65.4.3(postcss@8.5.1)(rollup@4.32.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)
@ -860,98 +860,98 @@ packages:
rollup:
optional: true
'@rollup/rollup-android-arm-eabi@4.31.0':
resolution: {integrity: sha512-9NrR4033uCbUBRgvLcBrJofa2KY9DzxL2UKZ1/4xA/mnTNyhZCWBuD8X3tPm1n4KxcgaraOYgrFKSgwjASfmlA==}
'@rollup/rollup-android-arm-eabi@4.32.0':
resolution: {integrity: sha512-G2fUQQANtBPsNwiVFg4zKiPQyjVKZCUdQUol53R8E71J7AsheRMV/Yv/nB8giOcOVqP7//eB5xPqieBYZe9bGg==}
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm64@4.31.0':
resolution: {integrity: sha512-iBbODqT86YBFHajxxF8ebj2hwKm1k8PTBQSojSt3d1FFt1gN+xf4CowE47iN0vOSdnd+5ierMHBbu/rHc7nq5g==}
'@rollup/rollup-android-arm64@4.32.0':
resolution: {integrity: sha512-qhFwQ+ljoymC+j5lXRv8DlaJYY/+8vyvYmVx074zrLsu5ZGWYsJNLjPPVJJjhZQpyAKUGPydOq9hRLLNvh1s3A==}
cpu: [arm64]
os: [android]
'@rollup/rollup-darwin-arm64@4.31.0':
resolution: {integrity: sha512-WHIZfXgVBX30SWuTMhlHPXTyN20AXrLH4TEeH/D0Bolvx9PjgZnn4H677PlSGvU6MKNsjCQJYczkpvBbrBnG6g==}
'@rollup/rollup-darwin-arm64@4.32.0':
resolution: {integrity: sha512-44n/X3lAlWsEY6vF8CzgCx+LQaoqWGN7TzUfbJDiTIOjJm4+L2Yq+r5a8ytQRGyPqgJDs3Rgyo8eVL7n9iW6AQ==}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.31.0':
resolution: {integrity: sha512-hrWL7uQacTEF8gdrQAqcDy9xllQ0w0zuL1wk1HV8wKGSGbKPVjVUv/DEwT2+Asabf8Dh/As+IvfdU+H8hhzrQQ==}
'@rollup/rollup-darwin-x64@4.32.0':
resolution: {integrity: sha512-F9ct0+ZX5Np6+ZDztxiGCIvlCaW87HBdHcozUfsHnj1WCUTBUubAoanhHUfnUHZABlElyRikI0mgcw/qdEm2VQ==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-freebsd-arm64@4.31.0':
resolution: {integrity: sha512-S2oCsZ4hJviG1QjPY1h6sVJLBI6ekBeAEssYKad1soRFv3SocsQCzX6cwnk6fID6UQQACTjeIMB+hyYrFacRew==}
'@rollup/rollup-freebsd-arm64@4.32.0':
resolution: {integrity: sha512-JpsGxLBB2EFXBsTLHfkZDsXSpSmKD3VxXCgBQtlPcuAqB8TlqtLcbeMhxXQkCDv1avgwNjF8uEIbq5p+Cee0PA==}
cpu: [arm64]
os: [freebsd]
'@rollup/rollup-freebsd-x64@4.31.0':
resolution: {integrity: sha512-pCANqpynRS4Jirn4IKZH4tnm2+2CqCNLKD7gAdEjzdLGbH1iO0zouHz4mxqg0uEMpO030ejJ0aA6e1PJo2xrPA==}
'@rollup/rollup-freebsd-x64@4.32.0':
resolution: {integrity: sha512-wegiyBT6rawdpvnD9lmbOpx5Sph+yVZKHbhnSP9MqUEDX08G4UzMU+D87jrazGE7lRSyTRs6NEYHtzfkJ3FjjQ==}
cpu: [x64]
os: [freebsd]
'@rollup/rollup-linux-arm-gnueabihf@4.31.0':
resolution: {integrity: sha512-0O8ViX+QcBd3ZmGlcFTnYXZKGbFu09EhgD27tgTdGnkcYXLat4KIsBBQeKLR2xZDCXdIBAlWLkiXE1+rJpCxFw==}
'@rollup/rollup-linux-arm-gnueabihf@4.32.0':
resolution: {integrity: sha512-3pA7xecItbgOs1A5H58dDvOUEboG5UfpTq3WzAdF54acBbUM+olDJAPkgj1GRJ4ZqE12DZ9/hNS2QZk166v92A==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm-musleabihf@4.31.0':
resolution: {integrity: sha512-w5IzG0wTVv7B0/SwDnMYmbr2uERQp999q8FMkKG1I+j8hpPX2BYFjWe69xbhbP6J9h2gId/7ogesl9hwblFwwg==}
'@rollup/rollup-linux-arm-musleabihf@4.32.0':
resolution: {integrity: sha512-Y7XUZEVISGyge51QbYyYAEHwpGgmRrAxQXO3siyYo2kmaj72USSG8LtlQQgAtlGfxYiOwu+2BdbPjzEpcOpRmQ==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm64-gnu@4.31.0':
resolution: {integrity: sha512-JyFFshbN5xwy6fulZ8B/8qOqENRmDdEkcIMF0Zz+RsfamEW+Zabl5jAb0IozP/8UKnJ7g2FtZZPEUIAlUSX8cA==}
'@rollup/rollup-linux-arm64-gnu@4.32.0':
resolution: {integrity: sha512-r7/OTF5MqeBrZo5omPXcTnjvv1GsrdH8a8RerARvDFiDwFpDVDnJyByYM/nX+mvks8XXsgPUxkwe/ltaX2VH7w==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-arm64-musl@4.31.0':
resolution: {integrity: sha512-kpQXQ0UPFeMPmPYksiBL9WS/BDiQEjRGMfklVIsA0Sng347H8W2iexch+IEwaR7OVSKtr2ZFxggt11zVIlZ25g==}
'@rollup/rollup-linux-arm64-musl@4.32.0':
resolution: {integrity: sha512-HJbifC9vex9NqnlodV2BHVFNuzKL5OnsV2dvTw6e1dpZKkNjPG6WUq+nhEYV6Hv2Bv++BXkwcyoGlXnPrjAKXw==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-loongarch64-gnu@4.31.0':
resolution: {integrity: sha512-pMlxLjt60iQTzt9iBb3jZphFIl55a70wexvo8p+vVFK+7ifTRookdoXX3bOsRdmfD+OKnMozKO6XM4zR0sHRrQ==}
'@rollup/rollup-linux-loongarch64-gnu@4.32.0':
resolution: {integrity: sha512-VAEzZTD63YglFlWwRj3taofmkV1V3xhebDXffon7msNz4b14xKsz7utO6F8F4cqt8K/ktTl9rm88yryvDpsfOw==}
cpu: [loong64]
os: [linux]
'@rollup/rollup-linux-powerpc64le-gnu@4.31.0':
resolution: {integrity: sha512-D7TXT7I/uKEuWiRkEFbed1UUYZwcJDU4vZQdPTcepK7ecPhzKOYk4Er2YR4uHKme4qDeIh6N3XrLfpuM7vzRWQ==}
'@rollup/rollup-linux-powerpc64le-gnu@4.32.0':
resolution: {integrity: sha512-Sts5DST1jXAc9YH/iik1C9QRsLcCoOScf3dfbY5i4kH9RJpKxiTBXqm7qU5O6zTXBTEZry69bGszr3SMgYmMcQ==}
cpu: [ppc64]
os: [linux]
'@rollup/rollup-linux-riscv64-gnu@4.31.0':
resolution: {integrity: sha512-wal2Tc8O5lMBtoePLBYRKj2CImUCJ4UNGJlLwspx7QApYny7K1cUYlzQ/4IGQBLmm+y0RS7dwc3TDO/pmcneTw==}
'@rollup/rollup-linux-riscv64-gnu@4.32.0':
resolution: {integrity: sha512-qhlXeV9AqxIyY9/R1h1hBD6eMvQCO34ZmdYvry/K+/MBs6d1nRFLm6BOiITLVI+nFAAB9kUB6sdJRKyVHXnqZw==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-s390x-gnu@4.31.0':
resolution: {integrity: sha512-O1o5EUI0+RRMkK9wiTVpk2tyzXdXefHtRTIjBbmFREmNMy7pFeYXCFGbhKFwISA3UOExlo5GGUuuj3oMKdK6JQ==}
'@rollup/rollup-linux-s390x-gnu@4.32.0':
resolution: {integrity: sha512-8ZGN7ExnV0qjXa155Rsfi6H8M4iBBwNLBM9lcVS+4NcSzOFaNqmt7djlox8pN1lWrRPMRRQ8NeDlozIGx3Omsw==}
cpu: [s390x]
os: [linux]
'@rollup/rollup-linux-x64-gnu@4.31.0':
resolution: {integrity: sha512-zSoHl356vKnNxwOWnLd60ixHNPRBglxpv2g7q0Cd3Pmr561gf0HiAcUBRL3S1vPqRC17Zo2CX/9cPkqTIiai1g==}
'@rollup/rollup-linux-x64-gnu@4.32.0':
resolution: {integrity: sha512-VDzNHtLLI5s7xd/VubyS10mq6TxvZBp+4NRWoW+Hi3tgV05RtVm4qK99+dClwTN1McA6PHwob6DEJ6PlXbY83A==}
cpu: [x64]
os: [linux]
'@rollup/rollup-linux-x64-musl@4.31.0':
resolution: {integrity: sha512-ypB/HMtcSGhKUQNiFwqgdclWNRrAYDH8iMYH4etw/ZlGwiTVxBz2tDrGRrPlfZu6QjXwtd+C3Zib5pFqID97ZA==}
'@rollup/rollup-linux-x64-musl@4.32.0':
resolution: {integrity: sha512-qcb9qYDlkxz9DxJo7SDhWxTWV1gFuwznjbTiov289pASxlfGbaOD54mgbs9+z94VwrXtKTu+2RqwlSTbiOqxGg==}
cpu: [x64]
os: [linux]
'@rollup/rollup-win32-arm64-msvc@4.31.0':
resolution: {integrity: sha512-JuhN2xdI/m8Hr+aVO3vspO7OQfUFO6bKLIRTAy0U15vmWjnZDLrEgCZ2s6+scAYaQVpYSh9tZtRijApw9IXyMw==}
'@rollup/rollup-win32-arm64-msvc@4.32.0':
resolution: {integrity: sha512-pFDdotFDMXW2AXVbfdUEfidPAk/OtwE/Hd4eYMTNVVaCQ6Yl8et0meDaKNL63L44Haxv4UExpv9ydSf3aSayDg==}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.31.0':
resolution: {integrity: sha512-U1xZZXYkvdf5MIWmftU8wrM5PPXzyaY1nGCI4KI4BFfoZxHamsIe+BtnPLIvvPykvQWlVbqUXdLa4aJUuilwLQ==}
'@rollup/rollup-win32-ia32-msvc@4.32.0':
resolution: {integrity: sha512-/TG7WfrCAjeRNDvI4+0AAMoHxea/USWhAzf9PVDFHbcqrQ7hMMKp4jZIy4VEjk72AAfN5k4TiSMRXRKf/0akSw==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.31.0':
resolution: {integrity: sha512-ul8rnCsUumNln5YWwz0ted2ZHFhzhRRnkpBZ+YRuHoRAlUji9KChpOUOndY7uykrPEPXVbHLlsdo6v5yXo/TXw==}
'@rollup/rollup-win32-x64-msvc@4.32.0':
resolution: {integrity: sha512-5hqO5S3PTEO2E5VjCePxv40gIgyS2KvO7E7/vvC/NbIW4SIRamkMr1hqj+5Y67fbBWv/bQLB6KelBQmXlyCjWA==}
cpu: [x64]
os: [win32]
@ -1855,8 +1855,8 @@ packages:
peerDependencies:
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
eslint-plugin-jsonc@2.19.0:
resolution: {integrity: sha512-Y2H5CCaXWkvh4/RnXrd5RYNdiJg6tFeCs2mMDXQtigZ3WbTc1pA+avpYR1jpL9kAxK4GtqXfzEqjK3Y/v7HkCg==}
eslint-plugin-jsonc@2.19.1:
resolution: {integrity: sha512-MmlAOaZK1+Lg7YoCZPGRjb88ZjT+ct/KTsvcsbZdBm+w8WMzGx+XEmexk0m40P1WV9G2rFV7X3klyRGRpFXEjA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '>=6.0.0'
@ -3215,8 +3215,8 @@ packages:
rfdc@1.4.1:
resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
rollup@4.31.0:
resolution: {integrity: sha512-9cCE8P4rZLx9+PjoyqHLs31V9a9Vpvfo4qNcs6JCiGWYhw2gijSetFbH6SSy1whnkgcefnUwr8sad7tgqsGvnw==}
rollup@4.32.0:
resolution: {integrity: sha512-JmrhfQR31Q4AuNBjjAX4s+a/Pu/Q8Q9iwjWBsjRH1q52SPFE2NqRMK6fUZKKnvKO6id+h7JIRf0oYsph53eATg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
@ -3957,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.19.0(eslint@9.18.0(jiti@2.4.2))
eslint-plugin-jsonc: 2.19.1(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)
@ -4065,12 +4065,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@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))':
'@astrojs/mdx@4.0.7(astro@5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.32.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.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: 5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.32.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
@ -4587,69 +4587,69 @@ snapshots:
'@rehype-pretty/transformers@0.13.2': {}
'@rollup/pluginutils@5.1.4(rollup@4.31.0)':
'@rollup/pluginutils@5.1.4(rollup@4.32.0)':
dependencies:
'@types/estree': 1.0.6
estree-walker: 2.0.2
picomatch: 4.0.2
optionalDependencies:
rollup: 4.31.0
rollup: 4.32.0
'@rollup/rollup-android-arm-eabi@4.31.0':
'@rollup/rollup-android-arm-eabi@4.32.0':
optional: true
'@rollup/rollup-android-arm64@4.31.0':
'@rollup/rollup-android-arm64@4.32.0':
optional: true
'@rollup/rollup-darwin-arm64@4.31.0':
'@rollup/rollup-darwin-arm64@4.32.0':
optional: true
'@rollup/rollup-darwin-x64@4.31.0':
'@rollup/rollup-darwin-x64@4.32.0':
optional: true
'@rollup/rollup-freebsd-arm64@4.31.0':
'@rollup/rollup-freebsd-arm64@4.32.0':
optional: true
'@rollup/rollup-freebsd-x64@4.31.0':
'@rollup/rollup-freebsd-x64@4.32.0':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.31.0':
'@rollup/rollup-linux-arm-gnueabihf@4.32.0':
optional: true
'@rollup/rollup-linux-arm-musleabihf@4.31.0':
'@rollup/rollup-linux-arm-musleabihf@4.32.0':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.31.0':
'@rollup/rollup-linux-arm64-gnu@4.32.0':
optional: true
'@rollup/rollup-linux-arm64-musl@4.31.0':
'@rollup/rollup-linux-arm64-musl@4.32.0':
optional: true
'@rollup/rollup-linux-loongarch64-gnu@4.31.0':
'@rollup/rollup-linux-loongarch64-gnu@4.32.0':
optional: true
'@rollup/rollup-linux-powerpc64le-gnu@4.31.0':
'@rollup/rollup-linux-powerpc64le-gnu@4.32.0':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.31.0':
'@rollup/rollup-linux-riscv64-gnu@4.32.0':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.31.0':
'@rollup/rollup-linux-s390x-gnu@4.32.0':
optional: true
'@rollup/rollup-linux-x64-gnu@4.31.0':
'@rollup/rollup-linux-x64-gnu@4.32.0':
optional: true
'@rollup/rollup-linux-x64-musl@4.31.0':
'@rollup/rollup-linux-x64-musl@4.32.0':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.31.0':
'@rollup/rollup-win32-arm64-msvc@4.32.0':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.31.0':
'@rollup/rollup-win32-ia32-msvc@4.32.0':
optional: true
'@rollup/rollup-win32-x64-msvc@4.31.0':
'@rollup/rollup-win32-x64-msvc@4.32.0':
optional: true
'@shikijs/core@1.29.1':
@ -4864,11 +4864,11 @@ snapshots:
'@ungap/structured-clone@1.3.0': {}
'@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/astro@65.4.3(rollup@4.32.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.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/vite': 65.4.3(rollup@4.32.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.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
transitivePeerDependencies:
@ -4876,10 +4876,10 @@ snapshots:
- supports-color
- vue
'@unocss/cli@65.4.3(rollup@4.31.0)':
'@unocss/cli@65.4.3(rollup@4.32.0)':
dependencies:
'@ampproject/remapping': 2.3.0
'@rollup/pluginutils': 5.1.4(rollup@4.31.0)
'@rollup/pluginutils': 5.1.4(rollup@4.32.0)
'@unocss/config': 65.4.3
'@unocss/core': 65.4.3
'@unocss/preset-uno': 65.4.3
@ -5020,10 +5020,10 @@ snapshots:
dependencies:
'@unocss/core': 65.4.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))':
'@unocss/vite@65.4.3(rollup@4.32.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)
'@rollup/pluginutils': 5.1.4(rollup@4.32.0)
'@unocss/config': 65.4.3
'@unocss/core': 65.4.3
'@unocss/inspector': 65.4.3(vue@3.5.13(typescript@5.7.3))
@ -5208,12 +5208,12 @@ snapshots:
astring@1.9.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):
astro-compress@2.3.6(@types/node@22.10.10)(jiti@2.4.2)(rollup@4.32.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.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: 5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.32.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
@ -5280,14 +5280,14 @@ snapshots:
valid-filename: 4.0.0
zod: 3.24.1
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):
astro@5.1.9(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.32.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
'@astrojs/markdown-remark': 6.0.2
'@astrojs/telemetry': 3.2.0
'@oslojs/encoding': 1.1.0
'@rollup/pluginutils': 5.1.4(rollup@4.31.0)
'@rollup/pluginutils': 5.1.4(rollup@4.32.0)
'@types/cookie': 0.6.0
acorn: 8.14.0
aria-query: 5.3.2
@ -5895,7 +5895,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
eslint-plugin-jsonc@2.19.0(eslint@9.18.0(jiti@2.4.2)):
eslint-plugin-jsonc@2.19.1(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)
@ -7813,29 +7813,29 @@ snapshots:
rfdc@1.4.1: {}
rollup@4.31.0:
rollup@4.32.0:
dependencies:
'@types/estree': 1.0.6
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.31.0
'@rollup/rollup-android-arm64': 4.31.0
'@rollup/rollup-darwin-arm64': 4.31.0
'@rollup/rollup-darwin-x64': 4.31.0
'@rollup/rollup-freebsd-arm64': 4.31.0
'@rollup/rollup-freebsd-x64': 4.31.0
'@rollup/rollup-linux-arm-gnueabihf': 4.31.0
'@rollup/rollup-linux-arm-musleabihf': 4.31.0
'@rollup/rollup-linux-arm64-gnu': 4.31.0
'@rollup/rollup-linux-arm64-musl': 4.31.0
'@rollup/rollup-linux-loongarch64-gnu': 4.31.0
'@rollup/rollup-linux-powerpc64le-gnu': 4.31.0
'@rollup/rollup-linux-riscv64-gnu': 4.31.0
'@rollup/rollup-linux-s390x-gnu': 4.31.0
'@rollup/rollup-linux-x64-gnu': 4.31.0
'@rollup/rollup-linux-x64-musl': 4.31.0
'@rollup/rollup-win32-arm64-msvc': 4.31.0
'@rollup/rollup-win32-ia32-msvc': 4.31.0
'@rollup/rollup-win32-x64-msvc': 4.31.0
'@rollup/rollup-android-arm-eabi': 4.32.0
'@rollup/rollup-android-arm64': 4.32.0
'@rollup/rollup-darwin-arm64': 4.32.0
'@rollup/rollup-darwin-x64': 4.32.0
'@rollup/rollup-freebsd-arm64': 4.32.0
'@rollup/rollup-freebsd-x64': 4.32.0
'@rollup/rollup-linux-arm-gnueabihf': 4.32.0
'@rollup/rollup-linux-arm-musleabihf': 4.32.0
'@rollup/rollup-linux-arm64-gnu': 4.32.0
'@rollup/rollup-linux-arm64-musl': 4.32.0
'@rollup/rollup-linux-loongarch64-gnu': 4.32.0
'@rollup/rollup-linux-powerpc64le-gnu': 4.32.0
'@rollup/rollup-linux-riscv64-gnu': 4.32.0
'@rollup/rollup-linux-s390x-gnu': 4.32.0
'@rollup/rollup-linux-x64-gnu': 4.32.0
'@rollup/rollup-linux-x64-musl': 4.32.0
'@rollup/rollup-win32-arm64-msvc': 4.32.0
'@rollup/rollup-win32-ia32-msvc': 4.32.0
'@rollup/rollup-win32-x64-msvc': 4.32.0
fsevents: 2.3.3
run-parallel@1.2.0:
@ -8221,10 +8221,10 @@ 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.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@65.4.3(postcss@8.5.1)(rollup@4.32.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.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/astro': 65.4.3(rollup@4.32.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.32.0)
'@unocss/core': 65.4.3
'@unocss/postcss': 65.4.3(postcss@8.5.1)
'@unocss/preset-attributify': 65.4.3
@ -8239,7 +8239,7 @@ 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.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/vite': 65.4.3(rollup@4.32.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.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(tsx@4.19.2)(yaml@2.7.0)
transitivePeerDependencies:
@ -8299,7 +8299,7 @@ snapshots:
dependencies:
esbuild: 0.24.2
postcss: 8.5.1
rollup: 4.31.0
rollup: 4.32.0
optionalDependencies:
'@types/node': 22.10.10
fsevents: 2.3.3

View file

@ -14,17 +14,17 @@ const marginClass = {
<header>
<h1
class={`${marginClass} mt--3.2 text-12 c-primary font-bold font-title`}
class={`${marginClass} mt--5.2 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"
<h2
class="text-5.6 c-secondary font-navbar"
aria-label="Meta Description"
>
{subtitle}
</h3>
</h2>
</header>

View file

@ -1,60 +1,58 @@
---
import themeConfig from '@/config'
// Language array with empty string as default locale
const langs = ['', ...themeConfig.global.moreLocale]
const currentLocale = themeConfig.global.locale
function getLanguageDisplayName(code: string) {
if (!code)
return 'Default'
return new Intl.DisplayNames(['en'], { type: 'language' }).of(code) || code
}
---
<script is:inline define:vars={{ langs }}>
const langSwitch = document.getElementById('language-switcher')
langSwitch?.addEventListener('click', () => {
const { pathname, search, hash } = window.location
// 获取当前语言和路径段
const segments = pathname.split('/').filter(Boolean)
const firstSegment = segments[0] || ''
const currentLang = langs.includes(firstSegment) ? firstSegment : ''
// 获取下一个语言
const currentIndex = langs.indexOf(currentLang)
const nextLang = langs[(currentIndex + 1) % langs.length]
// 构建新的 URL
let newPath
if (currentLang) {
// 如果当前有语言前缀,替换它
segments[0] = nextLang || segments[0]
newPath = nextLang ? `/${segments.join('/')}` : `/${segments.slice(1).join('/')}`
}
else {
// 如果当前没有语言前缀
newPath = nextLang ? `/${nextLang}${pathname}` : pathname
}
// 确保路径至少是 "/"
newPath = newPath || '/'
// 切换语言
window.location.href = `${newPath}${search}${hash}`
})
</script>
<button
id="language-switcher"
class="absolute right-25.6 top-19.4 z-999 aspect-square w-7 c-secondary active:scale-92"
aria-label="Language Switch Button"
title="Language Switch Button"
class="absolute right-25.6 top-20 z-99 aspect-square w-6.6 c-secondary active:scale-92"
aria-label="Switch Language"
title={`Current Language: ${getLanguageDisplayName(currentLocale)}`}
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="h-full w-full">
<path d="M19 21 12.3 2h-1L4.7 21l-2.5.2v.8h6.3v-.8L5.7 21l2-5.9h7.5l2 5.9-3.3.2v.8h7.9v-.8zM8 14.3l3.4-10.1 3.5 10.1z" fill="currentColor" />
</svg>
<span class="sr-only">Switch Language</span>
</button>
<style>
#language-switcher {
transition: transform 0.3s ease;
<script is:inline define:vars={{ langs }}>
// Move event binding into astro:page-load event
document.addEventListener('astro:page-load', () => {
const langSwitch = document.getElementById('language-switcher')
langSwitch?.addEventListener('click', () => {
const { pathname, search, hash } = window.location
const segments = pathname.split('/').filter(Boolean)
const firstSegment = segments[0] || ''
// Check if first segment is a valid language code
const currentLang = langs.includes(firstSegment) ? firstSegment : ''
// Get next language in rotation (empty string means default locale)
const currentIndex = langs.indexOf(currentLang)
const nextLang = langs[(currentIndex + 1) % langs.length]
const newPath = buildNewPath(currentLang, nextLang, segments, pathname) || '/'
window.location.href = `${newPath}${search}${hash}`
})
})
// Handle path construction for both cases:
// 1. Current path has language prefix
// 2. Current path has no language prefix
function buildNewPath(currentLang, nextLang, segments, pathname) {
if (currentLang) {
segments[0] = nextLang || segments[0]
return nextLang ? `/${segments.join('/')}` : `/${segments.slice(1).join('/')}`
}
#language-switcher:hover {
transform: scale(1.1);
}
</style>
return nextLang ? `/${nextLang}${pathname}` : pathname
}
</script>

View file

@ -51,13 +51,13 @@ const isTagActive = isTagPage(currentPath)
const isAboutActive = isAboutPage(currentPath)
---
<nav class="mb-19.4 mt-12 text-5.6 text-secondary font-semibold leading-13 font-navbar">
<nav class="mb-20 mt-13 text-5.6 text-secondary font-semibold leading-13 font-navbar">
<ul>
<li>
<a
href={getLocalizedPath('/')}
class:list={[
isPostActive ? 'font-bold opacity-100' : 'opacity-25',
isPostActive ? 'font-bold text-primary' : 'text-secondary',
]}
>
{currentUI.posts}
@ -67,7 +67,7 @@ const isAboutActive = isAboutPage(currentPath)
<a
href={getLocalizedPath('/tags')}
class:list={[
isTagActive ? 'font-bold opacity-100' : 'opacity-25',
isTagActive ? 'font-bold text-primary' : 'text-secondary',
]}
>
{currentUI.tags}
@ -77,7 +77,7 @@ const isAboutActive = isAboutPage(currentPath)
<a
href={getLocalizedPath('/about')}
class:list={[
isAboutActive ? 'font-bold opacity-100' : 'opacity-25',
isAboutActive ? 'font-bold text-primary' : 'text-secondary',
]}
>
{currentUI.about}

View file

@ -18,10 +18,22 @@ function toggleTheme() {
switchTheme()
return
}
document.startViewTransition(switchTheme)
// Set transition name for theme toggle
document.documentElement.style.setProperty('view-transition-name', 'theme-transition')
// Execute transition
const transition = document.startViewTransition(() => {
switchTheme()
}) as any
// Clean up after transition
transition.finished.then(() => {
document.documentElement.style.removeProperty('view-transition-name')
})
}
// Sync theme state
// Sync theme state across page navigation
function syncTheme() {
document.body.setAttribute('data-restore-theme', 'true')
const theme = localStorage.getItem('theme')
@ -33,7 +45,12 @@ function syncTheme() {
}
// Event listeners
themeToggle.addEventListener('click', toggleTheme)
document.addEventListener('astro:page-load', () => {
const themeToggle = document.querySelector('button[aria-pressed]') as HTMLButtonElement
themeToggle.setAttribute('aria-pressed', String(document.documentElement.classList.contains('dark')))
themeToggle.addEventListener('click', toggleTheme)
})
document.addEventListener('astro:after-swap', syncTheme)
window.addEventListener('popstate', syncTheme)
window.addEventListener('pageshow', (event) => {
@ -46,7 +63,7 @@ window.addEventListener('pageshow', (event) => {
<button
aria-pressed="false"
aria-label="Theme Toggle Button"
class="absolute right-9.6 top-19.4 z-999 aspect-square w-7 c-secondary active:scale-92"
class="absolute right-9.6 top-19.8 z-99 aspect-square w-7 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

@ -1,5 +1,6 @@
---
import themeConfig from '@/config'
import { ClientRouter } from 'astro:transitions'
interface Props {
postTitle?: string
@ -35,6 +36,7 @@ const { cdn, commentURL = '', imageHostURL = '', customGoogleAnalyticsURL = '',
<meta itemprop="name" content={postTitle || title} />
<meta itemprop="image" content={postImage || siteScreenshot} />
<meta itemprop="description" content={postDescription || subtitle} />
<ClientRouter />
<!-- Preload -->
<link rel="preconnect" href={cdn} />

View file

@ -52,16 +52,16 @@ html.dark {
html:not(.dark) {
--from: 100% 0 0 0;
}
::view-transition-new(root) {
transition: none;
animation: reveal 1s cubic-bezier(0.4, 0, 0.2, 1);
clip-path: inset(0 0 0 0);
z-index: 2;
::view-transition-new(theme-transition) {
transition: none;
animation: reveal 1s cubic-bezier(0.4, 0, 0.2, 1);
clip-path: inset(0 0 0 0);
z-index: 2;
}
::view-transition-old(root) {
transition: none;
animation: none;
z-index: -1;
::view-transition-old(theme-transition) {
transition: none;
animation: none;
z-index: -1;
}
@supports not (view-transition-name: none) {
body:not([data-restore-theme]) {