redesign 2023

This commit is contained in:
m3tam3re
2023-10-12 14:01:05 +02:00
commit 19bfc7311a
3053 changed files with 76380 additions and 0 deletions

12
themes/FixIt/.babelrc Normal file
View File

@ -0,0 +1,12 @@
{
"comments": false,
"minified": true,
"presets": [
[
"@babel/preset-env",
{
"targets": "> 0.25%, not dead"
}
]
]
}

3
themes/FixIt/.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
custom: [
"https://paypal.me/Lruihao"
]

View File

@ -0,0 +1,51 @@
name: "Bug Report 错误报告"
description: "Create a bug report 创建一个错误报告"
title: "[BUG] Some problem ..."
labels: ["bug"]
body:
- type: textarea
id: describe
attributes:
label: Describe the bug 描述你遇到的错误
description: |
A clear and concise description of what the bug is.
一段简短的对于你遇到的错误的描述。
- type: textarea
id: expected
attributes:
label: Expected behavior 期待的行为
description: |
A clear and concise description of what you expected to happen.
一段简短的对于你期待的行为的描述。
- type: textarea
id: screenshots
attributes:
label: Screenshots 屏幕截图
description: |
If applicable, add screenshots to help explain your problem.
如果可以的话,提供屏幕截图对解决问题很有帮助。
- type: textarea
id: environment
attributes:
label: Build Environment 构建环境
description: |
Please try to use Hugo **extended** version before opening the issue.
请在创建 issue 之前尝试使用 Hugo **extended** 版本。
placeholder: |
- OS: [e.g. Windows 10, macOS, Ubuntu]
- Theme version/commit [e.g. 0.2.0, 2ccba79]
- Hugo version [e.g. 0.69.0]
- type: textarea
id: preview
attributes:
label: Preview Environment 预览环境
placeholder: |
- OS: [e.g. Windows 10, macOS, Ubuntu, iOS, Android]
- Browser [e.g. Chrome, Safari, Firefox]
- type: textarea
id: additional
attributes:
label: Additional Information 补充信息
description: |
Configuration files or front matter code ...
配置文件或者前置参数的代码……

View File

@ -0,0 +1,13 @@
blank_issues_enabled: false
contact_links:
- name: Questions 问题讨论
url: https://github.com/hugo-fixit/FixIt/discussions/new
about: Please ask questions in Discussion. 请在讨论中提问。
- name: 官方 QQ 群
url: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
about: '加入 FixIt 主题交流群: 814031017'
- name: Theme Documentation 主题文档
url: https://fixit.lruihao.cn/categories/documentation/
about: Please read the documentation carefully. 请先仔细阅读主题文档。

View File

@ -0,0 +1,22 @@
name: "Feature request 功能请求"
description: "Suggest an idea for this project 为这个项目提供一个建议"
title: "[FEATURE] Some feature"
labels: ["enhancement"]
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.
如果可以的话,提供实现这个功能的相关参考链接。

View File

@ -0,0 +1,27 @@
# Set to true to add reviewers to PRs
addReviewers: true
# Set to 'author' to add PR's author as a assignee
addAssignees: author
# A list of reviewers to be added to PRs (GitHub user name)
reviewers:
- Lruihao
# A number of reviewers added to the PR
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 1
# A list of assignees, overrides reviewers if set
assignees:
- Lruihao
# A number of assignees to add to the PRs
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
numberOfAssignees: 0
# A list of keywords to be skipped the process if PR's title include it
skipKeywords:
- wip
- deps-dev

View File

