添加 node adapter 和一些开发脚手架

This commit is contained in:
2026-03-27 01:49:30 +08:00
parent 1a6a880a49
commit 54c327ebb0
10 changed files with 3988 additions and 25 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.{js,ts,astro,json,yml}]
indent_style = space
indent_size = 2
[*.css]
indent_style = space
indent_size = 4

View File

@ -1,5 +1,11 @@
// @ts-check
import { defineConfig } from 'astro/config';
import { defineConfig } from 'astro/config'
import node from '@astrojs/node';
// https://astro.build/config
export default defineConfig({});
export default defineConfig({
adapter: node({
mode: 'standalone'
})
})

3757
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,15 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^10.0.4",
"astro": "^6.1.0"
},
"devDependencies": {
"@typescript-eslint/parser": "^8.57.2",
"eslint": "^9.39.4",
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1"
}
}

23
prettier.config.cjs Normal file
View File

@ -0,0 +1,23 @@
// prettier.config.js, .prettierrc.js, prettier.config.cjs, or .prettierrc.cjs
/**
* @see https://prettier.io/docs/configuration
* @type {import("prettier").Config}
*/
const config = {
trailingComma: 'all',
tabWidth: 2,
semi: false,
singleQuote: true,
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
},
},
],
}
module.exports = config

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 104 KiB

View File

@ -1,9 +1,101 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
<path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
<style>
path { fill: #000; }
@media (prefers-color-scheme: dark) {
path { fill: #FFF; }
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="900px"
height="900px"
viewBox="0 0 900 900"
version="1.1"
xml:space="preserve"
id="SVGRoot"
sodipodi:docname="icon.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs10"><linearGradient
id="linearGradient15"
inkscape:collect="always"><stop
style="stop-color:#25c5bb;stop-opacity:1;"
offset="0"
id="stop15" /><stop
style="stop-color:#a8f7f3;stop-opacity:1;"
offset="1"
id="stop16" /></linearGradient><linearGradient
id="linearGradient13"
inkscape:collect="always"><stop
style="stop-color:#57b8ff;stop-opacity:1;"
offset="0"
id="stop13" /><stop
style="stop-color:#576fff;stop-opacity:1;"
offset="1"
id="stop14" /></linearGradient><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13"
id="linearGradient14"
x1="150"
y1="448"
x2="549.99805"
y2="448"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.146789,0,0,1.146789,-127.05505,-124.76146)" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient15"
id="linearGradient16"
x1="250"
y1="448"
x2="750"
y2="448"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.146789,0,0,1.146789,-127.05505,-124.76146)" /></defs>
<sodipodi:namedview
pagecolor="#a9a9a9"
bordercolor="#292929"
borderopacity="1"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#232323"
id="namedview1"
inkscape:zoom="0.58139891"
inkscape:cx="554.6966"
inkscape:cy="519.43682"
inkscape:window-width="1704"
inkscape:window-height="996"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="SVGRoot" />
<style
type="text/css"
id="style1">
g.prefab path {
vector-effect:non-scaling-stroke;
-inkscape-stroke:hairline;
fill: none;
fill-opacity: 1;
stroke-opacity: 1;
stroke: #00349c;
}
</style>
<g
id="g18"
transform="translate(60.999722,61)"><path
d="M 479.82617,43 V 309.24609 C 365.14713,423.92643 250.4681,538.60678 135.78906,653.28711 V 857 H 339.5 c 46.7754,-46.77539 93.55078,-93.55078 140.32617,-140.32617 V 857 h 355.2832 V 767.9668 C 796.88295,729.74075 758.6561,691.51512 720.42969,653.28906 V 476.06641 c 38.22656,-38.22592 76.45314,-76.45182 114.67968,-114.67774 V 43 h -89.0371 c -8.54753,8.547526 -17.09505,17.095052 -25.64258,25.642578 V 43 Z"
style="fill:#ffffff"
id="path18"
transform="translate(-39.108815,-61)"
inkscape:label="T_down" /><path
id="path17"
style="vector-effect:non-scaling-stroke;fill:#ffffff;stroke:none;stroke-width:1.14678;-inkscape-stroke:hairline"
inkscape:label="P_down"
d="m -18,-16 c 0,270.66667 0,541.33333 0,812 80.201823,0 160.40365,0 240.60547,0 0,-50.52409 0,-101.04818 0,-151.57227 C 345.97396,521.05859 469.34244,397.68945 592.71094,274.32031 495.27083,176.88021 397.83073,79.440104 300.39062,-18 194.26042,-18 88.130208,-18 -18,-18 c 0,0.666667 0,1.333333 0,2 z" /><path
d="m 503.6789,44.963303 v 229.355557 0.004 l -0.003,-0.003 -114.67666,114.67667 114.67666,114.68113 0.003,-0.003 v 0.004 229.3566 H 618.3578 733.03446 L 618.3578,618.36003 V 389.00224 l -0.003,-0.003 0.003,-0.003 114.6789,-114.67833 V 44.963303 h -0.003 L 618.3578,159.63997 V 44.963303 Z M 503.67632,503.6789 389,389.00224 274.3211,503.6789 159.6422,618.3578 V 733.0367 H 274.3211 L 389,618.3578 Z"
style="vector-effect:non-scaling-stroke;fill:url(#linearGradient16);stroke:none;stroke-width:1.14678;-inkscape-stroke:hairline"
id="path12"
inkscape:label="T_up" /><path
d="M 44.963303,44.963303 V 274.3211 503.6789 733.0367 H 159.6422 V 618.3578 L 274.3211,503.6789 389,389.00224 274.3211,274.3211 159.6422,389 V 159.6422 L 274.3211,274.3211 389,388.99776 503.67666,274.3211 389,159.6422 274.3211,44.963303 H 159.6422 Z"
style="vector-effect:non-scaling-stroke;fill:url(#linearGradient14);stroke:none;stroke-width:1.14678;-inkscape-stroke:hairline"
id="path11"
inkscape:label="P_up" /></g>
</svg>

Before

Width:  |  Height:  |  Size: 749 B

After

Width:  |  Height:  |  Size: 4.4 KiB

22
src/assets/style.css Normal file
View File

@ -0,0 +1,22 @@
/*
* 公共使用的 CSS 文件。
* 用于定义主题色等各种东西。
*/
/* == 主题色 == */
:root {
color-scheme: light dark;
--color-bg-0: light-dark(oklch(95% 0 0), oklch(30% 0.02 270));
--color-fg-0: light-dark(oklch(25% 0.02 270), oklch(90% 0.02 270));
}
/* == 页面设置 == */
html,
body {
margin: 0;
padding: 0;
background-color: var(--color-bg-0);
color: var(--color-fg-0);
}

View File

@ -0,0 +1,23 @@
---
import '../assets/style.css'
interface Props {
title?: string
}
const { title = '小帕的小窝' } = Astro.props
---
<html lang="zh-hans">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body>
<slot />
</body>
</html>

View File

@ -1,17 +1,35 @@
---
import BaseLayout from '../components/BaseLayout.astro'
---
---
<BaseLayout>
<div class="main">
<h1>博客系统翻新中...</h1>
<p>点击 <a href="https://legacy.passthem.top">这里</a> 查看旧版博客</p>
</div>
</BaseLayout>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>Astro</title>
</head>
<body>
<h1>Astro</h1>
</body>
</html>
<style>
.main {
font-family:
'HarmonyOS Sans SC',
'Noto Sans SC',
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Open Sans',
'Helvetica Neue',
sans-serif;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 100dvw;
height: 100dvh;
}
</style>