BLOG-58 Rewrite frontend with svelte kit #61

Merged
squid merged 15 commits from BLOG-58_rewrite_frontend_with_svelte into main 2025-07-23 05:34:25 +08:00
7 changed files with 238 additions and 5 deletions
Showing only changes of commit 9ce4c11032 - Show all commits

View File

@ -1,2 +1,14 @@
@import 'tailwindcss';
@plugin '@tailwindcss/typography';
@font-face {
font-family: 'HackNerdMono';
src: url('/font/HackNerdMono.woff2') format('woff2');
}
:root {
--font-noto-sans-tc: 'Noto Sans TC', sans-serif;
--font-noto-sans-mono: 'Noto Sans Mono', monospace;
--font-hack-nerd-mono: 'HackNerdMono', monospace;
}
body {
font-family: var(--font-noto-sans-tc);
}

View File

@ -1,9 +1,15 @@
<!doctype html>
<html lang="en">
<html lang="zh-Hant">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
<link rel="icon" media="(prefers-color-scheme: light)" href="%sveltekit.assets%/icon/logo-light.svg" />
<link rel="icon" media="(prefers-color-scheme: dark)" href="%sveltekit.assets%/icon/logo-dark.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>魚之魷魂 SquidSpirit</title>
<meta name="description" content="程式、科技、教學、分享" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono&family=Noto+Sans+TC&display=swap" rel="stylesheet">
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo</title><path d="M94.157 22.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282 29.608A29.92 29.92 0 0 0 8.764 49.65a31.5 31.5 0 0 0 3.108 20.231 30 30 0 0 0-4.477 11.183 31.9 31.9 0 0 0 5.448 24.116c10.402 14.887 30.942 19.297 45.791 9.835l26.083-16.624A29.92 29.92 0 0 0 98.235 78.35a31.53 31.53 0 0 0-3.105-20.232 30 30 0 0 0 4.474-11.182 31.88 31.88 0 0 0-5.447-24.116" style="fill:#ff3e00"/><path d="M45.817 106.582a20.72 20.72 0 0 1-22.237-8.243 19.17 19.17 0 0 1-3.277-14.503 18 18 0 0 1 .624-2.435l.49-1.498 1.337.981a33.6 33.6 0 0 0 10.203 5.098l.97.294-.09.968a5.85 5.85 0 0 0 1.052 3.878 6.24 6.24 0 0 0 6.695 2.485 5.8 5.8 0 0 0 1.603-.704L69.27 76.28a5.43 5.43 0 0 0 2.45-3.631 5.8 5.8 0 0 0-.987-4.371 6.24 6.24 0 0 0-6.698-2.487 5.7 5.7 0 0 0-1.6.704l-9.953 6.345a19 19 0 0 1-5.296 2.326 20.72 20.72 0 0 1-22.237-8.243 19.17 19.17 0 0 1-3.277-14.502 17.99 17.99 0 0 1 8.13-12.052l26.081-16.623a19 19 0 0 1 5.3-2.329 20.72 20.72 0 0 1 22.237 8.243 19.17 19.17 0 0 1 3.277 14.503 18 18 0 0 1-.624 2.435l-.49 1.498-1.337-.98a33.6 33.6 0 0 0-10.203-5.1l-.97-.294.09-.968a5.86 5.86 0 0 0-1.052-3.878 6.24 6.24 0 0 0-6.696-2.485 5.8 5.8 0 0 0-1.602.704L37.73 51.72a5.42 5.42 0 0 0-2.449 3.63 5.79 5.79 0 0 0 .986 4.372 6.24 6.24 0 0 0 6.698 2.486 5.8 5.8 0 0 0 1.602-.704l9.952-6.342a19 19 0 0 1 5.295-2.328 20.72 20.72 0 0 1 22.237 8.242 19.17 19.17 0 0 1 3.277 14.503 18 18 0 0 1-8.13 12.053l-26.081 16.622a19 19 0 0 1-5.3 2.328" style="fill:#fff"/></svg>

