Skip to content

Commit

Permalink
refactor: prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed May 16, 2024
1 parent 2ce44c4 commit d3535f6
Show file tree
Hide file tree
Showing 85 changed files with 2,769 additions and 2,242 deletions.
15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body:
attributes:
label: Screenshots 屏幕截图
description: |
If applicable, add screenshots to help explain your problem. 如果可以的话, 提供屏幕截图对解决问题很有帮助.
If applicable, add screenshots to help explain your problem. 如果可以的话, 提供屏幕截图对解决问题很有帮助.
- type: textarea
id: environment
attributes:
Expand All @@ -30,7 +30,7 @@ body:
placeholder: |
- OS: [e.g. Windows 10, macOS, Ubuntu]
- Theme version/commit [e.g. 0.2.0, 2ccba79]
- Hugo version [e.g. 0.69.0]
- Hugo version [e.g. 0.69.0]
- type: textarea
id: preview
attributes:
Expand Down
32 changes: 16 additions & 16 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ description: "Suggest an idea for this project 为这个项目提供一个建议
title: "[FEATURE] Some feature"
labels: ["new feature"]
body:
- type: textarea
id: describe
attributes:
label: Describe the feature you want 描述你的功能需求
description: |
Please submit new issues for different features.
请针对不同的功能建议提交新的 issue.
placeholder: |
I recommend adding this feature.
我希望添加这样的一个功能...
- type: textarea
id: reference
attributes:
label: Useful reference 有价值的参考
description: |
If available, provide useful links to fulfill the feature. 如果可以的话, 提供实现这个功能的相关参考链接.
- type: textarea
id: describe
attributes:
label: Describe the feature you want 描述你的功能需求
description: |
Please submit new issues for different features.
请针对不同的功能建议提交新的 issue.
placeholder: |
I recommend adding this feature.
我希望添加这样的一个功能...
- type: textarea
id: reference
attributes:
label: Useful reference 有价值的参考
description: |
If available, provide useful links to fulfill the feature. 如果可以的话, 提供实现这个功能的相关参考链接.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ updates:
schedule:
interval: "daily"
open-pull-requests-limit: 1000

2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ changelog:
- bug
- title: Other Changes
labels:
- "*"
- "*"
4 changes: 2 additions & 2 deletions .github/workflows/Lighthouse-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name: Lighthouse-CI

# Controls when the action will run.
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
hugo-version: "latest"
extended: true
- name: npm install, build
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:

jobs:
Expand All @@ -26,7 +26,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: "16"

- name: Install dependencies
run: npm install
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ name: "CodeQL"
on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '45 0 * * 1'
- cron: "45 0 * * 1"

jobs:
analyze:
Expand All @@ -26,40 +26,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
hugo-version: "latest"
extended: true
- name: Checkout
uses: actions/checkout@v4
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/update-algolia-search-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,34 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
hugo-version: "latest"
extended: true

- name: Build
run: |
npm install
npm run build
npm install
npm run build
- name: Update Algolia Index (en)
env:
ALGOLIA_APP_ID: 5YGRNRQK1G
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_INDEX_NAME: 'en_index'
ALGOLIA_INDEX_FILE: './exampleSite/public/index.json'
ALGOLIA_INDEX_NAME: "en_index"
ALGOLIA_INDEX_FILE: "./exampleSite/public/index.json"
run: |
npm run algolia
- name: Update Algolia Index (zh_cn)
env:
ALGOLIA_APP_ID: 5YGRNRQK1G
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_INDEX_NAME: 'zh_cn_index'
ALGOLIA_INDEX_FILE: './exampleSite/public/zh-cn/index.json'
ALGOLIA_INDEX_NAME: "zh_cn_index"
ALGOLIA_INDEX_FILE: "./exampleSite/public/zh-cn/index.json"
run: |
npm run algolia
2 changes: 1 addition & 1 deletion .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
submodules: true
fetch-depth: 0

- uses: Hugo-DoIt/update-dependencies@v0.3.1
with:
reviewers: |
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
assets/lib
*.html
*.md
**/public
main.css
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
80 changes: 40 additions & 40 deletions assets/css/_core/_base.scss
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
html {
font-family: $global-font-family;
font-weight: $global-font-weight;
font-display: swap;
font-size: $global-font-size;
line-height: $global-line-height;
width:100%;
scroll-behavior: smooth;
overflow: overlay;
}

@media screen and (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}

::selection {
background-color: $selection-color;
}

body {
background-color: $global-background-color;
color: $global-font-color;
@include overflow-wrap(break-word);
scrollbar-color: auto;
}

@include ms;
@include link(true, true);

@import "../_partial/mask";
@import "../_partial/icon";
@import "../_partial/details";
@import "../_partial/fixed-button";
@import "../_partial/cookieconsent";

img {
object-fit: cover;
}
html {
font-family: $global-font-family;
font-weight: $global-font-weight;
font-display: swap;
font-size: $global-font-size;
line-height: $global-line-height;
width: 100%;
scroll-behavior: smooth;
overflow: overlay;
}

@media screen and (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}

::selection {
background-color: $selection-color;
}

body {
background-color: $global-background-color;
color: $global-font-color;
@include overflow-wrap(break-word);
scrollbar-color: auto;
}

@include ms;
@include link(true, true);

@import "../_partial/mask";
@import "../_partial/icon";
@import "../_partial/details";
@import "../_partial/fixed-button";
@import "../_partial/cookieconsent";

img {
object-fit: cover;
}
8 changes: 5 additions & 3 deletions assets/css/_core/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
}

#toc-auto {
left: 76%;
width: 24%;
left: 76%;
width: 24%;
}

#header-desktop .header-wrapper {
Expand Down Expand Up @@ -65,7 +65,9 @@
margin-left: auto !important;
padding-top: $header-height;

.categories-card, .author-card, .series-card {
.categories-card,
.author-card,
.series-card {
.card-item {
width: 100%;
}
Expand Down
8 changes: 4 additions & 4 deletions assets/css/_mixin/_compatibility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
}

@mixin placeholder($color) {
input::-webkit-input-placeholder{
input::-webkit-input-placeholder {
color: $color;
}

input:-moz-placeholder{
input:-moz-placeholder {
color: $color;
}

input::-moz-placeholder{
input::-moz-placeholder {
color: $color;
}

input:-ms-input-placeholder{
input:-ms-input-placeholder {
color: $color;
}

Expand Down
Loading

0 comments on commit d3535f6

Please sign in to comment.