Compare commits
162 Commits
Author | SHA1 | Date | |
---|---|---|---|
1755d5d5b2 | |||
73b06f3cd4 | |||
![]() |
6bc9a57c00 | ||
![]() |
3e604cbdeb | ||
![]() |
bbf2d4f813 | ||
![]() |
3eda3ac083 | ||
![]() |
a6991680b8 | ||
![]() |
7a307a72a0 | ||
![]() |
13d9ad7f32 | ||
![]() |
8b2c9e1482 | ||
![]() |
86e8ee7e7d | ||
![]() |
495ac97dbd | ||
![]() |
af3de3609d | ||
![]() |
3bffe42e3e | ||
![]() |
d738b144b3 | ||
![]() |
f7983d906a | ||
![]() |
5190eb1920 | ||
![]() |
ee7ce903ff | ||
![]() |
abec39b9ec | ||
![]() |
6d65d92943 | ||
![]() |
f215616230 | ||
![]() |
60b14e65e9 | ||
![]() |
0b8bdc0e00 | ||
![]() |
4ec1f8e732 | ||
![]() |
65a7a9c536 | ||
![]() |
23e220b5f3 | ||
![]() |
e9297ac28b | ||
![]() |
ba5ae7c295 | ||
![]() |
9cd3e0bf68 | ||
![]() |
b2e0be5a6a | ||
![]() |
088da43913 | ||
![]() |
351d6728d0 | ||
![]() |
27d3a33222 | ||
![]() |
2ab1e3ae47 | ||
![]() |
8051ec1f09 | ||
![]() |
b559782447 | ||
![]() |
9aaaf388f8 | ||
![]() |
edb57eea34 | ||
![]() |
f955bcfa85 | ||
![]() |
45f7a84631 | ||
![]() |
f7f5311e6f | ||
![]() |
c4649b8284 | ||
![]() |
56526c8dac | ||
![]() |
df8f88f9c7 | ||
![]() |
bb7d753e4b | ||
![]() |
a736e8d11c | ||
![]() |
ae09494361 | ||
![]() |
ee4a22d88a | ||
![]() |
976af2c92d | ||
![]() |
fdfcadadcc | ||
![]() |
4e2229a73a | ||
![]() |
1c07248765 | ||
![]() |
ebd38a18ae | ||
![]() |
f92118257a | ||
![]() |
e6ee562996 | ||
![]() |
85c3eb9d3b | ||
![]() |
77da27a94b | ||
![]() |
27ca39f39e | ||
![]() |
1076ba9282 | ||
![]() |
b8ac0c8f95 | ||
![]() |
569b733e2a | ||
![]() |
67b5ae3a3a | ||
![]() |
d155afe2ae | ||
![]() |
e6abae4d5c | ||
![]() |
119b715655 | ||
![]() |
1b98206cad | ||
![]() |
9e42b3fad1 | ||
![]() |
d560e45ca2 | ||
![]() |
046bb90685 | ||
![]() |
e86002e941 | ||
![]() |
f8ac686c1c | ||
![]() |
082fb48650 | ||
![]() |
c07ff1df05 | ||
![]() |
c5c1f03557 | ||
![]() |
4e05bfb399 | ||
![]() |
30212827f0 | ||
![]() |
5aaeae2885 | ||
![]() |
526a4b7005 | ||
![]() |
b4fd858b94 | ||
![]() |
ad03e3011e | ||
![]() |
5686c96de2 | ||
![]() |
15933757ca | ||
![]() |
5610d561bb | ||
![]() |
385f0f023b | ||
![]() |
40c36a70f0 | ||
![]() |
25f978e06e | ||
![]() |
a0ce0996e0 | ||
![]() |
15c06f3445 | ||
![]() |
25aff95260 | ||
![]() |
93ec7e56e6 | ||
![]() |
cf47decf89 | ||
![]() |
b27a449dc5 | ||
![]() |
a7c7854617 | ||
![]() |
89a8289f68 | ||
![]() |
11685b9b7b | ||
![]() |
607d67051f | ||
![]() |
8e3409c4af | ||
![]() |
6ebb7d928a | ||
![]() |
509ca385d7 | ||
![]() |
a1117d3403 | ||
![]() |
d5a25fb0cc | ||
![]() |
3b4f87bdbf | ||
![]() |
43d403a019 | ||
![]() |
2ba53504e1 | ||
![]() |
2fe68caed9 | ||
![]() |
f59fca14f8 | ||
![]() |
39e17d6f68 | ||
![]() |
e08456419c | ||
![]() |
8405b789e9 | ||
![]() |
db7095c0bb | ||
![]() |
24229f1802 | ||
![]() |
b7ec24fd1b | ||
![]() |
574be4e134 | ||
![]() |
9453520e2a | ||
![]() |
35fff3e0cc | ||
![]() |
dfcdaf9245 | ||
![]() |
b4c5e79c1b | ||
![]() |
7be11c4b7f | ||
![]() |
03b83da513 | ||
![]() |
ccd85b2436 | ||
![]() |
53ad048763 | ||
![]() |
85871aadfc | ||
![]() |
61079367ef | ||
![]() |
07e199ba11 | ||
![]() |
92a55d49e5 | ||
![]() |
ee86b0d152 | ||
![]() |
53f3a902c1 | ||
![]() |
05dba844d7 | ||
![]() |
d44d4c2a79 | ||
![]() |
a4f496b796 | ||
![]() |
03ebd658ea | ||
![]() |
77a33df023 | ||
![]() |
588740f27b | ||
![]() |
726349a2e0 | ||
![]() |
fbac63d70e | ||
![]() |
c7e4f52499 | ||
![]() |
fdaabac210 | ||
![]() |
76bb84d195 | ||
![]() |
88e6bc5993 | ||
![]() |
3feea66b49 | ||
![]() |
6b589a8206 | ||
![]() |
835e98d85d | ||
![]() |
a2019876a2 | ||
![]() |
dca196c315 | ||
![]() |
85b7dc11ca | ||
![]() |
03fd9dc829 | ||
![]() |
a2f37c8470 | ||
![]() |
d0a6d943e0 | ||
![]() |
fa0f7856bf | ||
![]() |
dac9b379dc | ||
![]() |
a59b6a6f32 | ||
![]() |
40674ad12b | ||
![]() |
b0ad23d764 | ||
![]() |
6db5f5c3f9 | ||
![]() |
7b7b50fe1a | ||
![]() |
73b15c7271 | ||
![]() |
24b135ca4b | ||
![]() |
86b9b5aa50 | ||
![]() |
8918bff71f | ||
![]() |
dd3766bce3 | ||
![]() |
8310dd347d | ||
![]() |
d6de03a2d0 |
2
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -12,7 +12,7 @@ labels: bug
|
|||||||
|
|
||||||
> 请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
|
> 请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)
|
||||||
|
|
||||||
- [ ] 已使用 Hugo Extended 0.86.0 或更高的版本 (I'm using Hugo Extended version 0.86.0 or later)
|
- [ ] 已使用 Hugo Extended 0.134.0 或更高的版本 (I'm using Hugo Extended version 0.134.0 or later)
|
||||||
- [ ] 已使用 Hugo NexT 4.0 或更高的版本 (I'm using Hugo NexT version 4.0 or later)
|
- [ ] 已使用 Hugo NexT 4.0 或更高的版本 (I'm using Hugo NexT version 4.0 or later)
|
||||||
- [ ] 已阅读 [Hugo 故障排除](https://gohugo.io/troubleshooting/)并尝试修复无果 (I had already read the [Troubleshooting page of Hugo](https://gohugo.io/troubleshooting/))
|
- [ ] 已阅读 [Hugo 故障排除](https://gohugo.io/troubleshooting/)并尝试修复无果 (I had already read the [Troubleshooting page of Hugo](https://gohugo.io/troubleshooting/))
|
||||||
- [ ] 已搜索过当前所有[已知问题](https://github.com/hugo-next/hugo-theme-next/issues)和[讨论区](https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a) ,但没有找到帮助 (I had already searched for current [Issues](https://github.com/hugo-next/hugo-theme-next/issues) and [Q & A](https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a), which does not help me.)
|
- [ ] 已搜索过当前所有[已知问题](https://github.com/hugo-next/hugo-theme-next/issues)和[讨论区](https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a) ,但没有找到帮助 (I had already searched for current [Issues](https://github.com/hugo-next/hugo-theme-next/issues) and [Q & A](https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a), which does not help me.)
|
||||||
|
30
.gitignore
vendored
@ -1,30 +1,14 @@
|
|||||||
# Ignore files in Hugo NexT theme
|
# Ignore files in Hugo NexT theme
|
||||||
|
|
||||||
exampleSite/*
|
# Special files in content folder
|
||||||
|
exampleSite/public/
|
||||||
|
exampleSite/resources/
|
||||||
|
exampleSite/.hugo_build.lock
|
||||||
|
exampleSite/config.dev.yaml
|
||||||
|
exampleSite/config.release.yaml
|
||||||
|
exampleSite/dev-startup.sh
|
||||||
|
|
||||||
# Exclude special files in content folder
|
|
||||||
exampleSite/content/**/
|
|
||||||
!exampleSite/content
|
|
||||||
!exmapleSite/content/about.md
|
|
||||||
!exampleSite/content/archives
|
|
||||||
!exampleSite/content/post
|
|
||||||
|
|
||||||
# Exclude special files in data folder
|
|
||||||
!exampleSite/data
|
|
||||||
|
|
||||||
# Exclude special files in layouts folder
|
|
||||||
!exampleSite/layouts
|
|
||||||
|
|
||||||
# Exclude special files in static folder
|
|
||||||
!exampleSite/static
|
|
||||||
|
|
||||||
# Exclude special files
|
|
||||||
!exampleSite/config.yaml
|
|
||||||
!exampleSite/startup.sh
|
|
||||||
|
|
||||||
data/*
|
|
||||||
!data/config.yaml
|
|
||||||
!data/resources.yaml
|
|
||||||
|
|
||||||
# vscode
|
# vscode
|
||||||
.vscode/
|
.vscode/
|
||||||
|
81
README.md
@ -1,7 +1,7 @@
|
|||||||
[中文](https://github.com/hugo-next/hugo-theme-next/blob/main/README.zh.md) | [English](#)
|
[中文](https://github.com/hugo-next/hugo-theme-next/blob/main/README.zh.md) | [English](#)
|
||||||
|
|
||||||
<a title="Hugo NexT Website" href="https://preview.hugo-next.eu.org">
|
<a title="Hugo NexT Website" href="https://preview.hugo-next.eu.org">
|
||||||
<img align="right" alt="NexT logo" width="266" src="https://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png">
|
<img align="right" alt="NexT logo" width="266" src="images/hugo-next-primary.png">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## Hugo NexT
|
## Hugo NexT
|
||||||
@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
> All page designs & configuration compatibility with Hexo NexT, it's very easy migrate your site from Hexo to Hugo and enjoy yourself.
|
> All page designs & configuration compatibility with Hexo NexT, it's very easy migrate your site from Hexo to Hugo and enjoy yourself.
|
||||||
|
|
||||||
[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
|
[](https://app.gitter.im/#/room/#hugo-next_community:gitter.im) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [](https://github.com/hugo-next/hugo-theme-next/releases) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 🎨 4 Scheme
|
## 🎨 4 Scheme
|
||||||
|
|
||||||
@ -21,10 +23,10 @@
|
|||||||
|
|
||||||
## 👀 Live Preview
|
## 👀 Live Preview
|
||||||
|
|
||||||
| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status |
|
| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status |
|
||||||
| :---: | :---: | :---: | :---: | :---: | :---: |
|
| :---------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------------: | :------------------------------------------------: | :-------------------------------------------------------------------------------------------------: |
|
||||||
| Preliminary | [Gemini](https://preview.hugo-next.eu.org/) | [Muse](https://preview.hugo-next.eu.org/muse/) | [Mist](https://preview.hugo-next.eu.org/mist/) | [Pisces](https://preview.hugo-next.eu.org/pisces/) |  |
|
| Preliminary | [Gemini](https://preview.hugo-next.eu.org/) | [Muse](https://preview.hugo-next.eu.org/muse/) | [Mist](https://preview.hugo-next.eu.org/mist/) | [Pisces](https://preview.hugo-next.eu.org/pisces/) |  |
|
||||||
| Production | [Gemini](https://hugo-next.eu.org/) | [Muse](https://hugo-next.eu.org/muse/) | [Mist](https://hugo-next.eu.org/mist/) | [Pisces](https://hugo-next.eu.org/pisces/) |  |
|
| Production | [Gemini](https://hugo-next.eu.org/) | [Muse](https://hugo-next.eu.org/muse/) | [Mist](https://hugo-next.eu.org/mist/) | [Pisces](https://hugo-next.eu.org/pisces/) |  |
|
||||||
|
|
||||||
> - Preliminary: all new feature developments will be previewed as soon as possible.
|
> - Preliminary: all new feature developments will be previewed as soon as possible.
|
||||||
> - Production: Only the features that are tested stably and meet the requirements will be officially released.
|
> - Production: Only the features that are tested stably and meet the requirements will be officially released.
|
||||||
@ -33,12 +35,23 @@
|
|||||||
|
|
||||||
Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` software in your PC.
|
Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` software in your PC.
|
||||||
|
|
||||||
|
### 📦 Install Hugo
|
||||||
|
|
||||||
### 📰 Use Template
|
If you want to quickly preview the actual effect of the theme, you can directly clone the repository code of the current theme and run the example site:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ git clone --single-branch -b main https://github.com/hugo-next/hugo-theme-next.git hugo-theme-next
|
||||||
|
$ cd hugo-theme-next/exampleSite/
|
||||||
|
$ sh startup.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Open a computer browser and enter `http://127.0.0.1:1414/`, then you can access and view it.
|
||||||
|
|
||||||
|
### 📰 Use Template
|
||||||
|
|
||||||
If there your first time build blog site, Recommended use template of `Github` which can easily create your site code. Click & visit this repository: [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter), then click the green button which name call `Use this template` upper right corner on the page. Just like below image:
|
If there your first time build blog site, Recommended use template of `Github` which can easily create your site code. Click & visit this repository: [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter), then click the green button which name call `Use this template` upper right corner on the page. Just like below image:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
After do that click the green button which name call `Create repository from template`, then will create your site code automatic, and clone it on your PC environment.
|
After do that click the green button which name call `Create repository from template`, then will create your site code automatic, and clone it on your PC environment.
|
||||||
|
|
||||||
@ -47,16 +60,26 @@ After do that click the green button which name call `Create repository from tem
|
|||||||
If you had a blog site, then use `submodule` to lead into the theme, see below commands:
|
If you had a blog site, then use `submodule` to lead into the theme, see below commands:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cd hugo-next-exmaple
|
$ cd hugo-next-example
|
||||||
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
|
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
|
||||||
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
|
$ cp themes/hugo-theme-next/exampleSite/hugo.yaml .
|
||||||
$ mv config.toml config.toml.backup
|
$ mv hugo.toml hugo.toml.backup
|
||||||
|
```
|
||||||
|
|
||||||
|
Or use `Hugo module` to lead into the theme, see below commands:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cd hugo-next-example
|
||||||
|
$ hugo mod init hugo-next-example
|
||||||
|
$ wget -O hugo.yaml https://github.com/hugo-next/hugo-theme-next/raw/main/exampleSite/hugo.yaml
|
||||||
|
$ sed -i 's/hugo-theme-next/github.com\/hugo-next\/hugo-theme-next\/v4/' hugo.yaml
|
||||||
|
$ mv hugo.toml hugo.toml.backup
|
||||||
```
|
```
|
||||||
|
|
||||||
### 💻 Preview on Local
|
### 💻 Preview on Local
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cd hugo-next-exmaple
|
$ cd hugo-next-example
|
||||||
$ hugo server
|
$ hugo server
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -70,10 +93,17 @@ Done that input adrress http://127.0.0.1:1313/ on browser will see the effect &
|
|||||||
Execute command as below in your site directory when the theme upgrade.
|
Execute command as below in your site directory when the theme upgrade.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cd hugo-next-exmaple
|
$ cd hugo-next-example
|
||||||
$ git submodule update --remote
|
$ git submodule update --remote
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Execute command as below if you are using `Hugo module`:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cd hugo-next-example
|
||||||
|
$ hugo mod get -u
|
||||||
|
```
|
||||||
|
|
||||||
## 📝 New Post
|
## 📝 New Post
|
||||||
|
|
||||||
There had ready a new post template for you, It is recommended to use the following Hugo command to quickly create a new post:
|
There had ready a new post template for you, It is recommended to use the following Hugo command to quickly create a new post:
|
||||||
@ -81,12 +111,12 @@ There had ready a new post template for you, It is recommended to use the follo
|
|||||||
```sh
|
```sh
|
||||||
$ hugo new posts/hello-world.md
|
$ hugo new posts/hello-world.md
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> By defalut `hugo new` command will create new post under `content` root directory, so in here `posts` were you custom subfolder in `content` directory.
|
> By defalut `hugo new` command will create new post under `content` root directory, so in here `posts` were you custom subfolder in `content` directory.
|
||||||
|
|
||||||
All front matter parameters's description in post as below:
|
All front matter parameters's description in post as below:
|
||||||
|
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
---
|
---
|
||||||
title: "{{ replace .Name "-" " " | title }}"
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
@ -158,6 +188,10 @@ Hope could submmit your site information in this file [flinks.yaml](https://gith
|
|||||||
|
|
||||||
All features development progress and new request in [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9), welcome to join us and compelete it together.
|
All features development progress and new request in [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9), welcome to join us and compelete it together.
|
||||||
|
|
||||||
|
[](https://github.com/hugo-next/hugo-theme-next/graphs/contributors)
|
||||||
|
|
||||||
|
[](https://github.com/hugo-next/hugo-theme-next/stargazers)
|
||||||
|
|
||||||
## 📜 License
|
## 📜 License
|
||||||
|
|
||||||
[MIT License](LICENSE)
|
[MIT License](LICENSE)
|
||||||
@ -170,11 +204,16 @@ That's my hobby to develop `Hugo NexT` theme, thanks all people who gived the do
|
|||||||
|
|
||||||
List of Donors(Order desc by Date):
|
List of Donors(Order desc by Date):
|
||||||
|
|
||||||
| Donation time | Donors | Donation mode | Donation content | Message |
|
| Donation time | Donors | Donation mode | Donation content | Message |
|
||||||
| :-------: | ------ | ------ | ---- | ---- |
|
| :-----------: | ------ | ------------- | ---------------- | -------------------------------------------------------------------------- |
|
||||||
| 2022.09.30 | *軒 | wechat pay | ¥66.66 | Hope it could help more people. |
|
| 2024.05.11 | *祥 | alipay | RMB 66.66 | Thank you for creating such a great theme. |
|
||||||
| 2022.09.30 | N*l | wechat pay | ¥20.00 | / |
|
| 2023.07.25 | *五 | alipay | RMB 50.00 | I really like the 'Next' theme, thank you, let me buy you a cup of coffee. |
|
||||||
| 2022.07.09 | *风 | wechat pay | ¥10.00 | / |
|
| 2023.06.01 | **霖 | alipay | RMB 10.00 | / |
|
||||||
| 2022.05.08 | *泉 | wechat pay | ¥6.60 | Good luck with next develop. |
|
| 2022.11.15 | f888 | xianyu | RMB 6.20 | Good luck. |
|
||||||
| 2022.02.28 | *娇 | wechat pay | ¥5.00 | / |
|
| 2022.09.30 | *軒 | wechat pay | RMB 66.66 | Hope it could help more people. |
|
||||||
| 2021.12.21 | z*y | wechat pay | ¥18.88 | / |
|
| 2022.09.30 | N*l | wechat pay | RMB 20.00 | / |
|
||||||
|
| 2022.07.09 | *风 | wechat pay | RMB 10.00 | / |
|
||||||
|
| 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. |
|
||||||
|
| 2022.02.28 | *娇 | wechat pay | RMB 5.00 | / |
|
||||||
|
| 2021.12.21 | z*y | wechat pay | RMB 18.88 | / |
|
||||||
|
|
||||||
|
79
README.zh.md
@ -1,7 +1,7 @@
|
|||||||
[中文](#) | [English](https://github.com/hugo-next/hugo-theme-next/blob/main/README.md)
|
[中文](#) | [English](https://github.com/hugo-next/hugo-theme-next/blob/main/README.md)
|
||||||
|
|
||||||
<a title="Hugo NexT 站点" href="https://preview.hugo-next.eu.org">
|
<a title="Hugo NexT 站点" href="https://preview.hugo-next.eu.org">
|
||||||
<img align="right" alt="NexT logo" width="266" src="https://imgs.lisenhui.cn/hugo-next/logo/hugo-next-primary.png">
|
<img align="right" alt="NexT logo" width="266" src="images/hugo-next-primary.png">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## Hugo NexT
|
## Hugo NexT
|
||||||
@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
> 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。
|
> 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。
|
||||||
|
|
||||||
[](https://gitter.im/hugo-next/community) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
|
[](https://app.gitter.im/#/room/#hugo-next_community:gitter.im) [](https://github.com/gohugoio/hugo/releases/latest) [](https://github.com/hugo-next/hugo-theme-next) [](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [](https://github.com/hugo-next/hugo-theme-next/releases) [](https://github.com/hugo-next/hugo-theme-next/find/main) [](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 🎨 4 种页面模式
|
## 🎨 4 种页面模式
|
||||||
|
|
||||||
@ -21,10 +23,10 @@
|
|||||||
|
|
||||||
## 👀 在线预览
|
## 👀 在线预览
|
||||||
|
|
||||||
| 环境 | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | 状态 |
|
| 环境 | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | 状态 |
|
||||||
| :---: | :---: | :---: | :---: | :---: | :---: |
|
| :------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------------: | :------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
|
||||||
| 开发版本 | [双子座](https://preview.hugo-next.eu.org/) | [冥想](https://preview.hugo-next.eu.org/muse/) | [迷雾](https://preview.hugo-next.eu.org/mist/) | [双鱼座](https://preview.hugo-next.eu.org/pisces/) |  |
|
| 开发版本 | [双子座](https://preview.hugo-next.eu.org/) | [冥想](https://preview.hugo-next.eu.org/muse/) | [迷雾](https://preview.hugo-next.eu.org/mist/) | [双鱼座](https://preview.hugo-next.eu.org/pisces/) |  |
|
||||||
| 正式版本 | [双子座](https://hugo-next.eu.org/) | [冥想](https://hugo-next.eu.org/muse/) | [迷雾](https://hugo-next.eu.org/mist/) | [双鱼座](https://hugo-next.eu.org/pisces/) |  |
|
| 正式版本 | [双子座](https://hugo-next.eu.org/) | [冥想](https://hugo-next.eu.org/muse/) | [迷雾](https://hugo-next.eu.org/mist/) | [双鱼座](https://hugo-next.eu.org/pisces/) |  |
|
||||||
|
|
||||||
> - 开发版本: 所有的新功能开发都会在此第一时间发布预览
|
> - 开发版本: 所有的新功能开发都会在此第一时间发布预览
|
||||||
> - 正式版本: 只有测试稳定且符合要求的功能才会正式发布
|
> - 正式版本: 只有测试稳定且符合要求的功能才会正式发布
|
||||||
@ -33,11 +35,23 @@
|
|||||||
|
|
||||||
在使用 `Hugo NexT` 主题之前,请确认你的电脑上已经安装 `Git` 和 `Hugo Extened` 两款软件。
|
在使用 `Hugo NexT` 主题之前,请确认你的电脑上已经安装 `Git` 和 `Hugo Extened` 两款软件。
|
||||||
|
|
||||||
|
### 📦 快速预览
|
||||||
|
|
||||||
|
如想快速预览主题实际效果,可直接克隆当前主题的仓库代码,然后运行示例站点:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ git clone --single-branch -b main https://github.com/hugo-next/hugo-theme-next.git hugo-theme-next
|
||||||
|
$ cd hugo-theme-next/exampleSite/
|
||||||
|
$ sh startup.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
打开电脑浏览器输入`http://127.0.0.1:1414/`即可访问查看。
|
||||||
|
|
||||||
### 📰 使用模板
|
### 📰 使用模板
|
||||||
|
|
||||||
如果你是初次建站的话,可以使用 `Github` 的模板功能,一键生成你的站点仓库代码。访问 [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter) 点击右上角的 `Use this template` 绿色按钮然后填写代码仓库的相关信息,参考如下:
|
如果你是初次建站的话,可以使用 `Github` 的模板功能,一键生成你的站点仓库代码。访问 [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter) 点击右上角的 `Use this template` 绿色按钮然后填写代码仓库的相关信息,参考如下:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
最后点击 `Create repository from template` 绿色按钮,会直接在你的空间中生成站点代码,再把它克隆到本地进行创作。
|
最后点击 `Create repository from template` 绿色按钮,会直接在你的空间中生成站点代码,再把它克隆到本地进行创作。
|
||||||
|
|
||||||
@ -46,16 +60,26 @@
|
|||||||
如果你已经有站点,可通过 `submodule` 模式引用本主题,参考如下命令:
|
如果你已经有站点,可通过 `submodule` 模式引用本主题,参考如下命令:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cd hugo-next-exmaple
|
$ cd hugo-next-example
|
||||||
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
|
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
|
||||||
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
|
$ cp themes/hugo-theme-next/exampleSite/hugo.yaml .
|
||||||
$ mv config.toml config.toml.backup
|
$ mv hugo.toml hugo.toml.backup
|
||||||
|
```
|
||||||
|
|
||||||
|
或通过 `Hugo module` 模式引用本主题,参考如下命令:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cd hugo-next-example
|
||||||
|
$ hugo mod init hugo-next-example
|
||||||
|
$ wget -O hugo.yaml https://github.com/hugo-next/hugo-theme-next/raw/main/exampleSite/hugo.yaml
|
||||||
|
$ sed -i 's/hugo-theme-next/github.com\/hugo-next\/hugo-theme-next\/v4/' hugo.yaml
|
||||||
|
$ mv hugo.toml hugo.toml.backup
|
||||||
```
|
```
|
||||||
|
|
||||||
### 💻 本地预览
|
### 💻 本地预览
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cd hugo-next-exmaple
|
$ cd hugo-next-example
|
||||||
$ hugo server
|
$ hugo server
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -69,10 +93,17 @@ $ hugo server
|
|||||||
后续更新主题只需要在你的站点目录中,执行如下命令:
|
后续更新主题只需要在你的站点目录中,执行如下命令:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cd hugo-next-exmaple
|
$ cd hugo-next-example
|
||||||
$ git submodule update --remote
|
$ git submodule update --remote
|
||||||
```
|
```
|
||||||
|
|
||||||
|
如使用 `Hugo module`,执行如下命令:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cd hugo-next-example
|
||||||
|
$ hugo mod get -u
|
||||||
|
```
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。
|
> 本主题的代码同时也同步到 `Gitee` 仓库,在国内环境可切换用 [https://gitee.com/hugo-next/hugo-theme-next.git](https://gitee.com/hugo-next/hugo-theme-next.git) 镜像速度更快,也更稳定。
|
||||||
|
|
||||||
@ -89,7 +120,6 @@ $ hugo new posts/hello-world.md
|
|||||||
|
|
||||||
关于文章头部那些参数作用的说明参考如下:
|
关于文章头部那些参数作用的说明参考如下:
|
||||||
|
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
---
|
---
|
||||||
# 文章标题
|
# 文章标题
|
||||||
@ -167,6 +197,10 @@ tags:
|
|||||||
|
|
||||||
关于本主题的开发进度和后续的发展路线图,可访问 [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9) 查看详情,也欢迎大家参与一起来完善。
|
关于本主题的开发进度和后续的发展路线图,可访问 [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9) 查看详情,也欢迎大家参与一起来完善。
|
||||||
|
|
||||||
|
[](https://github.com/hugo-next/hugo-theme-next/graphs/contributors)
|
||||||
|
|
||||||
|
[](https://github.com/hugo-next/hugo-theme-next/stargazers)
|
||||||
|
|
||||||
## 📜 许可证
|
## 📜 许可证
|
||||||
|
|
||||||
[MIT License](LICENSE)
|
[MIT License](LICENSE)
|
||||||
@ -179,11 +213,16 @@ Copyright (c) 2022, hugo-next 团队
|
|||||||
|
|
||||||
以下是打赏名单列表(按时间倒序):
|
以下是打赏名单列表(按时间倒序):
|
||||||
|
|
||||||
| 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 |
|
| 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 |
|
||||||
| :-------: | ------ | ------ | ---- | ---- |
|
| :--------: | ------ | -------- | -------- | -------------------------------- |
|
||||||
| 2022.09.30 | *軒 | 微信支付 | ¥66.66 | 愿项目造福更多人! |
|
| 2024.05.11 | *祥 | 支付宝 | ¥66.66 | 感谢创作这么好的主题 |
|
||||||
| 2022.09.30 | N*l | 微信支付 | ¥20.00 | / |
|
| 2023.07.25 | *五 | 微信支付 | ¥50.00 | 很喜欢next主题,感谢,请你喝咖啡 |
|
||||||
| 2022.07.09 | *风 | 微信支付 | ¥10.00 | / |
|
| 2023.06.01 | **霖 | 支付宝 | ¥10.00 | / |
|
||||||
| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |
|
| 2022.11.15 | f888 | 咸鱼 | ¥6.20 | 聊表心意 |
|
||||||
| 2022.02.28 | *娇 | 微信支付 | ¥5.00 | / |
|
| 2022.09.30 | *軒 | 微信支付 | ¥66.66 | 愿项目造福更多人! |
|
||||||
| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |
|
| 2022.09.30 | N*l | 微信支付 | ¥20.00 | / |
|
||||||
|
| 2022.07.09 | *风 | 微信支付 | ¥10.00 | / |
|
||||||
|
| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |
|
||||||
|
| 2022.02.28 | *娇 | 微信支付 | ¥5.00 | / |
|
||||||
|
| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
--content-bg-color: #{$content-bg-color};
|
--content-bg-color: #{$content-bg-color};
|
||||||
--card-bg-color: #{$card-bg-color};
|
--card-bg-color: #{$card-bg-color};
|
||||||
--text-color: #{$text-color};
|
--text-color: #{$text-color};
|
||||||
|
--selection-bg: #{$grey-lighter};
|
||||||
|
--selection-color: #{$black-deep};
|
||||||
--blockquote-color: #{$blockquote-color};
|
--blockquote-color: #{$blockquote-color};
|
||||||
--link-color: #{$link-color};
|
--link-color: #{$link-color};
|
||||||
--link-hover-color: #{$link-hover-color};
|
--link-hover-color: #{$link-hover-color};
|
||||||
@ -14,6 +16,8 @@
|
|||||||
--menu-item-bg-color: #{$menu-item-bg-color};
|
--menu-item-bg-color: #{$menu-item-bg-color};
|
||||||
--theme-color: #{$theme-color};
|
--theme-color: #{$theme-color};
|
||||||
|
|
||||||
|
--border-color: #{$border-color};
|
||||||
|
|
||||||
--btn-default-bg: #{$btn-default-bg};
|
--btn-default-bg: #{$btn-default-bg};
|
||||||
--btn-default-color: #{$btn-default-color};
|
--btn-default-color: #{$btn-default-color};
|
||||||
--btn-default-border-color: #{$btn-default-border-color};
|
--btn-default-border-color: #{$btn-default-border-color};
|
||||||
@ -26,6 +30,8 @@
|
|||||||
--highlight-gutter-background: #{$highlight-gutter-background};
|
--highlight-gutter-background: #{$highlight-gutter-background};
|
||||||
--highlight-gutter-foreground: #{$highlight-gutter-foreground};
|
--highlight-gutter-foreground: #{$highlight-gutter-foreground};
|
||||||
|
|
||||||
|
--highlight-img-fill: brightness(1) invert(0);
|
||||||
|
|
||||||
color-scheme: light;
|
color-scheme: light;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,6 +40,8 @@
|
|||||||
--content-bg-color: #{$content-bg-color-dark};
|
--content-bg-color: #{$content-bg-color-dark};
|
||||||
--card-bg-color: #{$card-bg-color-dark};
|
--card-bg-color: #{$card-bg-color-dark};
|
||||||
--text-color: #{$text-color-dark};
|
--text-color: #{$text-color-dark};
|
||||||
|
--selection-bg: #{$gainsboro};
|
||||||
|
--selection-color: #{$black-dim};
|
||||||
--blockquote-color: #{$blockquote-color-dark};
|
--blockquote-color: #{$blockquote-color-dark};
|
||||||
--link-color: #{$link-color-dark};
|
--link-color: #{$link-color-dark};
|
||||||
--link-hover-color: #{$link-hover-color-dark};
|
--link-hover-color: #{$link-hover-color-dark};
|
||||||
@ -44,6 +52,8 @@
|
|||||||
--menu-item-bg-color: #{$menu-item-bg-color-dark};
|
--menu-item-bg-color: #{$menu-item-bg-color-dark};
|
||||||
--theme-color: #{$theme-color-dark};
|
--theme-color: #{$theme-color-dark};
|
||||||
|
|
||||||
|
--border-color: #{$border-color-dark};
|
||||||
|
|
||||||
--btn-default-bg: #{$btn-default-bg-dark};
|
--btn-default-bg: #{$btn-default-bg-dark};
|
||||||
--btn-default-color: #{$btn-default-color-dark};
|
--btn-default-color: #{$btn-default-color-dark};
|
||||||
--btn-default-border-color: #{$btn-default-border-color-dark};
|
--btn-default-border-color: #{$btn-default-border-color-dark};
|
||||||
@ -56,11 +66,14 @@
|
|||||||
--highlight-gutter-background: #{$highlight-gutter-background-dark};
|
--highlight-gutter-background: #{$highlight-gutter-background-dark};
|
||||||
--highlight-gutter-foreground: #{$highlight-gutter-foreground-dark};
|
--highlight-gutter-foreground: #{$highlight-gutter-foreground-dark};
|
||||||
|
|
||||||
|
--highlight-img-fill: brightness(0) invert(1);
|
||||||
|
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
img[data-theme="dark"] {
|
img[data-theme="dark"] {
|
||||||
opacity: .75;
|
opacity: .75;
|
||||||
|
filter: brightness(1) invert(0);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: .9;
|
opacity: .9;
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
@import 'gitter';
|
@import 'gitter';
|
||||||
@import 'livere';
|
@import 'livere';
|
||||||
@import 'waline';
|
@import 'waline';
|
||||||
@import 'mermaid';
|
|
||||||
|
|
||||||
.use-motion .animated {
|
.use-motion .animated {
|
||||||
// Fix issue #48 #55
|
// Fix issue #48 #55
|
@ -12,9 +12,17 @@
|
|||||||
z-index: $zindex-5;
|
z-index: $zindex-5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
@import 'tool-buttons';
|
@import 'tool-buttons';
|
||||||
@import 'reading-progress';
|
@import 'reading-progress';
|
||||||
|
|
||||||
@import 'post';
|
@import 'post';
|
||||||
@import 'pages';
|
@import 'pages';
|
||||||
@import 'third-party';
|
@import '3rd';
|
||||||
|
@ -15,14 +15,23 @@
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
|
||||||
|
|
||||||
.category-list-item {
|
.category-list-item:before {
|
||||||
margin: 5px 10px;
|
font-family: var(--fa-style-family,"Font Awesome 6 Free");
|
||||||
|
font-weight: var(--fa-style,900);
|
||||||
|
content: "\f07c";
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-list-item {
|
||||||
|
margin: 5px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-list-count {
|
.category-list-count {
|
||||||
color: $grey;
|
color: $grey;
|
||||||
|
padding: 0 2px;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: ' (';
|
content: ' (';
|
||||||
@ -33,7 +42,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-list-child {
|
.category-children-list {
|
||||||
padding-left: 10px;
|
padding-left: 38px;
|
||||||
|
list-style: none;
|
||||||
|
|
||||||
|
.category-children-list-item:before {
|
||||||
|
font-family: var(--fa-style-family,"Font Awesome 6 Free");
|
||||||
|
font-weight: var(--fa-style,900);
|
||||||
|
content: "\f0ae";
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-children-list-item {
|
||||||
|
font-size: 0.925em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.flinks-block {
|
.flinks-block {
|
||||||
|
|
||||||
.flinks-block-title {
|
.flinks-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@if $motion_trans_post_header {
|
@if $motion_trans_post_header {
|
||||||
.post-header {
|
.post-header, .flinks-header {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $motion_trans_post_body {
|
@if $motion_trans_post_body {
|
||||||
.post-body {
|
.post-body, .flinks-body {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -78,4 +78,4 @@
|
|||||||
@import 'post-footer';
|
@import 'post-footer';
|
||||||
@import 'post-widgets';
|
@import 'post-widgets';
|
||||||
@import 'post-reward';
|
@import 'post-reward';
|
||||||
@import 'post-followme';
|
@import 'post-followme';
|
36
assets/css/_common/components/post/post-alert.scss
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
@mixin alert-styles($type, $color) {
|
||||||
|
.post-alert-#{$type} {
|
||||||
|
padding: 0 0 0 10px;
|
||||||
|
border-left: 6px solid $color;
|
||||||
|
font-size: 0.825em;
|
||||||
|
color: $color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $key, $color in $post_alert_colors {
|
||||||
|
@include alert-styles(#{$key}, $color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-alert-title, .post-expired-title {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: 1.25em;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
margin: 0 0 0 8px;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-alert-content, .post-expired-content {
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
@ -80,4 +80,66 @@
|
|||||||
svg {
|
svg {
|
||||||
max-width: 98%;
|
max-width: 98%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For read more post content anchor
|
||||||
|
#more {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Defined speical border properties for top card of post **/
|
||||||
|
$speical-border-width: 5px;
|
||||||
|
$speical-border-radius: 8px;
|
||||||
|
.post-expired-tip {
|
||||||
|
|
||||||
|
$expired-color: #4A90E2;
|
||||||
|
|
||||||
|
font-size: var(--font-size-small);
|
||||||
|
border: 1px solid #4A90E2;
|
||||||
|
border-radius: $speical-border-radius;
|
||||||
|
border-left: $speical-border-width solid #4A90E2;
|
||||||
|
border-top: $speical-border-width solid #4A90E2;
|
||||||
|
box-shadow: .6rem .5rem 0.3rem var(--body-bg-color);
|
||||||
|
margin: 0 0 0.85em 0;
|
||||||
|
padding: 0.65em 0.15em 0.65em 0.95em;
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
.post-expired-title {
|
||||||
|
color: #4A90E2;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-expired-times {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.15em;
|
||||||
|
color: #e5534b;
|
||||||
|
margin: 0 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-summary-wrapper {
|
||||||
|
$summary-color: #ea6733;
|
||||||
|
|
||||||
|
margin: 0 0 .85em 0;
|
||||||
|
border-radius: $speical-border-radius;
|
||||||
|
border: 1px solid $summary-color;
|
||||||
|
border-right: $speical-border-width solid $summary-color;
|
||||||
|
border-bottom: $speical-border-width solid $summary-color;
|
||||||
|
box-shadow: .6rem .5rem 0.3rem var(--body-bg-color);
|
||||||
|
|
||||||
|
.summary-title {
|
||||||
|
margin: .65em .93em 0 .93em;
|
||||||
|
color: $summary-color;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-content {
|
||||||
|
background-color: var(--card-bg-color);
|
||||||
|
border-radius: $speical-border-radius;
|
||||||
|
box-shadow: .08rem .06rem 0.03rem var(--body-bg-color);
|
||||||
|
margin: .85em;
|
||||||
|
padding: .85em .95em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@import 'post-alert';
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,10 @@
|
|||||||
@include post-card();
|
@include post-card();
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
|
|
||||||
|
li {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,3 +91,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if $post_share_enable {
|
||||||
|
.post-share-tools {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
a {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $post_sharethis_set {
|
||||||
|
.st-cmp-settings {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -113,3 +113,8 @@
|
|||||||
flex-basis: 100%;
|
flex-basis: 100%;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#comments-count {
|
||||||
|
cursor: pointer;
|
||||||
|
border-bottom: 1px solid $link-decoration-color;
|
||||||
|
}
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
.post-block .post-body .mermaid {
|
|
||||||
background: var(--highlight-foreground);
|
|
||||||
}
|
|
@ -43,10 +43,6 @@
|
|||||||
.goto-comments {
|
.goto-comments {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goto-comments-on {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $back2top_enable {
|
@if $back2top_enable {
|
||||||
|
@ -29,7 +29,143 @@
|
|||||||
font-size: $font-size-smallest;
|
font-size: $font-size-smallest;
|
||||||
}
|
}
|
||||||
|
|
||||||
.google-translate {
|
.i18n-translate {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.fa {
|
||||||
|
font-size: $font-size-largest;
|
||||||
|
margin: auto 0;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-select, .lang-options {
|
||||||
|
|
||||||
|
.flag-icon {
|
||||||
|
background-size: cover;
|
||||||
|
width: 30px;
|
||||||
|
height: 20px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flag-icon-zh-cn {
|
||||||
|
background-image: url("/imgs/flags/zh-cn.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.flag-icon-en-us {
|
||||||
|
background-image: url("/imgs/flags/en-us.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
.flag-icon-fr-fr {
|
||||||
|
background-image: url("/imgs/flags/fr-fr.svg");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-select {
|
||||||
|
|
||||||
|
.flag-icon {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-select {
|
||||||
|
margin-left: 16px;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 1.25;
|
||||||
|
|
||||||
|
.fa {
|
||||||
|
font-size: $font-size-large;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-option {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
justify-content: center;
|
||||||
|
width: 140px;
|
||||||
|
|
||||||
|
/* &:hover {
|
||||||
|
+ .lang-options {
|
||||||
|
display: block;
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
|
||||||
|
.selected-language {
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-options {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
border-top: none;
|
||||||
|
border-radius: 0 0 4px 4px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-10px);
|
||||||
|
transition: opacity 0.3s ease, transform 0.3s ease;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
display: block;
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-option {
|
||||||
|
padding: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
justify-content: left;
|
||||||
|
padding-left: 14px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--selection-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-name {
|
||||||
|
margin: 0 16px 0 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* select {
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
option {
|
||||||
|
font-size: $font-size-small;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right center;
|
||||||
|
padding-right: 30px;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flag-icon-zh-cn {
|
||||||
|
background-image: url("../imgs/flags/zh-CN.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
.flag-icon-en-us {
|
||||||
|
background-image: url("../imgs/flags/en-US.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
.flag-icon-fr-fr {
|
||||||
|
background-image: url("../imgs/flags/fr-FR.png");
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
/* .google-translate {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
.fa {
|
.fa {
|
||||||
@ -37,7 +173,7 @@
|
|||||||
margin: auto 0;
|
margin: auto 0;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
|
|
||||||
@if $footer_vendors_enable {
|
@if $footer_vendors_enable {
|
||||||
.vendors-list {
|
.vendors-list {
|
||||||
@ -47,6 +183,18 @@
|
|||||||
|
|
||||||
img {
|
img {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
max-width: 48px;
|
||||||
|
min-width: 14px;
|
||||||
|
max-height: 16px;
|
||||||
|
|
||||||
|
@include mobile() {
|
||||||
|
max-width: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only work for svg image
|
||||||
|
&[src$=".svg"] {
|
||||||
|
filter: var(--highlight-img-fill);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$footer_vendors_imgs_len: length($footer_vendors_imgs_width);
|
$footer_vendors_imgs_len: length($footer_vendors_imgs_width);
|
||||||
|
@ -1,12 +1,26 @@
|
|||||||
// Menu
|
// Menu
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
.menu {
|
.menu, .menu-children {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1em 0;
|
padding: 1em 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item {
|
.menu-children {
|
||||||
|
max-height: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height 1.5s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-children {
|
||||||
|
&.expand {
|
||||||
|
max-height: 400px;
|
||||||
|
transition: max-height 1.5s ease-in;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item, .menu-child-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
@ -51,6 +65,15 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-item-shrink-icon {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-child-item {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.use-motion .menu-item {
|
.use-motion .menu-item {
|
||||||
|
@ -20,7 +20,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.post-block {
|
.post-block {
|
||||||
margin-top: initial !important;
|
//margin-top: initial !important;
|
||||||
|
// https://github.com/hugo-next/hugo-theme-next/issues/154
|
||||||
|
// make the post block more clear in small screen
|
||||||
|
margin-top: 5px !important;
|
||||||
// Inside posts blocks content padding (default 40px).
|
// Inside posts blocks content padding (default 40px).
|
||||||
padding: $content-mobile-padding 18px $content-mobile-padding !important;
|
padding: $content-mobile-padding 18px $content-mobile-padding !important;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
::selection {
|
::selection {
|
||||||
background: $selection-bg;
|
background: var(--selection-bg);
|
||||||
color: $selection-color;
|
color: var(--selection-color);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
@ -3,86 +3,182 @@
|
|||||||
|
|
||||||
background: var(--highlight-background);
|
background: var(--highlight-background);
|
||||||
margin-bottom: 26px;
|
margin-bottom: 26px;
|
||||||
|
line-height: 1.25;
|
||||||
|
|
||||||
//TODO Need fixed the copy button show position.
|
> .code-header {
|
||||||
div:first-child {
|
color:#f8f8f2;
|
||||||
overflow-x: auto;
|
display: flex;
|
||||||
}
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: .25rem 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
pre {
|
&:hover {
|
||||||
position: relative;
|
cursor: pointer;
|
||||||
overflow-x: auto;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
table tbody tr {
|
.code-lang {
|
||||||
//TODO Fixed the too long code line over
|
width: 100%;
|
||||||
// layout background color.
|
text-align: center;
|
||||||
background: #272822;
|
font-weight: bold;
|
||||||
}
|
|
||||||
|
|
||||||
/* pre > code span {
|
&::after {
|
||||||
white-space: break-spaces;
|
content: "Code";
|
||||||
overflow: hidden;
|
}
|
||||||
word-break: break-all;
|
}
|
||||||
word-wrap: break-word;
|
|
||||||
} */
|
|
||||||
}
|
|
||||||
|
|
||||||
@if $codeblock_copy_btn_enable {
|
.collapse-btn {
|
||||||
|
font-family: "Font Awesome 6 Free";
|
||||||
.highlight:hover .copy-btn, pre:hover .copy-btn {
|
font-weight: 900;
|
||||||
opacity: 1;
|
text-align: center;
|
||||||
}
|
width: 1.25em;
|
||||||
|
display: inline-block;
|
||||||
.copy-btn {
|
font-style: normal;
|
||||||
color: $black-dim;
|
font-variant: normal;
|
||||||
cursor: pointer;
|
line-height: 1;
|
||||||
line-height: 1.6;
|
text-rendering: auto;
|
||||||
opacity: 0;
|
padding-right: .25rem;
|
||||||
padding: 2px 6px;
|
transition: content 1s ease-in-out;
|
||||||
position: absolute;
|
|
||||||
right: 8px;
|
|
||||||
top: 4px;
|
|
||||||
transition: opacity $transition-ease;
|
|
||||||
background: var(--highlight-background);
|
|
||||||
|
|
||||||
@if $codeblock_style == 'flat' {
|
|
||||||
background: white;
|
|
||||||
border: 0;
|
|
||||||
font-size: $font-size-smaller;
|
|
||||||
|
|
||||||
} @else if $codeblock_style == 'mac' {
|
|
||||||
color: var(--highlight-foreground);
|
|
||||||
font-size: 14px;
|
|
||||||
border-radius: 3px;
|
|
||||||
} @else {
|
|
||||||
background-color: $gainsboro;
|
|
||||||
background-image: linear-gradient(#fcfcfc, $gainsboro);
|
|
||||||
border: 1px solid #d5d5d5;
|
|
||||||
border-radius: 3px;
|
|
||||||
font-size: $font-size-smaller;
|
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "\f102";
|
||||||
|
}
|
||||||
|
|
||||||
|
&.collapse::before {
|
||||||
|
content: "\f103";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $type, $text in $code-type-list {
|
||||||
|
&.#{$type} .code-lang::after {
|
||||||
|
content: $text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ellipses-btn {
|
||||||
|
padding-right: .45rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@if $codeblock_style == 'mac' {
|
> .chroma {
|
||||||
.highlight {
|
position: relative;
|
||||||
|
max-height: 500px;
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
transition: max-height 0.8s ease-in-out, opacity 0.7s ease-in-out;
|
||||||
|
|
||||||
|
&.hidden-code {
|
||||||
|
max-height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
|
||||||
|
animation-name: slideInUp;
|
||||||
|
animation-duration: 1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: .45rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lntd:first-child {
|
||||||
|
min-width: 1.6rem;
|
||||||
|
text-align: right;
|
||||||
|
background-color: #272822;
|
||||||
|
|
||||||
|
a {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lntd:last-child {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
pre {
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
line-break: anywhere;
|
||||||
|
word-break: break-all;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> code > span {
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
line-break: anywhere;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $codeblock_copy_btn_enable {
|
||||||
|
|
||||||
|
&:hover .copy-btn {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-btn {
|
||||||
|
color: $black-dim;
|
||||||
|
cursor: pointer;
|
||||||
|
line-height: 1.6;
|
||||||
|
opacity: 0;
|
||||||
|
padding: 2px 6px;
|
||||||
|
position: absolute;
|
||||||
|
right: 8px;
|
||||||
|
top: 4px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: $font-size-medium;
|
||||||
|
transition: opacity $transition-ease;
|
||||||
|
background: var(--highlight-background);
|
||||||
|
|
||||||
|
font-family: "Font Awesome 6 Free";
|
||||||
|
font-weight: 900;
|
||||||
|
text-align: center;
|
||||||
|
width: 1.25em;
|
||||||
|
display: inline-block;
|
||||||
|
font-style: normal;
|
||||||
|
font-variant: normal;
|
||||||
|
text-rendering: auto;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "\f0c5";
|
||||||
|
}
|
||||||
|
|
||||||
|
&.copied::before {
|
||||||
|
content: "\f058";
|
||||||
|
}
|
||||||
|
|
||||||
|
&.uncopied::before {
|
||||||
|
content: "\f057";
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $codeblock_style == 'flat' {
|
||||||
|
background: white;
|
||||||
|
border: 0;
|
||||||
|
} @else if $codeblock_style == 'mac' {
|
||||||
|
color: var(--highlight-foreground);
|
||||||
|
} @else {
|
||||||
|
background-color: $gainsboro;
|
||||||
|
background-image: linear-gradient(#fcfcfc, $gainsboro);
|
||||||
|
border: 1px solid #d5d5d5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@if $codeblock_style == 'mac' {
|
||||||
|
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4);
|
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4);
|
||||||
padding-top: 30px;
|
|
||||||
|
|
||||||
.table-container {
|
.code-header {
|
||||||
border-radius: 0 0 5px 5px;
|
|
||||||
}
|
&::before {
|
||||||
|
background: #fc625d;
|
||||||
&::before {
|
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
||||||
background: #fc625d;
|
margin-left: 10px;
|
||||||
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
@include round-icon(12px);
|
||||||
margin-top: -20px;
|
}
|
||||||
margin-left: 10px;
|
}
|
||||||
position: absolute;
|
|
||||||
@include round-icon(12px);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
@import 'copy-code';
|
@import 'copy-code';
|
||||||
|
@import 'monokai';
|
||||||
|
|
||||||
%code-inline {
|
%code-inline {
|
||||||
background: var(--highlight-background);
|
background: var(--highlight-background);
|
||||||
@ -8,7 +9,7 @@
|
|||||||
pre {
|
pre {
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
p > code, li > code {
|
p > code, li > code {
|
||||||
@extend %code-inline;
|
@extend %code-inline;
|
||||||
|
87
assets/css/_common/scaffolding/highlight/monokai.scss
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/** monokai highlight style **/
|
||||||
|
/* Background */ .bg { color:#f8f8f2;background-color:#272822; }
|
||||||
|
/* PreWrapper */ .chroma { color:#f8f8f2;background-color:#272822; }
|
||||||
|
/* Other */ .chroma .x { }
|
||||||
|
/* Error */ .chroma .err { color:#960050;background-color:#1e0010 }
|
||||||
|
/* CodeLine */ .chroma .cl { }
|
||||||
|
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit }
|
||||||
|
/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; }
|
||||||
|
/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; }
|
||||||
|
/* LineHighlight */ .chroma .hl { background-color:#3c3d38 }
|
||||||
|
/* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f }
|
||||||
|
/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f }
|
||||||
|
/* Line */ .chroma .line { display:flex; }
|
||||||
|
/* Keyword */ .chroma .k { color:#66d9ef }
|
||||||
|
/* KeywordConstant */ .chroma .kc { color:#66d9ef }
|
||||||
|
/* KeywordDeclaration */ .chroma .kd { color:#66d9ef }
|
||||||
|
/* KeywordNamespace */ .chroma .kn { color:#f92672 }
|
||||||
|
/* KeywordPseudo */ .chroma .kp { color:#66d9ef }
|
||||||
|
/* KeywordReserved */ .chroma .kr { color:#66d9ef }
|
||||||
|
/* KeywordType */ .chroma .kt { color:#66d9ef }
|
||||||
|
/* Name */ .chroma .n { }
|
||||||
|
/* NameAttribute */ .chroma .na { color:#a6e22e }
|
||||||
|
/* NameBuiltin */ .chroma .nb { }
|
||||||
|
/* NameBuiltinPseudo */ .chroma .bp { }
|
||||||
|
/* NameClass */ .chroma .nc { color:#a6e22e }
|
||||||
|
/* NameConstant */ .chroma .no { color:#66d9ef }
|
||||||
|
/* NameDecorator */ .chroma .nd { color:#a6e22e }
|
||||||
|
/* NameEntity */ .chroma .ni { }
|
||||||
|
/* NameException */ .chroma .ne { color:#a6e22e }
|
||||||
|
/* NameFunction */ .chroma .nf { color:#a6e22e }
|
||||||
|
/* NameFunctionMagic */ .chroma .fm { }
|
||||||
|
/* NameLabel */ .chroma .nl { }
|
||||||
|
/* NameNamespace */ .chroma .nn { }
|
||||||
|
/* NameOther */ .chroma .nx { color:#a6e22e }
|
||||||
|
/* NameProperty */ .chroma .py { }
|
||||||
|
/* NameTag */ .chroma .nt { color:#f92672 }
|
||||||
|
/* NameVariable */ .chroma .nv { }
|
||||||
|
/* NameVariableClass */ .chroma .vc { }
|
||||||
|
/* NameVariableGlobal */ .chroma .vg { }
|
||||||
|
/* NameVariableInstance */ .chroma .vi { }
|
||||||
|
/* NameVariableMagic */ .chroma .vm { }
|
||||||
|
/* Literal */ .chroma .l { color:#ae81ff }
|
||||||
|
/* LiteralDate */ .chroma .ld { color:#e6db74 }
|
||||||
|
/* LiteralString */ .chroma .s { color:#e6db74 }
|
||||||
|
/* LiteralStringAffix */ .chroma .sa { color:#e6db74 }
|
||||||
|
/* LiteralStringBacktick */ .chroma .sb { color:#e6db74 }
|
||||||
|
/* LiteralStringChar */ .chroma .sc { color:#e6db74 }
|
||||||
|
/* LiteralStringDelimiter */ .chroma .dl { color:#e6db74 }
|
||||||
|
/* LiteralStringDoc */ .chroma .sd { color:#e6db74 }
|
||||||
|
/* LiteralStringDouble */ .chroma .s2 { color:#e6db74 }
|
||||||
|
/* LiteralStringEscape */ .chroma .se { color:#ae81ff }
|
||||||
|
/* LiteralStringHeredoc */ .chroma .sh { color:#e6db74 }
|
||||||
|
/* LiteralStringInterpol */ .chroma .si { color:#e6db74 }
|
||||||
|
/* LiteralStringOther */ .chroma .sx { color:#e6db74 }
|
||||||
|
/* LiteralStringRegex */ .chroma .sr { color:#e6db74 }
|
||||||
|
/* LiteralStringSingle */ .chroma .s1 { color:#e6db74 }
|
||||||
|
/* LiteralStringSymbol */ .chroma .ss { color:#e6db74 }
|
||||||
|
/* LiteralNumber */ .chroma .m { color:#ae81ff }
|
||||||
|
/* LiteralNumberBin */ .chroma .mb { color:#ae81ff }
|
||||||
|
/* LiteralNumberFloat */ .chroma .mf { color:#ae81ff }
|
||||||
|
/* LiteralNumberHex */ .chroma .mh { color:#ae81ff }
|
||||||
|
/* LiteralNumberInteger */ .chroma .mi { color:#ae81ff }
|
||||||
|
/* LiteralNumberIntegerLong */ .chroma .il { color:#ae81ff }
|
||||||
|
/* LiteralNumberOct */ .chroma .mo { color:#ae81ff }
|
||||||
|
/* Operator */ .chroma .o { color:#f92672 }
|
||||||
|
/* OperatorWord */ .chroma .ow { color:#f92672 }
|
||||||
|
/* Punctuation */ .chroma .p { }
|
||||||
|
/* Comment */ .chroma .c { color:#75715e }
|
||||||
|
/* CommentHashbang */ .chroma .ch { color:#75715e }
|
||||||
|
/* CommentMultiline */ .chroma .cm { color:#75715e }
|
||||||
|
/* CommentSingle */ .chroma .c1 { color:#75715e }
|
||||||
|
/* CommentSpecial */ .chroma .cs { color:#75715e }
|
||||||
|
/* CommentPreproc */ .chroma .cp { color:#75715e }
|
||||||
|
/* CommentPreprocFile */ .chroma .cpf { color:#75715e }
|
||||||
|
/* Generic */ .chroma .g { }
|
||||||
|
/* GenericDeleted */ .chroma .gd { color:#f92672 }
|
||||||
|
/* GenericEmph */ .chroma .ge { font-style:italic }
|
||||||
|
/* GenericError */ .chroma .gr { }
|
||||||
|
/* GenericHeading */ .chroma .gh { }
|
||||||
|
/* GenericInserted */ .chroma .gi { color:#a6e22e }
|
||||||
|
/* GenericOutput */ .chroma .go { }
|
||||||
|
/* GenericPrompt */ .chroma .gp { }
|
||||||
|
/* GenericStrong */ .chroma .gs { font-weight:bold }
|
||||||
|
/* GenericSubheading */ .chroma .gu { color:#75715e }
|
||||||
|
/* GenericTraceback */ .chroma .gt { }
|
||||||
|
/* GenericUnderline */ .chroma .gl { }
|
||||||
|
/* TextWhitespace */ .chroma .w { }
|
16
assets/css/_common/scaffolding/tags/bilibili.scss
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
.bilibili-video {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: 50%;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
@import 'group-pictures';
|
@import 'group-pictures';
|
||||||
@import 'label';
|
@import 'label';
|
||||||
@import 'link-grid';
|
@import 'link-grid';
|
||||||
@import 'mermaid';
|
|
||||||
@import 'note';
|
@import 'note';
|
||||||
@import 'pdf';
|
@import 'pdf';
|
||||||
@import 'tabs';
|
@import 'tabs';
|
||||||
|
@import 'bilibili'
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
@if $mermaid_enable {
|
|
||||||
.mermaid {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
@ -99,7 +99,7 @@
|
|||||||
@if $icon {
|
@if $icon {
|
||||||
content: $icon;
|
content: $icon;
|
||||||
}
|
}
|
||||||
font-family: 'Font Awesome 5 Free';
|
font-family: 'Font Awesome 6 Free';
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// a + ul {
|
||||||
|
// top: calc(30% + 5px);
|
||||||
|
// }
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@ -41,5 +45,24 @@
|
|||||||
padding: 1px 4px;
|
padding: 1px 4px;
|
||||||
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
|
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-item-shrink-icon {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-children {
|
||||||
|
display: none;
|
||||||
|
transition: transform 1s ease-in-out;
|
||||||
|
transform: translateY(-100%);
|
||||||
|
// position: absolute;
|
||||||
|
// z-index: 999;
|
||||||
|
|
||||||
|
&.expand {
|
||||||
|
display: block;
|
||||||
|
max-height: 400px;
|
||||||
|
transition: transform 1.5s ease-in;
|
||||||
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,4 +43,4 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
width: 6px;
|
width: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ $grey-lighter : #ddd;
|
|||||||
$grey-light : #ccc;
|
$grey-light : #ccc;
|
||||||
$grey : #bbb;
|
$grey : #bbb;
|
||||||
$grey-dark : #999;
|
$grey-dark : #999;
|
||||||
|
$grey-cnt : #5c5c5c;
|
||||||
$grey-dim : #666;
|
$grey-dim : #666;
|
||||||
$black-light : #555;
|
$black-light : #555;
|
||||||
$black-dim : #333;
|
$black-dim : #333;
|
||||||
@ -49,7 +50,8 @@ $blockquote-color : $grey-dim;
|
|||||||
$blockquote-color-dark : $grey;
|
$blockquote-color-dark : $grey;
|
||||||
|
|
||||||
// Global border color.
|
// Global border color.
|
||||||
$border-color : $grey-light;
|
$border-color : $grey-dark;
|
||||||
|
$border-color-dark : $grey-lighter;
|
||||||
|
|
||||||
// Background color for <body>
|
// Background color for <body>
|
||||||
$body-bg-color : white;
|
$body-bg-color : white;
|
||||||
@ -58,8 +60,10 @@ $content-bg-color : white;
|
|||||||
$content-bg-color-dark : $black-dim;
|
$content-bg-color-dark : $black-dim;
|
||||||
|
|
||||||
// Selection
|
// Selection
|
||||||
$selection-bg : $blue-deep;
|
$selection-bg : rgba(53, 166, 247, 0.25) !default;
|
||||||
|
$selection-bg-dark : rgba(50, 112, 194, 0.4) !default;
|
||||||
$selection-color : $gainsboro;
|
$selection-color : $gainsboro;
|
||||||
|
$selection-color-dark : $grey-dark;
|
||||||
|
|
||||||
// Dark mode color
|
// Dark mode color
|
||||||
$card-bg-color : $whitesmoke;
|
$card-bg-color : $whitesmoke;
|
||||||
@ -171,6 +175,60 @@ $highlight-foreground-dark : $highlight_dark_foreground;
|
|||||||
$highlight-gutter-background-dark : mix($highlight-background-dark, $highlight-foreground-dark, 90%);
|
$highlight-gutter-background-dark : mix($highlight-background-dark, $highlight-foreground-dark, 90%);
|
||||||
$highlight-gutter-foreground-dark : mix($highlight-background-dark, $highlight-foreground-dark, 10%);
|
$highlight-gutter-foreground-dark : mix($highlight-background-dark, $highlight-foreground-dark, 10%);
|
||||||
|
|
||||||
|
// Code type list
|
||||||
|
$code-type-list:
|
||||||
|
"language-bash" "Bash",
|
||||||
|
"language-c" "C",
|
||||||
|
"language-cs" "C#",
|
||||||
|
"language-cpp" "C++",
|
||||||
|
"language-clojure" "Clojure",
|
||||||
|
"language-coffeescript" "CoffeeScript",
|
||||||
|
"language-css" "CSS",
|
||||||
|
"language-dart" "Dart",
|
||||||
|
"language-diff" "Diff",
|
||||||
|
"language-erlang" "Erlang",
|
||||||
|
"language-go" "Go",
|
||||||
|
"language-go-html-template" "Go HTML Template",
|
||||||
|
"language-groovy" "Groovy",
|
||||||
|
"language-haskell" "Haskell",
|
||||||
|
"language-html" "HTML",
|
||||||
|
"language-http" "HTTP",
|
||||||
|
"language-xml" "XML",
|
||||||
|
"language-java" "Java",
|
||||||
|
"language-js" "JavaScript",
|
||||||
|
"language-javascript" "JavaScript",
|
||||||
|
"language-json" "JSON",
|
||||||
|
"language-kotlin" "Kotlin",
|
||||||
|
"language-latex" "LaTeX",
|
||||||
|
"language-less" "Less",
|
||||||
|
"language-lisp" "Lisp",
|
||||||
|
"language-lua" "Lua",
|
||||||
|
"language-makefile" "Makefile",
|
||||||
|
"language-markdown" "Markdown",
|
||||||
|
"language-matlab" "Matlab",
|
||||||
|
"language-objectivec" "Objective-C",
|
||||||
|
"language-php" "PHP",
|
||||||
|
"language-perl" "Perl",
|
||||||
|
"language-powershell" "PowerShell",
|
||||||
|
"language-posh" "PowerShell",
|
||||||
|
"language-pwsh" "PowerShell",
|
||||||
|
"language-python" "Python",
|
||||||
|
"language-r" "R",
|
||||||
|
"language-ruby" "Ruby",
|
||||||
|
"language-rust" "Rust",
|
||||||
|
"language-scala" "Scala",
|
||||||
|
"language-scss" "Scss",
|
||||||
|
"language-shell" "Shell",
|
||||||
|
"language-sql" "SQL",
|
||||||
|
"language-swift" "Swift",
|
||||||
|
"language-tex" "TeX",
|
||||||
|
"language-toml" "TOML",
|
||||||
|
"language-ts" "TypeScript",
|
||||||
|
"language-typescript" "TypeScript",
|
||||||
|
"language-vue" "Vue",
|
||||||
|
"language-yml" "YAML",
|
||||||
|
"language-yaml" "YAML",
|
||||||
|
!default;
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
// CSS Style Guide : https://codeguide.co/#css
|
// CSS Style Guide : https://codeguide.co/#css
|
||||||
// All variables from site's config content.
|
// All variables from site's config content.
|
||||||
{{- $P := .Site.Params }}
|
{{ $P := .Site.Params }}
|
||||||
// Base
|
// Base
|
||||||
$scheme : {{ $P.scheme }};
|
$scheme : {{ $P.scheme }};
|
||||||
$darkmode : {{ $P.darkmode }};
|
$darkmode : {{ $P.darkmode }};
|
||||||
|
|
||||||
$body_scrollbar_overlay : {{ $P.bodyScrollbar.overlay }};
|
$body_scrollbar_overlay : {{ $P.bodyScrollbar.overlay }};
|
||||||
$body_scrollbar_stable : {{ $P.bodyScrollbar.stable }};
|
$body_scrollbar_stable : {{ $P.bodyScrollbar.stable }};
|
||||||
$mermaid_enable : {{ $P.mermaid.enable }};
|
|
||||||
$mobile_layout_economy : {{ $P.mobileLayoutEconomy }};
|
$mobile_layout_economy : {{ $P.mobileLayoutEconomy }};
|
||||||
$theme_color_dark : {{ $P.themeColor.dark }};
|
$theme_color_dark : {{ $P.themeColor.dark }};
|
||||||
$theme_color_light : {{ $P.themeColor.light }};
|
$theme_color_light : {{ $P.themeColor.light }};
|
||||||
@ -85,6 +84,9 @@ $post_edit_enable : {{ $P.postEdit.enable }};
|
|||||||
$post_meta_item_text : {{ $P.postMeta.itemText }};
|
$post_meta_item_text : {{ $P.postMeta.itemText }};
|
||||||
$reward_settings_animation : {{ $P.rewardSets.animation }};
|
$reward_settings_animation : {{ $P.rewardSets.animation }};
|
||||||
$post_end_tag_icon : {{ $P.postFooter.tagIcon }};
|
$post_end_tag_icon : {{ $P.postFooter.tagIcon }};
|
||||||
|
$post_share_enable : {{ $P.share.enable }};
|
||||||
|
$post_sharethis_set : {{ isset $P.share "sharethis" }};
|
||||||
|
$post_alert_colors : ({{ range $key, $value := $P.postAlerts }} {{ $key }}: {{ $value.color }}, {{ end }});
|
||||||
|
|
||||||
// TODO find the paramters
|
// TODO find the paramters
|
||||||
$text_align_desktop : {{ $P.textAlign.desktop }};
|
$text_align_desktop : {{ $P.textAlign.desktop }};
|
||||||
@ -129,18 +131,18 @@ $disqusjs_enable : false;
|
|||||||
$livere_enable : {{ isset $P "livere" }};
|
$livere_enable : {{ isset $P "livere" }};
|
||||||
$utterances_enable : {{ isset $P "utterances" }};
|
$utterances_enable : {{ isset $P "utterances" }};
|
||||||
$waline_enable : {{ isset $P "waline" }};
|
$waline_enable : {{ isset $P "waline" }};
|
||||||
{{- with .Site.Params.comments }}
|
{{ with .Site.Params.comments }}
|
||||||
{{- $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }}
|
{{ $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }}
|
||||||
$two_comments_enable : {{ $tce }};
|
$two_comments_enable : {{ $tce }};
|
||||||
{{- if $tce }}
|
{{ if $tce }}
|
||||||
{{- $sortNav := sort .nav "weight" }}
|
{{ $sortNav := sort .nav "weight" }}
|
||||||
$two_comments_actived : {{ .active }};
|
$two_comments_actived : {{ .active }};
|
||||||
$first_comment_color : {{ (index $sortNav 0).color }};
|
$first_comment_color : {{ (index $sortNav 0).color }};
|
||||||
$first_comment_name : {{ lower (index $sortNav 0).name }};
|
$first_comment_name : {{ lower (index $sortNav 0).name }};
|
||||||
$second_comment_color : {{ (index $sortNav 1).color }};
|
$second_comment_color : {{ (index $sortNav 1).color }};
|
||||||
$second_comment_name : {{ lower (index $sortNav 1).name }};
|
$second_comment_name : {{ lower (index $sortNav 1).name }};
|
||||||
{{- end }}
|
{{ end }}
|
||||||
{{- end }}
|
{{ end }}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Variables Layer
|
// Variables Layer
|
||||||
@ -175,9 +177,4 @@ $second_comment_name : {{ lower (index $sortNav 1).name }};
|
|||||||
|
|
||||||
// Schemes Layer
|
// Schemes Layer
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
{{ printf "@import '_schemes/%s/';" $P.scheme }}
|
{{ printf "@import '_schemes/%s/';" $P.scheme }}
|
||||||
|
|
||||||
// Custom Layer
|
|
||||||
// TODO
|
|
||||||
// --------------------------------------------------
|
|
||||||
// @import 'theme.injects.style';
|
|
@ -3,10 +3,13 @@ body { margin-top: 2rem; }
|
|||||||
.use-motion .menu-item,
|
.use-motion .menu-item,
|
||||||
.use-motion .sidebar,
|
.use-motion .sidebar,
|
||||||
.use-motion .post-block,
|
.use-motion .post-block,
|
||||||
|
.use-motion .flinks-block,
|
||||||
.use-motion .pagination,
|
.use-motion .pagination,
|
||||||
.use-motion .comments,
|
.use-motion .comments,
|
||||||
.use-motion .post-header,
|
.use-motion .post-header,
|
||||||
|
.use-motion .flinks-header,
|
||||||
.use-motion .post-body,
|
.use-motion .post-body,
|
||||||
|
.use-motion .flinks-body,
|
||||||
.use-motion .collection-header {
|
.use-motion .collection-header {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,8 @@ NexT.plugins.comments.waline = function() {
|
|||||||
|| !NexT.utils.checkDOMExist(element)) return;
|
|| !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
comment,
|
|
||||||
emoji,
|
emoji,
|
||||||
imguploader,
|
imguploader,
|
||||||
pageview,
|
|
||||||
placeholder,
|
placeholder,
|
||||||
sofa,
|
sofa,
|
||||||
requiredmeta,
|
requiredmeta,
|
||||||
@ -39,8 +37,6 @@ NexT.plugins.comments.waline = function() {
|
|||||||
Waline.init({
|
Waline.init({
|
||||||
locale,
|
locale,
|
||||||
el : element,
|
el : element,
|
||||||
pageview : pageview,
|
|
||||||
comment : comment,
|
|
||||||
emoji : emoji,
|
emoji : emoji,
|
||||||
imageUploader : imguploader,
|
imageUploader : imguploader,
|
||||||
wordLimit : wordlimit,
|
wordLimit : wordlimit,
|
60
assets/js/3rd/comments/waline3.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/* Waline3 comment plugin */
|
||||||
|
NexT.plugins.comments.waline3 = function () {
|
||||||
|
const element = '.waline3-container';
|
||||||
|
if (!NexT.CONFIG.waline3
|
||||||
|
|| !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
|
const {
|
||||||
|
emoji,
|
||||||
|
search,
|
||||||
|
imguploader,
|
||||||
|
placeholder,
|
||||||
|
sofa,
|
||||||
|
requiredmeta,
|
||||||
|
serverurl,
|
||||||
|
wordlimit,
|
||||||
|
reaction,
|
||||||
|
reactiontext,
|
||||||
|
reactiontitle
|
||||||
|
} = NexT.CONFIG.waline3.cfg;
|
||||||
|
|
||||||
|
const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline3.js);
|
||||||
|
|
||||||
|
NexT.utils.lazyLoadComponent(element, () => {
|
||||||
|
|
||||||
|
const waline_css = NexT.utils.getCDNResource(NexT.CONFIG.waline3.css);
|
||||||
|
NexT.utils.getStyle(waline_css, 'before');
|
||||||
|
|
||||||
|
let waline_script = `
|
||||||
|
let locale = {
|
||||||
|
placeholder : '${placeholder}',
|
||||||
|
sofa : '${sofa}',
|
||||||
|
reactionTitle : '${reactiontitle}'
|
||||||
|
};
|
||||||
|
|
||||||
|
let recatt = ${JSON.stringify(reactiontext)}
|
||||||
|
recatt.forEach(function(value, index){
|
||||||
|
locale['reaction'+index] = value;
|
||||||
|
});
|
||||||
|
|
||||||
|
import('${waline_js}').then((Waline) => {
|
||||||
|
Waline.init({
|
||||||
|
locale,
|
||||||
|
el : '${element}',
|
||||||
|
emoji : ${emoji},
|
||||||
|
search : ${search},
|
||||||
|
imageUploader : ${imguploader},
|
||||||
|
wordLimit : ${wordlimit},
|
||||||
|
requiredMeta : ${JSON.stringify(requiredmeta)},
|
||||||
|
reaction : ${reaction},
|
||||||
|
serverURL : '${serverurl}',
|
||||||
|
dark : 'html[data-theme="dark"]'
|
||||||
|
});
|
||||||
|
|
||||||
|
NexT.utils.hiddeLodingCmp('${element}');
|
||||||
|
});
|
||||||
|
`;
|
||||||
|
|
||||||
|
NexT.utils.getScript(null, { module: true, textContent: waline_script });
|
||||||
|
});
|
||||||
|
}
|
57
assets/js/3rd/others/clipboard.js
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/* clipboard plugin */
|
||||||
|
NexT.plugins.others.clipboard = function () {
|
||||||
|
|
||||||
|
let chromaDiv = document.querySelectorAll('div.highlight div.chroma');
|
||||||
|
if (chromaDiv.length === 0) return;
|
||||||
|
|
||||||
|
chromaDiv.forEach(element => {
|
||||||
|
// Add copy button DOM.
|
||||||
|
let codeblock = element.querySelector('code[class]:not([class=""]');
|
||||||
|
let lang = codeblock.className;
|
||||||
|
let copyBtn = document.createElement('div');
|
||||||
|
copyBtn.classList.add('copy-btn');
|
||||||
|
codeblock.parentNode.appendChild(copyBtn);
|
||||||
|
|
||||||
|
element.addEventListener('mouseleave', () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
copyBtn.classList.remove('copied','uncopied');
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add code header show
|
||||||
|
var ch = document.createElement('div');
|
||||||
|
ch.classList.add('code-header');
|
||||||
|
ch.classList.add(lang);
|
||||||
|
ch.insertAdjacentHTML('afterbegin',
|
||||||
|
'<span class="code-lang"></span><span class="collapse-btn"></span>');
|
||||||
|
ch.addEventListener('click', function () {
|
||||||
|
element.classList.toggle('hidden-code');
|
||||||
|
ch.querySelector('.collapse-btn').classList.toggle('collapse');
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
element.parentNode.insertBefore(ch, element);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!NexT.CONFIG.copybtn || !NexT.CONFIG.page.clipboard) return;
|
||||||
|
|
||||||
|
const clipboard_js = NexT.utils.getCDNResource(NexT.CONFIG.page.clipboard.js);
|
||||||
|
NexT.utils.getScript(clipboard_js, function () {
|
||||||
|
// Register the clipboard event.
|
||||||
|
var clipboard = new ClipboardJS('.copy-btn', {
|
||||||
|
text: function (trigger) {
|
||||||
|
// TODO: Why there clipboard default text content with enter?
|
||||||
|
return trigger.previousElementSibling.textContent.trim();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
clipboard.on('success', function (e) {
|
||||||
|
e.clearSelection();
|
||||||
|
e.trigger.classList.add('copied');
|
||||||
|
});
|
||||||
|
|
||||||
|
clipboard.on('error', function (e) {
|
||||||
|
console.error('Copy failed:', e);
|
||||||
|
e.trigger.classList.add('uncopied');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
66
assets/js/3rd/others/counter.js
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/* Page's view & comment counter plugin */
|
||||||
|
NexT.plugins.others.counter = function () {
|
||||||
|
let pageview_js = undefined;
|
||||||
|
let comment_js = undefined;
|
||||||
|
|
||||||
|
const post_meta = NexT.CONFIG.postmeta;
|
||||||
|
|
||||||
|
const views = post_meta.views;
|
||||||
|
if (views != undefined && views.enable) {
|
||||||
|
let pageview_el = '#pageview-count';
|
||||||
|
|
||||||
|
switch (views.plugin) {
|
||||||
|
case 'waline':
|
||||||
|
pageview_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.pagecnt);
|
||||||
|
NexT.utils.getScript(pageview_js, function () {
|
||||||
|
Waline.pageviewCount({
|
||||||
|
selector : pageview_el,
|
||||||
|
serverURL: NexT.CONFIG.waline.cfg.serverurl
|
||||||
|
});
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'waline3':
|
||||||
|
pageview_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline3.pagecnt);
|
||||||
|
|
||||||
|
let pageview_script = `
|
||||||
|
import('${pageview_js}').then((Waline) => {
|
||||||
|
Waline.pageviewCount({
|
||||||
|
selector : '${pageview_el}',
|
||||||
|
serverURL: '${NexT.CONFIG.waline3.cfg.serverurl}'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
`;
|
||||||
|
NexT.utils.getScript(null, { module: true, textContent: pageview_script });
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const comments = post_meta.comments;
|
||||||
|
if (comments != undefined && comments.enable) {
|
||||||
|
let comments_el = '#comments-count';
|
||||||
|
switch (comments.plugin) {
|
||||||
|
case 'waline':
|
||||||
|
comment_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.commentcnt);
|
||||||
|
NexT.utils.getScript(comment_js, function () {
|
||||||
|
Waline.commentCount({
|
||||||
|
selector : comments_el,
|
||||||
|
serverURL: NexT.CONFIG.waline.cfg.serverurl
|
||||||
|
});
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'waline3':
|
||||||
|
comment_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline3.commentcnt);
|
||||||
|
let comment_script = `
|
||||||
|
import('${comment_js}').then((Waline) => {
|
||||||
|
Waline.commentCount({
|
||||||
|
selector : '${comments_el}',
|
||||||
|
serverURL: '${NexT.CONFIG.waline3.cfg.serverurl}'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
`;
|
||||||
|
NexT.utils.getScript(null, { module: true, textContent: comment_script });
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,10 @@
|
|||||||
/* 51La sidebar data widget */
|
/* 51La sidebar data widget */
|
||||||
NexT.plugins.others.lawidget = function() {
|
NexT.plugins.others.lawidget = function() {
|
||||||
|
|
||||||
|
if (!NexT.CONFIG.lawidget ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const element = '#siteinfo-card-widget';
|
const element = '#siteinfo-card-widget';
|
||||||
const lawt_js = NexT.CONFIG.lawidget.js.replace('laId', NexT.CONFIG.lawidget.id);
|
const lawt_js = NexT.CONFIG.lawidget.js.replace('laId', NexT.CONFIG.lawidget.id);
|
||||||
|
|
@ -4,13 +4,24 @@ NexT.plugins.others.math = function() {
|
|||||||
|
|
||||||
if (render === 'mathjax') {
|
if (render === 'mathjax') {
|
||||||
const render_js = NexT.utils.getCDNResource(NexT.CONFIG.page.math.js);
|
const render_js = NexT.utils.getCDNResource(NexT.CONFIG.page.math.js);
|
||||||
NexT.utils.getScript(render_js, function(){
|
const mathjaxCfg = `
|
||||||
window.MathJax = {
|
window.MathJax = {
|
||||||
|
// 自定义内联数学公式的分隔符号
|
||||||
tex: {
|
tex: {
|
||||||
inlineMath: [["$", "$"]],
|
inlineMath: [['$', '$'], ['\\(', '\\)']]
|
||||||
|
},
|
||||||
|
// SVG 渲染配置为全局共享字体缓存
|
||||||
|
svg: {
|
||||||
|
fontCache: 'global'
|
||||||
|
},
|
||||||
|
// 排除特定的HTML标签,避免过度渲染
|
||||||
|
options: {
|
||||||
|
skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "footer"],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
`;
|
||||||
|
NexT.utils.getScript(null, { textContent: mathjaxCfg });
|
||||||
|
NexT.utils.getScript(render_js, { attributes: { id: "MathJax-script", "async": true }});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (render === 'katex') {
|
if (render === 'katex') {
|
24
assets/js/3rd/share/addtoany.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/* Addtoany share plugin */
|
||||||
|
NexT.plugins.share.addtoany = function() {
|
||||||
|
const element = '.a2a_kit';
|
||||||
|
if (!NexT.CONFIG.share.enable || !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
|
const addtoany = NexT.CONFIG.share.addtoany;
|
||||||
|
|
||||||
|
if (!addtoany) return;
|
||||||
|
|
||||||
|
NexT.utils.lazyLoadComponent(element, function() {
|
||||||
|
let addtoany_cfg = `
|
||||||
|
var a2a_config = a2a_config || {};
|
||||||
|
a2a_config.onclick = 1;
|
||||||
|
a2a_config.locale = "${addtoany.locale}";
|
||||||
|
a2a_config.num_services = ${addtoany.num};
|
||||||
|
`;
|
||||||
|
|
||||||
|
NexT.utils.getScript(null, {
|
||||||
|
textContent: addtoany_cfg
|
||||||
|
});
|
||||||
|
|
||||||
|
NexT.utils.getScript(addtoany.js, () => { NexT.utils.hiddeLodingCmp(element); });
|
||||||
|
});
|
||||||
|
}
|
21
assets/js/3rd/share/sharethis.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/* Sharethis share plugin */
|
||||||
|
NexT.plugins.share.sharethis = function() {
|
||||||
|
const element = '.sharethis-inline-share-buttons';
|
||||||
|
if (!NexT.CONFIG.share.enable || !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
|
const sharethis = NexT.CONFIG.share.sharethis;
|
||||||
|
|
||||||
|
if (!sharethis) return;
|
||||||
|
|
||||||
|
const sharethis_js = sharethis.js.replace(/id/, sharethis.id);
|
||||||
|
|
||||||
|
NexT.utils.lazyLoadComponent(element, function() {
|
||||||
|
NexT.utils.getScript(sharethis_js, {
|
||||||
|
attributes: {
|
||||||
|
async: 'async'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
NexT.utils.hiddeLodingCmp(element);
|
||||||
|
});
|
||||||
|
}
|
@ -95,10 +95,10 @@ NexT.motion.middleWares = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
animate(postblock, '.post-block,.flinks-block, .pagination, .post-comments');
|
animate(postblock, '.post-block, .flinks-block, .pagination, .post-comments');
|
||||||
animate(collheader, '.collection-header');
|
animate(collheader, '.collection-header');
|
||||||
animate(postheader, '.post-header');
|
animate(postheader, '.post-header, .flinks-header');
|
||||||
animate(postbody, '.post-body');
|
animate(postbody, '.post-body, .flinks-body');
|
||||||
|
|
||||||
return sequence;
|
return sequence;
|
||||||
},
|
},
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
NexT.boot.registerEvents = function() {
|
NexT.boot.registerEvents = function() {
|
||||||
|
|
||||||
|
NexT.utils.registerMenuClick();
|
||||||
NexT.utils.registerImageLoadEvent();
|
NexT.utils.registerImageLoadEvent();
|
||||||
NexT.utils.registerScrollPercent();
|
NexT.utils.registerScrollPercent();
|
||||||
// NexT.utils.registerCanIUseTag();
|
// NexT.utils.registerCanIUseTag();
|
||||||
@ -24,6 +25,14 @@ NexT.boot.registerEvents = function() {
|
|||||||
// Register comment's components
|
// Register comment's components
|
||||||
NexT.plugins.register();
|
NexT.plugins.register();
|
||||||
|
|
||||||
|
// Register comment counter click event
|
||||||
|
const commentCnt = document.querySelector('#comments-count');
|
||||||
|
if (commentCnt && NexT.CONFIG.page.isPage) {
|
||||||
|
commentCnt.addEventListener('click', event => {
|
||||||
|
NexT.utils.slidScrollBarAnime('comments');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Mobile top menu bar.
|
// Mobile top menu bar.
|
||||||
document.querySelector('.site-nav-toggle .toggle').addEventListener('click', event => {
|
document.querySelector('.site-nav-toggle .toggle').addEventListener('click', event => {
|
||||||
event.currentTarget.classList.toggle('toggle-close');
|
event.currentTarget.classList.toggle('toggle-close');
|
||||||
@ -52,19 +61,26 @@ NexT.boot.refresh = function() {
|
|||||||
|
|
||||||
NexT.utils.fmtSiteInfo();
|
NexT.utils.fmtSiteInfo();
|
||||||
|
|
||||||
|
if (NexT.CONFIG.isMultiLang) {
|
||||||
|
NexT.utils.registerLangSelect();
|
||||||
|
}
|
||||||
|
|
||||||
if (!NexT.CONFIG.page.isPage) return;
|
if (!NexT.CONFIG.page.isPage) return;
|
||||||
|
|
||||||
NexT.utils.registerSidebarTOC();
|
if (NexT.CONFIG.page.toc) NexT.utils.registerSidebarTOC();
|
||||||
NexT.utils.registerCopyCode();
|
if (NexT.CONFIG.page.expired) NexT.utils.calPostExpiredDate();
|
||||||
|
if (NexT.CONFIG.page.music) NexT.utils.registerAPlayer();
|
||||||
|
|
||||||
|
NexT.utils.registerImageViewer();
|
||||||
NexT.utils.registerPostReward();
|
NexT.utils.registerPostReward();
|
||||||
|
|
||||||
if(NexT.CONFIG.page.comments) {
|
if(NexT.CONFIG.page.comments) {
|
||||||
NexT.utils.initCommontesDispaly();
|
NexT.utils.initCommontesDispaly();
|
||||||
NexT.utils.registerCommonSwitch();
|
NexT.utils.registerCommonSwitch();
|
||||||
NexT.utils.domAddClass('#goto-comments', 'goto-comments-on');
|
NexT.utils.domAddClass('#goto-comments', 'show');
|
||||||
} else {
|
} else {
|
||||||
NexT.utils.hideCommontes();
|
NexT.utils.domAddClass('#goto-comments', 'hidden');
|
||||||
}
|
}
|
||||||
NexT.utils.registerImageViewer();
|
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
/**
|
/**
|
||||||
|
35
assets/js/third-party/others/counter.js
vendored
@ -1,35 +0,0 @@
|
|||||||
/* Page's view & comment counter plugin */
|
|
||||||
NexT.plugins.others.counter = function() {
|
|
||||||
let busz_postview = false;
|
|
||||||
let pageview_js = undefined;
|
|
||||||
let comment_js = undefined;
|
|
||||||
|
|
||||||
const busz = NexT.CONFIG.busuanzi;
|
|
||||||
if (busz != undefined && busz.pageview) {
|
|
||||||
busz_postview = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Here can append others pageview & comment plugin
|
|
||||||
const waline = NexT.CONFIG.waline;
|
|
||||||
if (waline != undefined){
|
|
||||||
if(!busz_postview && waline.cfg.pageview) {
|
|
||||||
pageview_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.js[0]);
|
|
||||||
NexT.utils.getScript(pageview_js, function(){
|
|
||||||
Waline.pageviewCount({
|
|
||||||
serverURL: waline.cfg.serverurl
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (waline.cfg.comment) {
|
|
||||||
comment_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.js[1]);
|
|
||||||
NexT.utils.getScript(comment_js, function(){
|
|
||||||
Waline.commentCount({
|
|
||||||
serverURL: waline.cfg.serverurl
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
9
assets/js/third-party/others/translate.js
vendored
@ -1,9 +0,0 @@
|
|||||||
/* Google translate plugin */
|
|
||||||
NexT.plugins.others.translate = function() {
|
|
||||||
const element = '#gtranslate';
|
|
||||||
if (!NexT.utils.checkDOMExist(element)) return;
|
|
||||||
NexT.utils.lazyLoadComponent(element, function() {
|
|
||||||
window.translateelement_styles='/css/google-translate.min.css';
|
|
||||||
NexT.utils.getScript('/js/third-party/google-translate.min.js');
|
|
||||||
});
|
|
||||||
}
|
|
16
assets/js/third-party/share/addthis.js
vendored
@ -1,16 +0,0 @@
|
|||||||
/* AddThis share plugin */
|
|
||||||
NexT.plugins.share.addthis = function() {
|
|
||||||
const element = '.addthis_inline_share_toolbox';
|
|
||||||
if (!NexT.CONFIG.addthis || !NexT.utils.checkDOMExist(element)) return;
|
|
||||||
|
|
||||||
const addthis_js = NexT.CONFIG.addthis.js + '?pubid=' + NexT.CONFIG.addthis.cfg.pubid;
|
|
||||||
|
|
||||||
NexT.utils.lazyLoadComponent(element, function() {
|
|
||||||
NexT.utils.getScript(addthis_js, {
|
|
||||||
attributes: {
|
|
||||||
async: false
|
|
||||||
},
|
|
||||||
parentNode: document.querySelector(element)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
@ -7,9 +7,67 @@ HTMLElement.prototype.wrap = function (wrapper) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
NexT.utils = {
|
NexT.utils = {
|
||||||
registerImageLoadEvent: function() {
|
registerAPlayer: function () {
|
||||||
|
this.getStyle(
|
||||||
|
NexT.utils.getCDNResource(NexT.CONFIG.page.music.css)
|
||||||
|
);
|
||||||
|
|
||||||
|
NexT.CONFIG.page.music.js.forEach(function(js) {
|
||||||
|
NexT.utils.getScript(NexT.utils.getCDNResource(js), true);
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
calPostExpiredDate: function() {
|
||||||
|
const postMetaDom = document.querySelector('.post-meta-container');
|
||||||
|
let postTime = postMetaDom.querySelector('time[itemprop="dateCreated datePublished"]').getAttribute("datetime");
|
||||||
|
let postLastmodTime = postMetaDom.querySelector('time[itemprop="dateModified dateLastmod"]');
|
||||||
|
|
||||||
|
if (postLastmodTime != null) postTime = postLastmodTime.getAttribute("datetime");
|
||||||
|
|
||||||
|
let expiredTip = '';
|
||||||
|
const expireCfg = NexT.CONFIG.page.expiredTips;
|
||||||
|
let expiredTime = this.diffDate(postTime, 2);
|
||||||
|
|
||||||
|
if (expiredTime.indexOf(NexT.CONFIG.i18n.ds_years) > -1) {
|
||||||
|
expiredTip = expireCfg.warn.split('#');
|
||||||
|
} else {
|
||||||
|
let days = parseInt(expiredTime.replace(NexT.CONFIG.i18n.ds_days, '').trim(), 10);
|
||||||
|
if (days < 180) return;
|
||||||
|
expiredTip = expireCfg.info.split('#');
|
||||||
|
}
|
||||||
|
|
||||||
|
let expiredTipPre = expiredTip[0];
|
||||||
|
let expiredTipSuf = expiredTip[1];
|
||||||
|
expiredTip = expiredTipPre + '<span class="post-expired-times">' + expiredTime + '</span>' + expiredTipSuf;
|
||||||
|
document.getElementById('post-expired-content').innerHTML = expiredTip;
|
||||||
|
this.domAddClass('#post-expired-tip', 'show');
|
||||||
|
},
|
||||||
|
registerMenuClick: function () {
|
||||||
|
const pMenus = document.querySelectorAll('.main-menu > li > a.menus-parent');
|
||||||
|
pMenus.forEach(function (item) {
|
||||||
|
const icon = item.querySelector('span > i');
|
||||||
|
var ul = item.nextElementSibling;
|
||||||
|
|
||||||
|
item.addEventListener('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
ul.classList.toggle('expand');
|
||||||
|
if (ul.classList.contains('expand')) {
|
||||||
|
icon.className = 'fa fa-angle-down';
|
||||||
|
} else {
|
||||||
|
icon.className = 'fa fa-angle-right';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var cCls = ul.querySelectorAll('.menu-item-active');
|
||||||
|
if (cCls != null && cCls.length > 0) {
|
||||||
|
item.click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
registerImageLoadEvent: function () {
|
||||||
const images = document.querySelectorAll('.sidebar img, .post-block img, .vendors-list img');
|
const images = document.querySelectorAll('.sidebar img, .post-block img, .vendors-list img');
|
||||||
|
|
||||||
const callback = (entries) => {
|
const callback = (entries) => {
|
||||||
entries.forEach(item => {
|
entries.forEach(item => {
|
||||||
if (item.intersectionRatio > 0) {
|
if (item.intersectionRatio > 0) {
|
||||||
@ -17,7 +75,7 @@ NexT.utils = {
|
|||||||
let imgSrc = ele.getAttribute('data-src');
|
let imgSrc = ele.getAttribute('data-src');
|
||||||
if (imgSrc) {
|
if (imgSrc) {
|
||||||
let img = new Image();
|
let img = new Image();
|
||||||
img.addEventListener('load', function() {
|
img.addEventListener('load', function () {
|
||||||
ele.src = imgSrc;
|
ele.src = imgSrc;
|
||||||
}, false);
|
}, false);
|
||||||
ele.src = imgSrc;
|
ele.src = imgSrc;
|
||||||
@ -27,20 +85,23 @@ NexT.utils = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const observer = new IntersectionObserver(callback);
|
const observer = new IntersectionObserver(callback);
|
||||||
images.forEach(img => {
|
images.forEach(img => {
|
||||||
observer.observe(img);
|
observer.observe(img);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
registerImageViewer: function() {
|
registerImageViewer: function () {
|
||||||
new Viewer(document.querySelector('.post-body'),{ navbar:2, toolbar:2 });
|
const post_body = document.querySelector('.post-body');
|
||||||
|
if (post_body) {
|
||||||
|
new Viewer(post_body, { navbar: 2, toolbar: 2 });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
registerToolButtons: function () {
|
registerToolButtons: function () {
|
||||||
const buttons = document.querySelector('.tool-buttons');
|
const buttons = document.querySelector('.tool-buttons');
|
||||||
|
|
||||||
const scrollbar_buttons = buttons.querySelectorAll('div:not(#toggle-theme)');
|
const scrollbar_buttons = buttons.querySelectorAll('div:not(#toggle-theme)');
|
||||||
scrollbar_buttons.forEach(button => {
|
scrollbar_buttons.forEach(button => {
|
||||||
let targetId = button.id;
|
let targetId = button.id;
|
||||||
@ -59,11 +120,13 @@ NexT.utils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
slidScrollBarAnime: function (targetId, easing = 'linear', duration = 500) {
|
slidScrollBarAnime: function (targetId, easing = 'linear', duration = 500) {
|
||||||
|
const targetObj = document.getElementById(targetId);
|
||||||
|
|
||||||
window.anime({
|
window.anime({
|
||||||
targets: document.scrollingElement,
|
targets: document.scrollingElement,
|
||||||
duration: duration,
|
duration: duration,
|
||||||
easing: easing,
|
easing: easing,
|
||||||
scrollTop: targetId == '' ? 0 : document.getElementById(targetId).getBoundingClientRect().top + window.scrollY
|
scrollTop: targetId == '' || !targetObj ? 0 : targetObj.getBoundingClientRect().top + window.scrollY
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -119,8 +182,8 @@ NexT.utils = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
fmtLaWidget: function(){
|
fmtLaWidget: function () {
|
||||||
setTimeout(function(){
|
setTimeout(function () {
|
||||||
const laWidget = document.querySelectorAll('#la-siteinfo-widget span');
|
const laWidget = document.querySelectorAll('#la-siteinfo-widget span');
|
||||||
if (laWidget.length > 0) {
|
if (laWidget.length > 0) {
|
||||||
const valIds = [0, 2, 4, 6];
|
const valIds = [0, 2, 4, 6];
|
||||||
@ -134,8 +197,8 @@ NexT.utils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
fmtBusuanzi: function () {
|
fmtBusuanzi: function () {
|
||||||
setTimeout(function(){
|
setTimeout(function () {
|
||||||
const bszUV = document.getElementById('busuanzi_value_site_uv');
|
const bszUV = document.getElementById('busuanzi_value_site_uv');
|
||||||
if (bszUV) {
|
if (bszUV) {
|
||||||
bszUV.innerText = NexT.utils.numberFormat(bszUV.innerText);
|
bszUV.innerText = NexT.utils.numberFormat(bszUV.innerText);
|
||||||
}
|
}
|
||||||
@ -143,7 +206,7 @@ NexT.utils = {
|
|||||||
if (bszPV) {
|
if (bszPV) {
|
||||||
bszPV.innerText = NexT.utils.numberFormat(bszPV.innerText);
|
bszPV.innerText = NexT.utils.numberFormat(bszPV.innerText);
|
||||||
}
|
}
|
||||||
}, 800);
|
}, 800);
|
||||||
},
|
},
|
||||||
|
|
||||||
numberFormat: function (number) {
|
numberFormat: function (number) {
|
||||||
@ -213,25 +276,25 @@ NexT.utils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getCDNResource: function (res) {
|
getCDNResource: function (res) {
|
||||||
let { plugins, router } = NexT.CONFIG.vendor;
|
|
||||||
|
let router = NexT.CONFIG.vendor.router;
|
||||||
let { name, version, file, alias, alias_name } = res;
|
let { name, version, file, alias, alias_name } = res;
|
||||||
|
|
||||||
let npm_name = name;
|
|
||||||
if (alias_name) npm_name = alias_name;
|
|
||||||
let res_src = '';
|
let res_src = '';
|
||||||
switch (plugins) {
|
|
||||||
case 'cdnjs':
|
switch (router.type) {
|
||||||
case 'bootcdn':
|
case "modern":
|
||||||
case 'qiniu':
|
if (alias_name) name = alias_name;
|
||||||
let cdnjs_name = alias || name;
|
let alias_file = file.replace(/^(dist|lib|source|\/js|)\/(browser\/|)/, '');
|
||||||
let cdnjs_file = file.replace(/^(dist|lib|source|\/js|)\/(browser\/|)/, '');
|
if (alias_file.indexOf('min') == -1) {
|
||||||
if (cdnjs_file.indexOf('min') == -1) {
|
alias_file = alias_file.replace(/\.js$/, '.min.js');
|
||||||
cdnjs_file = cdnjs_file.replace(/\.js$/, '.min.js');
|
|
||||||
}
|
}
|
||||||
res_src = `${router}/${cdnjs_name}/${version}/${cdnjs_file}`
|
res_src = `${router.url}/${name}/${version}/${alias_file}`;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res_src = `${router}/${npm_name}@${version}/${file}`
|
if (alias) name = alias;
|
||||||
|
res_src = `${router.url}/${name}@${version}/${file}`;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return res_src;
|
return res_src;
|
||||||
@ -243,27 +306,57 @@ NexT.utils = {
|
|||||||
registerCopyCode: function () {
|
registerCopyCode: function () {
|
||||||
if (!NexT.CONFIG.copybtn) return;
|
if (!NexT.CONFIG.copybtn) return;
|
||||||
|
|
||||||
let figure = document.querySelectorAll('.highlight pre');
|
/** let figure = document.querySelectorAll('.highlight pre');
|
||||||
if (figure.length === 0 || !NexT.CONFIG.copybtn) return;
|
if (figure.length === 0 || !NexT.CONFIG.copybtn) return;
|
||||||
figure.forEach(element => {
|
figure.forEach(element => {
|
||||||
let cn = element.querySelector('code').className;
|
let cn = element.querySelector('code').className;
|
||||||
// TODO seems hard code need find other ways fixed it.
|
if (cn === '') return;
|
||||||
if (cn == '') return;
|
element.children[0].insertAdjacentHTML('beforebegin', '<div class="copy-btn" data-clipboard-snippe><i class="fa fa-copy fa-fw"></i></div>');
|
||||||
element.insertAdjacentHTML('beforeend', '<div class="copy-btn"><i class="fa fa-copy fa-fw"></i></div>');
|
var clipboard = new ClipboardJS(element.children[0],
|
||||||
|
{
|
||||||
|
text: function(trigger) {
|
||||||
|
return trigger.nextElementSibling.textContent.trim();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
clipboard.on('success', function (e) {
|
||||||
|
e.clearSelection();
|
||||||
|
console.info('Action:', e.action);
|
||||||
|
console.info('Text:', e.text);
|
||||||
|
button.querySelector('i').className = 'fa fa-check-circle fa-fw';
|
||||||
|
});
|
||||||
|
clipboard.on('error', function (e) {
|
||||||
|
console.error('复制失败:', e);
|
||||||
|
button.querySelector('i').className = 'fa fa-times-circle fa-fw';
|
||||||
|
});
|
||||||
const button = element.querySelector('.copy-btn');
|
const button = element.querySelector('.copy-btn');
|
||||||
button.addEventListener('click', () => {
|
element.addEventListener('mouseleave', () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
button.querySelector('i').className = 'fa fa-copy fa-fw';
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
});**/
|
||||||
|
/** figure.forEach(element => {
|
||||||
|
let cn = element.querySelector('code').className;
|
||||||
|
if (cn === '') return;
|
||||||
|
element.insertAdjacentHTML('beforeend', '<div class="copy-btn"><i class="fa fa-copy fa-fw"></i></div>');
|
||||||
|
// element.insertAdjacentHTML('beforeend', '<div class="copy-btn"><i class="fa fa-copy fa-fw"></i></div>');
|
||||||
|
const button = element.querySelector('.copy-btn');
|
||||||
|
button.addEventListener('click', async () => {
|
||||||
const lines = element.querySelector('.code') || element.querySelector('code');
|
const lines = element.querySelector('.code') || element.querySelector('code');
|
||||||
const code = lines.innerText;
|
let code = lines.textContent.trim();
|
||||||
|
console.log('尝试复制代码:', code);
|
||||||
|
|
||||||
if (navigator.clipboard) {
|
if (navigator.clipboard) {
|
||||||
// https://caniuse.com/mdn-api_clipboard_writetext
|
|
||||||
navigator.clipboard.writeText(code).then(() => {
|
navigator.clipboard.writeText(code).then(() => {
|
||||||
|
console.log('复制成功');
|
||||||
button.querySelector('i').className = 'fa fa-check-circle fa-fw';
|
button.querySelector('i').className = 'fa fa-check-circle fa-fw';
|
||||||
}, () => {
|
}).catch((err) => {
|
||||||
|
console.error('复制失败:', err);
|
||||||
button.querySelector('i').className = 'fa fa-times-circle fa-fw';
|
button.querySelector('i').className = 'fa fa-times-circle fa-fw';
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const ta = document.createElement('textarea');
|
const ta = document.createElement('textarea');
|
||||||
ta.style.top = window.scrollY + 'px'; // Prevent page scrolling
|
ta.style.top = window.scrollY + 'px';
|
||||||
ta.style.position = 'absolute';
|
ta.style.position = 'absolute';
|
||||||
ta.style.opacity = '0';
|
ta.style.opacity = '0';
|
||||||
ta.readOnly = true;
|
ta.readOnly = true;
|
||||||
@ -271,20 +364,22 @@ NexT.utils = {
|
|||||||
document.body.append(ta);
|
document.body.append(ta);
|
||||||
ta.select();
|
ta.select();
|
||||||
ta.setSelectionRange(0, code.length);
|
ta.setSelectionRange(0, code.length);
|
||||||
ta.readOnly = false;
|
try {
|
||||||
const result = document.execCommand('copy');
|
const successful = document.execCommand('copy');
|
||||||
button.querySelector('i').className = result ? 'fa fa-check-circle fa-fw' : 'fa fa-times-circle fa-fw';
|
if (!successful) throw new Error('复制命令执行失败');
|
||||||
ta.blur(); // For iOS
|
} catch (err) {
|
||||||
button.blur();
|
console.error('复制失败:', err);
|
||||||
|
}
|
||||||
document.body.removeChild(ta);
|
document.body.removeChild(ta);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
element.addEventListener('mouseleave', () => {
|
element.addEventListener('mouseleave', () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
button.querySelector('i').className = 'fa fa-copy fa-fw';
|
button.querySelector('i').className = 'fa fa-copy fa-fw';
|
||||||
}, 300);
|
}, 300);
|
||||||
});
|
});
|
||||||
});
|
});**/
|
||||||
},
|
},
|
||||||
|
|
||||||
wrapTableWithBox: function () {
|
wrapTableWithBox: function () {
|
||||||
@ -404,22 +499,58 @@ NexT.utils = {
|
|||||||
const isSubPath = !NexT.CONFIG.root.startsWith(target.pathname) && location.pathname.startsWith(target.pathname);
|
const isSubPath = !NexT.CONFIG.root.startsWith(target.pathname) && location.pathname.startsWith(target.pathname);
|
||||||
target.classList.toggle('menu-item-active', target.hostname === location.hostname && (isSamePath || isSubPath));
|
target.classList.toggle('menu-item-active', target.hostname === location.hostname && (isSamePath || isSubPath));
|
||||||
});
|
});
|
||||||
},
|
},*/
|
||||||
|
|
||||||
registerLangSelect: function() {
|
registerLangSelect: function() {
|
||||||
const selects = document.querySelectorAll('.lang-select');
|
let selects = document.getElementById('lang-select');
|
||||||
selects.forEach(sel => {
|
if (!selects) return;
|
||||||
sel.value = NexT.CONFIG.page.lang;
|
|
||||||
sel.addEventListener('change', () => {
|
let selected = selects.querySelector('#lang-selected');
|
||||||
const target = sel.options[sel.selectedIndex];
|
let selectedVal = selected.querySelectorAll('span');
|
||||||
document.querySelectorAll('.lang-select-label span').forEach(span => {
|
let flagIcon = selectedVal[0];
|
||||||
span.innerText = target.text;
|
let langName = selectedVal[1];
|
||||||
});
|
let selectIcon = selected.querySelector('i');
|
||||||
// Disable Pjax to force refresh translation of menu item
|
|
||||||
window.location.href = target.dataset.href;
|
|
||||||
|
let options = selects.querySelectorAll('#lang-options>div');
|
||||||
|
let optionsDom = options[0].parentNode;
|
||||||
|
options.forEach(option => {
|
||||||
|
option.addEventListener('click', () => {
|
||||||
|
let langCode = option.getAttribute('lang-code');
|
||||||
|
flagIcon.className = 'flag-icon flag-icon-'+langCode;
|
||||||
|
langName.innerHTML = option.getAttribute('lang-name');
|
||||||
|
selectIcon.className = 'fa fa-chevron-down';
|
||||||
|
optionsDom.style.opacity = '0';
|
||||||
|
optionsDom.style.transform = 'translateY(-10px)';
|
||||||
|
|
||||||
|
let url = option.getAttribute('lang-url');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
optionsDom.style.display = 'none';
|
||||||
|
window.location.href = url;
|
||||||
|
}, 300);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
selected.addEventListener('mouseenter', function() {
|
||||||
|
selectIcon.className = 'fa fa-chevron-up';
|
||||||
|
optionsDom.style.display = 'block';
|
||||||
|
optionsDom.style.opacity = '1';
|
||||||
|
optionsDom.style.transform = 'translateY(0)';
|
||||||
|
|
||||||
});
|
});
|
||||||
},*/
|
|
||||||
|
optionsDom.addEventListener('mouseleave', function() {
|
||||||
|
selectIcon.className = 'fa fa-chevron-down';
|
||||||
|
optionsDom.style.opacity = '0';
|
||||||
|
optionsDom.style.transform = 'translateY(-10px)';
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
optionsDom.style.display = 'none';
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
registerSidebarTOC: function () {
|
registerSidebarTOC: function () {
|
||||||
const toc = document.getElementById('TableOfContents');
|
const toc = document.getElementById('TableOfContents');
|
||||||
@ -481,10 +612,6 @@ NexT.utils = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
hideCommontes: function () {
|
|
||||||
document.querySelector('.post-comments').style.display = 'none';
|
|
||||||
},
|
|
||||||
|
|
||||||
hiddeLodingCmp: function (selector) {
|
hiddeLodingCmp: function (selector) {
|
||||||
const loadding = document.querySelector(selector).previousElementSibling;
|
const loadding = document.querySelector(selector).previousElementSibling;
|
||||||
loadding.style.display = 'none';
|
loadding.style.display = 'none';
|
||||||
@ -556,7 +683,7 @@ NexT.utils = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getStyle: function (src, position='after', parent) {
|
getStyle: function (src, position = 'after', parent) {
|
||||||
const link = document.createElement('link');
|
const link = document.createElement('link');
|
||||||
link.setAttribute('rel', 'stylesheet');
|
link.setAttribute('rel', 'stylesheet');
|
||||||
link.setAttribute('type', 'text/css');
|
link.setAttribute('type', 'text/css');
|
||||||
@ -576,8 +703,11 @@ NexT.utils = {
|
|||||||
condition: legacyCondition
|
condition: legacyCondition
|
||||||
}).then(options);
|
}).then(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
condition = false,
|
condition = false,
|
||||||
|
module = false,
|
||||||
|
textContent = undefined,
|
||||||
attributes: {
|
attributes: {
|
||||||
id = '',
|
id = '',
|
||||||
async = false,
|
async = false,
|
||||||
@ -597,6 +727,8 @@ NexT.utils = {
|
|||||||
|
|
||||||
if (id) script.id = id;
|
if (id) script.id = id;
|
||||||
if (crossOrigin) script.crossOrigin = crossOrigin;
|
if (crossOrigin) script.crossOrigin = crossOrigin;
|
||||||
|
if (module) script.type = 'module';
|
||||||
|
if (textContent != undefined) script.textContent = textContent;
|
||||||
script.async = async;
|
script.async = async;
|
||||||
script.defer = defer;
|
script.defer = defer;
|
||||||
Object.assign(script.dataset, dataset);
|
Object.assign(script.dataset, dataset);
|
||||||
@ -607,22 +739,25 @@ NexT.utils = {
|
|||||||
script.onload = resolve;
|
script.onload = resolve;
|
||||||
script.onerror = reject;
|
script.onerror = reject;
|
||||||
|
|
||||||
if (typeof src === 'object') {
|
if (src != null && src != undefined) {
|
||||||
const { url, integrity } = src;
|
if (typeof src === 'object') {
|
||||||
script.src = url;
|
const { url, integrity } = src;
|
||||||
if (integrity) {
|
script.src = url;
|
||||||
script.integrity = integrity;
|
if (integrity) {
|
||||||
script.crossOrigin = 'anonymous';
|
script.integrity = integrity;
|
||||||
|
script.crossOrigin = 'anonymous';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
script.src = src;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
script.src = src;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(parentNode || document.head).appendChild(script);
|
(parentNode || document.head).appendChild(script);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
lazyLoadComponent: function(selector, legacyCallback) {
|
lazyLoadComponent: function (selector, legacyCallback) {
|
||||||
if (legacyCallback) {
|
if (legacyCallback) {
|
||||||
return this.lazyLoadComponent(selector).then(legacyCallback);
|
return this.lazyLoadComponent(selector).then(legacyCallback);
|
||||||
}
|
}
|
||||||
@ -642,4 +777,4 @@ NexT.utils = {
|
|||||||
intersectionObserver.observe(element);
|
intersectionObserver.observe(element);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Hugo NexT theme's custom config
|
# Hugo NexT theme's custom config
|
||||||
|
|
||||||
version: 4.4.0
|
version: 4.7.2
|
||||||
|
|
||||||
domain: hugo-next.eu.org
|
domain: hugo-next.eu.org
|
||||||
|
@ -1,33 +1,79 @@
|
|||||||
# CDN 公共资源商列表
|
# CDN 公共资源商列表
|
||||||
# Public CDN vendor list
|
# Public CDN vendor list
|
||||||
vendors:
|
vendors:
|
||||||
cdnjs: "https://cdnjs.cloudflare.com/ajax/libs"
|
- name: cdnjs
|
||||||
unpkg: "https://unpkg.com"
|
home: "https://cdnjs.com"
|
||||||
bootcdn: "https://cdn.bootcdn.net/ajax/libs"
|
logo: "https://cdnjs.com/_/f7a2ebfb819c118086546e481876aef6.svg"
|
||||||
qiniu: "https://cdn.staticfile.org"
|
type: "modern"
|
||||||
|
url: "https://cdnjs.cloudflare.com/ajax/libs"
|
||||||
|
|
||||||
|
- name: unpkg
|
||||||
|
home: "https://unpkg.com"
|
||||||
|
logo: "https://unpkg.fly.dev/_client/b870d5fb04d2854d.png"
|
||||||
|
type: "nodejs"
|
||||||
|
url: "https://unpkg.com"
|
||||||
|
|
||||||
|
- name: bootcdn
|
||||||
|
home: "https://www.bootcdn.cn"
|
||||||
|
logo: "https://www.bootcdn.cn/assets/img/logo.png"
|
||||||
|
type: "modern"
|
||||||
|
url: "https://cdn.bootcdn.net/ajax/libs"
|
||||||
|
|
||||||
|
- name: staticfile
|
||||||
|
home: "https://staticfile.net/"
|
||||||
|
logo: "https://www.staticfile.net/images/logo.png"
|
||||||
|
type: "modern"
|
||||||
|
url: "https://cdn.staticfile.net"
|
||||||
|
|
||||||
|
- name: 7ed
|
||||||
|
home: "https://www.7ed.net"
|
||||||
|
logo: "https://github.com/7ednet/homepage/raw/main/_images/logo.svg"
|
||||||
|
type: "modern"
|
||||||
|
url: "https://use.sevencdn.com/ajax/libs"
|
||||||
|
|
||||||
|
- name: zstatic
|
||||||
|
home: "https://www.zstatic.net"
|
||||||
|
logo: "https://www.zstatic.net/logo.png"
|
||||||
|
type: "modern"
|
||||||
|
url: "https://s4.zstatic.net/ajax/libs"
|
||||||
|
|
||||||
|
- name: zeyao
|
||||||
|
home: "https://cdn.jsdmirror.com/"
|
||||||
|
logo: "https://img.cuteapi.com/2023/08/29/Background.png"
|
||||||
|
type: "nodejs"
|
||||||
|
url: "https://cdn.jsdmirror.com/npm"
|
||||||
|
|
||||||
|
- name: jsdelivr
|
||||||
|
home: "https://www.jsdelivr.com/"
|
||||||
|
logo: "https://www.jsdelivr.com/assets/0c183396fdb0079ea31849b02bc5e3429f1740de/img/jsdelivr-horizontal-regular.svg"
|
||||||
|
type: "nodejs"
|
||||||
|
url: "https://cdn.jsdelivr.net/npm"
|
||||||
|
|
||||||
# JavaScript 资源
|
# JavaScript 资源
|
||||||
# JavaScript Resources
|
# JavaScript Resources
|
||||||
js:
|
js:
|
||||||
- name: animejs
|
- name: animejs
|
||||||
version: 3.2.1
|
version: 3.2.2
|
||||||
file: lib/anime.min.js
|
file: lib/anime.min.js
|
||||||
|
|
||||||
- name: viewerjs
|
- name: viewerjs
|
||||||
version: 1.11.0
|
version: 1.11.6
|
||||||
file: dist/viewer.min.js
|
file: dist/viewer.min.js
|
||||||
|
|
||||||
# CSS 资源
|
# CSS 资源
|
||||||
# CSS Resources
|
# CSS Resources
|
||||||
css:
|
css:
|
||||||
- name: '@fortawesome/fontawesome-free'
|
- name: font-awesome
|
||||||
version: 6.1.2
|
version: 6.7.2
|
||||||
file: css/all.min.css
|
file: css/all.min.css
|
||||||
alias: font-awesome
|
alias: '@fortawesome/fontawesome-free'
|
||||||
|
|
||||||
- name: animate.css
|
- name: animate.css
|
||||||
version: 3.1.1
|
version: 3.1.1
|
||||||
file: animate.min.css
|
file: animate.min.css
|
||||||
|
|
||||||
- name: viewerjs
|
- name: viewerjs
|
||||||
version: 1.11.0
|
version: 1.11.6
|
||||||
file: dist/viewer.min.css
|
file: dist/viewer.min.css
|
||||||
|
|
||||||
# 第三方服务组件资源
|
# 第三方服务组件资源
|
||||||
@ -44,32 +90,51 @@ analytics:
|
|||||||
|
|
||||||
# 文章分享
|
# 文章分享
|
||||||
# Share
|
# Share
|
||||||
addthis:
|
share:
|
||||||
js: https://s7.addthis.com/js/300/addthis_widget.js
|
sharethis:
|
||||||
|
js: https://platform-api.sharethis.com/js/sharethis.js#property=id&product=inline-share-buttons&source=platform
|
||||||
|
|
||||||
|
addtoany:
|
||||||
|
js: https://static.addtoany.com/menu/page.js
|
||||||
|
|
||||||
# 评论组件
|
# 评论组件
|
||||||
# Comment component
|
# Comment component
|
||||||
waline:
|
waline:
|
||||||
js:
|
js:
|
||||||
name: '@waline/client'
|
name: waline
|
||||||
version: 2.13.0
|
version: 2.15.8
|
||||||
file: dist/waline.js
|
file: dist/waline.js
|
||||||
alias: waline
|
alias: "@waline/client"
|
||||||
|
|
||||||
css:
|
css:
|
||||||
name: '@waline/client'
|
name: waline
|
||||||
version: 2.13.0
|
version: 2.15.8
|
||||||
file: dist/waline.css
|
file: dist/waline.css
|
||||||
alias: waline
|
alias: "@waline/client"
|
||||||
|
|
||||||
|
waline3:
|
||||||
|
js:
|
||||||
|
name: waline
|
||||||
|
version: 3.3.0
|
||||||
|
file: dist/waline.js
|
||||||
|
alias: "@waline/client"
|
||||||
|
|
||||||
|
css:
|
||||||
|
name: waline
|
||||||
|
version: 3.3.0
|
||||||
|
file: dist/waline.min.css
|
||||||
|
alias: "@waline/client"
|
||||||
|
|
||||||
artalk:
|
artalk:
|
||||||
js:
|
js:
|
||||||
name: artalk
|
name: artalk
|
||||||
version: 2.3.4
|
version: 2.6.4
|
||||||
file: dist/Artalk.js
|
file: dist/Artalk.min.js
|
||||||
|
|
||||||
css:
|
css:
|
||||||
name: artalk
|
name: artalk
|
||||||
version: 2.3.4
|
version: 2.6.4
|
||||||
file: dist/Artalk.css
|
file: dist/Artalk.min.css
|
||||||
|
|
||||||
giscus:
|
giscus:
|
||||||
js: https://giscus.app/client.js
|
js: https://giscus.app/client.js
|
||||||
@ -80,15 +145,17 @@ utterances:
|
|||||||
livere:
|
livere:
|
||||||
js: https://cdn-city.livere.com/js/embed.dist.js
|
js: https://cdn-city.livere.com/js/embed.dist.js
|
||||||
|
|
||||||
|
|
||||||
# 全文搜索
|
# 全文搜索
|
||||||
# Full text search
|
# Full text search
|
||||||
algolia:
|
algolia:
|
||||||
name: algoliasearch
|
name: algoliasearch
|
||||||
version: 4.14.2
|
version: 4.24.0
|
||||||
file: dist/algoliasearch-lite.umd.js
|
file: dist/algoliasearch-lite.umd.js
|
||||||
|
|
||||||
instant:
|
instant:
|
||||||
name: instantsearch.js
|
name: instantsearch.js
|
||||||
version: 4.49.0
|
version: 4.73.2
|
||||||
file: dist/instantsearch.production.min.js
|
file: dist/instantsearch.production.min.js
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
@ -96,39 +163,79 @@ plugins:
|
|||||||
mathjax:
|
mathjax:
|
||||||
js:
|
js:
|
||||||
name: mathjax
|
name: mathjax
|
||||||
version: 3.2.0
|
version: 3.2.2
|
||||||
file: es5/tex-mml-chtml.js
|
file: es5/tex-mml-svg.js
|
||||||
|
|
||||||
katex:
|
katex:
|
||||||
js:
|
js:
|
||||||
- name: katex
|
- name: katex
|
||||||
version: 0.16.0
|
alias_name: KaTeX
|
||||||
|
version: 0.16.15
|
||||||
file: dist/katex.min.js
|
file: dist/katex.min.js
|
||||||
|
|
||||||
- name: auto-render
|
- name: auto-render
|
||||||
alias_name: katex
|
alias: katex
|
||||||
version: 0.16.0
|
alias_name: KaTeX
|
||||||
|
version: 0.16.15
|
||||||
file: dist/contrib/auto-render.min.js
|
file: dist/contrib/auto-render.min.js
|
||||||
|
|
||||||
css:
|
css:
|
||||||
name: katex
|
name: katex
|
||||||
version: 0.16.0
|
alias_name: KaTeX
|
||||||
|
version: 0.16.15
|
||||||
file: dist/katex.min.css
|
file: dist/katex.min.css
|
||||||
|
|
||||||
# 画图渲染
|
# 画图渲染
|
||||||
mermaid:
|
mermaid:
|
||||||
js:
|
js:
|
||||||
name: mermaid
|
name: mermaid
|
||||||
version: 9.1.7
|
version: 10.9.1
|
||||||
file: dist/mermaid.min.js
|
file: dist/mermaid.min.js
|
||||||
# 文章访问/评论统计
|
# 文章访问/评论统计
|
||||||
waline:
|
waline:
|
||||||
js:
|
js:
|
||||||
- name: pageview
|
- name: pageview
|
||||||
alias_name: '@waline/client'
|
alias_name: waline
|
||||||
version: 2.13.0
|
version: 2.15.8
|
||||||
file: dist/pageview.js
|
file: dist/pageview.js
|
||||||
alias: waline
|
alias: "@waline/client"
|
||||||
|
|
||||||
- name: comment
|
- name: comment
|
||||||
alias_name: '@waline/client'
|
alias_name: waline
|
||||||
version: 2.13.0
|
version: 2.15.8
|
||||||
file: dist/comment.js
|
file: dist/comment.js
|
||||||
alias: waline
|
alias: "@waline/client"
|
||||||
|
waline3:
|
||||||
|
js:
|
||||||
|
- name: pageview
|
||||||
|
alias_name: waline
|
||||||
|
version: 3.3.0
|
||||||
|
file: dist/pageview.js
|
||||||
|
alias: "@waline/client"
|
||||||
|
|
||||||
|
- name: comment
|
||||||
|
alias_name: waline
|
||||||
|
version: 3.3.0
|
||||||
|
file: dist/comment.js
|
||||||
|
alias: "@waline/client"
|
||||||
|
# 音乐播放器
|
||||||
|
music:
|
||||||
|
js:
|
||||||
|
- name: aplayer
|
||||||
|
version: 1.10.1
|
||||||
|
file: dist/APlayer.min.js
|
||||||
|
|
||||||
|
- name: meting
|
||||||
|
version: 2.0.1
|
||||||
|
file: dist/Meting.min.js
|
||||||
|
|
||||||
|
css:
|
||||||
|
name: aplayer
|
||||||
|
version: 1.10.1
|
||||||
|
file: dist/APlayer.min.css
|
||||||
|
# 复制到剪贴板
|
||||||
|
clipboard:
|
||||||
|
js:
|
||||||
|
name: clipboard
|
||||||
|
version: 2.0.11
|
||||||
|
file: dist/clipboard.min.js
|
@ -1,27 +0,0 @@
|
|||||||
---
|
|
||||||
title: "关于 Hugo NexT 组织"
|
|
||||||
description: "Hugo NexT 组织介绍说明。"
|
|
||||||
|
|
||||||
date: 2022-06-09T20:12:52+08:00
|
|
||||||
lastmod: 2022-06-09T20:12:52+08:00
|
|
||||||
|
|
||||||
share: false
|
|
||||||
followme: false
|
|
||||||
nav: false
|
|
||||||
copyright: false
|
|
||||||
url: about.html
|
|
||||||
---
|
|
||||||
|
|
||||||
`Hugo NexT` 组织是由众多喜爱 `NexT` 主题及风格的世界各地友人共同组建而成,为的就是让这个主题继续在 `Hugo` 引擎中也能得到发扬光大,在此也欢迎你的加入!
|
|
||||||
|
|
||||||
# 我们的愿景
|
|
||||||
|
|
||||||
延续 `NexT` 经典的黑白调搭配,保持简单的易用性及强大的功能。
|
|
||||||
|
|
||||||
# 使用反馈
|
|
||||||
|
|
||||||
- 加入 [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) 或 [Gitter](https://gitter.im/hugo-next/community) 在线讨论 :beers:
|
|
||||||
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) 提交错误报告 :bug:
|
|
||||||
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) 表新功能的想法 :sparkles:
|
|
||||||
|
|
||||||
> 同时国内用户也可加入 QQ 群交流: 604710815
|
|
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
date: 2022-07-26T21:46:25+08:00
|
|
||||||
---
|
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
title: "站点示例"
|
|
||||||
type: flinks
|
|
||||||
url: flinks.html
|
|
||||||
---
|
|
||||||
|
|
||||||
如想交换本站友情链接,请在评论区留下你的站点信息,格式参考如下:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Hugo-NexT
|
|
||||||
desc: Hugo NexT 官方预览网站。
|
|
||||||
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
|
|
||||||
link: https://hugo-next.eu.org
|
|
||||||
```
|
|
@ -1,82 +0,0 @@
|
|||||||
---
|
|
||||||
title: "支持用户自定义设计"
|
|
||||||
description: "用户可以通过自定义文件配置,实现对站点的样式和布局进行个性化的调整。"
|
|
||||||
keywords: "custom,files,layout"
|
|
||||||
|
|
||||||
date: 2022-09-10T21:02:32+08:00
|
|
||||||
lastmod: 2022-09-10T21:02:32+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- 自定义
|
|
||||||
- 个性化
|
|
||||||
- 布局
|
|
||||||
|
|
||||||
url: "post/custom-files.html"
|
|
||||||
toc: true
|
|
||||||
---
|
|
||||||
|
|
||||||
对于熟悉前端开发的用户来说,可以通过自定义文件配置,实现对站点的样式和布局进行个性化的调整。其中布局方面主要是支持左侧边栏的站点概览部分,以及站点底部2个位置,但样式的重置可以是整个站点的任意位置。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
## 打开配置参数
|
|
||||||
|
|
||||||
首先要明确在配置文件的 `params` 区域中有配置如下参数:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
customFilePath:
|
|
||||||
sidebar: custom_sidebar.html
|
|
||||||
footer: custom_footer.html
|
|
||||||
style: /css/custom_style.css
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< note warning >}}
|
|
||||||
|
|
||||||
**注意:** `sidebar` 和 `footer` 的文件命名不可以与它们的参数名称相同,不然会影响系统默认的布局设计,切记!!! :smile:
|
|
||||||
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
然后在站点的根目录下创建 `layouts/partials` 2个目录,用于存放自定布局设计文件,另外在站点根目录下创建 `statics/css` 2个目录,用于存放自定义 CSS 样式文件。一切就绪后,就可以参考如下的步骤,完成自己的设计想法。
|
|
||||||
|
|
||||||
## 侧边栏设计
|
|
||||||
|
|
||||||
在前面创建 `partials` 目录中新一个后缀名为 `html` 的文件,可以在里面书写你所想表达的设计或内容,比如引入一些第三方组件内容。示例如下:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<div class="mydefined animated" itemprop="custom">
|
|
||||||
<span>支持自定义CSS和Sidebar布局啦💄💄💄</span>
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
再把该文件的路径配置到相应的参数中,效果请查看左侧边栏底部的效果。
|
|
||||||
|
|
||||||
## 底部设计
|
|
||||||
|
|
||||||
在前面创建 `partials` 目录中新一个后缀名为 `html` 的文件,可以在里面书写你所想表达的设计或内容,比如引入一些第三方组件内容。示例如下:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<div class="custom-footer">
|
|
||||||
Website source code <a href="https://github.com/hugo-next/hugo-theme-next/tree/develop/exampleSite/layouts/partials/custom-footer.html" target="_blank">here</a>
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
再把该文件的路径配置到相应的参数中,效果请查看站点底部的效果。
|
|
||||||
|
|
||||||
|
|
||||||
## 自定义样式
|
|
||||||
|
|
||||||
在前面创建 `css` 目录中新一个后缀名为 `css` 的文件,然后可以在里面把站点的样式进行重定义,或是增加一些自己定义的样式设计,在写文章时进行引用,示例如下:
|
|
||||||
|
|
||||||
```html
|
|
||||||
.custom-head5 {
|
|
||||||
font-size: 1.2em;
|
|
||||||
color: #ed6c24;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
再把该文件的路径配置到相应的参数中,效果参考如下:
|
|
||||||
|
|
||||||
<span class="custom-head5">我是自定义的标题样式效果!!!</span>
|
|
@ -1,201 +0,0 @@
|
|||||||
---
|
|
||||||
title: "支持 Emoji 表情"
|
|
||||||
description: "Hugo 和 NexT 中的 Emoji 的用法指南。"
|
|
||||||
keywords: "Hugo,NexT,Emoji"
|
|
||||||
|
|
||||||
date: 2022-06-04T19:46:45+08:00
|
|
||||||
lastmod: 2022-06-04T19:46:45+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- 表情
|
|
||||||
- emoji
|
|
||||||
|
|
||||||
url: "post/emoji-support.html"
|
|
||||||
---
|
|
||||||
|
|
||||||
Emoji 可以通过多种方式在 Hugo 项目中启用。
|
|
||||||
|
|
||||||
[`emojify`](https://gohugo.io/functions/emojify/) 方法可以直接在模板中调用, 或者使用[行内 Shortcodes](https://gohugo.io/templates/shortcode-templates#inline-shortcodes).
|
|
||||||
|
|
||||||
要全局使用 emoji, 需要在你的[网站配置](https://gohugo.io/getting-started/configuration/)中设置 `enableEmoji` 为 `true`,
|
|
||||||
然后你就可以直接在文章中输入 emoji 的代码。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
它们以**冒号**开头和结尾,并且包含 emoji 的 **代码**:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
去露营啦! {:}tent: 很快就回来.
|
|
||||||
|
|
||||||
真开心! {:}joy:
|
|
||||||
```
|
|
||||||
|
|
||||||
呈现的输出效果如下:
|
|
||||||
|
|
||||||
去露营啦! :tent: 很快就回来。
|
|
||||||
|
|
||||||
真开心! :joy:
|
|
||||||
|
|
||||||
以下**符号清单**是 emoji 代码的非常有用的参考。
|
|
||||||
|
|
||||||
## 表情与情感
|
|
||||||
|
|
||||||
### 笑脸表情
|
|
||||||
|
|
||||||
| 图标 | 代码 | 图标 | 代码 |
|
|
||||||
| :-: | - | :-: | - |
|
|
||||||
| :grinning: | `grinning` | :smiley: | `smiley` |
|
|
||||||
| :smile: | `smile` | :grin: | `grin` |
|
|
||||||
| :laughing: | `laughing` <br /> `satisfied` | :sweat_smile: | `sweat_smile` |
|
|
||||||
| :rofl: | `rofl` | :joy: | `joy` |
|
|
||||||
| :slightly_smiling_face: | `slightly_smiling_face` | :upside_down_face: | `upside_down_face` |
|
|
||||||
| :wink: | `wink` | :blush: | `blush` |
|
|
||||||
| :innocent: | `innocent` | | |
|
|
||||||
|
|
||||||
### 爱意表情
|
|
||||||
|
|
||||||
| 图标 | 代码 | 图标 | 代码 |
|
|
||||||
| :-: | - | :-: | - |
|
|
||||||
| :heart_eyes: | `heart_eyes` | :kissing_heart: | `kissing_heart` |
|
|
||||||
| :kissing: | `kissing` | :relaxed: | `relaxed` |
|
|
||||||
| :kissing_closed_eyes: | `kissing_closed_eyes` | :kissing_smiling_eyes: | `kissing_smiling_eyes` |
|
|
||||||
|
|
||||||
### 吐舌头表情
|
|
||||||
|
|
||||||
| 图标 | 代码 | 图标 | 代码 |
|
|
||||||
| :-: | - | :-: | - |
|
|
||||||
| :yum: | `yum` | :stuck_out_tongue: | `stuck_out_tongue` |
|
|
||||||
| :stuck_out_tongue_winking_eye: | `stuck_out_tongue_winking_eye` | :stuck_out_tongue_closed_eyes: | `stuck_out_tongue_closed_eyes` |
|
|
||||||
| :money_mouth_face: | `money_mouth_face` | | |
|
|
||||||
|
|
||||||
|
|
||||||
### 国家和地区旗帜
|
|
||||||
|
|
||||||
| 图标 | 代码 | 图标 | 代码 |
|
|
||||||
| :-: | - | :-: | - |
|
|
||||||
| :andorra: | `andorra` | :united_arab_emirates: | `united_arab_emirates` |
|
|
||||||
| :afghanistan: | `afghanistan` | :antigua_barbuda: | `antigua_barbuda` |
|
|
||||||
| :anguilla: | `anguilla` | :albania: | `albania` |
|
|
||||||
| :armenia: | `armenia` | :angola: | `angola` |
|
|
||||||
| :antarctica: | `antarctica` | :argentina: | `argentina` |
|
|
||||||
| :american_samoa: | `american_samoa` | :austria: | `austria` |
|
|
||||||
| :australia: | `australia` | :aruba: | `aruba` |
|
|
||||||
| :aland_islands: | `aland_islands` | :azerbaijan: | `azerbaijan` |
|
|
||||||
| :bosnia_herzegovina: | `bosnia_herzegovina` | :barbados: | `barbados` |
|
|
||||||
| :bangladesh: | `bangladesh` | :belgium: | `belgium` |
|
|
||||||
| :burkina_faso: | `burkina_faso` | :bulgaria: | `bulgaria` |
|
|
||||||
| :bahrain: | `bahrain` | :burundi: | `burundi` |
|
|
||||||
| :benin: | `benin` | :st_barthelemy: | `st_barthelemy` |
|
|
||||||
| :bermuda: | `bermuda` | :brunei: | `brunei` |
|
|
||||||
| :bolivia: | `bolivia` | :caribbean_netherlands: | `caribbean_netherlands` |
|
|
||||||
| :brazil: | `brazil` | :bahamas: | `bahamas` |
|
|
||||||
| :bhutan: | `bhutan` | :botswana: | `botswana` |
|
|
||||||
| :belarus: | `belarus` | :belize: | `belize` |
|
|
||||||
| :canada: | `canada` | :cocos_islands: | `cocos_islands` |
|
|
||||||
| :congo_kinshasa: | `congo_kinshasa` | :central_african_republic: | `central_african_republic` |
|
|
||||||
| :congo_brazzaville: | `congo_brazzaville` | :switzerland: | `switzerland` |
|
|
||||||
| :cote_divoire: | `cote_divoire` | :cook_islands: | `cook_islands` |
|
|
||||||
| :chile: | `chile` | :cameroon: | `cameroon` |
|
|
||||||
| :cn: | `cn` | :colombia: | `colombia` |
|
|
||||||
| :costa_rica: | `costa_rica` | :cuba: | `cuba` |
|
|
||||||
| :cape_verde: | `cape_verde` | :curacao: | `curacao` |
|
|
||||||
| :christmas_island: | `christmas_island` | :cyprus: | `cyprus` |
|
|
||||||
| :czech_republic: | `czech_republic` | :de: | `de` |
|
|
||||||
| :djibouti: | `djibouti` | :denmark: | `denmark` |
|
|
||||||
| :dominica: | `dominica` | :dominican_republic: | `dominican_republic` |
|
|
||||||
| :algeria: | `algeria` | :ecuador: | `ecuador` |
|
|
||||||
| :estonia: | `estonia` | :egypt: | `egypt` |
|
|
||||||
| :western_sahara: | `western_sahara` | :eritrea: | `eritrea` |
|
|
||||||
| :es: | `es` | :ethiopia: | `ethiopia` |
|
|
||||||
| :eu: | `eu` <br /> `european_union` | :finland: | `finland` |
|
|
||||||
| :fiji: | `fiji` | :falkland_islands: | `falkland_islands` |
|
|
||||||
| :micronesia: | `micronesia` | :faroe_islands: | `faroe_islands` |
|
|
||||||
| :fr: | `fr` | :gabon: | `gabon` |
|
|
||||||
| :gb: | `gb` <br /> `uk` | :grenada: | `grenada` |
|
|
||||||
| :georgia: | `georgia` | :french_guiana: | `french_guiana` |
|
|
||||||
| :guernsey: | `guernsey` | :ghana: | `ghana` |
|
|
||||||
| :gibraltar: | `gibraltar` | :greenland: | `greenland` |
|
|
||||||
| :gambia: | `gambia` | :guinea: | `guinea` |
|
|
||||||
| :guadeloupe: | `guadeloupe` | :equatorial_guinea: | `equatorial_guinea` |
|
|
||||||
| :greece: | `greece` | :south_georgia_south_sandwich_islands: | `south_georgia_south_sandwich_islands` |
|
|
||||||
| :guatemala: | `guatemala` | :guam: | `guam` |
|
|
||||||
| :guinea_bissau: | `guinea_bissau` | :guyana: | `guyana` |
|
|
||||||
| :hong_kong: | `hong_kong` | :honduras: | `honduras` |
|
|
||||||
| :croatia: | `croatia` | :haiti: | `haiti` |
|
|
||||||
| :hungary: | `hungary` | :canary_islands: | `canary_islands` |
|
|
||||||
| :indonesia: | `indonesia` | :ireland: | `ireland` |
|
|
||||||
| :israel: | `israel` | :isle_of_man: | `isle_of_man` |
|
|
||||||
| :india: | `india` | :british_indian_ocean_territory: | `british_indian_ocean_territory` |
|
|
||||||
| :iraq: | `iraq` | :iran: | `iran` |
|
|
||||||
| :iceland: | `iceland` | :it: | `it` |
|
|
||||||
| :jersey: | `jersey` | :jamaica: | `jamaica` |
|
|
||||||
| :jordan: | `jordan` | :jp: | `jp` |
|
|
||||||
| :kenya: | `kenya` | :kyrgyzstan: | `kyrgyzstan` |
|
|
||||||
| :cambodia: | `cambodia` | :kiribati: | `kiribati` |
|
|
||||||
| :comoros: | `comoros` | :st_kitts_nevis: | `st_kitts_nevis` |
|
|
||||||
| :north_korea: | `north_korea` | :kr: | `kr` |
|
|
||||||
| :kuwait: | `kuwait` | :cayman_islands: | `cayman_islands` |
|
|
||||||
| :kazakhstan: | `kazakhstan` | :laos: | `laos` |
|
|
||||||
| :lebanon: | `lebanon` | :st_lucia: | `st_lucia` |
|
|
||||||
| :liechtenstein: | `liechtenstein` | :sri_lanka: | `sri_lanka` |
|
|
||||||
| :liberia: | `liberia` | :lesotho: | `lesotho` |
|
|
||||||
| :lithuania: | `lithuania` | :luxembourg: | `luxembourg` |
|
|
||||||
| :latvia: | `latvia` | :libya: | `libya` |
|
|
||||||
| :morocco: | `morocco` | :monaco: | `monaco` |
|
|
||||||
| :moldova: | `moldova` | :montenegro: | `montenegro` |
|
|
||||||
| :madagascar: | `madagascar` | :marshall_islands: | `marshall_islands` |
|
|
||||||
| :macedonia: | `macedonia` | :mali: | `mali` |
|
|
||||||
| :myanmar: | `myanmar` | :mongolia: | `mongolia` |
|
|
||||||
| :macau: | `macau` | :northern_mariana_islands: | `northern_mariana_islands` |
|
|
||||||
| :martinique: | `martinique` | :mauritania: | `mauritania` |
|
|
||||||
| :montserrat: | `montserrat` | :malta: | `malta` |
|
|
||||||
| :mauritius: | `mauritius` | :maldives: | `maldives` |
|
|
||||||
| :malawi: | `malawi` | :mexico: | `mexico` |
|
|
||||||
| :malaysia: | `malaysia` | :mozambique: | `mozambique` |
|
|
||||||
| :namibia: | `namibia` | :new_caledonia: | `new_caledonia` |
|
|
||||||
| :niger: | `niger` | :norfolk_island: | `norfolk_island` |
|
|
||||||
| :nigeria: | `nigeria` | :nicaragua: | `nicaragua` |
|
|
||||||
| :netherlands: | `netherlands` | :norway: | `norway` |
|
|
||||||
| :nepal: | `nepal` | :nauru: | `nauru` |
|
|
||||||
| :niue: | `niue` | :new_zealand: | `new_zealand` |
|
|
||||||
| :oman: | `oman` | :panama: | `panama` |
|
|
||||||
| :peru: | `peru` | :french_polynesia: | `french_polynesia` |
|
|
||||||
| :papua_new_guinea: | `papua_new_guinea` | :philippines: | `philippines` |
|
|
||||||
| :pakistan: | `pakistan` | :poland: | `poland` |
|
|
||||||
| :st_pierre_miquelon: | `st_pierre_miquelon` | :pitcairn_islands: | `pitcairn_islands` |
|
|
||||||
| :puerto_rico: | `puerto_rico` | :palestinian_territories: | `palestinian_territories` |
|
|
||||||
| :portugal: | `portugal` | :palau: | `palau` |
|
|
||||||
| :paraguay: | `paraguay` | :qatar: | `qatar` |
|
|
||||||
| :reunion: | `reunion` | :romania: | `romania` |
|
|
||||||
| :serbia: | `serbia` | :ru: | `ru` |
|
|
||||||
| :rwanda: | `rwanda` | :saudi_arabia: | `saudi_arabia` |
|
|
||||||
| :solomon_islands: | `solomon_islands` | :seychelles: | `seychelles` |
|
|
||||||
| :sudan: | `sudan` | :sweden: | `sweden` |
|
|
||||||
| :singapore: | `singapore` | :st_helena: | `st_helena` |
|
|
||||||
| :slovenia: | `slovenia` | :slovakia: | `slovakia` |
|
|
||||||
| :sierra_leone: | `sierra_leone` | :san_marino: | `san_marino` |
|
|
||||||
| :senegal: | `senegal` | :somalia: | `somalia` |
|
|
||||||
| :suriname: | `suriname` | :south_sudan: | `south_sudan` |
|
|
||||||
| :sao_tome_principe: | `sao_tome_principe` | :el_salvador: | `el_salvador` |
|
|
||||||
| :sint_maarten: | `sint_maarten` | :syria: | `syria` |
|
|
||||||
| :swaziland: | `swaziland` | :turks_caicos_islands: | `turks_caicos_islands` |
|
|
||||||
| :chad: | `chad` | :french_southern_territories: | `french_southern_territories` |
|
|
||||||
| :togo: | `togo` | :thailand: | `thailand` |
|
|
||||||
| :tajikistan: | `tajikistan` | :tokelau: | `tokelau` |
|
|
||||||
| :timor_leste: | `timor_leste` | :turkmenistan: | `turkmenistan` |
|
|
||||||
| :tunisia: | `tunisia` | :tonga: | `tonga` |
|
|
||||||
| :tr: | `tr` | :trinidad_tobago: | `trinidad_tobago` |
|
|
||||||
| :tuvalu: | `tuvalu` | :taiwan: | `taiwan` |
|
|
||||||
| :tanzania: | `tanzania` | :ukraine: | `ukraine` |
|
|
||||||
| :uganda: | `uganda` | :us: | `us` |
|
|
||||||
| :uruguay: | `uruguay` | :uzbekistan: | `uzbekistan` |
|
|
||||||
| :vatican_city: | `vatican_city` | :st_vincent_grenadines: | `st_vincent_grenadines` |
|
|
||||||
| :venezuela: | `venezuela` | :british_virgin_islands: | `british_virgin_islands` |
|
|
||||||
| :us_virgin_islands: | `us_virgin_islands` | :vietnam: | `vietnam` |
|
|
||||||
| :vanuatu: | `vanuatu` | :wallis_futuna: | `wallis_futuna` |
|
|
||||||
| :samoa: | `samoa` | :kosovo: | `kosovo` |
|
|
||||||
| :yemen: | `yemen` | :mayotte: | `mayotte` |
|
|
||||||
| :south_africa: | `south_africa` | :zambia: | `zambia` |
|
|
||||||
| :zimbabwe: | `zimbabwe` | | |
|
|
@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
title: "欢迎加入 Hugo NexT 组织!"
|
|
||||||
description: "Hugo NexT 是专门为 Hugo 引擎所打造的主题,保持简单易用和强大的功能!"
|
|
||||||
keywords: "Hugo,NexT,组织"
|
|
||||||
|
|
||||||
date: 2022-06-01T15:59:41+08:00
|
|
||||||
lastmod: 2022-06-01T15:59:41+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- Hugo
|
|
||||||
- NexT
|
|
||||||
|
|
||||||
expand: true
|
|
||||||
extlink: https://gitee.com/hugo-next/hugo-theme-next/
|
|
||||||
#comment:
|
|
||||||
# enable: false
|
|
||||||
#toc: false
|
|
||||||
#url: "external-link.html"
|
|
||||||
weight: 1
|
|
||||||
---
|
|
||||||
|
|
||||||
欢迎来到 `Hugo NexT` 文档站点! 它是从 [Theme NexT](https://theme-next.js.org/) 移植过来的为 [Hugo](https://gohugo.io/)打造的高品质优雅主题,保持简单易用的特性和强大的功能。
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 用户指南
|
|
||||||
|
|
||||||
设置 NexT 主题很容易。只需遵循文档,就可快速创建您的个人网站!
|
|
||||||
|
|
||||||
## 反馈
|
|
||||||
|
|
||||||
- 访问 Awesome NexT 列表,与其他用户分享插件和教程。
|
|
||||||
- 加入我们的 Gitter 聊天。
|
|
||||||
- 在几秒钟内添加或改进翻译。
|
|
||||||
- 在 GitHub Issues 中报告一个 :bug:。
|
|
||||||
- 在 GitHub 上申请一个新特性。
|
|
||||||
- 为最受欢迎的功能请求投票。
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
|||||||
---
|
|
||||||
title: "世界,你好!"
|
|
||||||
description: "快速的描述下有关于 Hugo 建站的基本用法。"
|
|
||||||
|
|
||||||
lastmod: 2022-06-03T16:43:23+08:00
|
|
||||||
date: 2022-06-02T11:52:03+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 博客
|
|
||||||
tags:
|
|
||||||
- Hugo
|
|
||||||
- 开始
|
|
||||||
|
|
||||||
url: post/hello-world.html
|
|
||||||
toc: true
|
|
||||||
weight: 2
|
|
||||||
---
|
|
||||||
|
|
||||||
> “使用 `weight` 关键字置顶文章。”
|
|
||||||
|
|
||||||
[Hugo](https://gohugo.io/) 是现今世界上最快的网站建设框架,也是最流行的开源静态站点生成器之一。 凭借其惊人的速度和灵活性,Hugo 让建设网站再次变得有趣起来。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
## 快速开始
|
|
||||||
|
|
||||||
### 发表新文章
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ hugo new hello-world.md
|
|
||||||
```
|
|
||||||
|
|
||||||
更多信息:[内容格式](https://gohugo.io/content-management/formats/)
|
|
||||||
|
|
||||||
### 启动服务
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ hugo server
|
|
||||||
```
|
|
||||||
|
|
||||||
更多信息:[Hugo 服务命令行](https://gohugo.io/commands/hugo_server/)
|
|
||||||
|
|
||||||
### 生成静态文件
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ hugo
|
|
||||||
```
|
|
||||||
|
|
||||||
更多信息:[Hugo 建站](https://gohugo.io/commands/hugo/)
|
|
||||||
|
|
||||||
### 部署到服务器
|
|
||||||
|
|
||||||
```language
|
|
||||||
$ hugo deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
更多信息:[Hugo 发布](https://gohugo.io/commands/hugo_deploy/)
|
|
||||||
|
|
||||||
祝你好运,相信你会喜欢上 Hugo 建站的旅程!
|
|
@ -1,209 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Markdown 语法支持"
|
|
||||||
description: "描述下 NexT 主题所支持的各种 markdown 语法及效果展示。"
|
|
||||||
isCJKLanguage: false
|
|
||||||
|
|
||||||
lastmod: 2022-06-03T11:52:18+08:00
|
|
||||||
publishDate: 2022-06-03T11:52:18+08:00
|
|
||||||
|
|
||||||
author: Mainroad
|
|
||||||
originLink: https://mainroad-demo.netlify.app/post/basic-elements/
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- Markdown
|
|
||||||
- 语法
|
|
||||||
|
|
||||||
toc: false
|
|
||||||
draft: false
|
|
||||||
url: post/markdown-syntax.html
|
|
||||||
---
|
|
||||||
|
|
||||||
仅以此篇文章来测试下在 `NexT` 主题中在通过 `Hugo` 引擎来建站时,是否支持 `Markdown` 文件内容中所写的各种语法,并展示下实际的效果。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
## 标题样式
|
|
||||||
|
|
||||||
让我们从所有可能的标题开始,在 HTML 中 `<h1>`-`<h6>`元素分别表示六个不同级别的标题样式,其中 `<h1>` 为最大标题,`<h6>`为最小标题,效果如下:
|
|
||||||
|
|
||||||
# 标题 1
|
|
||||||
## 标题 2
|
|
||||||
### 标题 3
|
|
||||||
#### 标题 4
|
|
||||||
##### 标题 5
|
|
||||||
###### 标题 6
|
|
||||||
|
|
||||||
|
|
||||||
## 段落格式
|
|
||||||
|
|
||||||
根据[ W3C ](https://www.w3.org/)定义的[ HTML5 规范](https://www.w3.org/TR/html5/dom.html#elements),**HTML 文档由元素和文本组成**。每个元素的组成都由一个[开始标记](https://www.w3.org/TR/html5/syntax.html#syntax-start-tags)表示,例如: `<body>` ,和[结束标记](https://www.w3.org/TR/html5/syntax.html#syntax-end-tags)表示,例如: `</body>` 。(*某些开始标记和结束标记在某些情况下可以省略,并由其他标记暗示。*)
|
|
||||||
元素可以具有属性,这些属性控制元素的工作方式。例如:超链接是使用 `a` 元素及其 `href` 属性形成的。
|
|
||||||
|
|
||||||
### Markdown 语法
|
|
||||||
|
|
||||||
```markdown
|
|
||||||

|
|
||||||
```
|
|
||||||

|
|
||||||
|
|
||||||
### HTML IMG 标签
|
|
||||||
|
|
||||||
```html
|
|
||||||
<img src="图像地址" width="宽度" height="高度" />
|
|
||||||
```
|
|
||||||
<img src="//lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-secondary.png" width="150"/>
|
|
||||||
|
|
||||||
### SVG 格式
|
|
||||||
|
|
||||||
```html
|
|
||||||
<svg>xxxxxx</svg>
|
|
||||||
```
|
|
||||||
|
|
||||||
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
|
||||||
|
|
||||||
## 列表类型
|
|
||||||
|
|
||||||
### 有序列表
|
|
||||||
|
|
||||||
1. 第一个元素
|
|
||||||
2. 第二个元素
|
|
||||||
3. 第三个元素
|
|
||||||
|
|
||||||
### 无序列表
|
|
||||||
|
|
||||||
* 列表元素
|
|
||||||
* 另一个元素
|
|
||||||
* 和其它元素
|
|
||||||
|
|
||||||
### 嵌套列表
|
|
||||||
|
|
||||||
借助 HTML 的 `ul` 元素来实现。
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>第一项</li>
|
|
||||||
<li>第二项
|
|
||||||
<ul>
|
|
||||||
<li>第二项第一个子项目</li>
|
|
||||||
<li>第二项第二个子项目
|
|
||||||
<ul>
|
|
||||||
<li>第二项第二分项第一分项</li>
|
|
||||||
<li>第二项第二分项第二分项</li>
|
|
||||||
<li>第二项第二分项第三分项</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>第二项第三个子项目
|
|
||||||
<ol>
|
|
||||||
<li>第二项第三分项第一分项</li>
|
|
||||||
<li>第二项第三分项第二分项</li>
|
|
||||||
<li>第二项第三分项第三分项</li>
|
|
||||||
</ol>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>第三项</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
### 自定义列表
|
|
||||||
|
|
||||||
通过 HTML 的 `dl` 元素还支持自定义列表(表格列表)。
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>Hugo 目录结构</dt>
|
|
||||||
<dd>assets</dd>
|
|
||||||
<dd>config.toml</dd>
|
|
||||||
<dd>content</dd>
|
|
||||||
<dd>data</dd>
|
|
||||||
<dd>theme</dd>
|
|
||||||
<dd>static</dd>
|
|
||||||
<dt>Hugo 模板</dt>
|
|
||||||
<dd>基础模板</dd>
|
|
||||||
<dd>列表模板</dd>
|
|
||||||
<dd>单页模板</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
## 块引用
|
|
||||||
|
|
||||||
`blockquote` 元素表示从另一个源引用的内容,可以选择引用必须在 `footer` 或 `cite` 元素中,也可以选择使用注释和缩写等行内更改。
|
|
||||||
|
|
||||||
> 引用文本
|
|
||||||
> 这一行也是同样的引用
|
|
||||||
> 同样你也在 `blockquote` 中使用 **Markdown** 语法书写
|
|
||||||
|
|
||||||
带有引文的 `Blockquote` 元素效果。
|
|
||||||
|
|
||||||
<blockquote>
|
|
||||||
<p>我的目标不是赚大钱,是为了制造好的电脑。当我意识到我可以永远当工程师时,我才创办了这家公司。</p>
|
|
||||||
<footer>— <cite>史蒂夫·沃兹尼亚克</cite></footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
根据 Mozilla 的网站记录,<q cite="https://www.mozilla.org/en-US/about/history/details/">Firefox 1.0 于 2004 年发布,并取得了巨大成功。</q>
|
|
||||||
|
|
||||||
## 表格
|
|
||||||
|
|
||||||
表格并不算是 `Markdown` 的核心要素,但 `Hugo` 同样支持它。
|
|
||||||
|
|
||||||
| ID | 创建者 | 模型 | 年份 |
|
|
||||||
| --- | --------- | ------- | ---- |
|
|
||||||
| 1 | Honda | Accord | 2009 |
|
|
||||||
| 2 | Toyota | Camry | 2012 |
|
|
||||||
| 3 | Hyundai | Elantra | 2010 |
|
|
||||||
|
|
||||||
可以使用 : (英文格式冒号)来对表格内容进行对齐。
|
|
||||||
|
|
||||||
| 表格 | 可以是 | 很酷 |
|
|
||||||
|:----- |:-----:| ----:|
|
|
||||||
| 左对齐 | 居中 | 右对齐 |
|
|
||||||
| 左对齐 | 居中 | 右对齐 |
|
|
||||||
| 左对齐 | 居中 | 右对齐 |
|
|
||||||
|
|
||||||
同样也可以在表格中使用 `Markdown` 语法。
|
|
||||||
|
|
||||||
| 表格 | 中 | 使用 | Markdown 语法 |
|
|
||||||
| ------ | --------- | ---------- | ------------- |
|
|
||||||
| *斜体* | **粗体** | ~~中划线~~ | `代码块` |
|
|
||||||
|
|
||||||
## Code
|
|
||||||
|
|
||||||
```html
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Example HTML5 Document</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>Test</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< highlight html >}}
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Example HTML5 Document</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>Test</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
{{< /highlight >}}
|
|
||||||
|
|
||||||
## 其它元素: abbr、sub、sup、kbd等等
|
|
||||||
|
|
||||||
<abbr title="Graphics Interchange Format">GIF</abbr> 是位图图像格式。
|
|
||||||
|
|
||||||
H<sub>2</sub>O
|
|
||||||
|
|
||||||
C<sub>6</sub>H<sub>12</sub>O<sub>6</sub>
|
|
||||||
|
|
||||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|
||||||
|
|
||||||
按<kbd>X</kbd>获胜。或按<kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>F</kbd></kbd>显示 FPS 计数器。
|
|
||||||
|
|
||||||
<mark>比特作为信息论中的信息单位,也被称为 shannon </mark>,以信息论领域的创始人 Claude shannon 的名字命名。
|
|
||||||
|
|
||||||
参考:
|
|
||||||
- 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/post/basic-elements/) 内容
|
|
@ -1,227 +0,0 @@
|
|||||||
---
|
|
||||||
title: "数学公式渲染"
|
|
||||||
description: "主题支持mathjs和katex两种不同插件的数学公式渲染方案。"
|
|
||||||
keywords: "math,formula"
|
|
||||||
|
|
||||||
date: 2022-09-11T10:16:02+08:00
|
|
||||||
lastmod: 2022-09-11T10:16:02+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- 数学公式
|
|
||||||
- mathjax
|
|
||||||
- katex
|
|
||||||
|
|
||||||
|
|
||||||
url: "post/math-formula.html"
|
|
||||||
math: mathjax
|
|
||||||
---
|
|
||||||
|
|
||||||
本主题支持 `mathjax` 和 `katex` 两种不的方案支持数学公式的渲染,可根据自已的需求进行选择。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
接下的示例中,将使用 [MathJax](https://www.mathjax.org/) 方案来展示渲染效果。
|
|
||||||
|
|
||||||
{{< note info >}}
|
|
||||||
|
|
||||||
- 使用 `hugo new` 命令创建一篇新的文章
|
|
||||||
- 可以全局启用数据公式渲染,请在项目配置参数 `math: katex` 或 `math: mathjax`
|
|
||||||
- 或是将该参数配置到需要显示数学公式的页面头部(减少不必要的加载消耗)
|
|
||||||
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
**注意:** 使用[支持的TeX功能](https://docs.mathjax.org/en/latest/input/tex/index.html)的联机参考资料。
|
|
||||||
|
|
||||||
## 例子
|
|
||||||
|
|
||||||
|
|
||||||
### 重复的分数
|
|
||||||
$$
|
|
||||||
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} \equiv 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 总和记号
|
|
||||||
$$
|
|
||||||
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 几何级数之和
|
|
||||||
我把接下来的两个例子分成了几行,这样它在手机上表现得更好。这就是为什么它们包含 `\displaystyle`。
|
|
||||||
|
|
||||||
$$
|
|
||||||
\displaystyle\sum_{i=1}^{k+1}i
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\displaystyle= \left(\sum_{i=1}^{k}i\right) +(k+1)
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\displaystyle= \frac{k(k+1)}{2}+k+1
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\displaystyle= \frac{k(k+1)+2(k+1)}{2}
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\displaystyle= \frac{(k+1)(k+2)}{2}
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\displaystyle= \frac{(k+1)((k+1)+1)}{2}
|
|
||||||
$$
|
|
||||||
|
|
||||||
### 乘记号
|
|
||||||
$$
|
|
||||||
\displaystyle 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \displaystyle \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \displaystyle\text{ for }\lvert q\rvert < 1.
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 随文数式
|
|
||||||
这是一些线性数学: $$ k_{n+1} = n^2 + k_n^2 - k_{n-1} $$ , 然后是更多的文本。
|
|
||||||
|
|
||||||
|
|
||||||
### 希腊字母
|
|
||||||
$$
|
|
||||||
\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega
|
|
||||||
\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi \ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 箭头
|
|
||||||
$$
|
|
||||||
\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow
|
|
||||||
\leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
## 符号
|
|
||||||
$$
|
|
||||||
\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 微积分学
|
|
||||||
$$
|
|
||||||
\int u \frac{dv}{dx}\,dx=uv-\int \frac{du}{dx}v\,dx
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x}
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
|
||||||
\oint \vec{F} \cdot d\vec{s}=0
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 洛伦茨方程
|
|
||||||
$$
|
|
||||||
\begin{aligned} \dot{x} & = \sigma(y-x) \\\\ \dot{y} & = \rho x - y - xz \\\\ \dot{z} & = -\beta z + xy \end{aligned}
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 交叉乘积
|
|
||||||
这在KaTeX中是可行的,但在这种环境中馏分的分离不是很好。
|
|
||||||
|
|
||||||
$$
|
|
||||||
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\\\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\\\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix}
|
|
||||||
$$
|
|
||||||
|
|
||||||
这里有一个解决方案:使用“mfrac”类(在MathJax情况下没有区别)的额外类使分数更小:
|
|
||||||
|
|
||||||
$$
|
|
||||||
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\\\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\\\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix}
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
## 强调
|
|
||||||
$$
|
|
||||||
\hat{x}\ \vec{x}\ \ddot{x}
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 有弹性的括号
|
|
||||||
$$
|
|
||||||
\left(\frac{x^2}{y^3}\right)
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 评估范围
|
|
||||||
$$
|
|
||||||
\left.\frac{x^3}{3}\right|_0^1
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 诊断标准
|
|
||||||
$$
|
|
||||||
f(n) = \begin{cases} \frac{n}{2}, & \text{if } n\text{ is even} \\\\ 3n+1, & \text{if } n\text{ is odd} \end{cases}
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 麦克斯韦方程组
|
|
||||||
$$
|
|
||||||
\begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\\\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\\\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\\\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned}
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
## 统计学
|
|
||||||
固定词组:
|
|
||||||
|
|
||||||
$$
|
|
||||||
\frac{n!}{k!(n-k)!} = {^n}C_k
|
|
||||||
{n \choose k}
|
|
||||||
$$
|
|
||||||
|
|
||||||
### 分数在分数
|
|
||||||
$$
|
|
||||||
\frac{\frac{1}{x}+\frac{1}{y}}{y-z}
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### n次方根
|
|
||||||
$$
|
|
||||||
\sqrt[n]{1+x+x^2+x^3+\ldots}
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
### 矩阵
|
|
||||||
$$
|
|
||||||
\begin{pmatrix} a_{11} & a_{12} & a_{13}\\\\ a_{21} & a_{22} & a_{23}\\\\ a_{31} & a_{32} & a_{33} \end{pmatrix}
|
|
||||||
\begin{bmatrix} 0 & \cdots & 0 \\\\ \vdots & \ddots & \vdots \\\\ 0 & \cdots & 0 \end{bmatrix}
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
## 标点符号
|
|
||||||
$$
|
|
||||||
f(x) = \sqrt{1+x} \quad (x \ge -1)
|
|
||||||
f(x) \sim x^2 \quad (x\to\infty)
|
|
||||||
$$
|
|
||||||
|
|
||||||
现在用标点符号:
|
|
||||||
|
|
||||||
$$
|
|
||||||
f(x) = \sqrt{1+x}, \quad x \ge -1
|
|
||||||
f(x) \sim x^2, \quad x\to\infty
|
|
||||||
$$
|
|
@ -1,195 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Mermaid支持流程图"
|
|
||||||
description: "mermaid-flow-chart"
|
|
||||||
keywords: "mermaid,flow,chart"
|
|
||||||
|
|
||||||
date: 2022-09-18T20:58:13+08:00
|
|
||||||
lastmod: 2022-09-18T20:58:13+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- 流程图
|
|
||||||
- 时序图
|
|
||||||
|
|
||||||
url: "post/mermaid-charts.html"
|
|
||||||
mermaid: true
|
|
||||||
toc: true
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
本主题已支持 `Mermaid` 实现以纯文本的方式绘制流程图、序列图、甘特图、状态图、关系图行等等,随着 `Mermaid` 也在逐步发展,后续还会有各种各样的图被引入进来,更多的类型及使用方式可关注其官方网站:[https://mermaid-js.github.io/](https://mermaid-js.github.io/)。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
## 使用说明
|
|
||||||
|
|
||||||
{{< note info >}}
|
|
||||||
|
|
||||||
- 通过 `hugo new` 命令创建一篇新的文章
|
|
||||||
- 在文章头部配置 `mermaid: true`
|
|
||||||
- 使用短代码书写各种类型的图,自带2个参数: align(对齐) 和 bc(背景色),可参考如下使用示例
|
|
||||||
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
## 流程图
|
|
||||||
|
|
||||||
```shell
|
|
||||||
{{</* mermaid align="left" */>}}
|
|
||||||
graph TD;
|
|
||||||
A-->B;
|
|
||||||
A-->C;
|
|
||||||
B-->D;
|
|
||||||
C-->D;
|
|
||||||
{{</* /mermaid */>}}
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< mermaid align="left" >}}
|
|
||||||
graph TD;
|
|
||||||
A-->B;
|
|
||||||
A-->C;
|
|
||||||
B-->D;
|
|
||||||
C-->D;
|
|
||||||
{{< /mermaid >}}
|
|
||||||
|
|
||||||
## 时序图
|
|
||||||
|
|
||||||
```shell
|
|
||||||
{{</* mermaid bc="#eee" */>}}
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice
|
|
||||||
participant Bob
|
|
||||||
Alice->>John: Hello John, how are you?
|
|
||||||
loop Healthcheck
|
|
||||||
John->>John: Fight against hypochondria
|
|
||||||
end
|
|
||||||
Note right of John: Rational thoughts <br/>prevail!
|
|
||||||
John-->>Alice: Great!
|
|
||||||
John->>Bob: How about you?
|
|
||||||
Bob-->>John: Jolly good!
|
|
||||||
{{</* /mermaid */>}}
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< mermaid bc="#eee" >}}
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice
|
|
||||||
participant Bob
|
|
||||||
Alice->>John: Hello John, how are you?
|
|
||||||
loop Healthcheck
|
|
||||||
John->>John: Fight against hypochondria
|
|
||||||
end
|
|
||||||
Note right of John: Rational thoughts <br/>prevail!
|
|
||||||
John-->>Alice: Great!
|
|
||||||
John->>Bob: How about you?
|
|
||||||
Bob-->>John: Jolly good!
|
|
||||||
{{< /mermaid >}}
|
|
||||||
|
|
||||||
## 类图
|
|
||||||
|
|
||||||
```shell
|
|
||||||
{{</* mermaid */>}}
|
|
||||||
classDiagram
|
|
||||||
Class01 <|-- AveryLongClass : Cool
|
|
||||||
Class03 *-- Class04
|
|
||||||
Class05 o-- Class06
|
|
||||||
Class07 .. Class08
|
|
||||||
Class09 --> C2 : Where am i?
|
|
||||||
Class09 --* C3
|
|
||||||
Class09 --|> Class07
|
|
||||||
Class07 : equals()
|
|
||||||
Class07 : Object[] elementData
|
|
||||||
Class01 : size()
|
|
||||||
Class01 : int chimp
|
|
||||||
Class01 : int gorilla
|
|
||||||
Class08 <--> C2: Cool label
|
|
||||||
{{</* /mermaid */>}}
|
|
||||||
```
|
|
||||||
{{< mermaid >}}
|
|
||||||
classDiagram
|
|
||||||
Class01 <|-- AveryLongClass : Cool
|
|
||||||
Class03 *-- Class04
|
|
||||||
Class05 o-- Class06
|
|
||||||
Class07 .. Class08
|
|
||||||
Class09 --> C2 : Where am i?
|
|
||||||
Class09 --* C3
|
|
||||||
Class09 --|> Class07
|
|
||||||
Class07 : equals()
|
|
||||||
Class07 : Object[] elementData
|
|
||||||
Class01 : size()
|
|
||||||
Class01 : int chimp
|
|
||||||
Class01 : int gorilla
|
|
||||||
Class08 <--> C2: Cool label
|
|
||||||
{{< /mermaid >}}
|
|
||||||
|
|
||||||
## 甘特图
|
|
||||||
|
|
||||||
```shell
|
|
||||||
{{</* mermaid */>}}
|
|
||||||
gantt
|
|
||||||
dateFormat YYYY-MM-DD
|
|
||||||
title Adding GANTT diagram to mermaid
|
|
||||||
excludes weekdays 2014-01-10
|
|
||||||
|
|
||||||
section A section
|
|
||||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
|
||||||
Active task :active, des2, 2014-01-09, 3d
|
|
||||||
Future task : des3, after des2, 5d
|
|
||||||
Future task2 : des4, after des3, 5d
|
|
||||||
{{</* /mermaid */>}}
|
|
||||||
```
|
|
||||||
{{< mermaid >}}
|
|
||||||
gantt
|
|
||||||
dateFormat YYYY-MM-DD
|
|
||||||
title Adding GANTT diagram to mermaid
|
|
||||||
excludes weekdays 2014-01-10
|
|
||||||
|
|
||||||
section A section
|
|
||||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
|
||||||
Active task :active, des2, 2014-01-09, 3d
|
|
||||||
Future task : des3, after des2, 5d
|
|
||||||
Future task2 : des4, after des3, 5d
|
|
||||||
{{< /mermaid >}}
|
|
||||||
|
|
||||||
## 实体关系图
|
|
||||||
|
|
||||||
```shell
|
|
||||||
{{</* mermaid */>}}
|
|
||||||
erDiagram
|
|
||||||
CUSTOMER ||--o{ ORDER : places
|
|
||||||
ORDER ||--|{ LINE-ITEM : contains
|
|
||||||
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
|
||||||
{{</* /mermaid */>}}
|
|
||||||
```
|
|
||||||
{{< mermaid >}}
|
|
||||||
erDiagram
|
|
||||||
CUSTOMER ||--o{ ORDER : places
|
|
||||||
ORDER ||--|{ LINE-ITEM : contains
|
|
||||||
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
|
||||||
{{< /mermaid >}}
|
|
||||||
|
|
||||||
## 用户旅程
|
|
||||||
|
|
||||||
```shell
|
|
||||||
{{</* mermaid */>}}
|
|
||||||
journey
|
|
||||||
title My working day
|
|
||||||
section Go to work
|
|
||||||
Make tea: 5: Me
|
|
||||||
Go upstairs: 3: Me
|
|
||||||
Do work: 1: Me, Cat
|
|
||||||
section Go home
|
|
||||||
Go downstairs: 5: Me
|
|
||||||
Sit down: 5: Me
|
|
||||||
{{</* /mermaid */>}}
|
|
||||||
```
|
|
||||||
{{< mermaid >}}
|
|
||||||
journey
|
|
||||||
title My working day
|
|
||||||
section Go to work
|
|
||||||
Make tea: 5: Me
|
|
||||||
Go upstairs: 3: Me
|
|
||||||
Do work: 1: Me, Cat
|
|
||||||
section Go home
|
|
||||||
Go downstairs: 5: Me
|
|
||||||
Sit down: 5: Me
|
|
||||||
{{< /mermaid >}}
|
|
@ -1,43 +0,0 @@
|
|||||||
---
|
|
||||||
title: "没有H1-6标题头和评论的文章"
|
|
||||||
description: "用于测试在没有H1-6标题头时,文章的目录导航是否会直接关闭,并关闭评论功能。"
|
|
||||||
keywords: "toc,header"
|
|
||||||
|
|
||||||
date: 2022-10-06T09:02:26+08:00
|
|
||||||
lastmod: 2022-10-30T21:03:16+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- toc
|
|
||||||
- 标题
|
|
||||||
|
|
||||||
comment:
|
|
||||||
enable: false
|
|
||||||
url: "post/no-header-title.html"
|
|
||||||
---
|
|
||||||
|
|
||||||
刘慈欣2018克拉克奖获奖感言(部分内容节选)。
|
|
||||||
|
|
||||||
> 用于测试在没有H1-6标题头时,文章的目录导航是否会直接关闭,并关闭评论功能。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
先生们、女士们,晚上好,
|
|
||||||
|
|
||||||
很荣幸获得Clarke Award for Imagination in Service to Society Award。
|
|
||||||
|
|
||||||
这个奖项是对想象力的奖励,而想象力是人类所拥有的一种似乎只应属于神的能力,它存在的意义也远超出我们的想象。有历史学家说过,人类之所以能够超越地球上的其它物种建立文明,主要是因为他们能够在自己的大脑中创造出现实中不存在的东西。在未来,当人工智能拥有超过人类的智力时,想象力也许是我们对于它们所拥有的惟一优势。
|
|
||||||
|
|
||||||
科幻小说是基于想象力的文学,而最早给我留下深刻印象的是Arthur . Clarke的作品。除了Jules Verne和George Wells外,Clarke的作品是最早进入中国的西方现代科幻小说。在上世纪八十年代初,中国出版了他的《2001:A Space Odyssey》和《Rendezvous With Rama》。当时文革刚刚结束,旧的生活和信仰已经崩塌,新的还没有建立起来,我和其他年轻人一样,心中一片迷茫。这两本书第一次激活了我想象力,思想豁然开阔许多,有小溪流进大海的感觉。读完《2001:A Space Odyssey》的那天深夜,我走出家门仰望星空,那时的中国的天空还没有太多的污染,能够看到银河,在我的眼中,星空与过去完全不一样了,我第一次对宇宙的宏大与神秘产生了敬畏感,这是一种宗教般的感觉。而后来读到的《Rendezvous With Rama》,也让我惊叹如何可以用想象力构造一个栩栩如生的想象世界。正是Clarke带给我的这些感受,让我后来成为一名科幻作家。
|
|
||||||
|
|
||||||
现在,三十多年过去了,我渐渐发现,我们这一代在上世纪六十年代出生于中国的人,很可能是人类历史上最幸运的人,因为之前没有任何一代人,像我们这样目睹周围的世界发生了如此巨大的变化,我们现在生活的世界,与我们童年的世界已经完全是两个不同的世界,而这种变化还在加速发生着。中国是一个充满着未来感的国度,中国的未来可能充满着挑战和危机,但从来没有像现在这样具有吸引力,这就给科幻小说提供了肥沃的土壤,使其在中国受到了空前的关注,作为一个在六十年代出生在中国的科幻小说家,则是幸运中的幸运。
|
|
||||||
|
|
||||||
我期待有那么一天,像那些曾经描写过信息时代的科幻小说一样,描写太空航行的科幻小说也变的平淡无奇了,那时的火星和小行星带都是乏味的地方,有无数的人在那里谋生;木星和它众多的卫星已成为旅游胜地,阻止人们去那里的唯一障碍就是昂贵的价格。
|
|
||||||
|
|
||||||
但即使在这个时候,宇宙仍是一个大的无法想象的存在,距我们最近的恒星仍然遥不可及。浩瀚的星空永远能够承载我们无穷的想象力。
|
|
||||||
|
|
||||||
谢谢大家。
|
|
||||||
|
|
||||||
|
|
||||||
> [点击阅读全文](https://weread.qq.com/web/reader/ce032b305a9bc1ce0b0dd2akecc32f3013eccbc87e4b62e)
|
|
@ -1,86 +0,0 @@
|
|||||||
---
|
|
||||||
title: "自定义短语示例"
|
|
||||||
description: "将常用的块引用、标签卡、按钮等信息设置成短代码,便于快速引用"
|
|
||||||
keywords: "shortcode,短代码"
|
|
||||||
|
|
||||||
date: 2022-08-06T14:41:50+08:00
|
|
||||||
lastmod: 2022-08-06T14:41:50+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- 短代码
|
|
||||||
- 语法
|
|
||||||
url: "post/shortcodes.html"
|
|
||||||
---
|
|
||||||
|
|
||||||
虽然 `Markdown` 语法已经非常丰富能够满足我们写文章的绝大部分需求,但是为更好的对文章内容进行更友好的排版,为引设计一套自定义的短语,便于在使用时能够快速引用。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
## 块引用
|
|
||||||
|
|
||||||
在引用一些经典名言名句时,可以采用此短语,语法参考如下:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
{{</* quote */>}}
|
|
||||||
### block quote
|
|
||||||
写下你想表达的话语!
|
|
||||||
{{</* /quote */>}}
|
|
||||||
```
|
|
||||||
|
|
||||||
实际效果:
|
|
||||||
|
|
||||||
{{< quote >}}
|
|
||||||
|
|
||||||
希望是无所谓有,无所谓无的,这正如地上的路。
|
|
||||||
|
|
||||||
|
|
||||||
其实地上本没有路,走的人多了,也便成了路。
|
|
||||||
|
|
||||||
**鲁迅**
|
|
||||||
|
|
||||||
{{< /quote >}}
|
|
||||||
|
|
||||||
## 信息块
|
|
||||||
|
|
||||||
支持 `default`,`info`,`success`,`warning`,`danger` 等五种不同效果的展示,语法参考如下:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
{{</* note [class] [no-icon] */>}}
|
|
||||||
书写表达的信息
|
|
||||||
支持 Markdown 语法
|
|
||||||
{{</* /note */>}}
|
|
||||||
```
|
|
||||||
|
|
||||||
实际效果:
|
|
||||||
|
|
||||||
{{< note default no-icon >}}
|
|
||||||
### Default Header without icon
|
|
||||||
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
{{< note default >}}
|
|
||||||
### Default Header
|
|
||||||
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
{{< note info >}}
|
|
||||||
### Info Header
|
|
||||||
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
{{< note success >}}
|
|
||||||
### Success Header
|
|
||||||
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
{{< note warning >}}
|
|
||||||
### Warning Header
|
|
||||||
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
{{< note danger >}}
|
|
||||||
### Danger Header
|
|
||||||
**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org)
|
|
||||||
{{< /note >}}
|
|
@ -1,146 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Hugo 内置的 Chroma 语法高亮"
|
|
||||||
description: "描述下 Chroma 所支持的各种语法及高亮效果展示"
|
|
||||||
keywords: "Chroma,语法,高亮"
|
|
||||||
|
|
||||||
date: 2022-06-07T19:09:52+08:00
|
|
||||||
lastmod: 2022-06-07T19:09:52+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- 语法
|
|
||||||
- 高亮
|
|
||||||
- Chroma
|
|
||||||
|
|
||||||
url: post/syntax-highlighting.html
|
|
||||||
---
|
|
||||||
|
|
||||||
Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用 Chroma 作为代码块高亮支持,它内置在 Go 语言当中,速度是真的非常、非常快,而且最为重要的是它也兼容之前我们使用的 Pygments 方式。
|
|
||||||
|
|
||||||
以下通过 Hugo 内置短代码 `highlight` 和 `Markdown` 代码块方式分别验证不同语言的代码块渲染效果并能正确高亮显示,有关优化语法突出显示的更多信息,请参阅 [Hugo 文档](https://gohugo.io/getting-started/configuration-markup#highlight)。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
## 编程语言
|
|
||||||
|
|
||||||
### GO
|
|
||||||
|
|
||||||
{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
|
|
||||||
|
|
||||||
func GetTitleFunc(style string) func(s string) string {
|
|
||||||
switch strings.ToLower(style) {
|
|
||||||
case "go":
|
|
||||||
return strings.Title
|
|
||||||
case "chicago":
|
|
||||||
return transform.NewTitleConverter(transform.ChicagoStyle)
|
|
||||||
default:
|
|
||||||
return transform.NewTitleConverter(transform.APStyle)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{{< / highlight >}}
|
|
||||||
|
|
||||||
### Java
|
|
||||||
|
|
||||||
```java
|
|
||||||
import javax.swing.JFrame; //Importing class JFrame
|
|
||||||
import javax.swing.JLabel; //Importing class JLabel
|
|
||||||
public class HelloWorld {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
JFrame frame = new JFrame(); //Creating frame
|
|
||||||
frame.setTitle("Hi!"); //Setting title frame
|
|
||||||
frame.add(new JLabel("Hello, world!"));//Adding text to frame
|
|
||||||
frame.pack(); //Setting size to smallest
|
|
||||||
frame.setLocationRelativeTo(null); //Centering frame
|
|
||||||
frame.setVisible(true); //Showing frame
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Python
|
|
||||||
|
|
||||||
``` python
|
|
||||||
print "Hello, world!"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Git 对比
|
|
||||||
|
|
||||||
``` diff {hl_lines=[4,"6-7"], linenos=true}
|
|
||||||
*** /path/to/original ''timestamp''
|
|
||||||
--- /path/to/new ''timestamp''
|
|
||||||
***************
|
|
||||||
*** 1 ****
|
|
||||||
! This is a line.
|
|
||||||
--- 1 ---
|
|
||||||
! This is a replacement line.
|
|
||||||
It is important to spell
|
|
||||||
-removed line
|
|
||||||
+new line
|
|
||||||
```
|
|
||||||
|
|
||||||
```diff {hl_lines=[4,"6-7"], linenos=false}
|
|
||||||
*** /path/to/original ''timestamp''
|
|
||||||
--- /path/to/new ''timestamp''
|
|
||||||
***************
|
|
||||||
*** 1 ****
|
|
||||||
! This is a line.
|
|
||||||
--- 1 ---
|
|
||||||
! This is a replacement line.
|
|
||||||
It is important to spell
|
|
||||||
-removed line
|
|
||||||
+new line
|
|
||||||
```
|
|
||||||
|
|
||||||
## 文件
|
|
||||||
|
|
||||||
### Make 文件
|
|
||||||
|
|
||||||
``` makefile {linenos=false}
|
|
||||||
CC=gcc
|
|
||||||
CFLAGS=-I.
|
|
||||||
|
|
||||||
hellomake: hellomake.o hellofunc.o
|
|
||||||
$(CC) -o hellomake hellomake.o hellofunc.o -I.
|
|
||||||
```
|
|
||||||
|
|
||||||
### Markdown 文档
|
|
||||||
|
|
||||||
``` markdown
|
|
||||||
**bold**
|
|
||||||
*italics*
|
|
||||||
[link](www.example.com)
|
|
||||||
```
|
|
||||||
|
|
||||||
## 数据内容
|
|
||||||
|
|
||||||
### JSON 数据
|
|
||||||
|
|
||||||
``` json
|
|
||||||
{"employees":[
|
|
||||||
{"firstName":"John", "lastName":"Doe"},
|
|
||||||
]}
|
|
||||||
```
|
|
||||||
|
|
||||||
### XML 内容
|
|
||||||
|
|
||||||
``` xml
|
|
||||||
<employees>
|
|
||||||
<employee>
|
|
||||||
<firstName>John</firstName> <lastName>Doe</lastName>
|
|
||||||
</employee>
|
|
||||||
</employees>
|
|
||||||
```
|
|
||||||
|
|
||||||
### SQL 查询
|
|
||||||
|
|
||||||
{{< highlight sql >}}
|
|
||||||
|
|
||||||
SELECT column_name,column_name
|
|
||||||
FROM
|
|
||||||
Table
|
|
||||||
WHERE column_name = "condition"
|
|
||||||
{{< / highlight >}}
|
|
||||||
|
|
||||||
|
|
||||||
除以上列举的代码高亮显示外,还支持诸如:C 语言、C++、HTML、CSS、Shell脚本等各主流的代码语言高亮显示,可自行测试效果。
|
|
@ -1,70 +0,0 @@
|
|||||||
---
|
|
||||||
title: "文章目录导航"
|
|
||||||
description: "描述下 NexT 主题下的文章目录导航效果。"
|
|
||||||
keywords: "文章,目录,导航"
|
|
||||||
|
|
||||||
date: 2022-06-08T21:12:52+08:00
|
|
||||||
lastmod: 2022-06-08T21:12:52+08:00
|
|
||||||
|
|
||||||
categories:
|
|
||||||
- 示例
|
|
||||||
tags:
|
|
||||||
- 目录
|
|
||||||
- 导航
|
|
||||||
- 博客
|
|
||||||
|
|
||||||
toc: true
|
|
||||||
url: post/table-of-content.html
|
|
||||||
---
|
|
||||||
|
|
||||||
巴顿将军说过:“衡量一个人是否成功,不是看他站到顶峰,而是从顶峰跌落之后的反弹力”,褚时健的人生便是如此,中年发家致富,名利双收,之后又跌落到谷底,等到74岁再创业,10年后带着褚橙归来,东山再起收获亿万财富,他的发展轨迹就是反弹的过程。
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 早年的故事
|
|
||||||
|
|
||||||
### 起始
|
|
||||||
|
|
||||||
2014年的春天,在云南省华宁县和宜良县的交界处,一座名叫矣则的小山村里,一处已经有上百年历史的古旧四合院宅子被拆掉。村委会正带领村民们进行“美丽乡村”的建设,一年以后,旧有村居将再也看不到,代之而起的是钢筋混凝土的新式民居。就像10年、20年前中国大小城市的改造一样,这个群山围绕的小村子也开始陷入“工地模式”。
|
|
||||||
|
|
||||||
#### 童年浪花
|
|
||||||
|
|
||||||
在江河边长大的孩子几乎都有一个当仁不让的特长:善水。褚时健也不例外,他不仅从小就在南盘江和花鱼塘里扑腾出了上佳的游泳技术,五六岁已经可以一个猛子扎出老远,而且从七八岁就可以在南盘江和河滩上的鱼塘里捉鱼了。
|
|
||||||
|
|
||||||
### 少年故事
|
|
||||||
|
|
||||||
褚时健在乡村自由自在生活的十多年,其实正是中国社会风雨飘摇的十多年。特别是1937年卢沟桥事变后,日本人发动全面侵华战争,短短两三年间,中国的大部分国土相继沦陷
|
|
||||||
|
|
||||||
## 激情的青春十年
|
|
||||||
|
|
||||||
### 当上了游击队员
|
|
||||||
|
|
||||||
1948年夏天,褚时健回乡,在禄丰车站小学做了一名老师,同时也和褚时仁、褚时杰一起继续保持与共产党组织的联系,做一些传递情报的工作
|
|
||||||
|
|
||||||
#### 战火纷飞
|
|
||||||
|
|
||||||
因为战斗力相较悬殊,所以游击队只能是靠打一枪换一个地方的办法,专找敌人薄弱的地方攻击,但更多时候,都是在防御和转移阵地。
|
|
||||||
|
|
||||||
### 迎来解放
|
|
||||||
|
|
||||||
1949年12月,国民党云南省主席卢汉在昆明宣布起义,云南正式拉开解放的序幕。1950年2月20日,陈赓、宋任穷、周保中率解放军第二野战军第四兵团进入昆明,24日,陈赓宣布云南全境解放。
|
|
||||||
|
|
||||||
## 生活的断层
|
|
||||||
|
|
||||||
### 跌入生活底层
|
|
||||||
|
|
||||||
“反右”运动中被打倒的人在“右派”身份确定后,只有一条路可走:下放到农场。农场名副其实,就是干农活儿的地方,必须过和农民一样的生活。
|
|
||||||
|
|
||||||
## 尾声
|
|
||||||
|
|
||||||
### 岁月像一条河
|
|
||||||
|
|
||||||
2015年,是褚时健和马静芬结婚60周年,被称为“钻石婚”的纪念年份。这简直是一份人生的奖赏,在中国离婚率愈益升高的当下,60年的婚姻,几乎就像一个前世之梦。一个甲子的相伴相随,褚时健和马静芬共同经历了国家和个人的各种风浪,共同面对过生死。他们两人已经不仅是夫妻,更是一对战友。尽管马静芬偶尔会对褚时健年轻时候的粗心抱怨上两句,但说到最后,她会说一句:“没有我就没有他,没有他也就没有我。”
|
|
||||||
|
|
||||||
## 作者致谢
|
|
||||||
|
|
||||||
这本书从2014年初夏开始采访,到今天完稿,历时18个月。封面上“作者”只能是我一个人的名字,但也只有我自己知道,这本书,包含了太多人的心力和体力。我当然首先要致谢王石先生,没有他就没有这本书。我自己细想下来,没有王石先生一直的鞭策和鼓励,也没有我写作工作的今天。从2006年我开始从事专业写作工作以来,他给我创造了很多写作的机会,并且不吝自己诸多人生和学习的体会和感悟,一一传递予我。知遇之恩,感谢非常。
|
|
||||||
|
|
||||||
最后,我当然要把最大的感谢致予褚时健先生。不仅是因为他慷慨、坦率面对我的各种提问,更重要的是,在倾听他的故事的过程里,他繁盛的人生经历,他的强大生命力,他对生活、对事业的一片赤子之心,也丰富了我对自己人生的思考。
|
|
@ -1,29 +0,0 @@
|
|||||||
# 友情链接
|
|
||||||
# Friend's links
|
|
||||||
|
|
||||||
- FLinksTitle: 官方示例
|
|
||||||
FLinksDesc: 来自主题官方的示例内容。
|
|
||||||
FLinksList:
|
|
||||||
- name: Hugo
|
|
||||||
desc: 世界上最快的网站建设框架!
|
|
||||||
avatar: https://gohugo.io/favicon-32x32.png
|
|
||||||
link: https://gohugo.io
|
|
||||||
|
|
||||||
- name: Hugo-NexT
|
|
||||||
desc: Hugo NexT 官方预览网站。
|
|
||||||
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
|
|
||||||
link: https://hugo-next.eu.org
|
|
||||||
|
|
||||||
- name: 凡梦星尘空间站
|
|
||||||
desc: 再平凡的人也有属于他的梦想!
|
|
||||||
avatar: https://lisenhui.cn/imgs/avatar.png
|
|
||||||
link: https://lisenhui.cn
|
|
||||||
|
|
||||||
|
|
||||||
- FLinksTitle: Hugo NexT 粉丝群体
|
|
||||||
FLinksDesc: 来自 Hugo NexT 主题爱好者们的精彩呈现!
|
|
||||||
FLinksList:
|
|
||||||
- name: 阿哈吉
|
|
||||||
desc: 全网首个 Hugo NexT 忠实粉丝用户
|
|
||||||
avatar: https://a.happy2008.top/imgs/stayhome-small.png
|
|
||||||
link: https://a.happy2008.top/
|
|
@ -1,3 +0,0 @@
|
|||||||
<div class="custom-footer">
|
|
||||||
Website source code <a href="https://github.com/hugo-next/hugo-theme-next/blob/develop/exampleSite/layouts/partials/custom_footer.html" target="_blank">here</a>
|
|
||||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||||||
<div class="mydefined animated" itemprop="custom">
|
|
||||||
<span>支持自定义CSS和Sidebar布局啦💄💄💄</span>
|
|
||||||
</div>
|
|
@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# 本地快速启动脚本
|
|
||||||
# Quick start in local.
|
|
||||||
|
|
||||||
next() {
|
|
||||||
cat << EOT
|
|
||||||
========================================
|
|
||||||
███╗ ██╗███████╗██╗ ██╗████████╗
|
|
||||||
████╗ ██║██╔════╝╚██╗██╔╝╚══██╔══╝
|
|
||||||
██╔██╗ ██║█████╗ ╚███╔╝ ██║
|
|
||||||
██║╚██╗██║██╔══╝ ██╔██╗ ██║
|
|
||||||
██║ ╚████║███████╗██╔╝ ██╗ ██║
|
|
||||||
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝
|
|
||||||
========================================
|
|
||||||
Hugo NexT version $1
|
|
||||||
Documentation: https://hugo-next.eu.org
|
|
||||||
========================================
|
|
||||||
EOT
|
|
||||||
}
|
|
||||||
|
|
||||||
next `cat ../VERSION`
|
|
||||||
|
|
||||||
hugo server -t ../.. --port 1414 --panicOnWarning --config config.yaml
|
|
@ -1,16 +0,0 @@
|
|||||||
/** Custom style defined file **/
|
|
||||||
|
|
||||||
.mydefined {
|
|
||||||
font-size: 0.65em;
|
|
||||||
color: #ed6c24;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-footer {
|
|
||||||
color: #ed6c24;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-head5 {
|
|
||||||
font-size: 1.2em;
|
|
||||||
color: #ed6c24;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 14 KiB |
1
hugo-theme-next.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package hugothemenext
|
151
i18n/en-us.yaml
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
#--------------------------------------
|
||||||
|
# English Version
|
||||||
|
#--------------------------------------
|
||||||
|
archives:
|
||||||
|
other: Posts
|
||||||
|
tag:
|
||||||
|
other: Tag
|
||||||
|
tags:
|
||||||
|
other: Tags
|
||||||
|
TagTitle:
|
||||||
|
other: Tag Collection
|
||||||
|
category:
|
||||||
|
other: Category
|
||||||
|
categories:
|
||||||
|
other: Categories
|
||||||
|
CateTitle:
|
||||||
|
other: Classification Items
|
||||||
|
AllSome:
|
||||||
|
other: "All {{ .Some }}"
|
||||||
|
|
||||||
|
|
||||||
|
Symbol:
|
||||||
|
colon: ":"
|
||||||
|
comma: ","
|
||||||
|
period: "."
|
||||||
|
|
||||||
|
Sidebar:
|
||||||
|
label:
|
||||||
|
posts: Posts
|
||||||
|
categories: Categories
|
||||||
|
tags: Tags
|
||||||
|
rss: RSS
|
||||||
|
ccommons: "Creative Commons"
|
||||||
|
toc: TOC
|
||||||
|
overview: Overview
|
||||||
|
navToggle: "Toggle Navigation Bar"
|
||||||
|
search: Search
|
||||||
|
|
||||||
|
Terms:
|
||||||
|
archives: "{{ .Count }} posts in total"
|
||||||
|
categories: "{{ .Count }} categories in total"
|
||||||
|
tags: "{{ .Count }} tags in total"
|
||||||
|
|
||||||
|
PostArchive:
|
||||||
|
cheers:
|
||||||
|
um: Um...
|
||||||
|
ok: Ok
|
||||||
|
nice: Nice
|
||||||
|
good: Good
|
||||||
|
great: Greate
|
||||||
|
excellent: Excellent
|
||||||
|
keepOn: Keep on posting.╰(*°▽°*)╯
|
||||||
|
|
||||||
|
PostMeta:
|
||||||
|
sticky: Stickys
|
||||||
|
publish:
|
||||||
|
date: "Publish on"
|
||||||
|
time: "Create Time"
|
||||||
|
lastmod:
|
||||||
|
date: "Update on"
|
||||||
|
time: "Modify Time"
|
||||||
|
category: "Classify at"
|
||||||
|
words:
|
||||||
|
title: Words
|
||||||
|
count: "{{- .WordCount -}}"
|
||||||
|
reading:
|
||||||
|
title: Read
|
||||||
|
time: "{{- .ReadingTime -}}mins"
|
||||||
|
views: Views
|
||||||
|
comments: Comments
|
||||||
|
tags: Tags
|
||||||
|
more: "Read More"
|
||||||
|
edit: "Edit this post"
|
||||||
|
expired:
|
||||||
|
title: "Note"
|
||||||
|
info: "🕰️ Hey,This article is an aged wine of over # the information may need updating, please check the best before date before reading."
|
||||||
|
warn: "🚀 Heads up! This article is from # ago and might not keep up with the pace of time. Bring your own time machine for reading, watch out for the time travel!"
|
||||||
|
summary:
|
||||||
|
title: Summary
|
||||||
|
|
||||||
|
PostAlert:
|
||||||
|
info : "Info"
|
||||||
|
note : "Note"
|
||||||
|
help : "Help"
|
||||||
|
error : "Error"
|
||||||
|
warning : "Warning"
|
||||||
|
success : "Success"
|
||||||
|
important: "Important"
|
||||||
|
|
||||||
|
PostCopyRight:
|
||||||
|
title: Post Title
|
||||||
|
author: Post Author
|
||||||
|
link: Post Link
|
||||||
|
origin:
|
||||||
|
author: Written By
|
||||||
|
link: Originally From
|
||||||
|
license:
|
||||||
|
title: Copyright Notice
|
||||||
|
content: "All articles in this blog are licensed under <i class=\"fab fa-fw fa-creative-commons\"></i>%s unless stating additionally."
|
||||||
|
|
||||||
|
PostFollowMe:
|
||||||
|
other: Welcome to my other publishing channels
|
||||||
|
|
||||||
|
PostComments:
|
||||||
|
title: Comments
|
||||||
|
|
||||||
|
Reward:
|
||||||
|
title: Donate
|
||||||
|
wechatpay: WechatPay
|
||||||
|
alipay: Alipay
|
||||||
|
paypal: Paypal
|
||||||
|
bitcoin: Bitcoin
|
||||||
|
|
||||||
|
SiteInfoItems:
|
||||||
|
title: "Web Status"
|
||||||
|
runTimes: "Running:"
|
||||||
|
words: "Words:"
|
||||||
|
readTimes: "ReadTime:"
|
||||||
|
visitors: "Visitors:"
|
||||||
|
pageViews: "Views:"
|
||||||
|
todayViews: "Today Views:"
|
||||||
|
yesterdayViews: "Yesterday Views:"
|
||||||
|
monthViews: "Month Views:"
|
||||||
|
totalViews: "Total Views"
|
||||||
|
lastUpdate: "Last Update:"
|
||||||
|
|
||||||
|
Footer:
|
||||||
|
powerby: "Power by %s"
|
||||||
|
|
||||||
|
Search:
|
||||||
|
placeholder: Searching...
|
||||||
|
empty: "We didn't find any results for the search: ${query}"
|
||||||
|
hits: "${hits} results found"
|
||||||
|
time: "${hits} results found in ${time} ms"
|
||||||
|
|
||||||
|
DateSuffix:
|
||||||
|
years: " Year "
|
||||||
|
days: " Day "
|
||||||
|
hours: " Hour "
|
||||||
|
mins: " Min"
|
||||||
|
month: " Month Ago"
|
||||||
|
day: " Day Ago"
|
||||||
|
hour: " Hour Ago"
|
||||||
|
min: " Min Ago"
|
||||||
|
just: "Just"
|
||||||
|
|
||||||
|
ToolBtns:
|
||||||
|
comment: "Go to Comment"
|
||||||
|
theme: "Change Theme"
|
||||||
|
lang: "Multilingual translation"
|
||||||
|
backTop: "Back to Top"
|
177
i18n/en.yaml
@ -1,177 +0,0 @@
|
|||||||
#--------------------------------------
|
|
||||||
# English Version
|
|
||||||
#--------------------------------------
|
|
||||||
archives:
|
|
||||||
other: Posts
|
|
||||||
tag:
|
|
||||||
other: Tag
|
|
||||||
tags:
|
|
||||||
other: Tags
|
|
||||||
TagTitle:
|
|
||||||
other: Tag Collection
|
|
||||||
category:
|
|
||||||
other: Category
|
|
||||||
categories:
|
|
||||||
other: Categories
|
|
||||||
CateTitle:
|
|
||||||
other: Classification Items
|
|
||||||
AllSome:
|
|
||||||
other: "All {{ .Some }}"
|
|
||||||
|
|
||||||
NavToggleLabel:
|
|
||||||
other: Toggle navigation bar
|
|
||||||
|
|
||||||
MSearchLabel:
|
|
||||||
other: Search
|
|
||||||
|
|
||||||
SymbolColon:
|
|
||||||
other: ":"
|
|
||||||
SymbolComma:
|
|
||||||
other: ","
|
|
||||||
SymbolPeriod:
|
|
||||||
other: "."
|
|
||||||
|
|
||||||
SbPostsLable:
|
|
||||||
other: "Posts"
|
|
||||||
SbCatesTitle:
|
|
||||||
other: "Categories"
|
|
||||||
SbTagsTitle:
|
|
||||||
other: "Tags"
|
|
||||||
TableOfContents:
|
|
||||||
other: "TOC"
|
|
||||||
SiteOverview:
|
|
||||||
other: "Overview"
|
|
||||||
RSSLable:
|
|
||||||
other: "RSS Subscribe"
|
|
||||||
CCLinkTitle:
|
|
||||||
other: "Creative Commons"
|
|
||||||
|
|
||||||
TagsCounterTitle:
|
|
||||||
zero: No tags
|
|
||||||
other: "{{ .Count }} tags in total"
|
|
||||||
CatesCounterTitle:
|
|
||||||
zero: No categories
|
|
||||||
other: "{{ .Count }} categories in total"
|
|
||||||
ArchiveCounterTitle:
|
|
||||||
zero: No posts.
|
|
||||||
other: "{{ .Count }} posts in total"
|
|
||||||
|
|
||||||
PostArchiveCheersUm:
|
|
||||||
other: Um..
|
|
||||||
PostArchiveCheersOk:
|
|
||||||
other: Ok
|
|
||||||
PostArchiveCheersNice:
|
|
||||||
other: Nice
|
|
||||||
PostArchiveCheersGood:
|
|
||||||
other: Good
|
|
||||||
PostArchiveCheersGreat:
|
|
||||||
other: Great
|
|
||||||
PostArchiveCheersExcellent:
|
|
||||||
other: Excellent
|
|
||||||
PostArchiveKeepOn:
|
|
||||||
other: Keep on posting.╰(*°▽°*)╯
|
|
||||||
|
|
||||||
PostStickyTitle:
|
|
||||||
other: Strickys
|
|
||||||
PostPublishDate:
|
|
||||||
other: "Publish on"
|
|
||||||
PostPublishTime:
|
|
||||||
other: "Create Time"
|
|
||||||
PostLastModDate:
|
|
||||||
other: "Update on"
|
|
||||||
PostLastModTime:
|
|
||||||
other: "Modify Time"
|
|
||||||
PostCategory:
|
|
||||||
other: "Classify at"
|
|
||||||
PostWords:
|
|
||||||
other: "Words"
|
|
||||||
PostWordCount:
|
|
||||||
other: "{{- .WordCount -}}"
|
|
||||||
PostReading:
|
|
||||||
other: "Read"
|
|
||||||
PostReadTime:
|
|
||||||
other: "{{- .ReadingTime -}}min"
|
|
||||||
PostViews:
|
|
||||||
other: "Views"
|
|
||||||
PostComments:
|
|
||||||
other: "Comments"
|
|
||||||
PostTag:
|
|
||||||
other: "Tags"
|
|
||||||
PostReadMore:
|
|
||||||
other: "Read More"
|
|
||||||
PostEditTitle:
|
|
||||||
other: Edit this post
|
|
||||||
|
|
||||||
PostCRTitle:
|
|
||||||
other: Post Title
|
|
||||||
PostCRAuthor:
|
|
||||||
other: Post Author
|
|
||||||
PostCRLink:
|
|
||||||
other: Post Link
|
|
||||||
PostCROriginAuthor:
|
|
||||||
other: Written By
|
|
||||||
PostCROriginLink:
|
|
||||||
other: Originally From
|
|
||||||
PostCRLicenseTitle:
|
|
||||||
other: Copyright Notice
|
|
||||||
PostCRLicenseContent:
|
|
||||||
other: "All articles in this blog are licensed under <i class=\"fab fa-fw fa-creative-commons\"></i>%s unless stating additionally."
|
|
||||||
|
|
||||||
PostFollowMe:
|
|
||||||
other: Welcome to my other publishing channels
|
|
||||||
|
|
||||||
RewardDonate:
|
|
||||||
other: Donate
|
|
||||||
RewardWechatpay:
|
|
||||||
other: Wechat Pay
|
|
||||||
RewardAlipay:
|
|
||||||
other: Alipay
|
|
||||||
RewardPaypal:
|
|
||||||
other: PayPal
|
|
||||||
RewardBitcoin:
|
|
||||||
other: Bitcoin
|
|
||||||
|
|
||||||
PostCommentTitle:
|
|
||||||
other: Comments
|
|
||||||
|
|
||||||
SiteInfoItems:
|
|
||||||
title: "Web Status"
|
|
||||||
runTimes: "Running:"
|
|
||||||
words: "Words:"
|
|
||||||
readTimes: "ReadTime:"
|
|
||||||
visitors: "Visitors:"
|
|
||||||
pageViews: "Views:"
|
|
||||||
todayViews: "Today Views:"
|
|
||||||
yesterdayViews: "Yesterday Views:"
|
|
||||||
monthViews: "Month Views:"
|
|
||||||
totalViews: "Total Views"
|
|
||||||
lastUpdate: "Last Update:"
|
|
||||||
|
|
||||||
FooterPowerby:
|
|
||||||
other: "Power by %s"
|
|
||||||
|
|
||||||
SearchPh:
|
|
||||||
other: Searching...
|
|
||||||
SearchEmpty:
|
|
||||||
other: "We didn't find any results for the search: ${query}"
|
|
||||||
SearchHits:
|
|
||||||
hits: "${hits} results found"
|
|
||||||
SearchHitsTime:
|
|
||||||
other: "${hits} results found in ${time} ms"
|
|
||||||
|
|
||||||
DateSuffix:
|
|
||||||
years: " Year "
|
|
||||||
days: " Day "
|
|
||||||
hours: " Hour "
|
|
||||||
mins: " Min"
|
|
||||||
month: " Month Ago"
|
|
||||||
day: " Day Ago"
|
|
||||||
hour: " Hour Ago"
|
|
||||||
min: " Min Ago"
|
|
||||||
just: "Just"
|
|
||||||
|
|
||||||
ToolBtns:
|
|
||||||
comment: "Go to Comment"
|
|
||||||
theme: "Change Theme"
|
|
||||||
lang: "Multilingual translation"
|
|
||||||
backTop: "Back to Top"
|
|
150
i18n/fr-fr.yaml
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
#--------------------------------------
|
||||||
|
# French Version
|
||||||
|
#--------------------------------------
|
||||||
|
archives:
|
||||||
|
other: Billets
|
||||||
|
tag:
|
||||||
|
other: Tag
|
||||||
|
tags:
|
||||||
|
other: Tags
|
||||||
|
TagTitle:
|
||||||
|
other: Liste des Tags
|
||||||
|
category:
|
||||||
|
other: Categorie
|
||||||
|
categories:
|
||||||
|
other: Categories
|
||||||
|
CateTitle:
|
||||||
|
other: Classification des items
|
||||||
|
AllSome:
|
||||||
|
other: "Total :{{ .Some }}"
|
||||||
|
|
||||||
|
Symbol:
|
||||||
|
colon: ":"
|
||||||
|
comma: ","
|
||||||
|
period: "."
|
||||||
|
|
||||||
|
Sidebar:
|
||||||
|
label:
|
||||||
|
posts: Billets
|
||||||
|
categories: Categories
|
||||||
|
tags: Tags
|
||||||
|
rss: RSS
|
||||||
|
ccommons: "Creative Commons"
|
||||||
|
toc: Sommaire
|
||||||
|
overview: "Présentation"
|
||||||
|
navToggle: "Fermer/Ouvrire la bar de navigation"
|
||||||
|
search: Chercher
|
||||||
|
|
||||||
|
Terms:
|
||||||
|
archives: "{{ .Count }} Billets au total"
|
||||||
|
categories: "{{ .Count }} Categories au total"
|
||||||
|
tags: "{{ .Count }} Tags au total"
|
||||||
|
|
||||||
|
PostArchive:
|
||||||
|
cheers:
|
||||||
|
um: Hum...
|
||||||
|
ok: Ok
|
||||||
|
nice: Cool
|
||||||
|
good: Bien
|
||||||
|
great: Génial
|
||||||
|
excellent: Excellent
|
||||||
|
keepOn: Continue de publier.╰(*°▽°*)╯
|
||||||
|
|
||||||
|
PostMeta:
|
||||||
|
sticky: Stickys
|
||||||
|
publish:
|
||||||
|
date: "Publié le "
|
||||||
|
time: "Date de création"
|
||||||
|
lastmod:
|
||||||
|
date: "Mise à jour le "
|
||||||
|
time: "Modifié le "
|
||||||
|
category: "Classé comme "
|
||||||
|
words:
|
||||||
|
title: Nb. Mots
|
||||||
|
count: "{{- .WordCount -}}"
|
||||||
|
reading:
|
||||||
|
title: "Lectures "
|
||||||
|
time: "{{- .ReadingTime -}} mins"
|
||||||
|
views: Vues
|
||||||
|
comments: Commentaires
|
||||||
|
tags: Tags
|
||||||
|
more: "Lire la suite"
|
||||||
|
edit: "Editer ce billet"
|
||||||
|
expired:
|
||||||
|
title: "Astuce bienveillante"
|
||||||
|
info: "🕰️ Hey,This article is an aged wine of over # the information may need updating, please check the best before date before reading."
|
||||||
|
warn: "🚀 Heads up! this article is from # ago and might not keep up with the pace of time. Bring your own time machine for reading, watch out for the time travel!"
|
||||||
|
summary:
|
||||||
|
title: Summary
|
||||||
|
|
||||||
|
PostAlert:
|
||||||
|
info : "Info"
|
||||||
|
note : "Note"
|
||||||
|
help : "Aide"
|
||||||
|
error : "Erreur"
|
||||||
|
warning : "Avertissement"
|
||||||
|
success : "Succès"
|
||||||
|
important: "Inportant"
|
||||||
|
|
||||||
|
PostCopyRight:
|
||||||
|
title: Titre du billet
|
||||||
|
author: Autheur du billet
|
||||||
|
link: Lien du billet
|
||||||
|
origin:
|
||||||
|
author: Écrit par
|
||||||
|
link: Originellement de
|
||||||
|
license:
|
||||||
|
title: Note de Copyright
|
||||||
|
content: "Tous les articles sont sous licence <i class=\"fab fa-fw fa-creative-commons\"></i>%s."
|
||||||
|
|
||||||
|
PostFollowMe:
|
||||||
|
other: "Autres réseaux sociaux"
|
||||||
|
|
||||||
|
PostComments:
|
||||||
|
title: Commentaires
|
||||||
|
|
||||||
|
Reward:
|
||||||
|
title: Donner
|
||||||
|
wechatpay: WechatPay
|
||||||
|
alipay: Alipay
|
||||||
|
paypal: Paypal
|
||||||
|
bitcoin: Bitcoin
|
||||||
|
|
||||||
|
SiteInfoItems:
|
||||||
|
title: "Statistiques"
|
||||||
|
runTimes: "En cours:"
|
||||||
|
words: "Nb. Mots:"
|
||||||
|
readTimes: "Temps de lecture: "
|
||||||
|
visitors: "Visiteurs: "
|
||||||
|
pageViews: "Vues: "
|
||||||
|
todayViews: "Nombre de vues du jour: "
|
||||||
|
yesterdayViews: "Nombre de vues d'hier: "
|
||||||
|
monthViews: "Vues du mois: "
|
||||||
|
totalViews: "Total des vues: "
|
||||||
|
lastUpdate: "Dernière mise à jour: "
|
||||||
|
|
||||||
|
Footer:
|
||||||
|
powerby: "Fait par %s"
|
||||||
|
|
||||||
|
Search:
|
||||||
|
placeholder: Recherche...
|
||||||
|
empty: "Nous n'avons pas trouvé ce que vous cherchiez pour : ${query}"
|
||||||
|
hits: "${hits} resultats trouvés"
|
||||||
|
time: "${hits} resultats trouvés en ${time} ms"
|
||||||
|
|
||||||
|
DateSuffix:
|
||||||
|
years: " Années"
|
||||||
|
days: " Jours"
|
||||||
|
hours: " Heures"
|
||||||
|
mins: " Minutes"
|
||||||
|
month: " Mois"
|
||||||
|
day: " Jour"
|
||||||
|
hour: " Heur"
|
||||||
|
min: " Minute"
|
||||||
|
just: "A l'instant"
|
||||||
|
|
||||||
|
ToolBtns:
|
||||||
|
comment: "Commenter"
|
||||||
|
theme: "Changer le theme"
|
||||||
|
lang: "Traduction Multilingue"
|
||||||
|
backTop: "Remonter"
|
199
i18n/zh-cn.yaml
@ -19,121 +19,97 @@ CateTitle:
|
|||||||
AllSome:
|
AllSome:
|
||||||
other: "所有 {{ .Some }}"
|
other: "所有 {{ .Some }}"
|
||||||
|
|
||||||
NavToggleLabel:
|
Symbol:
|
||||||
other: 切换导航栏
|
colon: ":"
|
||||||
|
comma: ","
|
||||||
|
period: "。"
|
||||||
|
|
||||||
MSearchLabel:
|
Sidebar:
|
||||||
other: 搜索
|
label:
|
||||||
|
posts: 日志
|
||||||
|
categories: 分类
|
||||||
|
tags: 标签
|
||||||
|
rss: RSS 订阅
|
||||||
|
ccommons: 共享知识
|
||||||
|
toc: 文章目录
|
||||||
|
overview: 站点概览
|
||||||
|
navToggle: 切换导航栏
|
||||||
|
search: 搜索
|
||||||
|
|
||||||
SymbolColon:
|
Terms:
|
||||||
other: ":"
|
archives: "目前共计 <strong>{{ .Count }}</strong> 篇日志"
|
||||||
SymbolComma:
|
categories: "目前共计 <strong>{{ .Count }}</strong> 个分类"
|
||||||
other: ","
|
tags: "目前共计 <strong>{{ .Count }}</strong> 个标签"
|
||||||
SymbolPeriod:
|
|
||||||
other: "。"
|
|
||||||
|
|
||||||
SbPostsLable:
|
|
||||||
other: 日志
|
|
||||||
SbCatesTitle:
|
|
||||||
other: 分类
|
|
||||||
SbTagsTitle:
|
|
||||||
other: 标签
|
|
||||||
TableOfContents:
|
|
||||||
other: 文章目录
|
|
||||||
SiteOverview:
|
|
||||||
other: 站点概览
|
|
||||||
RSSLable:
|
|
||||||
other: RSS 订阅
|
|
||||||
CCLinkTitle:
|
|
||||||
other: 共享知识
|
|
||||||
|
|
||||||
TagsCounterTitle:
|
PostArchive:
|
||||||
zero: 暂无标签
|
cheers:
|
||||||
other: "目前共计 <strong>{{ .Count }}</strong> 个标签"
|
um: 嗯..
|
||||||
CatesCounterTitle:
|
ok: 还行
|
||||||
zero: 暂无分类
|
nice: 不错
|
||||||
other: "目前共计 <strong>{{ .Count }}</strong> 个分类"
|
good: 很好
|
||||||
ArchiveCounterTitle:
|
great: 非常好
|
||||||
zero: 暂无日志
|
excellent: 太棒了
|
||||||
other: "目前共计 <strong>{{ .Count }}</strong> 篇日志"
|
keepOn: 继续努力哟。╰(*°▽°*)╯
|
||||||
|
|
||||||
PostArchiveCheersUm:
|
PostMeta:
|
||||||
other: 嗯..
|
sticky: 置顶
|
||||||
PostArchiveCheersOk:
|
publish:
|
||||||
other: 还行
|
date: 发表于
|
||||||
PostArchiveCheersNice:
|
time: 创建时间
|
||||||
other: 不错
|
lastmod:
|
||||||
PostArchiveCheersGood:
|
date: 更新于
|
||||||
other: 很好
|
time: 修改时间
|
||||||
PostArchiveCheersGreat:
|
category: 分类于
|
||||||
other: 非常好
|
words:
|
||||||
PostArchiveCheersExcellent:
|
title: 字数
|
||||||
other: 太棒了
|
count: "{{- .WordCount -}}"
|
||||||
PostArchiveKeepOn:
|
reading:
|
||||||
other: 继续努力哟。╰(*°▽°*)╯
|
title: 阅读
|
||||||
|
time: "{{- .ReadingTime -}}分钟"
|
||||||
|
views: 浏览
|
||||||
|
comments: 评论
|
||||||
|
tags: 标签
|
||||||
|
more: 阅读全文
|
||||||
|
edit: 编辑
|
||||||
|
expired:
|
||||||
|
title: "温馨提醒"
|
||||||
|
info: "🕰️ 嗨,这篇文章已是#前的陈年佳酿,信息可能需要更新,阅读前请检查最佳赏味期限。"
|
||||||
|
warn: "🚀 注意啦!这篇文章来自#以前,可能已跟不上时代的步伐。阅读时请自备时光机,小心穿越哦!"
|
||||||
|
summary:
|
||||||
|
title: 总结摘要
|
||||||
|
|
||||||
PostStickyTitle:
|
PostAlert:
|
||||||
other: 置顶
|
info : "信息"
|
||||||
PostPublishDate:
|
note : "注意"
|
||||||
other: 发表于
|
help : "帮助"
|
||||||
PostPublishTime:
|
error : "错误"
|
||||||
other: 创建时间
|
warning : "警告"
|
||||||
PostLastModDate:
|
success : "成功"
|
||||||
other: 更新于
|
important: "重要"
|
||||||
PostLastModTime:
|
|
||||||
other: 修改时间
|
|
||||||
PostCategory:
|
|
||||||
other: "分类于"
|
|
||||||
PostWords:
|
|
||||||
other: 字数
|
|
||||||
PostWordCount:
|
|
||||||
other: "{{- .WordCount -}}"
|
|
||||||
PostReading:
|
|
||||||
other: 阅读
|
|
||||||
PostReadTime:
|
|
||||||
other: "{{- .ReadingTime -}}分钟"
|
|
||||||
PostViews:
|
|
||||||
other: 浏览
|
|
||||||
PostComments:
|
|
||||||
other: 评论
|
|
||||||
PostTags:
|
|
||||||
other: 标签
|
|
||||||
PostReadMore:
|
|
||||||
other: 阅读全文
|
|
||||||
PostEditTitle:
|
|
||||||
other: 编辑
|
|
||||||
|
|
||||||
PostCRTitle:
|
PostCopyRight:
|
||||||
other: 文章标题
|
title: 文章标题
|
||||||
PostCRAuthor:
|
author: 本文作者
|
||||||
other: 本文作者
|
link: 本文链接
|
||||||
PostCRLink:
|
origin:
|
||||||
other: 本文链接
|
author: 原文作者
|
||||||
PostCROriginAuthor:
|
link: 原文链接
|
||||||
other: 原文作者
|
license:
|
||||||
PostCROriginLink:
|
title: 版权声明
|
||||||
other: 原文链接
|
content: "本博客所有文章除特别声明外,均采用 <i class=\"fab fa-fw fa-creative-commons\"></i>%s 许可协议。转载请注明出处!"
|
||||||
PostCRLicenseTitle:
|
|
||||||
other: 版权声明
|
|
||||||
PostCRLicenseContent:
|
|
||||||
other: "本博客所有文章除特别声明外,均采用 <i class=\"fab fa-fw fa-creative-commons\"></i>%s 许可协议。转载请注明出处!"
|
|
||||||
|
|
||||||
PostFollowMe:
|
PostFollowMe:
|
||||||
other: 欢迎关注我的其它发布渠道
|
other: 欢迎关注我的其它发布渠道
|
||||||
|
|
||||||
RewardDonate:
|
PostComments:
|
||||||
other: 赞赏
|
title: 评论交流
|
||||||
RewardWechatpay:
|
|
||||||
other: 微信
|
|
||||||
RewardAlipay:
|
|
||||||
other: 支付宝
|
|
||||||
RewardPaypal:
|
|
||||||
other: PayPal
|
|
||||||
RewardBitcoin:
|
|
||||||
other: 比特币
|
|
||||||
|
|
||||||
PostCommentTitle:
|
Reward:
|
||||||
other: 评论交流
|
title: 赞赏
|
||||||
|
wechatpay: 微信
|
||||||
|
alipay: 支付宝
|
||||||
|
paypal: Paypal
|
||||||
|
bitcoin: 比特币
|
||||||
|
|
||||||
SiteInfoItems:
|
SiteInfoItems:
|
||||||
title: "网站资讯"
|
title: "网站资讯"
|
||||||
@ -148,17 +124,14 @@ SiteInfoItems:
|
|||||||
totalViews: "总访问量:"
|
totalViews: "总访问量:"
|
||||||
lastUpdate: "最后更新于:"
|
lastUpdate: "最后更新于:"
|
||||||
|
|
||||||
FooterPowerby:
|
Footer:
|
||||||
other: 由 %s 强力驱动
|
powerby: 由 %s 强力驱动
|
||||||
|
|
||||||
SearchPh:
|
Search:
|
||||||
other: 搜索...
|
placeholder: 搜索...
|
||||||
SearchEmpty:
|
empty: "没有找到任何搜索结果:${query}"
|
||||||
other: "没有找到任何搜索结果:${query}"
|
|
||||||
SearchHits:
|
|
||||||
hits: "找到 ${hits} 个搜索结果"
|
hits: "找到 ${hits} 个搜索结果"
|
||||||
SearchHitsTime:
|
time: "找到 ${hits} 个搜索结果(用时 ${time} 毫秒)"
|
||||||
other: "找到 ${hits} 个搜索结果(用时 ${time} 毫秒)"
|
|
||||||
|
|
||||||
DateSuffix:
|
DateSuffix:
|
||||||
years: " 年 "
|
years: " 年 "
|
||||||
|
150
i18n/zh-tw.yaml
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
#--------------------------------------
|
||||||
|
# 繁體版本
|
||||||
|
#--------------------------------------
|
||||||
|
|
||||||
|
archives:
|
||||||
|
other: 文章
|
||||||
|
tag:
|
||||||
|
other: 標籤
|
||||||
|
tags:
|
||||||
|
other: 標籤
|
||||||
|
TagTitle:
|
||||||
|
other: 標籤集錦
|
||||||
|
category:
|
||||||
|
other: 分類
|
||||||
|
categories:
|
||||||
|
other: 分類
|
||||||
|
CateTitle:
|
||||||
|
other: 分類欄目
|
||||||
|
AllSome:
|
||||||
|
other: "所有 {{ .Some }}"
|
||||||
|
|
||||||
|
Symbol:
|
||||||
|
colon: ":"
|
||||||
|
comma: ","
|
||||||
|
period: "。"
|
||||||
|
|
||||||
|
Sidebar:
|
||||||
|
label:
|
||||||
|
posts: 日誌
|
||||||
|
categories: 分類
|
||||||
|
tags: 標籤
|
||||||
|
rss: RSS 訂閱
|
||||||
|
ccommons: 共享知識
|
||||||
|
toc: 文章目錄
|
||||||
|
overview: 站點概覽
|
||||||
|
navToggle: 切換導航欄
|
||||||
|
search: 搜索
|
||||||
|
|
||||||
|
Terms:
|
||||||
|
archives: "目前共計 <strong>{{ .Count }}</strong> 篇日誌"
|
||||||
|
categories: "目前共計 <strong>{{ .Count }}</strong> 個分類"
|
||||||
|
tags: "目前共計 <strong>{{ .Count }}</strong> 個標籤"
|
||||||
|
|
||||||
|
PostArchive:
|
||||||
|
cheers:
|
||||||
|
um: 嗯..
|
||||||
|
ok: 還行
|
||||||
|
nice: 不错
|
||||||
|
good: 很好
|
||||||
|
great: 非常好
|
||||||
|
excellent: 太棒了
|
||||||
|
keepOn: 繼續努力喲。╰(*°▽°*)╯
|
||||||
|
|
||||||
|
PostMeta:
|
||||||
|
sticky: 置頂
|
||||||
|
publish:
|
||||||
|
date: 發表於
|
||||||
|
time: 創建時間
|
||||||
|
lastmod:
|
||||||
|
date: 更新於
|
||||||
|
time: 修改時間
|
||||||
|
category: 分類於
|
||||||
|
words:
|
||||||
|
title: 字數
|
||||||
|
count: "{{- .WordCount -}}"
|
||||||
|
reading:
|
||||||
|
title: 閱讀
|
||||||
|
time: "{{- .ReadingTime -}}分鐘"
|
||||||
|
views: 瀏覽
|
||||||
|
comments: 評論
|
||||||
|
tags: 標籤
|
||||||
|
more: 閱讀全文
|
||||||
|
edit: 編輯
|
||||||
|
expired:
|
||||||
|
title: "温馨提醒"
|
||||||
|
info: "🕰️ 嗨,这篇文章已是#前的陳年佳釀,資訊可能需要更新,閱讀前請檢查最佳賞味期限。"
|
||||||
|
warn: "🚀 請注意啦!這篇文章来自#以前,可能已經跟不上時代的腳步了。閱讀時請自備時光機,小心穿越哦!"
|
||||||
|
summary:
|
||||||
|
title: 總結摘要
|
||||||
|
PostAlert:
|
||||||
|
info : "信息 "
|
||||||
|
note : "注意"
|
||||||
|
help : "幫助"
|
||||||
|
error : "錯誤"
|
||||||
|
warning : "警告"
|
||||||
|
success : "成功"
|
||||||
|
important: "重要"
|
||||||
|
|
||||||
|
PostCopyRight:
|
||||||
|
title: 文章標題
|
||||||
|
author: 本文作者
|
||||||
|
link: 本文鏈接
|
||||||
|
origin:
|
||||||
|
author: 原文作者
|
||||||
|
link: 原文鏈接
|
||||||
|
license:
|
||||||
|
title: 版權聲明
|
||||||
|
content: "本博客所有文章除特別聲明外,均採用 <i class=\"fab fa-fw fa-creative-commons\"></i>%s 許可協議。轉載請註明出處!"
|
||||||
|
|
||||||
|
PostFollowMe:
|
||||||
|
other: 歡迎關注我的其它發布渠道
|
||||||
|
|
||||||
|
PostCommentTitle:
|
||||||
|
other: 評論交流
|
||||||
|
|
||||||
|
Reward:
|
||||||
|
title: 讚賞
|
||||||
|
wechatpay: 微信
|
||||||
|
alipay: 支付寶
|
||||||
|
paypal: Paypal
|
||||||
|
bitcoin: 比特幣
|
||||||
|
|
||||||
|
SiteInfoItems:
|
||||||
|
title: "網站資訊"
|
||||||
|
runTimes: "已運行:"
|
||||||
|
words: "總字數:"
|
||||||
|
readTimes: "閱讀約:"
|
||||||
|
visitors: "總訪客數:"
|
||||||
|
pageViews: "頁面瀏覽:"
|
||||||
|
todayViews: "今日訪問:"
|
||||||
|
yesterdayViews: "昨日訪問:"
|
||||||
|
monthViews: "本月訪問:"
|
||||||
|
totalViews: "總訪問量:"
|
||||||
|
lastUpdate: "最後更新於:"
|
||||||
|
|
||||||
|
FooterPowerby:
|
||||||
|
other: 由 %s 強力驅動
|
||||||
|
|
||||||
|
Search:
|
||||||
|
placeholder: 搜索...
|
||||||
|
empty: "沒有找到任何搜索結果:${query}"
|
||||||
|
hits: "找到 ${hits} 個搜索結果"
|
||||||
|
time: "找到 ${hits} 個搜索結果(用時 ${time} 毫秒)"
|
||||||
|
|
||||||
|
DateSuffix:
|
||||||
|
years: " 年 "
|
||||||
|
days: " 天 "
|
||||||
|
hours: " 小時 "
|
||||||
|
mins: " 分鐘"
|
||||||
|
month: " 個月前"
|
||||||
|
day: " 天前"
|
||||||
|
hour: " 小時前"
|
||||||
|
min: " 分鐘前"
|
||||||
|
just: "剛剛"
|
||||||
|
|
||||||
|
ToolBtns:
|
||||||
|
comment: "直達評論"
|
||||||
|
theme: "深淺模式切換"
|
||||||
|
lang: "多語言翻譯"
|
||||||
|
backTop: "返回頂部"
|
BIN
images/avatar.jpeg
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
images/hugo-next-primary.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
images/hugo-next-secondary.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
images/hugo-next-symbol.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
images/use-hugo-next-starter.png
Normal file
After Width: | Height: | Size: 22 KiB |
23
layouts/_default/_markup/render-blockquote.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{{ if eq .Type "alert" }}
|
||||||
|
{{ $postAlert := site.Params.postAlerts }}
|
||||||
|
{{ $alertCfg := index $postAlert .AlertType }}
|
||||||
|
<div class="post-alert-{{ .AlertType }}">
|
||||||
|
<div class="post-alert-title">
|
||||||
|
<i class="fa-solid fa-{{ $alertCfg.icon }}"></i>
|
||||||
|
<span>
|
||||||
|
{{ with .AlertTitle }}
|
||||||
|
{{ . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ or (T (printf "PostAlert.%s" .AlertType)) (title .AlertType) }}
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="post-alert-content">
|
||||||
|
{{ .Text }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
<blockquote>
|
||||||
|
{{ .Text }}
|
||||||
|
</blockquote>
|
||||||
|
{{ end }}
|
4
layouts/_default/_markup/render-codeblock.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{{ $result := transform.HighlightCodeBlock . }}
|
||||||
|
{{ $result.Wrapped }}
|
||||||
|
|
||||||
|
{{ .Page.Store.Set "codeblock" true }}
|