diff --git a/.github/workflows/aliyun_cdn.yml b/.github/workflows/aliyun-cdn-publish.yml similarity index 50% rename from .github/workflows/aliyun_cdn.yml rename to .github/workflows/aliyun-cdn-publish.yml index 3b22ba7a..b331f3b1 100644 --- a/.github/workflows/aliyun_cdn.yml +++ b/.github/workflows/aliyun-cdn-publish.yml @@ -1,46 +1,32 @@ -# workflow 名称,执行时的标题 name: Publish to Aliyun -# 触发条件 on: release: types: [published] - # 不清楚干嘛的,保留着 workflow_dispatch: -# 真正的任务 jobs: - # job 名称 - build: - # 运行环境 + aliyun-cdn-publish: runs-on: ubuntu-latest - # 步骤 - # 1. checkout repo steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - # 2. 配置 node + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - - # 3. OSS 脚本相关配置 - name: Setup Aliyun OSS uses: manyuanrong/setup-ossutil@master with: endpoint: ${{ secrets.ALI_ENDPOINT }} access-key-id: ${{ secrets.ALI_ACCESSKEYID }} access-key-secret: ${{ secrets.ALI_ACCESSKEYSECRET }} - - # 4. 执行 OSS 脚本,ossutil 用法 `https://help.aliyun.com/document_detail/50452.html` + - name: Upload to Aliyun OSS - # run: ossutil cp -r source/ oss://${{ secrets.ALI_BUCKET }}/projects/hexo-theme-redefine/${{ github.event.release.name }}/source/ run: | - VERSION=$(echo ${{ github.event.release.name }} | sed 's/v//') # Remove the 'v' prefix from the release name + VERSION=$(echo ${{ github.event.release.name }} | sed 's/v//') ossutil cp -r source/ oss://${{ secrets.ALI_BUCKET }}/projects/hexo-theme-redefine@$VERSION/source/ - diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 95d43567..e41d05c1 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -10,13 +10,13 @@ on: workflow_dispatch: jobs: - publish-npm: + npm-publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: '20.x' registry-url: https://registry.npmjs.org/ - run: npm publish diff --git a/.github/workflows/preview.yml b/.github/workflows/preview-deployment.yml similarity index 77% rename from .github/workflows/preview.yml rename to .github/workflows/preview-deployment.yml index 1e71c49b..772bb9e3 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview-deployment.yml @@ -9,18 +9,15 @@ on: - dev pull_request: # Trigger the workflow on pull request activities branches: - - main # Specify the target branch for PRs + - dev + - main jobs: - Deploy-Preview: + preview-deployment: runs-on: ubuntu-latest -# if: > -# github.event_name == 'workflow_dispatch' || -# (github.event_name == 'push' && github.repository == 'EvanNotFound/hexo-theme-redefine') || -# (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'EvanNotFound/hexo-theme-redefine') steps: - id: script - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const isPr = [ 'pull_request', 'pull_request_target' ].includes(context.eventName) @@ -28,14 +25,14 @@ jobs: core.setOutput('repo', isPr ? context.payload.pull_request.head.repo.full_name : context.repo.full_name) - name: Checkout theme repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: 'theme' # Checkout the theme repository into a directory named 'theme' ref: ${{ steps.script.outputs.ref }} repository: ${{ steps.script.outputs.repo }} - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '20.x' # Specify your required Node.js version @@ -43,7 +40,7 @@ jobs: run: git clone https://github.com/EvanNotFound/redefine-demo.git hexo-site - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' # Ensure compatibility with Python 3.x @@ -114,17 +111,4 @@ jobs: ALIAS_DOMAINS: | redefine-preview.vercel.app redefine-preview-git-{SHA}.vercel.app - PR_PREVIEW_DOMAIN: "redefine-preview-pr-{PR}.vercel.app" - - - # - name: Pull Vercel Environment Information - # run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - # working-directory: ${{ env.HEXO_SITE_DIR }} - - # - name: Build Project Artifacts - # run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - # working-directory: ${{ env.HEXO_SITE_DIR }} - - # - name: Deploy Project Artifacts to Vercel - # run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} - # working-directory: ${{ env.HEXO_SITE_DIR }} + PR_PREVIEW_DOMAIN: "redefine-preview-pr-{PR}.vercel.app" \ No newline at end of file diff --git a/.github/workflows/production-demo.yml b/.github/workflows/production-deployment.yml similarity index 60% rename from .github/workflows/production-demo.yml rename to .github/workflows/production-deployment.yml index 0ea06956..0ebce3dd 100644 --- a/.github/workflows/production-demo.yml +++ b/.github/workflows/production-deployment.yml @@ -9,17 +9,17 @@ on: - main jobs: - Deploy-Production: + production-deployment: runs-on: ubuntu-latest steps: - name: Checkout theme repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: 'theme' # Checkout the theme repository into a directory named 'theme' - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: '20.x' # Specify your required Node.js version @@ -42,21 +42,9 @@ jobs: npm uninstall hexo-theme-redefine npm run build - -# - name: Install Vercel CLI -# run: npm install --global vercel@canary - - name: Change directory to hexo-site run: echo "HEXO_SITE_DIR=${{ github.workspace }}/hexo-site" >> $GITHUB_ENV -# - uses: amondnet/vercel-action@v20 #deploy -# with: -# vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required -# vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} #Required -# github-token: ${{ secrets.GITHUB_TOKEN }} #Optional -# vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} #Required -# working-directory: ${{ env.HEXO_SITE_DIR }} - - name: Deploy to Vercel Action uses: EvanNotFound/vercel-deployment-for-github-actions@v1.1.0 with: @@ -69,16 +57,3 @@ jobs: PRODUCTION: true DEPLOY_PR_FROM_FORK: true PR_PREVIEW_DOMAIN: "redefine-preview-pr-{PR}.vercel.app" - - - # - name: Pull Vercel Environment Information - # run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - # working-directory: ${{ env.HEXO_SITE_DIR }} - - # - name: Build Project Artifacts - # run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - # working-directory: ${{ env.HEXO_SITE_DIR }} - - # - name: Deploy Project Artifacts to Vercel - # run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} - # working-directory: ${{ env.HEXO_SITE_DIR }} diff --git a/.github/workflows/close-issues.yml b/.github/workflows/stale-issues.yml similarity index 100% rename from .github/workflows/close-issues.yml rename to .github/workflows/stale-issues.yml diff --git a/README.md b/README.md index 22e3e445..fadae21a 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,15 @@ 繁体中文 -Redefine +Redefine # hexo-theme-redefine -The "Redefine" Hexo theme captures **simplicity, speed, and purity** without sacrificing functionality or design. With a sleek, modern look and a host of practical features, it combines beauty with utility effortlessly. +Hexo-theme-Redefine reimagines simplicity, speed, and purity, without sacrificing functionality or design. Its sleek, modern aesthetic is packed with useful features, blending style and practicality seamlessly. -Building on the solid foundation of [hexo-theme-keep](https://github.com/XPoet/hexo-theme-keep), "Redefine" enhances the style and integrates valuable writing modules and plugins. This theme invites personalization, with extensive customization options that let you tailor every detail to your liking. Your blogging journey becomes a unique, user-friendly experience, reflecting your personal style and needs. +Building on the solid foundation of hexo-theme-keep, "Redefine" elevates the style and incorporates valuable writing tools and plugins. It offers extensive customization options, allowing you to tailor every detail to your preferences. With Redefine, your blogging experience becomes unique and effortless, showcasing your personal style and needs.

