245 Commits

Author SHA1 Message Date
elkan1788
67b5ae3a3a Merge branch 'hotfix_v4.6.3' with data config change.
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2024-07-22 23:21:25 +08:00
elkan1788
d155afe2ae 🔧 Upgrade the data VERSION. 2024-07-22 23:20:46 +08:00
elkan1788
119b715655 🐛 💄 Fixed the config file & add github flag in footer. 2024-07-22 22:21:18 +08:00
elkan1788
1b98206cad Merge branch 'release_v4.6.2'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2024-07-21 22:11:30 +08:00
elkan1788
9e42b3fad1 🔥 Update the multi cnd vendor service. 2024-07-21 19:52:40 +08:00
elkan1788
d560e45ca2 🎨 🔥 Add font files for math. 2024-07-21 17:37:01 +08:00
elkan1788
046bb90685 💄 Add imag viewer demo images. 2024-07-21 14:18:29 +08:00
elkan1788
e86002e941 🐛 Change the demo friend link's avatar. 2024-07-21 14:06:49 +08:00
elkan1788
f8ac686c1c 🐛 Fixed the image viewer init & add demo. 2024-07-21 14:06:03 +08:00
elkan1788
082fb48650 📝 Update the link prefix to demo. 2024-07-21 11:51:35 +08:00
elkan1788
c07ff1df05 🎨 Add local resources to support the 3rd js & css. 2024-07-21 11:33:10 +08:00
elkan1788
c5c1f03557 🔒 🔧 Fixes #142 Optimize CDN service code 2024-07-20 21:36:08 +08:00
elkan1788
4e05bfb399 🏷️ Upgrade the dev version. 2024-06-10 21:13:26 +08:00
elkan1788
30212827f0 📝 Use local image from git repos. 2024-06-10 18:12:07 +08:00
elkan1788
5aaeae2885 📝 Add donors list & git label. 2024-06-10 17:47:31 +08:00
elkan1788
526a4b7005 🍱 Upgrade the 3rd resources & mirro 2024-06-07 18:36:43 +08:00
elkan1788
b4fd858b94 🐛 Rollback code & not support lower category. 2024-06-07 17:36:49 +08:00
凡梦星尘
ad03e3011e Merge pull request #137 from hxhue/fix-categories-page-not-counting-lowercase-categories
fixed #136  category name: .Page.Title => .Name
2024-04-29 13:03:24 +08:00
hxhue
5686c96de2 fix category name: .Page.Title => .Name 2024-04-11 13:40:05 +08:00
elkan1788
15933757ca 🏗️ Add friend's link flag.
Sometimes the web URL link were not availabed forever, so need check it when build the statics files.
2024-02-18 17:14:03 +08:00
elkan1788
5610d561bb ⚗️ Remove secondary menu settings
Now it does only support for Gemini theme, will be release next time.
2024-02-18 16:42:01 +08:00
elkan1788
385f0f023b 🔀 Merge local & remote code, seems not good for this. 2024-02-18 16:25:00 +08:00
elkan1788
40c36a70f0 🤡 Only for sync remote repository codes. 2024-02-18 16:21:12 +08:00
elkan1788
25f978e06e Merge branch 'develop' of github.com:hugo-next/hugo-theme-next into develop 2023-12-31 10:16:35 +08:00
elkan1788
a0ce0996e0 🔖 Update the version to 4.6.1 2023-12-31 10:15:30 +08:00
elkan1788
15c06f3445 🔖 Update the version to 4.5.4. 2023-12-31 08:24:46 +08:00
elkan1788
25aff95260 🐛 Fixed the font icon error, Resolved #134
Because the offical fontawsome had update the font size, there will use new class of icon reference.
2023-12-31 08:23:15 +08:00
凡梦星尘
93ec7e56e6 Merge pull request #130 from X-Zero-L/X-Zero-L-patch-1
Fixed the directory name in custom-files.md
2023-12-30 19:55:53 +08:00
凡梦星尘
cf47decf89 Merge pull request #127 from thomas-louvigne/french-version
French translation
2023-12-30 19:54:45 +08:00
X-Zero-L
b27a449dc5 Fixed the directory name in custom-files.md
Signed-off-by: X-Zero-L <98764734+X-Zero-L@users.noreply.github.com>
2023-12-01 19:50:34 +08:00
Thomas L
a7c7854617 remove trailing white spaces 2023-11-16 18:18:13 +01:00
Thomas L
89a8289f68 final translation 2023-11-16 18:15:16 +01:00
凡梦星尘
11685b9b7b Merge pull request #129 from sxz799/sxz799-patch-1
🐛 fixed修复复制代码时多余的空行
2023-11-08 20:51:21 +08:00
凡梦星尘
607d67051f Merge pull request #124 from chn-lee-yumi/chn-lee-yumi-feature-meta-description
Add meta description to head
2023-11-08 20:30:56 +08:00
Thomas L
8e3409c4af improve translation 2023-11-07 16:51:18 +01:00
Thomas L
6ebb7d928a improve translation 2023-11-07 16:36:11 +01:00
Thomas L
509ca385d7 improve translation 2023-11-07 16:04:31 +01:00
Thomas L
a1117d3403 BETA french translation 2023-11-06 15:25:53 +01:00
sxz799
d5a25fb0cc fix:修复复制代码时多余的空行
Signed-off-by: sxz799 <sxz799@126.com>
2023-10-27 15:45:16 +08:00
YumiLee
3b4f87bdbf 💄Add Meta Description to head
SEO optimization

Signed-off-by: YumiLee <chn.lee.yumi@gmail.com>
2023-10-20 23:31:35 +11:00
凡梦星尘
43d403a019 Merge pull request #120 from chn-lee-yumi/chn-lee-yumi-fix-missing-slash
🐛 Fixed the missing "/" of the directory and tag links
2023-10-16 10:02:39 +08:00
YumiLee
2ba53504e1 Merge pull request #1 from chn-lee-yumi/chn-lee-yumi-fix-missing-slash
🐛 Fixed the missing "/" of the directory and tag links
2023-10-13 15:45:33 +11:00
YumiLee
2fe68caed9 🐛 Fixed the missing "/" of the directory and tag links
Missing "/" will lead to an extra 301 and not friendly to search engines.

Signed-off-by: YumiLee <chn.lee.yumi@gmail.com>
2023-10-13 15:42:26 +11:00
凡梦星尘
f59fca14f8 Merge pull request #113 from WaterLemons2k/module Closed#70
Support Golang Module
2023-08-21 10:35:19 +08:00
WaterLemons2k
39e17d6f68 Support Golang Module 2023-08-19 17:08:37 +08:00
elkan1788
e08456419c Merge branch 'hotfix_v4.5.3' into develop 2023-07-18 11:58:35 +08:00
elkan1788
8405b789e9 Merge branch 'hotfix_v4.5.3'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2023-07-18 11:57:04 +08:00
elkan1788
db7095c0bb 🐛 Fixed the 51la widget display none. 2023-07-18 11:56:38 +08:00
elkan1788
24229f1802 💄 Add secondary menu in Pisces & Gemini schemes. 2023-07-12 07:35:53 +08:00
elkan1788
b7ec24fd1b 🔖 Start new development version to v4.6.0 2023-06-28 16:36:32 +08:00
elkan1788
574be4e134 Merge branch 'hotfix_v4.5.2' into develop 2023-06-28 16:33:57 +08:00
elkan1788
9453520e2a Merge branch 'hotfix_v4.5.2'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2023-06-28 16:33:35 +08:00
elkan1788
35fff3e0cc Add limit for generate index content, Resolved #101. 2023-06-28 16:33:02 +08:00
elkan1788
dfcdaf9245 Merge branch 'hotfix_v4.5.1' into develop 2023-06-28 10:17:49 +08:00
elkan1788
b4c5e79c1b Merge branch 'hotfix_v4.5.1'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2023-06-28 10:17:26 +08:00
elkan1788
7be11c4b7f 🐛 Fixed the issue of converting English letters to lowercase in category names. 2023-06-27 23:06:38 +08:00
elkan1788
03b83da513 🐛 Fixed the issue of highlighting comma format error. 2023-06-27 23:01:13 +08:00
elkan1788
ccd85b2436 Merge branch 'release_v4.5.0' into develop 2023-06-24 21:24:41 +08:00
elkan1788
53ad048763 Merge branch 'release_v4.5.0'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 2s
2023-06-24 21:20:22 +08:00
elkan1788
85871aadfc 🐛 Fixed the yaml syntax error. 2023-06-24 21:18:24 +08:00
elkan1788
61079367ef 🔧 Update the zh_tw i18n config file. 2023-06-24 20:27:00 +08:00
elkan1788
07e199ba11 🔖 Start new release version to 4.5.0 2023-06-24 16:49:05 +08:00
elkan1788
92a55d49e5 💄 Add magrin pixes from icon between text. 2023-06-24 16:37:33 +08:00
elkan1788
ee86b0d152 🐛 Fixed the comment enabled setting. 2023-06-24 15:24:04 +08:00
elkan1788
53f3a902c1 💄 Upgrade categories display in post meta. 2023-06-24 14:30:15 +08:00
elkan1788
05dba844d7 💄 Add support subcategory feature. 2023-06-24 11:08:17 +08:00
elkan1788
d44d4c2a79 💄 add page comment counter click event. 2023-06-23 22:06:42 +08:00
elkan1788
a4f496b796 📝 Upgrade README content with add new donor. 2023-06-23 20:09:17 +08:00
凡梦星尘
03ebd658ea Merge pull request #96 from vishnucho/main
feat i18n zh-tw
2023-04-23 09:52:31 +08:00
Vishnu Cho
77a33df023 feat i18n zh-tw 2023-04-15 15:47:21 +08:00
elkan1788
588740f27b 💄 Add header anchor in post page. Close #35 2023-04-07 14:17:15 +08:00
elkan1788
726349a2e0 🔀 sync main branch code 2023-04-05 15:49:39 +08:00
elkan1788
fbac63d70e 🎨 Improved page & comment counter, Close #74. 2023-04-05 12:16:05 +08:00
elkan1788
c7e4f52499 🎨 Update the site stat paramter format. 2023-04-02 17:07:29 +08:00
凡梦星尘
fdaabac210 Merge branch 'develop' of github.com:hugo-next/hugo-theme-next into develop 2023-02-20 10:30:42 +08:00
凡梦星尘
76bb84d195 Merge pull request #89 from ego/fix/utils-hideComments
Minor improvements for utils
2023-02-20 10:24:21 +08:00
凡梦星尘
88e6bc5993 🐛 Fixed the verify code build error. 2023-02-16 16:19:45 +08:00
Alter Ego
3feea66b49 * Fix utils function hideComments.
* Fix function name.
2023-02-10 01:20:07 +00:00
凡梦星尘
6b589a8206 :wrench:💄 Update the i18n config files. 2023-01-02 20:08:48 +08:00
凡梦星尘
835e98d85d :lipstick:🔧 Update the sidebar info. 2023-01-02 18:00:44 +08:00
凡梦星尘
a2019876a2 :wrench:💄 Update the post archive info. 2023-01-02 14:58:17 +08:00
凡梦星尘
dca196c315 :lipstick:🔧 Update the post meta info. 2023-01-01 22:06:59 +08:00
凡梦星尘
85b7dc11ca :lipstick:🔧 Upate the reward tip info. 2023-01-01 21:43:06 +08:00
凡梦星尘
03fd9dc829 :lipstick:🔧 Update the post copyright info. 2023-01-01 21:32:18 +08:00
凡梦星尘
a2f37c8470 Remove trim blank charsets flag to improve speed. 2023-01-01 21:12:58 +08:00
凡梦星尘
d0a6d943e0 📝 Find other way to break down math formula. 2023-01-01 17:48:24 +08:00
凡梦星尘
fa0f7856bf 📝 Update the math formula break down description. 2023-01-01 17:18:56 +08:00
凡梦星尘
dac9b379dc 💄 Move fixed post copyright word break limit. 2022-12-31 21:54:21 +08:00
凡梦星尘
a59b6a6f32 🔍 Add copyright's img attribute of alt. 2022-12-21 09:09:01 +08:00
凡梦星尘
40674ad12b 📝 Upgrade the README content to add new Donor. 2022-12-19 11:43:52 +08:00
凡梦星尘
b0ad23d764 Merge pull request #76 from ehlxr/patch-1
fix bug  404 of uppercase tag or category name
2022-12-19 11:39:34 +08:00
凡梦星尘
6db5f5c3f9 Merge pull request #76 from ehlxr/patch-1
fix bug  404 of uppercase tag or category name
2022-12-19 11:23:47 +08:00
ḕℏỈẍȓ
7b7b50fe1a fix bug 404 of uppercase tag or category name
fix bug of 404 when the tag or category  name is uppercase