Binary file not shown.

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 512 512"
version="1.1"
id="svg1"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
sodipodi:docname="logo-dark.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="1.6365655"
inkscape:cx="235.55428"
inkscape:cy="251.4412"
inkscape:window-width="2560"
inkscape:window-height="1408"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g6" />
<defs
id="defs1" />
<g
inkscape:label="圖層 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g7"
transform="translate(0,6.9758125)">
<g
id="g5"
transform="matrix(0.41693719,0,0,0.41693719,150.81231,275.51745)">
<path
id="rect3"
style="fill:#5599ff;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="m 92.692319,228.77148 c -6.62659,0.0347 -13.23998,2.60866 -18.29101,7.7129 l -106.36915,107.49023 c -4.37464,4.42071 -6.82971,9.99467 -7.38868,15.71289 -0.0568,0.58091 -0.0743,1.16324 -0.0918,1.74609 -0.009,0.2751 -0.0347,0.549 -0.0352,0.82422 5.1e-4,0.27458 0.0259,0.54783 0.0352,0.82227 0.0175,0.58285 0.035,1.16518 0.0918,1.74609 0.55897,5.71823 3.01404,11.29218 7.38867,15.7129 L 74.401299,488.0293 c 10.10208,10.20847 26.453641,10.29348 36.662111,0.19141 10.20848,-10.10208 10.29348,-26.45169 0.19141,-36.66016 L 22.883719,362.25781 111.25481,272.95508 c 10.10208,-10.20848 10.01708,-26.56004 -0.19139,-36.66211 -5.10424,-5.05104 -11.744511,-7.5562 -18.371101,-7.52149 z" />
<rect
style="fill:#80b3ff;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
id="rect5"
width="51.848202"
height="283.7283"
x="345.60474"
y="-379.78085"
ry="25.924101"
transform="matrix(0.92365402,0.38322741,0.38197175,-0.924174,0,0)" />
<path
id="path5"
style="fill:#5599ff;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="m 411.88104,228.77148 c 6.6266,0.0347 13.24,2.60866 18.291,7.7129 l 106.3691,107.49023 c 4.3746,4.42071 6.8297,9.99467 7.3887,15.71289 0.057,0.58091 0.074,1.16324 0.092,1.74609 0.01,0.2751 0.035,0.549 0.035,0.82422 -5e-4,0.27458 -0.026,0.54783 -0.035,0.82227 -0.018,0.58285 -0.035,1.16518 -0.092,1.74609 -0.559,5.71823 -3.0141,11.29218 -7.3887,15.7129 L 430.17204,488.0293 c -10.1021,10.20847 -26.45364,10.29348 -36.66211,0.19141 -10.20848,-10.10208 -10.29348,-26.45169 -0.19141,-36.66016 l 88.37112,-89.30274 -88.37111,-89.30273 c -10.10208,-10.20848 -10.01708,-26.56004 0.19139,-36.66211 5.10424,-5.05104 11.74451,-7.5562 18.37112,-7.52149 z" />
</g>
<g
id="g6"
transform="translate(6.697046)">
<path
sodipodi:type="star"
style="fill:#80b3ff;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
id="path6"
inkscape:flatsided="true"
sodipodi:sides="3"
sodipodi:cx="184.49283"
sodipodi:cy="58.761181"
sodipodi:r1="127.72986"
sodipodi:r2="63.864929"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0.14"
inkscape:randomized="0"
d="m 295.11013,122.62611 c -15.48642,26.82327 -205.748182,26.82327 -221.234604,0 C 58.389104,95.802839 153.51998,-68.968678 184.49283,-68.968678 c 30.97284,10e-7 126.10372,164.771518 110.6173,191.594788 z"
inkscape:transform-center-y="-13.622002"
transform="matrix(-0.33629476,-0.57358618,0.58247964,-0.33116014,275.59758,225.7177)"
inkscape:transform-center-x="1.522155" />
<path
sodipodi:type="star"
style="fill:#5599ff;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
id="path1"
inkscape:flatsided="true"
sodipodi:sides="3"
sodipodi:cx="184.49283"
sodipodi:cy="58.761181"
sodipodi:r1="127.72986"
sodipodi:r2="63.864929"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0.16"
inkscape:randomized="0"
d="m 295.11013,122.62611 c -17.69877,30.65517 -203.535836,30.65517 -221.234604,0 C 56.176758,91.970943 149.09529,-68.968678 184.49283,-68.968678 c 35.39754,10e-7 128.31607,160.939623 110.6173,191.594788 z"
inkscape:transform-center-y="-30.185815"
transform="matrix(0.82249869,0,0,1.2327295,97.557844,171.10648)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 512 512"
version="1.1"
id="svg1"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
sodipodi:docname="logo-light.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="1.6365655"
inkscape:cx="235.55428"
inkscape:cy="251.4412"
inkscape:window-width="2560"
inkscape:window-height="1408"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g7" />
<defs
id="defs1" />
<g
inkscape:label="圖層 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g7"
transform="translate(0,6.9758125)">
<g
id="g5"
transform="matrix(0.41693719,0,0,0.41693719,150.81231,275.51745)">
<path
id="rect3"
style="fill:#2a7fff;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="m 92.692319,228.77148 c -6.62659,0.0347 -13.23998,2.60866 -18.29101,7.7129 l -106.36915,107.49023 c -4.37464,4.42071 -6.82971,9.99467 -7.38868,15.71289 -0.0568,0.58091 -0.0743,1.16324 -0.0918,1.74609 -0.009,0.2751 -0.0347,0.549 -0.0352,0.82422 5.1e-4,0.27458 0.0259,0.54783 0.0352,0.82227 0.0175,0.58285 0.035,1.16518 0.0918,1.74609 0.55897,5.71823 3.01404,11.29218 7.38867,15.7129 L 74.401299,488.0293 c 10.10208,10.20847 26.453641,10.29348 36.662111,0.19141 10.20848,-10.10208 10.29348,-26.45169 0.19141,-36.66016 L 22.883719,362.25781 111.25481,272.95508 c 10.10208,-10.20848 10.01708,-26.56004 -0.19139,-36.66211 -5.10424,-5.05104 -11.744511,-7.5562 -18.371101,-7.52149 z" />
<rect
style="fill:#0044aa;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
id="rect5"
width="51.848202"
height="283.7283"
x="345.60474"
y="-379.78085"
ry="25.924101"
transform="matrix(0.92365402,0.38322741,0.38197175,-0.924174,0,0)" />
<path
id="path5"
style="fill:#2a7fff;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="m 411.88104,228.77148 c 6.6266,0.0347 13.24,2.60866 18.291,7.7129 l 106.3691,107.49023 c 4.3746,4.42071 6.8297,9.99467 7.3887,15.71289 0.057,0.58091 0.074,1.16324 0.092,1.74609 0.01,0.2751 0.035,0.549 0.035,0.82422 -5e-4,0.27458 -0.026,0.54783 -0.035,0.82227 -0.018,0.58285 -0.035,1.16518 -0.092,1.74609 -0.559,5.71823 -3.0141,11.29218 -7.3887,15.7129 L 430.17204,488.0293 c -10.1021,10.20847 -26.45364,10.29348 -36.66211,0.19141 -10.20848,-10.10208 -10.29348,-26.45169 -0.19141,-36.66016 l 88.37112,-89.30274 -88.37111,-89.30273 c -10.10208,-10.20848 -10.01708,-26.56004 0.19139,-36.66211 5.10424,-5.05104 11.74451,-7.5562 18.37112,-7.52149 z" />
</g>
<g
id="g6"
transform="translate(6.697046)">
<path
sodipodi:type="star"
style="fill:#0044aa;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
id="path6"
inkscape:flatsided="true"
sodipodi:sides="3"
sodipodi:cx="184.49283"
sodipodi:cy="58.761181"
sodipodi:r1="127.72986"
sodipodi:r2="63.864929"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0.14"
inkscape:randomized="0"
d="m 295.11013,122.62611 c -15.48642,26.82327 -205.748182,26.82327 -221.234604,0 C 58.389104,95.802839 153.51998,-68.968678 184.49283,-68.968678 c 30.97284,10e-7 126.10372,164.771518 110.6173,191.594788 z"
inkscape:transform-center-y="-13.622002"
transform="matrix(-0.33629476,-0.57358618,0.58247964,-0.33116014,275.59758,225.7177)"
inkscape:transform-center-x="1.522155" />
<path
sodipodi:type="star"
style="fill:#2a7fff;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
id="path1"
inkscape:flatsided="true"
sodipodi:sides="3"
sodipodi:cx="184.49283"
sodipodi:cy="58.761181"
sodipodi:r1="127.72986"
sodipodi:r2="63.864929"
sodipodi:arg1="0.52359878"
sodipodi:arg2="1.5707963"
inkscape:rounded="0.16"
inkscape:randomized="0"
d="m 295.11013,122.62611 c -17.69877,30.65517 -203.535836,30.65517 -221.234604,0 C 56.176758,91.970943 149.09529,-68.968678 184.49283,-68.968678 c 35.39754,10e-7 128.31607,160.939623 110.6173,191.594788 z"
inkscape:transform-center-y="-30.185815"
transform="matrix(0.82249869,0,0,1.2327295,97.557844,171.10648)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,2 @@
User-agent: *
Allow: /