diff --git a/README_zh-CN.md b/README_zh-CN.md index 510fe672..bfbbbb0c 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -4,7 +4,7 @@ 繁体中文 -Redefine +Redefine # hexo-theme-redefine @@ -90,7 +90,6 @@ theme: redefine ``` - ## ⏫ 更新 Theme Redefine 经常发布新版本,你可以通过如下命令更新 Theme Redefine。 @@ -109,7 +108,6 @@ $ git pull ``` - ## 📄 文档 请阅读 [Redefine 主题官方文档](https://redefine-docs.ohevan.com/) 进行主题配置与安装,非常简单易懂。 diff --git a/README_zh-TW.md b/README_zh-TW.md index 26906999..d5670059 100644 --- a/README_zh-TW.md +++ b/README_zh-TW.md @@ -4,7 +4,7 @@ language -Redefine +Redefine diff --git a/_config.yml b/_config.yml index e15c459b..f94de373 100755 --- a/_config.yml +++ b/_config.yml @@ -265,12 +265,12 @@ articles: link_icon: true # Whether to display link icon title_alignment: left # Title alignment. left, center headings_top_spacing: # Top spacing for headings from h1-h6 - h1: 5rem - h2: 4rem - h3: 2.8rem - h4: 2.5rem - h5: 2.2rem - h6: 2rem + h1: 3.2rem + h2: 2.4rem + h3: 1.9rem + h4: 1.6rem + h5: 1.4rem + h6: 1.3rem # Word count. Requires hexo-wordcount (npm install hexo-wordcount). See https://github.com/willin/hexo-wordcount word_count: enable: true # Whether to enable @@ -335,6 +335,7 @@ comment: emoji: [] # Waline emojis, see https://waline.js.org/guide/features/emoji.html recaptchaV3Key: wasd # Google reCAPTCHA v3 key. See https://waline.js.org/reference/client/props.html#recaptchav3key turnstileKey: # Turnstile key. See https://waline.js.org/reference/client/props.html#turnstilekey + reaction: false # Waline reaction. See https://waline.js.org/reference/client/props.html#reaction # Gitalk comment system. See https://github.com/gitalk/gitalk gitalk: clientID: # GitHub Application Client ID @@ -445,7 +446,7 @@ cdn: # Whether to enable CDN enable: false # CDN Provider - provider: aliyun # zstatic, sustech, staticfile, bootcdn, cdnjs, jsdelivr, unpkg, aliyun, custom + provider: zstatic # zstatic, sustech, staticfile, bootcdn, cdnjs, jsdelivr, unpkg, aliyun, custom # Custom CDN URL # format example: https://cdn.custom.com/hexo-theme-redefine/${version}/source/${path} # The ${path} must leads to the root of the "source" folder of the theme diff --git a/layout/_partials/comments/waline.ejs b/layout/_partials/comments/waline.ejs index a3eb2a60..b34ff513 100644 --- a/layout/_partials/comments/waline.ejs +++ b/layout/_partials/comments/waline.ejs @@ -9,6 +9,7 @@ serverURL: '<%= theme.comment.config.waline.serverUrl %>', lang: '<%= theme.comment.config.waline.lang %>', dark: 'body[class~="dark-mode"]', + reaction: <%- waline_reaction_config(theme.comment.config.waline.reaction) %>, requiredMeta: ['nick', 'mail'], emoji: [<%- theme.comment.config.waline.emoji && theme.comment.config.waline.emoji.map( (item) => `'${item}'` diff --git a/layout/_partials/footer.ejs b/layout/_partials/footer.ejs index 093f99f1..10f95d42 100755 --- a/layout/_partials/footer.ejs +++ b/layout/_partials/footer.ejs @@ -33,7 +33,7 @@ <% } %> <% if (theme.global.website_counter.enable === true) { %> - +