Signed-off-by: ḕℏỈẍȓ <ehlxr.me@gmail.com>
2022-12-12 10:40:00 +08:00
kaolengmian7
73b15c7271 Merge remote-tracking branch 'origin/develop' into develop 2022-11-06 22:58:29 +08:00
凡梦星尘
24b135ca4b Merge branch 'hotfix_v4.4.1' into develop 2022-11-06 18:26:54 +08:00
凡梦星尘
86b9b5aa50 Merge branch 'hotfix_v4.4.1' 2022-11-06 18:26:14 +08:00
凡梦星尘
8918bff71f 🐛 Fixed the page views counter in home page. 2022-11-06 18:23:55 +08:00
凡梦星尘
dd3766bce3 📝 Startup hotfix for v4.4.1 2022-11-06 17:24:23 +08:00
kaolengmian7
8310dd347d [fix]修复样式BUG,调整 li 标签和 a 标签 css 样式 2022-11-05 10:31:41 +08:00
凡梦星尘
d6de03a2d0 Merge branch 'release_v4.4.0' into develop 2022-10-30 22:19:31 +08:00
凡梦星尘
21395a0263 Merge branch 'release_v4.4.0'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2022-10-30 21:21:00 +08:00
凡梦星尘
54ada081c7 🐛 Fixed the busuanzi post view counter in home page. 2022-10-30 21:19:34 +08:00
凡梦星尘
51221f0f91 📝 Upgrade the README content about post front matter. 2022-10-30 21:12:01 +08:00
凡梦星尘
f84d590023 🐛 Fixed the comment setting in front matter. 2022-10-30 21:04:08 +08:00
凡梦星尘
7c9b834729 Add new CDN vendor who name is qiniu & bootcdn. 2022-10-30 16:54:38 +08:00
凡梦星尘
e1c088c355 💄 Add comment counter in home & page. 2022-10-30 11:43:18 +08:00
凡梦星尘
d609eecb23 ⬆️ Upgrade the Waline component version. 2022-10-30 10:40:58 +08:00
凡梦星尘
08156f22b8 Use lazy loading image function & add image viewer. Close #65 2022-10-29 22:37:41 +08:00
凡梦星尘
fa414e827a 💄 Make home post view only work for waline. 2022-10-29 20:35:19 +08:00
凡梦星尘
146bf52038 💄 Update use waline pageview & add to homepage. Close #41, #42 2022-10-29 18:15:39 +08:00
凡梦星尘
ac712b9277 🐛 Fixed the 51la widget load data issue. 2022-10-27 17:29:18 +08:00
凡梦星尘
0d1b00f7b0 🔥 Refactor struct & code for loading 3rd scripts. 2022-10-27 15:57:42 +08:00
凡梦星尘
9160a33053 💄 Fixed the waline reaction icon pixes in mobile driver. 2022-10-27 08:54:54 +08:00
凡梦星尘
525c8a7cf5 Upgrade third party js logic improve load speed. 2022-10-26 22:37:03 +08:00
凡梦星尘
90df1e1247 Refactoring the comments component js scripts. 2022-10-24 22:08:17 +08:00
凡梦星尘
b9511728f3 🔥 Remove unused the gt.scss file. 2022-10-24 20:38:28 +08:00
凡梦星尘
cc91cd0e07 🔥 Remove the busuanzi layout in footer. 2022-10-23 18:37:29 +08:00
凡梦星尘
aaa3a1449f Make the google translate script lazy load. 2022-10-23 18:36:10 +08:00
凡梦星尘
dacf4cd2c7 🙈 Add VSCode IDEA setting ignore. 2022-10-23 17:43:30 +08:00
凡梦星尘
913ae1821a 🐛 Fixed toggle theme color will refresh page. 2022-10-23 16:05:23 +08:00
凡梦星尘
1ae0ca2488 🐛 Fixed the theme schema listener of system's media. 2022-10-23 09:06:58 +08:00
凡梦星尘
72972e3a10 💄 Use smaller font size on tool button by default. 2022-10-22 17:24:13 +08:00
凡梦星尘
50f17ff502 💄 Uniform the tool buttons font size. 2022-10-22 13:24:28 +08:00
凡梦星尘
6865ec72c7 🚑 Enable the home page register tool button click. 2022-10-22 12:55:11 +08:00
凡梦星尘
0d4e0b9b84 🚑 Fixed the tool buttons click event. 2022-10-22 12:52:27 +08:00
凡梦星尘
c0ba7eda06 🎨 Try to remove the post link in creative commons. 2022-10-16 20:16:24 +08:00
凡梦星尘
e0cfe0c50c 🔥 🚚 Remove no used code & rename startup shell script file name. 2022-10-12 20:06:14 +08:00
凡梦星尘
e4cb4f0188 🔥 Remove no used code. 2022-10-09 21:54:02 +08:00
凡梦星尘
989e2c43dc 💄 Try to add reaction image with pixes in mobile driver. 2022-10-09 21:53:03 +08:00
凡梦星尘
2d736b8f35 💄 Add Algolia link with source reference content. 2022-10-07 10:13:10 +08:00
凡梦星尘
b04c1b9aa0 🐛 Fixed the tool button scroll Y pixes. 2022-10-06 13:57:37 +08:00
凡梦星尘
6a42188853 💄 Design search box footer with pagination & fixed toc enable in home page. 2022-10-06 12:00:10 +08:00
凡梦星尘
0536ac37fc 💄 Add tool button click events make it more silky. 2022-10-06 10:48:52 +08:00
凡梦星尘
0abad2539a 💄 Fixed the TOC enable in global set & implement the auto follow in TOC list with content scroll. 2022-10-06 10:02:19 +08:00
凡梦星尘
48df6401d8 💄 Remove margin in Algolia pagination widget. 2022-10-06 08:49:03 +08:00
凡梦星尘
9632707ece 💄 Redesign the Algolia search result display UI. 2022-10-05 22:56:13 +08:00
凡梦星尘
ea8a4f1dca 🔖 Start new development version to 4.4.0 2022-10-05 22:20:51 +08:00
凡梦星尘
bebd279735 👷 Upgrade Algolia search indexes with objectID. 2022-10-04 14:19:01 +08:00
凡梦星尘
9f2b1f37f8 Merge branch 'hotfix_v4.3.1' into develop 2022-10-02 13:46:50 +08:00
凡梦星尘
01f2c10ec8 Merge branch 'release_v4.3.0' into develop 2022-10-02 13:46:34 +08:00
凡梦星尘
0711770e9f Merge branch 'hotfix_v4.3.1'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2022-10-02 11:12:08 +08:00
凡梦星尘
4381eee782 📝 Update the README content. 2022-10-02 11:11:37 +08:00
凡梦星尘
3f8ab12e47 💄 Add TOC header hover & active style. 2022-10-02 09:28:51 +08:00
凡梦星尘
d6fbf924b8 💄 Improve the theme switch logic with config defined. 2022-10-02 09:28:21 +08:00
凡梦星尘
a7b9d5338e 💄 Add tree line on TOC list style. 2022-10-01 22:06:47 +08:00
凡梦星尘
1208213476 💄 Upgrade the waline version to support emoji click for article. 2022-10-01 18:21:35 +08:00
凡梦星尘
dd8ffbb179 🔧 Move the version to v4.3.1 2022-10-01 16:59:48 +08:00
凡梦星尘
04bf52abb8 📝 Add some new front matter parameters in default archetype. 2022-10-01 09:37:16 +08:00
凡梦星尘
1cb9973dbb Merge branch 'release_v4.3.0'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2022-09-30 21:05:02 +08:00
凡梦星尘
4be573b5d3 💄 Add version info of Hugo & NexT theme in footer. 2022-09-30 21:04:25 +08:00
凡梦星尘
7592b211c1 🔧 Upgrade the release version to 4.3.0. 2022-09-30 21:01:34 +08:00
凡梦星尘
28a3d36f88 💄 Add list number before table of content and article's head outline. 2022-09-29 10:24:41 +08:00
凡梦星尘
70cba4cc6a 💄 Remove background color of tool buttons & reduce this zindex level. 2022-09-28 21:06:30 +08:00
凡梦星尘
dc1c68d5c9 💄 Add comments active dark & light model. 2022-09-27 11:01:43 +08:00
凡梦星尘
d4730f89d2 💄 Add switch theme button function. 2022-09-26 21:54:03 +08:00
凡梦星尘
4037ea0d68 💄 Add new tool buttons in page side. 2022-09-25 21:40:36 +08:00
凡梦星尘
523c12f0ec 📝 Update the mermaid code style. 2022-09-19 22:46:06 +08:00
凡梦星尘
d994042131 :lipstick:🚩 Add mermaid support. Close #56 2022-09-19 21:57:23 +08:00
凡梦星尘
56166c7e76 🐛 Fixed menu active action match error item that it could not use cached function. 2022-09-18 09:00:00 +08:00
凡梦星尘
f1fafdc587 🐛 Fixed the local search engine can't find indexes file & repose error link of article. 2022-09-17 21:54:36 +08:00
凡梦星尘
9bde077b0b 💄 🐛 Fixed the 51la widget not init error & format busuanzi value. 2022-09-13 20:15:43 +08:00
凡梦星尘
e0c4a0ecd4 🔧 Use busuanzi as analytics plugin & close comment by default. 2022-09-13 19:29:00 +08:00
凡梦星尘
f41c3c0a73 🐛 Fixed the 51la id replace with user defined. 2022-09-12 16:53:44 +08:00
凡梦星尘
f3fc99ac03 💄 Add 51la analytics widget plug-in in sidebar. 2022-09-12 16:43:24 +08:00
凡梦星尘
20aadcf9ac 💄 Update the read times label of Chinese. 2022-09-12 11:36:17 +08:00
凡梦星尘
2cc8f302d3 🐛 Fixed some error about the run times , words and read times logic when calculate. 2022-09-12 11:28:55 +08:00
凡梦星尘
5634c20a02 Improve the site information display things. 2022-09-12 10:22:22 +08:00
凡梦星尘
e79234935b 🐛 Fixed the border-radius not working in Muse & Mist theme. 2022-09-11 23:18:28 +08:00
凡梦星尘
39058e897d 🐛 Fixed the box-shadow not working in Muse & Mist theme. 2022-09-11 23:14:16 +08:00
凡梦星尘
568ef4ecc6 🐛 Fixed the home page not show run times & last push date. 2022-09-11 22:55:01 +08:00
凡梦星尘
6542375766 🔥 Remove unuse the post view style code. 2022-09-11 22:49:32 +08:00
凡梦星尘
6f03209e93 💄 Support site information widget. close #30, #34 2022-09-11 22:40:38 +08:00
凡梦星尘
2a7fd9f8fb 💄 Support more of analytics engine such as baidu, google, busuanzi and so on, then add new web information widget. close #19 2022-09-11 18:33:41 +08:00
凡梦星尘
c38a439171 💄 Support render math formula by mathjax & katex framework. close #27 2022-09-11 11:14:54 +08:00
凡梦星尘
dc66bc1a05 💄 Make a sample demo of custom files, close #33 2022-09-11 09:06:05 +08:00
凡梦星尘
fb007e57e5 Merge branch 'develop' of github.com:hugo-next/hugo-theme-next into develop 2022-09-10 21:41:47 +08:00
凡梦星尘
df09cbe4c0 💄 Add custom files support just enjoy by yourself. 2022-09-10 21:41:33 +08:00
凡梦星尘
2276aae127 🐛 Fixed the highlight code block auto scroll when overflow x. 2022-09-10 21:30:24 +08:00
凡梦星尘
71844813bb Merge pull request #48 from finisky/tagoriginal
Preserve the original tag/category name in tags/categories page
2022-08-28 12:04:11 +08:00
finisky
784869832e Preserve the original tag/category name in tags/categories page 2022-08-28 11:46:58 +08:00
凡梦星尘
423d4c0ef9 🐛 Fixed the menu items text & icon align display, Close #37. 2022-08-27 10:01:28 +08:00
凡梦星尘
086ce454ff Merge branch 'release_v4.2.0' into develop 2022-08-27 09:44:39 +08:00
凡梦星尘
02ba198cfa 💡 Update the Waline client version to 2.6.3. 2022-08-26 14:24:18 +08:00
凡梦星尘
0db1dac57f Merge branch 'release_v4.2.0'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2022-08-15 21:58:03 +08:00
凡梦星尘
c9d4a00120 🔖 Start for release v4.2.0. 2022-08-15 21:53:45 +08:00
凡梦星尘
9c102f9695 💄 Auto scroll to show overflow code block content. 2022-08-15 21:51:31 +08:00
凡梦星尘
5fb6618bd3 💄 Use scroll to show overflow code block content. 2022-08-15 21:36:22 +08:00
凡梦星尘
3de3e1de4d 💄 Make flinks page support note short code. 2022-08-13 16:27:15 +08:00
凡梦星尘
51eea3acc0 💄 Update the flinks show style in mobile driver. 2022-08-13 16:10:35 +08:00
凡梦星尘
be3bf4e1f2 🔧 Enable the robots file. 2022-08-13 14:32:56 +08:00
凡梦星尘
cbc39591d2 💄 Fixed the SVG image fixed width pixes over the div DOM. 2022-08-13 14:31:43 +08:00
凡梦星尘
3965c0c108 💄 Udpate sub folder archive page title with i18n support. 2022-08-10 22:07:03 +08:00
凡梦星尘
fc44e79ddd 🐛 Fixed the sidebar posts link with 404 error. 2022-08-09 17:56:07 +08:00
凡梦星尘
d3eb723e24 💄 Make note short code support without icon style. 2022-08-09 09:37:59 +08:00
凡梦星尘
b739434f8d 💄 🐛 Fixed code block line number background color style. 2022-08-09 09:23:37 +08:00
凡梦星尘
36b428f1d9 💄 🐛 Code block layout add more word break rules. 2022-08-08 14:33:09 +08:00
凡梦星尘
678b92c0a7 💄 🐛 Try to fixed the highlight code block over layout issue. 2022-08-08 12:56:01 +08:00
凡梦星尘
aa8a60d852 🎨 Use more standard parameter name which call avatar in flinks page. 2022-08-07 16:59:38 +08:00
凡梦星尘
30d161b1e2 💄 Fixed the highlight code block margin bottom pixels. 2022-08-07 11:48:05 +08:00
凡梦星尘
96ba605026 🐛 Fixed some configuration & display scripts. 2022-08-06 16:15:15 +08:00
凡梦星尘
1677648167 💄 Add quote & note shortcodes. Close #29 2022-08-06 15:18:13 +08:00
凡梦星尘
6cf961d392 💄 Implement the special page for friend's links show. Close #26 2022-08-05 15:18:52 +08:00
凡梦星尘
97799aaaa8 🐛 Fixed the archives list page permalink visit. 2022-08-02 18:42:33 +08:00
凡梦星尘
1f668be6fa 🐛 Fixed the build error due to about the syntax error 2022-08-02 18:34:55 +08:00
凡梦星尘
bb70f5b6a5 🔧 Try to fixed the Pre in section. 2022-08-02 18:18:26 +08:00
凡梦星尘
fdd49ab3cb 💄 Mark the search result of algolia search. 2022-08-02 15:12:49 +08:00
凡梦星尘
1917055634 🐛 Fixed the algolia search script find result in content. 2022-08-02 11:22:19 +08:00
凡梦星尘
7ed095d42c 🐛 Fixed the aloglia index content . 2022-08-01 17:18:56 +08:00
凡梦星尘
ac844e4e8c 🔧 Add algolia search indexes content. 2022-08-01 17:14:22 +08:00
凡梦星尘
34faa6f6f3 💄 Add algolia logo flag in search result. 2022-07-31 18:21:42 +08:00
凡梦星尘
c1e7e59646 🔧 🌱 Complete the algolia search feature, Close #9. 2022-07-31 18:01:57 +08:00
凡梦星尘
9a4883832f 🔧 🌱 Complete the local search feature. 2022-07-31 11:02:55 +08:00
凡梦星尘
6cbffe48b7 🔧 Re Change default section display not use archive page. 2022-07-30 17:39:57 +08:00
凡梦星尘
403a2e6f54 Merge branch 'release_v4.1.0'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2022-07-27 21:43:21 +08:00
凡梦星尘
832953372a Merge branch 'release_v4.1.0' into develop 2022-07-27 21:42:45 +08:00
凡梦星尘
1171bcbfb3 🍱 Update the fontawesome version. 2022-07-27 21:29:04 +08:00
凡梦星尘
6ffddb602f 🔖 Start release Version 4.1.0 . 2022-07-27 13:56:02 +08:00
凡梦星尘
f430f0730b 🔧 Add Hugo version judge logic to avoid the lower version building. Closed #21 2022-07-27 11:21:03 +08:00
凡梦星尘
87301d1d83 🐛 fixed the SCSS build waring things. 2022-07-27 11:06:02 +08:00
凡梦星尘
e83dbabc3f 🔧 Archives page demo shows. 2022-07-26 22:18:43 +08:00
凡梦星尘
af59e93d25 🔧 Add special list for archives articles show. 2022-07-26 21:41:07 +08:00
凡梦星尘
d42375820d Use script to control comments container show. 2022-07-22 18:35:04 +08:00
凡梦星尘
31f6e21671 Improve page scripts configuration files. 2022-07-22 17:16:34 +08:00
凡梦星尘
a9ff14d312 🔧 Upgrade the config file settings. 2022-07-20 18:29:31 +08:00
凡梦星尘
12fbc945bc Improve site generate speed with use partialCached function. 2022-07-20 15:42:01 +08:00
凡梦星尘
ad271c1c20 Use dynamic function load analytic scripts avoid affecting the execution of page functions. 2022-07-20 09:03:11 +08:00
凡梦星尘
81cff8a5c2 Improved the comments plug-in load function, close #12 2022-07-13 21:25:15 +08:00
凡梦星尘
bf55ada93c 📝 Update the config description information. 2022-07-08 10:09:23 +08:00
凡梦星尘
1339ffe29b 🚧 Add new config parameters for Giscus comment. 2022-07-07 09:00:07 +08:00
凡梦星尘
c12cdf7b48 Merge branch 'release_v4.0.1' into develop 2022-07-05 22:08:07 +08:00
凡梦星尘
3143ca9d52 Merge branch 'release_v4.0.1'
Some checks failed
sync-2-gitee / sync-2-gitee (push) Failing after 3s
2022-07-05 22:06:35 +08:00
凡梦星尘
775dec0314 🔥 Remove the comment debug code 2022-07-05 22:06:21 +08:00
凡梦星尘
ff9858975f Merge branch 'release_v4.0.1' 2022-07-05 22:02:31 +08:00
凡梦星尘
ca709ba909 Improve the post page view logic. 2022-07-05 22:01:48 +08:00
凡梦星尘
fb441cb39e 📝 Update the theme description content. 2022-07-05 21:23:07 +08:00
凡梦星尘
98cbde4863 🐛 Fixed the post footer's tag link visit, closed #15 2022-07-05 10:04:25 +08:00
凡梦星尘
8aad5052df 🔥 Remove no used the old code files. 2022-07-05 09:52:58 +08:00
凡梦星尘
513f1c47a9 🐛 Fixed the Hugo syntax for length function, fixes #14 2022-07-04 22:41:06 +08:00
凡梦星尘
9fdf7ab087 📝 Update the theme running environment need min version for Hugo Extended. 2022-07-04 22:13:01 +08:00
凡梦星尘
c0b2403843 Merge branch 'develop' of github.com:hugo-next/hugo-theme-next into develop 2022-07-04 09:36:36 +08:00
凡梦星尘
95667f5ca3 📝 Update the README content fixed some error info. 2022-07-04 09:35:18 +08:00
凡梦星尘
bc3372ad2a Merge branch 'hotfix' 2022-07-04 09:28:01 +08:00
凡梦星尘
a061a4037c 📝 Update the README content fixed some error info. 2022-07-04 09:27:41 +08:00
凡梦星尘
ff109afb02 Merge branch 'release' into develop 2022-07-03 22:00:50 +08:00
凡梦星尘
3102990265 Merge branch 'release' into develop 2022-07-03 10:42:03 +08:00
281 changed files with 7473 additions and 2577 deletions

