diff --git a/.github/workflows/theme-cd.yaml b/.github/workflows/theme-cd.yaml new file mode 100644 index 0000000..099f57d --- /dev/null +++ b/.github/workflows/theme-cd.yaml @@ -0,0 +1,16 @@ +name: Theme CD + +on: + release: + types: + - published + +jobs: + cd: + uses: halo-sigs/reusable-workflows/.github/workflows/theme-cd.yaml@v3 + permissions: + contents: write + with: + skip-appstore-release: true + node-version: 22 + pnpm-version: 10 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7ce3760..7e97c9b 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,4 @@ release .gradle build -dev/data +docker/data diff --git a/theme-terminal/README.md b/README.md similarity index 100% rename from theme-terminal/README.md rename to README.md diff --git a/dev/docker-compose.yaml b/docker/docker-compose.yaml similarity index 80% rename from dev/docker-compose.yaml rename to docker/docker-compose.yaml index bf0fc2e..9e48353 100644 --- a/dev/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -3,7 +3,7 @@ services: image: registry.fit2cloud.com/halo/halo:2.20.10 volumes: - ./data:/root/.halo2 - - ../theme-terminal:/root/.halo2/themes/theme-terminal + - ../:/root/.halo2/themes/theme-terminal ports: - "8090:8090" environment: diff --git a/theme-terminal/env.d.ts b/env.d.ts similarity index 100% rename from theme-terminal/env.d.ts rename to env.d.ts diff --git a/theme-terminal/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from theme-terminal/gradle/wrapper/gradle-wrapper.jar rename to gradle/wrapper/gradle-wrapper.jar diff --git a/theme-terminal/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from theme-terminal/gradle/wrapper/gradle-wrapper.properties rename to gradle/wrapper/gradle-wrapper.properties diff --git a/theme-terminal/i18n/default.properties b/i18n/default.properties similarity index 100% rename from theme-terminal/i18n/default.properties rename to i18n/default.properties diff --git a/theme-terminal/i18n/zh.properties b/i18n/zh.properties similarity index 100% rename from theme-terminal/i18n/zh.properties rename to i18n/zh.properties diff --git a/theme-terminal/package.json b/package.json similarity index 100% rename from theme-terminal/package.json rename to package.json diff --git a/theme-terminal/pnpm-lock.yaml b/pnpm-lock.yaml similarity index 100% rename from theme-terminal/pnpm-lock.yaml rename to pnpm-lock.yaml diff --git a/theme-terminal/postcss.config.js b/postcss.config.js similarity index 100% rename from theme-terminal/postcss.config.js rename to postcss.config.js diff --git a/theme-terminal/prettier.config.js b/prettier.config.js similarity index 100% rename from theme-terminal/prettier.config.js rename to prettier.config.js diff --git a/theme-terminal/settings.yaml b/settings.yaml similarity index 100% rename from theme-terminal/settings.yaml rename to settings.yaml diff --git a/theme-terminal/src/alpine/menu.ts b/src/alpine/menu.ts similarity index 100% rename from theme-terminal/src/alpine/menu.ts rename to src/alpine/menu.ts diff --git a/theme-terminal/src/alpine/themeMode.ts b/src/alpine/themeMode.ts similarity index 100% rename from theme-terminal/src/alpine/themeMode.ts rename to src/alpine/themeMode.ts diff --git a/theme-terminal/src/alpine/upvote.ts b/src/alpine/upvote.ts similarity index 100% rename from theme-terminal/src/alpine/upvote.ts rename to src/alpine/upvote.ts diff --git a/theme-terminal/src/fonts/FiraCode-Bold.woff b/src/fonts/FiraCode-Bold.woff similarity index 100% rename from theme-terminal/src/fonts/FiraCode-Bold.woff rename to src/fonts/FiraCode-Bold.woff diff --git a/theme-terminal/src/fonts/FiraCode-Regular.woff b/src/fonts/FiraCode-Regular.woff similarity index 100% rename from theme-terminal/src/fonts/FiraCode-Regular.woff rename to src/fonts/FiraCode-Regular.woff diff --git a/theme-terminal/src/fonts/fusion-pixel-12px-proportional-zh_hans.woff2 b/src/fonts/fusion-pixel-12px-proportional-zh_hans.woff2 similarity index 100% rename from theme-terminal/src/fonts/fusion-pixel-12px-proportional-zh_hans.woff2 rename to src/fonts/fusion-pixel-12px-proportional-zh_hans.woff2 diff --git a/theme-terminal/src/fonts/hack-bold.woff b/src/fonts/hack-bold.woff similarity index 100% rename from theme-terminal/src/fonts/hack-bold.woff rename to src/fonts/hack-bold.woff diff --git a/theme-terminal/src/fonts/hack-bold.woff2 b/src/fonts/hack-bold.woff2 similarity index 100% rename from theme-terminal/src/fonts/hack-bold.woff2 rename to src/fonts/hack-bold.woff2 diff --git a/theme-terminal/src/fonts/hack-bolditalic.woff b/src/fonts/hack-bolditalic.woff similarity index 100% rename from theme-terminal/src/fonts/hack-bolditalic.woff rename to src/fonts/hack-bolditalic.woff diff --git a/theme-terminal/src/fonts/hack-bolditalic.woff2 b/src/fonts/hack-bolditalic.woff2 similarity index 100% rename from theme-terminal/src/fonts/hack-bolditalic.woff2 rename to src/fonts/hack-bolditalic.woff2 diff --git a/theme-terminal/src/fonts/hack-italic.woff b/src/fonts/hack-italic.woff similarity index 100% rename from theme-terminal/src/fonts/hack-italic.woff rename to src/fonts/hack-italic.woff diff --git a/theme-terminal/src/fonts/hack-italic.woff2 b/src/fonts/hack-italic.woff2 similarity index 100% rename from theme-terminal/src/fonts/hack-italic.woff2 rename to src/fonts/hack-italic.woff2 diff --git a/theme-terminal/src/fonts/hack-regular.woff b/src/fonts/hack-regular.woff similarity index 100% rename from theme-terminal/src/fonts/hack-regular.woff rename to src/fonts/hack-regular.woff diff --git a/theme-terminal/src/fonts/hack-regular.woff2 b/src/fonts/hack-regular.woff2 similarity index 100% rename from theme-terminal/src/fonts/hack-regular.woff2 rename to src/fonts/hack-regular.woff2 diff --git a/theme-terminal/src/main.ts b/src/main.ts similarity index 100% rename from theme-terminal/src/main.ts rename to src/main.ts diff --git a/theme-terminal/src/styles/buttons.scss b/src/styles/buttons.scss similarity index 100% rename from theme-terminal/src/styles/buttons.scss rename to src/styles/buttons.scss diff --git a/theme-terminal/src/styles/font-hack.scss b/src/styles/font-hack.scss similarity index 100% rename from theme-terminal/src/styles/font-hack.scss rename to src/styles/font-hack.scss diff --git a/theme-terminal/src/styles/font-pixel.scss b/src/styles/font-pixel.scss similarity index 100% rename from theme-terminal/src/styles/font-pixel.scss rename to src/styles/font-pixel.scss diff --git a/theme-terminal/src/styles/footer.scss b/src/styles/footer.scss similarity index 96% rename from theme-terminal/src/styles/footer.scss rename to src/styles/footer.scss index 7a29fce..0482137 100644 --- a/theme-terminal/src/styles/footer.scss +++ b/src/styles/footer.scss @@ -38,7 +38,7 @@ & > *:first-child:not(:only-child) { margin-right: 10px; - @media (max-width: $tablet-max-width) { + @media (max-width: $tablet-max-width) { border: none; padding: 0; margin: 0; @@ -62,7 +62,7 @@ font-size: 0.75rem; } } - + .beian { display: flex; flex-direction: row; diff --git a/theme-terminal/src/styles/header.scss b/src/styles/header.scss similarity index 98% rename from theme-terminal/src/styles/header.scss rename to src/styles/header.scss index 84a58eb..c418a8e 100644 --- a/theme-terminal/src/styles/header.scss +++ b/src/styles/header.scss @@ -10,7 +10,7 @@ align-items: center; justify-content: space-between; } - + .dividing { flex: 1; background: repeating-linear-gradient(90deg, var(--foreground), var(--foreground) 2px, transparent 0, transparent 10px); @@ -33,7 +33,7 @@ position: relative; flex: 0 0 auto; padding-bottom: 10px; - + &.active { color: var(--cyan); } @@ -67,7 +67,7 @@ margin-right: 0; } } - + &.open { display: block; } diff --git a/theme-terminal/src/styles/logo.scss b/src/styles/logo.scss similarity index 98% rename from theme-terminal/src/styles/logo.scss rename to src/styles/logo.scss index c71b09b..c7cd1a5 100644 --- a/theme-terminal/src/styles/logo.scss +++ b/src/styles/logo.scss @@ -1,7 +1,7 @@ .logo { display: flex; align-items: center; - + .icon { max-width: 100%; max-height: 35px; @@ -10,7 +10,7 @@ object-fit: cover; margin-right: 10px; } - + .text { display: flex; padding: 3px 10px; diff --git a/theme-terminal/src/styles/main.scss b/src/styles/main.scss similarity index 99% rename from theme-terminal/src/styles/main.scss rename to src/styles/main.scss index 6c4278c..a6f9c3b 100644 --- a/theme-terminal/src/styles/main.scss +++ b/src/styles/main.scss @@ -218,7 +218,7 @@ ul, ol { li { position: relative; - + p { margin-top: .125rem; margin-bottom: .125rem; diff --git a/theme-terminal/src/styles/pagination.scss b/src/styles/pagination.scss similarity index 100% rename from theme-terminal/src/styles/pagination.scss rename to src/styles/pagination.scss diff --git a/theme-terminal/src/styles/post.scss b/src/styles/post.scss similarity index 96% rename from theme-terminal/src/styles/post.scss rename to src/styles/post.scss index 87b84ae..3c46390 100644 --- a/theme-terminal/src/styles/post.scss +++ b/src/styles/post.scss @@ -8,11 +8,13 @@ border: 1px solid var(--red); color: var(--red); padding: 20px; + *:first-child { - margin-top: 0; + margin-top: 0; } + *:last-child { - margin-bottom: 0; + margin-bottom: 0; } } @@ -30,10 +32,10 @@ @media (max-width: $tablet-max-width) { max-width: 660px; } - + &:not(:last-of-type) { border-bottom: 1px solid var(--foreground); - } + } %meta { font-size: 1rem; @@ -53,14 +55,14 @@ &-title { --border: 3px dotted var(--blue); - + position: relative; color: var(--blue); margin: 0 0 15px; padding-bottom: 15px; font-weight: normal; border-bottom: var(--border); - + &::after { content: ""; position: absolute; @@ -138,7 +140,7 @@ justify-content: center; margin-bottom: 10px; - &+ h2 { + & + h2 { margin-top: -10px; margin-bottom: 20px; } @@ -146,7 +148,7 @@ } .post-list { - + padding: .25rem 0; .post-date { diff --git a/theme-terminal/src/styles/style.scss b/src/styles/style.scss similarity index 100% rename from theme-terminal/src/styles/style.scss rename to src/styles/style.scss diff --git a/theme-terminal/src/styles/tailwind.css b/src/styles/tailwind.css similarity index 100% rename from theme-terminal/src/styles/tailwind.css rename to src/styles/tailwind.css diff --git a/theme-terminal/src/styles/theme.scss b/src/styles/theme.scss similarity index 100% rename from theme-terminal/src/styles/theme.scss rename to src/styles/theme.scss diff --git a/src/styles/typed-text.scss b/src/styles/typed-text.scss new file mode 100644 index 0000000..049defa --- /dev/null +++ b/src/styles/typed-text.scss @@ -0,0 +1,15 @@ +/* 光标样式 */ +.typed-text::after { + content: '|'; + display: inline-block; + opacity: 0; + animation: blink 0.7s infinite alternate; /* 闪烁动画 */ + vertical-align: text-bottom; +} + +/* 闪烁动画 */ +@keyframes blink { + to { + opacity: 1; + } +} \ No newline at end of file diff --git a/theme-terminal/src/styles/variables.scss b/src/styles/variables.scss similarity index 100% rename from theme-terminal/src/styles/variables.scss rename to src/styles/variables.scss diff --git a/theme-terminal/src/utils.ts b/src/utils.ts similarity index 94% rename from theme-terminal/src/utils.ts rename to src/utils.ts index 659f5c6..7337dcb 100644 --- a/theme-terminal/src/utils.ts +++ b/src/utils.ts @@ -6,7 +6,7 @@ export const typewriterEffect = (selectors: string) => { const text = typedTextContainer.innerText - // 清楚原有的文本 + // 清除原有的文本 typedTextContainer.innerText = '' // 实现打字机效果 diff --git a/theme-terminal/tailwind.config.js b/tailwind.config.js similarity index 100% rename from theme-terminal/tailwind.config.js rename to tailwind.config.js diff --git a/theme-terminal/templates/archives.html b/templates/archives.html similarity index 100% rename from theme-terminal/templates/archives.html rename to templates/archives.html diff --git a/theme-terminal/templates/assets/image/gongan.png b/templates/assets/image/gongan.png similarity index 100% rename from theme-terminal/templates/assets/image/gongan.png rename to templates/assets/image/gongan.png diff --git a/theme-terminal/templates/categories.html b/templates/categories.html similarity index 100% rename from theme-terminal/templates/categories.html rename to templates/categories.html diff --git a/theme-terminal/templates/category.html b/templates/category.html similarity index 100% rename from theme-terminal/templates/category.html rename to templates/category.html diff --git a/theme-terminal/templates/index.html b/templates/index.html similarity index 100% rename from theme-terminal/templates/index.html rename to templates/index.html diff --git a/theme-terminal/templates/links.html b/templates/links.html similarity index 100% rename from theme-terminal/templates/links.html rename to templates/links.html diff --git a/theme-terminal/templates/modules/category-tree.html b/templates/modules/category-tree.html similarity index 100% rename from theme-terminal/templates/modules/category-tree.html rename to templates/modules/category-tree.html diff --git a/theme-terminal/templates/modules/footer.html b/templates/modules/footer.html similarity index 100% rename from theme-terminal/templates/modules/footer.html rename to templates/modules/footer.html diff --git a/theme-terminal/templates/modules/header.html b/templates/modules/header.html similarity index 100% rename from theme-terminal/templates/modules/header.html rename to templates/modules/header.html diff --git a/theme-terminal/templates/modules/layout.html b/templates/modules/layout.html similarity index 100% rename from theme-terminal/templates/modules/layout.html rename to templates/modules/layout.html diff --git a/theme-terminal/templates/moments.html b/templates/moments.html similarity index 100% rename from theme-terminal/templates/moments.html rename to templates/moments.html diff --git a/theme-terminal/templates/page.html b/templates/page.html similarity index 100% rename from theme-terminal/templates/page.html rename to templates/page.html diff --git a/theme-terminal/templates/post.html b/templates/post.html similarity index 100% rename from theme-terminal/templates/post.html rename to templates/post.html diff --git a/theme-terminal/templates/tag.html b/templates/tag.html similarity index 100% rename from theme-terminal/templates/tag.html rename to templates/tag.html diff --git a/theme-terminal/templates/tags.html b/templates/tags.html similarity index 100% rename from theme-terminal/templates/tags.html rename to templates/tags.html diff --git a/theme-terminal/.editorconfig b/theme-terminal/.editorconfig deleted file mode 100644 index ebe51d3..0000000 --- a/theme-terminal/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = false -insert_final_newline = false \ No newline at end of file diff --git a/theme-terminal/.eslintrc.cjs b/theme-terminal/.eslintrc.cjs deleted file mode 100644 index 10cf6ce..0000000 --- a/theme-terminal/.eslintrc.cjs +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - root: true, - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint", "prettier"], - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "prettier", - ], - env: { - node: true, - }, -}; diff --git a/theme-terminal/src/styles/typed-text.scss b/theme-terminal/src/styles/typed-text.scss deleted file mode 100644 index 97dffaa..0000000 --- a/theme-terminal/src/styles/typed-text.scss +++ /dev/null @@ -1,15 +0,0 @@ -/* 光标样式 */ -.typed-text::after { -content: '|'; -display: inline-block; -opacity: 0; -animation: blink 0.7s infinite alternate; /* 闪烁动画 */ -vertical-align: text-bottom; -} - -/* 闪烁动画 */ -@keyframes blink { -to { - opacity: 1; -} -} \ No newline at end of file diff --git a/theme-terminal/theme.yaml b/theme.yaml similarity index 100% rename from theme-terminal/theme.yaml rename to theme.yaml diff --git a/theme-terminal/tsconfig.json b/tsconfig.json similarity index 100% rename from theme-terminal/tsconfig.json rename to tsconfig.json diff --git a/theme-terminal/vite.config.ts b/vite.config.ts similarity index 100% rename from theme-terminal/vite.config.ts rename to vite.config.ts