Merge branch 'master' into production

This commit is contained in:
Cotes Chung 2023-09-10 20:37:16 +08:00
commit 5c6df66324
No known key found for this signature in database
GPG key ID: 0D9E54843167A808
75 changed files with 1414 additions and 1285 deletions

View file

@ -1,55 +0,0 @@
# How to Contribute
:tada: We really appreciate you taking the time to improve this project! :tada:
To ensure that the blog design is not confusing, this project does not accept
suggestions for design changes, such as color scheme, fonts, typography, etc.
If your request is about an enhancement, it is recommended to first submit a
[Feature Request][pr-issue] issue to discuss whether your idea fits the project.
Basically, you can follow these steps to complete the contribution.
1. Fork this project on GitHub and clone it locally.
2. Create a new branch from the default branch and give it a descriptive name
(format: `feature/<add-new-feat>` or `fix/<fix-a-bug>`).
3. After completing development, create a [Conventional Commit][cc] with git.
(See also: ["Verify the commits"](#verify-the-commits))
4. Create a [Pull Request][gh-pr].
## Make sure you can pass the CI tests
This project has [CI][ci] turned on. In order for your [PR][gh-pr] to pass the test,
please read the following.
### Check the core functionality
```console
bash ./tools/test
```
### Check the SASS syntax style
```console
npm test
```
### Verify the commits
Before you create a git commit, please complete the following setup.
Install `commitlint` & `husky`:
```console
npm i -g @commitlint/{cli,config-conventional} husky
```
And then enable `husky`:
```console
husky install
```
[pr-issue]: https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md
[gh-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
[cc]: https://www.conventionalcommits.org/
[ci]: https://en.wikipedia.org/wiki/Continuous_integration

View file

@ -3,14 +3,7 @@ name: Bug Report
about: Create a report to help us improve about: Create a report to help us improve
--- ---
**NOTE:** Before you start, the following should be completed. > **Tips**: Remember, contributions to this repository should follow the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
- Read [Wiki][wiki] to understand the usage and the correct effect of functional design.
- Make sure no [similar issue(including closed ones)][issues] exists.
- Make sure the bug is found in the latest code of the `master` branch.
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
## Describe the bug ## Describe the bug

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask the community for help
url: https://github.com/cotes2020/jekyll-theme-chirpy/discussions
about: Please ask and answer questions here.

View file

@ -4,14 +4,7 @@ about: Suggest an idea for this project
labels: enhancement labels: enhancement
--- ---
**NOTE:** Before you start, the following should be completed. > **Tips**: Remember, contributions to this repository should follow the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
- Read [Wiki][wiki] to understand the usage and the correct effect of functional design.
- Make sure no [similar issue(including closed ones)][issues] exists.
- Make sure the request is based on the latest code in the `master` branch.
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
## Is your feature request related to a problem? Please describe ## Is your feature request related to a problem? Please describe

View file

@ -1,28 +0,0 @@
---
name: Help Wanted
about: Need help that is not covered in the tutorial
labels: 'help wanted'
---
**NOTE:** Before you start, the following should be completed.
- Read [Wiki][wiki] to understand the usage and the correct effect of functional design.
- Make sure no [similar issue(including closed ones)][issues] exists.
- Try to find the answer on [Jekyll Forum][forum] and [StackOverflow][stack_overflow].
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
[forum]: https://talk.jekyllrb.com/
[stack_overflow]: https://stackoverflow.com/questions/tagged/jekyll
## Description
<!-- Please describe your need in detail. -->
## Operations you have already tried
<!-- Describe the effort you went through. -->
## Logs/Screenshots
<!-- If applicable, add logs/screenshots to help explain your problem. -->

View file

@ -1,20 +0,0 @@
---
name: Question
about: Issues that differ from other templates
labels: question
---
**NOTE:** Before you start, the following should be completed.
- Read [Wiki][wiki] to understand the usage and the correct effect of functional design.
- Make sure no [similar issue(including closed ones)][issues] exists.
- Try to find the answer on [Jekyll Forum][forum] and [StackOverflow][stack_overflow].
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
[forum]: https://talk.jekyllrb.com/
[stack_overflow]: https://stackoverflow.com/questions/tagged/jekyll
## Description
<!-- Please describe your question in detail. -->

12
.github/SECURITY.md vendored
View file

@ -1,12 +0,0 @@
# Security Policy
## Supported Versions
| Version | Supported |
|---------| ------------------ |
| 5.x | :white_check_mark: |
| < 5.0.0 | :x: |
## Reporting a Vulnerability
If you find a vulnerability, please report it to `cotes.chung@gmail.com`. We will try our best to respond within a week. Thank you for your time!

26
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
versioning-strategy: increase
groups:
bundler:
dependency-type: "production"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
versioning-strategy: increase
groups:
npm:
dependency-type: "development"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
groups:
gh-actions:
update-types:
- "major"
schedule:
interval: "weekly"

View file

@ -1,7 +1,10 @@
name: CD name: CD
on: on:
push: push:
branches: [production, docs] tags:
- "v[0-9]+.[0-9]+.[0-9]+"
branches:
- docs
jobs: jobs:
launch: launch:

View file

@ -8,6 +8,7 @@ on:
- ".github/**" - ".github/**"
- "!.github/workflows/ci.yml" - "!.github/workflows/ci.yml"
- ".gitignore" - ".gitignore"
- "docs/**"
- "README.md" - "README.md"
- "LICENSE" - "LICENSE"
pull_request: pull_request:
@ -24,7 +25,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 # for posts's lastmod fetch-depth: 0 # for posts's lastmod

View file

@ -25,7 +25,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View file

@ -5,7 +5,7 @@ jobs:
commitlint: commitlint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5 - uses: wagoid/commitlint-github-action@v5

View file

@ -28,7 +28,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
# submodules: true # submodules: true
@ -42,7 +42,7 @@ jobs:
- name: Setup Ruby - name: Setup Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: 3 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted ruby-version: 3
bundler-cache: true bundler-cache: true
- name: Build site - name: Build site
@ -52,7 +52,9 @@ jobs:
- name: Test site - name: Test site
run: | run: |
bundle exec htmlproofer _site --disable-external --check-html --allow_hash_href bundle exec htmlproofer _site \
\-\-disable-external=true \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
- name: Upload site artifact - name: Upload site artifact
uses: actions/upload-pages-artifact@v1 uses: actions/upload-pages-artifact@v1

View file

@ -17,7 +17,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v3 uses: actions/setup-node@v3

View file

@ -5,7 +5,7 @@ source "https://rubygems.org"
gemspec gemspec
group :test do group :test do
gem "html-proofer", "~> 3.18" gem "html-proofer", "~> 4.4"
end end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

View file

@ -4,10 +4,10 @@
A minimal, responsive and feature-rich Jekyll theme for technical writing. A minimal, responsive and feature-rich Jekyll theme for technical writing.
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy) [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)][gem]&nbsp;
[![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml) [![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg?branch=master&event=push)][ci]&nbsp;
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)](https://www.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cotes2020/jekyll-theme-chirpy&amp;utm_campaign=Badge_Grade) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)][codacy]&nbsp;
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)][license]&nbsp;
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu) [![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
[**Live Demo →**][demo] [**Live Demo →**][demo]
@ -26,19 +26,20 @@
- Dark / Light Theme Mode - Dark / Light Theme Mode
- Localized UI language - Localized UI language
- Pinned Posts - Pinned Posts on Home Page
- Hierarchical Categories - Hierarchical Categories
- Trending Tags - Trending Tags
- Table of Contents - Table of Contents
- Last Modified Date of Posts - Last Modified Date
- Syntax Highlighting - Syntax Highlighting
- Mathematical Expressions - Mathematical Expressions
- Mermaid Diagram & Flowchart - Mermaid Diagrams & Flowcharts
- Dark / Light Mode Images - Dark / Light Mode Images
- Embed Videos - Embed Videos
- Disqus / Utterances / Giscus Comments - Disqus / Utterances / Giscus Comments
- Search - Built-in Search
- Atom Feeds - Atom Feeds
- PWA
- Google Analytics - Google Analytics
- SEO & Performance Optimization - SEO & Performance Optimization
@ -47,13 +48,11 @@
## Documentation ## Documentation
To explore usage, development, and upgrade guide of the project, please refer to To explore usage, development, and upgrade guide of the project, please refer to the [**Wiki**][wiki].
the [Wiki][wiki].
## Contributing ## Contributing
Welcome to report bugs, help improve the code or submit new features. Contributions (Issues/PRs/Discussions) are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For details, see the "[Contributing Guidelines][contribute-guide]".
For more information, please see the ["Contributing Guidelines"][contribute-guide].
## Credits ## Credits
@ -61,34 +60,36 @@ This theme is mainly built with [Jekyll][jekyllrb] ecosystem,
[Bootstrap][bootstrap], [Font Awesome][icons] and some other [wonderful tools][lib]. [Bootstrap][bootstrap], [Font Awesome][icons] and some other [wonderful tools][lib].
The avatar and favicon design come from [Clipart Max][image]. The avatar and favicon design come from [Clipart Max][image].
Thanks to all the [contributors][contributors]. Also, folks who submitted issues Many thanks to the [contributors][contributors] who participated in the development
or unmerged PRs should not be forgotten. Because they reported bugs, shared ideas, and to the folks who reported bugs or shared ideas.
or inspired me to write more readable documentation.
Last but not least, thanks to [JetBrains][jetbrains] for providing the Last but not least, thanks to [JetBrains][jetbrains] for providing the _Open Source License_.
_Open Source Development_ license.
## Sponsoring ## Sponsoring
If you'd like to sponsor this project, the following options are available. If you'd like to sponsor this project, the following options are available.
[![Ko-fi](https://img.shields.io/badge/-Buy%20Me%20a%20Coffee-ff5f5f?logo=ko-fi&logoColor=white)](https://ko-fi.com/coteschung) [![Ko-fi](https://img.shields.io/badge/Support_Me_on_Ko--fi-ff5e5b?logo=ko-fi&logoColor=white)][ko-fi]&nbsp;
[![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][donation] [![Wechat Pay](https://img.shields.io/badge/Tip_Me_on_WeChat-brightgreen?logo=wechat&logoColor=white)][donation]&nbsp;
[![Alipay](https://img.shields.io/badge/-Tip%20Me%20on%20Alipay-blue?logo=alipay&logoColor=white)][donation] [![Alipay](https://img.shields.io/badge/Tip_Me_on_Alipay-blue?logo=alipay&logoColor=white)][donation]
## License ## License
This work is published under [MIT][mit] License. This work is published under [MIT License][license].
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
[ci]: https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml?query=event%3Apush+branch%3Amaster
[codacy]: https://app.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
[license]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE
[jekyllrb]: https://jekyllrb.com/ [jekyllrb]: https://jekyllrb.com/
[bootstrap]: https://getbootstrap.com/ [bootstrap]: https://getbootstrap.com/
[icons]: https://fontawesome.com/ [icons]: https://fontawesome.com/
[image]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/ [image]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
[demo]: https://cotes2020.github.io/chirpy-demo/ [demo]: https://cotes2020.github.io/chirpy-demo/
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki [wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
[contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md [contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md
[contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors [contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors
[lib]: https://github.com/cotes2020/chirpy-static-assets [lib]: https://github.com/cotes2020/chirpy-static-assets
[jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy [jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
[ko-fi]: https://ko-fi.com/coteschung/
[donation]: https://sponsor.cotes.page/ [donation]: https://sponsor.cotes.page/
[mit]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE

View file

@ -12,7 +12,7 @@ baseurl: ""
# otherwise, the layout language will use the default value of 'en'. # otherwise, the layout language will use the default value of 'en'.
lang: en lang: en
# Change to your timezone http://www.timezoneconverter.com/cgi-bin/findzone/findzone # Change to your timezone https://kevinnovak.github.io/Time-Zone-Picker
timezone: Asia/Shanghai timezone: Asia/Shanghai
# jekyll-seo-tag settings https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md # jekyll-seo-tag settings https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
@ -177,12 +177,12 @@ compress_html:
exclude: exclude:
- "*.gem" - "*.gem"
- "*.gemspec" - "*.gemspec"
- docs
- tools - tools
- README.md - README.md
- CHANGELOG.md - CHANGELOG.md
- LICENSE - LICENSE
- rollup.config.js - rollup.config.js
- node_modules
- package*.json - package*.json
jekyll-archives: jekyll-archives:

View file

@ -4,7 +4,7 @@
icon: "fab fa-github" icon: "fab fa-github"
- type: twitter - type: twitter
icon: "fab fa-twitter" icon: "fa-brands fa-x-twitter"
- type: email - type: email
icon: "fas fa-envelope" icon: "fas fa-envelope"

View file

@ -23,7 +23,7 @@ search:
no_results: Hop! Öyle bir şey bulamadım. no_results: Hop! Öyle bir şey bulamadım.
panel: panel:
lastmod: Yeni Güncellendi lastmod: Son Güncellenenler
trending_tags: Yükselen Etiketler trending_tags: Yükselen Etiketler
toc: İçindekiler toc: İçindekiler
@ -38,7 +38,7 @@ copyright:
brief: Bazı hakları saklıdır. brief: Bazı hakları saklıdır.
verbose: >- verbose: >-
Aksi belirtilmediği sürece, bu sitedeki gönderiler Creative Commons Atıf 4.0 Uluslararası (CC BY 4.0) Lisansı altındadır. Aksi belirtilmediği sürece, bu sitedeki gönderiler Creative Commons Atıf 4.0 Uluslararası (CC BY 4.0) Lisansı altındadır.
Kısaca sayfa linkini de vererek paylaşabilir veya düzenleyip paylaşabilirsin. Kısaca sayfa linkini vererek değiştirebilir / paylaşabilirsiniz.
meta: :PLATFORM ve :THEME teması meta: :PLATFORM ve :THEME teması
@ -53,8 +53,8 @@ notification:
post: post:
written_by: Yazan written_by: Yazan
posted: Gönderilme Tarihi posted: Gönderim
updated: Güncellenme Tarihi updated: Güncelleme
words: sözcük words: sözcük
pageview_measure: görüntülenme pageview_measure: görüntülenme
read_time: read_time:

View file

@ -16,31 +16,31 @@ webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:w
# Libraries # Libraries
jquery: jquery:
js: https://cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js js: https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js
bootstrap: bootstrap:
css: https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css css: https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css
js: https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js js: https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js
toc: toc:
css: https://cdn.jsdelivr.net/npm/tocbot@4.21.0/dist/tocbot.min.css css: https://cdn.jsdelivr.net/npm/tocbot@4.21.1/dist/tocbot.min.css
js: https://cdn.jsdelivr.net/npm/tocbot@4.21.0/dist/tocbot.min.js js: https://cdn.jsdelivr.net/npm/tocbot@4.21.1/dist/tocbot.min.js
fontawesome: fontawesome:
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/css/all.min.css css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css
search: search:
js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
mermaid: mermaid:
js: https://cdn.jsdelivr.net/npm/mermaid@9.4.3/dist/mermaid.min.js js: https://cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js
dayjs: dayjs:
js: js:
common: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/dayjs.min.js common: https://cdn.jsdelivr.net/npm/dayjs@1.11.9/dayjs.min.js
locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/locale/:LOCALE.min.js locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.9/locale/:LOCALE.min.js
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/plugin/relativeTime.min.js relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.9/plugin/relativeTime.min.js
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/plugin/localizedFormat.min.js localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.9/plugin/localizedFormat.min.js
magnific-popup: magnific-popup:
css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css

View file

@ -3,7 +3,7 @@
platforms: platforms:
- type: Twitter - type: Twitter
icon: "fab fa-twitter" icon: "fa-brands fa-square-x-twitter"
link: "https://twitter.com/intent/tweet?text=TITLE&url=URL" link: "https://twitter.com/intent/tweet?text=TITLE&url=URL"
- type: Facebook - type: Facebook

View file

@ -1,5 +1,6 @@
<!-- The Disqus lazy loading. --> <!-- The Disqus lazy loading. -->
<div id="disqus_thread" class="pt-2 pb-2">
<div id="disqus_thread" class="mb-5">
<p class="text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p> <p class="text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p>
</div> </div>

View file

@ -3,12 +3,13 @@
See: ${JS_ROOT}/utils/locale-dateime.js See: ${JS_ROOT}/utils/locale-dateime.js
--> -->
{% assign wrap_elem = include.wrap | default: 'em' %}
{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %} {% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %}
{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %} {% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
<{{ wrap_elem }} <time
class="{% if include.class %}{{ include.class }}{% endif %}" {% if include.class %}
class="{{ include.class }}"
{% endif %}
data-ts="{{ include.date | date: '%s' }}" data-ts="{{ include.date | date: '%s' }}"
data-df="{{ df_dayjs }}" data-df="{{ df_dayjs }}"
{% if include.tooltip %} {% if include.tooltip %}
@ -16,4 +17,4 @@
{% endif %} {% endif %}
> >
{{ include.date | date: df_strftime }} {{ include.date | date: df_strftime }}
</{{ wrap_elem }}> </time>

View file

@ -1,23 +1,15 @@
<!-- The Footer --> <!-- The Footer -->
<footer> <footer
<div class="container px-lg-4"> aria-label="Site Info"
<div class="d-flex justify-content-center align-items-center text-muted mx-md-3"> class="
d-flex flex-column justify-content-center text-muted
flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3
"
>
<p> <p>
{%- capture _platform -%} {{ '©' }}
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a> <time>{{ 'now' | date: '%Y' }}</time>
{%- endcapture -%}
{%- capture _theme -%}
<a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
{%- endcapture -%}
{{ site.data.locales[include.lang].meta | replace: ':PLATFORM', _platform | replace: ':THEME', _theme }}
</p>
<p>
{{- '©' }}
{{ 'now' | date: '%Y' }}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>. <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
{% if site.data.locales[include.lang].copyright.brief %} {% if site.data.locales[include.lang].copyright.brief %}
<span <span
@ -29,6 +21,16 @@
</span> </span>
{% endif %} {% endif %}
</p> </p>
</div>
</div> <p>
{%- capture _platform -%}
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
{%- endcapture -%}
{%- capture _theme -%}
<a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
{%- endcapture -%}
{{ site.data.locales[include.lang].meta | replace: ':PLATFORM', _platform | replace: ':THEME', _theme }}
</p>
</footer> </footer>

View file

@ -74,7 +74,7 @@
<!-- Font Awesome --> <!-- Font Awesome -->
<link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}"> <link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}"> <link rel="stylesheet" href="{{ '/assets/css/:THEME.css' | replace: ':THEME', site.theme | relative_url }}">
{% if site.toc and page.toc %} {% if site.toc and page.toc %}
<link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}"> <link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}">

View file

@ -0,0 +1,24 @@
<aside
id="notification"
class="toast"
role="alert"
aria-live="assertive"
aria-atomic="true"
data-bs-animation="true"
data-bs-autohide="false"
>
<div class="toast-header">
<button
type="button"
class="btn-close ms-auto"
data-bs-dismiss="toast"
aria-label="Close"
></button>
</div>
<div class="toast-body text-center pt-0">
<p class="px-2 mb-3">{{ site.data.locales[include.lang].notification.update_found }}</p>
<button type="button" class="btn btn-primary" aria-label="Update">
{{ site.data.locales[include.lang].notification.update }}
</button>
</div>
</aside>

View file

@ -1,19 +1,19 @@
<!-- Navigation buttons at the bottom of the post. --> <!-- Navigation buttons at the bottom of the post. -->
<div class="post-navigation d-flex justify-content-between"> <nav class="post-navigation d-flex justify-content-between" aria-label="Post Navigation">
{% assign previous = site.data.locales[include.lang].post.button.previous %}
{% assign next = site.data.locales[include.lang].post.button.next %}
{% if page.previous.url %} {% if page.previous.url %}
<a <a
href="{{ site.baseurl }}{{ page.previous.url }}" href="{{ site.baseurl }}{{ page.previous.url }}"
class="btn btn-outline-primary" class="btn btn-outline-primary"
prompt="{{ site.data.locales[include.lang].post.button.previous }}" aria-label="{{ previous }}"
> >
<p>{{ page.previous.title }}</p> <p>{{ page.previous.title }}</p>
</a> </a>
{% else %} {% else %}
<div <div class="btn btn-outline-primary disabled" aria-label="{{ previous }}">
class="btn btn-outline-primary disabled"
prompt="{{ site.data.locales[include.lang].post.button.previous }}"
>
<p>-</p> <p>-</p>
</div> </div>
{% endif %} {% endif %}
@ -22,16 +22,13 @@
<a <a
href="{{ site.baseurl }}{{page.next.url}}" href="{{ site.baseurl }}{{page.next.url}}"
class="btn btn-outline-primary" class="btn btn-outline-primary"
prompt="{{ site.data.locales[include.lang].post.button.next }}" aria-label="{{ next }}"
> >
<p>{{ page.next.title }}</p> <p>{{ page.next.title }}</p>
</a> </a>
{% else %} {% else %}
<div <div class="btn btn-outline-primary disabled" aria-label="{{ next }}">
class="btn btn-outline-primary disabled"
prompt="{{ site.data.locales[include.lang].post.button.next }}"
>
<p>-</p> <p>-</p>
</div> </div>
{% endif %} {% endif %}
</div> </nav>

View file

@ -1,6 +1,7 @@
<!-- The paginator for post list on HomgPage. --> <!-- The paginator for post list on HomgPage. -->
<ul class="pagination align-items-center mt-4 mb-1 ps-lg-2"> <nav aria-label="Page Navigation">
<ul class="pagination align-items-center mt-4 mb-0">
<!-- left arrow --> <!-- left arrow -->
{% if paginator.previous_page %} {% if paginator.previous_page %}
{% assign prev_url = paginator.previous_page_path | relative_url %} {% assign prev_url = paginator.previous_page_path | relative_url %}
@ -9,7 +10,7 @@
{% endif %} {% endif %}
<li class="page-item {% unless paginator.previous_page %}disabled{% endunless %}"> <li class="page-item {% unless paginator.previous_page %}disabled{% endunless %}">
<a class="page-link btn-box-shadow" href="{{ prev_url }}" aria-label="previous-page"> <a class="page-link" href="{{ prev_url }}" aria-label="previous-page">
<i class="fas fa-angle-left"></i> <i class="fas fa-angle-left"></i>
</a> </a>
</li> </li>
@ -45,7 +46,7 @@
<!-- show number --> <!-- show number -->
<li class="page-item {% if i == paginator.page %} active{% endif %}"> <li class="page-item {% if i == paginator.page %} active{% endif %}">
<a <a
class="page-link btn-box-shadow" class="page-link"
href="{% if i > 1 %}{{ site.paginate_path | replace: ':num', i | relative_url }}{% else %}{{ '/' | relative_url }}{% endif %}" href="{% if i > 1 %}{{ site.paginate_path | replace: ':num', i | relative_url }}{% else %}{{ '/' | relative_url }}{% endif %}"
> >
{{- i -}} {{- i -}}
@ -55,12 +56,12 @@
<!-- hide number --> <!-- hide number -->
{% if i < pre and left_ellipsis == false %} {% if i < pre and left_ellipsis == false %}
<li class="page-item disabled"> <li class="page-item disabled">
<span class="page-link btn-box-shadow">...</span> <span class="page-link">...</span>
</li> </li>
{% assign left_ellipsis = true %} {% assign left_ellipsis = true %}
{% elsif i > next and right_ellipsis == false %} {% elsif i > next and right_ellipsis == false %}
<li class="page-item disabled"> <li class="page-item disabled">
<span class="page-link btn-box-shadow">...</span> <span class="page-link">...</span>
</li> </li>
{% assign right_ellipsis = true %} {% assign right_ellipsis = true %}
{% endif %} {% endif %}
@ -81,9 +82,10 @@
{% endif %} {% endif %}
<li class="page-item {% unless paginator.next_page_path %}disabled{% endunless %}"> <li class="page-item {% unless paginator.next_page_path %}disabled{% endunless %}">
<a class="page-link btn-box-shadow" href="{{ next_url }}" aria-label="next-page"> <a class="page-link" href="{{ next_url }}" aria-label="next-page">
<i class="fas fa-angle-right"></i> <i class="fas fa-angle-right"></i>
</a> </a>
</li> </li>
</ul> </ul>
</nav>
<!-- .pagination --> <!-- .pagination -->

View file

@ -1,6 +1,6 @@
<!-- Post sharing snippet --> <!-- Post sharing snippet -->
<div class="share-wrapper"> <div class="share-wrapper d-flex align-items-center">
<span class="share-label text-muted me-1">{{ site.data.locales[include.lang].post.share }}</span> <span class="share-label text-muted me-1">{{ site.data.locales[include.lang].post.share }}</span>
<span class="share-icons"> <span class="share-icons">
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %} {% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
@ -22,14 +22,16 @@
</a> </a>
{% endfor %} {% endfor %}
<i <button
id="copy-link" id="copy-link"
class="fa-fw fas fa-link small" aria-label="Copy link"
class="btn small"
data-bs-toggle="tooltip" data-bs-toggle="tooltip"
data-bs-placement="top" data-bs-placement="top"
title="{{ site.data.locales[include.lang].post.button.share_link.title }}" title="{{ site.data.locales[include.lang].post.button.share_link.title }}"
data-title-succeed="{{ site.data.locales[include.lang].post.button.share_link.succeed }}" data-title-succeed="{{ site.data.locales[include.lang].post.button.share_link.succeed }}"
> >
</i> <i class="fa-fw fas fa-link pe-none"></i>
</button>
</span> </span>
</div> </div>

View file

@ -1,7 +1,4 @@
<!-- <!-- Recommend the other 3 posts according to the tags and categories of the current post. -->
Recommend the other 3 posts according to the tags and categories of the current post,
if the number is not enough, use the other latest posts to supplement.
-->
<!-- The total size of related posts --> <!-- The total size of related posts -->
{% assign TOTAL_SIZE = 3 %} {% assign TOTAL_SIZE = 3 %}
@ -14,11 +11,21 @@
{% assign SEPARATOR = ':' %} {% assign SEPARATOR = ':' %}
{% assign match_posts = '' | split: '' %}
{% for category in page.categories %}
{% assign match_posts = match_posts | push: site.categories[category] | uniq %}
{% endfor %}
{% for tag in page.tags %}
{% assign match_posts = match_posts | push: site.tags[tag] | uniq %}
{% endfor %}
{% assign last_index = match_posts.size | minus: 1 %}
{% assign score_list = '' | split: '' %} {% assign score_list = '' | split: '' %}
{% assign last_index = site.posts.size | minus: 1 %}
{% for i in (0..last_index) %} {% for i in (0..last_index) %}
{% assign post = site.posts[i] %} {% assign post = match_posts[i] %}
{% if post.url == page.url %} {% if post.url == page.url %}
{% continue %} {% continue %}
@ -54,39 +61,25 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<!-- Fill with the other newlest posts --> {% assign relate_posts = '' | split: '' %}
{% assign less = TOTAL_SIZE | minus: index_list.size %}
{% if less > 0 %} {% for index in index_list %}
{% for i in (0..last_index) %} {% assign i = index | to_integer %}
{% assign post = site.posts[i] %} {% assign relate_posts = relate_posts | push: match_posts[i] %}
{% if post.url != page.url %}
{% capture cur_index %}{{ i }}{% endcapture %}
{% unless index_list contains cur_index %}
{% assign index_list = index_list | push: cur_index %}
{% assign less = less | minus: 1 %}
{% if less <= 0 %}
{% break %}
{% endif %}
{% endunless %}
{% endif %}
{% endfor %} {% endfor %}
{% endif %}
{% if index_list.size > 0 %} {% if relate_posts.size > 0 %}
<div id="related-posts" class="mb-2 mb-sm-4"> <aside id="related-posts" aria-labelledby="related-label">
<h3 class="pt-2 mb-4 ms-1" data-toc-skip> <h3 class="mb-4" id="related-label">
{{ site.data.locales[include.lang].post.relate_posts }} {{- site.data.locales[include.lang].post.relate_posts -}}
</h3> </h3>
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4 mb-4"> <nav class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4 mb-4">
{% for entry in index_list %} {% for post in relate_posts %}
{% assign index = entry | plus: 0 %} <article class="col">
{% assign post = site.posts[index] %} <a href="{{ post.url | relative_url }}" class="post-preview card h-100">
<div class="col">
<a href="{{ post.url | relative_url }}" class="card post-preview h-100">
<div class="card-body"> <div class="card-body">
{% include datetime.html date=post.date class="small" lang=include.lang %} {% include datetime.html date=post.date class="small" lang=include.lang %}
<h4 class="pt-0 my-2" data-toc-skip>{{ post.title }}</h4> <h4 class="pt-0 my-2">{{ post.title }}</h4>
<div class="text-muted small"> <div class="text-muted small">
<p> <p>
{% include no-linenos.html content=post.content %} {% include no-linenos.html content=post.content %}
@ -95,10 +88,9 @@
</div> </div>
</div> </div>
</a> </a>
</div> </article>
{% endfor %} {% endfor %}
</div> </nav>
<!-- .card-deck --> </aside>
</div>
<!-- #related-posts --> <!-- #related-posts -->
{% endif %} {% endif %}

View file

@ -4,14 +4,16 @@
--> -->
{% capture result_elem %} {% capture result_elem %}
<div class="px-1 px-sm-2 px-lg-4 px-xl-0"> <article class="px-1 px-sm-2 px-lg-4 px-xl-0">
<a href="{url}">{title}</a> <header>
<h2><a href="{url}">{title}</a></h2>
<div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1"> <div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
{categories} {categories}
{tags} {tags}
</div> </div>
</header>
<p>{snippet}</p> <p>{snippet}</p>
</div> </article>
{% endcapture %} {% endcapture %}
{% capture not_found %}<p class="mt-5">{{ site.data.locales[include.lang].search.no_results }}</p>{% endcapture %} {% capture not_found %}<p class="mt-5">{{ site.data.locales[include.lang].search.no_results }}</p>{% endcapture %}

View file

@ -1,7 +1,7 @@
<!-- The Search results --> <!-- The Search results -->
<div id="search-result-wrapper" class="d-flex justify-content-center unloaded"> <div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
<div class="col-11 post-content"> <div class="col-11 content">
<div id="search-hints"> <div id="search-hints">
{% include_cached trending-tags.html %} {% include_cached trending-tags.html %}
</div> </div>

View file

@ -1,7 +1,7 @@
<!-- The Side Bar --> <!-- The Side Bar -->
<div id="sidebar" class="d-flex flex-column align-items-end"> <aside aria-label="Sidebar" id="sidebar" class="d-flex flex-column align-items-end">
<div class="profile-wrapper"> <header class="profile-wrapper">
<a href="{{ '/' | relative_url }}" id="avatar" class="rounded-circle"> <a href="{{ '/' | relative_url }}" id="avatar" class="rounded-circle">
{% if site.avatar != empty and site.avatar %} {% if site.avatar != empty and site.avatar %}
{% capture avatar_url %} {% capture avatar_url %}
@ -17,14 +17,15 @@
{% endif %} {% endif %}
</a> </a>
<div class="site-title"> <h1 class="site-title">
<a href="{{ '/' | relative_url }}">{{ site.title }}</a> <a href="{{ '/' | relative_url }}">{{ site.title }}</a>
</div> </h1>
<div class="site-subtitle fst-italic">{{ site.tagline }}</div> <p class="site-subtitle fst-italic mb-0">{{ site.tagline }}</p>
</div> </header>
<!-- .profile-wrapper --> <!-- .profile-wrapper -->
<ul class="nav flex-column flex-grow-1 w-100 ps-0"> <nav class="flex-column flex-grow-1 w-100 ps-0">
<ul class="nav">
<!-- home --> <!-- home -->
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}"> <li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
<a href="{{ '/' | relative_url }}" class="nav-link"> <a href="{{ '/' | relative_url }}" class="nav-link">
@ -45,11 +46,11 @@
<!-- .nav-item --> <!-- .nav-item -->
{% endfor %} {% endfor %}
</ul> </ul>
<!-- ul.nav.flex-column --> </nav>
<div class="sidebar-bottom d-flex flex-wrap align-items-center w-100"> <div class="sidebar-bottom d-flex flex-wrap align-items-center w-100">
{% unless site.theme_mode %} {% unless site.theme_mode %}
<button class="mode-toggle btn" aria-label="Switch Mode"> <button type="button" class="mode-toggle btn" aria-label="Switch Mode">
<i class="fas fa-adjust"></i> <i class="fas fa-adjust"></i>
</button> </button>
@ -58,6 +59,7 @@
{% endif %} {% endif %}
{% endunless %} {% endunless %}
<address class="d-flex mb-0">
{% for entry in site.data.contact %} {% for entry in site.data.contact %}
{% case entry.type %} {% case entry.type %}
{% when 'github', 'twitter' %} {% when 'github', 'twitter' %}
@ -98,7 +100,8 @@
</a> </a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</address>
</div> </div>
<!-- .sidebar-bottom --> <!-- .sidebar-bottom -->
</div> </aside>
<!-- #sidebar --> <!-- #sidebar -->

View file

@ -6,8 +6,8 @@
{% endif %} {% endif %}
{% if enable_toc %} {% if enable_toc %}
<div id="toc-wrapper" class="ps-0 pe-4 mb-5"> <section id="toc-wrapper" class="ps-0 pe-4 mb-5">
<div class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</div> <h2 class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
<nav id="toc"></nav> <nav id="toc"></nav>
</div> </section>
{% endif %} {% endif %}

View file

@ -1,11 +1,11 @@
<!-- The Top Bar --> <!-- The Top Bar -->
<div id="topbar-wrapper"> <header id="topbar-wrapper" aria-label="Top Bar">
<div <div
id="topbar" id="topbar"
class="container d-flex align-items-center justify-content-between h-100" class="d-flex align-items-center justify-content-between px-lg-3 h-100"
> >
<span id="breadcrumb"> <nav id="breadcrumb" aria-label="Breadcrumb">
{% assign paths = page.url | split: '/' %} {% assign paths = page.url | split: '/' %}
{% if paths.size == 0 or page.layout == 'home' %} {% if paths.size == 0 or page.layout == 'home' %}
@ -37,10 +37,12 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</span> </nav>
<!-- endof #breadcrumb --> <!-- endof #breadcrumb -->
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i> <button type="button" id="sidebar-trigger" class="btn btn-link">
<i class="fas fa-bars fa-fw"></i>
</button>
<div id="topbar-title"> <div id="topbar-title">
{% if page.layout == 'home' %} {% if page.layout == 'home' %}
@ -53,8 +55,11 @@
{% endif %} {% endif %}
</div> </div>
<i id="search-trigger" class="fas fa-search fa-fw"></i> <button type="button" id="search-trigger" class="btn btn-link">
<span id="search-wrapper" class="align-items-center"> <i class="fas fa-search fa-fw"></i>
</button>
<search class="align-items-center ms-3 ms-lg-0">
<i class="fas fa-search fa-fw"></i> <i class="fas fa-search fa-fw"></i>
<input <input
class="form-control" class="form-control"
@ -64,7 +69,9 @@
autocomplete="off" autocomplete="off"
placeholder="{{ site.data.locales[include.lang].search.hint | capitalize }}..." placeholder="{{ site.data.locales[include.lang].search.hint | capitalize }}..."
> >
</span> </search>
<span id="search-cancel">{{ site.data.locales[include.lang].search.cancel }}</span> <button type="button" class="btn btn-link text-decoration-none" id="search-cancel">
</div> {{- site.data.locales[include.lang].search.cancel -}}
</button>
</div> </div>
</header>

View file

@ -34,13 +34,13 @@
{% endfor %} {% endfor %}
{% if trending_tags.size > 0 %} {% if trending_tags.size > 0 %}
<div id="access-tags"> <section>
<div class="panel-heading">{{- site.data.locales[include.lang].panel.trending_tags -}}</div> <h2 class="panel-heading">{{- site.data.locales[include.lang].panel.trending_tags -}}</h2>
<div class="d-flex flex-wrap mt-3 mb-1 me-3"> <div class="d-flex flex-wrap mt-3 mb-1 me-3">
{% for tag_name in trending_tags %} {% for tag_name in trending_tags %}
{% assign url = tag_name | slugify | url_encode | prepend: '/tags/' | append: '/' %} {% assign url = tag_name | slugify | url_encode | prepend: '/tags/' | append: '/' %}
<a class="post-tag btn btn-outline-primary" href="{{ url | relative_url }}">{{ tag_name }}</a> <a class="post-tag btn btn-outline-primary" href="{{ url | relative_url }}">{{ tag_name }}</a>
{% endfor %} {% endfor %}
</div> </div>
</div> </section>
{% endif %} {% endif %}

View file

@ -22,9 +22,9 @@
{% endfor %} {% endfor %}
{% if update_list.size > 0 %} {% if update_list.size > 0 %}
<div id="access-lastmod" class="post"> <section id="access-lastmod">
<div class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</div> <h2 class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</h2>
<ul class="post-content list-unstyled ps-0 pb-1 ms-1 mt-2"> <ul class="content list-unstyled ps-0 pb-1 ms-1 mt-2">
{% for item in update_list %} {% for item in update_list %}
{% assign index = item | split: '::' | last | plus: 0 %} {% assign index = item | split: '::' | last | plus: 0 %}
{% assign post = site.posts[index] %} {% assign post = site.posts[index] %}
@ -34,6 +34,6 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </section>
<!-- #access-lastmod --> <!-- #access-lastmod -->
{% endif %} {% endif %}

View file

@ -1,3 +1 @@
Chirpy v<%= pkg.version %> (<%= pkg.homepage %>) Chirpy v<%= pkg.version %> | © 2019 <%= pkg.author %> | <%= pkg.license %> Licensed | <%= pkg.homepage %>
© 2019 <%= pkg.author %>
<%= pkg.license %> Licensed

View file

@ -99,7 +99,9 @@ export function initClipboard() {
/* --- Post link sharing --- */ /* --- Post link sharing --- */
$('#copy-link').on('click', (e) => { const btnCopyLink = $('#copy-link');
btnCopyLink.on('click', (e) => {
let target = $(e.target); let target = $(e.target);
if (isLocked(target)) { if (isLocked(target)) {
@ -120,4 +122,10 @@ export function initClipboard() {
}, TIMEOUT); }, TIMEOUT);
}); });
}); });
btnCopyLink.on('mouseleave', function (e) {
const target = $(e.target);
target.tooltip('hide');
console.log('mouse leave...');
});
} }

View file

@ -7,7 +7,7 @@ function stopShimmer($node) {
} }
export function imgLazy() { export function imgLazy() {
const $images = $('#core-wrapper img[data-src]'); const $images = $('main img[data-src]');
if ($images.length <= 0) { if ($images.length <= 0) {
return; return;

View file

@ -4,9 +4,9 @@
const $btnSbTrigger = $('#sidebar-trigger'); const $btnSbTrigger = $('#sidebar-trigger');
const $btnSearchTrigger = $('#search-trigger'); const $btnSearchTrigger = $('#search-trigger');
const $btnCancel = $('#search-cancel'); const $btnCancel = $('#search-cancel');
const $content = $('#main>.row'); const $content = $('#main-wrapper>.container>.row');
const $topbarTitle = $('#topbar-title'); const $topbarTitle = $('#topbar-title');
const $searchWrapper = $('#search-wrapper'); const $search = $('search');
const $resultWrapper = $('#search-result-wrapper'); const $resultWrapper = $('#search-result-wrapper');
const $results = $('#search-results'); const $results = $('#search-results');
const $input = $('#search-input'); const $input = $('#search-input');
@ -39,13 +39,13 @@ class MobileSearchBar {
$btnSbTrigger.addClass(C_UNLOADED); $btnSbTrigger.addClass(C_UNLOADED);
$topbarTitle.addClass(C_UNLOADED); $topbarTitle.addClass(C_UNLOADED);
$btnSearchTrigger.addClass(C_UNLOADED); $btnSearchTrigger.addClass(C_UNLOADED);
$searchWrapper.addClass(C_FLEX); $search.addClass(C_FLEX);
$btnCancel.addClass(C_LOADED); $btnCancel.addClass(C_LOADED);
} }
static off() { static off() {
$btnCancel.removeClass(C_LOADED); $btnCancel.removeClass(C_LOADED);
$searchWrapper.removeClass(C_FLEX); $search.removeClass(C_FLEX);
$btnSbTrigger.removeClass(C_UNLOADED); $btnSbTrigger.removeClass(C_UNLOADED);
$topbarTitle.removeClass(C_UNLOADED); $topbarTitle.removeClass(C_UNLOADED);
$btnSearchTrigger.removeClass(C_UNLOADED); $btnSearchTrigger.removeClass(C_UNLOADED);
@ -55,7 +55,7 @@ class MobileSearchBar {
class ResultSwitch { class ResultSwitch {
static on() { static on() {
if (!ScrollBlocker.resultVisible) { if (!ScrollBlocker.resultVisible) {
// the block method must be called before $(#main) unloaded. // the block method must be called before $(#main-wrapper>.container) unloaded.
ScrollBlocker.on(); ScrollBlocker.on();
$resultWrapper.removeClass(C_UNLOADED); $resultWrapper.removeClass(C_UNLOADED);
$content.addClass(C_UNLOADED); $content.addClass(C_UNLOADED);
@ -72,7 +72,7 @@ class ResultSwitch {
$resultWrapper.addClass(C_UNLOADED); $resultWrapper.addClass(C_UNLOADED);
$content.removeClass(C_UNLOADED); $content.removeClass(C_UNLOADED);
// now the release method must be called after $(#main) display // now the release method must be called after $(#main-wrapper>.container) display
ScrollBlocker.off(); ScrollBlocker.off();
$input.val(''); $input.val('');
@ -98,11 +98,11 @@ export function displaySearch() {
}); });
$input.on('focus', function () { $input.on('focus', function () {
$searchWrapper.addClass(C_FOCUS); $search.addClass(C_FOCUS);
}); });
$input.on('focusout', function () { $input.on('focusout', function () {
$searchWrapper.removeClass(C_FOCUS); $search.removeClass(C_FOCUS);
}); });
$input.on('input', () => { $input.on('input', () => {

View file

@ -1,11 +1,11 @@
export function toc() { export function toc() {
if (document.querySelector('#core-wrapper h2,#core-wrapper h3')) { if (document.querySelector('main h2')) {
// see: https://github.com/tscanlin/tocbot#usage // see: https://github.com/tscanlin/tocbot#usage
tocbot.init({ tocbot.init({
tocSelector: '#toc', tocSelector: '#toc',
contentSelector: '.post-content', contentSelector: '.content',
ignoreSelector: '[data-toc-skip]', ignoreSelector: '[data-toc-skip]',
headingSelector: 'h2, h3', headingSelector: 'h2, h3, h4',
orderedList: false, orderedList: false,
scrollSmooth: false scrollSmooth: false
}); });

View file

@ -9,20 +9,21 @@ layout: page
{% assign df_dayjs_m = site.data.locales[lang].df.archives.dayjs | default: '/ MM' %} {% assign df_dayjs_m = site.data.locales[lang].df.archives.dayjs | default: '/ MM' %}
<div id="archives" class="pl-xl-3"> <div id="archives" class="pl-xl-3">
{% for post in site.posts %} {% for post in site.posts %}
{% capture cur_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% assign cur_year = post.date | date: '%Y' %}
{% if cur_year != last_year %} {% if cur_year != last_year %}
{% unless forloop.first %}</ul>{% endunless %} {% unless forloop.first %}</ul>{% endunless %}
<div class="year lead">{{ cur_year }}</div>
<ul class="list-unstyled"> <time class="year lead d-block">{{ cur_year }}</time>
{{ '<ul class="list-unstyled">' }}
{% assign last_year = cur_year %} {% assign last_year = cur_year %}
{% endif %} {% endif %}
<li> <li>
{% assign ts = post.date | date: '%s' %} {% assign ts = post.date | date: '%s' %}
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: "%d" }}</span> <span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: '%d' }}</span>
<span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}"> <span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
{{ post.date | date: df_strftime_m }} {{ post.date | date: df_strftime_m }}
</span> </span>
@ -30,7 +31,5 @@ layout: page
</li> </li>
{% if forloop.last %}</ul>{% endif %} {% if forloop.last %}</ul>{% endif %}
{% endfor %} {% endfor %}
</div> </div>

View file

@ -12,12 +12,12 @@ layout: page
<span class="lead text-muted ps-2">{{ page.posts | size }}</span> <span class="lead text-muted ps-2">{{ page.posts | size }}</span>
</h1> </h1>
<ul class="post-content ps-0"> <ul class="content ps-0">
{% for post in page.posts %} {% for post in page.posts %}
<li class="d-flex justify-content-between px-md-3"> <li class="d-flex justify-content-between px-md-3">
<a href="{{ post.url | relative_url }}">{{ post.title }}</a> <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<span class="dash flex-grow-1"></span> <span class="dash flex-grow-1"></span>
{% include datetime.html date=post.date wrap='span' class='text-muted small' lang=lang %} {% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -15,6 +15,10 @@ layout: compress
{% endif %} {% endif %}
{% endcapture %} {% endcapture %}
{% if layout.tail_includes %}
{% assign has_tail = true %}
{% endif %}
<!-- `site.alt_lang` can specify a language different from the UI --> <!-- `site.alt_lang` can specify a language different from the UI -->
<html lang="{{ site.alt_lang | default: site.lang }}" {{ prefer_mode }}> <html lang="{{ site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
{% include head.html %} {% include head.html %}
@ -23,48 +27,63 @@ layout: compress
{% include sidebar.html lang=lang %} {% include sidebar.html lang=lang %}
<div id="main-wrapper" class="d-flex justify-content-center"> <div id="main-wrapper" class="d-flex justify-content-center">
<div id="main" class="container px-xxl-5"> <div class="container px-xxl-5">
{% include topbar.html lang=lang %} {% include topbar.html lang=lang %}
<div class="row">
<main
aria-label="Main Content"
class="col-12 col-lg-11 col-xl-9 px-md-4{% unless has_tail %} pb-5{% endunless %}"
>
{{ content }} {{ content }}
{% include_cached search-results.html lang=lang %} </main>
<!-- panel -->
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
<div class="access">
{% include_cached update-list.html lang=lang %}
{% include_cached trending-tags.html lang=lang %}
</div>
{% for _include in layout.panel_includes %}
{% assign _include_path = _include | append: '.html' %}
{% include {{ _include_path }} lang=lang %}
{% endfor %}
</aside>
</div>
<div class="row">
<!-- tail -->
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
{% if has_tail %}
{% for _include in layout.tail_includes %}
{% assign _include_path = _include | append: '.html' %}
{% include {{ _include_path }} lang=lang %}
{% endfor %}
{% endif %}
{% include_cached footer.html lang=lang %}
</div> </div>
</div> </div>
{% include_cached footer.html lang=lang %} {% include_cached search-results.html lang=lang %}
</div>
<aside aria-label="Scroll to Top">
<button id="back-to-top" type="button" class="btn btn-lg btn-box-shadow">
<i class="fas fa-angle-up"></i>
</button>
</aside>
</div>
<div id="mask"></div> <div id="mask"></div>
<button id="back-to-top" aria-label="back-to-top" class="btn btn-lg btn-box-shadow">
<i class="fas fa-angle-up"></i>
</button>
{% if site.pwa.enabled %} {% if site.pwa.enabled %}
<div {% include_cached notification.html lang=lang %}
id="notification"
class="toast"
role="alert"
aria-live="assertive"
aria-atomic="true"
data-bs-animation="true"
data-bs-autohide="false"
>
<div class="toast-header">
<button
type="button"
class="btn-close ms-auto"
data-bs-dismiss="toast"
aria-label="Close"
></button>
</div>
<div class="toast-body text-center pt-0">
<p class="px-2 mb-3">{{ site.data.locales[lang].notification.update_found }}</p>
<button type="button" class="btn btn-primary" aria-label="Update">
{{ site.data.locales[lang].notification.update }}
</button>
</div>
</div>
{% endif %} {% endif %}
<!-- JavaScripts -->
{% include js-selector.html %} {% include js-selector.html %}
{% if page.mermaid %} {% if page.mermaid %}

View file

@ -1,6 +1,5 @@
--- ---
layout: page layout: default
refactor: true
--- ---
{% include lang.html %} {% include lang.html %}
@ -40,10 +39,10 @@ refactor: true
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div id="post-list"> {% capture content %}
{% for post in posts %} {% for post in posts %}
<a href="{{ post.url | relative_url }}" class="card-wrapper"> <article class="card-wrapper">
<div class="card post-preview flex-md-row-reverse"> <a href="{{ post.url | relative_url }}" class="card post-preview flex-md-row-reverse">
{% if post.image %} {% if post.image %}
{% if post.image.lqip %} {% if post.image.lqip %}
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %} {% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
@ -60,11 +59,9 @@ refactor: true
{% endif %} {% endif %}
<div class="card-body d-flex flex-column"> <div class="card-body d-flex flex-column">
<h1 class="card-title my-2 mt-md-0"> <h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
{{ post.title }}
</h1>
<div class="card-text post-content mt-0 mb-2"> <div class="card-text content mt-0 mb-2">
<p> <p>
{% include no-linenos.html content=post.content %} {% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 | escape }} {{ content | markdownify | strip_html | truncate: 200 | escape }}
@ -99,9 +96,13 @@ refactor: true
<!-- .post-meta --> <!-- .post-meta -->
</div> </div>
<!-- .card-body --> <!-- .card-body -->
</div>
</a> </a>
</article>
{% endfor %} {% endfor %}
{% endcapture %}
<div id="post-list" class="flex-grow-1 pe-xl-2">
{% include refactor-content.html content=content lang=lang %}
</div> </div>
<!-- #post-list --> <!-- #post-list -->

View file

@ -2,21 +2,6 @@
layout: default layout: default
--- ---
{% include lang.html %}
{% include origin-type.html %}
{% if layout.tail_includes %}
{% assign has_tail = true %}
{% endif %}
<div class="row{% unless has_tail %} mb-5{% endunless %}">
<!-- core -->
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pe-xl-4">
{% capture padding %}
{% unless page.layout == 'home' %}px-1{% endunless %}
{% endcapture %}
<div class="post {{ padding | strip }} px-md-2">
{% capture _content %} {% capture _content %}
{% if layout.refactor or page.layout == 'page' %} {% if layout.refactor or page.layout == 'page' %}
{% include refactor-content.html content=content lang=lang %} {% include refactor-content.html content=content lang=lang %}
@ -25,44 +10,17 @@ layout: default
{% endif %} {% endif %}
{% endcapture %} {% endcapture %}
<article class="px-1">
{% if page.layout == 'page' or page.collection == 'tabs' %} {% if page.layout == 'page' or page.collection == 'tabs' %}
{% assign tab_key = page.title | downcase %} {% assign tab_key = page.title | downcase %}
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %} {% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
<h1 class="dynamic-title"> <h1 class="dynamic-title">
{{ title }} {{ title }}
</h1> </h1>
<div class="post-content"> <div class="content">
{{ _content }} {{ _content }}
</div> </div>
{% else %} {% else %}
{{ _content }} {{ _content }}
{% endif %} {% endif %}
</div> </article>
</div>
<!-- #core-wrapper -->
<!-- panel -->
<div id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
<div class="access">
{% include_cached update-list.html lang=lang %}
{% include_cached trending-tags.html lang=lang %}
</div>
{% for _include in layout.panel_includes %}
{% assign _include_path = _include | append: '.html' %}
{% include {{ _include_path }} lang=lang %}
{% endfor %}
</div>
</div>
<!-- tail -->
{% if has_tail %}
<div class="row">
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-3 pe-xl-4 mt-5">
{% for _include in layout.tail_includes %}
{% assign _include_path = _include | append: '.html' %}
{% include {{ _include_path }} lang=lang %}
{% endfor %}
</div>
</div>
{% endif %}

View file

@ -11,6 +11,7 @@ tail_includes:
{% include lang.html %} {% include lang.html %}
<header>
<h1 data-toc-skip>{{ page.title }}</h1> <h1 data-toc-skip>{{ page.title }}</h1>
<div class="post-meta text-muted"> <div class="post-meta text-muted">
@ -62,7 +63,7 @@ tail_includes:
{% if authors %} {% if authors %}
{% for author in authors %} {% for author in authors %}
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a> <a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
{% unless forloop.last %}</em>, <em>{% endunless %} {% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
{% endfor %} {% endfor %}
{% else %} {% else %}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a> <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
@ -70,27 +71,25 @@ tail_includes:
</em> </em>
</span> </span>
<div>
<!-- read time --> <!-- read time -->
{% include read-time.html content=content prompt=true lang=lang %} {% include read-time.html content=content prompt=true lang=lang %}
</div> </div>
<!-- .d-flex -->
</div>
<!-- .post-meta -->
</header>
</div> <!-- .d-flex --> <div class="content">
</div> <!-- .post-meta -->
<div class="post-content">
{{ content }} {{ content }}
</div> </div>
<div class="post-tail-wrapper text-muted"> <div class="post-tail-wrapper text-muted">
<!-- categories --> <!-- categories -->
{% if page.categories.size > 0 %} {% if page.categories.size > 0 %}
<div class="post-meta mb-3"> <div class="post-meta mb-3">
<i class="far fa-folder-open fa-fw me-1"></i> <i class="far fa-folder-open fa-fw me-1"></i>
{% for category in page.categories %} {% for category in page.categories %}
<a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a> <a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
{%- unless forloop.last -%},{%- endunless -%} {%- unless forloop.last -%},{%- endunless -%}
{% endfor %} {% endfor %}
</div> </div>
@ -101,20 +100,24 @@ tail_includes:
<div class="post-tags"> <div class="post-tags">
<i class="fa fa-tags fa-fw me-1"></i> <i class="fa fa-tags fa-fw me-1"></i>
{% for tag in page.tags %} {% for tag in page.tags %}
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/" <a
class="post-tag no-text-decoration" > href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
class="post-tag no-text-decoration"
>
{{- tag -}} {{- tag -}}
</a> </a>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
<div class="post-tail-bottom <div
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2"> class="
post-tail-bottom
d-flex justify-content-between align-items-center mt-5 pb-2
"
>
<div class="license-wrapper"> <div class="license-wrapper">
{% if site.data.locales[lang].copyright.license.template %} {% if site.data.locales[lang].copyright.license.template %}
{% capture _replacement %} {% capture _replacement %}
<a href="{{ site.data.locales[lang].copyright.license.link }}"> <a href="{{ site.data.locales[lang].copyright.license.link }}">
{{ site.data.locales[lang].copyright.license.name }} {{ site.data.locales[lang].copyright.license.name }}
@ -122,12 +125,11 @@ tail_includes:
{% endcapture %} {% endcapture %}
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }} {{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
{% endif %} {% endif %}
</div> </div>
{% include post-sharing.html lang=lang %} {% include post-sharing.html lang=lang %}
</div>
</div><!-- .post-tail-bottom --> <!-- .post-tail-bottom -->
</div>
</div><!-- div.post-tail-wrapper --> <!-- div.post-tail-wrapper -->

View file

@ -11,12 +11,12 @@ layout: page
{{ page.title }} {{ page.title }}
<span class="lead text-muted ps-2">{{ page.posts | size }}</span> <span class="lead text-muted ps-2">{{ page.posts | size }}</span>
</h1> </h1>
<ul class="post-content ps-0"> <ul class="content ps-0">
{% for post in page.posts %} {% for post in page.posts %}
<li class="d-flex justify-content-between px-md-3"> <li class="d-flex justify-content-between px-md-3">
<a href="{{ post.url | relative_url }}">{{ post.title }}</a> <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<span class="dash flex-grow-1"></span> <span class="dash flex-grow-1"></span>
{% include datetime.html date=post.date wrap='span' class='text-muted small' lang=lang %} {% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -23,7 +23,7 @@ This post is to show Markdown syntax rendering on [**Chirpy**](https://github.co
<h3 data-toc-skip>H3 - heading</h3> <h3 data-toc-skip>H3 - heading</h3>
<h4>H4 - heading</h4> <h4 data-toc-skip>H4 - heading</h4>
## Paragraph ## Paragraph

View file

@ -64,6 +64,10 @@ Update the variables of `_config.yml`{: .filepath} as needed. Some of them are t
- `timezone` - `timezone`
- `lang` - `lang`
### Social Contact Options
Social contact options are displayed at the bottom of the sidebar. You can turn on/off the specified contacts in file `_data/contact.yml`{: .filepath }.
### Customizing Stylesheet ### Customizing Stylesheet
If you need to customize the stylesheet, copy the theme's `assets/css/style.scss`{: .filepath} to the same path on your Jekyll site, and then add the custom style at the end of it. If you need to customize the stylesheet, copy the theme's `assets/css/style.scss`{: .filepath} to the same path on your Jekyll site, and then add the custom style at the end of it.

View file

@ -175,17 +175,13 @@ kbd {
footer { footer {
font-size: 0.8rem; font-size: 0.8rem;
background-color: var(--main-bg); background-color: var(--main-bg);
div.d-flex {
height: $footer-height; height: $footer-height;
line-height: 1.2rem;
padding-bottom: 1rem;
border-top: 1px solid var(--main-border-color); border-top: 1px solid var(--main-border-color);
flex-wrap: wrap;
} @extend %text-color;
a { a {
@extend %text-color; @extend %text-highlight;
&:hover { &:hover {
@extend %link-hover; @extend %link-hover;
@ -193,7 +189,7 @@ footer {
} }
p { p {
width: 100%; line-height: 1.75;
text-align: center; text-align: center;
margin-bottom: 0; margin-bottom: 0;
} }
@ -220,7 +216,7 @@ i {
position: sticky; position: sticky;
} }
> div { > section {
padding-left: 1rem; padding-left: 1rem;
border-left: 1px solid var(--main-border-color); border-left: 1px solid var(--main-border-color);
@ -229,7 +225,7 @@ i {
} }
} }
.post-content { .content {
font-size: 0.9rem; font-size: 0.9rem;
} }
} }
@ -237,13 +233,15 @@ i {
#panel-wrapper { #panel-wrapper {
/* the headings */ /* the headings */
.panel-heading { .panel-heading {
font-family: inherit;
line-height: inherit;
@include label(inherit); @include label(inherit);
} }
.post-tag { .post-tag {
line-height: 1.05rem; line-height: 1.05rem;
font-size: 0.85rem; font-size: 0.85rem;
border: 1px solid var(--btn-border-color);
border-radius: 0.8rem; border-radius: 0.8rem;
padding: 0.3rem 0.5rem; padding: 0.3rem 0.5rem;
margin: 0 0.35rem 0.5rem 0; margin: 0 0.35rem 0.5rem 0;
@ -372,7 +370,10 @@ i {
} }
} }
.post { main {
line-height: 1.75;
min-height: calc(100vh - $topbar-height - $footer-height);
h1 { h1 {
margin-top: 2rem; margin-top: 2rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
@ -386,6 +387,14 @@ i {
} }
} }
} }
.categories,
#tags,
#archives {
a:not(:hover) {
@extend %no-bottom-border;
}
}
} }
.post-meta { .post-meta {
@ -402,7 +411,7 @@ i {
} }
} }
.post-content { .content {
font-size: 1.08rem; font-size: 1.08rem;
margin-top: 2rem; margin-top: 2rem;
overflow-wrap: break-word; overflow-wrap: break-word;
@ -484,7 +493,7 @@ i {
::marker { ::marker {
color: var(--text-muted-color); color: var(--text-muted-color);
} }
} /* .post-content */ } /* .content */
.tag:hover { .tag:hover {
@extend %tag-hover; @extend %tag-hover;
@ -494,9 +503,10 @@ i {
display: inline-block; display: inline-block;
min-width: 2rem; min-width: 2rem;
text-align: center; text-align: center;
border-radius: 0.3rem; border-radius: 0.5rem;
border: 1px solid var(--btn-border-color);
padding: 0 0.4rem; padding: 0 0.4rem;
color: inherit; color: var(--text-muted-color);
line-height: 1.3rem; line-height: 1.3rem;
&:not(:last-child) { &:not(:last-child) {
@ -602,7 +612,7 @@ i {
} }
.btn-box-shadow { .btn-box-shadow {
box-shadow: 0 0 8px 0 var(--btn-box-shadow) !important; box-shadow: var(--card-shadow);
} }
/* overwrite bootstrap muted */ /* overwrite bootstrap muted */
@ -694,6 +704,7 @@ $btn-mb: 0.5rem;
width: $sidebar-width; width: $sidebar-width;
z-index: 99; z-index: 99;
background: var(--sidebar-bg); background: var(--sidebar-bg);
border-right: 1px solid var(--sidebar-border-color);
/* Hide scrollbar for Chrome, Safari and Opera */ /* Hide scrollbar for Chrome, Safari and Opera */
&::-webkit-scrollbar { &::-webkit-scrollbar {
@ -741,23 +752,25 @@ $btn-mb: 0.5rem;
} }
.site-title { .site-title {
font-family: inherit;
font-weight: 900; font-weight: 900;
font-size: 1.75rem; font-size: 1.75rem;
line-height: 1.2; line-height: 1.2;
letter-spacing: 0.25px; letter-spacing: 0.25px;
color: rgba(134, 133, 133, 0.99);
margin-top: 1.25rem; margin-top: 1.25rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
a { a {
@extend %clickable-transition; @extend %clickable-transition;
@extend %sidebar-link-hover; @extend %sidebar-link-hover;
color: var(--site-title-color);
} }
} }
.site-subtitle { .site-subtitle {
font-size: 95%; font-size: 95%;
color: var(--sidebar-muted-color); color: var(--site-subtitle-color);
margin-top: 0.25rem; margin-top: 0.25rem;
word-spacing: 1px; word-spacing: 1px;
-webkit-user-select: none; -webkit-user-select: none;
@ -832,6 +845,7 @@ $btn-mb: 0.5rem;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: var(--sidebar-border-color) 0 0 0 1px;
&:hover { &:hover {
background-color: var(--sidebar-hover-bg); background-color: var(--sidebar-hover-bg);
@ -865,7 +879,7 @@ $btn-mb: 0.5rem;
@extend %no-cursor; @extend %no-cursor;
@include ml-mr(calc(($btn-gap - $btn-border-width) / 2)); @include ml-mr(calc(($btn-gap - $btn-border-width) / 2));
background-color: var(--sidebar-muted-color); background-color: var(--sidebar-btn-color);
content: ''; content: '';
width: $btn-border-width; width: $btn-border-width;
height: $btn-border-width; height: $btn-border-width;
@ -895,7 +909,7 @@ $btn-mb: 0.5rem;
width: 100%; width: 100%;
overflow: auto; overflow: auto;
.post-content { .content {
margin-top: 2rem; margin-top: 2rem;
} }
} }
@ -908,14 +922,13 @@ $btn-mb: 0.5rem;
} }
#topbar { #topbar {
/* icons */ button i {
i {
color: #999999; color: #999999;
} }
#breadcrumb { #breadcrumb {
font-size: 1rem; font-size: 1rem;
color: gray; color: var(--text-muted-color);
padding-left: 0.5rem; padding-left: 0.5rem;
a:hover { a:hover {
@ -933,16 +946,51 @@ $btn-mb: 0.5rem;
} }
} /* #topbar */ } /* #topbar */
#sidebar-trigger, ::-webkit-input-placeholder {
#search-trigger { @include placeholder;
display: none;
} }
#search-wrapper { ::-moz-placeholder {
@include placeholder;
}
:-ms-input-placeholder {
@include placeholder;
}
::-ms-input-placeholder {
@include placeholder;
}
::placeholder {
@include placeholder;
}
:focus::-webkit-input-placeholder {
@include placeholder-focus;
}
:focus::-moz-placeholder {
@include placeholder-focus;
}
:focus:-ms-input-placeholder {
@include placeholder-focus;
}
:focus::-ms-input-placeholder {
@include placeholder-focus;
}
:focus::placeholder {
@include placeholder-focus;
}
search {
display: flex; display: flex;
width: 100%; width: 100%;
border-radius: 1rem; border-radius: 1rem;
border: 1px solid var(--search-wrapper-border-color); border: 1px solid var(--search-border-color);
background: var(--main-bg); background: var(--main-bg);
padding: 0 0.5rem; padding: 0 0.5rem;
@ -953,10 +1001,14 @@ $btn-mb: 0.5rem;
} }
} }
#sidebar-trigger,
#search-trigger {
display: none;
}
/* 'Cancel' link */ /* 'Cancel' link */
#search-cancel { #search-cancel {
color: var(--link-color); color: var(--link-color);
margin-left: 0.75rem;
display: none; display: none;
white-space: nowrap; white-space: nowrap;
@ -973,24 +1025,6 @@ $btn-mb: 0.5rem;
&:focus { &:focus {
box-shadow: none; box-shadow: none;
&.form-control {
&::-moz-placeholder {
@include input-placeholder;
}
&::-webkit-input-placeholder {
@include input-placeholder;
}
&:-ms-input-placeholder {
@include input-placeholder;
}
&::-ms-input-placeholder {
@include input-placeholder;
}
&::placeholder {
@include input-placeholder;
}
}
} }
} }
@ -1036,7 +1070,7 @@ $btn-mb: 0.5rem;
line-height: 2.5rem; line-height: 2.5rem;
} }
> div { > article {
width: 100%; width: 100%;
&:not(:last-child) { &:not(:last-child) {
@ -1074,18 +1108,6 @@ $btn-mb: 0.5rem;
white-space: nowrap; white-space: nowrap;
} }
#core-wrapper {
line-height: 1.75;
.categories,
#tags,
#archives {
a:not(:hover) {
@extend %no-bottom-border;
}
}
}
#mask { #mask {
display: none; display: none;
position: fixed; position: fixed;
@ -1102,15 +1124,13 @@ $btn-mb: 0.5rem;
/* --- main wrapper --- */ /* --- main wrapper --- */
#main-wrapper { #main-wrapper {
background-color: var(--main-bg);
position: relative; position: relative;
min-height: calc(100vh - $footer-height-mobile);
@include pl-pr(0); @include pl-pr(0);
} }
#topbar-wrapper.row, #topbar-wrapper.row,
#main > .row, #main-wrapper > .container > .row,
#search-result-wrapper > .row { #search-result-wrapper > .row {
@include ml-mr(0); @include ml-mr(0);
} }
@ -1118,19 +1138,17 @@ $btn-mb: 0.5rem;
/* --- button back-to-top --- */ /* --- button back-to-top --- */
#back-to-top { #back-to-top {
$size: 3rem;
display: none; display: none;
z-index: 1; z-index: 1;
cursor: pointer; cursor: pointer;
position: fixed; position: fixed;
right: 1rem; right: 1rem;
bottom: 2rem; bottom: calc($footer-height-large - $back2top-size / 2);
background: var(--button-bg); background: var(--button-bg);
color: var(--btn-backtotop-color); color: var(--btn-backtotop-color);
padding: 0; padding: 0;
width: $size; width: $back2top-size;
height: $size; height: $back2top-size;
border-radius: 50%; border-radius: 50%;
border: 1px solid var(--btn-backtotop-border-color); border: 1px solid var(--btn-backtotop-border-color);
transition: transform 0.2s ease-out; transition: transform 0.2s ease-out;
@ -1142,7 +1160,7 @@ $btn-mb: 0.5rem;
} }
i { i {
line-height: $size; line-height: $back2top-size;
position: relative; position: relative;
bottom: 2px; bottom: 2px;
} }
@ -1208,14 +1226,10 @@ $btn-mb: 0.5rem;
*/ */
@media all and (max-width: 576px) { @media all and (max-width: 576px) {
#main-wrapper { main {
min-height: calc(100vh - #{$footer-height-mobile}); .content {
}
#core-wrapper {
.post-content {
> blockquote[class^='prompt-'] { > blockquote[class^='prompt-'] {
@include ml-mr(-1.25rem); @include ml-mr(-1rem);
border-radius: 0; border-radius: 0;
max-width: none; max-width: none;
@ -1238,7 +1252,7 @@ $btn-mb: 0.5rem;
@extend %full-width; @extend %full-width;
} }
#main { #main-wrapper > .container {
@extend %full-width; @extend %full-width;
@include pl-pr(0); @include pl-pr(0);
} }
@ -1256,21 +1270,15 @@ $btn-mb: 0.5rem;
} }
} }
html, main {
body { min-height: calc(100vh - $topbar-height - $footer-height-large);
overflow-x: hidden;
} }
footer { footer {
@include slide; @include slide;
height: $footer-height-mobile; height: $footer-height-large;
div.d-flex {
padding: 1.5rem 0; padding: 1.5rem 0;
line-height: 1.65;
flex-wrap: wrap;
}
} }
[#{$sidebar-display}] { [#{$sidebar-display}] {
@ -1278,8 +1286,7 @@ $btn-mb: 0.5rem;
transform: translateX(0); transform: translateX(0);
} }
#main-wrapper, #main-wrapper {
footer {
transform: translateX(#{$sidebar-width}); transform: translateX(#{$sidebar-width});
} }
@ -1300,8 +1307,7 @@ $btn-mb: 0.5rem;
} }
#topbar, #topbar,
#main, #main-wrapper > .container {
footer > .container {
max-width: 100%; max-width: 100%;
} }
@ -1310,7 +1316,7 @@ $btn-mb: 0.5rem;
} }
#breadcrumb, #breadcrumb,
#search-wrapper { search {
display: none; display: none;
} }
@ -1320,7 +1326,7 @@ $btn-mb: 0.5rem;
left: 0; left: 0;
} }
#core-wrapper, main,
#panel-wrapper { #panel-wrapper {
margin-top: 0; margin-top: 0;
} }
@ -1331,7 +1337,7 @@ $btn-mb: 0.5rem;
display: block; display: block;
} }
#search-result-wrapper .post-content { #search-result-wrapper .content {
letter-spacing: 0; letter-spacing: 0;
} }
@ -1342,19 +1348,12 @@ $btn-mb: 0.5rem;
h1.dynamic-title { h1.dynamic-title {
display: none; display: none;
~ .post-content { ~ .content {
margin-top: 2.5rem; margin-top: 2.5rem;
} }
} }
} /* max-width: 849px */ } /* max-width: 849px */
/* Phone & Pad */
@media all and (min-width: 577px) and (max-width: 1199px) {
footer .d-flex > div {
width: 312px;
}
}
/* Sidebar is visible */ /* Sidebar is visible */
@media all and (min-width: 850px) { @media all and (min-width: 850px) {
/* Solved jumping scrollbar */ /* Solved jumping scrollbar */
@ -1362,26 +1361,8 @@ $btn-mb: 0.5rem;
overflow-y: scroll; overflow-y: scroll;
} }
#main-wrapper,
footer {
margin-left: $sidebar-width;
}
#main-wrapper { #main-wrapper {
min-height: calc(100vh - $footer-height); margin-left: $sidebar-width;
}
footer {
p {
width: auto;
&:last-child {
&::before {
content: '-';
margin: 0 0.75rem;
opacity: 0.8;
}
}
}
} }
#sidebar { #sidebar {
@ -1394,7 +1375,7 @@ $btn-mb: 0.5rem;
display: none; display: none;
} }
#search-wrapper { search {
max-width: $search-max-width; max-width: $search-max-width;
} }
@ -1403,20 +1384,20 @@ $btn-mb: 0.5rem;
justify-content: start !important; justify-content: start !important;
} }
.post { main {
h1 { h1 {
margin-top: 3rem; margin-top: 3rem;
} }
} }
div.post-content .table-wrapper > table { div.content .table-wrapper > table {
min-width: 70%; min-width: 70%;
} }
/* button 'back-to-Top' position */ /* button 'back-to-Top' position */
#back-to-top { #back-to-top {
bottom: 5.5rem;
right: 5%; right: 5%;
bottom: calc($footer-height - $back2top-size / 2);
} }
#topbar-title { #topbar-title {
@ -1426,7 +1407,7 @@ $btn-mb: 0.5rem;
/* Pad horizontal */ /* Pad horizontal */
@media all and (min-width: 992px) and (max-width: 1199px) { @media all and (min-width: 992px) and (max-width: 1199px) {
#main .col-lg-11 { #main-wrapper > .container .col-lg-11 {
flex: 0 0 96%; flex: 0 0 96%;
max-width: 96%; max-width: 96%;
} }
@ -1453,7 +1434,7 @@ $btn-mb: 0.5rem;
display: none; display: none;
} }
#main > div.row { #main-wrapper > .container > div.row {
justify-content: center !important; justify-content: center !important;
} }
} }
@ -1461,11 +1442,7 @@ $btn-mb: 0.5rem;
/* --- desktop mode, both sidebar and panel are visible --- */ /* --- desktop mode, both sidebar and panel are visible --- */
@media all and (min-width: 1200px) { @media all and (min-width: 1200px) {
#back-to-top { search {
bottom: 6.5rem;
}
#search-wrapper {
margin-right: 4rem; margin-right: 4rem;
} }
@ -1473,8 +1450,8 @@ $btn-mb: 0.5rem;
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
} }
#search-results > div { #search-results > article {
width: 46%; width: 45%;
&:nth-child(odd) { &:nth-child(odd) {
margin-right: 1.5rem; margin-right: 1.5rem;
@ -1490,15 +1467,9 @@ $btn-mb: 0.5rem;
} }
} }
.post-content { .content {
font-size: 1.03rem; font-size: 1.03rem;
} }
footer {
div.d-felx {
width: 85%;
}
}
} }
@media all and (min-width: 1400px) { @media all and (min-width: 1400px) {
@ -1510,8 +1481,7 @@ $btn-mb: 0.5rem;
@media all and (min-width: 1650px) { @media all and (min-width: 1650px) {
$icon-gap: 1rem; $icon-gap: 1rem;
#main-wrapper, #main-wrapper {
footer {
margin-left: $sidebar-width-large; margin-left: $sidebar-width-large;
} }
@ -1519,20 +1489,19 @@ $btn-mb: 0.5rem;
left: $sidebar-width-large; left: $sidebar-width-large;
} }
#search-wrapper { search {
margin-right: calc( margin-right: calc(
#{$main-content-max-width} * 0.25 - #{$search-max-width} - 0.75rem #{$main-content-max-width} * 0.25 - #{$search-max-width} - 0.75rem
); );
} }
#main, #main-wrapper > .container {
footer > .container {
max-width: $main-content-max-width; max-width: $main-content-max-width;
padding-left: 1.75rem !important; padding-left: 1.75rem !important;
padding-right: 1.75rem !important; padding-right: 1.75rem !important;
} }
#core-wrapper, main.col-12,
#tail-wrapper { #tail-wrapper {
padding-right: 4.5rem !important; padding-right: 4.5rem !important;
} }