<% if (theme.global.website_counter.site_uv) { %> diff --git a/layout/_partials/head.ejs b/layout/_partials/head.ejs index f5140c6d..4dd92b40 100755 --- a/layout/_partials/head.ejs +++ b/layout/_partials/head.ejs @@ -87,10 +87,6 @@ <% } }%> <% } }%> - <% if (theme.global.preloader) { %> - <%- partial('_partials/preloader') %> - <% } %> - <%- css('css/style') %> <% if (theme.developer && theme.developer.enable) {%> @@ -99,8 +95,8 @@ <%- renderCSS('assets/build/styles.css') %> <% } %> - <%- renderCSS('fonts/fonts.css') %> - <%- renderCSS('fonts/Satoshi/satoshi.css') %> + <%- renderCSS('fonts/GeistMono/geist-mono.css') %> + <%- renderCSS('fonts/Geist/geist.css') %> <% if (theme.home_banner.custom_font.enable) { %> @@ -115,6 +111,9 @@ <% } %> + <% if (theme.global.preloader) { %> + <%- renderJS('js/libs/anime.min.js')%> + <% } %> <%- export_config() %> diff --git a/layout/_partials/preloader.ejs b/layout/_partials/preloader.ejs index e2698aa9..8adb276f 100644 --- a/layout/_partials/preloader.ejs +++ b/layout/_partials/preloader.ejs @@ -66,10 +66,9 @@
- <%- renderJS('js/libs/anime.min.js')%> -

+

<%= theme.info.title %> -

+
\ No newline at end of file diff --git a/layout/article-content.ejs b/layout/article-content.ejs index fa37e952..47c22675 100755 --- a/layout/article-content.ejs +++ b/layout/article-content.ejs @@ -18,11 +18,11 @@ <%= page.title %> <% } %>
"> -

<%= page.title %>

+

<%= page.title %>