@ -0,0 +1,5 @@
name: "CodeQL config"
paths-ignore:
- assets/lib/**
- docs/**

34
themes/FixIt/.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,34 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
open-pull-requests-limit: 1000
assignees:
- "Lruihao"
labels:
- "dependencies"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 1000
assignees:
- "Lruihao"
labels:
- "dependencies"
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 1000
assignees:
- "Lruihao"
labels:
- "dependencies"

View File

@ -0,0 +1,48 @@
name: Update Algolia Search Index
on:
push:
branches:
- master
paths:
- "docs"
workflow_dispatch:
jobs:
algolia-atomic:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build
run: |
npm install
npm run build
- name: Update Algolia Index (en)
env:
ALGOLIA_APP_ID: YKOM6PKLUY
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_INDEX_NAME: "index.en"
ALGOLIA_INDEX_FILE: "./docs/public/index.json"
run: |
npm run algolia
- name: Update Algolia Index (zh-cn)
env:
ALGOLIA_APP_ID: YKOM6PKLUY
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_INDEX_NAME: "index.zh-cn"
ALGOLIA_INDEX_FILE: "./docs/public/zh-cn/index.json"
run: |
npm run algolia

View File

@ -0,0 +1,14 @@
name: Auto Assign
on:
issues:
types: [opened]
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/auto-assign@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: .github/configs/auto-assign.yml

View File

@ -0,0 +1,21 @@
name: Hugo build check
on:
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
Actions-Hugo-Check:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
extended: true
- name: Build Hugo static files
run: hugo -v --source=docs --gc --minify

View File

@ -0,0 +1,72 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "30 18 * * 5"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
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: Check out repository code
uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/configs/codeql.yml
# 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@v2
# 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
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@ -0,0 +1,27 @@
name: Generate Contribute List
on:
push:
branches:
- master
workflow_dispatch:
jobs:
contrib-readme-job:
runs-on: ubuntu-latest
name: A job to automate contribute list in contributors.md file
steps:
- name: First Contribution Check
id: first-check
uses: sukki37/first-contribution-check-action@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }}
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@master
if: ${{ steps.first-check.outputs.isNewContributor == 'true' }}
with:
readme_path: "contributors.md"
image_size: 100
commit_message: ":busts_in_silhouette: Chore(contributor): contrib-readme-action has updated contributors.md"
committer_username: "github-actions[bot]"
committer_email: "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }}

28
themes/FixIt/.gitignore vendored Normal file
View File

@ -0,0 +1,28 @@
# Hugo default output directory
public/
resources/
# Hugo
.hugo_build.lock
jsconfig.json
# NPM
node_modules/
# VSCode
.vscode
# OS Files
## Windows
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
## OSX
.DS_Store
## Linux
.directory

3
themes/FixIt/.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "docs"]
path = docs
url = https://github.com/hugo-fixit/docs.git

2
themes/FixIt/.npmrc Normal file
View File

@ -0,0 +1,2 @@
tag-version-prefix="v"
message=":bookmark: Chore(release): %s"

330
themes/FixIt/CHANGELOG.md Normal file
View File

@ -0,0 +1,330 @@
# Changelog
All notable changes to this project will be documented in this file.
<!-- Releases see https://github.com/hugo-fixit/FixIt/releases -->
## v0.2.18-lts
- :sparkles: Feat: add code block attributes support ([#330](https://github.com/hugo-fixit/FixIt/issues/330))
## v0.2.18 [2023.3.31]
> **Note**
> This will be the last relatively stable 0.x release, after which the first major release will be incompatible with all previous 0.x releases
> Snapshot: <>
## :boom: Breaking Updates
- Refactor author data config [#288](https://github.com/hugo-fixit/FixIt/pull/288)
## :new: What's New
- :tada: Feat: add natively support mermaid with code fences ([#230](https://github.com/hugo-fixit/FixIt/issues/230))
- :tada: Feat: add breadcrumb navigation ([#309](https://github.com/hugo-fixit/FixIt/pull/309))
- :sparkles: Feat: add instant page (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279))
- :sparkles: Feat: add `force` option value to `params.page.lightgallery`
- :sparkles: Feat: add loop parameter for typeit ([#303](https://github.com/hugo-fixit/FixIt/pull/303))
- :sparkles: Feat: add paramater strict for giscus comment
- :bug: Fix: donate images without lazy loading (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279))
- :bug: Fix: discordinvite typo (@mathieu-gilloots [#282](https://github.com/hugo-fixit/FixIt/pull/282))
- :bug: Fix: missing parameter `requiredFields` for Valine
- :bug: Fix: js.build is executed after fingerprint, resulting in the destruction of js integrity
- :bug: Fix: toc fails when the toc aside is on the left
- :bug: Fix: APlayer invades the click event of the anchor links, resulting in invalid Chinese anchor links scrolling ([#292](https://github.com/hugo-fixit/FixIt/issues/292))
- :bug: Fix: resolve style conflicts between valine and animate.css ([#304](https://github.com/hugo-fixit/FixIt/issues/304))
- :bug: Fix: version `v0.2.17` is not compatible with previous versions
- :bug: Fix: `crypto-js/md5.js` and `crypto-js/sha256.js` cdn path error
- :bug: Fix: HackTheBox social link not in the right format ([#308](https://github.com/hugo-fixit/FixIt/issues/308))
- :recycle: Refactor: image lazy loading ([#283](https://github.com/hugo-fixit/FixIt/pull/283))
- :recycle: Refactor: author's avatar of post or profile ([#288](https://github.com/hugo-fixit/FixIt/pull/288))
- :recycle: Refactor: language switch in desktop header ([#306](https://github.com/hugo-fixit/FixIt/pull/306))
- :recycle: Refactor(reward): add parameter `mode` for post reward and refactor shortcode `reward`
- :wheelchair: Feat: add post update date to post meta ([#285](https://github.com/hugo-fixit/FixIt/issues/285))
- :art: Style: fix `#comments` css style conflict ([#269](https://github.com/hugo-fixit/FixIt/issues/269))
- :art: Style: adjust the mobile header style and fix the bug that scrolling is invalid when there are too many menus on mobile ([#289](https://github.com/hugo-fixit/FixIt/issues/289))
- :art: Perf: optimize the scroll bar style of body and toc-auto elements
- :memo: Docs: refactor the theme documentation
- :wrench: Chore: change the theme minimum supported Hugo versions above **0.109.0**
- :arrow_up: Chore(libs):
- Update Update @waline/client from 2.10.0 to 2.14.7 (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279))
- Update typeit from 8.7.0 to 8.7.1
- Update mermaid from 9.1.7 to 9.4.3
- Update Artalk from 2.3.4 to 2.5.2
- **Full Changelog:** @Lruihao [`v0.2.17...v0.2.18`](https://github.com/hugo-fixit/FixIt/compare/v0.2.17...v0.2.18)
## v0.2.17 [2023.1.29]
> Snapshot: <https://fixit-pcwilecsu-x-cell.vercel.app>
- :tada: Feat: add support for [Fusejs search](https://fusejs.io/) ([#203](https://github.com/hugo-fixit/FixIt/issues/203))
- :sparkles: Feat: add feature post reward support ([#216](https://github.com/hugo-fixit/FixIt/issues/216), @Lruihao[#234](https://github.com/hugo-fixit/FixIt/pull/234))
- :sparkles: Feat: add reward shortcode support ([#216](https://github.com/hugo-fixit/FixIt/issues/216))
- :sparkles: Feat: add TagCloud config support for tags page, see parameter `params.tagcloud` ([#235](https://github.com/hugo-fixit/FixIt/issues/235))
- :sparkles: Feat: add [pace](https://github.com/CodeByZach/pace) support ([#190](https://github.com/hugo-fixit/FixIt/issues/190))
- :sparkles: Feat: add custom templates and parameter `params.customFilePath` support
- :sparkles: Feat: add feature end of post flag support ([#236](https://github.com/hugo-fixit/FixIt/issues/236))
- :sparkles: Feat: refactor parameter `params.footer.siteTime`
- :sparkles: Feat: add params to close wordcount and readingTime in post ([#209](https://github.com/hugo-fixit/FixIt/issues/209))
- :sparkles: Feat: add parameter `params.footer.order` to order footer lines
- :sparkles: Feat: add parameter `params.home.profile.avatarMenu`
- :truck: Feat: migrate parameter `params.autoBookmark` to `params.page.autoBookmark` ([#55](https://github.com/hugo-fixit/FixIt/issues/55))
- :truck: Feat: move `assets/data/emoji` to `assets/lib/valine/emoji/`
- :zap: Perf: optimize close comment feature when the post has expired ([#204](https://github.com/hugo-fixit/FixIt/issues/204))
- :zap: Perf: optimize sub menu position calculation in desktop header with css replace of javascript
- :zap: Perf: enhance pangu spelling correction
- :bug: Fix: remove the leading and trailing whitespace of the code string ([#205](https://github.com/hugo-fixit/FixIt/issues/205))
- :bento: Fix: update webfonts for fontawesome 6.2.0 (@NicoDreamzZ [#228](https://github.com/hugo-fixit/FixIt/pull/228))
- :bug: Fix: image shortcode/plugin lose the support for svg type files ([#210](https://github.com/hugo-fixit/FixIt/issues/210))
- :bug: Fix: can't keep the static table of the contents in front of the post
- :bug: Fix: escape hashtag character `#` in tag and category ([#245](https://github.com/hugo-fixit/FixIt/issues/245))
- :bug: Fix: pangu.js cdn error
- :bug: Fix: sitemap.xml link in robots.txt doesn't point to main sitemap (@Mejituu [#276](https://github.com/hugo-fixit/FixIt/pull/276))
- :recycle: Refactor(i18n): hierarchize translation fields for supported languages
- :globe_with_meridians: Docs(i18n): add missing translations for French + enhancements (@Kapusch [#247](https://github.com/hugo-fixit/FixIt/pull/247))
- :lipstick: Style: refactor css style
- :lipstick: Style: update home page stylesheet
- :arrow_up: Chore(libs):
- Update Twikoo from 1.4.10 to 1.6.8 and add Katex support for it ([#215](https://github.com/hugo-fixit/FixIt/issues/215) [#243](https://github.com/hugo-fixit/FixIt/issues/243))
- :wrench: Chore(deps-dev):
- Bump @babel/cli from 7.18.10 to 7.20.7
- Bump @babel/core from 7.19.1 to 7.20.12
- Bump @babel/preset-env from 7.18.10 to 7.20.2
- Bump core-js from 3.25.2 to 3.27.2
- :wrench: Chore(deps-dev):
- Bump @babel/cli from 7.20.7 to 7.17.10
- Bump @babel/core from 7.20.12 to 7.21.4
- Bump @babel/preset-env from 7.20.2 to 7.21.4
- Bump core-js from 3.27.2 to 3.29.1
- **Full Changelog:** @Lruihao [`v0.2.16...v0.2.17`](https://github.com/hugo-fixit/FixIt/compare/v0.2.16...v0.2.17)
## v0.2.16 [2022.9.24]
> This version fixes several bugs, adds a few new features and SEO optimizations, and refactors part of the project structure and code.
> Snapshot: <https://fixit-jir7e7kzt-x-cell.vercel.app>
- :tada: Feat: add reading progress bar support ([#191](https://github.com/hugo-fixit/FixIt/issues/191))
- :tada: Feat: add b2t scroll percent support ([#192](https://github.com/hugo-fixit/FixIt/issues/192))
- :sparkles: Feat: add auto bookmark support ([#55](https://github.com/hugo-fixit/FixIt/issues/55))
- :sparkles: Feat: add `raw` shortcode
- :sparkles: Feat(menu): add params: `icon`, `type` for menu items
- :sparkles: Feat: add custom aside template in post page ([#172](https://github.com/hugo-fixit/FixIt/issues/172))
- :sparkles: Feat(math): add more block delimiter support for math
- :sparkles: Feat(highlight): add full support for Chroma highlighting languages in the [list](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages)
- :sparkles: Feat: add optional parameter `noreferrer` for the shortcode `link`
- :sparkles: Feat: update echarts theme config
- :sparkles: Feat: add noscript warning banner ([#194](https://github.com/hugo-fixit/FixIt/issues/194))
- :sparkles: Feat: add 12 newly supported social links ([#175](https://github.com/hugo-fixit/FixIt/issues/175) [#197](https://github.com/hugo-fixit/FixIt/issues/197))
- :zap: Perf: remove extra spaces in plugin link
- :wheelchair: Feat(accessibility): use `aria-hidden=true` on icons that AT should ignore
- :recycle: Refactor: image rendering
- :recycle: Refactor: back to top and scroll to comments
- :recycle: Refactor: custom.js rendering and remove `params.customJS` ([#189](https://github.com/hugo-fixit/FixIt/pull/189))
- :recycle: Refactor: scss directory ([#185](https://github.com/hugo-fixit/FixIt/issues/185))
- :recycle: Refactor: plugin script
- :recycle: Refactor: version.template.svg
- :recycle: Refactor: config ([#187](https://github.com/hugo-fixit/FixIt/issues/187))
- :bug: Fix: add function `dos2unix` to unify new lines symbol between Windows and Unix/Mac OS
- :bug: Fix: author display error in post and markdown file
- :bug: Fix: use data attributes or class replace for custom attributes
- :bug: Fix: attribute `media` not allowed on element meta in `[name=theme-color]`
- :bug: Fix: support smooth migration from LoveIt to FixIt ([#174](https://github.com/hugo-fixit/FixIt/discussions/174) [#182](https://github.com/hugo-fixit/FixIt/issues/182))
- :bug: Fix: `center-quote` shortcode rendering error when config `unsafe = false` (@yureiita [#160](https://github.com/hugo-fixit/FixIt/pull/160))
- :bug: Fix: menu item invalid params `draft` in submenu
- :bug: Fix: missing height and weight of img element and lazyload object-fit style
- :bug: Fix: image shortcode invalid params `height` and `weight` ([#200](https://github.com/hugo-fixit/FixIt/issues/200))
- :bug: Fix: typeit shortcode invalid config `duration = -1` and fix style
- :bug: Fix: typeit shortcode prints consecutive spaces and newline errors
- :art: Style: change the default icons of some social links
- :bug: Fix: component `paginator` style error ([#188](https://github.com/hugo-fixit/FixIt/issues/188))
- :lipstick: Style: fix language and theme switch cursor style ([#193](https://github.com/hugo-fixit/FixIt/issues/193))
- :lipstick: Style: change line-break style of code element from `anywhere` to `auto`
- :globe_with_meridians: Docs(i18n): update pt-br, de in i18n
- :mag: Perf(SEO): enhance SEO performance
- :wrench: Chore: modify babel config and optimize theme.js compilation and loading (revert [`65371a1`](https://github.com/hugo-fixit/FixIt/commit/65371a19a40591c3f403f7fde2b7001c3390354d))
- :wrench: Chore: creating new go.mod: module github.com/hugo-fixit/FixIt
- :arrow_up: Chore(libs):
- Update simple-icons from 6.3.0 to 7.12.0
- Update emoji-data from 5.0.1 to 14.0.0
- Update mermaid from 9.1.3 to 9.1.7
- Update typeit from 7.0.4 to 8.7.0
- Update lightgallery from 1.4.0 to 2.6.1
- Update Valine from 1.5.0 to 1.5.1
- Update @waline/client from 2.6.1 to 2.10.0
- Update mapbox-gl from 2.8.2 to 2.10.0
- Update fontawesome-free from 6.1.1 to 6.2.0
- Update katex from 0.15.3 to 0.16.2
- Update echarts from 5.2.2 to 5.3.3
- Update algoliasearch from 4.13.0 to 4.14.2
- :wrench: Chore(deps-dev):
- Remove dependencies: minimist, babel-preset-minify
- Bump core-js from 3.24.1 to 3.25.2 (@dependabot [#201](https://github.com/hugo-fixit/FixIt/pull/201))
- Bump @babel/core from 7.18.10 to 7.19.1 (@dependabot [#202](https://github.com/hugo-fixit/FixIt/pull/202))
- **Full Changelog:** @Lruihao [`v0.2.15...v0.2.16`](https://github.com/hugo-fixit/FixIt/compare/v0.2.15...v0.2.16)
## v0.2.15 [2022.8.4]
> Add content encryption feature(pages, partial), total word count, enhance auto toc, developer options and more.
> Snapshot: <https://fixit-hvd1rg4ba-x-cell.vercel.app>
- :truck: Feat: ransfer repository from Lruihao to hugo-fixit
- :tada: Feat: add content encryption of pages ([#123](https://github.com/hugo-fixit/FixIt/issues/123))
- :tada: Feat: add `fixit-encryptor` shortcode ([#123](https://github.com/hugo-fixit/FixIt/issues/123))
- :sparkles: Feat: add total word count feature in section and remove from footer ([#124](https://github.com/hugo-fixit/FixIt/issues/124))
- :sparkles: Feat: enhance auto toc feature ([#104](https://github.com/hugo-fixit/FixIt/issues/104) [#136](https://github.com/hugo-fixit/FixIt/issues/136))
- :sparkles: Feat: add repost feature ([#156](https://github.com/hugo-fixit/FixIt/issues/156))
- :sparkles: Feat: add developer options
- Check for updates option
- Mobile Devtools config ([#163](https://github.com/hugo-fixit/FixIt/pull/163))
- :bug: Fix: unable to show search bar of header at mobile mode ([#143](https://github.com/hugo-fixit/FixIt/issues/143))
- :bug: Fix: Giscus comment invalid config `inputPosition`
- :bug: Fix: Waline comment invalid config `imageUploader = false` & `highlighter = false` (@yureiita [#161](https://github.com/hugo-fixit/FixIt/pull/161))
- :bug: Fix: busuanzi logic error
- :bug: Fix: close comment system logic error when the article was expired
- :bug: Style: fix typos for rel attribute value noreferrer (@yureiita [#157](https://github.com/hugo-fixit/FixIt/pull/157))
- :recycle: Refactor: migrate theme js from src to assets by js.build
- :recycle: Refactor: change the post edit url splicing rules
- :mag: Feat(SEO): add options to make output `baidu_urls.txt` file ([#138](https://github.com/hugo-fixit/FixIt/issues/138))
- :truck: Feat: migrate exampleSite to docs submodule
- :art: Style: add theme colors variables and add common color styles
- :art: Style: add scroll bar for auto toc ([#136](https://github.com/hugo-fixit/FixIt/issues/136))
- :art: Style: change the version badge style form flat-square to flat
- :memo: Docs: revise theme documentations
- :heavy_plus_sign: Feat: add theme core configuration settings file
- :wrench: Feat(cdn): add unpkg cdn support
- :wrench: Chore: change the theme minimum supported Hugo versions above **0.84.0**
- :arrow_up: Chore(libs): update some third-party libraries
- Update Artalk from 2.2.12 to 2.3.4 ([#150](https://github.com/hugo-fixit/FixIt/issues/150))
- Update Waline from 1.5.2 to 2.6.1
- Update Valine from 1.4.18 to 1.5.0
- Update mermaid from 8.13.3 to 9.1.3
- :arrow_up: Chore(deps-dev):
- Bump babel-preset-minify from 0.5.1 to 0.5.2 ([#145](https://github.com/hugo-fixit/FixIt/pull/145))
- Bump core-js from 3.22.0 to 3.24.1 ([#168](https://github.com/hugo-fixit/FixIt/pull/168))
- Bump @babel/preset-env from 7.16.11 to 7.18.10 ([#169](https://github.com/hugo-fixit/FixIt/pull/169))
- Bump @babel/cli from 7.17.6 to 7.18.10 ([#170](https://github.com/hugo-fixit/FixIt/pull/170))
- Bump @babel/core from 7.17.9 to 7.18.10 ([#171](https://github.com/hugo-fixit/FixIt/pull/171))
- **Full Changelog:** @Lruihao [`v0.2.14...v0.2.15`](https://github.com/hugo-fixit/FixIt/compare/v0.2.14...v0.2.15)
## v0.2.14 [2022.5.15]
> Add hugo new features support.
> Snapshot: <https://fixit-p1tg6tsml-lruihao.vercel.app>
- :recycle: Refactor: header layout
- :tada: Feat: add sub menu (nested menu) support ([#31](https://github.com/hugo-fixit/FixIt/issues/31))
- :sparkles: Feat: add user-defined content to menu items via the `params` field ([#99](https://github.com/hugo-fixit/FixIt/issues/99))
- :sparkles: Feat: modified language selector to submenu (@pandaoh [`eced169`](https://github.com/hugo-fixit/FixIt/commit/eced169713ce4a0208ce70ab556824e47eb671d5), @Lruihao [#31](https://github.com/hugo-fixit/FixIt/issues/31))
- :bug: Fix: add "no more translations" judgment logic ([#100](https://github.com/hugo-fixit/FixIt/issues/100))
- :bug: Fix: fix some header css bug ([#31](https://github.com/hugo-fixit/FixIt/issues/31))
- :sparkles: Feat: enhance link render ([#96](https://github.com/hugo-fixit/FixIt/issues/96))
- Add external icon for external links automatically
- Add download icon for downloadable links
- :sparkles: Feat: add giscus comment system ([#130](https://github.com/hugo-fixit/FixIt/issues/130))
- :sparkles: Feat: link shortcode add `external-icon` option ([#96](https://github.com/hugo-fixit/FixIt/issues/96))
- :sparkles: Feat: add GitHub Corners support ([#106](https://github.com/hugo-fixit/FixIt/issues/106))
- :sparkles: Feat: add local avatar and gravatar support for post author ([#125](https://github.com/hugo-fixit/FixIt/issues/125))
- :sparkles: Feat: add ~~total word count support in footer~~ ([#124](https://github.com/hugo-fixit/FixIt/issues/124))
- :sparkles: Feat: add "Edit this page" button support ([#103](https://github.com/hugo-fixit/FixIt/issues/103))
- :sparkles: Feat: add count badge for taxonomy ([#122](https://github.com/hugo-fixit/FixIt/issues/122))
- :zap: Perf: add Gravatar config support
- :bug: Fix: invalid front matter `comment: true` ([#108](https://github.com/hugo-fixit/FixIt/issues/108))
- :bug: Fix: ibruce and watermark option negative value error ([#114](https://github.com/hugo-fixit/FixIt/issues/114))
- :truck: Feat: *migrate ~~`home.profile.gravatarSite`~~ to `gravatar.host`*
- :truck: Feat: *migrate ~~`ibruce.siteTime`~~ to `footer.siteTime`*
- :lipstick: Style: add some common CSS styles Class ([#101](https://github.com/hugo-fixit/FixIt/issues/101))
- :lipstick: Style: add the gap between and icon and text at blending typesetting (@ctj12461 @Lruihao [#118](https://github.com/hugo-fixit/FixIt/pull/118))
- :lipstick: Style: modify blockquote CSS
- :memo: Docs: revise theme documentations
- :zap: Perf: remove third-party library clipboard.js ([#84](https://github.com/hugo-fixit/FixIt/issues/84))
- :pencil2: Docs: fix highlight url typo in `theme-documentation-built-in-shortcodes` (@d-baer [#85](https://github.com/hugo-fixit/FixIt/pull/85))
- :wrench: Chore(i18n): improve translations for the supported languages ([#119](https://github.com/hugo-fixit/FixIt/issues/119))
- :wrench: Chore(i18n): add i18n support for console messages
- :wrench: Chore: add deprecated parameter detection in cli
- :arrow_up: Chore: update some third-party libraries
- :wrench: Chore(deps-dev):
- Bump minimist from 1.2.5 to 1.2.6 ([#92](https://github.com/hugo-fixit/FixIt/pull/92))
- Bump @babel/core from 7.17.5 to 7.17.10 ([#126](https://github.com/hugo-fixit/FixIt/pull/126))
- Bump core-js from 3.21.1 to 3.22.5 ([#129](https://github.com/hugo-fixit/FixIt/pull/129))
- Bump @babel/cli from 7.17.6 to 7.17.10 ([#127](https://github.com/hugo-fixit/FixIt/pull/127))
- Bump @babel/preset-env from 7.16.11 to 7.17.10 ([`bc74d14`](https://github.com/hugo-fixit/FixIt/commit/bc74d149c16b36644fecdd5bef325bf8087f8593))
- **Full Changelog:** @Lruihao [`v0.2.13...v0.2.14`](https://github.com/hugo-fixit/FixIt/compare/v0.2.13...v0.2.14)
## v0.2.13 [2022.3.14]
> Improve and add some new features.
> Snapshot: <https://fixit-bbh5g5x90-lruihao.vercel.app>
- :recycle: Refactor: page layout ([#65](https://github.com/hugo-fixit/FixIt/issues/65))
- :tada: Feat: add Artalk comment support ([#54](https://github.com/hugo-fixit/FixIt/issues/54), @hiifong [#57](https://github.com/hugo-fixit/FixIt/pull/57))
- :tada: Feat: add Waline comment support ([#36](https://github.com/hugo-fixit/FixIt/issues/36))
- :tada: Feat: add Twikoo comment support ([#64](https://github.com/hugo-fixit/FixIt/issues/64))
- :sparkles: Feat: add recently updated section ([#50](https://github.com/hugo-fixit/FixIt/issues/50))
- :sparkles: Feat: add article expiration reminder support ([#51](https://github.com/hugo-fixit/FixIt/issues/51))
- :sparkles: Feat: add pageStyle option ([#62](https://github.com/hugo-fixit/FixIt/issues/62))
- :sparkles: Style: add media style for print view ([#61](https://github.com/hugo-fixit/FixIt/issues/61))
- :sparkles: Feat: add Gravatar mirror site support (@ctj12461 [#66](https://github.com/hugo-fixit/FixIt/pull/66))
- :sparkles: Feat: add archive count display ([#33](https://github.com/hugo-fixit/FixIt/issues/33))
- :sparkles: Feat: add `details` shortcode ([#68](https://github.com/hugo-fixit/FixIt/issues/68))
- :sparkles: Feat: add `center-quote` shortcode ([#69](https://github.com/hugo-fixit/FixIt/issues/69))
- :sparkles: Feat: add markdown support for **title** parameter of the admonition shortcode
- :sparkles: Feat: add 9 newly supported social links ([#17](https://github.com/hugo-fixit/FixIt/issues/17))
- :zap: Perf: enhance highlight feature (GitHub syntax supported) and fix some css bugs ([#43](https://github.com/hugo-fixit/FixIt/issues/43))
- Inline Code
- Indented Code
- Block Fenced Code
- gist shortcode
- :sparkles: Feat: add `params.page.code.edit` option support ([#76](https://github.com/hugo-fixit/FixIt/issues/76))
- :mag: Feat: add 360 and sougou seo support
- :bug: Fix: remove source map of local libraries to avoid 404 error ([#67](https://github.com/hugo-fixit/FixIt/issues/67))
- :fire: Feat: remove shortcode cardlink ([#42](https://github.com/hugo-fixit/FixIt/issues/42))
- :lipstick: Style: more refined theme style ([#40](https://github.com/hugo-fixit/FixIt/issues/40))
- :pencil2: Style: fix typo *discription* should be **description** ([#60](https://github.com/hugo-fixit/FixIt/issues/60))
- :wrench: Chore(update-libs):
- Update cell-watermark 1.0.3 and CDN support (fontFamily supported)
- Update animate.css 3.7.2 -> 4.1.1 ([#74](https://github.com/hugo-fixit/FixIt/issues/74))
- :wrench: Chore: add atomic-algolia for exampleSite ([#70](https://github.com/hugo-fixit/FixIt/issues/70))
- **Full Changelog:** @Lruihao [`v0.2.12...v0.2.13`](https://github.com/hugo-fixit/FixIt/compare/v0.2.12...v0.2.13)
## v0.2.12 [2022-1-27]
> Fix most known bugs and add some new features.
> Snapshot: <https://fixit-e9lpwfkbp-lruihao.vercel.app>
- :tada: Feat: add PWA support
- :tada: Feat: add Watermark support ([#16](https://github.com/hugo-fixit/FixIt/issues/16))
- :tada: Feat: add "不蒜子" count and site run time ([#18](https://github.com/hugo-fixit/FixIt/issues/18))
- :sparkles: Feat: add pangu.js support ([#20](https://github.com/hugo-fixit/FixIt/issues/20))
- :sparkles: Feat: add public network security config (only in China) ([#15](https://github.com/hugo-fixit/FixIt/issues/15))
- :sparkles: Feat: add CustomJS option ([#24](https://github.com/hugo-fixit/FixIt/issues/24))
- :sparkles: Feat: add theme embedded archeTypes
- :mag: Feat(SEO): optimize SEO meta ([#30](https://github.com/hugo-fixit/FixIt/issues/30))
- :zap: Feat: remove lib smooth-scroll ([#1](https://github.com/hugo-fixit/FixIt/issues/1)) replaced by CSS native properties scroll-margin, scroll-behavior ([#39](https://github.com/hugo-fixit/FixIt/issues/39))
- :zap: Perf: merge shortcode cardlink (deprecated v0.2.13) into shortcode link and add 'download' param ([#42](https://github.com/hugo-fixit/FixIt/issues/42))
- :zap: Perf: optimize JS loading ([#25](https://github.com/hugo-fixit/FixIt/issues/25))
- :recycle: Refactor: header title DOM and add subtitle option ([#26](https://github.com/hugo-fixit/FixIt/issues/26))
- :bug: Fix: set mermaid theme as 'default' when initialization ([#38](https://github.com/hugo-fixit/FixIt/issues/38))
- :bug: Fix: typeit print code error ([#19](https://github.com/hugo-fixit/FixIt/issues/19))
- :bug: Fix: pre element overflow error ([#29](https://github.com/hugo-fixit/FixIt/issues/29))
- :bug: Fix: toc display error without content header ([#21](https://github.com/hugo-fixit/FixIt/issues/21))
- :lipstick: Style: style detail adjustments, change scroll-behavior to smooth, taxonomy, header, footer, shortcode style etc.
- :pencil: Docs: improve demo site documentation ([#37](https://github.com/hugo-fixit/FixIt/issues/37))
- :wrench: Chore: add commands `fixit_checker.sh`
- :wrench: Chore(i18n): change some translations
- :arrow_up: Chore: update all third-party libraries
- **Full Changelog:** @Lruihao [`v0.2.11...v0.2.12`](https://github.com/hugo-fixit/FixIt/compare/v0.2.11...v0.2.12)
## v0.2.11 [2021-12-19]
> :tada: The beginning of FixIt to fix the theme LoveIt.
- :sparkles: Feat: add cardlink shortcode ([Lruihao/hugo-blog@`df9eca2`](https://github.com/Lruihao/hugo-blog/commit/df9eca26af43287748fd8d4654014357a8269b0b))
- :tada: Feat: add friends layout template
- :wrench: Chore(i18n): add translations for Traditional Chinese ([Lruihao/hugo-blog@`df9eca2`](https://github.com/Lruihao/hugo-blog/commit/b86157d8b84830bda415ab2488580afd843acac2))
- :bug: Fix: mobile style ([Lruihao/hugo-blog#19](https://github.com/Lruihao/hugo-blog/issues/19))
- :bug: Style: fix content h1 style ([Lruihao/hugo-blog#8](https://github.com/Lruihao/hugo-blog/issues/8))
- :bug: Fix: `.params.author` should be `$params.author` ([Lruihao/hugo-blog#1](https://github.com/Lruihao/hugo-blog/issues/1))
- **Full Changelog:** @Lruihao [`v0.2.10...v0.2.11`](https://github.com/hugo-fixit/FixIt/compare/v0.2.10...v0.2.11)
## v0.2.10 :arrow_down: [2020-5-29 before]
Thanks [dillonzq/LoveIt](https://github.com/dillonzq/LoveIt/releases)

View File

@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
1024@lruihao.cn.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@ -0,0 +1,90 @@
# CONTRIBUTING
## How to contribute to this project
First, fork this repository by clicking the fork button.
Next, clone your forked repo.
```bash
git clone --recursive https://github.com/hugo-fixit/FixIt.git && cd FixIt
```
Then, install the dev dependencies.
```bash
npm install
```
And now you are ready to go!
Here are some useful commands.
```bash
# build theme.js with babel
npm run babel
# build theme.js and then build the static site
npm run build
# run a local debugging server with watch
npm run server
# run a local debugging server with watch in production environment
npm run server:production
# build theme.js and then run a local debugging server
npm run start
# build theme.js and then run a local debugging server in production environment
npm run start:production
```
Finally, create a new pull request at <https://github.com/hugo-fixit/FixIt/pulls> to submit your contribution 🎉
## Git standard for developers
### Branches
| Branch | Description |
| :-- | :-- |
| master | _The branch open to the public and release versions_ |
| dev | _The development branch of the next version_ |
| RC branch | _The release candidate branch of the next version, e.g. v0.2.12-RC_ |
| single feature | _The branch to enhancements or fixes_ |
### Merge events
| event | merge |
| :-- | :-- |
| release | **RC branch => master:** `--rebase` |
| PR | **others:master => master:** `--rebase` |
| single feature| **feature branch => RC branch:** `--merge` |
### Commit message
#### Format
`[{emoji} ]{type}[({module})]: {subject within 50 words}[ (#{issue/pull request})]`
example:
- :tada: Feat: add shortcode fixit-encryptor shortcode (#123)
- :arrow_up: Chore(libs): update Artalk from 2.2.12 to 2.3.4 (#150)
#### Emoji
- <https://gitmoji.dev>
- [vscode plugin](https://github.com/maixiaojie/git-emoji-zh.git)
- utools plugin `GitEmoji`
#### Message
| Emoji | Type | Example | Description (No Ambiguous) |
| :-------------------------------------------- | :------- | :----------------------------------------------------------- | :----------------------------------------------------------- |
| :tada: <br>:sparkles: | Feat | Feat: add {feature} | new feature |
| :truck: | | Feat: adjust/migrate {feature name}, {change details} | For the adjustment feature, it is necessary to describe the current situation (before) and after adjustment (after) |
| :fire: | | Feat: delete {feature name}, {deletion reason} | If the feature is deleted, the reason for deletion must be explained |
| :bug: <br>:construction: <br>:rotating_light: | Fix | Fix: fix {bug description} | Fix known bugs |
| :art: <br>:lipstick: <br>:pencil2: | Style | Style: Typesetting/CSS style {optimizing content} | Changes that do not affect code operation, such as code layout and style change |
| :recycle: | Refactor | Refactor: override {feature name} | It is neither a new function nor a code change to fix a bug. Simply rewriting the code of a function does not affect the function result |
| :zap: | Perf | Perf: improve performance {function name}, {improve content} | Optimize code performance |
| :rewind: | Revert | Revert: restore version {commit message of restore version} | Restore the version of one commit |
| :pencil: <br>:pencil2: | Docs | Docs: revise comments/update documents | Adjustment of documents and notes |
| :wrench: | Chore | Chore: update plugin version | Changes in the construction process or auxiliary tools |

22
themes/FixIt/LICENSE Normal file
View File

@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2018 LIUZHICHAO.COM
Copyright (c) 2019-2020 DILLONZQ.COM
Copyright (c) 2021-2023 LRUIHAO.CN
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

248
themes/FixIt/README.md Normal file
View File

@ -0,0 +1,248 @@
# FixIt Theme | Hugo
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.109.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
👉 English README | [简体中文说明](README.zh-cn.md)
> [FixIt](https://github.com/hugo-fixit/FixIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [KeepIt Theme](https://github.com/Fastbyte01/KeepIt) and [LeaveIt Theme](https://github.com/liuzc/LeaveIt).
The FixIt theme inherits the excellent features of these themes, and adds new features and optimizations on those basis. Please read [Why Choose FixIt](#why-choose-fixit) to learn more.
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/Apple-Devices-Preview.jpg)
## Getting started
Head to the [getting started page](http://fixit.lruihao.cn/documentation/getting-started/) or start with a template:
* [hugo-fixit/hugo-fixit-blog-git](https://github.com/hugo-fixit/hugo-fixit-blog-git)
* [hugo-fixit/hugo-fixit-blog-go](https://github.com/hugo-fixit/hugo-fixit-blog-go)
## [Documentation](https://fixit.lruihao.cn/categories/documentation/)
Head to this [documentation page](https://fixit.lruihao.cn/documentation/basics/) for a complete guidence to get started with the FixIt theme.
Or run [Documentation Site](https://fixit.lruihao.cn) locally, see more details from [Contributing](#contributing).
In addition, there is the [FixIt wiki](https://github.com/hugo-fixit/FixIt/wiki).
## Migrate from LoveIt
If you are currently using the LoveIt theme (or some other themes), it is very easy to migrate to FixIt.
You can add this repo as a submodule of your site directory. Alternatively, you can install the theme in [other ways](https://fixit.lruihao.cn/documentation/basics/#install-theme).
```bash
git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt
```
And later you can update the submodule in your site directory to the latest commit using this command:
```bash
git submodule update --remote --merge
```
Next, go to the `config.toml` and change the default theme to `FixIt`.
```diff
- theme = "LoveIt"
+ theme = "FixIt"
```
Now the migration is finished and everything is ready 🎉
## Why choose FixIt
The FixIt theme inherits the excellent features of themes such as LoveIt, and adds new features and optimizations on those basis, as detailed in [Features](#features). In addition, the FixIt theme has the following advantages:
* Complete Chinese and English official documentations
* Community support: Theme official website, Discussions and official QQ group
* Continuously and actively update
* Constantly incorporate suggestions and ideas from all sides
* Highly open theme customizable section
In short, if you prefer the design language and freedom of the FixIt theme, and if you like to personalize your own themes as I do, the FixIt theme may be more suitable for you.
## Who used FixIt
To see this theme in action, here are some [live demo sites](https://fixit.lruihao.cn/friends/) which are rendered with **FixIt** theme.
## Features
### Performance and SEO
* Optimized for **performance**: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights)
* Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD
* **[Google Analytics](https://analytics.google.com/analytics)** supported
* **[Fathom Analytics](https://usefathom.com/)** supported
* Search engine **verification** supported (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou)
* **CDN** for third-party libraries supported
### Appearance and Layout
* **Responsive** layout
* **Light/Dark** mode
* Globally consistent **design language**
* **Pagination** supported
* Easy-to-use and self-expanding **table of contents**
* **Multilanguage** supported and i18n ready
* Beautiful **CSS animation**
### Social and Comment Systems
* **Gravatar** supported by [Gravatar](https://gravatar.com)
* Local **Avatar** supported
* Up to **87** social links supported
* Up to **28** share sites supported
* **Disqus** comment system supported by [Disqus](https://disqus.com)
* **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
* **Valine** comment system supported by [Valine](https://valine.js.org/)
* **Waline** comment system supported by [Waline](https://waline.js.org/)
* **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/)
* **Telegram comments** system supported by [Telegram Comments](https://comments.app/)
* **Commento** comment system supported by [Commento](https://commento.io/)
* **Utterances** comment system supported by [Utterances](https://utteranc.es/)
* **Artalk** comment system supported by [Artalk](https://artalk.js.org/)
* **Twikoo** comment system supported by [Twikoo](https://twikoo.js.org/)
* **giscus** comment system supported by [giscus](https://giscus.app/)
### Extended Features
* **PWA (Progressive Web App)** supported
* **Sub Menu** supported
* **Content Encryption** supported (Pages, Partial)
* **Friends** page embedded template
* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/)
* **Twemoji** supported
* Automatically **highlighting** code
* **Copy code** to clipboard with one click
* **Images gallery** supported by [lightgallery](https://github.com/sachinchoolur/lightgallery)
* Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
* Extended Markdown syntax for **ruby annotation**
* Extended Markdown syntax for **fraction**
* **Mathematical formula** supported by [KaTeX](https://katex.org/)
* **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid)
* **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
* **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
* **Bilibili player** shortcode
* Kinds of **admonitions** shortcode
* **Custom style** shortcode
* **Custom script** shortcode
* **Animated typing** supported by [TypeIt](https://typeitjs.com/)
* **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent)
* **Web Watermark** supported by [cell-watermark](https://github.com/Lruihao/watermark)
* **Chinese typesetting** supported by [pangu.js](https://github.com/vinta/pangu.js)
* ...
## Multilingual and i18n
FixIt supports the following languages:
* English
* Simplified Chinese
* Traditional Chinese
* French
* Polish
* Brazilian Portuguese
* Italian
* Spanish
* German
* Serbian
* Russian
* Romanian
* Vietnamese
* [Contribute with a new language](https://github.com/hugo-fixit/FixIt/pulls)
[Languages Compatibility](https://fixit.lruihao.cn/documentation/basics/#language-compatibility)
## [Roadmap](https://github.com/hugo-fixit/FixIt/projects/1)
## [Changelog](/CHANGELOG.md)
## Questions, ideas, bugs, pull requests
All feedback is welcome! Head over to the [issues](https://github.com/hugo-fixit/FixIt/issues) or [discussions](https://github.com/hugo-fixit/FixIt/discussions) tracker.
## Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for getting started with the contribution.
Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.
**When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change**.
## [Contributors](contributors.md)
## Acknowledgements
<details open>
<summary>Thanks to the authors of following resources included in the theme:</summary>
* [normalize.css](https://github.com/necolas/normalize.css)
* [Font Awesome](https://fontawesome.com/)
* [Simple Icons](https://github.com/simple-icons/simple-icons)
* [Animate.css](https://daneden.github.io/animate.css/)
* [autocomplete-js](https://github.com/algolia/autocomplete)
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [Fuse.js](https://fusejs.io/)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [emoji-data](https://github.com/iamcal/emoji-data)
* [lightgallery](https://github.com/sachinchoolur/lightgallery)
* [Sharer.js](https://github.com/ellisonleao/sharer.js)
* [TypeIt](https://typeitjs.com/)
* [KaTeX](https://katex.org/)
* [mermaid](https://github.com/mermaid-js/mermaid)
* [ECharts](https://echarts.apache.org/)
* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* [APlayer](https://github.com/MoePlayer/APlayer)
* [MetingJS](https://github.com/metowolf/MetingJS)
* [Gitalk](https://github.com/gitalk/gitalk)
* [Valine](https://valine.js.org/)
* [cookieconsent](https://github.com/osano/cookieconsent)
* [cell-watermark](https://github.com/Lruihao/watermark)
* [不蒜子](http://busuanzi.ibruce.info/)
* [pangu.js](https://github.com/vinta/pangu.js)
* [Artalk](https://artalk.js.org/)
* [Waline](https://waline.js.org/)
* [Twikoo](https://twikoo.js.org/)
* [github-corners](https://github.com/tholman/github-corners)
* [giscus](https://giscus.app/)
* [crypto-js](https://github.com/brix/crypto-js)
* [vConsole](https://github.com/Tencent/vConsole)
* [eruda](https://github.com/liriliri/eruda)
* [pace](https://github.com/CodeByZach/pace)
</details>
<details open>
<summary>The FixIt also draws on some features of the following projects, and thanks to their authors as well:</summary>
* [DoIt](https://github.com/HEIGE-PCloud/DoIt)
* [NexT](https://github.com/next-theme/hexo-theme-next)
</details>
## License
FixIt is licensed under the **MIT** license. Check the [LICENSE file](LICENSE) for details.
## Author
[Lruihao](https://github.com/Lruihao "Follow me on GitHub")
## Sponsor
Giving me a Star 🌟 is already the greatest encouragement and support for me.\
If you enjoy the theme, please consider buying me a coffee ☕️.
* [PayPal](https://paypal.me/Lruihao)
* [Alipay](images/alipay.jpg)
* [Wechat](images/wechatpay.jpg)
Thanks! ❤️

View File

@ -0,0 +1,252 @@
# FixIt 主题 | Hugo
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.109.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
👉 [English README](README.md) | 简体中文说明
> [FixIt](https://github.com/hugo-fixit/FixIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
它的原型基于 [LoveIt 主题](https://github.com/dillonzq/LoveIt)[KeepIt 主题](https://github.com/Fastbyte01/KeepIt) 和 [LeaveIt 主题](https://github.com/liuzc/LeaveIt)。
FixIt 主题继承了这些主题的优秀功能,并在此基础上添加了新的功能与优化,请阅读 [为什么选择 FixIt](#为什么选择-FixIt) 来了解更多。
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/Apple-Devices-Preview.jpg)
## 快速上手
前往 [快速上手页面](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/) 或从一个模板直接开始:
* [hugo-fixit/hugo-fixit-blog-git](https://github.com/hugo-fixit/hugo-fixit-blog-git)
* [hugo-fixit/hugo-fixit-blog-go](https://github.com/hugo-fixit/hugo-fixit-blog-go)
## [完整文档](https://fixit.lruihao.cn/zh-cn/categories/documentation/)
前往这篇 [文档](https://fixit.lruihao.cn/zh-cn/documentation/basics/),阅读关于安装与使用的详细指南。
或者在本地运行 [文档站点](https://fixit.lruihao.cn/zh-cn/),更多细节详见 [参与贡献](#参与贡献)。
除此之外,还有 [FixIt 主题维基](https://github.com/hugo-fixit/FixIt/wiki)。
## 从 LoveIt 迁移
如果你现在正在使用 LoveIt 主题(或者一些其他的主题),你可以很容易地迁移至 FixIt。
你可以将这个主题仓库添加为你的网站目录的子模块。或者,您可以通过 [其他方式](https://fixit.lruihao.cn/zh-cn/documentation/basics/#install-theme) 安装主题。
```bash
git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt
```
之后,你可以在站点目录通过这条命令来将主题更新至最新版本:
```bash
git submodule update --remote --merge
```
接着,前往 `config.toml` 并将默认主题更改为 `FixIt`
```diff
- theme = "LoveIt"
+ theme = "FixIt"
```
这样就完成了迁移工作,现在一切准备就绪 🎉
## 为什么选择 FixIt
FixIt 主题继承了 LoveIt 等主题的优秀功能,并在它们的基础上添加了新的功能与优化,详见 [特性](#特性)。除此之外FixIt 主题还有以下优点:
* 完善的中英文官方文档
* 社区支持主题官网、Discussions 和官方 QQ 群
* 持续积极地更新
* 不断收纳各方的建议和想法
* 高度开放主题可自定义部分
总之,如果你更偏好 FixIt 主题的设计语言和自由度如果你和我一样喜欢个性化自定义主题那么FixIt 主题可能是更适合你。
## 谁在用 FixIt
为了直观地浏览主题特性,这里有一些基于 **FixIt** 主题渲染的 [预览网站](https://fixit.lruihao.cn/zh-cn/friends/)。
## 特性
### 性能和 SEO
* **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, 99/100 的移动设备得分和 100/100 的桌面设备得分
* 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化
* 支持 **[Google Analytics](https://analytics.google.com/analytics)**
* 支持 **[Fathom Analytics](https://usefathom.com/)**
* 支持搜索引擎的**网站验证** (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou)
* 支持所有第三方库的 **CDN**
### 外观和布局
* **响应式**布局
* **浅色/深色** 主题模式
* 全局一致的**设计语言**
* 支持**分页**
* 易用和自动展开的**文章目录**
* 支持**多语言**和国际化
* 美观的 **CSS 动画**
### 社交和评论系统
* 支持 **[Gravatar](https://gravatar.com)** 头像
* 支持本地**头像**
* 支持多达 **87** 种社交链接
* 支持多达 **28** 种网站分享
* 支持 **[Disqus](https://disqus.com)** 评论系统
* 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
* 支持 **[Valine](https://valine.js.org/)** 评论系统
* 支持 **[Waline](https://waline.js.org/)** 评论系统
* 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统
* 支持 **[Telegram comments](https://comments.app/) 评论**系统
* 支持 **[Commento](https://commento.io/)** 评论系统
* 支持 **[Utterances](https://utteranc.es/)** 评论系统
* 支持 **[Artalk](https://artalk.js.org/)** 评论系统
* 支持 **[Twikoo](https://twikoo.js.org/)** 评论系统
* 支持 **[giscus](https://giscus.app/zh-CN/)** 评论系统
### 扩展功能
* 支持**渐进式网页应用**
* 支持**二级菜单**
* 支持**内容加密**(页面、局部)
* 支持**友情链接**的页面模板
* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索**
* 支持 **Twemoji**
* 支持**代码高亮**
* 一键**复制代码**到剪贴板
* 支持基于 [lightgallery](https://github.com/sachinchoolur/lightgallery) 的**图片画廊**
* 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法
* 支持**上标注释**的扩展 Markdown 语法
* 支持**分数**的扩展 Markdown 语法
* 支持基于 [KaTeX](https://katex.org/) 的**数学公式**
* 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode
* 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode
* 支持基于 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 的 **Mapbox** shortcode
* 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode
* 支持 **Bilibili 视频** shortcode
* 支持多种**注释**的 shortcode
* 支持**自定义样式**的 shortcode
* 支持**自定义脚本**的 shortcode
* 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode
* 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅**
* 支持基于 [cell-watermark](https://github.com/Lruihao/watermark) 的**网页水印**
* 支持基于 [pangu.js](https://github.com/vinta/pangu.js) 的**中文排版**
* ……
## 多语言和国际化
FixIt 支持下列语言:
* 英语
* 简体中文
* 繁体中文
* 法语
* 波兰语
* 巴西葡萄牙语
* 意大利语
* 西班牙语
* 德语
* 塞尔维亚语
* 俄语
* 罗马尼亚语
* 越南语
* [贡献一种新的语言](https://github.com/hugo-fixit/FixIt/pulls)
[语言兼容性](https://fixit.lruihao.cn/zh-cn/theme-documentation-basics/#language-compatibility)
## [路线图](https://github.com/hugo-fixit/FixIt/projects/1)
## [更新日志](/CHANGELOG.md)
## 问题、想法、bugs 和 PRs
所有的反馈都是欢迎的!详见 [议题](https://github.com/hugo-fixit/FixIt/issues) 或者 [讨论](https://github.com/hugo-fixit/FixIt/discussions)。
## 参与贡献
请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 以了解贡献该项目的基本信息。
确保在贡献和参与讨论时遵守 [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)。
**贡献时,请先通过此存储库上的问题讨论您希望进行的更改,然后再进行实际更改**
## [所有贡献者](contributors.md)
## 镜像
* Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
## 致谢
<details open>
<summary>FixIt 主题中用到了以下项目,感谢它们的作者:</summary>
* [normalize.css](https://github.com/necolas/normalize.css)
* [Font Awesome](https://fontawesome.com/)
* [Simple Icons](https://github.com/simple-icons/simple-icons)
* [Animate.css](https://daneden.github.io/animate.css/)
* [autocomplete-js](https://github.com/algolia/autocomplete)
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [Fuse.js](https://fusejs.io/)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [emoji-data](https://github.com/iamcal/emoji-data)
* [lightgallery](https://github.com/sachinchoolur/lightgallery)
* [Sharer.js](https://github.com/ellisonleao/sharer.js)
* [TypeIt](https://typeitjs.com/)
* [KaTeX](https://katex.org/)
* [mermaid](https://github.com/mermaid-js/mermaid)
* [ECharts](https://echarts.apache.org/)
* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* [APlayer](https://github.com/MoePlayer/APlayer)
* [MetingJS](https://github.com/metowolf/MetingJS)
* [Gitalk](https://github.com/gitalk/gitalk)
* [Valine](https://valine.js.org/)
* [cookieconsent](https://github.com/osano/cookieconsent)
* [cell-watermark](https://github.com/Lruihao/watermark)
* [不蒜子](http://busuanzi.ibruce.info/)
* [pangu.js](https://github.com/vinta/pangu.js)
* [Artalk](https://artalk.js.org/)
* [Waline](https://waline.js.org/)
* [Twikoo](https://twikoo.js.org/)
* [github-corners](https://github.com/tholman/github-corners)
* [giscus](https://giscus.app/zh-CN)
* [crypto-js](https://github.com/brix/crypto-js)
* [vConsole](https://github.com/Tencent/vConsole)
* [eruda](https://github.com/liriliri/eruda)
* [pace](https://github.com/CodeByZach/pace)
</details>
<details open>
<summary>FixIt 主题还借鉴了以下项目的部分功能,同样感谢它们的作者:</summary>
* [DoIt](https://github.com/HEIGE-PCloud/DoIt)
* [NexT](https://github.com/next-theme/hexo-theme-next)
</details>
## 许可协议
FixIt 根据 **MIT** 许可协议授权。 更多信息请查看 [LICENSE 文件](LICENSE)。
## 作者
[Lruihao](https://github.com/Lruihao "在 GitHub 上关注我")
## 赞助支持
给我一个 Star 🌟 已经是对我最大的鼓励和支持了。\
如果你喜爱这个主题,请考虑给我买杯咖啡 ☕️。
* [PayPal](https://paypal.me/Lruihao)
* [支付宝](images/alipay.jpg)
* [微信支付](images/wechatpay.jpg)
谢谢!❤️

View File

@ -0,0 +1,8 @@
---
title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
date: {{ .Date }}
description:
keywords:
draft: true
---

View File

@ -0,0 +1,37 @@
---
title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
type: friends
date: {{ .Date }}
description: "{{ .Site.Author.name }}'s friends"
keywords:
- 'Hugo FixIt'
- 'friends template'
- 友情链接
comment: false
---
<!-- When you set data `friends.yml` in `yourProject/data/` directory, it will be automatically loaded here. -->
---
<!-- You can define additional content below for this page. -->
## Base info
```yaml
- nickname: Lruihao
avatar: https://lruihao.cn/images/avatar.jpg
url: https://lruihao.cn
description: Lruihao's Note
```
## Friendly Reminder
{{< admonition info "Notice" true >}}
1. If you want to exchange link, please leave a comment in the above format. (personal non-commercial blogs / websites only)
2. :(fa-solid fa-exclamation-triangle): Website failure, stop maintenance and improper content may be unlinked!
3. Those websites that do not respect other people's labor achievements, reprint without source, or malicious acts, please do not come to exchange.
{{< /admonition >}}

View File

@ -0,0 +1,9 @@
---
type: offline
description: '{{ T "offlineTitle" }} - {{ .Site.Title }}'
keywords:
- PWA
- {{ T "offlineTitle" }}
---
<!-- You need do nothing for this page. -->

View File

@ -0,0 +1,40 @@
---
title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
date: {{ .Date }}
draft: true
author:
name:
link:
email:
avatar:
description:
keywords:
license:
comment: false
weight: 0
tags:
- draft
categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
summary:
resources:
- name: featured-image
src: featured-image.jpg
- name: featured-image-preview
src: featured-image-preview.jpg
toc: true
math: false
lightgallery: false
password:
message:
repost:
enable: true
url:
# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
---
<!--more-->

View File

@ -0,0 +1,40 @@
---
title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
date: {{ .Date }}
draft: true
author:
name:
link:
email:
avatar:
description:
keywords:
license:
comment: false
weight: 0
tags:
- draft
categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
summary:
resources:
- name: featured-image
src: featured-image.jpg
- name: featured-image-preview
src: featured-image-preview.jpg
toc: true
math: false
lightgallery: false
password:
message:
repost:
enable: true
url:
# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
---
<!--more-->

View File

@ -0,0 +1,168 @@
// ==============================
// Variables
// ==============================
// ========== Global ========== //
// Prefix for :root CSS variables.
$prefix: fi- !default;
// Font and Line Height
$global-font-family: system-ui, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft YaHei UI, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif !default;
$global-font-size: 16px !default;
$global-font-weight: 400 !default;
$global-line-height: 1.5rem !default;
// scroll-margin-top of content anchor
$global-scroll-margin-top: 0.5rem;
// Radius of the border
$global-border-radius: 5px !default;
// Color of the background
$global-background-color: #ffffff !default;
$global-background-color-dark: #292a2d !default;
// Color of the text
$global-font-color: #161209 !default;
$global-font-color-dark: #a9a9b3 !default;
// Color of the secondary text
$global-font-secondary-color: #b1b1ba !default;
$global-font-secondary-color-dark: #909092 !default;
// Color of the link
$global-link-color: #ba0066 !default;
$global-link-color-dark: #EC008C !default;
// Color of the hover link
$global-link-hover-color: #EC008C !default; // 潮蓝
$global-link-hover-color-dark: #ba0066 !default;
// Color of m3tam3re-border-color: #ba0066 !default;
$global-border-color-dark: #EC008C !lets-encrypt;
// ========== Global =====m3tam3re===== Scrollbar ========== //
// Color of the scrollbar
$scrollbar-color: #ba0066 !default;
// Color of the hover scrollbar
$scrollbar-hover-color: #EC008C !default;
// ========== Scrollbar ========== //
// ========== Selection ========== //
// Color of the selected text
$selection-color: rgba(72.9, 0, 40, 0.4) !default;
$selection-color-dark: rgba(72.9, 0, 40, 0.4) !default;
// ========== Selection ========== //
// ========== Header ========== //
// Height of the header
$header-height: 3.5rem !default;
// Color of the header background
$header-background-color: #f8f8f8 !default;
$header-background-color-dark: #252627 !default;
// Font style of the header title
$header-title-font-family: $global-font-family !default;
$header-title-font-size: 1.5rem !default;
// Color of the active menu item
$menu-active-color: #EC008C !default;
$menu-active-color-dark: #ba0066 !default;
// Color of the search background
$search-background-color: #e9e9e9 !default;
$search-background-color-dark: #363636 !default;
// ========== Header ========== //
// ========== Tag Cloud ========== //
// Color range of tag cloud
$tag-cloud-start: $global-font-secondary-color!default;
$tag-cloud-end: $global-font-color!default;
$tag-cloud-start-dark: $global-font-secondary-color-dark!default;
$tag-cloud-end-dark: $global-font-color-dark!default;
// ========== Tag Cloud ========== //
// ========== Single Content ========== //
// Font size of the TOC
$toc-title-font-size: 1.2rem !default;
$toc-content-font-size: 1rem !default;
// Color of the single link
$single-link-color: #ba0066 !default; // 花青
$single-link-color-dark: #EC008C !default; // 釉蓝
// Color of the hover single link
$single-link-hover-color: #EC008C !default; // 莲瓣红
$single-link-hover-color-dark: #ba0066 !default; // 羽扇豆蓝
// Color of the table background
$table-background-color: #f6f8fa !default;
$table-background-color-dark: #2d333b !default;
// Color of the table thead
$table-thead-color: #EC008C !default;
$table-thead-color-dark: #ba0066 !default;
// Color of the blockquote
$blockquote-color: #697681 !default;
$blockquote-color-dark: #9ba3aa !default;
// Color of reward
$reward-color: tomato !default;
$reward-color-dark: darken($reward-color, 5%) !default;
// Width of reward image
$reward-img-width: 180px !default;
// ========== Single Content ========== //
// ========== Pagination ========== //
// Color of the link in pagination
$pagination-link-color: #bfbfbf !default;
$pagination-link-color-dark: #b1b1ba !default;
// Color of the hover link in pagination
$pagination-link-hover-color: #ba0066 !default;
$pagination-link-hover-color-dark: #EC008C !default;
// ========== Pagination ========== //
// ========== Code ========== //
// Color of the code
$code-color: #24292f !default;
$code-color-dark: #adbac7 !default;
// Color of the code background
$code-background-color: #f6f8fa !default;
$code-background-color-dark: #2d333b !default;
$code-error-color: #dc3545 !default;
// Color of the hightlight code
$code-hightlight-color: #fff8c5 !default;
$code-hightlight-color-dark: rgba(174, 124, 20, 0.15) !default;
$code-info-color: #EC008C !default;
$code-info-color-dark: #ba0066 !default;
// Font size of the code
$code-font-size: 0.875rem !default;
// Font family of the code
$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace, $global-font-family !default;
// ========== Code ========== //
// ========== GitHub Corners ========== //
// Color of the GitHub Corners
$github-corner-color: white !default;
$github-corner-color-dark: black !default;
// Color of the GitHub Corners background
$github-corner-fill: $header-background-color-dark !default;
$github-corner-fill-dark: $header-background-color !default;
// ========== GitHub Corners ========== //
@import '_partials/_maps/admonition';
@import '_partials/_maps/code-highlight';
@import '_partials/_maps/code-type';
@import '_partials/_maps/colors';
@import '_partials/_maps/utilities';

View File

@ -0,0 +1,96 @@
@import "../../lib/normalize/normalize";
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;
}
}
/* scrollbar, only support webkit */
::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-webkit-scrollbar-thumb {
background-color: $scrollbar-color;
@include border-radius($global-border-radius);
&:hover {
background-color: $scrollbar-hover-color;
}
}
::selection {
background-color: $selection-color;
[data-theme='dark'] & {
background-color: $selection-color-dark;
}
}
body {
background-color: $global-background-color;
color: $global-font-color;
scrollbar-color: auto;
@include overflow-wrap(break-word);
&::-webkit-scrollbar {
width: 0.75rem;
height: 0.75rem;
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
background-clip: content-box;
border: 2px solid transparent;
@include border-radius(0.5rem);
}
&[data-scroll]::-webkit-scrollbar-thumb {
background-color: $scrollbar-color;
}
&[data-theme='dark'] {
color: $global-font-color-dark;
background-color: $global-background-color-dark;
}
}
iframe {
border: 0;
@include border-radius($global-border-radius);
}
[role='button'] {
cursor: pointer;
}
summary {
cursor: pointer;
}
abbr[title] {
cursor: help;
text-decoration-skip-ink: none;
}
@include link(true, true);
@import '../_partials/mask';
@import '../_partials/img';
@import '../_partials/icon';
@import '../_partials/details';
@import '../_partials/widgets';

