From 0ac1e8ea243181c8faee2553ce02f4fe4d3ca572 Mon Sep 17 00:00:00 2001 From: IceOfSummer <72915970+IceOfSummer@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:02:10 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=87=8F=E8=BD=BB=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E4=BD=93=20(#44)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 减轻文章的字体 * fix: 工作流执行错误 --- .eslintrc.json | 2 +- .github/workflows/ci.yaml | 15 ++++++++------- .../PartialCodeBlock/post-content.module.scss | 1 + src/app/globals.css | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 2e1a9f5..72e9f7c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,7 @@ { "extends": ["next/core-web-vitals", "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended"], "plugins": ["@typescript-eslint"], - "ignorePatterns": ["**/*.cjs", "scripts/*.js", "**/*.mjs", "node_modules/**", ".next/**"], + "ignorePatterns": ["**/*.cjs", "scripts/*.js", "**/*.mjs", "node_modules/**", ".next/**", "out/**"], "rules": { "quotes": ["error", "single"], "key-spacing": ["error", { "beforeColon": false }], diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dfcdc73..eabd334 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,10 +39,11 @@ jobs: id: test run: npm run test && echo "success=1" >> $GITHUB_OUTPUT outputs: - lint_success: ${{ job.ci.steps.lint.success }} - test_success: ${{ job.ci.steps.test.success }} + lint_success: ${{ steps.lint.outputs.success }} + test_success: ${{ steps.test.outputs.success }} add_label_for_pr: + name: 'Add label for pull request' needs: ci if: ${{ always() && github.event_name == 'pull_request' }} runs-on: ubuntu-latest @@ -54,15 +55,15 @@ jobs: with: actions: 'remove-labels' token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} + issue-number: ${{ github.event.pull_request.number }} labels: 'ci:success,ci:test-fail,ci:lint-fail' - name: Add label uses: actions-cool/issues-helper@v3 with: actions: 'add-labels' token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} + issue-number: ${{ github.event.pull_request.number }} labels: > - ${{ needs.ci.outputs.lint_success != '0' && 'ci:lint-fail,' || '' }} - ${{ needs.ci.outputs.test_success != '0' && 'ci:test-fail,' || '' }} - ${{ needs.ci.outputs.test_success == '1' && needs.ci.outputs.lint_success == '1' && 'ci:success,' || '' }} + ${{ needs.ci.outputs.lint_success != '1' && 'ci:lint-fail,' || '' }} + ${{ needs.ci.outputs.test_success != '1' && 'ci:test-fail,' || '' }} + ${{ (needs.ci.outputs.test_success == '1' && needs.ci.outputs.lint_success == '1') && 'ci:success,' || '' }} diff --git a/src/api/markdown-parser/components/PartialCodeBlock/post-content.module.scss b/src/api/markdown-parser/components/PartialCodeBlock/post-content.module.scss index 3596107..dffa0d2 100644 --- a/src/api/markdown-parser/components/PartialCodeBlock/post-content.module.scss +++ b/src/api/markdown-parser/components/PartialCodeBlock/post-content.module.scss @@ -4,6 +4,7 @@ line-height: 2; overflow: auto; padding: 0 px2Rem(30px); + font-weight: 500; } .languageTag { diff --git a/src/app/globals.css b/src/app/globals.css index 35aa6df..0a196fa 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -77,7 +77,7 @@ body { background: var(--background-color); color: var(--color-text); - font: 500 0.9375rem Lexend, "Noto Sans SC", sans-serif; + font: normal 1rem Lexend, "Noto Sans SC", sans-serif; overflow-x: hidden; width: 100%; }