29
.gitignore vendored
View File

@@ -1,6 +1,31 @@
# 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
!exampleSite/content/post/image-viewer
# 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/startup.sh
data/*
!data/config.yaml
!data/resources.yaml
# vscode
.vscode/

125
README.md
View File

@@ -1,7 +1,7 @@
[中文](README.zh.md) | [English](#) [中文](https://github.com/hugo-next/hugo-theme-next/blob/main/README.zh.md) | [English](#)
<a title="Hugo NexT Website" href="https://preview.hugo-next.eu.org"> <a title="Hugo NexT Website" href="https://preview.hugo-next.eu.org">
<img align="right" alt="NexT logo" width="266" src="https://lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png"> <img align="right" alt="NexT logo" width="266" src="images/hugo-next-primary.png">
</a> </a>
## Hugo NexT ## Hugo NexT
@@ -10,41 +10,74 @@
> All page designs & configuration compatibility with Hexo NexT, it's very easy migrate your site from Hexo to Hugo and enjoy yourself. > All page designs & configuration compatibility with Hexo NexT, it's very easy migrate your site from Hexo to Hugo and enjoy yourself.
[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.86.0-red?style=flat-square&logo=hugo&color=%23FF4088)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&label=gh-pg&logo=GitHub)](https://github.com/hugo-next/hugo-theme-next) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) [![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square&label=Gitter)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.89.0-red?style=flat-square&logo=hugo&color=%23FF4088&&label=Hugo%20Extended)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&logo=GitHub&label=Github%20Pages)](https://github.com/hugo-next/hugo-theme-next) [![Contributors](https://img.shields.io/github/contributors/hugo-next/hugo-theme-next?style=flat-square&color=%235E0D73&logo=contributorcovenant&label=Contributors)](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [![Latest Release](https://img.shields.io/github/v/release/hugo-next/hugo-theme-next?include_prereleases&style=flat-square&color=%23DD2C00&logo=semanticrelease&label=Latest%20Release)](https://github.com/hugo-next/hugo-theme-next/releases) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files&label=Repo%20Size)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square&label=License)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
## 4 Scheme ![Screenshot](images/screenshot.png)
## 🎨 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 |
| :---: | :---: | :---: | :---: | :---: | :---: | | :---------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------------: | :------------------------------------------------: | :-------------------------------------------------------------------------------------------------: |
| Preliminary | [Gemini](https://preview.hugo-next.eu.org/) | [Muse](https://preview.hugo-next.eu.org/muse/) | [Mist](https://preview.hugo-next.eu.org/mist/) | [Pisces](https://preview.hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=preview-hugo-next&style=for-the-badge) | | Preliminary | [Gemini](https://preview.hugo-next.eu.org/) | [Muse](https://preview.hugo-next.eu.org/muse/) | [Mist](https://preview.hugo-next.eu.org/mist/) | [Pisces](https://preview.hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=preview-hugo-next&style=for-the-badge) |
| Production | [Gemini](https://hugo-next.eu.org/) | [Muse](https://hugo-next.eu.org/muse/) | [Mist](https://hugo-next.eu.org/mist/) | [Pisces](https://hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) | | Production | [Gemini](https://hugo-next.eu.org/) | [Muse](https://hugo-next.eu.org/muse/) | [Mist](https://hugo-next.eu.org/mist/) | [Pisces](https://hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) |
> - 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:
![Use Template](images/use-hugo-next-starter.png)
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
$ cd hugo-next-exmaple
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ mv config.toml config.toml.backup
```
Or use `Hugo module` to lead into the theme, see below commands:
```shell
$ cd hugo-next-exmaple
$ hugo mod init hugo-next-exmaple
$ wget -O config.yaml https://github.com/hugo-next/hugo-theme-next/raw/main/exampleSite/config.yaml
$ sed -i 's/hugo-theme-next/github.com\/hugo-next\/hugo-theme-next\/v4/' config.yaml
$ mv config.toml config.toml.backup
```
### 💻 Preview on Local
```shell ```shell
$ hugo new site hugo-next-exmaple
$ cd hugo-next-exmaple $ cd hugo-next-exmaple
$ git init
$ hugo submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
$ cp -r themes/hugo-theme-next/exampleSite/* .
$ rm -rf config.toml
$ 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,7 +85,14 @@ $ cd hugo-next-exmaple
$ git submodule update --remote $ git submodule update --remote
``` ```
## New Post Execute command as below if you are using `Hugo module`:
```shell
$ cd hugo-next-exmaple
$ hugo mod get -u
```
## 📝 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:
@@ -60,8 +100,10 @@ There had ready a new post template for you, It is recommended to use the follo
$ hugo new posts/hello-world.md $ hugo new posts/hello-world.md
``` ```
Descript front matter in post as below: > **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:
```yml ```yml
--- ---
@@ -88,41 +130,74 @@ tags:
#expand: true #expand: true
# It's means that will redirecting to external links # It's means that will redirecting to external links
#extlink: #extlink:
# Switch to enabled or disabled comment plugins in this post # Disabled comment plugins in this post
#comment: #comment:
# enable: false # enable: false
# Enable table of content # Disable table of content int this post
# Notice: By default will automatic build table of content
# with h2-h4 title in post and without other settings
#toc: false #toc: false
# Absolute link for visit # Absolute link for visit
#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 团队 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 | / | | 2024.05.11 | *祥 | alipay | RMB 66.66 | Thank you for creating such a great theme. |
| 2023.07.25 | *五 | alipay | RMB 50.00 | I really like the 'Next' theme, thank you, let me buy you a cup of coffee. |
| 2023.06.01 | **霖 | alipay | RMB 10.00 | / |
| 2022.11.15 | f888 | xianyu | RMB 6.20 | Good luck. |
| 2022.09.30 | *軒 | wechat pay | RMB 66.66 | Hope it could help more people. |
| 2022.09.30 | N*l | wechat pay | RMB 20.00 | / |
| 2022.07.09 | *风 | wechat pay | RMB 10.00 | / |
| 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. | | 2022.05.08 | *泉 | wechat pay | RMB 6.60 | Good luck with next develop. |
| 2022.02.28 | *娇 | wechat pay | RMB 5.00 | / |
| 2021.12.21 | z*y | wechat pay | RMB 18.88 | / |

View File

@@ -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="images/hugo-next-primary.png">
</a> </a>
## Hugo NexT ## Hugo NexT
@@ -10,40 +10,74 @@
> 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。 > 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。
[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.86.0-red?style=flat-square&logo=hugo&color=%23FF4088)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&label=gh-pg&logo=GitHub)](https://github.com/hugo-next/hugo-theme-next) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) [![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square&label=Gitter)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.89.0-red?style=flat-square&logo=hugo&color=%23FF4088&&label=Hugo%20Extended)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&logo=GitHub&label=Github%20Pages)](https://github.com/hugo-next/hugo-theme-next) [![Contributors](https://img.shields.io/github/contributors/hugo-next/hugo-theme-next?style=flat-square&color=%235E0D73&logo=contributorcovenant&label=Contributors)](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [![Latest Release](https://img.shields.io/github/v/release/hugo-next/hugo-theme-next?include_prereleases&style=flat-square&color=%23DD2C00&logo=semanticrelease&label=Latest%20Release)](https://github.com/hugo-next/hugo-theme-next/releases) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files&label=Repo%20Size)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square&label=License)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE)
## 4 种页面模式 ![截图](images/screenshot.png)
## 🎨 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: | 状态 |
| :---: | :---: | :---: | :---: | :---: | :---: | | :------: | :-----------------------------------------: | :--------------------------------------------: | :--------------------------------------------: | :------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
| 开发版本 | [双子座](https://preview.hugo-next.eu.org/) | [冥想](https://preview.hugo-next.eu.org/muse/) | [迷雾](https://preview.hugo-next.eu.org/mist/) | [双鱼座](https://preview.hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) | | 开发版本 | [双子座](https://preview.hugo-next.eu.org/) | [冥想](https://preview.hugo-next.eu.org/muse/) | [迷雾](https://preview.hugo-next.eu.org/mist/) | [双鱼座](https://preview.hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) |
| 正式版本 | [双子座](https://hugo-next.eu.org/) | [冥想](https://hugo-next.eu.org/muse/) | [迷雾](https://hugo-next.eu.org/mist/) | [双鱼座](https://hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) | | 正式版本 | [双子座](https://hugo-next.eu.org/) | [冥想](https://hugo-next.eu.org/muse/) | [迷雾](https://hugo-next.eu.org/mist/) | [双鱼座](https://hugo-next.eu.org/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next&style=for-the-badge) |
> - 开发版本: 所有的新功能开发都会在此第一时间发布预览 > - 开发版本: 所有的新功能开发都会在此第一时间发布预览
> - 正式版本: 只有测试稳定且符合要求的功能才会正式发布 > - 正式版本: 只有测试稳定且符合要求的功能才会正式发布
## 快速开始 ## 👣 快速开始
在使用 `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` 绿色按钮然后填写代码仓库的相关信息,参考如下:
![使用模板创建](images/use-hugo-next-starter.png)
最后点击 `Create repository from template` 绿色按钮,会直接在你的空间中生成站点代码,再把它克隆到本地进行创作。
### 📐 直接引用
如果你已经有站点,可通过 `submodule` 模式引用本主题,参考如下命令:
```shell
$ cd hugo-next-exmaple
$ git submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
$ cp themes/hugo-theme-next/exampleSite/config.yaml .
$ mv config.toml config.toml.backup
```
或通过 `Hugo module` 模式引用本主题,参考如下命令:
```shell
$ cd hugo-next-exmaple
$ hugo mod init hugo-next-exmaple
$ wget -O config.yaml https://github.com/hugo-next/hugo-theme-next/raw/main/exampleSite/config.yaml
$ sed -i 's/hugo-theme-next/github.com\/hugo-next\/hugo-theme-next\/v4/' config.yaml
$ mv config.toml config.toml.backup
```
### 💻 本地预览
```shell ```shell
$ hugo new site hugo-next-exmaple
$ cd hugo-next-exmaple $ cd hugo-next-exmaple
$ git init
$ hugo submodule add https://github.com/hugo-next/hugo-theme-next.git themes/hugo-theme-next
$ cp -r themes/hugo-theme-next/exampleSite/* .
$ rm -rf config.toml
$ 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 +85,17 @@ $ cd hugo-next-exmaple
$ git submodule update --remote $ git submodule update --remote
``` ```
如使用 `Hugo module`,执行如下命令:
```shell
$ cd hugo-next-exmaple
$ hugo mod get -u
```
> **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,8 +103,10 @@ $ git submodule update --remote
$ hugo new posts/hello-world.md $ hugo new posts/hello-world.md
``` ```
关于文章头部的那些标记作用的说明参考如下: > **Note**
> 其中 `posts` 路径是 `content` 根目录下的子文件夹,可依据自己的文件管理形态调整。
关于文章头部那些参数作用的说明参考如下:
```yml ```yml
--- ---
@@ -94,19 +138,42 @@ tags:
#expand: true #expand: true
# 外部链接地址,访问时直接跳转 # 外部链接地址,访问时直接跳转
#extlink: #extlink:
# 在当前页面开启或关闭评论功能 # 在当前页面关闭评论功能
#comment: #comment:
# enable: false # enable: false
# 开启文章目录功能 # 关闭当前页面目录功能
# 注意正常情况下文章中有H2-H4标题会自动生成目录无需额外配置
#toc: false #toc: false
# 绝对访问路径 # 绝对访问路径
#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 +181,32 @@ 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 teams Copyright (c) 2022 hugo-next 团队
## 致谢 ## 💖 致谢
开发 `Hugo NexT` 主题原本是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,让我们一起来见证它的成长。 开发 `Hugo NexT` 主题原本是个人的业余爱好,但没想到网友们这么的热情,感谢有你们的支持,让我们一起来见证它的成长。
以下是捐助名单列表(按时间序): 以下是打赏名单列表(按时间序):
| 捐助时间 | 捐助者 | 捐助方式 | 捐助内容 | 留言 | | 打赏时间 | 打赏者 | 打赏方式 | 打赏内容 | 留言 |
| :-------: | ------ | ------ | ---- | ---- | | :--------: | ------ | -------- | -------- | -------------------------------- |
| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / | | 2024.05.11 | *祥 | 支付宝 | ¥66.66 | 感谢创作这么好的主题 |
| 2023.07.25 | *五 | 微信支付 | ¥50.00 | 很喜欢next主题感谢请你喝咖啡 |
| 2023.06.01 | **霖 | 支付宝 | ¥10.00 | / |
| 2022.11.15 | f888 | 咸鱼 | ¥6.20 | 聊表心意 |
| 2022.09.30 | *軒 | 微信支付 | ¥66.66 | 愿项目造福更多人! |
| 2022.09.30 | N*l | 微信支付 | ¥20.00 | / |
| 2022.07.09 | *风 | 微信支付 | ¥10.00 | / |
| 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 | | 2022.05.08 | *泉 | 微信支付 | ¥6.60 | 祝开发next顺利 |
| 2022.02.28 | *娇 | 微信支付 | ¥5.00 | / |
| 2021.12.21 | z*y | 微信支付 | ¥18.88 | / |

View File

@@ -1 +1 @@
4.0.0 4.6.3

View File

@@ -27,12 +27,12 @@ tags:
# 外部链接地址,访问时直接跳转 # 外部链接地址,访问时直接跳转
# It's means that will redirecting to external links # It's means that will redirecting to external links
#extlink: #extlink:
# 在当前页面开启或关闭评论功能 # 在当前页面关闭评论功能
# Switch to enabled or disabled comment plugins in this post # Disabled comment plugins in this post
#comment: #comment:
# enable: false # enable: false
# 开启文章目录功能 # 关闭文章目录功能
# Enable table of content # Disable table of content
#toc: false #toc: false
# 绝对访问路径 # 绝对访问路径
# Absolute link for visit # Absolute link for visit
@@ -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 }}

View File

@@ -26,12 +26,12 @@
--highlight-gutter-background: #{$highlight-gutter-background}; --highlight-gutter-background: #{$highlight-gutter-background};
--highlight-gutter-foreground: #{$highlight-gutter-foreground}; --highlight-gutter-foreground: #{$highlight-gutter-foreground};
--highlight-img-fill: brightness(1) invert(0);
color-scheme: light; color-scheme: light;
} }
@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};
@@ -58,19 +58,20 @@
--highlight-gutter-background: #{$highlight-gutter-background-dark}; --highlight-gutter-background: #{$highlight-gutter-background-dark};
--highlight-gutter-foreground: #{$highlight-gutter-foreground-dark}; --highlight-gutter-foreground: #{$highlight-gutter-foreground-dark};
color-scheme: dark; --highlight-img-fill: brightness(0) invert(1);
}
img { color-scheme: dark;
}
img[data-theme="dark"] {
opacity: .75; opacity: .75;
filter: brightness(1) invert(0);
&:hover { &:hover {
opacity: .9; opacity: .9;
} }
} }
iframe { iframe[data-theme="dark"] {
color-scheme: light; color-scheme: light;
}
}
} }

View File

@@ -1,45 +0,0 @@
@if $back2top_enable {
.back-to-top {
font-size: $b2t-font-size;
@if not $back2top_scrollpercent {
span {
display: none;
}
}
@if $back2top_sidebar {
margin: 20px - $sidebar-offset -10px -20px;
opacity: 0;
transition: opacity $transition-ease;
&.back-to-top-on {
cursor: pointer;
opacity: $b2t-opacity;
&:hover {
opacity: $b2t-opacity-hover;
}
}
} @else {
bottom: $b2t-position-bottom;
box-sizing: border-box;
color: $b2t-color;
padding: 0 6px;
transition: bottom $transition-ease;
@include sidebar-toggle();
@if not $back2top_scrollpercent {
width: 24px;
}
&:hover {
color: $sidebar-highlight;
}
&.back-to-top-on {
bottom: $b2t-position-bottom-on;
}
}
}
}

View File

@@ -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';

View File

@@ -15,14 +15,23 @@
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
.category-list-item:before {
font-family: var(--fa-style-family,"Font Awesome 6 Free");
font-weight: var(--fa-style,900);
content: "\f07c";
margin-right: 5px;
} }
.category-list-item { .category-list-item {
margin: 5px 10px; margin: 5px 10px;
font-weight: bold;
}
} }
.category-list-count { .category-list-count {
color: $grey; color: $grey;
padding: 0 2px;
&::before { &::before {
content: ' ('; content: ' (';
@@ -33,7 +42,19 @@
} }
} }
.category-list-child { .category-children-list {
padding-left: 10px; padding-left: 38px;
list-style: none;
.category-children-list-item:before {
font-family: var(--fa-style-family,"Font Awesome 6 Free");
font-weight: var(--fa-style,900);
content: "\f0ae";
margin-right: 5px;
}
.category-children-list-item {
font-size: 0.925em;
}
} }
} }

View 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;
}
}

View File

@@ -3,3 +3,4 @@
@import 'schedule'; @import 'schedule';
@import 'breadcrumb'; @import 'breadcrumb';
@import 'tag-cloud'; @import 'tag-cloud';
@import 'flinks';

View File

@@ -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,34 @@
} }
} }
@if $toc_number {
.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';

View File

@@ -76,4 +76,8 @@
width: 100%; width: 100%;
} }
} }
svg {
max-width: 98%;
}
} }

View File

@@ -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{
@@ -59,6 +59,10 @@
@include post-card(); @include post-card();
border: none; border: none;
background: none; background: none;
li {
word-break: break-all;
}
} }
} }

View File

@@ -114,8 +114,7 @@
height: 0; height: 0;
} }
@if $busuanzi_enable and $busuanzi_post_views { #comments-count {
#busuanzi_container_page_pv { cursor: pointer;
display: inline-block; border-bottom: 1px solid $link-decoration-color;
}
} }

View File

@@ -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

View File

@@ -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;
}
}

View File

@@ -0,0 +1,3 @@
.post-block .post-body .mermaid {
background: var(--highlight-foreground);
}

View File

@@ -24,7 +24,7 @@
.search-popup { .search-popup {
background: var(--card-bg-color); background: var(--card-bg-color);
border-radius: 5px; border-radius: 5px;
height: 80%; height: 65%;
margin: auto; margin: auto;
transform: scale(0); transform: scale(0);
transition: transform .4s; transition: transform .4s;
@@ -55,12 +55,7 @@
} }
.search-header { .search-header {
background: $gainsboro; background: var(--content-bg-color);
@if $darkmode {
@media (prefers-color-scheme: dark) {
background: $grey-dim;
}
}
border-top-left-radius: 5px; border-top-left-radius: 5px;
border-top-right-radius: 5px; border-top-right-radius: 5px;
display: flex; display: flex;
@@ -72,6 +67,7 @@
border: 0; border: 0;
outline: 0; outline: 0;
width: 100%; width: 100%;
color: var(--text-color);
&::-webkit-search-cancel-button { &::-webkit-search-cancel-button {
display: none; display: none;
@@ -81,17 +77,48 @@
.search-result-container { .search-result-container {
height: calc(100% - 55px); height: calc(100% - 55px);
overflow: auto; overflow: auto;
padding: 5px 25px; padding: 0px 25px;
}
hr { .search-footer {
margin: 5px 0 10px; background: var(--content-bg-color);
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
padding: 0 5px;
color: var(--text-color);
&:first-child { .search-meta-info {
display: none; height: 26px;
display: flex;
padding: 5px 0;
.search-hit-stats {
font-size: $font-size-smaller;
width: 65%;
padding: 2px 8px;
}
.search-vendor {
width: 34%;
text-align: right;
font-size: $font-size-small;
font-weight: bold;
img {
width: 68px;
margin: 5px;
vertical-align: middle;
display: inline;
}
a {
border: none;
} }
} }
} }
}
.search-result-list { .search-result-list {
margin: 0 5px; margin: 0 5px;
padding: 0; padding: 0;
@@ -106,6 +133,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 {
@@ -130,9 +164,16 @@
.algolia-pagination { .algolia-pagination {
// Override default style of ul // Override default style of ul
margin: 40px 0; //margin: 40px 0;
opacity: 1; opacity: 1;
padding: 0; padding: 0;
font-size: $font-size-smallest;
margin-bottom: -16px;
.pagination {
visibility: visible;
margin: 0;
}
.pagination-item { .pagination-item {
display: inline-block; display: inline-block;
@@ -169,11 +210,4 @@
margin: auto; margin: auto;
} }
} }
mark.search-keyword {
background: transparent;
border-bottom: 1px dashed $red;
color: $red;
font-weight: bold;
}
} }

View File

@@ -2,4 +2,17 @@
.wl-actions>button:nth-child(3) { .wl-actions>button:nth-child(3) {
display: none display: none
} }
@include mobile() {
.wl-reaction-img {
width: 28px;
height: 28px;
}
.wl-reaction-votes {
padding: 0.85px;
font-weight: 500;
font-size: .65em;
line-height: .85;
}
}
} }

View File

@@ -0,0 +1,95 @@
.tool-buttons {
@include sidebar-toggle();
background: none;
bottom: 58px;
filter: alpha(opacity=0);
font-size: $font-size-smaller;
@include mobile() {
font-size: $font-size-smallest;
}
.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;
line-height: 35px;
padding: 0;
outline: 0;
border: none;
text-transform: none;
cursor: pointer;
opacity: $tool-btn-opacity;
touch-action: manipulation;
@include mobile() {
width: 24px;
height: 24px;
line-height: 24px;
border-radius: 3px;
}
&:hover {
color: $tool-btn-hover-fore-color;
opacity: $tool-btn-opacity-hover;
}
}
.goto-comments {
display: none;
}
.goto-comments-on {
display: block;
}
}
@if $back2top_enable {
.back-to-top {
@if not $back2top_scrollpercent {
span {
display: none;
}
}
@if $back2top_sidebar {
margin: 20px -$sidebar-offset -10px -20px;
opacity: 0;
transition: opacity $transition-ease;
&.back-to-top-on {
cursor: pointer;
opacity: $b2t-opacity;
&:hover {
opacity: $b2t-opacity-hover;
}
}
} @else {
bottom: $b2t-position-bottom;
box-sizing: border-box;
color: $b2t-color;
padding: 0 6px;
transition: bottom $transition-ease;
@include sidebar-toggle();
@if not $back2top_scrollpercent {
width: 24px;
}
&:hover {
color: $sidebar-highlight;
}
&.back-to-top-on {
bottom: $b2t-position-bottom-on;
}
}
}
}

View File

@@ -29,6 +29,16 @@
font-size: $font-size-smallest; font-size: $font-size-smallest;
} }
.google-translate {
display: flex;
justify-content: center;
.fa {
font-size: $font-size-larger;
margin: auto 0;
line-height: normal;
}
}
@if $footer_vendors_enable { @if $footer_vendors_enable {
.vendors-list { .vendors-list {
a { a {
@@ -37,6 +47,15 @@
img { img {
display: inline-block; display: inline-block;
max-width: 50px;
filter: var(--highlight-img-fill);
@include mobile() {
max-width: 40px;
}
&:last-child {
max-height: 18px;
}
} }
$footer_vendors_imgs_len: length($footer_vendors_imgs_width); $footer_vendors_imgs_len: length($footer_vendors_imgs_width);
@@ -97,18 +116,3 @@
vertical-align: middle; vertical-align: middle;
} }
} }
@if $busuanzi_enable {
.busuanzi-count {
@if $busuanzi_visitors {
#busuanzi_container_site_uv {
display: none;
}
}
@if $busuanzi_views {
#busuanzi_container_site_pv {
display: none;
}
}
}
}

View File

@@ -1,12 +1,26 @@
// Menu // Menu
// -------------------------------------------------- // --------------------------------------------------
.menu { .menu, .menu-children {
margin: 0; margin: 0;
padding: 1em 0; padding: 1em 0;
text-align: center; text-align: center;
} }
.menu-item { .menu-children {
max-height: 0;
padding: 0;
overflow: hidden;
transition: max-height 1.5s ease-out;
}
.menu-children {
&.expand {
max-height: 400px;
transition: max-height 1.5s ease-in;
}
}
.menu-item, .menu-child-item {
display: inline-block; display: inline-block;
list-style: none; list-style: none;
margin: 0 10px; margin: 0 10px;
@@ -33,6 +47,8 @@
.fa, .fab, .far, .fas { .fa, .fab, .far, .fas {
margin-right: 8px; margin-right: 8px;
width: 16px;
text-align: center;
} }
.badge { .badge {
@@ -49,6 +65,15 @@
margin-left: 0; margin-left: 0;
} }
} }
.menu-item-shrink-icon {
float: right;
}
}
.menu-child-item {
display: block;
margin: 0;
} }
.use-motion .menu-item { .use-motion .menu-item {

View File

@@ -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);
@@ -27,6 +27,8 @@
img { img {
display: inline-block; display: inline-block;
max-width: 120px;
max-height: 42px;
} }
} }
@@ -39,3 +41,4 @@
@import 'sidebar-toggle'; @import 'sidebar-toggle';
@import 'sidebar-toc'; @import 'sidebar-toc';
@import 'site-state'; @import 'site-state';
@import 'sidebar-card-widget';

View File

@@ -1,6 +1,7 @@
.site-author-image { .site-author-image {
border: $site-author-image-border-width solid $site-author-image-border-color; border: $site-author-image-border-width solid $site-author-image-border-color;
max-width: $site-author-image-width; width: $site-author-image-width;
height: $site-author-image-width;
padding: 2px; padding: 2px;
@if $avatar_rounded { @if $avatar_rounded {

View 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;
}
}

View File

@@ -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;

View File

@@ -1,20 +1,62 @@
@if $toc_enable { .post-toc {
.post-toc {
font-size: $font-size-small; font-size: $font-size-small;
padding: 0 8px; padding: 0 8px;
.active-current {
color: $orange;
}
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: 4px;
li {
position: relative;
padding-left: 0; padding-left: 0;
&:before {
position: absolute;
content: ' ';
top: 0.14em;
left: -0.75em;
width: 0.65em;
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;
@if $toc_number {
&:before {
content: counters(item, ".") ". ";
counter-increment: item;
}
}
&:hover {
text-decoration: underline;
color: $orange;
}
} }
} }
@@ -33,24 +75,24 @@
display: if($toc_expand_all, block, none); display: if($toc_expand_all, block, none);
} }
.active > .nav-child { .active>.nav-child {
display: block; display: block;
} }
.active-current > .nav-child { .active-current>.nav-child {
display: block; display: block;
> .nav-item { >.nav-item {
display: block; display: block;
} }
} }
.active > a { .active>a {
border-bottom-color: $sidebar-highlight; border-bottom-color: $sidebar-highlight;
color: $sidebar-highlight; color: $sidebar-highlight;
} }
.active-current > a { .active-current>a {
color: $sidebar-highlight; color: $sidebar-highlight;
&:hover { &:hover {
@@ -58,5 +100,4 @@
} }
} }
} }
}
} }

View File

@@ -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 {

View File

@@ -6,7 +6,7 @@
} }
pre { pre {
padding: 10px; padding: 18px;
margin: 0; margin: 0;
} }

View File

@@ -17,6 +17,7 @@ html {
*/ */
body { body {
margin: 0; margin: 0;
counter-reset: h2;
} }
/** /**

View File

@@ -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;

View File

@@ -1,6 +1,6 @@
@mixin mobile-smallest() { @mixin mobile-smallest() {
@media (max-width: 413px) { @media (max-width: 413px) {
@content;; @content;
} }
} }
@@ -99,7 +99,7 @@
@if $icon { @if $icon {
content: $icon; content: $icon;
} }
font-family: 'Font Awesome 5 Free'; font-family: 'Font Awesome 6 Free';
font-weight: 900; font-weight: 900;
} }

View File

@@ -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;
} }

View File

@@ -34,6 +34,10 @@
} }
} }
// a + ul {
// top: calc(30% + 5px);
// }
.badge { .badge {
background: white; background: white;
border-radius: 10px; border-radius: 10px;
@@ -41,5 +45,24 @@
padding: 1px 4px; padding: 1px 4px;
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1); text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
} }
.menu-item-shrink-icon {
margin-left: 5px;
}
}
}
.menu-children {
display: none;
transition: transform 1s ease-in-out;
transform: translateY(-100%);
// position: absolute;
// z-index: 999;
&.expand {
display: block;
max-height: 400px;
transition: transform 1.5s ease-in;
transform: translateY(-100%);
} }
} }

View File

@@ -1,96 +0,0 @@
// All variables from site's config content.
// In order not to conflict with the existing variables of SCSS and better identify,
// add a cfg_ prefix before the variable name
{{- $P := .Site.Params -}}
// Base variables
$scheme: {{ default $P.scheme "Gemini" }};
$cfg_darkmode: {{ $P.darkmode }};
$cfg_thm_cor_light: {{ $P.themeColor.light }};
$cfg_thm_cor_dark: {{ $P.themeColor.dark }};
$cfg_font_enable: {{ default $P.font.enable false }};
$cfg_font_global_size: {{ default $P.font.global.size 1 }};
$cfg_font_headings_size: {{ default $P.font.headings.size 1 }};
$cfg_font_title_size: {{ default $P.font.title.size 1 }};
$cfg_font_codes_size: {{ default $P.font.codes.size 1 }};
$cfg_font_posts_size: {{ default $P.font.posts.size 1 }};
// TODO
$cfg_hl_light_bg: #222;
$cfg_hl_light_fg: #000;
$cfg_hl_dark_bg: #000;
$cfg_hl_dark_fg: #222;
$cfg_sidebar_width: {{ $P.sidebar.width }};
$cfg_sidebar_position: {{ $P.sidebar.position }};
$cfg_sidebar_padding: {{ default $P.sidebar.padding 18 }};
$cfg_sidebar_offset: {{ default $P.sidebar.offset 12 }};
// TODO
$cfg_note_light_bg_offset: 0;
// Scaffolding Variables
$cfg_bd_scrollbar_overlay: {{ $P.bodyScrollbar.overlay }};
$cfg_bd_scrollbar_stable: {{ $P.bodyScrollbar.stable }};
$cfg_codeblock_copy_btn_style: {{ $P.codeblock.copyBtn.style }};
$cfg_mermaid_enable: {{ $P.mermaid.enable }};
$cfg_note_style: {{ $P.note.style }};
$cfg_note_icons: {{ $P.note.icons }};
$cfg_pdf_enable: {{ $P.pdf.enable }};
$cfg_pdf_height: {{ $P.pdf.height }};
$cfg_tabs_trans_tabs: {{ $P.tabs.transition.tabs }};
$cfg_tabs_trans_labels: {{ $P.tabs.transition.labels }};
// Outline Variables
$cfg_footer_icon_color: {{ $P.footer.icon.color }};
$cfg_footer_icon_animated: {{ $P.footer.icon.animated }};
$cfg_footer_beian_enable: {{ $P.footer.beian.enable }};
$cfg_busuanzi_enable: {{ $P.busuanzi.enable }};
$cfg_busuanzi_visitors: {{ $P.busuanzi.visitors }};
$cfg_busuanzi_views: {{ $P.busuanzi.views }};
$cfg_bookmark_enable: {{ $P.bookmark.enable }};
$cfg_bookmark_color: {{ $P.bookmark.color }};
$cfg_github_banner_enable: {{ $P.githubBanner.enable }};
$cfg_local_search_enable: {{ $P.localSearch.enable }};
$cfg_algolia_search_enable: {{ $P.algoliaSearch.enable }};
$cfg_mobile_layout_economy: {{ $P.mobileLayoutEconomy }};
$cfg_note_icons: {{ $P.note.icons }};
$cfg_social_icons_only: {{ $P.socialIcons.iconsOnly }};
$cfg_avatar_rounded: {{ $P.avatar.rounded }};
$cfg_avatar_rotated: {{ $P.avatar.rotated }};
$cfg_toc_enable: {{ $P.toc.enable }};
$cfg_toc_wrap: {{ $P.toc.wrap }};
$cfg_toc_expand_all: {{ $P.toc.expandAll }};
$cfg_site_state: {{ $P.siteState }};
//
$cfg_back2top_enable: {{ $P.backTop.enable }};
$cfg_back2top_scrollpercent: {{ $P.backTop.scrollPercent }};
$cfg_back2top_sidebar: {{ $P.backTop.sidebar }};
$cfg_reading_progress_enable: {{ $P.readingProgress.enable }};
$cfg_reading_progress_color: {{ $P.readingProgress.color }};
$cfg_reading_progress_height: {{ $P.readingProgress.height }};
$cfg_reading_progress_reversed: {{ $P.readingProgress.reversed }};
$cfg_reading_progress_start: {{ $P.readingProgress.start }};
$cfg_reading_progress_position: {{ $P.readingProgress.position }};

View File

@@ -283,13 +283,20 @@ $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;
$b2t-position-bottom : -100px; $b2t-position-bottom : -100px;
$b2t-position-bottom-on : 19px; $b2t-position-bottom-on : 19px;
$b2t-position-right : 30px; $b2t-position-right : 30px;
$b2t-position-right-mobile : 20px; $b2t-position-right-mobile : 16px;
$b2t-font-size : 12px; $b2t-font-size : 12px;
$b2t-color : white; $b2t-color : white;
$b2t-bg-color : $black-deep; $b2t-bg-color : $black-deep;

View File

@@ -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;
}

View File

@@ -1,6 +1,6 @@
// CSS Style Guide : https://codeguide.co/#css // CSS Style Guide : https://codeguide.co/#css
// All variables from site's config content. // All variables from site's config content.
{{- $P := .Site.Params }} {{ $P := .Site.Params }}
// Base // Base
$scheme : {{ $P.scheme }}; $scheme : {{ $P.scheme }};
$darkmode : {{ $P.darkmode }}; $darkmode : {{ $P.darkmode }};
@@ -33,12 +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_enable : {{ $P.busuanzi.enable }};
$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 }};
@@ -71,11 +65,12 @@ $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 }};
$toc_enable : {{ $P.toc.enable }}; $toc_enable : {{ $P.toc.enable }};
$toc_number : {{ $P.toc.number }};
$toc_expand_all : {{ $P.toc.expandAll }}; $toc_expand_all : {{ $P.toc.expandAll }};
$toc_wrap : {{ $P.toc.wrap }}; $toc_wrap : {{ $P.toc.wrap }};
@@ -113,7 +108,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;
@@ -132,21 +126,21 @@ $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 }};
{{- if $tce }} {{ if $tce }}
{{- $sortNav := sort .nav "weight" }} {{ $sortNav := sort .nav "weight" }}
$two_comments_actived : {{ .active }}; $two_comments_actived : {{ .active }};
$first_comment_color : {{ (index $sortNav 0).color }}; $first_comment_color : {{ (index $sortNav 0).color }};
$first_comment_name : {{ lower (index $sortNav 0).name }}; $first_comment_name : {{ lower (index $sortNav 0).name }};
$second_comment_color : {{ (index $sortNav 1).color }}; $second_comment_color : {{ (index $sortNav 1).color }};
$second_comment_name : {{ lower (index $sortNav 1).name }}; $second_comment_name : {{ lower (index $sortNav 1).name }};
{{- end }} {{ end }}
{{- end }} {{ end }}
// //
// Variables Layer // Variables Layer
@@ -182,8 +176,3 @@ $second_comment_name : {{ lower (index $sortNav 1).name }};
// Schemes Layer // Schemes Layer
// -------------------------------------------------- // --------------------------------------------------
{{ printf "@import '_schemes/%s/';" $P.scheme }} {{ printf "@import '_schemes/%s/';" $P.scheme }}
// Custom Layer
// TODO
// --------------------------------------------------
// @import 'theme.injects.style';

View File

@@ -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);
}); });

View File

@@ -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) {

View File

@@ -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];

View File

@@ -1,51 +1,115 @@
if (!window.NexT) window.NexT = {}; /* global NexT, boot, CONFIG */
window.NexT = {};
NexT.boot = {};
NexT.plugins = {};
// Defined comment component & add register event
NexT.plugins.comments = {};
NexT.plugins.comments.register = function() {
if (!NexT.CONFIG.page.comments) return;
for(var c in NexT.plugins.comments) {
if (c === 'register') continue;
eval('NexT.plugins.comments.'+c)();
};
}
// Defined search engine & add register event
NexT.plugins.search = {}
NexT.plugins.search.register = function() {
for(var s in NexT.plugins.search) {
if (s === 'register') continue;
eval('NexT.plugins.search.'+s)();
};
}
// Defined share plugin & add register event
NexT.plugins.share = {}
NexT.plugins.share.register = function() {
for(var s in NexT.plugins.share) {
if (s === 'register') continue;
eval('NexT.plugins.share.'+s)();
};
}
// Defined other plugin & add register event
NexT.plugins.others = {}
NexT.plugins.others.register = function() {
for(var o in NexT.plugins.others) {
if (o === 'register') continue;
eval('NexT.plugins.others.'+o)();
};
}
// Add event to register all third party plugins
NexT.plugins.register = function() {
for(var p in NexT.plugins) {
if (p === 'register') continue;
eval('NexT.plugins.'+p+'.register')();
}
};
(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 = {};
// });
})(); })();