View File

@ -0,0 +1,46 @@
.breadcrumb-container {
padding-inline: 1rem;
font-size: 0.75rem;
@include z-index(1);
@extend .print-d-none;
&.sticky {
position: sticky;
top: $header-height;
}
.breadcrumb {
display: flex;
flex-wrap: wrap;
padding: 0.5rem 0;
margin: 0 auto;
list-style: none;
border-bottom: 1px inset $global-border-color;
background-color: $global-background-color;
@extend %page-style;
[data-theme='dark'] & {
border-bottom-color: $global-border-color-dark;
background-color: $global-background-color-dark;
}
.breadcrumb-item {
display: flex;
+.breadcrumb-item::before {
content: "/";
display: inline-block;
padding-inline: 0.5rem;
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
&.active {
@extend .text-secondary;
}
}
}
}

View File

@ -0,0 +1,66 @@
// ==============================
// Common Styles
// 常用样式
// ==============================
.text-truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.text-start {
text-align: left !important;
}
.text-end {
text-align: right !important;
}
.text-center {
text-align: center !important;
}
.d-none {
display: none !important;
}
.d-none-desktop {
display: none;
}
.d-none-mobile {
display: block;
}
.ms-1,
.mx-1 {
margin-left: 0.25rem !important;
}
.me-1,
.mx-1 {
margin-right: 0.25rem !important;
}
.ps-1,
.px-1 {
padding-left: 0.25rem !important;
}
.pe-1,
.px-1 {
padding-right: 0.25rem !important;
}
@each $color, $value in $theme-colors {
.text-#{$color} {
color: #{$value} !important;
[data-theme='dark'] & {
color: #{darken($value, 5%)} !important;
}
}
}
@each $key, $value in $orders {
.order-#{$key} {
order: #{$value} !important;
}
}
.variant-numeric {
font-variant-numeric: tabular-nums lining-nums;
}

View File

@ -0,0 +1,63 @@
footer {
height: auto;
width: 100%;
text-align: center;
line-height: 1.25rem;
padding: 1rem 0;
@extend .print-d-none;
.footer-container {
display: flex;
flex-direction: column;
font-size: 0.875rem;
.footer-line {
width: 100%;
.footer-divider:not(:first-child)::before {
content: '|';
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.fixit-icon {
top: 0.25em;
}
.animate-icon {
color: #dc143c;
animation: icon-animate 1.33s ease-in-out infinite;
}
.run-times {
font-variant-numeric: tabular-nums lining-nums;
}
}
}
@include blur;
}
@keyframes icon-animate {
0%,
100% {
@include transform(scale(1));
}
10%,
30% {
@include transform(scale(0.9));
}
20%,
40%,
60%,
80% {
@include transform(scale(1.1));
}
50%,
70% {
@include transform(scale(1.1));
}
}

View File

@ -0,0 +1,645 @@
header {
width: 100%;
background-color: $header-background-color;
@include z-index(2);
@include transition(box-shadow 0.3s ease);
@extend .print-d-none;
[data-theme='dark'] & {
background-color: $header-background-color-dark;
}
&:hover {
@include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.1));
[data-theme='dark'] & {
@include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.1));
}
}
}
.header-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
width: 100%;
}
.header-title {
font-family: $header-title-font-family;
font-weight: bold;
margin-right: 0.5rem;
min-width: 10%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@include flex(10);
.logo {
min-height: 1.5em;
height: 1.5em;
vertical-align: middle;
width: auto;
}
.header-title-text {
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.header-subtitle {
margin-left: 0.25rem;
font-size: 0.6em;
}
}
.menu {
margin: 0;
padding: 0;
.menu-item {
list-style: none;
& .dropdown-icon {
margin-left: 0.25rem;
font-size: .875em;
color: $global-font-color;
[data-theme='dark'] & {
color: $global-font-color-dark;
}
&.open::before {
content: "\f078";
}
}
&.active {
>.menu-link,
>.nested-item>.menu-link {
font-weight: bold;
color: $menu-active-color;
[data-theme='dark'] & {
color: $menu-active-color-dark;
}
}
}
&.language-switch,
&.theme-switch {
cursor: pointer;
}
}
}
.search {
position: relative;
input {
color: transparent;
box-sizing: border-box;
height: 2.5rem;
width: 1.25rem;
@include border-radius(0.5rem);
border: none;
outline: none;
background-color: transparent;
vertical-align: baseline !important;
@include transition(width 0.3s ease);
}
@include placeholder(transparent);
.search-button {
margin: 0;
position: absolute;
left: auto;
right: 1rem;
}
.search-toggle {
left: 0.5rem;
right: auto;
#header-desktop.open & {
left: 1rem;
}
}
.search-loading {
display: none;
}
.search-clear {
display: none;
}
.open &,
&.mobile {
input {
color: $global-font-color;
background-color: $search-background-color;
padding: 0 2rem 0 2rem;
}
[data-theme='dark'] & {
input {
color: darken($global-font-color-dark, 10%);
background-color: darken($code-background-color-dark, 5%);
}
@include placeholder($global-font-secondary-color-dark);
}
@include placeholder($global-font-secondary-color);
.search-button {
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
.search-clear:hover {
color: #ff6b6b;
}
.search-toggle:hover {
cursor: default;
}
}
}
.theme-switch {
i {
@include transform(rotate(225deg));
@include transition(transform 0.4s ease);
}
&:hover i {
@include transform(rotate(45deg));
}
}
#header-desktop {
display: block;
position: sticky;
top: 0;
height: $header-height;
line-height: $header-height;
box-sizing: border-box;
[data-header-desktop='normal'] & {
position: static;
}
nav {
overflow: hidden;
white-space: nowrap;
}
.header-wrapper {
// use css native function to calculate max value
padding: 0 2rem 0 MAX(10vh, $header-height);
height: 100%;
&[data-github-corner='right'] {
padding-right: $header-height;
}
.header-title {
font-size: $header-title-font-size;
height: 100%;
}
.menu {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
float: right;
>.menu-item {
&:hover .sub-menu {
display: block;
@include transform(translateX(-0.5rem));
}
&.language-switch:hover .sub-menu {
@include transform(translateX(calc(1.75rem - 100%)));
}
}
.menu-item {
padding: 0 0.5rem;
&.delimiter {
width: 0;
margin: 0.125rem 0.25rem;
padding: 0;
border-left: 1px dashed lighten($global-font-secondary-color, 15%);
[data-theme='dark'] & {
border-left-color: darken($global-font-secondary-color-dark, 15%);
}
}
}
.sub-menu {
position: absolute;
margin: 0;
padding: 0.25rem 0;
display: none;
top: calc(#{$header-height} - 0.75rem);
border-radius: $global-border-radius;
border: 1px solid $global-border-color;
background-color: $header-background-color;
@include transition(box-shadow 0.3s ease);
@include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.1));
[data-theme='dark'] & {
background-color: $header-background-color-dark;
border-color: $global-border-color-dark;
@include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.1));
}
.menu-item {
height: $header-height*0.5;
line-height: $header-height*0.5;
max-width: 15rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow-x: hidden;
}
}
}
}
&.open .header-wrapper .menu .menu-item.search {
input {
width: 24rem;
}
}
}
#header-mobile {
display: none;
position: sticky;
top: 0;
min-height: $header-height;
line-height: $header-height;
[data-header-mobile='normal'] & {
position: static;
}
.header-container {
padding: 0;
margin: 0;
.header-wrapper {
padding: 0 1rem;
font-size: 1.125rem;
@include transition(margin-top 0.3s ease);
.header-title {
font-size: $header-title-font-size;
max-width: 80%;
}
.menu-toggle {
line-height: 4rem;
cursor: pointer;
@include transition(width 0.3s ease);
span {
display: block;
background: $global-font-color;
width: 1.5rem;
height: 2px;
@include border-radius(3px);
@include transition(all 0.3s ease-in-out);
[data-theme='dark'] & {
background: $global-font-color-dark;
}
}
span:nth-child(1) {
margin-bottom: 0.5rem;
}
span:nth-child(3) {
margin-top: 0.5rem;
}
&.active {
span:nth-child(1) {
@include transform(rotate(45deg) translate(0.4rem, 0.5rem));
}
span:nth-child(2) {
opacity: 0;
}
span:nth-child(3) {
@include transform(rotate(-45deg) translate(0.4rem, -0.5rem));
}
}
}
}
.menu {
background: $header-background-color;
border-top: 2px solid $global-border-color;
display: none;
overflow-y: overlay;
max-height: 70vh;
@include box-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1));
[data-theme='dark'] & {
@include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1));
}
&::-webkit-scrollbar {
width: 0;
}
.search-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: ($header-height - 2.5rem) / 2 1rem;
line-height: 2.5rem;
position: sticky;
top: 0;
background-color: $header-background-color;
@include z-index(0, 50);
[data-theme='dark'] & {
background-color: $header-background-color-dark;
}
}
.search {
flex-grow: 10;
.algolia-autocomplete,
input {
width: 100%;
}
}
.search-loading,
.search-clear {
right: 0.5rem;
}
.search-button {
top: 0;
}
.search-cancel {
display: none;
margin-left: 0.75rem;
}
.menu-item {
display: block;
position: relative;
line-height: 2.5rem;
padding: 0 1rem;
&:not(.menu-system):hover {
background-color: lighten($code-background-color, 24%);
[data-theme='dark'] & {
background-color: lighten($code-background-color-dark, 5%);
}
}
.menu-link {
display: block;
white-space: nowrap;
text-overflow: ellipsis;
overflow-x: hidden;
@include flex(4);
}
& .nested-item {
display: flex;
justify-content: space-between;
align-items: center;
.menu-link {
max-width: 80%;
}
}
}
.menu-system {
display: flex;
justify-content: center;
gap: 0.25rem;
position: sticky;
bottom: 0;
line-height: 2.5rem;
padding: 0 1rem;
background-color: $header-background-color;
[data-theme='dark'] & {
background-color: $header-background-color-dark;
}
.menu-system-item {
padding-inline: 0.5rem;
}
.language-switch {
position: relative;
.language-select {
position: absolute;
opacity: 0;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
}
}
.sub-menu {
padding-left: 0;
display: none;
&.open {
display: block;
}
.menu-item:hover {
background-color: lighten($global-font-secondary-color, 20%);
[data-theme='dark'] & {
background-color: darken($global-font-secondary-color-dark, 20%);
}
}
}
&.active {
display: block;
}
[data-theme='dark'] & {
background: $header-background-color-dark;
border-top-color: $global-border-color-dark;
}
}
}
&.open {
.header-wrapper {
margin-top: -$header-height;
}
.menu {
padding-top: 0;
border-top: none;
.menu-item {
display: none;
}
.search-cancel {
display: inline;
}
}
}
}
.search-dropdown {
position: fixed;
top: $header-height;
@include z-index(2);
@include box-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1));
[data-theme='dark'] & {
@include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1));
}
&.desktop {
right: 2rem;
width: 30rem;
}
&.mobile {
right: 0;
width: 100%;
}
.dropdown-menu {
right: 0 !important;
background-color: $global-background-color;
[data-theme='dark'] & {
background-color: $global-background-color-dark;
}
.suggestions {
overflow-y: auto;
max-height: calc(100vh - #{$header-height});
.suggestion {
padding: 0.75rem 1rem;
.suggestion-title {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 1rem;
font-weight: bold;
max-width: 75%;
}
.suggestion-date {
font-size: 0.875rem;
float: right;
text-align: right;
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
.suggestion-context {
line-height: 1.25rem;
@include box(vertical);
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
@include overflow-wrap(break-word);
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
em {
font-style: normal;
background-color: $selection-color;
[data-theme='dark'] & {
background-color: $selection-color-dark;
}
}
&.cursor {
background: darken($code-background-color, 5%);
[data-theme='dark'] & {
background: lighten($code-background-color-dark, 5%);
}
}
&:hover {
cursor: pointer;
}
}
}
.search-empty {
padding: 1rem;
text-align: center;
.search-query {
font-weight: bold;
[data-theme='dark'] & {
color: #ddd;
}
}
}
.search-footer {
padding: 0.5rem 1rem;
float: right;
font-size: 0.8rem;
color: $global-font-secondary-color;
[data-theme='dark'] {
color: $global-font-secondary-color-dark;
}
@include link(false, false);
a {
font-size: 1rem;
}
}
}
}

View File

@ -0,0 +1,41 @@
/** Layout **/
.wrapper {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
main {
flex: 1 0 auto;
aside {
flex: 1;
padding-inline: 0.5rem;
&:first-child {
order: 2;
}
}
&.container {
display: flex;
align-items: flex-start;
justify-content: center;
padding: 0 1rem;
&.container-reverse {
flex-direction: row-reverse;
}
&:has(.home:not(.posts)) {
align-items: center;
}
}
}
}
@import "_core/header";
@import "_core/breadcrumb";
@import "_core/footer";
@import "_core/pagination";

View File

@ -0,0 +1,160 @@
@media only screen and (min-width: 1441px) {
%page-style {
width: 60%;
[data-page-style='wide'] & {
width: 64%;
}
[data-page-style='narrow'] & {
max-width: 800px;
}
}
}
@media only screen and (max-width: 1440px) {
%page-style {
width: 56%;
[data-page-style='wide'] & {
width: 60%;
}
}
}
@media only screen and (max-width: 1200px) {
%page-style {
width: 52%;
[data-page-style='wide'] & {
width: 56%;
}
}
#header-desktop .header-wrapper {
padding-right: 1rem;
}
.search-dropdown.desktop {
right: 1rem;
}
}
@media only screen and (max-width: 960px) {
%page-style {
width: 80% !important;
}
aside {
display: none !important;
}
#toc-static {
display: block;
}
#header-desktop .header-wrapper {
padding-left: 1rem;
}
}
@media only screen and (min-width: 681px) {
.breadcrumb-container.sticky {
body:not([data-header-desktop='sticky']) & {
top: 0;
}
// adjust the scroll margin top of the content anchors on the page
body:not([data-header-desktop='auto']) &+.container .content [id] {
scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-offset));
}
}
[data-header-desktop='normal'] .page .content [id] {
--#{$prefix}scroll-mt: #{$global-scroll-margin-top};
}
}
@media only screen and (max-width: 680px) {
#header-desktop {
display: none;
}
#header-mobile,
.d-none-desktop {
display: block;
}
.d-none-mobile {
display: none !important;
}
.breadcrumb-container.sticky {
body:not([data-header-mobile='sticky']) & {
top: 0;
}
// adjust the scroll margin top of the content anchors on the page
body:not([data-header-mobile='auto']) &+.container .content [id] {
scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-offset));
}
}
[data-header-mobile='normal'] .page .content [id] {
--#{$prefix}scroll-mt: #{$global-scroll-margin-top};
}
%page-style {
width: 100% !important;
}
.page {
.categories-card {
.card-item {
width: 100%;
}
}
}
footer {
.footer-container {
font-size: 0.618rem;
}
}
.pagination .page-item {
margin: 0 5px;
}
}
@media only print {
@page {
size: A4 portrait;
margin: 1.27cm;
}
.page {
width: 100% !important;
padding-top: 0 !important;
&.single {
.single-title,
.single-subtitle,
.post-meta {
text-align: center;
}
}
h1:not(.single-title),
.page-break-before {
page-break-before: always;
}
.page-break-after {
page-break-after: always;
}
}
.print-d-none {
display: none !important;
}
}

