mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-19 06:06:54 +00:00
Compare commits
219 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a33b2d78b0 | ||
|
|
1280f89217 | ||
|
|
83bfd32807 | ||
|
|
4ea320b250 | ||
|
|
8909438267 | ||
|
|
9482249999 | ||
|
|
43d4036941 | ||
|
|
a410600205 | ||
|
|
864119e3cc | ||
|
|
4702244ae8 | ||
|
|
b985965bc9 | ||
|
|
a5b002b2d8 | ||
|
|
270d3ba499 | ||
|
|
1f2ed3db60 | ||
|
|
08354cc4f5 | ||
|
|
ea56a900a0 | ||
|
|
8fa1f3b497 | ||
|
|
10bc44367a | ||
|
|
1889b6b4e0 | ||
|
|
aac29d43e5 | ||
|
|
c340199191 | ||
|
|
c7241ba611 | ||
|
|
d7f351b143 | ||
|
|
62aef9f850 | ||
|
|
7d128769f6 | ||
|
|
8d4c1deb15 | ||
|
|
57a4bfdb82 | ||
|
|
5741aa4e18 | ||
|
|
ad5b614304 | ||
|
|
4f1735aad6 | ||
|
|
38b87cfdd7 | ||
|
|
bf8996fb8b | ||
|
|
2bd99ffd33 | ||
|
|
46a8efb38a | ||
|
|
b9fb716e6a | ||
|
|
154fb04987 | ||
|
|
a95d6d7101 | ||
|
|
c98fd19900 | ||
|
|
3c2675c4a1 | ||
|
|
db5a58638d | ||
|
|
2a2bc1ee65 | ||
|
|
e806a8556b | ||
|
|
049b486f82 | ||
|
|
8f11f91677 | ||
|
|
d314c02a13 | ||
|
|
ea5b6cf1f6 | ||
|
|
cb908bbb2b | ||
|
|
c221a3e0bc | ||
|
|
ddc1149fb5 | ||
|
|
944d0ad724 | ||
|
|
67d962d707 | ||
|
|
04ad7bf432 | ||
|
|
a0f80debb1 | ||
|
|
f932cf0d00 | ||
|
|
8484a34195 | ||
|
|
2cf5a58adf | ||
|
|
6f7ca13507 | ||
|
|
766e597a3b | ||
|
|
d0d1e02763 | ||
|
|
643c8177be | ||
|
|
092ab5bbdb | ||
|
|
e47f73f772 | ||
|
|
2d8854ba74 | ||
|
|
36fab37225 | ||
|
|
13abcd5958 | ||
|
|
9dcab7ac1f | ||
|
|
d78f034f5d | ||
|
|
c473771af4 | ||
|
|
252e33b502 | ||
|
|
232dd36b78 | ||
|
|
2d7df50774 | ||
|
|
31656e8cda | ||
|
|
e96f9051c0 | ||
|
|
cb461df071 | ||
|
|
e439e65258 | ||
|
|
3a449672cb | ||
|
|
7bb861b573 | ||
|
|
f0b4e30363 | ||
|
|
717a501c36 | ||
|
|
3ddf5047b5 | ||
|
|
31ac709e04 | ||
|
|
a1b2c71b89 | ||
|
|
e9c29aa1b5 | ||
|
|
f947c3f3d3 | ||
|
|
78e8ffd7ba | ||
|
|
60a8a2fa41 | ||
|
|
9e14673349 | ||
|
|
10ab9d3364 | ||
|
|
038bccb3ca | ||
|
|
9b35380849 | ||
|
|
a8f8bbaa1c | ||
|
|
188d8ffc69 | ||
|
|
0809e2b132 | ||
|
|
ab0adc36cf | ||
|
|
d4397dff08 | ||
|
|
db06610fd6 | ||
|
|
c242cf8455 | ||
|
|
ad7d8ac1c9 | ||
|
|
adff74b27b | ||
|
|
1c3c22bb68 | ||
|
|
628d4de095 | ||
|
|
48b3df2ea7 | ||
|
|
3b0cf90f5c | ||
|
|
544f72efff | ||
|
|
112091cbf6 | ||
|
|
b04bb847b1 | ||
|
|
a71bade6eb | ||
|
|
6ef97f1fad | ||
|
|
4675d42f90 | ||
|
|
a624b9a472 | ||
|
|
ad48a9ab06 | ||
|
|
18bd1a91ef | ||
|
|
4cff8879ac | ||
|
|
4dd4915bed | ||
|
|
a227ae386d | ||
|
|
32bd36f016 | ||
|
|
aa23becd14 | ||
|
|
b2f0b4cb1b | ||
|
|
209058b84a | ||
|
|
562fcd4fd8 | ||
|
|
22115f3797 | ||
|
|
9f3619e54a | ||
|
|
5b0aaa5403 | ||
|
|
733bb0fbfa | ||
|
|
0d47beba97 | ||
|
|
c0ba181246 | ||
|
|
313c44f238 | ||
|
|
46c2cfe64e | ||
|
|
cc4f18a5a2 | ||
|
|
4491c82b02 | ||
|
|
b9b8dd8cf1 | ||
|
|
9a1eab2635 | ||
|
|
30b013f354 | ||
|
|
4d4e9a063e | ||
|
|
afccb144b1 | ||
|
|
e87ef0d40e | ||
|
|
42e0617bde | ||
|
|
edeb08aa28 | ||
|
|
b0a35de9c6 | ||
|
|
b3e6fc56f7 | ||
|
|
618ae9dcbc | ||
|
|
47e5c3a917 | ||
|
|
f9706411e7 | ||
|
|
b22da94134 | ||
|
|
4476a7d755 | ||
|
|
ea4cd78921 | ||
|
|
752d0330b7 | ||
|
|
fbbd387402 | ||
|
|
bec344f6e9 | ||
|
|
ba47cc0509 | ||
|
|
34d54f9349 | ||
|
|
d1963af964 | ||
|
|
eff2a24f4c | ||
|
|
3caafbd50d | ||
|
|
cb37a1909d | ||
|
|
88eac91909 | ||
|
|
0bb9c47cf9 | ||
|
|
b28724b4d4 | ||
|
|
75c57d1725 | ||
|
|
032f5c7f83 | ||
|
|
75e462a9e9 | ||
|
|
ef3860004e | ||
|
|
032706d27f | ||
|
|
02a269910f | ||
|
|
abdf73fff4 | ||
|
|
be1d1554ea | ||
|
|
a2deea6537 | ||
|
|
1a2767ca24 | ||
|
|
cfb67a1cb9 | ||
|
|
171faafc67 | ||
|
|
db5eb0a18a | ||
|
|
582ea30459 | ||
|
|
064cefd9ff | ||
|
|
a57baf7e2c | ||
|
|
473ab64f74 | ||
|
|
c5783c1289 | ||
|
|
a64d00c1e6 | ||
|
|
7382eaa953 | ||
|
|
bcd394598b | ||
|
|
6d38f643ae | ||
|
|
532e7ad451 | ||
|
|
08d4ce77e2 | ||
|
|
8a46286373 | ||
|
|
8db0e2d238 | ||
|
|
0f5c2b5c9d | ||
|
|
d8e45694bd | ||
|
|
b64598358d | ||
|
|
ac9dc4d9ac | ||
|
|
3f843f010a | ||
|
|
9c3d3fdeed | ||
|
|
8c4b186c52 | ||
|
|
2cc399d015 | ||
|
|
f3295c6d0c | ||
|
|
4685bba313 | ||
|
|
b543f3e19b | ||
|
|
e561dfb9be | ||
|
|
7b3e0f741a | ||
|
|
7cea137bf4 | ||
|
|
8c21272048 | ||
|
|
078dab0299 | ||
|
|
f6d9ea10e2 | ||
|
|
d8a5ed194b | ||
|
|
6f42bbc6e5 | ||
|
|
74921c6570 | ||
|
|
5b27222b86 | ||
|
|
648b199be8 | ||
|
|
ae2b464492 | ||
|
|
1209879bed | ||
|
|
99aadd61c1 | ||
|
|
b30d673367 | ||
|
|
b393e12e30 | ||
|
|
3e8dc979c6 | ||
|
|
00928c90b7 | ||
|
|
caf8dec568 | ||
|
|
2423dbc726 | ||
|
|
23784b3295 | ||
|
|
4e4e71dff2 | ||
|
|
456f04112c | ||
|
|
af6f6a2812 |
11
.editorconfig
Normal file
11
.editorconfig
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
# 2 space indentation
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
# Unix-style newlines with a newline ending every file
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
73
.github/CODE_OF_CONDUCT.md
vendored
Normal file
73
.github/CODE_OF_CONDUCT.md
vendored
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at `cotes.chung@gmail.com`. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
<https://www.contributor-covenant.org/faq>
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
18
.github/CONTRIBUTING.md
vendored
18
.github/CONTRIBUTING.md
vendored
@@ -2,20 +2,14 @@
|
|||||||
|
|
||||||
I want to thank you for sparing a time to improve this project! Here are some guidelines for contributing:
|
I want to thank you for sparing a time to improve this project! Here are some guidelines for contributing:
|
||||||
|
|
||||||
## Bug Reporting
|
To ensure that the blog design is not confused, 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`](https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md) issue to discuss whether your idea fits the project.
|
||||||
|
|
||||||
If you found a bug, please ensure it doesn't appear in other existing [issues](https://github.com/cotes2020/jekyll-theme-chirpy/issues). After that, [create a new issues](https://github.com/cotes2020/jekyll-theme-chirpy/issues/new/choose) with template `Bug Report` and follow it's illustration to describe the situation.
|
Generally, contribute to the project by:
|
||||||
|
|
||||||
|
|
||||||
## Code Optimization
|
|
||||||
|
|
||||||
If you are willing to improve some of the existing code, such as performance optimization, code simplification, or even correct spelling errors of variable names, please submit a new PR to help us.
|
|
||||||
|
|
||||||
|
|
||||||
## Feature Request
|
|
||||||
|
|
||||||
Basically, to ensure that the blog design is not confused, we do not accept suggestions for design changes, such as colors scheme, fonts, typography, etc. As long as your request is not a design issue, it is recommended to first submit a `Feature Request` issue to discuss whether your idea fits the project. Once the discussion is complete and the request is approved, fork this project, complete the development of new features, and submit a `Pull Request`. What's more, the PR should be merged into `master` branch without conflict.
|
|
||||||
|
|
||||||
|
1. Fork this project on GitHub and clone it locally.
|
||||||
|
2. Create a new branch from `master` and give it a descriptive name (e.g., `my-new-feature`, `fix-a-bug`).
|
||||||
|
3. After completing the development, commit and push to remote.
|
||||||
|
4. Submit a new pull request.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
46
.github/ISSUE_TEMPLATE/bug_report.md
vendored
46
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -4,36 +4,52 @@ about: Create a report to help us improve
|
|||||||
labels: bug
|
labels: bug
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Please make sure you have read the README or Wiki, and your question does not appear in other existing issues (including closed ones). Thanks for your cooperation! Now let's start it. -->
|
<!-- NOTE: Please maintain all sections, otherwise the issue will be automatically closed :) -->
|
||||||
|
|
||||||
**Describe the bug**
|
## Checklist
|
||||||
|
<!-- Please complete the following list of tasks, and then check it by change the "[ ]" to "[x]" -->
|
||||||
|
- [ ] I have read the [tutorials](https://chirpy.cotes.info/categories/tutorial/) and know the correct effect of the functional design.
|
||||||
|
- [ ] There are no similar reports on existing issues (including closed ones).
|
||||||
|
- [ ] I found the bug on the latest code of `master` branch.
|
||||||
|
|
||||||
|
## Describe the bug
|
||||||
<!-- A clear and concise description of what the bug is. -->
|
<!-- A clear and concise description of what the bug is. -->
|
||||||
|
|
||||||
**To Reproduce**
|
### To Reproduce
|
||||||
<!--
|
|
||||||
Steps to reproduce the behavior:
|
Steps to reproduce the behavior:
|
||||||
|
<!--
|
||||||
1. Go to '...'
|
1. Go to '...'
|
||||||
2. Click on '....'
|
2. Click on '....'
|
||||||
3. Scroll down to '....'
|
3. Scroll down to '....'
|
||||||
4. See error
|
4. See error
|
||||||
-->
|
-->
|
||||||
|
|
||||||
**Expected behavior**
|
### Expected behavior
|
||||||
<!-- A clear and concise description of what you expected to happen. -->
|
<!-- A clear and concise description of what you expected to happen. -->
|
||||||
|
|
||||||
**Screenshots**
|
### Screenshots
|
||||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
### Software
|
||||||
- OS: [e.g. iOS]
|
<!-- Please complete the following information -->
|
||||||
- Browser: [e.g. chrome, safari]
|
- Ruby version: <!-- by running: `ruby -v` -->
|
||||||
- Version: [e.g. 22]
|
- Gem version: <!-- by running: `gem -v`-->
|
||||||
|
- Bundler version: <!-- by running: `bundle -v`-->
|
||||||
|
- Jekyll version: <!-- by running: `bundle list | grep " jekyll "` -->
|
||||||
|
|
||||||
**Smartphone (please complete the following information):**
|
### Desktop
|
||||||
|
<!-- If necessary, uncomment and fill in the following list:
|
||||||
|
- OS: [e.g. macOS 10.15.6]
|
||||||
|
- Browser: [e.g. Chrome 85.0.4183.83 (64-bit)]
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Smartphone
|
||||||
|
<!-- If necessary, uncomment and fill in the following list:
|
||||||
- Device: [e.g. iPhone 6]
|
- Device: [e.g. iPhone 6]
|
||||||
- OS: [e.g. iOS8.1]
|
- OS: [e.g. iOS 13.6.1]
|
||||||
- Browser: [e.g. stock browser, safari]
|
- Browser: [e.g. Chrome 22]
|
||||||
- Version: [e.g. 22]
|
-->
|
||||||
|
|
||||||
**Additional context**
|
### Additional context
|
||||||
<!-- Add any other context about the problem here. -->
|
<!-- Add any other context about the problem here. -->
|
||||||
|
|||||||
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -4,18 +4,27 @@ about: Suggest an idea for this project
|
|||||||
labels: enhancement
|
labels: enhancement
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Please make sure your request does not appear in other existing issues (including closed ones). Thanks for your cooperation. Now, I can't wait to listen your idea! -->
|
<!-- NOTE: Please maintain all sections, otherwise the issue will be automatically closed :) -->
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
<!-- Please complete the following list of tasks, and then check it by change the "[ ]" to "[x]" -->
|
||||||
|
- [ ] I have read the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md).
|
||||||
|
- [ ] There are no similar request on existing issues (including closed ones).
|
||||||
|
- [ ] I have read the [project progress](https://github.com/cotes2020/jekyll-theme-chirpy/projects) and know the current progress of the project.
|
||||||
|
- [ ] I was in the `master` branch of the latest code.
|
||||||
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
## Is your feature request related to a problem? Please describe
|
||||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
|
## Describe the solution you'd like
|
||||||
<!-- A clear and concise description of what you want to happen. -->
|
<!-- A clear and concise description of what you want to happen. -->
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
|
## Describe alternatives you've considered
|
||||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||||
|
|
||||||
|
|
||||||
**Additional context**
|
## Additional context
|
||||||
<!-- Add any other context or screenshots about the feature request here. -->
|
<!-- Add any other context or screenshots about the feature request here. -->
|
||||||
|
|||||||
56
.github/ISSUE_TEMPLATE/question.md
vendored
56
.github/ISSUE_TEMPLATE/question.md
vendored
@@ -4,54 +4,16 @@ about: Ask what ever you want
|
|||||||
labels: question
|
labels: question
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Please make sure you have read the README or Wiki, and your question does not appear in other existing issues (including closed ones). Thanks for your cooperation. Now, uncomment the relevant part to describe the situation. -->
|
<!-- NOTE: Please maintain all sections, otherwise the issue will be automatically closed :) -->
|
||||||
|
|
||||||
<!--
|
## Checklist
|
||||||
**Don't understand what the README or Wiki says.**
|
|
||||||
Point out the parts that are hard for you to understand.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
<!-- Please complete the following list of tasks, and then check it by change the "[ ]" to "[x]" -->
|
||||||
**Want to complain about my bad days.**
|
|
||||||
Don't hesitate to share your story!
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
- [ ] I have read the [tutorials](https://chirpy.cotes.info/categories/tutorial/) and know the correct effect of the functional design.
|
||||||
**Just wanted to say hi to the author.**
|
- [ ] There are no similar question on existing issues (including closed ones).
|
||||||
Hi, I'm ..., have a nice day !
|
- [ ] I searched the Internet for related problems, but still couldn't solve it.
|
||||||
-->
|
- [ ] My question is based on the latest code of `master` branch.
|
||||||
|
|
||||||
|
## Description
|
||||||
<!--
|
<!-- Please describe your question in detial. -->
|
||||||
**Not sure if it's a bug**
|
|
||||||
Please try to describe the problem
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
|
||||||
- OS: [e.g. iOS]
|
|
||||||
- Browser: [e.g. chrome, safari]
|
|
||||||
- Version: [e.g. 22]
|
|
||||||
|
|
||||||
**Smartphone (please complete the following information):**
|
|
||||||
- Device: [e.g. iPhone6]
|
|
||||||
- OS: [e.g. iOS8.1]
|
|
||||||
- Browser: [e.g. stock browser, safari]
|
|
||||||
- Version: [e.g. 22]
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
||||||
-->
|
|
||||||
|
|||||||
44
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
44
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
## Description
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
|
||||||
|
-->
|
||||||
|
|
||||||
|
e.g. Fixes #(issue)
|
||||||
|
|
||||||
|
## Type of change
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please select the desired item checkbox and change it to "[x]", then delete options that are not relevant.
|
||||||
|
-->
|
||||||
|
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||||
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||||
|
- [ ] Documentation update
|
||||||
|
|
||||||
|
## How has this been tested
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
|
||||||
|
-->
|
||||||
|
|
||||||
|
- [ ] I have run `bash ./tools/test.sh --build` (at the root of the project) locally and passed
|
||||||
|
- [ ] I have tested this feature in the browser
|
||||||
|
|
||||||
|
### Test Configuration
|
||||||
|
|
||||||
|
- Browerser type & version:
|
||||||
|
- Operating system:
|
||||||
|
- Bundler version:
|
||||||
|
- Ruby version:
|
||||||
|
- Jekyll version:
|
||||||
|
|
||||||
|
### Checklist
|
||||||
|
<!-- Select checkboxes by change the "[ ]" to "[x]" -->
|
||||||
|
- [ ] My code follows the [Google style guidelines](https://google.github.io/styleguide/)
|
||||||
|
- [ ] I have performed a self-review of my own code
|
||||||
|
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||||
|
- [ ] I have made corresponding changes to the documentation
|
||||||
|
- [ ] My changes generate no new warnings
|
||||||
|
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||||
|
- [ ] Any dependent changes have been merged and published in downstream modules
|
||||||
71
.github/workflows/ci.yml
vendored
71
.github/workflows/ci.yml
vendored
@@ -1,13 +1,13 @@
|
|||||||
name: build
|
name: 'Continuous Integration'
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- stable
|
- 'production'
|
||||||
tags-ignore:
|
tags-ignore:
|
||||||
- '*'
|
- '*'
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
- '!.github/workflows/**'
|
- '!.github/workflows/ci.yml'
|
||||||
- '.travis.yml'
|
- '.travis.yml'
|
||||||
- '.gitignore'
|
- '.gitignore'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
@@ -15,7 +15,7 @@ on:
|
|||||||
- 'LICENSE'
|
- 'LICENSE'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
- '**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
@@ -24,67 +24,38 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
|
||||||
|
env:
|
||||||
|
GEMS_PATH: ~/vendor/bundle
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: '2.6.x'
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: '3.7.x'
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # for posts's lastmod
|
||||||
|
|
||||||
|
- name: Setup Ruby
|
||||||
|
uses: actions/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6.x
|
||||||
|
|
||||||
- name: Bundle Caching
|
- name: Bundle Caching
|
||||||
id: bundle-cache
|
uses: actions/cache@v2
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: ${{ env.GEMS_PATH }}
|
||||||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gems-
|
${{ runner.os }}-gems-
|
||||||
|
|
||||||
- id: get-pip-cache-path
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=path::`pip show pip | grep "Location" | awk '{print $2}'`"
|
|
||||||
|
|
||||||
- name: Pip caching
|
|
||||||
id: pip-cache
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ${{ steps.get-pip-cache-path.outputs.path }}
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Install gnu-coreutils for macOS
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: |
|
|
||||||
brew install coreutils
|
|
||||||
|
|
||||||
- name: Bundle config
|
|
||||||
run: |
|
|
||||||
bundle config path vendor/bundle
|
|
||||||
|
|
||||||
- name: Bundle Install
|
- name: Bundle Install
|
||||||
if: steps.bundle-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
bundle install
|
bundle config path ${{ env.GEMS_PATH }}
|
||||||
|
bundle install --jobs 4 --retry 3
|
||||||
- name: Bundle Install locally
|
|
||||||
if: steps.bundle-cache.outputs.cache-hit == 'true'
|
|
||||||
run: |
|
|
||||||
bundle install --local
|
|
||||||
|
|
||||||
- name: Pip installing
|
|
||||||
if: steps.pip-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
pip install -r _scripts/py/requirements.txt
|
|
||||||
|
|
||||||
- name: Build Site
|
- name: Build Site
|
||||||
|
env:
|
||||||
|
JEKYLL_ENV: production
|
||||||
run: |
|
run: |
|
||||||
bash tools/build.sh
|
bundle exec jekyll b
|
||||||
|
|
||||||
- name: Test Site
|
- name: Test Site
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
24
.github/workflows/issues-cleaner.yml
vendored
Normal file
24
.github/workflows/issues-cleaner.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: "Close stale issues"
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- env:
|
||||||
|
DAYS_TO_STALE: ${{ 5 }}
|
||||||
|
DAYS_TO_CLOSE: ${{ 2 }}
|
||||||
|
uses: actions/stale@v3
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GH_PAT }}
|
||||||
|
stale-issue-message: 'This issue is stale because it has been open ${{ env.DAYS_TO_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.DAYS_TO_CLOSE }} days'
|
||||||
|
stale-issue-label: 'stale'
|
||||||
|
exempt-issue-labels: 'pending, in progress'
|
||||||
|
stale-pr-message: 'This PR is stale because it has been open ${{ env.DAYS_TO_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.DAYS_TO_CLOSE }} days'
|
||||||
|
stale-pr-label: 'stale'
|
||||||
|
exempt-pr-labels: 'pending, in progress'
|
||||||
|
days-before-stale: ${{ env.DAYS_TO_STALE }}
|
||||||
|
days-before-close: ${{ env.DAYS_TO_CLOSE }}
|
||||||
|
# debug-only: true
|
||||||
18
.github/workflows/issues-filter.yml
vendored
Normal file
18
.github/workflows/issues-filter.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: "Close Irregular Issues"
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto_close_issues:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Automatically close issues that don't follow the issue template
|
||||||
|
uses: lucasbento/auto-close-issues@v1.0.2
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GH_PAT }}
|
||||||
|
issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template. \n> Follow the template to edit this issue and it will automatically reopen."
|
||||||
|
closed-issues-label: "🙁 Not following issue template"
|
||||||
71
.github/workflows/pages-deploy.yml.hook
vendored
Normal file
71
.github/workflows/pages-deploy.yml.hook
vendored
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
name: 'Automatic build'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- .gitignore
|
||||||
|
- README.md
|
||||||
|
- LICENSE
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
continuous-delivery:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
GEMS_PATH: ~/vendor/bundle
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # for posts's lastmod
|
||||||
|
|
||||||
|
- name: Setup Ruby
|
||||||
|
uses: actions/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6.x
|
||||||
|
|
||||||
|
- name: Bundle Caching
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.GEMS_PATH }}
|
||||||
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gems-
|
||||||
|
|
||||||
|
- name: Bundle Install
|
||||||
|
run: |
|
||||||
|
bundle config path ${{ env.GEMS_PATH }}
|
||||||
|
bundle install --jobs 4 --retry 3
|
||||||
|
|
||||||
|
- name: Check baseurl
|
||||||
|
run: |
|
||||||
|
baseurl="$(grep '^baseurl:' _config.yml | sed "s/.*: *//;s/['\"]//g;s/#.*//")"
|
||||||
|
if [[ -n $baseurl ]]; then
|
||||||
|
echo "SPEC_TEST=_site_no_baseurl" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build Site
|
||||||
|
env:
|
||||||
|
JEKYLL_ENV: production
|
||||||
|
run: |
|
||||||
|
bundle exec jekyll b
|
||||||
|
|
||||||
|
if [[ -n $SPEC_TEST ]]; then
|
||||||
|
# Bypass the defects of htmlproofer
|
||||||
|
bundle exec jekyll b -b "" -d "$SPEC_TEST"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Test Site
|
||||||
|
run: |
|
||||||
|
if [[ -n $SPEC_TEST ]]; then
|
||||||
|
bash tools/test.sh -d "$SPEC_TEST"
|
||||||
|
else
|
||||||
|
bash tools/test.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
bash tools/deploy.sh
|
||||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -1,17 +1,8 @@
|
|||||||
# hidden files
|
# hidden files
|
||||||
.*
|
.*
|
||||||
|
!.github
|
||||||
|
|
||||||
# python compiled files
|
# jekyll cache
|
||||||
*.pyc
|
|
||||||
|
|
||||||
# jekyll debug
|
|
||||||
_site
|
_site
|
||||||
|
|
||||||
# Jeykll Gemfile.lock
|
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
|
||||||
# yui-compressor
|
|
||||||
*.jar
|
|
||||||
|
|
||||||
# bundle cache
|
|
||||||
vendor
|
vendor
|
||||||
|
|||||||
14
.travis.yml
14
.travis.yml
@@ -5,11 +5,10 @@ language: ruby
|
|||||||
rvm: 2.6.5
|
rvm: 2.6.5
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- pyenv global 3.7.6
|
- bundle config path 'vendor/bundle'
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install -r _scripts/py/requirements.txt
|
- bundle install --quiet
|
||||||
- bundle install --path vendor/bundle --quiet
|
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@@ -17,14 +16,11 @@ addons:
|
|||||||
- libcurl4-openssl-dev # required to avoid SSL error (for htmlproofer)
|
- libcurl4-openssl-dev # required to avoid SSL error (for htmlproofer)
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- >-
|
- git -C "$HOME" clone "$BUILDER_REPO" --depth=1 -q
|
||||||
git clone https://${GH_PAT}@github.com/${GH_USER}/${BUILDER_REPO}.git
|
- eval "$BUILD_CMD"
|
||||||
${HOME}/${BUILDER_REPO} --depth=1 -q
|
|
||||||
- cp -r ${HOME}/${BUILDER_REPO}/framework/* .
|
|
||||||
- bash _cibuild.sh
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only: stable
|
only: production
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: false # for posts lastmod
|
depth: false # for posts lastmod
|
||||||
|
|||||||
19
Gemfile
19
Gemfile
@@ -1,17 +1,26 @@
|
|||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "jekyll", ">=3.8.6"
|
gem "jekyll", ">= 3.8.6", "< 5.0"
|
||||||
|
|
||||||
# Official Plugins
|
# plugins
|
||||||
group :jekyll_plugins do
|
group :jekyll_plugins do
|
||||||
gem "jekyll-paginate"
|
gem "jekyll-paginate"
|
||||||
gem "jekyll-redirect-from"
|
gem "jekyll-redirect-from"
|
||||||
gem "jekyll-seo-tag", "~> 2.6.1"
|
gem "jekyll-seo-tag", "~> 2.6.1"
|
||||||
|
gem "jekyll-archives"
|
||||||
|
gem "jekyll-sitemap"
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem "html-proofer"
|
gem "html-proofer", "~> 3.16.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Windows 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
|
||||||
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
# and associated library.
|
||||||
|
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
|
||||||
|
gem "tzinfo", "~> 1.2"
|
||||||
|
gem "tzinfo-data"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Performance-booster for watching directories on Windows
|
||||||
|
gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform?
|
||||||
|
|||||||
302
README.md
302
README.md
@@ -1,247 +1,171 @@
|
|||||||
# Jekyll Theme Chirpy
|
# Chirpy
|
||||||
|
|
||||||
[](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=event%3Apush)
|
|
||||||
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
|
||||||
[](https://996.icu)
|
|
||||||
|
|
||||||
Language: English | [简体中文](docs/README_zh-CN.md)
|
Language: English | [简体中文](docs/README_zh-CN.md)
|
||||||
|
|
||||||
A minimal, portfolio, sidebar, bootstrap Jekyll theme with responsive web design and focuses on text exhibition. It will help you easily record and share your knowledge.
|
[](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
|
||||||
|
[](https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard)
|
||||||
|
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
||||||
|
[](https://996.icu)
|
||||||
|
|
||||||
**Features**
|
A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation. Designed to help you record and share your knowledge easily. [Live Demo »](https://chirpy.cotes.info)
|
||||||
|
|
||||||
* Auto Dark Mode
|
[](https://chirpy.cotes.info)
|
||||||
* Posts' Last Modified Date
|
|
||||||
* Table of Contents
|
|
||||||
* Automatically Recommend Related Posts
|
|
||||||
* Syntax highlighting
|
|
||||||
* Two Level Categories
|
|
||||||
* Search
|
|
||||||
* Atom Feeds
|
|
||||||
* Disqus Comments
|
|
||||||
* Google Analytics
|
|
||||||
* GA Pageviews (Advanced)
|
|
||||||
* SEO Tag
|
|
||||||
* Performance Optimization
|
|
||||||
|
|
||||||
[](https://chirpy.cotes.info)
|
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
* [Installing](#installing)
|
- [Features](#features)
|
||||||
* [Usage](#usage)
|
- [Installation](#installation)
|
||||||
* [Contributing](#contributing)
|
- [Usage](#usage)
|
||||||
* [Credits](#credits)
|
- [Contributing](#contributing)
|
||||||
* [Support](#support)
|
- [Credits](#credits)
|
||||||
* [License](#license)
|
- [Supporting](#supporting)
|
||||||
|
- [License](#license)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
## Installing
|
- Pinned Posts
|
||||||
|
- Configurable theme mode
|
||||||
|
- Double-level Categories
|
||||||
|
- Last modified date for posts
|
||||||
|
- Table of Contents
|
||||||
|
- Automatically recommend related posts
|
||||||
|
- Syntax highlighting
|
||||||
|
- Mathematical expressions
|
||||||
|
- Search
|
||||||
|
- Atom Feeds
|
||||||
|
- Disqus Comments
|
||||||
|
- Google Analytics
|
||||||
|
- GA Pageviews reporting (Advanced)
|
||||||
|
- SEO and Performance Optimization
|
||||||
|
|
||||||
### Prerequisites
|
## Installation
|
||||||
|
|
||||||
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installtion of basic environment (`Ruby `, `RubyGems` and `Bundler`). In order to use the script tools to save time, we also need to install [Python](https://www.python.org/downloads/)(version 3.5 or abover) and [ruamel.yaml](https://pypi.org/project/ruamel.yaml/).
|
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub, rename the repository to `USERNAME.github.io` (where `USERNAME` is your GitHub username), and then open terminal and clone the fork to local by:
|
||||||
|
|
||||||
In addition, if your machine is running Debian or macOS, make sure the [GNU coreutils](https://www.gnu.org/software/coreutils/) is installed. Otherwise, get it by:
|
```terminal
|
||||||
|
$ git clone https://github.com/USERNAME/USERNAME.github.io.git -b master --single-branch
|
||||||
* Debian
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ sudo apt-get install coreutils
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* macOS
|
### Setting up the local envrionment
|
||||||
|
|
||||||
```console
|
If you would like to run or build the project on your local machine, please follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
|
||||||
$ brew install coreutils
|
|
||||||
```
|
|
||||||
|
|
||||||
|
Before running or building for the first time, please complete the installation of the Jekyll plugins. Go to the root directory of project and run:
|
||||||
### Jekyll Plugins
|
|
||||||
|
|
||||||
[Fork **Chirpy** from GitHub](https://github.com/cotes2020/jekyll-theme-chirpy/fork), then clone your forked repo to local:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ git clone git@github.com:USER/jekyll-theme-chirpy.git
|
|
||||||
```
|
|
||||||
|
|
||||||
replace the `USER` above to your GitHub username.
|
|
||||||
|
|
||||||
The first time you run or build the project on your machine, perform the installation of Jekyll plugins. Go to the root of repo and run:
|
|
||||||
|
|
||||||
```terminal
|
```terminal
|
||||||
$ bundle install
|
$ bundle install
|
||||||
```
|
```
|
||||||
|
|
||||||
`bundle` will automatically install all the dependent Jekyll Plugins that listed in the `Gemfile`.
|
`bundle` will automatically install all the dependencies specified by `Gemfile`.
|
||||||
|
|
||||||
|
### Setting up Docker environment (optional)
|
||||||
|
|
||||||
|
If you're a loyal fan of [**Docker**](https://www.docker.com/) or just too lazy to install the packages mentioned in [_Setting up the local envrionment_](#setting-up-the-local-envrionment), please make sure you have **Docker Engine** installed and running, and then get Docker image `jekyll/jekyll` from Docker Hub by the following command:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ docker pull jekyll/jekyll
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
### Initialization
|
||||||
|
|
||||||
### Directory Structure
|
Go to the root directory of the project and start initialization:
|
||||||
|
|
||||||
The main files and related brief introductions are listed below.
|
```console
|
||||||
|
|
||||||
```sh
|
|
||||||
jekyll-theme-chirpy/
|
|
||||||
├── _data
|
|
||||||
├── _includes
|
|
||||||
├── _layouts
|
|
||||||
├── _posts # posts stay here
|
|
||||||
├── _scripts
|
|
||||||
├── .travis.yml # remove it
|
|
||||||
├── .github # remove this, too
|
|
||||||
├── assets
|
|
||||||
├── tabs
|
|
||||||
│ └── about.md # the ABOUT page
|
|
||||||
├── .gitignore
|
|
||||||
├── 404.html
|
|
||||||
├── Gemfile
|
|
||||||
├── LICENSE
|
|
||||||
├── README.md
|
|
||||||
├── _config.yml # configuration file
|
|
||||||
├── tools # script tools
|
|
||||||
├── docs
|
|
||||||
├── feed.xml
|
|
||||||
├── index.html
|
|
||||||
├── robots.txt
|
|
||||||
└── sitemap.xml
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
As mentioned above, some files or directories should be removed from your repo:
|
|
||||||
|
|
||||||
- .travis.yml
|
|
||||||
- .github
|
|
||||||
|
|
||||||
|
|
||||||
### Customization
|
|
||||||
|
|
||||||
Basically, go to `_config.yml` and customize the variables as needed, some of them are typical options:
|
|
||||||
|
|
||||||
* `url`
|
|
||||||
|
|
||||||
Set to your website url and there should be no slash symbol at the tail. Format: `<protocol>://<domain>`.
|
|
||||||
|
|
||||||
|
|
||||||
* `avatar`
|
|
||||||
|
|
||||||
It defines the image file location of avatar. The sample image is `/assets/img/sample/avatar.jpg`, and should be replaced by your own one(a square image). Notice that a huge image file will increase the load time of your site, so keep your avatar image size as samll as possible(may be *<https://tinypng.com/>* will help).
|
|
||||||
|
|
||||||
* `timezone`
|
|
||||||
|
|
||||||
To ensure that the posts' release date matches the city you live in, please modify the field `timezone` correctly. A list of all available values can be found on [TimezoneConverter](http://www.timezoneconverter.com/cgi-bin/findzone/findzone) or [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
||||||
|
|
||||||
* `theme_mode`
|
|
||||||
|
|
||||||
There are three options for the theme color scheme:
|
|
||||||
|
|
||||||
- **dual** - The default color scheme will follow the system settings, but if the system does not support dark mode, or the browser does not support `Media Queries Level 5`, the theme will be displayed as `light` mode by default. Anyway, the bottom left corner of the Sidebar will provide a button for users to switch color schemes.
|
|
||||||
|
|
||||||
- **dark** - Always show dark mode.
|
|
||||||
- **light** - Always show light mode.
|
|
||||||
|
|
||||||
|
|
||||||
### Run Locally
|
|
||||||
|
|
||||||
You may want to preview the site before publishing, so just run the script tool:
|
|
||||||
|
|
||||||
```terminal
|
|
||||||
$ bash tools/run.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Open a modern brower and visit at <http://localhost:4000>.
|
|
||||||
|
|
||||||
Few days later, you may find that the file modification(e.g. edits to a post) does not refresh in real time by using `run.sh`. Don't worry, the advanced option `-r` (or `--realtime`) will solve this problem, but it requires [**fswatch**](http://emcrisostomo.github.io/fswatch/) to be installed on your machine. Type `-h` for more information.
|
|
||||||
|
|
||||||
### Deploying to GitHub Pages
|
|
||||||
|
|
||||||
Before the deployment begins, ensure the `url` in file `_config.yml` has been set to `https://<username>.github.io`(or the custom domain, if you have. e.g. `https://yourdomain.com`). What's more, if you prefer to the [Project site](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites), change `baseurl` of file `_config.yml` to your project name, starting with a slash. e.g. `/project`.
|
|
||||||
|
|
||||||
#### Option 1: Built by GitHub Pages
|
|
||||||
|
|
||||||
By deploying the site in this way, you're allowed to push the source code directly to the remote.
|
|
||||||
|
|
||||||
> **Note**: If you want to use any third-party Jekyll plugins that not in [this list](https://pages.github.com/versions/), stop reading the current approach and go to [*Option 2: Build locally*](#option-2-build-locally).
|
|
||||||
|
|
||||||
**1**. Rename the repository to:
|
|
||||||
|
|
||||||
|Site Type | Repo's Name|
|
|
||||||
|:---|:---|
|
|
||||||
|User or Organization | `<username>.github.io`|
|
|
||||||
|Project| any one except `<username>.github.io`, let's say `project`|
|
|
||||||
|
|
||||||
**2**. Commit the changes of the repo first, then run the initialization script:
|
|
||||||
|
|
||||||
```terminal
|
|
||||||
$ bash tools/init.sh
|
$ bash tools/init.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
>**Note**: The *Recent Update* requires the posts' latest git-log date, so make sure the changes in `_posts` have been committed before running this command.
|
> **Note**: If you not intend to deploy it on GitHub Pages, append parameter option `--no-gh` at the end of the above command.
|
||||||
|
|
||||||
it will automatically generates the *Latest Modified Date* and *Categories / Tags* page for the posts and submit a commit. Its output is similar to the following log:
|
What it does is:
|
||||||
|
|
||||||
|
1. Remove some files or directories from your repository:
|
||||||
|
|
||||||
|
- `.travis.yml`
|
||||||
|
- files under `_posts`
|
||||||
|
- folder `docs`
|
||||||
|
|
||||||
|
2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`.
|
||||||
|
|
||||||
|
3. Automatically create a commit to save the changes.
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
Generally, go to `_config.yml` and configure the variables as needed. Some of them are typical options:
|
||||||
|
|
||||||
|
- `url`
|
||||||
|
- `avatar`
|
||||||
|
- `timezone`
|
||||||
|
- `theme_mode`
|
||||||
|
|
||||||
|
### Run Locally
|
||||||
|
|
||||||
|
You may want to preview the site contents before publishing, so just run it by:
|
||||||
|
|
||||||
```terminal
|
```terminal
|
||||||
[INFO] Success to update lastmod for 4 post(s).
|
$ bundle exec jekyll s
|
||||||
[INFO] Succeed! 3 category-pages created.
|
|
||||||
[INFO] Succeed! 4 tag-pages created.
|
|
||||||
[Automation] Updated the Categories, Tags, Lastmod for post(s).
|
|
||||||
11 files changed, 46 insertions(+), 3 deletions(-)
|
|
||||||
...
|
|
||||||
Updated the Categories, Tags, Lastmod for post(s).
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**3**. Push the changes to `origin/master` then go to GitHub website and enable GitHub Pages service for the repo.
|
Then open a browser and visit to <http://localhost:4000>.
|
||||||
|
|
||||||
**4**. Check it out:
|
### Run on Docker
|
||||||
|
|
||||||
|Site Type | Site URL |
|
Run the site on Docker with the following command:
|
||||||
|:---|:---|
|
|
||||||
|User or Organization | `https://<username>.github.io/`|
|
|
||||||
|Project| `https://<username>.github.io/project/`|
|
|
||||||
|
|
||||||
|
```terminal
|
||||||
|
$ docker run -it --rm \
|
||||||
|
--volume="$PWD:/srv/jekyll" \
|
||||||
|
-p 4000:4000 jekyll/jekyll \
|
||||||
|
jekyll serve
|
||||||
|
```
|
||||||
|
|
||||||
#### Option 2: Build Locally
|
### Deployment
|
||||||
|
|
||||||
For security reasons, GitHub Pages runs on `safe` mode, which means the third-party Jekyll plugins or custom scripts won't work. If you want to use any another plugins that not in the [whitelist](https://pages.github.com/versions/), **you have to generate the site locally rather than on GitHub Pages**.
|
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [_project site_](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash. For example, `/project`.
|
||||||
|
|
||||||
**1**. Browse to GitHub website, create a brand new repo named:
|
Assuming you have already gone through the [initialization](#initialization), you can now choose ONE of the following methods to deploy your website.
|
||||||
|
|
||||||
|Site Type | Repo's Name|
|
#### Deploy on GitHub Pages
|
||||||
|:---|:---|
|
|
||||||
|User or Organization | `<username>.github.io`|
|
|
||||||
|Project| any one except `<username>.github.io`, let's say `project`|
|
|
||||||
|
|
||||||
and clone it.
|
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the Pages service.
|
||||||
|
|
||||||
**2**. In the root of the source project, build your site by:
|
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
|
||||||
|
|
||||||
|
2. Browse to your repo's landing page on GitHub and select the branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) throught _Settings_ → _Options_ → _GitHub Pages_:
|
||||||
|

|
||||||
|
|
||||||
|
3. Visit your website at the address indicated by GitHub.
|
||||||
|
|
||||||
|
#### Deploy on Other Platforms
|
||||||
|
|
||||||
|
On platforms other than GitHub, we cannot enjoy the convenience of **GitHub Actions**. Therefore, we should build the site locally (or on some other 3rd-party CI platform) and then put the site files on the server.
|
||||||
|
|
||||||
|
Go to the root of the source project, build your site by:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ bash tools/build.sh -d /path/to/local/project/
|
$ JEKYLL_ENV=production bundle exec jekyll b
|
||||||
```
|
```
|
||||||
|
|
||||||
The generated static files will be placed in the root of `/path/to/local/project`. Commit and push the changes to the `master` branch on GitHub.
|
Or, build the site with Docker by:
|
||||||
|
|
||||||
**3**. Go to GitHub website and enable Pages service for the new repository.
|
```terminal
|
||||||
|
$ docker run -it --rm \
|
||||||
|
--env JEKYLL_ENV=production \
|
||||||
|
--volume="$PWD:/srv/jekyll" \
|
||||||
|
jekyll/jekyll \
|
||||||
|
jekyll build
|
||||||
|
```
|
||||||
|
|
||||||
**4**. Visit at:
|
Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to your web server.
|
||||||
|
|
||||||
|Site Type | Site URL |
|
|
||||||
|:---|:---|
|
|
||||||
|User or Organization | `https://<username>.github.io/`|
|
|
||||||
|Project| `https://<username>.github.io/project/`|
|
|
||||||
|
|
||||||
and enjoy!
|
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
For more details and the better reading experience, please check out the [tutorial in demo site](https://chirpy.cotes.info/categories/tutorial/). In the meanwhile, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
For more details and the better reading experience, please check out the [tutorials on demo site](https://chirpy.cotes.info/categories/tutorial/). In the meanwhile, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
The old saying: "Two heads are better than one. Five heads are better than two." So, welcome to report bugs, improve code quality or submit a new feature. For more information, see [contributing guidelines](.github/CONTRIBUTING.md).
|
The old saying, "Two heads are better than one." Consequently, welcome to report bugs, improve code quality or submit a new feature. For more information, see [contributing guidelines](.github/CONTRIBUTING.md).
|
||||||
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
@@ -249,12 +173,10 @@ This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Boot
|
|||||||
|
|
||||||
:tada: Thanks to all the volunteers who contributed to this project, their GitHub IDs are on [this list](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors). Also, I won't forget those guys who submitted the issues or unmerged PR because they reported bugs, shared ideas or inspired me to write more readable documentation.
|
:tada: Thanks to all the volunteers who contributed to this project, their GitHub IDs are on [this list](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors). Also, I won't forget those guys who submitted the issues or unmerged PR because they reported bugs, shared ideas or inspired me to write more readable documentation.
|
||||||
|
|
||||||
|
## Supporting
|
||||||
## Support
|
|
||||||
|
|
||||||
If you enjoy this theme or find it helpful, please consider becoming my sponsor, I'd really appreciate it! Click the button <kbd>:heart: Sponsor</kbd> at the top of the [Home Page](https://github.com/cotes2020/jekyll-theme-chirpy) and choose a link that suits you to donate; this will encourage and help me better maintain the project.
|
If you enjoy this theme or find it helpful, please consider becoming my sponsor, I'd really appreciate it! Click the button <kbd>:heart: Sponsor</kbd> at the top of the [Home Page](https://github.com/cotes2020/jekyll-theme-chirpy) and choose a link that suits you to donate; this will encourage and help me better maintain the project.
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) License.
|
This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) License.
|
||||||
81
_config.yml
81
_config.yml
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
# 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
|
||||||
#--------------------------
|
#--------------------------
|
||||||
|
|
||||||
title: Chirpy # the main title
|
title: Chirpy # the main title
|
||||||
|
|
||||||
tagline: A text-focused Jekyll theme. # it will display as the sub-title
|
tagline: A text-focused Jekyll theme. # it will display as the sub-title
|
||||||
@@ -17,8 +16,8 @@ description: >- # used by seo meta and the atom feed
|
|||||||
bootstrap Jekyll theme with responsive web design
|
bootstrap Jekyll theme with responsive web design
|
||||||
and focuses on text presentation.
|
and focuses on text presentation.
|
||||||
|
|
||||||
# Replace with the website url, e.g. 'https://username.github.io'
|
# fill in the base hostname & protocol for your site, e.g., 'https://username.github.io'
|
||||||
url: 'protocol://domain'
|
url: ''
|
||||||
|
|
||||||
author: your_full_name # change to your full name
|
author: your_full_name # change to your full name
|
||||||
|
|
||||||
@@ -42,21 +41,20 @@ social:
|
|||||||
# - https://www.linkedin.com/in/username
|
# - https://www.linkedin.com/in/username
|
||||||
|
|
||||||
google_site_verification: google_meta_tag_verification # change to your verification string
|
google_site_verification: google_meta_tag_verification # change to your verification string
|
||||||
|
|
||||||
#--------------------------
|
#--------------------------
|
||||||
|
|
||||||
# if your site type is Project Pages site, change below value to '/projectname'
|
|
||||||
|
# Only if your site type is GitHub Project sites and doesn't have a custom domain,
|
||||||
|
# change below value to '/projectname'.
|
||||||
baseurl: ''
|
baseurl: ''
|
||||||
|
|
||||||
# Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
|
# Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
google_analytics:
|
google_analytics:
|
||||||
# Fill with your Google Analytics ID
|
id: '' # Fill with your Google Analytics ID
|
||||||
id: ''
|
|
||||||
# The Google Analytics pageviews switch.
|
|
||||||
|
|
||||||
pv:
|
pv:
|
||||||
|
# The Google Analytics pageviews switch.
|
||||||
# DO NOT enable it unless you know how to deploy the Google Analytics superProxy.
|
# DO NOT enable it unless you know how to deploy the Google Analytics superProxy.
|
||||||
enabled: false
|
enabled: false
|
||||||
# the next options only valid when `google_analytics.pv` is enabled.
|
# the next options only valid when `google_analytics.pv` is enabled.
|
||||||
@@ -80,7 +78,7 @@ disqus:
|
|||||||
#
|
#
|
||||||
theme_mode: dual
|
theme_mode: dual
|
||||||
|
|
||||||
# boolean type, global switch for ToC in posts.
|
# boolean type, the global switch for ToC in posts.
|
||||||
toc: true
|
toc: true
|
||||||
|
|
||||||
paginate: 10
|
paginate: 10
|
||||||
@@ -101,18 +99,25 @@ kramdown:
|
|||||||
line_numbers: true
|
line_numbers: true
|
||||||
start_line: 1
|
start_line: 1
|
||||||
|
|
||||||
|
# DO NOT change this unless you're a Pro user on Jekyll and Web development,
|
||||||
|
# or you think you're smart enough to change other relevant URLs within this template.
|
||||||
permalink: /posts/:title/
|
permalink: /posts/:title/
|
||||||
|
|
||||||
|
collections:
|
||||||
|
tabs:
|
||||||
|
output: true
|
||||||
|
sort_by: order
|
||||||
|
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
-
|
-
|
||||||
scope:
|
scope:
|
||||||
path: "" # An empty string here means all files in the project
|
path: '' # An empty string here means all files in the project
|
||||||
type: posts
|
type: posts
|
||||||
values:
|
values:
|
||||||
layout: post
|
layout: post
|
||||||
comments: true # Enable comments in posts.
|
comments: true # Enable comments in posts.
|
||||||
toc: true # Display TOC column in posts.
|
toc: true # Display TOC column in posts.
|
||||||
location: Post
|
|
||||||
breadcrumb:
|
breadcrumb:
|
||||||
-
|
-
|
||||||
label: Posts
|
label: Posts
|
||||||
@@ -122,12 +127,17 @@ defaults:
|
|||||||
path: _drafts
|
path: _drafts
|
||||||
values:
|
values:
|
||||||
comments: false
|
comments: false
|
||||||
|
-
|
||||||
|
scope:
|
||||||
|
path: index.html
|
||||||
|
values:
|
||||||
|
breadcrumb:
|
||||||
|
-
|
||||||
|
label: Posts
|
||||||
-
|
-
|
||||||
scope:
|
scope:
|
||||||
path: tags
|
path: tags
|
||||||
values:
|
values:
|
||||||
tab_active: Tags
|
|
||||||
location: Tag
|
|
||||||
breadcrumb:
|
breadcrumb:
|
||||||
-
|
-
|
||||||
label: Home
|
label: Home
|
||||||
@@ -139,8 +149,6 @@ defaults:
|
|||||||
scope:
|
scope:
|
||||||
path: categories
|
path: categories
|
||||||
values:
|
values:
|
||||||
tab_active: Categories
|
|
||||||
location: Category
|
|
||||||
breadcrumb:
|
breadcrumb:
|
||||||
-
|
-
|
||||||
label: Home
|
label: Home
|
||||||
@@ -150,7 +158,8 @@ defaults:
|
|||||||
url: /tabs/categories/
|
url: /tabs/categories/
|
||||||
-
|
-
|
||||||
scope:
|
scope:
|
||||||
path: tabs
|
path: ''
|
||||||
|
type: tabs # see `site.collections`
|
||||||
values:
|
values:
|
||||||
layout: page
|
layout: page
|
||||||
dynamic_title: true # Hide title in mobile screens.
|
dynamic_title: true # Hide title in mobile screens.
|
||||||
@@ -158,12 +167,6 @@ defaults:
|
|||||||
-
|
-
|
||||||
label: Home
|
label: Home
|
||||||
url: /
|
url: /
|
||||||
-
|
|
||||||
scope:
|
|
||||||
path: assets/data
|
|
||||||
values:
|
|
||||||
layout: compress
|
|
||||||
|
|
||||||
|
|
||||||
sass:
|
sass:
|
||||||
sass_dir: /assets/css
|
sass_dir: /assets/css
|
||||||
@@ -171,33 +174,27 @@ sass:
|
|||||||
|
|
||||||
compress_html:
|
compress_html:
|
||||||
clippings: all
|
clippings: all
|
||||||
comments: ["<!-- ", " -->"]
|
comments: all
|
||||||
endings: [html, head, body, dt, dd, rt, rp,
|
endings: all
|
||||||
optgroup, option, colgroup, caption,
|
|
||||||
thead, tbody, tfoot, tr, td, th]
|
|
||||||
profile: false
|
profile: false
|
||||||
blanklines: false
|
blanklines: false
|
||||||
ignore:
|
ignore:
|
||||||
envs: []
|
envs: []
|
||||||
|
|
||||||
exclude:
|
exclude:
|
||||||
- vendor # Avoid Jekyll mistakenly read the vender directory on Travis-CI's VM .
|
- vendor
|
||||||
- Gemfile.lock
|
- Gemfile.lock
|
||||||
- Gemfile
|
- Gemfile
|
||||||
- tools
|
- tools
|
||||||
- docs
|
- docs
|
||||||
|
- README.md
|
||||||
|
- LICENSE
|
||||||
|
|
||||||
sitemap_exclude: # Sitemap will exclude the following items.
|
jekyll-archives:
|
||||||
fuzzy:
|
enabled: [categories, tags]
|
||||||
- /assets/
|
layouts:
|
||||||
accurate:
|
category: category
|
||||||
- /norobots/
|
tag: tag
|
||||||
- /tabs/
|
permalinks:
|
||||||
- /categories/
|
tag: '/tags/:name/'
|
||||||
- /tags/
|
category: '/categories/:name/'
|
||||||
- /posts/
|
|
||||||
- 404.html
|
|
||||||
- feed.xml
|
|
||||||
- sitemap.xml
|
|
||||||
- robots.txt
|
|
||||||
- redirects.json
|
|
||||||
|
|||||||
34
_data/contact.yml
Normal file
34
_data/contact.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# The contact options.
|
||||||
|
# v2.3
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2020 Cotes Chung
|
||||||
|
# MIT Licensed
|
||||||
|
|
||||||
|
-
|
||||||
|
type: github
|
||||||
|
icon: 'fab fa-github-alt'
|
||||||
|
-
|
||||||
|
type: twitter
|
||||||
|
icon: 'fab fa-twitter'
|
||||||
|
-
|
||||||
|
type: email
|
||||||
|
icon: 'fas fa-envelope'
|
||||||
|
noblank: true # open link in current tab
|
||||||
|
-
|
||||||
|
type: rss
|
||||||
|
icon: 'fas fa-rss'
|
||||||
|
noblank: true
|
||||||
|
|
||||||
|
# Uncomment and complete the url below to enable more contact options
|
||||||
|
# -
|
||||||
|
# type: mastodon
|
||||||
|
# icon: 'fab fa-mastodon' # icons powered by <https://fontawesome.com/>
|
||||||
|
# url: '' # Fill with your mastodon account page
|
||||||
|
# -
|
||||||
|
# type: linkedin
|
||||||
|
# icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
|
||||||
|
# url: '' # Fill with your Linkedin homepage
|
||||||
|
# -
|
||||||
|
# type: stack-overflow
|
||||||
|
# icon: 'fab fa-stack-overflow'
|
||||||
|
# url: '' # Fill with your stackoverflow homepage
|
||||||
@@ -6,4 +6,6 @@
|
|||||||
|
|
||||||
|
|
||||||
tooltip: "%a, %b %e, %Y, %l:%M %p %z"
|
tooltip: "%a, %b %e, %Y, %l:%M %p %z"
|
||||||
post: "%b %e, %Y"
|
post:
|
||||||
|
long: "%b %e, %Y"
|
||||||
|
short: "%b %e"
|
||||||
|
|||||||
3
_data/meta.yml
Normal file
3
_data/meta.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
name: Chirpy
|
||||||
|
version: 2.6.0
|
||||||
|
homepage: https://github.com/cotes2020/jekyll-theme-chirpy/
|
||||||
@@ -7,15 +7,11 @@
|
|||||||
|
|
||||||
|
|
||||||
license:
|
license:
|
||||||
link: "https://creativecommons.org/licenses/by/4.0/"
|
|
||||||
prompt: This post is licensed under
|
|
||||||
name: CC BY 4.0
|
name: CC BY 4.0
|
||||||
icons:
|
link: "https://creativecommons.org/licenses/by/4.0/"
|
||||||
- "fab fa-creative-commons"
|
|
||||||
- "fab fa-creative-commons-by"
|
|
||||||
|
|
||||||
brief: Some rights reserved.
|
brief: Some rights reserved.
|
||||||
|
|
||||||
verbose: >-
|
verbose: >-
|
||||||
The blog posts on this site are licensed
|
Except where otherwise noted, the blog posts on this site are licensed
|
||||||
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License.
|
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author.
|
||||||
@@ -24,6 +24,11 @@ platforms:
|
|||||||
|
|
||||||
# Uncomment below if you need to.
|
# Uncomment below if you need to.
|
||||||
# -
|
# -
|
||||||
|
# type: Linkedin
|
||||||
|
# icon: "fab fa-linkedin"
|
||||||
|
# link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
|
||||||
|
#
|
||||||
|
# -
|
||||||
# type: Weibo
|
# type: Weibo
|
||||||
# icon: "fab fa-weibo"
|
# icon: "fab fa-weibo"
|
||||||
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
|
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
# The tab data.
|
|
||||||
# v2.1
|
|
||||||
# https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
# © 2020 Cotes Chung
|
|
||||||
# MIT Licensed
|
|
||||||
|
|
||||||
|
|
||||||
-
|
|
||||||
name: Home
|
|
||||||
icon: "fas fa-home"
|
|
||||||
-
|
|
||||||
name: Categories
|
|
||||||
icon: "fas fa-stream"
|
|
||||||
path: tabs
|
|
||||||
url: categories
|
|
||||||
-
|
|
||||||
name: "Tags"
|
|
||||||
icon: "fas fa-tags"
|
|
||||||
path: tabs
|
|
||||||
url: tags
|
|
||||||
-
|
|
||||||
name: "Archives"
|
|
||||||
path: tabs
|
|
||||||
url: archives
|
|
||||||
icon: "fas fa-archive"
|
|
||||||
-
|
|
||||||
name: "About"
|
|
||||||
icon: "fas fa-info"
|
|
||||||
path: tabs
|
|
||||||
url: about
|
|
||||||
55
_includes/css-selector.html
Normal file
55
_includes/css-selector.html
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<!--
|
||||||
|
CSS selector for site.
|
||||||
|
Chirpy v2.3
|
||||||
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
© 2020 Cotes Chung
|
||||||
|
MIT Licensed
|
||||||
|
-->
|
||||||
|
|
||||||
|
{% if page.layout == 'home' %}
|
||||||
|
<link rel="preload" href="{{ '/assets/css/home.css' | relative_url }}" as="style">
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/home.css' | relative_url }}">
|
||||||
|
|
||||||
|
{% elsif page.layout == 'page' %}
|
||||||
|
|
||||||
|
{% if page.collection == 'tabs' and page.title != 'About' %}
|
||||||
|
|
||||||
|
{% if page.title == 'Categories' %}
|
||||||
|
<link rel="preload" href="{{ '/assets/css/categories.css' | relative_url }}" as="style">
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/categories.css' | relative_url }}">
|
||||||
|
|
||||||
|
{% elsif page.title == 'Tags' %}
|
||||||
|
<link rel="preload" href="{{ '/assets/css/tags.css' | relative_url }}" as="style">
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/tags.css' | relative_url }}">
|
||||||
|
|
||||||
|
{% elsif page.title == 'Archives'%}
|
||||||
|
<link rel="preload" href="{{ '/assets/css/archives.css' | relative_url }}" as="style">
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/archives.css' | relative_url }}">
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
<link rel="preload" href="{{ '/assets/css/page.css' | relative_url }}" as="style">
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/page.css' | relative_url }}">
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% elsif page.layout == 'category' or page.layout == 'tag' %}
|
||||||
|
|
||||||
|
<link rel="preload" href="{{ '/assets/css/category-tag.css' | relative_url }}" as="style">
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/category-tag.css' | relative_url }}">
|
||||||
|
|
||||||
|
{% elsif page.layout == 'post' %}
|
||||||
|
|
||||||
|
<link rel="preload" as="style" href="{{ '/assets/css/post.css' | relative_url }}">
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/post.css' | relative_url }}">
|
||||||
|
|
||||||
|
{% if site.toc and page.toc %}
|
||||||
|
|
||||||
|
<link rel="preload" as="style" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}">
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}" />
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
@@ -7,11 +7,13 @@
|
|||||||
MIT License
|
MIT License
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div id="disqus" class="pt-2 pb-4">
|
<div id="disqus" class="pt-2 pb-2">
|
||||||
<p class="font-italic text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p>
|
<p class="font-italic text-center text-muted small">
|
||||||
|
Comments powered by <a href="https://disqus.com/">Disqus</a>.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="{{ site.baseurl }}/assets/lib/jquery.disqusloader.min.js"></script>
|
<script src="{{ site.baseurl }}/assets/js/lib/jquery.disqusloader.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var options = {
|
var options = {
|
||||||
scriptUrl: '//{{ site.disqus.shortname }}.disqus.com/embed.js',
|
scriptUrl: '//{{ site.disqus.shortname }}.disqus.com/embed.js',
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
<!--
|
|
||||||
Fixed kramdown code highlight rendering:
|
|
||||||
https://github.com/penibelst/jekyll-compress-html/issues/101
|
|
||||||
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
|
|
||||||
-->
|
|
||||||
{% if _content contains '<pre class="highlight">' %}
|
|
||||||
{% assign _content = _content | replace: '<pre class="highlight"><code', '<code' %}
|
|
||||||
{% assign _content = _content | replace: '</code></pre>', '</code>' %}
|
|
||||||
{% endif %}
|
|
||||||
@@ -12,9 +12,9 @@
|
|||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
© {{ 'now' | date: "%Y" }}
|
© {{ '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.right.brief %}
|
{% if site.data.rights.brief %}
|
||||||
<span data-toggle="tooltip" data-placement="top"
|
<span data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ site.data.right.verbose }}">{{ site.data.right.brief }}</span>
|
title="{{ site.data.rights.verbose }}">{{ site.data.rights.brief }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,9 +22,10 @@
|
|||||||
<div class="footer-right">
|
<div class="footer-right">
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
Powered by
|
Powered by
|
||||||
<a href="https://jekyllrb.com" target="_blank">Jekyll</a>
|
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
|
||||||
with theme
|
with
|
||||||
<a href="https://github.com/cotes2020/jekyll-theme-chirpy/">Chirpy</a>.
|
<a href="{{ site.data.meta.homepage }}" target="_blank" rel="noopener">{{ site.data.meta.name }}</a>
|
||||||
|
theme.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
© 2017-2019 Cotes Chung
|
© 2017-2019 Cotes Chung
|
||||||
MIT License
|
MIT License
|
||||||
-->
|
-->
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.id }}"></script>
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
window.dataLayer = window.dataLayer || [];
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
function gtag(){dataLayer.push(arguments);}
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', '{{ site.google_analytics.id }}', 'auto');
|
gtag('js', new Date());
|
||||||
ga('send', 'pageview');
|
gtag('config', '{{ site.google_analytics.id }}');
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -9,24 +9,24 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<meta name="theme" content="{{ site.data.meta.name }} v{{ site.data.meta.version }}">
|
||||||
<title>
|
|
||||||
{%- if page.layout == "home" -%}
|
|
||||||
{{- site.title -}}
|
|
||||||
{%- else -%}
|
|
||||||
{{ page.title }} | {{ site.title }}
|
|
||||||
{%- endif -%}
|
|
||||||
</title>
|
|
||||||
|
|
||||||
{% seo title=false %}
|
{% seo title=false %}
|
||||||
|
|
||||||
|
<title>
|
||||||
|
{%- unless page.layout == "home" -%}
|
||||||
|
{{ page.title | append: " | "}}
|
||||||
|
{%- endunless -%}
|
||||||
|
{{ site.title }}
|
||||||
|
</title>
|
||||||
|
|
||||||
{% include favicons.html %}
|
{% include favicons.html %}
|
||||||
|
|
||||||
<!-- google fonts -->
|
<!-- Google Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
|
||||||
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
|
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
|
||||||
|
|
||||||
<!-- ga -->
|
<!-- GA -->
|
||||||
{% if jekyll.environment == 'production' %}
|
{% if jekyll.environment == 'production' %}
|
||||||
<link rel="preconnect" href="https://www.google-analytics.com" crossorigin="use-credentials">
|
<link rel="preconnect" href="https://www.google-analytics.com" crossorigin="use-credentials">
|
||||||
<link rel="dns-prefetch" href="https://www.google-analytics.com">
|
<link rel="dns-prefetch" href="https://www.google-analytics.com">
|
||||||
@@ -40,114 +40,30 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- jsdelivr CDN -->
|
<!-- jsDelivr CDN -->
|
||||||
<link rel="preconnect" href="cdn.jsdelivr.net">
|
<link rel="preconnect" href="cdn.jsdelivr.net">
|
||||||
<link rel="dns-prefetch" href="cdn.jsdelivr.net">
|
<link rel="dns-prefetch" href="cdn.jsdelivr.net">
|
||||||
|
|
||||||
<link rel="preload" as="style"
|
<!-- Bootstrap -->
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
|
|
||||||
integrity="sha256-LA89z+k9fjgMKQ/kq4OO2Mrf8VltYml/VES+Rg0fh20=" crossorigin>
|
|
||||||
|
|
||||||
<link rel="preload" as="style"
|
|
||||||
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.11.2/css/all.min.css"
|
|
||||||
integrity="sha256-+N4/V/SbAFiW1MPBCXnfnP9QSN3+Keu+NlB+0ev/YKQ="
|
|
||||||
crossorigin="anonymous">
|
|
||||||
|
|
||||||
<link rel="preload" as="style" href="{{ site.baseurl }}/assets/css/main.css">
|
|
||||||
|
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
|
href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
|
||||||
integrity="sha256-LA89z+k9fjgMKQ/kq4OO2Mrf8VltYml/VES+Rg0fh20=" crossorigin="anonymous">
|
integrity="sha256-LA89z+k9fjgMKQ/kq4OO2Mrf8VltYml/VES+Rg0fh20=" crossorigin="anonymous">
|
||||||
|
|
||||||
|
<!-- Font Awesome -->
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.11.2/css/all.min.css"
|
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.11.2/css/all.min.css"
|
||||||
integrity="sha256-+N4/V/SbAFiW1MPBCXnfnP9QSN3+Keu+NlB+0ev/YKQ="
|
integrity="sha256-+N4/V/SbAFiW1MPBCXnfnP9QSN3+Keu+NlB+0ev/YKQ="
|
||||||
crossorigin="anonymous">
|
crossorigin="anonymous">
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/main.css">
|
{% include css-selector.html %}
|
||||||
|
|
||||||
{% if page.layout == 'home' %}
|
<!-- JavaScripts -->
|
||||||
<link rel="preload" href="{{ site.baseurl }}/assets/css/home.css" as="style">
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/home.css">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.title == 'Categories' and page.layout == 'page' %}
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
|
||||||
<link rel="preload" href="{{ site.baseurl }}/assets/css/categories.css" as="style">
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/categories.css">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.title == 'Tags' and page.layout == 'page' %}
|
<script async
|
||||||
<link rel="preload" href="{{ site.baseurl }}/assets/css/tags.css" as="style">
|
src="https://cdn.jsdelivr.net/combine/npm/popper.js@1.15.0,npm/bootstrap@4/dist/js/bootstrap.min.js"></script>
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/tags.css">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.layout == 'category' or page.layout == 'tag' %}
|
{% include js-selector.html %}
|
||||||
<link rel="preload" href="{{ site.baseurl }}/assets/css/category-tag.css" as="style">
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/category-tag.css">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.title == 'Archives' and page.layout == 'page' %}
|
|
||||||
<link rel="preload" href="{{ site.baseurl }}/assets/css/archives.css" as="style">
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/archives.css">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.title == 'About' and page.layout == 'page' %}
|
|
||||||
<link rel="preload" href="{{ site.baseurl }}/assets/css/syntax.css" as="style">
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/syntax.css">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<!-- jquery -->
|
|
||||||
<link rel="preload" as="script"
|
|
||||||
href="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"
|
|
||||||
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous">
|
|
||||||
|
|
||||||
<!-- popper -->
|
|
||||||
<link rel="preload" as="script"
|
|
||||||
href="https://cdn.jsdelivr.net/npm/popper.js@1.15.0/dist/umd/popper.min.js"
|
|
||||||
integrity="sha256-fTuUgtT7O2rqoImwjrhDgbXTKUwyxxujIMRIK7TbuNU=" crossorigin>
|
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"
|
|
||||||
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.jQuery || document.write('<script src="{{ site.baseurl }}/assets/lib/jquery-3.4.1.min.js"><\/script>');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.15.0/dist/umd/popper.min.js"
|
|
||||||
integrity="sha256-fTuUgtT7O2rqoImwjrhDgbXTKUwyxxujIMRIK7TbuNU=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js"
|
|
||||||
integrity="sha256-5+02zu5UULQkO7w1GIr6vftCgMfFdZcAHeDtFnKZsBs=" crossorigin="anonymous" async></script>
|
|
||||||
|
|
||||||
<script src="{{ site.baseurl }}/assets/js/dist/commons.js" async></script>
|
|
||||||
|
|
||||||
{% if page.layout == 'home' or page.layout == 'post' %}
|
|
||||||
<script src="{{ site.baseurl }}/assets/js/dist/timeago.min.js" async></script>
|
|
||||||
{% if site.google_analytics.pv.enabled %}
|
|
||||||
<script src="{{ site.baseurl }}/assets/data/pv-data.json"></script>
|
|
||||||
<script src="{{ site.baseurl }}/assets/lib/countUp.min.js" async></script>
|
|
||||||
<script src="{{ site.baseurl }}/assets/js/dist/pageviews.min.js" async></script>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.layout == 'post' %}
|
|
||||||
<link rel="preload" as="style" href="{{ site.baseurl }}/assets/css/post.css">
|
|
||||||
<link rel="preload" as="style" href="{{ site.baseurl }}/assets/css/syntax.css">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/post.css">
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/syntax.css">
|
|
||||||
|
|
||||||
{% if site.toc and page.toc %}
|
|
||||||
<link rel="preload" as="style" href="{{ site.baseurl }}/assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.css">
|
|
||||||
<link rel="preload" as="script" href="{{ site.baseurl }}/assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.js">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.css" />
|
|
||||||
<script src="{{ site.baseurl }}/assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.js" async></script>
|
|
||||||
<script src="{{ site.baseurl }}/assets/js/dist/toc.min.js" async></script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<script src="{{ site.baseurl }}/assets/js/dist/tooltip-loader.min.js" async></script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
41
_includes/js-selector.html
Normal file
41
_includes/js-selector.html
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<!--
|
||||||
|
JS selector for site.
|
||||||
|
Chirpy v2.3
|
||||||
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
© 2020 Cotes Chung
|
||||||
|
MIT Licensed
|
||||||
|
-->
|
||||||
|
|
||||||
|
{% if page.layout == 'home' %}
|
||||||
|
|
||||||
|
<script async src="{{ '/assets/js/home.min.js' | relative_url }}"></script>
|
||||||
|
|
||||||
|
{% elsif page.layout == 'post' %}
|
||||||
|
|
||||||
|
<script async src="{{ '/assets/js/post.min.js' | relative_url }}"></script>
|
||||||
|
|
||||||
|
{% if page.math %}
|
||||||
|
<!-- MathJax -->
|
||||||
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||||
|
<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% elsif page.layout == 'page' %}
|
||||||
|
|
||||||
|
{% if page.title == 'Categories' and page.collection == 'tabs' %}
|
||||||
|
<script async src="{{ '/assets/js/categories.min.js' | relative_url }}"></script>
|
||||||
|
{% else %}
|
||||||
|
<script async src="{{ '/assets/js/page.min.js' | relative_url }}"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
<script async src="{{ '/assets/js/page.min.js' | relative_url }}"></script>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if jekyll.environment == 'production' %}
|
||||||
|
<!-- PWA -->
|
||||||
|
<script defer src="{{ '/app.js' | relative_url }}"></script>
|
||||||
|
{% endif %}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<!-- image lazy load -->
|
<!-- image lazy load: https://github.com/ApoorvSaxena/lozad.js -->
|
||||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script>
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const observer = lozad();
|
const imgs = document.querySelectorAll('#post-wrapper img');
|
||||||
|
const observer = lozad(imgs);
|
||||||
observer.observe();
|
observer.observe();
|
||||||
</script>
|
</script>
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
MIT License
|
MIT License
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<i class="mode-toggle fas fa-sun" light-mode-invisible></i>
|
<i class="mode-toggle fas fa-sun" dark-mode-invisible></i>
|
||||||
<i class="mode-toggle fas fa-moon" dark-mode-invisible></i>
|
<i class="mode-toggle fas fa-moon" light-mode-invisible></i>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
get isDarkMode() { return this.mode == ModeToggle.DARK_MODE; }
|
get isDarkMode() { return this.mode == ModeToggle.DARK_MODE; }
|
||||||
|
|
||||||
get isLightkMode() { return this.mode == ModeToggle.LIGHT_MODE; }
|
get isLightMode() { return this.mode == ModeToggle.LIGHT_MODE; }
|
||||||
|
|
||||||
get hasMode() { return this.mode != null; }
|
get hasMode() { return this.mode != null; }
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
flipMode() {
|
flipMode() {
|
||||||
if (this.hasMode) {
|
if (this.hasMode) {
|
||||||
if (this.isSysDarkPrefer) {
|
if (this.isSysDarkPrefer) {
|
||||||
if (this.isLightkMode) {
|
if (this.isLightMode) {
|
||||||
this.clearMode();
|
this.clearMode();
|
||||||
} else {
|
} else {
|
||||||
this.setLight();
|
this.setLight();
|
||||||
|
|||||||
14
_includes/no-linenos.html
Normal file
14
_includes/no-linenos.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{% comment %}
|
||||||
|
Remove the line number of the code snippet.
|
||||||
|
v2.2
|
||||||
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
© 2020 Cotes Chung
|
||||||
|
Published under the MIT License
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% assign content = include.content %}
|
||||||
|
|
||||||
|
{% if content contains '<td class="rouge-gutter gl"><pre class="lineno">' %}
|
||||||
|
{% assign content = content | replace: '<td class="rouge-gutter gl"><pre class="lineno">', '<!-- <td class="rouge-gutter gl"><pre class="lineno">'%}
|
||||||
|
{% assign content = content | replace: '</td><td class="rouge-code">', '</td> --><td class="rouge-code">' %}
|
||||||
|
{% endif %}
|
||||||
@@ -6,60 +6,52 @@
|
|||||||
MIT License
|
MIT License
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div id="panel-wrapper" class="col-xl-3 pl-2 topbar-down">
|
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted topbar-down">
|
||||||
|
|
||||||
<div class="access">
|
<div class="access">
|
||||||
{% assign lastmod_list = "" | split: "" %}
|
|
||||||
{% assign index = 0 %}
|
|
||||||
|
|
||||||
{% for post in site.posts %}
|
{% include update-list.html %}
|
||||||
{% if post.seo.date_modified > post.date and post.seo.date_modified != nil %}
|
|
||||||
{% capture item %}
|
{% if update_list.size > 0 %}
|
||||||
{{ post.seo.date_modified }}::{{ index }}
|
|
||||||
{% endcapture %}
|
|
||||||
{% assign lastmod_list = lastmod_list | push: item %}
|
|
||||||
{% endif %}
|
|
||||||
{% assign index = index | plus: 1 %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% if lastmod_list.size > 0 %}
|
|
||||||
<div id="access-lastmod" class="post">
|
<div id="access-lastmod" class="post">
|
||||||
<h3 data-toc-skip>
|
<span>{{- site.data.label.panel.lastmod -}}</span>
|
||||||
{{- site.data.label.panel.lastmod -}}
|
|
||||||
</h3>
|
|
||||||
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
||||||
{% assign MAX_SIZE = 5 %}
|
|
||||||
{% assign sum = 0 %}
|
{% for item in update_list %}
|
||||||
{% assign lastmod_list = lastmod_list | sort | reverse %}
|
|
||||||
{% for item in lastmod_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] %}
|
||||||
<li><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></li>
|
{% assign url = post.url | relative_url %}
|
||||||
{% assign sum = sum | plus: 1 %}
|
<li><a href="{{ url }}">{{ post.title }}</a></li>
|
||||||
{% if sum >= MAX_SIZE %}
|
|
||||||
{% break %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div> <!-- #access-lastmod -->
|
</div> <!-- #access-lastmod -->
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="access-tags">
|
|
||||||
<h3 data-toc-skip>
|
|
||||||
{{- site.data.label.panel.trending_tags -}}
|
|
||||||
</h3>
|
|
||||||
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
|
|
||||||
{% include trending-tags.html %}
|
{% include trending-tags.html %}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
{% if trending_tags.size > 0 %}
|
||||||
|
<div id="access-tags">
|
||||||
|
<span>{{- site.data.label.panel.trending_tags -}}</span>
|
||||||
|
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
|
||||||
|
|
||||||
|
{% for tag in trending_tags %}
|
||||||
|
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
|
||||||
|
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div> <!-- .access -->
|
</div> <!-- .access -->
|
||||||
|
|
||||||
{% if page.layout == 'post' and site.toc and page.toc %}
|
{% if page.layout == 'post' and site.toc and page.toc %}
|
||||||
<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
|
<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
|
||||||
<h3 data-toc-skip class="pl-3 pt-2 mb-3">
|
<span class="pl-3 pt-2 mb-2">
|
||||||
{{- site.data.label.panel.toc -}}
|
{{- site.data.label.panel.toc -}}
|
||||||
</h3>
|
</span>
|
||||||
<nav id="toc" data-toggle="toc"></nav>
|
<nav id="toc" data-toggle="toc"></nav>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -10,17 +10,15 @@
|
|||||||
<ul class="pagination mt-4 mb-0 pl-lg-2">
|
<ul class="pagination mt-4 mb-0 pl-lg-2">
|
||||||
<!-- left arrow -->
|
<!-- left arrow -->
|
||||||
{% if paginator.previous_page %}
|
{% if paginator.previous_page %}
|
||||||
<li class="page-item">
|
{% assign prev_url = paginator.previous_page_path | relative_url %}
|
||||||
<a class="page-link btn-box-shadow" href="{{ site.baseurl }}{{ paginator.previous_page_path }}">
|
{% else %}
|
||||||
|
{% assign prev_url = "#" %}
|
||||||
|
{% endif %}
|
||||||
|
<li class="page-item {% unless paginator.previous_page %}disabled{% endunless %}">
|
||||||
|
<a class="page-link btn-box-shadow" 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>
|
||||||
{% else %}
|
|
||||||
<li class="page-item disabled">
|
|
||||||
<a class="page-link btn-box-shadow" href="#"><i class="fas fa-angle-left"></i></a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
<!-- endof left arrow -->
|
|
||||||
|
|
||||||
<!-- page numbers -->
|
<!-- page numbers -->
|
||||||
{% assign left_ellipsis = false %}
|
{% assign left_ellipsis = false %}
|
||||||
@@ -73,16 +71,15 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<!-- right arrow -->
|
<!-- right arrow -->
|
||||||
{% if paginator.next_page %}
|
{% if paginator.next_page_path %}
|
||||||
<li class="page-item">
|
{% assign next_url = paginator.next_page_path | relative_url %}
|
||||||
<a class="page-link btn-box-shadow" href="{{ site.baseurl }}{{ paginator.next_page_path }}">
|
{% else %}
|
||||||
|
{% assign next_url = "#" %}
|
||||||
|
{% endif %}
|
||||||
|
<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">
|
||||||
<i class="fas fa-angle-right"></i>
|
<i class="fas fa-angle-right"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
|
||||||
<li class="page-item disabled">
|
|
||||||
<a class="page-link btn-box-shadow" href="#"><i class="fas fa-angle-right"></i></a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</ul> <!-- .pagination -->
|
</ul> <!-- .pagination -->
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<div class="share-wrapper">
|
<div class="share-wrapper">
|
||||||
<span class="share-label ml-1 mr-1">{{ site.data.share.label }}</span>
|
<span class="share-label text-muted mr-1">{{ site.data.share.label }}</span>
|
||||||
<span class="share-icons">
|
<span class="share-icons">
|
||||||
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
|
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
|
||||||
{% assign url = page.url | relative_url | prepend: site.url %}
|
{% assign url = page.url | relative_url | prepend: site.url %}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
{% for share in site.data.share.platforms %}
|
{% for share in site.data.share.platforms %}
|
||||||
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
|
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
|
||||||
<a href="{{ link }}" data-toggle="tooltip" data-placement="top"
|
<a href="{{ link }}" data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ share.type }}" target="_blank">
|
title="{{ share.type }}" target="_blank" rel="noopener" aria-label="{{ share.type }}">
|
||||||
<i class="fa-fw {{ share.icon }}"></i>
|
<i class="fa-fw {{ share.icon }}"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
27
_includes/refactor-content.html
Normal file
27
_includes/refactor-content.html
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<!--
|
||||||
|
Refactor the HTML structure.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{% assign _content = include.content %}
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Suroundding the markdown table with '<div class="table-wrapper">. and '</div>'
|
||||||
|
-->
|
||||||
|
{% if _content contains '<table>' %}
|
||||||
|
{% assign _content = _content | replace: '<table>', '<div class="table-wrapper"><table>' %}
|
||||||
|
{% assign _content = _content | replace: '</table>', '</table></div>' %}
|
||||||
|
{% assign _content = _content | replace: '</table></div></code>', '</table></code>' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Fixed kramdown code highlight rendering:
|
||||||
|
https://github.com/penibelst/jekyll-compress-html/issues/101
|
||||||
|
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
|
||||||
|
-->
|
||||||
|
{% if _content contains '<pre class="highlight">' %}
|
||||||
|
{% assign _content = _content | replace: '<div class="highlight"><pre class="highlight"><code', '<div class="highlight"><code' %}
|
||||||
|
{% assign _content = _content | replace: '</code></pre></div>', '</code></div>' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ _content }}
|
||||||
@@ -1,21 +1,34 @@
|
|||||||
<!--
|
<!--
|
||||||
The related posts of current post.
|
Recommend the other 3 posts according to the tags and categories of the current post,
|
||||||
Placed in the bottom of every single post.
|
if the number is not enough, use the other latest posts to supplement.
|
||||||
|
|
||||||
v2.0
|
v2.0
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
© 2019 Cotes Chung
|
© 2019 Cotes Chung
|
||||||
Published under the MIT License
|
Published under the MIT License
|
||||||
-->
|
-->
|
||||||
|
|
||||||
{% assign MAX_SIZE = 3 %}
|
<!-- The total size of related posts -->
|
||||||
|
{% assign TOTAL_SIZE = 3 %}
|
||||||
|
|
||||||
|
<!-- An random integer that bigger than 0 -->
|
||||||
{% assign TAG_SCORE = 1 %}
|
{% assign TAG_SCORE = 1 %}
|
||||||
|
|
||||||
|
<!-- Equals to TAG_SCORE / {max_categories_hierarchy} -->
|
||||||
{% assign CATEGORY_SCORE = 0.5 %}
|
{% assign CATEGORY_SCORE = 0.5 %}
|
||||||
|
|
||||||
{% assign score_list = "" | split: "" %}
|
{% assign SEPARATOR = ":" %}
|
||||||
{% assign post_index = 0 %}
|
|
||||||
|
{% assign score_list = "" | split: "" %}
|
||||||
|
{% assign last_index = site.posts.size | minus: 1 %}
|
||||||
|
|
||||||
|
{% for i in (0..last_index) %}
|
||||||
|
{% assign post = site.posts[i] %}
|
||||||
|
|
||||||
|
{% if post.url == page.url %}
|
||||||
|
{% continue %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% for post in site.posts %}
|
|
||||||
{% if post.url != page.url %}
|
|
||||||
{% assign score = 0 %}
|
{% assign score = 0 %}
|
||||||
|
|
||||||
{% for tag in post.tags %}
|
{% for tag in post.tags %}
|
||||||
@@ -31,43 +44,67 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if score > 0 %}
|
{% if score > 0 %}
|
||||||
{% capture score_item %}{{ score }}:{{ post_index }}{% endcapture %}
|
{% capture score_item %}{{ score }}{{ SEPARATOR }}{{ i }}{% endcapture %}
|
||||||
{% assign score_list = score_list | push: score_item %}
|
{% assign score_list = score_list | push: score_item %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% assign post_index = post_index | plus: 1 %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
{% assign index_list = "" | split: "" %}
|
||||||
|
|
||||||
{% if score_list.size > 0 %}
|
{% if score_list.size > 0 %}
|
||||||
{% assign score_list = score_list | sort | reverse %}
|
{% assign score_list = score_list | sort | reverse %}
|
||||||
{% assign count = 0 %}
|
{% for entry in score_list limit: TOTAL_SIZE %}
|
||||||
<div id="related-posts" class="mt-4 mb-2 mb-sm-4 pb-2">
|
{% assign index = entry | split: SEPARATOR | last %}
|
||||||
|
{% assign index_list = index_list | push: index %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Fill with the other newlest posts -->
|
||||||
|
{% assign less = TOTAL_SIZE | minus: index_list.size %}
|
||||||
|
|
||||||
|
{% if less > 0 %}
|
||||||
|
|
||||||
|
{% for i in (0..last_index) %}
|
||||||
|
{% assign post = site.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 %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if index_list.size > 0 %}
|
||||||
|
<div id="related-posts" class="mt-5 mb-2 mb-sm-4">
|
||||||
<h3 class="pt-2 mt-1 mb-4 ml-1" data-toc-skip>{{ site.data.label.post.relate_posts }}</h3>
|
<h3 class="pt-2 mt-1 mb-4 ml-1" data-toc-skip>{{ site.data.label.post.relate_posts }}</h3>
|
||||||
<div class="card-deck mb-4">
|
<div class="card-deck mb-4">
|
||||||
{% for score_item in score_list %}
|
{% for entry in index_list %}
|
||||||
{% assign data = score_item | split: ":" %}
|
{% assign index = entry | plus: 0 %}
|
||||||
{% assign index = data[1] | plus: 0 %}
|
|
||||||
{% assign post = site.posts[index] %}
|
{% assign post = site.posts[index] %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<a href="{{ post.url | relative_url }}">
|
<a href="{{ post.url | relative_url }}">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<span class="timeago small">
|
{% include timeago.html date=post.date class="small" %}
|
||||||
{{ post.date | date: site.data.date_format.post }}
|
|
||||||
<i class="unloaded">{{ post.date | date_to_xmlschema }}</i>
|
|
||||||
</span>
|
|
||||||
<h3 class="pt-0 mt-1 mb-3" data-toc-skip>{{ post.title }}</h3>
|
<h3 class="pt-0 mt-1 mb-3" data-toc-skip>{{ post.title }}</h3>
|
||||||
<div class="text-muted small">
|
<div class="text-muted small">
|
||||||
<p>{{ post.content | markdownify | strip_html | truncate: 200 | replace: '&', '&' }}</p>
|
<p>
|
||||||
|
{% include no-linenos.html content=post.content %}
|
||||||
|
{{ content | markdownify | strip_html | truncate: 200 }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% assign count = count | plus: 1 %}
|
|
||||||
{% if count >= MAX_SIZE %}
|
|
||||||
{% break %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div> <!-- .card-deck -->
|
</div> <!-- .card-deck -->
|
||||||
</div>
|
</div> <!-- #related-posts -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
© 2017-2019 Cotes Chung
|
© 2017-2019 Cotes Chung
|
||||||
MIT License
|
MIT License
|
||||||
-->
|
-->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.7.3/dest/simple-jekyll-search.min.js" integrity="sha256-qcLR00zq6pJk4je3MLgAri8Nn+ZumUlXgTKR2H/xCY0=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
{% capture result_elem %}
|
{% capture result_elem %}
|
||||||
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
|
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
|
||||||
@@ -20,11 +19,13 @@
|
|||||||
|
|
||||||
{% capture not_found %}<p class="mt-5">Oops! No result founds.</p>{% endcapture %}
|
{% capture not_found %}<p class="mt-5">Oops! No result founds.</p>{% endcapture %}
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.7.3/dest/simple-jekyll-search.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
SimpleJekyllSearch({
|
SimpleJekyllSearch({
|
||||||
searchInput: document.getElementById('search-input'),
|
searchInput: document.getElementById('search-input'),
|
||||||
resultsContainer: document.getElementById('search-results'),
|
resultsContainer: document.getElementById('search-results'),
|
||||||
json: '{{ site.baseurl }}/assets/data/search.json',
|
json: '{{ site.baseurl }}/assets/js/data/search.json',
|
||||||
searchResultTemplate: '{{ result_elem | strip_newlines }}',
|
searchResultTemplate: '{{ result_elem | strip_newlines }}',
|
||||||
noResultsText: '{{ not_found }}'
|
noResultsText: '{{ not_found }}'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,8 +8,15 @@
|
|||||||
<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-12 col-xl-11 post-content">
|
<div class="col-12 col-xl-11 post-content">
|
||||||
<div id="search-hints">
|
<div id="search-hints">
|
||||||
<h4 class="text-muted">{{ site.data.label.panel.trending_tags }}</h4>
|
<h4 class="text-muted mb-4">{{ site.data.label.panel.trending_tags }}</h4>
|
||||||
|
|
||||||
{% include trending-tags.html %}
|
{% include trending-tags.html %}
|
||||||
|
|
||||||
|
{% for tag in trending_tags %}
|
||||||
|
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
|
||||||
|
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>
|
<div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<div id="nav-wrapper">
|
<div id="nav-wrapper">
|
||||||
|
|
||||||
<div id="profile-wrapper" class="d-flex flex-column">
|
<div id="profile-wrapper" class="d-flex flex-column">
|
||||||
<div id="avatar" class="d-flex justify-content-center">
|
<div id="avatar" class="d-flex justify-content-center">
|
||||||
<a href="{{ site.baseurl }}/" alt="avatar">
|
<a href="{{ site.baseurl }}/" alt="avatar">
|
||||||
@@ -15,38 +16,32 @@
|
|||||||
{% if start == '/' %}
|
{% if start == '/' %}
|
||||||
{% assign avatar_url = avatar_url | prepend: site.baseurl %}
|
{% assign avatar_url = avatar_url | prepend: site.baseurl %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<img src="{{ avatar_url }}" alt="avatar">
|
<img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="profile-text mt-3">
|
<div class="profile-text mt-3">
|
||||||
<div id="site-title">
|
<div class="site-title">
|
||||||
<a href="{{ site.baseurl }}/">{{- site.title -}}</a>
|
<a href="{{ '/' | relative_url }}">{{- site.title -}}</a>
|
||||||
</div>
|
|
||||||
<div id="site-subtitle" class="font-italic">{{- site.tagline -}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="site-subtitle font-italic">{{- site.tagline -}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div><!-- #profile-wrapper -->
|
||||||
|
|
||||||
<ul class="nav flex-column">
|
<ul class="nav flex-column">
|
||||||
{% assign page_urls = page.url | split: "/" %}
|
<!-- home -->
|
||||||
|
<li class="nav-item d-flex justify-content-center {% if page.layout == 'home' %}active{% endif %}">
|
||||||
{% for item in site.data.tabs %}
|
<a href="{{ '/' | relative_url }}" class="nav-link d-flex justify-content-center align-items-center w-100">
|
||||||
{% assign ref = site.baseurl | append: "/" %}
|
<i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
|
||||||
|
<span>{{ "HOME" }}</span>
|
||||||
{% if item.path %}
|
</a>
|
||||||
{% assign ref = ref | append: item.path | append: "/" %}
|
</li>
|
||||||
{% if item.url %}
|
<!-- the real tabs -->
|
||||||
{% assign ref = ref | append: item.url | append: "/" %}
|
{% for tab in site.tabs %}
|
||||||
{% endif %}
|
<li class="nav-item d-flex justify-content-center {% if tab.url == page.url %}active{% endif %}">
|
||||||
{% endif %}
|
<a href="{{ tab.url | relative_url }}" class="nav-link d-flex justify-content-center align-items-center w-100">
|
||||||
|
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
|
||||||
<li class="nav-item d-flex justify-content-center
|
<span>{{ tab.title | upcase }}</span>
|
||||||
{% if item.url == page_urls.last
|
|
||||||
or item.name == page.tab_active
|
|
||||||
or item.name == "Home" and page.layout == "home" %}active{% endif %}">
|
|
||||||
<a href="{{ ref }}" class="nav-link d-flex justify-content-center align-items-center w-100">
|
|
||||||
<i class="fa-fw {{ item.icon }} ml-3 mr-3 unloaded"></i>
|
|
||||||
<span>{{ item.name | upcase }}</span>
|
|
||||||
</a>
|
</a>
|
||||||
</li> <!-- .nav-item -->
|
</li> <!-- .nav-item -->
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@@ -64,18 +59,27 @@
|
|||||||
<span class="icon-border"></span>
|
<span class="icon-border"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a href="https://github.com/{{ site.github.username }}" target="_blank">
|
{% for entry in site.data.contact %}
|
||||||
<i class="fab fa-github-alt"></i>
|
{% capture url %}
|
||||||
</a>
|
{%- if entry.type == 'github' -%}
|
||||||
<a href="https://twitter.com/{{ site.twitter.username }}" target="_blank">
|
https://github.com/{{ site.github.username }}
|
||||||
<i class="fab fa-twitter"></i>
|
{%- elsif entry.type == 'twitter' -%}
|
||||||
</a>
|
https://twitter.com/{{ site.twitter.username }}
|
||||||
|
{%- elsif entry.type == 'email' -%}
|
||||||
{% assign email = site.social.email | split: '@' %}
|
{% assign email = site.social.email | split: '@' %}
|
||||||
<a href="javascript:window.open('mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@'))">
|
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
|
||||||
<i class="fas fa-envelope"></i>
|
{%- elsif entry.type == 'rss' -%}
|
||||||
</a>
|
{{ "/feed.xml" | relative_url }}
|
||||||
<a href="{{ site.baseurl }}/feed.xml" target="_blank">
|
{%- else -%}
|
||||||
<i class="fas fa-rss"></i>
|
{{ entry.url }}
|
||||||
|
{%- endif -%}
|
||||||
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% if url != '' %}
|
||||||
|
<a href="{{ url }}" aria-label="{{ entry.type }}" {% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}>
|
||||||
|
<i class="{{ entry.icon }}"></i>
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
27
_includes/timeago.html
Normal file
27
_includes/timeago.html
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<!--
|
||||||
|
Date format snippet
|
||||||
|
|
||||||
|
v2.4.1
|
||||||
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
© 2020 Cotes Chung
|
||||||
|
MIT License
|
||||||
|
-->
|
||||||
|
<span class="timeago {% if include.class %}{{ include.class }}{% endif %}"
|
||||||
|
{% if include.tooltip %}
|
||||||
|
data-toggle="tooltip"
|
||||||
|
data-placement="bottom"
|
||||||
|
title="{{ include.date | date: site.data.date_format.tooltip }}"
|
||||||
|
{% endif %}>
|
||||||
|
|
||||||
|
{% assign this_year = site.time | date: "%Y" %}
|
||||||
|
{% assign post_year = include.date | date: "%Y" %}
|
||||||
|
|
||||||
|
{% if post_year == this_year %}
|
||||||
|
{{ include.date | date: site.data.date_format.post.short }}
|
||||||
|
{% else %}
|
||||||
|
{{ include.date | date: site.data.date_format.post.long }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<i class="unloaded">{{ include.date | date_to_xmlschema }}</i>
|
||||||
|
|
||||||
|
</span>
|
||||||
@@ -29,19 +29,20 @@
|
|||||||
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
|
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
|
||||||
|
|
||||||
<div id="topbar-title">
|
<div id="topbar-title">
|
||||||
{% if page.location %}
|
{% if page.layout == 'home' %}
|
||||||
{{- page.location -}}
|
|
||||||
{% elsif page.layout == "home" %}
|
|
||||||
{{- site.title -}}
|
{{- site.title -}}
|
||||||
{% else %}
|
{% elsif page.collection == 'tabs' %}
|
||||||
{{- page.title -}}
|
{{- page.title -}}
|
||||||
|
{% else %}
|
||||||
|
{{- page.layout | capitalize -}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<i id="search-trigger" class="fas fa-search fa-fw"></i>
|
<i id="search-trigger" class="fas fa-search fa-fw"></i>
|
||||||
<span id="search-wrapper" class="align-items-center">
|
<span id="search-wrapper" class="align-items-center">
|
||||||
<i class="fas fa-search fa-fw"></i>
|
<i class="fas fa-search fa-fw"></i>
|
||||||
<input class="form-control" id="search-input" type="search" placeholder="{{ site.data.label.search_hint }}...">
|
<input class="form-control" id="search-input" type="search"
|
||||||
|
aria-label="search" placeholder="{{ site.data.label.search_hint }}...">
|
||||||
<i class="fa fa-times-circle fa-fw" id="search-cleaner"></i>
|
<i class="fa fa-times-circle fa-fw" id="search-cleaner"></i>
|
||||||
</span>
|
</span>
|
||||||
<span id="search-cancel" >Cancel</span>
|
<span id="search-cancel" >Cancel</span>
|
||||||
|
|||||||
@@ -1,27 +1,40 @@
|
|||||||
<!--
|
{% comment %}
|
||||||
The trending tags list
|
The trending tags list
|
||||||
v2.0
|
v2.0
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
© 2019 Cotes Chung
|
© 2019 Cotes Chung
|
||||||
MIT Licensed
|
MIT Licensed
|
||||||
-->
|
{% endcomment %}
|
||||||
|
|
||||||
{% assign MAX = 10 %}
|
{% assign MAX = 10 %}
|
||||||
|
|
||||||
{% capture tags_array %}
|
{% assign size_list = "" | split: "" %}
|
||||||
|
{% assign tag_list = "" | split: "" %}
|
||||||
|
|
||||||
{% for tag in site.tags %}
|
{% for tag in site.tags %}
|
||||||
{{ tag[1] | size }}:{{ tag[0] | replace: ' ', '-' }}
|
{% assign size = tag | last | size %}
|
||||||
|
{% assign size_list = size_list | push: size %}
|
||||||
|
|
||||||
|
{% assign tag_str = tag | first | replace: " ", "-" | append: "::" | append: size %}
|
||||||
|
{% assign tag_list = tag_list | push: tag_str %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endcapture %}
|
|
||||||
|
|
||||||
{% assign trends = tags_array | split: " " | sort | reverse %}
|
{% assign size_list = size_list | sort | reverse %}
|
||||||
{% assign count = 0 %}
|
|
||||||
|
|
||||||
{% for trend in trends %}
|
{% assign tag_list = tag_list | sort_natural %}
|
||||||
{% assign count = count | plus: 1 %}
|
|
||||||
{% assign tag = trend | split: ":" | last %}
|
{% assign trending_tags = "" | split: "" %}
|
||||||
<a class="post-tag" href="{{ site.baseurl }}/tags/{{ tag | downcase }}/">{{ tag | replace: '-', ' ' }}</a>
|
|
||||||
{% if count >= MAX %}
|
{% for size in size_list limit: MAX %}
|
||||||
|
{% for tag_str in tag_list %}
|
||||||
|
{% assign tag = tag_str | split: "::" %}
|
||||||
|
{% assign tag_name = tag | first %}
|
||||||
|
{% assign tag_size = tag | last | plus: 0 %}
|
||||||
|
{% if tag_size == size %}
|
||||||
|
{% unless trending_tags contains tag_name %}
|
||||||
|
{% assign trending_tags = trending_tags | push: tag_name %}
|
||||||
{% break %}
|
{% break %}
|
||||||
|
{% endunless %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|||||||
28
_includes/update-list.html
Normal file
28
_includes/update-list.html
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{% comment %}
|
||||||
|
Get the last 5 posts from lastmod list.
|
||||||
|
v2.2
|
||||||
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
© 2020 Cotes Chung
|
||||||
|
MIT License
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% assign MAX_SIZE = 5 %}
|
||||||
|
|
||||||
|
{% assign all_list = "" | split: "" %}
|
||||||
|
|
||||||
|
{% for post in site.posts %}
|
||||||
|
{% if post.last_modified_at %}
|
||||||
|
{% capture elem %}
|
||||||
|
{{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
|
||||||
|
{% endcapture %}
|
||||||
|
{% assign all_list = all_list | push: elem %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% assign all_list = all_list | sort | reverse %}
|
||||||
|
|
||||||
|
{% assign update_list = "" | split: "" %}
|
||||||
|
|
||||||
|
{% for entry in all_list limit:MAX_SIZE %}
|
||||||
|
{% assign update_list = update_list | push: entry %}
|
||||||
|
{% endfor %}
|
||||||
@@ -10,15 +10,15 @@ layout: page
|
|||||||
<h1 class="pl-lg-2">
|
<h1 class="pl-lg-2">
|
||||||
<i class="far fa-folder-open fa-fw text-muted"></i>
|
<i class="far fa-folder-open fa-fw text-muted"></i>
|
||||||
{{ page.title }}
|
{{ page.title }}
|
||||||
<span class="lead text-muted pl-2">{{ site.categories[page.category] | size }}</span>
|
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<ul class="post-content pl-0">
|
<ul class="post-content pl-0">
|
||||||
{% for post in site.categories[page.category] %}
|
{% for post in page.posts %}
|
||||||
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
||||||
<a href="{{ post.url | absolute_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>
|
||||||
<span class="text-muted small">{{ post.date | date: site.data.date_format.post }}</span>
|
<span class="text-muted small">{{ post.date | date: site.data.date_format.post.long }}</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -9,48 +9,55 @@ layout: compress
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
{% if site.lang %}
|
||||||
|
{% assign lang = site.lang | split: "_" | first %}
|
||||||
|
{% else %}
|
||||||
|
{% assign lang = 'en' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% capture prefer_mode %}
|
{% capture prefer_mode %}
|
||||||
{% if site.theme_mode != "dual" %}
|
{% if site.theme_mode != "dual" %}
|
||||||
mode="{{ site.theme_mode }}"
|
mode="{{ site.theme_mode }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
<html lang="en" {{ prefer_mode }} >
|
<html lang="{{ lang }}" {{ prefer_mode }} >
|
||||||
|
|
||||||
{% include head.html %}
|
{% include head.html %}
|
||||||
|
|
||||||
<body data-spy="scroll" data-target="#toc">
|
<body data-spy="scroll" data-target="#toc">
|
||||||
|
|
||||||
<div id="sidebar" class="d-flex flex-column">
|
<div id="sidebar" class="d-flex flex-column">
|
||||||
{% include sidebar.html %}
|
{% include sidebar.html %}
|
||||||
</div>
|
</div>
|
||||||
<div id="main-wrapper">
|
|
||||||
{% include topbar.html %}
|
{% include topbar.html %}
|
||||||
|
|
||||||
|
<div id="main-wrapper">
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
{% capture _content %}
|
{% include refactor-content.html content=content %}
|
||||||
{{ content }}
|
|
||||||
{% endcapture %}
|
|
||||||
|
|
||||||
{% include fixlinenos.html %}
|
|
||||||
{{ _content }}
|
|
||||||
|
|
||||||
{% include footer.html %}
|
{% include footer.html %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include search-results.html %}
|
{% include search-results.html %}
|
||||||
</div>
|
|
||||||
|
</div> <!-- #main-wrapper -->
|
||||||
|
|
||||||
<div id="mask"></div>
|
<div id="mask"></div>
|
||||||
|
|
||||||
<a id="back-to-top" href="#" class="btn btn-lg btn-box-shadow" role="button">
|
<a id="back-to-top" href="#" aria-label="back-to-top" class="btn btn-lg btn-box-shadow" role="button">
|
||||||
<i class="fas fa-angle-up"></i>
|
<i class="fas fa-angle-up"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if jekyll.environment == 'production' %}
|
{% include search-loader.html %}
|
||||||
|
|
||||||
|
{% if site.google_analytics.id and jekyll.environment == 'production' %}
|
||||||
{% include google-analytics.html %}
|
{% include google-analytics.html %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include search-loader.html %}
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -7,26 +7,67 @@ layout: page
|
|||||||
# MIT Licensed
|
# MIT Licensed
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
{% assign pinned = site.posts | where_exp: "item", "item.pin == true" %}
|
||||||
|
{% assign default = site.posts | where_exp: "item", "item.pin != true" %}
|
||||||
|
{% assign posts = "" | split: "" %}
|
||||||
|
|
||||||
|
<!-- Get pinned posts -->
|
||||||
|
|
||||||
|
{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
|
||||||
|
{% assign pinned_num = pinned.size | minus: offset %}
|
||||||
|
|
||||||
|
{% if pinned_num > 0 %}
|
||||||
|
{% for i in (offset..pinned.size) limit: pinned_num %}
|
||||||
|
{% assign posts = posts | push: pinned[i] %}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
{% assign pinned_num = 0 %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Get default posts -->
|
||||||
|
|
||||||
|
{% assign default_beg = offset | minus: pinned.size %}
|
||||||
|
|
||||||
|
{% if default_beg < 0 %}
|
||||||
|
{% assign default_beg = 0 %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% assign default_num = paginator.posts | size | minus: pinned_num %}
|
||||||
|
{% assign default_end = default_beg | plus: default_num | minus: 1 %}
|
||||||
|
|
||||||
|
{% if default_num > 0 %}
|
||||||
|
{% for i in (default_beg..default_end) %}
|
||||||
|
{% assign posts = posts | push: default[i] %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<div id="post-list">
|
<div id="post-list">
|
||||||
{% for post in paginator.posts %}
|
|
||||||
|
{% for post in posts %}
|
||||||
|
|
||||||
<div class="post-preview">
|
<div class="post-preview">
|
||||||
<h1>
|
<div class="d-flex justify-content-between pr-xl-2">
|
||||||
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
|
<h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1>
|
||||||
</h1>
|
{% if post.pin == true %}
|
||||||
|
<i class="fas fa-thumbtack fa-fw text-muted mt-1 ml-2 mt-xl-2" data-toggle="tooltip" data-placement="left"
|
||||||
|
title="Pinned"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<p>
|
<p>
|
||||||
{{ post.content | strip_html | truncate: 200 | replace: '&', '&' }}
|
{% include no-linenos.html content=post.content %}
|
||||||
|
{{ content | markdownify | strip_html | truncate: 200 }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post-meta text-muted pt-1">
|
<div class="post-meta text-muted">
|
||||||
<!-- posted date -->
|
<!-- posted date -->
|
||||||
<i class="far fa-clock fa-fw"></i>
|
<i class="far fa-clock fa-fw"></i>
|
||||||
<span class="timeago" data-toggle="tooltip" data-placement="bottom"
|
{% include timeago.html date=post.date tooltip=true %}
|
||||||
title="{{ post.date | date: site.data.date_format.tooltip }}">
|
|
||||||
{{ post.date | date: site.data.date_format.post }}
|
|
||||||
<i class="unloaded">{{ post.date | date_to_xmlschema }}</i>
|
|
||||||
</span>
|
|
||||||
<!-- page views -->
|
<!-- page views -->
|
||||||
{% if site.google_analytics.pv.enabled %}
|
{% if site.google_analytics.pv.enabled %}
|
||||||
<i class="far fa-eye fa-fw"></i>
|
<i class="far fa-eye fa-fw"></i>
|
||||||
@@ -36,7 +77,9 @@ layout: page
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- .post-review -->
|
</div> <!-- .post-review -->
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</div> <!-- #post-list -->
|
</div> <!-- #post-list -->
|
||||||
|
|
||||||
{% if paginator.total_pages > 0 %}
|
{% if paginator.total_pages > 0 %}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ layout: default
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-lg-11 col-xl-8">
|
<div class="col-12 col-lg-11 col-xl-8">
|
||||||
<div id="page" class="post pb-5 pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4 pl-xl-3 mb-md-4">
|
<div id="page" class="post pb-5 pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4 mb-md-4">
|
||||||
{% if page.dynamic_title %}
|
{% if page.dynamic_title %}
|
||||||
<h1 class="dynamic-title">{{ page.title }}</h1>
|
<h1 class="dynamic-title">{{ page.title }}</h1>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
|||||||
@@ -16,39 +16,50 @@ layout: default
|
|||||||
<h1 data-toc-skip>{{ page.title }}</h1>
|
<h1 data-toc-skip>{{ page.title }}</h1>
|
||||||
|
|
||||||
<div class="post-meta text-muted d-flex flex-column">
|
<div class="post-meta text-muted d-flex flex-column">
|
||||||
<!-- Published Date and Categoreis -->
|
<!-- Published date and author -->
|
||||||
<div>
|
<div>
|
||||||
<span class="timeago" data-toggle="tooltip" data-placement="bottom"
|
Posted
|
||||||
title="{{ page.date | date: site.data.date_format.tooltip }}">
|
{% include timeago.html date=page.date tooltip=true %}
|
||||||
{{ page.date | date: site.data.date_format.post }}
|
by
|
||||||
<i class="unloaded">{{ page.date | date_to_xmlschema }}</i>
|
<span class="author">
|
||||||
|
{% if page.author %}
|
||||||
|
{{ page.author }}
|
||||||
|
{% else %}
|
||||||
|
{{ site.author }}
|
||||||
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
{% if page.categories.size > 0 %}on{% endif %}
|
|
||||||
{% for category in page.categories %}
|
|
||||||
<a href='{{ site.baseurl }}/categories/{{ category | replace: ' ', '-' | downcase | url_encode }}/'>{{ category }}</a>
|
|
||||||
{%- unless forloop.last -%}, {%- endunless -%}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- lastmod -->
|
||||||
|
{% if page.last_modified_at %}
|
||||||
|
<div>
|
||||||
|
Updated
|
||||||
|
{% include timeago.html date=page.last_modified_at class="lastmod" tooltip=true %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- page views -->
|
<!-- page views -->
|
||||||
{% if site.google_analytics.pv.enabled %}
|
{% if site.google_analytics.pv.enabled %}
|
||||||
<div>
|
<div>
|
||||||
<span id="pv" class="pageviews"><i class="fas fa-spinner fa-spin fa-fw"></i></span> views
|
<span id="pv" class="pageviews"><i class="fas fa-spinner fa-spin fa-fw"></i></span>
|
||||||
|
views
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div> <!-- .post-meta -->
|
</div> <!-- .post-meta -->
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{% if page.image %}
|
{%- capture img_placehodler -%}
|
||||||
<img src="{{ page.image }}">
|
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||||
{% endif %}
|
|
||||||
<!-- Add lozad class into image tags. see: <https://github.com/ApoorvSaxena/lozad.js#usage> -->
|
|
||||||
{% if content contains '<img src=' %}
|
|
||||||
{% capture loading %}
|
|
||||||
{{ "/assets/img/commons/loading.png" | relative_url }}
|
|
||||||
{% endcapture%}
|
{% endcapture%}
|
||||||
{% assign replacement = '<img class="lozad" src=' | append: loading | append: ' data-src=' %}
|
|
||||||
|
{% if page.image %}
|
||||||
|
<img src="{{ img_placehodler }}" data-src="{{ page.image }}" class="post-preview-img">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Using lozad. See: <https://github.com/ApoorvSaxena/lozad.js#usage> -->
|
||||||
|
{% if content contains '<img src=' %}
|
||||||
|
{% assign replacement = '<img src="' | append: img_placehodler | append: '" data-src=' %}
|
||||||
{{ content | replace: '<img src=', replacement }}
|
{{ content | replace: '<img src=', replacement }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
@@ -57,22 +68,21 @@ layout: default
|
|||||||
|
|
||||||
<div class="post-tail-wrapper text-muted">
|
<div class="post-tail-wrapper text-muted">
|
||||||
|
|
||||||
<!-- lastmod -->
|
<!-- categories -->
|
||||||
{% if page.seo.date_modified > page.date %}
|
{% if page.categories.size > 0 %}
|
||||||
<div>
|
<div class="post-meta mb-3">
|
||||||
Updated
|
<i class="far fa-folder-open fa-fw mr-1"></i>
|
||||||
<span class="timeago lastmod"
|
{% for category in page.categories %}
|
||||||
data-toggle="tooltip" data-placement="top"
|
<a href='{{ site.baseurl }}/categories/{{ category | replace: ' ', '-' | downcase | url_encode }}/'>{{ category }}</a>
|
||||||
title="{{ page.seo.date_modified | date: site.data.date_format.tooltip }}">
|
{%- unless forloop.last -%}, {%- endunless -%}
|
||||||
{{ page.seo.date_modified | date: site.data.date_format.post }}
|
{% endfor %}
|
||||||
<i class="unloaded">{{ page.seo.date_modified | date_to_xmlschema}}</i>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Tags -->
|
<!-- tags -->
|
||||||
{% if page.tags.size > 0 %}
|
{% if page.tags.size > 0 %}
|
||||||
<div class="pt-3">
|
<div class="post-tags">
|
||||||
|
<i class="fa fa-tags fa-fw mr-1"></i>
|
||||||
{% for tag in page.tags %}
|
{% for tag in page.tags %}
|
||||||
<a href="{{ site.baseurl }}/tags/{{ tag | replace: ' ', '-' | downcase | url_encode }}/"
|
<a href="{{ site.baseurl }}/tags/{{ tag | replace: ' ', '-' | downcase | url_encode }}/"
|
||||||
class="post-tag no-text-decoration" >
|
class="post-tag no-text-decoration" >
|
||||||
@@ -83,19 +93,12 @@ layout: default
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="post-tail-bottom
|
<div class="post-tail-bottom
|
||||||
d-flex justify-content-between align-items-center pt-5 pb-2">
|
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
||||||
|
{% if site.data.rights.license %}
|
||||||
{% if site.data.right.license %}
|
|
||||||
<div class="license-wrapper">
|
<div class="license-wrapper">
|
||||||
<span class="license-text ml-1 mr-1">
|
This post is licensed under
|
||||||
{{ site.data.right.license.prompt }}
|
<a href="{{ site.data.rights.license.link }}">{{ site.data.rights.license.name }}</a>
|
||||||
<a href="{{ site.data.right.license.link }}">
|
by the author.
|
||||||
{{ site.data.right.license.name }}
|
|
||||||
{% for icon in site.data.right.license.icons %}
|
|
||||||
<i class="{{ icon }}"></i>
|
|
||||||
{% endfor %}
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@@ -107,6 +110,7 @@ layout: default
|
|||||||
|
|
||||||
</div> <!-- .post -->
|
</div> <!-- .post -->
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- #post-wrapper -->
|
</div> <!-- #post-wrapper -->
|
||||||
|
|
||||||
{% include panel.html %}
|
{% include panel.html %}
|
||||||
@@ -114,9 +118,10 @@ layout: default
|
|||||||
</div> <!-- .row -->
|
</div> <!-- .row -->
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="post-extend-wrapper" class="col-12 col-lg-11 col-xl-8">
|
<div class="col-12 col-lg-11 col-xl-8">
|
||||||
|
<div id="post-extend-wrapper" class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
|
||||||
|
|
||||||
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
|
{% include related-posts.html %}
|
||||||
|
|
||||||
{% include post-nav.html %}
|
{% include post-nav.html %}
|
||||||
|
|
||||||
@@ -124,12 +129,10 @@ layout: default
|
|||||||
{% include disqus.html %}
|
{% include disqus.html %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include related-posts.html %}
|
|
||||||
|
|
||||||
</div> <!-- .pl-1 pr-1 -->
|
|
||||||
|
|
||||||
</div> <!-- #post-extend-wrapper -->
|
</div> <!-- #post-extend-wrapper -->
|
||||||
|
|
||||||
|
</div> <!-- .col-* -->
|
||||||
|
|
||||||
</div> <!-- .row -->
|
</div> <!-- .row -->
|
||||||
|
|
||||||
{% include lozad.html %}
|
{% include lozad.html %}
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ layout: page
|
|||||||
<h1 class="pl-lg-2">
|
<h1 class="pl-lg-2">
|
||||||
<i class="fa fa-tag fa-fw text-muted"></i>
|
<i class="fa fa-tag fa-fw text-muted"></i>
|
||||||
{{ page.title }}
|
{{ page.title }}
|
||||||
<span class="lead text-muted pl-2">{{ site.tags[page.tag] | size }}</span>
|
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
||||||
</h1>
|
</h1>
|
||||||
<ul class="post-content pl-0">
|
<ul class="post-content pl-0">
|
||||||
{% for post in site.tags[page.tag] %}
|
{% for post in page.posts %}
|
||||||
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
||||||
<a href="{{ post.url | absolute_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>
|
||||||
<span class="text-muted small">{{ post.date | date: site.data.date_format.post }}</span>
|
<span class="text-muted small">{{ post.date | date: site.data.date_format.post.long }}</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
11
_plugins/posts-lastmod-hook.rb
Normal file
11
_plugins/posts-lastmod-hook.rb
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Check for changed posts
|
||||||
|
Jekyll::Hooks.register :posts, :post_init do |post|
|
||||||
|
|
||||||
|
commit_num = `git rev-list --count HEAD "#{ post.path }"`
|
||||||
|
|
||||||
|
if commit_num.to_i > 1
|
||||||
|
lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`
|
||||||
|
post.data['last_modified_at'] = lastmod_date
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -1,24 +1,29 @@
|
|||||||
---
|
---
|
||||||
title: "Text and Typography"
|
title: Text and Typography
|
||||||
|
author: Cotes Chung
|
||||||
date: 2019-08-08 11:33:00 +0800
|
date: 2019-08-08 11:33:00 +0800
|
||||||
categories: [Blogging, Demo]
|
categories: [Blogging, Demo]
|
||||||
tags: [typography]
|
tags: [typography]
|
||||||
|
math: true
|
||||||
|
image: /assets/img/sample/devices-mockup.png
|
||||||
---
|
---
|
||||||
|
|
||||||
This Jekyll template totally compatible with Markdown syntax. Now, let's take a look for the text and typography in this theme.
|
This post is to show Markdown syntax rendering on [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork), you can also use it as an example of writing. Now, let's start looking at text and typography.
|
||||||
|
|
||||||
|
|
||||||
## Titles
|
## Titles
|
||||||
|
|
||||||
***
|
---
|
||||||
|
|
||||||
# H1
|
# H1
|
||||||
|
|
||||||
<h2 data-toc-skip>H2</h2>
|
<h2 data-toc-skip>H2</h2>
|
||||||
|
|
||||||
<h3 data-toc-skip>H3</h3>
|
<h3 data-toc-skip>H3</h3>
|
||||||
|
|
||||||
#### H4
|
<h4>H4</h4>
|
||||||
|
|
||||||
***
|
---
|
||||||
|
|
||||||
## Paragraph
|
## Paragraph
|
||||||
|
|
||||||
@@ -34,21 +39,37 @@ Beside the lake, beneath the trees,
|
|||||||
|
|
||||||
Fluttering and dancing in the breeze.
|
Fluttering and dancing in the breeze.
|
||||||
|
|
||||||
|
## List
|
||||||
|
|
||||||
|
### Ordered list
|
||||||
|
|
||||||
|
1. first item
|
||||||
|
2. second item
|
||||||
|
3. third item
|
||||||
|
|
||||||
|
### Unordered list
|
||||||
|
|
||||||
|
- item 1
|
||||||
|
- sub item 1
|
||||||
|
- sub item 2
|
||||||
|
|
||||||
|
- item 2
|
||||||
|
|
||||||
## Block Quote
|
## Block Quote
|
||||||
|
|
||||||
> This line to shows the Block Quote.
|
> This line to shows the Block Quote.
|
||||||
|
|
||||||
## Tables
|
## Tables
|
||||||
|
|
||||||
|Company|Contact|Country|
|
| Company | contact | Country |
|
||||||
|:---|:--|---:|
|
|:-----------------------------|:-----------------|--------:|
|
||||||
|Alfreds Futterkiste | Maria Anders | Germany
|
| Alfreds Futterkiste | Maria Anders | Germany |
|
||||||
|Island Trading | Helen Bennett | UK
|
| Island Trading | Helen Bennett | UK |
|
||||||
|Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy
|
| Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |
|
||||||
|
|
||||||
## Link
|
## Link
|
||||||
|
|
||||||
[http://127.0.0.1:4000](http://127.0.0.1:4000)
|
<http://127.0.0.1:4000>
|
||||||
|
|
||||||
|
|
||||||
## Footnote
|
## Footnote
|
||||||
@@ -56,15 +77,47 @@ Fluttering and dancing in the breeze.
|
|||||||
Click the hook will locate the footnote[^footnote].
|
Click the hook will locate the footnote[^footnote].
|
||||||
|
|
||||||
|
|
||||||
## Image
|
## Images
|
||||||
|
|
||||||

|
By default, the image is centered and the image caption can be displayed at the bottom:
|
||||||
|
|
||||||
|

|
||||||
|
_Full screen width and center alignment_
|
||||||
|
|
||||||
|
You can change the size of the picture:
|
||||||
|
|
||||||
|
{: width="400"}
|
||||||
|
_400px image width_
|
||||||
|
|
||||||
|
In addition, you can use class `normal` , `left` and `right` to specify the image position (but in these case, the image caption is prohibited), for example:
|
||||||
|
|
||||||
|
- Normal position
|
||||||
|
|
||||||
|
{: width="350" class="normal"}
|
||||||
|
|
||||||
|
- Float to the left
|
||||||
|
|
||||||
|
{: width="240" class="left"}
|
||||||
|
"A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space."
|
||||||
|
|
||||||
|
- Float to the right
|
||||||
|
|
||||||
|
{: width="240" class="right"}
|
||||||
|
"A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space. A repetitive and meaningless text is used to fill the space."
|
||||||
|
|
||||||
## Inline code
|
## Inline code
|
||||||
|
|
||||||
This is an example of `Inline Code`.
|
This is an example of `Inline Code`.
|
||||||
|
|
||||||
|
## Mathematics
|
||||||
|
|
||||||
|
The mathematics powered by [**MathJax**](https://www.mathjax.org/):
|
||||||
|
|
||||||
|
$$ \sum_{n=1}^\infty 1/n^2 = \frac{\pi^2}{6} $$
|
||||||
|
|
||||||
|
When \\(a \ne 0\\), there are two solutions to \\(ax^2 + bx + c = 0\\) and they are
|
||||||
|
|
||||||
|
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
|
||||||
|
|
||||||
## Code Snippet
|
## Code Snippet
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "Writing a New Post"
|
title: Writing a New Post
|
||||||
|
author: Cotes Chung
|
||||||
date: 2019-08-08 14:10:00 +0800
|
date: 2019-08-08 14:10:00 +0800
|
||||||
categories: [Blogging, Tutorial]
|
categories: [Blogging, Tutorial]
|
||||||
tags: [writing]
|
tags: [writing]
|
||||||
@@ -7,7 +8,7 @@ tags: [writing]
|
|||||||
|
|
||||||
## Naming and Path
|
## Naming and Path
|
||||||
|
|
||||||
Create a new file named with the format `YYYY-MM-DD-title.md` then put it into `_post` of the root directory.
|
Create a new file named `YYYY-MM-DD-TITLE.EXTENSION` and put it in the `_post/` of the root directory. Please note that the `EXTENSION` must be one of `md` and `markdown`. From `v2.4.1`, you can create sub-directories under `_posts/` to categorize posts.
|
||||||
|
|
||||||
## Front Matter
|
## Front Matter
|
||||||
|
|
||||||
@@ -24,68 +25,22 @@ tags: [TAG] # TAG names should always be lowercase
|
|||||||
|
|
||||||
> **Note**: The posts' ***layout*** has been set to `post` by default, so there is no need to add the variable ***layout*** in Front Matter block.
|
> **Note**: The posts' ***layout*** has been set to `post` by default, so there is no need to add the variable ***layout*** in Front Matter block.
|
||||||
|
|
||||||
- **Timezone of date**
|
### Timezone of date
|
||||||
|
|
||||||
In order to accurately record the release date of a post, you should not only setup the `timezone` of `_config.yml` but also provide the the post's timezone in field `date` of its Front Matter block. Format: `+/-TTTT`, e.g. `+0800`.
|
In order to accurately record the release date of a post, you should not only setup the `timezone` of `_config.yml` but also provide the the post's timezone in field `date` of its Front Matter block. Format: `+/-TTTT`, e.g. `+0800`.
|
||||||
|
|
||||||
- **Categories and Tags**
|
### Categories and Tags
|
||||||
|
|
||||||
The `categories` of each post is designed to contain up to two elements, and the number of elements in `tags` can be zero to infinity.
|
The `categories` of each post is designed to contain up to two elements, and the number of elements in `tags` can be zero to infinity. For instance:
|
||||||
|
|
||||||
The list of posts belonging to the same category/tag is recorded on a separate page. The number of such *category*/*tag* type pages is equal to the number of `categories`/`tags` for all posts, they must match perfectly.
|
|
||||||
|
|
||||||
let's say there is a post with front matter:
|
|
||||||
```yaml
|
```yaml
|
||||||
categories: [Animal, Insect]
|
categories: [Animal, Insect]
|
||||||
tags: bee
|
tags: [bee]
|
||||||
```
|
```
|
||||||
|
|
||||||
then we should have two *category* type pages placed in folder `categories` of root and one *tag* type page placed in folder `tags` of root:
|
|
||||||
```terminal
|
|
||||||
jekyll-theme-chirpy
|
|
||||||
├── categories
|
|
||||||
│ ├── animal.html
|
|
||||||
│ └── tutorial.html
|
|
||||||
└── tags
|
|
||||||
└── bee.html
|
|
||||||
```
|
|
||||||
|
|
||||||
and the content of a *category* type page is
|
|
||||||
```yaml
|
|
||||||
---
|
|
||||||
layout: category
|
|
||||||
title: CATEGORY_NAME # e.g. Insect
|
|
||||||
category: CATEGORY_NAME # e.g. Insect
|
|
||||||
---
|
|
||||||
```
|
|
||||||
|
|
||||||
the content of a *tag* type page is
|
|
||||||
```yaml
|
|
||||||
---
|
|
||||||
layout: tag
|
|
||||||
title: TAG_NAME # e.g. bee
|
|
||||||
tag: TAG_NAME # e.g. bee
|
|
||||||
---
|
|
||||||
```
|
|
||||||
|
|
||||||
With the increasing number of posts, the number of categories and tags will increase several times! If we still manually create these *category*/*tag* type files, it will obviously be a super time-consuming job, and it is very likely to miss some of them(i.e. when you click on the missing `category` or `tag` link from a post or somewhere, it will complain to you '404'). The good news is that we got a lovely script tool `_scripts/py/pages_generator.py` to finish the boring task. Basically we will use it via `tools/init.sh` instead of running it separately. Check out its use case [here]({{ "/posts/getting-started/#option-1-built-by-github-pages" | relative_url }}).
|
|
||||||
|
|
||||||
- **Last modified date**
|
|
||||||
|
|
||||||
The last modified date of the posts is recorded as `seo.date_modified`, for example:
|
|
||||||
```yaml
|
|
||||||
---
|
|
||||||
seo:
|
|
||||||
date_modified: 2020-01-04 17:05:41 +0800
|
|
||||||
---
|
|
||||||
```
|
|
||||||
|
|
||||||
This date is equal to the lastest git-commit date of the post file and can be automatically generated by the tool script `_scripts/py/update_posts_lastmod.py`. Similar to the other script `pages_generator.py` mentioned above, it is also be called from `tools/init.sh`, so it doesn't have to be used separately.
|
|
||||||
|
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
By default, the **T**able **o**f **C**ontents (TOC) is displayed on the right panel of the post. If you want to turn it off globally, go to `_config.yml` and set the variable `toc` to `false`. If you want to turn off TOC for specific post, add the following to post's [Front Matter](https://jekyllrb.com/docs/front-matter/):
|
By default, the **T**able **o**f **C**ontents (TOC) is displayed on the right panel of the post. If you want to turn it off globally, go to `_config.yml` and set the value of variable `toc` to `false`. If you want to turn off TOC for specific post, add the following to post's [Front Matter](https://jekyllrb.com/docs/front-matter/):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
@@ -93,7 +48,6 @@ toc: false
|
|||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Comments
|
## Comments
|
||||||
|
|
||||||
Similar to TOC, the [Disqus](https://disqus.com/) comments is loaded by default in each post, and the global switch is defined by variable `comments` in file `_config.yml` . If you want to close the comment for specific post, add the following to the **Front Matter** of the post:
|
Similar to TOC, the [Disqus](https://disqus.com/) comments is loaded by default in each post, and the global switch is defined by variable `comments` in file `_config.yml` . If you want to close the comment for specific post, add the following to the **Front Matter** of the post:
|
||||||
@@ -104,6 +58,35 @@ comments: false
|
|||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Mathematics
|
||||||
|
|
||||||
|
For website performance reasons, the mathematical feature won't be loaded by default. But it can be enabled by:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
math: true
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
## Preview Image
|
||||||
|
|
||||||
|
If you want to add an image to the top of the post contents, specify the url for the image by:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
image: /path/to/image-file
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
## Pinned Posts
|
||||||
|
|
||||||
|
You can pin one or more posts to the top of the home page, and the fixed posts are sorted in reverse order according to their release date. Enable by:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
pin: true
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
## Code Block
|
## Code Block
|
||||||
|
|
||||||
@@ -115,7 +98,7 @@ This is a common code snippet, without syntax highlight and line number.
|
|||||||
|
|
||||||
## Specific Language
|
## Specific Language
|
||||||
|
|
||||||
Using <code class="highlighter-rouge">```Language</code> you will get code snippets with line Numbers and syntax highlight.
|
Using <code class="highlighter-rouge">```language</code> you will get code snippets with line numbers and syntax highlight.
|
||||||
|
|
||||||
> **Note**: The Jekyll style `{% raw %}{%{% endraw %} highlight LANGUAGE {% raw %}%}{% endraw %}` or `{% raw %}{%{% endraw %} highlight LANGUAGE linenos {% raw %}%}{% endraw %}` are not allowed to be used in this theme !
|
> **Note**: The Jekyll style `{% raw %}{%{% endraw %} highlight LANGUAGE {% raw %}%}{% endraw %}` or `{% raw %}{%{% endraw %} highlight LANGUAGE linenos {% raw %}%}{% endraw %}` are not allowed to be used in this theme !
|
||||||
|
|
||||||
@@ -128,7 +111,7 @@ items:
|
|||||||
quantity: 4
|
quantity: 4
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Liquid codes
|
### Liquid Codes
|
||||||
|
|
||||||
If you want to display the **Liquid** snippet, surround the liquid code with `{% raw %}{%{% endraw %} raw {%raw%}%}{%endraw%}` and `{% raw %}{%{% endraw %} endraw {%raw%}%}{%endraw%}` .
|
If you want to display the **Liquid** snippet, surround the liquid code with `{% raw %}{%{% endraw %} raw {%raw%}%}{%endraw%}` and `{% raw %}{%{% endraw %} endraw {%raw%}%}{%endraw%}` .
|
||||||
|
|
||||||
@@ -141,5 +124,6 @@ If you want to display the **Liquid** snippet, surround the liquid code with `{%
|
|||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
## Learn More
|
## Learn More
|
||||||
|
|
||||||
For more knowledge about Jekyll posts, visit the [Jekyll Docs: Posts](https://jekyllrb.com/docs/posts/).
|
For more knowledge about Jekyll posts, visit the [Jekyll Docs: Posts](https://jekyllrb.com/docs/posts/).
|
||||||
|
|
||||||
|
|||||||
@@ -1,192 +1,131 @@
|
|||||||
---
|
---
|
||||||
title: Getting Started
|
title: Getting Started
|
||||||
|
author: Cotes Chung
|
||||||
date: 2019-08-09 20:55:00 +0800
|
date: 2019-08-09 20:55:00 +0800
|
||||||
categories: [Blogging, Tutorial]
|
categories: [Blogging, Tutorial]
|
||||||
tags: [getting started]
|
tags: [getting started]
|
||||||
|
pin: true
|
||||||
---
|
---
|
||||||
|
|
||||||
## Preparation
|
|
||||||
|
|
||||||
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installtion of basic environment (Ruby, RubyGem, Bundler and Jekyll). In order to use the script tools to save time, we also need to install [Python](https://www.python.org/downloads/)(version 3.5 or abover) and [ruamel.yaml](https://pypi.org/project/ruamel.yaml/).
|
## Installation
|
||||||
|
|
||||||
In addition, if your machine is running Debian or macOS, make sure you have the [GNU coreutils](https://www.gnu.org/software/coreutils/) installed. Otherwise, get it by:
|
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub, rename the repository to `USERNAME.github.io` (where `USERNAME` is your GitHub username), and then open terminal and clone the fork to local by:
|
||||||
|
|
||||||
* Debian
|
```terminal
|
||||||
|
$ git clone https://github.com/USERNAME/USERNAME.github.io.git -b master --single-branch
|
||||||
```console
|
|
||||||
$ sudo apt-get install coreutils
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* macOS
|
### Setting up the local envrionment
|
||||||
|
|
||||||
```console
|
If you would like to run or build the project on your local machine, please follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
|
||||||
$ brew install coreutils
|
|
||||||
```
|
|
||||||
|
|
||||||
|
Before running or building for the first time, please complete the installation of the Jekyll plugins. Go to the root directory of project and run:
|
||||||
## Install Jekyll Plugins
|
|
||||||
|
|
||||||
Go to the root of repo and run:
|
|
||||||
|
|
||||||
```terminal
|
```terminal
|
||||||
$ bundle install
|
$ bundle install
|
||||||
```
|
```
|
||||||
|
|
||||||
`bundle` will install all the dependent Jekyll Plugins listed in file `Gemfile` automatically.
|
`bundle` will automatically install all the dependencies specified by `Gemfile`.
|
||||||
|
|
||||||
|
### Setting up Docker environment (optional)
|
||||||
|
|
||||||
## File Structure
|
If you're a loyal fan of [**Docker**](https://www.docker.com/) or just too lazy to install the packages mentioned in [_Setting up the local envrionment_](#setting-up-the-local-envrionment), please make sure you have **Docker Engine** installed and running, and then get Docker image `jekyll/jekyll` from Docker Hub by the following command:
|
||||||
|
|
||||||
The main files and related brief introductions are listed below.
|
```console
|
||||||
|
$ docker pull jekyll/jekyll
|
||||||
```sh
|
|
||||||
jekyll-theme-chirpy/
|
|
||||||
├── _data
|
|
||||||
├── _includes
|
|
||||||
├── _layouts
|
|
||||||
├── _posts # posts stay here
|
|
||||||
├── _scripts
|
|
||||||
├── .travis.yml # remove it
|
|
||||||
├── .github # remove this, too
|
|
||||||
├── assets
|
|
||||||
├── tabs
|
|
||||||
│ └── about.md # the ABOUT page
|
|
||||||
├── .gitignore
|
|
||||||
├── 404.html
|
|
||||||
├── Gemfile
|
|
||||||
├── LICENSE
|
|
||||||
├── README.md
|
|
||||||
├── _config.yml # configuration file
|
|
||||||
├── tools # script tools
|
|
||||||
├── feed.xml
|
|
||||||
├── index.html
|
|
||||||
├── robots.txt
|
|
||||||
└── sitemap.xml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
As mentioned above, some files or directories should be removed from your repo:
|
### Initialization
|
||||||
|
|
||||||
- .travis.yml
|
Go to the root directory of the project and start initialization:
|
||||||
- .github
|
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
Basically, go to `_config.yml` and customize the variables as needed, some of them are typical options:
|
|
||||||
|
|
||||||
* `url`
|
|
||||||
|
|
||||||
Set to your website url and there should be no slash symbol at the tail. Format: `<protocol>://<domain>`.
|
|
||||||
|
|
||||||
|
|
||||||
* `avatar`
|
|
||||||
|
|
||||||
It defines the image file location of avatar. The sample image is `/assets/img/sample/avatar.jpg`, and should be replaced by your own one(a square image). Notice that a huge image file will increase the load time of your site, so keep your avatar image size as samll as possible(may be *<https://tinypng.com/>* will help).
|
|
||||||
|
|
||||||
* `timezone`
|
|
||||||
|
|
||||||
To ensure that the posts' release date matches the city you live in, please modify the field `timezone` correctly. A list of all available values can be found on [TimezoneConverter](http://www.timezoneconverter.com/cgi-bin/findzone/findzone) or [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
||||||
|
|
||||||
* `theme_mode`
|
|
||||||
|
|
||||||
There are three options for the theme color scheme:
|
|
||||||
|
|
||||||
- **dual** - The default color scheme will follow the system settings, but if the system does not support dark mode, or the browser does not support `Media Queries Level 5`, the theme will be displayed as `light` mode by default. Anyway, the bottom left corner of the Sidebar will provide a button for users to switch color schemes.
|
|
||||||
|
|
||||||
- **dark** - Always show dark mode.
|
|
||||||
- **light** - Always show light mode.
|
|
||||||
|
|
||||||
|
|
||||||
## Run Locally
|
|
||||||
|
|
||||||
You may want to preview the site before publishing, so just run the script tool:
|
|
||||||
|
|
||||||
```terminal
|
|
||||||
$ bash tools/run.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Open a brower and visit <http://localhost:4000>.
|
|
||||||
|
|
||||||
Few days later, you may find that the file changes does not refresh in real time by using `run.sh`. Don't worry, the advanced option `-r` (or `--realtime`) will solve this problem, but it requires [**fswatch**](http://emcrisostomo.github.io/fswatch/) to be installed on your machine.
|
|
||||||
|
|
||||||
## Deploying to GitHub Pages
|
|
||||||
|
|
||||||
Before the deployment begins, ensure the `url` in file `_config.yml` has been set to `https://<username>.github.io`(or the custom domain, if you have. e.g. `https://yourdomain.com`). What's more, if you prefer to the [Project site](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites), change `baseurl` of file `_config.yml` to your project name, starting with a slash. e.g. `/project`.
|
|
||||||
|
|
||||||
|
|
||||||
### Option 1: Built by GitHub Pages
|
|
||||||
|
|
||||||
By deploying the site in this way, you're allowed to push the source code directly to the remote.
|
|
||||||
|
|
||||||
> **Note**: If you want to use any third-party Jekyll plugins that not in [this list](https://pages.github.com/versions/), stop reading the current approach and go to [*Option 2: Build locally*](#option-2-build-locally).
|
|
||||||
|
|
||||||
**1**. Rename the repository to:
|
|
||||||
|
|
||||||
|Site Type | Repo's Name|
|
|
||||||
|:---|:---|
|
|
||||||
|User or Organization | `<username>.github.io`|
|
|
||||||
|Project| any one except `<username>.github.io`, let's say `project`|
|
|
||||||
|
|
||||||
**2**. Commit the changes of the repo first, then run the initialization script:
|
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ bash tools/init.sh
|
$ bash tools/init.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
> Please note that the *Recent Update* list requires the latest git-log date of posts, thus make sure the changes in `_posts` have been committed before running this command.
|
> **Note**: If you not intend to deploy it on GitHub Pages, append parameter option `--no-gh` at the end of the above command.
|
||||||
|
|
||||||
it will automatically generates the *Latest Modified Date* and *Categories / Tags* page for the posts and submit a commit. Its output is similar to the following log:
|
What it does is:
|
||||||
|
|
||||||
|
1. Remove some files or directories from your repository:
|
||||||
|
|
||||||
|
- `.travis.yml`
|
||||||
|
- files under `_posts`
|
||||||
|
- folder `docs`
|
||||||
|
|
||||||
|
2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`.
|
||||||
|
|
||||||
|
3. Automatically create a commit to save the changes.
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
Generally, go to `_config.yml` and configure the variables as needed. Some of them are typical options:
|
||||||
|
|
||||||
|
- `url`
|
||||||
|
- `avatar`
|
||||||
|
- `timezone`
|
||||||
|
- `theme_mode`
|
||||||
|
|
||||||
|
### Run Locally
|
||||||
|
|
||||||
|
You may want to preview the site contents before publishing, so just run it by:
|
||||||
|
|
||||||
```terminal
|
```terminal
|
||||||
[INFO] Success to update lastmod for 4 post(s).
|
$ bundle exec jekyll s
|
||||||
[INFO] Succeed! 3 category-pages created.
|
```
|
||||||
[INFO] Succeed! 4 tag-pages created.
|
|
||||||
[Automation] Updated the Categories, Tags, Lastmod for post(s).
|
Then open a browser and visit to <http://localhost:4000>.
|
||||||
11 files changed, 46 insertions(+), 3 deletions(-)
|
|
||||||
...
|
### Run on Docker
|
||||||
Updated the Categories, Tags, Lastmod for post(s).
|
|
||||||
|
Run the site on Docker with the following command:
|
||||||
|
|
||||||
|
```terminal
|
||||||
|
$ docker run --rm -it \
|
||||||
|
--volume="$PWD:/srv/jekyll" \
|
||||||
|
-p 4000:4000 jekyll/jekyll \
|
||||||
|
jekyll serve
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
**3**. Push the changes to `origin/master` then go to GitHub website and enable GitHub Pages service for the repo.
|
### Deployment
|
||||||
|
|
||||||
**4**. Check it out:
|
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [_project site_](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash. For example, `/project`.
|
||||||
|
|
||||||
|Site Type | Site URL |
|
Assuming you have already gone through the [initialization](#initialization), you can now choose ONE of the following methods to deploy your website.
|
||||||
|:---|:---|
|
|
||||||
|User or Organization | `https://<username>.github.io/`|
|
|
||||||
|Project| `https://<username>.github.io/project/`|
|
|
||||||
|
|
||||||
|
#### Deploy on GitHub Pages
|
||||||
|
|
||||||
### Option 2: Build Locally
|
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the Pages service.
|
||||||
|
|
||||||
For security reasons, GitHub Pages runs on `safe` mode, which means the third-party Jekyll plugins or custom scripts won't work. If you want to use any another plugins that not in the [whitelist](https://pages.github.com/versions/), **you have to generate the site locally rather than on GitHub Pages**.
|
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
|
||||||
|
|
||||||
**1**. Browse to GitHub website, create a brand new repo named:
|
2. Browse to your repo's landing page on GitHub and select the branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) throught _Settings_ → _Options_ → _GitHub Pages_:
|
||||||
|
{: width="650" class="normal"}
|
||||||
|
|
||||||
|Site Type | Repo's Name|
|
3. Visit your website at the address indicated by GitHub.
|
||||||
|:---|:---|
|
|
||||||
|User or Organization | `<username>.github.io`|
|
|
||||||
|Project| any one except `<username>.github.io`, let's say `project`|
|
|
||||||
|
|
||||||
and clone it.
|
#### Deploy on Other Platforms
|
||||||
|
|
||||||
**2**. In the root of the source project, build your site by:
|
On platforms other than GitHub, we cannot enjoy the convenience of **GitHub Actions**. Therefore, we should build the site locally (or on some other 3rd-party CI platform) and then put the site files on the server.
|
||||||
|
|
||||||
|
Go to the root of the source project, build your site by:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ bash tools/build.sh -d /path/to/local/project/
|
$ JEKYLL_ENV=production bundle exec jekyll b
|
||||||
```
|
```
|
||||||
|
|
||||||
The generated static files will be placed in the root of `/path/to/local/project`. Commit and push the changes to the `master` branch on GitHub.
|
Or, build the site with Docker by:
|
||||||
|
|
||||||
**3**. Go to GitHub website and enable Pages service for the new repository.
|
```terminal
|
||||||
|
$ docker run -it --rm \
|
||||||
|
--env JEKYLL_ENV=production \
|
||||||
|
--volume="$PWD:/srv/jekyll" \
|
||||||
|
jekyll/jekyll \
|
||||||
|
jekyll build
|
||||||
|
```
|
||||||
|
|
||||||
**4**. Visit at:
|
Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to your web server.
|
||||||
|
|
||||||
|Site Type | Site URL |
|
|
||||||
|:---|:---|
|
|
||||||
|User or Organization | `https://<username>.github.io/`|
|
|
||||||
|Project| `https://<username>.github.io/project/`|
|
|
||||||
|
|
||||||
and enjoy!
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "Customize the Favicon"
|
title: Customize the Favicon
|
||||||
|
author: Cotes Chung
|
||||||
date: 2019-08-11 00:34:00 +0800
|
date: 2019-08-11 00:34:00 +0800
|
||||||
categories: [Blogging, Tutorial]
|
categories: [Blogging, Tutorial]
|
||||||
tags: [favicon]
|
tags: [favicon]
|
||||||
@@ -8,19 +9,31 @@ toc: false
|
|||||||
|
|
||||||
In [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/), the image files of [Favicons](https://www.favicon-generator.org/about/) are placed in `assets/img/favicons/`. You may need to replace them with your own. So let's see how to customize these Favicons.
|
In [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/), the image files of [Favicons](https://www.favicon-generator.org/about/) are placed in `assets/img/favicons/`. You may need to replace them with your own. So let's see how to customize these Favicons.
|
||||||
|
|
||||||
Whit a square image (PNG, JPG or GIF) in hand, open the site [*Favicon & App Icon Generator*](https://www.favicon-generator.org/) and upload your original image.
|
With a square image (PNG, JPG or GIF) in hand, open the site [*Favicon & App Icon Generator*](https://www.favicon-generator.org/) and upload your original image.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Click button <kbd>Create Favicon</kbd> and wait a moment for the website to generate the icons of various sizes automatically.
|
Click button <kbd>Create Favicon</kbd> and wait a moment for the website to generate the icons of various sizes automatically.
|
||||||
|
|
||||||

|
{: width="600"}
|
||||||
|
|
||||||
Download the generated package, unzip and delete the following two from the extracted files:
|
Download the generated package, unzip and delete the following two from the extracted files:
|
||||||
|
|
||||||
- browserconfig.xml
|
- browserconfig.xml
|
||||||
- manifest.json
|
- manifest.json
|
||||||
|
|
||||||
Now, copy the rest image files (`.PNG` and `.ICO`) to cover the original one in folder `assets/img/favicons/`.
|
Now, copy the remaining image files (`.PNG` and `.ICO`) from the extracted `.zip` file to cover the original files in the folder `assets/img/favicons/`.
|
||||||
|
|
||||||
Lastly, don't forget to rebuild your site so that the icon becomes your custom edition.
|
The following table helps you understand the changes to the icon file:
|
||||||
|
|
||||||
|
> ✓ means keep, ✗ means delete.
|
||||||
|
|
||||||
|
| File(s) | From Favicon & App Icon Generator | From Chirpy |
|
||||||
|
|---------------------|:---------------------------------:|:-----------:|
|
||||||
|
| `*.PNG` | ✓ | ✗ |
|
||||||
|
| `*.ICO` | ✓ | ✗ |
|
||||||
|
| `browserconfig.xml` | ✗ | ✓ |
|
||||||
|
| `manifest.json` | ✗ | ✓ |
|
||||||
|
|
||||||
|
|
||||||
|
The next time you build the site, the icon will be replaced with a customized edition.
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Automatic invokes all initial scripts for project.
|
|
||||||
v2.0
|
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
© 2018-2019 Cotes Chung
|
|
||||||
Licensed under MIT
|
|
||||||
"""
|
|
||||||
|
|
||||||
import update_posts_lastmod
|
|
||||||
import pages_generator
|
|
||||||
|
|
||||||
|
|
||||||
update_posts_lastmod
|
|
||||||
|
|
||||||
pages_generator
|
|
||||||
@@ -1,205 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
'''
|
|
||||||
Generates HTML pages for Categories and Tags in posts.
|
|
||||||
|
|
||||||
Dependencies:
|
|
||||||
- git
|
|
||||||
- ruamel.yaml
|
|
||||||
|
|
||||||
v2.0
|
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
© 2018-2019 Cotes Chung
|
|
||||||
MIT License
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from ruamel.yaml import YAML
|
|
||||||
from utils.common import get_yaml
|
|
||||||
from utils.common import get_makrdown_files
|
|
||||||
from utils.common import check_py_version
|
|
||||||
|
|
||||||
|
|
||||||
DRAFTS_DIR = '_drafts'
|
|
||||||
POSTS_DIR = ['_posts']
|
|
||||||
|
|
||||||
CATEGORIES_DIR = 'categories'
|
|
||||||
CATEGORY_LAYOUT = 'category'
|
|
||||||
|
|
||||||
TAG_DIR = 'tags'
|
|
||||||
TAG_LAYOUT = 'tag'
|
|
||||||
|
|
||||||
LEVEL = 3 # Tree level for current script file.
|
|
||||||
|
|
||||||
|
|
||||||
def help():
|
|
||||||
print("Usage: "
|
|
||||||
" python pages_generator.py [Option]\n\n"
|
|
||||||
"Options:\n"
|
|
||||||
" -d, --drafts Enable drafts\n"
|
|
||||||
" -v, --verbose Print verbose logs\n")
|
|
||||||
|
|
||||||
|
|
||||||
def get_path(dir):
|
|
||||||
path = os.path.abspath(__file__)
|
|
||||||
count = LEVEL
|
|
||||||
r_index = len(path)
|
|
||||||
while r_index > 0:
|
|
||||||
r_index -= 1
|
|
||||||
if (path[r_index] == '/' or path[r_index] == '\\'):
|
|
||||||
count -= 1
|
|
||||||
if count == 0:
|
|
||||||
return path[:r_index + 1] + dir
|
|
||||||
|
|
||||||
|
|
||||||
def get_categories():
|
|
||||||
all_categories = []
|
|
||||||
yaml = YAML()
|
|
||||||
|
|
||||||
for dir in POSTS_DIR:
|
|
||||||
path = get_path(dir)
|
|
||||||
posts = get_makrdown_files(path)
|
|
||||||
|
|
||||||
for file in posts:
|
|
||||||
|
|
||||||
meta = yaml.load(get_yaml(file)[0])
|
|
||||||
|
|
||||||
if 'category' in meta:
|
|
||||||
if type(meta['category']) == list:
|
|
||||||
err_msg = (
|
|
||||||
"[Error] File {} 'category' type"
|
|
||||||
" can not be LIST!").format(file)
|
|
||||||
raise Exception(err_msg)
|
|
||||||
else:
|
|
||||||
if meta['category'] not in all_categories:
|
|
||||||
all_categories.append(meta['category'])
|
|
||||||
else:
|
|
||||||
if 'categories' in meta:
|
|
||||||
if type(meta['categories']) == str:
|
|
||||||
error_msg = (
|
|
||||||
"[Error] File {} 'categories' type"
|
|
||||||
" can not be STR!").format(file)
|
|
||||||
raise Exception(error_msg)
|
|
||||||
|
|
||||||
for ctg in meta['categories']:
|
|
||||||
if ctg not in all_categories:
|
|
||||||
all_categories.append(ctg)
|
|
||||||
else:
|
|
||||||
err_msg = (
|
|
||||||
"[Error] File:{} at least "
|
|
||||||
"have one category.").format(file)
|
|
||||||
print(err_msg)
|
|
||||||
|
|
||||||
return all_categories
|
|
||||||
|
|
||||||
|
|
||||||
def generate_category_pages(is_verbose):
|
|
||||||
categories = get_categories()
|
|
||||||
|
|
||||||
if len(categories) <= 0:
|
|
||||||
return
|
|
||||||
|
|
||||||
path = get_path(CATEGORIES_DIR)
|
|
||||||
|
|
||||||
if os.path.exists(path):
|
|
||||||
shutil.rmtree(path)
|
|
||||||
|
|
||||||
os.makedirs(path)
|
|
||||||
|
|
||||||
for category in categories:
|
|
||||||
new_page = path + '/' + category.replace(' ', '-').lower() + '.html'
|
|
||||||
with open(new_page, 'w+', encoding='utf-8') as html:
|
|
||||||
html.write("---\n")
|
|
||||||
html.write("layout: {}\n".format(CATEGORY_LAYOUT))
|
|
||||||
html.write("title: {}\n".format(category))
|
|
||||||
html.write("category: {}\n".format(category))
|
|
||||||
html.write("---")
|
|
||||||
|
|
||||||
if is_verbose:
|
|
||||||
print("[INFO] Created page: " + new_page)
|
|
||||||
|
|
||||||
change = subprocess.getoutput("git status categories -s")
|
|
||||||
if change:
|
|
||||||
print("[INFO] Succeed! {} category-pages created."
|
|
||||||
.format(len(categories)))
|
|
||||||
|
|
||||||
|
|
||||||
def get_all_tags():
|
|
||||||
all_tags = []
|
|
||||||
yaml = YAML()
|
|
||||||
|
|
||||||
for dir in POSTS_DIR:
|
|
||||||
path = get_path(dir)
|
|
||||||
posts = get_makrdown_files(path)
|
|
||||||
|
|
||||||
for file in posts:
|
|
||||||
meta = yaml.load(get_yaml(file)[0])
|
|
||||||
|
|
||||||
if 'tags' in meta:
|
|
||||||
for tag in meta['tags']:
|
|
||||||
if tag not in all_tags:
|
|
||||||
all_tags.append(tag)
|
|
||||||
else:
|
|
||||||
raise Exception("Didn't find 'tags' in \
|
|
||||||
post '{}' !".format(file))
|
|
||||||
|
|
||||||
return all_tags
|
|
||||||
|
|
||||||
|
|
||||||
def generate_tag_pages(is_verbose):
|
|
||||||
all_tags = get_all_tags()
|
|
||||||
|
|
||||||
if len(all_tags) <= 0:
|
|
||||||
return
|
|
||||||
|
|
||||||
tag_path = get_path(TAG_DIR)
|
|
||||||
|
|
||||||
if os.path.exists(tag_path):
|
|
||||||
shutil.rmtree(tag_path)
|
|
||||||
|
|
||||||
os.makedirs(tag_path)
|
|
||||||
|
|
||||||
for tag in all_tags:
|
|
||||||
tag_page = tag_path + '/' + tag.replace(' ', '-').lower() + '.html'
|
|
||||||
with open(tag_page, 'w+', encoding='utf-8') as html:
|
|
||||||
html.write("---\n")
|
|
||||||
html.write("layout: {}\n".format(TAG_LAYOUT))
|
|
||||||
html.write("title: {}\n".format(tag))
|
|
||||||
html.write("tag: {}\n".format(tag))
|
|
||||||
html.write("---")
|
|
||||||
|
|
||||||
if is_verbose:
|
|
||||||
print("[INFO] Created page: " + tag_page)
|
|
||||||
|
|
||||||
change = subprocess.getoutput("git status tags -s")
|
|
||||||
if change:
|
|
||||||
print("[INFO] Succeed! {} tag-pages created.".format(len(all_tags)))
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
check_py_version()
|
|
||||||
|
|
||||||
is_verbose = False
|
|
||||||
|
|
||||||
if len(sys.argv) > 1:
|
|
||||||
for arg in sys.argv:
|
|
||||||
if arg != sys.argv[0]:
|
|
||||||
if arg == '-d' or arg == '--drafts':
|
|
||||||
POSTS_DIR.insert(0, DRAFTS_DIR)
|
|
||||||
elif arg == '-v' or arg == '--verbose':
|
|
||||||
is_verbose = True
|
|
||||||
else:
|
|
||||||
help()
|
|
||||||
return
|
|
||||||
|
|
||||||
generate_category_pages(is_verbose)
|
|
||||||
generate_tag_pages(is_verbose)
|
|
||||||
|
|
||||||
|
|
||||||
main()
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ruamel.yaml==0.16.5
|
|
||||||
ruamel.yaml.clib==0.1.2
|
|
||||||
@@ -1,174 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Update (or create if not existed) field 'seo.date_modified'
|
|
||||||
in posts' Front Matter by their latest git commit date.
|
|
||||||
|
|
||||||
Dependencies:
|
|
||||||
- git
|
|
||||||
- ruamel.yaml
|
|
||||||
|
|
||||||
v2.0
|
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
© 2018-2019 Cotes Chung
|
|
||||||
Licensed under MIT
|
|
||||||
"""
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import getopt
|
|
||||||
import subprocess
|
|
||||||
import shutil
|
|
||||||
import datetime
|
|
||||||
import time
|
|
||||||
|
|
||||||
from enum import Enum
|
|
||||||
from ruamel.yaml import YAML
|
|
||||||
|
|
||||||
from utils.common import get_yaml
|
|
||||||
from utils.common import get_makrdown_files
|
|
||||||
from utils.common import check_py_version
|
|
||||||
|
|
||||||
|
|
||||||
Date = Enum('Date', ('GIT', 'FS'))
|
|
||||||
|
|
||||||
POSTS_PATH = '_posts'
|
|
||||||
|
|
||||||
|
|
||||||
def help():
|
|
||||||
print("Usage: "
|
|
||||||
" python update_posts_lastmod.py [options]\n"
|
|
||||||
"Options:\n"
|
|
||||||
" -f, --file <file path> Read a file.\n"
|
|
||||||
" -d, --dir <directory path> Read from a directory.\n"
|
|
||||||
" -h, --help Print help information\n"
|
|
||||||
" -v, --verbose Print verbose logs\n"
|
|
||||||
" -t, --datetime < git | fs > Chose post's datetime source, "
|
|
||||||
"'git' for git-log, 'fs' for filesystem, default to 'git'.\n")
|
|
||||||
|
|
||||||
|
|
||||||
def update_lastmod(posts, verbose, date):
|
|
||||||
count = 0
|
|
||||||
yaml = YAML()
|
|
||||||
|
|
||||||
for post in posts:
|
|
||||||
|
|
||||||
lastmod = ''
|
|
||||||
|
|
||||||
if date == Date.GIT:
|
|
||||||
git_log_count = subprocess.getoutput(
|
|
||||||
"git log --pretty=%ad \"{}\" | wc -l".format(post))
|
|
||||||
|
|
||||||
if git_log_count == "1":
|
|
||||||
continue
|
|
||||||
|
|
||||||
git_lastmod = subprocess.getoutput(
|
|
||||||
"git log -1 --pretty=%ad --date=iso \"{}\"".format(post))
|
|
||||||
|
|
||||||
if not git_lastmod:
|
|
||||||
continue
|
|
||||||
|
|
||||||
lates_commit = subprocess.check_output(
|
|
||||||
['git', 'log', '-1', '--pretty=%B', post]).decode('utf-8')
|
|
||||||
|
|
||||||
if "[Automation]" in lates_commit and "Lastmod" in lates_commit:
|
|
||||||
continue
|
|
||||||
|
|
||||||
lastmod = git_lastmod
|
|
||||||
|
|
||||||
elif date == Date.FS:
|
|
||||||
t = os.path.getmtime(post)
|
|
||||||
dt = datetime.datetime.fromtimestamp(t)
|
|
||||||
lastmod = dt.strftime('%F %T') + time.strftime(' %z')
|
|
||||||
|
|
||||||
frontmatter, line_num = get_yaml(post)
|
|
||||||
meta = yaml.load(frontmatter)
|
|
||||||
|
|
||||||
if 'seo' in meta:
|
|
||||||
if ('date_modified' in meta['seo'] and
|
|
||||||
meta['seo']['date_modified'] == lastmod):
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
meta['seo']['date_modified'] = lastmod
|
|
||||||
else:
|
|
||||||
meta.insert(line_num, 'seo', dict(date_modified=lastmod))
|
|
||||||
|
|
||||||
output = 'new.md'
|
|
||||||
if os.path.isfile(output):
|
|
||||||
os.remove(output)
|
|
||||||
|
|
||||||
with open(output, 'w', encoding='utf-8') as new, \
|
|
||||||
open(post, 'r', encoding='utf-8') as old:
|
|
||||||
new.write("---\n")
|
|
||||||
yaml.dump(meta, new)
|
|
||||||
new.write("---\n")
|
|
||||||
line_num += 2
|
|
||||||
|
|
||||||
lines = old.readlines()
|
|
||||||
|
|
||||||
for line in lines:
|
|
||||||
if line_num > 0:
|
|
||||||
line_num -= 1
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
new.write(line)
|
|
||||||
|
|
||||||
shutil.move(output, post)
|
|
||||||
count += 1
|
|
||||||
|
|
||||||
if verbose:
|
|
||||||
print("[INFO] update 'lastmod' for:" + post)
|
|
||||||
|
|
||||||
if count > 0:
|
|
||||||
print("[INFO] Success to update lastmod for {} post(s).".format(count))
|
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
|
||||||
check_py_version()
|
|
||||||
|
|
||||||
specific = False
|
|
||||||
posts = []
|
|
||||||
verbose = False
|
|
||||||
date = Date.GIT
|
|
||||||
|
|
||||||
try:
|
|
||||||
opts, args = getopt.getopt(
|
|
||||||
argv, "hf:d:vt:",
|
|
||||||
["file=", "dir=", "help", "verbose", "datetime="])
|
|
||||||
except getopt.GetoptError:
|
|
||||||
help()
|
|
||||||
sys.exit(2)
|
|
||||||
|
|
||||||
for opt, arg in opts:
|
|
||||||
if opt == '-h':
|
|
||||||
help()
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
elif opt == '-f' or opt == '--file':
|
|
||||||
posts.append(arg)
|
|
||||||
specific = True
|
|
||||||
|
|
||||||
elif opt == '-d' or opt == '--dir':
|
|
||||||
posts = get_makrdown_files(arg)
|
|
||||||
specific = True
|
|
||||||
|
|
||||||
elif opt == '-v' or opt == '--verbose':
|
|
||||||
verbose = True
|
|
||||||
|
|
||||||
elif opt == '-t' or opt == '--datetime':
|
|
||||||
if arg == 'git':
|
|
||||||
date = Date.GIT
|
|
||||||
elif arg == 'fs':
|
|
||||||
date = Date.FS
|
|
||||||
else:
|
|
||||||
help()
|
|
||||||
sys.exit(2)
|
|
||||||
|
|
||||||
if not specific:
|
|
||||||
posts = get_makrdown_files(POSTS_PATH)
|
|
||||||
|
|
||||||
update_lastmod(posts, verbose, date)
|
|
||||||
|
|
||||||
|
|
||||||
main(sys.argv[1:])
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
'''
|
|
||||||
Common functions to other scripts.
|
|
||||||
|
|
||||||
v2.0
|
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
© 2018-2019 Cotes Chung
|
|
||||||
MIT License
|
|
||||||
'''
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import glob
|
|
||||||
|
|
||||||
|
|
||||||
def get_yaml(path):
|
|
||||||
"""
|
|
||||||
Return the Yaml block of a post and the linenumbers of it.
|
|
||||||
"""
|
|
||||||
end = False
|
|
||||||
yaml = ""
|
|
||||||
num = 0
|
|
||||||
|
|
||||||
with open(path, 'r', encoding='utf-8') as f:
|
|
||||||
for line in f.readlines():
|
|
||||||
if line.strip() == '---':
|
|
||||||
if end:
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
end = True
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
num += 1
|
|
||||||
|
|
||||||
yaml += line
|
|
||||||
|
|
||||||
return yaml, num
|
|
||||||
|
|
||||||
|
|
||||||
def get_makrdown_files(path):
|
|
||||||
MD_EXTENSIONS = ["md", "markdown", "markdn", "mdown"]
|
|
||||||
ret_files = []
|
|
||||||
|
|
||||||
for extension in MD_EXTENSIONS:
|
|
||||||
ret_files.extend(glob.glob(os.path.join(path, "*." + extension)))
|
|
||||||
|
|
||||||
return ret_files
|
|
||||||
|
|
||||||
|
|
||||||
def check_py_version():
|
|
||||||
if not sys.version_info.major == 3 and sys.version_info.minor >= 5:
|
|
||||||
print("WARNING: This script requires Python 3.5 or higher, "
|
|
||||||
"however you are using Python {}.{}."
|
|
||||||
.format(sys.version_info.major, sys.version_info.minor))
|
|
||||||
sys.exit(1)
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Files sync monitoer
|
|
||||||
# v2.0
|
|
||||||
# https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
# © 2019 Cotes Chung
|
|
||||||
# MIT Licensed
|
|
||||||
|
|
||||||
# $1 -> the origin file with absolute path.
|
|
||||||
# $2 -> the origin sync directory
|
|
||||||
# $3 -> the destination sync direcotry
|
|
||||||
|
|
||||||
# Omit the system temp file
|
|
||||||
if [[ ! -f $1 ]]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
src_dir=`dirname $(realpath $1)`
|
|
||||||
|
|
||||||
dir_prefix="$(realpath $2)/"
|
|
||||||
|
|
||||||
related_dir="${src_dir:${#dir_prefix}}"
|
|
||||||
|
|
||||||
|
|
||||||
dest="$(realpath $3)/${related_dir}"
|
|
||||||
|
|
||||||
if [[ ! -d "$dest" ]]; then
|
|
||||||
mkdir -p "$dest"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f "$1" ]]; then
|
|
||||||
cp $1 $dest
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $related_dir == "_posts" ]]; then
|
|
||||||
python $3/_scripts/py/init_all.py
|
|
||||||
python $3/_scripts/py/update_posts_lastmod.py -f "$dest/$(basename $1)" -t fs
|
|
||||||
fi
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: About
|
title: About
|
||||||
|
icon: fas fa-info
|
||||||
|
order: 4
|
||||||
|
|
||||||
# The About page
|
# The About page
|
||||||
# v2.0
|
# v2.0
|
||||||
@@ -8,4 +10,5 @@ title: About
|
|||||||
# MIT License
|
# MIT License
|
||||||
---
|
---
|
||||||
|
|
||||||
> **Note**: Add Markdown syntax content to file `tabs/about.md` and it will show up on this page.
|
|
||||||
|
> **Note**: Add Markdown syntax content to file `_tabs/about.md` and it will show up on this page.
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Archives
|
title: Archives
|
||||||
|
icon: fas fa-archive
|
||||||
|
order: 3
|
||||||
|
|
||||||
# The Archives of posts.
|
# The Archives of posts.
|
||||||
# v2.0
|
# v2.0
|
||||||
@@ -24,7 +26,7 @@ title: Archives
|
|||||||
{% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %}
|
{% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %}
|
||||||
<span class="date day">{{ this_day }}</span>
|
<span class="date day">{{ this_day }}</span>
|
||||||
<span class="date month small text-muted">{{ this_month }}</span>
|
<span class="date month small text-muted">{{ this_month }}</span>
|
||||||
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
|
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% if forloop.last %}
|
{% if forloop.last %}
|
||||||
106
_tabs/categories.md
Normal file
106
_tabs/categories.md
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
---
|
||||||
|
title: Categories
|
||||||
|
icon: fas fa-stream
|
||||||
|
order: 1
|
||||||
|
|
||||||
|
# All the Categories of posts
|
||||||
|
# v2.0
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2017-2019 Cotes Chung
|
||||||
|
# MIT License
|
||||||
|
---
|
||||||
|
|
||||||
|
{% assign HEAD_PREFIX = "h_" %}
|
||||||
|
{% assign LIST_PREFIX = "l_" %}
|
||||||
|
|
||||||
|
{% assign group_index = 0 %}
|
||||||
|
|
||||||
|
{% assign sort_categories = site.categories | sort %}
|
||||||
|
|
||||||
|
{% for category in sort_categories %}
|
||||||
|
{% assign category_name = category | first %}
|
||||||
|
{% assign posts_of_category = category | last %}
|
||||||
|
{% assign first_post = posts_of_category | first %}
|
||||||
|
|
||||||
|
{% if category_name == first_post.categories[0] %}
|
||||||
|
{% assign sub_categories = "" | split: "" %}
|
||||||
|
|
||||||
|
{% for post in posts_of_category %}
|
||||||
|
{% assign second_category = post.categories[1] %}
|
||||||
|
{% if second_category %}
|
||||||
|
{% unless sub_categories contains second_category %}
|
||||||
|
{% assign sub_categories = sub_categories | push: second_category %}
|
||||||
|
{% endunless %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% assign sub_categories = sub_categories | sort %}
|
||||||
|
{% assign sub_categories_size = sub_categories | size %}
|
||||||
|
|
||||||
|
<div class="card categories">
|
||||||
|
<!-- top-category -->
|
||||||
|
<div class="card-header d-flex justify-content-between hide-border-bottom"
|
||||||
|
id="{{ HEAD_PREFIX }}{{ group_index }}">
|
||||||
|
<span>
|
||||||
|
{% if sub_categories_size > 0 %}
|
||||||
|
<i class="far fa-folder-open fa-fw"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="far fa-folder fa-fw"></i>
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ site.baseurl }}/categories/{{ category_name | replace: ' ', '-' | downcase | url_encode }}/"
|
||||||
|
class="ml-1 mr-2">
|
||||||
|
{{ category_name }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- content count -->
|
||||||
|
{% assign top_posts_size = site.categories[category_name] | size %}
|
||||||
|
<span class="text-muted small font-weight-light">
|
||||||
|
{% if sub_categories_size > 0 %}
|
||||||
|
{{ sub_categories_size }}
|
||||||
|
{% if sub_categories_size > 1 %}categories{% else %}category{% endif %},
|
||||||
|
{% endif %}
|
||||||
|
{{ top_posts_size }}
|
||||||
|
post{% if top_posts_size > 1 %}s{% endif %}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<!-- arrow -->
|
||||||
|
{% if sub_categories_size > 0%}
|
||||||
|
<a href="#{{ LIST_PREFIX }}{{ group_index }}" data-toggle="collapse"
|
||||||
|
aria-expanded="true" aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
|
||||||
|
class="category-trigger hide-border-bottom">
|
||||||
|
<i class="fas fa-fw fa-angle-down"></i>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<span data-toggle="collapse" class="category-trigger hide-border-bottom disabled">
|
||||||
|
<i class="fas fa-fw fa-angle-right"></i>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div> <!-- .card-header -->
|
||||||
|
|
||||||
|
<!-- Sub-categories -->
|
||||||
|
{% if sub_categories_size > 0 %}
|
||||||
|
<div id="{{ LIST_PREFIX }}{{ group_index }}" class="collapse show" aria-expanded="true">
|
||||||
|
<ul class="list-group">
|
||||||
|
{% for sub_category in sub_categories %}
|
||||||
|
<li class="list-group-item">
|
||||||
|
<i class="far fa-folder fa-fw"></i>
|
||||||
|
<a href="{{ site.baseurl }}/categories/{{ sub_category | replace: ' ', '-' | downcase | url_encode }}/"
|
||||||
|
class="ml-1 mr-2">{{ sub_category }}</a>
|
||||||
|
{% assign posts_size = site.categories[sub_category] | size %}
|
||||||
|
<span class="text-muted small font-weight-light">{{ posts_size }}
|
||||||
|
post{% if posts_size > 1 %}s{% endif %}
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div> <!-- .card -->
|
||||||
|
|
||||||
|
{% assign group_index = group_index | plus: 1 %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Tags
|
title: Tags
|
||||||
|
icon: fas fa-tags
|
||||||
|
order: 2
|
||||||
|
|
||||||
# All the Tags of posts.
|
# All the Tags of posts.
|
||||||
# v2.0
|
# v2.0
|
||||||
12
app.js
Normal file
12
app.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
layout: compress
|
||||||
|
# Chirpy v2.2
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2020 Cotes Chung
|
||||||
|
# MIT Licensed
|
||||||
|
---
|
||||||
|
|
||||||
|
/* Registering Service Worker */
|
||||||
|
if('serviceWorker' in navigator) {
|
||||||
|
navigator.serviceWorker.register('{{ "/sw.js" | relative_url }}');
|
||||||
|
};
|
||||||
@@ -1,312 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* The field 'font-display' is added for Google-fonts.
|
* The field 'font-display' is added for Google-fonts.
|
||||||
*
|
*
|
||||||
* See https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,900|Oswald|Lato
|
* See: <https://fonts.google.com/>
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/* latin-ext */
|
|
||||||
@font-face {
|
@import url('https://fonts.googleapis.com/css2?family=Lato&family=Roboto+Condensed:wght@400;700&family=Source+Sans+Pro:wght@400;600;700;900&display=swap');
|
||||||
font-family: 'Lato';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v14/S6uyw4BMUTPHjxAwXjeu.woff2) format('woff2');
|
|
||||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
||||||
}
|
|
||||||
/* latin */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Lato';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v14/S6uyw4BMUTPHjx4wXg.woff2) format('woff2');
|
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
||||||
}
|
|
||||||
/* cyrillic */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Oswald';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Oswald Regular'), local('Oswald-Regular'), url(https://fonts.gstatic.com/s/oswald/v16/TK3iWkUHHAIjg752HT8Ghe4.woff2) format('woff2');
|
|
||||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
||||||
}
|
|
||||||
/* vietnamese */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Oswald';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Oswald Regular'), local('Oswald-Regular'), url(https://fonts.gstatic.com/s/oswald/v16/TK3iWkUHHAIjg752Fj8Ghe4.woff2) format('woff2');
|
|
||||||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
|
|
||||||
}
|
|
||||||
/* latin-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Oswald';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Oswald Regular'), local('Oswald-Regular'), url(https://fonts.gstatic.com/s/oswald/v16/TK3iWkUHHAIjg752Fz8Ghe4.woff2) format('woff2');
|
|
||||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
||||||
}
|
|
||||||
/* latin */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Oswald';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Oswald Regular'), local('Oswald-Regular'), url(https://fonts.gstatic.com/s/oswald/v16/TK3iWkUHHAIjg752GT8G.woff2) format('woff2');
|
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
||||||
}
|
|
||||||
/* cyrillic-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNa7lqDY.woff2) format('woff2');
|
|
||||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
||||||
}
|
|
||||||
/* cyrillic */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qPK7lqDY.woff2) format('woff2');
|
|
||||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
||||||
}
|
|
||||||
/* greek-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNK7lqDY.woff2) format('woff2');
|
|
||||||
unicode-range: U+1F00-1FFF;
|
|
||||||
}
|
|
||||||
/* greek */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qO67lqDY.woff2) format('woff2');
|
|
||||||
unicode-range: U+0370-03FF;
|
|
||||||
}
|
|
||||||
/* vietnamese */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qN67lqDY.woff2) format('woff2');
|
|
||||||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
|
|
||||||
}
|
|
||||||
/* latin-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2');
|
|
||||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
||||||
}
|
|
||||||
/* latin */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');
|
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
||||||
}
|
|
||||||
/* cyrillic-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwmhduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
||||||
}
|
|
||||||
/* cyrillic */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwkxduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
||||||
}
|
|
||||||
/* greek-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwmxduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+1F00-1FFF;
|
|
||||||
}
|
|
||||||
/* greek */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlBduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0370-03FF;
|
|
||||||
}
|
|
||||||
/* vietnamese */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwmBduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
|
|
||||||
}
|
|
||||||
/* latin-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwmRduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
||||||
}
|
|
||||||
/* latin */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdu.woff2) format('woff2');
|
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
||||||
}
|
|
||||||
/* cyrillic-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmhduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
||||||
}
|
|
||||||
/* cyrillic */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwkxduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
||||||
}
|
|
||||||
/* greek-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmxduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+1F00-1FFF;
|
|
||||||
}
|
|
||||||
/* greek */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlBduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0370-03FF;
|
|
||||||
}
|
|
||||||
/* vietnamese */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmBduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
|
|
||||||
}
|
|
||||||
/* latin-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmRduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
||||||
}
|
|
||||||
/* latin */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2) format('woff2');
|
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
||||||
}
|
|
||||||
/* cyrillic-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Black'), local('SourceSansPro-Black'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3iu4nwmhduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
||||||
}
|
|
||||||
/* cyrillic */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Black'), local('SourceSansPro-Black'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3iu4nwkxduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
||||||
}
|
|
||||||
/* greek-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Black'), local('SourceSansPro-Black'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3iu4nwmxduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+1F00-1FFF;
|
|
||||||
}
|
|
||||||
/* greek */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Black'), local('SourceSansPro-Black'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3iu4nwlBduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0370-03FF;
|
|
||||||
}
|
|
||||||
/* vietnamese */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Black'), local('SourceSansPro-Black'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3iu4nwmBduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
|
|
||||||
}
|
|
||||||
/* latin-ext */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Black'), local('SourceSansPro-Black'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3iu4nwmRduz8A.woff2) format('woff2');
|
|
||||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
||||||
}
|
|
||||||
/* latin */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Sans Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Source Sans Pro Black'), local('SourceSansPro-Black'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3iu4nwlxdu.woff2) format('woff2');
|
|
||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
---
|
/*
|
||||||
---
|
|
||||||
/*!
|
|
||||||
* The main styles.
|
* The main styles.
|
||||||
* v2.0
|
* v2.0
|
||||||
* https://github.com/cotes2020/jekyll-theme-chirpy
|
* https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
@@ -53,15 +51,9 @@ html[mode=dark] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Solved jumping scrollbar */
|
|
||||||
html {
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
line-height: 1.75rem;
|
line-height: 1.75rem;
|
||||||
background: var(--body-bg);
|
background: var(--body-bg);
|
||||||
@@ -72,9 +64,9 @@ body {
|
|||||||
|
|
||||||
/*--- sidebar layout ---*/
|
/*--- sidebar layout ---*/
|
||||||
|
|
||||||
$tab-height: 3.3rem;
|
$tab-count: {{ site.tabs | size | plus: 1 }}; // plus 1 for home tab
|
||||||
$tab-cursor-height: 1.6rem;
|
|
||||||
$tab-count: {{ site.data.tabs | size }};
|
$sidebar-display: "sidebar-display";
|
||||||
|
|
||||||
#sidebar {
|
#sidebar {
|
||||||
@include pl-pr(0);
|
@include pl-pr(0);
|
||||||
@@ -85,21 +77,41 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
width: $sidebar-width-medium;
|
width: $sidebar-width-medium;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
-webkit-transition: transform 0.4s ease;
|
|
||||||
transition: transform 0.4s ease;
|
|
||||||
background: rgb(42, 30, 107);
|
|
||||||
background: var(--sidebar-bg);
|
background: var(--sidebar-bg);
|
||||||
a {
|
a {
|
||||||
@include sidebar-icon;
|
@include sidebar-links;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-title {
|
||||||
|
text-align: center;
|
||||||
|
a {
|
||||||
|
font-weight: 900;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
&:hover {
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-subtitle {
|
||||||
|
font-size: 95%;
|
||||||
|
text-align: center;
|
||||||
|
color: #828282;
|
||||||
|
line-height: 1.2rem;
|
||||||
|
word-spacing: 1px;
|
||||||
|
margin: 0.5rem 1.5rem 2rem 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar-bottom {
|
.sidebar-bottom {
|
||||||
.icon-border + a { // the icon behide mode-toggle
|
.icon-border + a { // the icon behide mode-toggle
|
||||||
margin-left: .1rem;
|
margin-left: 0.1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.nav-link {
|
.nav-link {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
font-size: .95rem;
|
font-size: 0.95rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
@@ -169,7 +181,7 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
margin: 2rem 2.5rem 1.6rem;
|
margin: 2rem 2.5rem 1.6rem;
|
||||||
a {
|
a {
|
||||||
margin-bottom: .5rem; // icons may have multi lines
|
margin-bottom: 0.5rem; // icons may have multi lines
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover, #mode-toggle-wrapper > i:hover {
|
a:hover, #mode-toggle-wrapper > i:hover {
|
||||||
@@ -178,7 +190,7 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
|
|
||||||
#mode-toggle-wrapper {
|
#mode-toggle-wrapper {
|
||||||
i {
|
i {
|
||||||
@include sidebar-icon;
|
@include sidebar-links;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
font-size: 1.05rem;
|
font-size: 1.05rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -192,7 +204,7 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
width: 3px;
|
width: 3px;
|
||||||
height: 3px;
|
height: 3px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-top: .75rem;
|
margin-top: 0.75rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // #sidebar
|
} // #sidebar
|
||||||
@@ -236,11 +248,10 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-size: cover;
|
-webkit-transition: transform .5s;
|
||||||
background-repeat: no-repeat;
|
-moz-transition: transform .5s;
|
||||||
-webkit-transition: all .5s !important;
|
transition: transform .5s;
|
||||||
-moz-transition: all .5s !important;
|
|
||||||
transition: all .5s !important;
|
|
||||||
&:hover {
|
&:hover {
|
||||||
-ms-transform: scale(1.2);
|
-ms-transform: scale(1.2);
|
||||||
-moz-transform: scale(1.2);
|
-moz-transform: scale(1.2);
|
||||||
@@ -250,33 +261,6 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
}
|
}
|
||||||
} // #avatar
|
} // #avatar
|
||||||
|
|
||||||
#site-title {
|
|
||||||
text-align: center;
|
|
||||||
a {
|
|
||||||
color: #b6b6b6;
|
|
||||||
font-weight: 900;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
letter-spacing: .5px;
|
|
||||||
&:hover {
|
|
||||||
color: #fff;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#site-subtitle {
|
|
||||||
font-size: 95%;
|
|
||||||
text-align: center;
|
|
||||||
color: #828282;
|
|
||||||
line-height: 1.2rem;
|
|
||||||
word-spacing: 1px;
|
|
||||||
margin: .5rem 1.5rem 2rem 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-expand {
|
|
||||||
box-shadow: 4px 0 8px 0 rgba(0, 0, 0, 0.2), 6px 0 20px 0 rgba(0, 0, 0, 0.19) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search-result-wrapper {
|
#search-result-wrapper {
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -311,7 +295,7 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
#breadcrumb {
|
#breadcrumb {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
color: gray;
|
color: gray;
|
||||||
padding-left: .5rem;
|
padding-left: 0.5rem;
|
||||||
a:hover {
|
a:hover {
|
||||||
@extend %link-hover;
|
@extend %link-hover;
|
||||||
}
|
}
|
||||||
@@ -337,10 +321,9 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
border: 1px solid var(--search-wrapper-bg);
|
border: 1px solid var(--search-wrapper-bg);
|
||||||
background: var(--search-wrapper-bg);
|
background: var(--search-wrapper-bg);
|
||||||
padding: 0 .5rem;
|
padding: 0 .5rem;
|
||||||
transition: background-color .15s ease-in-out,border-color .15s ease-in-out;
|
|
||||||
i {
|
i {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
font-size: .9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--search-icon-color);
|
color: var(--search-icon-color);
|
||||||
}
|
}
|
||||||
.fa-times-circle { /* button 'clean up' */
|
.fa-times-circle { /* button 'clean up' */
|
||||||
@@ -358,7 +341,7 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
background: center;
|
background: center;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: .18rem .3rem;
|
padding: 0.18rem .3rem;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,12 +366,12 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
background: var(--search-tag-bg);
|
background: var(--search-tag-bg);
|
||||||
border: none;
|
border: none;
|
||||||
padding: .5rem;
|
padding: 0.5rem;
|
||||||
margin: 0 1rem 1rem 0;
|
margin: 0 1rem 1rem 0;
|
||||||
&::before {
|
&::before {
|
||||||
content: "#";
|
content: "#";
|
||||||
color: var(--text-muted-color);
|
color: var(--text-muted-color);
|
||||||
padding-right: .2rem;
|
padding-right: 0.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -398,20 +381,21 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
a {
|
a {
|
||||||
@extend %link-color;
|
@extend %link-color;
|
||||||
@extend %no-bottom-border;
|
@extend %no-bottom-border;
|
||||||
|
@extend %heading;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
font-weight: 400;
|
|
||||||
line-height: 2.5rem;
|
line-height: 2.5rem;
|
||||||
&:hover {
|
&:hover {
|
||||||
@extend %link-hover;
|
@extend %link-hover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> div {
|
> div {
|
||||||
|
max-width: 100%;
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
i { // icons
|
i { // icons
|
||||||
color: #818182;
|
color: #818182;
|
||||||
margin-right: .15rem;
|
margin-right: 0.15rem;
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
> p {
|
> p {
|
||||||
@@ -447,10 +431,8 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
left: 0;
|
left: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: var(--mask-bg);
|
|
||||||
opacity: 0.5;
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@at-root .sidebar-expand~& {
|
@at-root [#{$sidebar-display}] & {
|
||||||
display: block!important;
|
display: block!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -460,12 +442,9 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
#main-wrapper {
|
#main-wrapper {
|
||||||
background-color: var(--main-wrapper-bg);
|
background-color: var(--main-wrapper-bg);
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100%;
|
min-height: 100vh;
|
||||||
padding-bottom: $footer-height;
|
padding-bottom: $footer-height;
|
||||||
@include pl-pr(0);
|
@include pl-pr(0);
|
||||||
margin-left: 260px;
|
|
||||||
transition: transform 0.4s ease;
|
|
||||||
-webkit-transition: transform 0.4s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#main > div.row:first-child > div {
|
#main > div.row:first-child > div {
|
||||||
@@ -481,11 +460,6 @@ $tab-count: {{ site.data.tabs | size }};
|
|||||||
#post-wrapper {
|
#post-wrapper {
|
||||||
min-height: calc(100vh - #{$topbar-height}
|
min-height: calc(100vh - #{$topbar-height}
|
||||||
- #{$footer-height} - #{$post-extend-min-height})!important;
|
- #{$footer-height} - #{$post-extend-min-height})!important;
|
||||||
.post-content {
|
|
||||||
a:hover {
|
|
||||||
@extend %link-hover;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#topbar-wrapper.row,
|
#topbar-wrapper.row,
|
||||||
@@ -513,6 +487,7 @@ footer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
|
color: var(--footer-link);
|
||||||
&:link {
|
&:link {
|
||||||
@include no-text-decoration;
|
@include no-text-decoration;
|
||||||
}
|
}
|
||||||
@@ -521,14 +496,8 @@ footer {
|
|||||||
@include no-text-decoration;
|
@include no-text-decoration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.footer-left a {
|
|
||||||
@extend %footer-content;
|
|
||||||
}
|
|
||||||
.footer-right {
|
.footer-right {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
a {
|
|
||||||
@extend %footer-content;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,7 +509,6 @@ footer {
|
|||||||
margin-right: 1.5rem;
|
margin-right: 1.5rem;
|
||||||
margin-top: 3rem;
|
margin-top: 3rem;
|
||||||
margin-bottom: 4rem;
|
margin-bottom: 4rem;
|
||||||
color: #6c757d;
|
|
||||||
&:only-child {
|
&:only-child {
|
||||||
position: -webkit-sticky; /* Safari */
|
position: -webkit-sticky; /* Safari */
|
||||||
position: sticky;
|
position: sticky;
|
||||||
@@ -555,17 +523,11 @@ footer {
|
|||||||
margin-bottom: 4rem;
|
margin-bottom: 4rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h3 {
|
span {
|
||||||
padding-top: .5rem;
|
@include panel-label;
|
||||||
padding-bottom: .5rem;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
letter-spacing: -0.02em;
|
|
||||||
font-size: 1rem;
|
|
||||||
font-family: 'Oswald', sans-serif;
|
|
||||||
}
|
}
|
||||||
.post-content {
|
.post-content {
|
||||||
font-size: .9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,8 +542,8 @@ footer {
|
|||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--btn-border-color);
|
border: 1px solid var(--btn-border-color);
|
||||||
border-radius: .8rem;
|
border-radius: 0.8rem;
|
||||||
padding: .3rem .5rem;
|
padding: 0.3rem .5rem;
|
||||||
margin: 0 .35rem .5rem 0;
|
margin: 0 .35rem .5rem 0;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #2a408e;
|
background-color: #2a408e;
|
||||||
@@ -641,29 +603,35 @@ footer {
|
|||||||
/*--- Typography ---*/
|
/*--- Typography ---*/
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
@extend %heading;
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
font-weight: 400;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
@extend %heading;
|
||||||
@extend %section;
|
@extend %section;
|
||||||
@extend %anchor;
|
@extend %anchor;
|
||||||
font-size: 1.35rem;
|
font-size: 1.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
|
@extend %heading;
|
||||||
@extend %section;
|
@extend %section;
|
||||||
@extend %anchor;
|
@extend %anchor;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
|
@extend %heading;
|
||||||
@extend %section;
|
@extend %section;
|
||||||
@extend %anchor;
|
@extend %anchor;
|
||||||
font-size: 1.15rem;
|
font-size: 1.15rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
|
@extend %heading;
|
||||||
|
@extend %section;
|
||||||
|
@extend %anchor;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,16 +651,20 @@ kbd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sup {
|
sup {
|
||||||
|
z-index: 1;
|
||||||
|
&:target {
|
||||||
@extend %anchor;
|
@extend %anchor;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnotes ol {
|
.footnotes ol {
|
||||||
margin-top: .5rem;
|
margin-top: 0.5rem;
|
||||||
> li {
|
> li {
|
||||||
padding-top: .2rem;
|
padding-top: 0.2rem;
|
||||||
margin-top: -0.2rem;
|
margin-top: -0.2rem;
|
||||||
> p {
|
> p {
|
||||||
padding-left: .2em;
|
padding-left: 0.2em;
|
||||||
}
|
}
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-bottom: -.8rem;
|
margin-bottom: -.8rem;
|
||||||
@@ -722,11 +694,11 @@ sup {
|
|||||||
|
|
||||||
.reversefootnote {
|
.reversefootnote {
|
||||||
@at-root a#{&} {
|
@at-root a#{&} {
|
||||||
font-size: .6rem;
|
font-size: 0.6rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding-top: .5em;
|
padding-top: 0.5em;
|
||||||
margin-left: .5em;
|
margin-left: 0.5em;
|
||||||
border-bottom-style: none !important;
|
border-bottom-style: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -752,18 +724,20 @@ a {
|
|||||||
@extend %no-bottom-border;
|
@extend %no-bottom-border;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.license-wrapper .license-text &:hover {
|
|
||||||
@extend %link-hover;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // a
|
} // a
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.post {
|
.post {
|
||||||
h1 {
|
h1 {
|
||||||
margin-top: 3rem;
|
margin-top: 3rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
em { /* MarkDown italic */
|
em { /* MarkDown italic */
|
||||||
padding-right: .2rem;
|
padding-right: 0.2rem;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
code {
|
code {
|
||||||
@@ -774,40 +748,40 @@ a {
|
|||||||
|
|
||||||
|
|
||||||
/*--- Begin of Markdown table style ---*/
|
/*--- Begin of Markdown table style ---*/
|
||||||
|
div.post-content .table-wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
|
||||||
div.post-content {
|
> table {
|
||||||
>table, li>table {
|
|
||||||
min-width: 60%;
|
min-width: 60%;
|
||||||
border-collapse: collapse;
|
overflow-x: auto;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
thead {
|
thead {
|
||||||
border-bottom: solid 2px rgba(210, 215, 217, 0.75);
|
border-bottom: solid 2px rgba(210, 215, 217, 0.75);
|
||||||
+tbody tr {
|
|
||||||
&:nth-child(2n) {
|
|
||||||
background-color: var(--tb-even-bg);
|
|
||||||
}
|
|
||||||
&:last-child:nth-child(2n) {
|
|
||||||
border-bottom: solid 1px var(--tb-even-border-color);
|
|
||||||
}
|
|
||||||
&:nth-child(2n + 1) {
|
|
||||||
background-color: var(--tb-odd-bg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
th {
|
th {
|
||||||
@extend %table-cell;
|
@extend %table-cell;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody td {
|
tbody {
|
||||||
|
tr {
|
||||||
|
&:nth-child(2n) {
|
||||||
|
background-color: var(--tb-even-bg);
|
||||||
|
}
|
||||||
|
&:nth-child(2n + 1) {
|
||||||
|
background-color: var(--tb-odd-bg);
|
||||||
|
}
|
||||||
|
& {
|
||||||
|
border-bottom: 1px solid var(--tb-border-color);
|
||||||
|
}
|
||||||
|
td {
|
||||||
@extend %table-cell;
|
@extend %table-cell;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // table
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*--- post ---*/
|
/*--- post ---*/
|
||||||
@@ -836,16 +810,61 @@ table {
|
|||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|
||||||
|
@mixin img($caption: false) {
|
||||||
|
> img:not([style]) {
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
|
||||||
|
&:not(.normal):not(.left):not(.right) {
|
||||||
|
@include align-center;
|
||||||
|
|
||||||
|
@if $caption {
|
||||||
|
@include img-caption;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.left {
|
||||||
|
float: left;
|
||||||
|
margin: 0.75rem 1rem 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.right {
|
||||||
|
float: right;
|
||||||
|
margin: 0.75rem 0 1rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin img-caption {
|
||||||
|
+ em {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 80%;
|
||||||
|
padding: 0;
|
||||||
|
color: #6d6c6c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
&:not(.img-hyperlink) {
|
||||||
@extend %link-color;
|
@extend %link-color;
|
||||||
@extend %link-underline;
|
@extend %link-underline;
|
||||||
&:hover {
|
&:hover {
|
||||||
@extend %link-hover;
|
@extend %link-hover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.img-hyperlink {
|
||||||
|
@include img;
|
||||||
|
@include img-caption;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
font-size: 1.08rem;
|
font-size: 1.08rem;
|
||||||
}
|
@include img(true);
|
||||||
|
}// p
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag:hover {
|
.tag:hover {
|
||||||
@@ -857,13 +876,14 @@ table {
|
|||||||
min-width: 2rem;
|
min-width: 2rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: var(--tag-bg);
|
background: var(--tag-bg);
|
||||||
border-radius: .34rem;
|
border-radius: 0.3rem;
|
||||||
padding: 0 .4rem;
|
padding: 0 .4rem;
|
||||||
color: #818182;
|
color: inherit;
|
||||||
line-height: 1.6rem;
|
line-height: 1.3rem;
|
||||||
&:not(:first-child) {
|
&:not(:last-child) {
|
||||||
margin-left: .2rem;
|
margin-right: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@extend %tag-hover;
|
@extend %tag-hover;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
@@ -875,7 +895,7 @@ table {
|
|||||||
/* --- buttons --- */
|
/* --- buttons --- */
|
||||||
.btn-lang {
|
.btn-lang {
|
||||||
border: 1px solid !important;
|
border: 1px solid !important;
|
||||||
padding: 0 3px 1px 3px;
|
padding: 1px 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
color: var(--link-color);
|
color: var(--link-color);
|
||||||
&:focus {
|
&:focus {
|
||||||
@@ -904,11 +924,6 @@ table {
|
|||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-scroll {
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-grow-1 {
|
.flex-grow-1 {
|
||||||
-ms-flex-positive: 1!important;
|
-ms-flex-positive: 1!important;
|
||||||
flex-grow: 1!important;
|
flex-grow: 1!important;
|
||||||
@@ -927,7 +942,7 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tooltip-inner { /* Overrided BS4 Tooltip */
|
.tooltip-inner { /* Overrided BS4 Tooltip */
|
||||||
font-size: .7rem;
|
font-size: 0.7rem;
|
||||||
max-width: 220px;
|
max-width: 220px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
@@ -946,6 +961,7 @@ table {
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-color: var(--input-focus-border-color) !important;
|
border-color: var(--input-focus-border-color) !important;
|
||||||
background: center !important;
|
background: center !important;
|
||||||
|
transition: background-color .15s ease-in-out,border-color .15s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--- Responsive Design ---*/
|
/*--- Responsive Design ---*/
|
||||||
@@ -972,7 +988,7 @@ table {
|
|||||||
height: 5rem;
|
height: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#site-subtitle {
|
.site-subtitle {
|
||||||
@include ml-mr(1.8rem);
|
@include ml-mr(1.8rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -992,7 +1008,7 @@ table {
|
|||||||
> div.d-flex {
|
> div.d-flex {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 1.5rem 0;
|
padding: 1.5rem 0;
|
||||||
margin-bottom: .3rem;
|
margin-bottom: 0.3rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: left!important;
|
justify-content: left!important;
|
||||||
-ms-flex-pack: distribute!important;
|
-ms-flex-pack: distribute!important;
|
||||||
@@ -1005,62 +1021,38 @@ table {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sidebar is visibal */
|
|
||||||
@media all and (min-width: 831px) {
|
|
||||||
|
|
||||||
#profile-wrapper {
|
/* Hide Sidebar and TOC */
|
||||||
margin-top: 3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search-wrapper {
|
|
||||||
width: 22%;
|
|
||||||
min-width: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* button 'back-to-Top' position */
|
|
||||||
#back-to-top {
|
|
||||||
bottom: 5.5rem;
|
|
||||||
right: 1.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topbar-up {
|
|
||||||
box-shadow: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#topbar-title {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer>div.d-flex {
|
|
||||||
width: 92%;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* iPad 9.7" horizontal */
|
|
||||||
@media all and (min-width: 992px) and (max-width: 1024px) {
|
|
||||||
#main-wrapper .col-lg-11 {
|
|
||||||
-webkit-box-flex: 0;
|
|
||||||
-ms-flex: 0 0 96%;
|
|
||||||
flex: 0 0 96%;
|
|
||||||
max-width: 96%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Hide SideBar and TOC */
|
|
||||||
@media all and (max-width: 830px) {
|
@media all and (max-width: 830px) {
|
||||||
|
%slide {
|
||||||
.sidebar-expand {
|
-webkit-transition: transform 0.4s ease;
|
||||||
transform: translateX(0) !important;
|
transition: transform 0.4s ease;
|
||||||
~#main-wrapper {
|
|
||||||
transform: translateX(#{$sidebar-width-medium}) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
[#{$sidebar-display}] {
|
||||||
|
|
||||||
|
#sidebar {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#topbar-wrapper,
|
||||||
|
#main-wrapper {
|
||||||
|
transform: translateX(#{$sidebar-width-medium});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar {
|
#sidebar {
|
||||||
|
@extend %slide;
|
||||||
|
|
||||||
transform: translateX(-#{$sidebar-width-medium}); // hide
|
transform: translateX(-#{$sidebar-width-medium}); // hide
|
||||||
-webkit-transform: translateX(-#{$sidebar-width-medium});
|
-webkit-transform: translateX(-#{$sidebar-width-medium});
|
||||||
|
|
||||||
.cursor {
|
.cursor {
|
||||||
-webkit-transition: none;
|
-webkit-transition: none;
|
||||||
-moz-transition: none;
|
-moz-transition: none;
|
||||||
@@ -1068,8 +1060,13 @@ table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#topbar-wrapper {
|
||||||
|
@extend %slide;
|
||||||
|
}
|
||||||
|
|
||||||
#main-wrapper {
|
#main-wrapper {
|
||||||
margin-left: 0;
|
@extend %slide;
|
||||||
|
padding-top: $topbar-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-result-wrapper {
|
#search-result-wrapper {
|
||||||
@@ -1089,8 +1086,6 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#topbar-wrapper {
|
#topbar-wrapper {
|
||||||
position: -webkit-sticky;
|
|
||||||
position: sticky;
|
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1138,7 +1133,7 @@ table {
|
|||||||
justify-content: center!important;
|
justify-content: center!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
sup {
|
sup:target {
|
||||||
padding-top: 3.4rem;
|
padding-top: 3.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1159,6 +1154,57 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Sidebar visible */
|
||||||
|
@media all and (min-width: 831px) {
|
||||||
|
|
||||||
|
/* Solved jumping scrollbar */
|
||||||
|
html {
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main-wrapper {
|
||||||
|
margin-left: $sidebar-width-medium;
|
||||||
|
}
|
||||||
|
|
||||||
|
#profile-wrapper {
|
||||||
|
margin-top: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-wrapper {
|
||||||
|
width: 22%;
|
||||||
|
min-width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* button 'back-to-Top' position */
|
||||||
|
#back-to-top {
|
||||||
|
bottom: 5.5rem;
|
||||||
|
right: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar-up {
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#topbar-title {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer > div.d-flex {
|
||||||
|
width: 92%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* iPad 9.7" horizontal */
|
||||||
|
@media all and (min-width: 992px) and (max-width: 1024px) {
|
||||||
|
#main-wrapper .col-lg-11 {
|
||||||
|
-webkit-box-flex: 0;
|
||||||
|
-ms-flex: 0 0 96%;
|
||||||
|
flex: 0 0 96%;
|
||||||
|
max-width: 96%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Compact icons in sidebar & TOC hidden */
|
/* Compact icons in sidebar & TOC hidden */
|
||||||
@media all and (min-width: 832px) and (max-width: 1199px) {
|
@media all and (min-width: 832px) and (max-width: 1199px) {
|
||||||
|
|
||||||
@@ -1180,12 +1226,16 @@ table {
|
|||||||
width: calc(100% - 210px);
|
width: calc(100% - 210px);
|
||||||
}
|
}
|
||||||
|
|
||||||
#site-title {
|
#search-results > div {
|
||||||
|
max-width: 700px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-title {
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
margin-left: 0!important;
|
margin-left: 0!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#site-subtitle {
|
.site-subtitle {
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
@include ml-mr(1rem);
|
@include ml-mr(1rem);
|
||||||
}
|
}
|
||||||
@@ -1219,10 +1269,6 @@ table {
|
|||||||
-ms-flex-pack: center!important;
|
-ms-flex-pack: center!important;
|
||||||
justify-content: center!important;
|
justify-content: center!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-results>div {
|
|
||||||
max-width: 700px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1322,7 +1368,7 @@ table {
|
|||||||
#main > div.row > div.col-xl-8 {
|
#main > div.row > div.col-xl-8 {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
> div:first-child {
|
> div:first-child {
|
||||||
padding-left: .55rem !important;
|
padding-left: 0.55rem !important;
|
||||||
padding-right: 1.9rem !important;
|
padding-right: 1.9rem !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1348,11 +1394,8 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#profile-wrapper {
|
#profile-wrapper {
|
||||||
margin-top: 4rem;
|
margin: 4rem 2rem 3rem 4rem;
|
||||||
margin-bottom: 3rem;
|
|
||||||
padding-left: 18%;
|
|
||||||
-ms-flex-direction: column!important;
|
-ms-flex-direction: column!important;
|
||||||
}
|
|
||||||
|
|
||||||
#avatar {
|
#avatar {
|
||||||
-webkit-box-pack: normal !important;
|
-webkit-box-pack: normal !important;
|
||||||
@@ -1365,7 +1408,7 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.profile-text {
|
.profile-text {
|
||||||
padding-left: .5rem;
|
margin-left: 0.5rem;
|
||||||
/* .d-flex */
|
/* .d-flex */
|
||||||
display: -webkit-box!important;
|
display: -webkit-box!important;
|
||||||
display: -ms-flexbox!important;
|
display: -ms-flexbox!important;
|
||||||
@@ -1376,28 +1419,29 @@ table {
|
|||||||
/* .align-content-center */
|
/* .align-content-center */
|
||||||
-ms-flex-line-pack: center!important;
|
-ms-flex-line-pack: center!important;
|
||||||
align-content: center!important;
|
align-content: center!important;
|
||||||
}
|
> div {
|
||||||
|
|
||||||
#site-title a {
|
|
||||||
font-size: 1.7rem;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-text>div {
|
|
||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#site-subtitle {
|
|
||||||
word-spacing: 0;
|
|
||||||
padding-right: 3rem;
|
|
||||||
margin: .3rem 0 0 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar {
|
#sidebar {
|
||||||
width: $sidebar-width-large;
|
width: $sidebar-width-large;
|
||||||
|
|
||||||
|
.site-title a {
|
||||||
|
font-size: 1.7rem;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-subtitle {
|
||||||
|
word-spacing: 0;
|
||||||
|
margin: 0.3rem 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
margin-left: 5%;
|
margin-left: 3%;
|
||||||
> li > a {
|
> li > a {
|
||||||
padding-left: 2.5rem;
|
padding-left: 2.5rem;
|
||||||
-webkit-box-pack: start!important;
|
-webkit-box-pack: start!important;
|
||||||
@@ -1413,8 +1457,8 @@ table {
|
|||||||
> i {
|
> i {
|
||||||
@include icon-round(1.65rem);
|
@include icon-round(1.65rem);
|
||||||
line-height: 1rem;
|
line-height: 1rem;
|
||||||
font-size: .6rem;
|
font-size: 0.6rem;
|
||||||
padding: .5em 0 0 .1em;
|
padding: 0.5em 0 0 .1em;
|
||||||
display: inline-block!important;
|
display: inline-block!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1433,30 +1477,28 @@ table {
|
|||||||
i {
|
i {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 1.25em;
|
width: 1.25em;
|
||||||
padding-top: .44rem;
|
padding-top: 0.44rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#mode-toggle-wrapper {
|
#mode-toggle-wrapper {
|
||||||
font-size: .9rem;
|
font-size: 0.9rem;
|
||||||
i {
|
i {
|
||||||
@include icon-round(2rem);
|
@include icon-round(2rem);
|
||||||
padding-top: .44rem;
|
padding-top: 0.44rem;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-border {
|
.icon-border {
|
||||||
@include ml-mr(.2rem);
|
@include ml-mr(.2rem);
|
||||||
margin-top: .85rem;
|
margin-top: 0.85rem;
|
||||||
+a {
|
+a {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // .sidebar-bottom
|
} // .sidebar-bottom
|
||||||
} // #sidebar
|
} // #sidebar
|
||||||
|
|
||||||
footer > div.d-flex {
|
footer > div.d-flex {
|
||||||
width: 87%;
|
width: 87%;
|
||||||
max-width: 1140px;
|
max-width: 1140px;
|
||||||
@@ -1471,12 +1513,17 @@ table {
|
|||||||
|
|
||||||
} // min-width: 1650px
|
} // min-width: 1650px
|
||||||
|
|
||||||
|
|
||||||
@media all and (min-width: 1700px) {
|
@media all and (min-width: 1700px) {
|
||||||
#topbar-wrapper {
|
#topbar-wrapper {
|
||||||
padding-right: calc(100% - #{$sidebar-width-large}
|
padding-right: calc(100% - #{$sidebar-width-large}
|
||||||
- (1920px - #{$sidebar-width-large}) ) /* 100% - 350px - (1920px - 350px); */
|
- (1920px - #{$sidebar-width-large}) ) /* 100% - 350px - (1920px - 350px); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#topbar {
|
||||||
|
max-width: calc(#{$main-content-max-width} + 20px)
|
||||||
|
}
|
||||||
|
|
||||||
#main > div.row {
|
#main > div.row {
|
||||||
padding-left: calc((100% - #{$main-content-max-width} - 2%) / 2);
|
padding-left: calc((100% - #{$main-content-max-width} - 2%) / 2);
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
%table-cell {
|
%table-cell {
|
||||||
padding: .35rem .8rem;
|
padding: 0.4rem 1rem;
|
||||||
font-size: 95%;
|
font-size: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,6 +37,11 @@
|
|||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%heading {
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Lato', 'Microsoft Yahei', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
%section {
|
%section {
|
||||||
#post-wrapper & {
|
#post-wrapper & {
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@@ -45,18 +50,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
%anchor {
|
%anchor {
|
||||||
#post-wrapper &,
|
|
||||||
#page & {
|
|
||||||
padding-top: 3.5rem;
|
padding-top: 3.5rem;
|
||||||
margin-top: -2.5rem;
|
margin-top: -2.5rem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
%footer-content {
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(---footer-link);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ---------- scss mixin --------- */
|
/* ---------- scss mixin --------- */
|
||||||
|
|
||||||
@@ -64,11 +60,11 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin sidebar-icon {
|
@mixin sidebar-links($color: rgba(255, 255, 255, 0.5)) {
|
||||||
color: rgba(255, 255, 255, 0.5);
|
color: $color;
|
||||||
transition: color 0.35s ease-in-out;
|
transition: color 0.35s ease-in-out;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
margin: 0 .25rem;
|
margin: 0 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin icon-round($diameter) {
|
@mixin icon-round($diameter) {
|
||||||
@@ -91,3 +87,33 @@
|
|||||||
@mixin input-placeholder {
|
@mixin input-placeholder {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin semi-bold {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin label($font-size: 1rem, $font-weight: 600, $color: var(--label-color)) {
|
||||||
|
color: $color;
|
||||||
|
font-size: $font-size;
|
||||||
|
font-weight: $font-weight;
|
||||||
|
font-family: 'Roboto Condensed', 'Microsoft Yahei', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin panel-label {
|
||||||
|
@include label(inherit);
|
||||||
|
display: block;
|
||||||
|
line-height: 1.2;
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin align-center {
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
-webkit-transform: translateX(-50%);
|
||||||
|
-ms-transform: translateX(-50%);
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
---
|
|
||||||
---
|
|
||||||
/*
|
/*
|
||||||
* The syntax highlight.
|
* The syntax highlight.
|
||||||
* v2.0
|
* v2.0
|
||||||
@@ -11,14 +9,8 @@
|
|||||||
@import "_colors/light-syntax";
|
@import "_colors/light-syntax";
|
||||||
@import "_colors/dark-syntax";
|
@import "_colors/dark-syntax";
|
||||||
|
|
||||||
|
html:not([mode]),
|
||||||
@mixin highlight-box-shadow($val) {
|
html[mode=light] {
|
||||||
-moz-box-shadow: $val;
|
|
||||||
-webkit-box-shadow: $val;
|
|
||||||
box-shadow: $val;
|
|
||||||
}
|
|
||||||
|
|
||||||
html:not([mode]), html[mode=light] {
|
|
||||||
@include light-syntax;
|
@include light-syntax;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +19,8 @@ html[mode=dark] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
html:not([mode]), html[mode=dark] {
|
html:not([mode]),
|
||||||
|
html[mode=dark] {
|
||||||
@include dark-syntax;
|
@include dark-syntax;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +31,7 @@ html[mode=dark] {
|
|||||||
|
|
||||||
/* -- Codes Snippet -- */
|
/* -- Codes Snippet -- */
|
||||||
|
|
||||||
%highlight-pre-bg {
|
%code-snippet-bg {
|
||||||
background: var(--highlight-bg-color);
|
background: var(--highlight-bg-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,25 +39,38 @@ html[mode=dark] {
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlighter-rouge {
|
%code-snippet-padding {
|
||||||
background: var(--highlight-bg-color);
|
padding: 0.8rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
$code-font-size: 0.85rem;
|
||||||
|
|
||||||
|
div > pre {
|
||||||
|
@extend %code-snippet-bg;
|
||||||
@extend %code-snippet-radius;
|
@extend %code-snippet-radius;
|
||||||
|
@extend %code-snippet-padding;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlighter-rouge {
|
||||||
|
@extend %code-snippet-bg;
|
||||||
|
@extend %code-snippet-radius;
|
||||||
|
|
||||||
color: var(--highlighter-rouge-color);
|
color: var(--highlighter-rouge-color);
|
||||||
margin-bottom: 1.2em; /* Override BS Inline-code style */
|
margin-bottom: 1.2em; /* Override BS Inline-code style */
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight {
|
.highlight {
|
||||||
@extend %code-snippet-radius;
|
@extend %code-snippet-radius;
|
||||||
background: var(--highlight-bg-color);
|
@extend %code-snippet-bg;
|
||||||
|
|
||||||
@at-root figure#{&} {
|
@at-root figure#{&} {
|
||||||
background: var(--highlight-bg-color);
|
@extend %code-snippet-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@include highlight-box-shadow(inset 0 0 2px #c2c6cc);
|
|
||||||
.lineno {
|
.lineno {
|
||||||
margin: .8rem 0rem;
|
margin: 0.8rem 0;
|
||||||
padding: 0 .5rem;
|
padding: 0 0.5rem;
|
||||||
min-width: 2.2rem;
|
min-width: 2.2rem;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: var(--highlight-lineno-color);
|
color: var(--highlight-lineno-color);
|
||||||
@@ -76,6 +82,12 @@ html[mode=dark] {
|
|||||||
-o-user-select: none;
|
-o-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
pre {
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: $code-font-size;
|
||||||
|
line-height: 1.4rem;
|
||||||
|
word-wrap: normal; /* Fixed Safari overflow-x */
|
||||||
|
}
|
||||||
table {
|
table {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
@@ -88,14 +100,6 @@ html[mode=dark] {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
pre {
|
|
||||||
margin-bottom: 0;
|
|
||||||
font-size: .85rem;
|
|
||||||
line-height: 1.4rem;
|
|
||||||
word-wrap: normal;
|
|
||||||
/* Fixed Safari overflow-x */
|
|
||||||
}
|
|
||||||
|
|
||||||
} //.highlight
|
} //.highlight
|
||||||
|
|
||||||
code {
|
code {
|
||||||
@@ -103,18 +107,27 @@ code {
|
|||||||
-ms-hyphens: none;
|
-ms-hyphens: none;
|
||||||
-moz-hyphens: none;
|
-moz-hyphens: none;
|
||||||
hyphens: none;
|
hyphens: none;
|
||||||
|
|
||||||
&.highlighter-rouge {
|
&.highlighter-rouge {
|
||||||
padding: 2px 4px;
|
font-size: $code-font-size;
|
||||||
margin: 0 .3rem;
|
padding: 3px 5px;
|
||||||
|
margin: 0 0.15rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid var(--code-highlighter-rouge);
|
background-color: var(--inline-code-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@at-root a > &.highlighter-rouge {
|
@at-root a > &.highlighter-rouge {
|
||||||
padding-bottom: 0; // show link's underlinke
|
padding-bottom: 0; // show link's underlinke
|
||||||
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@at-root a:hover > &.highlighter-rouge {
|
@at-root a:hover > &.highlighter-rouge {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blockquote &.highlighter-rouge {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
td.rouge-code {
|
td.rouge-code {
|
||||||
@@ -122,16 +135,17 @@ td.rouge-code {
|
|||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide line numbers for defualt, console, and terminal code snippets */
|
/* Hide line numbers for default, console, and terminal code snippets */
|
||||||
div {
|
div {
|
||||||
&[class^='highlighter-rouge'],
|
&[class^='highlighter-rouge'],
|
||||||
|
&.language-plaintext.highlighter-rouge,
|
||||||
&.language-console.highlighter-rouge,
|
&.language-console.highlighter-rouge,
|
||||||
&.language-terminal.highlighter-rouge {
|
&.language-terminal.highlighter-rouge {
|
||||||
pre.lineno {
|
pre.lineno {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
td.rouge-code {
|
td.rouge-code {
|
||||||
padding: .8rem 1rem;
|
@extend %code-snippet-padding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,9 @@
|
|||||||
|
|
||||||
/* --- ↓ width and height ---- */
|
/* --- ↓ width and height ---- */
|
||||||
|
|
||||||
|
$tab-height: 3.3rem;
|
||||||
|
$tab-cursor-height: 1.6rem;
|
||||||
|
|
||||||
$sidebar-width-small: 210px;
|
$sidebar-width-small: 210px;
|
||||||
$sidebar-width-medium: 260px;
|
$sidebar-width-medium: 260px;
|
||||||
$sidebar-width-large: 350px;
|
$sidebar-width-large: 350px;
|
||||||
|
|||||||
@@ -7,87 +7,82 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@mixin dark-syntax {
|
@mixin dark-syntax {
|
||||||
|
/* ----- My styles ------ */
|
||||||
|
--highlight-bg-color: #272822;
|
||||||
|
--highlighter-rouge-color: #de6b18;
|
||||||
|
--highlight-lineno-color: #6c6c6d;
|
||||||
|
--highlight-lineno-border-color: #3c4042;
|
||||||
|
--inline-code-bg: var(--highlight-bg-color);
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
.gp { color: #818c96; }
|
||||||
|
}
|
||||||
|
|
||||||
|
pre { color: #818c96; } /* override Bootstrap */
|
||||||
|
kbd { background-color: black; }
|
||||||
|
|
||||||
/* syntax highlight colors from https://raw.githubusercontent.com/jwarby/pygments-css/master/monokai.css */
|
/* syntax highlight colors from https://raw.githubusercontent.com/jwarby/pygments-css/master/monokai.css */
|
||||||
.highlight pre { background-color: #272822; }
|
.highlight pre { background-color: #272822; }
|
||||||
.highlight .hll { background-color: #272822; }
|
.highlight .hll { background-color: #272822; }
|
||||||
.highlight .c { color: #75715e } /* Comment */
|
.highlight .c { color: #75715e; } /* Comment */
|
||||||
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
|
.highlight .err { color: #960050; background-color: #1e0010; } /* Error */
|
||||||
.highlight .k { color: #66d9ef } /* Keyword */
|
.highlight .k { color: #66d9ef; } /* Keyword */
|
||||||
.highlight .l { color: #ae81ff } /* Literal */
|
.highlight .l { color: #ae81ff; } /* Literal */
|
||||||
.highlight .n { color: #f8f8f2 } /* Name */
|
.highlight .n { color: #f8f8f2; } /* Name */
|
||||||
.highlight .o { color: #f92672 } /* Operator */
|
.highlight .o { color: #f92672; } /* Operator */
|
||||||
.highlight .p { color: #f8f8f2 } /* Punctuation */
|
.highlight .p { color: #f8f8f2; } /* Punctuation */
|
||||||
.highlight .cm { color: #75715e } /* Comment.Multiline */
|
.highlight .cm { color: #75715e; } /* Comment.Multiline */
|
||||||
.highlight .cp { color: #75715e } /* Comment.Preproc */
|
.highlight .cp { color: #75715e; } /* Comment.Preproc */
|
||||||
.highlight .c1 { color: #75715e } /* Comment.Single */
|
.highlight .c1 { color: #75715e; } /* Comment.Single */
|
||||||
.highlight .cs { color: #75715e } /* Comment.Special */
|
.highlight .cs { color: #75715e; } /* Comment.Special */
|
||||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
.highlight .ge { font-style: italic; } /* Generic.Emph */
|
||||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
.highlight .gs { font-weight: bold; } /* Generic.Strong */
|
||||||
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
|
.highlight .kc { color: #66d9ef; } /* Keyword.Constant */
|
||||||
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
|
.highlight .kd { color: #66d9ef; } /* Keyword.Declaration */
|
||||||
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
|
.highlight .kn { color: #f92672; } /* Keyword.Namespace */
|
||||||
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
|
.highlight .kp { color: #66d9ef; } /* Keyword.Pseudo */
|
||||||
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
|
.highlight .kr { color: #66d9ef; } /* Keyword.Reserved */
|
||||||
.highlight .kt { color: #66d9ef } /* Keyword.Type */
|
.highlight .kt { color: #66d9ef; } /* Keyword.Type */
|
||||||
.highlight .ld { color: #e6db74 } /* Literal.Date */
|
.highlight .ld { color: #e6db74; } /* Literal.Date */
|
||||||
.highlight .m { color: #ae81ff } /* Literal.Number */
|
.highlight .m { color: #ae81ff; } /* Literal.Number */
|
||||||
.highlight .s { color: #e6db74 } /* Literal.String */
|
.highlight .s { color: #e6db74; } /* Literal.String */
|
||||||
.highlight .na { color: #a6e22e } /* Name.Attribute */
|
.highlight .na { color: #a6e22e; } /* Name.Attribute */
|
||||||
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
|
.highlight .nb { color: #f8f8f2; } /* Name.Builtin */
|
||||||
.highlight .nc { color: #a6e22e } /* Name.Class */
|
.highlight .nc { color: #a6e22e; } /* Name.Class */
|
||||||
.highlight .no { color: #66d9ef } /* Name.Constant */
|
.highlight .no { color: #66d9ef; } /* Name.Constant */
|
||||||
.highlight .nd { color: #a6e22e } /* Name.Decorator */
|
.highlight .nd { color: #a6e22e; } /* Name.Decorator */
|
||||||
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
|
.highlight .ni { color: #f8f8f2; } /* Name.Entity */
|
||||||
.highlight .ne { color: #a6e22e } /* Name.Exception */
|
.highlight .ne { color: #a6e22e; } /* Name.Exception */
|
||||||
.highlight .nf { color: #a6e22e } /* Name.Function */
|
.highlight .nf { color: #a6e22e; } /* Name.Function */
|
||||||
.highlight .nl { color: #f8f8f2 } /* Name.Label */
|
.highlight .nl { color: #f8f8f2; } /* Name.Label */
|
||||||
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
|
.highlight .nn { color: #f8f8f2; } /* Name.Namespace */
|
||||||
.highlight .nx { color: #a6e22e } /* Name.Other */
|
.highlight .nx { color: #a6e22e; } /* Name.Other */
|
||||||
.highlight .py { color: #f8f8f2 } /* Name.Property */
|
.highlight .py { color: #f8f8f2; } /* Name.Property */
|
||||||
.highlight .nt { color: #f92672 } /* Name.Tag */
|
.highlight .nt { color: #f92672; } /* Name.Tag */
|
||||||
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
|
.highlight .nv { color: #f8f8f2; } /* Name.Variable */
|
||||||
.highlight .ow { color: #f92672 } /* Operator.Word */
|
.highlight .ow { color: #f92672; } /* Operator.Word */
|
||||||
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
|
.highlight .w { color: #f8f8f2; } /* Text.Whitespace */
|
||||||
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
|
.highlight .mf { color: #ae81ff; } /* Literal.Number.Float */
|
||||||
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
|
.highlight .mh { color: #ae81ff; } /* Literal.Number.Hex */
|
||||||
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
|
.highlight .mi { color: #ae81ff; } /* Literal.Number.Integer */
|
||||||
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
|
.highlight .mo { color: #ae81ff; } /* Literal.Number.Oct */
|
||||||
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
|
.highlight .sb { color: #e6db74; } /* Literal.String.Backtick */
|
||||||
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
|
.highlight .sc { color: #e6db74; } /* Literal.String.Char */
|
||||||
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
|
.highlight .sd { color: #e6db74; } /* Literal.String.Doc */
|
||||||
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
|
.highlight .s2 { color: #e6db74; } /* Literal.String.Double */
|
||||||
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
|
.highlight .se { color: #ae81ff; } /* Literal.String.Escape */
|
||||||
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
|
.highlight .sh { color: #e6db74; } /* Literal.String.Heredoc */
|
||||||
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
|
.highlight .si { color: #e6db74; } /* Literal.String.Interpol */
|
||||||
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
|
.highlight .sx { color: #e6db74; } /* Literal.String.Other */
|
||||||
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
|
.highlight .sr { color: #e6db74; } /* Literal.String.Regex */
|
||||||
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
|
.highlight .s1 { color: #e6db74; } /* Literal.String.Single */
|
||||||
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
|
.highlight .ss { color: #e6db74; } /* Literal.String.Symbol */
|
||||||
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
|
.highlight .bp { color: #f8f8f2; } /* Name.Builtin.Pseudo */
|
||||||
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
|
.highlight .vc { color: #f8f8f2; } /* Name.Variable.Class */
|
||||||
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
|
.highlight .vg { color: #f8f8f2; } /* Name.Variable.Global */
|
||||||
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
|
.highlight .vi { color: #f8f8f2; } /* Name.Variable.Instance */
|
||||||
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
|
.highlight .il { color: #ae81ff; } /* Literal.Number.Integer.Long */
|
||||||
|
|
||||||
.highlight .gh { } /* Generic Heading & Diff Header */
|
|
||||||
.highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
|
.highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
|
||||||
.highlight .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */
|
.highlight .gd { color: #f92672; background-color: #561c08; } /* Generic.Deleted & Diff Deleted */
|
||||||
.highlight .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */
|
.highlight .gi { color: #a6e22e; background-color: #0b5858; } /* Generic.Inserted & Diff Inserted */
|
||||||
|
|
||||||
|
|
||||||
/*----- My styles ------*/
|
|
||||||
|
|
||||||
--code-highlighter-rouge: #272822;
|
|
||||||
--highlight-bg-color: #272822;
|
|
||||||
--highlighter-rouge-color: #de6b18;
|
|
||||||
|
|
||||||
--highlight-lineno-color: #6c6c6d;
|
|
||||||
--highlight-lineno-border-color: #3c4042;
|
|
||||||
|
|
||||||
.highlight {
|
|
||||||
@include highlight-box-shadow(none);
|
|
||||||
.gp { color: #818c96; }
|
|
||||||
}
|
|
||||||
pre { color: #818c96 } /* override Bootstrap */
|
|
||||||
kbd { background-color: black; }
|
|
||||||
}
|
}
|
||||||
@@ -23,18 +23,15 @@
|
|||||||
--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);
|
||||||
--main-border-color: rgb(44, 45, 45);
|
--main-border-color: rgb(44, 45, 45);
|
||||||
--button-bg: rgb(39, 40, 33);
|
--button-bg: rgb(39, 40, 43);
|
||||||
--blockquote-border-color: rgb(66, 66, 66);
|
--blockquote-border-color: rgb(66, 66, 66);
|
||||||
--blockquote-text-color: rgb(117, 117, 117);
|
--blockquote-text-color: rgb(117, 117, 117);
|
||||||
|
|
||||||
--btn-border-color: rgb(63, 65, 68);
|
--btn-border-color: rgb(63, 65, 68);
|
||||||
--btn-backtotop-color: var(--text-color);
|
--btn-backtotop-color: var(--text-color);
|
||||||
--btn-backtotop-border-color: var(--btn-border-color);
|
--btn-backtotop-border-color: var(--btn-border-color);
|
||||||
--btn-box-shadow: var(--main-wrapper-bg);
|
--btn-box-shadow: var(--main-wrapper-bg);
|
||||||
|
|
||||||
--card-bg: rgb(39, 40, 33);
|
|
||||||
--card-header-bg: rgb(51, 50, 50);
|
--card-header-bg: rgb(51, 50, 50);
|
||||||
--label-relate-post: rgb(164, 175, 181);
|
--label-color: rgb(108, 117, 125);
|
||||||
|
|
||||||
/* Sidebar */
|
/* Sidebar */
|
||||||
--nav-cursor-color: rgb(183, 182, 182);
|
--nav-cursor-color: rgb(183, 182, 182);
|
||||||
@@ -46,6 +43,7 @@
|
|||||||
/* 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-active-bg: rgba(28, 52, 94, 1);
|
--btn-active-bg: rgba(28, 52, 94, 1);
|
||||||
--btn-active-border-color: rgb(66, 94, 138);
|
--btn-active-border-color: rgb(66, 94, 138);
|
||||||
--btn-text-color: var(--text-color);
|
--btn-text-color: var(--text-color);
|
||||||
@@ -56,22 +54,21 @@
|
|||||||
--toc-highlight: rgb(116, 178, 243);
|
--toc-highlight: rgb(116, 178, 243);
|
||||||
--tag-bg: rgb(41, 40, 40);
|
--tag-bg: rgb(41, 40, 40);
|
||||||
--tag-hover: rgb(43, 56, 62);
|
--tag-hover: rgb(43, 56, 62);
|
||||||
--tb-odd-bg: rgba(52, 53, 42, 0.52); /* odd rows of the posts' table */
|
--tb-odd-bg: rgba(42, 47, 53, 0.52); /* 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-even-border-color: var(--tb-odd-bg);
|
--tb-border-color: var(--tb-odd-bg);
|
||||||
--tb-even-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);
|
--relate-post-date: var(--text-muted-color);
|
||||||
--card-border-color: var(--main-wrapper-bg);
|
--card-bg: rgb(39, 40, 43);
|
||||||
|
--card-border-color: rgb(53, 53, 60);
|
||||||
--card-box-shadow: var(--main-wrapper-bg);
|
--card-box-shadow: var(--main-wrapper-bg);
|
||||||
|
|
||||||
/* 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);
|
--search-tag-bg: var(--tag-bg);
|
||||||
|
|
||||||
--dash-color: rgb(63, 65, 68);
|
--dash-color: rgb(63, 65, 68);
|
||||||
|
|
||||||
/* categories */
|
/* categories */
|
||||||
@@ -84,8 +81,11 @@
|
|||||||
--timeline-year-dot-color: var(--timeline-color);
|
--timeline-year-dot-color: var(--timeline-color);
|
||||||
|
|
||||||
/* Footer */
|
/* Footer */
|
||||||
---footer-link: rgb(146, 146, 146);
|
--footer-link: rgb(171, 171, 171);
|
||||||
|
|
||||||
|
.post-content img {
|
||||||
|
filter: brightness(90%);
|
||||||
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
border-color: var(--main-border-color);
|
border-color: var(--main-border-color);
|
||||||
@@ -123,8 +123,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#archives li:nth-child(odd) {
|
#archives li:nth-child(odd) {
|
||||||
background-image: linear-gradient(to left,
|
background-image: linear-gradient(
|
||||||
rgb(26, 26, 30), rgb(39, 39, 45), rgb(39, 39, 45), rgb(39, 39, 45), rgb(26, 26, 30));
|
to left,
|
||||||
|
rgb(26, 26, 30),
|
||||||
|
rgb(39, 39, 45),
|
||||||
|
rgb(39, 39, 45),
|
||||||
|
rgb(39, 39, 45),
|
||||||
|
rgb(26, 26, 30));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // dark-scheme
|
} // dark-scheme
|
||||||
|
|||||||
@@ -8,73 +8,72 @@
|
|||||||
|
|
||||||
@mixin light-syntax {
|
@mixin light-syntax {
|
||||||
/* see: <https://raw.githubusercontent.com/jwarby/pygments-css/master/github.css> */
|
/* see: <https://raw.githubusercontent.com/jwarby/pygments-css/master/github.css> */
|
||||||
.highlight .hll { background-color: #ffffcc }
|
.highlight .hll { background-color: #ffffcc; }
|
||||||
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
.highlight .c { color: #999988; font-style: italic; } /* Comment */
|
||||||
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
.highlight .err { color: #a61717; background-color: #e3d2d2; } /* Error */
|
||||||
.highlight .k { color: #000000; font-weight: bold } /* Keyword */
|
.highlight .k { color: #000000; font-weight: bold; } /* Keyword */
|
||||||
.highlight .o { color: #000000; font-weight: bold } /* Operator */
|
.highlight .o { color: #000000; font-weight: bold; } /* Operator */
|
||||||
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
.highlight .cm { color: #999988; font-style: italic; } /* Comment.Multiline */
|
||||||
.highlight .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
|
.highlight .cp { color: #999999; font-weight: bold; font-style: italic; } /* Comment.Preproc */
|
||||||
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
.highlight .c1 { color: #999988; font-style: italic; } /* Comment.Single */
|
||||||
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
.highlight .cs { color: #999999; font-weight: bold; font-style: italic; } /* Comment.Special */
|
||||||
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
.highlight .gd { color: #d01040; background-color: #ffdddd; } /* Generic.Deleted */
|
||||||
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
|
.highlight .ge { color: #000000; font-style: italic; } /* Generic.Emph */
|
||||||
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
.highlight .gr { color: #aa0000; } /* Generic.Error */
|
||||||
.highlight .gh { color: #999999 } /* Generic.Heading */
|
.highlight .gh { color: #999999; } /* Generic.Heading */
|
||||||
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
.highlight .gi { color: #008080; background-color: #ddffdd; } /* Generic.Inserted */
|
||||||
.highlight .go { color: #888888 } /* Generic.Output */
|
.highlight .go { color: #888888; } /* Generic.Output */
|
||||||
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
.highlight .gp { color: #555555; } /* Generic.Prompt */
|
||||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
.highlight .gs { font-weight: bold; } /* Generic.Strong */
|
||||||
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
|
.highlight .gu { color: #aaaaaa; } /* Generic.Subheading */
|
||||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
.highlight .gt { color: #aa0000; } /* Generic.Traceback */
|
||||||
.highlight .kc { color: #000000; font-weight: bold } /* Keyword.Constant */
|
.highlight .kc { color: #000000; font-weight: bold; } /* Keyword.Constant */
|
||||||
.highlight .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
|
.highlight .kd { color: #000000; font-weight: bold; } /* Keyword.Declaration */
|
||||||
.highlight .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
|
.highlight .kn { color: #000000; font-weight: bold; } /* Keyword.Namespace */
|
||||||
.highlight .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
|
.highlight .kp { color: #000000; font-weight: bold; } /* Keyword.Pseudo */
|
||||||
.highlight .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
|
.highlight .kr { color: #000000; font-weight: bold; } /* Keyword.Reserved */
|
||||||
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
.highlight .kt { color: #445588; font-weight: bold; } /* Keyword.Type */
|
||||||
.highlight .m { color: #009999 } /* Literal.Number */
|
.highlight .m { color: #009999; } /* Literal.Number */
|
||||||
.highlight .s { color: #d01040 } /* Literal.String */
|
.highlight .s { color: #d01040; } /* Literal.String */
|
||||||
.highlight .na { color: #008080 } /* Name.Attribute */
|
.highlight .na { color: #008080; } /* Name.Attribute */
|
||||||
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
.highlight .nb { color: #0086b3; } /* Name.Builtin */
|
||||||
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
.highlight .nc { color: #445588; font-weight: bold; } /* Name.Class */
|
||||||
.highlight .no { color: #008080 } /* Name.Constant */
|
.highlight .no { color: #008080; } /* Name.Constant */
|
||||||
.highlight .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
|
.highlight .nd { color: #3c5d5d; font-weight: bold; } /* Name.Decorator */
|
||||||
.highlight .ni { color: #800080 } /* Name.Entity */
|
.highlight .ni { color: #800080; } /* Name.Entity */
|
||||||
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
.highlight .ne { color: #990000; font-weight: bold; } /* Name.Exception */
|
||||||
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
.highlight .nf { color: #990000; font-weight: bold; } /* Name.Function */
|
||||||
.highlight .nl { color: #990000; font-weight: bold } /* Name.Label */
|
.highlight .nl { color: #990000; font-weight: bold; } /* Name.Label */
|
||||||
.highlight .nn { color: #555555 } /* Name.Namespace */
|
.highlight .nn { color: #555555; } /* Name.Namespace */
|
||||||
.highlight .nt { color: #000080 } /* Name.Tag */
|
.highlight .nt { color: #000080; } /* Name.Tag */
|
||||||
.highlight .nv { color: #008080 } /* Name.Variable */
|
.highlight .nv { color: #008080; } /* Name.Variable */
|
||||||
.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
|
.highlight .ow { color: #000000; font-weight: bold; } /* Operator.Word */
|
||||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
.highlight .w { color: #bbbbbb; } /* Text.Whitespace */
|
||||||
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
.highlight .mf { color: #009999; } /* Literal.Number.Float */
|
||||||
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
.highlight .mh { color: #009999; } /* Literal.Number.Hex */
|
||||||
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
.highlight .mi { color: #009999; } /* Literal.Number.Integer */
|
||||||
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
.highlight .mo { color: #009999; } /* Literal.Number.Oct */
|
||||||
.highlight .sb { color: #d01040 } /* Literal.String.Backtick */
|
.highlight .sb { color: #d01040; } /* Literal.String.Backtick */
|
||||||
.highlight .sc { color: #d01040 } /* Literal.String.Char */
|
.highlight .sc { color: #d01040; } /* Literal.String.Char */
|
||||||
.highlight .sd { color: #d01040 } /* Literal.String.Doc */
|
.highlight .sd { color: #d01040; } /* Literal.String.Doc */
|
||||||
.highlight .s2 { color: #d01040 } /* Literal.String.Double */
|
.highlight .s2 { color: #d01040; } /* Literal.String.Double */
|
||||||
.highlight .se { color: #d01040 } /* Literal.String.Escape */
|
.highlight .se { color: #d01040; } /* Literal.String.Escape */
|
||||||
.highlight .sh { color: #d01040 } /* Literal.String.Heredoc */
|
.highlight .sh { color: #d01040; } /* Literal.String.Heredoc */
|
||||||
.highlight .si { color: #d01040 } /* Literal.String.Interpol */
|
.highlight .si { color: #d01040; } /* Literal.String.Interpol */
|
||||||
.highlight .sx { color: #d01040 } /* Literal.String.Other */
|
.highlight .sx { color: #d01040; } /* Literal.String.Other */
|
||||||
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
.highlight .sr { color: #009926; } /* Literal.String.Regex */
|
||||||
.highlight .s1 { color: #d01040 } /* Literal.String.Single */
|
.highlight .s1 { color: #d01040; } /* Literal.String.Single */
|
||||||
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
.highlight .ss { color: #990073; } /* Literal.String.Symbol */
|
||||||
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
.highlight .bp { color: #999999; } /* Name.Builtin.Pseudo */
|
||||||
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
.highlight .vc { color: #008080; } /* Name.Variable.Class */
|
||||||
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
.highlight .vg { color: #008080; } /* Name.Variable.Global */
|
||||||
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
.highlight .vi { color: #008080; } /* Name.Variable.Instance */
|
||||||
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
.highlight .il { color: #009999; } /* Literal.Number.Integer.Long */
|
||||||
|
|
||||||
/* --- custom light colors --- */
|
/* --- custom light colors --- */
|
||||||
--code-highlighter-rouge: #e9ecef;
|
|
||||||
--highlight-bg-color: #f7f7f7;
|
--highlight-bg-color: #f7f7f7;
|
||||||
--highlighter-rouge-color: #353a3d;
|
--highlighter-rouge-color: #353a3d;
|
||||||
--highlight-lineno-color: #c2c6cc;
|
--highlight-lineno-color: #c2c6cc;
|
||||||
--highlight-lineno-border-color: #e9ecef;
|
--highlight-lineno-border-color: #e9ecef;
|
||||||
|
--inline-code-bg: #f3f3f3;
|
||||||
} // light-syntax
|
} // light-syntax
|
||||||
|
|||||||
@@ -7,118 +7,70 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@mixin light-scheme {
|
@mixin light-scheme {
|
||||||
|
/* Common */
|
||||||
--body-bg: #fafafa;
|
--body-bg: #fafafa;
|
||||||
|
|
||||||
--mask-bg: #c1c3c5;
|
--mask-bg: #c1c3c5;
|
||||||
|
|
||||||
--main-wrapper-bg: white;
|
--main-wrapper-bg: white;
|
||||||
|
|
||||||
--main-border-color: #f3f3f3;
|
--main-border-color: #f3f3f3;
|
||||||
|
|
||||||
--btn-border-color: #e9ecef;
|
--btn-border-color: #e9ecef;
|
||||||
|
--text-color: #333333;
|
||||||
--text-color: #343a40;
|
|
||||||
|
|
||||||
--blockquote-border-color: #eee;
|
--blockquote-border-color: #eee;
|
||||||
|
|
||||||
--blockquote-text-color: #9a9a9a;
|
--blockquote-text-color: #9a9a9a;
|
||||||
|
|
||||||
--link-color: #2a408e;
|
--link-color: #2a408e;
|
||||||
|
|
||||||
--link-underline-color: #dee2e6;
|
--link-underline-color: #dee2e6;
|
||||||
|
|
||||||
--text-muted-color: gray;
|
--text-muted-color: gray;
|
||||||
|
--tb-odd-bg: #fbfcfd;
|
||||||
--tb-odd-bg: #f8f9fa;
|
--tb-border-color: #eaeaea;
|
||||||
|
|
||||||
--tb-even-border-color: rgba(210, 215, 217, 0.75);
|
|
||||||
|
|
||||||
--button-bg: #fff;
|
--button-bg: #fff;
|
||||||
|
|
||||||
--btn-backtotop-color: #686868;
|
--btn-backtotop-color: #686868;
|
||||||
|
|
||||||
--btn-backtotop-border-color: #f1f1f1; //--main-border-color,
|
--btn-backtotop-border-color: #f1f1f1; //--main-border-color,
|
||||||
|
|
||||||
--btn-box-shadow: #eaeaea;
|
--btn-box-shadow: #eaeaea;
|
||||||
|
|
||||||
/* Sidebar */
|
/* Sidebar */
|
||||||
|
|
||||||
--sidebar-bg: radial-gradient(
|
--sidebar-bg: radial-gradient(
|
||||||
circle, rgba(42, 30, 107, 1) 0%, rgba(35, 37, 46, 1) 100%);
|
circle,
|
||||||
|
rgba(42, 30, 107, 1) 0%,
|
||||||
|
rgba(35, 37, 46, 1) 100%);
|
||||||
--nav-cursor-color: #fcfcfc;
|
--nav-cursor-color: #fcfcfc;
|
||||||
|
|
||||||
/* Topbar */
|
/* Topbar */
|
||||||
|
|
||||||
--topbar-wrapper-bg: white;
|
--topbar-wrapper-bg: white;
|
||||||
|
|
||||||
--topbar-text-color: rgb(78, 78, 78);
|
--topbar-text-color: rgb(78, 78, 78);
|
||||||
|
|
||||||
--search-wrapper-bg: #fff;
|
|
||||||
|
|
||||||
--search-wrapper-bg: #f5f5f5;
|
--search-wrapper-bg: #f5f5f5;
|
||||||
|
|
||||||
--search-tag-bg: #f8f9fa;
|
--search-tag-bg: #f8f9fa;
|
||||||
|
|
||||||
--search-icon-color: #c2c6cc;
|
--search-icon-color: #c2c6cc;
|
||||||
|
|
||||||
--input-focus-border-color: var(--btn-border-color);
|
--input-focus-border-color: var(--btn-border-color);
|
||||||
|
|
||||||
/* Home */
|
/* Home page */
|
||||||
|
|
||||||
--post-list-text-color: dimgray;
|
--post-list-text-color: dimgray;
|
||||||
|
|
||||||
--btn-patinator-text-color: #555555;
|
--btn-patinator-text-color: #555555;
|
||||||
|
--btn-paginator-hover-color: #e9ecef;
|
||||||
--btn-active-bg: #2a408e;
|
--btn-active-bg: #2a408e;
|
||||||
|
|
||||||
--btn-active-border-color: #007bff;
|
--btn-active-border-color: #007bff;
|
||||||
|
|
||||||
--btn-text-color: #f8f8f8;
|
--btn-text-color: #f8f8f8;
|
||||||
|
|
||||||
--btn-paginator-border-color: #f1f1f1;
|
--btn-paginator-border-color: #f1f1f1;
|
||||||
|
|
||||||
--btn-paginator-shadow: #4b92d2;
|
--btn-paginator-shadow: #4b92d2;
|
||||||
|
|
||||||
/* Posts */
|
/* Posts */
|
||||||
|
|
||||||
--btn-share-hover-color: var(--link-color);
|
--btn-share-hover-color: var(--link-color);
|
||||||
|
|
||||||
--card-border-color: #f1f1f1;
|
--card-border-color: #f1f1f1;
|
||||||
|
|
||||||
--card-box-shadow: rgba(234, 234, 234, 0.7686274509803922);
|
--card-box-shadow: rgba(234, 234, 234, 0.7686274509803922);
|
||||||
|
--label-color: #808080;
|
||||||
--label-relate-post: #353a3d;
|
--relate-post-date: rgba(30, 55, 70, 0.4);
|
||||||
|
|
||||||
--relate-post-date: rgba(30, 55, 70, .4);
|
|
||||||
|
|
||||||
--tag-bg: rgba(0, 0, 0, 0.075);
|
--tag-bg: rgba(0, 0, 0, 0.075);
|
||||||
|
|
||||||
--tag-border: #dee2e6;
|
--tag-border: #dee2e6;
|
||||||
|
|
||||||
--tag-shadow: var(--btn-border-color);
|
--tag-shadow: var(--btn-border-color);
|
||||||
|
|
||||||
--tag-hover: rgb(222, 226, 230);
|
--tag-hover: rgb(222, 226, 230);
|
||||||
|
|
||||||
--categories-hover-bg: var(--btn-border-color);
|
--categories-hover-bg: var(--btn-border-color);
|
||||||
|
|
||||||
--dash-color: silver;
|
--dash-color: silver;
|
||||||
|
|
||||||
|
|
||||||
/* Archive */
|
/* Archive */
|
||||||
|
|
||||||
--timeline-color: rgba(0, 0, 0, 0.075);
|
--timeline-color: rgba(0, 0, 0, 0.075);
|
||||||
|
|
||||||
--timeline-node-bg: #c2c6cc;
|
--timeline-node-bg: #c2c6cc;
|
||||||
|
|
||||||
--timeline-year-dot-color: #ffffff;
|
--timeline-year-dot-color: #ffffff;
|
||||||
|
|
||||||
/* Footer */
|
/* Footer */
|
||||||
|
|
||||||
--footer-bg-color: #ffffff;
|
--footer-bg-color: #ffffff;
|
||||||
|
|
||||||
--footnote-target-bg: lightcyan;
|
--footnote-target-bg: lightcyan;
|
||||||
|
--footer-link: #424242;
|
||||||
---footer-link: inherit;
|
} // light-scheme
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
---
|
---
|
||||||
|
# Style for Archives
|
||||||
|
# v2.0
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2019 Cotes Chung
|
||||||
|
# MIT License
|
||||||
---
|
---
|
||||||
/*!
|
|
||||||
Style for Archives
|
|
||||||
v2.0
|
{% include_relative _addon/main.scss %}
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
© 2019 Cotes Chung
|
|
||||||
MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
%date-timeline {
|
%date-timeline {
|
||||||
content: "";
|
content: "";
|
||||||
@@ -18,6 +19,10 @@
|
|||||||
background-color: var(--timeline-color);
|
background-color: var(--timeline-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%date-font {
|
||||||
|
font-family: 'Roboto Condensed', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
#archives {
|
#archives {
|
||||||
letter-spacing: 0.03rem;
|
letter-spacing: 0.03rem;
|
||||||
li {
|
li {
|
||||||
@@ -37,7 +42,7 @@
|
|||||||
|
|
||||||
span.lead {
|
span.lead {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
font-family: 'Oswald', sans-serif;
|
@extend %date-font;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 8px;
|
left: 8px;
|
||||||
|
|
||||||
@@ -75,7 +80,7 @@
|
|||||||
&.month {
|
&.month {
|
||||||
width: 1.4rem;
|
width: 1.4rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: 'Oswald', sans-serif;
|
@extend %date-font;
|
||||||
~a::before {
|
~a::before {
|
||||||
/* A dot for Month and Day */
|
/* A dot for Month and Day */
|
||||||
content: "";
|
content: "";
|
||||||
@@ -96,7 +101,7 @@
|
|||||||
}
|
}
|
||||||
&.day {
|
&.day {
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
font-family: sans-serif;
|
font-family: 'Lato', sans-serif;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-right: -2px;
|
margin-right: -2px;
|
||||||
width: 1.2rem;
|
width: 1.2rem;
|
||||||
@@ -111,7 +116,7 @@
|
|||||||
/* post title in Archvies */
|
/* post title in Archvies */
|
||||||
margin-left: 2.5rem;
|
margin-left: 2.5rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: .1rem;
|
top: 0.1rem;
|
||||||
}
|
}
|
||||||
&::after {
|
&::after {
|
||||||
@extend %date-timeline;
|
@extend %date-timeline;
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
---
|
---
|
||||||
|
# Style for Tab Categories
|
||||||
|
# v2.0
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2019 Cotes Chung
|
||||||
|
# MIT License
|
||||||
---
|
---
|
||||||
/*!
|
|
||||||
Style for Tab Categories
|
|
||||||
v2.0
|
{% include_relative _addon/main.scss %}
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
© 2019 Cotes Chung
|
|
||||||
MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
%category-icon-color {
|
%category-icon-color {
|
||||||
color: gray;
|
color: gray;
|
||||||
@@ -51,7 +52,7 @@
|
|||||||
color: #6c757d!important;
|
color: #6c757d!important;
|
||||||
> i.fas {
|
> i.fas {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: .7rem;
|
height: 0.7rem;
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
transition: 300ms ease all;
|
transition: 300ms ease all;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
---
|
---
|
||||||
|
# Style for page Category and Tag
|
||||||
|
# v2.0
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2019 Cotes Chung
|
||||||
|
# MIT License
|
||||||
---
|
---
|
||||||
/*!
|
|
||||||
Style for page Category and Tag
|
|
||||||
v2.0
|
{% include_relative _addon/main.scss %}
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
© 2019 Cotes Chung
|
|
||||||
MIT License
|
|
||||||
*/
|
|
||||||
@import "_addon/module";
|
|
||||||
|
|
||||||
#page-category, #page-tag {
|
#page-category, #page-tag {
|
||||||
ul > li {
|
ul > li {
|
||||||
line-height: 1.5rem;
|
line-height: 1.5rem;
|
||||||
padding: .6rem 0;
|
padding: 0.6rem 0;
|
||||||
&::before { // dot
|
&::before { // dot
|
||||||
background: #999;
|
background: #999;
|
||||||
width: 5px;
|
width: 5px;
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
display: block;
|
display: block;
|
||||||
content: "";
|
content: "";
|
||||||
position: relative;
|
position: relative;
|
||||||
top: .6rem;
|
top: 0.6rem;
|
||||||
margin-right: .5rem;
|
margin-right: 0.5rem;
|
||||||
}
|
}
|
||||||
> a { /* post's title */
|
> a { /* post's title */
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
|
|||||||
@@ -1,47 +1,45 @@
|
|||||||
---
|
---
|
||||||
|
# Style for Homepage
|
||||||
|
# v2.0
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2019 Cotes Chung
|
||||||
|
# MIT License
|
||||||
---
|
---
|
||||||
/*!
|
|
||||||
Style for Homepage
|
|
||||||
v2.0
|
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
© 2019 Cotes Chung
|
|
||||||
MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
{% include_relative _addon/main.scss %}
|
||||||
|
|
||||||
#post-list {
|
#post-list {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
padding-right: .5rem;
|
padding-right: 0.5rem;
|
||||||
.post-meta {
|
|
||||||
i:not(:first-child) { // post-meta icons on HOME
|
|
||||||
margin-left: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pagination {
|
|
||||||
font-size: 1rem;
|
|
||||||
a:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-preview {
|
.post-preview {
|
||||||
padding-top: 1.5rem;
|
padding-top: 1.5rem;
|
||||||
padding-bottom: 1rem;
|
padding-bottom: 1rem;
|
||||||
border-bottom: 1px solid var(--main-border-color);
|
border-bottom: 1px solid var(--main-border-color);
|
||||||
>h1 {
|
|
||||||
|
h1 {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
~i { // pinned icon
|
||||||
|
font-size: 0.86rem;
|
||||||
}
|
}
|
||||||
i.far { /* fontawesome icons */
|
|
||||||
font-size: 86%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-meta {
|
||||||
|
i {
|
||||||
|
font-size: 0.73rem;
|
||||||
|
&:not(:first-child) { // post-meta icons on the homepage
|
||||||
|
margin-left: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.post-content {
|
.post-content {
|
||||||
margin-top: .6rem;
|
margin-top: 0.6rem;
|
||||||
margin-bottom: .6rem;
|
margin-bottom: 0.6rem;
|
||||||
color: var(--post-list-text-color);
|
color: var(--post-list-text-color);
|
||||||
>p { /* Make preview shorter in Home page*/
|
>p {
|
||||||
|
/* Make preview shorter on the homepage */
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@@ -50,6 +48,15 @@
|
|||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // .post-preview
|
||||||
|
|
||||||
|
} // #post-list
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
font-size: 1rem;
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-item {
|
.page-item {
|
||||||
@@ -69,6 +76,9 @@
|
|||||||
border: 1px solid var(--btn-paginator-border-color);
|
border: 1px solid var(--btn-paginator-border-color);
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Lato', sans-serif;
|
||||||
background-color: var(--button-bg);
|
background-color: var(--button-bg);
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--btn-paginator-hover-color)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.active {
|
&.active {
|
||||||
.page-link {
|
.page-link {
|
||||||
@@ -91,11 +101,11 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-right: 0.6rem;
|
margin-right: 0.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // .page-item
|
} // .page-item
|
||||||
|
|
||||||
|
} // .pagination
|
||||||
|
|
||||||
@media all and (max-width: 576px) {
|
@media all and (max-width: 576px) {
|
||||||
#post-list .post-meta>span i:not(:first-child) {
|
#post-list .post-meta>span i:not(:first-child) {
|
||||||
@@ -112,16 +122,21 @@
|
|||||||
|
|
||||||
/* Sidebar is visible */
|
/* Sidebar is visible */
|
||||||
@media all and (min-width: 831px) {
|
@media all and (min-width: 831px) {
|
||||||
.pagination {
|
|
||||||
font-size: .85rem;
|
#post-list {
|
||||||
|
margin-top: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
font-size: 0.85rem;
|
||||||
.page-item .page-link {
|
.page-item .page-link {
|
||||||
width: 2.2rem;
|
width: 2.2rem;
|
||||||
height: 2.2rem;
|
height: 2.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* Pannel hidden */
|
/* Pannel hidden */
|
||||||
@media all and (max-width: 1200px) {
|
@media all and (max-width: 1200px) {
|
||||||
#post-list {
|
#post-list {
|
||||||
|
|||||||
10
assets/css/page.scss
Normal file
10
assets/css/page.scss
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
# The default style for layout Page
|
||||||
|
# v2.2
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2020 Cotes Chung
|
||||||
|
# MIT License
|
||||||
|
---
|
||||||
|
|
||||||
|
{% include_relative _addon/main.scss %}
|
||||||
|
{% include_relative _addon/syntax.scss %}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
# Post-specific style
|
||||||
|
# v2.0
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2019 Cotes Chung
|
||||||
|
# MIT License
|
||||||
---
|
---
|
||||||
/*!
|
|
||||||
Post-specific style
|
|
||||||
v2.0
|
{% include_relative _addon/main.scss %}
|
||||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
{% include_relative _addon/syntax.scss %}
|
||||||
© 2019 Cotes Chung
|
|
||||||
MIT License
|
|
||||||
*/
|
|
||||||
@import "_addon/variables";
|
|
||||||
|
|
||||||
$prompt-older: "{{ site.data.label.post.button.previous }}";
|
$prompt-older: "{{ site.data.label.post.button.previous }}";
|
||||||
$prompt-newer: "{{ site.data.label.post.button.next }}";
|
$prompt-newer: "{{ site.data.label.post.button.next }}";
|
||||||
@@ -26,28 +27,41 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
border-color: var(--btn-border-color);
|
border-color: var(--btn-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.post img {
|
.post-content {
|
||||||
margin-top: .5rem;
|
> ol, > ul, > dl {
|
||||||
margin-bottom: 1.5rem;
|
padding-left: 2rem;
|
||||||
max-width: 100%;
|
li+li {
|
||||||
height: auto;
|
margin-top: 0.3rem;
|
||||||
// filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.08));
|
}
|
||||||
position: relative;
|
}
|
||||||
left: 50%;
|
li {
|
||||||
-webkit-transform: translateX(-50%);
|
> ol, > ul, > dl { // sub list
|
||||||
-ms-transform: translateX(-50%);
|
padding-left: 2rem;
|
||||||
transform: translateX(-50%);
|
}
|
||||||
|
> p {
|
||||||
|
margin: 1rem 0 0.8rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.post-preview-img {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
@include align-center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-tail-wrapper {
|
.post-tail-wrapper {
|
||||||
margin-top: 5rem;
|
margin-top: 6rem;
|
||||||
border-bottom: 1px double var(--main-border-color);
|
border-bottom: 1px double var(--main-border-color);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-tags {
|
||||||
|
line-height: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.post-navigation {
|
.post-navigation {
|
||||||
padding-top: 3rem;
|
padding-top: 3rem;
|
||||||
padding-bottom: 2rem;
|
padding-bottom: 4rem;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@include btn-post-nav;
|
@include btn-post-nav;
|
||||||
@@ -75,20 +89,20 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
p {
|
p {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
line-height: 1.5rem;
|
line-height: 1.5rem;
|
||||||
margin-top: .3rem;
|
margin-top: 0.3rem;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
a, span {
|
a, span {
|
||||||
&::before {
|
&::before {
|
||||||
color: var(--text-muted-color);
|
color: var(--text-muted-color);
|
||||||
font-size: .65rem;
|
font-size: 0.65rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
left: .5px;
|
left: 0.5px;
|
||||||
&::before {
|
&::before {
|
||||||
content: $prompt-older
|
content: $prompt-older
|
||||||
}
|
}
|
||||||
@@ -96,7 +110,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
&:last-child {
|
&:last-child {
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
right: .5px;
|
right: 0.5px;
|
||||||
&::before {
|
&::before {
|
||||||
content: $prompt-newer
|
content: $prompt-newer
|
||||||
}
|
}
|
||||||
@@ -127,17 +141,15 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
&.topbar-down {
|
&.topbar-down {
|
||||||
top: 6rem;
|
top: 6rem;
|
||||||
}
|
}
|
||||||
>h3 {
|
> span {
|
||||||
font-size: 1rem;
|
@include panel-label;
|
||||||
font-family: 'Oswald', sans-serif;
|
|
||||||
color: gray;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#toc li>a {
|
#toc li>a {
|
||||||
line-height: 1rem;
|
line-height: 1rem;
|
||||||
padding-top: .5rem;
|
padding-top: 0.5rem;
|
||||||
padding-bottom: .5rem;
|
padding-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -145,9 +157,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
|
|
||||||
#related-posts {
|
#related-posts {
|
||||||
>h3 {
|
>h3 {
|
||||||
color: gray;
|
@include label(1.1rem, 600);
|
||||||
font-size: 1.1rem;
|
|
||||||
font-family: 'Oswald', sans-serif;
|
|
||||||
}
|
}
|
||||||
.card {
|
.card {
|
||||||
border: 1px solid var(--card-border-color);
|
border: 1px solid var(--card-border-color);
|
||||||
@@ -157,12 +167,12 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
-moz-transition: all .3s ease-in-out;
|
-moz-transition: all .3s ease-in-out;
|
||||||
transition: all .3s ease-in-out;
|
transition: all .3s ease-in-out;
|
||||||
h3 {
|
h3 {
|
||||||
color: var(--label-relate-post);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
-webkit-transform: translate3d(0, -3px, 0);
|
-webkit-transform: translate3d(0, -3px, 0);
|
||||||
transform: translate3d(0, -3px, 0);
|
transform: translate3d(0, -3px, 0);
|
||||||
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
|
box-shadow: 0 20px 35px -4px rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,8 +181,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
font-size: .9rem;
|
font-size: 0.9rem;
|
||||||
margin-bottom: .5rem;
|
margin-bottom: 0.5rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
@@ -203,6 +213,9 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
|
|
||||||
#post-extend-wrapper {
|
#post-extend-wrapper {
|
||||||
min-height: 2rem;
|
min-height: 2rem;
|
||||||
|
#disqus_thread {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-tail-bottom a {
|
.post-tail-bottom a {
|
||||||
@@ -220,7 +233,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
a {
|
a {
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-right: .25rem;
|
margin-right: 0.25rem;
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -230,7 +243,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>i {
|
>i {
|
||||||
padding-top: .35rem;
|
padding-top: 0.35rem;
|
||||||
&:hover {
|
&:hover {
|
||||||
@extend %btn-share-hovor;
|
@extend %btn-share-hovor;
|
||||||
}
|
}
|
||||||
@@ -260,7 +273,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
|
|
||||||
|
|
||||||
.share-label {
|
.share-label {
|
||||||
font-family: 'Oswald', sans-serif;
|
@include label(inherit, 400, inherit);
|
||||||
&::after {
|
&::after {
|
||||||
content: ":";
|
content: ":";
|
||||||
}
|
}
|
||||||
@@ -268,24 +281,28 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
|
|
||||||
.license-wrapper {
|
.license-wrapper {
|
||||||
line-height: 1.2rem;
|
line-height: 1.2rem;
|
||||||
.license-text>a {
|
>a {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
&:hover {
|
||||||
|
@extend %link-hover;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
i {
|
i {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
span:last-child {
|
span:last-child {
|
||||||
font-size: .85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
} // .license-wrapper
|
} // .license-wrapper
|
||||||
|
|
||||||
|
|
||||||
@media all and (max-width: 576px) {
|
@media all and (max-width: 576px) {
|
||||||
.post-tail-bottom {
|
.post-tail-bottom {
|
||||||
-ms-flex-wrap: wrap!important;
|
-ms-flex-wrap: wrap-reverse!important;
|
||||||
flex-wrap: wrap!important;
|
flex-wrap: wrap-reverse!important;
|
||||||
>div:first-child {
|
>div:first-child {
|
||||||
margin-bottom: 1rem;
|
width: 100%;
|
||||||
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -303,8 +320,8 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
content: "\2022";
|
content: "\2022";
|
||||||
color: rgba(158, 158, 158, 0.8);
|
color: rgba(158, 158, 158, 0.8);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding-left: .5rem;
|
padding-left: 0.5rem;
|
||||||
padding-right: .3rem;
|
padding-right: 0.3rem;
|
||||||
}
|
}
|
||||||
&.flex-column {
|
&.flex-column {
|
||||||
-webkit-box-orient: horizontal!important;
|
-webkit-box-orient: horizontal!important;
|
||||||
@@ -324,47 +341,10 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
|
|||||||
|
|
||||||
/* Hide SideBar and TOC */
|
/* Hide SideBar and TOC */
|
||||||
@media all and (max-width: 830px) {
|
@media all and (max-width: 830px) {
|
||||||
.post img {
|
|
||||||
position: relative;
|
|
||||||
left: 50%;
|
|
||||||
-webkit-transform: translateX(-50%);
|
|
||||||
-ms-transform: translateX(-50%);
|
|
||||||
transform: translateX(-50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-navigation {
|
.post-navigation {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
margin-left: -.5rem;
|
margin-left: -.5rem;
|
||||||
margin-right: -.5rem;
|
margin-right: -.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
The following resposive design aim to
|
|
||||||
make #post-extend-wrapper margin-right same as pannel's width
|
|
||||||
*/
|
|
||||||
@media all and (min-width: 1200px) {
|
|
||||||
#post-extend-wrapper {
|
|
||||||
margin-right: 25%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (min-width: 1460px) {
|
|
||||||
#post-extend-wrapper {
|
|
||||||
margin-right: 300px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (min-width: 1650px) {
|
|
||||||
#post-extend-wrapper {
|
|
||||||
margin-right: calc((100% - 1150px) / 10 + 300px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (min-width: 1700px) {
|
|
||||||
#post-extend-wrapper {
|
|
||||||
margin-right: calc((100% - 1150px) / 8 + 300px);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
---
|
---
|
||||||
|
# Styles for Tab Tags
|
||||||
|
# v2.0
|
||||||
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
# © 2019 Cotes Chung
|
||||||
|
# MIT License
|
||||||
---
|
---
|
||||||
|
|
||||||
/*!
|
|
||||||
* Styles for Tab Tags
|
{% include_relative _addon/main.scss %}
|
||||||
* v2.0
|
|
||||||
* https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
* © 2019 Cotes Chung
|
|
||||||
* MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
border-radius: 0.7em;
|
border-radius: 0.7em;
|
||||||
padding: 6px 8px 7px;
|
padding: 6px 8px 7px;
|
||||||
margin-right: .8rem;
|
margin-right: 0.8rem;
|
||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
letter-spacing: 0;
|
letter-spacing: 0;
|
||||||
border: 1px solid var(--tag-border) !important;
|
border: 1px solid var(--tag-border) !important;
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
layout: compress
|
|
||||||
---
|
|
||||||
|
|
||||||
const proxyData = '{"url": "{{ site.google_analytics.pv.proxy_endpoint }}"}';
|
|
||||||
|
|
||||||
{%- capture pv_data -%}
|
|
||||||
{%- if site.google_analytics.pv.cache and site.google_analytics.pv.enabled -%}
|
|
||||||
{% include_relative pageviews.json %}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endcapture -%}
|
|
||||||
|
|
||||||
const pageviews = '{{ pv_data }}';
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 99 B |
@@ -1,51 +1,58 @@
|
|||||||
---
|
---
|
||||||
layout: compress
|
layout: compress
|
||||||
|
#
|
||||||
# A part of the Favicons
|
# A part of the Favicons
|
||||||
# v2.0
|
# Chirpy v2.0
|
||||||
# https://github.com/cotes2020/jekyll-theme-chirpy
|
# https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
# © 2019 Cotes Chung
|
# © 2019 Cotes Chung
|
||||||
# MIT License
|
# MIT License
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{% assign icon_url = "/assets/img/favicons" | relative_url %}
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "App",
|
"name": "{{ site.title }}",
|
||||||
|
"short_name": "{{ site.title }}",
|
||||||
|
"description": "{{ site.description }}",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "{{ site.baseurl }}\/assets\/img\/favicons\/android-icon-36x36.png",
|
"src": "{{ icon_url }}/android-icon-36x36.png",
|
||||||
"sizes": "36x36",
|
"sizes": "36x36",
|
||||||
"type": "image\/png",
|
"type": "image/png",
|
||||||
"density": "0.75"
|
"density": "0.75"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "{{ site.baseurl }}\/assets\/img\/favicons\/android-icon-48x48.png",
|
"src": "{{ icon_url }}/android-icon-48x48.png",
|
||||||
"sizes": "48x48",
|
"sizes": "48x48",
|
||||||
"type": "image\/png",
|
"type": "image/png",
|
||||||
"density": "1.0"
|
"density": "1.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "{{ site.baseurl }}\/assets\/img\/favicons\/android-icon-72x72.png",
|
"src": "{{ icon_url }}/android-icon-72x72.png",
|
||||||
"sizes": "72x72",
|
"sizes": "72x72",
|
||||||
"type": "image\/png",
|
"type": "image/png",
|
||||||
"density": "1.5"
|
"density": "1.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "{{ site.baseurl }}\/assets\/img\/favicons\/android-icon-96x96.png",
|
"src": "{{ icon_url }}/android-icon-96x96.png",
|
||||||
"sizes": "96x96",
|
"sizes": "96x96",
|
||||||
"type": "image\/png",
|
"type": "image/png",
|
||||||
"density": "2.0"
|
"density": "2.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "{{ site.baseurl }}\/assets\/img\/favicons\/android-icon-144x144.png",
|
"src": "{{ icon_url }}/android-icon-144x144.png",
|
||||||
"sizes": "144x144",
|
"sizes": "144x144",
|
||||||
"type": "image\/png",
|
"type": "image/png",
|
||||||
"density": "3.0"
|
"density": "3.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "{{ site.baseurl }}\/assets\/img\/favicons\/android-icon-192x192.png",
|
"src": "{{ icon_url }}/android-icon-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image\/png",
|
"type": "image/png",
|
||||||
"density": "4.0"
|
"density": "4.0"
|
||||||
}
|
}],
|
||||||
]
|
"start_url": "{{ '/index.html' | relative_url }}",
|
||||||
|
"display": "fullscreen",
|
||||||
|
"theme_color": "#2a1e6b",
|
||||||
|
"background_color": "white"
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 52 KiB |
BIN
assets/img/sample/gh-pages-sources.png
Normal file
BIN
assets/img/sample/gh-pages-sources.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
21
assets/js/_commons.js
Normal file
21
assets/js/_commons.js
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*!
|
||||||
|
Aggregation of common JS.
|
||||||
|
Chirpy@2.3
|
||||||
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
© 2020 Cotes Chung
|
||||||
|
MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
{% include_relative _commons/back-to-top.js %}
|
||||||
|
|
||||||
|
{% include_relative _commons/search-display.js %}
|
||||||
|
|
||||||
|
{% include_relative _commons/sidebar.js %}
|
||||||
|
|
||||||
|
{% include_relative _commons/topbar-switch.js %}
|
||||||
|
|
||||||
|
{% include_relative _commons/topbar-title.js %}
|
||||||
|
|
||||||
|
{% include_relative _commons/copy-link.js %}
|
||||||
|
|
||||||
|
{% include_relative _utils/tooltip-loader.js %}
|
||||||
18
assets/js/_commons/back-to-top.js
Normal file
18
assets/js/_commons/back-to-top.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
Reference: https://bootsnipp.com/snippets/featured/link-to-top-page
|
||||||
|
*/
|
||||||
|
$(window).scroll(function() {
|
||||||
|
if ($(this).scrollTop() > 50
|
||||||
|
&& $("#sidebar-trigger").css("display") === "none") {
|
||||||
|
$("#back-to-top").fadeIn();
|
||||||
|
} else {
|
||||||
|
$("#back-to-top").fadeOut();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$("#back-to-top").click(function() {
|
||||||
|
$("body,html").animate({scrollTop: 0}, 800);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
22
assets/js/_commons/copy-link.js
Normal file
22
assets/js/_commons/copy-link.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copy current page url to clipboard.
|
||||||
|
* v2.1
|
||||||
|
* https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
* © 2020 Cotes Chung
|
||||||
|
* MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
function copyLink(url) {
|
||||||
|
if (!url || 0 === url.length) {
|
||||||
|
url = window.location.href;
|
||||||
|
}
|
||||||
|
|
||||||
|
var $temp = $("<input>");
|
||||||
|
$("body").append($temp);
|
||||||
|
$temp.val(url).select();
|
||||||
|
document.execCommand("copy");
|
||||||
|
$temp.remove();
|
||||||
|
|
||||||
|
alert("Link copied successfully!");
|
||||||
|
|
||||||
|
}
|
||||||
155
assets/js/_commons/search-display.js
Normal file
155
assets/js/_commons/search-display.js
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
/*
|
||||||
|
* This script make #search-result-wrapper switch to unloaded or shown automatically.
|
||||||
|
* v2.0
|
||||||
|
* https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
* © 2018-2019 Cotes Chung
|
||||||
|
* MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
var btnSbTrigger = $("#sidebar-trigger");
|
||||||
|
var btnSearchTrigger = $("#search-trigger");
|
||||||
|
var btnCancel = $("#search-cancel");
|
||||||
|
var btnClear = $("#search-cleaner");
|
||||||
|
|
||||||
|
var main = $("#main");
|
||||||
|
var topbarTitle = $("#topbar-title");
|
||||||
|
var searchWrapper = $("#search-wrapper");
|
||||||
|
var resultWrapper = $("#search-result-wrapper");
|
||||||
|
var results = $("#search-results");
|
||||||
|
var input = $("#search-input");
|
||||||
|
var hints = $("#search-hints");
|
||||||
|
|
||||||
|
|
||||||
|
/*--- Actions in small screens (Sidebar unloaded) ---*/
|
||||||
|
|
||||||
|
var scrollBlocker = (function() {
|
||||||
|
var offset = 0;
|
||||||
|
return {
|
||||||
|
block() {
|
||||||
|
offset = $(window).scrollTop();
|
||||||
|
},
|
||||||
|
release() {
|
||||||
|
$("html,body").scrollTop(offset);
|
||||||
|
},
|
||||||
|
getOffset() {
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}());
|
||||||
|
|
||||||
|
var mobileSearchBar = (function() {
|
||||||
|
return {
|
||||||
|
on() {
|
||||||
|
btnSbTrigger.addClass("unloaded");
|
||||||
|
topbarTitle.addClass("unloaded");
|
||||||
|
btnSearchTrigger.addClass("unloaded");
|
||||||
|
searchWrapper.addClass("d-flex");
|
||||||
|
btnCancel.addClass("loaded");
|
||||||
|
},
|
||||||
|
off() {
|
||||||
|
btnCancel.removeClass("loaded");
|
||||||
|
searchWrapper.removeClass("d-flex");
|
||||||
|
btnSbTrigger.removeClass("unloaded");
|
||||||
|
topbarTitle.removeClass("unloaded");
|
||||||
|
btnSearchTrigger.removeClass("unloaded");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}());
|
||||||
|
|
||||||
|
var resultSwitch = (function() {
|
||||||
|
var visable = false;
|
||||||
|
|
||||||
|
return {
|
||||||
|
on() {
|
||||||
|
if (!visable) {
|
||||||
|
resultWrapper.removeClass("unloaded");
|
||||||
|
main.addClass("hidden");
|
||||||
|
|
||||||
|
visable = true;
|
||||||
|
scrollBlocker.block();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
off() {
|
||||||
|
if (visable) {
|
||||||
|
results.empty();
|
||||||
|
if (hints.hasClass("unloaded")) {
|
||||||
|
hints.removeClass("unloaded");
|
||||||
|
}
|
||||||
|
resultWrapper.addClass("unloaded");
|
||||||
|
btnClear.removeClass("visable");
|
||||||
|
main.removeClass("hidden");
|
||||||
|
|
||||||
|
input.val("");
|
||||||
|
visable = false;
|
||||||
|
|
||||||
|
scrollBlocker.release();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isVisable() {
|
||||||
|
return visable;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}());
|
||||||
|
|
||||||
|
|
||||||
|
function isMobileView() {
|
||||||
|
return btnCancel.hasClass("loaded");
|
||||||
|
}
|
||||||
|
|
||||||
|
btnSearchTrigger.click(function() {
|
||||||
|
mobileSearchBar.on();
|
||||||
|
resultSwitch.on();
|
||||||
|
input.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
btnCancel.click(function() {
|
||||||
|
mobileSearchBar.off();
|
||||||
|
resultSwitch.off();
|
||||||
|
});
|
||||||
|
|
||||||
|
input.focus(function() {
|
||||||
|
searchWrapper.addClass("input-focus");
|
||||||
|
});
|
||||||
|
|
||||||
|
input.focusout(function() {
|
||||||
|
searchWrapper.removeClass("input-focus");
|
||||||
|
});
|
||||||
|
|
||||||
|
input.on("keyup", function(e) {
|
||||||
|
if (e.keyCode === 8 && input.val() === "") {
|
||||||
|
if (!isMobileView()) {
|
||||||
|
resultSwitch.off();
|
||||||
|
} else {
|
||||||
|
hints.removeClass("unloaded");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (input.val() !== "") {
|
||||||
|
resultSwitch.on();
|
||||||
|
|
||||||
|
if (!btnClear.hasClass("visible")) {
|
||||||
|
btnClear.addClass("visable");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isMobileView()) {
|
||||||
|
hints.addClass("unloaded");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btnClear.on("click", function() {
|
||||||
|
input.val("");
|
||||||
|
if (isMobileView()) {
|
||||||
|
hints.removeClass("unloaded");
|
||||||
|
results.empty();
|
||||||
|
} else {
|
||||||
|
resultSwitch.off();
|
||||||
|
}
|
||||||
|
input.focus();
|
||||||
|
btnClear.removeClass("visable");
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
34
assets/js/_commons/sidebar.js
Normal file
34
assets/js/_commons/sidebar.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* Expand or close the sidebar in mobile screens.
|
||||||
|
* v2.0
|
||||||
|
* https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
* © 2018-2019 Cotes Chung
|
||||||
|
* MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
var sidebarUtil = (function() {
|
||||||
|
const ATTR_DISPLAY = "sidebar-display";
|
||||||
|
var isExpanded = false;
|
||||||
|
var body = $("body");
|
||||||
|
|
||||||
|
return {
|
||||||
|
toggle() {
|
||||||
|
if (isExpanded === false) {
|
||||||
|
body.attr(ATTR_DISPLAY, "");
|
||||||
|
} else {
|
||||||
|
body.removeAttr(ATTR_DISPLAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
isExpanded = !isExpanded;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}());
|
||||||
|
|
||||||
|
$("#sidebar-trigger").click(sidebarUtil.toggle);
|
||||||
|
|
||||||
|
$("#mask").click(sidebarUtil.toggle);
|
||||||
|
|
||||||
|
});
|
||||||
69
assets/js/_commons/topbar-switch.js
Normal file
69
assets/js/_commons/topbar-switch.js
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* Hide Header on scroll down
|
||||||
|
* v2.0
|
||||||
|
* https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
* © 2018-2019 Cotes Chung
|
||||||
|
* MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
var didScroll;
|
||||||
|
var lastScrollTop = 0;
|
||||||
|
var delta = 5;
|
||||||
|
var topbarHeight = $("#topbar-wrapper").outerHeight();
|
||||||
|
|
||||||
|
function hasScrolled() {
|
||||||
|
var st = $(this).scrollTop();
|
||||||
|
|
||||||
|
/* Make sure they scroll more than delta */
|
||||||
|
if (Math.abs(lastScrollTop - st) <= delta) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (st > lastScrollTop && st > topbarHeight) {
|
||||||
|
/* Scroll Down */
|
||||||
|
$("#topbar-wrapper").removeClass("topbar-down").addClass("topbar-up");
|
||||||
|
|
||||||
|
if ($("#toc-wrapper").length > 0) {
|
||||||
|
$("#toc-wrapper").removeClass("topbar-down");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($(".access").length > 0) {
|
||||||
|
$(".access").removeClass("topbar-down");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($("#search-input").is(":focus")) {
|
||||||
|
$("#search-input").blur(); /* remove focus */
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
/* Scroll Up */
|
||||||
|
if (st + $(window).height() < $(document).height()) {
|
||||||
|
$("#topbar-wrapper").removeClass("topbar-up").addClass("topbar-down");
|
||||||
|
if ($("#toc-wrapper").length > 0) {
|
||||||
|
$("#toc-wrapper").addClass("topbar-down");
|
||||||
|
}
|
||||||
|
if ($(".access").length > 0) {
|
||||||
|
$(".access").addClass("topbar-down");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lastScrollTop = st;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(window).scroll(function(event) {
|
||||||
|
if ($("#topbar-title").is(":hidden")) { /* Not in small screens */
|
||||||
|
didScroll = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
setInterval(function() {
|
||||||
|
if (didScroll) {
|
||||||
|
hasScrolled();
|
||||||
|
didScroll = false;
|
||||||
|
}
|
||||||
|
}, 250);
|
||||||
|
|
||||||
|
});
|
||||||
47
assets/js/_commons/topbar-title.js
Normal file
47
assets/js/_commons/topbar-title.js
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Topbar title auto change while scrolling in mobile screens.
|
||||||
|
* v2.0
|
||||||
|
* https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
* © 2018-2019 Cotes Chung
|
||||||
|
* MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
var DEFAULT = $("#topbar-title").text().trim();
|
||||||
|
var title = ($("div.post>h1").length > 0) ?
|
||||||
|
$("div.post>h1").text().trim() : $("h1").text().trim();
|
||||||
|
|
||||||
|
if ($("#page-category").length || $("#page-tag").length) {
|
||||||
|
/* The title in Category or Tag page will be "<title> <count_of_posts>" */
|
||||||
|
if (/\s/.test(title)) {
|
||||||
|
title = title.replace(/[0-9]/g, "").trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Replace topbar title while scroll screens. */
|
||||||
|
$(window).scroll(function () {
|
||||||
|
if ($("#post-list").length /* in Home page */
|
||||||
|
|| $("div.post>h1").is(":hidden") /* is tab pages */
|
||||||
|
|| $("#topbar-title").is(":hidden") /* not mobile screens */
|
||||||
|
|| $("#sidebar.sidebar-expand").length) { /* when the sidebar trigger is clicked */
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($(this).scrollTop() >= 95) {
|
||||||
|
if ($("#topbar-title").text() !== title) {
|
||||||
|
$("#topbar-title").text(title);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($("#topbar-title").text() !== DEFAULT) {
|
||||||
|
$("#topbar-title").text(DEFAULT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Click title remove hover effect. */
|
||||||
|
$("#topbar-title").click(function() {
|
||||||
|
$("body,html").animate({scrollTop: 0}, 800);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
22
assets/js/_home-post.js
Normal file
22
assets/js/_home-post.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/*!
|
||||||
|
JS group for layout Home or Post
|
||||||
|
Chirpy v2.3
|
||||||
|
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||||
|
© 2020 Cotes Chung
|
||||||
|
MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
{% include_relative _commons.js %}
|
||||||
|
|
||||||
|
{% include_relative _utils/timeago.js %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if site.google_analytics.pv.enabled %}
|
||||||
|
|
||||||
|
{% include_relative _pv-config.js %}
|
||||||
|
|
||||||
|
{% include_relative _utils/pageviews.js %}
|
||||||
|
|
||||||
|
{% include_relative lib/_countUp.min.js %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
14
assets/js/_pv-config.js
Normal file
14
assets/js/_pv-config.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/*!
|
||||||
|
PV configuration and Javascript conversion.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const proxyEndpoint = "{{ site.google_analytics.pv.proxy_endpoint }}";
|
||||||
|
|
||||||
|
|
||||||
|
{% if site.google_analytics.pv.cache and site.google_analytics.pv.enabled %}
|
||||||
|
{% assign enabled = true %}
|
||||||
|
{% else %}
|
||||||
|
{% assign enabled = false %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
const pvCacheEnabled = {{ enabled }};
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
Reference: https://bootsnipp.com/snippets/featured/link-to-top-page
|
|
||||||
*/
|
|
||||||
$(window).scroll(function() {
|
|
||||||
if ($(this).scrollTop() > 50
|
|
||||||
&& $('#sidebar-trigger').css('display') == 'none') {
|
|
||||||
$('#back-to-top').fadeIn();
|
|
||||||
} else {
|
|
||||||
$('#back-to-top').fadeOut();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
$('#back-to-top').click(function() {
|
|
||||||
$('body,html').animate({scrollTop: 0}, 800);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copy current page url to clipboard.
|
|
||||||
* v2.1
|
|
||||||
* https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
* © 2020 Cotes Chung
|
|
||||||
* MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
function copyLink(url) {
|
|
||||||
if (!url || 0 === url.length)
|
|
||||||
url = window.location.href;
|
|
||||||
var $temp = $("<input>");
|
|
||||||
|
|
||||||
$("body").append($temp);
|
|
||||||
$temp.val(url).select();
|
|
||||||
document.execCommand("copy");
|
|
||||||
$temp.remove();
|
|
||||||
|
|
||||||
alert("Link copied successfully!");
|
|
||||||
}
|
|
||||||
@@ -1,156 +0,0 @@
|
|||||||
/*
|
|
||||||
* This script make #search-result-wrapper switch to unloaded or shown automatically.
|
|
||||||
* v2.0
|
|
||||||
* https://github.com/cotes2020/jekyll-theme-chirpy
|
|
||||||
* © 2018-2019 Cotes Chung
|
|
||||||
* MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
|
|
||||||
var btnSbTrigger = $('#sidebar-trigger');
|
|
||||||
var btnSearchTrigger = $('#search-trigger');
|
|
||||||
var btnCancel = $('#search-cancel');
|
|
||||||
var btnClear = $('#search-cleaner');
|
|
||||||
|
|
||||||
var main = $('#main');
|
|
||||||
var topbarTitle = $('#topbar-title');
|
|
||||||
var searchWrapper = $('#search-wrapper');
|
|
||||||
var resultWrapper = $('#search-result-wrapper');
|
|
||||||
var results = $('#search-results');
|
|
||||||
var input = $('#search-input');
|
|
||||||
var hints = $('#search-hints');
|
|
||||||
|
|
||||||
|
|
||||||
/*--- Actions in small screens (Sidebar unloaded) ---*/
|
|
||||||
|
|
||||||
var scrollBlocker = (function() {
|
|
||||||
var offset = 0;
|
|
||||||
return {
|
|
||||||
block: function() {
|
|
||||||
offset = $(window).scrollTop();
|
|
||||||
$('body').addClass('no-scroll');
|
|
||||||
},
|
|
||||||
release: function() {
|
|
||||||
$('body').removeClass('no-scroll');
|
|
||||||
$('html,body').scrollTop(offset);
|
|
||||||
},
|
|
||||||
getOffset: function() {
|
|
||||||
return offset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
var mobileSearchBar = (function() {
|
|
||||||
return {
|
|
||||||
on: function() {
|
|
||||||
btnSbTrigger.addClass('unloaded');
|
|
||||||
topbarTitle.addClass('unloaded');
|
|
||||||
btnSearchTrigger.addClass('unloaded');
|
|
||||||
searchWrapper.addClass('d-flex');
|
|
||||||
btnCancel.addClass('loaded');
|
|
||||||
},
|
|
||||||
off: function() {
|
|
||||||
btnCancel.removeClass('loaded');
|
|
||||||
searchWrapper.removeClass('d-flex');
|
|
||||||
btnSbTrigger.removeClass('unloaded');
|
|
||||||
topbarTitle.removeClass('unloaded');
|
|
||||||
btnSearchTrigger.removeClass('unloaded');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
var resultSwitch = (function() {
|
|
||||||
var visable = false;
|
|
||||||
|
|
||||||
return {
|
|
||||||
on: function() {
|
|
||||||
if (!visable) {
|
|
||||||
resultWrapper.removeClass('unloaded');
|
|
||||||
main.addClass('hidden');
|
|
||||||
|
|
||||||
visable = true;
|
|
||||||
scrollBlocker.block();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
off: function() {
|
|
||||||
if (visable) {
|
|
||||||
results.empty();
|
|
||||||
if (hints.hasClass('unloaded')) {
|
|
||||||
hints.removeClass('unloaded');
|
|
||||||
}
|
|
||||||
resultWrapper.addClass('unloaded');
|
|
||||||
btnClear.removeClass('visable');
|
|
||||||
main.removeClass('hidden');
|
|
||||||
|
|
||||||
input.val('');
|
|
||||||
visable = false;
|
|
||||||
|
|
||||||
scrollBlocker.release();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isVisable: function() {
|
|
||||||
return visable;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
|
|
||||||
function isMobileView() {
|
|
||||||
return btnCancel.hasClass('loaded');
|
|
||||||
}
|
|
||||||
|
|
||||||
btnSearchTrigger.click(function() {
|
|
||||||
mobileSearchBar.on();
|
|
||||||
resultSwitch.on();
|
|
||||||
input.focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
btnCancel.click(function() {
|
|
||||||
mobileSearchBar.off();
|
|
||||||
resultSwitch.off();
|
|
||||||
});
|
|
||||||
|
|
||||||
input.focus(function() {
|
|
||||||
searchWrapper.addClass('input-focus');
|
|
||||||
});
|
|
||||||
|
|
||||||
input.focusout(function() {
|
|
||||||
searchWrapper.removeClass('input-focus');
|
|
||||||
});
|
|
||||||
|
|
||||||
input.on('keyup', function(e) {
|
|
||||||
if (e.keyCode == 8 && input.val() == '') {
|
|
||||||
if (!isMobileView()) {
|
|
||||||
resultSwitch.off();
|
|
||||||
} else {
|
|
||||||
hints.removeClass('unloaded');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (input.val() != '') {
|
|
||||||
resultSwitch.on();
|
|
||||||
|
|
||||||
if (!btnClear.hasClass('visible')) {
|
|
||||||
btnClear.addClass('visable');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isMobileView()) {
|
|
||||||
hints.addClass('unloaded');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btnClear.on('click', function() {
|
|
||||||
input.val('');
|
|
||||||
if (isMobileView()) {
|
|
||||||
hints.removeClass('unloaded');
|
|
||||||
results.empty();
|
|
||||||
} else {
|
|
||||||
resultSwitch.off();
|
|
||||||
}
|
|
||||||
input.focus();
|
|
||||||
btnClear.removeClass('visable');
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user