Compare commits
90 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0711770e9f | ||
|
|
4381eee782 | ||
|
|
3f8ab12e47 | ||
|
|
d6fbf924b8 | ||
|
|
a7b9d5338e | ||
|
|
1208213476 | ||
|
|
dd8ffbb179 | ||
|
|
04bf52abb8 | ||
|
|
1cb9973dbb | ||
|
|
4be573b5d3 | ||
|
|
7592b211c1 | ||
|
|
28a3d36f88 | ||
|
|
70cba4cc6a | ||
|
|
dc1c68d5c9 | ||
|
|
d4730f89d2 | ||
|
|
4037ea0d68 | ||
|
|
523c12f0ec | ||
|
|
d994042131 | ||
|
|
56166c7e76 | ||
|
|
f1fafdc587 | ||
|
|
9bde077b0b | ||
|
|
e0c4a0ecd4 | ||
|
|
f41c3c0a73 | ||
|
|
f3fc99ac03 | ||
|
|
20aadcf9ac | ||
|
|
2cc8f302d3 | ||
|
|
5634c20a02 | ||
|
|
e79234935b | ||
|
|
39058e897d | ||
|
|
568ef4ecc6 | ||
|
|
6542375766 | ||
|
|
6f03209e93 | ||
|
|
2a7fd9f8fb | ||
|
|
c38a439171 | ||
|
|
dc66bc1a05 | ||
|
|
fb007e57e5 | ||
|
|
df09cbe4c0 | ||
|
|
2276aae127 | ||
|
|
71844813bb | ||
|
|
784869832e | ||
|
|
423d4c0ef9 | ||
|
|
086ce454ff | ||
|
|
02ba198cfa | ||
|
|
0db1dac57f | ||
|
|
c9d4a00120 | ||
|
|
9c102f9695 | ||
|
|
5fb6618bd3 | ||
|
|
3de3e1de4d | ||
|
|
51eea3acc0 | ||
|
|
be3bf4e1f2 | ||
|
|
cbc39591d2 | ||
|
|
3965c0c108 | ||
|
|
fc44e79ddd | ||
|
|
d3eb723e24 | ||
|
|
b739434f8d | ||
|
|
36b428f1d9 | ||
|
|
678b92c0a7 | ||
|
|
aa8a60d852 | ||
|
|
30d161b1e2 | ||
|
|
96ba605026 | ||
|
|
1677648167 | ||
|
|
6cf961d392 | ||
|
|
97799aaaa8 | ||
|
|
1f668be6fa | ||
|
|
bb70f5b6a5 | ||
|
|
fdd49ab3cb | ||
|
|
1917055634 | ||
|
|
7ed095d42c | ||
|
|
ac844e4e8c | ||
|
|
34faa6f6f3 | ||
|
|
c1e7e59646 | ||
|
|
9a4883832f | ||
|
|
6cbffe48b7 | ||
|
|
403a2e6f54 | ||
|
|
832953372a | ||
|
|
1171bcbfb3 | ||
|
|
6ffddb602f | ||
|
|
f430f0730b | ||
|
|
87301d1d83 | ||
|
|
e83dbabc3f | ||
|
|
af59e93d25 | ||
|
|
d42375820d | ||
|
|
31f6e21671 | ||
|
|
a9ff14d312 | ||
|
|
12fbc945bc | ||
|
|
ad271c1c20 | ||
|
|
81cff8a5c2 | ||
|
|
bf55ada93c | ||
|
|
1339ffe29b | ||
|
|
c12cdf7b48 |
26
.gitignore
vendored
26
.gitignore
vendored
@@ -1,6 +1,28 @@
|
|||||||
# Ignore files in Hugo NexT theme
|
# Ignore files in Hugo NexT theme
|
||||||
|
|
||||||
exampleSite/
|
exampleSite/*
|
||||||
|
|
||||||
|
# Exclude special files in content folder
|
||||||
|
exampleSite/content/**/
|
||||||
!exampleSite/content
|
!exampleSite/content
|
||||||
!exampleSite/start.sh
|
!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/config.yaml
|
||||||
|
!exampleSite/start.sh
|
||||||
|
|
||||||
|
data/*
|
||||||
|
!data/config.yaml
|
||||||
|
!data/resources.yaml
|
||||||
|
|
||||||
|
|||||||
86
README.md
86
README.md
@@ -1,4 +1,4 @@
|
|||||||
[中文](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="https://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png">
|
||||||
@@ -12,14 +12,14 @@
|
|||||||
|
|
||||||
[](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://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)
|
||||||
|
|
||||||
## 4 Scheme
|
## 🎨 4 Scheme
|
||||||
|
|
||||||
* :heart_decoration: Muse
|
* :heart_decoration: Muse
|
||||||
* :six_pointed_star: Mist
|
* :six_pointed_star: Mist
|
||||||
* :pisces: Pisces
|
* :pisces: Pisces
|
||||||
* :gemini: Gemini (**default**)
|
* :gemini: Gemini (**default**)
|
||||||
|
|
||||||
## Live Preview
|
## 👀 Live Preview
|
||||||
|
|
||||||
| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status |
|
| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status |
|
||||||
| :---: | :---: | :---: | :---: | :---: | :---: |
|
| :---: | :---: | :---: | :---: | :---: | :---: |
|
||||||
@@ -29,22 +29,44 @@
|
|||||||
> - 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.
|
||||||
|
|
||||||
## Quick Start
|
## 👣 Quick Start
|
||||||
|
|
||||||
Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` software in your PC, then use `submodule` to lead into the theme, see below commands:
|
Before use `Hugo NexT` theme, please make sure installed `Git` & `Hugo Extened` software in your PC.
|
||||||
|
|
||||||
|
|
||||||
|
### 📰 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:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
### 📐 Direct Reference
|
||||||
|
|
||||||
|
If you had a blog site, then use `submodule` to lead into the theme, see below commands:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ hugo new site hugo-next-exmaple
|
|
||||||
$ cd hugo-next-exmaple
|
$ cd hugo-next-exmaple
|
||||||
$ git init
|
|
||||||
$ 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 -r themes/hugo-theme-next/exampleSite/* .
|
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
|
||||||
$ rm -rf config.toml
|
$ mv config.toml config.toml.backup
|
||||||
|
```
|
||||||
|
|
||||||
|
### 💻 Preview on Local
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cd hugo-next-exmaple
|
||||||
$ hugo server
|
$ hugo server
|
||||||
```
|
```
|
||||||
|
|
||||||
Done that input adrress http://127.0.0.1:1313/ on browser will see the effect & good luck for you! :tada::tada::tada:
|
Done that input adrress http://127.0.0.1:1313/ on browser will see the effect & good luck for you! :tada::tada::tada:
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> Don't use `hugo server` command deploy your site and enable internet visit, it just used to preview when you develop on local environment. Recommended use `hugo` command build static files all site, then deploy them into Web server such as `Nginx`.
|
||||||
|
|
||||||
|
### 🔄 Upgrade Theme
|
||||||
|
|
||||||
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
|
||||||
@@ -52,13 +74,15 @@ $ cd hugo-next-exmaple
|
|||||||
$ git submodule update --remote
|
$ git submodule update --remote
|
||||||
```
|
```
|
||||||
|
|
||||||
## 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:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ hugo new posts/hello-world.md
|
$ hugo new posts/hello-world.md
|
||||||
```
|
```
|
||||||
|
> **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.
|
||||||
|
|
||||||
All front matter parameters's description in post as below:
|
All front matter parameters's description in post as below:
|
||||||
|
|
||||||
@@ -97,32 +121,58 @@ tags:
|
|||||||
#url: "{{ lower .Name }}.html"
|
#url: "{{ lower .Name }}.html"
|
||||||
# Sticky post set-top in home page and the smaller nubmer will more forward.
|
# Sticky post set-top in home page and the smaller nubmer will more forward.
|
||||||
#weight: 1
|
#weight: 1
|
||||||
|
# Support Math Formulas render, options: mathjax, katex
|
||||||
|
#math: mathjax
|
||||||
|
# Enable chart render, such as: flow, sequence, classes etc
|
||||||
|
#mermaid: true
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
## Feedback
|
## 🎉 User's Cases
|
||||||
|
|
||||||
|
- [Hugo Docs & Demo](https://hugo-next.eu.org/)
|
||||||
|
- [凡梦星尘空间站](https://lisenhui.cn/)
|
||||||
|
- [阿哈吉](https://a.happy2008.top/)
|
||||||
|
- [研究僧](https://yuanlucas.com/)
|
||||||
|
- [Zero's Record](https://izeroo.cn/)
|
||||||
|
- [More Cases](https://hugo-next.eu.org/flinks.html)
|
||||||
|
|
||||||
|
Hope could submmit your site information in this file [flinks.yaml](https://github.com/hugo-next/hugo-next-docs/blob/develop/data/flinks.yaml) end line such as below code sytle when you use `Hugo NexT` theme, thanks.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: NexT 主题
|
||||||
|
desc: 保持简单的易用性和强大的功能
|
||||||
|
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
|
||||||
|
link: https://hugo-next.eu.org
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🙋 Feedback
|
||||||
|
|
||||||
- Join us [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) or [Gitter](https://gitter.im/hugo-next/community) to chat :beers:
|
- Join us [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) or [Gitter](https://gitter.im/hugo-next/community) to chat :beers:
|
||||||
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) submit a new bug :bug:
|
- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) submit a new bug :bug:
|
||||||
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) tell me your ideas :sparkles:
|
- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) tell me your ideas :sparkles:
|
||||||
|
|
||||||
## Join us
|
## 👨👩👧👦 Join us
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
## License
|
## 📜 License
|
||||||
|
|
||||||
[MIT License](LICENSE)
|
[MIT License](LICENSE)
|
||||||
|
|
||||||
Copyright (c) 2022, hugo-next teams.
|
Copyright (c) 2022, hugo-next teams.
|
||||||
|
|
||||||
## Thanks
|
## 💖 Thanks
|
||||||
|
|
||||||
That's my hobby to develop `Hugo NexT` theme, thanks all people who gived the donate, and let we follow it growth up.
|
That's my hobby to develop `Hugo NexT` theme, thanks all people who gived the donate, and let we follow it growth up.
|
||||||
|
|
||||||
List of Donors(Order 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 |
|
||||||
| ------- | ------ | ------ | ---- | ---- |
|
| :-------: | ------ | ------ | ---- | ---- |
|
||||||
| 2021.12.21 | z*y | wechat pay | RMB 18.88 | / |
|
| 2022.09.30 | *軒 | wechat pay | ¥66.66 | Hope it could help more people. |
|
||||||
| 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. |
|
| 2022.09.30 | N*l | wechat pay | ¥20.00 | / |
|
||||||
|
| 2022.07.09 | *风 | wechat pay | ¥10.00 | / |
|
||||||
|
| 2022.05.08 | *泉 | wechat pay | ¥6.60 | Good luck with next develop. |
|
||||||
|
| 2022.02.28 | *娇 | wechat pay | ¥5.00 | / |
|
||||||
|
| 2021.12.21 | z*y | wechat pay | ¥18.88 | / |
|
||||||
88
README.zh.md
88
README.zh.md
@@ -1,7 +1,7 @@
|
|||||||
[中文](#) | [English](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://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png">
|
<img align="right" alt="NexT logo" width="266" src="https://imgs.lisenhui.cn/hugo-next/logo/hugo-next-primary.png">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## Hugo NexT
|
## Hugo NexT
|
||||||
@@ -12,14 +12,14 @@
|
|||||||
|
|
||||||
[](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://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)
|
||||||
|
|
||||||
## 4 种页面模式
|
## 🎨 4 种页面模式
|
||||||
|
|
||||||
* :heart_decoration: 冥想 (Muse)
|
* :heart_decoration: 冥想 (Muse)
|
||||||
* :six_pointed_star: 迷雾 (Mist)
|
* :six_pointed_star: 迷雾 (Mist)
|
||||||
* :pisces: 双鱼座 (Pisces)
|
* :pisces: 双鱼座 (Pisces)
|
||||||
* :gemini: 双子座 (Gemini) (**默认**)
|
* :gemini: 双子座 (Gemini) (**默认**)
|
||||||
|
|
||||||
## 在线预览
|
## 👀 在线预览
|
||||||
|
|
||||||
| 环境 | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | 状态 |
|
| 环境 | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | 状态 |
|
||||||
| :---: | :---: | :---: | :---: | :---: | :---: |
|
| :---: | :---: | :---: | :---: | :---: | :---: |
|
||||||
@@ -29,21 +29,43 @@
|
|||||||
> - 开发版本: 所有的新功能开发都会在此第一时间发布预览
|
> - 开发版本: 所有的新功能开发都会在此第一时间发布预览
|
||||||
> - 正式版本: 只有测试稳定且符合要求的功能才会正式发布
|
> - 正式版本: 只有测试稳定且符合要求的功能才会正式发布
|
||||||
|
|
||||||
## 快速开始
|
## 👣 快速开始
|
||||||
|
|
||||||
在使用 `Hugo NexT` 主题之前,请确认你的电脑上已经安装 `Git` 和 `Hugo Extened` 两款软件,然后通过 `submodule` 模式引用本主题,参考如下命令:
|
在使用 `Hugo NexT` 主题之前,请确认你的电脑上已经安装 `Git` 和 `Hugo Extened` 两款软件。
|
||||||
|
|
||||||
|
### 📰 使用模板
|
||||||
|
|
||||||
|
如果你是初次建站的话,可以使用 `Github` 的模板功能,一键生成你的站点仓库代码。访问 [hugo-theme-next-starter](https://github.com/hugo-next/hugo-theme-next-starter) 点击右上角的 `Use this template` 绿色按钮然后填写代码仓库的相关信息,参考如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
最后点击 `Create repository from template` 绿色按钮,会直接在你的空间中生成站点代码,再把它克隆到本地进行创作。
|
||||||
|
|
||||||
|
### 📐 直接引用
|
||||||
|
|
||||||
|
如果你已经有站点,可通过 `submodule` 模式引用本主题,参考如下命令:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ hugo new site hugo-next-exmaple
|
|
||||||
$ cd hugo-next-exmaple
|
$ cd hugo-next-exmaple
|
||||||
$ git init
|
|
||||||
$ 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 -r themes/hugo-theme-next/exampleSite/* .
|
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
|
||||||
$ rm -rf config.toml
|
$ mv config.toml config.toml.backup
|
||||||
|
```
|
||||||
|
|
||||||
|
### 💻 本地预览
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cd hugo-next-exmaple
|
||||||
$ hugo server
|
$ hugo server
|
||||||
```
|
```
|
||||||
|
|
||||||
打开浏览器,在地址栏输入 http://127.0.0.1:1313/ 查看主题效果,祝你好运!:tada::tada::tada:
|
打开浏览器,在地址栏输入 http://127.0.0.1:1313/ 查看主题效果,祝你好运!:tada::tada::tada:
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> 要注意下 `hugo server` 命令只是用于本地开发或写文章时预览,并非是将其直接对外网开放访问。在正式发布时,可通过 `hugo` 命令生成全站静态文件,然后部署到类似 `Nginx` 的 Web 服务器即可。
|
||||||
|
|
||||||
|
### 🔄 主题更新
|
||||||
|
|
||||||
后续更新主题只需要在你的站点目录中,执行如下命令:
|
后续更新主题只需要在你的站点目录中,执行如下命令:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -51,9 +73,10 @@ $ cd hugo-next-exmaple
|
|||||||
$ git submodule update --remote
|
$ git submodule update --remote
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **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) 镜像速度更快,也更稳定。
|
||||||
|
|
||||||
## 发表新文章
|
## 📝 发表新文章
|
||||||
|
|
||||||
主题已经配置了默认的文章模板,建议使用如下 Hugo 命令快速创建新的文章:
|
主题已经配置了默认的文章模板,建议使用如下 Hugo 命令快速创建新的文章:
|
||||||
|
|
||||||
@@ -61,6 +84,9 @@ $ git submodule update --remote
|
|||||||
$ hugo new posts/hello-world.md
|
$ hugo new posts/hello-world.md
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> 其中 `posts` 路径是 `content` 根目录下的子文件夹,可依据自己的文件管理形态调整。
|
||||||
|
|
||||||
关于文章头部那些参数作用的说明参考如下:
|
关于文章头部那些参数作用的说明参考如下:
|
||||||
|
|
||||||
|
|
||||||
@@ -103,10 +129,32 @@ tags:
|
|||||||
#url: "{{ lower .Name }}.html"
|
#url: "{{ lower .Name }}.html"
|
||||||
# 开启文章置顶,数字越小越靠前
|
# 开启文章置顶,数字越小越靠前
|
||||||
#weight: 1
|
#weight: 1
|
||||||
|
# 开启数学公式渲染,可选值: mathjax, katex
|
||||||
|
#math: mathjax
|
||||||
|
# 开启各种图渲染,如流程图、时序图、类图等
|
||||||
|
#mermaid: true
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
## 使用反馈
|
## 🎉 用户案例
|
||||||
|
|
||||||
|
- [Hugo Docs & Demo](https://hugo-next.eu.org/)
|
||||||
|
- [凡梦星尘空间站](https://lisenhui.cn/)
|
||||||
|
- [阿哈吉](https://a.happy2008.top/)
|
||||||
|
- [研究僧](https://yuanlucas.com/)
|
||||||
|
- [Zero's Record](https://izeroo.cn/)
|
||||||
|
- [更多案例上线](https://hugo-next.eu.org/flinks.html)
|
||||||
|
|
||||||
|
如你也正在使用 `Hugo NexT` 主题,欢迎在 [flinks.yaml](https://github.com/hugo-next/hugo-next-docs/blob/develop/data/flinks.yaml) 文件底部提交贵站的名称、描述、头像、链接等信息,具体格式内容参考如下:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: NexT 主题
|
||||||
|
desc: 保持简单的易用性和强大的功能
|
||||||
|
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
|
||||||
|
link: https://hugo-next.eu.org
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🙋 使用反馈
|
||||||
|
|
||||||
- 加入 [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) 或 [Gitter](https://gitter.im/hugo-next/community) 在线讨论 :beers:
|
- 加入 [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 Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) 提交错误报告 :bug:
|
||||||
@@ -114,23 +162,27 @@ tags:
|
|||||||
|
|
||||||
> 国内用户也可加入 QQ 群交流: 604710815
|
> 国内用户也可加入 QQ 群交流: 604710815
|
||||||
|
|
||||||
## 欢迎加入
|
## 👨👩👧👦 欢迎加入
|
||||||
|
|
||||||
关于本主题的开发进度和后续的发展路线图,可访问 [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) 查看详情,也欢迎大家参与一起来完善。
|
||||||
|
|
||||||
## 许可证
|
## 📜 许可证
|
||||||
|
|
||||||
[MIT License](LICENSE)
|
[MIT License](LICENSE)
|
||||||
|
|
||||||
Copyright (c) 2022, hugo-next 团队
|
Copyright (c) 2022, hugo-next 团队
|
||||||
|
|
||||||
## 致谢
|
## 💖 致谢
|
||||||
|
|
||||||
开发 `Hugo NexT` 主题原本是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,让我们一起来见证它的成长。
|
开发 `Hugo NexT` 主题原本是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,让我们一起来见证它的成长。
|
||||||
|
|
||||||
以下是捐助名单列表(按时间顺序):
|
以下是打赏名单列表(按时间倒序):
|
||||||
|
|
||||||
| 捐助时间 | 捐助者 | 捐助方式 | 捐助内容 | 留言 |
|
| 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 |
|
||||||
| :-------: | ------ | ------ | ---- | ---- |
|
| :-------: | ------ | ------ | ---- | ---- |
|
||||||
|
| 2022.09.30 | *軒 | 微信支付 | ¥66.66 | 愿项目造福更多人! |
|
||||||
|
| 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 | / |
|
| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |
|
||||||
| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |顺利 |
|
|
||||||
@@ -40,6 +40,12 @@ tags:
|
|||||||
# 开启文章置顶,数字越小越靠前
|
# 开启文章置顶,数字越小越靠前
|
||||||
# Sticky post set-top in home page and the smaller nubmer will more forward.
|
# Sticky post set-top in home page and the smaller nubmer will more forward.
|
||||||
#weight: 1
|
#weight: 1
|
||||||
|
# 开启数学公式渲染,可选值: mathjax, katex
|
||||||
|
# Support Math Formulas render, options: mathjax, katex
|
||||||
|
#math: mathjax
|
||||||
|
# 开启各种图渲染,如流程图、时序图、类图等
|
||||||
|
# Enable chart render, such as: flow, sequence, classes etc
|
||||||
|
#mermaid: true
|
||||||
---
|
---
|
||||||
|
|
||||||
{{ .Name }}
|
{{ .Name }}
|
||||||
|
|||||||
@@ -29,9 +29,7 @@
|
|||||||
color-scheme: light;
|
color-scheme: light;
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $darkmode {
|
:root[data-theme="dark"] {
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--body-bg-color: #{$body-bg-color-dark};
|
--body-bg-color: #{$body-bg-color-dark};
|
||||||
--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};
|
||||||
@@ -61,7 +59,7 @@
|
|||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img[data-theme="dark"] {
|
||||||
opacity: .75;
|
opacity: .75;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -69,8 +67,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe {
|
iframe[data-theme="dark"] {
|
||||||
color-scheme: light;
|
color-scheme: light;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
z-index: $zindex-5;
|
z-index: $zindex-5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import 'back-to-top';
|
@import 'tool-buttons';
|
||||||
@import 'reading-progress';
|
@import 'reading-progress';
|
||||||
|
|
||||||
@import 'post';
|
@import 'post';
|
||||||
|
|||||||
141
assets/css/_common/components/pages/flinks.scss
Normal file
141
assets/css/_common/components/pages/flinks.scss
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
.flinks-block {
|
||||||
|
|
||||||
|
.flinks-block-title {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-list-title {
|
||||||
|
font-size: 1.25em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-lists > div:not(:first-child) {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-list-desc {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-list-items {
|
||||||
|
overflow: auto;
|
||||||
|
padding: 10px 10px 0;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.flinks-list-item {
|
||||||
|
@include mobile() {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
float: left;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 15px 7px;
|
||||||
|
width: calc(100% / 3 - 18px);
|
||||||
|
height: 90px;
|
||||||
|
border-radius: 8px;
|
||||||
|
line-height: 17px;
|
||||||
|
-webkit-transform: translateZ(0);
|
||||||
|
border: groove 1px var(--highlight-foreground);
|
||||||
|
box-shadow: .6rem .5rem 0.3rem var(--body-bg-color);
|
||||||
|
|
||||||
|
&:hover:before,
|
||||||
|
&:focus:before,
|
||||||
|
&:active:before {
|
||||||
|
-webkit-transform:scale(1);
|
||||||
|
-moz-transform:scale(1);
|
||||||
|
-o-transform:scale(1);
|
||||||
|
-ms-transform:scale(1);
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&:hover .flinks-item-icon {
|
||||||
|
margin-left:-10px;
|
||||||
|
width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: -1;
|
||||||
|
background: var(--body-bg-color);
|
||||||
|
content: ' ';
|
||||||
|
transition: transform .3s ease-out;
|
||||||
|
transform: scale(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
//color: var(--font-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-item-icon {
|
||||||
|
float: left;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 15px 10px;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 35px;
|
||||||
|
border: solid 1px var(--body-bg-color);
|
||||||
|
-webkit-transition: width .3s ease-out;
|
||||||
|
-moz-transition: width .3s ease-out;
|
||||||
|
-o-transition: width .3s ease-out;
|
||||||
|
-ms-transition: width .3s ease-out;
|
||||||
|
transition: width .3s ease-out;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
-webkit-transition: filter 375ms ease-in .2s,-webkit-transform .3s;
|
||||||
|
-moz-transition: filter 375ms ease-in .2s,-moz-transform .3s;
|
||||||
|
-o-transition: filter 375ms ease-in .2s,-o-transform .3s;
|
||||||
|
-ms-transition: filter 375ms ease-in .2s,-ms-transform .3s;
|
||||||
|
transition: filter 375ms ease-in .2s,transform .3s;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-item-name, .flinks-item-desc {
|
||||||
|
overflow:hidden;
|
||||||
|
-o-text-overflow:ellipsis;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
white-space:nowrap
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-item-name {
|
||||||
|
padding: 20px 0 0 0;
|
||||||
|
height: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
@include mobile() {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-item-desc {
|
||||||
|
padding: 10px 0;
|
||||||
|
font-size: .92em;
|
||||||
|
|
||||||
|
@include mobile() {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flinks-page-desc {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,3 +3,4 @@
|
|||||||
@import 'schedule';
|
@import 'schedule';
|
||||||
@import 'breadcrumb';
|
@import 'breadcrumb';
|
||||||
@import 'tag-cloud';
|
@import 'tag-cloud';
|
||||||
|
@import 'flinks';
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
.use-motion {
|
.use-motion {
|
||||||
@if $motion_trans_post_block {
|
@if $motion_trans_post_block {
|
||||||
.post-block, .pagination, .comments, .post-comments {
|
.post-block, .flinks-block, .pagination, .comments, .post-comments {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,6 +42,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.autonumber {
|
||||||
|
h2 {
|
||||||
|
counter-reset: h3;
|
||||||
|
&:before{
|
||||||
|
counter-increment: h2;
|
||||||
|
content: counter(h2) ". ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
counter-reset: h4;
|
||||||
|
&:before{
|
||||||
|
counter-increment: h3;
|
||||||
|
content: counter(h2) ". " counter(h3) ". ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
counter-reset: h5;
|
||||||
|
&:before{
|
||||||
|
counter-increment: h4;
|
||||||
|
content: counter(h2) "." counter(h3) "." counter(h4) ". ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@import 'post-collapse';
|
@import 'post-collapse';
|
||||||
@import 'post-body';
|
@import 'post-body';
|
||||||
@import 'post-gallery';
|
@import 'post-gallery';
|
||||||
|
|||||||
@@ -76,4 +76,8 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
max-width: 98%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Fix issue #16
|
// Fix issue #16
|
||||||
// To do: use `gap` instead of `margin`
|
// To do: use `gap` instead of `margin`
|
||||||
// See https://caniuse.com/flexbox-gap
|
// See https://caniuse.com/flexbox-gap
|
||||||
.post-footer {
|
.post-footer, .flinks-list-footer {
|
||||||
@include flex-column();
|
@include flex-column();
|
||||||
|
|
||||||
hr{
|
hr{
|
||||||
|
|||||||
@@ -113,9 +113,3 @@
|
|||||||
flex-basis: 100%;
|
flex-basis: 100%;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $busuanzi_post_views {
|
|
||||||
#busuanzi_container_page_pv {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
@import 'utterances';
|
@import 'utterances';
|
||||||
@import 'search';
|
@import 'search';
|
||||||
@import 'related-posts';
|
@import 'related-posts';
|
||||||
@import 'math';
|
|
||||||
@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
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
@if $math_mathjax_enable {
|
|
||||||
mjx-container[jax='CHTML'][display='true'], .has-jax {
|
|
||||||
overflow: auto hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
mjx-container[display='true'] + br {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
3
assets/css/_common/components/third-party/mermaid.scss
vendored
Normal file
3
assets/css/_common/components/third-party/mermaid.scss
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.post-block .post-body .mermaid {
|
||||||
|
background: var(--highlight-foreground);
|
||||||
|
}
|
||||||
@@ -106,6 +106,13 @@
|
|||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mark.search-keyword {
|
||||||
|
background: transparent;
|
||||||
|
border-bottom: 1px dashed $red;
|
||||||
|
color: $red;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $algolia_search_enable {
|
@if $algolia_search_enable {
|
||||||
@@ -169,11 +176,4 @@
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mark.search-keyword {
|
|
||||||
background: transparent;
|
|
||||||
border-bottom: 1px dashed $red;
|
|
||||||
color: $red;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,48 @@
|
|||||||
|
.tool-buttons {
|
||||||
|
|
||||||
|
@include sidebar-toggle();
|
||||||
|
background: none;
|
||||||
|
bottom: 55px;
|
||||||
|
filter: alpha(opacity=0);
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
.button {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: $tool-btn-bg;
|
||||||
|
color: $tool-btn-color;
|
||||||
|
text-align: center;
|
||||||
|
font-size: $font-size-larger;
|
||||||
|
line-height: 35px;
|
||||||
|
padding: 0;
|
||||||
|
outline: 0;
|
||||||
|
border: none;
|
||||||
|
text-transform: none;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: $tool-btn-opacity;
|
||||||
|
touch-action: manipulation;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $tool-btn-hover-fore-color;
|
||||||
|
opacity: $tool-btn-opacity-hover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goto-comments {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goto-comments-on {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@if $back2top_enable {
|
@if $back2top_enable {
|
||||||
.back-to-top {
|
.back-to-top {
|
||||||
font-size: $b2t-font-size;
|
font-size: $font-size-smaller;
|
||||||
|
|
||||||
@if not $back2top_scrollpercent {
|
@if not $back2top_scrollpercent {
|
||||||
span {
|
span {
|
||||||
@@ -29,6 +29,16 @@
|
|||||||
font-size: $font-size-smallest;
|
font-size: $font-size-smallest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.google-translate {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: $font-size-larger;
|
||||||
|
margin: auto 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@if $footer_vendors_enable {
|
@if $footer_vendors_enable {
|
||||||
.vendors-list {
|
.vendors-list {
|
||||||
a {
|
a {
|
||||||
@@ -97,16 +107,3 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.busuanzi-count {
|
|
||||||
@if $busuanzi_visitors {
|
|
||||||
#busuanzi_container_site_uv {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@if $busuanzi_views {
|
|
||||||
#busuanzi_container_site_pv {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
.fa, .fab, .far, .fas {
|
.fa, .fab, .far, .fas {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
width: 16px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.sidebar-inner {
|
.sidebar-inner, .sidebar-card-widget {
|
||||||
color: $grey-dark;
|
color: $grey-dark;
|
||||||
// Init Sidebar & TOC inner dimensions on all pages and for all schemes.
|
// Init Sidebar & TOC inner dimensions on all pages and for all schemes.
|
||||||
$offset : if(($scheme == 'Pisces') or ($scheme == 'Gemini'), $sidebar-offset, $sidebar-padding);
|
$offset : if(($scheme == 'Pisces') or ($scheme == 'Gemini'), $sidebar-offset, $sidebar-padding);
|
||||||
@@ -39,3 +39,4 @@
|
|||||||
@import 'sidebar-toggle';
|
@import 'sidebar-toggle';
|
||||||
@import 'sidebar-toc';
|
@import 'sidebar-toc';
|
||||||
@import 'site-state';
|
@import 'site-state';
|
||||||
|
@import 'sidebar-card-widget';
|
||||||
|
|||||||
60
assets/css/_common/outline/sidebar/sidebar-card-widget.scss
Normal file
60
assets/css/_common/outline/sidebar/sidebar-card-widget.scss
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
.sidebar-card-widget {
|
||||||
|
background: var(--content-bg-color);
|
||||||
|
@if ($scheme == 'Pisces') or ($scheme == 'Gemini'){
|
||||||
|
border-radius: $border-radius;
|
||||||
|
box-shadow: $box-shadow;
|
||||||
|
}
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: var(--text-color);
|
||||||
|
margin-top: $sidebar-offset;
|
||||||
|
|
||||||
|
.item-headline {
|
||||||
|
text-align: left;
|
||||||
|
font-size: $font-size-small;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
span {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.siteinfo {
|
||||||
|
font-size: $font-size-small;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
.siteinfo-item {
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2px 10px 0;
|
||||||
|
|
||||||
|
i {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
div:first-child {
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-moz-box-flex: 1;
|
||||||
|
-o-box-flex: 1;
|
||||||
|
box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
-ms-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-to-top-card {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
div:first-child {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $sidebar-nav-hover-color;
|
color: $sidebar-nav-hover-color;
|
||||||
|
border-bottom-color: $sidebar-highlight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
.sidebar-toc-active .sidebar-nav-toc, .sidebar-overview-active .sidebar-nav-overview {
|
.sidebar-toc-active .sidebar-nav-toc, .sidebar-overview-active .sidebar-nav-overview {
|
||||||
border-bottom-color: $sidebar-highlight;
|
border-bottom-color: $sidebar-highlight;
|
||||||
color: $sidebar-highlight;
|
color: $sidebar-highlight;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $sidebar-highlight;
|
color: $sidebar-highlight;
|
||||||
|
|||||||
@@ -1,20 +1,57 @@
|
|||||||
@if $toc_enable {
|
|
||||||
.post-toc {
|
.post-toc {
|
||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
|
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 2px 5px 10px;
|
padding: 0 2px 5px 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
counter-reset: item;
|
||||||
|
|
||||||
>li {
|
>li {
|
||||||
|
|
||||||
|
|
||||||
|
> ul {
|
||||||
|
border-left: 1px solid;
|
||||||
|
margin-left: 6px;
|
||||||
|
|
||||||
|
li {
|
||||||
|
position: relative;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
position: absolute;
|
||||||
|
content: ' ';
|
||||||
|
top: 0.14em;
|
||||||
|
left: -0.75em;
|
||||||
|
width: 0.68em;
|
||||||
|
height: 0.815em;
|
||||||
|
border-style: none none dashed none;
|
||||||
|
border-width: 0.05em;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
transition: all $transition-ease;
|
transition: all $transition-ease;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: counters(item, ".") ". ";
|
||||||
|
counter-increment: item;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: $orange;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,4 +96,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,14 +2,30 @@
|
|||||||
.highlight {
|
.highlight {
|
||||||
|
|
||||||
background: var(--highlight-background);
|
background: var(--highlight-background);
|
||||||
|
margin-bottom: 26px;
|
||||||
|
|
||||||
.table-container, pre {
|
//TODO Need fixed the copy button show position.
|
||||||
|
div:first-child {
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container table tbody tr {
|
table tbody tr {
|
||||||
background: none;
|
//TODO Fixed the too long code line over
|
||||||
|
// layout background color.
|
||||||
|
background: #272822;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* pre > code span {
|
||||||
|
white-space: break-spaces;
|
||||||
|
overflow: hidden;
|
||||||
|
word-break: break-all;
|
||||||
|
word-wrap: break-word;
|
||||||
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $codeblock_copy_btn_enable {
|
@if $codeblock_copy_btn_enable {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
padding: 10px;
|
padding: 18px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ html {
|
|||||||
*/
|
*/
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
counter-reset: h2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@use 'sass:map';
|
//@use 'sass:map';
|
||||||
|
|
||||||
@if $note_style != 'disabled' {
|
@if $note_style != 'disabled' {
|
||||||
.post-body .note {
|
.main .note {
|
||||||
$note-icons : $note_icons;
|
$note-icons : $note_icons;
|
||||||
$note-style : $note_style;
|
$note-style : $note_style;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
// ==================================================
|
// ==================================================
|
||||||
// Post blocks.
|
// Post blocks.
|
||||||
.main-inner > {
|
.main-inner > {
|
||||||
.sub-menu, .post-block, .tabs-comment, .comments, .post-comments, .pagination {
|
.sub-menu, .post-block, .flinks-block, .tabs-comment, .comments, .post-comments, .pagination {
|
||||||
background: var(--content-bg-color);
|
background: var(--content-bg-color);
|
||||||
border-radius: $border-radius-inner;
|
border-radius: $border-radius-inner;
|
||||||
box-shadow: $box-shadow-inner;
|
box-shadow: $box-shadow-inner;
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Post & Comments blocks.
|
// Post & Comments blocks.
|
||||||
.post-block, .comments, .post-comments {
|
.post-block, .flinks-block, .comments, .post-comments {
|
||||||
padding: $content-desktop-padding;
|
padding: $content-desktop-padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
border-bottom: 1px solid $body-bg-color;
|
border-bottom: 1px solid $body-bg-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3, h4 {
|
||||||
border-bottom: 1px dotted $body-bg-color;
|
border-bottom: 1px dotted $body-bg-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-block {
|
.post-block, .flinks-block {
|
||||||
// Inside posts blocks content padding (default 40px).
|
// Inside posts blocks content padding (default 40px).
|
||||||
padding: ($content-tablet-padding * 2);
|
padding: ($content-tablet-padding * 2);
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-block {
|
.post-block, .flinks-block {
|
||||||
// Inside posts blocks content padding (default 40px).
|
// Inside posts blocks content padding (default 40px).
|
||||||
padding: $sidebar-offset;
|
padding: $sidebar-offset;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -283,6 +283,13 @@ $site-state-item-name-color : inherit;
|
|||||||
|
|
||||||
// Components
|
// Components
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
// Tool buttons
|
||||||
|
$tool-btn-bg : $black-deep;
|
||||||
|
$tool-btn-color : white;
|
||||||
|
$tool-btn-hover-fore-color : $orange;
|
||||||
|
$tool-btn-opacity : .8;
|
||||||
|
$tool-btn-opacity-hover : 1;
|
||||||
|
|
||||||
// Back to top
|
// Back to top
|
||||||
$b2t-opacity : .8;
|
$b2t-opacity : .8;
|
||||||
$b2t-opacity-hover : 1;
|
$b2t-opacity-hover : 1;
|
||||||
|
|||||||
@@ -1,176 +0,0 @@
|
|||||||
/** User-defined style. **/
|
|
||||||
{{ $P := .Site.Params -}}
|
|
||||||
|
|
||||||
{{- with $P.sidebar -}}
|
|
||||||
{{- $width := (int (math.Max .width 240)) -}}
|
|
||||||
{{- $offset := (int (math.Max .offset 12)) -}}
|
|
||||||
{{- $padding := (int (math.Max .padding 18)) -}}
|
|
||||||
{{- $positPad := (add $width $offset) }}
|
|
||||||
.main {
|
|
||||||
{{ if eq .position "right" }}
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
.header-inner {
|
|
||||||
width: {{ $width }}px;
|
|
||||||
}
|
|
||||||
.main-inner {
|
|
||||||
width: calc(100% - {{ $positPad }}px);
|
|
||||||
}
|
|
||||||
.sidebar {
|
|
||||||
width: {{ $width }}px;
|
|
||||||
visibility: inherit;
|
|
||||||
}
|
|
||||||
.sidebar-inner {
|
|
||||||
padding: {{ $padding }}px 10px;
|
|
||||||
}
|
|
||||||
.footer-inner {
|
|
||||||
padding-{{ .position }}: {{ $positPad }}px;
|
|
||||||
}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
.site-author-image {
|
|
||||||
{{- if $P.avatar.rounded }}
|
|
||||||
border-radius:50%;
|
|
||||||
{{- end }}
|
|
||||||
{{- if $P.avatar.rotated }}
|
|
||||||
transition: transform 1s ease-out;
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
.site-author-image:hover {
|
|
||||||
transform: rotateZ(360deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.site-state-item {
|
|
||||||
border-left: 1px solid #eee;
|
|
||||||
}
|
|
||||||
.site-state-item:first-child {
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rss-link {
|
|
||||||
border-top: 1px dotted #ccc;
|
|
||||||
border-bottom: 1px dotted #ccc;
|
|
||||||
text-align: center;
|
|
||||||
margin: 10px 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rss-link a {
|
|
||||||
display: block;
|
|
||||||
color: #fc6423;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rss-link a:hover {
|
|
||||||
animation-name: wobble-vertical;
|
|
||||||
animation-duration: 2s;
|
|
||||||
animation-timing-function: ease-in-out;
|
|
||||||
animation-iteration-count: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rss-link a:hover > i {
|
|
||||||
-webkit-transform: scaleY(-1);
|
|
||||||
transform: scaleY(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.links-of-social a {
|
|
||||||
font-size: 0.8125em;
|
|
||||||
}
|
|
||||||
.links-of-social .fa,
|
|
||||||
.links-of-social .fab,
|
|
||||||
.links-of-social .far,
|
|
||||||
.links-of-social .fas {
|
|
||||||
margin-right: 2px;
|
|
||||||
}
|
|
||||||
.links-of-social {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.links-of-social-item {
|
|
||||||
margin: 5px 0 0;
|
|
||||||
{{- if and $P.socialIcons.enable (not $P.socialIcons.iconsOnly) }}
|
|
||||||
width: 50%;
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
.links-of-social-item a {
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: inline-block;
|
|
||||||
max-width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 0 5px;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.links-of-social-item a {
|
|
||||||
border-bottom: 0;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.links-of-social-item a:hover {
|
|
||||||
background: var(--body-bg-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.cc-license {
|
|
||||||
{{ if eq $P.creativeCommons.size "big" }}
|
|
||||||
margin-top: 10px;
|
|
||||||
{{ else }}
|
|
||||||
margin-top: 5px;
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-to-top {
|
|
||||||
bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.posts-expand .post-meta-container {
|
|
||||||
margin: 10px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-meta-item-icon {
|
|
||||||
margin: 0 0 0 -5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:not(.post-meta-break) + .post-meta-item::before {
|
|
||||||
content: '|';
|
|
||||||
margin: 0 0.3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-meta-catg:not(:last-child)::after {
|
|
||||||
content: ';';
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.posts-expand .post-header {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.posts-expand .post-body {
|
|
||||||
margin: 28px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-footer-btn {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.beian img {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0 3px;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.with-love {
|
|
||||||
{{- with $P.footer.icon.color }}
|
|
||||||
color: {{ $P.footer.icon.color }};
|
|
||||||
{{- end }}
|
|
||||||
{{- if $P.footer.icon.animated }}
|
|
||||||
animation: icon-animate 1.33s ease-in-out infinite;
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Font Awesome */
|
|
||||||
.fa-spin {
|
|
||||||
-webkit-animation: fa-spin .8s infinite linear;
|
|
||||||
animation: fa-spin .8s infinite linear;
|
|
||||||
}
|
|
||||||
892
assets/css/gt.scss
Normal file
892
assets/css/gt.scss
Normal file
@@ -0,0 +1,892 @@
|
|||||||
|
:root {
|
||||||
|
--gt-blue: #2640b2;
|
||||||
|
--gt-border: #d1d5db;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes "goog-te-spinner-rotator" {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(270deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes "goog-te-spinner-dash" {
|
||||||
|
0% {
|
||||||
|
stroke-dashoffset: 187;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
stroke-dashoffset: 46.75;
|
||||||
|
transform: rotate(135deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
stroke-dashoffset: 187;
|
||||||
|
transform: rotate(450deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-banner-frame {
|
||||||
|
left: 0px;
|
||||||
|
top: 0px;
|
||||||
|
height: 39px;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 10000001;
|
||||||
|
position: fixed;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 1px solid #6b90da;
|
||||||
|
margin: 0;
|
||||||
|
box-shadow: 0 0 8px 1px #999999;
|
||||||
|
_position: absolute;
|
||||||
|
}
|
||||||
|
.goog-te-menu-frame {
|
||||||
|
z-index: 10000002;
|
||||||
|
position: fixed;
|
||||||
|
box-shadow: 0.5rem 0.875rem 2.375rem rgba(39, 44, 49, 0.06), 0.0625rem 0.1875rem 0.5rem rgba(39, 44, 49, 0.03);
|
||||||
|
_position: absolute;
|
||||||
|
}
|
||||||
|
.goog-te-ftab-frame {
|
||||||
|
z-index: 10000000;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.goog-te-gadget {
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 11px;
|
||||||
|
color: #666;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: inline-flex;
|
||||||
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
border: none;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.goog-te-combo {
|
||||||
|
margin: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div:first-child {
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-gadget-simple {
|
||||||
|
background-color: #fff;
|
||||||
|
border-left: 1px solid #d5d5d5;
|
||||||
|
border-top: 1px solid #9b9b9b;
|
||||||
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
border-right: 1px solid #d5d5d5;
|
||||||
|
font-size: 10pt;
|
||||||
|
display: inline-block;
|
||||||
|
padding-top: 1px;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
zoom: 1;
|
||||||
|
*display: inline;
|
||||||
|
.goog-te-menu-value {
|
||||||
|
color: #000;
|
||||||
|
span {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-gadget-icon {
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: 2px;
|
||||||
|
width: 19px;
|
||||||
|
height: 19px;
|
||||||
|
border: none;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.goog-te-combo {
|
||||||
|
margin-left: 4px;
|
||||||
|
margin-right: 4px;
|
||||||
|
vertical-align: baseline;
|
||||||
|
*vertical-align: middle;
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
.goog-logo-link {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #444;
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 0 5px;
|
||||||
|
border-bottom: 0;
|
||||||
|
&:link {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #444;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
&:visited {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #444;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #444;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #444;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-banner {
|
||||||
|
.goog-logo-link {
|
||||||
|
display: block;
|
||||||
|
margin: 0px 10px;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
* {
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
margin: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
img {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
td {
|
||||||
|
&:nth-child(2) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-close-link {
|
||||||
|
display: block;
|
||||||
|
margin: 0px 10px;
|
||||||
|
}
|
||||||
|
.goog-te-ftab {
|
||||||
|
* {
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
margin: 0px;
|
||||||
|
background-color: #fff;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.goog-te-menu {
|
||||||
|
* {
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
background-color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
border: 2px solid #c3d9ff;
|
||||||
|
overflow-y: scroll;
|
||||||
|
overflow-x: hidden;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.goog-te-menu2 {
|
||||||
|
* {
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
background-color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 4px;
|
||||||
|
border: 1px solid var(--gt-border);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.goog-te-balloon {
|
||||||
|
* {
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
background-color: #ffffff;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 8px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
img {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-banner-content {
|
||||||
|
color: #000;
|
||||||
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-banner-info {
|
||||||
|
color: #666;
|
||||||
|
vertical-align: top;
|
||||||
|
margin-top: 0px;
|
||||||
|
font-size: 7pt;
|
||||||
|
}
|
||||||
|
.goog-te-banner-margin {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
.goog-te-button {
|
||||||
|
div {
|
||||||
|
border: 1px solid var(--gt-border);
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0;
|
||||||
|
vertical-align: top;
|
||||||
|
white-space: nowrap;
|
||||||
|
&:active {
|
||||||
|
background: none repeat scroll 0 0 #cccccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-ftab-link {
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 10pt;
|
||||||
|
border: 1px outset #888;
|
||||||
|
padding: 6px 10px;
|
||||||
|
white-space: nowrap;
|
||||||
|
position: absolute;
|
||||||
|
left: 0px;
|
||||||
|
top: 0px;
|
||||||
|
img {
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: 2px;
|
||||||
|
width: 19px;
|
||||||
|
height: 19px;
|
||||||
|
border: none;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
text-decoration: underline;
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: 2px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-float-top {
|
||||||
|
.goog-te-ftab-link {
|
||||||
|
padding: 2px 2px;
|
||||||
|
border-top-width: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-float-bottom {
|
||||||
|
.goog-te-ftab-link {
|
||||||
|
padding: 2px 2px;
|
||||||
|
border-bottom-width: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-menu-value {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--gt-blue);
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-left: 4px;
|
||||||
|
margin-right: 4px;
|
||||||
|
span {
|
||||||
|
text-decoration: underline;
|
||||||
|
&::after {
|
||||||
|
content: "▼";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: 2px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-menu-item {
|
||||||
|
padding: 3px;
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--gt-blue);
|
||||||
|
background: #ffffff;
|
||||||
|
&:link {
|
||||||
|
color: var(--gt-blue);
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
&:visited {
|
||||||
|
color: #551a8b;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
background: #c3d9ff;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
color: var(--gt-blue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-menu2-colpad {
|
||||||
|
width: 16px;
|
||||||
|
}
|
||||||
|
.goog-te-menu2-separator {
|
||||||
|
margin: 6px 0;
|
||||||
|
height: 1px;
|
||||||
|
background-color: var(--gt-border);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.goog-te-menu2-item {
|
||||||
|
div {
|
||||||
|
padding: 4px;
|
||||||
|
color: var(--gt-blue);
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
.indicator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
text-decoration: none;
|
||||||
|
&:link {
|
||||||
|
div {
|
||||||
|
color: var(--gt-blue);
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:visited {
|
||||||
|
div {
|
||||||
|
color: var(--gt-blue);
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
div {
|
||||||
|
color: var(--gt-blue);
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
div {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #3366cc;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-menu2-item-selected {
|
||||||
|
div {
|
||||||
|
padding: 4px;
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.indicator {
|
||||||
|
display: auto;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
text-decoration: none;
|
||||||
|
&:link {
|
||||||
|
div {
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:visited {
|
||||||
|
div {
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
div {
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
div {
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-balloon-frame {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #6b90da;
|
||||||
|
box-shadow: 0.5rem 0.875rem 2.375rem rgba(39, 44, 49, 0.06), 0.0625rem 0.1875rem 0.5rem rgba(39, 44, 49, 0.03);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.goog-te-balloon-text {
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
.goog-te-balloon-zippy {
|
||||||
|
margin-top: 6px;
|
||||||
|
white-space: nowrap;
|
||||||
|
* {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.minus {
|
||||||
|
background-image: url(//www.google.com/images/zippy_minus_sm.gif);
|
||||||
|
}
|
||||||
|
.plus {
|
||||||
|
background-image: url(//www.google.com/images/zippy_plus_sm.gif);
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: #00c;
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-balloon-form {
|
||||||
|
margin: 6px 0 0 0;
|
||||||
|
form {
|
||||||
|
margin: 0;
|
||||||
|
textarea {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-te-balloon-footer {
|
||||||
|
margin: 6px 0 4px 0;
|
||||||
|
}
|
||||||
|
.goog-te-spinner-pos {
|
||||||
|
z-index: 1000;
|
||||||
|
position: fixed;
|
||||||
|
transition-delay: 0.6s;
|
||||||
|
left: -1000px;
|
||||||
|
top: -1000px;
|
||||||
|
}
|
||||||
|
.goog-te-spinner-animation {
|
||||||
|
background: #ccc;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 104px;
|
||||||
|
height: 104px;
|
||||||
|
border-radius: 50px;
|
||||||
|
background: #fff url(//www.gstatic.com/images/branding/product/2x/translate_24dp.png) 50% 50% no-repeat;
|
||||||
|
transition: all 0.6s ease-in-out;
|
||||||
|
transform: scale(0.4);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.goog-te-spinner-animation-show {
|
||||||
|
transform: scale(0.5);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.goog-te-spinner {
|
||||||
|
margin: 2px 0 0 2px;
|
||||||
|
animation: goog-te-spinner-rotator 1.4s linear infinite;
|
||||||
|
}
|
||||||
|
.goog-te-spinner-path {
|
||||||
|
stroke-dasharray: 187;
|
||||||
|
stroke-dashoffset: 0;
|
||||||
|
stroke: #4285f4;
|
||||||
|
transform-origin: center;
|
||||||
|
animation: goog-te-spinner-dash 1.4s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
#goog-gt-tt {
|
||||||
|
color: #222;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
box-shadow: 0 4px 16px rgba(0,0,0,.2);
|
||||||
|
display: none;
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 10pt;
|
||||||
|
width: 420px;
|
||||||
|
padding: 12px;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 10000;
|
||||||
|
.original-text {
|
||||||
|
clear: both;
|
||||||
|
font-size: 10pt;
|
||||||
|
position: relative;
|
||||||
|
text-align: justify;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
color: #999;
|
||||||
|
font-family: arial,sans-serif;
|
||||||
|
margin: 4px 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.close-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
float: left;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.activity-links {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.started-activity-container {
|
||||||
|
display: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.activity-root {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.left {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.bottom {
|
||||||
|
min-height: 15px;
|
||||||
|
position: relative;
|
||||||
|
height: 1%;
|
||||||
|
}
|
||||||
|
.status-message {
|
||||||
|
background: linear-gradient(top,#29910d 0%,#20af0e 100%);
|
||||||
|
background: #29910d;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: inset 0px 2px 2px #1e6609;
|
||||||
|
color: white;
|
||||||
|
font-size: 9pt;
|
||||||
|
font-weight: bolder;
|
||||||
|
margin-top: 12px;
|
||||||
|
padding: 6px;
|
||||||
|
text-shadow: 1px 1px 1px #1e6609;
|
||||||
|
}
|
||||||
|
.activity-link {
|
||||||
|
color: #1155cc;
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 11px;
|
||||||
|
margin-right: 15px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
font-family: arial;
|
||||||
|
resize: vertical;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border-radius: 1px;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-top: 1px solid silver;
|
||||||
|
font-size: 13px;
|
||||||
|
height: auto;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 1px;
|
||||||
|
&:focus {
|
||||||
|
box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
|
||||||
|
border: 1px solid #4d90fe;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.activity-cancel {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.translate-form {
|
||||||
|
min-height: 25px;
|
||||||
|
vertical-align: middle;
|
||||||
|
padding-top: 8px;
|
||||||
|
.activity-form {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
input {
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 54px;
|
||||||
|
*min-width: 70px;
|
||||||
|
border: 1px solid #dcdcdc;
|
||||||
|
border: 1px solid rgba(0,0,0,0.1);
|
||||||
|
text-align: center;
|
||||||
|
color: #444;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: bold;
|
||||||
|
height: 27px;
|
||||||
|
outline: 0;
|
||||||
|
padding: 0 8px;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 27px;
|
||||||
|
margin: 0 16px 0 0;
|
||||||
|
box-shadow: 0 1px 2px rgba(0,0,0,.1);
|
||||||
|
border-radius: 2px;
|
||||||
|
transition: all 0.218s;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
background-image: linear-gradient(top,#f5f5f5,#f1f1f1);
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
cursor: default;
|
||||||
|
&:hover {
|
||||||
|
border: 1px solid #c6c6c6;
|
||||||
|
color: #222;
|
||||||
|
transition: all 0.0s;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
background-image: linear-gradient(top,#f8f8f8,#f1f1f1);
|
||||||
|
border-color: #3079ed;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
border: 1px solid #c6c6c6;
|
||||||
|
color: #333;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
background-image: linear-gradient(top,#f6f6f6,#f1f1f1);
|
||||||
|
border-color: #3079ed;
|
||||||
|
}
|
||||||
|
&:focus {
|
||||||
|
#goog-gt-tt {
|
||||||
|
.translate-form {
|
||||||
|
.activity-form {
|
||||||
|
input.focus {
|
||||||
|
#goog-gt-tt {
|
||||||
|
.translate-form {
|
||||||
|
.activity-form {
|
||||||
|
input {
|
||||||
|
&:active {
|
||||||
|
box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
outline: none;
|
||||||
|
border: 1px solid #4d90fe;
|
||||||
|
z-index: 4 !important;
|
||||||
|
border-color: #3079ed;
|
||||||
|
}
|
||||||
|
&.focus {
|
||||||
|
&:active {
|
||||||
|
box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.focus {
|
||||||
|
outline: none;
|
||||||
|
border: 1px solid #4d90fe;
|
||||||
|
z-index: 4 !important;
|
||||||
|
border-color: #3079ed;
|
||||||
|
}
|
||||||
|
input.selected {
|
||||||
|
background-color: #eeeeee;
|
||||||
|
background-image: linear-gradient(top,#eeeeee,#e0e0e0);
|
||||||
|
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.1);
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
input.activity-submit {
|
||||||
|
color: white;
|
||||||
|
border-color: #3079ed;
|
||||||
|
background-color: #4d90fe;
|
||||||
|
background-image: linear-gradient(top,#4d90fe,#4787ed);
|
||||||
|
&:hover {
|
||||||
|
#goog-gt-tt {
|
||||||
|
.translate-form {
|
||||||
|
.activity-form {
|
||||||
|
input.activity-submit {
|
||||||
|
&:focus {
|
||||||
|
border-color: #3079ed;
|
||||||
|
background-color: #357ae8;
|
||||||
|
background-image: linear-gradient(top,#4d90fe,#357ae8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
box-shadow: inset 0 0 0 1px #fff,0px 1px 1px rgba(0,0,0,0.1);
|
||||||
|
border-color: #3079ed;
|
||||||
|
}
|
||||||
|
&:focus {
|
||||||
|
border-color: #3079ed;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
border-color: #3079ed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.activity-submit.focus {
|
||||||
|
#goog-gt-tt {
|
||||||
|
.translate-form {
|
||||||
|
.activity-form {
|
||||||
|
input.activity-submit {
|
||||||
|
&:active {
|
||||||
|
border-color: #3079ed;
|
||||||
|
background-color: #357ae8;
|
||||||
|
background-image: linear-gradient(top,#4d90fe,#357ae8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
border-color: #3079ed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.gray {
|
||||||
|
color: #999;
|
||||||
|
font-family: arial,sans-serif;
|
||||||
|
}
|
||||||
|
.alt-helper-text {
|
||||||
|
color: #999;
|
||||||
|
font-size: 11px;
|
||||||
|
font-family: arial,sans-serif;
|
||||||
|
margin: 15px 0px 5px 0px;
|
||||||
|
}
|
||||||
|
.alt-error-text {
|
||||||
|
color: #800;
|
||||||
|
display: none;
|
||||||
|
font-size: 9pt;
|
||||||
|
}
|
||||||
|
.alt-menu.goog-menu {
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
box-shadow: 0px 2px 4px #99a;
|
||||||
|
min-width: 0;
|
||||||
|
outline: none;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2000;
|
||||||
|
}
|
||||||
|
.alt-menu {
|
||||||
|
.goog-menuitem {
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 2px 5px 5px;
|
||||||
|
margin-right: 0px;
|
||||||
|
border-style: none;
|
||||||
|
h1 {
|
||||||
|
font-size: 100%;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 4px 0px;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
color: #345aad;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
div.goog-menuitem {
|
||||||
|
&:hover {
|
||||||
|
background: #ddd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goog-submenu-arrow {
|
||||||
|
text-align: right;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
.goog-menuitem-rtl {
|
||||||
|
.goog-submenu-arrow {
|
||||||
|
text-align: left;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.gt-hl-text {
|
||||||
|
background-color: #f1ea00;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: rgba(0,0,0,.5) 3px 3px 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #f1ea00;
|
||||||
|
cursor: pointer;
|
||||||
|
margin: -2px -2px -2px -3px;
|
||||||
|
padding: 2px 2px 2px 3px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.trans-target-highlight {
|
||||||
|
background-color: #f1ea00;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: rgba(0,0,0,.5) 3px 3px 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #f1ea00;
|
||||||
|
cursor: pointer;
|
||||||
|
margin: -2px -2px -2px -3px;
|
||||||
|
padding: 2px 2px 2px 3px;
|
||||||
|
position: relative;
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
.gt-hl-layer {
|
||||||
|
color: white;
|
||||||
|
position: absolute !important;
|
||||||
|
}
|
||||||
|
.trans-target {
|
||||||
|
background-color: #c9d7f1;
|
||||||
|
border-radius: 4px 4px 0px 0px;
|
||||||
|
box-shadow: rgba(0,0,0,.5) 3px 3px 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
margin: -2px -2px -2px -3px;
|
||||||
|
padding: 2px 2px 3px 3px;
|
||||||
|
position: relative;
|
||||||
|
.trans-target-highlight {
|
||||||
|
background-color: #c9d7f1;
|
||||||
|
border-radius: 4px 4px 0px 0px;
|
||||||
|
box-shadow: rgba(0,0,0,.5) 3px 3px 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
margin: -2px -2px -2px -3px;
|
||||||
|
padding: 2px 2px 3px 3px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.trans-edit {
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid #4d90fe;
|
||||||
|
border-radius: 0em;
|
||||||
|
margin: -2px;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
.gt-trans-highlight-l {
|
||||||
|
border-left: 2px solid red;
|
||||||
|
margin-left: -2px;
|
||||||
|
}
|
||||||
|
.gt-trans-highlight-r {
|
||||||
|
border-right: 2px solid red;
|
||||||
|
margin-right: -2px;
|
||||||
|
}
|
||||||
|
#alt-input {
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
#alt-input-text {
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 2px 2px 3px;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
color: #333;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-top: 1px solid #c0c0c0;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
height: 21px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
&:hover {
|
||||||
|
border: 1px solid #b9b9b9;
|
||||||
|
border-top: 1px solid #a0a0a0;
|
||||||
|
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
&:focus {
|
||||||
|
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.3);
|
||||||
|
outline: none;
|
||||||
|
border: 1px solid #4d90fe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#alt-input-submit {
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 2px 6px 3px;
|
||||||
|
margin: 0 0 0 2px;
|
||||||
|
height: 21px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
div#goog-gt-tt {
|
||||||
|
padding: 10px 14px;
|
||||||
|
}
|
||||||
|
.gt-hl-layer {
|
||||||
|
clear: both;
|
||||||
|
font-size: 10pt;
|
||||||
|
position: relative;
|
||||||
|
text-align: justify;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.goog-text-highlight {
|
||||||
|
background-color: #c9d7f1;
|
||||||
|
box-shadow: 2px 2px 4px #9999aa;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
@@ -33,11 +33,6 @@ $footer_vendors_enable : {{ isset $P.footer "vendors" }};
|
|||||||
{{ printf "$footer_vendors_imgs_width:%s;" (delimit (after 1 $width) ", ") }}
|
{{ printf "$footer_vendors_imgs_width:%s;" (delimit (after 1 $width) ", ") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
// Counter
|
|
||||||
$busuanzi_visitors : {{ $P.busuanzi.visitors }};
|
|
||||||
$busuanzi_views : {{ $P.busuanzi.views }};
|
|
||||||
$busuanzi_post_views : {{ $P.busuanzi.postViews }};
|
|
||||||
|
|
||||||
// Font
|
// Font
|
||||||
$font_enable : {{ $P.font.enable }};
|
$font_enable : {{ $P.font.enable }};
|
||||||
$font_global_size : {{ default $P.font.global.size 1 }};
|
$font_global_size : {{ default $P.font.global.size 1 }};
|
||||||
@@ -70,7 +65,7 @@ $back2top_sidebar : {{ $P.backTop.sidebar }};
|
|||||||
$avatar_rotated : {{ $P.avatar.rotated }};
|
$avatar_rotated : {{ $P.avatar.rotated }};
|
||||||
$avatar_rounded : {{ $P.avatar.rounded }};
|
$avatar_rounded : {{ $P.avatar.rounded }};
|
||||||
$avatar_rounded : {{ $P.avatar.rounded }};
|
$avatar_rounded : {{ $P.avatar.rounded }};
|
||||||
$site_state : {{ $P.siteState }};
|
$site_state : {{ $P.siteState.basic }};
|
||||||
$social_icons_only : {{ $P.socialIcons.iconsOnly }};
|
$social_icons_only : {{ $P.socialIcons.iconsOnly }};
|
||||||
$social_icons_transition : {{ $P.socialIcons.transition }};
|
$social_icons_transition : {{ $P.socialIcons.transition }};
|
||||||
$links_settings_layout : {{ $P.linksSets.layout }};
|
$links_settings_layout : {{ $P.linksSets.layout }};
|
||||||
@@ -112,7 +107,6 @@ $reading_progress_position : {{ $P.readingProgress.position }};
|
|||||||
$reading_progress_reversed : {{ $P.readingProgress.reversed }};
|
$reading_progress_reversed : {{ $P.readingProgress.reversed }};
|
||||||
|
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
$math_mathjax_enable : {{ $P.math.mathjax.enable }};
|
|
||||||
// TODO
|
// TODO
|
||||||
//$related_posts_enable : {{ $P.relatedPosts.enable }};
|
//$related_posts_enable : {{ $P.relatedPosts.enable }};
|
||||||
$related_posts_enable : false;
|
$related_posts_enable : false;
|
||||||
@@ -131,9 +125,9 @@ $gitter_enable : {{ $P.gitter.enable }};
|
|||||||
// Comment
|
// Comment
|
||||||
//$disqusjs_enable : {{ $P.disqusjs.enable }};
|
//$disqusjs_enable : {{ $P.disqusjs.enable }};
|
||||||
$disqusjs_enable : false;
|
$disqusjs_enable : false;
|
||||||
$livere_enable : {{ isset $P.livere "uid" }};
|
$livere_enable : {{ isset $P "livere" }};
|
||||||
$utterances_enable : {{ isset $P.utterances "utterances" }};
|
$utterances_enable : {{ isset $P "utterances" }};
|
||||||
$waline_enable : {{ isset $P.waline "serverurl" }};
|
$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 }};
|
||||||
|
|||||||
@@ -52,5 +52,5 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
document.addEventListener('pjax:success', scrollToMark);
|
document.addEventListener('pjax:success', scrollToMark);
|
||||||
};
|
};
|
||||||
|
|
||||||
init(CONFIG.bookmark.save);
|
init(NexT.CONFIG.bookmark.save);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
element.addEventListener('click', () => {
|
element.addEventListener('click', () => {
|
||||||
commentButton.forEach(active => active.classList.toggle('active', active === element));
|
commentButton.forEach(active => active.classList.toggle('active', active === element));
|
||||||
document.querySelectorAll('.comment-position').forEach(active => active.classList.toggle('active', active.classList.contains(commentClass)));
|
document.querySelectorAll('.comment-position').forEach(active => active.classList.toggle('active', active.classList.contains(commentClass)));
|
||||||
if (CONFIG.comments.storage) {
|
if (NexT.CONFIG.comments.storage) {
|
||||||
localStorage.setItem('comments_active', commentClass);
|
localStorage.setItem('comments_active', commentClass);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
let { activeClass } = CONFIG.comments;
|
let { activeClass } = NexT.CONFIG.comments;
|
||||||
if (CONFIG.comments.storage) {
|
if (NexT.CONFIG.comments.storage) {
|
||||||
activeClass = localStorage.getItem('comments_active') || activeClass;
|
activeClass = localStorage.getItem('comments_active') || activeClass;
|
||||||
}
|
}
|
||||||
if (activeClass) {
|
if (activeClass) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/* global CONFIG */
|
/* global CONFIG */
|
||||||
|
|
||||||
window.addEventListener('tabs:register', () => {
|
window.addEventListener('tabs:register', () => {
|
||||||
let { activeClass } = CONFIG.comments;
|
let { activeClass } = NexT.CONFIG.comments;
|
||||||
if (CONFIG.comments.storage) {
|
if (NexT.CONFIG.comments.storage) {
|
||||||
activeClass = localStorage.getItem('comments_active') || activeClass;
|
activeClass = localStorage.getItem('comments_active') || activeClass;
|
||||||
}
|
}
|
||||||
if (activeClass) {
|
if (activeClass) {
|
||||||
@@ -12,7 +12,7 @@ window.addEventListener('tabs:register', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (CONFIG.comments.storage) {
|
if (NexT.CONFIG.comments.storage) {
|
||||||
window.addEventListener('tabs:click', event => {
|
window.addEventListener('tabs:click', event => {
|
||||||
if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
|
if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
|
||||||
const commentClass = event.target.classList[1];
|
const commentClass = event.target.classList[1];
|
||||||
|
|||||||
@@ -1,51 +1,67 @@
|
|||||||
if (!window.NexT) window.NexT = {};
|
if (!window.NexT) window.NexT = {};
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
const className = 'next-config';
|
||||||
|
|
||||||
const siteConfig = {
|
const staticConfig = {};
|
||||||
"hostname" : "{{ .Site.BaseURL }}",
|
let variableConfig = {};
|
||||||
"root" : "/",
|
|
||||||
"images" : "{{ .Site.Params.images }}",
|
const parse = text => JSON.parse(text || '{}');
|
||||||
"scheme" : "{{ .Site.Params.scheme }}",
|
|
||||||
"darkmode" : {{ .Site.Params.darkmode }},
|
const update = name => {
|
||||||
"version" : "{{ .Site.Data.config.version }}",
|
const targetEle = document.querySelector(`.${className}[data-name="${name}"]`);
|
||||||
"sidebar" : {{ .Site.Params.sidebar | jsonify }},
|
if (!targetEle) return;
|
||||||
"copybtn" : {{ .Site.Params.codeblock.copyBtn }},
|
const parsedConfig = parse(targetEle.text);
|
||||||
"bookmark" : {{ .Site.Params.bookmark | jsonify }},
|
if (name === 'main') {
|
||||||
"comments" : {{ .Site.Params.comments | jsonify }},
|
Object.assign(staticConfig, parsedConfig);
|
||||||
"lazyload" : {{ .Site.Params.lazyload }},
|
} else {
|
||||||
"pangu" : {{ .Site.Params.pangu }},
|
variableConfig[name] = parsedConfig;
|
||||||
"stickytabs" : {{ .Site.Params.tabs.sticky }},
|
|
||||||
"motion" : {{ .Site.Params.motion | jsonify }},
|
|
||||||
// TODO Find prismjs
|
|
||||||
//"prism" : "",
|
|
||||||
"i18n" : {
|
|
||||||
"placeholder" : "",
|
|
||||||
"empty" : "${query}",
|
|
||||||
"hits_time" : "'${hits}', '${time}'",
|
|
||||||
"hits" : "${hits}"
|
|
||||||
},
|
|
||||||
{{- if .Site.Params.algoliaSearch.enable }}
|
|
||||||
// TODO
|
|
||||||
"algolia" : {
|
|
||||||
"appID" : "",
|
|
||||||
"apiKey" : "",
|
|
||||||
"indexName" : "",
|
|
||||||
"hits" : ""
|
|
||||||
}
|
}
|
||||||
{{- end }}
|
|
||||||
{{- if .Site.Params.localSearch.enable }}
|
|
||||||
// TODO
|
|
||||||
"path" : "/search.json",
|
|
||||||
"localsearch": {{ .Site.Params.localSearch | jsonify }},
|
|
||||||
{{- end }}
|
|
||||||
"lang" : "{{ .Site.LanguageCode }}",
|
|
||||||
"permalink" : "{{ .Page.Permalink | absURL }}",
|
|
||||||
"title" : "{{ .Page.Title }}",
|
|
||||||
"isHome" : {{ .IsHome }},
|
|
||||||
"isPage" : {{ .IsPage }}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
window.CONFIG = new Proxy(siteConfig, {});
|
update('main');
|
||||||
|
|
||||||
|
window.NexT.CONFIG = new Proxy({}, {
|
||||||
|
get(overrideConfig, name) {
|
||||||
|
let existing;
|
||||||
|
if (name in staticConfig) {
|
||||||
|
existing = staticConfig[name];
|
||||||
|
} else {
|
||||||
|
if (!(name in variableConfig)) update(name);
|
||||||
|
existing = variableConfig[name];
|
||||||
|
}
|
||||||
|
|
||||||
|
// For unset override and mixable existing
|
||||||
|
if (!(name in overrideConfig) && typeof existing === 'object') {
|
||||||
|
// Get ready to mix.
|
||||||
|
overrideConfig[name] = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (name in overrideConfig) {
|
||||||
|
const override = overrideConfig[name];
|
||||||
|
|
||||||
|
// When mixable
|
||||||
|
if (typeof override === 'object' && typeof existing === 'object') {
|
||||||
|
// Mix, proxy changes to the override.
|
||||||
|
return new Proxy({ ...existing, ...override }, {
|
||||||
|
set(target, prop, value) {
|
||||||
|
target[prop] = value;
|
||||||
|
override[prop] = value;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return override;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only when not mixable and override hasn't been set.
|
||||||
|
return existing;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// document.addEventListener('pjax:success', () => {
|
||||||
|
// variableConfig = {};
|
||||||
|
// });
|
||||||
})();
|
})();
|
||||||
@@ -10,12 +10,12 @@ NexT.motion.integrator = {
|
|||||||
},
|
},
|
||||||
add: function(fn) {
|
add: function(fn) {
|
||||||
const sequence = fn();
|
const sequence = fn();
|
||||||
if (CONFIG.motion.async) this.queue.push(sequence);
|
if (NexT.CONFIG.motion.async) this.queue.push(sequence);
|
||||||
else this.queue = this.queue.concat(sequence);
|
else this.queue = this.queue.concat(sequence);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
bootstrap: function() {
|
bootstrap: function() {
|
||||||
if (!CONFIG.motion.async) this.queue = [this.queue];
|
if (!NexT.CONFIG.motion.async) this.queue = [this.queue];
|
||||||
this.queue.forEach(sequence => {
|
this.queue.forEach(sequence => {
|
||||||
const timeline = window.anime.timeline({
|
const timeline = window.anime.timeline({
|
||||||
duration: 200,
|
duration: 200,
|
||||||
@@ -52,12 +52,12 @@ NexT.motion.middleWares = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushToSequence('header.header');
|
pushToSequence('header.header');
|
||||||
CONFIG.scheme === 'Mist' && getMistLineSettings('.logo-line');
|
NexT.CONFIG.scheme === 'Mist' && getMistLineSettings('.logo-line');
|
||||||
CONFIG.scheme === 'Muse' && pushToSequence('.custom-logo-image');
|
NexT.CONFIG.scheme === 'Muse' && pushToSequence('.custom-logo-image');
|
||||||
pushToSequence('.site-title');
|
pushToSequence('.site-title');
|
||||||
pushToSequence('.site-brand-container .toggle', true);
|
pushToSequence('.site-brand-container .toggle', true);
|
||||||
pushToSequence('.site-subtitle');
|
pushToSequence('.site-subtitle');
|
||||||
(CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && pushToSequence('.custom-logo-image');
|
(NexT.CONFIG.scheme === 'Pisces' || NexT.CONFIG.scheme === 'Gemini') && pushToSequence('.custom-logo-image');
|
||||||
|
|
||||||
document.querySelectorAll('.menu-item').forEach(targets => {
|
document.querySelectorAll('.menu-item').forEach(targets => {
|
||||||
sequence.push({
|
sequence.push({
|
||||||
@@ -82,7 +82,7 @@ NexT.motion.middleWares = {
|
|||||||
|
|
||||||
postList: function() {
|
postList: function() {
|
||||||
const sequence = [];
|
const sequence = [];
|
||||||
const { postblock, postheader, postbody, collheader } = CONFIG.motion.transition;
|
const { postblock, postheader, postbody, collheader } = NexT.CONFIG.motion.transition;
|
||||||
|
|
||||||
function animate(animation, selector) {
|
function animate(animation, selector) {
|
||||||
if (!animation) return;
|
if (!animation) return;
|
||||||
@@ -95,7 +95,7 @@ NexT.motion.middleWares = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
animate(postblock, '.post-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');
|
||||||
animate(postbody, '.post-body');
|
animate(postbody, '.post-body');
|
||||||
@@ -105,9 +105,9 @@ NexT.motion.middleWares = {
|
|||||||
|
|
||||||
sidebar: function() {
|
sidebar: function() {
|
||||||
const sidebar = document.querySelector('.sidebar');
|
const sidebar = document.querySelector('.sidebar');
|
||||||
const sidebarTransition = CONFIG.motion.transition.sidebar;
|
const sidebarTransition = NexT.CONFIG.motion.transition.sidebar;
|
||||||
// Only for Pisces | Gemini.
|
// Only for Pisces | Gemini.
|
||||||
if (sidebarTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini')) {
|
if (sidebarTransition && (NexT.CONFIG.scheme === 'Pisces' || NexT.CONFIG.scheme === 'Gemini')) {
|
||||||
return [{
|
return [{
|
||||||
targets : sidebar,
|
targets : sidebar,
|
||||||
complete: () => sidebar.classList.add('animated', sidebarTransition)
|
complete: () => sidebar.classList.add('animated', sidebarTransition)
|
||||||
|
|||||||
@@ -2,10 +2,14 @@
|
|||||||
|
|
||||||
NexT.boot = {};
|
NexT.boot = {};
|
||||||
|
|
||||||
|
NexT.boot.activeThemeMode = function(){
|
||||||
|
NexT.utils.activeThemeMode();
|
||||||
|
};
|
||||||
|
|
||||||
NexT.boot.registerEvents = function() {
|
NexT.boot.registerEvents = function() {
|
||||||
|
|
||||||
NexT.utils.registerScrollPercent();
|
NexT.utils.registerScrollPercent();
|
||||||
NexT.utils.registerCanIUseTag();
|
// NexT.utils.registerCanIUseTag();
|
||||||
|
|
||||||
// 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 => {
|
||||||
@@ -33,33 +37,46 @@ NexT.boot.registerEvents = function() {
|
|||||||
|
|
||||||
NexT.boot.refresh = function() {
|
NexT.boot.refresh = function() {
|
||||||
|
|
||||||
|
NexT.utils.calSiteInfo();
|
||||||
|
NexT.utils.regSwitchThemeBtn();
|
||||||
|
|
||||||
|
if (!NexT.CONFIG.page.isPage) return;
|
||||||
|
|
||||||
|
NexT.utils.registerSidebarTOC();
|
||||||
|
|
||||||
|
NexT.utils.replacePostCRLink();
|
||||||
|
NexT.utils.registerCopyCode();
|
||||||
|
NexT.utils.registerPostReward();
|
||||||
|
if(NexT.CONFIG.page.comments) {
|
||||||
|
NexT.utils.initCommontesDispaly();
|
||||||
|
NexT.utils.registerCommonSwitch();
|
||||||
|
NexT.utils.domAddClass('#goto-comments', 'goto-comments-on');
|
||||||
|
} else {
|
||||||
|
NexT.utils.hideCommontes();
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO
|
||||||
/**
|
/**
|
||||||
* Register JS handlers by condition option.
|
* Register JS handlers by condition option.
|
||||||
* Need to add config option in Front-End at 'scripts/helpers/next-config.js' file.
|
* Need to add config option in Front-End at 'scripts/helpers/next-config.js' file.
|
||||||
*/
|
*/
|
||||||
//CONFIG.prism && window.Prism.highlightAll();
|
//NexT.CONFIG.prism && window.Prism.highlightAll();
|
||||||
/*CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', {
|
/*NexT.CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', {
|
||||||
background: 'var(--content-bg-color)'
|
background: 'var(--content-bg-color)'
|
||||||
});*/
|
});*/
|
||||||
CONFIG.lazyload && window.lozad('.post-body img').observe();
|
// NexT.CONFIG.lazyload && window.lozad('.post-body img').observe();
|
||||||
CONFIG.pangu && window.pangu.spacingPage();
|
// NexT.CONFIG.pangu && window.pangu.spacingPage();
|
||||||
|
/*NexT.utils.registerTabsTag();
|
||||||
CONFIG.isPage && NexT.utils.replacePostCRLink();
|
NexT.utils.registerActiveMenuItem();
|
||||||
CONFIG.isPage && CONFIG.copybtn && NexT.utils.registerCopyCode();
|
|
||||||
NexT.utils.registerTabsTag();
|
|
||||||
/*NexT.utils.registerActiveMenuItem();
|
|
||||||
NexT.utils.registerLangSelect();*/
|
NexT.utils.registerLangSelect();*/
|
||||||
CONFIG.isPage && NexT.utils.registerSidebarTOC();
|
/*NexT.utils.wrapTableWithBox();
|
||||||
CONFIG.isPage && NexT.utils.registerPostReward();
|
NexT.utils.registerVideoIframe();*/
|
||||||
CONFIG.isPage && NexT.utils.initCommontesDispaly();
|
|
||||||
CONFIG.isPage && NexT.utils.registerCommonSwitch();
|
|
||||||
NexT.utils.wrapTableWithBox();
|
|
||||||
NexT.utils.registerVideoIframe();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NexT.boot.motion = function() {
|
NexT.boot.motion = function() {
|
||||||
// Define Motion Sequence & Bootstrap Motion.
|
// Define Motion Sequence & Bootstrap Motion.
|
||||||
if (CONFIG.motion.enable) {
|
if (NexT.CONFIG.motion.enable) {
|
||||||
NexT.motion.integrator
|
NexT.motion.integrator
|
||||||
.add(NexT.motion.middleWares.header)
|
.add(NexT.motion.middleWares.header)
|
||||||
.add(NexT.motion.middleWares.postList)
|
.add(NexT.motion.middleWares.postList)
|
||||||
@@ -71,7 +88,8 @@ NexT.boot.motion = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
NexT.boot.activeThemeMode();
|
||||||
NexT.boot.registerEvents();
|
NexT.boot.registerEvents();
|
||||||
NexT.boot.refresh();
|
|
||||||
NexT.boot.motion();
|
NexT.boot.motion();
|
||||||
|
NexT.boot.refresh();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,21 +11,21 @@ const pjax = new Pjax({
|
|||||||
],
|
],
|
||||||
analytics: false,
|
analytics: false,
|
||||||
cacheBust: false,
|
cacheBust: false,
|
||||||
scrollTo : !CONFIG.bookmark.enable
|
scrollTo : !NexT.CONFIG.bookmark.enable
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('pjax:success', () => {
|
document.addEventListener('pjax:success', () => {
|
||||||
pjax.executeScripts(document.querySelectorAll('script[data-pjax]'));
|
pjax.executeScripts(document.querySelectorAll('script[data-pjax]'));
|
||||||
NexT.boot.refresh();
|
NexT.boot.refresh();
|
||||||
// Define Motion Sequence & Bootstrap Motion.
|
// Define Motion Sequence & Bootstrap Motion.
|
||||||
if (CONFIG.motion.enable) {
|
if (NexT.CONFIG.motion.enable) {
|
||||||
NexT.motion.integrator
|
NexT.motion.integrator
|
||||||
.init()
|
.init()
|
||||||
.add(NexT.motion.middleWares.subMenu)
|
.add(NexT.motion.middleWares.subMenu)
|
||||||
.add(NexT.motion.middleWares.postList)
|
.add(NexT.motion.middleWares.postList)
|
||||||
.bootstrap();
|
.bootstrap();
|
||||||
}
|
}
|
||||||
if (CONFIG.sidebar.display !== 'remove') {
|
if (NexT.CONFIG.sidebar.display !== 'remove') {
|
||||||
const hasTOC = document.querySelector('.post-toc');
|
const hasTOC = document.querySelector('.post-toc');
|
||||||
document.querySelector('.sidebar-inner').classList.toggle('sidebar-nav-active', hasTOC);
|
document.querySelector('.sidebar-inner').classList.toggle('sidebar-nav-active', hasTOC);
|
||||||
NexT.utils.activateSidebarPanel(hasTOC ? 0 : 1);
|
NexT.utils.activateSidebarPanel(hasTOC ? 0 : 1);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
const isRight = CONFIG.sidebar.position === 'right';
|
const isRight = NexT.CONFIG.sidebar.position === 'right';
|
||||||
|
|
||||||
const sidebarToggleMotion = {
|
const sidebarToggleMotion = {
|
||||||
mouse: {},
|
mouse: {},
|
||||||
@@ -46,7 +46,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
document.body.classList.remove('sidebar-active');
|
document.body.classList.remove('sidebar-active');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (CONFIG.sidebar.display !== 'remove') sidebarToggleMotion.init();
|
if (NexT.CONFIG.sidebar.display !== 'remove') sidebarToggleMotion.init();
|
||||||
|
|
||||||
function updateFooterPosition() {
|
function updateFooterPosition() {
|
||||||
const footer = document.querySelector('.footer');
|
const footer = document.querySelector('.footer');
|
||||||
|
|||||||
36
assets/js/third-party/comments/artalk.js
vendored
Normal file
36
assets/js/third-party/comments/artalk.js
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
const element = '.artalk-container';
|
||||||
|
if (!NexT.CONFIG.page.comments
|
||||||
|
|| !NexT.CONFIG.artalk
|
||||||
|
|| !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
|
const artalk_css = NexT.utils.getCDNResource(NexT.CONFIG.artalk.css);
|
||||||
|
NexT.utils.getStyle(artalk_css, null);
|
||||||
|
|
||||||
|
const artalk_js = NexT.utils.getCDNResource(NexT.CONFIG.artalk.js);
|
||||||
|
const {
|
||||||
|
site,
|
||||||
|
placeholder,
|
||||||
|
server,
|
||||||
|
} = NexT.CONFIG.artalk.cfg;
|
||||||
|
|
||||||
|
NexT.utils.loadComments(element)
|
||||||
|
.then(() => NexT.utils.getScript(artalk_js, {
|
||||||
|
}))
|
||||||
|
.then(() => {
|
||||||
|
|
||||||
|
new Artalk({
|
||||||
|
el : element,
|
||||||
|
pageKey : NexT.CONFIG.permalink,
|
||||||
|
pageTitle : NexT.CONFIG.title,
|
||||||
|
server : server,
|
||||||
|
site : site,
|
||||||
|
locale : NexT.CONFIG.lang,
|
||||||
|
placeholder : placeholder,
|
||||||
|
darkMode : 'auto'
|
||||||
|
});
|
||||||
|
|
||||||
|
NexT.utils.hiddeLodingCmp(element);
|
||||||
|
});
|
||||||
|
});
|
||||||
39
assets/js/third-party/comments/changyan.js
vendored
39
assets/js/third-party/comments/changyan.js
vendored
@@ -1,39 +0,0 @@
|
|||||||
/* global NexT, CONFIG */
|
|
||||||
|
|
||||||
document.addEventListener('page:loaded', () => {
|
|
||||||
const { appid, appkey } = CONFIG.changyan;
|
|
||||||
const mainJs = 'https://cy-cdn.kuaizhan.com/upload/changyan.js';
|
|
||||||
const countJs = `https://cy-cdn.kuaizhan.com/upload/plugins/plugins.list.count.js?clientId=${appid}`;
|
|
||||||
|
|
||||||
// Get the number of comments
|
|
||||||
setTimeout(() => {
|
|
||||||
return NexT.utils.getScript(countJs, {
|
|
||||||
attributes: {
|
|
||||||
async: true,
|
|
||||||
id : 'cy_cmt_num'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 0);
|
|
||||||
|
|
||||||
// When scroll to comment section
|
|
||||||
if (CONFIG.page.comments && !CONFIG.page.isHome) {
|
|
||||||
NexT.utils.loadComments('#SOHUCS')
|
|
||||||
.then(() => {
|
|
||||||
return NexT.utils.getScript(mainJs, {
|
|
||||||
attributes: {
|
|
||||||
async: true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
window.changyan.api.config({
|
|
||||||
appid,
|
|
||||||
conf: appkey
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.error('Failed to load Changyan', error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
41
assets/js/third-party/comments/disqus.js
vendored
41
assets/js/third-party/comments/disqus.js
vendored
@@ -1,41 +0,0 @@
|
|||||||
/* global NexT, CONFIG, DISQUS */
|
|
||||||
|
|
||||||
document.addEventListener('page:loaded', () => {
|
|
||||||
|
|
||||||
if (CONFIG.disqus.count) {
|
|
||||||
const loadCount = () => {
|
|
||||||
NexT.utils.getScript(`https://${CONFIG.disqus.shortname}.disqus.com/count.js`, {
|
|
||||||
attributes: { id: 'dsq-count-scr' }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// defer loading until the whole page loading is completed
|
|
||||||
window.addEventListener('load', loadCount, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CONFIG.page.comments) {
|
|
||||||
// `disqus_config` should be a global variable
|
|
||||||
// See https://help.disqus.com/en/articles/1717084-javascript-configuration-variables
|
|
||||||
window.disqus_config = function() {
|
|
||||||
this.page.url = CONFIG.page.permalink;
|
|
||||||
this.page.identifier = CONFIG.page.path;
|
|
||||||
this.page.title = CONFIG.page.title;
|
|
||||||
if (CONFIG.disqus.i18n.disqus !== 'disqus') {
|
|
||||||
this.language = CONFIG.disqus.i18n.disqus;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
NexT.utils.loadComments('#disqus_thread').then(() => {
|
|
||||||
if (window.DISQUS) {
|
|
||||||
DISQUS.reset({
|
|
||||||
reload: true,
|
|
||||||
config: window.disqus_config
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
NexT.utils.getScript(`https://${CONFIG.disqus.shortname}.disqus.com/embed.js`, {
|
|
||||||
attributes: { dataset: { timestamp: '' + +new Date() } }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
18
assets/js/third-party/comments/disqusjs.js
vendored
18
assets/js/third-party/comments/disqusjs.js
vendored
@@ -1,18 +0,0 @@
|
|||||||
/* global NexT, CONFIG, DisqusJS */
|
|
||||||
|
|
||||||
document.addEventListener('page:loaded', () => {
|
|
||||||
if (!CONFIG.page.comments) return;
|
|
||||||
|
|
||||||
NexT.utils.loadComments('#disqus_thread')
|
|
||||||
.then(() => NexT.utils.getScript(CONFIG.disqusjs.js, { condition: window.DisqusJS }))
|
|
||||||
.then(() => {
|
|
||||||
window.dsqjs = new DisqusJS({
|
|
||||||
api : CONFIG.disqusjs.api || 'https://disqus.com/api/',
|
|
||||||
apikey : CONFIG.disqusjs.apikey,
|
|
||||||
shortname : CONFIG.disqusjs.shortname,
|
|
||||||
url : CONFIG.page.permalink,
|
|
||||||
identifier: CONFIG.page.path,
|
|
||||||
title : CONFIG.page.title
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
41
assets/js/third-party/comments/giscus.js
vendored
Normal file
41
assets/js/third-party/comments/giscus.js
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
const element = '.giscus-container';
|
||||||
|
if (!NexT.CONFIG.page.comments
|
||||||
|
|| !NexT.CONFIG.giscus
|
||||||
|
|| !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
|
const {
|
||||||
|
category,
|
||||||
|
categoryid,
|
||||||
|
emit,
|
||||||
|
inputposition,
|
||||||
|
mapping,
|
||||||
|
reactions,
|
||||||
|
repo,
|
||||||
|
repoid,
|
||||||
|
theme } = NexT.CONFIG.giscus.cfg;
|
||||||
|
|
||||||
|
|
||||||
|
NexT.utils.loadComments(element)
|
||||||
|
.then(() => NexT.utils.getScript(NexT.CONFIG.giscus.js, {
|
||||||
|
attributes: {
|
||||||
|
'async' : true,
|
||||||
|
'crossorigin' : 'anonymous',
|
||||||
|
'data-repo' : repo,
|
||||||
|
'data-repo-id' : repoid,
|
||||||
|
'data-category' : category,
|
||||||
|
'data-category-id' : categoryid,
|
||||||
|
'data-mapping' : mapping,
|
||||||
|
'data-reactions-enabled' : reactions ? 1:0,
|
||||||
|
'data-emit-metadata' : emit ? 1:0,
|
||||||
|
'data-input-position' : inputposition,
|
||||||
|
'data-theme' : theme,
|
||||||
|
'data-lang' : NexT.CONFIG.lang,
|
||||||
|
'data-loading' : 'lazy'
|
||||||
|
},
|
||||||
|
parentNode: document.querySelector(element)
|
||||||
|
}));
|
||||||
|
|
||||||
|
NexT.utils.hiddeLodingCmp(element);
|
||||||
|
});
|
||||||
24
assets/js/third-party/comments/gitalk.js
vendored
24
assets/js/third-party/comments/gitalk.js
vendored
@@ -1,24 +0,0 @@
|
|||||||
/* global NexT, CONFIG, Gitalk */
|
|
||||||
|
|
||||||
document.addEventListener('page:loaded', () => {
|
|
||||||
if (!CONFIG.page.comments) return;
|
|
||||||
|
|
||||||
NexT.utils.loadComments('.gitalk-container')
|
|
||||||
.then(() => NexT.utils.getScript(CONFIG.gitalk.js, {
|
|
||||||
condition: window.Gitalk
|
|
||||||
}))
|
|
||||||
.then(() => {
|
|
||||||
const gitalk = new Gitalk({
|
|
||||||
clientID : CONFIG.gitalk.client_id,
|
|
||||||
clientSecret : CONFIG.gitalk.client_secret,
|
|
||||||
repo : CONFIG.gitalk.repo,
|
|
||||||
owner : CONFIG.gitalk.github_id,
|
|
||||||
admin : [CONFIG.gitalk.admin_user],
|
|
||||||
id : CONFIG.gitalk.path_md5,
|
|
||||||
proxy : CONFIG.gitalk.proxy,
|
|
||||||
language : CONFIG.gitalk.language || window.navigator.language,
|
|
||||||
distractionFreeMode: CONFIG.gitalk.distraction_free_mode
|
|
||||||
});
|
|
||||||
gitalk.render(document.querySelector('.gitalk-container'));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
15
assets/js/third-party/comments/isso.js
vendored
15
assets/js/third-party/comments/isso.js
vendored
@@ -1,15 +0,0 @@
|
|||||||
/* global NexT, CONFIG */
|
|
||||||
|
|
||||||
document.addEventListener('page:loaded', () => {
|
|
||||||
if (!CONFIG.page.comments) return;
|
|
||||||
|
|
||||||
NexT.utils.loadComments('#isso-thread')
|
|
||||||
.then(() => NexT.utils.getScript(`${CONFIG.isso}js/embed.min.js`, {
|
|
||||||
attributes: {
|
|
||||||
dataset: {
|
|
||||||
isso: `${CONFIG.isso}`
|
|
||||||
}
|
|
||||||
},
|
|
||||||
parentNode: document.querySelector('#isso-thread')
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
25
assets/js/third-party/comments/livere.js
vendored
25
assets/js/third-party/comments/livere.js
vendored
@@ -1,19 +1,18 @@
|
|||||||
/* global NexT, CONFIG, LivereTower */
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
document.addEventListener('page:loaded', () => {
|
const element = '#lv-container';
|
||||||
if (!CONFIG.page.comments) return;
|
if (!NexT.CONFIG.page.comments
|
||||||
|
|| !NexT.CONFIG.livere
|
||||||
|
|| !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
NexT.utils.loadComments('#lv-container').then(() => {
|
NexT.utils.loadComments(element).then(() => {
|
||||||
window.livereOptions = {
|
NexT.utils.getScript(NexT.CONFIG.livere.js, {
|
||||||
refer: CONFIG.page.path.replace(/index\.html$/, '')
|
|
||||||
};
|
|
||||||
|
|
||||||
if (typeof LivereTower === 'function') return;
|
|
||||||
|
|
||||||
NexT.utils.getScript('https://cdn-city.livere.com/js/embed.dist.js', {
|
|
||||||
attributes: {
|
attributes: {
|
||||||
async: true
|
async: true
|
||||||
}
|
},
|
||||||
});
|
parentNode: document.querySelector(element)
|
||||||
|
});
|
||||||
|
|
||||||
|
NexT.utils.hiddeLodingCmp(element);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
32
assets/js/third-party/comments/utterances.js
vendored
32
assets/js/third-party/comments/utterances.js
vendored
@@ -1,17 +1,27 @@
|
|||||||
/* global NexT, CONFIG */
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
document.addEventListener('page:loaded', () => {
|
const element = '.utterances-container';
|
||||||
if (!CONFIG.page.comments) return;
|
if (!NexT.CONFIG.page.comments
|
||||||
|
|| !NexT.CONFIG.utterances
|
||||||
|
|| !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
NexT.utils.loadComments('.utterances-container')
|
const {
|
||||||
.then(() => NexT.utils.getScript('https://utteranc.es/client.js', {
|
repo,
|
||||||
|
issueterm,
|
||||||
|
label,
|
||||||
|
theme } = NexT.CONFIG.utterances.cfg;
|
||||||
|
|
||||||
|
NexT.utils.loadComments(element)
|
||||||
|
.then(() => NexT.utils.getScript(NexT.CONFIG.utterances.js, {
|
||||||
attributes: {
|
attributes: {
|
||||||
async : true,
|
'async' : true,
|
||||||
crossOrigin : 'anonymous',
|
'crossorigin' : 'anonymous',
|
||||||
'repo' : CONFIG.utterances.repo,
|
'repo' : repo,
|
||||||
'issue-term': CONFIG.utterances.issue_term,
|
'issue-term' : issueterm,
|
||||||
'theme' : CONFIG.utterances.theme
|
'theme' : theme
|
||||||
},
|
},
|
||||||
parentNode: document.querySelector('.utterances-container')
|
parentNode: document.querySelector(element)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
NexT.utils.hiddeLodingCmp(element);
|
||||||
});
|
});
|
||||||
|
|||||||
59
assets/js/third-party/comments/waline.js
vendored
Normal file
59
assets/js/third-party/comments/waline.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
const element = '.waline-container';
|
||||||
|
if (!NexT.CONFIG.page.comments
|
||||||
|
|| !NexT.CONFIG.waline
|
||||||
|
|| !NexT.utils.checkDOMExist(element)) return;
|
||||||
|
|
||||||
|
const {
|
||||||
|
emoji,
|
||||||
|
imguploader,
|
||||||
|
pageview,
|
||||||
|
placeholder,
|
||||||
|
sofa,
|
||||||
|
requiredmeta,
|
||||||
|
serverurl,
|
||||||
|
wordlimit,
|
||||||
|
reaction,
|
||||||
|
reactiontext,
|
||||||
|
reactiontitle
|
||||||
|
} = NexT.CONFIG.waline.cfg;
|
||||||
|
|
||||||
|
|
||||||
|
const waline_css = NexT.utils.getCDNResource(NexT.CONFIG.waline.css);
|
||||||
|
NexT.utils.getStyle(waline_css, null);
|
||||||
|
|
||||||
|
const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline.js);
|
||||||
|
|
||||||
|
let locale = {
|
||||||
|
placeholder : placeholder,
|
||||||
|
sofa : sofa,
|
||||||
|
reactionTitle : reactiontitle
|
||||||
|
};
|
||||||
|
|
||||||
|
reactiontext.forEach(function(value, index){
|
||||||
|
locale['reaction'+index] = value;
|
||||||
|
});
|
||||||
|
|
||||||
|
NexT.utils.loadComments(element)
|
||||||
|
.then(() => NexT.utils.getScript(waline_js, {
|
||||||
|
}))
|
||||||
|
.then(() => {
|
||||||
|
|
||||||
|
Waline.init({
|
||||||
|
locale,
|
||||||
|
el : element,
|
||||||
|
pageview : pageview,
|
||||||
|
emoji : emoji,
|
||||||
|
imageUploader : imguploader,
|
||||||
|
wordLimit : wordlimit,
|
||||||
|
requiredMeta : requiredmeta,
|
||||||
|
reaction : reaction,
|
||||||
|
serverURL : serverurl,
|
||||||
|
lang : NexT.CONFIG.lang,
|
||||||
|
dark : 'html[data-theme="dark"]'
|
||||||
|
});
|
||||||
|
|
||||||
|
NexT.utils.hiddeLodingCmp(element);
|
||||||
|
});
|
||||||
|
});
|
||||||
173
assets/js/third-party/others/google-translate.js
vendored
Normal file
173
assets/js/third-party/others/google-translate.js
vendored
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
(function () {
|
||||||
|
var gtConstEvalStartTime = new Date();
|
||||||
|
var h = this || self,
|
||||||
|
l = /^[\w+/_-]+[=]{0,2}$/,
|
||||||
|
m = null;
|
||||||
|
function n(a) {
|
||||||
|
return (a = a.querySelector && a.querySelector("script[nonce]")) && (a = a.nonce || a.getAttribute("nonce")) &&
|
||||||
|
l.test(a) ? a : ""
|
||||||
|
}
|
||||||
|
function p(a, b) {
|
||||||
|
function c() {}
|
||||||
|
c.prototype = b.prototype;
|
||||||
|
a.i = b.prototype;
|
||||||
|
a.prototype = new c;
|
||||||
|
a.prototype.constructor = a;
|
||||||
|
a.h = function (g, f, k) {
|
||||||
|
for (var e = Array(arguments.length - 2), d = 2; d < arguments.length; d++) e[d - 2] = arguments[d];
|
||||||
|
return b.prototype[f].apply(g, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function q(a) {
|
||||||
|
return a
|
||||||
|
};
|
||||||
|
function r(a) {
|
||||||
|
if (Error.captureStackTrace) Error.captureStackTrace(this, r);
|
||||||
|
else {
|
||||||
|
var b = Error().stack;
|
||||||
|
b && (this.stack = b)
|
||||||
|
}
|
||||||
|
a && (this.message = String(a))
|
||||||
|
}
|
||||||
|
p(r, Error);
|
||||||
|
r.prototype.name = "CustomError";
|
||||||
|
function u(a, b) {
|
||||||
|
a = a.split("%s");
|
||||||
|
for (var c = "", g = a.length - 1, f = 0; f < g; f++) c += a[f] + (f < b.length ? b[f] : "%s");
|
||||||
|
r.call(this, c + a[g])
|
||||||
|
}
|
||||||
|
p(u, r);
|
||||||
|
u.prototype.name = "AssertionError";
|
||||||
|
function v(a, b) {
|
||||||
|
throw new u("Failure" + (a ? ": " + a : ""), Array.prototype.slice.call(arguments, 1));
|
||||||
|
};
|
||||||
|
var w;
|
||||||
|
function x(a, b) {
|
||||||
|
this.g = b === y ? a : ""
|
||||||
|
}
|
||||||
|
x.prototype.toString = function () {
|
||||||
|
return this.g + ""
|
||||||
|
};
|
||||||
|
var y = {};
|
||||||
|
function z(a) {
|
||||||
|
var b = document.getElementsByTagName("head")[0];
|
||||||
|
b || (b = document.body.parentNode.appendChild(document.createElement("head")));
|
||||||
|
b.appendChild(a)
|
||||||
|
}
|
||||||
|
function _loadJs(a) {
|
||||||
|
var b = document;
|
||||||
|
var c = "SCRIPT";
|
||||||
|
"application/xhtml+xml" === b.contentType && (c = c.toLowerCase());
|
||||||
|
c = b.createElement(c);
|
||||||
|
c.type = "text/javascript";
|
||||||
|
c.charset = "UTF-8";
|
||||||
|
if (void 0 === w) {
|
||||||
|
b = null;
|
||||||
|
var g = h.trustedTypes;
|
||||||
|
if (g && g.createPolicy) {
|
||||||
|
try {
|
||||||
|
b = g.createPolicy("goog#html", {
|
||||||
|
createHTML: q,
|
||||||
|
createScript: q,
|
||||||
|
createScriptURL: q
|
||||||
|
})
|
||||||
|
} catch (t) {
|
||||||
|
h.console && h.console.error(t.message)
|
||||||
|
}
|
||||||
|
w = b
|
||||||
|
} else w = b
|
||||||
|
}
|
||||||
|
a = (b = w) ? b.createScriptURL(a) : a;
|
||||||
|
a = new x(a, y);
|
||||||
|
a: {
|
||||||
|
try {
|
||||||
|
var f = c && c.ownerDocument,
|
||||||
|
k = f && (f.defaultView || f.parentWindow);
|
||||||
|
k = k || h;
|
||||||
|
if (k.Element && k.Location) {
|
||||||
|
var e = k;
|
||||||
|
break a
|
||||||
|
}
|
||||||
|
} catch (t) {}
|
||||||
|
e = null
|
||||||
|
}
|
||||||
|
if (e && "undefined" != typeof e.HTMLScriptElement && (!c || !(c instanceof e.HTMLScriptElement) && (c instanceof e
|
||||||
|
.Location || c instanceof e.Element))) {
|
||||||
|
e = typeof c;
|
||||||
|
if ("object" == e && null != c || "function" == e) try {
|
||||||
|
var d = c.constructor.displayName || c.constructor.name || Object.prototype.toString.call(c)
|
||||||
|
} catch (t) {
|
||||||
|
d = "<object could not be stringified>"
|
||||||
|
} else d = void 0 === c ? "undefined" : null === c ? "null" : typeof c;
|
||||||
|
v("Argument is not a %s (or a non-Element, non-Location mock); got: %s",
|
||||||
|
"HTMLScriptElement", d)
|
||||||
|
}
|
||||||
|
a instanceof x && a.constructor === x ? d = a.g : (d = typeof a, v(
|
||||||
|
"expected object of type TrustedResourceUrl, got '" + a + "' of type " + ("object" != d ? d : a ?
|
||||||
|
Array.isArray(a) ? "array" : d : "null")), d = "type_error:TrustedResourceUrl");
|
||||||
|
c.src = d;
|
||||||
|
(d = c.ownerDocument && c.ownerDocument.defaultView) && d != h ? d = n(d.document) : (null === m && (m = n(
|
||||||
|
h.document)), d = m);
|
||||||
|
d && c.setAttribute("nonce", d);
|
||||||
|
z(c)
|
||||||
|
}
|
||||||
|
function _loadCss(a) {
|
||||||
|
var b = document.createElement("link");
|
||||||
|
b.type = "text/css";
|
||||||
|
b.rel = "stylesheet";
|
||||||
|
b.charset = "UTF-8";
|
||||||
|
b.href = a;
|
||||||
|
z(b)
|
||||||
|
}
|
||||||
|
function _isNS(a) {
|
||||||
|
a = a.split(".");
|
||||||
|
for (var b = window, c = 0; c < a.length; ++c)
|
||||||
|
if (!(b = b[a[c]])) return !1;
|
||||||
|
return !0
|
||||||
|
}
|
||||||
|
function _setupNS(a) {
|
||||||
|
a = a.split(".");
|
||||||
|
for (var b = window, c = 0; c < a.length; ++c) b.hasOwnProperty ? b.hasOwnProperty(a[c]) ? b = b[a[c]] : b =
|
||||||
|
b[a[c]] = {} : b = b[a[c]] || (b[a[c]] = {});
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
window.addEventListener && "undefined" == typeof document.readyState && window.addEventListener(
|
||||||
|
"DOMContentLoaded",
|
||||||
|
function () {
|
||||||
|
document.readyState = "complete"
|
||||||
|
}, !1);
|
||||||
|
if (_isNS('google.translate.Element')) {
|
||||||
|
return
|
||||||
|
}(function () {
|
||||||
|
var c = _setupNS('google.translate._const');
|
||||||
|
c._cest = gtConstEvalStartTime;
|
||||||
|
gtConstEvalStartTime = undefined;
|
||||||
|
c._cl = navigator.language || navigator.userLanguage;
|
||||||
|
c._cuc = 'googleTranslateElementInit';
|
||||||
|
c._cac = '';
|
||||||
|
c._cam = '';
|
||||||
|
c._ctkk = '449649.3822363247';
|
||||||
|
var h = 'translate.googleapis.com';
|
||||||
|
var s = (true ? 'https' : window.location.protocol == 'https:' ? 'https' : 'http') + '://';
|
||||||
|
var b = s + h;
|
||||||
|
c._pah = h;
|
||||||
|
c._pas = s;
|
||||||
|
// c._pbi = b + '/translate_static/img/te_bk.gif';
|
||||||
|
c._pbi = '';
|
||||||
|
c._pci = b + '/translate_static/img/te_ctrl3.gif';
|
||||||
|
c._pli = b + '/translate_static/img/loading.gif';
|
||||||
|
c._plla = h + '/translate_a/l';
|
||||||
|
c._pmi = b + '/translate_static/img/mini_google.png';
|
||||||
|
c._ps = window.translateelement_styles;
|
||||||
|
c._puh = 'translate.google.cn';
|
||||||
|
_loadCss(c._ps);
|
||||||
|
_loadJs(b + `/translate_static/js/element/main_${navigator.language || navigator.userLanguage}.js`);
|
||||||
|
})();
|
||||||
|
})();
|
||||||
|
|
||||||
|
function googleTranslateElementInit(){
|
||||||
|
new google.translate.TranslateElement({
|
||||||
|
includedLanguages: 'zh-CN,zh-TW,en,ru',
|
||||||
|
autoDisplay:false
|
||||||
|
},'google_translate_element');
|
||||||
|
}
|
||||||
130
assets/js/third-party/search/algolia-search.js
vendored
130
assets/js/third-party/search/algolia-search.js
vendored
@@ -1,130 +0,0 @@
|
|||||||
/* global instantsearch, algoliasearch, CONFIG, pjax */
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
const { indexName, appID, apiKey, hits } = CONFIG.algolia;
|
|
||||||
|
|
||||||
const search = instantsearch({
|
|
||||||
indexName,
|
|
||||||
searchClient : algoliasearch(appID, apiKey),
|
|
||||||
searchFunction: helper => {
|
|
||||||
if (document.querySelector('.search-input').value) {
|
|
||||||
helper.search();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (typeof pjax === 'object') {
|
|
||||||
search.on('render', () => {
|
|
||||||
pjax.refresh(document.querySelector('.algolia-hits'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Registering Widgets
|
|
||||||
search.addWidgets([
|
|
||||||
instantsearch.widgets.configure({
|
|
||||||
hitsPerPage: hits.per_page || 10
|
|
||||||
}),
|
|
||||||
|
|
||||||
instantsearch.widgets.searchBox({
|
|
||||||
container : '.search-input-container',
|
|
||||||
placeholder : CONFIG.i18n.placeholder,
|
|
||||||
// Hide default icons of algolia search
|
|
||||||
showReset : false,
|
|
||||||
showSubmit : false,
|
|
||||||
showLoadingIndicator: false,
|
|
||||||
cssClasses : {
|
|
||||||
input: 'search-input'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
|
|
||||||
instantsearch.widgets.stats({
|
|
||||||
container: '.algolia-stats',
|
|
||||||
templates: {
|
|
||||||
text: data => {
|
|
||||||
const stats = CONFIG.i18n.hits_time
|
|
||||||
.replace('${hits}', data.nbHits)
|
|
||||||
.replace('${time}', data.processingTimeMS);
|
|
||||||
return `<span>${stats}</span>
|
|
||||||
<img src="${CONFIG.images}/logo-algolia-nebula-blue-full.svg" alt="Algolia">`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cssClasses: {
|
|
||||||
text: 'search-stats'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
|
|
||||||
instantsearch.widgets.hits({
|
|
||||||
container : '.algolia-hits',
|
|
||||||
escapeHTML: false,
|
|
||||||
templates : {
|
|
||||||
item: data => {
|
|
||||||
const { title, excerpt, excerptStrip, contentStripTruncate } = data._highlightResult;
|
|
||||||
let result = `<a href="${data.permalink}" class="search-result-title">${title.value}</a>`;
|
|
||||||
const content = excerpt || excerptStrip || contentStripTruncate;
|
|
||||||
if (content && content.value) {
|
|
||||||
const div = document.createElement('div');
|
|
||||||
div.innerHTML = content.value;
|
|
||||||
result += `<a href="${data.permalink}"><p class="search-result">${div.textContent.substring(0, 100)}...</p></a>`;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
empty: data => {
|
|
||||||
return `<div class="algolia-hits-empty">
|
|
||||||
${CONFIG.i18n.empty.replace('${query}', data.query)}
|
|
||||||
</div>`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cssClasses: {
|
|
||||||
list: 'search-result-list'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
|
|
||||||
instantsearch.widgets.pagination({
|
|
||||||
container: '.algolia-pagination',
|
|
||||||
scrollTo : false,
|
|
||||||
showFirst: false,
|
|
||||||
showLast : false,
|
|
||||||
templates: {
|
|
||||||
first : '<i class="fa fa-angle-double-left"></i>',
|
|
||||||
last : '<i class="fa fa-angle-double-right"></i>',
|
|
||||||
previous: '<i class="fa fa-angle-left"></i>',
|
|
||||||
next : '<i class="fa fa-angle-right"></i>'
|
|
||||||
},
|
|
||||||
cssClasses: {
|
|
||||||
list : ['pagination', 'algolia-pagination'],
|
|
||||||
item : 'pagination-item',
|
|
||||||
link : 'page-number',
|
|
||||||
selectedItem: 'current',
|
|
||||||
disabledItem: 'disabled-item'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
|
|
||||||
search.start();
|
|
||||||
|
|
||||||
// Handle and trigger popup window
|
|
||||||
document.querySelectorAll('.popup-trigger').forEach(element => {
|
|
||||||
element.addEventListener('click', () => {
|
|
||||||
document.body.classList.add('search-active');
|
|
||||||
setTimeout(() => document.querySelector('.search-input').focus(), 500);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Monitor main search box
|
|
||||||
const onPopupClose = () => {
|
|
||||||
document.body.classList.remove('search-active');
|
|
||||||
};
|
|
||||||
|
|
||||||
document.querySelector('.search-pop-overlay').addEventListener('click', event => {
|
|
||||||
if (event.target === document.querySelector('.search-pop-overlay')) {
|
|
||||||
onPopupClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
document.querySelector('.popup-btn-close').addEventListener('click', onPopupClose);
|
|
||||||
document.addEventListener('pjax:success', onPopupClose);
|
|
||||||
window.addEventListener('keyup', event => {
|
|
||||||
if (event.key === 'Escape') {
|
|
||||||
onPopupClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
144
assets/js/third-party/search/algolia.js
vendored
Normal file
144
assets/js/third-party/search/algolia.js
vendored
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
/* global instantsearch, algoliasearch, CONFIG, pjax */
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
const algoiajs = NexT.utils.getCDNResource(NexT.CONFIG.algolia.js);
|
||||||
|
const instantschjs = NexT.utils.getCDNResource(NexT.CONFIG.algolia.instantjs);
|
||||||
|
|
||||||
|
NexT.utils.getScript(algoiajs, {});
|
||||||
|
NexT.utils.getScript(instantschjs, {}).then(() => {
|
||||||
|
|
||||||
|
const { indexname, appid, apikey, hits } = NexT.CONFIG.algolia.cfg;
|
||||||
|
const indexName = indexname;
|
||||||
|
|
||||||
|
const search = instantsearch({
|
||||||
|
indexName,
|
||||||
|
searchClient: algoliasearch(appid, apikey),
|
||||||
|
searchFunction: helper => {
|
||||||
|
if (document.querySelector('.search-input').value) {
|
||||||
|
helper.search();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const markKeyWords = function(content) {
|
||||||
|
return content.replaceAll("<mark>", '<mark class="search-keyword">');
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof pjax === 'object') {
|
||||||
|
search.on('render', () => {
|
||||||
|
pjax.refresh(document.querySelector('.algolia-hits'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Registering Widgets
|
||||||
|
search.addWidgets([
|
||||||
|
instantsearch.widgets.configure({
|
||||||
|
hitsPerPage: hits.perpage || 10
|
||||||
|
}),
|
||||||
|
|
||||||
|
instantsearch.widgets.searchBox({
|
||||||
|
container: '.search-input-container',
|
||||||
|
placeholder: NexT.CONFIG.i18n.placeholder,
|
||||||
|
// Hide default icons of algolia search
|
||||||
|
showReset: false,
|
||||||
|
showSubmit: false,
|
||||||
|
showLoadingIndicator: true,
|
||||||
|
cssClasses: {
|
||||||
|
input: 'search-input'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
|
instantsearch.widgets.stats({
|
||||||
|
container: '.algolia-stats',
|
||||||
|
templates: {
|
||||||
|
text: data => {
|
||||||
|
const stats = NexT.CONFIG.i18n.hits_time
|
||||||
|
.replace('${hits}', data.nbHits)
|
||||||
|
.replace('${time}', data.processingTimeMS);
|
||||||
|
return `<span>${stats}</span><img src="/imgs/algolia-logo.svg" alt="Algolia">`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cssClasses: {
|
||||||
|
text: 'search-stats'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
|
instantsearch.widgets.hits({
|
||||||
|
container: '.algolia-hits',
|
||||||
|
escapeHTML: true,
|
||||||
|
templates: {
|
||||||
|
item: data => {
|
||||||
|
const { title, content } = data._highlightResult;
|
||||||
|
let result = `<a href="${data.permalink}" class="search-result-title">${markKeyWords(title.value)}</a>`;
|
||||||
|
//const content = excerpt || excerptStrip || content;
|
||||||
|
if (content && content.value) {
|
||||||
|
const div = document.createElement('div');
|
||||||
|
div.innerHTML = markKeyWords(content.value);
|
||||||
|
result += `<a href="${data.permalink}"><p class="search-result">${div.innerHTML.substring(0, 200)}...</p></a>`;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
empty: data => {
|
||||||
|
return `<div class="algolia-hits-empty">
|
||||||
|
${NexT.CONFIG.i18n.empty.replace('${query}', data.query)}
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cssClasses: {
|
||||||
|
list: 'search-result-list'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
|
instantsearch.widgets.pagination({
|
||||||
|
container: '.algolia-pagination',
|
||||||
|
scrollTo: false,
|
||||||
|
showFirst: true,
|
||||||
|
showLast: true,
|
||||||
|
templates: {
|
||||||
|
first: '<i class="fa fa-angle-double-left"></i>',
|
||||||
|
last: '<i class="fa fa-angle-double-right"></i>',
|
||||||
|
previous: '<i class="fa fa-angle-left"></i>',
|
||||||
|
next: '<i class="fa fa-angle-right"></i>'
|
||||||
|
},
|
||||||
|
cssClasses: {
|
||||||
|
list: ['pagination', 'algolia-pagination'],
|
||||||
|
item: 'pagination-item',
|
||||||
|
link: 'page-number',
|
||||||
|
selectedItem: 'current',
|
||||||
|
disabledItem: 'disabled-item'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
|
search.start();
|
||||||
|
|
||||||
|
// Handle and trigger popup window
|
||||||
|
document.querySelectorAll('.popup-trigger').forEach(element => {
|
||||||
|
element.addEventListener('click', () => {
|
||||||
|
document.body.classList.add('search-active');
|
||||||
|
setTimeout(() => document.querySelector('.search-input').focus(), 500);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Monitor main search box
|
||||||
|
const onPopupClose = () => {
|
||||||
|
document.body.classList.remove('search-active');
|
||||||
|
};
|
||||||
|
|
||||||
|
document.querySelector('.search-pop-overlay').addEventListener('click', event => {
|
||||||
|
if (event.target === document.querySelector('.search-pop-overlay')) {
|
||||||
|
onPopupClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
document.querySelector('.popup-btn-close').addEventListener('click', onPopupClose);
|
||||||
|
document.addEventListener('pjax:success', onPopupClose);
|
||||||
|
window.addEventListener('keyup', event => {
|
||||||
|
if (event.key === 'Escape') {
|
||||||
|
onPopupClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});;
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
99
assets/js/third-party/search/local-search.js
vendored
99
assets/js/third-party/search/local-search.js
vendored
@@ -1,99 +0,0 @@
|
|||||||
/* global CONFIG, pjax, LocalSearch */
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
if (!CONFIG.path) {
|
|
||||||
// Search DB path
|
|
||||||
console.warn('`hexo-generator-searchdb` plugin is not installed!');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const localSearch = new LocalSearch({
|
|
||||||
path : CONFIG.path,
|
|
||||||
top_n_per_article: CONFIG.localsearch.top_n_per_article,
|
|
||||||
unescape : CONFIG.localsearch.unescape
|
|
||||||
});
|
|
||||||
|
|
||||||
const input = document.querySelector('.search-input');
|
|
||||||
|
|
||||||
const inputEventFunction = () => {
|
|
||||||
if (!localSearch.isfetched) return;
|
|
||||||
const searchText = input.value.trim().toLowerCase();
|
|
||||||
const keywords = searchText.split(/[-\s]+/);
|
|
||||||
const container = document.querySelector('.search-result-container');
|
|
||||||
let resultItems = [];
|
|
||||||
if (searchText.length > 0) {
|
|
||||||
// Perform local searching
|
|
||||||
resultItems = localSearch.getResultItems(keywords);
|
|
||||||
}
|
|
||||||
if (keywords.length === 1 && keywords[0] === '') {
|
|
||||||
container.classList.add('no-result');
|
|
||||||
container.innerHTML = '<div class="search-result-icon"><i class="fa fa-search fa-5x"></i></div>';
|
|
||||||
} else if (resultItems.length === 0) {
|
|
||||||
container.classList.add('no-result');
|
|
||||||
container.innerHTML = '<div class="search-result-icon"><i class="far fa-frown fa-5x"></i></div>';
|
|
||||||
} else {
|
|
||||||
resultItems.sort((left, right) => {
|
|
||||||
if (left.includedCount !== right.includedCount) {
|
|
||||||
return right.includedCount - left.includedCount;
|
|
||||||
} else if (left.hitCount !== right.hitCount) {
|
|
||||||
return right.hitCount - left.hitCount;
|
|
||||||
}
|
|
||||||
return right.id - left.id;
|
|
||||||
});
|
|
||||||
const stats = CONFIG.i18n.hits.replace('${hits}', resultItems.length);
|
|
||||||
|
|
||||||
container.classList.remove('no-result');
|
|
||||||
container.innerHTML = `<div class="search-stats">${stats}</div>
|
|
||||||
<hr>
|
|
||||||
<ul class="search-result-list">${resultItems.map(result => result.item).join('')}</ul>`;
|
|
||||||
if (typeof pjax === 'object') pjax.refresh(container);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
localSearch.highlightSearchWords(document.querySelector('.post-body'));
|
|
||||||
if (CONFIG.localsearch.preload) {
|
|
||||||
localSearch.fetchData();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CONFIG.localsearch.trigger === 'auto') {
|
|
||||||
input.addEventListener('input', inputEventFunction);
|
|
||||||
} else {
|
|
||||||
document.querySelector('.search-icon').addEventListener('click', inputEventFunction);
|
|
||||||
input.addEventListener('keypress', event => {
|
|
||||||
if (event.key === 'Enter') {
|
|
||||||
inputEventFunction();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
window.addEventListener('search:loaded', inputEventFunction);
|
|
||||||
|
|
||||||
// Handle and trigger popup window
|
|
||||||
document.querySelectorAll('.popup-trigger').forEach(element => {
|
|
||||||
element.addEventListener('click', () => {
|
|
||||||
document.body.classList.add('search-active');
|
|
||||||
// Wait for search-popup animation to complete
|
|
||||||
setTimeout(() => input.focus(), 500);
|
|
||||||
if (!localSearch.isfetched) localSearch.fetchData();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Monitor main search box
|
|
||||||
const onPopupClose = () => {
|
|
||||||
document.body.classList.remove('search-active');
|
|
||||||
};
|
|
||||||
|
|
||||||
document.querySelector('.search-pop-overlay').addEventListener('click', event => {
|
|
||||||
if (event.target === document.querySelector('.search-pop-overlay')) {
|
|
||||||
onPopupClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
document.querySelector('.popup-btn-close').addEventListener('click', onPopupClose);
|
|
||||||
document.addEventListener('pjax:success', () => {
|
|
||||||
localSearch.highlightSearchWords(document.querySelector('.post-body'));
|
|
||||||
onPopupClose();
|
|
||||||
});
|
|
||||||
window.addEventListener('keyup', event => {
|
|
||||||
if (event.key === 'Escape') {
|
|
||||||
onPopupClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
326
assets/js/third-party/search/local.js
vendored
Normal file
326
assets/js/third-party/search/local.js
vendored
Normal file
@@ -0,0 +1,326 @@
|
|||||||
|
/* global CONFIG, pjax, LocalSearch */
|
||||||
|
class LocalSearch {
|
||||||
|
constructor({
|
||||||
|
path = '',
|
||||||
|
unescape = false,
|
||||||
|
top_n_per_article = 1
|
||||||
|
}) {
|
||||||
|
this.path = path;
|
||||||
|
this.unescape = unescape;
|
||||||
|
this.top_n_per_article = top_n_per_article;
|
||||||
|
this.isfetched = false;
|
||||||
|
this.datas = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
getIndexByWord(words, text, caseSensitive = false) {
|
||||||
|
const index = [];
|
||||||
|
const included = new Set();
|
||||||
|
|
||||||
|
if (!caseSensitive) {
|
||||||
|
text = text.toLowerCase();
|
||||||
|
}
|
||||||
|
words.forEach(word => {
|
||||||
|
if (this.unescape) {
|
||||||
|
const div = document.createElement('div');
|
||||||
|
div.innerText = word;
|
||||||
|
word = div.innerHTML;
|
||||||
|
}
|
||||||
|
const wordLen = word.length;
|
||||||
|
if (wordLen === 0) return;
|
||||||
|
let startPosition = 0;
|
||||||
|
let position = -1;
|
||||||
|
if (!caseSensitive) {
|
||||||
|
word = word.toLowerCase();
|
||||||
|
}
|
||||||
|
while ((position = text.indexOf(word, startPosition)) > -1) {
|
||||||
|
index.push({ position, word });
|
||||||
|
included.add(word);
|
||||||
|
startPosition = position + wordLen;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// Sort index by position of keyword
|
||||||
|
index.sort((left, right) => {
|
||||||
|
if (left.position !== right.position) {
|
||||||
|
return left.position - right.position;
|
||||||
|
}
|
||||||
|
return right.word.length - left.word.length;
|
||||||
|
});
|
||||||
|
return [index, included];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Merge hits into slices
|
||||||
|
mergeIntoSlice(start, end, index) {
|
||||||
|
let item = index[0];
|
||||||
|
let { position, word } = item;
|
||||||
|
const hits = [];
|
||||||
|
const count = new Set();
|
||||||
|
while (position + word.length <= end && index.length !== 0) {
|
||||||
|
count.add(word);
|
||||||
|
hits.push({
|
||||||
|
position,
|
||||||
|
length: word.length
|
||||||
|
});
|
||||||
|
const wordEnd = position + word.length;
|
||||||
|
|
||||||
|
// Move to next position of hit
|
||||||
|
index.shift();
|
||||||
|
while (index.length !== 0) {
|
||||||
|
item = index[0];
|
||||||
|
position = item.position;
|
||||||
|
word = item.word;
|
||||||
|
if (wordEnd > position) {
|
||||||
|
index.shift();
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
hits,
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
count: count.size
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Highlight title and content
|
||||||
|
highlightKeyword(val, slice) {
|
||||||
|
let result = '';
|
||||||
|
let index = slice.start;
|
||||||
|
for (const { position, length } of slice.hits) {
|
||||||
|
result += val.substring(index, position);
|
||||||
|
index = position + length;
|
||||||
|
result += `<mark class="search-keyword">${val.substr(position, length)}</mark>`;
|
||||||
|
}
|
||||||
|
result += val.substring(index, slice.end);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
getResultItems(keywords) {
|
||||||
|
const resultItems = [];
|
||||||
|
this.datas.forEach(({ title, content, url }) => {
|
||||||
|
// The number of different keywords included in the article.
|
||||||
|
const [indexOfTitle, keysOfTitle] = this.getIndexByWord(keywords, title);
|
||||||
|
const [indexOfContent, keysOfContent] = this.getIndexByWord(keywords, content);
|
||||||
|
const includedCount = new Set([...keysOfTitle, ...keysOfContent]).size;
|
||||||
|
|
||||||
|
// Show search results
|
||||||
|
const hitCount = indexOfTitle.length + indexOfContent.length;
|
||||||
|
if (hitCount === 0) return;
|
||||||
|
|
||||||
|
const slicesOfTitle = [];
|
||||||
|
if (indexOfTitle.length !== 0) {
|
||||||
|
slicesOfTitle.push(this.mergeIntoSlice(0, title.length, indexOfTitle));
|
||||||
|
}
|
||||||
|
|
||||||
|
let slicesOfContent = [];
|
||||||
|
while (indexOfContent.length !== 0) {
|
||||||
|
const item = indexOfContent[0];
|
||||||
|
const { position } = item;
|
||||||
|
// Cut out 100 characters. The maxlength of .search-input is 80.
|
||||||
|
const start = Math.max(0, position - 20);
|
||||||
|
const end = Math.min(content.length, position + 80);
|
||||||
|
slicesOfContent.push(this.mergeIntoSlice(start, end, indexOfContent));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sort slices in content by included keywords' count and hits' count
|
||||||
|
slicesOfContent.sort((left, right) => {
|
||||||
|
if (left.count !== right.count) {
|
||||||
|
return right.count - left.count;
|
||||||
|
} else if (left.hits.length !== right.hits.length) {
|
||||||
|
return right.hits.length - left.hits.length;
|
||||||
|
}
|
||||||
|
return left.start - right.start;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Select top N slices in content
|
||||||
|
const upperBound = parseInt(this.top_n_per_article, 10);
|
||||||
|
if (upperBound >= 0) {
|
||||||
|
slicesOfContent = slicesOfContent.slice(0, upperBound);
|
||||||
|
}
|
||||||
|
|
||||||
|
let resultItem = '';
|
||||||
|
|
||||||
|
url = new URL(url, location.origin);
|
||||||
|
url.searchParams.append('highlight', keywords.join(' '));
|
||||||
|
|
||||||
|
if (slicesOfTitle.length !== 0) {
|
||||||
|
resultItem += `<li><a href="${url.href}" class="search-result-title">${this.highlightKeyword(title, slicesOfTitle[0])}</a>`;
|
||||||
|
} else {
|
||||||
|
resultItem += `<li><a href="${url.href}" class="search-result-title">${title}</a>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
slicesOfContent.forEach(slice => {
|
||||||
|
resultItem += `<a href="${url.href}"><p class="search-result">${this.highlightKeyword(content, slice)}...</p></a>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
resultItem += '</li>';
|
||||||
|
resultItems.push({
|
||||||
|
item: resultItem,
|
||||||
|
id : resultItems.length,
|
||||||
|
hitCount,
|
||||||
|
includedCount
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return resultItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
fetchData() {
|
||||||
|
const isXml = !this.path.endsWith('json');
|
||||||
|
fetch(this.path)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(res => {
|
||||||
|
// Get the contents from search data
|
||||||
|
this.isfetched = true;
|
||||||
|
this.datas = isXml ? [...new DOMParser().parseFromString(res, 'text/xml').querySelectorAll('entry')].map(element => ({
|
||||||
|
title : element.querySelector('title').textContent,
|
||||||
|
content: element.querySelector('content').textContent,
|
||||||
|
url : element.querySelector('url').textContent
|
||||||
|
})) : JSON.parse(res);
|
||||||
|
// Only match articles with non-empty titles
|
||||||
|
this.datas = this.datas.filter(data => data.title).map(data => {
|
||||||
|
data.title = data.title.trim();
|
||||||
|
data.content = data.content ? data.content.trim().replace(/<[^>]+>/g, '') : '';
|
||||||
|
data.url = decodeURIComponent(data.url).replace(/\/{2,}/g, '/');
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
// Remove loading animation
|
||||||
|
window.dispatchEvent(new Event('search:loaded'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Highlight by wrapping node in mark elements with the given class name
|
||||||
|
highlightText(node, slice, className) {
|
||||||
|
const val = node.nodeValue;
|
||||||
|
let index = slice.start;
|
||||||
|
const children = [];
|
||||||
|
for (const { position, length } of slice.hits) {
|
||||||
|
const text = document.createTextNode(val.substring(index, position));
|
||||||
|
index = position + length;
|
||||||
|
const mark = document.createElement('mark');
|
||||||
|
mark.className = className;
|
||||||
|
mark.appendChild(document.createTextNode(val.substr(position, length)));
|
||||||
|
children.push(text, mark);
|
||||||
|
}
|
||||||
|
node.nodeValue = val.substring(index, slice.end);
|
||||||
|
children.forEach(element => {
|
||||||
|
node.parentNode.insertBefore(element, node);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Highlight the search words provided in the url in the text
|
||||||
|
highlightSearchWords(body) {
|
||||||
|
const params = new URL(location.href).searchParams.get('highlight');
|
||||||
|
const keywords = params ? params.split(' ') : [];
|
||||||
|
if (!keywords.length || !body) return;
|
||||||
|
const walk = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null);
|
||||||
|
const allNodes = [];
|
||||||
|
while (walk.nextNode()) {
|
||||||
|
if (!walk.currentNode.parentNode.matches('button, select, textarea')) allNodes.push(walk.currentNode);
|
||||||
|
}
|
||||||
|
allNodes.forEach(node => {
|
||||||
|
const [indexOfNode] = this.getIndexByWord(keywords, node.nodeValue);
|
||||||
|
if (!indexOfNode.length) return;
|
||||||
|
const slice = this.mergeIntoSlice(0, node.nodeValue.length, indexOfNode);
|
||||||
|
this.highlightText(node, slice, 'search-keyword');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
if (! NexT.CONFIG.localSearch.path) {
|
||||||
|
// Search DB path
|
||||||
|
console.warn('`search indexes file` is not configurate!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const localSearch = new LocalSearch({
|
||||||
|
path : NexT.CONFIG.localSearch.path,
|
||||||
|
top_n_per_article: NexT.CONFIG.localSearch.topnperarticle,
|
||||||
|
unescape : NexT.CONFIG.localSearch.unescape
|
||||||
|
});
|
||||||
|
|
||||||
|
const input = document.querySelector('.search-input');
|
||||||
|
|
||||||
|
const inputEventFunction = () => {
|
||||||
|
if (!localSearch.isfetched) return;
|
||||||
|
const searchText = input.value.trim().toLowerCase();
|
||||||
|
const keywords = searchText.split(/[-\s]+/);
|
||||||
|
const container = document.querySelector('.search-result-container');
|
||||||
|
let resultItems = [];
|
||||||
|
if (searchText.length > 0) {
|
||||||
|
// Perform local searching
|
||||||
|
resultItems = localSearch.getResultItems(keywords);
|
||||||
|
}
|
||||||
|
if (keywords.length === 1 && keywords[0] === '') {
|
||||||
|
container.classList.add('no-result');
|
||||||
|
container.innerHTML = '<div class="search-result-icon"><i class="fa fa-search fa-5x"></i></div>';
|
||||||
|
} else if (resultItems.length === 0) {
|
||||||
|
container.classList.add('no-result');
|
||||||
|
container.innerHTML = '<div class="search-result-icon"><i class="far fa-frown fa-5x"></i></div>';
|
||||||
|
} else {
|
||||||
|
resultItems.sort((left, right) => {
|
||||||
|
if (left.includedCount !== right.includedCount) {
|
||||||
|
return right.includedCount - left.includedCount;
|
||||||
|
} else if (left.hitCount !== right.hitCount) {
|
||||||
|
return right.hitCount - left.hitCount;
|
||||||
|
}
|
||||||
|
return right.id - left.id;
|
||||||
|
});
|
||||||
|
const stats = NexT.CONFIG.i18n.hits.replace('${hits}', resultItems.length);
|
||||||
|
|
||||||
|
container.classList.remove('no-result');
|
||||||
|
container.innerHTML = `<div class="search-stats">${stats}</div>
|
||||||
|
<hr>
|
||||||
|
<ul class="search-result-list">${resultItems.map(result => result.item).join('')}</ul>`;
|
||||||
|
if (typeof pjax === 'object') pjax.refresh(container);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
localSearch.highlightSearchWords(document.querySelector('.post-body'));
|
||||||
|
if (NexT.CONFIG.localSearch.preload) {
|
||||||
|
localSearch.fetchData();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NexT.CONFIG.localSearch.trigger === 'auto') {
|
||||||
|
input.addEventListener('input', inputEventFunction);
|
||||||
|
} else {
|
||||||
|
document.querySelector('.search-icon').addEventListener('click', inputEventFunction);
|
||||||
|
input.addEventListener('keypress', event => {
|
||||||
|
if (event.key === 'Enter') {
|
||||||
|
inputEventFunction();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
window.addEventListener('search:loaded', inputEventFunction);
|
||||||
|
|
||||||
|
// Handle and trigger popup window
|
||||||
|
document.querySelectorAll('.popup-trigger').forEach(element => {
|
||||||
|
element.addEventListener('click', () => {
|
||||||
|
document.body.classList.add('search-active');
|
||||||
|
// Wait for search-popup animation to complete
|
||||||
|
setTimeout(() => input.focus(), 500);
|
||||||
|
if (!localSearch.isfetched) localSearch.fetchData();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Monitor main search box
|
||||||
|
const onPopupClose = () => {
|
||||||
|
document.body.classList.remove('search-active');
|
||||||
|
};
|
||||||
|
|
||||||
|
document.querySelector('.search-pop-overlay').addEventListener('click', event => {
|
||||||
|
if (event.target === document.querySelector('.search-pop-overlay')) {
|
||||||
|
onPopupClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
document.querySelector('.popup-btn-close').addEventListener('click', onPopupClose);
|
||||||
|
document.addEventListener('pjax:success', () => {
|
||||||
|
localSearch.highlightSearchWords(document.querySelector('.post-body'));
|
||||||
|
onPopupClose();
|
||||||
|
});
|
||||||
|
window.addEventListener('keyup', event => {
|
||||||
|
if (event.key === 'Escape') {
|
||||||
|
onPopupClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
16
assets/js/third-party/share/addthis.js
vendored
Normal file
16
assets/js/third-party/share/addthis.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
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.loadComments(element).then(() => {
|
||||||
|
NexT.utils.getScript(addthis_js, {
|
||||||
|
attributes: {
|
||||||
|
async: true
|
||||||
|
},
|
||||||
|
parentNode: document.querySelector(element)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -23,8 +23,242 @@ HTMLElement.prototype.wrap = function(wrapper) {
|
|||||||
|
|
||||||
NexT.utils = {
|
NexT.utils = {
|
||||||
|
|
||||||
|
regSwitchThemeBtn: function() {
|
||||||
|
const switchThemeBtn = document.getElementById('switch-theme');
|
||||||
|
if (!switchThemeBtn) return;
|
||||||
|
switchThemeBtn.addEventListener('click', () => {
|
||||||
|
const colorTheme = document.documentElement.getAttribute('data-theme');
|
||||||
|
NexT.utils.toggleDarkMode(!(colorTheme == 'dark'));
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
activeThemeMode: function() {
|
||||||
|
|
||||||
|
const useDark = window.matchMedia("(prefers-color-scheme: dark)");
|
||||||
|
let darkModeState = NexT.CONFIG.darkmode || useDark.matches;
|
||||||
|
const localState = NexT.utils.getLocalStorage('theme');
|
||||||
|
if (localState == 'light'
|
||||||
|
|| (localState == undefined && !NexT.CONFIG.darkmode)) {
|
||||||
|
darkModeState = false;
|
||||||
|
}
|
||||||
|
NexT.utils.toggleDarkMode(darkModeState);
|
||||||
|
|
||||||
|
useDark.addListener(function(evt) {
|
||||||
|
toggleDarkMode(evt.matches);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleDarkMode: function(state) {
|
||||||
|
if(state) {
|
||||||
|
document.documentElement.setAttribute('data-theme', 'dark');
|
||||||
|
NexT.utils.setLocalStorage('theme', 'dark', 2);
|
||||||
|
} else {
|
||||||
|
document.documentElement.setAttribute('data-theme', 'light');
|
||||||
|
NexT.utils.setLocalStorage('theme', 'light', 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
const theme = state ? 'dark' : 'light';
|
||||||
|
NexT.utils.toggleGiscusDarkMode(theme);
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleGiscusDarkMode: function(theme) {
|
||||||
|
const iframe = document.querySelector('iframe.giscus-frame');
|
||||||
|
if (iframe) {
|
||||||
|
const config = { setConfig: { theme: theme } };
|
||||||
|
iframe.contentWindow.postMessage({ giscus: config }, 'https://giscus.app');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setLocalStorage: function(key, value, ttl) {
|
||||||
|
if (ttl === 0) return;
|
||||||
|
const now = new Date();
|
||||||
|
const expiryDay = ttl * 86400000;
|
||||||
|
const item = {
|
||||||
|
value: value,
|
||||||
|
expiry: now.getTime() + expiryDay
|
||||||
|
};
|
||||||
|
localStorage.setItem(key, JSON.stringify(item));
|
||||||
|
},
|
||||||
|
|
||||||
|
getLocalStorage: function(key) {
|
||||||
|
const itemStr = localStorage.getItem(key);
|
||||||
|
if (!itemStr) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
const item = JSON.parse(itemStr);
|
||||||
|
const now = new Date();
|
||||||
|
|
||||||
|
if (now.getTime() > item.expiry) {
|
||||||
|
localStorage.removeItem(key);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return item.value;
|
||||||
|
},
|
||||||
|
|
||||||
|
domAddClass: function(selector, cls) {
|
||||||
|
const doms = document.querySelectorAll(selector);
|
||||||
|
if (doms) {
|
||||||
|
doms.forEach(dom => {
|
||||||
|
dom.classList.add(cls);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
calSiteInfo: function() {
|
||||||
|
const runtimeCount = document.getElementById('runTimes');
|
||||||
|
if (runtimeCount) {
|
||||||
|
const publishDate = runtimeCount.getAttribute('data-publishDate');
|
||||||
|
const runTimes = NexT.utils.diffDate(publishDate, 2);
|
||||||
|
runtimeCount.innerText = runTimes;
|
||||||
|
}
|
||||||
|
|
||||||
|
const wordsCount = document.getElementById('wordsCount');
|
||||||
|
if (wordsCount) {
|
||||||
|
const words = wordsCount.getAttribute('data-count');
|
||||||
|
wordsCount.innerText = NexT.utils.numberFormat(words);
|
||||||
|
}
|
||||||
|
|
||||||
|
const readTimes = document.getElementById('readTimes');
|
||||||
|
if (readTimes) {
|
||||||
|
const times = readTimes.getAttribute('data-times');
|
||||||
|
|
||||||
|
const hour = 60;
|
||||||
|
const day = hour * 24;
|
||||||
|
|
||||||
|
const daysCount = parseInt(times / day);
|
||||||
|
const hoursCount = parseInt(times / hour);
|
||||||
|
|
||||||
|
let timesLabel;
|
||||||
|
if (daysCount >= 1) {
|
||||||
|
timesLabel = daysCount + NexT.CONFIG.i18n.ds_days + parseInt((times - daysCount * day)/hour) + NexT.CONFIG.i18n.ds_hours;
|
||||||
|
} else if (hoursCount >= 1) {
|
||||||
|
timesLabel = hoursCount + NexT.CONFIG.i18n.ds_hours + (times - hoursCount * hour) + NexT.CONFIG.i18n.ds_mins;
|
||||||
|
} else {
|
||||||
|
timesLabel = times + NexT.CONFIG.i18n.ds_mins;
|
||||||
|
}
|
||||||
|
|
||||||
|
readTimes.innerText = timesLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
const lastPushDate = document.getElementById('last-push-date');
|
||||||
|
if (lastPushDate) {
|
||||||
|
const pushDateVal = NexT.utils.diffDate(lastPushDate.getAttribute('data-lastPushDate'), 1);
|
||||||
|
lastPushDate.innerText = pushDateVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
const statisWidget = document.querySelectorAll('#la-siteinfo-widget span');
|
||||||
|
if (statisWidget.length > 0) {
|
||||||
|
const valIds = [0,2,4,6];
|
||||||
|
const domIds = ['today_site_pv', 'yesterday_site_pv', 'month_site_pv', 'total_site_pv']
|
||||||
|
for (var i in valIds) {
|
||||||
|
let pv = NexT.utils.numberFormat(statisWidget[valIds[i]].innerText);
|
||||||
|
document.getElementById(domIds[i]).innerText = pv;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(()=>{ NexT.utils.fmtBusuanzi(); }, 500);
|
||||||
|
},
|
||||||
|
|
||||||
|
fmtBusuanzi: function() {
|
||||||
|
const bszUV = document.getElementById('busuanzi_value_site_uv');
|
||||||
|
if (bszUV) {
|
||||||
|
bszUV.innerText = NexT.utils.numberFormat(bszUV.innerText);
|
||||||
|
}
|
||||||
|
const bszPV = document.getElementById('busuanzi_value_site_pv');
|
||||||
|
if (bszPV) {
|
||||||
|
bszPV.innerText = NexT.utils.numberFormat(bszPV.innerText);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
numberFormat: function(number) {
|
||||||
|
let result;
|
||||||
|
if (number.indexOf(',') > 0) {
|
||||||
|
number = number.replaceAll(",", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (number > 10000) {
|
||||||
|
result = (number / 10000.0).toFixed(2) + ' w';
|
||||||
|
} else if (number > 1000) {
|
||||||
|
result = (number / 1000.0).toFixed(2) + ' k';
|
||||||
|
} else {
|
||||||
|
result = number;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
diffDate: function(date, mode = 0) {
|
||||||
|
const dateNow = new Date();
|
||||||
|
const datePost = new Date(date);
|
||||||
|
const dateDiff = dateNow.getTime() - datePost.getTime();
|
||||||
|
const minute = 1000 * 60;
|
||||||
|
const hour = minute * 60;
|
||||||
|
const day = hour * 24;
|
||||||
|
const month = day * 30;
|
||||||
|
const year = month * 12;
|
||||||
|
|
||||||
|
let result;
|
||||||
|
if (mode == 1) {
|
||||||
|
const monthCount = dateDiff / month;
|
||||||
|
const dayCount = dateDiff / day;
|
||||||
|
const hourCount = dateDiff / hour;
|
||||||
|
const minuteCount = dateDiff / minute;
|
||||||
|
|
||||||
|
if (monthCount > 12) {
|
||||||
|
result = datePost.toLocaleDateString().replace(/\//g, '-');
|
||||||
|
} else if (monthCount >= 1) {
|
||||||
|
result = parseInt(monthCount) + NexT.CONFIG.i18n.ds_month;
|
||||||
|
} else if (dayCount >= 1) {
|
||||||
|
result = parseInt(dayCount) + NexT.CONFIG.i18n.ds_day;
|
||||||
|
} else if (hourCount >= 1) {
|
||||||
|
result = parseInt(hourCount) + NexT.CONFIG.i18n.ds_hour;
|
||||||
|
} else if (minuteCount >= 1) {
|
||||||
|
result = parseInt(minuteCount) + NexT.CONFIG.i18n.ds_min;
|
||||||
|
} else {
|
||||||
|
result = NexT.CONFIG.i18n.ds_just;
|
||||||
|
}
|
||||||
|
} else if (mode == 2) {
|
||||||
|
const yearCount = parseInt(dateDiff / year);
|
||||||
|
if (yearCount >= 1) {
|
||||||
|
const dayCount = parseInt((dateDiff - (yearCount * year))/day);
|
||||||
|
result = yearCount + NexT.CONFIG.i18n.ds_years + dayCount + NexT.CONFIG.i18n.ds_days;
|
||||||
|
} else {
|
||||||
|
const dayCount = parseInt(dateDiff/day);
|
||||||
|
result = dayCount + NexT.CONFIG.i18n.ds_days;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result = parseInt(dateDiff / day);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
checkDOMExist: function(selector) {
|
||||||
|
return document.querySelector(selector) != null;
|
||||||
|
},
|
||||||
|
|
||||||
|
getCDNResource: function(res) {
|
||||||
|
let { plugins, router } = NexT.CONFIG.vendor;
|
||||||
|
let { name, version, file, alias } = res;
|
||||||
|
|
||||||
|
let npm_name = name;
|
||||||
|
let res_src = '';
|
||||||
|
switch(plugins) {
|
||||||
|
case 'cdnjs':
|
||||||
|
let cdnjs_name = alias || name;
|
||||||
|
let cdnjs_file = file.replace(/\.js$/, '.min.js').replace(/^(dist|lib|source\/js|)\/(browser\/|)/, '');
|
||||||
|
res_src = `${router}/${cdnjs_name}/${version}/${cdnjs_file}`
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
res_src = `${router}/${npm_name}@${version}/${file}`
|
||||||
|
}
|
||||||
|
|
||||||
|
return res_src;
|
||||||
|
},
|
||||||
|
|
||||||
replacePostCRLink: function() {
|
replacePostCRLink: function() {
|
||||||
if (CONFIG.hostname.startsWith('http')) return;
|
if (NexT.CONFIG.hostname.startsWith('http')) return;
|
||||||
// Try to support mutli domain without base URL sets.
|
// Try to support mutli domain without base URL sets.
|
||||||
let href = window.location.href;
|
let href = window.location.href;
|
||||||
if (href.indexOf('#')>-1){
|
if (href.indexOf('#')>-1){
|
||||||
@@ -40,8 +274,10 @@ NexT.utils = {
|
|||||||
* One-click copy code support.
|
* One-click copy code support.
|
||||||
*/
|
*/
|
||||||
registerCopyCode: function() {
|
registerCopyCode: function() {
|
||||||
|
if (!NexT.CONFIG.copybtn) return;
|
||||||
|
|
||||||
let figure = document.querySelectorAll('.highlight pre');
|
let figure = document.querySelectorAll('.highlight pre');
|
||||||
if (figure.length === 0 || !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.
|
// TODO seems hard code need find other ways fixed it.
|
||||||
@@ -123,8 +359,10 @@ NexT.utils = {
|
|||||||
const contentHeight = document.body.scrollHeight - window.innerHeight;
|
const contentHeight = document.body.scrollHeight - window.innerHeight;
|
||||||
const scrollPercent = contentHeight > 0 ? Math.min(100 * window.scrollY / contentHeight, 100) : 0;
|
const scrollPercent = contentHeight > 0 ? Math.min(100 * window.scrollY / contentHeight, 100) : 0;
|
||||||
if (backToTop) {
|
if (backToTop) {
|
||||||
backToTop.classList.toggle('back-to-top-on', Math.round(scrollPercent) >= 5);
|
const scrollPercentRound = Math.round(scrollPercent)
|
||||||
backToTop.querySelector('span').innerText = Math.round(scrollPercent) + '%';
|
const isShow = scrollPercentRound >= 5;
|
||||||
|
backToTop.classList.toggle('back-to-top-on', isShow);
|
||||||
|
backToTop.querySelector('span').innerText = scrollPercentRound + '%';
|
||||||
}
|
}
|
||||||
if (readingProgressBar) {
|
if (readingProgressBar) {
|
||||||
readingProgressBar.style.setProperty('--progress', scrollPercent.toFixed(2) + '%');
|
readingProgressBar.style.setProperty('--progress', scrollPercent.toFixed(2) + '%');
|
||||||
@@ -170,13 +408,14 @@ NexT.utils = {
|
|||||||
// https://stackoverflow.com/questions/20306204/using-queryselector-with-ids-that-are-numbers
|
// https://stackoverflow.com/questions/20306204/using-queryselector-with-ids-that-are-numbers
|
||||||
const tActive = document.getElementById(element.querySelector('a').getAttribute('href').replace('#', ''));
|
const tActive = document.getElementById(element.querySelector('a').getAttribute('href').replace('#', ''));
|
||||||
[...tActive.parentNode.children].forEach(target => {
|
[...tActive.parentNode.children].forEach(target => {
|
||||||
|
// Array.prototype.slice.call(tActive.parentNode.children).forEach(target => {
|
||||||
target.classList.toggle('active', target === tActive);
|
target.classList.toggle('active', target === tActive);
|
||||||
});
|
});
|
||||||
// Trigger event
|
// Trigger event
|
||||||
tActive.dispatchEvent(new Event('tabs:click', {
|
tActive.dispatchEvent(new Event('tabs:click', {
|
||||||
bubbles: true
|
bubbles: true
|
||||||
}));
|
}));
|
||||||
if (!CONFIG.stickytabs) return;
|
if (!NexT.CONFIG.stickytabs) return;
|
||||||
const offset = nav.parentNode.getBoundingClientRect().top + window.scrollY + 10;
|
const offset = nav.parentNode.getBoundingClientRect().top + window.scrollY + 10;
|
||||||
window.anime({
|
window.anime({
|
||||||
targets : document.scrollingElement,
|
targets : document.scrollingElement,
|
||||||
@@ -204,7 +443,7 @@ NexT.utils = {
|
|||||||
/*registerActiveMenuItem: function() {
|
/*registerActiveMenuItem: function() {
|
||||||
document.querySelectorAll('.menu-item a[href]').forEach(target => {
|
document.querySelectorAll('.menu-item a[href]').forEach(target => {
|
||||||
const isSamePath = target.pathname === location.pathname || target.pathname === location.pathname.replace('index.html', '');
|
const isSamePath = target.pathname === location.pathname || target.pathname === location.pathname.replace('index.html', '');
|
||||||
const isSubPath = !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));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -212,7 +451,7 @@ NexT.utils = {
|
|||||||
registerLangSelect: function() {
|
registerLangSelect: function() {
|
||||||
const selects = document.querySelectorAll('.lang-select');
|
const selects = document.querySelectorAll('.lang-select');
|
||||||
selects.forEach(sel => {
|
selects.forEach(sel => {
|
||||||
sel.value = CONFIG.page.lang;
|
sel.value = NexT.CONFIG.page.lang;
|
||||||
sel.addEventListener('change', () => {
|
sel.addEventListener('change', () => {
|
||||||
const target = sel.options[sel.selectedIndex];
|
const target = sel.options[sel.selectedIndex];
|
||||||
document.querySelectorAll('.lang-select-label span').forEach(span => {
|
document.querySelectorAll('.lang-select-label span').forEach(span => {
|
||||||
@@ -278,6 +517,15 @@ NexT.utils = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideCommontes:function() {
|
||||||
|
document.querySelector('.post-comments').style.display = 'none';
|
||||||
|
},
|
||||||
|
|
||||||
|
hiddeLodingCmp: function(selector) {
|
||||||
|
const loadding = document.querySelector(selector).previousElementSibling;
|
||||||
|
loadding.style.display = 'none';
|
||||||
|
},
|
||||||
|
|
||||||
activateNavByIndex: function(index) {
|
activateNavByIndex: function(index) {
|
||||||
const target = document.querySelectorAll('.post-toc li a.nav-link')[index];
|
const target = document.querySelectorAll('.post-toc li a.nav-link')[index];
|
||||||
if (!target || target.classList.contains('active-current')) return;
|
if (!target || target.classList.contains('active-current')) return;
|
||||||
@@ -303,13 +551,13 @@ NexT.utils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateSidebarPosition: function() {
|
updateSidebarPosition: function() {
|
||||||
if (window.innerWidth < 992 || CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return;
|
if (window.innerWidth < 992 || NexT.CONFIG.scheme === 'Pisces' || NexT.CONFIG.scheme === 'Gemini') return;
|
||||||
// Expand sidebar on post detail page by default, when post has a toc.
|
// Expand sidebar on post detail page by default, when post has a toc.
|
||||||
const hasTOC = document.querySelector('.post-toc');
|
const hasTOC = document.querySelector('.post-toc');
|
||||||
let display = CONFIG.sidebar;
|
let display = NexT.CONFIG.sidebar;
|
||||||
if (typeof display !== 'boolean') {
|
if (typeof display !== 'boolean') {
|
||||||
// There's no definition sidebar in the page front-matter.
|
// There's no definition sidebar in the page front-matter.
|
||||||
display = CONFIG.sidebar.display === 'always' || (CONFIG.sidebar.display === 'post' && hasTOC);
|
display = NexT.CONFIG.sidebar.display === 'always' || (NexT.CONFIG.sidebar.display === 'post' && hasTOC);
|
||||||
}
|
}
|
||||||
if (display) {
|
if (display) {
|
||||||
window.dispatchEvent(new Event('sidebar:show'));
|
window.dispatchEvent(new Event('sidebar:show'));
|
||||||
@@ -344,6 +592,15 @@ NexT.utils = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getStyle: function(src, parent) {
|
||||||
|
const link = document.createElement('link');
|
||||||
|
link.setAttribute('rel', 'stylesheet');
|
||||||
|
link.setAttribute('type', 'text/css');
|
||||||
|
link.setAttribute('href', src);
|
||||||
|
|
||||||
|
(parent || document.head).appendChild(link);
|
||||||
|
},
|
||||||
|
|
||||||
getScript: function(src, options = {}, legacyCondition) {
|
getScript: function(src, options = {}, legacyCondition) {
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
return this.getScript(src, {
|
return this.getScript(src, {
|
||||||
@@ -362,6 +619,7 @@ NexT.utils = {
|
|||||||
} = {},
|
} = {},
|
||||||
parentNode = null
|
parentNode = null
|
||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (condition) {
|
if (condition) {
|
||||||
resolve();
|
resolve();
|
||||||
@@ -401,7 +659,7 @@ NexT.utils = {
|
|||||||
}
|
}
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const element = document.querySelector(selector);
|
const element = document.querySelector(selector);
|
||||||
if (!CONFIG.comments.lazyload || !element) {
|
if (!element) {
|
||||||
resolve();
|
resolve();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# Hugo NexT theme's custom config
|
# Hugo NexT theme's custom config
|
||||||
#
|
|
||||||
|
|
||||||
version: 4.0.0
|
version: 4.3.1
|
||||||
@@ -1,27 +1,113 @@
|
|||||||
|
# CDN 公共资源商列表
|
||||||
# Public CDN vendor list
|
# Public CDN vendor list
|
||||||
#
|
|
||||||
vendors:
|
vendors:
|
||||||
cdnjs: "//cdnjs.cloudflare.com/ajax/libs/${name}/${version}/${file}"
|
cdnjs: "https://cdnjs.cloudflare.com/ajax/libs"
|
||||||
unpkg: "//unpkg.com/${name}@${version}/${file}"
|
unpkg: "https://unpkg.com"
|
||||||
|
|
||||||
|
# JavaScript 资源
|
||||||
# Javascript Resources
|
# JavaScript Resources
|
||||||
#
|
|
||||||
js:
|
js:
|
||||||
- name: animejs
|
- name: animejs
|
||||||
version: 3.2.1
|
version: 3.2.1
|
||||||
file: lib/anime.min.js
|
file: lib/anime.min.js
|
||||||
- name: mathjax
|
|
||||||
version: 3.2.0
|
|
||||||
file: es5/tex-mml-chtml.js
|
|
||||||
|
|
||||||
|
# CSS 资源
|
||||||
# CSS Resources
|
# CSS Resources
|
||||||
#
|
|
||||||
css:
|
css:
|
||||||
- name: '@fortawesome/fontawesome-free'
|
- name: '@fortawesome/fontawesome-free'
|
||||||
version: 6.1.1
|
version: 6.1.2
|
||||||
file: css/all.min.css
|
file: css/all.min.css
|
||||||
alias: font-awesome
|
alias: font-awesome
|
||||||
- name: animate.css
|
- name: animate.css
|
||||||
version: 3.1.1
|
version: 3.1.1
|
||||||
file: animate.min.css
|
file: animate.min.css
|
||||||
|
|
||||||
|
# 第三方服务组件资源
|
||||||
|
# 3rd servcies Resource
|
||||||
|
|
||||||
|
# 站点统计
|
||||||
|
# Site analytics engine
|
||||||
|
analytics:
|
||||||
|
la: https://sdk.51.la/js-sdk-pro.min.js
|
||||||
|
laWidget: https://v6-widget.51.la/v6/laId/quote.js?theme=0&col=true&f=12&display=0,0,0,1,0,1,1,1
|
||||||
|
baidu: https://hm.baidu.com/hm.js?
|
||||||
|
google: https://www.googletagmanager.com/gtag/js?id=
|
||||||
|
busuanzi: https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js
|
||||||
|
|
||||||
|
# 文章分享
|
||||||
|
# Share
|
||||||
|
addthis:
|
||||||
|
js: https://s7.addthis.com/js/300/addthis_widget.js
|
||||||
|
|
||||||
|
# 评论组件
|
||||||
|
# Comment component
|
||||||
|
waline:
|
||||||
|
js:
|
||||||
|
name: '@waline/client'
|
||||||
|
version: 2.11.3
|
||||||
|
file: dist/waline.js
|
||||||
|
alias: waline
|
||||||
|
css:
|
||||||
|
name: '@waline/client'
|
||||||
|
version: 2.11.3
|
||||||
|
file: dist/waline.css
|
||||||
|
alias: waline
|
||||||
|
|
||||||
|
artalk:
|
||||||
|
js:
|
||||||
|
name: artalk
|
||||||
|
version: 2.3.4
|
||||||
|
file: dist/Artalk.js
|
||||||
|
css:
|
||||||
|
name: artalk
|
||||||
|
version: 2.3.4
|
||||||
|
file: dist/Artalk.css
|
||||||
|
|
||||||
|
giscus:
|
||||||
|
js: https://giscus.app/client.js
|
||||||
|
|
||||||
|
utterances:
|
||||||
|
js: https://utteranc.es/client.js
|
||||||
|
|
||||||
|
livere:
|
||||||
|
js: https://cdn-city.livere.com/js/embed.dist.js
|
||||||
|
|
||||||
|
# 全文搜索
|
||||||
|
# Full text search
|
||||||
|
algolia:
|
||||||
|
name: algoliasearch
|
||||||
|
version: 4.13.0
|
||||||
|
file: dist/algoliasearch-lite.umd.js
|
||||||
|
instant:
|
||||||
|
name: instantsearch.js
|
||||||
|
version: 4.40.5
|
||||||
|
file: dist/instantsearch.production.min.js
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
# 数学公式渲染
|
||||||
|
mathjax:
|
||||||
|
js:
|
||||||
|
- name: mathjax
|
||||||
|
version: 3.2.0
|
||||||
|
file: es5/tex-mml-chtml.js
|
||||||
|
katex:
|
||||||
|
js:
|
||||||
|
- name: katex
|
||||||
|
version: 0.16.0
|
||||||
|
file: dist/katex.min.js
|
||||||
|
- name: auto-render
|
||||||
|
alias2: katex
|
||||||
|
version: 0.16.0
|
||||||
|
file: dist/contrib/auto-render.min.js
|
||||||
|
css:
|
||||||
|
- name: katex
|
||||||
|
version: 0.16.0
|
||||||
|
file: dist/katex.min.css
|
||||||
|
# 画图渲染
|
||||||
|
mermaid:
|
||||||
|
js:
|
||||||
|
- name: mermaid
|
||||||
|
version: 9.1.7
|
||||||
|
file: dist/mermaid.min.js
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,21 +39,74 @@ markup:
|
|||||||
renderer:
|
renderer:
|
||||||
unsafe: true
|
unsafe: true
|
||||||
highlight:
|
highlight:
|
||||||
|
# codeFences: true
|
||||||
|
# lineNos: true
|
||||||
|
# lineNumbersInTable: true
|
||||||
|
# noClasses: true
|
||||||
|
# # 高亮代码的样式名称,可选:monokai | emacs | api | dracula | friendly
|
||||||
|
# # 更多的样式:https://xyproto.github.io/splash/docs/all.html
|
||||||
|
# # Highlight style: monokai | emacs | api | dracula | friendly
|
||||||
|
# # More: https://xyproto.github.io/splash/docs/all.html
|
||||||
|
# style: "monokai"
|
||||||
|
anchorLineNos: true
|
||||||
codeFences: true
|
codeFences: true
|
||||||
lineNos: true
|
guessSyntax: true
|
||||||
lineNumbersInTable: true
|
hl_Lines: ""
|
||||||
|
hl_inline: false
|
||||||
|
lineAnchors: ""
|
||||||
|
lineNoStart: 1
|
||||||
|
lineNos: false
|
||||||
|
lineNumbersInTable: false
|
||||||
noClasses: true
|
noClasses: true
|
||||||
# 高亮代码的样式名称,可选:monokai | emacs | api | dracula | friendly
|
noHl: false
|
||||||
# 更多的样式:https://xyproto.github.io/splash/docs/all.html
|
style: monokai
|
||||||
# Highlight style: monokai | emacs | api | dracula | friendly
|
tabWidth: 2
|
||||||
# More: https://xyproto.github.io/splash/docs/all.html
|
|
||||||
style: "monokai"
|
|
||||||
tableOfContents:
|
tableOfContents:
|
||||||
# 开始/结束标题级别:1-6
|
# 开始/结束标题级别:1-6 (建议从2开始)
|
||||||
# Heading title level of start or end: 1-6
|
# Heading title level of start or end: 1-6
|
||||||
startLevel: 1
|
# Recommand start at 2
|
||||||
endLevel: 3
|
startLevel: 2
|
||||||
ordered: false
|
endLevel: 4
|
||||||
|
|
||||||
|
# 站点文章导航文件
|
||||||
|
# Site map of all articles
|
||||||
|
sitemap:
|
||||||
|
filename: "sitemap.xml"
|
||||||
|
changefreq: "weekly"
|
||||||
|
priority: 0.5
|
||||||
|
|
||||||
|
outputFormats:
|
||||||
|
RSS:
|
||||||
|
baseName: "rss"
|
||||||
|
# 自定义生成本地搜索文件
|
||||||
|
# Custom file of indexes for local search
|
||||||
|
LocalIndexes:
|
||||||
|
mediaType: application/xml
|
||||||
|
baseName: searchindexes
|
||||||
|
isPlainText: true
|
||||||
|
notAlternative: true
|
||||||
|
# 生成 Algolia 索引文件
|
||||||
|
# Build indexes of Aloglia
|
||||||
|
AlgoliaIndexes:
|
||||||
|
mediaType: application/json
|
||||||
|
baseName: algolia
|
||||||
|
isPlainText: true
|
||||||
|
notAlternative: true
|
||||||
|
|
||||||
|
# 默认使用本地搜索,如切换到 Algolia 搜索引擎,
|
||||||
|
# 请将下面的 LocalIndexes 替换成 AlgoliaIndexes
|
||||||
|
# By default use local search, before switch to Algolia engine
|
||||||
|
# Please replace LocalIndexes with AlgoliaIndexes
|
||||||
|
outputs:
|
||||||
|
home: ["HTML", "RSS", "LocalIndexes"]
|
||||||
|
|
||||||
|
# 输出 robots 文件支持爬虫扫描
|
||||||
|
# Enable robots with support crawler scan
|
||||||
|
enableRobotsTXT: true
|
||||||
|
|
||||||
|
# 强制输出时压缩文件
|
||||||
|
# Compress all files when output
|
||||||
|
minify:
|
||||||
|
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# 菜单配置说明
|
# 菜单配置说明
|
||||||
@@ -84,16 +137,21 @@ menus:
|
|||||||
pageref: /about.html
|
pageref: /about.html
|
||||||
pre: user
|
pre: user
|
||||||
weight: 2
|
weight: 2
|
||||||
|
- identifier: flinks
|
||||||
|
name: 站点示例
|
||||||
|
pageref: /flinks.html
|
||||||
|
pre: thumbs-up
|
||||||
|
weight: 3
|
||||||
- identifier: archives
|
- identifier: archives
|
||||||
name: 归档
|
name: 归档
|
||||||
pageref: /posts
|
pageref: /archives
|
||||||
pre: archive
|
pre: archive
|
||||||
weight: 3
|
weight: 4
|
||||||
- identifier: commonweal
|
- identifier: commonweal
|
||||||
name: 公益 404
|
name: 公益 404
|
||||||
url: /404.html
|
url: /404.html
|
||||||
pre: heartbeat
|
pre: heartbeat
|
||||||
weight: 4
|
weight: 5
|
||||||
|
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
# Hugo NexT 主题参数配置
|
# Hugo NexT 主题参数配置
|
||||||
@@ -103,7 +161,7 @@ params:
|
|||||||
# 需要显示文章的部分,即content目录下的文件夹名称
|
# 需要显示文章的部分,即content目录下的文件夹名称
|
||||||
# Sections for show in home & archive page
|
# Sections for show in home & archive page
|
||||||
# and it's forlder name which under content
|
# and it's forlder name which under content
|
||||||
mainSections: ["posts"]
|
mainSections: ["post"]
|
||||||
# 年,月,日及时间的格式化样式
|
# 年,月,日及时间的格式化样式
|
||||||
# Format style for year,month,date & time
|
# Format style for year,month,date & time
|
||||||
yearFormat: "2006"
|
yearFormat: "2006"
|
||||||
@@ -139,9 +197,16 @@ params:
|
|||||||
appleTouchIcon: /imgs/icons/apple_touch_icon_next.png
|
appleTouchIcon: /imgs/icons/apple_touch_icon_next.png
|
||||||
|
|
||||||
# 自定义 Logo (目前只支持 Mist 页面模式)
|
# 自定义 Logo (目前只支持 Mist 页面模式)
|
||||||
# Custom Logo (Warning: Do not support scheme Mist)
|
# Custom Logo (Warning: Only support scheme Mist)
|
||||||
customLogo: #/imgs/hugo_next_logo.png
|
customLogo: #/imgs/hugo_next_logo.png
|
||||||
|
|
||||||
|
# 用户自定义文件配置
|
||||||
|
# Define custom file paths.
|
||||||
|
# customFilePath:
|
||||||
|
# sidebar: custom_sidebar.html
|
||||||
|
# footer: custom_footer.html
|
||||||
|
# style: /css/custom_style.css
|
||||||
|
|
||||||
# 知识共享国际许可 4.0
|
# 知识共享国际许可 4.0
|
||||||
# 更多信息: https://creativecommons.org/about/cclicenses/
|
# 更多信息: https://creativecommons.org/about/cclicenses/
|
||||||
# Creative Commons 4.0 International License.
|
# Creative Commons 4.0 International License.
|
||||||
@@ -231,10 +296,18 @@ params:
|
|||||||
# 开启头像随鼠标转动动画
|
# 开启头像随鼠标转动动画
|
||||||
# If true, the avatar will be rotated with the cursor.
|
# If true, the avatar will be rotated with the cursor.
|
||||||
rotated: true
|
rotated: true
|
||||||
|
siteState:
|
||||||
# 是否在侧边栏显示文章、分类、标签信息
|
# 是否在侧边栏显示文章、分类、标签信息
|
||||||
# Posts / Categories / Tags in sidebar.
|
# Posts / Categories / Tags in sidebar.
|
||||||
siteState: true
|
basic: true
|
||||||
|
# 站点访问信息
|
||||||
|
# Site information
|
||||||
|
statistic:
|
||||||
|
enable: true
|
||||||
|
# 组件类型,可选值为: 51la, busuanzi
|
||||||
|
# 使用51la时需要注册账号:https://invite.51.la/1NUfGTS1?target=V6
|
||||||
|
# Plguin value is: 51la, busuzazi
|
||||||
|
plugin: busuanzi
|
||||||
|
|
||||||
# 社交链接地址
|
# 社交链接地址
|
||||||
# 用法: `Key: 名称 || 链接地址 || 图标`
|
# 用法: `Key: 名称 || 链接地址 || 图标`
|
||||||
@@ -316,6 +389,9 @@ params:
|
|||||||
# Footer Settings
|
# Footer Settings
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
footer:
|
footer:
|
||||||
|
# 启动谷歌翻译功能
|
||||||
|
# Enable google translate in footer
|
||||||
|
translate: true
|
||||||
# 站点开始年份,默认为当下时间的年份
|
# 站点开始年份,默认为当下时间的年份
|
||||||
# Specify the year when the site was setup.
|
# Specify the year when the site was setup.
|
||||||
# If not defined, current year will be used.
|
# If not defined, current year will be used.
|
||||||
@@ -553,7 +629,7 @@ params:
|
|||||||
enable: true
|
enable: true
|
||||||
# 你的 Github 仓库地址
|
# 你的 Github 仓库地址
|
||||||
# Your repository url on Github.
|
# Your repository url on Github.
|
||||||
permalink: https://github.com/yourname
|
permalink: https://github.com/hugo-next
|
||||||
# 关注说明
|
# 关注说明
|
||||||
# Show this title when cursor move on.
|
# Show this title when cursor move on.
|
||||||
title: Follow me on GitHub
|
title: Follow me on GitHub
|
||||||
@@ -652,27 +728,11 @@ params:
|
|||||||
# Third Party Plugins & Services Settings
|
# Third Party Plugins & Services Settings
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
||||||
# TODO
|
# 数学公式渲染支持,可选值: mathjax, katex
|
||||||
# 数学公式渲染支持(暂时未实现)
|
# 注意这里全局配置,意味着所有页面都会加载数学公式脚本
|
||||||
# Math Formulas Render Support
|
# Math Formulas Render Support, options: mathjax, katex
|
||||||
# Warning: Please install / uninstall the relevant renderer according to the documentation.
|
# Warning: It's global settings then will load scripts in every page.
|
||||||
# See: https://theme-next.js.org/docs/third-party-services/math-equations
|
#math: mathjax
|
||||||
# Server-side plugin: https://github.com/next-theme/hexo-filter-mathjax
|
|
||||||
math:
|
|
||||||
# Default (false) will load mathjax / katex script on demand.
|
|
||||||
# That is it only render those page which has `mathjax: true` in front-matter.
|
|
||||||
# If you set it to true, it will load mathjax / katex script EVERY PAGE.
|
|
||||||
every_page: false
|
|
||||||
|
|
||||||
mathjax:
|
|
||||||
enable: false
|
|
||||||
# Available values: none | ams | all
|
|
||||||
tags: none
|
|
||||||
|
|
||||||
katex:
|
|
||||||
enable: false
|
|
||||||
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
|
|
||||||
copy_tex: false
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# FancyBox is a tool that offers a nice and elegant way
|
# FancyBox is a tool that offers a nice and elegant way
|
||||||
@@ -721,7 +781,7 @@ params:
|
|||||||
comments:
|
comments:
|
||||||
# 开启评论组件
|
# 开启评论组件
|
||||||
# If true, will show comment component in post end.
|
# If true, will show comment component in post end.
|
||||||
enable: true
|
enable: false
|
||||||
# 设置默认使用的评论插件
|
# 设置默认使用的评论插件
|
||||||
# 可选值:livere | waline | utterances | artalk | giscus
|
# 可选值:livere | waline | utterances | artalk | giscus
|
||||||
# Choose a comment system to be displayed by default.
|
# Choose a comment system to be displayed by default.
|
||||||
@@ -753,47 +813,51 @@ params:
|
|||||||
# Waline comments system
|
# Waline comments system
|
||||||
# More info seee: https://waline.js.org/
|
# More info seee: https://waline.js.org/
|
||||||
waline:
|
waline:
|
||||||
pageView: true
|
pageView: '#waline-pageview-count'
|
||||||
placeholder: "请文明发言"
|
placeholder: "请文明发言哟 ヾ(≧▽≦*)o"
|
||||||
|
sofa: "快来发表你的意见吧 (≧∀≦)ゞ"
|
||||||
emoji: false
|
emoji: false
|
||||||
imgUploader: false
|
imgUploader: false
|
||||||
wordLimit: 200
|
wordLimit: 200
|
||||||
requiredMeta: ['nick', 'mail']
|
requiredMeta: ['nick', 'mail']
|
||||||
|
reaction: true
|
||||||
|
reactionText: [ '点赞', '踩一下', '得意', '不屑', '尴尬', '睡觉']
|
||||||
|
reactionTitle: "你认为这篇文章怎么样?"
|
||||||
serverURL: #<your waline server url>
|
serverURL: #<your waline server url>
|
||||||
|
|
||||||
# Artalk 评论插件
|
# Artalk 评论插件
|
||||||
# 更多配置信息请参考:https://artalk.js.org
|
# 更多配置信息请参考:https://artalk.js.org
|
||||||
# Artalk comments system
|
# Artalk comments system
|
||||||
# More info see: https://artalk.js.org
|
# More info see: https://artalk.js.org
|
||||||
artalk:
|
# artalk:
|
||||||
site: "默认站点"
|
# site: "默认站点"
|
||||||
placeholder: "请文明发言,谢谢!"
|
# placeholder: "请文明发言,谢谢!"
|
||||||
server: #<your artalk server url>
|
# server: #<your artalk server url>
|
||||||
|
|
||||||
# Artalk 评论插件
|
# Artalk 评论插件
|
||||||
# 更多配置信息请参考:
|
# 更多配置信息请参考:
|
||||||
# LiveRe comments system
|
# LiveRe comments system
|
||||||
# You can get your uid from https://livere.com/
|
# You can get your uid from https://livere.com/
|
||||||
livere:
|
# livere:
|
||||||
uid: # <your_uid>
|
# uid: # <your_uid>
|
||||||
|
|
||||||
# Utterances 评论插件
|
# Utterances 评论插件
|
||||||
# 更多配置信息请参考:https://utteranc.es
|
# 更多配置信息请参考:https://utteranc.es
|
||||||
# Utterances comments system
|
# Utterances comments system
|
||||||
# For more information: https://utteranc.es
|
# For more information: https://utteranc.es
|
||||||
utterances:
|
# utterances:
|
||||||
# Github 仓库地址,格式:用户名/仓库名称
|
# # Github 仓库地址,格式:用户名/仓库名称
|
||||||
# Github repository owner and name
|
# # Github repository owner and name
|
||||||
repo: username/repo-name
|
# repo: username/repo-name
|
||||||
# 问题标题的模式,可选值:pathname | url | title | og:title
|
# # 问题标题的模式,可选值:pathname | url | title | og:title
|
||||||
# Available values: pathname | url | title | og:title
|
# # Available values: pathname | url | title | og:title
|
||||||
issueTerm: pathname
|
# issueTerm: pathname
|
||||||
# 问题的标签分类
|
# # 问题的标签分类
|
||||||
# Label flag for Github issues
|
# # Label flag for Github issues
|
||||||
label: comments
|
# label: comments
|
||||||
# 主题可选值: github-light | github-dark | preferred-color-scheme | github-dark-orange | icy-dark | dark-blue | photon-dark | boxy-light
|
# # 主题可选值: github-light | github-dark | preferred-color-scheme | github-dark-orange | icy-dark | dark-blue | photon-dark | boxy-light
|
||||||
# Available values: github-light | github-dark | preferred-color-scheme | github-dark-orange | icy-dark | dark-blue | photon-dark | boxy-light
|
# # Available values: github-light | github-dark | preferred-color-scheme | github-dark-orange | icy-dark | dark-blue | photon-dark | boxy-light
|
||||||
theme: preferred-color-scheme
|
# theme: preferred-color-scheme
|
||||||
|
|
||||||
# Giscus 评论插件
|
# Giscus 评论插件
|
||||||
# 更多配置信息请参考:https://giscus.app
|
# 更多配置信息请参考:https://giscus.app
|
||||||
@@ -802,16 +866,24 @@ params:
|
|||||||
giscus:
|
giscus:
|
||||||
# Github 仓库地址,格式:用户名/仓库名称
|
# Github 仓库地址,格式:用户名/仓库名称
|
||||||
# Github repository owner and name
|
# Github repository owner and name
|
||||||
repo: username/repo_name
|
repo: username/repo-name
|
||||||
# Giscus 生成的仓库 Id
|
# Giscus 生成的仓库 Id
|
||||||
# Generate repository Id from Giscus
|
# Generate repository Id from Giscus
|
||||||
repoId: #<repo_id>
|
repoId: #<repo-id>
|
||||||
# 讨论区的分类名称
|
# 讨论区的分类名称
|
||||||
# Github discussions category
|
# Github discussions category
|
||||||
category: Announcements
|
category: Comments
|
||||||
# 讨论区分类 ID
|
# 讨论区分类 ID
|
||||||
# Generate category Id from Giscus
|
# Generate category Id from Giscus
|
||||||
categoryId: #<category_id>
|
categoryId: #<category-id>
|
||||||
|
# 帖子上的反应将会显示在评论前
|
||||||
|
# The reactions for post will be shown before the comments
|
||||||
|
reactions: false
|
||||||
|
# 将元数据定期被发送到父页面(被嵌入的页面或控制台,用于调试)
|
||||||
|
# Metadata will be sent periodically to the parent window
|
||||||
|
emit: false
|
||||||
|
# 评论输入框的位置,可选值: top | bottom
|
||||||
|
# Aavilable value: top | bottom
|
||||||
# 讨论区帖子标题,可选值: pathname | url | title | og:title | 自定义
|
# 讨论区帖子标题,可选值: pathname | url | title | og:title | 自定义
|
||||||
# Available values: pathname | url | title | og:title | custom
|
# Available values: pathname | url | title | og:title | custom
|
||||||
mapping: title
|
mapping: title
|
||||||
@@ -854,23 +926,24 @@ params:
|
|||||||
# 更多信息请参考:https://invite.51.la/1NUfGTS1?target=V6
|
# 更多信息请参考:https://invite.51.la/1NUfGTS1?target=V6
|
||||||
# 51La Analytics
|
# 51La Analytics
|
||||||
# See: https://invite.51.la/1NUfGTS1?target=V6
|
# See: https://invite.51.la/1NUfGTS1?target=V6
|
||||||
laId: #<anaytics_id>
|
#laId: #<anaytics_id>
|
||||||
|
# 百度统计
|
||||||
# TODO
|
# Baidu Analytics
|
||||||
|
#baidu: #<anaytics_id>
|
||||||
|
# 谷歌统计
|
||||||
|
# Google Analytics
|
||||||
|
#google: #<anaytics_id>
|
||||||
|
# 不蒜子统计
|
||||||
# Show Views / Visitors of the website / page with busuanzi.
|
# Show Views / Visitors of the website / page with busuanzi.
|
||||||
# For more information: http://ibruce.info/2015/04/04/busuanzi/
|
# For more information: http://ibruce.info/2015/04/04/busuanzi/
|
||||||
busuanzi:
|
busuanzi:
|
||||||
visitors: false
|
|
||||||
visitorsIcon: fa fa-user
|
visitorsIcon: fa fa-user
|
||||||
views: false
|
|
||||||
viewsIcon: fa fa-eye
|
viewsIcon: fa fa-eye
|
||||||
postViews: false
|
postViews: true
|
||||||
postViewsIcon: far fa-eye
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# TODO
|
# 内容搜索服务
|
||||||
# 内容搜索服务(暂时未实现)
|
|
||||||
# Search Services
|
# Search Services
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
||||||
@@ -878,19 +951,32 @@ params:
|
|||||||
# For more information: https://www.algolia.com
|
# For more information: https://www.algolia.com
|
||||||
algoliaSearch:
|
algoliaSearch:
|
||||||
enable: false
|
enable: false
|
||||||
|
appId: #<algolia app id>
|
||||||
|
apiKey: #<algolia api key>
|
||||||
|
indexName: #<algolia index name>
|
||||||
hits:
|
hits:
|
||||||
perPage: 10
|
perPage: 10
|
||||||
|
|
||||||
|
# 本地搜索
|
||||||
# Local Search
|
# Local Search
|
||||||
localSearch:
|
localSearch:
|
||||||
|
# 是否开启搜索功能
|
||||||
|
# Enable search function
|
||||||
enable: true
|
enable: true
|
||||||
|
# 搜索索引文件路径
|
||||||
|
# Indexes file path for search
|
||||||
|
path: /searchindexes.xml
|
||||||
|
# 是立即搜索当输入关键字时,可选值: auto | manual
|
||||||
# If auto, trigger search by changing input.
|
# If auto, trigger search by changing input.
|
||||||
# If manual, trigger search by pressing enter key or search button.
|
# If manual, trigger search by pressing enter key or search button.
|
||||||
trigger: auto
|
trigger: auto
|
||||||
|
# 显示头部的搜索记录,-1 表示显示所有搜索结果
|
||||||
# Show top n results per article, show all results by setting to -1
|
# Show top n results per article, show all results by setting to -1
|
||||||
top_n_per_article: 1
|
topNPerArticle: -1
|
||||||
|
# 将 html 字符串转换为可读字符串
|
||||||
# Unescape html strings to the readable one.
|
# Unescape html strings to the readable one.
|
||||||
unescape: false
|
unescape: false
|
||||||
|
# 页面加载时是否要重新载入索引文件
|
||||||
# Preload the search data when the page loads.
|
# Preload the search data when the page loads.
|
||||||
preload: false
|
preload: false
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "关于 Hugo NexT 组织"
|
title: "关于 Hugo NexT 组织"
|
||||||
description: ""
|
description: "Hugo NexT 组织介绍说明。"
|
||||||
|
|
||||||
date: 2022-06-09T20:12:52+08:00
|
date: 2022-06-09T20:12:52+08:00
|
||||||
lastmod: 2022-06-09T20:12:52+08:00
|
lastmod: 2022-06-09T20:12:52+08:00
|
||||||
@@ -17,3 +17,11 @@ url: about.html
|
|||||||
# 我们的愿景
|
# 我们的愿景
|
||||||
|
|
||||||
延续 `NexT` 经典的黑白调搭配,保持简单的易用性及强大的功能。
|
延续 `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
|
||||||
3
exampleSite/content/archives/_index.md
Normal file
3
exampleSite/content/archives/_index.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
date: 2022-07-26T21:46:25+08:00
|
||||||
|
---
|
||||||
14
exampleSite/content/flinks.md
Normal file
14
exampleSite/content/flinks.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
|
```
|
||||||
82
exampleSite/content/post/custom-files.md
Normal file
82
exampleSite/content/post/custom-files.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
---
|
||||||
|
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>
|
||||||
@@ -12,7 +12,6 @@ tags:
|
|||||||
- 表情
|
- 表情
|
||||||
- emoji
|
- emoji
|
||||||
|
|
||||||
toc: false
|
|
||||||
url: "post/emoji-support.html"
|
url: "post/emoji-support.html"
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -25,11 +25,11 @@ weight: 1
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 用户指南
|
## 用户指南
|
||||||
|
|
||||||
设置 NexT 主题很容易。只需遵循文档,就可快速创建您的个人网站!
|
设置 NexT 主题很容易。只需遵循文档,就可快速创建您的个人网站!
|
||||||
|
|
||||||
# 反馈
|
## 反馈
|
||||||
|
|
||||||
- 访问 Awesome NexT 列表,与其他用户分享插件和教程。
|
- 访问 Awesome NexT 列表,与其他用户分享插件和教程。
|
||||||
- 加入我们的 Gitter 聊天。
|
- 加入我们的 Gitter 聊天。
|
||||||
@@ -12,6 +12,7 @@ tags:
|
|||||||
- 开始
|
- 开始
|
||||||
|
|
||||||
url: post/hello-world.html
|
url: post/hello-world.html
|
||||||
|
toc: true
|
||||||
weight: 2
|
weight: 2
|
||||||
---
|
---
|
||||||
|
|
||||||
227
exampleSite/content/post/math-formula.md
Normal file
227
exampleSite/content/post/math-formula.md
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
|
$$
|
||||||
195
exampleSite/content/post/mermaid-charts.md
Normal file
195
exampleSite/content/post/mermaid-charts.md
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
---
|
||||||
|
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 >}}
|
||||||
86
exampleSite/content/post/shortcodes.md
Normal file
86
exampleSite/content/post/shortcodes.md
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
---
|
||||||
|
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 >}}
|
||||||
@@ -22,9 +22,9 @@ Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用
|
|||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
# 编程语言
|
## 编程语言
|
||||||
|
|
||||||
## GO
|
### GO
|
||||||
|
|
||||||
{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
|
{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ func GetTitleFunc(style string) func(s string) string {
|
|||||||
|
|
||||||
{{< / highlight >}}
|
{{< / highlight >}}
|
||||||
|
|
||||||
## Java
|
### Java
|
||||||
|
|
||||||
```java
|
```java
|
||||||
import javax.swing.JFrame; //Importing class JFrame
|
import javax.swing.JFrame; //Importing class JFrame
|
||||||
@@ -58,13 +58,13 @@ public class HelloWorld {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Python
|
### Python
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
print "Hello, world!"
|
print "Hello, world!"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Git 对比
|
### Git 对比
|
||||||
|
|
||||||
``` diff {hl_lines=[4,"6-7"], linenos=true}
|
``` diff {hl_lines=[4,"6-7"], linenos=true}
|
||||||
*** /path/to/original ''timestamp''
|
*** /path/to/original ''timestamp''
|
||||||
@@ -92,9 +92,9 @@ It is important to spell
|
|||||||
+new line
|
+new line
|
||||||
```
|
```
|
||||||
|
|
||||||
# 文件
|
## 文件
|
||||||
|
|
||||||
## Make 文件
|
### Make 文件
|
||||||
|
|
||||||
``` makefile {linenos=false}
|
``` makefile {linenos=false}
|
||||||
CC=gcc
|
CC=gcc
|
||||||
@@ -104,7 +104,7 @@ hellomake: hellomake.o hellofunc.o
|
|||||||
$(CC) -o hellomake hellomake.o hellofunc.o -I.
|
$(CC) -o hellomake hellomake.o hellofunc.o -I.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Markdown 文档
|
### Markdown 文档
|
||||||
|
|
||||||
``` markdown
|
``` markdown
|
||||||
**bold**
|
**bold**
|
||||||
@@ -112,9 +112,9 @@ hellomake: hellomake.o hellofunc.o
|
|||||||
[link](www.example.com)
|
[link](www.example.com)
|
||||||
```
|
```
|
||||||
|
|
||||||
# 数据内容
|
## 数据内容
|
||||||
|
|
||||||
## JSON 数据
|
### JSON 数据
|
||||||
|
|
||||||
``` json
|
``` json
|
||||||
{"employees":[
|
{"employees":[
|
||||||
@@ -122,7 +122,7 @@ hellomake: hellomake.o hellofunc.o
|
|||||||
]}
|
]}
|
||||||
```
|
```
|
||||||
|
|
||||||
## XML 内容
|
### XML 内容
|
||||||
|
|
||||||
``` xml
|
``` xml
|
||||||
<employees>
|
<employees>
|
||||||
@@ -132,7 +132,7 @@ hellomake: hellomake.o hellofunc.o
|
|||||||
</employees>
|
</employees>
|
||||||
```
|
```
|
||||||
|
|
||||||
## SQL 查询
|
### SQL 查询
|
||||||
|
|
||||||
{{< highlight sql >}}
|
{{< highlight sql >}}
|
||||||
|
|
||||||
@@ -23,38 +23,48 @@ url: post/table-of-content.html
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
# 早年的故事
|
## 早年的故事
|
||||||
|
|
||||||
## 起始
|
### 起始
|
||||||
|
|
||||||
2014年的春天,在云南省华宁县和宜良县的交界处,一座名叫矣则的小山村里,一处已经有上百年历史的古旧四合院宅子被拆掉。村委会正带领村民们进行“美丽乡村”的建设,一年以后,旧有村居将再也看不到,代之而起的是钢筋混凝土的新式民居。就像10年、20年前中国大小城市的改造一样,这个群山围绕的小村子也开始陷入“工地模式”。
|
2014年的春天,在云南省华宁县和宜良县的交界处,一座名叫矣则的小山村里,一处已经有上百年历史的古旧四合院宅子被拆掉。村委会正带领村民们进行“美丽乡村”的建设,一年以后,旧有村居将再也看不到,代之而起的是钢筋混凝土的新式民居。就像10年、20年前中国大小城市的改造一样,这个群山围绕的小村子也开始陷入“工地模式”。
|
||||||
|
|
||||||
### 童年浪花
|
#### 童年浪花
|
||||||
|
|
||||||
在江河边长大的孩子几乎都有一个当仁不让的特长:善水。褚时健也不例外,他不仅从小就在南盘江和花鱼塘里扑腾出了上佳的游泳技术,五六岁已经可以一个猛子扎出老远,而且从七八岁就可以在南盘江和河滩上的鱼塘里捉鱼了。
|
在江河边长大的孩子几乎都有一个当仁不让的特长:善水。褚时健也不例外,他不仅从小就在南盘江和花鱼塘里扑腾出了上佳的游泳技术,五六岁已经可以一个猛子扎出老远,而且从七八岁就可以在南盘江和河滩上的鱼塘里捉鱼了。
|
||||||
|
|
||||||
## 少年故事
|
### 少年故事
|
||||||
|
|
||||||
褚时健在乡村自由自在生活的十多年,其实正是中国社会风雨飘摇的十多年。特别是1937年卢沟桥事变后,日本人发动全面侵华战争,短短两三年间,中国的大部分国土相继沦陷
|
褚时健在乡村自由自在生活的十多年,其实正是中国社会风雨飘摇的十多年。特别是1937年卢沟桥事变后,日本人发动全面侵华战争,短短两三年间,中国的大部分国土相继沦陷
|
||||||
|
|
||||||
# 激情的青春十年
|
## 激情的青春十年
|
||||||
|
|
||||||
## 当上了游击队员
|
### 当上了游击队员
|
||||||
|
|
||||||
1948年夏天,褚时健回乡,在禄丰车站小学做了一名老师,同时也和褚时仁、褚时杰一起继续保持与共产党组织的联系,做一些传递情报的工作
|
1948年夏天,褚时健回乡,在禄丰车站小学做了一名老师,同时也和褚时仁、褚时杰一起继续保持与共产党组织的联系,做一些传递情报的工作
|
||||||
|
|
||||||
### 战火纷飞
|
#### 战火纷飞
|
||||||
|
|
||||||
因为战斗力相较悬殊,所以游击队只能是靠打一枪换一个地方的办法,专找敌人薄弱的地方攻击,但更多时候,都是在防御和转移阵地。
|
因为战斗力相较悬殊,所以游击队只能是靠打一枪换一个地方的办法,专找敌人薄弱的地方攻击,但更多时候,都是在防御和转移阵地。
|
||||||
|
|
||||||
# 生活的断层
|
### 迎来解放
|
||||||
|
|
||||||
## 跌入生活底层
|
1949年12月,国民党云南省主席卢汉在昆明宣布起义,云南正式拉开解放的序幕。1950年2月20日,陈赓、宋任穷、周保中率解放军第二野战军第四兵团进入昆明,24日,陈赓宣布云南全境解放。
|
||||||
|
|
||||||
|
## 生活的断层
|
||||||
|
|
||||||
|
### 跌入生活底层
|
||||||
|
|
||||||
“反右”运动中被打倒的人在“右派”身份确定后,只有一条路可走:下放到农场。农场名副其实,就是干农活儿的地方,必须过和农民一样的生活。
|
“反右”运动中被打倒的人在“右派”身份确定后,只有一条路可走:下放到农场。农场名副其实,就是干农活儿的地方,必须过和农民一样的生活。
|
||||||
|
|
||||||
# 尾声
|
## 尾声
|
||||||
|
|
||||||
## 岁月像一条河
|
### 岁月像一条河
|
||||||
|
|
||||||
2015年,是褚时健和马静芬结婚60周年,被称为“钻石婚”的纪念年份。这简直是一份人生的奖赏,在中国离婚率愈益升高的当下,60年的婚姻,几乎就像一个前世之梦。一个甲子的相伴相随,褚时健和马静芬共同经历了国家和个人的各种风浪,共同面对过生死。他们两人已经不仅是夫妻,更是一对战友。尽管马静芬偶尔会对褚时健年轻时候的粗心抱怨上两句,但说到最后,她会说一句:“没有我就没有他,没有他也就没有我。”
|
2015年,是褚时健和马静芬结婚60周年,被称为“钻石婚”的纪念年份。这简直是一份人生的奖赏,在中国离婚率愈益升高的当下,60年的婚姻,几乎就像一个前世之梦。一个甲子的相伴相随,褚时健和马静芬共同经历了国家和个人的各种风浪,共同面对过生死。他们两人已经不仅是夫妻,更是一对战友。尽管马静芬偶尔会对褚时健年轻时候的粗心抱怨上两句,但说到最后,她会说一句:“没有我就没有他,没有他也就没有我。”
|
||||||
|
|
||||||
|
## 作者致谢
|
||||||
|
|
||||||
|
这本书从2014年初夏开始采访,到今天完稿,历时18个月。封面上“作者”只能是我一个人的名字,但也只有我自己知道,这本书,包含了太多人的心力和体力。我当然首先要致谢王石先生,没有他就没有这本书。我自己细想下来,没有王石先生一直的鞭策和鼓励,也没有我写作工作的今天。从2006年我开始从事专业写作工作以来,他给我创造了很多写作的机会,并且不吝自己诸多人生和学习的体会和感悟,一一传递予我。知遇之恩,感谢非常。
|
||||||
|
|
||||||
|
最后,我当然要把最大的感谢致予褚时健先生。不仅是因为他慷慨、坦率面对我的各种提问,更重要的是,在倾听他的故事的过程里,他繁盛的人生经历,他的强大生命力,他对生活、对事业的一片赤子之心,也丰富了我对自己人生的思考。
|
||||||
29
exampleSite/data/flinks.yaml
Normal file
29
exampleSite/data/flinks.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# 友情链接
|
||||||
|
# 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/
|
||||||
3
exampleSite/layouts/partials/custom_footer.html
Normal file
3
exampleSite/layouts/partials/custom_footer.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<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>
|
||||||
3
exampleSite/layouts/partials/custom_sidebar.html
Normal file
3
exampleSite/layouts/partials/custom_sidebar.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<div class="mydefined animated" itemprop="custom">
|
||||||
|
<span>支持自定义CSS和Sidebar布局啦💄💄💄</span>
|
||||||
|
</div>
|
||||||
@@ -20,4 +20,4 @@ EOT
|
|||||||
|
|
||||||
next `cat ../VERSION`
|
next `cat ../VERSION`
|
||||||
|
|
||||||
hugo server -D -t ../.. --port 1414 --panicOnWarning
|
hugo server -t ../.. --port 1414 --panicOnWarning --config config.yaml
|
||||||
|
|||||||
16
exampleSite/static/css/custom_style.css
Normal file
16
exampleSite/static/css/custom_style.css
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/** 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;
|
||||||
|
}
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#--------------------------------------
|
|
||||||
# English Version
|
|
||||||
#--------------------------------------
|
|
||||||
|
|
||||||
[ColoneFlag]
|
|
||||||
other = ":"
|
|
||||||
|
|
||||||
[SitePostsTitle]
|
|
||||||
other = "Posts"
|
|
||||||
[SiteCatesTitle]
|
|
||||||
other = "Categories"
|
|
||||||
[SiteTagsTitle]
|
|
||||||
other = "Tags"
|
|
||||||
[TableOfContents]
|
|
||||||
other = "TOC"
|
|
||||||
[SiteInfo]
|
|
||||||
other = "Site Info"
|
|
||||||
[RSSTitle]
|
|
||||||
other = "RSS Subscribe"
|
|
||||||
[CCLinkTitle]
|
|
||||||
other = "Creative Commons"
|
|
||||||
|
|
||||||
[PostPublishDate]
|
|
||||||
other = "Publish"
|
|
||||||
[PostPublishTime]
|
|
||||||
other = "Create Time"
|
|
||||||
[PostLastModDate]
|
|
||||||
other = "Update"
|
|
||||||
[PostLastModTime]
|
|
||||||
other = "Modify Time"
|
|
||||||
[PostWords]
|
|
||||||
other = "Words"
|
|
||||||
[PostWordCount]
|
|
||||||
other = "{{- .WordCount -}}"
|
|
||||||
[PostReading]
|
|
||||||
other = "Read"
|
|
||||||
[PostReadTime]
|
|
||||||
other = "{{- .ReadingTime -}}min"
|
|
||||||
[PostVisitor]
|
|
||||||
other = "Views"
|
|
||||||
[PostCatg]
|
|
||||||
other = "Categories"
|
|
||||||
[PostTag]
|
|
||||||
other = "Tags"
|
|
||||||
[PostReadMore]
|
|
||||||
other = "Read More"
|
|
||||||
|
|
||||||
[FooterPowerby]
|
|
||||||
other = "Power by %s"
|
|
||||||
46
i18n/en.yaml
46
i18n/en.yaml
@@ -1,7 +1,7 @@
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# English Version
|
# English Version
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
posts:
|
archives:
|
||||||
other: Posts
|
other: Posts
|
||||||
tag:
|
tag:
|
||||||
other: Tag
|
other: Tag
|
||||||
@@ -45,8 +45,6 @@ RSSLable:
|
|||||||
other: "RSS Subscribe"
|
other: "RSS Subscribe"
|
||||||
CCLinkTitle:
|
CCLinkTitle:
|
||||||
other: "Creative Commons"
|
other: "Creative Commons"
|
||||||
BackTopLabel:
|
|
||||||
other: "Top"
|
|
||||||
|
|
||||||
TagsCounterTitle:
|
TagsCounterTitle:
|
||||||
zero: No tags
|
zero: No tags
|
||||||
@@ -134,10 +132,44 @@ RewardBitcoin:
|
|||||||
PostCommentTitle:
|
PostCommentTitle:
|
||||||
other: Comments
|
other: Comments
|
||||||
|
|
||||||
VisitorsLabel:
|
SiteInfoItems:
|
||||||
other: Total Visitors
|
title: "Web Status"
|
||||||
PageViewsLabel:
|
runTimes: "Running:"
|
||||||
other: Total Page Views
|
words: "Words:"
|
||||||
|
readTimes: "ReadTime:"
|
||||||
|
visitors: "Visitors:"
|
||||||
|
pageViews: "Views:"
|
||||||
|
todayViews: "Today Views:"
|
||||||
|
yesterdayViews: "Yesterday Views:"
|
||||||
|
monthViews: "Month Views:"
|
||||||
|
totalViews: "Total Views"
|
||||||
|
lastUpdate: "Last Update:"
|
||||||
|
|
||||||
FooterPowerby:
|
FooterPowerby:
|
||||||
other: "Power by %s"
|
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"
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#--------------------------------------
|
|
||||||
# 中文版本
|
|
||||||
#--------------------------------------
|
|
||||||
|
|
||||||
[ColoneFlag]
|
|
||||||
other = ":"
|
|
||||||
|
|
||||||
[SitePostsTitle]
|
|
||||||
other = "日志"
|
|
||||||
[SiteCatesTitle]
|
|
||||||
other = "分类"
|
|
||||||
[SiteTagsTitle]
|
|
||||||
other = "标签"
|
|
||||||
[TableOfContents]
|
|
||||||
other = "文章目录"
|
|
||||||
[SiteInfo]
|
|
||||||
other = "站点概览"
|
|
||||||
[RSSTitle]
|
|
||||||
other = "RSS 订阅"
|
|
||||||
[CCLinkTitle]
|
|
||||||
other = "共享知识"
|
|
||||||
|
|
||||||
[PostPublishDate]
|
|
||||||
other = "发表于"
|
|
||||||
[PostPublishTime]
|
|
||||||
other = "创建时间"
|
|
||||||
[PostLastModDate]
|
|
||||||
other = "更新于"
|
|
||||||
[PostLastModTime]
|
|
||||||
other = "修改时间"
|
|
||||||
[PostWords]
|
|
||||||
other = "字数"
|
|
||||||
[PostWordCount]
|
|
||||||
other = "{{- .WordCount -}}"
|
|
||||||
[PostReading]
|
|
||||||
other = "阅读"
|
|
||||||
[PostReadTime]
|
|
||||||
other = "{{- .ReadingTime -}}分钟"
|
|
||||||
[PostVisitor]
|
|
||||||
other = "浏览数"
|
|
||||||
[PostCatg]
|
|
||||||
other = "分类"
|
|
||||||
[PostTag]
|
|
||||||
other = "标签"
|
|
||||||
[PostReadMore]
|
|
||||||
other = "阅读全文"
|
|
||||||
|
|
||||||
[FooterPowerby]
|
|
||||||
other = "由 %s 强力驱动"
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# 中文版本
|
# 中文版本
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
|
|
||||||
posts:
|
archives:
|
||||||
other: 文章
|
other: 文章
|
||||||
tag:
|
tag:
|
||||||
other: 标签
|
other: 标签
|
||||||
@@ -46,8 +46,6 @@ RSSLable:
|
|||||||
other: RSS 订阅
|
other: RSS 订阅
|
||||||
CCLinkTitle:
|
CCLinkTitle:
|
||||||
other: 共享知识
|
other: 共享知识
|
||||||
BackTopLabel:
|
|
||||||
other: 返回顶部
|
|
||||||
|
|
||||||
TagsCounterTitle:
|
TagsCounterTitle:
|
||||||
zero: 暂无标签
|
zero: 暂无标签
|
||||||
@@ -135,10 +133,44 @@ RewardBitcoin:
|
|||||||
PostCommentTitle:
|
PostCommentTitle:
|
||||||
other: 评论交流
|
other: 评论交流
|
||||||
|
|
||||||
VisitorsLabel:
|
SiteInfoItems:
|
||||||
other: 总访客量
|
title: "网站资讯"
|
||||||
PageViewsLabel:
|
runTimes: "已运行:"
|
||||||
other: 总访问量
|
words: "总字数:"
|
||||||
|
readTimes: "阅读约:"
|
||||||
|
visitors: "总访客数:"
|
||||||
|
pageViews: "页面浏览:"
|
||||||
|
todayViews: "今日访问:"
|
||||||
|
yesterdayViews: "昨日访问:"
|
||||||
|
monthViews: "本月访问:"
|
||||||
|
totalViews: "总访问量:"
|
||||||
|
lastUpdate: "最后更新于:"
|
||||||
|
|
||||||
FooterPowerby:
|
FooterPowerby:
|
||||||
other: 由 %s 强力驱动
|
other: 由 %s 强力驱动
|
||||||
|
|
||||||
|
SearchPh:
|
||||||
|
other: 搜索...
|
||||||
|
SearchEmpty:
|
||||||
|
other: "没有找到任何搜索结果:${query}"
|
||||||
|
SearchHits:
|
||||||
|
hits: "找到 ${hits} 个搜索结果"
|
||||||
|
SearchHitsTime:
|
||||||
|
other: "找到 ${hits} 个搜索结果(用时 ${time} 毫秒)"
|
||||||
|
|
||||||
|
DateSuffix:
|
||||||
|
years: " 年 "
|
||||||
|
days: " 天 "
|
||||||
|
hours: " 小时 "
|
||||||
|
mins: " 分钟"
|
||||||
|
month: " 个月前"
|
||||||
|
day: " 天前"
|
||||||
|
hour: " 小时前"
|
||||||
|
min: " 分钟前"
|
||||||
|
just: "刚刚"
|
||||||
|
|
||||||
|
ToolBtns:
|
||||||
|
comment: "直达评论"
|
||||||
|
theme: "深浅模式切换"
|
||||||
|
lang: "多语言翻译"
|
||||||
|
backTop: "返回顶部"
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
{{- partial "init.html" . -}}
|
{{- range $k, $v := (partialCached "init.html" .) -}}
|
||||||
|
{{- $.Scratch.Set $k $v -}}
|
||||||
|
{{- end -}}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.LanguageCode }}">
|
<html lang="{{ .Site.LanguageCode }}">
|
||||||
|
|
||||||
@@ -28,17 +30,17 @@
|
|||||||
<!-- Submenu,Content,Comment -->
|
<!-- Submenu,Content,Comment -->
|
||||||
{{- block "main" . }}{{- end }}
|
{{- block "main" . }}{{- end }}
|
||||||
{{- if .IsPage }}
|
{{- if .IsPage }}
|
||||||
{{- partial "comments.html" . }}
|
{{- partialCached "comments.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="footer-inner">
|
<div class="footer-inner">
|
||||||
{{- partial "footer.html" . }}
|
{{- partialCached "footer.html" . }}
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{- partialCached "scripts.html" . }}
|
{{- partial "scripts.html" . }}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
12
layouts/_default/list.algoliaindexes.json
Normal file
12
layouts/_default/list.algoliaindexes.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
{{- range $index, $entry := where .Site.RegularPages "Kind" "page" }}
|
||||||
|
{{- if $index }}, {{ end }}
|
||||||
|
{
|
||||||
|
"permalink": "{{ .Permalink | relURL }}",
|
||||||
|
"title": {{ .Title | jsonify }},
|
||||||
|
"content": {{ .Plain | jsonify }},
|
||||||
|
"date": {{ .Date.Format $.Site.Params.timeFormat | jsonify }},
|
||||||
|
"updated": {{ .Lastmod.Format $.Site.Params.timeFormat | jsonify }}
|
||||||
|
}
|
||||||
|
{{- end }}
|
||||||
|
]
|
||||||
@@ -1,29 +1,2 @@
|
|||||||
{{ range .Paginator.Pages.GroupByDate "2006" }}
|
{{ $paginator := .Paginator.Pages.GroupByDate "2006" }}
|
||||||
<div class="collection-year">
|
{{ partial "list.html" $paginator }}
|
||||||
<span class="collection-header">{{ .Key }}</span>
|
|
||||||
</div>
|
|
||||||
{{ range .Pages }}
|
|
||||||
<article itemscope itemtype="http://schema.org/Article">
|
|
||||||
<header class="post-header">
|
|
||||||
<div class="post-meta-container">
|
|
||||||
{{ $month := .Date.Format .Site.Params.monthFormat }}
|
|
||||||
<time itemprop="dateCreated" datetime="{{ .Date.Format .Site.Params.timeFormat }}" content="{{ $month }}">
|
|
||||||
{{ $month }}
|
|
||||||
</time>
|
|
||||||
</div>
|
|
||||||
<div class="post-title">
|
|
||||||
{{- if isset .Params "extlink" }}
|
|
||||||
<a href="{{ .Params.extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external" title="">
|
|
||||||
<span itemprop="name">{{- .Title -}}</span>
|
|
||||||
<i class="fa fa-external-link-alt"></i>
|
|
||||||
</a>
|
|
||||||
{{- else }}
|
|
||||||
<a class="post-title-link" href="{{ .Permalink }}" itemprop="url">
|
|
||||||
<span itemprop="name">{{ .Title }}</span>
|
|
||||||
</a>
|
|
||||||
{{- end }}
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
</article>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
18
layouts/_default/list.localindexes.xml
Normal file
18
layouts/_default/list.localindexes.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||||
|
<search>
|
||||||
|
{{range where .Site.RegularPages "Kind" "page"}}
|
||||||
|
<entry>
|
||||||
|
<title>{{ .Title }}</title>
|
||||||
|
<url>{{ .RelPermalink | relLangURL }}</url>
|
||||||
|
<categories>
|
||||||
|
{{- range .Params.categories }}<category>{{ . }}</category>{{- end }}
|
||||||
|
</categories>
|
||||||
|
<tags>
|
||||||
|
{{- range .Params.tags }}
|
||||||
|
<tag>{{ . }}</tag>
|
||||||
|
{{- end }}
|
||||||
|
</tags>
|
||||||
|
<content type="html"><![CDATA[{{ .Content | plainify }}]]></content>
|
||||||
|
</entry>
|
||||||
|
{{ end }}
|
||||||
|
</search>
|
||||||
@@ -1,36 +1,15 @@
|
|||||||
{{- define "title" }}
|
{{- define "title" }}
|
||||||
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "AllSome" }} - {{ .Site.Title -}}
|
{{- .Params.Title | default (T .Section) | default .Section }} - {{ .Site.Title -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ define "main_inner_class" }}archive posts-collapse{{ end }}
|
{{ define "main_inner_class" }}index posts-expand{{ end }}
|
||||||
|
|
||||||
{{- define "main" }}
|
{{- define "main" }}
|
||||||
<div class="post-block">
|
|
||||||
<div class="post-content">
|
|
||||||
<div class="collection-title">
|
|
||||||
{{- $cheers := "Um" }}
|
|
||||||
{{- $posts := .Scratch.Get "postsCount" }}
|
|
||||||
{{- if gt $posts 210 }}
|
|
||||||
{{- $cheers = "Excellent" }}
|
|
||||||
{{- else if gt $posts 130 }}
|
|
||||||
{{- $cheers = "Great" }}
|
|
||||||
{{- else if gt $posts 80 }}
|
|
||||||
{{- $cheers = "Good" }}
|
|
||||||
{{- else if gt $posts 50 }}
|
|
||||||
{{- $cheers = "Nice" }}
|
|
||||||
{{- else if gt $posts 30 }}
|
|
||||||
{{- $cheers = "Ok" }}
|
|
||||||
{{- end }}
|
|
||||||
<span class="collection-header">
|
|
||||||
{{- T (printf "PostArchiveCheers%s" $cheers) }}
|
|
||||||
{{- T "SymbolComma" }}
|
|
||||||
{{- T "ArchiveCounterTitle" $posts | safeHTML }}
|
|
||||||
{{- T "SymbolComma" }}
|
|
||||||
{{- T "PostArchiveKeepOn" }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ .Render "list" }}
|
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "==" .Section) }}
|
||||||
|
{{- range $paginator.Pages }}
|
||||||
</div>
|
{{ partial "post.html" (dict "ctx" . "IsHome" true) }}
|
||||||
</div>
|
{{- end }}
|
||||||
{{- partial "pagination.html" . }}
|
|
||||||
|
{{- partial "partials/pagination.html" . }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<ul class="category-list">
|
<ul class="category-list">
|
||||||
{{- range $name, $items := $cats }}
|
{{- range $name, $items := $cats }}
|
||||||
<li class="category-list-item">
|
<li class="category-list-item">
|
||||||
<a class="category-list-link" href="{{ "/categories/" | relLangURL }}{{ $name | urlize | lower }}" data-pjax-state="">{{ $name }}</a>
|
<a class="category-list-link" href="{{ "/categories/" | relLangURL }}{{ $name | urlize | lower }}" data-pjax-state="">{{ .Page.Title }}</a>
|
||||||
<span class="category-list-count">{{ len $items }}</span>
|
<span class="category-list-count">{{ len $items }}</span>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<div class="tag-cloud-tags">
|
<div class="tag-cloud-tags">
|
||||||
{{ $randNums := (seq 10) }}
|
{{ $randNums := (seq 10) }}
|
||||||
{{- range $name, $items := $tags }}
|
{{- range $name, $items := $tags }}
|
||||||
<a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize | lower }}">{{ $name }}
|
<a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize | lower }}">{{ .Page.Title }}
|
||||||
<span class="tag-list-count">
|
<span class="tag-list-count">
|
||||||
<sup>({{ len $items }})</sup>
|
<sup>({{ len $items }})</sup>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
2
layouts/archives/list.html
Normal file
2
layouts/archives/list.html
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
{{ $paginator := (.Paginate (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)).Pages.GroupByDate "2006" }}
|
||||||
|
{{ partial "list.html" $paginator }}
|
||||||
36
layouts/archives/section.html
Normal file
36
layouts/archives/section.html
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{{- define "title" }}
|
||||||
|
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "AllSome" }} - {{ .Site.Title -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ define "main_inner_class" }}archive posts-collapse{{ end }}
|
||||||
|
{{- define "main" }}
|
||||||
|
<div class="post-block">
|
||||||
|
<div class="post-content">
|
||||||
|
<div class="collection-title">
|
||||||
|
{{- $cheers := "Um" }}
|
||||||
|
{{- $posts := .Scratch.Get "postsCount" }}
|
||||||
|
{{- if gt $posts 210 }}
|
||||||
|
{{- $cheers = "Excellent" }}
|
||||||
|
{{- else if gt $posts 130 }}
|
||||||
|
{{- $cheers = "Great" }}
|
||||||
|
{{- else if gt $posts 80 }}
|
||||||
|
{{- $cheers = "Good" }}
|
||||||
|
{{- else if gt $posts 50 }}
|
||||||
|
{{- $cheers = "Nice" }}
|
||||||
|
{{- else if gt $posts 30 }}
|
||||||
|
{{- $cheers = "Ok" }}
|
||||||
|
{{- end }}
|
||||||
|
<span class="collection-header">
|
||||||
|
{{- T (printf "PostArchiveCheers%s" $cheers) }}
|
||||||
|
{{- T "SymbolComma" }}
|
||||||
|
{{- T "ArchiveCounterTitle" $posts | safeHTML }}
|
||||||
|
{{- T "SymbolComma" }}
|
||||||
|
{{- T "PostArchiveKeepOn" }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ .Render "list" }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{- partial "pagination.html" . }}
|
||||||
|
{{- end }}
|
||||||
34
layouts/flinks/single.html
Normal file
34
layouts/flinks/single.html
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{{- define "title" }}{{- .Title }} - {{ .Site.Title -}}{{- end }}
|
||||||
|
|
||||||
|
{{- define "main_inner_class" }}flinks posts-expand{{- end }}
|
||||||
|
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
<div class="flinks-block">
|
||||||
|
<h1 class="flinks-block-title">{{ .Title }}</h1>
|
||||||
|
<div class="flinks-lists">
|
||||||
|
{{ range .Site.Data.flinks }}
|
||||||
|
<div class="flinks-list">
|
||||||
|
<div class="flinks-list-title">{{ .FLinksTitle | safeHTML }}</div>
|
||||||
|
<div class="flinks-list-desc">{{ .FLinksDesc | safeHTML }}</div>
|
||||||
|
<div class="flinks-list-items">
|
||||||
|
{{ range .FLinksList }}
|
||||||
|
<div class="flinks-list-item">
|
||||||
|
<a href="{{ .link }}" rel="external nofollow noreferrer" title=" {{ .name }}" target="_blank">
|
||||||
|
<div class="flinks-item-icon">
|
||||||
|
<img class="no-lightbox entered loaded" src="{{ .avatar }}" alt="{{ .name }}"/>
|
||||||
|
</div>
|
||||||
|
<div class="flinks-item-name">{{ .name | safeHTML }}</div>
|
||||||
|
<div class="flinks-item-desc" title="{{ .desc }}">{{ .desc | safeHTML }}</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="flinks-list-footer"><hr/></div>
|
||||||
|
<div class="flinks-page-desc">{{ .Content }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
{{- define "main_inner_class" }}index posts-expand{{- end }}
|
{{- define "main_inner_class" }}index posts-expand{{- end }}
|
||||||
|
|
||||||
{{- define "main" }}
|
{{- define "main" }}
|
||||||
|
|
||||||
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
||||||
{{- range $paginator.Pages }}
|
{{- range $paginator.Pages }}
|
||||||
{{ partial "post.html" (dict "ctx" . "IsHome" true) }}
|
{{ partial "post.html" (dict "ctx" . "IsHome" true) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- partial "partials/pagination.html" . }}
|
{{- partial "partials/pagination.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
16
layouts/partials/_funs/cal_siteinfo.html
Normal file
16
layouts/partials/_funs/cal_siteinfo.html
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{{ $scratch := newScratch }}
|
||||||
|
{{ $pages := (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections).ByLastmod.Reverse }}
|
||||||
|
|
||||||
|
{{ range $pages }}
|
||||||
|
{{ $scratch.Add "totalWords" .WordCount }}
|
||||||
|
{{ $scratch.Add "totalTimes" .ReadingTime }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ range first 1 $pages }}
|
||||||
|
{{ $scratch.Set "first" (time.Format .Site.Params.timeFormat .Date) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ range last 1 $pages }}
|
||||||
|
{{ $scratch.Set "last" (time.Format .Site.Params.timeFormat .Date) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return $scratch }}
|
||||||
21
layouts/partials/_funs/get_res.html
Normal file
21
layouts/partials/_funs/get_res.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{{/* Use to get resources path with vendor */}}
|
||||||
|
|
||||||
|
{{ $fmt := "%s/%s@%s/%s" }}
|
||||||
|
|
||||||
|
{{ $npm := .res.name }}
|
||||||
|
{{ with .res.alias2 }}
|
||||||
|
{{ $npm = . }}
|
||||||
|
{{ end }}
|
||||||
|
{{- $file := .res.file }}
|
||||||
|
|
||||||
|
{{- if eq .vendor "cdnjs" }}
|
||||||
|
{{- with .res.alias }}
|
||||||
|
{{- $npm = . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $file = replaceRE `(dist|lib|source\/js)\/` "" .res.file }}
|
||||||
|
{{- $fmt = "%s/%s/%s/%s" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ $pluginRes := printf $fmt .router $npm .res.version $file }}
|
||||||
|
|
||||||
|
{{ return $pluginRes }}
|
||||||
19
layouts/partials/_thirdparty/analytics/51la.html
vendored
19
layouts/partials/_thirdparty/analytics/51la.html
vendored
@@ -1,2 +1,17 @@
|
|||||||
<script charset="UTF-8" id="LA_COLLECT" src="https://sdk.51.la/js-sdk-pro.min.js"></script>
|
<script type="text/javascript">
|
||||||
<script>LA.init({id: "{{ . }}",ck: "{{ . }}",autoTrack:true})</script>
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
var script = document.createElement('script');
|
||||||
|
|
||||||
|
script.charset = "UTF-8";
|
||||||
|
script.id = "LA_COLLECT";
|
||||||
|
script.src = "{{ .Site.Data.resources.analytics.la }}";
|
||||||
|
script.async = "true"
|
||||||
|
script.onload = function() {
|
||||||
|
{{ with .Site.Params.analytics.laId }}
|
||||||
|
LA.init({ id: "{{ . }}",ck: "{{ . }}", autoTrack:true });
|
||||||
|
{{ end }}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.head.appendChild(script);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|||||||
11
layouts/partials/_thirdparty/analytics/baidu.html
vendored
Normal file
11
layouts/partials/_thirdparty/analytics/baidu.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<script type="text/javascript">
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
var script = document.createElement('script');
|
||||||
|
|
||||||
|
script.charset = "UTF-8";
|
||||||
|
script.src = "{{ .Site.Data.resources.analytics.baidu }}{{ .Site.Params.analytics.baidu }}";
|
||||||
|
script.async = "true"
|
||||||
|
|
||||||
|
document.head.appendChild(script);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
11
layouts/partials/_thirdparty/analytics/busuanzi.html
vendored
Normal file
11
layouts/partials/_thirdparty/analytics/busuanzi.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<script type="text/javascript">
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
var script = document.createElement('script');
|
||||||
|
|
||||||
|
script.charset = "UTF-8";
|
||||||
|
script.src = "{{ .Site.Data.resources.analytics.busuanzi }}";
|
||||||
|
script.async = "true"
|
||||||
|
|
||||||
|
document.head.appendChild(script);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
18
layouts/partials/_thirdparty/analytics/google.html
vendored
Normal file
18
layouts/partials/_thirdparty/analytics/google.html
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<script type="text/javascript">
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
var script = document.createElement('script');
|
||||||
|
|
||||||
|
script.charset = "UTF-8";
|
||||||
|
script.src = "{{ .Site.Data.resources.analytics.google }}{{ .Site.Params.analytics.google }}";
|
||||||
|
script.async = "true"
|
||||||
|
script.onload = function() {
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', '{{ .Site.Params.analytics.google }} ');
|
||||||
|
}
|
||||||
|
|
||||||
|
document.head.appendChild(script);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
21
layouts/partials/_thirdparty/comment/artalk.html
vendored
21
layouts/partials/_thirdparty/comment/artalk.html
vendored
@@ -1,20 +1 @@
|
|||||||
{{- with .Site.Params.artalk }}
|
<div class="artalk-container"></div>
|
||||||
<link href="//unpkg.com/artalk@2.3.4/dist/Artalk.css" rel="stylesheet">
|
|
||||||
<script src="//unpkg.com/artalk@2.3.4/dist/Artalk.js"></script>
|
|
||||||
|
|
||||||
<!-- Artalk -->
|
|
||||||
<div id="Comments"></div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
new Artalk({
|
|
||||||
el : '#Comments',
|
|
||||||
pageKey : '{{ $.Page.RelPermalink }}',
|
|
||||||
pageTitle : '{{ $.Page.Title }}',
|
|
||||||
server : '{{ .server }}',
|
|
||||||
site : '{{ .site }}',
|
|
||||||
locale : 'auto',
|
|
||||||
placeholder : '{{ .placeholder }}'
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user