View File

@ -0,0 +1,90 @@
.pagination {
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
list-style: none;
white-space: nowrap;
width: 100%;
padding: 1rem 0;
a {
font-size: 0.8rem;
color: $pagination-link-color;
letter-spacing: 0.1rem;
font-weight: 700;
padding: 5px 5px;
text-decoration: none;
@include transition(0.3s);
[data-theme='dark'] & {
color: $pagination-link-color-dark;
}
}
li {
padding: 5px;
margin: 0 10px;
box-sizing: border-box;
position: relative;
display: inline;
&.disabled {
display: none;
}
&:hover a {
color: $pagination-link-hover-color;
}
[data-theme='dark'] &:hover a {
color: $pagination-link-hover-color-dark;
}
&::before,
&::after {
position: absolute;
content: '';
width: 0;
height: 3px;
background: $pagination-link-hover-color;
@include transition(0.3s);
bottom: 0px;
}
[data-theme='dark'] &::before,
[data-theme='dark'] &::after {
background: $pagination-link-hover-color-dark;
}
&::before {
left: 50%;
}
&::after {
right: 50%;
}
&:hover {
&::before,
&::after {
width: 50%;
}
}
&.active {
a {
color: $pagination-link-hover-color;
}
[data-theme='dark'] & a {
color: $pagination-link-hover-color-dark;
}
&::before,
&::after {
width: 50%;
}
}
}
}

View File

@ -0,0 +1,20 @@
/* Resolve style conflicts between third-party plugins */
@keyframes #{$prefix}pulse {
from {
@include transform(scale3d(1, 1, 1));
}
50% {
@include transform(scale3d(1.05, 1.05, 1.05));
}
to {
@include transform(scale3d(1, 1, 1));
}
}
.animate__pulse {
-webkit-animation-name: #{$prefix}pulse !important;
animation-name: #{$prefix}pulse !important;
}

View File

@ -0,0 +1,15 @@
:root {
// Note: Custom variable values only support SassScript inside `#{}`.
// Theme colors varibles
@each $color, $value in $theme-colors {
--#{$prefix}#{$color}: #{$value};
}
@each $color, $value in $theme-colors {
--#{$prefix}#{$color}-dark: #{darken($value, 5%)};
}
// Scroll margin top and Stack sticky top related
--#{$prefix}scroll-mt: calc(#{$header-height} + #{$global-scroll-margin-top});
--#{$prefix}breadcrumb-offset: 2.5rem;
}

View File

@ -0,0 +1,75 @@
// ==============================
// Custom style
// 自定义样式
// ==============================
.button {
background-color: $global-link-color;
transition-duration: 0.4s;
border: none;
border-radius: 5px;
color: $global-background-color;
padding: 8px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-weight: bold;
margin: 4px 2px;
transition-duration: 0.4s;
}
.button:hover {
background-color: $global-link-color-dark;
}
[data-theme="dark"] .button {
background-color: $global-link-color-dark;
transition-duration: 0.4s;
border: none;
border-radius: 5px;
color: $global-background-color-dark;
padding: 8px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-weight: bold;
margin: 4px 2px;
transition-duration: 0.4s;
}
[data-theme="dark"] .button:hover {
background-color: $global-link-color;
}
.field {
background-color: $global-background-color;
transition-duration: 0.4s;
border: 2px solid $global-link-color;
border-radius: 5px;
color: $global-font-color;
padding: 8px 16px;
font-weight: bold;
margin: 4px 2px;
transition-duration: 0.4s;
}
[data-theme="dark"] .field {
background-color: $global-background-color-dark;
transition-duration: 0.4s;
border: 2px solid $global-link-color-dark;
border-radius: 5px;
color: $global-font-color-dark;
padding: 8px 16px;
font-weight: bold;
margin: 4px 2px;
transition-duration: 0.4s;
}
.newsletter {
border-top: 1px dashed $global-link-color;
margin-top: 20px;
}
[theme="dark"] .newsletter {
border-top: 1px dashed $global-link-color-dark;
margin-top: 20px;
}

View File

@ -0,0 +1,4 @@
// ==============================
// Custom style
// 自定义样式
// ==============================

View File

@ -0,0 +1,5 @@
@mixin blur {
.blur & {
@include filter(blur(1.5px));
}
}

View File

@ -0,0 +1,107 @@
@mixin border-radius($value) {
-webkit-border-radius: $value;
-moz-border-radius: $value;
border-radius: $value;
}
@mixin box-shadow($values...) {
-webkit-box-shadow: $values;
box-shadow: $values;
}
@mixin transition($values...) {
-webkit-transition: $values;
-moz-transition: $values;
-o-transition: $values;
transition: $values;
}
@mixin transform($value) {
-webkit-transform: $value;
-ms-transform: $value;
-o-transform: $value;
transform: $value;
}
@mixin filter($value) {
-webkit-filter: $value;
filter: $value;
}
@mixin flex($value) {
-webkit-flex: $value;
flex: $value;
}
@mixin box($orient) {
display: -moz-box;
display: -webkit-box;
display: box;
-webkit-box-orient: $orient;
-moz-box-orient: $orient;
box-orient: $orient;
}
@mixin placeholder($color) {
input::-webkit-input-placeholder {
color: $color;
}
input:-moz-placeholder {
color: $color;
}
input::-moz-placeholder {
color: $color;
}
input:-ms-input-placeholder {
color: $color;
}
input::placeholder {
color: $color;
}
}
@mixin max-content($property) {
#{$property}: -webkit-max-content;
#{$property}: -moz-max-content;
#{$property}: intrinsic;
#{$property}: max-content;
}
@mixin tab-size($value) {
-moz-tab-size: $value;
-o-tab-size: $value;
tab-size: $value;
}
@mixin appearance($value) {
-moz-appearance: $value;
-webkit-appearance: $value;
}
@mixin overflow-wrap($value) {
word-wrap: $value;
overflow-wrap: $value;
}
@mixin line-break($value) {
-webkit-line-break: $value;
-ms-line-break: $value;
line-break: $value;
}
@mixin object-fit($value) {
-o-object-fit: $value;
object-fit: $value;
font-family: 'object-fit: #{$value};';
}
@mixin user-select($value) {
-webkit-user-select: $value !important;
-moz-user-select: $value !important;
user-select: $value !important;
}

View File

@ -0,0 +1,7 @@
@mixin details-transition-open {
@include transition(max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s);
}
@mixin details-transition-close {
@include transition(max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s);
}

View File

@ -0,0 +1,5 @@
@import '_compatibility';
@import '_link';
@import '_blur';
@import '_details';
@import '_z-index';

View File

@ -0,0 +1,46 @@
@mixin link($light, $dark) {
a,
a::before,
a::after {
text-decoration: none;
@if $light {
color: $global-link-color;
}
@else {
color: $single-link-color;
}
[data-theme='dark'] & {
@if $dark {
color: $global-link-color-dark;
}
@else {
color: $single-link-color-dark;
}
}
}
a:active,
a:hover {
@if $light {
color: $global-link-hover-color;
}
@else {
color: $single-link-hover-color;
}
[data-theme='dark'] & {
@if $dark {
color: $global-link-hover-color-dark;
}
@else {
color: $single-link-hover-color-dark;
}
}
}
}

View File

@ -0,0 +1,3 @@
@mixin z-index($level, $diff: 0) {
z-index: ($level * 100) + $diff;
}

View File

@ -0,0 +1,4 @@
// ==============================
// Override Variables
// 覆盖变量
// ==============================

View File

@ -0,0 +1,6 @@
#content-404 {
font-size: 1.8rem;
line-height: 3rem;
@include transform(translateY(30vh));
text-align: center;
}

View File

@ -0,0 +1,27 @@
.archive {
.single-title {
padding: 1rem 0 0.5rem;
margin: 0;
font-size: 1.6rem;
font-weight: bold;
line-height: 140%;
text-align: right;
}
.single-subtitle {
margin: 0.5rem 0;
font-size: 1.2rem;
font-weight: normal;
line-height: 100%;
text-align: right;
}
.group-title {
font-size: 1.2rem;
margin-top: 1.5rem;
margin-bottom: 1rem;
}
@import '../_partials/_archive/terms';
@import '../_partials/_archive/tags';
}

View File

