From f438ea4252ec3773038648747a085d0dfac89a25 Mon Sep 17 00:00:00 2001 From: saicaca Date: Sun, 30 Jun 2024 01:30:03 +0800 Subject: [PATCH] feat: style improvements (mainly animations) --- package.json | 1 + pnpm-lock.yaml | 68 +++++++++++++++++++---------- src/components/GlobalStyles.astro | 16 ++++--- src/components/PostCard.astro | 12 ++--- src/components/widget/Profile.astro | 32 +++++++------- 5 files changed, 78 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index 725aa8d..e4d57c4 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "@types/mdast": "^4.0.4", "@types/sanitize-html": "^2.11.0", "remark-github-admonitions-to-directives": "^1.0.5", + "sass": "^1.77.6", "stylus": "^0.63.0" }, "pnpm": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6528b76..0477f60 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,10 +23,10 @@ importers: version: 3.1.6 '@astrojs/svelte': specifier: ^5.6.0 - version: 5.6.0(astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2))(svelte@4.2.18)(typescript@5.5.2)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)) + version: 5.6.0(astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2))(svelte@4.2.18)(typescript@5.5.2)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)) '@astrojs/tailwind': specifier: ^5.1.0 - version: 5.1.0(astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2))(tailwindcss@3.4.4) + version: 5.1.0(astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2))(tailwindcss@3.4.4) '@fontsource-variable/jetbrains-mono': specifier: ^5.0.21 version: 5.0.21 @@ -38,10 +38,10 @@ importers: version: 1.4.1(@types/babel__core@7.20.5) astro: specifier: ^4.11.0 - version: 4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2) + version: 4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2) astro-compress: specifier: ^2.2.28 - version: 2.2.28(@types/node@20.14.7)(stylus@0.63.0)(typescript@5.5.2) + version: 2.2.28(@types/node@20.14.7)(sass@1.77.6)(stylus@0.63.0)(typescript@5.5.2) astro-icon: specifier: 1.1.0 version: 1.1.0 @@ -145,6 +145,9 @@ importers: remark-github-admonitions-to-directives: specifier: ^1.0.5 version: 1.0.5 + sass: + specifier: ^1.77.6 + version: 1.77.6 stylus: specifier: ^0.63.0 version: 0.63.0 @@ -2650,6 +2653,9 @@ packages: peerDependencies: postcss: ^8.1.0 + immutable@4.3.6: + resolution: {integrity: sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==} + import-cwd@3.0.0: resolution: {integrity: sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==} engines: {node: '>=8'} @@ -4047,6 +4053,11 @@ packages: sanitize-html@2.13.0: resolution: {integrity: sha512-Xff91Z+4Mz5QiNSLdLWwjgBDm5b1RU6xBT0+12rapjiaR7SwfRdjw8f+6Rir2MXKLrDicRFHdb51hGOAxmsUIA==} + sass@1.77.6: + resolution: {integrity: sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==} + engines: {node: '>=14.0.0'} + hasBin: true + sax@1.3.0: resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} @@ -4811,10 +4822,10 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.23.8 - '@astrojs/svelte@5.6.0(astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2))(svelte@4.2.18)(typescript@5.5.2)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1))': + '@astrojs/svelte@5.6.0(astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2))(svelte@4.2.18)(typescript@5.5.2)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1))': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)) - astro: 4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2) + '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)) + astro: 4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2) svelte: 4.2.18 svelte2tsx: 0.7.10(svelte@4.2.18)(typescript@5.5.2) typescript: 5.5.2 @@ -4822,9 +4833,9 @@ snapshots: - supports-color - vite - '@astrojs/tailwind@5.1.0(astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2))(tailwindcss@3.4.4)': + '@astrojs/tailwind@5.1.0(astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2))(tailwindcss@3.4.4)': dependencies: - astro: 4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2) + astro: 4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2) autoprefixer: 10.4.19(postcss@8.4.38) postcss: 8.4.38 postcss-load-config: 4.0.2(postcss@8.4.38) @@ -6155,26 +6166,26 @@ snapshots: magic-string: 0.25.9 string.prototype.matchall: 4.0.11 - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)))(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1))': + '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)))(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1))': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)) + '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)) debug: 4.3.5 svelte: 4.2.18 - vite: 5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1))': + '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)))(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)) + '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)))(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)) debug: 4.3.5 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.10 svelte: 4.2.18 svelte-hmr: 0.16.0(svelte@4.2.18) - vite: 5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1) - vitefu: 0.2.5(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)) + vite: 5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1) + vitefu: 0.2.5(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)) transitivePeerDependencies: - supports-color @@ -6568,12 +6579,12 @@ snapshots: is-array-buffer: 3.0.4 is-shared-array-buffer: 1.0.3 - astro-compress@2.2.28(@types/node@20.14.7)(stylus@0.63.0)(typescript@5.5.2): + astro-compress@2.2.28(@types/node@20.14.7)(sass@1.77.6)(stylus@0.63.0)(typescript@5.5.2): dependencies: '@playform/pipe': 0.0.6 '@types/csso': 5.0.4 '@types/html-minifier-terser': 7.0.2 - astro: 4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2) + astro: 4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2) csso: 5.0.5 html-minifier-terser: 7.2.0 kleur: 4.1.5 @@ -6598,7 +6609,7 @@ snapshots: transitivePeerDependencies: - supports-color - astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2): + astro@4.11.0(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)(typescript@5.5.2): dependencies: '@astrojs/compiler': 2.8.0 '@astrojs/internal-helpers': 0.4.0 @@ -6657,8 +6668,8 @@ snapshots: tsconfck: 3.1.0(typescript@5.5.2) unist-util-visit: 5.0.0 vfile: 6.0.1 - vite: 5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1) - vitefu: 0.2.5(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)) + vite: 5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1) + vitefu: 0.2.5(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)) which-pm: 2.2.0 yargs-parser: 21.1.1 zod: 3.23.8 @@ -7763,6 +7774,8 @@ snapshots: dependencies: postcss: 8.4.38 + immutable@4.3.6: {} + import-cwd@3.0.0: dependencies: import-from: 3.0.0 @@ -9451,6 +9464,12 @@ snapshots: parse-srcset: 1.0.2 postcss: 8.4.38 + sass@1.77.6: + dependencies: + chokidar: 3.6.0 + immutable: 4.3.6 + source-map-js: 1.2.0 + sax@1.3.0: {} sax@1.4.1: {} @@ -10043,7 +10062,7 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1): + vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1): dependencies: esbuild: 0.21.5 postcss: 8.4.38 @@ -10052,12 +10071,13 @@ snapshots: '@types/node': 20.14.7 fsevents: 2.3.3 lightningcss: 1.25.1 + sass: 1.77.6 stylus: 0.63.0 terser: 5.31.1 - vitefu@0.2.5(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1)): + vitefu@0.2.5(vite@5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1)): optionalDependencies: - vite: 5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(stylus@0.63.0)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.7)(lightningcss@1.25.1)(sass@1.77.6)(stylus@0.63.0)(terser@5.31.1) volar-service-css@0.0.45(@volar/language-service@2.2.5): dependencies: diff --git a/src/components/GlobalStyles.astro b/src/components/GlobalStyles.astro index 0904e23..340d6c3 100644 --- a/src/components/GlobalStyles.astro +++ b/src/components/GlobalStyles.astro @@ -177,7 +177,7 @@ color_set({ -