From ba397a21aa628c2dd49159e58d95bb8042a6ad8b Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Sun, 13 Aug 2023 14:39:40 +0800
Subject: [PATCH 05/29] docs: fix the badge links on README and improve the
content
---
README.md | 45 +++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/README.md b/README.md
index a99e041..5dd55f1 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,10 @@
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)
- [![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)
- [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)](https://www.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade)
- [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
+ [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)][gem]
+ [![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg?branch=master&event=push)][ci]
+ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)][codacy]
+ [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)][license]
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
[**Live Demo →**][demo]
@@ -26,18 +26,18 @@
- Dark / Light Theme Mode
- Localized UI language
- - Pinned Posts
+ - Pinned Posts on Home Page
- Hierarchical Categories
- Trending Tags
- Table of Contents
- - Last Modified Date of Posts
+ - Last Modified Date
- Syntax Highlighting
- Mathematical Expressions
- - Mermaid Diagram & Flowchart
+ - Mermaid Diagrams & Flowcharts
- Dark / Light Mode Images
- Embed Videos
- Disqus / Utterances / Giscus Comments
- - Search
+ - Built-in Search
- Atom Feeds
- Google Analytics
- SEO & Performance Optimization
@@ -47,13 +47,12 @@
## Documentation
-To explore usage, development, and upgrade guide of the project, please refer to
-the [Wiki][wiki].
+To explore usage, development, and upgrade guide of the project, please refer to the [**Wiki**][wiki].
## Contributing
-Welcome to report bugs, help improve the code or submit new features.
-For more information, please see the ["Contributing Guidelines"][contribute-guide].
+Reporting bugs and helping to improve source code or documentation is always welcome.
+For more information, see the "[Contributing Guidelines][contribute-guide]".
## Credits
@@ -61,25 +60,27 @@ This theme is mainly built with [Jekyll][jekyllrb] ecosystem,
[Bootstrap][bootstrap], [Font Awesome][icons] and some other [wonderful tools][lib].
The avatar and favicon design come from [Clipart Max][image].
-Thanks to all the [contributors][contributors]. Also, folks who submitted issues
-or unmerged PRs should not be forgotten. Because they reported bugs, shared ideas,
-or inspired me to write more readable documentation.
+Many thanks to the [contributors][contributors] who participated in the development
+and to the folks who reported bugs or shared ideas.
-Last but not least, thanks to [JetBrains][jetbrains] for providing the
-_Open Source Development_ license.
+Last but not least, thanks to [JetBrains][jetbrains] for providing the _Open Source License_.
## Sponsoring
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)
-[![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][donation]
-[![Alipay](https://img.shields.io/badge/-Tip%20Me%20on%20Alipay-blue?logo=alipay&logoColor=white)][donation]
+[![Ko-fi](https://img.shields.io/badge/Support_Me_on_Ko--fi-ff5e5b?logo=ko-fi&logoColor=white)][ko-fi]
+[![Wechat Pay](https://img.shields.io/badge/Tip_Me_on_WeChat-brightgreen?logo=wechat&logoColor=white)][donation]
+[![Alipay](https://img.shields.io/badge/Tip_Me_on_Alipay-blue?logo=alipay&logoColor=white)][donation]
## 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/
[bootstrap]: https://getbootstrap.com/
[icons]: https://fontawesome.com/
@@ -90,5 +91,5 @@ This work is published under [MIT][mit] License.
[contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors
[lib]: https://github.com/cotes2020/chirpy-static-assets
[jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
+[ko-fi]: https://ko-fi.com/coteschung/
[donation]: https://sponsor.cotes.page/
-[mit]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE
From 7819fd08437e68cc684c60a1cb5858b93b6a37f7 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Mon, 14 Aug 2023 08:50:17 +0800
Subject: [PATCH 06/29] docs: enrich and improve the Contributing Guidelines
---
.github/CONTRIBUTING.md | 107 +++++++++++++++++++++++++++++-----------
1 file changed, 78 insertions(+), 29 deletions(-)
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 54e7a6f..1f13deb 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -1,39 +1,69 @@
-# How to Contribute
+# Contributing Guidelines
-:tada: We really appreciate you taking the time to improve this project! :tada:
+:tada: First of all, thank you for considering contributing to 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.
+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.
-Basically, you can follow these steps to complete the contribution.
+As a consumer of the open source community, you should make sure that you have gone 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 solved. Please DO NOT email or tweet the project maintainers directly, everything about Chirpy should be left in GitHub issues/PRs.
-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/
` or `fix/`).
-3. After completing development, create a [Conventional Commit][cc] with git.
- (See also: ["Verify the commits"](#verify-the-commits))
+**Tips**: If you are new to open source community, here is a very useful article for you — "[How To Ask Questions The Smart Way][ext-reading]".
+
+## In This Article
+
+- [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)
+- [Submitting a Pull Request](#submitting-a-pull-request)
+ - [Contributing Code and Documentation Changes](#contributing-code-and-documentation-changes)
+ - [How To Pass the CI Tests](#how-to-pass-the-ci-tests)
+
+## Questions and Requests for Help
+
+We want to make sure that every reasonable question you have is answered appropriately. In most cases, you can get an answer by checking the Wiki and existing issues. Alternatively, you can ask a question in the [Jekyll Forum][forum] and [StackOverflow][stack_overflow], where there are tons of enthusiastic geeks eager to answer your interesting questions.
+
+If you can't get an answer in any of the above ways, then open a new issue as your last option. As long as it is not a duplicate / [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.
+
+- If the issue is caused by you modifying the project code or some configuration of Jekyll, then please **DO NOT** report such "bugs".
+This project is open source, but it doesn't mean that we will maintain other specific projects (such as yours).
+You can learn about Jekyll and modern Web development to solve problems caused by custom modifications.
+
+- Update to the latest version and see if that solves the problem.
+
+- Make good use of your browser's incognito mode to troubleshoot if the problem is caused by caching.
+
+- Search for similar issues, but don't leave unhelpful comments such as "I had the same problem". Prefer using [reactions][gh-reactions] if you simply want to "+1" an existing issue.
+
+- Once you've gone through the above, you can use the bug-report template to create a new issue, filling in the description of the bug according to the template. If you can, provide a small example of the bug that can be reproduced for faster troubleshooting.
+
+## 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!
+
+## Submitting a Pull Request
+
+### 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 environment][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. (See also: "[Verify the commits](#verify-the-commits)")
4. Create a [Pull Request][gh-pr].
-## Make sure you can pass the CI tests
+### How To Pass the CI Tests
-This project has [CI][ci] turned on. In order for your [PR][gh-pr] to pass the test,
+This project has [CI][ci] turned on. In order for your pull request 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
+#### Verify the Commits
Before you create a git commit, please complete the following setup.
@@ -49,7 +79,26 @@ And then enable `husky`:
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
+#### Check the Core Functionality
+
+```console
+bash ./tools/test
+```
+
+#### Check the SASS Code Style
+
+```console
+npm test
+```
+
+[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
+[ext-reading]: http://www.catb.org/~esr/faqs/smart-questions.html
+[forum]: 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/
+[dev-env]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki/Development
[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
[ci]: https://en.wikipedia.org/wiki/Continuous_integration
From b39c6b526c3917a49350fcfeafee2e8761e36b6d Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Thu, 17 Aug 2023 05:24:31 +0800
Subject: [PATCH 07/29] chore: route question to GitHub Discussions
---
.github/CONTRIBUTING.md | 126 +++++++++++-----------
.github/ISSUE_TEMPLATE/bug_report.md | 9 +-
.github/ISSUE_TEMPLATE/config.yml | 5 +
.github/ISSUE_TEMPLATE/feature_request.md | 10 +-
.github/ISSUE_TEMPLATE/help_wanted.md | 28 -----
.github/ISSUE_TEMPLATE/question.md | 20 ----
README.md | 3 +-
7 files changed, 72 insertions(+), 129 deletions(-)
create mode 100644 .github/ISSUE_TEMPLATE/config.yml
delete mode 100644 .github/ISSUE_TEMPLATE/help_wanted.md
delete mode 100644 .github/ISSUE_TEMPLATE/question.md
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 1f13deb..4522a8e 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -1,104 +1,104 @@
# Contributing Guidelines
-:tada: First of all, thank you for considering contributing to this project! :tada:
+: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.
-
-As a consumer of the open source community, you should make sure that you have gone 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 solved. Please DO NOT email or tweet the project maintainers directly, everything about Chirpy should be left in GitHub issues/PRs.
-
-**Tips**: If you are new to open source community, here is a very useful article for you — "[How To Ask Questions The Smart Way][ext-reading]".
+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)
-- [Submitting a Pull Request](#submitting-a-pull-request)
- - [Contributing Code and Documentation Changes](#contributing-code-and-documentation-changes)
- - [How To Pass the CI Tests](#how-to-pass-the-ci-tests)
+- [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 want to make sure that every reasonable question you have is answered appropriately. In most cases, you can get an answer by checking the Wiki and existing issues. Alternatively, you can ask a question in the [Jekyll Forum][forum] and [StackOverflow][stack_overflow], where there are tons of enthusiastic geeks eager to answer your interesting questions.
+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 open a new issue as your last option. As long as it is not a duplicate / [RTFM][rtfm] / [STFW][stfw] issue, we will respond as soon as possible.
+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.
+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.
-- If the issue is caused by you modifying the project code or some configuration of Jekyll, then please **DO NOT** report such "bugs".
-This project is open source, but it doesn't mean that we will maintain other specific projects (such as yours).
+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.
-- Update to the latest version and see if that solves the problem.
+3. Make good use of your browser's incognito mode to troubleshoot if the problem is caused by caching.
-- Make good use of your browser's incognito mode to troubleshoot if the problem is caused by caching.
-
-- Search for similar issues, but don't leave unhelpful comments such as "I had the same problem". Prefer using [reactions][gh-reactions] if you simply want to "+1" an existing issue.
-
-- Once you've gone through the above, you can use the bug-report template to create a new issue, filling in the description of the bug according to the template. If you can, provide a small example of the bug that can be reproduced for faster troubleshooting.
+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.
+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!
+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!
-## Submitting a Pull Request
-
-### Contributing Code and Documentation Changes
+## 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 environment][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. (See also: "[Verify the commits](#verify-the-commits)")
-4. Create a [Pull Request][gh-pr].
+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].
-### How To Pass the CI Tests
+## Helpful Resources
-This project has [CI][ci] turned on. In order for your pull request to pass the test,
-please read the following.
-
-#### 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
-```
-
-#### Check the Core Functionality
-
-```console
-bash ./tools/test
-```
-
-#### Check the SASS Code Style
-
-```console
-npm test
-```
+- [Code of conduct](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CODE_OF_CONDUCT.md)
+- [Security policy](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/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
-[forum]: https://talk.jekyllrb.com/
-[stack_overflow]: https://stackoverflow.com/questions/tagged/jekyll
+[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/
-[dev-env]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki/Development
+[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
-[ci]: https://en.wikipedia.org/wiki/Continuous_integration
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index cdfb095..f057a1e 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -3,14 +3,7 @@ name: Bug Report
about: Create a report to help us improve
---
-**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.
-- 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
+> **Tips**: Remember, contributions to this repository should follow the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md).
## Describe the bug
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..1dfb2b2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -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.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 089503f..c1a91f7 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -4,14 +4,8 @@ about: Suggest an idea for this project
labels: enhancement
---
-**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.
-- 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
+> **Tips**: Remember, contributions to this repository should follow the
+[contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md).
## Is your feature request related to a problem? Please describe
diff --git a/.github/ISSUE_TEMPLATE/help_wanted.md b/.github/ISSUE_TEMPLATE/help_wanted.md
deleted file mode 100644
index 1f41040..0000000
--- a/.github/ISSUE_TEMPLATE/help_wanted.md
+++ /dev/null
@@ -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
-
-
-
-## Operations you have already tried
-
-
-
-## Logs/Screenshots
-
-
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
deleted file mode 100644
index e3cda3f..0000000
--- a/.github/ISSUE_TEMPLATE/question.md
+++ /dev/null
@@ -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
-
-
diff --git a/README.md b/README.md
index 5dd55f1..dfda277 100644
--- a/README.md
+++ b/README.md
@@ -51,8 +51,7 @@ To explore usage, development, and upgrade guide of the project, please refer to
## Contributing
-Reporting bugs and helping to improve source code or documentation is always welcome.
-For more information, see the "[Contributing Guidelines][contribute-guide]".
+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]".
## Credits
From f659109de225c8f91513d7f017c13094329ca07b Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Sat, 19 Aug 2023 12:39:57 +0800
Subject: [PATCH 08/29] chore: update security support versions
---
.github/SECURITY.md | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/.github/SECURITY.md b/.github/SECURITY.md
index 5704dc7..5a07d26 100644
--- a/.github/SECURITY.md
+++ b/.github/SECURITY.md
@@ -2,11 +2,12 @@
## Supported Versions
-| Version | Supported |
-|---------| ------------------ |
-| 5.x | :white_check_mark: |
-| < 5.0.0 | :x: |
+| 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!
+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!
From 7b43a83c4023048800351625f5b60695b7c69dd6 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Sat, 19 Aug 2023 12:51:22 +0800
Subject: [PATCH 09/29] refactor: move project files to `docs` folder
---
.github/ISSUE_TEMPLATE/bug_report.md | 2 +-
.github/ISSUE_TEMPLATE/feature_request.md | 3 +--
.github/workflows/ci.yml | 1 +
README.md | 2 +-
_config.yml | 1 +
{.github => docs}/CODE_OF_CONDUCT.md | 0
{.github => docs}/CONTRIBUTING.md | 4 ++--
{.github => docs}/SECURITY.md | 0
8 files changed, 7 insertions(+), 6 deletions(-)
rename {.github => docs}/CODE_OF_CONDUCT.md (100%)
rename {.github => docs}/CONTRIBUTING.md (98%)
rename {.github => docs}/SECURITY.md (100%)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index f057a1e..2eb21a1 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -3,7 +3,7 @@ name: Bug Report
about: Create a report to help us improve
---
-> **Tips**: Remember, contributions to this repository should follow the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md).
+> **Tips**: Remember, contributions to this repository should follow the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
## Describe the bug
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index c1a91f7..2a8d6d6 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -4,8 +4,7 @@ about: Suggest an idea for this project
labels: enhancement
---
-> **Tips**: Remember, contributions to this repository should follow the
-[contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md).
+> **Tips**: Remember, contributions to this repository should follow the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md).
## Is your feature request related to a problem? Please describe
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b51c183..38dbb80 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,6 +8,7 @@ on:
- ".github/**"
- "!.github/workflows/ci.yml"
- ".gitignore"
+ - "docs/**"
- "README.md"
- "LICENSE"
pull_request:
diff --git a/README.md b/README.md
index dfda277..60c5e05 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@ This work is published under [MIT License][license].
[image]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
[demo]: https://cotes2020.github.io/chirpy-demo/
[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
[lib]: https://github.com/cotes2020/chirpy-static-assets
[jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
diff --git a/_config.yml b/_config.yml
index 4fded07..960148f 100644
--- a/_config.yml
+++ b/_config.yml
@@ -177,6 +177,7 @@ compress_html:
exclude:
- "*.gem"
- "*.gemspec"
+ - docs
- tools
- README.md
- CHANGELOG.md
diff --git a/.github/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md
similarity index 100%
rename from .github/CODE_OF_CONDUCT.md
rename to docs/CODE_OF_CONDUCT.md
diff --git a/.github/CONTRIBUTING.md b/docs/CONTRIBUTING.md
similarity index 98%
rename from .github/CONTRIBUTING.md
rename to docs/CONTRIBUTING.md
index 4522a8e..b86cb2d 100644
--- a/.github/CONTRIBUTING.md
+++ b/docs/CONTRIBUTING.md
@@ -84,8 +84,8 @@ When development is complete, create a [Conventional Commit][cc] with Git.
## Helpful Resources
-- [Code of conduct](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CODE_OF_CONDUCT.md)
-- [Security policy](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/SECURITY.md)
+- [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
diff --git a/.github/SECURITY.md b/docs/SECURITY.md
similarity index 100%
rename from .github/SECURITY.md
rename to docs/SECURITY.md
From 2a5c1843737c3c6e1f7d64ecb090259460f2cde0 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Sun, 3 Sep 2023 19:59:06 +0800
Subject: [PATCH 10/29] refactor(core): remove redundant config options
`node_modules` is already part of the default exclusions.
See also:
---
_config.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/_config.yml b/_config.yml
index 960148f..f7245f8 100644
--- a/_config.yml
+++ b/_config.yml
@@ -183,7 +183,6 @@ exclude:
- CHANGELOG.md
- LICENSE
- rollup.config.js
- - node_modules
- package*.json
jekyll-archives:
From 4f86b04a8487ebbf4a6d0d70b0c3ece79e9269f3 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Sun, 3 Sep 2023 20:03:51 +0800
Subject: [PATCH 11/29] perf(ui): improve code snippet design
- Apply the new syntax color themes
- Center the text in the code snippet header
- Maintaining space to the left of a 3-digit line number or more
---
_sass/addon/syntax.scss | 75 +++++++++-----
_sass/addon/variables.scss | 4 +
_sass/colors/dark-syntax.scss | 87 ----------------
_sass/colors/light-syntax.scss | 84 ----------------
_sass/colors/syntax-dark.scss | 138 +++++++++++++++++++++++++
_sass/colors/syntax-light.scss | 179 +++++++++++++++++++++++++++++++++
6 files changed, 369 insertions(+), 198 deletions(-)
delete mode 100644 _sass/colors/dark-syntax.scss
delete mode 100644 _sass/colors/light-syntax.scss
create mode 100644 _sass/colors/syntax-dark.scss
create mode 100644 _sass/colors/syntax-light.scss
diff --git a/_sass/addon/syntax.scss b/_sass/addon/syntax.scss
index 182b95f..5a58e3f 100644
--- a/_sass/addon/syntax.scss
+++ b/_sass/addon/syntax.scss
@@ -2,8 +2,8 @@
* The syntax highlight.
*/
-@import 'colors/light-syntax';
-@import 'colors/dark-syntax';
+@import 'colors/syntax-light';
+@import 'colors/syntax-dark';
html {
@media (prefers-color-scheme: light) {
@@ -55,27 +55,35 @@ html {
}
overflow: auto;
- padding-top: 0.5rem;
- padding-bottom: 1rem;
+ padding-bottom: 0.75rem;
pre {
margin-bottom: 0;
font-size: $code-font-size;
line-height: 1.4rem;
word-wrap: normal; /* Fixed Safari overflow-x */
- color: var(--code-snippets-color);
}
table {
- td pre {
- overflow: visible; /* Fixed iOS safari overflow-x */
- word-break: normal; /* Fixed iOS safari linenos code break */
+ 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 */
+ word-break: normal; /* Fixed iOS safari linenos code break */
+ }
}
}
.lineno {
- padding-right: 0.5rem;
- min-width: 2.2rem;
text-align: right;
color: var(--highlight-lineno-color);
-webkit-user-select: none;
@@ -90,6 +98,7 @@ code {
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
+ color: var(--code-color);
&.highlighter-rouge {
font-size: $code-font-size;
@@ -145,6 +154,11 @@ div[class^='language-'] {
border-radius: 0;
}
+
+ .highlight {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ }
}
/* Hide line numbers for default, console, and terminal code snippets */
@@ -153,12 +167,13 @@ div {
&.language-plaintext,
&.language-console,
&.language-terminal {
- pre.lineno {
- display: none;
- }
+ td:first-child {
+ padding: 0 !important;
+ margin-right: 0;
- td.rouge-code {
- padding-left: 1.5rem;
+ .lineno {
+ display: none;
+ }
}
}
}
@@ -166,21 +181,21 @@ div {
.code-header {
@extend %no-cursor;
- $code-header-height: 2.25rem;
-
display: flex;
justify-content: space-between;
align-items: center;
height: $code-header-height;
- margin-left: 1rem;
+ margin-left: 0.75rem;
margin-right: 0.5rem;
/* the label block */
span {
+ line-height: $code-header-height;
+
/* label icon */
i {
font-size: 1rem;
- margin-right: 0.5rem;
+ width: $code-icon-width;
color: var(--code-header-icon-color);
&.small {
@@ -252,19 +267,25 @@ div {
.code-header {
@include ml-mr(0);
- &::before {
- $dot-size: 0.75rem;
- $dot-margin: 0.5rem;
+ $dot-margin: calc($code-header-height / 2);
+ &::before {
content: '';
display: inline-block;
- margin-left: 1rem;
- width: $dot-size;
- height: $dot-size;
+ margin-left: $dot-margin;
+ width: $code-dot-size;
+ height: $code-dot-size;
border-radius: 50%;
background-color: var(--code-header-muted-color);
- box-shadow: ($dot-size + $dot-margin) 0 0 var(--code-header-muted-color),
- ($dot-size + $dot-margin) * 2 0 0 var(--code-header-muted-color);
+ box-shadow: ($code-dot-size + $code-dot-gap) 0 0
+ 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);
}
}
}
diff --git a/_sass/addon/variables.scss b/_sass/addon/variables.scss
index 0c68281..3d32428 100644
--- a/_sass/addon/variables.scss
+++ b/_sass/addon/variables.scss
@@ -20,6 +20,10 @@ $base-radius: 0.5rem;
/* syntax highlight */
$code-font-size: 0.85rem !default;
+$code-header-height: 2.25rem;
+$code-dot-size: 0.75rem;
+$code-dot-gap: 0.5rem;
+$code-icon-width: 1.75rem;
/* fonts */
diff --git a/_sass/colors/dark-syntax.scss b/_sass/colors/dark-syntax.scss
deleted file mode 100644
index f14c520..0000000
--- a/_sass/colors/dark-syntax.scss
+++ /dev/null
@@ -1,87 +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: #ff6e4e;
- --highlight-lineno-color: #666666;
- --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: #cacaca;
- --code-snippets-color: #c2c2c2;
-
- .highlight .gp {
- color: #87939d;
- }
-
- /* 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: #938d75; } /* 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: #ff329c; } /* Operator */
- .highlight .p { color: #f8f8f2; } /* Punctuation */
- .highlight .cm { color: #938d75; } /* Comment.Multiline */
- .highlight .cp { color: #938d75; } /* Comment.Preproc */
- .highlight .c1 { color: #938d75; } /* Comment.Single */
- .highlight .cs { color: #938d75; } /* 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: #ff329c; } /* 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: #ff329c; } /* Name.Tag */
- .highlight .nv { color: #f8f8f2; } /* Name.Variable */
- .highlight .ow { color: #ff329c; } /* 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: #938d75; } /* Generic.Subheading & Diff Unified/Comment? */
- .highlight .gd { color: #ff329c; background-color: #561c08; } /* Generic.Deleted & Diff Deleted */
- .highlight .gi { color: #a6e22e; background-color: #0b5858; } /* Generic.Inserted & Diff Inserted */
-}
diff --git a/_sass/colors/light-syntax.scss b/_sass/colors/light-syntax.scss
deleted file mode 100644
index e966312..0000000
--- a/_sass/colors/light-syntax.scss
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * The syntax light mode code snippet colors.
- */
-
-@mixin light-syntax {
- /* based on: */
- .highlight .hll { background-color: #ffffcc; }
- .highlight .c { color: #717165; 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: #717165; font-style: italic; } /* Comment.Multiline */
- .highlight .cp { color: #707070; font-style: italic; } /* Comment.Preproc */
- .highlight .c1 { color: #717165; font-style: italic; } /* Comment.Single */
- .highlight .cs { color: #707070; 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: #707070; } /* Generic.Heading */
- .highlight .gi { color: #005e5e; background-color: #ddffdd; } /* Generic.Inserted */
- .highlight .go { color: #707070; } /* 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: #005e5e; } /* Name.Attribute */
- .highlight .nb { color: #0078a1; } /* Name.Builtin */
- .highlight .nc { color: #445588; font-weight: bold; } /* Name.Class */
- .highlight .no { color: #005e5e; } /* 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: #005e5e; } /* 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: #707070; } /* Name.Builtin.Pseudo */
- .highlight .vc { color: #005e5e; } /* Name.Variable.Class */
- .highlight .vg { color: #005e5e; } /* Name.Variable.Global */
- .highlight .vi { color: #005e5e; } /* 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: #fcfcfc;
- --highlighter-rouge-color: #3f596f;
- --highlight-lineno-color: #959595;
- --inline-code-bg: #f6f6f7;
- --code-header-text-color: #a3a3a3;
- --code-header-muted-color: #e2e1e1;
- --code-header-icon-color: #c9c8c8;
- --clipboard-checked-color: #43c743;
- --code-snippets-color: #b01662;
-
- [class^='prompt-'] {
- --inline-code-bg: #fbfafa;
- }
-} /* light-syntax */
diff --git a/_sass/colors/syntax-dark.scss b/_sass/colors/syntax-dark.scss
new file mode 100644
index 0000000..b3a1ca5
--- /dev/null
+++ b/_sass/colors/syntax-dark.scss
@@ -0,0 +1,138 @@
+/*
+ * The syntax dark mode styles.
+ */
+
+@mixin dark-syntax {
+ --language-border-color: #2d2d2d;
+ --highlight-bg-color: #151515;
+ --highlighter-rouge-color: #ff6e4e;
+ --highlight-lineno-color: #808080;
+ --inline-code-bg: #272822;
+ --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;
+ }
+}
diff --git a/_sass/colors/syntax-light.scss b/_sass/colors/syntax-light.scss
new file mode 100644
index 0000000..605689d
--- /dev/null
+++ b/_sass/colors/syntax-light.scss
@@ -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 */
From c4af75389ae97b770bbbb938c6967fa854354589 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Sun, 3 Sep 2023 20:05:56 +0800
Subject: [PATCH 12/29] refactor: rename sass files
---
_sass/colors/{dark-typography.scss => typography-dark.scss} | 0
_sass/colors/{light-typography.scss => typography-light.scss} | 0
_sass/jekyll-theme-chirpy.scss | 4 ++--
3 files changed, 2 insertions(+), 2 deletions(-)
rename _sass/colors/{dark-typography.scss => typography-dark.scss} (100%)
rename _sass/colors/{light-typography.scss => typography-light.scss} (100%)
diff --git a/_sass/colors/dark-typography.scss b/_sass/colors/typography-dark.scss
similarity index 100%
rename from _sass/colors/dark-typography.scss
rename to _sass/colors/typography-dark.scss
diff --git a/_sass/colors/light-typography.scss b/_sass/colors/typography-light.scss
similarity index 100%
rename from _sass/colors/light-typography.scss
rename to _sass/colors/typography-light.scss
diff --git a/_sass/jekyll-theme-chirpy.scss b/_sass/jekyll-theme-chirpy.scss
index 83cf7e3..13e97e8 100644
--- a/_sass/jekyll-theme-chirpy.scss
+++ b/_sass/jekyll-theme-chirpy.scss
@@ -4,8 +4,8 @@
* MIT Licensed
*/
-@import 'colors/light-typography';
-@import 'colors/dark-typography';
+@import 'colors/typography-light';
+@import 'colors/typography-dark';
@import 'addon/variables';
@import 'variables-hook';
@import 'addon/module';
From 229c2a2e2b109fc2eca85be548f1dd97234e44c4 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Sun, 3 Sep 2023 20:20:14 +0800
Subject: [PATCH 13/29] feat(posts): render heading 4 in TOC (#1023)
---
_javascript/modules/components/toc.js | 4 ++--
_posts/2019-08-08-text-and-typography.md | 2 +-
_sass/layout/post.scss | 4 +---
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/_javascript/modules/components/toc.js b/_javascript/modules/components/toc.js
index dd46994..9f93824 100644
--- a/_javascript/modules/components/toc.js
+++ b/_javascript/modules/components/toc.js
@@ -1,11 +1,11 @@
export function toc() {
- if (document.querySelector('#core-wrapper h2,#core-wrapper h3')) {
+ if (document.querySelector('#core-wrapper h2')) {
// see: https://github.com/tscanlin/tocbot#usage
tocbot.init({
tocSelector: '#toc',
contentSelector: '.post-content',
ignoreSelector: '[data-toc-skip]',
- headingSelector: 'h2, h3',
+ headingSelector: 'h2, h3, h4',
orderedList: false,
scrollSmooth: false
});
diff --git a/_posts/2019-08-08-text-and-typography.md b/_posts/2019-08-08-text-and-typography.md
index 2770996..591dbcb 100644
--- a/_posts/2019-08-08-text-and-typography.md
+++ b/_posts/2019-08-08-text-and-typography.md
@@ -23,7 +23,7 @@ This post is to show Markdown syntax rendering on [**Chirpy**](https://github.co
H3 - heading
-H4 - heading
+H4 - heading
## Paragraph
diff --git a/_sass/layout/post.scss b/_sass/layout/post.scss
index 15ea607..615215e 100644
--- a/_sass/layout/post.scss
+++ b/_sass/layout/post.scss
@@ -314,9 +314,7 @@ h1 + .post-meta {
}
ul {
- a {
- padding-left: 2rem;
- }
+ padding-left: 0.75rem;
}
}
}
From 414b8f97ce9a4cabaa6aa2c4d4594c41ba7a8a36 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Tue, 5 Sep 2023 00:34:35 +0800
Subject: [PATCH 14/29] refactor(ui): optimize the color scheme
---
_sass/addon/commons.scss | 4 +++-
_sass/colors/syntax-dark.scss | 4 ++--
_sass/colors/typography-dark.scss | 21 +++++++++++----------
_sass/colors/typography-light.scss | 19 +++++++++++--------
4 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss
index fd2dfde..2be59c7 100644
--- a/_sass/addon/commons.scss
+++ b/_sass/addon/commons.scss
@@ -696,6 +696,7 @@ $btn-mb: 0.5rem;
width: $sidebar-width;
z-index: 99;
background: var(--sidebar-bg);
+ border-right: 1px solid var(--sidebar-border-color);
/* Hide scrollbar for Chrome, Safari and Opera */
&::-webkit-scrollbar {
@@ -835,6 +836,7 @@ $btn-mb: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
+ box-shadow: var(--sidebar-border-color) 0 0 0 1px;
&:hover {
background-color: var(--sidebar-hover-bg);
@@ -868,7 +870,7 @@ $btn-mb: 0.5rem;
@extend %no-cursor;
@include ml-mr(calc(($btn-gap - $btn-border-width) / 2));
- background-color: var(--sidebar-muted-color);
+ background-color: var(--sidebar-btn-color);
content: '';
width: $btn-border-width;
height: $btn-border-width;
diff --git a/_sass/colors/syntax-dark.scss b/_sass/colors/syntax-dark.scss
index b3a1ca5..f40c5ed 100644
--- a/_sass/colors/syntax-dark.scss
+++ b/_sass/colors/syntax-dark.scss
@@ -5,9 +5,9 @@
@mixin dark-syntax {
--language-border-color: #2d2d2d;
--highlight-bg-color: #151515;
- --highlighter-rouge-color: #ff6e4e;
+ --highlighter-rouge-color: #c9def1;
--highlight-lineno-color: #808080;
- --inline-code-bg: #272822;
+ --inline-code-bg: #323238;
--code-color: #b0b0b0;
--code-header-text-color: #6a6a6a;
--code-header-muted-color: #353535;
diff --git a/_sass/colors/typography-dark.scss b/_sass/colors/typography-dark.scss
index 715fbd9..ff55628 100644
--- a/_sass/colors/typography-dark.scss
+++ b/_sass/colors/typography-dark.scss
@@ -10,9 +10,9 @@
/* Common color */
--text-color: rgb(175, 176, 177);
- --text-muted-color: rgb(125, 136, 146);
+ --text-muted-color: #868686;
--heading-color: #cccccc;
- --label-color: #a4a4c2;
+ --label-color: #a7a7a7;
--blockquote-border-color: rgb(66, 66, 66);
--blockquote-text-color: #868686;
--link-color: rgb(138, 180, 248);
@@ -22,7 +22,7 @@
--btn-backtotop-color: var(--text-color);
--btn-backtotop-border-color: var(--btn-border-color);
--btn-box-shadow: var(--main-bg);
- --card-header-bg: rgb(48, 48, 48);
+ --card-header-bg: #292929;
--checkbox-color: rgb(118, 120, 121);
--checkbox-checked-color: var(--link-color);
--img-bg: radial-gradient(circle, rgb(22, 22, 24) 0%, rgb(32, 32, 32) 100%);
@@ -35,12 +35,13 @@
/* Sidebar */
--site-title-color: #717070;
- --site-subtitle-color: #6d6c6b;
- --sidebar-bg: radial-gradient(circle, #242424 0%, #1d1f27 100%);
- --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-hover-bg: rgb(54, 54, 54, 0.33);
- --sidebar-btn-bg: rgb(84, 83, 83, 0.3);
+ --sidebar-hover-bg: #262626;
+ --sidebar-btn-bg: #232328;
--sidebar-btn-color: #787878;
--avatar-border-color: rgb(206, 206, 206, 0.9);
@@ -61,7 +62,7 @@
/* Posts */
--toc-highlight: rgb(116, 178, 243);
--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-border-color: var(--tb-odd-bg);
--footnote-target-bg: rgb(63, 81, 181);
@@ -87,8 +88,8 @@
/* tags */
--tag-border: rgb(59, 79, 88);
--tag-shadow: rgb(32, 33, 33);
- --search-tag-bg: var(--tag-bg);
--dash-color: rgb(63, 65, 68);
+ --search-tag-bg: #292828;
/* categories */
--categories-border: rgb(64, 66, 69, 0.5);
diff --git a/_sass/colors/typography-light.scss b/_sass/colors/typography-light.scss
index 07c31db..f0cd983 100644
--- a/_sass/colors/typography-light.scss
+++ b/_sass/colors/typography-light.scss
@@ -11,11 +11,11 @@
/* Common color */
--text-color: #34343c;
--text-muted-color: #757575;
- --heading-color: black;
- --label-color: #4d4d5b;
+ --heading-color: #2a2a2a;
+ --label-color: #585858;
--blockquote-border-color: #eeeeee;
--blockquote-text-color: #757575;
- --link-color: #0153ab;
+ --link-color: #0056b2;
--link-underline-color: #dee2e6;
--button-bg: #ffffff;
--btn-border-color: #e9ecef;
@@ -40,6 +40,7 @@
--site-title-color: rgb(113, 113, 113);
--site-subtitle-color: #717171;
--sidebar-bg: #f6f8fa;
+ --sidebar-border-color: #efefef;
--sidebar-muted-color: #545454;
--sidebar-active-color: #1d1d1d;
--sidebar-hover-bg: rgb(223, 233, 241, 0.64);
@@ -51,7 +52,6 @@
--topbar-bg: rgb(255, 255, 255, 0.7);
--topbar-text-color: rgb(78, 78, 78);
--search-wrapper-border-color: rgb(240, 240, 240);
- --search-tag-bg: #f8f9fa;
--search-icon-color: #c2c6cc;
--input-focus-border-color: #b8b8b8;
@@ -63,16 +63,13 @@
--btn-text-color: #676666;
/* Posts */
- --toc-highlight: #47566c;
+ --toc-highlight: #0550ae;
--btn-share-hover-color: var(--link-color);
--card-bg: white;
--card-hovor-bg: #e2e2e2;
--card-shadow: rgb(104, 104, 104, 0.05) 0 2px 6px 0,
rgba(211, 209, 209, 0.15) 0 0 0 1px;
--footnote-target-bg: lightcyan;
- --tag-border: #dee2e6;
- --tag-shadow: var(--btn-border-color);
- --tag-hover: rgb(222, 226, 230);
--tb-odd-bg: #fbfcfd;
--tb-border-color: #eaeaea;
--dash-color: silver;
@@ -89,6 +86,12 @@
--prompt-danger-bg: rgb(248, 215, 218, 0.56);
--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-'] {
--link-underline-color: rgb(219, 216, 216);
}
From 62bcd601fcadc602c81672b1d4b937231396c3c0 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Wed, 6 Sep 2023 00:13:10 +0800
Subject: [PATCH 15/29] feat(ui): redesign the pagination button on home page
---
_includes/post-paginator.html | 162 +++++++++++++++--------------
_sass/addon/commons.scss | 2 +-
_sass/colors/typography-dark.scss | 10 +-
_sass/colors/typography-light.scss | 2 -
_sass/layout/home.scss | 43 +++-----
5 files changed, 103 insertions(+), 116 deletions(-)
diff --git a/_includes/post-paginator.html b/_includes/post-paginator.html
index 668b49f..c74e978 100644
--- a/_includes/post-paginator.html
+++ b/_includes/post-paginator.html
@@ -1,89 +1,91 @@
-
+
diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss
index 2be59c7..2a67dd1 100644
--- a/_sass/addon/commons.scss
+++ b/_sass/addon/commons.scss
@@ -604,7 +604,7 @@ i {
}
.btn-box-shadow {
- box-shadow: 0 0 8px 0 var(--btn-box-shadow) !important;
+ box-shadow: var(--card-shadow);
}
/* overwrite bootstrap muted */
diff --git a/_sass/colors/typography-dark.scss b/_sass/colors/typography-dark.scss
index ff55628..f43f17c 100644
--- a/_sass/colors/typography-dark.scss
+++ b/_sass/colors/typography-dark.scss
@@ -17,10 +17,10 @@
--blockquote-text-color: #868686;
--link-color: rgb(138, 180, 248);
--link-underline-color: rgb(82, 108, 150);
- --button-bg: rgb(39, 40, 43);
- --btn-border-color: rgb(63, 65, 68);
+ --button-bg: #1e1e1e;
+ --btn-border-color: #2e2f31;
--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);
--card-header-bg: #292929;
--checkbox-color: rgb(118, 120, 121);
@@ -55,9 +55,7 @@
/* Home page */
--post-list-text-color: rgb(175, 176, 177);
--btn-patinator-text-color: var(--text-color);
- --btn-paginator-hover-color: rgb(64, 65, 66);
- --btn-paginator-border-color: var(--btn-border-color);
- --btn-text-color: var(--text-color);
+ --btn-paginator-hover-color: #2e2e2e;
/* Posts */
--toc-highlight: rgb(116, 178, 243);
diff --git a/_sass/colors/typography-light.scss b/_sass/colors/typography-light.scss
index f0cd983..f7037a0 100644
--- a/_sass/colors/typography-light.scss
+++ b/_sass/colors/typography-light.scss
@@ -59,8 +59,6 @@
--post-list-text-color: dimgray;
--btn-patinator-text-color: #555555;
--btn-paginator-hover-color: var(--sidebar-bg);
- --btn-paginator-border-color: var(--sidebar-bg);
- --btn-text-color: #676666;
/* Posts */
--toc-highlight: #0550ae;
diff --git a/_sass/layout/home.scss b/_sass/layout/home.scss
index 499de47..bca2ca4 100644
--- a/_sass/layout/home.scss
+++ b/_sass/layout/home.scss
@@ -89,8 +89,9 @@
} /* #post-list */
.pagination {
- color: var(--btn-patinator-text-color);
+ color: var(--text-color);
font-family: Lato, sans-serif;
+ justify-content: space-evenly;
a:hover {
text-decoration: none;
@@ -98,26 +99,27 @@
.page-item {
.page-link {
- color: inherit;
- width: 2.5rem;
- height: 2.5rem;
- padding: 0;
+ color: var(--btn-patinator-text-color);
+ padding: 0 0.6rem;
display: -webkit-box;
-webkit-box-pack: center;
-webkit-box-align: center;
- border-radius: 50%;
- border: 1px solid var(--btn-paginator-border-color);
- background-color: var(--button-bg);
-
- &:hover {
- background-color: var(--btn-paginator-hover-color);
- }
+ border-radius: 0.5rem;
+ border: 0;
+ background-color: inherit;
}
&.active {
.page-link {
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 +128,8 @@
.page-link {
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 */
} /* .pagination */
@@ -175,8 +170,6 @@
/* Hide SideBar and TOC */
@media all and (max-width: 830px) {
.pagination {
- justify-content: space-evenly;
-
.page-item {
&:not(:first-child):not(:last-child) {
display: none;
@@ -193,16 +186,12 @@
.pagination {
font-size: 0.85rem;
+ justify-content: center;
.page-item {
&:not(:last-child) {
margin-right: 0.7rem;
}
-
- .page-link {
- width: 2rem;
- height: 2rem;
- }
}
.page-index {
From 41b8f9f519e5f5f69e9a123b38b06bade2271a82 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Thu, 7 Sep 2023 01:58:03 +0800
Subject: [PATCH 16/29] feat(layout): center the footer
---
_includes/footer.html | 57 ++++++++++-----------
_includes/related-posts.html | 2 +-
_layouts/default.html | 2 -
_layouts/home.html | 2 +-
_layouts/page.html | 32 ++++++------
_sass/addon/commons.scss | 97 +++++++-----------------------------
_sass/addon/syntax.scss | 2 +-
_sass/addon/variables.scss | 17 ++++---
_sass/layout/home.scss | 7 ---
9 files changed, 77 insertions(+), 141 deletions(-)
diff --git a/_includes/footer.html b/_includes/footer.html
index 3b36c4a..25ea771 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -1,34 +1,35 @@
-
diff --git a/_includes/related-posts.html b/_includes/related-posts.html
index e1876be..18069c3 100644
--- a/_includes/related-posts.html
+++ b/_includes/related-posts.html
@@ -70,7 +70,7 @@
{% if relate_posts.size > 0 %}
-
+
{{ site.data.locales[include.lang].post.relate_posts }}
diff --git a/_layouts/default.html b/_layouts/default.html
index 0047570..477a40d 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -30,8 +30,6 @@ layout: compress
- {% include_cached footer.html lang=lang %}
-