@ -0,0 +1,63 @@
/**
* @Description: Style of layout named 'friends'.
* @Author: Lruihao <https://lruihao.cn>
* @Updated: 2022/3/11 21:36
*/
.friend-links {
margin-top: 1rem;
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
}
@media (max-width: 576px) {
.friend-links {
justify-content: space-around;
}
}
.friend-link {
width: 150px;
height: 200px;
font-size: 1rem;
text-align: center;
background: rgba(255, 255, 255, 0.3);
box-sizing: border-box;
box-shadow: 3px 3px 5px #aaa;
@include border-radius($global-border-radius);
border: none;
transition-duration: 0.3s;
margin-bottom: 1rem;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.friend-link:hover {
background: #fff;
@include transform(scale(1.03));
box-shadow: 0 0 3px #aaa;
}
.friend-avatar {
object-fit: cover;
object-position: center;
width: 100% !important;
height: 150px !important;
@include border-radius($global-border-radius);
margin: 0;
padding: 0;
}
.friend-nickname {
display: block;
position: relative;
color: #2bbc8a;
font-weight: bold;
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
line-height: 18px;
margin-bottom: 1rem;
}
.friend-nickname:hover {
color: #d480aa;
}

View File

@ -0,0 +1,189 @@
.home {
.home-profile {
text-align: center;
.home-avatar {
padding: 0.5rem;
img {
display: inline-block;
width: 8rem;
height: auto;
margin: 0 auto;
@include border-radius(100%);
@include box-shadow(0 0 0 0.3618em rgba(0, 0, 0, 0.05));
@include transition(all 0.4s ease);
[data-theme='dark'] & {
@include box-shadow(0 0 0 0.3618em rgba(255, 255, 255, 0.05));
}
&:hover {
position: relative;
@include transform(translateY(-0.75rem));
}
}
}
.home-title {
font-size: 1.25rem;
font-weight: bold;
margin: 0;
padding: 0.5rem;
}
.home-subtitle {
font-size: 1rem;
font-weight: normal;
margin: 0;
padding: 0.5rem;
}
.links {
padding: 0.5rem;
font-size: 1.5rem;
a * {
vertical-align: text-bottom;
}
img {
height: 1.5rem;
padding: 0 0.25rem;
}
}
.home-disclaimer {
font-size: 1rem;
line-height: 1.5rem;
font-weight: normal;
margin: 0;
padding: 0.5rem;
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
}
}
.home.posts {
.home-profile {
padding: 2rem 0;
}
.home-avatar img {
width: 6rem;
}
.summary {
padding-top: 1rem;
padding-bottom: 0.8rem;
color: $global-font-color;
border-bottom: 1px dashed $global-border-color;
&:first-of-type {
padding-top: 0;
}
[data-theme='dark'] & {
color: $global-font-color-dark;
border-bottom: 1px dashed $global-border-color-dark;
}
.featured-image-preview {
width: 100%;
padding: 30% 0 0;
position: relative;
margin: 0.6rem auto;
@include transition(transform 0.4s ease);
img {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
@include object-fit(cover);
}
&:hover {
@include transform(scale(1.01));
}
}
.single-title {
font-size: 1.25rem;
line-height: 140%;
margin: 0.4rem 0;
}
.content {
@include box(vertical);
-webkit-line-clamp: 3;
margin-top: 0.3rem;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
@include overflow-wrap(break-word);
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
h2,
h3,
h4,
h5,
h6,
p {
font-size: 1rem;
line-height: 1.5;
display: inline;
&::after {
content: '\A';
white-space: pre;
}
}
h2 {
font-size: 1.125rem;
}
@include link(false, true);
b,
strong {
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
}
.post-footer {
margin-top: 0.4rem;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.875rem;
@include link(false, false);
.post-tags {
padding: 0;
@include link(true, true);
.post-tag:not(:last-child)::after {
content: ',';
margin-right: 0.25rem;
}
}
}
}
}

View File

@ -0,0 +1,20 @@
.page {
position: relative;
@extend %page-style;
.content {
[id] {
scroll-margin-top: var(--#{$prefix}scroll-mt);
}
}
@include blur;
}
@import '_single';
@import '_special';
@import '_archive';
@import '_home';
@import '_404';
@import '_offline';
@import '_friends';

View File

@ -0,0 +1,19 @@
#content-offline {
@include transform(translateY(30vh));
text-align: center;
.offline-title {
font-size: 3.6rem;
}
.offline-subtitle {
margin: 0.4rem 0;
font-size: 1rem;
font-weight: normal;
font-style: italic;
line-height: 100%;
color: #57606a;
}
.error-text {
font-size: 1.2rem;
}
}

View File

@ -0,0 +1,393 @@
@import '../_partials/_single/toc';
@import '../_partials/_single/fixit-decryptor';
.single {
.single-title {
padding: 1rem 0 0.5rem;
margin: 0;
font-size: 1.6rem;
font-weight: bold;
line-height: 140%;
.icon-repost {
color: var(--#{$prefix}success);
display: inline-block;
width: max-content;
margin-right: 0.25rem;
[data-theme='dark'] & {
color: var(--#{$prefix}success-dark);
}
}
}
.single-subtitle {
margin: 0.5rem 0;
font-size: 1.2rem;
font-weight: normal;
line-height: 100%;
}
.post-meta {
font-size: 0.875rem;
color: $global-font-secondary-color;
.comment-visitors,
.comment-count {
@extend .print-d-none;
}
span {
display: inline-block;
}
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
@include link(false, true);
.author {
font-size: 1.05rem;
img.avatar {
width: 1.3rem;
height: 1.3rem;
border-radius: 50%;
vertical-align: text-bottom;
border: 0.25px solid $global-border-color;
box-sizing: border-box;
object-position: center;
@include object-fit(cover);
[data-theme='dark'] & {
border-color: $global-border-color-dark;
}
}
}
}
.featured-image {
margin: 0.5rem 0 1rem 0;
img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
margin: 0 auto;
overflow: hidden;
}
}
#content[data-end-flag]:not([data-password])::after {
content: attr(data-end-flag);
display: block;
text-align: center;
color: $global-font-secondary-color;
font-size: 15px;
padding: 5px;
}
.content {
> h1,
> h2 {
font-size: 1.5rem;
& code {
font-size: 1.25rem;
}
}
> h3 {
font-size: 1.375rem;
& code {
font-size: 1.125rem;
}
}
> h4 {
font-size: 1.25rem;
& code {
font-size: 1rem;
}
}
> h5 {
font-size: 1.125rem;
}
> h6 {
font-size: 1rem;
}
h2,
h3,
h4,
h5,
h6 {
font-weight: bold;
margin: 1.2rem 0;
[data-theme='dark'] & {
font-weight: bolder;
}
}
> h2,
> h3,
> h4,
> h5,
> h6 {
> .header-mark::before {
content: '|';
margin-right: 0.3125rem;
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
}
}
> h2 > .header-mark::before {
content: '#';
}
p {
margin: 0.5rem 0;
}
b,
strong {
font-weight: bold;
[data-theme='dark'] & {
color: #ddd;
}
}
@include link(false, false);
a {
white-space: normal;
@include overflow-wrap(break-word);
[data-theme='dark'] & b,
[data-theme='dark'] & strong {
color: $single-link-color-dark;
}
}
[data-theme='dark'] a:hover b,
[data-theme='dark'] a:hover strong {
color: $single-link-hover-color-dark;
}
ul,
ol {
margin: 0.5rem 0;
padding-left: 2.5rem;
}
ul {
list-style-type: disc;
}
ruby {
background: $code-background-color;
rt {
color: $global-font-secondary-color;
}
[data-theme='dark'] & {
background: $code-background-color-dark;
rt {
color: $global-font-secondary-color-dark;
}
}
}
.table-wrapper {
overflow-x: auto;
&::-webkit-scrollbar {
background-color: $table-background-color;
[data-theme='dark'] & {
background-color: $table-background-color-dark;
}
}
> table {
width: 100%;
max-width: 100%;
margin: 0.625rem 0;
border-spacing: 0;
background: $table-background-color;
border-collapse: collapse;
[data-theme='dark'] & {
background: $table-background-color-dark;
}
thead {
background: $table-thead-color;
[data-theme='dark'] & {
background-color: $table-thead-color-dark;
}
}
&:not([class]) tbody {
& tr:nth-child(odd) {
background: darken($table-background-color, 2.25%);
[data-theme='dark'] & {
background-color: lighten($table-background-color-dark, 2.75%);
}
}
& tr:hover {
background: darken($table-background-color, 4.5%);
[data-theme='dark'] & {
background-color: lighten($table-background-color-dark, 5.5%);
}
}
}
th,
td {
padding: 0.3rem 1rem;
border: 1px solid darken($table-thead-color, 2%);
[data-theme='dark'] & {
border-color: darken($table-thead-color-dark, 2%);
}
}
}
}
img {
max-width: 100%;
min-height: 1em;
&:not([data-h]) {
height: auto;
}
&.version {
height: 1.25em;
vertical-align: text-bottom;
}
}
svg {
max-width: 100%;
}
figure {
margin: 0.5rem;
text-align: center;
.image-caption:not(:empty) {
min-width: 20%;
max-width: 80%;
display: inline-block;
padding: 0.5rem;
margin: 0 auto;
font-size: 0.875rem;
color: #969696;
}
img {
display: block;
margin: 0 auto;
overflow: hidden;
&:not([width]) {
width: 100%;
}
}
}
blockquote {
display: block;
border-left: 0.25em solid $global-border-color;
color: $blockquote-color;
padding: 0 1em;
margin: 1rem 0;
ul,
ol {
padding-left: 1.5em;
}
[data-theme='dark'] & {
color: $blockquote-color-dark;
border-left-color: $global-border-color-dark;
}
@include link(false, true);
}
.footnotes {
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
p {
margin: 0.25rem 0;
}
}
@import '../_partials/_single/code';
@import '../_shortcodes';
hr {
margin: 1rem 0;
position: relative;
border-top: 1px dashed $global-border-color;
border-bottom: none;
[data-theme='dark'] & {
border-top: 1px dashed $global-border-color-dark;
}
}
kbd {
display: inline-block;
padding: 0 0.25rem;
background-color: $global-background-color;
border: 1px solid $global-border-color;
border-bottom-color: $global-border-color;
font-size: 0.8rem;
font-family: $code-font-family;
color: $code-color;
@include border-radius($global-border-radius);
@include box-shadow(inset 0 -1px 0 $global-border-color);
[data-theme='dark'] & {
background-color: $global-background-color-dark;
border: 1px solid $global-border-color-dark;
border-bottom-color: $global-border-color-dark;
color: $code-color-dark;
@include box-shadow(inset 0 -1px 0 $global-border-color-dark);
}
}
}
@import '../_partials/_single/reward';
@import '../_partials/_single/footer';
@import '../_partials/_single/comment';
}
.lg-toolbar .lg-icon::after {
color: #999;
}

View File

@ -0,0 +1,6 @@
.special {
.single-title,
.single-subtitle {
text-align: right;
}
}

View File

@ -0,0 +1,69 @@
.tag-cloud-tags {
margin: 10px 0;
@include link(true, true);
a {
display: inline-block;
position: relative;
margin: 5px 10px;
@include overflow-wrap(break-word);
@include transition(all ease-out 0.3s);
&:active,
&:focus,
&:hover {
@include transform(scale(1.2));
sup {
color: $global-font-color;
@include transition(all ease-out 0.3s);
[data-theme='dark'] & {
color: $global-font-color-dark;
}
}
}
sup {
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
}
}
@for $grade from 0 through 10 {
$tag-cloud-color: mix($tag-cloud-end, $tag-cloud-start, $grade * 10);
$tag-cloud-color-dark: mix($tag-cloud-end-dark, $tag-cloud-start-dark, $grade * 10);
.tag-cloud-#{$grade} {
color: $tag-cloud-color!important;
font-size: var(--tag-font);
margin: 10px!important;
&:active,
&:focus,
&:hover {
color: $global-link-hover-color!important;
[data-theme='dark'] & {
color: $global-link-hover-color-dark;
}
sup {
opacity: 1;
}
}
[data-theme='dark'] & {
color: $tag-cloud-color-dark!important;
}
sup {
opacity: 0;
}
}
}

View File

@ -0,0 +1,85 @@
.categories-card {
margin: 0 auto;
display: flex;
align-items: flex-start;
justify-content: space-between;
flex-direction: row;
flex-wrap: wrap;
line-height: 1.6rem;
.card-item {
font-size: 0.875rem;
text-align: left;
width: 45%;
display: flex;
align-items: flex-start;
min-height: 10rem;
padding: 0 2%;
position: relative;
&:nth-child(n+3){
margin-top: 2rem;
}
.card-item-wrapper {
width: 100%;
overflow: hidden;
.card-item-title {
font-size: 1.2rem;
font-weight: bold;
display: inline-block;
margin-top: 1rem;
margin-bottom: 0.75rem;
}
span {
float: right;
padding-right: 1rem;
}
}
}
}
.archive-item {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
margin: 0.25rem 0 0.25rem 1.5rem;
}
.archive-item-link {
min-width: 10%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
&:hover {
color: $global-link-hover-color;
background-color: transparent;
}
[data-theme='dark'] & {
color: $global-link-color-dark;
&:hover {
color: $global-link-hover-color-dark;
}
}
}
.archive-item-date {
text-align: right;
color: $global-font-secondary-color;
white-space: nowrap;
font-variant-numeric: tabular-nums lining-nums;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
.more-post {
text-align: right;
}

View File

@ -0,0 +1,40 @@
.details {
.details-summary {
@include border-radius($global-border-radius);
&:hover {
cursor: pointer;
}
}
i.details-icon {
color: $global-font-secondary-color;
@include transition(transform 0.2s ease);
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
.details-content {
max-height: 0;
overflow-y: hidden;
@include details-transition-open;
}
&.open {
.details-summary {
@include border-radius($global-border-radius $global-border-radius 0 0);
}
i.details-icon {
@include transform(rotate(90deg));
}
.details-content {
max-height: 100%;
@include border-radius(0 0 $global-border-radius $global-border-radius);
@include details-transition-close;
}
}
}

View File

@ -0,0 +1,27 @@
svg.icon {
display: inline-block;
width: 1.25em;
height: 1em;
text-align: center;
path {
fill: currentColor;
}
}
img.emoji {
display: inline-block;
height: 1em;
width: 1em;
margin: 0 0.05em 0 0.1em;
vertical-align: -0.1em;
}
.fixit-icon {
display: inline-block;
height: 1.5em;
width: 1.5em;
line-height: 1.5em;
position: relative;
vertical-align: text-bottom;
}

View File

@ -0,0 +1,3 @@
img {
@include border-radius($global-border-radius/2);
}

View File

@ -0,0 +1,15 @@
// Color map of admonition [$type $color $background-color, ... ]
$admonition-color-map:
'note' #448aff rgba(68, 138, 255, 0.1),
'abstract' #00b0ff rgba(0, 176, 255, 0.1),
'info' #00b8d4 rgba(0, 184, 212, 0.1),
'tip' #00bfa5 rgba(0, 191, 165, 0.1),
'success' #00c853 rgba(0, 200, 83, 0.1),
'question' #64dd17 rgba(100, 221, 23, 0.1),
'warning' #ff9100 rgba(255, 145, 0, 0.1),
'failure' #ff5252 rgba(255, 82, 82, 0.1),
'danger' #ff1744 rgba(255, 23, 68, 0.1),
'bug' #f50057 rgba(245, 0, 87, 0.1),
'example' #651fff rgba(101, 31, 255, 0.1),
'quote' #9e9e9e rgba(159, 159, 159, 0.1)
!default;

View File

@ -0,0 +1,157 @@
// Color map of the code highlight
$code-highlight-color-map: (
/* Error */ 'err': $code-error-color,
/* Keyword */ 'k': #cf222e,
/* KeywordConstant */ 'kc': #0550ae,
/* KeywordDeclaration */ 'kd': #cf222e,
/* KeywordNamespace */ 'kn': #cf222e,
/* KeywordPseudo */ 'kp': #cf222e,
/* KeywordReserved */ 'kr': #cf222e,
/* KeywordType */ 'kt': #cf222e,
/* Name */ 'n': $code-color,
/* NameAttribute */ 'na': #0550ae,
/* NameBuiltin */ 'nb': #0550ae,
/* NameBuiltinPseudo */ 'bp': $code-color,
/* NameClass */ 'nc': #8250df,
/* NameConstant */ 'no': #cf222e,
/* NameDecorator */ 'nd': #8250df,
/* NameEntity */ 'ni': #0550ae,
/* NameException */ 'ne': #0550ae,
/* NameFunction */ 'nf': #0550ae,
/* NameFunctionMagic */ 'fm': #0550ae,
/* NameLabel */ 'nl': #0550ae,
/* NameNamespace */ 'nn': #8250df,
/* NameOther */ 'nx': #0550ae,
/* NameProperty */ 'py': #0550ae,
/* NameTag */ 'nt': #116329,
/* NameVariable */ 'nv': #953800,
/* NameVariableClass */ 'vc': #0550ae,
/* NameVariableGlobal */ 'vg': #0550ae,
/* NameVariableInstance */ 'vi': #0550ae,
/* NameVariableMagic */ 'vm': #0550ae,
/* Literal */ 'l': #0550ae,
/* LiteralDate */ 'ld': #0a3069,
/* LiteralString */ 's': #0a3069,
/* LiteralStringAffix */ 'sa': #0a3069,
/* LiteralStringBacktick */ 'sb': #0a3069,
/* LiteralStringChar */ 'sc': #0a3069,
/* LiteralStringDelimiter */ 'dl': #0a3069,
/* LiteralStringDoc */ 'sd': #0a3069,
/* LiteralStringDouble */ 's2': #0a3069,
/* LiteralStringEscape */ 'se': #0a3069,
/* LiteralStringHeredoc */ 'sh': #0a3069,
/* LiteralStringInterpol */ 'si': #0a3069,
/* LiteralStringOther */ 'sx': #0a3069,
/* LiteralStringRegex */ 'sr': #0a3069,
/* LiteralStringSingle */ 's1': #0a3069,
/* LiteralStringSymbol */ 'ss': #0a3069,
/* LiteralNumber */ 'm': #0550ae,
/* LiteralNumberBin */ 'mb': #0550ae,
/* LiteralNumberFloat */ 'mf': #0550ae,
/* LiteralNumberHex */ 'mh': #0550ae,
/* LiteralNumberInteger */ 'mi': #0550ae,
/* LiteralNumberIntegerLong */ 'il': #0550ae,
/* LiteralNumberOct */ 'mo': #0550ae,
/* Operator */ 'o': #cf222e,
/* OperatorWord */ 'ow': #cf222e,
/* Punctuation */ 'p': $code-color,
/* Comment */ 'c': #6e7781,
/* CommentHashbang */ 'ch': #6e7781,
/* CommentMultiline */ 'cm': #6e7781,
/* CommentSingle */ 'c1': #6e7781,
/* CommentSpecial */ 'cs': #6e7781,
/* CommentPreproc */ 'cp': #0550ae,
/* CommentPreprocFile */ 'cpf': #6e7781,
/* Generic */ 'g': $code-color,
/* GenericDeleted */ 'gd': #82071e,
/* GenericEmph */ 'ge': $code-color,
/* GenericError */ 'gr': $code-error-color,
/* GenericHeading */ 'gh': $code-color,
/* GenericInserted */ 'gi': #116329,
/* GenericOutput */ 'go': $code-color,
/* GenericPrompt */ 'gp': $code-color,
/* GenericStrong */ 'gs': $code-color,
/* GenericSubheading */ 'gu': $code-color,
/* GenericTraceback */ 'gt': $code-error-color,
/* GenericUnderline */ 'gl': $code-color,
/* TextWhitespace */ 'w': $code-color,
/* Other */ 'x': $code-color
) !default;
$code-highlight-color-map-dark: (
/* Error */ 'err': $code-error-color,
/* Keyword */ 'k': #f47067,
/* KeywordConstant */ 'kc': #6cb6ff,
/* KeywordDeclaration */ 'kd': #f47067,
/* KeywordNamespace */ 'kn': #f47067,
/* KeywordPseudo */ 'kp': #f47067,
/* KeywordReserved */ 'kr': #f47067,
/* KeywordType */ 'kt': #f47067,
/* Name */ 'n': $code-color-dark,
/* NameAttribute */ 'na': #6cb6ff,
/* NameBuiltin */ 'nb': #dcbdfb,
/* NameBuiltinPseudo */ 'bp': $code-color-dark,
/* NameClass */ 'nc': #dcbdfb,
/* NameConstant */ 'no': #6cb6ff,
/* NameDecorator */ 'nd': #dcbdfb,
/* NameEntity */ 'ni': #6cb6ff,
/* NameException */ 'ne': #6cb6ff,
/* NameFunction */ 'nf': #dcbdfb,
/* NameFunctionMagic */ 'fm': #6cb6ff,
/* NameLabel */ 'nl': #6cb6ff,
/* NameNamespace */ 'nn': #f47067,
/* NameOther */ 'nx': #dcbdfb,
/* NameProperty */ 'py': #6cb6ff,
/* NameTag */ 'nt': #8ddb8c,
/* NameVariable */ 'nv': #f69d50,
/* NameVariableClass */ 'vc': #6cb6ff,
/* NameVariableGlobal */ 'vg': #6cb6ff,
/* NameVariableInstance */ 'vi': #6cb6ff,
/* NameVariableMagic */ 'vm': #6cb6ff,
/* Literal */ 'l': #6cb6ff,
/* LiteralDate */ 'ld': #96d0ff,
/* LiteralString */ 's': #96d0ff,
/* LiteralStringAffix */ 'sa': #96d0ff,
/* LiteralStringBacktick */ 'sb': #96d0ff,
/* LiteralStringChar */ 'sc': #96d0ff,
/* LiteralStringDelimiter */ 'dl': #96d0ff,
/* LiteralStringDoc */ 'sd': #96d0ff,
/* LiteralStringDouble */ 's2': #96d0ff,
/* LiteralStringEscape */ 'se': #96d0ff,
/* LiteralStringHeredoc */ 'sh': #96d0ff,
/* LiteralStringInterpol */ 'si': #96d0ff,
/* LiteralStringOther */ 'sx': #96d0ff,
/* LiteralStringRegex */ 'sr': #96d0ff,
/* LiteralStringSingle */ 's1': #96d0ff,
/* LiteralStringSymbol */ 'ss': #96d0ff,
/* LiteralNumber */ 'm': #6cb6ff,
/* LiteralNumberBin */ 'mb': #6cb6ff,
/* LiteralNumberFloat */ 'mf': #6cb6ff,
/* LiteralNumberHex */ 'mh': #6cb6ff,
/* LiteralNumberInteger */ 'mi': #6cb6ff,
/* LiteralNumberIntegerLong */ 'il': #6cb6ff,
/* LiteralNumberOct */ 'mo': #6cb6ff,
/* Operator */ 'o': #f47067,
/* OperatorWord */ 'ow': #f47067,
/* Punctuation */ 'p': $code-color-dark,
/* Comment */ 'c': #768390,
/* CommentHashbang */ 'ch': #768390,
/* CommentMultiline */ 'cm': #768390,
/* CommentSingle */ 'c1': #768390,
/* CommentSpecial */ 'cs': #768390,
/* CommentPreproc */ 'cp': #6cb6ff,
/* CommentPreprocFile */ 'cpf': #768390,
/* Generic */ 'g': $code-color-dark,
/* GenericDeleted */ 'gd': #ffd8d3,
/* GenericEmph */ 'ge': $code-color-dark,
/* GenericError */ 'gr': $code-error-color,
/* GenericHeading */ 'gh': $code-color-dark,
/* GenericInserted */ 'gi': #b4f1b4,
/* GenericOutput */ 'go': $code-color-dark,
/* GenericPrompt */ 'gp': $code-color-dark,
/* GenericStrong */ 'gs': $code-color-dark,
/* GenericSubheading */ 'gu': $code-color-dark,
/* GenericTraceback */ 'gt': $code-error-color,
/* GenericUnderline */ 'gl': $code-color-dark,
/* TextWhitespace */ 'w': $code-color-dark,
/* Other */ 'x': $code-color-dark
) !default;

View File

@ -0,0 +1,373 @@
// Code type map
$code-type-map: (
// Chroma supported languages
// @generator https://github.com/hugo-fixit/.tools/blob/main/tampermonkey/code-type-map-fetcher.user.js
"abap": "ABAP",
"abnf": "ABNF",
"as": "ActionScript",
"actionscript": "ActionScript",
"as3": "ActionScript 3",
"actionscript3": "ActionScript 3",
"ada": "Ada",
"ada95": "Ada",
"ada2005": "Ada",
"al": "AL",
"ng2": "Angular2",
"antlr": "ANTLR",
"apacheconf": "ApacheConf",
"aconf": "ApacheConf",
"apache": "ApacheConf",
"apl": "APL",
"applescript": "AppleScript",
"arduino": "Arduino",
"armasm": "ArmAsm",
"awk": "Awk",
"gawk": "Awk",
"mawk": "Awk",
"nawk": "Awk",
"ballerina": "Ballerina",
"make": "Base Makefile",
"makefile": "Base Makefile",
"mf": "Base Makefile",
"bsdmake": "Base Makefile",
"bash": "Bash",
"sh": "Bash",
"ksh": "Bash",
"zsh": "Bash",
"shell": "Bash",
"bash-session": "BashSession",
"console": "BashSession",
"shell-session": "BashSession",
"bat": "Batchfile",
"batch": "Batchfile",
"dosbatch": "Batchfile",
"winbatch": "Batchfile",
"bib": "BibTeX",
"bibtex": "BibTeX",
"bicep": "Bicep",
"blitzbasic": "BlitzBasic",
"b3d": "BlitzBasic",
"bplus": "BlitzBasic",
"bnf": "BNF",
"brainfuck": "Brainfuck",
"bf": "Brainfuck",
"c": "C",
"csharp": "C#",
"c\\#": "C#",
"cpp": "C++",
"c\\+\\+": "C++",
"caddyfile": "Caddyfile",
"caddy": "Caddyfile",
"caddyfile-directives": "Caddyfile Directives",
"caddyfile-d": "Caddyfile Directives",
"caddy-d": "Caddyfile Directives",
"capnp": "Cap'n Proto",
"cassandra": "Cassandra CQL",
"cql": "Cassandra CQL",
"ceylon": "Ceylon",
"cfengine3": "CFEngine3",
"cf3": "CFEngine3",
"cfs": "cfstatement",
"chai": "ChaiScript",
"chaiscript": "ChaiScript",
"cheetah": "Cheetah",
"spitfire": "Cheetah",
"clojure": "Clojure",
"clj": "Clojure",
"cmake": "CMake",
"cobol": "COBOL",
"coffee-script": "CoffeeScript",
"coffeescript": "CoffeeScript",
"coffee": "CoffeeScript",
"common-lisp": "Common Lisp",
"cl": "Common Lisp",
"lisp": "Common Lisp",
"coq": "Coq",
"cr": "Crystal",
"crystal": "Crystal",
"css": "CSS",
"cython": "Cython",
"pyx": "Cython",
"pyrex": "Cython",
"d": "D",
"dart": "Dart",
"diff": "Diff",
"udiff": "Diff",
"django": "Django/Jinja",
"jinja": "Django/Jinja",
"docker": "Docker",
"dockerfile": "Docker",
"dtd": "DTD",
"dylan": "Dylan",
"ebnf": "EBNF",
"elixir": "Elixir",
"ex": "Elixir",
"exs": "Elixir",
"elm": "Elm",
"emacs": "EmacsLisp",
"elisp": "EmacsLisp",
"emacs-lisp": "EmacsLisp",
"erlang": "Erlang",
"factor": "Factor",
"fennel": "Fennel",
"fnl": "Fennel",
"fish": "Fish",
"fishshell": "Fish",
"forth": "Forth",
"fortran": "Fortran",
"fortranfixed": "FortranFixed",
"fsharp": "FSharp",
"gas": "GAS",
"asm": "GAS",
"gdscript": "GDScript",
"gd": "GDScript",
"genshi": "Genshi",
"kid": "Genshi",
"xml\\+genshi": "Genshi",
"xml\\+kid": "Genshi",
"html\\+genshi": "Genshi HTML",
"html\\+kid": "Genshi HTML",
"genshitext": "Genshi Text",
"cucumber": "Gherkin",
"Cucumber": "Gherkin",
"gherkin": "Gherkin",
"Gherkin": "Gherkin",
"glsl": "GLSL",
"gnuplot": "Gnuplot",
"go": "Go",
"golang": "Go",
"go-html-template": "Go HTML Template",
"go-text-template": "Go Text Template",
"graphql": "GraphQL",
"graphqls": "GraphQL",
"gql": "GraphQL",
"groff": "Groff",
"nroff": "Groff",
"man": "Groff",
"groovy": "Groovy",
"handlebars": "Handlebars",
"hbs": "Handlebars",
"haskell": "Haskell",
"hs": "Haskell",
"hx": "Haxe",
"haxe": "Haxe",
"hxsl": "Haxe",
"hcl": "HCL",
"hexdump": "Hexdump",
"hlb": "HLB",
"html": "HTML",
"http": "HTTP",
"hylang": "Hy",
"idris": "Idris",
"idr": "Idris",
"igor": "Igor",
"igorpro": "Igor",
"ini": "INI",
"cfg": "INI",
"dosini": "INI",
"io": "Io",
"j": "J",
"java": "Java",
"js": "JavaScript",
"javascript": "JavaScript",
"json": "JSON",
"julia": "Julia",
"jl": "Julia",
"jungle": "Jungle",
"kotlin": "Kotlin",
"lighty": "Lighttpd configuration file",
"lighttpd": "Lighttpd configuration file",
"llvm": "LLVM",
"lua": "Lua",
"mako": "Mako",
"md": "markdown",
"mkd": "markdown",
"mason": "Mason",
"mathematica": "Mathematica",
"mma": "Mathematica",
"nb": "Mathematica",
"matlab": "Matlab",
"mcfunction": "mcfunction",
"meson": "Meson",
"meson\\.build": "Meson",
"metal": "Metal",
"minizinc": "MiniZinc",
"MZN": "MiniZinc",
"mzn": "MiniZinc",
"mlir": "MLIR",
"modula2": "Modula-2",
"m2": "Modula-2",
"monkeyc": "MonkeyC",
"morrowind": "MorrowindScript",
"mwscript": "MorrowindScript",
"myghty": "Myghty",
"mysql": "MySQL",
"mariadb": "MySQL",
"nasm": "NASM",
"newspeak": "Newspeak",
"nginx": "Nginx configuration file",
"nim": "Nim",
"nimrod": "Nim",
"nixos": "Nix",
"nix": "Nix",
"objective-c": "Objective-C",
"objectivec": "Objective-C",
"obj-c": "Objective-C",
"objc": "Objective-C",
"ocaml": "OCaml",
"octave": "Octave",
"ones": "OnesEnterprise",
"onesenterprise": "OnesEnterprise",
"1S": "OnesEnterprise",
"1S:Enterprise": "OnesEnterprise",
"openedge": "OpenEdge ABL",
"abl": "OpenEdge ABL",
"progress": "OpenEdge ABL",
"openedgeabl": "OpenEdge ABL",
"openscad": "OpenSCAD",
"org": "Org Mode",
"orgmode": "Org Mode",
"pacmanconf": "PacmanConf",
"perl": "Perl",
"pl": "Perl",
"php": "PHP",
"php3": "PHP",
"php4": "PHP",
"php5": "PHP",
"phtml": "PHTML",
"pig": "Pig",
"pkgconfig": "PkgConfig",
"plpgsql": "PL/pgSQL",
"text": "plaintext",
"plain": "plaintext",
"no-highlight": "plaintext",
"plutus-core": "Plutus Core",
"plc": "Plutus Core",
"pony": "Pony",
"postgresql": "PostgreSQL SQL dialect",
"postgres": "PostgreSQL SQL dialect",
"postscript": "PostScript",
"postscr": "PostScript",
"pov": "POVRay",
"powerquery": "PowerQuery",
"pq": "PowerQuery",
"powershell": "PowerShell",
"posh": "PowerShell",
"ps1": "PowerShell",
"psm1": "PowerShell",
"psd1": "PowerShell",
"prolog": "Prolog",
"promql": "PromQL",
"protobuf": "Protocol Buffer",
"proto": "Protocol Buffer",
"puppet": "Puppet",
"python": "Python",
"py": "Python",
"sage": "Python",
"python3": "Python",
"py3": "Python",
"python2": "Python 2",
"py2": "Python 2",
"qbasic": "QBasic",
"basic": "QBasic",
"qml": "QML",
"qbs": "QML",
"splus": "R",
"s": "R",
"r": "R",
"racket": "Racket",
"rkt": "Racket",
"ragel": "Ragel",
"perl6": "Raku",
"pl6": "Raku",
"raku": "Raku",
"jsx": "react",
"react": "react",
"reason": "ReasonML",
"reasonml": "ReasonML",
"registry": "reg",
"rst": "reStructuredText",
"rest": "reStructuredText",
"restructuredtext": "reStructuredText",
"rexx": "Rexx",
"arexx": "Rexx",
"rb": "Ruby",
"ruby": "Ruby",
"duby": "Ruby",
"rust": "Rust",
"rs": "Rust",
"sas": "SAS",
"sass": "Sass",
"scala": "Scala",
"scheme": "Scheme",
"scm": "Scheme",
"scilab": "Scilab",
"scss": "SCSS",
"sieve": "Sieve",
"smalltalk": "Smalltalk",
"squeak": "Smalltalk",
"st": "Smalltalk",
"smarty": "Smarty",
"snobol": "Snobol",
"sol": "Solidity",
"solidity": "Solidity",
"sparql": "SPARQL",
"sql": "SQL",
"squidconf": "SquidConf",
"squid\\.conf": "SquidConf",
"squid": "SquidConf",
"sml": "Standard ML",
"stylus": "Stylus",
"svelte": "Svelte",
"swift": "Swift",
"systemd": "SYSTEMD",
"systemverilog": "systemverilog",
"sv": "systemverilog",
"tablegen": "TableGen",
"tasm": "TASM",
"tcl": "Tcl",
"tcsh": "Tcsh",
"csh": "Tcsh",
"termcap": "Termcap",
"terminfo": "Terminfo",
"terraform": "Terraform",
"tf": "Terraform",
"tex": "TeX",
"latex": "TeX",
"thrift": "Thrift",
"toml": "TOML",
"tradingview": "TradingView",
"tv": "TradingView",
"tsql": "Transact-SQL",
"t-sql": "Transact-SQL",
"turing": "Turing",
"turtle": "Turtle",
"twig": "Twig",
"ts": "TypeScript",
"tsx": "TypeScript",
"typescript": "TypeScript",
"typoscript": "TypoScript",
"typoscriptcssdata": "TypoScriptCssData",
"typoscripthtmldata": "TypoScriptHtmlData",
"v": "verilog",
"vlang": "V",
"vsh": "V shell",
"vshell": "V shell",
"vb\\.net": "VB.net",
"vbnet": "VB.net",
"verilog": "verilog",
"vhdl": "VHDL",
"vim": "VimL",
"vue": "vue",
"vuejs": "vue",
"whiley": "Whiley",
"xml": "XML",
"xorg\\.conf": "Xorg",
"yaml": "YAML",
"yang": "YANG",
"zed": "Zed",
"zig": "Zig",
// Custom code type
"markdown": "markdown",
"yml": "YAML"
) !default;

View File

@ -0,0 +1,17 @@
// Theme colors
$primary: #1772ee !default;
$secondary: #919191 !default;
$success: #13ce66 !default;
$info: #0dcaf0 !default;
$warning: #ffba00 !default;
$danger: #ff4949 !default;
// Theme colors map
$theme-colors: (
'primary': $primary,
'secondary': $secondary,
'success': $success,
'info': $info,
'warning': $warning,
'danger': $danger
) !default;

View File

@ -0,0 +1,13 @@
// Utilities
// property order
$orders: (
first: -1,
0: 0,
1: 1,
2: 2,
3: 3,
4: 4,
5: 5,
last: 6,
) !default;

View File

@ -0,0 +1,16 @@
#mask {
background-repeat: no-repeat;
background-position: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0);
@include z-index(0, -1);
.blur & {
@include z-index(1);
background-color: rgba(0, 0, 0, 0.25);
}
}

View File

@ -0,0 +1,364 @@
// inline code
code {
padding: 0.2em 0.4em;
margin: 0;
font-size: $code-font-size;
font-family: $code-font-family;
color: $code-color;
background-color: rgba(175, 184, 193, 0.2);
text-decoration: inherit;
@include border-radius($global-border-radius);
@include overflow-wrap(break-word);
@include line-break(auto);
[data-theme='dark'] & {
color: $code-color-dark;
background-color: rgba(99, 110, 123, 0.4);
}
}
// indented code
pre {
margin: 0;
line-height: 1.45em;
padding: 0.5rem;
overflow: auto;
font-size: $code-font-size;
font-family: $code-font-family;
@include border-radius($global-border-radius);
@include tab-size(4);
background-color: $code-background-color;
[data-theme='dark'] & {
background-color: $code-background-color-dark;
}
code {
padding: 0;
background-color: transparent;
@include border-radius(0);
@include max-content(min-width);
[data-theme='dark'] & {
background-color: transparent;
}
}
img {
min-height: 1em;
max-height: 1.2em;
vertical-align: text-bottom;
}
}
.highlight,
.gist {
font-size: $code-font-size;
font-family: $code-font-family;
.table-wrapper {
> table,
> table thead,
> table tr,
> table td {
margin: 0;
padding: 0;
border: none !important;
white-space: nowrap;
}
}
}
// block fenced code
.highlight {
margin: 0.5rem 0;
> .chroma {
position: relative;
.code-header {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
width: 100%;
font-family: $global-font-family;
font-weight: bold;
line-height: 1.4em;
color: $code-info-color;
background-color: darken($code-background-color, 3%);
@include border-radius($global-border-radius);
@include transition(border-radius 0.2s ease);
[data-theme='dark'] & {
color: $code-info-color-dark;
background-color: darken($code-background-color-dark, 6%);
}
&:hover {
cursor: pointer;
}
.ellipses,
.edit,
.copy {
@extend .print-d-none;
}
.code-title {
width: 100%;
padding: 0.4rem;
.arrow {
padding: 0 0.2rem;
@include transition(transform 0.2s ease);
}
.title-inner {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
}
.code-title::after {
padding-left: 0.2rem;
content: 'Code';
}
.ellipses {
padding: 0.4rem;
}
.edit,
.copy {
display: none;
padding: 0.4rem;
&:hover {
cursor: pointer;
color: $global-link-hover-color;
[data-theme='dark'] & {
color: $global-link-hover-color-dark;
}
}
}
@each $type, $text in $code-type-map {
&.language-#{$type} .code-title::after {
content: $text;
}
}
}
// delayed loading table-wrapper
.table-wrapper {
max-height: 0;
overflow: hidden;
@include border-radius(0 0 $global-border-radius $global-border-radius);
@include details-transition-open;
}
table {
border-spacing: 0;
width: auto;
overflow: auto;
display: block;
background-color: $code-background-color;
[data-theme='dark'] & {
background-color: $code-background-color-dark;
}
td {
vertical-align: top;
padding: 0;
}
pre {
padding: 0.25rem;
outline-offset: -1px;
@include border-radius(0);
}
/* lineNumbersInTable=false */
.ln {
min-width: 1.25rem;
}
// ========== lineNumbersInTable ========== //
// line numbers
.lntd:first-child {
min-width: 1.6rem;
text-align: right;
position: sticky;
left: 0;
pre {
@include user-select(none);
}
}
// code content
.lntd:last-child {
width: 100%;
pre {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
code {
width: 100%;
}
}
// ========== lineNumbersInTable ========== //
}
&.open {
.code-header {
background-color: darken($code-background-color, 6%);
@include border-radius($global-border-radius $global-border-radius 0 0);
[data-theme='dark'] & {
background-color: darken($code-background-color-dark, 3%);
}
}
.table-wrapper {
max-height: 100%;
@include details-transition-close;
}
.arrow {
@include transform(rotate(90deg));
}
.ellipses {
display: none;
}
.edit,
.copy {
display: inline;
}
}
}
/* LineHighlight */
.hl {
display: block;
background-color: $code-hightlight-color;
box-shadow: -0.5rem 0 0 $code-hightlight-color, 0.5rem 0 0 $code-hightlight-color;
[data-theme='dark'] & {
background-color: $code-hightlight-color-dark;
box-shadow: -0.5rem 0 0 $code-hightlight-color-dark, 0.5rem 0 0 $code-hightlight-color-dark;
}
}
/* GenericUnderline */
.gl {
text-decoration: underline;
}
/* GenericStrong */
.gs {
font-weight: bold;
}
/* GenericEmph */
.ge {
font-style: italic;
}
/* lineNumbersInTable=false */
.ln {
padding-right: 0.5rem;
display: inline-block;
min-width: 1.1rem;
text-align: right;
}
/* LineNumbers */
.lnt,
.ln {
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
}
// ========== Higtlight Color ========== //
/* Error */
.err {
font-style: italic;
border-bottom: 1px dotted $code-error-color;
}
/* GenericDeleted */
.gd {
background-color: #ffebe9;
[data-theme='dark'] & {
background-color: #78191b;
}
}
/* GenericInserted */
.gi {
background-color: #dafbe1;
[data-theme='dark'] & {
background-color: #1b4721;
}
}
@each $class, $color in $code-highlight-color-map {
.#{$class} {
color: $color;
}
}
[data-theme='dark'] & {
@each $class, $color in $code-highlight-color-map-dark {
.#{$class} {
color: $color;
}
}
}
// ========== Higtlight Color ========== //
}
// gist shortcode
.gist {
.gist-file,
.gist-data,
.gist-meta {
border: none;
}
.gist-data {
background-color: transparent;
}
.gist-meta {
padding: 0.4rem 0.8rem;
@include link(false, false);
background-color: darken($code-background-color, 5%);
[data-theme='dark'] & {
background-color: darken($code-background-color-dark, 5%);
}
}
.table-wrapper {
.highlight,
&::-webkit-scrollbar {
background-color: #f6f8fa;
[data-theme='dark'] & {
background-color: #2d333b;
}
}
}
[data-theme='dark'] & {
@import './github-dark-dimmed';
}
}

View File

@ -0,0 +1,4 @@
>#comments {
padding: 2rem 0;
@extend .print-d-none;
}

View File

@ -0,0 +1,67 @@
.fixit-decryptor-container {
font-family: $global-font-family;
text-align: center;
margin-top: 3rem;
.fixit-encryptor-shortcode & {
margin-top: 1rem;
}
#fixit-decryptor-input,
.fixit-decryptor-input,
.fixit-encryptor-btn {
display: inline-block;
box-sizing: border-box;
outline: none;
color: $global-font-color;
border: 1px solid darken($global-border-color, 15%);
border-radius: $global-border-radius;
@include transition(all 0.1s ease-out);
box-shadow: 0px 0px 5px 0px darken($global-border-color, 15%);
&:active,
&:focus,
&:hover {
color: darken($global-link-hover-color, 6%);
border-color: $global-link-hover-color;
box-shadow: 0px 0px 5px 0px lighten($global-link-hover-color, 20%);
[data-theme='dark'] & {
color: lighten($global-link-hover-color-dark, 6%);
border-color: $global-link-hover-color-dark;
box-shadow: 0px 0px 5px 0px darken($global-link-hover-color-dark, 20%);
}
}
[data-theme='dark'] & {
color: $global-font-color-dark;
border-color: lighten($global-border-color-dark, 15%);
box-shadow: 0px 0px 5px 0px lighten($global-border-color-dark, 15%);
}
}
#fixit-decryptor-input,
.fixit-decryptor-input {
width: clamp(50%, 400px, 100%);
height: 3rem;
padding-left: 1rem;
padding-right: 1rem;
background-color: $global-background-color;
[data-theme='dark'] & {
background-color: $global-background-color-dark;
}
}
.fixit-encryptor-btn {
cursor: pointer;
@include transition(all 0.1s ease-out);
padding: 0.6rem 1rem;
background-color: $header-background-color;
[data-theme='dark'] & {
background-color: $header-background-color-dark;
}
}
}

View File

@ -0,0 +1,115 @@
.post-footer {
margin: 2rem 0;
&:has(~.post-reward) {
margin-bottom: 0;
}
.post-info {
border-bottom: 1px solid $global-border-color;
padding: 1rem 0 0.3rem;
[data-theme='dark'] & {
border-bottom: 1px solid $global-border-color-dark;
}
.post-info-line {
display: flex;
justify-content: space-between;
.post-info-mod {
font-size: 0.8em;
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
@include link(false, false);
}
.post-info-license {
font-size: 0.8em;
color: $global-font-secondary-color;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
}
@include link(false, false);
}
.post-info-md {
font-size: 0.8rem;
width: fit-content;
@include link(false, false);
>span:not(:first-child)::before {
content: '|';
margin-left: 0.25rem;
margin-right: 0.25rem;
}
}
.post-info-share {
@extend .print-d-none;
a * {
vertical-align: text-bottom;
}
}
}
}
.post-info-more {
padding: 0.3rem 0 1rem;
display: flex;
justify-content: space-between;
font-size: 0.9rem;
section:last-child {
@extend .print-d-none;
}
}
.post-tags {
max-width: 65%;
* {
display: inline;
}
@include link(true, true);
.post-tag:not(:last-child)::after {
content: ',';
margin-right: 0.25rem;
}
}
.post-nav {
display: flex;
justify-content: space-between;
gap: 1.5rem;
@extend .print-d-none;
.post-nav-item {
flex: 1;
font-size: 1rem;
font-weight: 600;
@include transition(all 0.3s ease-out);
&[rel='next'] {
text-align: right;
}
&[rel='prev']:hover {
@include transform(translateX(-4px));
}
&[rel='next']:hover {
@include transform(translateX(4px));
}
}
}
}