View file

@ -11,7 +11,7 @@
} }
%section { %section {
#core-wrapper & { main & {
margin-top: 2.5rem; margin-top: 2.5rem;
margin-bottom: 1.25rem; margin-bottom: 1.25rem;
@ -107,7 +107,7 @@
} }
%sidebar-links { %sidebar-links {
color: rgba(117, 117, 117, 0.9); color: var(--sidebar-muted-color);
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
@ -122,6 +122,11 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
%text-highlight {
color: inherit;
font-weight: 600;
}
/* ---------- scss mixin --------- */ /* ---------- scss mixin --------- */
@mixin mt-mb($value) { @mixin mt-mb($value) {
@ -144,7 +149,11 @@
padding-right: $val; padding-right: $val;
} }
@mixin input-placeholder { @mixin placeholder {
color: var(--text-muted-color) !important;
}
@mixin placeholder-focus {
opacity: 0.6; opacity: 0.6;
} }

View file

@ -2,8 +2,8 @@
* The syntax highlight. * The syntax highlight.
*/ */
@import 'colors/light-syntax'; @import 'colors/syntax-light';
@import 'colors/dark-syntax'; @import 'colors/syntax-dark';
html { html {
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
@ -55,8 +55,7 @@ html {
} }
overflow: auto; overflow: auto;
padding-top: 0.5rem; padding-bottom: 0.75rem;
padding-bottom: 1rem;
pre { pre {
margin-bottom: 0; margin-bottom: 0;
@ -66,15 +65,25 @@ html {
} }
table { table {
td pre { td {
&:first-child {
display: inline-block;
margin-left: 1rem;
margin-right: 0.75rem;
}
&:last-child {
padding-right: 2rem !important;
}
pre {
overflow: visible; /* Fixed iOS safari overflow-x */ overflow: visible; /* Fixed iOS safari overflow-x */
word-break: normal; /* Fixed iOS safari linenos code break */ word-break: normal; /* Fixed iOS safari linenos code break */
} }
} }
}
.lineno { .lineno {
padding-right: 0.5rem;
min-width: 2.2rem;
text-align: right; text-align: right;
color: var(--highlight-lineno-color); color: var(--highlight-lineno-color);
-webkit-user-select: none; -webkit-user-select: none;
@ -89,6 +98,7 @@ code {
-webkit-hyphens: none; -webkit-hyphens: none;
-ms-hyphens: none; -ms-hyphens: none;
hyphens: none; hyphens: none;
color: var(--code-color);
&.highlighter-rouge { &.highlighter-rouge {
font-size: $code-font-size; font-size: $code-font-size;
@ -139,11 +149,16 @@ div[class^='language-'] {
box-shadow: var(--language-border-color) 0 0 0 1px; box-shadow: var(--language-border-color) 0 0 0 1px;
.post-content > & { .content > & {
@include ml-mr(-1.25rem); @include ml-mr(-1rem);
border-radius: 0; border-radius: 0;
} }
.highlight {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
} }
/* Hide line numbers for default, console, and terminal code snippets */ /* Hide line numbers for default, console, and terminal code snippets */
@ -152,12 +167,13 @@ div {
&.language-plaintext, &.language-plaintext,
&.language-console, &.language-console,
&.language-terminal { &.language-terminal {
pre.lineno { td:first-child {
padding: 0 !important;
margin-right: 0;
.lineno {
display: none; display: none;
} }
td.rouge-code {
padding-left: 1.5rem;
} }
} }
} }
@ -165,21 +181,21 @@ div {
.code-header { .code-header {
@extend %no-cursor; @extend %no-cursor;
$code-header-height: 2.25rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: $code-header-height; height: $code-header-height;
margin-left: 1rem; margin-left: 0.75rem;
margin-right: 0.5rem; margin-right: 0.5rem;
/* the label block */ /* the label block */
span { span {
line-height: $code-header-height;
/* label icon */ /* label icon */
i { i {
font-size: 1rem; font-size: 1rem;
margin-right: 0.5rem; width: $code-icon-width;
color: var(--code-header-icon-color); color: var(--code-header-icon-color);
&.small { &.small {
@ -242,7 +258,7 @@ div {
@media all and (min-width: 576px) { @media all and (min-width: 576px) {
div[class^='language-'] { div[class^='language-'] {
.post-content > & { .content > & {
@include ml-mr(0); @include ml-mr(0);
border-radius: $base-radius; border-radius: $base-radius;
@ -251,19 +267,25 @@ div {
.code-header { .code-header {
@include ml-mr(0); @include ml-mr(0);
&::before { $dot-margin: calc($code-header-height / 2);
$dot-size: 0.75rem;
$dot-margin: 0.5rem;
&::before {
content: ''; content: '';
display: inline-block; display: inline-block;
margin-left: 1rem; margin-left: $dot-margin;
width: $dot-size; width: $code-dot-size;
height: $dot-size; height: $code-dot-size;
border-radius: 50%; border-radius: 50%;
background-color: var(--code-header-muted-color); background-color: var(--code-header-muted-color);
box-shadow: ($dot-size + $dot-margin) 0 0 var(--code-header-muted-color), box-shadow: ($code-dot-size + $code-dot-gap) 0 0
($dot-size + $dot-margin) * 2 0 0 var(--code-header-muted-color); var(--code-header-muted-color),
($code-dot-size + $code-dot-gap) * 2 0 0
var(--code-header-muted-color);
}
span {
// center the text of label
margin-left: calc(($dot-margin + $code-dot-size) / 2 * -1);
} }
} }
} }

View file

@ -10,18 +10,23 @@ $sidebar-width-large: 300px !default; /* screen width: >= 1650px */
/* other framework sizes */ /* other framework sizes */
$topbar-height: 3rem !default; $topbar-height: 3rem !default;
$search-max-width: 210px !default; $search-max-width: 200px !default;
$footer-height: 5rem !default; $footer-height: 5rem !default;
$footer-height-mobile: 6rem !default; /* screen width: < 850px */ $footer-height-large: 6rem !default; /* screen width: < 850px */
$main-content-max-width: 1250px !default; $main-content-max-width: 1250px !default;
$bottom-min-height: 35rem !default; $bottom-min-height: 35rem !default;
$base-radius: 0.5rem; $base-radius: 0.5rem !default;
$back2top-size: 2.75rem !default;
/* syntax highlight */ /* syntax highlight */
$code-font-size: 0.85rem !default; $code-font-size: 0.85rem !default;
$code-header-height: 2.25rem !default;
$code-dot-size: 0.75rem !default;
$code-dot-gap: 0.5rem !default;
$code-icon-width: 1.75rem !default;
/* fonts */ /* fonts */
$font-family-base: 'Source Sans Pro', 'Microsoft Yahei', sans-serif; $font-family-base: 'Source Sans Pro', 'Microsoft Yahei', sans-serif !default;
$font-family-heading: Lato, 'Microsoft Yahei', sans-serif; $font-family-heading: Lato, 'Microsoft Yahei', sans-serif !default;

View file

@ -1,91 +0,0 @@
/*
* The syntax dark mode styles.
*/
@mixin dark-syntax {
--language-border-color: rgba(84, 83, 83, 0.27);
--highlight-bg-color: #252525;
--highlighter-rouge-color: #de6b18;
--highlight-lineno-color: #6c6c6d;
--inline-code-bg: #272822;
--code-header-text-color: #6a6a6a;
--code-header-muted-color: rgb(60, 60, 60);
--code-header-icon-color: rgb(86, 86, 86);
--clipboard-checked-color: #2bcc2b;
--filepath-text-color: #bdbdbd;
/* override Bootstrap */
pre {
color: #bfbfbf;
}
.highlight .gp {
color: #818c96;
}
/* syntax highlight colors from https://raw.githubusercontent.com/jwarby/pygments-css/master/monokai.css */
.highlight pre { background-color: var(--highlight-bg-color); }
.highlight .hll { background-color: var(--highlight-bg-color); }
.highlight .c { color: #75715e; } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010; } /* Error */
.highlight .k { color: #66d9ef; } /* Keyword */
.highlight .l { color: #ae81ff; } /* Literal */
.highlight .n { color: #f8f8f2; } /* Name */
.highlight .o { color: #f92672; } /* Operator */
.highlight .p { color: #f8f8f2; } /* Punctuation */
.highlight .cm { color: #75715e; } /* Comment.Multiline */
.highlight .cp { color: #75715e; } /* Comment.Preproc */
.highlight .c1 { color: #75715e; } /* Comment.Single */
.highlight .cs { color: #75715e; } /* Comment.Special */
.highlight .ge { color: inherit; font-style: italic; } /* Generic.Emph */
.highlight .gs { font-weight: bold; } /* Generic.Strong */
.highlight .kc { color: #66d9ef; } /* Keyword.Constant */
.highlight .kd { color: #66d9ef; } /* Keyword.Declaration */
.highlight .kn { color: #f92672; } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef; } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef; } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef; } /* Keyword.Type */
.highlight .ld { color: #e6db74; } /* Literal.Date */
.highlight .m { color: #ae81ff; } /* Literal.Number */
.highlight .s { color: #e6db74; } /* Literal.String */
.highlight .na { color: #a6e22e; } /* Name.Attribute */
.highlight .nb { color: #f8f8f2; } /* Name.Builtin */
.highlight .nc { color: #a6e22e; } /* Name.Class */
.highlight .no { color: #66d9ef; } /* Name.Constant */
.highlight .nd { color: #a6e22e; } /* Name.Decorator */
.highlight .ni { color: #f8f8f2; } /* Name.Entity */
.highlight .ne { color: #a6e22e; } /* Name.Exception */
.highlight .nf { color: #a6e22e; } /* Name.Function */
.highlight .nl { color: #f8f8f2; } /* Name.Label */
.highlight .nn { color: #f8f8f2; } /* Name.Namespace */
.highlight .nx { color: #a6e22e; } /* Name.Other */
.highlight .py { color: #f8f8f2; } /* Name.Property */
.highlight .nt { color: #f92672; } /* Name.Tag */
.highlight .nv { color: #f8f8f2; } /* Name.Variable */
.highlight .ow { color: #f92672; } /* Operator.Word */
.highlight .w { color: #f8f8f2; } /* Text.Whitespace */
.highlight .mf { color: #ae81ff; } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff; } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff; } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff; } /* Literal.Number.Oct */
.highlight .sb { color: #e6db74; } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74; } /* Literal.String.Char */
.highlight .sd { color: #e6db74; } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74; } /* Literal.String.Double */
.highlight .se { color: #ae81ff; } /* Literal.String.Escape */
.highlight .sh { color: #e6db74; } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74; } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74; } /* Literal.String.Other */
.highlight .sr { color: #e6db74; } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74; } /* Literal.String.Single */
.highlight .ss { color: #e6db74; } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2; } /* Name.Builtin.Pseudo */
.highlight .vc { color: #f8f8f2; } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2; } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2; } /* Name.Variable.Instance */
.highlight .il { color: #ae81ff; } /* Literal.Number.Integer.Long */
.highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
.highlight .gd { color: #f92672; background-color: #561c08; } /* Generic.Deleted & Diff Deleted */
.highlight .gi { color: #a6e22e; background-color: #0b5858; } /* Generic.Inserted & Diff Inserted */
}

View file

@ -1,83 +0,0 @@
/*
* The syntax light mode code snippet colors.
*/
@mixin light-syntax {
/* see: <https://raw.githubusercontent.com/jwarby/pygments-css/master/github.css> */
.highlight .hll { background-color: #ffffcc; }
.highlight .c { color: #999988; font-style: italic; } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2; } /* Error */
.highlight .k { color: #000000; font-weight: bold; } /* Keyword */
.highlight .o { color: #000000; font-weight: bold; } /* Operator */
.highlight .cm { color: #999988; font-style: italic; } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold; font-style: italic; } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic; } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic; } /* Comment.Special */
.highlight .gd { color: #d01040; background-color: #ffdddd; } /* Generic.Deleted */
.highlight .ge { color: #000000; font-style: italic; } /* Generic.Emph */
.highlight .gr { color: #aa0000; } /* Generic.Error */
.highlight .gh { color: #999999; } /* Generic.Heading */
.highlight .gi { color: #008080; background-color: #ddffdd; } /* Generic.Inserted */
.highlight .go { color: #888888; } /* Generic.Output */
.highlight .gp { color: #555555; } /* Generic.Prompt */
.highlight .gs { font-weight: bold; } /* Generic.Strong */
.highlight .gu { color: #aaaaaa; } /* Generic.Subheading */
.highlight .gt { color: #aa0000; } /* Generic.Traceback */
.highlight .kc { color: #000000; font-weight: bold; } /* Keyword.Constant */
.highlight .kd { color: #000000; font-weight: bold; } /* Keyword.Declaration */
.highlight .kn { color: #000000; font-weight: bold; } /* Keyword.Namespace */
.highlight .kp { color: #000000; font-weight: bold; } /* Keyword.Pseudo */
.highlight .kr { color: #000000; font-weight: bold; } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold; } /* Keyword.Type */
.highlight .m { color: #009999; } /* Literal.Number */
.highlight .s { color: #d01040; } /* Literal.String */
.highlight .na { color: #008080; } /* Name.Attribute */
.highlight .nb { color: #0086b3; } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold; } /* Name.Class */
.highlight .no { color: #008080; } /* Name.Constant */
.highlight .nd { color: #3c5d5d; font-weight: bold; } /* Name.Decorator */
.highlight .ni { color: #800080; } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold; } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold; } /* Name.Function */
.highlight .nl { color: #990000; font-weight: bold; } /* Name.Label */
.highlight .nn { color: #555555; } /* Name.Namespace */
.highlight .nt { color: #000080; } /* Name.Tag */
.highlight .nv { color: #008080; } /* Name.Variable */
.highlight .ow { color: #000000; font-weight: bold; } /* Operator.Word */
.highlight .w { color: #bbbbbb; } /* Text.Whitespace */
.highlight .mf { color: #009999; } /* Literal.Number.Float */
.highlight .mh { color: #009999; } /* Literal.Number.Hex */
.highlight .mi { color: #009999; } /* Literal.Number.Integer */
.highlight .mo { color: #009999; } /* Literal.Number.Oct */
.highlight .sb { color: #d01040; } /* Literal.String.Backtick */
.highlight .sc { color: #d01040; } /* Literal.String.Char */
.highlight .sd { color: #d01040; } /* Literal.String.Doc */
.highlight .s2 { color: #d01040; } /* Literal.String.Double */
.highlight .se { color: #d01040; } /* Literal.String.Escape */
.highlight .sh { color: #d01040; } /* Literal.String.Heredoc */
.highlight .si { color: #d01040; } /* Literal.String.Interpol */
.highlight .sx { color: #d01040; } /* Literal.String.Other */
.highlight .sr { color: #009926; } /* Literal.String.Regex */
.highlight .s1 { color: #d01040; } /* Literal.String.Single */
.highlight .ss { color: #990073; } /* Literal.String.Symbol */
.highlight .bp { color: #999999; } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080; } /* Name.Variable.Class */
.highlight .vg { color: #008080; } /* Name.Variable.Global */
.highlight .vi { color: #008080; } /* Name.Variable.Instance */
.highlight .il { color: #009999; } /* Literal.Number.Integer.Long */
/* --- custom light colors --- */
--language-border-color: rgba(172, 169, 169, 0.2);
--highlight-bg-color: #f7f7f7;
--highlighter-rouge-color: #3f596f;
--highlight-lineno-color: #c2c6cc;
--inline-code-bg: #f6f6f7;
--code-header-text-color: #a3a3b1;
--code-header-muted-color: #ebebeb;
--code-header-icon-color: #d1d1d1;
--clipboard-checked-color: #43c743;
[class^='prompt-'] {
--inline-code-bg: #fbfafa;
}
} /* light-syntax */

View file

@ -0,0 +1,138 @@
/*
* The syntax dark mode styles.
*/
@mixin dark-syntax {
--language-border-color: #2d2d2d;
--highlight-bg-color: #151515;
--highlighter-rouge-color: #c9def1;
--highlight-lineno-color: #808080;
--inline-code-bg: #323238;
--code-color: #b0b0b0;
--code-header-text-color: #6a6a6a;
--code-header-muted-color: #353535;
--code-header-icon-color: #565656;
--clipboard-checked-color: #2bcc2b;
--filepath-text-color: #cacaca;
.highlight .gp {
color: #87939d;
}
/* --- Syntax highlight theme from `rougify style base16.dark` --- */
.highlight table td {
padding: 5px;
}
.highlight table pre {
margin: 0;
}
.highlight,
.highlight .w {
color: #d0d0d0;
background-color: #151515;
}
.highlight .err {
color: #151515;
background-color: #ac4142;
}
.highlight .c,
.highlight .ch,
.highlight .cd,
.highlight .cm,
.highlight .cpf,
.highlight .c1,
.highlight .cs {
color: #848484;
}
.highlight .cp {
color: #f4bf75;
}
.highlight .nt {
color: #f4bf75;
}
.highlight .o,
.highlight .ow {
color: #d0d0d0;
}
.highlight .p,
.highlight .pi {
color: #d0d0d0;
}
.highlight .gi {
color: #90a959;
}
.highlight .gd {
color: #f08a8b;
background-color: #320000;
}
.highlight .gh {
color: #6a9fb5;
background-color: #151515;
font-weight: bold;
}
.highlight .k,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kv {
color: #aa759f;
}
.highlight .kc {
color: #d28445;
}
.highlight .kt {
color: #d28445;
}
.highlight .kd {
color: #d28445;
}
.highlight .s,
.highlight .sb,
.highlight .sc,
.highlight .dl,
.highlight .sd,
.highlight .s2,
.highlight .sh,
.highlight .sx,
.highlight .s1 {
color: #90a959;
}
.highlight .sa {
color: #aa759f;
}
.highlight .sr {
color: #75b5aa;
}
.highlight .si {
color: #b76d45;
}
.highlight .se {
color: #b76d45;
}
.highlight .nn {
color: #f4bf75;
}
.highlight .nc {
color: #f4bf75;
}
.highlight .no {
color: #f4bf75;
}
.highlight .na {
color: #6a9fb5;
}
.highlight .m,
.highlight .mb,
.highlight .mf,
.highlight .mh,
.highlight .mi,
.highlight .il,
.highlight .mo,
.highlight .mx {
color: #90a959;
}
.highlight .ss {
color: #90a959;
}
}

View file

@ -0,0 +1,179 @@
/*
* The syntax light mode code snippet colors.
*/
@mixin light-syntax {
/* --- custom light colors --- */
--language-border-color: #ececec;
--highlight-bg-color: #f6f8fa;
--highlighter-rouge-color: #3f596f;
--highlight-lineno-color: #9e9e9e;
--inline-code-bg: #f6f6f7;
--code-color: #3a3a3a;
--code-header-text-color: #a3a3a3;
--code-header-muted-color: #e5e5e5;
--code-header-icon-color: #c9c8c8;
--clipboard-checked-color: #43c743;
[class^='prompt-'] {
--inline-code-bg: #fbfafa;
}
/* --- Syntax highlight theme from `rougify style github` --- */
.highlight table td {
padding: 5px;
}
.highlight table pre {
margin: 0;
}
.highlight,
.highlight .w {
color: #24292f;
background-color: #f6f8fa;
}
.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kt,
.highlight .kv {
color: #cf222e;
}
.highlight .gr {
color: #f6f8fa;
}
.highlight .gd {
color: #82071e;
background-color: #ffebe9;
}
.highlight .nb {
color: #953800;
}
.highlight .nc {
color: #953800;
}
.highlight .no {
color: #953800;
}
.highlight .nn {
color: #953800;
}
.highlight .sr {
color: #116329;
}
.highlight .na {
color: #116329;
}
.highlight .nt {
color: #116329;
}
.highlight .gi {
color: #116329;
background-color: #dafbe1;
}
.highlight .kc {
color: #0550ae;
}
.highlight .l,
.highlight .ld,
.highlight .m,
.highlight .mb,
.highlight .mf,
.highlight .mh,
.highlight .mi,
.highlight .il,
.highlight .mo,
.highlight .mx {
color: #0550ae;
}
.highlight .sb {
color: #0550ae;
}
.highlight .bp {
color: #0550ae;
}
.highlight .ne {
color: #0550ae;
}
.highlight .nl {
color: #0550ae;
}
.highlight .py {
color: #0550ae;
}
.highlight .nv,
.highlight .vc,
.highlight .vg,
.highlight .vi,
.highlight .vm {
color: #0550ae;
}
.highlight .o,
.highlight .ow {
color: #0550ae;
}
.highlight .gh {
color: #0550ae;
font-weight: bold;
}
.highlight .gu {
color: #0550ae;
font-weight: bold;
}
.highlight .s,
.highlight .sa,
.highlight .sc,
.highlight .dl,
.highlight .sd,
.highlight .s2,
.highlight .se,
.highlight .sh,
.highlight .sx,
.highlight .s1,
.highlight .ss {
color: #0a3069;
}
.highlight .nd {
color: #8250df;
}
.highlight .nf,
.highlight .fm {
color: #8250df;
}
.highlight .err {
color: #f6f8fa;
background-color: #82071e;
}
.highlight .c,
.highlight .ch,
.highlight .cd,
.highlight .cm,
.highlight .cp,
.highlight .cpf,
.highlight .c1,
.highlight .cs {
color: #68717a;
}
.highlight .gl {
color: #68717a;
}
.highlight .gt {
color: #68717a;
}
.highlight .ni {
color: #24292f;
}
.highlight .si {
color: #24292f;
}
.highlight .ge {
color: #24292f;
font-style: italic;
}
.highlight .gs {
color: #24292f;
font-weight: bold;
}
} /* light-syntax */

View file

@ -10,19 +10,19 @@
/* Common color */ /* Common color */
--text-color: rgb(175, 176, 177); --text-color: rgb(175, 176, 177);
--text-muted-color: rgb(107, 116, 124); --text-muted-color: #868686;
--heading-color: #cccccc; --heading-color: #cccccc;
--label-color: #a7a7a7;
--blockquote-border-color: rgb(66, 66, 66); --blockquote-border-color: rgb(66, 66, 66);
--blockquote-text-color: rgb(117, 117, 117); --blockquote-text-color: #868686;
--link-color: rgb(138, 180, 248); --link-color: rgb(138, 180, 248);
--link-underline-color: rgb(82, 108, 150); --link-underline-color: rgb(82, 108, 150);
--button-bg: rgb(39, 40, 43); --button-bg: #1e1e1e;
--btn-border-color: rgb(63, 65, 68); --btn-border-color: #2e2f31;
--btn-backtotop-color: var(--text-color); --btn-backtotop-color: var(--text-color);
--btn-backtotop-border-color: var(--btn-border-color); --btn-backtotop-border-color: #212122;
--btn-box-shadow: var(--main-bg); --btn-box-shadow: var(--main-bg);
--card-header-bg: rgb(48, 48, 48); --card-header-bg: #292929;
--label-color: rgb(108, 117, 125);
--checkbox-color: rgb(118, 120, 121); --checkbox-color: rgb(118, 120, 121);
--checkbox-checked-color: var(--link-color); --checkbox-checked-color: var(--link-color);
--img-bg: radial-gradient(circle, rgb(22, 22, 24) 0%, rgb(32, 32, 32) 100%); --img-bg: radial-gradient(circle, rgb(22, 22, 24) 0%, rgb(32, 32, 32) 100%);
@ -34,39 +34,38 @@
); );
/* Sidebar */ /* Sidebar */
--sidebar-bg: radial-gradient(circle, #242424 0%, #1d1f27 100%); --site-title-color: #717070;
--sidebar-muted-color: #6d6c6b; --site-subtitle-color: #868686;
--sidebar-bg: #1e1e1e;
--sidebar-border-color: #292929;
--sidebar-muted-color: #868686;
--sidebar-active-color: rgb(255, 255, 255, 0.95); --sidebar-active-color: rgb(255, 255, 255, 0.95);
--sidebar-hover-bg: rgb(54, 54, 54, 0.33); --sidebar-hover-bg: #262626;
--sidebar-btn-bg: rgb(84, 83, 83, 0.3); --sidebar-btn-bg: #232328;
--sidebar-btn-color: #787878; --sidebar-btn-color: #787878;
--avatar-border-color: rgb(206, 206, 206, 0.9); --avatar-border-color: rgb(206, 206, 206, 0.9);
/* Topbar */ /* Topbar */
--topbar-bg: rgb(27, 27, 30, 0.64); --topbar-bg: rgb(27, 27, 30, 0.64);
--topbar-text-color: var(--text-color); --topbar-text-color: var(--text-color);
--search-wrapper-border-color: rgb(55, 55, 55); --search-border-color: rgb(55, 55, 55);
--search-icon-color: rgb(100, 102, 105); --search-icon-color: rgb(100, 102, 105);
--input-focus-border-color: rgb(112, 114, 115); --input-focus-border-color: rgb(112, 114, 115);
/* Home page */ /* Home page */
--post-list-text-color: rgb(175, 176, 177); --post-list-text-color: rgb(175, 176, 177);
--btn-patinator-text-color: var(--text-color); --btn-patinator-text-color: var(--text-color);
--btn-paginator-hover-color: rgb(64, 65, 66); --btn-paginator-hover-color: #2e2e2e;
--btn-paginator-border-color: var(--btn-border-color);
--btn-text-color: var(--text-color);
/* Posts */ /* Posts */
--toc-highlight: rgb(116, 178, 243); --toc-highlight: rgb(116, 178, 243);
--tag-bg: rgb(41, 40, 40);
--tag-hover: rgb(43, 56, 62); --tag-hover: rgb(43, 56, 62);
--tb-odd-bg: rgba(42, 47, 53, 0.52); /* odd rows of the posts' table */ --tb-odd-bg: #252526; /* odd rows of the posts' table */
--tb-even-bg: rgb(31, 31, 34); /* even rows of the posts' table */ --tb-even-bg: rgb(31, 31, 34); /* even rows of the posts' table */
--tb-border-color: var(--tb-odd-bg); --tb-border-color: var(--tb-odd-bg);
--footnote-target-bg: rgb(63, 81, 181); --footnote-target-bg: rgb(63, 81, 181);
--btn-share-color: #6c757d; --btn-share-color: #6c757d;
--btn-share-hover-color: #bfc1ca; --btn-share-hover-color: #bfc1ca;
--relate-post-date: var(--text-muted-color);
--card-bg: #1e1e1e; --card-bg: #1e1e1e;
--card-hovor-bg: #464d51; --card-hovor-bg: #464d51;
--card-shadow: rgb(21, 21, 21, 0.72) 0 6px 18px 0, --card-shadow: rgb(21, 21, 21, 0.72) 0 6px 18px 0,
@ -87,8 +86,8 @@
/* tags */ /* tags */
--tag-border: rgb(59, 79, 88); --tag-border: rgb(59, 79, 88);
--tag-shadow: rgb(32, 33, 33); --tag-shadow: rgb(32, 33, 33);
--search-tag-bg: var(--tag-bg);
--dash-color: rgb(63, 65, 68); --dash-color: rgb(63, 65, 68);
--search-tag-bg: #292828;
/* categories */ /* categories */
--categories-border: rgb(64, 66, 69, 0.5); --categories-border: rgb(64, 66, 69, 0.5);

View file

@ -10,11 +10,12 @@
/* Common color */ /* Common color */
--text-color: #34343c; --text-color: #34343c;
--text-muted-color: #8e8e8e; --text-muted-color: #757575;
--heading-color: black; --heading-color: #2a2a2a;
--label-color: #585858;
--blockquote-border-color: #eeeeee; --blockquote-border-color: #eeeeee;
--blockquote-text-color: #9a9a9a; --blockquote-text-color: #757575;
--link-color: #0153ab; --link-color: #0056b2;
--link-underline-color: #dee2e6; --link-underline-color: #dee2e6;
--button-bg: #ffffff; --button-bg: #ffffff;
--btn-border-color: #e9ecef; --btn-border-color: #e9ecef;
@ -36,8 +37,11 @@
); );
/* Sidebar */ /* Sidebar */
--site-title-color: rgb(113, 113, 113);
--site-subtitle-color: #717171;
--sidebar-bg: #f6f8fa; --sidebar-bg: #f6f8fa;
--sidebar-muted-color: #a2a19f; --sidebar-border-color: #efefef;
--sidebar-muted-color: #545454;
--sidebar-active-color: #1d1d1d; --sidebar-active-color: #1d1d1d;
--sidebar-hover-bg: rgb(223, 233, 241, 0.64); --sidebar-hover-bg: rgb(223, 233, 241, 0.64);
--sidebar-btn-bg: white; --sidebar-btn-bg: white;
@ -47,8 +51,7 @@
/* Topbar */ /* Topbar */
--topbar-bg: rgb(255, 255, 255, 0.7); --topbar-bg: rgb(255, 255, 255, 0.7);
--topbar-text-color: rgb(78, 78, 78); --topbar-text-color: rgb(78, 78, 78);
--search-wrapper-border-color: rgb(240, 240, 240); --search-border-color: rgb(240, 240, 240);
--search-tag-bg: #f8f9fa;
--search-icon-color: #c2c6cc; --search-icon-color: #c2c6cc;
--input-focus-border-color: #b8b8b8; --input-focus-border-color: #b8b8b8;
@ -56,23 +59,15 @@
--post-list-text-color: dimgray; --post-list-text-color: dimgray;
--btn-patinator-text-color: #555555; --btn-patinator-text-color: #555555;
--btn-paginator-hover-color: var(--sidebar-bg); --btn-paginator-hover-color: var(--sidebar-bg);
--btn-paginator-border-color: var(--sidebar-bg);
--btn-text-color: #676666;
/* Posts */ /* Posts */
--toc-highlight: #563d7c; --toc-highlight: #0550ae;
--btn-share-hover-color: var(--link-color); --btn-share-hover-color: var(--link-color);
--card-bg: white; --card-bg: white;
--card-hovor-bg: #e2e2e2; --card-hovor-bg: #e2e2e2;
--card-shadow: rgb(104, 104, 104, 0.05) 0 2px 6px 0, --card-shadow: rgb(104, 104, 104, 0.05) 0 2px 6px 0,
rgba(211, 209, 209, 0.15) 0 0 0 1px; rgba(211, 209, 209, 0.15) 0 0 0 1px;
--label-color: #616161;
--relate-post-date: rgba(30, 55, 70, 0.4);
--footnote-target-bg: lightcyan; --footnote-target-bg: lightcyan;
--tag-bg: rgba(0, 0, 0, 0.075);
--tag-border: #dee2e6;
--tag-shadow: var(--btn-border-color);
--tag-hover: rgb(222, 226, 230);
--tb-odd-bg: #fbfcfd; --tb-odd-bg: #fbfcfd;
--tb-border-color: #eaeaea; --tb-border-color: #eaeaea;
--dash-color: silver; --dash-color: silver;
@ -89,6 +84,12 @@
--prompt-danger-bg: rgb(248, 215, 218, 0.56); --prompt-danger-bg: rgb(248, 215, 218, 0.56);
--prompt-danger-icon-color: #df3c30; --prompt-danger-icon-color: #df3c30;
/* Tags */
--tag-border: #dee2e6;
--tag-shadow: var(--btn-border-color);
--tag-hover: rgb(222, 226, 230);
--search-tag-bg: #f8f9fa;
[class^='prompt-'] { [class^='prompt-'] {
--link-underline-color: rgb(219, 216, 216); --link-underline-color: rgb(219, 216, 216);
} }

View file

@ -32,11 +32,6 @@
font-size: 1.1rem; font-size: 1.1rem;
} }
/* post's date */
> span:last-child {
white-space: nowrap;
}
} }
} }

View file

@ -5,7 +5,7 @@
#post-list { #post-list {
margin-top: 2rem; margin-top: 2rem;
a.card-wrapper { .card-wrapper {
display: block; display: block;
&:hover { &:hover {
@ -44,6 +44,7 @@
.card-title { .card-title {
@extend %text-clip; @extend %text-clip;
color: var(--heading-color) !important;
font-size: 1.25rem; font-size: 1.25rem;
} }
@ -51,7 +52,7 @@
color: var(--text-muted-color) !important; color: var(--text-muted-color) !important;
} }
.card-text.post-content { .card-text.content {
@extend %muted; @extend %muted;
p { p {
@ -89,8 +90,9 @@
} /* #post-list */ } /* #post-list */
.pagination { .pagination {
color: var(--btn-patinator-text-color); color: var(--text-color);
font-family: Lato, sans-serif; font-family: Lato, sans-serif;
justify-content: space-evenly;
a:hover { a:hover {
text-decoration: none; text-decoration: none;
@ -98,26 +100,27 @@
.page-item { .page-item {
.page-link { .page-link {
color: inherit; color: var(--btn-patinator-text-color);
width: 2.5rem; padding: 0 0.6rem;
height: 2.5rem;
padding: 0;
display: -webkit-box; display: -webkit-box;
-webkit-box-pack: center; -webkit-box-pack: center;
-webkit-box-align: center; -webkit-box-align: center;
border-radius: 50%; border-radius: 0.5rem;
border: 1px solid var(--btn-paginator-border-color); border: 0;
background-color: var(--button-bg); background-color: inherit;
&:hover {
background-color: var(--btn-paginator-hover-color);
}
} }
&.active { &.active {
.page-link { .page-link {
background-color: var(--btn-paginator-hover-color); background-color: var(--btn-paginator-hover-color);
color: var(--btn-text-color); }
}
&:not(.active) {
.page-link {
&:hover {
box-shadow: inset var(--btn-border-color) 0 0 0 1px;
}
} }
} }
@ -126,15 +129,8 @@
.page-link { .page-link {
color: rgba(108, 117, 125, 0.57); color: rgba(108, 117, 125, 0.57);
border-color: var(--btn-paginator-border-color);
background-color: var(--button-bg);
} }
} }
&:first-child .page-link,
&:last-child .page-link {
border-radius: 50%;
}
} /* .page-item */ } /* .page-item */
} /* .pagination */ } /* .pagination */
@ -175,8 +171,6 @@
/* Hide SideBar and TOC */ /* Hide SideBar and TOC */
@media all and (max-width: 830px) { @media all and (max-width: 830px) {
.pagination { .pagination {
justify-content: space-evenly;
.page-item { .page-item {
&:not(:first-child):not(:last-child) { &:not(:first-child):not(:last-child) {
display: none; display: none;
@ -193,16 +187,12 @@
.pagination { .pagination {
font-size: 0.85rem; font-size: 0.85rem;
justify-content: center;
.page-item { .page-item {
&:not(:last-child) { &:not(:last-child) {
margin-right: 0.7rem; margin-right: 0.7rem;
} }
.page-link {
width: 2rem;
height: 2rem;
}
} }
.page-index { .page-index {
@ -210,10 +200,3 @@
} }
} /* .pagination */ } /* .pagination */
} }
/* Panel is visible */
@media all and (min-width: 1200px) {
#post-list {
padding-right: 0.5rem;
}
}

View file

@ -47,15 +47,18 @@
} }
h1 + .post-meta { h1 + .post-meta {
span + span::before { > span + span::before {
@include dot; @include dot;
} }
em { em,
@extend %text-color; time {
color: var(--text-color);
}
em {
a { a {
@extend %text-color; color: inherit;
} }
} }
} }
@ -73,7 +76,7 @@ h1 + .post-meta {
line-height: 1.2rem; line-height: 1.2rem;
> a { > a {
color: var(--text-color); @extend %text-highlight;
&:hover { &:hover {
@extend %link-hover; @extend %link-hover;
@ -99,52 +102,47 @@ h1 + .post-meta {
.share-icons { .share-icons {
font-size: 1.2rem; font-size: 1.2rem;
> i { > * {
margin-left: 0.25rem;
&:hover {
i {
@extend %btn-share-hovor;
}
}
}
button {
position: relative; position: relative;
bottom: 1px; bottom: 2px;
padding: 0;
@extend %cursor-pointer; @extend %cursor-pointer;
&:hover {
@extend %btn-share-hovor;
}
} }
a { a :hover {
&:not(:last-child) {
margin-right: 0.25rem;
}
&:hover {
text-decoration: none; text-decoration: none;
> i {
@extend %btn-share-hovor;
}
}
} }
.fab { .fa-square-x-twitter {
&.fa-twitter { @include btn-sharing-color(black);
@include btn-sharing-color(rgba(29, 161, 242, 1));
} }
&.fa-facebook-square { .fa-facebook-square {
@include btn-sharing-color(rgb(66, 95, 156)); @include btn-sharing-color(rgb(66, 95, 156));
} }
&.fa-telegram { .fa-telegram {
@include btn-sharing-color(rgb(39, 159, 217)); @include btn-sharing-color(rgb(39, 159, 217));
} }
&.fa-linkedin { .fa-linkedin {
@include btn-sharing-color(rgb(0, 119, 181)); @include btn-sharing-color(rgb(0, 119, 181));
} }
&.fa-weibo { .fa-weibo {
@include btn-sharing-color(rgb(229, 20, 43)); @include btn-sharing-color(rgb(229, 20, 43));
} }
}
} /* .share-icons */ } /* .share-icons */
.fas.fa-link { .fas.fa-link {
@ -157,8 +155,6 @@ h1 + .post-meta {
line-height: 2rem; line-height: 2rem;
.post-tag { .post-tag {
background: var(--tag-bg);
&:hover { &:hover {
@extend %link-hover; @extend %link-hover;
@extend %tag-hover; @extend %tag-hover;
@ -168,9 +164,6 @@ h1 + .post-meta {
} }
.post-navigation { .post-navigation {
padding-top: 3rem;
padding-bottom: 4rem;
.btn { .btn {
@extend %btn-post-nav; @extend %btn-post-nav;
@ -201,7 +194,7 @@ h1 + .post-meta {
color: var(--text-muted-color); color: var(--text-muted-color);
font-size: 0.65rem; font-size: 0.65rem;
text-transform: uppercase; text-transform: uppercase;
content: attr(prompt); content: attr(aria-label);
} }
&:first-child { &:first-child {
@ -317,9 +310,7 @@ h1 + .post-meta {
} }
ul { ul {
a { padding-left: 0.75rem;
padding-left: 2rem;
}
} }
} }
} }
@ -331,10 +322,10 @@ h1 + .post-meta {
@include label(1.1rem, 600); @include label(1.1rem, 600);
} }
em { time {
@extend %normal-font-style; @extend %normal-font-style;
color: var(--relate-post-date); color: var(--text-muted-color);
} }
p { p {
@ -358,8 +349,12 @@ h1 + .post-meta {
#tail-wrapper { #tail-wrapper {
min-height: 2rem; min-height: 2rem;
> div:last-of-type { > *:not(:last-child) {
margin-bottom: 2rem; margin-top: 3rem;
}
> *:nth-last-child(2) {
margin-bottom: 3rem;
} }
/* stylelint-disable-next-line selector-id-pattern */ /* stylelint-disable-next-line selector-id-pattern */
@ -396,7 +391,7 @@ h1 + .post-meta {
} }
@media all and (max-width: 768px) { @media all and (max-width: 768px) {
.post-content > p > img { .content > p > img {
max-width: calc(100% + 1rem); max-width: calc(100% + 1rem);
} }
} }

View file

@ -1,11 +1,5 @@
/*! @import 'colors/typography-light';
* Chirpy v6.1.0 (https://github.com/cotes2020/jekyll-theme-chirpy) @import 'colors/typography-dark';
* © 2019 Cotes Chung
* MIT Licensed
*/
@import 'colors/light-typography';
@import 'colors/dark-typography';
@import 'addon/variables'; @import 'addon/variables';
@import 'variables-hook'; @import 'variables-hook';
@import 'addon/module'; @import 'addon/module';

View file

@ -11,6 +11,4 @@ redirect_from:
{% include lang.html %} {% include lang.html %}
<div class="lead"> <p class="lead">{{ site.data.locales[lang].not_found.statment }}</p>
<p>{{ site.data.locales[lang].not_found.statment }}</p>
</div>

View file

@ -1,6 +1,6 @@
--- ---
--- ---
@import '{{ site.theme }}'; @import 'main';
/* append your custom style below */ /* append your custom style below */

@ -1 +1 @@
Subproject commit 557de301fe393fb4660a338ae3c1b72ec2b3bf7c Subproject commit 6737eab720e4cdd8330d32053053356f200d8819

104
docs/CONTRIBUTING.md Normal file
View file

@ -0,0 +1,104 @@
# Contributing Guidelines
:tada: _First of all, thank you for considering contributing to this project!_ :tada:
There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug
reports and feature requests or writing code which can be incorporated into Chirpy itself.
## In This Article
- [General Rules](#general-rules)
- [Questions and Requests for Help](#questions-and-requests-for-help)
- [File a Bug Report](#file-a-bug-report)
- [Suggest a New Feature](#suggest-a-new-feature)
- [Contributing Code and Documentation Changes](#contributing-code-and-documentation-changes)
- [Helpful Resources](#helpful-resources)
## General Rules
All contributions should be based on the following rules:
- You should read through the [Wiki][wiki] to understand the project features and how to use it properly. This is to
respect the time of the project's developers and
maintainers, and to save their energy for other problems that really need to be resolved.
- Use the [latest release version][latest-ver]. If your contribution involves code/documentation changes, update to the
latest version of the default (`master`) branch.
- Avoid making duplicate contributions by searching for existing [Issues][issues] / [Discussioins][discus] /
[Pull Requests][pr], but don't leave any unhelpful comments such as "I have the same problem". Prefer using
[reactions][gh-reactions] if you simply want to "+1" an existing issue.
- DO NOT email or tweet the
project developers and maintainers directly, everything about Chirpy should be left in GitHub.
**Tips**: If you're new to open source, see "[How To Ask Questions The Smart Way][ext-reading]".
## Questions and Requests for Help
We expect every reasonable question you ask to be answered appropriately. If you want a quick and timely response,
please ask questions at [Jekyll Talk][jekyll-talk] and [StackOverflow][stack-overflow], where there are tons of
enthusiastic geeks who will positively answer your challenging questions.
If you can't get an answer in any of the above ways, then create a new [discussion][discus]. As long as it is not a
duplicate and [RTFM][rtfm] / [STFW][stfw] issue, we will respond as soon as possible.
## File a Bug Report
A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate
a well-written, thorough bug report.
1. Please figure out why the bug occurred, or locate the module in the project that caused this bug. Otherwise, there is
a high probability that you are using/setting it incorrectly.
2. If the issue is caused by you modifying the project code or some configuration of Jekyll, then please DO NOT
report such "bugs".
Chirpy is an open-source project, but that doesn't mean we will maintain other specific forks (such as yours).
You can learn about Jekyll and modern Web development to solve problems caused by custom modifications.
3. Make good use of your browser's incognito mode to troubleshoot if the problem is caused by caching.
4. As a last option, you can create a new [Bug Report][new-issue] follow the template to describe the details.
If possible, providing a demo that reproduces the error will help us troubleshoot faster.
## Suggest a New Feature
Feature requests are welcome! While we will consider all requests, we cannot guarantee your request will be accepted.
We want to avoid chaos in the UI design, so we won't accept requests for changes like color schemes, font families,
typography, and so on. **Do not open a duplicate feature request.** Search for existing feature requests first. If you
find your feature (or one very similar) previously requested, comment on that issue.
If accepted, we cannot make any commitments regarding the timeline for implementation and release. However, you are
welcome to submit a pull request to help!
## Contributing Code and Documentation Changes
In short, you can follow these steps to complete the contribution.
1. Fork this project on GitHub and clone your repository locally.
2. Setting up the [development & test environments][dev-env].
3. Create a new branch from the default branch and give it a descriptive name (e.g. `add-a-new-feat` or `fix-a-bug`).
When development is complete, create a [Conventional Commit][cc] with Git.
4. Create a new [Pull Request][gh-pr].
## Helpful Resources
- [Code of conduct](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CODE_OF_CONDUCT.md)
- [Security policy](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/SECURITY.md)
[latest-ver]: https://github.com/cotes2020/jekyll-theme-chirpy/releases/latest
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
[pr]: https://github.com/cotes2020/jekyll-theme-chirpy/pulls
[discus]: https://github.com/cotes2020/jekyll-theme-chirpy/discussions
[ext-reading]: http://www.catb.org/~esr/faqs/smart-questions.html
[jekyll-talk]: https://talk.jekyllrb.com/
[stack-overflow]: https://stackoverflow.com/questions/tagged/jekyll
[rtfm]: https://en.wikipedia.org/wiki/RTFM
[stfw]: https://www.webster-dictionary.org/definition/STFW
[gh-reactions]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[new-issue]: https://github.com/cotes2020/jekyll-theme-chirpy/issues/new/choose
[dev-env]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki/Development-&-Test-Environments
[cc]: https://www.conventionalcommits.org/
[gh-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests

13
docs/SECURITY.md Normal file
View file

@ -0,0 +1,13 @@
# Security Policy
## Supported Versions
| Version | Supported |
|:----------|:---------:|
| `6.x` | ✓ |
| < `6.0.0` | ✗ |
## Reporting a Vulnerability
If you find a vulnerability, please report it to `cotes.chung@gmail.com`.
We will try our best to respond within a week. Thank you for your time!

View file

@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
spec.license = "MIT" spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0").select { |f| spec.files = `git ls-files -z`.split("\x0").select { |f|
f.match(%r!^((_(includes|layouts|sass|data)|assets)\/|README|LICENSE)!i) f.match(%r!^((_(includes|layouts|sass|(data\/(locales|origin)))|assets)\/|README|LICENSE)!i)
} }
spec.metadata = { spec.metadata = {

View file

@ -21,15 +21,15 @@
"fixlint": "npm run test -- --fix" "fixlint": "npm run test -- --fix"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.22.17",
"@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/preset-env": "^7.20.2", "@babel/preset-env": "^7.22.15",
"@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-terser": "^0.4.0", "@rollup/plugin-terser": "^0.4.3",
"rimraf": "^5.0.1", "rimraf": "^5.0.1",
"rollup": "^3.20.2", "rollup": "^3.29.0",
"rollup-plugin-license": "^3.0.1", "rollup-plugin-license": "^3.1.0",
"stylelint": "^15.3.0", "stylelint": "^15.10.3",
"stylelint-config-standard-scss": "^9.0.0" "stylelint-config-standard-scss": "^11.0.0"
} }
} }

View file

@ -15,23 +15,21 @@
set -eu set -eu
opt_pre=false # preview mode option opt_pre=false # preview mode option
opt_skip_ver=false # option for skip versioning
working_branch="$(git branch --show-current)" working_branch="$(git branch --show-current)"
# AKA the default branch, main/master branch
STAGING_BRANCH="$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')" STAGING_BRANCH="$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')"
PROD_BRANCH="production" PROD_BRANCH="production"
GEM_SPEC="jekyll-theme-chirpy.gemspec" GEM_SPEC="jekyll-theme-chirpy.gemspec"
NODE_CONFIG="package.json" NODE_CONFIG="package.json"
JS_DIST="assets/js/dist" JS_DIST="assets/js/dist"
BACKUP_PATH="$(mktemp -d)" BACKUP_PATH="$(mktemp -d)"
FILES=( FILES=(
"_sass/jekyll-theme-chirpy.scss"
"$GEM_SPEC" "$GEM_SPEC"
"$NODE_CONFIG" "$NODE_CONFIG"
) )
@ -51,21 +49,30 @@ help() {
echo " bash ./tools/release [options]" echo " bash ./tools/release [options]"
echo echo
echo "Options:" echo "Options:"
echo " -k, --skip-versioning Skip the step of generating the version number."
echo " -p, --preview Enable preview mode, only package, and will not modify the branches" echo " -p, --preview Enable preview mode, only package, and will not modify the branches"
echo " -h, --help Print this information." echo " -h, --help Print this information."
} }
_check_cli() {
for i in "${!TOOLS[@]}"; do
cli="${TOOLS[$i]}"
if ! command -v "$cli" &>/dev/null; then
echo "> Command '$cli' not found!"
exit 1
fi
done
}
_check_git() { _check_git() {
# ensure nothing is uncommitted # ensure nothing is uncommitted
if [[ -n $(git status . -s) ]]; then if [[ -n $(git status . -s) ]]; then
echo "Abort: Commit the staged files first, and then run this tool again." echo "> Abort: Commit the staged files first, and then run this tool again."
exit 1 exit 1
fi fi
# ensure the working branch is the main/patch branch # ensure the working branch is the default/patch branch
if [[ $working_branch != "$STAGING_BRANCH" && $working_branch != hotfix/* ]]; then if [[ $working_branch != "$STAGING_BRANCH" && $working_branch != hotfix/* ]]; then
echo "Abort: Please run on the main branch or patch branches." echo "> Abort: Please run on the $STAGING_BRANCH branch or a patch branche."
exit 1 exit 1
fi fi
} }
@ -74,18 +81,7 @@ _check_src() {
for i in "${!FILES[@]}"; do for i in "${!FILES[@]}"; do
_src="${FILES[$i]}" _src="${FILES[$i]}"
if [[ ! -f $_src && ! -d $_src ]]; then if [[ ! -f $_src && ! -d $_src ]]; then
echo -e "Error: Missing file \"$_src\"!\n" echo -e "> Error: Missing file \"$_src\"!\n"
exit 1
fi
done
}
_check_command() {
for i in "${!TOOLS[@]}"; do
cli="${TOOLS[$i]}"
if ! command -v "$cli" &>/dev/null; then
echo "Command '$cli' not found!"
exit 1 exit 1
fi fi
done done
@ -98,122 +94,99 @@ _check_node_packages() {
} }
check() { check() {
_check_command _check_cli
_check_git _check_git
_check_src _check_src
_check_node_packages _check_node_packages
} }
_bump_files() { # auto-generate a new version number to the file 'package.json' and
for i in "${!FILES[@]}"; do bump_node() {
if [[ ${FILES[$i]} == "$NODE_CONFIG" ]]; then
continue
fi
sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v$1/" "${FILES[$i]}"
done
npm run build
}
_bump_gemspec() {
sed -i "s/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/$1/" "$GEM_SPEC"
}
# 1. Bump latest version number to the following files:
#
# - _sass/jekyll-theme-chirpy.scss
# - _javascript/copyright
# - assets/js/dist/*.js (will be built by gulp later)
# - jekyll-theme-chirpy.gemspec
#
# 2. Create a commit to save the changes.
bump() {
_bump_files "$1"
_bump_gemspec "$1"
if [[ $opt_pre = false && -n $(git status . -s) ]]; then
git add .
git commit -m "chore(release): $1"
fi
}
## Remove unnecessary theme settings
cleanup_config() {
cp _config.yml _config.yml.bak
sed -i "s/^img_cdn:.*/img_cdn:/;s/^avatar:.*/avatar:/" _config.yml
}
resume_config() {
mv _config.yml.bak _config.yml
}
# build a gem package
build_gem() {
echo -e "Build the gem package for v$_version\n"
cleanup_config
rm -f ./*.gem
git add "$JS_DIST" -f # add JS dist to gem
gem build "$GEM_SPEC"
cp "$JS_DIST"/* "$BACKUP_PATH"
git restore --staged "$JS_DIST" # resume the git status
resume_config
}
# Update the git branch graph, tag, and then build the gem package.
release() {
_version="$1" # X.Y.Z
git checkout "$PROD_BRANCH"
git merge --no-ff --no-edit "$working_branch"
# Create a new tag on working branch
echo -e "Create tag v$_version\n"
git tag "v$_version"
# Merge from patch branch to the staging branch
if [[ $working_branch == hotfix/* ]]; then
git checkout "$STAGING_BRANCH"
git merge --no-ff --no-edit "$working_branch"
git branch -D "$working_branch"
fi
}
main() {
if [[ $opt_skip_ver = false ]]; then
check
# auto-generate a new version number to the file 'package.json'
if $opt_pre; then if $opt_pre; then
standard-version --prerelease rc standard-version --prerelease rc
else else
standard-version standard-version
fi fi
fi
# Change heading of Patch version to level 2 (a bug from `standard-version`) # Change heading of Patch version to heading level 2 (a bug from `standard-version`)
sed -i "s/^### \[/## \[/g" CHANGELOG.md sed -i "s/^### \[/## \[/g" CHANGELOG.md
# Replace multiple empty lines with a single empty line # Replace multiple empty lines with a single empty line
sed -i "/^$/N;/^\n$/D" CHANGELOG.md sed -i "/^$/N;/^\n$/D" CHANGELOG.md
}
_version="$(grep '"version":' "$NODE_CONFIG" | sed 's/.*: "//;s/".*//')" ## Bump new version to gem config file
bump_gem() {
sed -i "s/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/$1/" "$GEM_SPEC"
}
echo -e "Bump version number to $_version\n" # Update the git branches, create a new tag, and then build the gem package.
bump "$_version" release() {
_version="$1" # X.Y.Z
_latest_commit="$(git rev-parse HEAD)"
build_gem # Create a new tag on production branch
echo -e "> Create tag v$_version\n"
git tag "v$_version"
if [[ $opt_pre = true ]]; then git checkout "$STAGING_BRANCH"
# Undo all changes on Git
git reset --hard && git clean -fd if [[ $working_branch == hotfix/* ]]; then
else git merge --no-ff --no-edit "$working_branch"
release "$_version" # delete the patch branch
git branch -D "$working_branch"
fi fi
# cherry-pick the latest commit from production branch to default branch
git cherry-pick "$_latest_commit"
}
## Build a gem package
build_gem() {
# Remove unnecessary theme settings
sed -i "s/^img_cdn:.*/img_cdn:/;s/^avatar:.*/avatar:/" _config.yml
rm -f ./*.gem
npm run build
git add "$JS_DIST" -f # add JS dist to gem
gem build "$GEM_SPEC"
cp "$JS_DIST"/* "$BACKUP_PATH"
# Resume the settings
git reset
git checkout .
# restore the dist files for future development # restore the dist files for future development
mkdir -p "$JS_DIST" && cp "$BACKUP_PATH"/* "$JS_DIST" mkdir -p "$JS_DIST" && cp "$BACKUP_PATH"/* "$JS_DIST"
} }
main() {
check
if [[ $opt_pre = false ]]; then
git checkout "$PROD_BRANCH"
git merge --no-ff --no-edit "$working_branch"
fi
bump_node
_version="$(grep '"version":' "$NODE_CONFIG" | sed 's/.*: "//;s/".*//')"
bump_gem "$_version"
echo -e "> Build the gem package for v$_version\n"
if [[ $opt_pre = false ]]; then
echo -e "> Bumped version number to $_version\n"
git add .
git commit -m "chore(release): $_version"
release "$_version"
fi
build_gem
}
while (($#)); do while (($#)); do
opt="$1" opt="$1"
case $opt in case $opt in
@ -221,10 +194,6 @@ while (($#)); do
opt_pre=true opt_pre=true
shift shift
;; ;;
-k | --skip-versioning)
opt_skip_ver=true
shift
;;
-h | --help) -h | --help)
help help
exit 0 exit 0

View file

@ -62,9 +62,8 @@ main() {
# test # test
bundle exec htmlproofer "$SITE_DIR" \ bundle exec htmlproofer "$SITE_DIR" \
--disable-external \ --disable-external=true \
--check-html \ --ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
--allow_hash_href
} }
while (($#)); do while (($#)); do