View File

@@ -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)

View File

@@ -1,11 +1,37 @@
/* global NexT, CONFIG */ /* boot starup */
NexT.boot = {}; (function () {
const onPageLoaded = () => document.dispatchEvent(
new Event('page:loaded', {
bubbles: true
})
);
if (document.readyState === 'loading') {
document.addEventListener('readystatechange', onPageLoaded, { once: true });
} else {
onPageLoaded();
}
document.addEventListener('pjax:success', onPageLoaded);
})();
NexT.boot.registerEvents = function() { NexT.boot.registerEvents = function() {
NexT.utils.registerMenuClick();
NexT.utils.registerImageLoadEvent();
NexT.utils.registerScrollPercent(); NexT.utils.registerScrollPercent();
NexT.utils.registerCanIUseTag(); // NexT.utils.registerCanIUseTag();
NexT.utils.registerToolButtons();
// Register comment's components
NexT.plugins.register();
// Register comment counter click event
const commentCnt = document.querySelector('#comments-count');
if (commentCnt && NexT.CONFIG.page.isPage) {
commentCnt.addEventListener('click', event => {
NexT.utils.slidScrollBarAnime('comments');
});
}
// Mobile top menu bar. // Mobile top menu bar.
document.querySelector('.site-nav-toggle .toggle').addEventListener('click', event => { document.querySelector('.site-nav-toggle .toggle').addEventListener('click', event => {
@@ -33,33 +59,44 @@ NexT.boot.registerEvents = function() {
NexT.boot.refresh = function() { NexT.boot.refresh = function() {
NexT.utils.fmtSiteInfo();
if (!NexT.CONFIG.page.isPage) return;
NexT.utils.registerSidebarTOC();
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.hideComments();
}
NexT.utils.registerImageViewer();
//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)
@@ -72,6 +109,6 @@ NexT.boot.motion = function() {
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
NexT.boot.registerEvents(); NexT.boot.registerEvents();
NexT.boot.refresh();
NexT.boot.motion(); NexT.boot.motion();
NexT.boot.refresh();
}); });

View File

@@ -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);

View File

@@ -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');

View File

@@ -0,0 +1,33 @@
/* Artalk comment plugin */
NexT.plugins.comments.artalk = function() {
const element = '.artalk-container';
if (!NexT.CONFIG.artalk
|| !NexT.utils.checkDOMExist(element)) return;
const artalk_js = NexT.utils.getCDNResource(NexT.CONFIG.artalk.js);
const {
site,
placeholder,
server,
} = NexT.CONFIG.artalk.cfg;
NexT.utils.lazyLoadComponent(element, function() {
NexT.utils.getScript(artalk_js, function(){
const artalk_css = NexT.utils.getCDNResource(NexT.CONFIG.artalk.css);
NexT.utils.getStyle(artalk_css);
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);
});
}

View File

@@ -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);
});
}
});