View File

@ -0,0 +1,169 @@
/**
* Theme: GitHub Dark Dimmed
* Description: Dark Dimmed theme as seen on github.com
* Author: github.com
* Maintainer: https://github.com/hugo-fixit/FixIt
* Updated: 2022-03-01
*/
& {
--color-fg-default: #adbac7;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
.blob-num,
.blob-code-inner {
color: val(--color-fg-default);
}
.pl-c /* comment, punctuation.definition.comment, string.comment */ {
color: var(--color-prettylights-syntax-comment);
}
.pl-c1 /* constant, entity.name.constant, variable.other.constant, variable.language, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header, meta.output */,
.pl-s .pl-v /* string variable */ {
color: var(--color-prettylights-syntax-constant);
}
.pl-e /* entity */,
.pl-en /* entity.name */ {
color: var(--color-prettylights-syntax-entity);
}
.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
.pl-s .pl-s1 /* string source */ {
color: var(--color-prettylights-syntax-storage-modifier-import);
}
.pl-ent /* entity.name.tag, markup.quote */ {
color: var(--color-prettylights-syntax-entity-tag);
}
.pl-k /* keyword, storage, storage.type */ {
color: var(--color-prettylights-syntax-keyword);
}
.pl-s /* string */,
.pl-pds /* punctuation.definition.string, source.regexp, string.regexp.character-class */,
.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */,
.pl-sr /* string.regexp */,
.pl-sr .pl-cce /* string.regexp constant.character.escape */,
.pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
color: var(--color-prettylights-syntax-string);
}
.pl-v /* variable */,
.pl-smw /* sublimelinter.mark.warning */ {
color: var(--color-prettylights-syntax-variable);
}
.pl-bu /* invalid.broken, invalid.deprecated, invalid.unimplemented, message.error, brackethighlighter.unmatched, sublimelinter.mark.error */ {
color: var(--color-prettylights-syntax-brackethighlighter-unmatched);
}
.pl-ii /* invalid.illegal */ {
color: var(--color-prettylights-syntax-invalid-illegal-text);
background-color: var(--color-prettylights-syntax-invalid-illegal-bg);
}
.pl-c2 /* carriage-return */ {
color: var(--color-prettylights-syntax-carriage-return-text);
background-color: var(--color-prettylights-syntax-carriage-return-bg);
}
.pl-c2::before /* carriage-return */ {
content: '^M';
}
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
font-weight: bold;
color: var(--color-prettylights-syntax-string-regexp);
}
.pl-ml /* markup.list */ {
color: var(--color-prettylights-syntax-markup-list);
}
.pl-mh /* markup.heading */,
.pl-mh .pl-en /* markup.heading entity.name */,
.pl-ms /* meta.separator */ {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-heading);
}
.pl-mi /* markup.italic */ {
font-style: italic;
color: var(--color-prettylights-syntax-markup-italic);
}
.pl-mb /* markup.bold */ {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-bold);
}
.pl-md /* markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted */ {
color: var(--color-prettylights-syntax-markup-deleted-text);
background-color: var(--color-prettylights-syntax-markup-deleted-bg);
}
.pl-mi1 /* markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted */ {
color: var(--color-prettylights-syntax-markup-inserted-text);
background-color: var(--color-prettylights-syntax-markup-inserted-bg);
}
.pl-mc /* markup.changed, punctuation.definition.changed */ {
color: var(--color-prettylights-syntax-markup-changed-text);
background-color: var(--color-prettylights-syntax-markup-changed-bg);
}
.pl-mi2 /* markup.ignored, markup.untracked */ {
color: var(--color-prettylights-syntax-markup-ignored-text);
background-color: var(--color-prettylights-syntax-markup-ignored-bg);
}
.pl-mdr /* meta.diff.range */ {
font-weight: bold;
color: var(--color-prettylights-syntax-meta-diff-range);
}
.pl-ba /* brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote */ {
color: var(--color-prettylights-syntax-brackethighlighter-angle);
}
.pl-sg /* sublimelinter.gutter-mark */ {
color: var(--color-prettylights-syntax-sublimelinter-gutter-mark);
}
.pl-corl /* constant.other.reference.link, string.other.link */ {
text-decoration: underline;
color: var(--color-prettylights-syntax-constant-other-reference-link);
}
}

View File

@ -0,0 +1,101 @@
.post-reward {
padding: 1rem;
text-align: center;
@extend .print-d-none;
&~.post-footer {
margin-top: 0;
}
&:has(.reward-ways:empty) {
display: none;
}
.comment {
margin: 0.5rem 0;
font-weight: 500;
}
.reward-ways {
display: none;
}
.reward-input:checked~.reward-ways {
display: block;
padding-top: 20px;
div {
display: inline-block;
@include user-select(none);
span {
display: block;
}
&:hover span[data-animation] {
animation: var(--animation-reward, jackInTheBox) 0.8s infinite linear;
// The animation may affect :hover of img in dark mode
pointer-events: none;
}
img {
display: inline-block;
margin: 0.8em 2em 0;
max-width: 100%;
width: $reward-img-width;
}
}
// `fixed` mode only supports desktop
&[data-mode='fixed'] {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 1rem;
background-color: $global-background-color;
@include z-index(2);
@include border-radius($global-border-radius);
@include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.2));
[data-theme='dark'] & {
background-color: $global-background-color-dark;
@include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.2));
}
}
}
.reward-button {
display: inline-block;
box-sizing: border-box;
cursor: pointer;
outline: none;
color: lighten($reward-color, 5%);
border: 2px solid lighten($reward-color, 10%);
border-radius: $global-border-radius;
padding: 0.6rem 1rem;
background-color: $global-background-color;
vertical-align: text-top;
line-height: 1rem;
@include transition(all 0.3s ease-out);
&:active,
&:hover {
color: #ffffff;
border-color: $reward-color;
background-color: $reward-color;
[data-theme='dark'] & {
color: #ffffff;
border-color: $reward-color-dark;
background-color: $reward-color-dark;
}
}
[data-theme='dark'] & {
color: $reward-color;
border-color: lighten($reward-color, 5%);
background-color: $global-background-color-dark;
}
}
}

View File

@ -0,0 +1,178 @@
.toc {
.toc-title {
font-size: $toc-title-font-size;
font-weight: bold;
text-transform: uppercase;
}
.toc-content {
font-size: $toc-content-font-size;
ul {
text-indent: -0.8rem;
padding-left: 0.8rem;
list-style: none;
a:first-child::before {
content: '|';
font-weight: bolder;
margin-right: 0.5rem;
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
}
ul {
padding-left: 1.5rem;
}
}
}
ruby {
background: $code-background-color;
rt {
color: $global-font-secondary-color;
}
[data-theme='dark'] & {
background: $code-background-color-dark;
rt {
color: $global-font-secondary-color-dark;
}
}
}
}
#toc-auto {
display: block;
position: sticky;
top: var(--#{$prefix}scroll-mt);
box-sizing: border-box;
visibility: hidden;
@include z-index(1);
@include overflow-wrap(break-word);
@include blur;
@extend .print-d-none;
[data-header-desktop='normal'] & {
--#{$prefix}scroll-mt: #{$global-scroll-margin-top};
}
.toc-title {
margin: 0.5rem 0;
cursor: pointer;
@include user-select(none);
&::before {
content: '|';
font-weight: bolder;
margin-right: 0.5rem;
color: $global-border-color;
[data-theme='dark'] & {
color: $global-border-color-dark;
}
}
i.toc-icon {
@include transition(transform 0.2s ease);
}
}
&.toc-hidden i.toc-icon {
@include transform(rotate(-90deg));
@include transition(transform 0.2s ease);
}
.toc-content {
overflow-y: scroll;
max-height: calc(100vh - #{2*$header-height});
&::-webkit-scrollbar {
width: 0;
}
&.always-active ul {
display: block;
}
> nav > ul {
margin: 0;
}
ul {
ul {
display: none;
}
.has-active > ul {
display: block;
}
}
a.active {
font-weight: bold;
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
&::before {
color: $single-link-hover-color;
[data-theme='dark'] & {
color: $single-link-hover-color-dark;
}
}
}
}
}
#toc-static {
display: none;
margin: 0.8rem 0;
&[data-kept='true'] {
display: block;
}
.toc-title {
display: flex;
justify-content: space-between;
line-height: 2em;
padding: 0 0.75rem;
background: darken($code-background-color, 3%);
[data-theme='dark'] & {
background: darken($code-background-color-dark, 6%);
}
}
.toc-content {
background-color: $code-background-color;
> nav > ul {
margin: 0;
padding: 0.4rem 1rem 0.4rem 1.8rem;
}
[data-theme='dark'] & {
background-color: $code-background-color-dark;
}
}
&.open {
.toc-title {
background: darken($code-background-color, 6%);
[data-theme='dark'] & {
background: darken($code-background-color-dark, 3%);
}
}
}
}

View File

@ -0,0 +1,6 @@
@import '_widgets/cookieconsent';
@import '_widgets/fixed-button';
@import '_widgets/github-corner';
@import '_widgets/noscript-warning';
@import '_widgets/reading-progress';
@import '_widgets/typeit';

View File

@ -0,0 +1,19 @@
.cc-window.cc-banner {
.cc-btn {
color: $global-font-color;
&:hover,
&:focus {
background-color: #ccc;
}
[data-theme='dark'] & {
color: $global-font-color;
&:hover,
&:focus {
background-color: #fff;
}
}
}
}

View File

@ -0,0 +1,44 @@
.fixed-button {
position: fixed;
right: 1.5rem;
font-size: 1rem;
line-height: 1.5rem;
padding: 0.5rem 0.625rem;
color: $global-font-secondary-color;
background-color: $header-background-color;
@include z-index(1);
@include border-radius(1.25rem);
@include transition(color 0.4s ease);
@include blur;
@extend .print-d-none;
&:hover,
&:active {
color: $global-font-color;
cursor: pointer;
}
&:active,
&:focus,
&:hover {
outline: none;
}
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
background-color: $header-background-color-dark;
&:hover,
&:active {
color: $global-font-color-dark;
}
}
}
.back-to-top {
bottom: 1.5rem;
}
.view-comments {
bottom: 4.5rem;
}

View File

@ -0,0 +1,47 @@
@keyframes octocat-wave {
0%,
100% {
@include transform(rotate(0));
}
20%,
60% {
@include transform(rotate(-25deg));
}
40%,
80% {
@include transform(rotate(10deg));
}
}
.github-corner {
position: fixed;
top: 0;
@include z-index(2);
@extend .print-d-none;
:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}
svg {
width: $header-height;
height: $header-height;
border: 0;
color: $github-corner-color;
fill: $github-corner-fill;
[data-theme='dark'] & {
color: $github-corner-color-dark;
fill: $github-corner-fill-dark;
}
}
&.left {
left: 0;
svg {
@include transform(scale(-1, 1));
}
}
&.right {
right: 0;
}
}

View File