<% } else { %>
"> -

<%= page.title %>

+

<%= page.title %>

<% } %>
diff --git a/layout/page.ejs b/layout/page.ejs index c8e56110..c161b4f8 100755 --- a/layout/page.ejs +++ b/layout/page.ejs @@ -1,4 +1,7 @@ <%- partial('_widgets/progress-bar') %> +<% if (theme.global.preloader) { %> + <%- partial('_partials/preloader') %> +<% } %>
<% if (theme.home_banner.enable === true && is_home() && !page.prev) { %> diff --git a/package-lock.json b/package-lock.json index 9083ace6..6668b5a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hexo-theme-redefine", - "version": "2.6.2", + "version": "2.6.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hexo-theme-redefine", - "version": "2.6.2", + "version": "2.6.3", "license": "AGPL-3.0", "dependencies": { "postcss": "^8.4.28" diff --git a/package.json b/package.json index d8f7a05a..13dc06da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-redefine", - "version": "2.6.2", + "version": "2.6.3", "private": false, "description": "Redefine your writing with Hexo Theme Redefine.", "scripts": { diff --git a/scripts/events/welcome.js b/scripts/events/welcome.js index 60ff1686..151c44d3 100644 --- a/scripts/events/welcome.js +++ b/scripts/events/welcome.js @@ -12,10 +12,11 @@ hexo.on("ready", async () => { return new Promise((resolve, reject) => { https .get( - `https://redefine-version.ohevan.com/api/info`, + `https://redefine-version.ohevan.com/api/v2/info`, { timeout: timeout }, (response) => { if (response.statusCode < 200 || response.statusCode > 299) { + logFailedInfo(); return reject( new Error( `Failed to load page, status code: ${response.statusCode}`, @@ -29,8 +30,18 @@ hexo.on("ready", async () => { response.on("end", () => { try { const jsonData = JSON.parse(data); - logInfo(jsonData); - checkVersionAndCDNAvailability(jsonData); + + if (jsonData.status !== "success") { + logFailedInfo(); + return reject( + new Error(`Failed to fetch data: ${jsonData.message}`), + ); + } + + const redefineData = jsonData.data; + + logInfo(redefineData); + checkVersionAndCDNAvailability(redefineData); resolve(); } catch (error) { logFailedInfo(); @@ -51,6 +62,9 @@ hexo.on("ready", async () => { hexo.log.warn(`Check latest version failed: ${error}`); hexo.locals.set(`cdnTestStatus_bootcdn`, 404); hexo.locals.set(`cdnTestStatus_staticfile`, 404); + hexo.locals.set(`cdnTestStatus_cdnjs`, 404); + hexo.locals.set(`cdnTestStatus_sustech`, 404); + hexo.locals.set(`cdnTestStatus_zstatic`, 404); } }); @@ -98,6 +112,30 @@ function checkVersionAndCDNAvailability(data) { ); } + if (data.zstaticCDN) { + hexo.log.info(`\x1b[32m%s\x1b[0m`, `CDN available: ZStatic (Recommended)`); + hexo.locals.set(`cdnTestStatus_zstatic`, 200); + } else { + hexo.log.warn(`\x1b[31m%s\x1b[0m`, `ZStatic CDN is unavailable yet.`); + hexo.locals.set(`cdnTestStatus_zstatic`, 404); + } + + if (data.sustechCDN) { + hexo.log.info(`\x1b[32m%s\x1b[0m`, `CDN available: SUSTech`); + hexo.locals.set(`cdnTestStatus_sustech`, 200); + } else { + hexo.log.warn(`\x1b[31m%s\x1b[0m`, `SUSTech CDN is unavailable yet.`); + hexo.locals.set(`cdnTestStatus_sustech`, 404); + } + + if (data.cdnjsCDN) { + hexo.log.info(`\x1b[32m%s\x1b[0m`, `CDN available: CDNJS`); + hexo.locals.set(`cdnTestStatus_cdnjs`, 200); + } else { + hexo.log.warn(`\x1b[31m%s\x1b[0m`, `CDNJS CDN is unavailable yet.`); + hexo.locals.set(`cdnTestStatus_cdnjs`, 404); + } + if (data.staticfileCDN) { hexo.log.info(`\x1b[32m%s\x1b[0m`, `CDN available: StaticfileCDN`); hexo.locals.set(`cdnTestStatus_staticfile`, 200); diff --git a/scripts/helpers/themeHelpers.js b/scripts/helpers/themeHelpers.js index 3a4d06b1..feb0dfe2 100755 --- a/scripts/helpers/themeHelpers.js +++ b/scripts/helpers/themeHelpers.js @@ -155,7 +155,7 @@ hexo.extend.helper.register("renderJSModule", function (path) { staticfile: "https://cdn.staticfile.net", bootcdn: "https://cdn.bootcdn.net/ajax/libs", sustech: "https://mirrors.sustech.edu.cn/cdnjs/ajax/libs", - zstatic: "https://s4.zstatic.net/ajax/libs", + zstatic: "https://s4.zstatic.net/npm", cdnjs: "https://cdnjs.cloudflare.com/ajax/libs", unpkg: "https://unpkg.com", jsdelivr: "https://cdn.jsdelivr.net/npm", @@ -216,7 +216,7 @@ hexo.extend.helper.register("renderJSPath", function (path) { staticfile: "https://cdn.staticfile.net", bootcdn: "https://cdn.bootcdn.net/ajax/libs", sustech: "https://mirrors.sustech.edu.cn/cdnjs/ajax/libs", - zstatic: "https:https://s4.zstatic.net/ajax/libs", + zstatic: "https://s4.zstatic.net/npm", cdnjs: "https://cdnjs.cloudflare.com/ajax/libs", unpkg: "https://unpkg.com", jsdelivr: "https://cdn.jsdelivr.net/npm", @@ -275,7 +275,7 @@ hexo.extend.helper.register("renderCSS", function (path) { staticfile: "https://cdn.staticfile.net", bootcdn: "https://cdn.bootcdn.net/ajax/libs", sustech: "https://mirrors.sustech.edu.cn/cdnjs/ajax/libs", - zstatic: "https://s4.zstatic.net/ajax/libs", + zstatic: "https://s4.zstatic.net/npm", cdnjs: "https://cdnjs.cloudflare.com/ajax/libs", unpkg: "https://unpkg.com", jsdelivr: "https://cdn.jsdelivr.net/npm", diff --git a/scripts/helpers/walineConfig.js b/scripts/helpers/walineConfig.js new file mode 100644 index 00000000..00e2e97a --- /dev/null +++ b/scripts/helpers/walineConfig.js @@ -0,0 +1,7 @@ +hexo.extend.helper.register('waline_reaction_config', function(reactionConfig) { + if (Array.isArray(reactionConfig) && reactionConfig.length) { + return `[${reactionConfig.map(item => `'${item}'`).join(', ')}]`; + } else { + return Boolean(reactionConfig); + } +}); \ No newline at end of file diff --git a/source/assets/build/styles.css b/source/assets/build/styles.css index 1072c160..35576a14 100644 --- a/source/assets/build/styles.css +++ b/source/assets/build/styles.css @@ -668,6 +668,16 @@ video { margin-right: 1.5rem; } +.my-0 { + margin-top: 0px; + margin-bottom: 0px; +} + +.my-0\.5 { + margin-top: 0.125rem; + margin-bottom: 0.125rem; +} + .my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; @@ -698,24 +708,6 @@ video { margin-bottom: 2rem; } -.my-0 { - margin-top: 0px; - margin-bottom: 0px; -} - -.my-0\.5 { - margin-top: 0.125rem; - margin-bottom: 0.125rem; -} - -.mb-0 { - margin-bottom: 0px; -} - -.mb-0\.5 { - margin-bottom: 0.125rem; -} - .mb-14 { margin-bottom: 3.5rem; } @@ -933,14 +925,6 @@ video { width: 100vw; } -.w-12 { - width: 3rem; -} - -.w-4 { - width: 1rem; -} - .min-w-0 { min-width: 0px; } @@ -1464,6 +1448,10 @@ video { line-height: 1; } +.tracking-tight { + letter-spacing: -0.025em; +} + .text-default-text-color { color: var(--default-text-color); } @@ -1733,16 +1721,6 @@ video { line-height: 1.75rem; } - .sm\:text-lg { - font-size: 1.125rem; - line-height: 1.75rem; - } - - .sm\:text-2xl { - font-size: 1.5rem; - line-height: 2rem; - } - .sm\:shadow-redefine { --tw-shadow: 0px 6px 24px 0px var(--shadow-color-2), 0px 0px 0px 1px var(--shadow-color-1); --tw-shadow-colored: 0px 6px 24px 0px var(--tw-shadow-color), 0px 0px 0px 1px var(--tw-shadow-color); diff --git a/source/css/common/codeblock/highlight.styl b/source/css/common/codeblock/highlight.styl index 72acf93a..72c6ecc2 100755 --- a/source/css/common/codeblock/highlight.styl +++ b/source/css/common/codeblock/highlight.styl @@ -11,10 +11,11 @@ $code-block background var(--highlight-background) pre, code + line-height 1.5 !important if (hexo-config('articles.code_block.font.enable') && hexo-config('articles.code_block.font.family')) - font-family hexo-config('articles.code_block.font.family'), 'Ubuntu Mono', Courier, monospace !important + font-family hexo-config('articles.code_block.font.family'), 'Geist Mono', Courier, monospace !important else - font-family 'Ubuntu Mono', Courier, monospace + font-family 'Geist Mono', Courier, monospace !important pre.mermaid background-color var(--background-color) @@ -24,15 +25,16 @@ pre.mermaid margin auto code - padding 4px + padding 3px 4px word-wrap break-word border-radius $redefine-border-radius-xsmall - font-size 0.96em + font-size 0.875rem !important color var(--code-foreground) background var(--code-background) pre @extend $code-block + font-size 0.9rem !important padding-top 14px !important tab-size 4 diff --git a/source/css/common/markdown.styl b/source/css/common/markdown.styl index 741e562c..16f6dd12 100755 --- a/source/css/common/markdown.styl +++ b/source/css/common/markdown.styl @@ -103,64 +103,83 @@ font-family $english-font-family, $chinese-font-family, sans-serif color var(--second-text-color) line-height $default-line-height - margin-bottom 1rem !important +redefine-tablet() line-height: $default-line-height * 0.96 h1, .h1 font-size 3.2rem - font-weight 700 + font-weight 650 border-bottom solid 2px var(--fourth-text-color) margin-top $h1-heading-margin-top + margin-bottom 1rem + letter-spacing -0.025em + line-height 1.2 +redefine-tablet() font-size 1.7rem + line-height 1.2 h2, .h2 font-size 2.5rem - font-weight 700 + font-weight 650 padding 3px 0 border-bottom solid 2px var(--fourth-text-color) margin-top $h2-heading-margin-top + margin-bottom 1rem + letter-spacing -0.025em + line-height 1.1 +redefine-tablet() font-size 1.6rem + line-height 1.1 h3, .h3 font-size 1.8rem font-weight 600 margin-top $h3-heading-margin-top + margin-bottom 0.75rem + letter-spacing -0.025em + line-height 1.3 +redefine-tablet() font-size 1.5rem + line-height 1.2 h4, .h4 font-size 1.5rem font-weight 600 margin-top $h4-heading-margin-top + margin-bottom 0.75rem + line-height 1.4 +redefine-tablet() font-size 1.4rem + line-height 1.3 h5, .h5 font-size 1.28rem font-weight 600 margin-top $h5-heading-margin-top + margin-bottom 0.5rem + line-height 1.3 +redefine-tablet() font-size 1.18rem + line-height 1.2 h6, .h6 font-size 1.2rem font-weight 600 - line-height $default-line-height margin-top $h6-heading-margin-top + margin-bottom 0.5rem + line-height 1.2 +redefine-tablet() font-size 1.1rem line-height 1.1 + img box-sizing border-box border-radius $usr-img-border-radius @@ -176,7 +195,8 @@ - & > table + & > table, + .tab-pane > table border-spacing 0 border-collapse collapse width 100% diff --git a/source/css/common/variables.styl b/source/css/common/variables.styl index 8e05b407..fc1929fa 100755 --- a/source/css/common/variables.styl +++ b/source/css/common/variables.styl @@ -31,17 +31,17 @@ $navbar-width-pages = $navbar-width-pages-data ? convert($navbar-width-pages-dat // ======================================================================================== $h1-heading-margin-top-data = hexo-config('articles.style.headings_top_spacing.h1') -$h1-heading-margin-top = $h1-heading-margin-top-data ? convert($h1-heading-margin-top-data) : 5rem +$h1-heading-margin-top = $h1-heading-margin-top-data ? convert($h1-heading-margin-top-data) : 3.2rem $h2-heading-margin-top-data = hexo-config('articles.style.headings_top_spacing.h2') -$h2-heading-margin-top = $h2-heading-margin-top-data ? convert($h2-heading-margin-top-data) : 4rem +$h2-heading-margin-top = $h2-heading-margin-top-data ? convert($h2-heading-margin-top-data) : 2.4rem $h3-heading-margin-top-data = hexo-config('articles.style.headings_top_spacing.h3') -$h3-heading-margin-top = $h3-heading-margin-top-data ? convert($h3-heading-margin-top-data) : 2.8rem +$h3-heading-margin-top = $h3-heading-margin-top-data ? convert($h3-heading-margin-top-data) : 1.9rem $h4-heading-margin-top-data = hexo-config('articles.style.headings_top_spacing.h4') -$h4-heading-margin-top = $h4-heading-margin-top-data ? convert($h4-heading-margin-top-data) : 2.5rem +$h4-heading-margin-top = $h4-heading-margin-top-data ? convert($h4-heading-margin-top-data) : 1.6rem $h5-heading-margin-top-data = hexo-config('articles.style.headings_top_spacing.h5') -$h5-heading-margin-top = $h5-heading-margin-top-data ? convert($h5-heading-margin-top-data) : 2.2rem +$h5-heading-margin-top = $h5-heading-margin-top-data ? convert($h5-heading-margin-top-data) : 1.4rem $h6-heading-margin-top-data = hexo-config('articles.style.headings_top_spacing.h6') -$h6-heading-margin-top = $h6-heading-margin-top-data ? convert($h6-heading-margin-top-data) : 2rem +$h6-heading-margin-top = $h6-heading-margin-top-data ? convert($h6-heading-margin-top-data) : 1.3rem // ======================================================================================== @@ -232,25 +232,25 @@ $home-banner-icons-container-background-color-dark = rgba(197, 197, 197, 0.3) if hexo-config('global.fonts.chinese.enable') { $temp-chinese-font-family = hexo-config('global.fonts.chinese.family') - $chinese-font-family = $temp-chinese-font-family ? $temp-chinese-font-family : 'Noto Sans SC' + $chinese-font-family = $temp-chinese-font-family ? $temp-chinese-font-family : 'PingFang SC' } else { - $chinese-font-family = 'Noto Sans SC', sans-serif + $chinese-font-family = -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif; } if hexo-config('global.fonts.english.enable') { $temp-english-font-family = hexo-config('global.fonts.english.family') - $english-font-family = $temp-english-font-family ? $temp-english-font-family : 'Satoshi-Variable' + $english-font-family = $temp-english-font-family ? $temp-english-font-family : 'Geist Variable' } else { - $english-font-family = 'Satoshi-Variable', sans-serif + $english-font-family = 'Geist Variable' } -$default-font-family = Satoshi-Variable, Noto Sans SC, -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial +$default-font-family = Geist Variable, Noto Sans SC, -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial $default-font-size = 16px $temp-default-article-font-size = hexo-config('articles.style.font_size') $temp-default-line-height = hexo-config('articles.style.line_height') $default-article-font-size = $temp-default-article-font-size ? convert($temp-default-article-font-size) : 16px $default-line-height = $temp-default-line-height ? $temp-default-line-height : 1.5 -$default-font-weight = 450 +$default-font-weight = 400 // ======================================================================================== // LIGHT/DARK MODE SWITCH diff --git a/source/css/layout/_modules/aplayer.styl b/source/css/layout/_modules/aplayer.styl index 19a7eaad..a93f37a2 100644 --- a/source/css/layout/_modules/aplayer.styl +++ b/source/css/layout/_modules/aplayer.styl @@ -5,7 +5,7 @@ $aplayer-height-lrc= $aplayer-height + $lrc-height - 6 @import '../../common/variables' .aplayer { - font-family Arial, Helvetica, sans-serif + //font-family Arial, Helvetica, sans-serif margin 5px border-radius $redefine-border-radius-medium overflow hidden diff --git a/source/css/layout/_modules/tabs.styl b/source/css/layout/_modules/tabs.styl index 7345d7f9..d479d30b 100755 --- a/source/css/layout/_modules/tabs.styl +++ b/source/css/layout/_modules/tabs.styl @@ -94,6 +94,9 @@ div.tabs &.active display block + *:last-child + margin-bottom 0 + > p, .tabs, ul, ol, .highlight, .note &:first-child margin-top 0 diff --git a/source/css/layout/_partials/archive-list.styl b/source/css/layout/_partials/archive-list.styl index 4971184e..a478be22 100755 --- a/source/css/layout/_partials/archive-list.styl +++ b/source/css/layout/_partials/archive-list.styl @@ -33,18 +33,18 @@ $article-date-font-size = 1rem &:last-child border-image var(--archive-timeline-last-child-color) - span.article-title - position relative - padding-left 15px - display block - - &::after - content "" - width 7px - height 7px - background var(--background-color) - border 2px solid var(--third-text-color) - position absolute - left 0 - top 0.5em - border-radius 50px \ No newline at end of file + span.article-title + position relative + padding-left 15px + display block + + &::after + content "" + width 7px + height 7px + background var(--background-color) + border 2px solid var(--third-text-color) + position absolute + left 0 + top 0.5em + border-radius 50px \ No newline at end of file diff --git a/source/css/layout/_partials/article-copyright-info.styl b/source/css/layout/_partials/article-copyright-info.styl index e851d010..26f168df 100755 --- a/source/css/layout/_partials/article-copyright-info.styl +++ b/source/css/layout/_partials/article-copyright-info.styl @@ -1,5 +1,5 @@ .article-copyright-info-container - font-family $english-font-family, 'Noto Sans SC', sans-serif + font-family $english-font-family, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif; position relative width 100% diff --git a/source/css/layout/_partials/comments/waline.styl b/source/css/layout/_partials/comments/waline.styl index 23ba26b1..2d00f371 100644 --- a/source/css/layout/_partials/comments/waline.styl +++ b/source/css/layout/_partials/comments/waline.styl @@ -916,7 +916,7 @@ background none color #ccc font-size 1em - font-family Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace + font-family Consolas, Monaco, 'Andale Mono', 'Geist Mono', monospace text-align left white-space pre word-spacing normal diff --git a/source/css/layout/_partials/home-banner.styl b/source/css/layout/_partials/home-banner.styl index 31e7b82d..35023c90 100755 --- a/source/css/layout/_partials/home-banner.styl +++ b/source/css/layout/_partials/home-banner.styl @@ -34,7 +34,7 @@ $home-banner-icon-size = 1.6rem p margin 0 opacity 0.9 - font-family 'Satoshi-Variable', sans-serif + font-family 'Geist Variable', sans-serif font-weight 350 i diff --git a/source/css/layout/_partials/navbar.styl b/source/css/layout/_partials/navbar.styl index 5c9b032f..132dd479 100755 --- a/source/css/layout/_partials/navbar.styl +++ b/source/css/layout/_partials/navbar.styl @@ -110,7 +110,7 @@ $logo-image-box-width = 34px // padding 5px position relative font-size 1rem - font-weight 450 + font-weight 500 cursor pointer color var(--default-text-color) diff --git a/source/css/layout/home-content.styl b/source/css/layout/home-content.styl index 7928e3f8..d0d0e3e7 100755 --- a/source/css/layout/home-content.styl +++ b/source/css/layout/home-content.styl @@ -54,7 +54,7 @@ .home-article-title position relative - font-weight 700 + font-weight 600 font-size 1.4rem line-height 1.5 color var(--second-text-color) diff --git a/source/css/layout/home-sidebar.styl b/source/css/layout/home-sidebar.styl index f2d7c9e6..8389479a 100755 --- a/source/css/layout/home-sidebar.styl +++ b/source/css/layout/home-sidebar.styl @@ -97,7 +97,7 @@ font-family $default-font-family .link-name - font-weight 450 + font-weight 500 .icon-space margin-right 5px diff --git a/source/fonts/Chillax/chillax.css b/source/fonts/Chillax/chillax.css index 2395a939..b3edf87b 100644 --- a/source/fonts/Chillax/chillax.css +++ b/source/fonts/Chillax/chillax.css @@ -24,12 +24,16 @@ */ @font-face { - font-family: 'Chillax-Variable'; - src: url('Chillax-Variable.woff2') format('woff2'), - url('Chillax-Variable.woff') format('woff'), - url('Chillax-Variable.ttf') format('truetype'); - font-weight: 200 700; - font-display: swap; - font-style: normal; + font-family: 'Chillax-Variable'; + src:local('Chillax-Variable'), + local('ChillaxVariable'), + local('Chillax Variable'), + local('Chillax'), + url('Chillax-Variable.woff2') format('woff2'), + url('Chillax-Variable.woff') format('woff'), + url('Chillax-Variable.ttf') format('truetype'); + font-weight: 200 700; + font-display: swap; + font-style: normal; } diff --git a/source/fonts/Geist/GeistVF.ttf b/source/fonts/Geist/GeistVF.ttf new file mode 100644 index 00000000..a4fcf1da Binary files /dev/null and b/source/fonts/Geist/GeistVF.ttf differ diff --git a/source/fonts/Geist/GeistVF.woff b/source/fonts/Geist/GeistVF.woff new file mode 100644 index 00000000..1b62daac Binary files /dev/null and b/source/fonts/Geist/GeistVF.woff differ diff --git a/source/fonts/Geist/GeistVF.woff2 b/source/fonts/Geist/GeistVF.woff2 new file mode 100644 index 00000000..9983e92a Binary files /dev/null and b/source/fonts/Geist/GeistVF.woff2 differ diff --git a/source/fonts/Geist/geist.css b/source/fonts/Geist/geist.css new file mode 100644 index 00000000..7e1a737d --- /dev/null +++ b/source/fonts/Geist/geist.css @@ -0,0 +1,16 @@ +/* + * Geist Variable v1.3.0 + * By Vercel + */ + +@font-face { + font-family: 'Geist Variable'; + src: local('Geist Variable'), + local('GeistVariable'), + url('GeistVF.woff2') format('woff2'), + url('GeistVF.woff') format('woff'), + url('GeistVF.ttf') format('truetype'); + font-weight: 200 700; + font-display: swap; + font-style: normal; +} diff --git a/source/fonts/GeistMono/GeistMonoVF.ttf b/source/fonts/GeistMono/GeistMonoVF.ttf new file mode 100644 index 00000000..a7df022f Binary files /dev/null and b/source/fonts/GeistMono/GeistMonoVF.ttf differ diff --git a/source/fonts/GeistMono/GeistMonoVF.woff b/source/fonts/GeistMono/GeistMonoVF.woff new file mode 100644 index 00000000..f2ae185c Binary files /dev/null and b/source/fonts/GeistMono/GeistMonoVF.woff differ diff --git a/source/fonts/GeistMono/GeistMonoVF.woff2 b/source/fonts/GeistMono/GeistMonoVF.woff2 new file mode 100644 index 00000000..fb2f024a Binary files /dev/null and b/source/fonts/GeistMono/GeistMonoVF.woff2 differ diff --git a/source/fonts/GeistMono/geist-mono.css b/source/fonts/GeistMono/geist-mono.css new file mode 100644 index 00000000..9b6c82ce --- /dev/null +++ b/source/fonts/GeistMono/geist-mono.css @@ -0,0 +1,16 @@ +/* + * Geist Mono Variable v1.3.0 + * By Vercel + */ + +@font-face { + font-display: swap; + font-family: "Geist Mono"; + font-style: normal; + font-weight: 400; + src: local('Geist Mono'), + local('GeistMono'), + url("GeistMonoVF.woff2") format("woff2"), + url("GeistMonoVF.woff") format("woff"), + url("GeistMonoVF.ttf") format("truetype"); +} diff --git a/source/fonts/Satoshi/Satoshi-Variable.eot b/source/fonts/Satoshi/Satoshi-Variable.eot deleted file mode 100644 index f42624e1..00000000 Binary files a/source/fonts/Satoshi/Satoshi-Variable.eot and /dev/null differ diff --git a/source/fonts/Satoshi/Satoshi-Variable.ttf b/source/fonts/Satoshi/Satoshi-Variable.ttf deleted file mode 100644 index 976e85cb..00000000 Binary files a/source/fonts/Satoshi/Satoshi-Variable.ttf and /dev/null differ diff --git a/source/fonts/Satoshi/Satoshi-Variable.woff b/source/fonts/Satoshi/Satoshi-Variable.woff deleted file mode 100644 index f8dcd1d6..00000000 Binary files a/source/fonts/Satoshi/Satoshi-Variable.woff and /dev/null differ diff --git a/source/fonts/Satoshi/Satoshi-Variable.woff2 b/source/fonts/Satoshi/Satoshi-Variable.woff2 deleted file mode 100644 index b00e833e..00000000 Binary files a/source/fonts/Satoshi/Satoshi-Variable.woff2 and /dev/null differ diff --git a/source/fonts/Satoshi/Satoshi-VariableItalic.eot b/source/fonts/Satoshi/Satoshi-VariableItalic.eot deleted file mode 100644 index 5f4554af..00000000 Binary files a/source/fonts/Satoshi/Satoshi-VariableItalic.eot and /dev/null differ diff --git a/source/fonts/Satoshi/Satoshi-VariableItalic.ttf b/source/fonts/Satoshi/Satoshi-VariableItalic.ttf deleted file mode 100644 index 4c2677c6..00000000 Binary files a/source/fonts/Satoshi/Satoshi-VariableItalic.ttf and /dev/null differ diff --git a/source/fonts/Satoshi/Satoshi-VariableItalic.woff b/source/fonts/Satoshi/Satoshi-VariableItalic.woff deleted file mode 100644 index 3fe029e2..00000000 Binary files a/source/fonts/Satoshi/Satoshi-VariableItalic.woff and /dev/null differ diff --git a/source/fonts/Satoshi/Satoshi-VariableItalic.woff2 b/source/fonts/Satoshi/Satoshi-VariableItalic.woff2 deleted file mode 100644 index e7ab3a09..00000000 Binary files a/source/fonts/Satoshi/Satoshi-VariableItalic.woff2 and /dev/null differ diff --git a/source/fonts/Satoshi/satoshi.css b/source/fonts/Satoshi/satoshi.css deleted file mode 100644 index 54fa5e7b..00000000 --- a/source/fonts/Satoshi/satoshi.css +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @license - * - * Font Family: Satoshi - * Designed by: Deni Anggara - * URL: https://www.fontshare.comsatoshi - * © 2023 Indian Type Foundry - * - * Font Styles: - * Satoshi Variable(Variable font) - * Satoshi Variable Italic(Variable font) - * -*/ - - -/** -* This is a variable font -* You can controll variable axes as shown below: -* font-variation-settings: 'wght' 900.0; -* -* available axes: - -* 'wght' (range from 300.0 to 900.0) - -*/ - -@font-face { - font-family: 'Satoshi-Variable'; - src: url('Satoshi-Variable.woff2') format('woff2'), - url('Satoshi-Variable.woff') format('woff'), - url('Satoshi-Variable.ttf') format('truetype'); - font-weight: 300 900; - font-display: swap; - font-style: normal; -} - - -/** -* This is a variable font -* You can controll variable axes as shown below: -* font-variation-settings: 'wght' 900.0; -* -* available axes: - -* 'wght' (range from 300.0 to 900.0) - -*/ - -@font-face { - font-family: 'Satoshi-VariableItalic'; - src: url('Satoshi-VariableItalic.woff2') format('woff2'), - url('Satoshi-VariableItalic.woff') format('woff'), - url('Satoshi-VariableItalic.ttf') format('truetype'); - font-weight: 300 900; - font-display: swap; - font-style: italic; -} - diff --git a/source/fonts/fonts.css b/source/fonts/fonts.css deleted file mode 100644 index d0daaa3d..00000000 --- a/source/fonts/fonts.css +++ /dev/null @@ -1,35 +0,0 @@ -/* noto-sans-sc-regular - chinese-simplified */ -@font-face { - font-family: "Noto Sans SC"; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local("Noto Sans SC"), - url("./noto-sans-sc-v26-chinese-simplified-regular.woff2") - format("woff2"), - /* Chrome 26+, Opera 23+, Firefox 39+ */ - url("./noto-sans-sc-v26-chinese-simplified-regular.woff") - format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} -/* noto-sans-sc-700 - chinese-simplified */ -@font-face { - font-family: "Noto Sans SC"; - font-style: normal; - font-weight: 700; - font-display: swap; - src: local("Noto Sans SC"), - url("./noto-sans-sc-v26-chinese-simplified-700.woff2") format("woff2"), - /* Chrome 26+, Opera 23+, Firefox 39+ */ - url("./noto-sans-sc-v26-chinese-simplified-700.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -/* ubuntu-mono-regular - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 400; - src: url("./ubuntu-mono-v15-latin-regular.woff2") format("woff2"), - /* Chrome 36+, Opera 23+, Firefox 39+ */ - url("./ubuntu-mono-v15-latin-regular.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} diff --git a/source/fonts/noto-sans-sc-v26-chinese-simplified-700.woff b/source/fonts/noto-sans-sc-v26-chinese-simplified-700.woff deleted file mode 100644 index e7050c50..00000000 Binary files a/source/fonts/noto-sans-sc-v26-chinese-simplified-700.woff and /dev/null differ diff --git a/source/fonts/noto-sans-sc-v26-chinese-simplified-700.woff2 b/source/fonts/noto-sans-sc-v26-chinese-simplified-700.woff2 deleted file mode 100644 index a03c53d7..00000000 Binary files a/source/fonts/noto-sans-sc-v26-chinese-simplified-700.woff2 and /dev/null differ diff --git a/source/fonts/noto-sans-sc-v26-chinese-simplified-regular.woff b/source/fonts/noto-sans-sc-v26-chinese-simplified-regular.woff deleted file mode 100644 index 861490a1..00000000 Binary files a/source/fonts/noto-sans-sc-v26-chinese-simplified-regular.woff and /dev/null differ diff --git a/source/fonts/noto-sans-sc-v26-chinese-simplified-regular.woff2 b/source/fonts/noto-sans-sc-v26-chinese-simplified-regular.woff2 deleted file mode 100644 index 04960b1e..00000000 Binary files a/source/fonts/noto-sans-sc-v26-chinese-simplified-regular.woff2 and /dev/null differ diff --git a/source/fonts/ubuntu-mono-v15-latin-regular.woff b/source/fonts/ubuntu-mono-v15-latin-regular.woff deleted file mode 100644 index 17e3f8d1..00000000 Binary files a/source/fonts/ubuntu-mono-v15-latin-regular.woff and /dev/null differ diff --git a/source/fonts/ubuntu-mono-v15-latin-regular.woff2 b/source/fonts/ubuntu-mono-v15-latin-regular.woff2 deleted file mode 100644 index 4df7d1e7..00000000 Binary files a/source/fonts/ubuntu-mono-v15-latin-regular.woff2 and /dev/null differ diff --git a/tailwind.config.js b/tailwind.config.js index aec65dbb..37bff74c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -36,14 +36,9 @@ module.exports = { xxlarge: "48px", }, fontFamily: { - chinese: ["Noto Sans SC", "sans-serif"], - english: ["Satoshi-Variable", "sans-serif"], - default: [ - "Satoshi-Variable", - "Noto Sans SC", - "system-ui", - "sans-serif", - ], + // chinese: ["Noto Sans SC", "sans-serif"], + english: ["Geist Variable", "sans-serif"], + default: ["Geist Variable", "system-ui", "sans-serif"], }, fontSize: { default: "16px", // You might want to adjust this value based on your use case