View File

@@ -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() } }
});
}
});
}
});

View File

@@ -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
});
});
});

View File

@@ -0,0 +1,42 @@
/* Giscus comment plugin */
NexT.plugins.comments.giscus = function() {
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.lazyLoadComponent(element, function() {
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);
});
}

View File

@@ -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'));
});
});

View File

@@ -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')
}));
});

View File

@@ -1,19 +1,17 @@
/* global NexT, CONFIG, LivereTower */ /* LiveRe comment plugin */
NexT.plugins.comments.livere = function() {
const element = '#lv-container';
if (!NexT.CONFIG.livere
|| !NexT.utils.checkDOMExist(element)) return;
document.addEventListener('page:loaded', () => { NexT.utils.lazyLoadComponent(element, function() {
if (!CONFIG.page.comments) return; NexT.utils.getScript(NexT.CONFIG.livere.js, {
NexT.utils.loadComments('#lv-container').then(() => {
window.livereOptions = {
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);
}); });
}); }

View File

@@ -1,17 +1,28 @@
/* global NexT, CONFIG */ /* Utterances comment plugin */
NexT.plugins.comments.utterances = function() {
const element = '.utterances-container';
if (!NexT.CONFIG.utterances
|| !NexT.utils.checkDOMExist(element)) return;
document.addEventListener('page:loaded', () => { const {
if (!CONFIG.page.comments) return; repo,
issueterm,
label,
theme } = NexT.CONFIG.utterances.cfg;
NexT.utils.loadComments('.utterances-container') NexT.utils.lazyLoadComponent(element, function() {
.then(() => NexT.utils.getScript('https://utteranc.es/client.js', { 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 'label' : label,
'theme' : theme
}, },
parentNode: document.querySelector('.utterances-container') parentNode: document.querySelector(element)
})); });
});
NexT.utils.hiddeLodingCmp(element);
});
}

View File

@@ -0,0 +1,57 @@
/* Waline comment plugin */
NexT.plugins.comments.waline = function() {
const element = '.waline-container';
if (!NexT.CONFIG.waline
|| !NexT.utils.checkDOMExist(element)) return;
const {
comment,
emoji,
imguploader,
pageview,
placeholder,
sofa,
requiredmeta,
serverurl,
wordlimit,
reaction,
reactiontext,
reactiontitle
} = NexT.CONFIG.waline.cfg;
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.lazyLoadComponent(element, function () {
NexT.utils.getScript(waline_js, function(){
const waline_css = NexT.utils.getCDNResource(NexT.CONFIG.waline.css);
NexT.utils.getStyle(waline_css, 'before');
Waline.init({
locale,
el : element,
pageview : pageview,
comment : comment,
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);
})
});
}

31
assets/js/third-party/others/counter.js vendored Normal file
View File

@@ -0,0 +1,31 @@
/* Page's view & comment counter plugin */
NexT.plugins.others.counter = function() {
let pageview_js = undefined;
let comment_js = undefined;
const post_meta = NexT.CONFIG.postmeta;
const views = post_meta.views;
if(views != undefined && views.enable) {
if (views.plugin == 'waline') {
pageview_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.js[0]);
NexT.utils.getScript(pageview_js, function(){
Waline.pageviewCount({
serverURL: NexT.CONFIG.waline.cfg.serverurl
});
});
}
}
const comments = post_meta.comments;
if (comments != undefined && comments.enable) {
if (comments.plugin == 'waline') {
comment_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.js[1]);
NexT.utils.getScript(comment_js, function(){
Waline.commentCount({
serverURL: NexT.CONFIG.waline.cfg.serverurl
});
});
}
}
}