@ -0,0 +1,16 @@
.noscript-warning {
background-color: var(--#{$prefix}danger);
color: white;
font-size: 1rem;
font-weight: bold;
position: fixed;
text-align: center;
left: 0;
bottom: 0;
width: 100%;
@include z-index(2);
[data-theme='dark'] & {
background-color: var(--#{$prefix}danger-dark);
}
}

View File

@ -0,0 +1,13 @@
.reading-progress-bar {
--progress: 0;
height: var(--progress-h, 2px);
width: var(--progress);
background-color: var(--bg-progress, var(--#{$prefix}info));
position: fixed;
@include z-index(2);
@extend .print-d-none;
[data-theme="dark"] & {
background-color: var(--bg-progress-dark, var(--#{$prefix}info-dark));
}
}

View File

@ -0,0 +1,22 @@
.typeit {
.highlight {
padding: 0.375rem;
font-size: 0.875rem;
font-family: $code-font-family;
font-weight: bold;
word-break: break-all;
white-space: pre-wrap;
}
--ti-cursor-font-family: #{$global-font-family};
--ti-cursor-font-size: #{$global-font-size};
--ti-cursor-font-style: normal;
--ti-cursor-font-weight: #{$global-font-weight};
--ti-cursor-line-height: #{$global-line-height};
--ti-cursor-color: #{$global-font-color};
--ti-cursor-transform: translateX(0);
[data-theme='dark'] & {
--ti-cursor-color: #{$global-font-color-dark};
}
}

View File

@ -0,0 +1,77 @@
.admonition {
position: relative;
margin: 1rem 0;
padding: 0 0.75rem;
border-left: .25rem solid;
overflow: auto;
@include border-radius($global-border-radius);
.admonition-title {
font-weight: bold;
margin: 0 -0.75rem;
padding: 0.25rem 1.8rem;
border-bottom: 1px solid;
@include border-radius(0);
}
.admonition-content {
padding: 0.5rem 0;
}
i.icon {
font-size: 0.85rem;
position: absolute;
top: 0.6rem;
left: 0.4rem;
}
i.details-icon {
position: absolute;
top: 0.6rem;
right: 0.3rem;
}
@each $type, $color, $background-color in $admonition-color-map {
@if $type == 'note' {
background-color: $background-color;
border-left-color: $color;
.admonition-title {
border-bottom-color: $background-color;
background-color: opacify($background-color, 0.15);
}
&.open .admonition-title {
background-color: $background-color;
}
i.icon {
color: $color;
}
}
@else {
&.#{$type} {
background-color: $background-color;
border-left-color: $color;
.admonition-title {
border-bottom-color: $background-color;
background-color: opacify($background-color, 0.15);
}
&.open .admonition-title {
background-color: $background-color;
}
i.icon {
color: $color;
}
}
}
}
&:last-child {
margin-bottom: 0.75rem;
}
}

View File

@ -0,0 +1,16 @@
.bilibili {
position: relative;
width: 100%;
height: 0;
padding-bottom: 75%;
margin: 3% auto;
text-align: center;
iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
}

View File

@ -0,0 +1,99 @@
/**
* Card link style
* @author @Lruihao https://lruihao.cn
*/
.card-link {
position: relative;
display: block;
margin: 0.5rem auto;
box-sizing: border-box;
width: clamp(50%, 400px, 100%);
max-width: 100%;
overflow: hidden;
text-decoration: none;
border: none;
@include border-radius(0.75rem);
}
.cl- {
&backdrop {
position: absolute;
top: 0.75rem;
bottom: 0.75rem;
left: 0;
right: 0;
background-image: var(--cl-bg-url);
background-repeat: no-repeat;
filter: blur(0.5rem);
opacity: 0.5;
background-size: contain;
background-position: center;
}
&content {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem;
background-color: rgba(245, 245, 245, 0.88);
}
&text {
overflow: hidden;
}
&title {
display: -webkit-box;
-webkit-line-clamp: 2;
overflow: hidden;
max-height: calc(1rem * 1.25 * 2);
font-size: 1rem;
font-weight: 500;
line-height: 1.25;
color: $global-font-color;
}
&meta {
display: flex;
align-items: center;
margin-top: 0.25rem;
font-size: 0.825rem;
color: $global-font-secondary-color;
}
&icon-link {
width: 1rem;
height: 1rem;
flex-shrink: 0;
margin-right: 0.25rem;
}
&url {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&icon-globe {
width: 4rem;
height: 4rem;
flex-shrink: 0;
margin-left: 0.25rem;
}
[data-theme='dark'] & {
&content {
background-color: rgba(61, 62, 65, 0.88);
}
&title {
color: $global-font-color-dark;
}
&meta {
color: $global-font-secondary-color-dark;
}
}
}

View File

@ -0,0 +1,43 @@
.blockquote-center {
border-left: none;
margin: 40px 0;
padding: 0;
position: relative;
text-align: center;
color: initial;
&::after,
&::before {
left: 0;
line-height: 1;
opacity: 0.6;
position: absolute;
width: 100%;
}
&::before {
border-top: 1px solid $global-border-color;
text-align: left;
top: -20px;
content: '\f10d';
font-family: 'Font Awesome 5 Free';
font-weight: 900;
[data-theme='dark'] & {
border-top-color: $global-border-color-dark;
}
}
&::after {
border-bottom: 1px solid $global-border-color;
bottom: -20px;
text-align: right;
content: '\f10e';
font-family: 'Font Awesome 5 Free';
font-weight: 900;
[data-theme='dark'] & {
border-bottom-color: $global-border-color-dark;
}
}
}

View File

@ -0,0 +1,4 @@
.echarts {
margin: 0.5rem 0;
text-align: center;
}

View File

@ -0,0 +1,8 @@
@import '_admonition';
@import '_bilibili';
@import '_cardlink';
@import '_center-quote';
@import '_echarts';
@import '_instagram';
@import '_mapbox';
@import '_mermaid';

View File

@ -0,0 +1,5 @@
iframe.instagram-media {
[data-theme='dark'] & {
border: none !important;
}
}

View File

@ -0,0 +1,5 @@
.mapbox {
margin: 0.5rem 0;
padding: 0.5rem 0;
@include border-radius($global-border-radius);
}

View File

@ -0,0 +1,8 @@
.mermaid {
text-align: center;
svg {
max-width: 100%;
height: auto;
}
}

View File

@ -0,0 +1,171 @@
// ==============================
// Variables
// ==============================
// ========== Global ========== //
// Prefix for :root CSS variables.
$prefix: fi- !default;
// Font and Line Height
$global-font-family: system-ui, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft YaHei UI, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif !default;
$global-font-size: 16px !default;
$global-font-weight: 400 !default;
$global-line-height: 1.5rem !default;
// scroll-margin-top of content anchor
$global-scroll-margin-top: 0.5rem;
// Radius of the border
$global-border-radius: 5px !default;
// Color of the background
$global-background-color: #ffffff !default;
$global-background-color-dark: #221531 !default;
// Color of the text
$global-font-color: #161209 !default;
$global-font-color-dark: #a9a9b3 !default;
// Color of the secondary text
$global-font-secondary-color: #b1b1ba !default;
$global-font-secondary-color-dark: #909092 !default;
// Color of the link
$global-link-color: #ba0066 !default;
$global-link-color-dark: #EC008C !default;
// Color of the hover link
$global-link-hover-color: #EC008C !default; // 潮蓝
$global-link-hover-color-dark: #ba0066 !default;
// Color of the border
$global-border-color: #ba0066 !default;
$global-border-color-dark: #EC008C !default;
// ========== Global ========== //
// ========== Scrollbar ========== //
// Color of the scrollbar
$scrollbar-color: #ba0066 !default;
// Color of the hover scrollbar
$scrollbar-hover-color: #EC008C !default;
// ========== Scrollbar ========== //
// ========== Selection ========== //
// Color of the selected text
$selection-color: rgba(72.9, 0, 40, 0.4) !default;
$selection-color-dark: rgba(72.9, 0, 40, 0.4) !default;
// ========== Selection ========== //
// ========== Header ========== //
// Height of the header
$header-height: 3.5rem !default;
// Color of the header background
$header-background-color: #f8f8f8 !default;
$header-background-color-dark: #0d132c !default;
// Font style of the header title
$header-title-font-family: $global-font-family !default;
$header-title-font-size: 1.5rem !default;
// Color of the active menu item
$menu-active-color: #EC008C !default;
$menu-active-color-dark: #ba0066 !default;
// Color of the search background
$search-background-color: #e9e9e9 !default;
$search-background-color-dark: #2d333b !default;
// ========== Header ========== //
// ========== Tag Cloud ========== //
// Color range of tag cloud
$tag-cloud-start: $global-font-secondary-color!default;
$tag-cloud-end: $global-font-color!default;
$tag-cloud-start-dark: $global-font-secondary-color-dark!default;
$tag-cloud-end-dark: $global-font-color-dark!default;
// ========== Tag Cloud ========== //
// ========== Single Content ========== //
// Font size of the TOC
$toc-title-font-size: 1.2rem !default;
$toc-content-font-size: 1rem !default;
// Color of the single link
$single-link-color: #ba0066 !default; // 花青
$single-link-color-dark: #EC008C !default; // 釉蓝
// Color of the hover single link
$single-link-hover-color: #EC008C !default; // 莲瓣红
$single-link-hover-color-dark: #ba0066 !default; // 羽扇豆蓝
// Color of the table background
$table-background-color: #f6f8fa !default;
$table-background-color-dark: #0d132c !default;
// Color of the table thead
$table-thead-color: #EC008C !default;
$table-thead-color-dark: #0d132c !default;
// Color of the blockquote
$blockquote-color: #697681 !default;
$blockquote-color-dark: #2d333b !default;
// Color of reward
$reward-color: tomato !default;
$reward-color-dark: darken($reward-color, 5%) !default;
// Width of reward image
$reward-img-width: 180px !default;
// ========== Single Content ========== //
// ========== Pagination ========== //
// Color of the link in pagination
$pagination-link-color: #bfbfbf !default;
$pagination-link-color-dark: #b1b1ba !default;
// Color of the hover link in pagination
$pagination-link-hover-color: #ba0066 !default;
$pagination-link-hover-color-dark: #EC008C !default;
// ========== Pagination ========== //
// ========== Code ========== //
// Color of the code
$code-color: #24292f !default;
$code-color-dark: #adbac7 !default;
// Color of the code background
$code-background-color: #f6f8fa !default;
$code-background-color-dark: #0d132c !default;
$code-error-color: #dc3545 !default;
// Color of the hightlight code
$code-hightlight-color: #fff8c5 !default;
$code-hightlight-color-dark: rgba(174, 124, 20, 0.15) !default;
$code-info-color: #EC008C !default;
$code-info-color-dark: #ba0066 !default;
// Font size of the code
$code-font-size: 0.875rem !default;
// Font family of the code
$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace, $global-font-family !default;
// ========== Code ========== //
// ========== GitHub Corners ========== //
// Color of the GitHub Corners
$github-corner-color: white !default;
$github-corner-color-dark: black !default;
// Color of the GitHub Corners background
$github-corner-fill: $header-background-color-dark !default;
$github-corner-fill-dark: $header-background-color !default;
// ========== GitHub Corners ========== //
@import '_partials/_maps/admonition';
@import '_partials/_maps/code-highlight';
@import '_partials/_maps/code-type';
@import '_partials/_maps/colors';
@import '_partials/_maps/utilities';

View File

@ -0,0 +1,171 @@
// ==============================
// Variables
// ==============================
// ========== Global ========== //
// Prefix for :root CSS variables.
$prefix: fi- !default;
// Font and Line Height
$global-font-family: system-ui, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft YaHei UI, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif !default;
$global-font-size: 16px !default;
$global-font-weight: 400 !default;
$global-line-height: 1.5rem !default;
// scroll-margin-top of content anchor
$global-scroll-margin-top: 0.5rem;
// Radius of the border
$global-border-radius: 5px !default;
// Color of the background
$global-background-color: #ffffff !default;
$global-background-color-dark: #292a2e !default;
// Color of the text
$global-font-color: #161209 !default;
$global-font-color-dark: #b1b1ba !default;
// Color of the secondary text
$global-font-secondary-color: #b1b1ba !default;
$global-font-secondary-color-dark: #909092 !default;
// Color of the link
$global-link-color: #161209 !default;
$global-link-color-dark: #b1b1ba !default;
// Color of the hover link
$global-link-hover-color: #2983bb !default; // 潮蓝
$global-link-hover-color-dark: #fff !default;
// Color of the border
$global-border-color: #f0f0f0 !default;
$global-border-color-dark: #363636 !default;
// ========== Global ========== //
// ========== Scrollbar ========== //
// Color of the scrollbar
$scrollbar-color: #87878d !default;
// Color of the hover scrollbar
$scrollbar-hover-color: #b1b1ba !default;
// ========== Scrollbar ========== //
// ========== Selection ========== //
// Color of the selected text
$selection-color: rgba(53, 166, 247, 0.25) !default;
$selection-color-dark: rgba(50, 112, 194, 0.4) !default;
// ========== Selection ========== //
// ========== Header ========== //
// Height of the header
$header-height: 3.5rem !default;
// Color of the header background
$header-background-color: #f8f8f8 !default;
$header-background-color-dark: #252627 !default;
// Font style of the header title
$header-title-font-family: $global-font-family !default;
$header-title-font-size: 1.5rem !default;
// Color of the active menu item
$menu-active-color: #161209 !default;
$menu-active-color-dark: #fff !default;
// Color of the search background
$search-background-color: #e9e9e9 !default;
$search-background-color-dark: #363636 !default;
// ========== Header ========== //
// ========== Tag Cloud ========== //
// Color range of tag cloud
$tag-cloud-start: $global-font-secondary-color!default;
$tag-cloud-end: $global-font-color!default;
$tag-cloud-start-dark: $global-font-secondary-color-dark!default;
$tag-cloud-end-dark: $global-font-color-dark!default;
// ========== Tag Cloud ========== //
// ========== Single Content ========== //
// Font size of the TOC
$toc-title-font-size: 1.2rem !default;
$toc-content-font-size: 1rem !default;
// Color of the single link
$single-link-color: #2376b7 !default; // 花青
$single-link-color-dark: #1781b5 !default; // 釉蓝
// Color of the hover single link
$single-link-hover-color: #ea517f !default; // 莲瓣红
$single-link-hover-color-dark: #619ac3 !default; // 羽扇豆蓝
// Color of the table background
$table-background-color: #fff !default;
$table-background-color-dark: #272c34 !default;
// Color of the table thead
$table-thead-color: #ededed !default;
$table-thead-color-dark: #20252b !default;
// Color of the blockquote
$blockquote-color: #697681 !default;
$blockquote-color-dark: #9ba3aa !default;
// Color of reward
$reward-color: tomato !default;
$reward-color-dark: darken($reward-color, 5%) !default;
// Width of reward image
$reward-img-width: 180px !default;
// ========== Single Content ========== //
// ========== Pagination ========== //
// Color of the link in pagination
$pagination-link-color: #bfbfbf !default;
$pagination-link-color-dark: #b1b1ba !default;
// Color of the hover link in pagination
$pagination-link-hover-color: #000 !default;
$pagination-link-hover-color-dark: #fff !default;
// ========== Pagination ========== //
// ========== Code ========== //
// Color of the code
$code-color: #24292f !default;
$code-color-dark: #adbac7 !default;
// Color of the code background
$code-background-color: #f6f8fa !default;
$code-background-color-dark: #2d333b !default;
$code-error-color: #dc3545 !default;
// Color of the hightlight code
$code-hightlight-color: #fff8c5 !default;
$code-hightlight-color-dark: rgba(174, 124, 20, 0.15) !default;
$code-info-color: #9c9c9c !default;
$code-info-color-dark: #b1b0b0 !default;
// Font size of the code
$code-font-size: 0.875rem !default;
// Font family of the code
$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace, $global-font-family !default;
// ========== Code ========== //
// ========== GitHub Corners ========== //
// Color of the GitHub Corners
$github-corner-color: white !default;
$github-corner-color-dark: black !default;
// Color of the GitHub Corners background
$github-corner-fill: $header-background-color-dark !default;
$github-corner-fill-dark: $header-background-color !default;
// ========== GitHub Corners ========== //
@import '_partials/_maps/admonition';
@import '_partials/_maps/code-highlight';
@import '_partials/_maps/code-type';
@import '_partials/_maps/colors';
@import '_partials/_maps/utilities';

View File

@ -0,0 +1,13 @@
@charset "utf-8";
@import "_variables";
@import "_override";
@import "_mixin/index";
@import "_core/root";
@import "_core/base";
@import "_core/layout";
@import "_core/common";
@import "_core/patch";
@import "_page";
@import "_core/media";
@import "_custom";

View File

@ -0,0 +1,87 @@
# Tips: remove sourceMappingURL of local libraries to avoid source map 404 error.
# See https://github.com/hugo-fixit/FixIt/issues/67
prefix:
libFiles: https://cdn.jsdelivr.net/npm/
# simple-icons@7.12.0 https://github.com/simple-icons/simple-icons
simpleIcons: https://cdn.jsdelivr.net/npm/simple-icons@7.12.0/icons/
libFiles:
# algoliasearch@4.14.2 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@4.14.2/dist/algoliasearch-lite.umd.min.js
# animate.css@4.1.1 https://github.com/daneden/animate.css
animateCSS: animate.css@4.1.1/animate.min.css
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css
aplayerJS: aplayer@1.10.1/dist/APlayer.min.js
# artalk@2.5.2 https://github.com/ArtalkJS/Artalk
artalkCSS: artalk@2.5.2/dist/Artalk.css
artalkJS: artalk@2.5.2/dist/Artalk.js
# autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
# TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js'
autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js
# cell-watermark@1.0.3 https://github.com/Lruihao/watermark
cellWatermarkJS: cell-watermark@1.0.3/src/watermark.min.js
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
# crypto-js@4.1.1 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.1.1/core.js
cryptoEncBase64JS: crypto-js@4.1.1/enc-base64.js
cryptoMd5JS: crypto-js@4.1.1/md5.js
cryptoSha256JS: crypto-js@4.1.1/sha256.js
# echarts@5.3.3 https://github.com/apache/echarts
echartsJS: echarts@5.3.3/dist/echarts.min.js
# eruda@2.5.0 https://github.com/liriliri/eruda
erudaJS: eruda@2.5.0/eruda.js
# fontawesome-free@6.2.0 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.2.0/css/all.min.css'
# fusejs@6.6.2 https://github.com/krisk/fuse
fuseJS: fuse.js@6.6.2/dist/fuse.min.js
# gitalk@1.7.2 https://github.com/gitalk/gitalk
gitalkCSS: gitalk@1.7.2/dist/gitalk.min.css
gitalkJS: gitalk@1.7.2/dist/gitalk.min.js
# instant.page@5.1.1 https://github.com/instantpage/instant.page
instantPage: instant.page@5.1.1/instantpage.min.js
# katex@0.16.2 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.2/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.2/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.2/dist/katex.min.css
katexJS: katex@0.16.2/dist/katex.min.js
katexMhchemJS: katex@0.16.2/dist/contrib/mhchem.min.js
# lightgallery@2.6.1 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.6.1/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.6.1/lightgallery.min.js
lightgalleryThumbnailJS: lightgallery@2.6.1/plugins/thumbnail/lg-thumbnail.min.js
lightgalleryZoomJS: lightgallery@2.6.1/plugins/zoom/lg-zoom.min.js
# lunr.js@2.3.9 https://github.com/olivernn/lunr.js
lunrJS: lunr@2.3.9/lunr.min.js
# mapbox-gl@2.10.0 https://docs.mapbox.com/mapbox-gl-js
mapboxGLCSS: mapbox-gl@2.10.0/dist/mapbox-gl.css
mapboxGLJS: mapbox-gl@2.10.0/dist/mapbox-gl.js
# mermaid@9.4.3 https://github.com/mermaid-js/mermaid
# TODO bump Mermaid from 9.x to 10.x
mermaidJS: mermaid@9.4.3/dist/mermaid.min.js
# meting@2.0.1 https://github.com/metowolf/MetingJS
metingJS: meting@2.0.1/dist/Meting.min.js
# object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
# pangu.js@4.0.7 https://github.com/vinta/pangu.js
panguJS: pangu@4.0.7/dist/browser/pangu.min.js
# pace-js@1.2.4 https://github.com/CodeByZach/pace
paceJS: pace-js@1.2.4
# sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
sharerJS: sharer.js@0.5.1/sharer.min.js
# twemoji@13.1.0 https://github.com/twitter/twemoji
twemojiJS: twemoji@14.0.2/dist/twemoji.min.js
# twikoo@1.6.8 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.6.8/dist/twikoo.all.min.js
# typeit@8.7.1 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.7.1/dist/index.umd.js
# valine@1.5.1 https://github.com/xCss/Valine
valineJS: valine@1.5.1/dist/Valine.min.js
# vconsole@3.14.6 https://github.com/Tencent/vConsole
vconsoleJS: vconsole@3.14.6/dist/vconsole.min.js
# waline@2.14.7 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.14.7/dist/waline.css'
walineJS: '@waline/client@2.14.7/dist/waline.js'

View File

@ -0,0 +1,87 @@
# Tips: remove sourceMappingURL of local libraries to avoid source map 404 error.
# See https://github.com/hugo-fixit/FixIt/issues/67
prefix:
libFiles: https://unpkg.com/
# simple-icons@7.12.0 https://github.com/simple-icons/simple-icons
simpleIcons: https://unpkg.com/simple-icons@7.12.0/icons/
libFiles:
# algoliasearch@4.14.2 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@4.14.2/dist/algoliasearch-lite.umd.js
# animate.css@4.1.1 https://github.com/daneden/animate.css
animateCSS: animate.css@4.1.1/animate.min.css
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css
aplayerJS: aplayer@1.10.1/dist/APlayer.min.js
# artalk@2.5.2 https://github.com/ArtalkJS/Artalk
artalkCSS: artalk@2.5.2/dist/Artalk.css
artalkJS: artalk@2.5.2/dist/Artalk.js
# autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
# TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js'
autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js
# cell-watermark@1.0.3 https://github.com/Lruihao/watermark
cellWatermarkJS: cell-watermark@1.0.3/src/watermark.min.js
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
# crypto-js@4.1.1 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.1.1/core.js
cryptoEncBase64JS: crypto-js@4.1.1/enc-base64.js
cryptoMd5JS: crypto-js@4.1.1/md5.js
cryptoSha256JS: crypto-js@4.1.1/sha256.js
# echarts@5.3.3 https://github.com/apache/echarts
echartsJS: echarts@5.3.3/dist/echarts.min.js
# eruda@2.5.0 https://github.com/liriliri/eruda
erudaJS: eruda@2.5.0/eruda.js
# fontawesome-free@6.2.0 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.2.0/css/all.min.css'
# fusejs@6.6.2 https://github.com/krisk/fuse
fuseJS: fuse.js@6.6.2/dist/fuse.min.js
# gitalk@1.7.2 https://github.com/gitalk/gitalk
gitalkCSS: gitalk@1.7.2/dist/gitalk.min.css
gitalkJS: gitalk@1.7.2/dist/gitalk.min.js
# instant.page@5.1.1 https://github.com/instantpage/instant.page
instantPage: instant.page@5.1.1/instantpage.js
# katex@0.16.2 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.2/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.2/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.2/dist/katex.min.css
katexJS: katex@0.16.2/dist/katex.min.js
katexMhchemJS: katex@0.16.2/dist/contrib/mhchem.min.js
# lightgallery@2.6.1 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.6.1/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.6.1/lightgallery.min.js
lightgalleryThumbnailJS: lightgallery@2.6.1/plugins/thumbnail/lg-thumbnail.min.js
lightgalleryZoomJS: lightgallery@2.6.1/plugins/zoom/lg-zoom.min.js
# lunr.js@2.3.9 https://github.com/olivernn/lunr.js
lunrJS: lunr@2.3.9/lunr.min.js
# mapbox-gl@2.10.0 https://docs.mapbox.com/mapbox-gl-js
mapboxGLCSS: mapbox-gl@2.10.0/dist/mapbox-gl.css
mapboxGLJS: mapbox-gl@2.10.0/dist/mapbox-gl.js
# mermaid@9.4.3 https://github.com/mermaid-js/mermaid
# TODO bump Mermaid from 9.x to 10.x
mermaidJS: mermaid@9.4.3/dist/mermaid.min.js
# meting@2.0.1 https://github.com/metowolf/MetingJS
metingJS: meting@2.0.1/dist/Meting.min.js
# object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
# pangu.js@4.0.7 https://github.com/vinta/pangu.js
panguJS: pangu@4.0.7/dist/browser/pangu.min.js
# pace-js@1.2.4 https://github.com/CodeByZach/pace
paceJS: pace-js@1.2.4
# sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
sharerJS: sharer.js@0.5.1/sharer.min.js
# twemoji@13.1.0 https://github.com/twitter/twemoji
twemojiJS: twemoji@14.0.2/dist/twemoji.min.js
# twikoo@1.6.8 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.6.8/dist/twikoo.all.min.js
# typeit@8.7.1 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.7.1/dist/index.umd.js
# valine@1.5.1 https://github.com/xCss/Valine
valineJS: valine@1.5.1/dist/Valine.min.js
# vconsole@3.14.6 https://github.com/Tencent/vConsole
vconsoleJS: vconsole@3.14.6/dist/vconsole.min.js
# waline@2.14.7 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.14.7/dist/waline.css'
walineJS: '@waline/client@2.14.7/dist/waline.js'

View File

@ -0,0 +1,18 @@
theme:
- html5shiv
- Object.values
- Promise
- fetch
- Element.prototype.after
algoliasearch:
- Promise
- Object.entries
- Object.assign
TypeIt:
- Array.prototype.fill
- Array.prototype.find
- Array.from
- IntersectionObserver
- Math.sign
- Object.assign
- Promise

View File

@ -0,0 +1,699 @@
# 001: Github
github:
Weight: 1
Prefix: https://github.com/
Title: GitHub
Icon:
Class: fa-brands fa-github-alt fa-fw
# 002: LinkedIn
linkedin:
Weight: 2
Prefix: https://linkedin.com/in/
Title: LinkedIn
Icon:
Class: fa-brands fa-linkedin fa-fw
# 003: Twitter
twitter:
Weight: 5
Prefix: https://twitter.com/
Title: Twitter
Icon:
Src: svg/icons/x.svg
# 004: Instagram
instagram:
Weight: 4
Prefix: https://www.instagram.com/
Title: Instagram
Icon:
Class: fa-brands fa-instagram fa-fw
# 005: facebook
facebook:
Weight: 5
Prefix: https://facebook.com/
Title: facebook
Icon:
Class: fa-brands fa-facebook fa-fw
# 006: Telegram
telegram:
Weight: 6
Prefix: https://t.me/
Title: Telegram
Icon:
Class: fa-brands fa-telegram-plane fa-fw
# 007: Medium
medium:
Weight: 7
Prefix: https://medium.com/
Title: Medium
Icon:
Class: fa-brands fa-medium fa-fw
# 008: GitLab
gitlab:
Weight: 8
Prefix: https://gitlab.com/
Title: GitLab
Icon:
Class: fa-brands fa-gitlab fa-fw
# 009: YouTube Legacy
youtubelegacy:
Weight: 9
Prefix: https://www.youtube.com/user/
Title: YouTube
Icon:
Class: fa-brands fa-youtube fa-fw
# 010: YouTube Custom
youtubecustom:
Weight: 10
Prefix: https://www.youtube.com/c/
Title: YouTube
Icon:
Class: fa-brands fa-youtube fa-fw
# 011: YouTube Channel
youtubechannel:
Weight: 11
Prefix: https://www.youtube.com/channel/
Title: YouTube
Icon:
Class: fa-brands fa-youtube fa-fw
# 012: Tumblr
tumblr:
Weight: 12
Template: https://%v.tumblr.com/
Title: Tumblr
Icon:
Class: fa-brands fa-tumblr fa-fw
# 013: Quora
quora:
Weight: 13
Prefix: https://www.quora.com/profile/
Title: Quora
Icon:
Class: fa-brands fa-quora fa-fw
# 014: Keybase
keybase:
Weight: 14
Prefix: https://keybase.io/
Title: Keybase
Icon:
Class: fa-brands fa-keybase fa-fw
# 015: Pinterest
pinterest:
Weight: 15
Prefix: https://www.pinterest.com/
Title: Pinterest
Icon:
Class: fa-brands fa-pinterest fa-fw
# 016: Reddit
reddit:
Weight: 16
Prefix: https://www.reddit.com/user/
Title: Reddit
Icon:
Class: fa-brands fa-reddit fa-fw
# 017: CodePen
codepen:
Weight: 17
Prefix: https://codepen.io/
Title: CodePen
Icon:
Class: fa-brands fa-codepen fa-fw
# 018: freeCodeCamp
freecodecamp:
Weight: 18
Prefix: https://freecodecamp.org/
Title: freeCodeCamp
Icon:
Class: fa-brands fa-free-code-camp fa-fw
# 019: Bitbucket
bitbucket:
Weight: 19
Prefix: https://bitbucket.org/
Title: Bitbucket
Icon:
Class: fa-brands fa-bitbucket fa-fw
# 020: Stack Overflow
stackoverflow:
Weight: 20
Prefix: https://stackoverflow.com/users/
Title: Stack Overflow
Icon:
Class: fa-brands fa-stack-overflow fa-fw
# 021: 微博
weibo:
Weight: 21
Prefix: https://weibo.com/
Title: 微博
Icon:
Class: fa-brands fa-weibo fa-fw
# 022: OK.RU
odnoklassniki:
Weight: 22
Prefix: https://ok.ru/
Title: OK.RU
Icon:
Class: fa-brands fa-odnoklassniki fa-fw
# 023: VK
vk:
Weight: 23
Prefix: https://vk.com/
Title: VK
Icon:
Class: fa-brands fa-vk fa-fw
# 024: Flickr
flickr:
Weight: 24
Prefix: https://www.flickr.com/photos/
Title: Flickr
Icon:
Class: fa-brands fa-flickr fa-fw
# 025: Xing
xing:
Weight: 25
Prefix: https://www.xing.com/profile/
Title: Xing
Icon:
Class: fa-brands fa-xing fa-fw
# 026: Snapchat
snapchat:
Weight: 26
Prefix: https://www.snapchat.com/add/
Title: Snapchat
Icon:
Class: fa-brands fa-snapchat fa-fw
# 027: SoundCloud
soundcloud:
Weight: 27
Prefix: https://soundcloud.com/
Title: SoundCloud
Icon:
Class: fa-brands fa-soundcloud fa-fw
# 028: Spotify
spotify:
Weight: 28
Prefix: https://open.spotify.com/user/
Title: Spotify
Icon:
Class: fa-brands fa-spotify fa-fw
# 029: Bandcamp
bandcamp:
Weight: 29
Template: https://%v.bandcamp.com/
Title: Bandcamp
Icon:
Class: fa-brands fa-bandcamp fa-fw
# 030: PayPal
paypal:
Weight: 30
Prefix: https://paypal.me/
Title: PayPal
Icon:
Class: fa-brands fa-paypal fa-fw
# 031: 500px
fivehundredpx:
Weight: 31
Prefix: https://500px.com/
Title: 500px
Icon:
Class: fa-brands fa-500px fa-fw
# 032: Mix
mix:
Weight: 32
Prefix: https://mix.com/
Title: Mix
Icon:
Class: fa-brands fa-mix fa-fw
# 033: Goodreads
goodreads:
Weight: 33
Prefix: https://www.goodreads.com/user/show/
Title: Goodreads
Icon:
Class: fa-brands fa-goodreads fa-fw
# 034: Last.fm
lastfm:
Weight: 34
Prefix: https://www.last.fm/user/
Title: Last.fm
Icon:
Class: fa-brands fa-lastfm fa-fw
# 035: Foursquare
foursquare:
Weight: 35
Prefix: https://foursquare.com/
Title: Foursquare
Icon:
Class: fa-brands fa-foursquare fa-fw
# 036: Hacker News
hackernews:
Weight: 36
Template: https://news.ycombinator.com/user?id=%v
Title: Hacker News
Icon:
Class: fa-brands fa-hacker-news fa-fw
# 037: Kickstarter
kickstarter:
Weight: 37
Prefix: https://kickstarter.com/profile/
Title: Kickstarter
Icon:
Class: fa-brands fa-kickstarter fa-fw
# 038: Patreon
patreon:
Weight: 38
Prefix: https://patreon.com/
Title: Patreon
Icon:
Class: fa-brands fa-patreon fa-fw
# 039: Steam
steam:
Weight: 39
Prefix: https://steamcommunity.com/id/
Title: Steam
Icon:
Class: fa-brands fa-steam fa-fw
# 040: Twitch
twitch:
Weight: 40
Prefix: https://www.twitch.tv/
Title: Twitch
Icon:
Class: fa-brands fa-twitch fa-fw
# 041: Strava
strava:
Weight: 41
Prefix: https://www.strava.com/athletes/
Title: Strava
Icon:
Class: fa-brands fa-strava fa-fw
# 042: Skype
skype:
Weight: 42
Template: "skype:"
Title: Skype
Icon:
Class: fa-brands fa-skype fa-fw
# 043: WhatsApp
whatsapp:
Weight: 43
Prefix: https://wa.me/
Title: WhatsApp
Icon:
Class: fa-brands fa-whatsapp fa-fw
# 044: 知乎
zhihu:
Weight: 44
Prefix: https://www.zhihu.com/people/
Title: 知乎
Icon:
Class: fa-brands fa-zhihu fa-fw
# 045: 豆瓣
douban:
Weight: 45
Prefix: https://www.douban.com/people/
Title: 豆瓣
Icon:
Simpleicons: douban
# 046: Angellist
angellist:
Weight: 46
Prefix: https://angel.co/
Title: Angellist
Icon:
Class: fa-brands fa-angellist fa-fw
# 047: SlideShare
slideshare:
Weight: 47
Prefix: https://slideshare.com/
Title: SlideShare
Icon:
Class: fa-brands fa-slideshare fa-fw
# 048: JSFiddle
jsfiddle:
Weight: 48
Prefix: https://jsfiddle.com/
Title: JSFiddle
Icon:
Class: fa-brands fa-jsfiddle fa-fw
# 049: DeviantArt
deviantart:
Weight: 49
Template: https://%v.deviantart.com/
Title: DeviantArt
Icon:
Class: fa-brands fa-deviantart fa-fw
# 050: Behance
behance:
Weight: 50
Prefix: https://behance.net/
Title: Behance
Icon:
Class: fa-brands fa-behance fa-fw
# 051: Dribbble
dribbble:
Weight: 51
Prefix: https://dribbble.com/
Title: Dribbble
Icon:
Class: fa-brands fa-dribbble fa-fw
# 052: WordPress
wordpress:
Weight: 52
Template: https://%v.wordpress.com/
Title: WordPress
Icon:
Class: fa-brands fa-wordpress fa-fw
# 053: Vine
vine:
Weight: 53
Prefix: https://vine.co/
Title: Vine
Icon:
Class: fa-brands fa-vine fa-fw
# 054: Google Scholar
googlescholar:
Weight: 54
Template: https://scholar.google.com/citations?%v
Title: Google Scholar
Icon:
Simpleicons: googlescholar
# 055: ResearchGate
researchgate:
Weight: 55
Prefix: https://www.researchgate.net/profile/
Title: ResearchGate
Icon:
Class: fa-brands fa-researchgate fa-fw
# 056: Mastodon
mastodon:
Weight: 2
Prefix: https://fosstodon.org/
Title: Mastodon
Icon:
Class: fa-brands fa-mastodon fa-fw
# 057: Thingiverse
thingiverse:
Weight: 57
Prefix: https://www.thingiverse.com/
Title: Thingiverse
Icon:
Simpleicons: thingiverse
# 058: Dev.To
devto:
Weight: 58
Prefix: https://dev.to/
Title: Dev.To
Icon:
Class: fa-brands fa-dev fa-fw
# 059: Gitea
gitea:
Weight: 59
Title: Gitea
Icon:
Simpleicons: gitea
# 060: XMPP
xmpp:
Weight: 60
Template: xmpp:%v
Title: XMPP
Icon:
Simpleicons: xmpp
# 061: Matrix
matrix:
Weight: 1
Prefix: https://matrix.to/#/
Title: Matrix
Icon:
Simpleicons: matrix
# 062: bilibili
bilibili:
Weight: 62
Prefix: https://space.bilibili.com/
Title: bilibili
Icon:
Class: fa-brands fa-bilibili
# 063: ORCID
orcid:
Weight: 63
Prefix: https://orcid.org/
Title: ORCID
Icon:
Class: fa-brands fa-orcid fa-fw
# 064 Liberapay
liberapay:
Weight: 64
Prefix: https://liberapay.com/
Title: Liberapay
Icon:
Simpleicons: liberapay
# 065 Ko-Fi
ko-fi:
Weight: 65
Prefix: https://ko-fi.com/
Title: Ko-Fi
Icon:
Simpleicons: kofi
# 066: BuyMeaCoffee
buymeacoffee:
Weight: 66
Prefix: https://www.buymeacoffee.com/
Title: BuyMeaCoffee
Icon:
Simpleicons: buymeacoffee
# 067: Linktree
linktree:
Weight: 67
Prefix: https://links.m3tam3re.com
Title: All My Links
Icon:
Class: fa-solid fa-square-share-nodes
# 068: QQ
qq:
Weight: 68
Template: https://wpa.qq.com/msgrd?v=3&uin=%v&site=qq&menu=yes
Title: QQ
Icon:
Simpleicons: tencentqq
# 069: QQ Group
qqgroup:
Weight: 69
Template: https://qm.qq.com/cgi-bin/qm/qr?k=%v&jump_from=webapi
Title: QQ Group
Icon:
Class: fa-solid fa-users
# 070: Diaspora
diaspora:
Weight: 70
Title: diaspora*
Icon:
Simpleicons: diaspora
# 071: CSDN
csdn:
Weight: 71
Prefix: https://blog.csdn.net/
Title: CSDN
Icon:
Src: svg/icons/csdn.svg
# 072: Discord User Profile / Revolt
discord:
Weight: 72
Prefix: https://discordapp.com/users/
Title: Discord
Icon:
Class: fa-brands fa-discord fa-fw
# 073: Discord Server Invite Link
discordinvite:
Weight: 73
Prefix: https://discord.gg/
Title: Discord
Icon:
Class: fa-brands fa-discord fa-fw
# 074: Lichess user profile
lichess:
Weight: 74
Prefix: https://lichess.org/@/
Title: Lichess
Icon:
Simpleicons: lichess
# 075: Pleroma
pleroma:
Weight: 75
Title: Pleroma
Icon:
Simpleicons: pleroma
# 076: Kaggle
kaggle:
Weight: 76
Prefix: https://kaggle.com/
Title: Kaggle
Icon:
Class: fa-brands fa-kaggle fa-fw
# 077: MediaWiki
mediawiki:
Weight: 77
Title: MediaWiki
Icon:
Class: fa-brands fa-wikipedia-w fa-fw
# 078: Plume
plume:
Weight: 78
Title: Plume
Icon:
Src: svg/icons/plume.svg
# 079: Hack The Box
hackthebox:
Weight: 79
Title: Hack The Box
Prefix: https://app.hackthebox.com/users/
Icon:
Simpleicons: hackthebox
# 080: Root-Me
rootme:
Weight: 80
Title: Root-Me
Prefix: https://www.root-me.org/
Icon:
Src: svg/icons/rootme.svg
# 081: Feishu
feishu:
Weight: 81
Title: Feishu
Template: https://www.feishu.cn/invitation/page/add_contact/?token=%v
Icon:
Class: fa-solid fa-dove
# 082: TryHackMe
tryhackme:
Weight: 82
Title: TryHackMe
Prefix: https://tryhackme.com/p/
Icon:
Simpleicons: tryhackme
# 083 douyin
douyin:
Weight: 83
Title: 抖音
Prefix: https://www.douyin.com/user/
Icon:
Class: fa-brands fa-tiktok
# 084 TikTok
tiktok:
Weight: 84
Title: TikTok
Prefix: https://www.tiktok.com/
Icon:
Class: fa-brands fa-tiktok
# 085 Revolt Server Invite
revoltinvite:
Weight: 3
Prefix: https://rvlt.gg/
Title: Revolt
Icon:
Simpleicons: revoltdotchat
# Phone
phone:
Weight: 997
Template: tel:%v
Title: Phone
Icon:
Class: fa-solid fa-phone fa-fw
# Email
email:
Weight: 998
Template: mailto:%v
Title: Email
Icon:
Class: fa-regular fa-envelope fa-fw
# RSS
rss:
Weight: 999
Url: /index.xml
Title: RSS
Newtab: true
Icon:
Class: fa-solid fa-rss fa-fw

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" version="1.1"><defs><style>.fixit-ban{opacity:.9;}</style></defs><path d="M159.12 338.69l24.8-16.54a78.87 78.87 0 0 1-6.77-22.72l-30.88 4.41a16 16 0 0 1-4.54-31.68l34.27-4.9v-.76l98.94 98.95a76.89 76.89 0 0 1-71.68-17.73l-26.39 17.59c-.15.11-.31.21-.47.31a16 16 0 0 1-17.28-26.93zm224.72-48.42a16 16 0 0 0-13.57-18.11l-34.27-4.9V244.9l34.27-4.9a16 16 0 1 0-4.54-31.68l-30.54 4.36a79.31 79.31 0 0 0-6.85-22.85l24.54-16.36a16 16 0 1 0-17.29-26.93l-.46.31-26 17.34a79.9 79.9 0 0 0-102.64-3l139.83 139.88 19.41 2.77a16 16 0 0 0 18.11-13.57z" fill="#358C3C" class="fixit-bug"/><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 432c-101.46 0-184-82.54-184-184a182.84 182.84 0 0 1 33.38-105.37l256 256A182.86 182.86 0 0 1 256 440zm150.62-78.63l-256-256A182.84 182.84 0 0 1 256 72c101.46 0 184 82.54 184 184a182.84 182.84 0 0 1-33.38 105.37z" fill="#FF6347" class="fixit-ban"/></svg>

After

Width:  |  Height:  |  Size: 968 B

View File

@ -0,0 +1,35 @@
/**
* Custom javascript for FixIt site.
* @author @Lruihao https://lruihao.cn
*/
const FixItCustom = new (function () {
/**
* Hello World
* You can define your own functions below.
* @returns {FixItCustom}
*/
this.hello = () => {
console.log('FixItCustom echo: Hello FixIt!');
return this;
};
/**
* Initialize.
* @returns {FixItCustom}
*/
this.init = () => {
// Custom infos.
this.hello();
return this;
};
})();
/**
* Immediate.
*/
(() => {
FixItCustom.init();
// It will be executed when the DOM tree is built.
document.addEventListener('DOMContentLoaded', () => {
// FixItCustom.init();
});
})();

View File

@ -0,0 +1,223 @@
/**
* FixIt decryptor for encrypted pages and fixit-encryptor shortcode
* @param {Object} options
* @param {Function} [options.decrypted] [Lifecycle Hooks] handler after decrypting
* @param {Function} [options.reset] [Lifecycle Hooks] handler after encrypting again
* @param {Number} [options.duration=86400] number of seconds to cache decryption statistics. unit: s
* @author @Lruihao https://lruihao.cn
* @since v0.2.15
*/
FixItDecryptor = function (options = {}) {
var _proto = FixItDecryptor.prototype;
this.options = options || {};
this.options.duration = this.options.duration || 24 * 60 * 60; // default cache one day
this.decryptedEventSet = new Set();
this.resetEventSet = new Set();
this.$el = document.querySelector('.fixit-decryptor-container');
/**
* decrypt content
* @param {String} base64EncodeContent encrypted content
*/
var _decryptContent = (base64EncodeContent) => {
try {
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('#fixit-decryptor-input').classList.add('d-none');
this.$el.querySelector('.fixit-encryptor-btn').classList.remove('d-none');
document.querySelector('#content').insertAdjacentHTML(
'afterbegin',
CryptoJS.enc.Base64.parse(base64EncodeContent).toString(CryptoJS.enc.Utf8)
);
} catch (err) {
return console.error(err);
}
// decrypted hook
console.log(this.decryptedEventSet)
for (const event of this.decryptedEventSet) {
event();
}
};
/**
* initialize FixIt decryptor
*/
_proto.init = () => {
this.addEventListener('decrypted', this.options?.decrypted);
this.addEventListener('reset', this.options?.reset);
this.validateCache();
const _decryptor = this;
this.$el.querySelector('#fixit-decryptor-input')?.addEventListener('keydown', function (e) {
if (e.key === 'Enter') {
e.preventDefault();
const $content = document.querySelector('#content');
const password = $content.getAttribute('data-password');
const input = this.value.trim();
const saltLen = input.length % 2 ? input.length : input.length + 1;
const inputMd5 = CryptoJS.MD5(input).toString();
const inputSha256 = CryptoJS.SHA256(input).toString();
this.value = '';
this.blur();
if (!input) {
alert('Please enter the correct password!');
return console.warn('Please enter the correct password!');
}
if (inputMd5 !== password) {
alert(`Password error: ${input} not the correct password!`);
return console.warn(`Password error: ${input} not the correct password!`);
}
// cache decryption statistics
window.localStorage?.setItem(
`fixit-decryptor/#${location.pathname}`,
JSON.stringify({
expiration: Math.ceil(Date.now() / 1000) + _decryptor.options.duration,
md5: inputMd5,
sha256: inputSha256.slice(saltLen)
})
);
_decryptContent($content.getAttribute('data-content').replace(inputSha256.slice(saltLen), ''));
}
});
this.$el.querySelector('.fixit-encryptor-btn')?.addEventListener('click', function (e) {
e.preventDefault();
this.classList.add('d-none')
_decryptor.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none');
document.querySelector('#content').innerHTML = '';
document.querySelector('#content').insertAdjacentElement(
'afterbegin',
_decryptor.$el
);
window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`);
// reset hook
for (const event of _decryptor.resetEventSet) {
event();
}
});
};
/**
* initialize fixit-encryptor shortcodes
*/
_proto.initShortcodes = () => {
// TODO TODO shortcode decrypted event
// this.addEventListener('decrypted', this.options?.decrypted);
const _decryptor = this;
const $shortcodes = document.querySelectorAll('fixit-encryptor:not(.decrypted)');
$shortcodes.forEach($shortcode => {
$shortcode.querySelector('.fixit-decryptor-input')?.addEventListener('keydown', function (e) {
if (e.key === 'Enter') {
e.preventDefault();
const $decryptor = this.parentElement.parentElement;
const $content = $decryptor.nextElementSibling;
const password = $content.getAttribute('data-password');
const input = this.value.trim();
const saltLen = input.length % 2 ? input.length : input.length + 1;
const inputMd5 = CryptoJS.MD5(input).toString();
const inputSha256 = CryptoJS.SHA256(input).toString();
this.value = '';
this.blur();
if (!input) {
alert('Please enter the correct password!');
return console.warn('Please enter the correct password!');
}
if (inputMd5 !== password) {
alert(`Password error: ${input} not the correct password!`);
return console.warn(`Password error: ${input} not the correct password!`);
}
try {
const base64EncodeContent = $content.getAttribute('data-content').replace(inputSha256.slice(saltLen), '');
$decryptor.querySelector('.fixit-decryptor-input').classList.add('d-none');
$content.insertAdjacentHTML(
'afterbegin',
CryptoJS.enc.Base64.parse(base64EncodeContent).toString(CryptoJS.enc.Utf8)
);
$decryptor.parentElement.classList.add('decrypted');
} catch (err) {
return console.error(err);
}
// TODO shortcode decrypted hook
// for (const event of _decryptor.decryptedEventSet) {
// event();
// }
}
});
});
};
/**
* validate the cached decryption statistics in localStorage
* @returns {FixItDecryptor}
*/
_proto.validateCache = () => {
const $content = document.querySelector('#content');
const password = $content.getAttribute('data-password');
const cachedStat = JSON.parse(window.localStorage?.getItem(`fixit-decryptor/#${location.pathname}`));
if (!cachedStat) {
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none');
return this;
}
if (cachedStat?.md5 !== password || Number(cachedStat?.expiration) < Math.ceil(Date.now() / 1000)) {
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none');
window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`);
console.warn('The password has expired, please re-enter!');
return this;
}
_decryptContent($content.getAttribute('data-content').replace(cachedStat.sha256, ''));
return this;
};
/**
* add event listener for FixIt Decryptor
* @param {String} event event name
* @param {Function} listener event handler
* @returns {FixItDecryptor}
*/
_proto.addEventListener = (event, listener) => {
if (typeof listener !== 'function') {
return this;
}
switch (event) {
case 'decrypted':
this.decryptedEventSet.add(listener);
break;
case 'reset':
this.resetEventSet.add(listener);
break;
default:
console.warn(`Event ${event} not found in FixIt Decryptor!`);
break;
}
return this;
};
/**
* remove event listener for FixIt Decryptor
* @param {String} event event name
* @param {Function} listener event handler
* @returns {FixItDecryptor}
*/
_proto.removeEventListener = (event, listener) => {
if (typeof listener !== 'function') {
return this;
}
switch (event) {
case 'decrypted':
this.decryptedEventSet.delete(listener);
break;
case 'reset':
this.resetEventSet.delete(listener);
break;
default:
console.warn(`Event ${event} not found in FixIt Decryptor!`);
break;
}
return this;
};
};

View File

@ -0,0 +1,269 @@
/**
* Service Worker
* imported from https://github.com/HEIGE-PCloud/DoIt/blob/v0.2.11/src/js/sw.js
*/
CACHE_VERSION = 1;
const BASE_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/fixit.min.svg'
];
const OFFLINE_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/fixit.min.svg',
'/offline/'
];
const NOT_FOUND_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/fixit.min.svg',
'/404.html'
];
const OFFLINE_PAGE = '/offline/';
const NOT_FOUND_PAGE = '/404.html';
const CACHE_VERSIONS = {
assets: 'assets-v' + CACHE_VERSION,
content: 'content-v' + CACHE_VERSION,
offline: 'offline-v' + CACHE_VERSION,
notFound: '404-v' + CACHE_VERSION
};
// Define MAX_TTL's in SECONDS for specific file extensions
const MAX_TTL = {
'/': 3600,
html: 3600,
json: 86400,
js: 86400,
css: 86400
};
const CACHE_BLACKLIST = [
(str) => {
return !str.startsWith('http://localhost');
}
];
const SUPPORTED_METHODS = ['GET'];
/**
* isBlackListed
* @param {string} url
* @returns {boolean}
*/
function isBlacklisted(url) {
return CACHE_BLACKLIST.length > 0
? !CACHE_BLACKLIST.filter((rule) => {
if (typeof rule === 'function') {
return !rule(url);
} else {
return false;
}
}).length
: false;
}
/**
* getFileExtension
* @param {string} url
* @returns {string}
*/
function getFileExtension(url) {
const extension = url.split('.').reverse()[0].split('?')[0];
return extension.endsWith('/') ? '/' : extension;
}
/**
* getTTL
* @param {string} url
*/
function getTTL(url) {
if (typeof url === 'string') {
const extension = getFileExtension(url);
if (typeof MAX_TTL[extension] === 'number') {
return MAX_TTL[extension];
} else {
return null;
}
} else {
return null;
}
}
/**
* installServiceWorker
* @returns {Promise}
*/
function installServiceWorker() {
return Promise.all([
caches.open(CACHE_VERSIONS.assets).then((cache) => {
return cache.addAll(BASE_CACHE_FILES);
}),
caches.open(CACHE_VERSIONS.offline).then((cache) => {
return cache.addAll(OFFLINE_CACHE_FILES);
}),
caches.open(CACHE_VERSIONS.notFound).then((cache) => {
return cache.addAll(NOT_FOUND_CACHE_FILES);
})
]).then(() => {
return self.skipWaiting();
});
}
/**
* cleanupLegacyCache
* @returns {Promise}
*/
function cleanupLegacyCache() {
const currentCaches = Object.keys(CACHE_VERSIONS).map((key) => {
return CACHE_VERSIONS[key];
});
return new Promise((resolve, reject) => {
caches
.keys()
.then((keys) => {
return keys.filter((key) => {
return !~currentCaches.indexOf(key);
});
})
.then((legacy) => {
if (legacy.length) {
Promise.all(
legacy.map((legacyKey) => {
return caches.delete(legacyKey);
})
)
.then(() => {
resolve();
})
.catch((err) => {
reject(err);
});
} else {
resolve();
}
})
.catch((err) => {
reject(err);
});
});
}
self.addEventListener('install', (event) => {
event.waitUntil(Promise.all([installServiceWorker(), self.skipWaiting()]));
});
// The activate handler takes care of cleaning up old caches.
self.addEventListener('activate', (event) => {
event.waitUntil(
Promise.all([
cleanupLegacyCache(),
self.clients.claim(),
self.skipWaiting()
]).catch((err) => {
console.log(err);
self.skipWaiting();
})
);
});
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.open(CACHE_VERSIONS.content).then((cache) => {
return cache
.match(event.request)
.then((response) => {
if (response) {
const headers = response.headers.entries();
let date = null;
for (const pair of headers) {
if (pair[0] === 'date') {
date = new Date(pair[1]);
}
}
if (date) {
const age = parseInt(
(new Date().getTime() - date.getTime()) / 1000
);
const ttl = getTTL(event.request.url);
if (ttl && age > ttl) {
return new Promise((resolve) => {
return fetch(event.request.clone())
.then((updatedResponse) => {
if (updatedResponse) {
cache.put(event.request, updatedResponse.clone());
resolve(updatedResponse);
} else {
resolve(response);
}
})
.catch(() => {
resolve(response);
});
}).catch((err) => {
console.log(err);
return response;
});
} else {
return response;
}
} else {
return response;
}
} else {
return null;
}
})
.then((response) => {
if (response) {
return response;
} else {
return fetch(event.request.clone())
.then((response) => {
if (response.status < 400) {
if (
~SUPPORTED_METHODS.indexOf(event.request.method) &&
!isBlacklisted(event.request.url) &&
event.request.url.slice(0, 4) === 'http'
) {
cache.put(event.request, response.clone());
}
return response;
} else {
return caches.open(CACHE_VERSIONS.notFound).then((cache) => {
return cache.match(NOT_FOUND_PAGE);
});
}
})
.then((response) => {
if (response) {
return response;
}
})
.catch(() => {
return caches
.open(CACHE_VERSIONS.offline)
.then((offlineCache) => {
return offlineCache.match(OFFLINE_PAGE);
});
});
}
})
.catch((error) => {
console.error(' Error in fetch handler:', error);
throw error;
});
})
);
});

Some files were not shown because too many files have changed in this diff Show More