View File

@@ -0,0 +1,17 @@
/* 51La sidebar data widget */
NexT.plugins.others.lawidget = function() {
const element = '#siteinfo-card-widget';
const lawt_js = NexT.CONFIG.lawidget.js.replace('laId', NexT.CONFIG.lawidget.id);
NexT.utils.lazyLoadComponent(element, function () {
NexT.utils.getScript(lawt_js,{
attributes: {
id: 'LA-DATA-WIDGET',
crossorigin: 'anonymous',
charset: 'UTF-8',
defer: true
},
parentNode: document.getElementById('la-siteinfo-widget')
}, NexT.utils.fmtLaWidget());
});
}

38
assets/js/third-party/others/math.js vendored Normal file
View File

@@ -0,0 +1,38 @@
/* Math render plugin */
NexT.plugins.others.math = function() {
const render = NexT.CONFIG.page.math.render;
if (render === 'mathjax') {
const render_js = NexT.utils.getCDNResource(NexT.CONFIG.page.math.js);
NexT.utils.getScript(render_js, function(){
window.MathJax = {
tex: {
inlineMath: [["$", "$"]],
}
};
});
}
if (render === 'katex') {
const render_css = NexT.utils.getCDNResource(NexT.CONFIG.page.math.css);
NexT.utils.getStyle(render_css);
const render_js_list = NexT.CONFIG.page.math.js;
render_js_list.forEach(js => {
const js_loader = NexT.utils.getScript(NexT.utils.getCDNResource(js));
if(js.name === 'auto-render') {
js_loader.then(function(){
renderMathInElement(document.body, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true}
],
throwOnError : false
})
});
}
});
}
}

15
assets/js/third-party/others/mermaid.js vendored Normal file
View File

@@ -0,0 +1,15 @@
/* Mermaid plugin */
NexT.plugins.others.mermaid = function() {
const mermaid_js = NexT.utils.getCDNResource(NexT.CONFIG.page.mermaid.js);
NexT.utils.getScript(mermaid_js, function(){
mermaid.initialize({
sequence: {
showSequenceNumbers: true,
actorMargin: 50,
diagramMarginX:10,
diagramMarginY:10
}
});
});
}

View File

@@ -0,0 +1,9 @@
/* Google translate plugin */
NexT.plugins.others.translate = function() {
const element = '#gtranslate';
if (!NexT.utils.checkDOMExist(element)) return;
NexT.utils.lazyLoadComponent(element, function() {
window.translateelement_styles='/css/google-translate.min.css';
NexT.utils.getScript('/js/third-party/google-translate.min.js');
});
}

View File

@@ -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();
}
});
});

142
assets/js/third-party/search/algolia.js vendored Normal file
View File

@@ -0,0 +1,142 @@
/* Algolia search engine */
NexT.plugins.search.algolia = function() {
const algoliajs = NexT.utils.getCDNResource(NexT.CONFIG.algolia.js);
const instantschjs = NexT.utils.getCDNResource(NexT.CONFIG.algolia.instantjs);
NexT.utils.getScript(algoliajs);
NexT.utils.getScript(instantschjs, function() {
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 `${stats}`;
}
},
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();
}
});
});
}

View File

@@ -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
View File

@@ -0,0 +1,326 @@
/* LocalSearch engine */
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');
});
}
}
NexT.plugins.search.localsearch = function() {
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
View File

@@ -0,0 +1,16 @@
/* AddThis share plugin */
NexT.plugins.share.addthis = function() {
const element = '.addthis_inline_share_toolbox';
if (!NexT.CONFIG.addthis || !NexT.utils.checkDOMExist(element)) return;
const addthis_js = NexT.CONFIG.addthis.js + '?pubid=' + NexT.CONFIG.addthis.cfg.pubid;
NexT.utils.lazyLoadComponent(element, function() {
NexT.utils.getScript(addthis_js, {
attributes: {
async: false
},
parentNode: document.querySelector(element)
});
});
}

View File

@@ -1,47 +1,278 @@
/* global NexT, CONFIG */ /* util tools */
HTMLElement.prototype.wrap = function(wrapper) { HTMLElement.prototype.wrap = function (wrapper) {
this.parentNode.insertBefore(wrapper, this); this.parentNode.insertBefore(wrapper, this);
this.parentNode.removeChild(this); this.parentNode.removeChild(this);
wrapper.appendChild(this); wrapper.appendChild(this);
}; };
(function() {
const onPageLoaded = () => document.dispatchEvent(
new Event('page:loaded', {
bubbles: true
})
);
if (document.readyState === 'loading') {
document.addEventListener('readystatechange', onPageLoaded, { once: true });
} else {
onPageLoaded();
}
document.addEventListener('pjax:success', onPageLoaded);
})();
NexT.utils = { NexT.utils = {
registerMenuClick: function() {
const pMenus = document.querySelectorAll('.main-menu > li > a.menus-parent');
pMenus.forEach(function(item) {
const icon = item.querySelector('span > i');
var ul = item.nextElementSibling;
replacePostCRLink: function() { item.addEventListener('click', function(e) {
if (CONFIG.hostname.startsWith('http')) return; e.preventDefault();
// Try to support mutli domain without base URL sets.
let href = window.location.href; ul.classList.toggle('expand');
if (href.indexOf('#')>-1){ if (ul.classList.contains('expand')) {
href = href.split('#')[0]; icon.className = 'fa fa-angle-down';
} else {
icon.className = 'fa fa-angle-right';
} }
let postLink = document.getElementById('post-cr-link'); });
if (!postLink) return;
postLink.text = href; var cCls = ul.querySelectorAll('.menu-item-active');
postLink.href = href; if (cCls != null && cCls.length > 0) {
item.click();
}
});
},
registerImageLoadEvent: function() {
const images = document.querySelectorAll('.sidebar img, .post-block img, .vendors-list img');
const callback = (entries) => {
entries.forEach(item => {
if (item.intersectionRatio > 0) {
let ele = item.target;
let imgSrc = ele.getAttribute('data-src');
if (imgSrc) {
let img = new Image();
img.addEventListener('load', function() {
ele.src = imgSrc;
}, false);
ele.src = imgSrc;
// Prevent load image again
ele.removeAttribute('data-src');
}
}
})
};
const observer = new IntersectionObserver(callback);
images.forEach(img => {
observer.observe(img);
});
},
registerImageViewer: function() {
const post_body = document.querySelector('.post-body');
if (post_body) {
new Viewer(post_body,{ navbar:2, toolbar:2 });
}
},
registerToolButtons: function () {
const buttons = document.querySelector('.tool-buttons');
const scrollbar_buttons = buttons.querySelectorAll('div:not(#toggle-theme)');
scrollbar_buttons.forEach(button => {
let targetId = button.id;
if (targetId != '') {
targetId = targetId.substring(5);
}
button.addEventListener('click', () => {
this.slidScrollBarAnime(targetId);
});
});
buttons.querySelector('div#toggle-theme').addEventListener('click', () => {
const cur_theme = document.documentElement.getAttribute('data-theme');
window.theme.toggle(cur_theme === 'dark' ? 'light' : 'dark');
});
},
slidScrollBarAnime: function (targetId, easing = 'linear', duration = 500) {
const targetObj = document.getElementById(targetId);
window.anime({
targets: document.scrollingElement,
duration: duration,
easing: easing,
scrollTop: targetId == '' || !targetObj ? 0 : targetObj.getBoundingClientRect().top + window.scrollY
});
},
domAddClass: function (selector, cls) {
const doms = document.querySelectorAll(selector);
if (doms) {
doms.forEach(dom => {
dom.classList.add(cls);
});
}
},
fmtSiteInfo: function () {
const runtimeCount = document.getElementById('runTimes');
if (runtimeCount) {
const publishDate = runtimeCount.getAttribute('data-publishDate');
const runTimes = this.diffDate(publishDate, 2);
runtimeCount.innerText = runTimes;
}
const wordsCount = document.getElementById('wordsCount');
if (wordsCount) {
const words = wordsCount.getAttribute('data-count');
wordsCount.innerText = this.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 = this.diffDate(lastPushDate.getAttribute('data-lastPushDate'), 1);
lastPushDate.innerText = pushDateVal;
}
},
fmtLaWidget: function(){
setTimeout(function(){
const laWidget = document.querySelectorAll('#la-siteinfo-widget span');
if (laWidget.length > 0) {
const valIds = [0, 2, 4, 6];
const domIds = ['today_site_pv', 'yesterday_site_pv', 'month_site_pv', 'total_site_pv']
for (let i in valIds) {
let pv = NexT.utils.numberFormat(laWidget[valIds[i]].innerText);
document.getElementById(domIds[i]).innerText = pv;
}
}
}, 800);
},
fmtBusuanzi: function () {
setTimeout(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);
}
}, 800);
},
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 router = NexT.CONFIG.vendor.router;
let { name, version, file, alias, alias_name } = res;
let res_src = '';
switch (router.type) {
case "modern":
if (alias_name) name = alias_name;
let alias_file = file.replace(/^(dist|lib|source|\/js|)\/(browser\/|)/, '');
if (alias_file.indexOf('min') == -1) {
alias_file = alias_file.replace(/\.js$/, '.min.js');
}
res_src = `${router.url}/${name}/${version}/${alias_file}`;
break;
default:
if (alias) name = alias;
res_src = `${router.url}/${name}@${version}/${file}`;
break;
}
return res_src;
}, },
/** /**
* 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.
@@ -50,7 +281,7 @@ NexT.utils = {
const button = element.querySelector('.copy-btn'); const button = element.querySelector('.copy-btn');
button.addEventListener('click', () => { button.addEventListener('click', () => {
const lines = element.querySelector('.code') || element.querySelector('code'); const lines = element.querySelector('.code') || element.querySelector('code');
const code = lines.innerText; const code = lines.innerText.replace(/(\n{2,})/g, '\n');
if (navigator.clipboard) { if (navigator.clipboard) {
// https://caniuse.com/mdn-api_clipboard_writetext // https://caniuse.com/mdn-api_clipboard_writetext
navigator.clipboard.writeText(code).then(() => { navigator.clipboard.writeText(code).then(() => {
@@ -84,7 +315,7 @@ NexT.utils = {
}); });
}, },
wrapTableWithBox: function() { wrapTableWithBox: function () {
document.querySelectorAll('table').forEach(element => { document.querySelectorAll('table').forEach(element => {
const box = document.createElement('div'); const box = document.createElement('div');
box.className = 'table-container'; box.className = 'table-container';
@@ -92,7 +323,7 @@ NexT.utils = {
}); });
}, },
registerVideoIframe: function() { registerVideoIframe: function () {
document.querySelectorAll('iframe').forEach(element => { document.querySelectorAll('iframe').forEach(element => {
const supported = [ const supported = [
'www.youtube.com', 'www.youtube.com',
@@ -114,7 +345,7 @@ NexT.utils = {
}); });
}, },
registerScrollPercent: function() { registerScrollPercent: function () {
const backToTop = document.querySelector('.back-to-top'); const backToTop = document.querySelector('.back-to-top');
const readingProgressBar = document.querySelector('.reading-progress-bar'); const readingProgressBar = document.querySelector('.reading-progress-bar');
// For init back to top in sidebar if page was scrolled after page refresh. // For init back to top in sidebar if page was scrolled after page refresh.
@@ -123,8 +354,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) + '%');
@@ -141,21 +374,12 @@ NexT.utils = {
} }
this.activateNavByIndex(index); this.activateNavByIndex(index);
}, { passive: true }); }, { passive: true });
backToTop && backToTop.addEventListener('click', () => {
window.anime({
targets : document.scrollingElement,
duration : 500,
easing : 'linear',
scrollTop: 0
});
});
}, },
/** /**
* Tabs tag listener (without twitter bootstrap). * Tabs tag listener (without twitter bootstrap).
*/ */
registerTabsTag: function() { registerTabsTag: function () {
// Binding `nav-tabs` & `tab-content` by real time permalink changing. // Binding `nav-tabs` & `tab-content` by real time permalink changing.
document.querySelectorAll('.tabs ul.nav-tabs .tab').forEach(element => { document.querySelectorAll('.tabs ul.nav-tabs .tab').forEach(element => {
element.addEventListener('click', event => { element.addEventListener('click', event => {
@@ -170,18 +394,19 @@ 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,
duration : 500, duration: 500,
easing : 'linear', easing: 'linear',
scrollTop: offset scrollTop: offset
}); });
}); });
@@ -190,7 +415,7 @@ NexT.utils = {
window.dispatchEvent(new Event('tabs:register')); window.dispatchEvent(new Event('tabs:register'));
}, },
registerCanIUseTag: function() { registerCanIUseTag: function () {
// Get responsive height passed from iframe. // Get responsive height passed from iframe.
window.addEventListener('message', ({ data }) => { window.addEventListener('message', ({ data }) => {
if (typeof data === 'string' && data.includes('ciu_embed')) { if (typeof data === 'string' && data.includes('ciu_embed')) {
@@ -204,7 +429,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 +437,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 => {
@@ -224,19 +449,25 @@ NexT.utils = {
}); });
},*/ },*/
registerSidebarTOC: function() { registerSidebarTOC: function () {
this.sections = [...document.querySelectorAll('.post-toc li a.nav-link')].map(element => { const toc = document.getElementById('TableOfContents');
if (!toc.hasChildNodes()) {
const tocActive = document.querySelector('.sidebar-inner');
tocActive.classList.remove('sidebar-nav-active', 'sidebar-toc-active');
tocActive.classList.add('sidebar-overview-active');
}
this.sections = [...document.querySelectorAll('.post-toc li a')].map(element => {
const target = document.getElementById(decodeURI(element.getAttribute('href')).replace('#', '')); const target = document.getElementById(decodeURI(element.getAttribute('href')).replace('#', ''));
// TOC item animation navigate. // TOC item animation navigate.
element.addEventListener('click', event => { element.addEventListener('click', event => {
event.preventDefault(); event.preventDefault();
const offset = target.getBoundingClientRect().top + window.scrollY; const offset = target.getBoundingClientRect().top + window.scrollY;
window.anime({ window.anime({
targets : document.scrollingElement, targets: document.scrollingElement,
duration : 500, duration: 500,
easing : 'linear', easing: 'linear',
scrollTop: offset, scrollTop: offset,
complete : () => { complete: () => {
history.pushState(null, document.title, element.href); history.pushState(null, document.title, element.href);
} }
}); });
@@ -245,7 +476,7 @@ NexT.utils = {
}); });
}, },
registerPostReward: function() { registerPostReward: function () {
const button = document.querySelector('.reward-container button'); const button = document.querySelector('.reward-container button');
if (!button) return; if (!button) return;
button.addEventListener('click', () => { button.addEventListener('click', () => {
@@ -253,22 +484,22 @@ NexT.utils = {
}); });
}, },
initCommontesDispaly: function(){ initCommontesDispaly: function () {
const comms = document.querySelectorAll('.comment-wrap > div'); const comms = document.querySelectorAll('.comment-wrap > div');
if (comms.length<=1) return; if (comms.length <= 1) return;
comms.forEach(function(item){ comms.forEach(function (item) {
var dis = window.getComputedStyle(item, null).display; let dis = window.getComputedStyle(item, null).display;
item.style.display = dis; item.style.display = dis;
}); });
}, },
registerCommonSwitch: function() { registerCommonSwitch: function () {
const button = document.querySelector('.comment-switch .switch-btn'); const button = document.querySelector('.comment-switch .switch-btn');
if (!button) return; if (!button) return;
const comms = document.querySelectorAll('.comment-wrap > div'); const comms = document.querySelectorAll('.comment-wrap > div');
button.addEventListener('click', () => { button.addEventListener('click', () => {
button.classList.toggle('move'); button.classList.toggle('move');
comms.forEach(function(item){ comms.forEach(function (item) {
if (item.style.display === 'none') { if (item.style.display === 'none') {
item.style.cssText = "display: block; animation: tabshow .8s"; item.style.cssText = "display: block; animation: tabshow .8s";
} else { } else {
@@ -278,8 +509,20 @@ NexT.utils = {
}); });
}, },
activateNavByIndex: function(index) { hideComments: function () {
const target = document.querySelectorAll('.post-toc li a.nav-link')[index]; let postComments = document.querySelector('.post-comments');
if (postComments !== null) {
postComments.style.display = 'none';
}
},
hiddeLodingCmp: function (selector) {
const loadding = document.querySelector(selector).previousElementSibling;
loadding.style.display = 'none';
},
activateNavByIndex: function (index) {
const target = document.querySelectorAll('.post-toc li a')[index];
if (!target || target.classList.contains('active-current')) return; if (!target || target.classList.contains('active-current')) return;
document.querySelectorAll('.post-toc .active').forEach(element => { document.querySelectorAll('.post-toc .active').forEach(element => {
@@ -295,28 +538,28 @@ NexT.utils = {
const tocElement = document.querySelector('.sidebar-panel-container'); const tocElement = document.querySelector('.sidebar-panel-container');
if (!tocElement.parentNode.classList.contains('sidebar-toc-active')) return; if (!tocElement.parentNode.classList.contains('sidebar-toc-active')) return;
window.anime({ window.anime({
targets : tocElement, targets: tocElement,
duration : 200, duration: 200,
easing : 'linear', easing: 'linear',
scrollTop: tocElement.scrollTop - (tocElement.offsetHeight / 2) + target.getBoundingClientRect().top - tocElement.getBoundingClientRect().top scrollTop: tocElement.scrollTop - (tocElement.offsetHeight / 2) + target.getBoundingClientRect().top - tocElement.getBoundingClientRect().top
}); });
}, },
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'));
} }
}, },
activateSidebarPanel: function(index) { activateSidebarPanel: function (index) {
const duration = 200; const duration = 200;
const sidebar = document.querySelector('.sidebar-inner'); const sidebar = document.querySelector('.sidebar-inner');
const panel = document.querySelector('.sidebar-panel-container'); const panel = document.querySelector('.sidebar-panel-container');
@@ -326,25 +569,39 @@ NexT.utils = {
window.anime({ window.anime({
duration, duration,
targets : panel, targets: panel,
easing : 'linear', easing: 'linear',
opacity : 0, opacity: 0,
translateY: [0, -20], translateY: [0, -20],
complete : () => { complete: () => {
// Prevent adding TOC to Overview if Overview was selected when close & open sidebar. // Prevent adding TOC to Overview if Overview was selected when close & open sidebar.
sidebar.classList.replace(activeClassName[1 - index], activeClassName[index]); sidebar.classList.replace(activeClassName[1 - index], activeClassName[index]);
window.anime({ window.anime({
duration, duration,
targets : panel, targets: panel,
easing : 'linear', easing: 'linear',
opacity : [0, 1], opacity: [0, 1],
translateY: [-20, 0] translateY: [-20, 0]
}); });
} }
}); });
}, },
getScript: function(src, options = {}, legacyCondition) { getStyle: function (src, position='after', parent) {
const link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
link.setAttribute('href', src);
const head = (parent || document.head);
if (position === 'before') {
head.prepend(link);
} else {
head.append(link);
}
},
getScript: function (src, options = {}, legacyCondition) {
if (typeof options === 'function') { if (typeof options === 'function') {
return this.getScript(src, { return this.getScript(src, {
condition: legacyCondition condition: legacyCondition
@@ -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();
@@ -395,13 +653,13 @@ NexT.utils = {
}); });
}, },
loadComments: function(selector, legacyCallback) { lazyLoadComponent: function(selector, legacyCallback) {
if (legacyCallback) { if (legacyCallback) {
return this.loadComments(selector).then(legacyCallback); return this.lazyLoadComponent(selector).then(legacyCallback);
} }
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;
} }

View File

@@ -1,4 +1,5 @@
# Hugo NexT theme's custom config # Hugo NexT theme's custom config
#
version: 4.0.0 version: 4.6.3
domain: hugo-next.eu.org

View File

@@ -1,27 +1,189 @@
# CDN 公共资源商列表
# Public CDN vendor list # Public CDN vendor list
#
vendors: vendors:
cdnjs: "//cdnjs.cloudflare.com/ajax/libs/${name}/${version}/${file}" - name: cdnjs
unpkg: "//unpkg.com/${name}@${version}/${file}" home: "https://cdnjs.com"
logo: "https://cdnjs.com/_/f7a2ebfb819c118086546e481876aef6.svg"
type: "modern"
url: "https://cdnjs.cloudflare.com/ajax/libs"
- name: unpkg
home: "https://unpkg.com"
logo: "https://unpkg.fly.dev/_client/b870d5fb04d2854d.png"
type: "nodejs"
url: "https://unpkg.com"
# Javascript Resources - name: bootcdn
# home: "https://www.bootcdn.cn"
logo: "https://www.bootcdn.cn/assets/img/logo.png"
type: "modern"
url: "https://cdn.bootcdn.net/ajax/libs"
- name: staticfile
home: "https://staticfile.net/"
logo: "https://www.staticfile.net/images/logo.png"
type: "modern"
url: "https://cdn.staticfile.net"
- name: 7ed
home: "https://www.7ed.net"
logo: "https://github.com/7ednet/homepage/raw/main/_images/logo.svg"
type: "modern"
url: "https://use.sevencdn.com/ajax/libs"
- name: zstatic
home: "https://www.zstatic.net"
logo: "https://www.zstatic.net/favicon/favicon-16x16.png"
type: "modern"
url: "https://s4.zstatic.net/ajax/libs"
- name: zeyao
home: "https://cdn.jsdmirror.com/"
logo: "https://img.cuteapi.com/2023/08/29/Background.png"
type: "nodejs"
url: "https://cdn.jsdmirror.com/npm"
- name: jsdelivr
home: "https://www.jsdelivr.com/"
logo: "https://www.jsdelivr.com/assets/0c183396fdb0079ea31849b02bc5e3429f1740de/img/jsdelivr-horizontal-regular.svg"
type: "nodejs"
url: "https://cdn.jsdelivr.net/npm"
# JavaScript 资源
# JavaScript Resources
js: js:
- name: animejs - name: animejs
version: 3.2.1 version: 3.2.2
file: lib/anime.min.js file: lib/anime.min.js
- name: mathjax
version: 3.2.0 - name: viewerjs
version: 1.11.6
file: dist/viewer.min.js
# CSS 资源
# CSS Resources
css:
- name: font-awesome
version: 6.6.0
file: css/all.min.css
alias: '@fortawesome/fontawesome-free'
- name: animate.css
version: 4.1.1
file: animate.min.css
- name: viewerjs
version: 1.11.6
file: dist/viewer.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
version: 2.15.8
file: dist/waline.js
alias: "@waline/client"
css:
name: waline
version: 2.15.8
file: dist/waline.css
alias: "@waline/client"
artalk:
js:
name: artalk
version: 2.6.4
file: dist/Artalk.min.js
css:
name: artalk
version: 2.6.4
file: dist/Artalk.min.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.24.0
file: dist/algoliasearch-lite.umd.js
instant:
name: instantsearch.js
version: 4.73.2
file: dist/instantsearch.production.min.js
plugins:
# 数学公式渲染
mathjax:
js:
name: mathjax
version: 3.2.2
file: es5/tex-mml-chtml.js file: es5/tex-mml-chtml.js
# CSS Resources katex:
# js:
css: - name: katex
- name: '@fortawesome/fontawesome-free' alias_name: KaTeX
version: 6.1.1 version: 0.16.9
file: css/all.min.css file: dist/katex.min.js
alias: font-awesome
- name: animate.css - name: auto-render
version: 3.1.1 alias: katex
file: animate.min.css alias_name: KaTeX
version: 0.16.9
file: dist/contrib/auto-render.min.js
css:
name: katex
alias_name: KaTeX
version: 0.16.9
file: dist/katex.min.css
# 画图渲染
mermaid:
js:
name: mermaid
version: 10.9.1
file: dist/mermaid.min.js
# 文章访问/评论统计
waline:
js:
- name: pageview
alias_name: waline
version: 2.15.8
file: dist/pageview.js
alias: "@waline/client"
- name: comment
alias_name: waline
version: 2.15.8
file: dist/comment.js
alias: "@waline/client"

View File

@@ -39,21 +39,71 @@ markup:
renderer: renderer:
unsafe: true unsafe: true
highlight: highlight:
# # 高亮代码的样式名称可选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:
minifyOutput: true
#-------------------------------------- #--------------------------------------
# 菜单配置说明 # 菜单配置说明
@@ -84,16 +134,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 +158,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 +194,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 +293,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's view information
views:
enable: true
# 组件类型,可选值为: 51la, busuanzi
# 使用51la时需要注册账号https://invite.51.la/
# Plguin value is: 51la, busuanzi
plugin: busuanzi
# 社交链接地址 # 社交链接地址
# 用法: `Key: 名称 || 链接地址 || 图标` # 用法: `Key: 名称 || 链接地址 || 图标`
@@ -316,6 +386,9 @@ params:
# Footer Settings # Footer Settings
# --------------------------------------------------------------- # ---------------------------------------------------------------
footer: footer:
# 启动谷歌翻译功能
# Enable google translate in footer
translate: false
# 站点开始年份,默认为当下时间的年份 # 站点开始年份,默认为当下时间的年份
# 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.
@@ -374,8 +447,11 @@ params:
url: /imgs/vendors/upyun.png url: /imgs/vendors/upyun.png
width: 43 width: 43
link: https://upyun.com link: https://upyun.com
- name: Webify - name: Github
link: https://webify.cloudbase.net link: https://github.com
image:
url: /imgs/vendors/github.svg
width: 14
# --------------------------------------------------------------- # ---------------------------------------------------------------
@@ -397,6 +473,7 @@ params:
# 开启文章头部元素显示 # 开启文章头部元素显示
# Post meta display settings # Post meta display settings
postMeta: postMeta:
# 是否开启各元素的文字显示
itemText: true itemText: true
created: true created: true
updated: updated:
@@ -405,6 +482,18 @@ params:
categories: true categories: true
wordCount: true wordCount: true
readTime: true readTime: true
# 是否开启评论数显示
comments:
enable: true
# 评论统计插件暂只支持waline
# Comment counter plugin, only support waline
plugin: waline
# 是否开启页面访问数显示
views:
enable: true
# 页面访问统计插件支持busuanzi, waline, leancloud
# Page views counter plugin, support: busuanzi, waline, leancloud
plugin: busuanzi
# 文章底部的设置 # 文章底部的设置
# Post footer settings # Post footer settings
@@ -553,7 +642,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 +741,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 +794,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.
@@ -742,57 +815,61 @@ params:
- name: waline - name: waline
title: Waline title: Waline
color: "#27ae60" color: "#27ae60"
weight: 2 weight: 1
- name: giscus - name: giscus
title: Giscus title: Giscus
color: "#886ce4" color: "#886ce4"
weight: 1 weight: 2
# Waline 评论插件 # Waline 评论插件
# 更多配置信息请参考https://waline.js.org/ # 更多配置信息请参考https://waline.js.org/
# Waline comments system # Waline comments system
# More info seee: https://waline.js.org/ # More info seee: https://waline.js.org/
waline: waline:
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
@@ -801,16 +878,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
@@ -853,24 +938,22 @@ 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:
enable: true
visitors: true
visitorsIcon: fa fa-user visitorsIcon: fa fa-user
views: true
viewsIcon: fa fa-eye viewsIcon: fa fa-eye
postViews: true
postViewsIcon: far fa-eye
# --------------------------------------------------------------- # ---------------------------------------------------------------
# TODO # 内容搜索服务
# 内容搜索服务(暂时未实现)
# Search Services # Search Services
# --------------------------------------------------------------- # ---------------------------------------------------------------
@@ -878,21 +961,40 @@ 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
# 索引生成内容长度字数限制
# Index generation content length word count limit.
limit: 1000
# 本地搜索
# 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
# 索引生成内容长度字数限制
# Index generation content length word count limit.
limit: 1000
# --------------------------------------------------------------- # ---------------------------------------------------------------
@@ -928,7 +1030,7 @@ params:
# - flat flat callout style with background, like on Mozilla or StackOverflow. # - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag. # - disabled disable all CSS styles import of note tag.
style: simple style: simple
icons: false icons: true
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
# Offset also applied to label tag variables. This option can work with disabled note tag. # Offset also applied to label tag variables. This option can work with disabled note tag.
lightBgOffset: 0 lightBgOffset: 0
@@ -968,7 +1070,7 @@ params:
# Use Animate.css to animate everything. # Use Animate.css to animate everything.
# For more information: https://animate.style # For more information: https://animate.style
motion: motion:
enable: false enable: true
async: true async: true
transition: transition:
# All available transition variants: https://theme-next.js.org/animate/ # All available transition variants: https://theme-next.js.org/animate/
@@ -1004,30 +1106,17 @@ params:
# --------------------------------------------------------------- # ---------------------------------------------------------------
# CDN 服务(暂时只支持 unpkg 和 cndjs # CDN 服务
# CDN Settings # CDN Settings
# --------------------------------------------------------------- # ---------------------------------------------------------------
vendors: vendors:
# The CDN provider of NexT internal scripts. # The CDN provider of NexT internal scripts.
# Available values: local | unpkg | cdnjs | custom # Available values: local | cdn
# Warning: If you are using the latest master branch of NexT, please set `internal: local`
internal: local internal: local
# The default CDN provider of third-party plugins. # The default CDN provider of third-party plugins.
# Available values: local | unpkg | cdnjs | custom # Available values: local | cdnjs | unpkg | jsdelivr | staticfile | bootcdn | 7ed | zstatic | zeyao | custom
# Dependencies for `plugins: local`: https://github.com/next-theme/plugins plugins: local
plugins: unpkg
# TODO
# Custom CDN URL # Custom CDN URL
# For example: # For example:
# custom_cdn_url: https://cdn.jsdelivr.net/npm/${npm_name}@${version}/${minified} # custom_cdn_url: https://cdn.jsdelivr.net/npm/${npm_name}@${version}/${minified}
# custom_cdn_url: https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${cdnjs_file} # custom_cdn_url: https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${cdnjs_file}
#custom_cdn_url:
# TODO
# Assets
# Accelerate delivery of static files using a CDN
# The js option is only valid when vendors.internal is local.
css: css
js: js
images: imgs

View File

@@ -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

View File

@@ -0,0 +1,3 @@
---
date: 2022-07-26T21:46:25+08:00
---

View 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
```

View File

@@ -0,0 +1,83 @@
---
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: "demo/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个目录用于存放自定布局设计文件另外在站点根目录下创建 `static/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>

View File

@@ -7,13 +7,14 @@ date: 2022-06-04T19:46:45+08:00
lastmod: 2022-06-04T19:46:45+08:00 lastmod: 2022-06-04T19:46:45+08:00
categories: categories:
- 示例 - 示例文章
- 语法
tags: tags:
- 表情 - 表情
- emoji - emoji
toc: false url: "demo/emoji-support.html"
url: "post/emoji-support.html"
--- ---
Emoji 可以通过多种方式在 Hugo 项目中启用。 Emoji 可以通过多种方式在 Hugo 项目中启用。

View File

@@ -7,7 +7,7 @@ date: 2022-06-01T15:59:41+08:00
lastmod: 2022-06-01T15:59:41+08:00 lastmod: 2022-06-01T15:59:41+08:00
categories: categories:
- 示例 - 示例文章
tags: tags:
- Hugo - Hugo
- NexT - NexT
@@ -25,11 +25,11 @@ weight: 1
# 用户指南 ## 用户指南
设置 NexT 主题很容易。只需遵循文档,就可快速创建您的个人网站! 设置 NexT 主题很容易。只需遵循文档,就可快速创建您的个人网站!
# 反馈 ## 反馈
- 访问 Awesome NexT 列表,与其他用户分享插件和教程。 - 访问 Awesome NexT 列表,与其他用户分享插件和教程。
- 加入我们的 Gitter 聊天。 - 加入我们的 Gitter 聊天。

View File

@@ -6,12 +6,14 @@ lastmod: 2022-06-03T16:43:23+08:00
date: 2022-06-02T11:52:03+08:00 date: 2022-06-02T11:52:03+08:00
categories: categories:
- 博客 - 开始建站
tags: tags:
- Hugo - Hugo
- 开始 - 开始
url: post/hello-world.html url: demo/hello-world.html
toc: true
weight: 2 weight: 2
--- ---

View File

@@ -0,0 +1,40 @@
---
title: "图像浏览工具 "
description: "默认会对文章内的图片, 进行图片浏览,点击图片可以查看大图,点击空白处可以关闭。"
keywords: "image,图像,浏览器,相册"
date: 2024-07-21T10:28:12+08:00
lastmod: 2024-07-21T10:28:12+08:00
categories:
- 示例文章
tags:
- 图像
- 相册
- 浏览
url: "demo/image-viewer.html"
toc: false
---
本主题自带图像浏览器功能,支持对文章区域内出现的图片进行浏览,点击图片可以查看大图,点击空白处可以关闭。不需要配置任何参数,只要在文章里面相应的位置添加图片信息即可 。
<!--more-->
图像浏览器引用了 [fengyuanchen](https://fengyuanchen.github.io/) 开发的 [viewerjs](https://fengyuanchen.github.io/viewerjs/),支持显示图像名称,尺寸,旋转,缩放,播放等功能。可点击如下的示例图像查看体验:
## 动物
![cute-scottish-fold-cat](/post/image-viewer/preview_cute-scottish-fold-cat.jpg)
![scottish-fold-kitten](/post/image-viewer/preview_scottish-fold-kitten.jpg)
![hourses](/post/image-viewer/preview_horses.jpg)
![owl-family-background](/post/image-viewer/preview_owl-family-background.jpg)
## 风景
![luxury-resort-in-maldives](/post/image-viewer/preview_luxury-resort-in-maldives.jpg)
![sea-shell](/post/image-viewer/preview_sea-shell.jpg)
![the-arch-sunset](/post/image-viewer/preview_the-arch-sunset.jpg)
![norway-autumn-landscape](/post/image-viewer/preview_norway-autumn-landscape.jpg)

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@@ -7,17 +7,19 @@ lastmod: 2022-06-03T11:52:18+08:00
publishDate: 2022-06-03T11:52:18+08:00 publishDate: 2022-06-03T11:52:18+08:00
author: Mainroad author: Mainroad
originLink: https://mainroad-demo.netlify.app/post/basic-elements/ originLink: https://mainroad-demo.netlify.app/demo/basic-elements/
categories: categories:
- 示例 - 示例文章
- Markdown语法
tags: tags:
- Markdown - Markdown
- 语法 - 语法
toc: false toc: false
draft: false draft: false
url: post/markdown-syntax.html url: demo/markdown-syntax.html
--- ---
仅以此篇文章来测试下在 `NexT` 主题中在通过 `Hugo` 引擎来建站时,是否支持 `Markdown` 文件内容中所写的各种语法,并展示下实际的效果。 仅以此篇文章来测试下在 `NexT` 主题中在通过 `Hugo` 引擎来建站时,是否支持 `Markdown` 文件内容中所写的各种语法,并展示下实际的效果。
@@ -206,4 +208,4 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
<mark>比特作为信息论中的信息单位,也被称为 shannon </mark>,以信息论领域的创始人 Claude shannon 的名字命名。 <mark>比特作为信息论中的信息单位,也被称为 shannon </mark>,以信息论领域的创始人 Claude shannon 的名字命名。
参考: 参考:
- 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/post/basic-elements/) 内容 - 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/demo/basic-elements/) 内容

View File

@@ -0,0 +1,233 @@
---
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: "demo/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`。或者可使用类似 `\displaylines{x = a + b \\\ y = b + c}` 语法进行截断,具体信息可见:[mathjax-issues2312](https://github.com/mathjax/MathJax/issues/2312)
$$
\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} $$ 然后是更多的文本。
### 希腊字母
$$
\displaylines{\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
$$
$$
\displaylines{\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
$$

View File

@@ -0,0 +1,196 @@
---
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: "demo/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 >}}

View File

@@ -0,0 +1,43 @@
---
title: "没有H1-6标题头和评论的文章"
description: "用于测试在没有H1-6标题头时文章的目录导航是否会直接关闭并关闭评论功能。"
keywords: "toc,header"
date: 2022-10-06T09:02:26+08:00
lastmod: 2022-10-30T21:03:16+08:00
categories:
- 示例文章
tags:
- toc
- 标题
comment:
enable: false
url: "demo/no-header-title.html"
---
刘慈欣2018克拉克奖获奖感言部分内容节选
> 用于测试在没有H1-6标题头时文章的目录导航是否会直接关闭并关闭评论功能。
<!--more-->
先生们、女士们,晚上好,
很荣幸获得Clarke Award for Imagination in Service to Society Award。
这个奖项是对想象力的奖励,而想象力是人类所拥有的一种似乎只应属于神的能力,它存在的意义也远超出我们的想象。有历史学家说过,人类之所以能够超越地球上的其它物种建立文明,主要是因为他们能够在自己的大脑中创造出现实中不存在的东西。在未来,当人工智能拥有超过人类的智力时,想象力也许是我们对于它们所拥有的惟一优势。
科幻小说是基于想象力的文学而最早给我留下深刻印象的是Arthur . Clarke的作品。除了Jules Verne和George Wells外Clarke的作品是最早进入中国的西方现代科幻小说。在上世纪八十年代初中国出版了他的《2001:A Space Odyssey》和《Rendezvous With Rama》。当时文革刚刚结束旧的生活和信仰已经崩塌新的还没有建立起来我和其他年轻人一样心中一片迷茫。这两本书第一次激活了我想象力思想豁然开阔许多有小溪流进大海的感觉。读完《2001:A Space Odyssey》的那天深夜我走出家门仰望星空那时的中国的天空还没有太多的污染能够看到银河在我的眼中星空与过去完全不一样了我第一次对宇宙的宏大与神秘产生了敬畏感这是一种宗教般的感觉。而后来读到的《Rendezvous With Rama》也让我惊叹如何可以用想象力构造一个栩栩如生的想象世界。正是Clarke带给我的这些感受让我后来成为一名科幻作家。
现在,三十多年过去了,我渐渐发现,我们这一代在上世纪六十年代出生于中国的人,很可能是人类历史上最幸运的人,因为之前没有任何一代人,像我们这样目睹周围的世界发生了如此巨大的变化,我们现在生活的世界,与我们童年的世界已经完全是两个不同的世界,而这种变化还在加速发生着。中国是一个充满着未来感的国度,中国的未来可能充满着挑战和危机,但从来没有像现在这样具有吸引力,这就给科幻小说提供了肥沃的土壤,使其在中国受到了空前的关注,作为一个在六十年代出生在中国的科幻小说家,则是幸运中的幸运。
我期待有那么一天,像那些曾经描写过信息时代的科幻小说一样,描写太空航行的科幻小说也变的平淡无奇了,那时的火星和小行星带都是乏味的地方,有无数的人在那里谋生;木星和它众多的卫星已成为旅游胜地,阻止人们去那里的唯一障碍就是昂贵的价格。
但即使在这个时候,宇宙仍是一个大的无法想象的存在,距我们最近的恒星仍然遥不可及。浩瀚的星空永远能够承载我们无穷的想象力。
谢谢大家。
> [点击阅读全文](https://weread.qq.com/web/reader/ce032b305a9bc1ce0b0dd2akecc32f3013eccbc87e4b62e)

View File

@@ -0,0 +1,92 @@
---
title: "自定义短语示例"
description: "将常用的块引用、标签卡、按钮等信息设置成短代码,便于快速引用"
keywords: "shortcode,短代码"
date: 2022-08-06T14:41:50+08:00
lastmod: 2022-08-06T14:41:50+08:00
categories:
- 示例文章
- 语法
tags:
- 短代码
- 语法
url: "demo/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 primary >}}
### Primary 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 >}}

View File

@@ -7,13 +7,14 @@ date: 2022-06-07T19:09:52+08:00
lastmod: 2022-06-07T19:09:52+08:00 lastmod: 2022-06-07T19:09:52+08:00
categories: categories:
- 示例 - 示例文章
- 语法
tags: tags:
- 语法 - 语法
- 高亮 - 高亮
- Chroma - Chroma
url: post/syntax-highlighting.html url: demo/syntax-highlighting.html
--- ---
Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用 Chroma 作为代码块高亮支持,它内置在 Go 语言当中,速度是真的非常、非常快,而且最为重要的是它也兼容之前我们使用的 Pygments 方式。 Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用 Chroma 作为代码块高亮支持,它内置在 Go 语言当中,速度是真的非常、非常快,而且最为重要的是它也兼容之前我们使用的 Pygments 方式。
@@ -22,9 +23,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 +42,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,15 +59,15 @@ 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''
--- /path/to/new ''timestamp'' --- /path/to/new ''timestamp''
*************** ***************
@@ -92,9 +93,9 @@ It is important to spell
+new line +new line
``` ```
# 文件 ## 文件
## Make 文件 ### Make 文件
``` makefile {linenos=false} ``` makefile {linenos=false}
CC=gcc CC=gcc
@@ -104,7 +105,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 +113,9 @@ hellomake: hellomake.o hellofunc.o
[link](www.example.com) [link](www.example.com)
``` ```
# 数据内容 ## 数据内容
## JSON 数据 ### JSON 数据
``` json ``` json
{"employees":[ {"employees":[
@@ -122,7 +123,7 @@ hellomake: hellomake.o hellofunc.o
]} ]}
``` ```
## XML 内容 ### XML 内容
``` xml ``` xml
<employees> <employees>
@@ -132,7 +133,7 @@ hellomake: hellomake.o hellofunc.o
</employees> </employees>
``` ```
## SQL 查询 ### SQL 查询
{{< highlight sql >}} {{< highlight sql >}}

View File

@@ -7,14 +7,14 @@ date: 2022-06-08T21:12:52+08:00
lastmod: 2022-06-08T21:12:52+08:00 lastmod: 2022-06-08T21:12:52+08:00
categories: categories:
- 示例 - 示例文章
tags: tags:
- 目录 - 目录
- 导航 - 导航
- 博客 - 博客
toc: true toc: true
url: post/table-of-content.html url: demo/table-of-content.html
--- ---
巴顿将军说过“衡量一个人是否成功不是看他站到顶峰而是从顶峰跌落之后的反弹力”褚时健的人生便是如此中年发家致富名利双收之后又跌落到谷底等到74岁再创业10年后带着褚橙归来东山再起收获亿万财富他的发展轨迹就是反弹的过程。 巴顿将军说过“衡量一个人是否成功不是看他站到顶峰而是从顶峰跌落之后的反弹力”褚时健的人生便是如此中年发家致富名利双收之后又跌落到谷底等到74岁再创业10年后带着褚橙归来东山再起收获亿万财富他的发展轨迹就是反弹的过程。
@@ -23,38 +23,48 @@ url: post/table-of-content.html
![禇老](https://wfqqreader-1252317822.image.myqcloud.com/cover/568/814568/t6_814568.jpg) ![禇老](https://wfqqreader-1252317822.image.myqcloud.com/cover/568/814568/t6_814568.jpg)
# 早年的故事 ## 早年的故事
## 起始 ### 起始
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年我开始从事专业写作工作以来他给我创造了很多写作的机会并且不吝自己诸多人生和学习的体会和感悟一一传递予我。知遇之恩感谢非常。
最后,我当然要把最大的感谢致予褚时健先生。不仅是因为他慷慨、坦率面对我的各种提问,更重要的是,在倾听他的故事的过程里,他繁盛的人生经历,他的强大生命力,他对生活、对事业的一片赤子之心,也丰富了我对自己人生的思考。

View File

@@ -0,0 +1,37 @@
# 友情链接
# Friend's links
- FLinksTitle: 官方示例
FLinksDesc: 来自主题官方的示例内容。
FLinksList:
- name: Hugo
desc: 世界上最快的网站建设框架!
avatar: https://gohugo.io/favicon-32x32.png
link: https://gohugo.io
timeout: 2
visible: true
- name: Hugo-NexT
desc: Hugo NexT 官方预览网站。
avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png
link: https://hugo-next.eu.org
timeout: 2
visible: true
- name: 凡梦星尘空间站
desc: 再平凡的人也有属于他的梦想!
avatar: https://elkan1788.github.io/imgs/avatar.png
link: https://lisenhui.cn
timeout: 2
visible: true
- 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/
timeout: 2
visible: true

View 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>

View File

@@ -0,0 +1,3 @@
<div class="mydefined animated" itemprop="custom">
<span>支持自定义CSS和Sidebar布局啦💄💄💄</span>
</div>

View File

@@ -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

View 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;
}

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module github.com/hugo-next/hugo-theme-next
go 1.18

Some files were not shown because too many files have changed in this diff Show More