Compare commits

...

345 Commits

Author SHA1 Message Date
Cell 4203b573cb 🔖 Chore(release): 0.3.11 2024-08-30 12:57:57 +08:00
Cell 5991958bca 🐛 Fix: FixIt theme internal version number error 2024-08-30 12:57:09 +08:00
Cell afc504e33a 🔖 Chore(release): 0.3.10 2024-08-30 11:19:23 +08:00
Cell c8081affa6 ⬆️ Chore(libs): update Valine from 1.5.1 to 1.5.2 2024-08-30 10:53:19 +08:00
Cell 1f22b538b5 Chore: simplified code 2024-08-30 10:42:51 +08:00
Cell 442ec84049 ⬆️ Chore: update min hugo version to 0.132.0 2024-08-29 22:45:00 +08:00
Cell 52184d96d4 💄 Style: update center-quote shortcode style 2024-08-29 22:37:31 +08:00
Cell 5dac03a90d 🌐 Feat: add translations for alerts 2024-08-29 22:30:06 +08:00
Cell e2cf5fe31d 💄 Style: add alert stylesheet 2024-08-29 22:30:06 +08:00
Cell 8798f5b51f 🎉 Feat: add blockquote render hook to support GitHub alerts markdown syntax
simpler callouts or admonitions sytax
2024-08-29 22:30:06 +08:00
Cell 3b99838980 ♻️ Refactor: icon plugin 2024-08-29 17:52:56 +08:00
Cell 5aaacec004 🐛 Fix: resources get match error for page images 2024-08-29 14:47:02 +08:00
Cell 349de54009 🐛 Fix: featuredimagepreview error in summary and RSS 2024-08-29 14:05:40 +08:00
Cell 312b6363dc Merge pull request #494 from hugo-fixit/content-encryption
🔒 Perf: enhance content encryption security
2024-08-29 11:20:34 +08:00
Cell a67efe41be 🔧 Chore: update version automatic update script 2024-08-29 11:17:38 +08:00
Cell 64529c99c8 📝 Docs(ignore): update memo 2024-08-29 10:54:50 +08:00
Cell ede47a2bae ♻️ Refactor: convert FixItDecryptor to ES6 Class 2024-08-29 10:49:51 +08:00
Cell b7ed9cac69 ♻️ Refactor: refactor content encryption 2024-08-29 10:24:16 +08:00
Cell ccce5b52fd 📈 Feat: remove noreferrer from friend links and version shortcode 2024-08-26 14:49:43 +08:00
Cell e7dd4c838c Chore: unified content encryption function 2024-08-26 11:22:45 +08:00
Cell 18643271f8 📝 Docs: update default outputs config 2024-08-26 11:03:28 +08:00
Cell 91f3c7c3cf 🐛 Fix: fix fixit-encryptor shortcode duplicate binding events 2024-08-26 10:58:34 +08:00
Cell 466bb7b7e9 🔒 Perf: use xxHash instead of md5 to calculate the hash value of a password
Update min hugo version to 0.129.0 for using xxHash function
2024-08-25 13:48:28 +08:00
Cell 3ffef8acb0 ♻️ Refactor: refactor the feed and search features (#490)
* 🔍 Refactor: add JSON feed support and refactor output formats build in FixIt

Close #475

* 🚚 Feat: migrate index templates to layouts/_default folder and home.[name].html

* 📝 Style(ignore): fix typo

* 🚚 Chore: migrate index templates to default home templates

* 🚚 Chore: migrate section templates to layouts/section folder

*  Feat: add JSON feed support for section pages (#475)

* 🚧 Feat: add common template for JSON feed (#475)

* 🚧 Feat: add JSON feed support for section and term list pages

* 🚀 Chore: fix git stage error in update-version script

*  Perf: add front matter hiddenFromFeed for JSON feed (#475)

* 🔍 Feat: add tags attribute for JSON feed (#475)

* ♻️ Refactor: refactor RSS feed templates

Close #488

* 🚧 WIP: rename json-feed.html to json.html

* 🚧 Feat: revert single.md

*  Perf: enhance JSON feed 1.1 compatibility

* ♻️ Refactor: refactor post author map getting

*  WIP: add featured image support in feed

* 📝 Docs: update README and screenshot

* 🔧 Chore: update changelog template

* 🚧 WIP: add feed scoped config for section and list

* 🔥 Feat: migrate JSON feed to hugo-fixit/hugo-json-feed

Close hugo-fixit/hugo-json-feed#1

* 🚚 Feat: remove front matter hiddenFromRss and rssFullText,  add  front matter hiddenFromFeed
2024-08-24 17:30:31 +08:00
Cell 6a83650506 Feat: add post navigation config and remove params.Site.Params.navigationReverse
Closes #480
2024-08-11 16:30:01 +08:00
Cell 1c84791db9 🔥 Feat: migrate mobile devtools to a single compenent (#474) 2024-08-10 11:49:36 +08:00
Cell 24873c5e99 🚸 Chore: update FixIt theme version detection in dev mode 2024-08-09 10:40:09 +08:00
Cell 51d64cb152 📝 Docs(ignore): update README 2024-08-08 10:17:11 +08:00
Cell 94553e9b8e 📝 Docs: update CONTRIBUTING.md 2024-08-06 17:30:47 +08:00
Cell 656f00b6a4 🚀 Chore: optimize development process: automatically update FixIt version 2024-08-06 17:30:32 +08:00
Cell 9a1b4570a7 💄 Style: update common style 2024-08-05 15:48:47 +08:00
Cell 976db36bc8 Feat: add more params for typeit shortcodes
resolves #483
2024-08-04 12:30:06 +08:00
Cell c0942a92b9 Feat: open more custom blocks (#479)
- custom-comment
- custom-post__footer:before
- custom-post__footer:after
2024-08-03 12:20:29 +08:00
Cell 0a5007921a 🍱 Chore: update screenshot and thumbnail 2024-08-01 15:12:54 +08:00
Cell a482e14bd5 🐛 Fix(ignore): fix bug in dev ed2f5f6d 2024-08-01 10:05:18 +08:00
Cell 9109ef22e2 Perf(ignore): remove busuanzi.core and add busuanzi.source (#472) 2024-07-30 16:40:41 +08:00
Cell ed2f5f6d10 ♻️ Refactor: refactor page style with CSS round function
Resolved #482
2024-07-29 20:10:40 +08:00
Cell 4065ce606a Perf: disable PWA in the built-in development server 2024-07-28 23:12:48 +08:00
Cell 72a77c2fc5 Perf(ignore): disable busuanzi in dev environment 2024-07-28 23:09:16 +08:00
Navjot Singh 291364255c Block AI Bots and crawlers 2024-07-28 17:24:16 +08:00
Cell 66b86d97cf 💄 Style: change font size of the Collection List and TOC 2024-07-28 17:11:45 +08:00
Cell 16c903fac9 🐛 Fix: fix rendering errors caused by decimal points in page width styles
Closes giscus/giscus#1426
2024-07-28 16:18:23 +08:00
Cell 7c85205519 :bug :Fix: heading front matter is not effective 2024-07-28 14:25:45 +08:00
Cell 7c67b90acf ♻️ Refactor: deprecate params.ibruce in favor of params.busuanzi powered by Vercount
Resolve #472
Close EvanNotFound/vercount#10
2024-07-28 13:34:53 +08:00
Cell 6c752c1bbd 📝 Docs(ignore): update zsxq link 2024-07-26 16:25:19 +08:00
Cell b8ecfc1127 💄 Style: revert timeline animation to fade style 2024-07-25 11:33:23 +08:00
Tim a0b4b81fd6 style: 💄 change the icon of edit button in code block header to fa-pen-to-square 2024-07-25 09:34:56 +08:00
Cell 25e358d920 🔖 Chore(release): 0.3.9 2024-07-24 16:31:13 +08:00
Cell 6cbb89875a 🐛 Fix: fix cookieconsent init error
Resolved #314
2024-07-24 16:11:14 +08:00
Cell bcd6987910 🐛 Fix(ignore): TypeError: Cannot read properties of null (reading 'cloneNode') 2024-07-24 15:39:57 +08:00
Cell dd33cabe16 🐛 Fix: take a dirty hack to fix the bug of APlayer and smoothScroll
Fixed #292
2024-07-24 15:31:06 +08:00
Cell 99dc099939 📝 Docs(ignore): rename function initHighlight to initCodeWrapper 2024-07-24 14:05:13 +08:00
Cell de18e91146 Feat: add param to hide single code block header (#462) 2024-07-24 12:28:39 +08:00
Cell 537ad1df3f Feat: add config whether to enable the code wrapper
Resolved #462
2024-07-24 10:59:24 +08:00
Cell 7c836776c0 ✏️ Docs: fix typo 2024-07-23 11:36:15 +08:00
Cell 9894d9900c 💄 Style: update timeline animation 2024-07-23 11:31:43 +08:00
Cell 9d32ba9d9e 📝 Docs: update hugo.toml 2024-07-23 09:59:13 +08:00
Cell affaea7ecb 🐛 Fix: password runecount calc error 2024-07-22 15:40:29 +08:00
Cell 03e9b119cc Feat(igonre): Timeline feature enhancement 2024-07-22 15:12:55 +08:00
Cell 3e2484e69b 🔧 Chore(ignore): change giscus default comment order 2024-07-22 10:52:20 +08:00
Cell 44b63ca817 💄 Style: add title for friends avatar 2024-07-22 00:56:33 +08:00
Cell f44d89a52a ♻️ Refactor: mermaid shortcode and codeblock render 2024-07-21 20:20:39 +08:00
Cell 2a53dbac37 Feat: add echarts support for code blocks 2024-07-21 19:02:11 +08:00
Cell 9925af0808 Chore(ignore): remove FUNDING.yml 2024-07-21 13:28:04 +08:00
Cell 07c40dbc3e 📝 Docs(ignore): update README 2024-07-21 13:08:31 +08:00
Cell ec1debab38 🐛 Fix: the content of the code block in the details shortcode cannot be copied 2024-07-21 12:42:34 +08:00
Cell ee4441c3ea 🎉 Feat: add extended shortcode - Timeline support 2024-07-21 11:31:13 +08:00
Cell 42f811de22 🐛 Fix(ignore): timeline background color invaild in dark mod 2024-07-21 03:27:25 +08:00
Cell f6911c4fd2 Feat: add open and center params for details shortcode 2024-07-21 00:59:05 +08:00
Cell 9bacfa92f4 🎉 Feat: add timeline support for code blocks 2024-07-21 00:58:01 +08:00
Cell b3b0e6a4e0 ✏️ Feat: update Markdown code block type 2024-07-18 15:45:51 +08:00
Cell df7c7b9e18 Chore(ignore): update ISSUE_TEMPLATE and README 2024-07-16 17:50:23 +08:00
Cell 419ade9c73 Feat: add data-open attribute for code block
See http://fixit.lruihao.cn/documentation/content-management/markdown-syntax/extended/#custom-attribute
2024-07-16 15:15:53 +08:00
Cell 632243e60c 🐛 Style: fix Gist code highlight error in dark mod 2024-07-14 21:10:31 +08:00
Cell dc279b4346 🐛 Fix: fix code block scrollbar color error 2024-07-12 14:59:27 +08:00
Cell 26051115cd 💬 Docs: update Hugo Fixit demo site 2024-07-12 10:13:11 +08:00
Cell f9a09e4610 Feat: add submenu param divided and change submenu border color 2024-07-11 22:06:45 +08:00
Cell 2b2bde7ba8 🐛 Fix: collection nav and list can not show in posts that have password 2024-07-11 09:45:32 +08:00
Cell 6d9c6f5b93 💡 Feat: use the original title after archiving the articles 2024-07-10 17:59:09 +08:00
Cell 45c71ef58e 🐛 Fix: .hiddenFormRss not taking effect 2024-07-10 12:40:15 +08:00
Cell e39d78965f ♻️ Refactor: refactor breadcrumb translations with .TranslationKey 2024-07-09 16:10:19 +08:00
Cell 3dcb3b1a98 📝 Docs: update hugo.toml 2024-07-09 16:08:52 +08:00
Cell 906f3463ba 📝 Docs: fix typo in translations 2024-07-09 16:08:17 +08:00
Cell adf2acd22c 💄 Style: update bilibili and douyin shortcode style 2024-07-07 18:27:06 +08:00
Cell c021a53d15 📝 Docs: update embed archetypes 2024-07-07 12:20:08 +08:00
Cell b067289648 🐛 Fix: fix footnote style error 2024-07-05 00:39:08 +08:00
Cell c18aac486b 🐛 Fix: fix admontion overflow error 2024-07-05 00:37:24 +08:00
Cell 4f56a40653 🐛 Fix: fix code block scrollbar color error 2024-07-05 00:36:45 +08:00
Cell 061a3e3e2b ♻️ Refactor: deprecate .Site.IsMultiLingual in favor of hugo.IsMultilingual
.Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in a future release. Use hugo.IsMultilingual
2024-07-04 23:40:08 +08:00
Cell 44d0c7611d ♻️ Refactor: deprecate .Sites.First in favor of .Sites.Default
.Sites.First was deprecated in Hugo v0.127.0 and will be removed in a future release. Use .Sites.Default instead.
2024-07-04 23:37:29 +08:00
Cell cf91f230e8 📝 Docs: update default hugo.toml 2024-07-04 23:07:31 +08:00
Cell 052d128922 🐛 Fix: fix code title overflow in code header 2024-06-30 13:33:21 +08:00
Cell 91b583817a 🐛 Fix: fix custom-assets block postion 2024-06-29 18:44:25 +08:00
Cell 9d1ab1a578 🔖 Chore(release): 0.3.8 2024-06-25 12:23:54 +08:00
Cell ca73ca2066 💄 Style: scrollbar styles compatible with modern and legacy browsers 2024-06-25 12:23:21 +08:00
Cell 678e2c0053 Feat: add spotify shortcode support (resolve #450) 2024-06-08 12:27:04 +08:00
Cell 7e2e1006f1 💄 Style: show link icon when target heading element 2024-06-06 23:12:26 +08:00
Cell 256f491244 📝 Docs: update README 2024-06-06 20:50:38 +08:00
Cell 6eaae74708 🔒 Chore: upgrade katex to fix 3 Dependabot alert in katex.min.js 2024-06-06 11:06:04 +08:00
Cell 5c4de3ae21 🔒 Chore: upgrade crypto-js to fix 1 Dependabot alert in crypto-js 2024-06-06 11:00:21 +08:00
Cell 8db70c5829 📝 Docs: update hugo.toml 2024-06-06 10:11:06 +08:00
Cell b4940f46ea Feat: avoid using :has to be compatible with older browsers 2024-06-06 10:03:18 +08:00
Cell cbde3f0898 🚸 Feat: replace localStorage with sessionStorage for FixIt auto bookmark 2024-06-04 15:23:29 +08:00
Cell 4c9e20b377 💄 Style: add border radius for icon of card link 2024-06-04 11:15:26 +08:00
Cell 1a454de9d2 💄 Style: use default style for typeit 2024-06-04 11:13:23 +08:00
Abdul Halim Daud b998371564 Feat: add turnstileKey to waline 2024-05-27 17:56:13 +08:00
Abdul Halim Daud 9679c3442a 🐛 Fix: waline source map error 2024-05-27 17:56:13 +08:00
Cell d908af0a27 📝 Docs: update README 2024-05-23 12:40:20 +08:00
Cell b1f5515beb 📝 Docs(ignore): update README 2024-05-23 12:23:35 +08:00
Cell 069355cc70 📝 Docs: repalce of contributos workflow with GitHub contributors link 2024-05-23 12:18:48 +08:00
Tim Yang 6cc4d44ef4 💄 Style: upgrade the name and icon of "twitter" to "X" in share and social part (#443) 2024-05-23 11:43:09 +08:00
Cell 3c4284eb21 💄 Style: update douyin shortcode style in mobile 2024-05-22 12:20:34 +08:00
Cell a985b0e789 🔥 Feat: remove params.customFilePath 2024-05-22 11:45:14 +08:00
Cell 70afe3e883 💄 Style: update douyin shortcode style in mobile 2024-05-22 11:42:34 +08:00
Cell efd7b86b67 🔖 Chore(release): 0.3.7 2024-05-21 22:31:10 +08:00
Cell d7c06360c2 🎉 Feat: add douyin shortcode support 2024-05-20 14:08:30 +08:00
Cell aa68514546 🔍 Feat: add default size for images 2024-05-17 17:37:59 +08:00
Cell 6b65ca8946 🌐 Docs: update I18n transitions 2024-05-17 14:07:03 +08:00
Cell 3e6dfc337b Merge pull request #442 from LoongmaSpirit/loongma-2024-5-13
 Feat: Add a custom domain setting option for Giscus, configured at `params.page.comment.giscus.origin`
2024-05-13 17:53:14 +08:00
loongma d82fefa7dd Feat: Add a custom domain setting option for Giscus, configured at params.page.comment.giscus.origin 2024-05-13 17:47:10 +08:00
Cell f13e95950a 📝 Docs(ignore): update README 2024-05-09 17:01:00 +08:00
Cell df7443951b 🔧 Chore(ignore): add ignoreCommitPattern config for auto changelog 2024-05-09 16:34:16 +08:00
Cell 71e855ab08 🚚 Feat: the parameter params.customFilePath and params.footer.custom is deprecated since v0.3.7, use layouts/partials/custom.html instead 2024-05-09 16:14:20 +08:00
Cell eb0acca980 Feat: add unified custom template entry file layouts/partials/custom.html 2024-05-09 15:44:57 +08:00
Cell f32402dcdf 🔖 Chore(release): 0.3.6 2024-05-07 17:17:26 +08:00
Cell 3e60685d5a ⬆️ Chore: update min hugo version to 0.123.0 2024-05-07 17:06:48 +08:00
Cell 3682a2a1d3 💄 Style: update card link image style 2024-05-07 17:06:01 +08:00
Cell 4d07d872d5 Revert " Perf: use zhihu API to get shortcut image from a link (#391)"
This reverts commit a1e123ac02.
2024-05-07 16:37:47 +08:00
Cell a1e123ac02 Perf: use zhihu API to get shortcut image from a link (#391) 2024-05-07 15:40:12 +08:00
Cell 6c3c3d7a9a 🐛 Fix: get remote image error in link shortcode (#391) 2024-05-07 12:38:52 +08:00
Cell a66bc4e0d1 📝 Docs: update hugo.toml config order 2024-05-07 10:31:24 +08:00
Cell b7e9c6166b Feat: add capitalize automatic headings config at params.page.heading.capitalize (#421) 2024-05-07 10:25:52 +08:00
Cell df47c49726 🔧 Chore: update auto changelog template 2024-05-06 16:44:03 +08:00
dependabot[bot] c881715c2a ⬆️ Chore(deps): bump peaceiris/actions-hugo from 2 to 3 (#441)
Bumps [peaceiris/actions-hugo](https://github.com/peaceiris/actions-hugo) from 2 to 3.
- [Release notes](https://github.com/peaceiris/actions-hugo/releases)
- [Changelog](https://github.com/peaceiris/actions-hugo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-hugo/compare/v2...v3)

---
updated-dependencies:
- dependency-name: peaceiris/actions-hugo
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 16:43:27 +08:00
Cell b32370803b 🔖 Chore(release): 0.3.5 2024-05-06 16:32:51 +08:00
Cell 020a8fdbcc Feat: add titleIcon font matter (#421) 2024-05-06 16:32:33 +08:00
Cell b06b89cc11 🔥 Feat: the type:friends in front matter is removed. use layout:friends instead. 2024-05-06 16:02:22 +08:00
Cell ba4b506b2f Feat: use strings.Title for post title and other titles (#421)
Closes #421
2024-05-06 16:00:29 +08:00
Cell 51bffc18b5 📝 Docs: fix typo 2024-05-06 11:06:29 +08:00
Cell 87f0fe68ae 🔥 Feat: remove params.dev.githubtoken adn replace with environment variable HUGO_PARAMS_GHTOKEN 2024-04-30 15:54:13 +08:00
Cell c2d168c6d1 Feat: add card-icon parameter for link shortcode (#391) 2024-04-30 13:01:00 +08:00
Cell c1b61c7997 📝 Docs: update Security Policy 2024-04-30 00:24:15 +08:00
Cell 5098685763 🔧 Chore: update Gravatar host list 2024-04-29 23:53:21 +08:00
Cell 3c886553db 💄 Style: add fontawesome icon for reward button 2024-04-29 22:53:11 +08:00
Cell 84bca1af4f 🔧 Chore: remove unnecessary parameters in package.json
replace with: `npm run server -- --bind 0.0.0.0`
2024-04-29 22:33:32 +08:00
Cell 851b8e48cb 💄 Style: refactor common text color classes 2024-04-29 22:28:43 +08:00
Cell 89beb8fe4f 💄 Style: refactor hr tag style and add awesome hr style 2024-04-29 22:19:45 +08:00
Cell 462506cb92 💄 Style: refactor heading style 2024-04-29 17:08:07 +08:00
Cell f6ed1ce8fe Revert: use .Title at summary to show post title 2024-04-29 15:14:42 +08:00
Cell b52b31a0cd 🚨 Chore: avoid code scanning alerts 2024-04-26 11:05:28 +08:00
William Wang 12ada20fb8 feat: support lang in giscus config
(cherry picked from commit 1c7a5b01b167d8bcbea422535dc1faf36a480cce)
2024-04-26 10:26:31 +08:00
Cell 39e6466d78 📝 Docs: update REAMDE 2024-04-26 10:06:40 +08:00
Cell fd0b171e5f 🔖 Chore(release): 0.3.4 2024-04-25 17:33:49 +08:00
Cell 7ceed732d2 🔧 Chore: update npm scripts 2024-04-25 17:33:25 +08:00
Cell e07904b0f6 🔖 Chore(release): 0.3.3 2024-04-25 13:12:25 +08:00
Cell 5f5d019f09 🔧 Chore: update release workflow 2024-04-25 13:12:02 +08:00
Cell f4e8babd12 🐛 Fix: unencoded Content in Search Leads to JavaScript Execution Risk in autocomplete-js
Fixes #416
2024-04-25 10:46:55 +08:00
Cell 1ed0acdf35 🐛 Fix: fix echarts and mermaid theme switch error 2024-04-24 20:14:17 +08:00
Cell 3b89a4eaab Feat: refactor FixItDecryptor and add confirm btn
Resolved #437
2024-04-24 17:39:17 +08:00
Cell 20433ed50d 🐛 Fix: using fixit-encryptor shortcode in an unencrypted article caused other styles of the article to not take effect
Fixes #410
2024-04-24 10:35:13 +08:00
Cell 6c83d0630c 🐛 Fix: fix fixit-encryptor shortcode invalid
Fixes #410
Fixes #429
Caused by #420
2024-04-24 09:52:03 +08:00
Cell 79b5c27ed8 🐛 Fix: fix syntax error 2024-04-24 08:59:36 +08:00
asaraog dfeaf0e9a7 🎉 Feat: add Hindi language 2024-04-24 08:59:36 +08:00
Cell 1e493fef48 ⬆️ Fix: update Artalk comments to the latest version and and useBackendConf param
Fixes #415
2024-04-23 17:42:53 +08:00
Cell 7f19569336 🔧 Chore: improve auto changelog configuration
Resolved #434
2024-04-22 21:58:06 +08:00
Cell 429698a096 🔧 Chore: add changelog template and workflow 2024-04-22 17:38:56 +08:00
Cell 09440190aa 🐛 Fix: fix image llightgallery render error (#420) 2024-04-22 12:15:51 +08:00
Cell 1217640d40 🍻 Chore: add random staging id for staging element 2024-04-22 11:31:11 +08:00
Cell 300bbe9a44 🔥 Chore: remove data store in id partials function 2024-04-22 11:23:25 +08:00
Cell 7ec41cdb00 ♻️ Refactor: refactor echarts shortcode data store way (#420) 2024-04-22 11:06:58 +08:00
Cell fd13ca782b ♻️ Refactor: refactor mapbox shortcode data store way (#420) 2024-04-22 10:11:05 +08:00
Cell bae1678c59 🐛 Fix: fix typeit shotrcode miss space when build with --minify param 2024-04-20 17:06:08 +08:00
Cell 72bd72f5ed ♻️ Refactor: refactor typeit shortcode and feature (#420) 2024-04-20 16:30:16 +08:00
Cell c09f141034 ♻️ Refactor: refactor code block rendering 2024-04-19 00:33:35 +08:00
Cell a2d8eaa249 🐛 Fix: fix encrypted-hidden invaild in mobile 2024-04-19 00:31:51 +08:00
Cell ff8e5fc7bf 💄 Style: update comment iframe width 2024-04-13 11:11:43 +08:00
Cell 84e9eea483 Feat: add partial function get-remote-json, and deprecated getJSON function 2024-04-10 15:39:54 +08:00
Cell 5705048952 Feat: add githubTokenHeader into Scratch 2024-04-10 14:34:19 +08:00
Cell d379911220 Feat: add new partial function format-number 2024-04-10 11:04:44 +08:00
Cell 773a8a7eb9 Perf: code optimization 2024-04-08 17:47:57 +08:00
Cell 6ab33ff7bf Feat: add onlyMainSection option for page auto heading numbering 2024-04-08 17:46:31 +08:00
Cell dc0b96210a 📝 Docs: update README 2024-04-06 13:41:37 +08:00
Cell 4dc8d0f7d7 💄 Style: use the same proportions as the cover image of https://dev.to/ 2024-03-27 17:38:34 +08:00
Cell 76fec05da2 🐛 Fix: fix search config read error 2024-03-26 16:38:48 +08:00
Cell 54c773368e Feat: improve readme template 2024-03-26 16:37:35 +08:00
Cell 05693d8b4c 🔧 Chore: update giscus.json 2024-03-26 12:16:11 +08:00
Cell 38cf4ee0de 🐛 Fix: mermaid init error 2024-03-23 21:42:10 +08:00
Cell 3df577cb0d ⬆️ Fix: bump Mermaid from 9.x to 10.x and fix error (#420) 2024-03-08 16:23:37 +08:00
Cell 063d8fa219 🐛 Fix: fix shortcode render error (#420)
mermaid, echarts, music
2024-03-07 22:09:36 +08:00
Cell 7f38d99ae4 💄 Style: update define list style 2024-03-07 15:41:22 +08:00
Cell c771bce957 Docs: update license 2024-03-01 14:43:48 +08:00
Cell 2ea592b4a3 🐛 Fix: use function to get params replace of .Scatch (#420) 2024-02-23 20:50:52 +08:00
Cell a9fd15e47d 🔧 Chore: update custom.js.example to ES6 style 2024-02-23 17:27:49 +08:00
Cell d6be3c1fc2 🔧 Chore: expose theme version number to theme.js 2024-02-23 17:03:19 +08:00
Cell c9af0b9018 🔖 Chore(release): 0.3.2 2024-02-23 10:48:02 +08:00
Cell b2b47095eb 🐛 Fix: to create a scratch pad that is not reset on server rebuilds, use the Store method instead of Scratch method (fixes #417) 2024-02-23 10:33:08 +08:00
Cell 002ebda06f 🐛 Fix: remove symbolic links of themes
fixed #419
2024-02-22 11:24:04 +08:00
Cell 551938f0b4 Revert "🐛 Fix: to create a scratch pad that is not reset on server rebuilds, use the Store method instead of Scratch method (fixes #417)"
This reverts commit 9d6ee9feef.
2024-02-21 14:32:05 +08:00
Cell 9d6ee9feef 🐛 Fix: to create a scratch pad that is not reset on server rebuilds, use the Store method instead of Scratch method (fixes #417) 2024-02-21 14:20:25 +08:00
Cell 1bd56105b7 🐛 Fix: remove sizes="auto" prop what was used for lazysizes.js in old FixIt version (resolve #411)
refer to https://github.com/whatwg/html/issues/9448
2024-01-28 23:18:23 +08:00
Cell b7dba0713e 🐛 Fix: fix regular page in post navigation 2024-01-16 16:04:57 +08:00
Cell dd4f422dba 📝 Docs: update contributing file 2024-01-16 15:54:09 +08:00
Cell aaebdfb02c 🙈 Chore: add .gitattributes 2024-01-16 10:22:56 +08:00
Cell 9eb18b9e75 🔖 Chore(release): 0.3.1 2024-01-11 14:40:18 +08:00
Cell 594c89eb1e 🔧 Chore: remove atomic-algolia (#404) 2024-01-11 11:13:35 +08:00
Cell 976d1ea82a 📝 Chore: remove the docs Git submodule and add the demo directory (resolve #404) 2024-01-10 15:40:42 +08:00
Cell b16a06893c 🐛 Fix: comment the theme field in the default theme configuration
Fix the bug that the theme cannot be loaded through hugo modules
2024-01-10 14:05:58 +08:00
Cell 32711ff29c 🐛 Fix: heading style in terms and list page 2024-01-03 11:39:26 +08:00
Cell 38eb829194 Revert: "Chore: replace git submodule with hugo module to load theme components" 2024-01-02 10:29:09 +08:00
Cell 4c9b5b6773 🔧 Chore: update default menus 2024-01-01 19:40:06 +08:00
Cell 8b2dd976e6 🔖 Chore(release): 0.3.0 2024-01-01 14:54:19 +08:00
dependabot[bot] 8789f6eaff chore(deps): bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 14:43:25 +08:00
Cell 34021a58a3 Feat: add options to make output readme.md and change options for baidu_urls.txt 2024-01-01 14:16:23 +08:00
Cell 804d1e484d 🚚 Feat: migrate offline page to build-in page
remove offline type and layput
2023-12-31 23:32:44 +08:00
Cell e482fbe36a Chore: optimize .Resources variable acquisition in function resources.html 2023-12-31 00:46:51 +08:00
Cell de5fd0c3f7 🚚 Feat: migarte params.cacheRemoteImages to params.page.cacheRemoteImages (#362) 2023-12-30 23:26:08 +08:00
Cell 07756a8c34 Perf: placed remote image in public/images instead of public/ 2023-12-30 21:56:22 +08:00
Cell ef84231860 🔧 Chore: change QQ group social icon 2023-12-30 21:50:15 +08:00
Cell 0c87728979 🐛 Fix: hidden collection navigation, list and related content from encrypted content 2023-12-30 01:03:00 +08:00
Cell 90032a4471 🐛 Fix: fix collection aside style 2023-12-29 23:06:09 +08:00
Cell 2ebc77797c 🚚 Chore: migrate svg to assets/images folder 2023-12-29 21:40:24 +08:00
Cell 714a656ca8 ♻️ Refactor: refactor site footer and params.footer.powered config 2023-12-29 21:26:10 +08:00
Cell 175a307673 Fix: some minor omissions 2023-12-29 19:28:25 +08:00
Cell 8e3d880557 🌐 Feat: add translations for "archives" keyword (#396) 2023-12-29 16:04:25 +08:00
Cell 9f24e82770 Feat: add archives page template (#397)
*  Feat: add archives page template

* 🎨 Style: add some icon for theme built-in templates

* 🔧 Chore: set site home relative permalink globally

* 🔧 Chore: add archives outputs config
2023-12-29 15:57:01 +08:00
Cell 7e8e2e9431 Feat: add param params.indexWithSubtitle 2023-12-28 16:47:52 +08:00
Cell fbe58346e5 Feat: add params.withSiteTitle and params.titleDelimiter to resolve #395 2023-12-28 15:59:01 +08:00
Cell 7aface4334 🔧 Chore: update default theme config 2023-12-28 14:37:40 +08:00
Cell b9539e9d69 📝 Style: modify web page title separator symbol 2023-12-27 17:42:40 +08:00
Cell 927e6f9946 💄 Style: use em replace with rem for collection list and TOC 2023-12-27 17:00:08 +08:00
Cell da54fef151 Feat: add pin icon in home post list and add repost icon in section .etc. 2023-12-27 16:30:36 +08:00
Cell 0c3148b3ee Perf: optimize posts order in collection list (#359) 2023-12-27 15:10:36 +08:00
Cell 7c7b81f589 💄 Style: modify collection list style 2023-12-27 11:18:48 +08:00
Cell d777b2cfaf Revert: restore page number of collection list simple nav 2023-12-27 10:30:40 +08:00
Cell 928fba19a8 🐛 Fix: set breadcrumb height to 0px if breadcrumb is disabled 2023-12-26 15:14:41 +08:00
Cell 68f4d5fb80 Feat: add params.navigationReverse to reverse the order of the navigation menu 2023-12-26 14:47:07 +08:00
Cell df3aaa7ea3 Perf: modify the sorting method in the collection list like the home page 2023-12-26 14:06:38 +08:00
Cell 4753da9236 Feat: add serial number to the table of contents of the article 2023-12-26 11:28:36 +08:00
Cell e4bc95172c ♻️ Refactor: use Hugo render hooks for heading link rendering 2023-12-25 17:38:04 +08:00
Cell f5a79bac03 📝 Fix: fix typo 2023-12-23 18:14:44 +08:00
Cell 8beeb2dfa5 🔧 Chore: update FixIt embedded archetypes 2023-12-23 16:50:03 +08:00
Cell 9894cf6263 💄 Style: optimize menu icon style 2023-12-22 10:54:33 +08:00
Cell bece9f6fa2 Perf: only show update date when update date not equal publish date 2023-12-22 10:36:39 +08:00
Cell 9f7bce87a7 ♻️ Refactor: migrate params.gitRepo and params.page.edit to params.gitInfo
and add page params: `linkToSource`, `linkToEdit` and `linkToReport`
2023-12-21 16:24:17 +08:00
Cell 6c6a326607 Revert: restore image data-alt to alt 2023-12-20 15:13:45 +08:00
Cell 4342d40158 Feat: add hiddenFromRelated page param and reduce the scope of releated content to posts (#227) 2023-12-20 14:44:05 +08:00
Cell e4367587f1 📝 Docs: update docs and config for related content feature 2023-12-20 10:48:48 +08:00
Cell 2cc276e5f5 🎉 Feat: add related content support 2023-12-20 10:48:22 +08:00
Cell caeb3d443e 💄 Style: update some stylesheet 2023-12-19 17:39:50 +08:00
Cell 4b2ff9e773 🔥 Feat: internalize watermark option appendTo 2023-12-13 17:16:52 +08:00
Cell 95612e33f5 💄 Style: add sticky style for collection aside (#359) 2023-12-13 14:57:07 +08:00
Cell 443abcf784 💄 Style: update collection active item color (#359) 2023-12-13 14:18:43 +08:00
Cell 7b7fba261b 🔍 Feat: enhance search engine accessibility 2023-12-11 17:34:17 +08:00
Cell d02a9977a2 Perf: use .GetTerms optimization for getting terms on a page 2023-12-11 14:19:13 +08:00
Cell 4bfe3962a9 🐛 Fix: unable to get pages from a collection cause of Chinese url (contains spaces) decode error (#359)
By the way fixed collection nav css
2023-12-11 11:42:07 +08:00
Cell 9718a1c5c7 Perf: optimize breadcrumb navigation translation 2023-12-10 12:47:50 +08:00
Cell a846d74e43 📝 Docs: update documentations 2023-12-10 12:34:52 +08:00
Cell c606e8c96e Perf: use .LinkTitle instead of .Title 2023-12-08 19:50:03 +08:00
Cell 307851fc25 Feat: add collection list at the sidebar 2023-12-08 19:48:58 +08:00
Cell 94a1796e63 🐛 Fix: cdn script loading failure 2023-12-08 00:55:17 +08:00
Cell c783ced12f Feat: add collection navigation support at the end of the article 2023-12-08 00:13:45 +08:00
Cell 5d16e1ac0f Feat: add collection info at post meta 2023-12-06 21:00:27 +08:00
Cell c7a03ea847 🎉 Feat: add taxonomy collections 2023-12-06 11:26:08 +08:00
Cell 8ccf57862c 📝 Docs: fix typo 2023-12-06 10:07:00 +08:00
Cell 86f4630f0b Perf: optimize categories and tags template lookup order 2023-12-05 19:06:39 +08:00
Cell 8416b6f757 🔥 Docs: remove CHANGELOG.md
replace of https://github.com/hugo-fixit/FixIt/releases
2023-12-05 14:14:26 +08:00
Cell 30dbc469bd 🚚 Feat: the type: offline in front matter is deprecated. use layout: offline instead 2023-12-05 11:19:13 +08:00
Cell 1cfabbe8bc 🚚 Feat: the type: friends in front matter is deprecated. use layout: friends instead 2023-12-05 11:18:36 +08:00
Cell d4d2a95f98 Merge branch 'v0' into v1
* v0:
  🔧 Chore: update default hugo.toml
  🚨 Fix: the author key in site configuration is deprecated. Use params.author instead
  📝 Docs: add post "Tips about algolia"
  ⬆️ Chore: bump babel and core-js
2023-12-05 10:12:18 +08:00
Cell b5208b3f4b 🔧 Chore: update default hugo.toml 2023-12-01 17:20:12 +08:00
Cell fb16d9e1a2 🚨 Fix: the author key in site configuration is deprecated. Use params.author instead 2023-12-01 15:30:54 +08:00
Cell dc288de30f 📝 Docs: add post "Tips about algolia" 2023-12-01 14:48:26 +08:00
Cell e953d16f1c ⬆️ Chore: bump babel and core-js
close #383
close #384
close #385
close #386
2023-12-01 10:04:56 +08:00
Cell a8e815aaa0 📄 Docs: add Security Policy 2023-12-01 00:56:39 +08:00
Cell 7991f97e7a 📝 Docs: update docs 2023-12-01 00:28:18 +08:00
Cell 65875dec78 Merge branch 'v0.2.18-lts' into 1.0.0
* v0.2.18-lts: (22 commits)
  🔖 Chore(release): 0.2.18-lts.5
  📝 Docs: update chang log and docs
  🔧 Chore: change the theme minimum supported Hugo versions above **0.110.0**
  🔧 Chore: update default config in `hugo.toml`
  🐛 Fix: active index of toc may result in error
   Feat: add hiddenFromRss param and front matter
   Perf: preload some stylesheet
  🔧 Chore: add Vercel config (#277)
  🐛 Fix: fix logic error of  lightgallery images rendering
  📝 Docs: update the outputs configuration to avoid the following warnings in versions above Hugo 0.112.0 (resolve #354)
  📝 Docs: update content license
  🐛 Style: fix the emoji style of valine comment (resolve #376)
   Perf: optimize featured image rendering
  🔧 Chore: add decoding and referrerpolicy options for img plugin
  🚸 Feat: change bilibili shortcode `muted` default value
  🔖 Chore(release): 0.2.18-lts.4
  📝 Docs: update change log for v0
   Feat: add more options support for bilibili shortcode, e.g. `autoplay`, `muted` etc. (resolve #375)
  🐛 Fix: disable encrypted articles from rendering to rss (fixed #374)
  🐛 Fix: fix featured image path error in rss and show img tags in rss
  ...
2023-11-29 15:55:17 +08:00
Cell 8aa3cf96a9 🔖 Chore(release): 0.2.18-lts.5 2023-11-26 14:41:24 +08:00
Cell ac39b35cd5 📝 Docs: update chang log and docs 2023-11-26 14:38:15 +08:00
Cell dba2e38ac8 🔧 Chore: change the theme minimum supported Hugo versions above **0.110.0** 2023-11-26 13:26:14 +08:00
Cell 9e3a440909 🔧 Chore: update default config in hugo.toml 2023-11-26 13:20:48 +08:00
Cell 8cfd7d30a4 🐛 Fix: active index of toc may result in error
fix #305
2023-11-26 11:21:29 +08:00
Cell 6f16b3ffe1 Feat: add hiddenFromRss param and front matter 2023-11-22 15:09:45 +08:00
Cell a1833aaf41 Perf: preload some stylesheet 2023-11-20 18:00:04 +08:00
Cell 2d0887173e 🔧 Chore: add Vercel config (#277) 2023-11-17 16:31:12 +08:00
Cell 17070d6fba 🐛 Fix: fix logic error of lightgallery images rendering 2023-11-16 16:32:17 +08:00
Cell e3c69a6b13 📝 Docs: update the outputs configuration to avoid the following warnings in versions above Hugo 0.112.0 (resolve #354)
`DEPRECATED: Kind "taxonomyterm" used in outputs configuration is deprecated, use "taxonomy" instead.`
2023-11-12 12:53:45 +08:00
Cell 5e9f24e3d3 📝 Docs: update content license 2023-11-11 12:16:50 +08:00
Cell 1761aa17b9 🐛 Style: fix the emoji style of valine comment (resolve #376) 2023-11-07 14:40:13 +08:00
Cell fdc501904c Perf: optimize featured image rendering 2023-11-07 11:24:22 +08:00
Cell 9ec83753d3 🔧 Chore: add decoding and referrerpolicy options for img plugin 2023-11-07 11:19:10 +08:00
Cell 1121c9df57 🚸 Feat: change bilibili shortcode muted default value 2023-11-07 10:06:38 +08:00
Cell 95c8113d62 🔖 Chore(release): 0.2.18-lts.4 2023-11-06 17:58:41 +08:00
Cell 6fe37cef59 📝 Docs: update change log for v0 2023-11-06 17:58:19 +08:00
Cell 4e29d5e5ca Feat: add more options support for bilibili shortcode, e.g. autoplay, muted etc. (resolve #375) 2023-11-06 17:56:44 +08:00
Cell 02dda642ea 🐛 Fix: disable encrypted articles from rendering to rss (fixed #374) 2023-11-06 15:42:35 +08:00
Cell c2bb7e0f80 🐛 Fix: fix featured image path error in rss and show img tags in rss
Some RSS parsers may incorrectly parse relative image addresses

Close #373
2023-11-06 12:34:21 +08:00
Cell 4fb9711fa6 🐛 Fix: add a option "Responsive" for plugin image fixed #369 2023-11-04 23:59:00 +08:00
Cell 6682d38af2 Perf: optimize lightgallery images rendering 2023-11-03 21:29:59 +08:00
Cell eaa1fea5dc Merge branch 'master' into 1.0.0 2023-11-03 17:10:34 +08:00
Cell 81f6d68f0a 🔖 Chore(release): 0.2.18-lts.3 2023-11-03 15:39:55 +08:00
Cell a9678bf73c 🐛 Fix: small and large src errors of images 2023-11-03 15:39:43 +08:00
Cell c4a1b10e6a 📝 Docs: update change log 2023-11-03 15:05:39 +08:00
dependabot[bot] fa952dfac7 chore(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-03 14:57:43 +08:00
Cell 089fce6a1c ⬆️ Chore(deps-dev): bump core-js from 3.33.1 to 3.33.2
Closes #367
2023-11-03 14:55:16 +08:00
Cell bdad5f7758 📝 Docs: update README and docs 2023-11-03 14:47:05 +08:00
Cell d484414e20 🐛 Fix: fix toc active error when breadcrumb is enabled and set sticky to true (Fixed #368) 2023-11-03 12:36:56 +08:00
Cell d22d261e69 Perf: optimize plugin image 2023-11-02 18:15:14 +08:00
Cell 0de8e5053f Perf: optimize function get-remote-image 2023-11-02 17:37:24 +08:00
Cell ecb0d964ad Perf: optimize function suffix-validation 2023-11-02 17:35:59 +08:00
Cell c4606930ff 🐛 Fix: anchor jump exception caused by lazy loading of responsive images (#348) 2023-11-01 17:48:48 +08:00
Cell a631096b29 Feat: add options to cache remote image locally (#362 Fixes #348) 2023-10-26 16:51:40 +08:00
Cell b9fe4cc207 🐛 Fix: fix path errors in image src and 1.5x srcset (#346) 2023-10-24 17:14:07 +08:00
Cell aae1380688 🔖 Chore(release): 0.2.18-lts.2 2023-10-24 12:29:13 +08:00
Cell 223a42e3b7 📝 Docs: update CHANGELOG.md 2023-10-24 12:15:32 +08:00
Cell c4519a9194 📝 Docs: update VERSION file 2023-10-24 12:15:32 +08:00
Cell 98bf58d9bc ⬆️ Chore(libs): update simple-icons from 7.12.0 to 9.19.0 2023-10-24 12:15:32 +08:00
Cell 4d223bdc29 ⬆️ Chore(libs): update Waline from 2.14.7 to 2.15.8 2023-10-24 12:15:32 +08:00
Cell b3b9e358fd ⬆️ Chore(libs): update eruda from 2.5.0 to 3.0.1 2023-10-24 12:15:32 +08:00
Cell 9f1773b6c7 ⬆️ Chore(libs): update vConsole from 3.14.6 to 3.15.1 2023-10-24 12:15:32 +08:00
Cell 1f412dc12d ⬆️ Chore(libs): update Twikoo from 1.6.8 to 1.6.22 2023-10-24 12:15:32 +08:00
Cell e11caf7a59 🔥 Feat: removed Renren, Digg and StumbleUpon in sharer.js 0.5.0 2023-10-24 12:15:32 +08:00
Cell 496b60cff1 ⬆️ Chore(libs): update lightgallery from 2.6.1 to 2.7.2 2023-10-24 12:15:32 +08:00
Cell b4741cc1a3 ⬆️ Chore(libs): update katex from 0.16.2 to 0.16.9 2023-10-24 12:15:32 +08:00
Cell b58fddda9c ⬆️ Chore(libs): update instant.page from 5.1.1 to 5.2.0 2023-10-24 12:15:32 +08:00
Cell 5c043e2c0f ⬆️ Chore(libs): update fontawesome-free from 6.2.0 to 6.4.2 2023-10-24 12:15:32 +08:00
Cell 98c5a1ad54 ⬆️ Chore(libs): update Artalk from 2.5.2 to 2.6.4
Artalk v2.5.5 has deprecated the gravatar.default configuration item, please use gravatar.params instead. (ArtalkJS/Artalk#508)

TODO: support pagination and heightLimit config for Artalk in next FixIt version
2023-10-24 12:15:32 +08:00
Cell 23626dd604 ⬆️ Chore(libs): update algoliasearch from 4.14.2 to 4.20.0 2023-10-24 12:15:32 +08:00
Cell deed146884 ⬆️ Chore(deps-dev): update and pin all development dependency versions
Close #339 #340 #341 #342
2023-10-24 12:15:32 +08:00
Cell 9b47648aa5 Feat: change post nav rule at post footer
replace .PrevInSection/.NextInSection with .Prev/.Next
2023-10-12 20:15:19 +08:00
Cell a25331bca3 🐛 Fix: total word count error in section
(cherry picked from commit 8bb2a35dcc)
2023-10-10 15:09:53 +08:00
Cell 8bb2a35dcc 🐛 Fix: total word count error in section 2023-10-10 15:08:32 +08:00
Cell 608693c962 💄 Style: update footnote and footnote-ref style 2023-10-09 18:07:46 +08:00
Cell 5df739e5dc 💄 Style: update define list style 2023-10-09 18:05:49 +08:00
Cell 8611f00cf4 💄 Style: update footnote and footnote-ref style 2023-10-09 18:00:26 +08:00
Cell 7fa16bbf66 💄 Style: update define list style 2023-10-09 12:27:07 +08:00
Cell 88ec3aad5b 📝 Docs: update docs and version 2023-09-16 21:30:20 +08:00
github-actions[bot] aff8b7f2c9 👥 Chore(contributor): contrib-readme-action has updated contributors.md 2023-09-03 12:50:44 +08:00
Stefano Ginobili 2956b9927c 🐛 Fix: use dateFormat function to render localized dates
Co-authored-by: Stefano Ginobili <stefano.ginobili@gmail.com>
Co-authored-by: Cell <1024@lruihao.cn>
(cherry picked from commit 78416fa920)
2023-09-03 12:50:43 +08:00
Stefano Ginobili 78416fa920 🐛 Fix: use dateFormat function to render localized dates
Co-authored-by: Stefano Ginobili <stefano.ginobili@gmail.com>
Co-authored-by: Cell <1024@lruihao.cn>
2023-09-03 12:44:50 +08:00
Cell 3443e0745b 📝 Docs: update docs 2023-07-30 16:18:45 +08:00
Cell 1b359b7f14 Feat: add code block attributes support (#330)
(cherry picked from commit 6df8f283f2)
2023-06-19 11:32:10 +08:00
Cell 6df8f283f2 Feat: add code block attributes support (#330) 2023-06-11 18:43:08 +08:00
Cell 38043616ef 🔥 Feat: remove lunr search engine 2023-04-28 15:17:11 +08:00
Cell d7a25beafa Chore: remove @babel/* and core-js 2023-04-10 10:15:56 +08:00
Cell d64a6210f2 ♻️ Refactor: process theme.js with ESBuild
https://gohugo.io/hugo-pipes/js/
2023-03-31 22:44:40 +08:00
790 changed files with 6495 additions and 30084 deletions
-12
View File
@@ -1,12 +0,0 @@
{
"comments": false,
"minified": true,
"presets": [
[
"@babel/preset-env",
{
"targets": "> 0.25%, not dead"
}
]
]
}
+1
View File
@@ -0,0 +1 @@
assets/lib/**/* linguist-vendored
-3
View File
@@ -1,3 +0,0 @@
custom: [
"https://paypal.me/Lruihao"
]
+2 -6
View File
@@ -1,13 +1,9 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: Questions 问题讨论
url: https://github.com/hugo-fixit/FixIt/discussions/new
about: Please ask questions in Discussion. 请在讨论中提问。
- name: 官方 QQ 群
url: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
about: '加入 FixIt 主题交流群: 814031017'
- name: Theme Documentation 主题文档
url: https://fixit.lruihao.cn/categories/documentation/
url: https://fixit.lruihao.cn/documentation/
about: Please read the documentation carefully. 请先仔细阅读主题文档。
-48
View File
@@ -1,48 +0,0 @@
name: Update Algolia Search Index
on:
push:
branches:
- master
paths:
- "docs"
workflow_dispatch:
jobs:
algolia-atomic:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build
run: |
npm install
npm run build
- name: Update Algolia Index (en)
env:
ALGOLIA_APP_ID: YKOM6PKLUY
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_INDEX_NAME: "index.en"
ALGOLIA_INDEX_FILE: "./docs/public/index.json"
run: |
npm run algolia
- name: Update Algolia Index (zh-cn)
env:
ALGOLIA_APP_ID: YKOM6PKLUY
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_INDEX_NAME: "index.zh-cn"
ALGOLIA_INDEX_FILE: "./docs/public/zh-cn/index.json"
run: |
npm run algolia
+3 -3
View File
@@ -8,14 +8,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
uses: peaceiris/actions-hugo@v3
with:
hugo-version: latest
extended: true
- name: Build Hugo static files
run: hugo -v --source=docs --gc --minify
run: hugo -v --source=demo --gc --minify
+4 -4
View File
@@ -36,14 +36,14 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/configs/codeql.yml
@@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -69,4 +69,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
-27
View File
@@ -1,27 +0,0 @@
name: Generate Contribute List
on:
push:
branches:
- master
workflow_dispatch:
jobs:
contrib-readme-job:
runs-on: ubuntu-latest
name: A job to automate contribute list in contributors.md file
steps:
- name: First Contribution Check
id: first-check
uses: sukki37/first-contribution-check-action@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }}
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@master
if: ${{ steps.first-check.outputs.isNewContributor == 'true' }}
with:
readme_path: "contributors.md"
image_size: 100
commit_message: ":busts_in_silhouette: Chore(contributor): contrib-readme-action has updated contributors.md"
committer_username: "github-actions[bot]"
committer_email: "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }}
+45
View File
@@ -0,0 +1,45 @@
# This is a basic workflow to help you get started with Actions
name: Release for new tag
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- 'v*.*.*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for generating release notes
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies and generate release notes
run: |
npm install
npm run release -- --starting-version ${{ github.ref_name }}
- name: GitHub Release
uses: softprops/action-gh-release@v2
with:
# Creates a draft release. Defaults to false
draft: true
body_path: CHANGELOG.md
+1 -1
View File
@@ -25,4 +25,4 @@ $RECYCLE.BIN/
## Linux
.directory
CHANGELOG.md
-3
View File
@@ -1,3 +0,0 @@
[submodule "docs"]
path = docs
url = https://github.com/hugo-fixit/docs.git
+1
View File
@@ -0,0 +1 @@
node build/update-version.js --stage commit
-326
View File
@@ -1,326 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
<!-- Releases see https://github.com/hugo-fixit/FixIt/releases -->
## v0.2.18 [2023.3.31]
> **Note**
> This will be the last relatively stable 0.x release, after which the first major release will be incompatible with all previous 0.x releases
> Snapshot: <>
## :boom: Breaking Updates
- Refactor author data config [#288](https://github.com/hugo-fixit/FixIt/pull/288)
## :new: What's New
- :tada: Feat: add natively support mermaid with code fences ([#230](https://github.com/hugo-fixit/FixIt/issues/230))
- :tada: Feat: add breadcrumb navigation ([#309](https://github.com/hugo-fixit/FixIt/pull/309))
- :sparkles: Feat: add instant page (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279))
- :sparkles: Feat: add `force` option value to `params.page.lightgallery`
- :sparkles: Feat: add loop parameter for typeit ([#303](https://github.com/hugo-fixit/FixIt/pull/303))
- :sparkles: Feat: add paramater strict for giscus comment
- :bug: Fix: donate images without lazy loading (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279))
- :bug: Fix: discordinvite typo (@mathieu-gilloots [#282](https://github.com/hugo-fixit/FixIt/pull/282))
- :bug: Fix: missing parameter `requiredFields` for Valine
- :bug: Fix: js.build is executed after fingerprint, resulting in the destruction of js integrity
- :bug: Fix: toc fails when the toc aside is on the left
- :bug: Fix: APlayer invades the click event of the anchor links, resulting in invalid Chinese anchor links scrolling ([#292](https://github.com/hugo-fixit/FixIt/issues/292))
- :bug: Fix: resolve style conflicts between valine and animate.css ([#304](https://github.com/hugo-fixit/FixIt/issues/304))
- :bug: Fix: version `v0.2.17` is not compatible with previous versions
- :bug: Fix: `crypto-js/md5.js` and `crypto-js/sha256.js` cdn path error
- :bug: Fix: HackTheBox social link not in the right format ([#308](https://github.com/hugo-fixit/FixIt/issues/308))
- :recycle: Refactor: image lazy loading ([#283](https://github.com/hugo-fixit/FixIt/pull/283))
- :recycle: Refactor: author's avatar of post or profile ([#288](https://github.com/hugo-fixit/FixIt/pull/288))
- :recycle: Refactor: language switch in desktop header ([#306](https://github.com/hugo-fixit/FixIt/pull/306))
- :recycle: Refactor(reward): add parameter `mode` for post reward and refactor shortcode `reward`
- :wheelchair: Feat: add post update date to post meta ([#285](https://github.com/hugo-fixit/FixIt/issues/285))
- :art: Style: fix `#comments` css style conflict ([#269](https://github.com/hugo-fixit/FixIt/issues/269))
- :art: Style: adjust the mobile header style and fix the bug that scrolling is invalid when there are too many menus on mobile ([#289](https://github.com/hugo-fixit/FixIt/issues/289))
- :art: Perf: optimize the scroll bar style of body and toc-auto elements
- :memo: Docs: refactor the theme documentation
- :wrench: Chore: change the theme minimum supported Hugo versions above **0.109.0**
- :arrow_up: Chore(libs):
- Update Update @waline/client from 2.10.0 to 2.14.7 (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279))
- Update typeit from 8.7.0 to 8.7.1
- Update mermaid from 9.1.7 to 9.4.3
- Update Artalk from 2.3.4 to 2.5.2
- **Full Changelog:** @Lruihao [`v0.2.17...v0.2.18`](https://github.com/hugo-fixit/FixIt/compare/v0.2.17...v0.2.18)
## v0.2.17 [2023.1.29]
> Snapshot: <https://fixit-pcwilecsu-x-cell.vercel.app>
- :tada: Feat: add support for [Fusejs search](https://fusejs.io/) ([#203](https://github.com/hugo-fixit/FixIt/issues/203))
- :sparkles: Feat: add feature post reward support ([#216](https://github.com/hugo-fixit/FixIt/issues/216), @Lruihao[#234](https://github.com/hugo-fixit/FixIt/pull/234))
- :sparkles: Feat: add reward shortcode support ([#216](https://github.com/hugo-fixit/FixIt/issues/216))
- :sparkles: Feat: add TagCloud config support for tags page, see parameter `params.tagcloud` ([#235](https://github.com/hugo-fixit/FixIt/issues/235))
- :sparkles: Feat: add [pace](https://github.com/CodeByZach/pace) support ([#190](https://github.com/hugo-fixit/FixIt/issues/190))
- :sparkles: Feat: add custom templates and parameter `params.customFilePath` support
- :sparkles: Feat: add feature end of post flag support ([#236](https://github.com/hugo-fixit/FixIt/issues/236))
- :sparkles: Feat: refactor parameter `params.footer.siteTime`
- :sparkles: Feat: add params to close wordcount and readingTime in post ([#209](https://github.com/hugo-fixit/FixIt/issues/209))
- :sparkles: Feat: add parameter `params.footer.order` to order footer lines
- :sparkles: Feat: add parameter `params.home.profile.avatarMenu`
- :truck: Feat: migrate parameter `params.autoBookmark` to `params.page.autoBookmark` ([#55](https://github.com/hugo-fixit/FixIt/issues/55))
- :truck: Feat: move `assets/data/emoji` to `assets/lib/valine/emoji/`
- :zap: Perf: optimize close comment feature when the post has expired ([#204](https://github.com/hugo-fixit/FixIt/issues/204))
- :zap: Perf: optimize sub menu position calculation in desktop header with css replace of javascript
- :zap: Perf: enhance pangu spelling correction
- :bug: Fix: remove the leading and trailing whitespace of the code string ([#205](https://github.com/hugo-fixit/FixIt/issues/205))
- :bento: Fix: update webfonts for fontawesome 6.2.0 (@NicoDreamzZ [#228](https://github.com/hugo-fixit/FixIt/pull/228))
- :bug: Fix: image shortcode/plugin lose the support for svg type files ([#210](https://github.com/hugo-fixit/FixIt/issues/210))
- :bug: Fix: can't keep the static table of the contents in front of the post
- :bug: Fix: escape hashtag character `#` in tag and category ([#245](https://github.com/hugo-fixit/FixIt/issues/245))
- :bug: Fix: pangu.js cdn error
- :bug: Fix: sitemap.xml link in robots.txt doesn't point to main sitemap (@Mejituu [#276](https://github.com/hugo-fixit/FixIt/pull/276))
- :recycle: Refactor(i18n): hierarchize translation fields for supported languages
- :globe_with_meridians: Docs(i18n): add missing translations for French + enhancements (@Kapusch [#247](https://github.com/hugo-fixit/FixIt/pull/247))
- :lipstick: Style: refactor css style
- :lipstick: Style: update home page stylesheet
- :arrow_up: Chore(libs):
- Update Twikoo from 1.4.10 to 1.6.8 and add Katex support for it ([#215](https://github.com/hugo-fixit/FixIt/issues/215) [#243](https://github.com/hugo-fixit/FixIt/issues/243))
- :wrench: Chore(deps-dev):
- Bump @babel/cli from 7.18.10 to 7.20.7
- Bump @babel/core from 7.19.1 to 7.20.12
- Bump @babel/preset-env from 7.18.10 to 7.20.2
- Bump core-js from 3.25.2 to 3.27.2
- :wrench: Chore(deps-dev):
- Bump @babel/cli from 7.20.7 to 7.17.10
- Bump @babel/core from 7.20.12 to 7.21.4
- Bump @babel/preset-env from 7.20.2 to 7.21.4
- Bump core-js from 3.27.2 to 3.29.1
- **Full Changelog:** @Lruihao [`v0.2.16...v0.2.17`](https://github.com/hugo-fixit/FixIt/compare/v0.2.16...v0.2.17)
## v0.2.16 [2022.9.24]
> This version fixes several bugs, adds a few new features and SEO optimizations, and refactors part of the project structure and code.
> Snapshot: <https://fixit-jir7e7kzt-x-cell.vercel.app>
- :tada: Feat: add reading progress bar support ([#191](https://github.com/hugo-fixit/FixIt/issues/191))
- :tada: Feat: add b2t scroll percent support ([#192](https://github.com/hugo-fixit/FixIt/issues/192))
- :sparkles: Feat: add auto bookmark support ([#55](https://github.com/hugo-fixit/FixIt/issues/55))
- :sparkles: Feat: add `raw` shortcode
- :sparkles: Feat(menu): add params: `icon`, `type` for menu items
- :sparkles: Feat: add custom aside template in post page ([#172](https://github.com/hugo-fixit/FixIt/issues/172))
- :sparkles: Feat(math): add more block delimiter support for math
- :sparkles: Feat(highlight): add full support for Chroma highlighting languages in the [list](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages)
- :sparkles: Feat: add optional parameter `noreferrer` for the shortcode `link`
- :sparkles: Feat: update echarts theme config
- :sparkles: Feat: add noscript warning banner ([#194](https://github.com/hugo-fixit/FixIt/issues/194))
- :sparkles: Feat: add 12 newly supported social links ([#175](https://github.com/hugo-fixit/FixIt/issues/175) [#197](https://github.com/hugo-fixit/FixIt/issues/197))
- :zap: Perf: remove extra spaces in plugin link
- :wheelchair: Feat(accessibility): use `aria-hidden=true` on icons that AT should ignore
- :recycle: Refactor: image rendering
- :recycle: Refactor: back to top and scroll to comments
- :recycle: Refactor: custom.js rendering and remove `params.customJS` ([#189](https://github.com/hugo-fixit/FixIt/pull/189))
- :recycle: Refactor: scss directory ([#185](https://github.com/hugo-fixit/FixIt/issues/185))
- :recycle: Refactor: plugin script
- :recycle: Refactor: version.template.svg
- :recycle: Refactor: config ([#187](https://github.com/hugo-fixit/FixIt/issues/187))
- :bug: Fix: add function `dos2unix` to unify new lines symbol between Windows and Unix/Mac OS
- :bug: Fix: author display error in post and markdown file
- :bug: Fix: use data attributes or class replace for custom attributes
- :bug: Fix: attribute `media` not allowed on element meta in `[name=theme-color]`
- :bug: Fix: support smooth migration from LoveIt to FixIt ([#174](https://github.com/hugo-fixit/FixIt/discussions/174) [#182](https://github.com/hugo-fixit/FixIt/issues/182))
- :bug: Fix: `center-quote` shortcode rendering error when config `unsafe = false` (@yureiita [#160](https://github.com/hugo-fixit/FixIt/pull/160))
- :bug: Fix: menu item invalid params `draft` in submenu
- :bug: Fix: missing height and weight of img element and lazyload object-fit style
- :bug: Fix: image shortcode invalid params `height` and `weight` ([#200](https://github.com/hugo-fixit/FixIt/issues/200))
- :bug: Fix: typeit shortcode invalid config `duration = -1` and fix style
- :bug: Fix: typeit shortcode prints consecutive spaces and newline errors
- :art: Style: change the default icons of some social links
- :bug: Fix: component `paginator` style error ([#188](https://github.com/hugo-fixit/FixIt/issues/188))
- :lipstick: Style: fix language and theme switch cursor style ([#193](https://github.com/hugo-fixit/FixIt/issues/193))
- :lipstick: Style: change line-break style of code element from `anywhere` to `auto`
- :globe_with_meridians: Docs(i18n): update pt-br, de in i18n
- :mag: Perf(SEO): enhance SEO performance
- :wrench: Chore: modify babel config and optimize theme.js compilation and loading (revert [`65371a1`](https://github.com/hugo-fixit/FixIt/commit/65371a19a40591c3f403f7fde2b7001c3390354d))
- :wrench: Chore: creating new go.mod: module github.com/hugo-fixit/FixIt
- :arrow_up: Chore(libs):
- Update simple-icons from 6.3.0 to 7.12.0
- Update emoji-data from 5.0.1 to 14.0.0
- Update mermaid from 9.1.3 to 9.1.7
- Update typeit from 7.0.4 to 8.7.0
- Update lightgallery from 1.4.0 to 2.6.1
- Update Valine from 1.5.0 to 1.5.1
- Update @waline/client from 2.6.1 to 2.10.0
- Update mapbox-gl from 2.8.2 to 2.10.0
- Update fontawesome-free from 6.1.1 to 6.2.0
- Update katex from 0.15.3 to 0.16.2
- Update echarts from 5.2.2 to 5.3.3
- Update algoliasearch from 4.13.0 to 4.14.2
- :wrench: Chore(deps-dev):
- Remove dependencies: minimist, babel-preset-minify
- Bump core-js from 3.24.1 to 3.25.2 (@dependabot [#201](https://github.com/hugo-fixit/FixIt/pull/201))
- Bump @babel/core from 7.18.10 to 7.19.1 (@dependabot [#202](https://github.com/hugo-fixit/FixIt/pull/202))
- **Full Changelog:** @Lruihao [`v0.2.15...v0.2.16`](https://github.com/hugo-fixit/FixIt/compare/v0.2.15...v0.2.16)
## v0.2.15 [2022.8.4]
> Add content encryption feature(pages, partial), total word count, enhance auto toc, developer options and more.
> Snapshot: <https://fixit-hvd1rg4ba-x-cell.vercel.app>
- :truck: Feat: ransfer repository from Lruihao to hugo-fixit
- :tada: Feat: add content encryption of pages ([#123](https://github.com/hugo-fixit/FixIt/issues/123))
- :tada: Feat: add `fixit-encryptor` shortcode ([#123](https://github.com/hugo-fixit/FixIt/issues/123))
- :sparkles: Feat: add total word count feature in section and remove from footer ([#124](https://github.com/hugo-fixit/FixIt/issues/124))
- :sparkles: Feat: enhance auto toc feature ([#104](https://github.com/hugo-fixit/FixIt/issues/104) [#136](https://github.com/hugo-fixit/FixIt/issues/136))
- :sparkles: Feat: add repost feature ([#156](https://github.com/hugo-fixit/FixIt/issues/156))
- :sparkles: Feat: add developer options
- Check for updates option
- Mobile Devtools config ([#163](https://github.com/hugo-fixit/FixIt/pull/163))
- :bug: Fix: unable to show search bar of header at mobile mode ([#143](https://github.com/hugo-fixit/FixIt/issues/143))
- :bug: Fix: Giscus comment invalid config `inputPosition`
- :bug: Fix: Waline comment invalid config `imageUploader = false` & `highlighter = false` (@yureiita [#161](https://github.com/hugo-fixit/FixIt/pull/161))
- :bug: Fix: busuanzi logic error
- :bug: Fix: close comment system logic error when the article was expired
- :bug: Style: fix typos for rel attribute value noreferrer (@yureiita [#157](https://github.com/hugo-fixit/FixIt/pull/157))
- :recycle: Refactor: migrate theme js from src to assets by js.build
- :recycle: Refactor: change the post edit url splicing rules
- :mag: Feat(SEO): add options to make output `baidu_urls.txt` file ([#138](https://github.com/hugo-fixit/FixIt/issues/138))
- :truck: Feat: migrate exampleSite to docs submodule
- :art: Style: add theme colors variables and add common color styles
- :art: Style: add scroll bar for auto toc ([#136](https://github.com/hugo-fixit/FixIt/issues/136))
- :art: Style: change the version badge style form flat-square to flat
- :memo: Docs: revise theme documentations
- :heavy_plus_sign: Feat: add theme core configuration settings file
- :wrench: Feat(cdn): add unpkg cdn support
- :wrench: Chore: change the theme minimum supported Hugo versions above **0.84.0**
- :arrow_up: Chore(libs): update some third-party libraries
- Update Artalk from 2.2.12 to 2.3.4 ([#150](https://github.com/hugo-fixit/FixIt/issues/150))
- Update Waline from 1.5.2 to 2.6.1
- Update Valine from 1.4.18 to 1.5.0
- Update mermaid from 8.13.3 to 9.1.3
- :arrow_up: Chore(deps-dev):
- Bump babel-preset-minify from 0.5.1 to 0.5.2 ([#145](https://github.com/hugo-fixit/FixIt/pull/145))
- Bump core-js from 3.22.0 to 3.24.1 ([#168](https://github.com/hugo-fixit/FixIt/pull/168))
- Bump @babel/preset-env from 7.16.11 to 7.18.10 ([#169](https://github.com/hugo-fixit/FixIt/pull/169))
- Bump @babel/cli from 7.17.6 to 7.18.10 ([#170](https://github.com/hugo-fixit/FixIt/pull/170))
- Bump @babel/core from 7.17.9 to 7.18.10 ([#171](https://github.com/hugo-fixit/FixIt/pull/171))
- **Full Changelog:** @Lruihao [`v0.2.14...v0.2.15`](https://github.com/hugo-fixit/FixIt/compare/v0.2.14...v0.2.15)
## v0.2.14 [2022.5.15]
> Add hugo new features support.
> Snapshot: <https://fixit-p1tg6tsml-lruihao.vercel.app>
- :recycle: Refactor: header layout
- :tada: Feat: add sub menu (nested menu) support ([#31](https://github.com/hugo-fixit/FixIt/issues/31))
- :sparkles: Feat: add user-defined content to menu items via the `params` field ([#99](https://github.com/hugo-fixit/FixIt/issues/99))
- :sparkles: Feat: modified language selector to submenu (@pandaoh [`eced169`](https://github.com/hugo-fixit/FixIt/commit/eced169713ce4a0208ce70ab556824e47eb671d5), @Lruihao [#31](https://github.com/hugo-fixit/FixIt/issues/31))
- :bug: Fix: add "no more translations" judgment logic ([#100](https://github.com/hugo-fixit/FixIt/issues/100))
- :bug: Fix: fix some header css bug ([#31](https://github.com/hugo-fixit/FixIt/issues/31))
- :sparkles: Feat: enhance link render ([#96](https://github.com/hugo-fixit/FixIt/issues/96))
- Add external icon for external links automatically
- Add download icon for downloadable links
- :sparkles: Feat: add giscus comment system ([#130](https://github.com/hugo-fixit/FixIt/issues/130))
- :sparkles: Feat: link shortcode add `external-icon` option ([#96](https://github.com/hugo-fixit/FixIt/issues/96))
- :sparkles: Feat: add GitHub Corners support ([#106](https://github.com/hugo-fixit/FixIt/issues/106))
- :sparkles: Feat: add local avatar and gravatar support for post author ([#125](https://github.com/hugo-fixit/FixIt/issues/125))
- :sparkles: Feat: add ~~total word count support in footer~~ ([#124](https://github.com/hugo-fixit/FixIt/issues/124))
- :sparkles: Feat: add "Edit this page" button support ([#103](https://github.com/hugo-fixit/FixIt/issues/103))
- :sparkles: Feat: add count badge for taxonomy ([#122](https://github.com/hugo-fixit/FixIt/issues/122))
- :zap: Perf: add Gravatar config support
- :bug: Fix: invalid front matter `comment: true` ([#108](https://github.com/hugo-fixit/FixIt/issues/108))
- :bug: Fix: ibruce and watermark option negative value error ([#114](https://github.com/hugo-fixit/FixIt/issues/114))
- :truck: Feat: *migrate ~~`home.profile.gravatarSite`~~ to `gravatar.host`*
- :truck: Feat: *migrate ~~`ibruce.siteTime`~~ to `footer.siteTime`*
- :lipstick: Style: add some common CSS styles Class ([#101](https://github.com/hugo-fixit/FixIt/issues/101))
- :lipstick: Style: add the gap between and icon and text at blending typesetting (@ctj12461 @Lruihao [#118](https://github.com/hugo-fixit/FixIt/pull/118))
- :lipstick: Style: modify blockquote CSS
- :memo: Docs: revise theme documentations
- :zap: Perf: remove third-party library clipboard.js ([#84](https://github.com/hugo-fixit/FixIt/issues/84))
- :pencil2: Docs: fix highlight url typo in `theme-documentation-built-in-shortcodes` (@d-baer [#85](https://github.com/hugo-fixit/FixIt/pull/85))
- :wrench: Chore(i18n): improve translations for the supported languages ([#119](https://github.com/hugo-fixit/FixIt/issues/119))
- :wrench: Chore(i18n): add i18n support for console messages
- :wrench: Chore: add deprecated parameter detection in cli
- :arrow_up: Chore: update some third-party libraries
- :wrench: Chore(deps-dev):
- Bump minimist from 1.2.5 to 1.2.6 ([#92](https://github.com/hugo-fixit/FixIt/pull/92))
- Bump @babel/core from 7.17.5 to 7.17.10 ([#126](https://github.com/hugo-fixit/FixIt/pull/126))
- Bump core-js from 3.21.1 to 3.22.5 ([#129](https://github.com/hugo-fixit/FixIt/pull/129))
- Bump @babel/cli from 7.17.6 to 7.17.10 ([#127](https://github.com/hugo-fixit/FixIt/pull/127))
- Bump @babel/preset-env from 7.16.11 to 7.17.10 ([`bc74d14`](https://github.com/hugo-fixit/FixIt/commit/bc74d149c16b36644fecdd5bef325bf8087f8593))
- **Full Changelog:** @Lruihao [`v0.2.13...v0.2.14`](https://github.com/hugo-fixit/FixIt/compare/v0.2.13...v0.2.14)
## v0.2.13 [2022.3.14]
> Improve and add some new features.
> Snapshot: <https://fixit-bbh5g5x90-lruihao.vercel.app>
- :recycle: Refactor: page layout ([#65](https://github.com/hugo-fixit/FixIt/issues/65))
- :tada: Feat: add Artalk comment support ([#54](https://github.com/hugo-fixit/FixIt/issues/54), @hiifong [#57](https://github.com/hugo-fixit/FixIt/pull/57))
- :tada: Feat: add Waline comment support ([#36](https://github.com/hugo-fixit/FixIt/issues/36))
- :tada: Feat: add Twikoo comment support ([#64](https://github.com/hugo-fixit/FixIt/issues/64))
- :sparkles: Feat: add recently updated section ([#50](https://github.com/hugo-fixit/FixIt/issues/50))
- :sparkles: Feat: add article expiration reminder support ([#51](https://github.com/hugo-fixit/FixIt/issues/51))
- :sparkles: Feat: add pageStyle option ([#62](https://github.com/hugo-fixit/FixIt/issues/62))
- :sparkles: Style: add media style for print view ([#61](https://github.com/hugo-fixit/FixIt/issues/61))
- :sparkles: Feat: add Gravatar mirror site support (@ctj12461 [#66](https://github.com/hugo-fixit/FixIt/pull/66))
- :sparkles: Feat: add archive count display ([#33](https://github.com/hugo-fixit/FixIt/issues/33))
- :sparkles: Feat: add `details` shortcode ([#68](https://github.com/hugo-fixit/FixIt/issues/68))
- :sparkles: Feat: add `center-quote` shortcode ([#69](https://github.com/hugo-fixit/FixIt/issues/69))
- :sparkles: Feat: add markdown support for **title** parameter of the admonition shortcode
- :sparkles: Feat: add 9 newly supported social links ([#17](https://github.com/hugo-fixit/FixIt/issues/17))
- :zap: Perf: enhance highlight feature (GitHub syntax supported) and fix some css bugs ([#43](https://github.com/hugo-fixit/FixIt/issues/43))
- Inline Code
- Indented Code
- Block Fenced Code
- gist shortcode
- :sparkles: Feat: add `params.page.code.edit` option support ([#76](https://github.com/hugo-fixit/FixIt/issues/76))
- :mag: Feat: add 360 and sougou seo support
- :bug: Fix: remove source map of local libraries to avoid 404 error ([#67](https://github.com/hugo-fixit/FixIt/issues/67))
- :fire: Feat: remove shortcode cardlink ([#42](https://github.com/hugo-fixit/FixIt/issues/42))
- :lipstick: Style: more refined theme style ([#40](https://github.com/hugo-fixit/FixIt/issues/40))
- :pencil2: Style: fix typo *discription* should be **description** ([#60](https://github.com/hugo-fixit/FixIt/issues/60))
- :wrench: Chore(update-libs):
- Update cell-watermark 1.0.3 and CDN support (fontFamily supported)
- Update animate.css 3.7.2 -> 4.1.1 ([#74](https://github.com/hugo-fixit/FixIt/issues/74))
- :wrench: Chore: add atomic-algolia for exampleSite ([#70](https://github.com/hugo-fixit/FixIt/issues/70))
- **Full Changelog:** @Lruihao [`v0.2.12...v0.2.13`](https://github.com/hugo-fixit/FixIt/compare/v0.2.12...v0.2.13)
## v0.2.12 [2022-1-27]
> Fix most known bugs and add some new features.
> Snapshot: <https://fixit-e9lpwfkbp-lruihao.vercel.app>
- :tada: Feat: add PWA support
- :tada: Feat: add Watermark support ([#16](https://github.com/hugo-fixit/FixIt/issues/16))
- :tada: Feat: add "不蒜子" count and site run time ([#18](https://github.com/hugo-fixit/FixIt/issues/18))
- :sparkles: Feat: add pangu.js support ([#20](https://github.com/hugo-fixit/FixIt/issues/20))
- :sparkles: Feat: add public network security config (only in China) ([#15](https://github.com/hugo-fixit/FixIt/issues/15))
- :sparkles: Feat: add CustomJS option ([#24](https://github.com/hugo-fixit/FixIt/issues/24))
- :sparkles: Feat: add theme embedded archeTypes
- :mag: Feat(SEO): optimize SEO meta ([#30](https://github.com/hugo-fixit/FixIt/issues/30))
- :zap: Feat: remove lib smooth-scroll ([#1](https://github.com/hugo-fixit/FixIt/issues/1)) replaced by CSS native properties scroll-margin, scroll-behavior ([#39](https://github.com/hugo-fixit/FixIt/issues/39))
- :zap: Perf: merge shortcode cardlink (deprecated v0.2.13) into shortcode link and add 'download' param ([#42](https://github.com/hugo-fixit/FixIt/issues/42))
- :zap: Perf: optimize JS loading ([#25](https://github.com/hugo-fixit/FixIt/issues/25))
- :recycle: Refactor: header title DOM and add subtitle option ([#26](https://github.com/hugo-fixit/FixIt/issues/26))
- :bug: Fix: set mermaid theme as 'default' when initialization ([#38](https://github.com/hugo-fixit/FixIt/issues/38))
- :bug: Fix: typeit print code error ([#19](https://github.com/hugo-fixit/FixIt/issues/19))
- :bug: Fix: pre element overflow error ([#29](https://github.com/hugo-fixit/FixIt/issues/29))
- :bug: Fix: toc display error without content header ([#21](https://github.com/hugo-fixit/FixIt/issues/21))
- :lipstick: Style: style detail adjustments, change scroll-behavior to smooth, taxonomy, header, footer, shortcode style etc.
- :pencil: Docs: improve demo site documentation ([#37](https://github.com/hugo-fixit/FixIt/issues/37))
- :wrench: Chore: add commands `fixit_checker.sh`
- :wrench: Chore(i18n): change some translations
- :arrow_up: Chore: update all third-party libraries
- **Full Changelog:** @Lruihao [`v0.2.11...v0.2.12`](https://github.com/hugo-fixit/FixIt/compare/v0.2.11...v0.2.12)
## v0.2.11 [2021-12-19]
> :tada: The beginning of FixIt to fix the theme LoveIt.
- :sparkles: Feat: add cardlink shortcode ([Lruihao/hugo-blog@`df9eca2`](https://github.com/Lruihao/hugo-blog/commit/df9eca26af43287748fd8d4654014357a8269b0b))
- :tada: Feat: add friends layout template
- :wrench: Chore(i18n): add translations for Traditional Chinese ([Lruihao/hugo-blog@`df9eca2`](https://github.com/Lruihao/hugo-blog/commit/b86157d8b84830bda415ab2488580afd843acac2))
- :bug: Fix: mobile style ([Lruihao/hugo-blog#19](https://github.com/Lruihao/hugo-blog/issues/19))
- :bug: Style: fix content h1 style ([Lruihao/hugo-blog#8](https://github.com/Lruihao/hugo-blog/issues/8))
- :bug: Fix: `.params.author` should be `$params.author` ([Lruihao/hugo-blog#1](https://github.com/Lruihao/hugo-blog/issues/1))
- **Full Changelog:** @Lruihao [`v0.2.10...v0.2.11`](https://github.com/hugo-fixit/FixIt/compare/v0.2.10...v0.2.11)
## v0.2.10 :arrow_down: [2020-5-29 before]
Thanks [dillonzq/LoveIt](https://github.com/dillonzq/LoveIt/releases)
+26 -24
View File
@@ -1,5 +1,7 @@
# CONTRIBUTING
Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.
## How to contribute to this project
First, fork this repository by clicking the fork button.
@@ -7,7 +9,7 @@ First, fork this repository by clicking the fork button.
Next, clone your forked repo.
```bash
git clone --recursive https://github.com/hugo-fixit/FixIt.git && cd FixIt
git clone https://github.com/hugo-fixit/FixIt.git && cd FixIt
```
Then, install the dev dependencies.
@@ -21,19 +23,16 @@ And now you are ready to go!
Here are some useful commands.
```bash
# build theme.js with babel
npm run babel
# build theme.js and then build the static site
npm run build
# run a local debugging server with watch
npm run server
# run a local debugging server with watch in production environment
npm run server:production
# build theme.js and then run a local debugging server
npm run start
# build theme.js and then run a local debugging server in production environment
npm run start:production
```
If you want to do docs-related theme changes, the simplest way is to have both `FixIt` and `fixit-docs` cloned as sibling directories, and then run:
```bash
npm run server:docs
```
Finally, create a new pull request at <https://github.com/hugo-fixit/FixIt/pulls> to submit your contribution 🎉
@@ -46,22 +45,21 @@ Finally, create a new pull request at <https://github.com/hugo-fixit/FixIt/pulls
| :-- | :-- |
| master | _The branch open to the public and release versions_ |
| dev | _The development branch of the next version_ |
| RC branch | _The release candidate branch of the next version, e.g. v0.2.12-RC_ |
| single feature | _The branch to enhancements or fixes_ |
### Merge events
| event | merge |
| :-- | :-- |
| release | **RC branch => master:** `--rebase` |
| release | **dev => master:** `--rebase` |
| PR | **others:master => master:** `--rebase` |
| single feature| **feature branch => RC branch:** `--merge` |
| single feature| **feature branch => dev/master:** `--merge` |
### Commit message
#### Format
`[{emoji} ]{type}[({module})]: {subject within 50 words}[ (#{issue/pull request})]`
`[{emoji} ]{type}[({scope})]: {subject within 50 words}[ (#{issue/pull request})]`
example:
@@ -76,15 +74,19 @@ example:
#### Message
| Emoji | Type | Example | Description (No Ambiguous) |
| :-------------------------------------------- | :------- | :----------------------------------------------------------- | :----------------------------------------------------------- |
| :tada: <br>:sparkles: | Feat | Feat: add {feature} | new feature |
| :truck: | | Feat: adjust/migrate {feature name}, {change details} | For the adjustment feature, it is necessary to describe the current situation (before) and after adjustment (after) |
| :fire: | | Feat: delete {feature name}, {deletion reason} | If the feature is deleted, the reason for deletion must be explained |
| :bug: <br>:construction: <br>:rotating_light: | Fix | Fix: fix {bug description} | Fix known bugs |
| :art: <br>:lipstick: <br>:pencil2: | Style | Style: Typesetting/CSS style {optimizing content} | Changes that do not affect code operation, such as code layout and style change |
| Emoji | Type | Example | Description (No Ambiguous) |
| :-------------------------------------------- | :------- | :----------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------- |
| :tada:<br>:sparkles: | Feat | Feat: add {feature} | new feature |
| :truck: | | Feat: adjust/migrate {feature name}, {change details} | For the adjustment feature, it is necessary to describe the current situation (before) and after adjustment (after) |
| :fire: | | Feat: delete {feature name}, {deletion reason} | If the feature is deleted, the reason for deletion must be explained |
| :bug: <br>:construction: <br>:rotating_light: | Fix | Fix: fix {bug description} | Fix known bugs |
| :art: <br>:lipstick: <br>:pencil2: | Style | Style: Typesetting/CSS style {optimizing content} | Changes that do not affect code operation, such as code layout and style change |
| :recycle: | Refactor | Refactor: override {feature name} | It is neither a new function nor a code change to fix a bug. Simply rewriting the code of a function does not affect the function result |
| :zap: | Perf | Perf: improve performance {function name}, {improve content} | Optimize code performance |
| :rewind: | Revert | Revert: restore version {commit message of restore version} | Restore the version of one commit |
| :pencil: <br>:pencil2: | Docs | Docs: revise comments/update documents | Adjustment of documents and notes |
| :wrench: | Chore | Chore: update plugin version | Changes in the construction process or auxiliary tools |
| :zap: | Perf | Perf: improve performance {function name}, {improve content} | Optimize code performance |
| :rewind: | Revert | Revert: restore version {commit message of restore version} | Restore the version of one commit |
| :pencil:<br>:pencil2: | Docs | Docs: revise comments/update documents | Adjustment of documents and notes |
| :wrench: | Chore | Chore: update plugin version | Changes in the construction process or auxiliary tools |
> [!note]
> The change log is automatically generated based on the commit message.\
> Use `Chore` type or add `(ignore)` scope to ignore including in.
+1 -1
View File
@@ -2,7 +2,7 @@ The MIT License (MIT)
Copyright (c) 2018 LIUZHICHAO.COM
Copyright (c) 2019-2020 DILLONZQ.COM
Copyright (c) 2021-2023 LRUIHAO.CN
Copyright (c) 2021-2024 Lruihao (https://lruihao.cn)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
+183 -183
View File
@@ -1,230 +1,233 @@
# FixIt Theme | Hugo
<!-- markdownlint-disable-file MD033 MD041 -->
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.png)
<div align="center">English | <a href="README.zh-cn.md">简体中文</a></div>
<a title="FixIt website" href="https://fixit.lruihao.cn"><img align="right" alt="FixIt logo" width="70" height="70" src="https://avatars.githubusercontent.com/u/110414864?s=200&v=4"></a>
# FixIt
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.109.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.132.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)
👉 English README | [简体中文说明](README.zh-cn.md)
> «FixIt» is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
> [FixIt](https://github.com/hugo-fixit/FixIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
It is based on the original [LoveIt](https://github.com/dillonzq/LoveIt) Theme, [KeepIt](https://github.com/Fastbyte01/KeepIt) Theme and [LeaveIt](https://github.com/liuzc/LeaveIt) Theme.
It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [KeepIt Theme](https://github.com/Fastbyte01/KeepIt) and [LeaveIt Theme](https://github.com/liuzc/LeaveIt).
## Live Preview
The FixIt theme inherits the excellent features of these themes, and adds new features and optimizations on those basis. Please read [Why Choose FixIt](#why-choose-fixit) to learn more.
<p align="center">
💟 <a href="https://fixit.lruihao.cn">Production</a> | ❇️ <a href="https://pre.fixit.lruihao.cn">Preview</a> | 🚼 <a href="https://demo.fixit.lruihao.cn">Demo</a> | 🆕 <a href="https://hugo-fixit.github.io/hugo-fixit-starter/">Starter</a>
<br>
<br>
More «FixIt» examples <a href="https://fixit.lruihao.cn/showcase/">here</a>.
</p>
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/Apple-Devices-Preview.jpg)
## Documentation
## Getting started
Head to the [Quick Start](https://fixit.lruihao.cn/documentation/getting-started/quick-start/) page for a step-by-step guide on how to create a new website with FixIt.
Head to the [getting started page](http://fixit.lruihao.cn/documentation/getting-started/) or start with a template:
Outline: [Installation](https://fixit.lruihao.cn/documentation/installation/) ➜ [Getting Started](https://fixit.lruihao.cn/documentation/getting-started/) ➜ [Content Management](https://fixit.lruihao.cn/documentation/content-management/) ➜ [Advanced Usage](https://fixit.lruihao.cn/documentation/advanced/)
* [hugo-fixit/hugo-fixit-blog-git](https://github.com/hugo-fixit/hugo-fixit-blog-git)
* [hugo-fixit/hugo-fixit-blog-go](https://github.com/hugo-fixit/hugo-fixit-blog-go)
## Template repository
## [Documentation](https://fixit.lruihao.cn/categories/documentation/)
Click the following links to generate a new repository with template:
Head to this [documentation page](https://fixit.lruihao.cn/documentation/basics/) for a complete guidence to get started with the FixIt theme.
| Template repository | Generate link |
| :----------------------------------------- | :----------------------------: |
| [hugo-fixit/hugo-fixit-starter][starter] | [Click][starter:generate] |
| [hugo-fixit/hugo-fixit-starter1][starter1] | [Click][starter1:generate] |
| [hugo-fixit/docs][docs] | [Click][docs:generate] |
| [Lruihao/hugo-blog][lruihao-blog] | [Click][lruihao-blog:generate] |
Or run [Documentation Site](https://fixit.lruihao.cn) locally, see more details from [Contributing](#contributing).
[starter]: https://github.com/hugo-fixit/hugo-fixit-starter
[starter:generate]: https://github.com/hugo-fixit/hugo-fixit-starter/generate
[starter1]: https://github.com/hugo-fixit/hugo-fixit-starter1
[starter1:generate]: https://github.com/hugo-fixit/hugo-fixit-starter1/generate
[docs]: https://github.com/hugo-fixit/docs
[docs:generate]: https://github.com/hugo-fixit/docs/generate
[lruihao-blog]: https://github.com/Lruihao/hugo-blog
[lruihao-blog:generate]: https://github.com/Lruihao/hugo-blog/generate
In addition, there is the [FixIt wiki](https://github.com/hugo-fixit/FixIt/wiki).
## Migrate from LoveIt
If you are currently using the LoveIt theme (or some other themes), it is very easy to migrate to FixIt.
You can add this repo as a submodule of your site directory. Alternatively, you can install the theme in [other ways](https://fixit.lruihao.cn/documentation/basics/#install-theme).
```bash
git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt
```
And later you can update the submodule in your site directory to the latest commit using this command:
```bash
git submodule update --remote --merge
```
Next, go to the `config.toml` and change the default theme to `FixIt`.
```diff
- theme = "LoveIt"
+ theme = "FixIt"
```
Now the migration is finished and everything is ready 🎉
## Why choose FixIt
The FixIt theme inherits the excellent features of themes such as LoveIt, and adds new features and optimizations on those basis, as detailed in [Features](#features). In addition, the FixIt theme has the following advantages:
* Complete Chinese and English official documentations
* Community support: Theme official website, Discussions and official QQ group
* Continuously and actively update
* Constantly incorporate suggestions and ideas from all sides
* Highly open theme customizable section
In short, if you prefer the design language and freedom of the FixIt theme, and if you like to personalize your own themes as I do, the FixIt theme may be more suitable for you.
## Who used FixIt
To see this theme in action, here are some [live demo sites](https://fixit.lruihao.cn/friends/) which are rendered with **FixIt** theme.
<!-- ## Why choose FixIt -->
## Features
### Performance and SEO
* Optimized for **performance**: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights)
* Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD
* **[Google Analytics](https://analytics.google.com/analytics)** supported
* **[Fathom Analytics](https://usefathom.com/)** supported
* Search engine **verification** supported (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou)
* **CDN** for third-party libraries supported
- Optimized for **performance**: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights)
- Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD
- **[Google Analytics](https://analytics.google.com/analytics)** supported
- **[Fathom Analytics](https://usefathom.com/)** supported
- Search engine **verification** supported (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou)
- **CDN** for third-party libraries supported
### Appearance and Layout
* **Responsive** layout
* **Light/Dark** mode
* Globally consistent **design language**
* **Pagination** supported
* Easy-to-use and self-expanding **table of contents**
* **Multilanguage** supported and i18n ready
* Beautiful **CSS animation**
- **Responsive** layout
- **Light/Dark** mode
- Globally consistent **design language**
- **Pagination** supported
- Easy-to-use and self-expanding **table of contents**
- **Multilanguage** supported and i18n ready
- Beautiful **CSS animation**
### Social and Comment Systems
* **Gravatar** supported by [Gravatar](https://gravatar.com)
* Local **Avatar** supported
* Up to **87** social links supported
* Up to **28** share sites supported
* **Disqus** comment system supported by [Disqus](https://disqus.com)
* **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
* **Valine** comment system supported by [Valine](https://valine.js.org/)
* **Waline** comment system supported by [Waline](https://waline.js.org/)
* **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/)
* **Telegram comments** system supported by [Telegram Comments](https://comments.app/)
* **Commento** comment system supported by [Commento](https://commento.io/)
* **Utterances** comment system supported by [Utterances](https://utteranc.es/)
* **Artalk** comment system supported by [Artalk](https://artalk.js.org/)
* **Twikoo** comment system supported by [Twikoo](https://twikoo.js.org/)
* **giscus** comment system supported by [giscus](https://giscus.app/)
- **Gravatar** supported by [Gravatar](https://gravatar.com)
- Local **Avatar** supported
- Up to **87** social links supported
- Up to **28** share sites supported
- **Disqus** comment system supported by [Disqus](https://disqus.com)
- **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
- **Valine** comment system supported by [Valine](https://valine.js.org/)
- **Waline** comment system supported by [Waline](https://waline.js.org/)
- **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/)
- **Telegram comments** system supported by [Telegram Comments](https://comments.app/)
- **Commento** comment system supported by [Commento](https://commento.io/)
- **Utterances** comment system supported by [Utterances](https://utteranc.es/)
- **Artalk** comment system supported by [Artalk](https://artalk.js.org/)
- **Twikoo** comment system supported by [Twikoo](https://twikoo.js.org/)
- **giscus** comment system supported by [giscus](https://giscus.app/)
### Extended Features
* **PWA (Progressive Web App)** supported
* **Sub Menu** supported
* **Content Encryption** supported (Pages, Partial)
* **Friends** page embedded template
* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/)
* **Twemoji** supported
* Automatically **highlighting** code
* **Copy code** to clipboard with one click
* **Images gallery** supported by [lightgallery](https://github.com/sachinchoolur/lightgallery)
* Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
* Extended Markdown syntax for **ruby annotation**
* Extended Markdown syntax for **fraction**
* **Mathematical formula** supported by [KaTeX](https://katex.org/)
* **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid)
* **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
* **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
* **Bilibili player** shortcode
* Kinds of **admonitions** shortcode
* **Custom style** shortcode
* **Custom script** shortcode
* **Animated typing** supported by [TypeIt](https://typeitjs.com/)
* **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent)
* **Web Watermark** supported by [cell-watermark](https://github.com/Lruihao/watermark)
* **Chinese typesetting** supported by [pangu.js](https://github.com/vinta/pangu.js)
* ...
- **PWA (Progressive Web App)** supported
- **Sub Menu** supported
- **Content Encryption** supported (Pages, Partial)
- **Friends** page embedded template
- **Search** supported by [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/)
- **Twemoji** supported
- Automatically **highlighting** code
- **Copy code** to clipboard with one click
- **Images gallery** supported by [lightgallery](https://github.com/sachinchoolur/lightgallery)
- Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
- Extended Markdown syntax for **ruby annotation**
- Extended Markdown syntax for **fraction**
- **Mathematical formula** supported by [KaTeX](https://katex.org/)
- **Diagrams** code fences extended and shortcode supported by [mermaid](https://github.com/knsv/mermaid)
- **Interactive data visualization** shortcode and code fences extended supported by [ECharts](https://echarts.apache.org/)
- **Timeline** code fences extended and shortcode supported
- **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
- **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
- **Bilibili player** and **Douyin player** shortcode
- Kinds of **admonitions** shortcode
- **Custom style** shortcode
- **Custom script** shortcode
- Open more **custom blocks**
- **Animated typing** supported by [TypeIt](https://typeitjs.com/)
- **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent)
- **Web Watermark** supported by [cell-watermark](https://github.com/Lruihao/watermark)
- **Chinese typesetting** supported by [pangu.js](https://github.com/vinta/pangu.js)
- Options to **cache remote image** locally
- ...
### Theme Components
The FixIt theme balances **simplicity** and **extensibility** with extra [Hugo theme components](https://fixit.lruihao.cn/components/) for customization.
## Multilingual and i18n
FixIt supports the following languages:
* English
* Simplified Chinese
* Traditional Chinese
* French
* Polish
* Brazilian Portuguese
* Italian
* Spanish
* German
* Serbian
* Russian
* Romanian
* Vietnamese
* [Contribute with a new language](https://github.com/hugo-fixit/FixIt/pulls)
- English
- Simplified Chinese
- Traditional Chinese
- French
- Polish
- Brazilian Portuguese
- Italian
- Spanish
- German
- Serbian
- Russian
- Romanian
- Vietnamese
- Hindi
- [Contribute with a new language](https://github.com/hugo-fixit/FixIt/pulls)
[Languages Compatibility](https://fixit.lruihao.cn/documentation/basics/#language-compatibility)
## [Roadmap](https://github.com/hugo-fixit/FixIt/projects/1)
## Community
## [Changelog](/CHANGELOG.md)
All feedback is welcome! Head over to the [discussions][discussions], [Pull requests][pulls] and [issues][issues] tracker.
## Questions, ideas, bugs, pull requests
| Official Community | Description |
| :-------------------------- | :------------------------------ |
| [Discussions][discussions] | GitHub discussion forum |
| [FixIt WeChat group][wx-mp] | Follow and reply "FixIt" to get |
| [FixIt QQ group][qq-group] | QQ group: `814031017` |
| [Hugo FixIt Planet][zsxq] | Paid knowledge Planet |
All feedback is welcome! Head over to the [issues](https://github.com/hugo-fixit/FixIt/issues) or [discussions](https://github.com/hugo-fixit/FixIt/discussions) tracker.
Don't forget to leave a ⭐️ if you like this theme, thanks!
[discussions]: https://github.com/hugo-fixit/FixIt/discussions
[pulls]: https://github.com/hugo-fixit/FixIt/pulls
[issues]: https://github.com/hugo-fixit/FixIt/issues
[qq-group]: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
[zsxq]: https://t.zsxq.com/GgKEW
[wx-mp]: https://lruihao.cn/images/qr-wx-mp.webp
## Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for getting started with the contribution.
We welcome you to join the development of FixIt. Please see [contributing document](CONTRIBUTING.md). 🤗
Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.
Also, we welcome Issue or PR to our [official-components](https://github.com/hugo-fixit).
**When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change**.
## [Contributors](contributors.md)
> [!note]
> When contributing, please first discuss the change you wish to make via a discussion on this repository before making the actual change.
## Acknowledgements
<details open>
Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/contributors) for their support!
<details>
<summary>Thanks to the authors of following resources included in the theme:</summary>
* [normalize.css](https://github.com/necolas/normalize.css)
* [Font Awesome](https://fontawesome.com/)
* [Simple Icons](https://github.com/simple-icons/simple-icons)
* [Animate.css](https://daneden.github.io/animate.css/)
* [autocomplete-js](https://github.com/algolia/autocomplete)
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [Fuse.js](https://fusejs.io/)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [emoji-data](https://github.com/iamcal/emoji-data)
* [lightgallery](https://github.com/sachinchoolur/lightgallery)
* [Sharer.js](https://github.com/ellisonleao/sharer.js)
* [TypeIt](https://typeitjs.com/)
* [KaTeX](https://katex.org/)
* [mermaid](https://github.com/mermaid-js/mermaid)
* [ECharts](https://echarts.apache.org/)
* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* [APlayer](https://github.com/MoePlayer/APlayer)
* [MetingJS](https://github.com/metowolf/MetingJS)
* [Gitalk](https://github.com/gitalk/gitalk)
* [Valine](https://valine.js.org/)
* [cookieconsent](https://github.com/osano/cookieconsent)
* [cell-watermark](https://github.com/Lruihao/watermark)
* [不蒜子](http://busuanzi.ibruce.info/)
* [pangu.js](https://github.com/vinta/pangu.js)
* [Artalk](https://artalk.js.org/)
* [Waline](https://waline.js.org/)
* [Twikoo](https://twikoo.js.org/)
* [github-corners](https://github.com/tholman/github-corners)
* [giscus](https://giscus.app/)
* [crypto-js](https://github.com/brix/crypto-js)
* [vConsole](https://github.com/Tencent/vConsole)
* [eruda](https://github.com/liriliri/eruda)
* [pace](https://github.com/CodeByZach/pace)
- [normalize.css](https://github.com/necolas/normalize.css)
- [Font Awesome](https://fontawesome.com/)
- [Simple Icons](https://github.com/simple-icons/simple-icons)
- [Animate.css](https://daneden.github.io/animate.css/)
- [autocomplete-js](https://github.com/algolia/autocomplete)
- [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
- [Fuse.js](https://fusejs.io/)
- [object-fit-images](https://github.com/fregante/object-fit-images)
- [Twemoji](https://github.com/twitter/twemoji)
- [emoji-data](https://github.com/iamcal/emoji-data)
- [lightgallery](https://github.com/sachinchoolur/lightgallery)
- [Sharer.js](https://github.com/ellisonleao/sharer.js)
- [TypeIt](https://typeitjs.com/)
- [KaTeX](https://katex.org/)
- [mermaid](https://github.com/mermaid-js/mermaid)
- [ECharts](https://echarts.apache.org/)
- [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
- [APlayer](https://github.com/MoePlayer/APlayer)
- [MetingJS](https://github.com/metowolf/MetingJS)
- [Gitalk](https://github.com/gitalk/gitalk)
- [Valine](https://valine.js.org/)
- [cookieconsent](https://github.com/osano/cookieconsent)
- [cell-watermark](https://github.com/Lruihao/watermark)
- [不蒜子](http://busuanzi.ibruce.info/)
- [Vercount](https://github.com/EvanNotFound/vercount)
- [pangu.js](https://github.com/vinta/pangu.js)
- [Artalk](https://artalk.js.org/)
- [Waline](https://waline.js.org/)
- [Twikoo](https://twikoo.js.org/)
- [github-corners](https://github.com/tholman/github-corners)
- [giscus](https://giscus.app/)
- [crypto-js](https://github.com/brix/crypto-js)
- [pace](https://github.com/CodeByZach/pace)
- [xxhash-wasm](https://github.com/jungomi/xxhash-wasm)
</details>
<details open>
<details>
<summary>The FixIt also draws on some features of the following projects, and thanks to their authors as well:</summary>
* [DoIt](https://github.com/HEIGE-PCloud/DoIt)
* [NexT](https://github.com/next-theme/hexo-theme-next)
- [DoIt](https://github.com/HEIGE-PCloud/DoIt)
- [NexT](https://github.com/next-theme/hexo-theme-next)
</details>
@@ -232,17 +235,14 @@ Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contrib
FixIt is licensed under the **MIT** license. Check the [LICENSE file](LICENSE) for details.
## Sponsor
If you enjoy the theme, please consider buying me a coffee ☕️. Thanks!
- [Wechat](images/wechatpay.jpg)
- [Alipay](images/alipay.jpg)
- [PayPal](https://paypal.me/Lruihao)
## Author
[Lruihao](https://github.com/Lruihao "Follow me on GitHub")
## Sponsor
Giving me a Star 🌟 is already the greatest encouragement and support for me.\
If you enjoy the theme, please consider buying me a coffee ☕️.
* [PayPal](https://paypal.me/Lruihao)
* [Alipay](images/alipay.jpg)
* [Wechat](images/wechatpay.jpg)
Thanks! ❤️
+188 -188
View File
@@ -1,252 +1,252 @@
# FixIt 主题 | Hugo
<!-- markdownlint-disable-file MD033 MD041 -->
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.png)
<div align="center"><a href="README.md">English</a> | 简体中文</div>
<a title="FixIt 官网" href="https://fixit.lruihao.cn/zh-cn/"><img align="right" alt="FixIt logo" width="70" height="70" src="https://avatars.githubusercontent.com/u/110414864?s=200&v=4"></a>
# FixIt
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.109.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.132.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)
👉 [English README](README.md) | 简体中文说明
> «FixIt» 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
> [FixIt](https://github.com/hugo-fixit/FixIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
它的原型基于 [LoveIt](https://github.com/dillonzq/LoveIt) 主题,[KeepIt](https://github.com/Fastbyte01/KeepIt) 主题和 [LeaveIt](https://github.com/liuzc/LeaveIt) 主题。
它的原型基于 [LoveIt 主题](https://github.com/dillonzq/LoveIt)[KeepIt 主题](https://github.com/Fastbyte01/KeepIt) 和 [LeaveIt 主题](https://github.com/liuzc/LeaveIt)。
## 即时预览
FixIt 主题继承了这些主题的优秀功能,并在此基础上添加了新的功能与优化,请阅读 [为什么选择 FixIt](#为什么选择-FixIt) 来了解更多。
<p align="center">
💟 <a href="https://fixit.lruihao.cn/zh-cn/">Production</a> | ❇️ <a href="https://pre.fixit.lruihao.cn/zh-cn/">Preview</a> | 🚼 <a href="https://demo.fixit.lruihao.cn">Demo</a> | 🆕 <a href="https://hugo-fixit.github.io/hugo-fixit-starter/">Starter</a>
<br>
<br>
更多 «FixIt» 的例子参见 <a href="https://fixit.lruihao.cn/zh-cn/showcase/">这里</a>。
</p>
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/Apple-Devices-Preview.jpg)
## 主题文档
## 快速上手
前往 [快速上手](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/quick-start/) 页面,了解如何使用 FixIt 主题创建一个新网站的详细步骤。
前往 [快速上手页面](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/) 或从一个模板直接开始:
大纲:[安装篇](https://fixit.lruihao.cn/zh-cn/documentation/installation/) ➜ [入门篇](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/) ➜ [内容管理](https://fixit.lruihao.cn/zh-cn/documentation/content-management/) ➜ [进阶篇](https://fixit.lruihao.cn/zh-cn/documentation/advanced/)
* [hugo-fixit/hugo-fixit-blog-git](https://github.com/hugo-fixit/hugo-fixit-blog-git)
* [hugo-fixit/hugo-fixit-blog-go](https://github.com/hugo-fixit/hugo-fixit-blog-go)
## 模板仓库
## [完整文档](https://fixit.lruihao.cn/zh-cn/categories/documentation/)
点击以下链接使用模板生成一个新的仓库:
前往这篇 [文档](https://fixit.lruihao.cn/zh-cn/documentation/basics/),阅读关于安装与使用的详细指南。
| 模板仓库 | 生成链接 |
| :----------------------------------------- | :-------------------------------: |
| [hugo-fixit/hugo-fixit-starter][starter] | [点击生成][starter:generate] |
| [hugo-fixit/hugo-fixit-starter1][starter1] | [点击生成][starter1:generate] |
| [hugo-fixit/docs][docs] | [点击生成][docs:generate] |
| [Lruihao/hugo-blog][lruihao-blog] | [点击生成][lruihao-blog:generate] |
或者在本地运行 [文档站点](https://fixit.lruihao.cn/zh-cn/),更多细节详见 [参与贡献](#参与贡献)。
[starter]: https://github.com/hugo-fixit/hugo-fixit-starter
[starter:generate]: https://github.com/hugo-fixit/hugo-fixit-starter/generate
[starter1]: https://github.com/hugo-fixit/hugo-fixit-starter1
[starter1:generate]: https://github.com/hugo-fixit/hugo-fixit-starter1/generate
[docs]: https://github.com/hugo-fixit/docs
[docs:generate]: https://github.com/hugo-fixit/docs/generate
[lruihao-blog]: https://github.com/Lruihao/hugo-blog
[lruihao-blog:generate]: https://github.com/Lruihao/hugo-blog/generate
除此之外,还有 [FixIt 主题维基](https://github.com/hugo-fixit/FixIt/wiki)。
## 从 LoveIt 迁移
如果你现在正在使用 LoveIt 主题(或者一些其他的主题),你可以很容易地迁移至 FixIt。
你可以将这个主题仓库添加为你的网站目录的子模块。或者,您可以通过 [其他方式](https://fixit.lruihao.cn/zh-cn/documentation/basics/#install-theme) 安装主题。
```bash
git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt
```
之后,你可以在站点目录通过这条命令来将主题更新至最新版本:
```bash
git submodule update --remote --merge
```
接着,前往 `config.toml` 并将默认主题更改为 `FixIt`
```diff
- theme = "LoveIt"
+ theme = "FixIt"
```
这样就完成了迁移工作,现在一切准备就绪 🎉
## 为什么选择 FixIt
FixIt 主题继承了 LoveIt 等主题的优秀功能,并在它们的基础上添加了新的功能与优化,详见 [特性](#特性)。除此之外,FixIt 主题还有以下优点:
* 完善的中英文官方文档
* 社区支持:主题官网、Discussions 和官方 QQ 群
* 持续积极地更新
* 不断收纳各方的建议和想法
* 高度开放主题可自定义部分
总之,如果你更偏好 FixIt 主题的设计语言和自由度,如果你和我一样喜欢个性化自定义主题,那么,FixIt 主题可能是更适合你。
## 谁在用 FixIt
为了直观地浏览主题特性,这里有一些基于 **FixIt** 主题渲染的 [预览网站](https://fixit.lruihao.cn/zh-cn/friends/)。
<!-- ## 为什么选择 FixIt -->
## 特性
### 性能和 SEO
* **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, 99/100 的移动设备得分和 100/100 的桌面设备得分
* 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化
* 支持 **[Google Analytics](https://analytics.google.com/analytics)**
* 支持 **[Fathom Analytics](https://usefathom.com/)**
* 支持搜索引擎的**网站验证** (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou)
* 支持所有第三方库的 **CDN**
- **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中,99/100 的移动设备得分和 100/100 的桌面设备得分
- 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化
- 支持 **[Google Analytics](https://analytics.google.com/analytics)**
- 支持 **[Fathom Analytics](https://usefathom.com/)**
- 支持搜索引擎的**网站验证** (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou)
- 支持所有第三方库的 **CDN**
### 外观和布局
* **响应式**布局
* **浅色/深色** 主题模式
* 全局一致的**设计语言**
* 支持**分页**
* 易用和自动展开的**文章目录**
* 支持**多语言**和国际化
* 美观的 **CSS 动画**
- **响应式**布局
- **浅色/深色** 主题模式
- 全局一致的**设计语言**
- 支持**分页**
- 易用和自动展开的**文章目录**
- 支持**多语言**和国际化
- 美观的 **CSS 动画**
### 社交和评论系统
* 支持 **[Gravatar](https://gravatar.com)** 头像
* 支持本地**头像**
* 支持多达 **87** 种社交链接
* 支持多达 **28** 种网站分享
* 支持 **[Disqus](https://disqus.com)** 评论系统
* 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
* 支持 **[Valine](https://valine.js.org/)** 评论系统
* 支持 **[Waline](https://waline.js.org/)** 评论系统
* 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统
* 支持 **[Telegram comments](https://comments.app/) 评论**系统
* 支持 **[Commento](https://commento.io/)** 评论系统
* 支持 **[Utterances](https://utteranc.es/)** 评论系统
* 支持 **[Artalk](https://artalk.js.org/)** 评论系统
* 支持 **[Twikoo](https://twikoo.js.org/)** 评论系统
* 支持 **[giscus](https://giscus.app/zh-CN/)** 评论系统
- 支持 **[Gravatar](https://gravatar.com)** 头像
- 支持本地**头像**
- 支持多达 **87** 种社交链接
- 支持多达 **28** 种网站分享
- 支持 **[Disqus](https://disqus.com)** 评论系统
- 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统
- 支持 **[Valine](https://valine.js.org/)** 评论系统
- 支持 **[Waline](https://waline.js.org/)** 评论系统
- 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统
- 支持 **[Telegram comments](https://comments.app/) 评论**系统
- 支持 **[Commento](https://commento.io/)** 评论系统
- 支持 **[Utterances](https://utteranc.es/)** 评论系统
- 支持 **[Artalk](https://artalk.js.org/)** 评论系统
- 支持 **[Twikoo](https://twikoo.js.org/)** 评论系统
- 支持 **[giscus](https://giscus.app/zh-CN/)** 评论系统
### 扩展功能
* 支持**渐进式网页应用**
* 支持**二级菜单**
* 支持**内容加密**(页面、局部)
* 支持**友情链接**的页面模板
* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索**
* 支持 **Twemoji**
* 支持**代码高亮**
* 一键**复制代码**到剪贴板
* 支持基于 [lightgallery](https://github.com/sachinchoolur/lightgallery) 的**图片画廊**
* 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法
* 支持**上标注释**的扩展 Markdown 语法
* 支持**分数**的扩展 Markdown 语法
* 支持基于 [KaTeX](https://katex.org/) 的**数学公式**
* 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode
* 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode
* 支持基于 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 的 **Mapbox** shortcode
* 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode
* 支持 **Bilibili 视频** shortcode
* 支持多种**注释**的 shortcode
* 支持**自定义样式**的 shortcode
* 支持**自定义脚本**的 shortcode
* 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode
* 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅**
* 支持基于 [cell-watermark](https://github.com/Lruihao/watermark) 的**网页水印**
* 支持基于 [pangu.js](https://github.com/vinta/pangu.js) 的**中文排版**
* ……
- 支持**渐进式网页应用**
- 支持**二级菜单**
- 支持**内容加密**(页面、局部)
- 支持**友情链接**的页面模板
- 支持基于 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索**
- 支持 **Twemoji**
- 支持**代码高亮**
- 一键**复制代码**到剪贴板
- 支持基于 [lightgallery](https://github.com/sachinchoolur/lightgallery) 的**图片画廊**
- 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法
- 支持**上标注释**的扩展 Markdown 语法
- 支持**分数**的扩展 Markdown 语法
- 支持基于 [KaTeX](https://katex.org/) 的**数学公式**
- 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** 代码块扩展语法和 shortcode
- 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** 代码块扩展语法和 shortcode
- 支持 **Timeline** 的代码块扩展语法和 shortcode
- 支持基于 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 的 **Mapbox** shortcode
- 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode
- 支持 **Bilibili 视频****抖音视频** shortcode
- 支持多种**注释**的 shortcode
- 支持**自定义样式**的 shortcode
- 支持**自定义脚本** shortcode
- 支持**自定义模板块**
- 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode
- 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅**
- 支持基于 [cell-watermark](https://github.com/Lruihao/watermark) 的**网页水印**
- 支持基于 [pangu.js](https://github.com/vinta/pangu.js) 的**中文排版**
- 支持本地**缓存远程图床图片**
- ……
### 主题组件
FixIt 主题旨在在**简洁性**和**可扩展性**之间取得平衡。为此,我们开发了一系列额外的 [Hugo 主题组件](https://fixit.lruihao.cn/zh-cn/components/) 供用户选择。
## 多语言和国际化
FixIt 支持下列语言:
* 英语
* 简体中文
* 繁体中文
* 法语
* 波兰语
* 巴西葡萄牙语
* 意大利语
* 西班牙语
* 德语
* 塞尔维亚语
* 俄语
* 罗马尼亚语
* 越南语
* [贡献一种新的语言](https://github.com/hugo-fixit/FixIt/pulls)
- 英语
- 简体中文
- 繁体中文
- 法语
- 波兰语
- 巴西葡萄牙语
- 意大利语
- 西班牙语
- 德语
- 塞尔维亚语
- 俄语
- 罗马尼亚语
- 越南语
- 印地语
- [贡献一种新的语言](https://github.com/hugo-fixit/FixIt/pulls)
[语言兼容性](https://fixit.lruihao.cn/zh-cn/theme-documentation-basics/#language-compatibility)
## [路线图](https://github.com/hugo-fixit/FixIt/projects/1)
## 镜像
## [更新日志](/CHANGELOG.md)
Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
## 问题、想法、bugs 和 PRs
## 社区支持
所有的反馈都是欢迎的!详见 [议题](https://github.com/hugo-fixit/FixIt/issues) 或者 [讨论](https://github.com/hugo-fixit/FixIt/discussions)
所有的反馈都是欢迎的!详见 [Discussions][discussions]、[Pull requests][pulls] 和 [Issues][issues]
| 官方社区 | 说明 |
| :--------------------------------- | :------------------------------ |
| [Discussions][discussions] | GitHub 讨论区 |
| [FixIt 主题交流群(微信)][wx-mp] | 关注「菠菜眾長」回复“FixIt”获取 |
| [FixIt 主题交流群(QQ][qq-group] | QQ 群:`814031017` |
| [Hugo FixIt 星球][zsxq] | 付费知识星球 |
如果你喜欢这个主题,别忘了留下一颗 ⭐️ 哦,谢谢!
[discussions]: https://github.com/hugo-fixit/FixIt/discussions
[pulls]: https://github.com/hugo-fixit/FixIt/pulls
[issues]: https://github.com/hugo-fixit/FixIt/issues
[qq-group]: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
[zsxq]: https://t.zsxq.com/GgKEW
[wx-mp]: https://lruihao.cn/images/qr-wx-mp.webp
## 参与贡献
请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 以了解贡献该项目的基本信息。
我们欢迎你加入 FixIt 的开发,贡献出你的一份力量。请看开源 [贡献指南](CONTRIBUTING.md)。 🤗
确保在贡献和参与讨论时遵守 [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
你也可以随时向我们的 [官方插件](https://github.com/hugo-fixit) 提交 Issue 或 Pull Request
**贡献时,请先通过此存储库上的问题讨论您希望进行的更改,然后再进行实际更改**
## [所有贡献者](contributors.md)
## 镜像
* Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
> [!note]
> 在贡献时,请先通过此存储库上的讨论来讨论你希望进行的更改,然后再进行实际更改。
## 致谢
<details open>
感谢 [所有贡献者](https://github.com/hugo-fixit/FixIt/graphs/contributors) 的支持!
<details>
<summary>FixIt 主题中用到了以下项目,感谢它们的作者:</summary>
* [normalize.css](https://github.com/necolas/normalize.css)
* [Font Awesome](https://fontawesome.com/)
* [Simple Icons](https://github.com/simple-icons/simple-icons)
* [Animate.css](https://daneden.github.io/animate.css/)
* [autocomplete-js](https://github.com/algolia/autocomplete)
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [Fuse.js](https://fusejs.io/)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [emoji-data](https://github.com/iamcal/emoji-data)
* [lightgallery](https://github.com/sachinchoolur/lightgallery)
* [Sharer.js](https://github.com/ellisonleao/sharer.js)
* [TypeIt](https://typeitjs.com/)
* [KaTeX](https://katex.org/)
* [mermaid](https://github.com/mermaid-js/mermaid)
* [ECharts](https://echarts.apache.org/)
* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* [APlayer](https://github.com/MoePlayer/APlayer)
* [MetingJS](https://github.com/metowolf/MetingJS)
* [Gitalk](https://github.com/gitalk/gitalk)
* [Valine](https://valine.js.org/)
* [cookieconsent](https://github.com/osano/cookieconsent)
* [cell-watermark](https://github.com/Lruihao/watermark)
* [不蒜子](http://busuanzi.ibruce.info/)
* [pangu.js](https://github.com/vinta/pangu.js)
* [Artalk](https://artalk.js.org/)
* [Waline](https://waline.js.org/)
* [Twikoo](https://twikoo.js.org/)
* [github-corners](https://github.com/tholman/github-corners)
* [giscus](https://giscus.app/zh-CN)
* [crypto-js](https://github.com/brix/crypto-js)
* [vConsole](https://github.com/Tencent/vConsole)
* [eruda](https://github.com/liriliri/eruda)
* [pace](https://github.com/CodeByZach/pace)
- [normalize.css](https://github.com/necolas/normalize.css)
- [Font Awesome](https://fontawesome.com/)
- [Simple Icons](https://github.com/simple-icons/simple-icons)
- [Animate.css](https://daneden.github.io/animate.css/)
- [autocomplete-js](https://github.com/algolia/autocomplete)
- [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
- [Fuse.js](https://fusejs.io/)
- [object-fit-images](https://github.com/fregante/object-fit-images)
- [Twemoji](https://github.com/twitter/twemoji)
- [emoji-data](https://github.com/iamcal/emoji-data)
- [lightgallery](https://github.com/sachinchoolur/lightgallery)
- [Sharer.js](https://github.com/ellisonleao/sharer.js)
- [TypeIt](https://typeitjs.com/)
- [KaTeX](https://katex.org/)
- [mermaid](https://github.com/mermaid-js/mermaid)
- [ECharts](https://echarts.apache.org/)
- [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
- [APlayer](https://github.com/MoePlayer/APlayer)
- [MetingJS](https://github.com/metowolf/MetingJS)
- [Gitalk](https://github.com/gitalk/gitalk)
- [Valine](https://valine.js.org/)
- [cookieconsent](https://github.com/osano/cookieconsent)
- [cell-watermark](https://github.com/Lruihao/watermark)
- [不蒜子](http://busuanzi.ibruce.info/)
- [Vercount](https://github.com/EvanNotFound/vercount)
- [pangu.js](https://github.com/vinta/pangu.js)
- [Artalk](https://artalk.js.org/)
- [Waline](https://waline.js.org/)
- [Twikoo](https://twikoo.js.org/)
- [github-corners](https://github.com/tholman/github-corners)
- [giscus](https://giscus.app/zh-CN)
- [crypto-js](https://github.com/brix/crypto-js)
- [pace](https://github.com/CodeByZach/pace)
- [xxhash-wasm](https://github.com/jungomi/xxhash-wasm)
</details>
<details open>
<details>
<summary>FixIt 主题还借鉴了以下项目的部分功能,同样感谢它们的作者:</summary>
* [DoIt](https://github.com/HEIGE-PCloud/DoIt)
* [NexT](https://github.com/next-theme/hexo-theme-next)
- [DoIt](https://github.com/HEIGE-PCloud/DoIt)
- [NexT](https://github.com/next-theme/hexo-theme-next)
</details>
## 许可协议
FixIt 根据 **MIT** 许可协议授权。 更多信息请查看 [LICENSE 文件](LICENSE)。
FixIt 根据 **MIT** 许可协议授权。更多信息请查看 [LICENSE 文件](LICENSE)。
## 赞助支持
如果你喜爱这个主题,请考虑给我买杯咖啡 ☕️,谢谢!
- [微信支付](images/wechatpay.jpg)
- [支付宝](images/alipay.jpg)
- [PayPal](https://paypal.me/Lruihao)
## 作者
[Lruihao](https://github.com/Lruihao "在 GitHub 上关注我")
## 赞助支持
给我一个 Star 🌟 已经是对我最大的鼓励和支持了。\
如果你喜爱这个主题,请考虑给我买杯咖啡 ☕️。
* [PayPal](https://paypal.me/Lruihao)
* [支付宝](images/alipay.jpg)
* [微信支付](images/wechatpay.jpg)
谢谢!❤️
+18
View File
@@ -0,0 +1,18 @@
# Security Policy
## Supported Versions
| Version | Supported |
| :-----------: | :----------------: |
| 0.3.x | :white_check_mark: |
legacy and transitional versions:
| Version | Supported | LoveIt Compatibility |
| :-----------: | :----------------: | :------------------: |
| 0.1.x | :x: | :white_check_mark: |
| 0.2.x | :x: | :white_check_mark: |
## Reporting a Vulnerability
If you want to report a vulnerability, create a new issue at https://github.com/hugo-fixit/FixIt/issues. Any vulnerabilities will be fixed as soon as possible.
+1
View File
@@ -2,6 +2,7 @@
title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
date: {{ .Date }}
slug: {{ substr .File.UniqueID 0 7 }}
description:
keywords:
draft: true
+18 -9
View File
@@ -1,9 +1,9 @@
---
title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
type: friends
layout: friends
date: {{ .Date }}
description: "{{ .Site.Author.name }}'s friends"
description: "{{ .Site.Params.author.name }}'s friends"
keywords:
- 'Hugo FixIt'
- 'friends template'
@@ -11,7 +11,7 @@ keywords:
comment: false
---
<!-- When you set data `friends.yml` in `yourProject/data/` directory, it will be automatically loaded here. -->
<!-- The `friends.yml` file placed in the `yourProject/data/` directory will be loaded automatically here. -->
---
@@ -19,18 +19,27 @@ comment: false
## Base info
```yaml
- nickname: Lruihao
avatar: https://lruihao.cn/images/avatar.jpg
url: https://lruihao.cn
description: Lruihao's Note
```
- avatar: https://lruihao.cn/images/avatar.jpg
- url: https://lruihao.cn
- description: Lruihao's Note
## Friendly Reminder
Comment like this:
````markdown
```yaml
- nickname: <your nickname>
avatar: <your avatar>
url: <your site link>
description: <description of your site>
```
````
{{< admonition info "Notice" true >}}
1. If you want to exchange link, please leave a comment in the above format. (personal non-commercial blogs / websites only)
1. If you want to exchange link, please leave a comment as the above format. (personal non-commercial blogs / websites only)
2. :(fa-solid fa-exclamation-triangle): Website failure, stop maintenance and improper content may be unlinked!
3. Those websites that do not respect other people's labor achievements, reprint without source, or malicious acts, please do not come to exchange.
-9
View File
@@ -1,9 +0,0 @@
---
type: offline
description: '{{ T "offlineTitle" }} - {{ .Site.Title }}'
keywords:
- PWA
- {{ T "offlineTitle" }}
---
<!-- You need do nothing for this page. -->
+6 -1
View File
@@ -2,6 +2,7 @@
title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
date: {{ .Date }}
slug: {{ substr .File.UniqueID 0 7 }}
draft: true
author:
name:
@@ -19,6 +20,8 @@ categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRelated: false
hiddenFromFeed: false
summary:
resources:
- name: featured-image
@@ -37,4 +40,6 @@ repost:
# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
---
<!--more-->
<!--more-->
<!-- Place resource files in the current article directory and reference them using relative paths, like this: `![alt](images/screenshot.jpg)`. -->
+3
View File
@@ -2,6 +2,7 @@
title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
date: {{ .Date }}
slug: {{ substr .File.UniqueID 0 7 }}
draft: true
author:
name:
@@ -19,6 +20,8 @@ categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRelated: false
hiddenFromFeed: false
summary:
resources:
- name: featured-image
+1 -33
View File
@@ -17,21 +17,6 @@ html {
}
}
/* scrollbar, only support webkit */
::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-webkit-scrollbar-thumb {
background-color: $scrollbar-color;
@include border-radius($global-border-radius);
&:hover {
background-color: $scrollbar-hover-color;
}
}
::selection {
background-color: $selection-color;
@@ -43,26 +28,8 @@ html {
body {
background-color: $global-background-color;
color: $global-font-color;
scrollbar-color: auto;
@include overflow-wrap(break-word);
&::-webkit-scrollbar {
width: 0.75rem;
height: 0.75rem;
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
background-clip: content-box;
border: 2px solid transparent;
@include border-radius(0.5rem);
}
&[data-scroll]::-webkit-scrollbar-thumb {
background-color: $scrollbar-color;
}
&[data-theme='dark'] {
color: $global-font-color-dark;
background-color: $global-background-color-dark;
@@ -89,6 +56,7 @@ abbr[title] {
@include link(true, true);
@import '../_partials/scrollbar';
@import '../_partials/mask';
@import '../_partials/img';
@import '../_partials/icon';
+6 -3
View File
@@ -1,9 +1,14 @@
.breadcrumb-container {
padding-inline: 1rem;
font-size: 0.75rem;
background-color: $global-background-color;
@include z-index(1);
@extend .print-d-none;
[data-theme='dark'] & {
background-color: $global-background-color-dark;
}
&.sticky {
position: sticky;
top: $header-height;
@@ -16,12 +21,10 @@
margin: 0 auto;
list-style: none;
border-bottom: 1px inset $global-border-color;
background-color: $global-background-color;
@extend %page-style;
[data-theme='dark'] & {
border-bottom-color: $global-border-color-dark;
background-color: $global-background-color-dark;
}
.breadcrumb-item {
@@ -39,7 +42,7 @@
}
&.active {
@extend .text-secondary;
color: var(--#{$prefix}secondary);
}
}
}
+5 -15
View File
@@ -21,37 +21,27 @@
.d-none {
display: none !important;
}
.d-none-desktop {
display: none;
}
.d-none-mobile {
display: block;
}
.ms-1,
.mx-1 {
margin-left: 0.25rem !important;
margin-left: 0.25em !important;
}
.me-1,
.mx-1 {
margin-right: 0.25rem !important;
margin-right: 0.25em !important;
}
.ps-1,
.px-1 {
padding-left: 0.25rem !important;
padding-left: 0.25em !important;
}
.pe-1,
.px-1 {
padding-right: 0.25rem !important;
padding-right: 0.25em !important;
}
@each $color, $value in $theme-colors {
.text-#{$color} {
color: #{$value} !important;
[data-theme='dark'] & {
color: #{darken($value, 5%)} !important;
}
color: var(--#{$prefix}#{$color}) !important;
}
}
-4
View File
@@ -20,10 +20,6 @@ footer {
margin-right: 0.25rem;
}
.fixit-icon {
top: 0.25em;
}
.animate-icon {
color: #dc143c;
animation: icon-animate 1.33s ease-in-out infinite;
+25 -8
View File
@@ -58,6 +58,17 @@ header {
margin: 0;
padding: 0;
.menu-item-divider {
list-style: none;
margin: 0.25rem 0.5rem;
height: 1px;
background-color: $menu-border-color;
[data-theme='dark'] & {
background-color: $menu-border-color-dark;
}
}
.menu-item {
list-style: none;
@@ -87,6 +98,15 @@ header {
}
}
.menu-link i {
@include transform(perspective(1rem));
@include transition(transform 0.4s ease);
}
.menu-link:hover i {
@include transform(perspective(1rem) translateZ(0.2rem));
}
&.language-switch,
&.theme-switch {
cursor: pointer;
@@ -253,20 +273,20 @@ header {
display: none;
top: calc(#{$header-height} - 0.75rem);
border-radius: $global-border-radius;
border: 1px solid $global-border-color;
border: 1px solid $menu-border-color;
background-color: $header-background-color;
@include transition(box-shadow 0.3s ease);
@include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.1));
[data-theme='dark'] & {
background-color: $header-background-color-dark;
border-color: $global-border-color-dark;
border-color: $menu-border-color-dark;
@include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.1));
}
.menu-item {
height: $header-height*0.5;
line-height: $header-height*0.5;
height: $submenu-height;
line-height: $submenu-height;
max-width: 15rem;
white-space: nowrap;
text-overflow: ellipsis;
@@ -357,14 +377,11 @@ header {
overflow-y: overlay;
max-height: 70vh;
@include box-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1));
@include scrollbar-width(none, 0);
[data-theme='dark'] & {
@include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1));
}
&::-webkit-scrollbar {
width: 0;
}
.search-wrapper {
display: flex;
+9 -9
View File
@@ -10,19 +10,19 @@
aside {
flex: 1;
padding-inline: 0.5rem;
padding: 0.5rem;
&:first-child {
order: 2;
&:not(:has(~ aside)) {
display: none;
}
}
&.container {
display: flex;
align-items: flex-start;
justify-content: center;
padding: 0 1rem;
padding-inline: 1rem;
gap: 0.5rem;
&.container-reverse {
flex-direction: row-reverse;
@@ -35,7 +35,7 @@
}
}
@import "_core/header";
@import "_core/breadcrumb";
@import "_core/footer";
@import "_core/pagination";
@import "_header";
@import "_breadcrumb";
@import "_footer";
@import "_pagination";
+15 -13
View File
@@ -1,9 +1,9 @@
@media only screen and (min-width: 1441px) {
%page-style {
width: 60%;
width: ROUND(60%, 2px);
[data-page-style='wide'] & {
width: 64%;
width: ROUND(64%, 2px);
}
[data-page-style='narrow'] & {
@@ -14,20 +14,20 @@
@media only screen and (max-width: 1440px) {
%page-style {
width: 56%;
width: ROUND(56%, 2px);
[data-page-style='wide'] & {
width: 60%;
width: ROUND(60%, 2px);
}
}
}
@media only screen and (max-width: 1200px) {
%page-style {
width: 52%;
width: ROUND(52%, 2px);
[data-page-style='wide'] & {
width: 56%;
width: ROUND(56%, 2px);
}
}
@@ -42,7 +42,7 @@
@media only screen and (max-width: 960px) {
%page-style {
width: 80% !important;
width: ROUND(80%, 2px) !important;
}
aside {
@@ -58,15 +58,17 @@
}
}
@media only screen and (min-width: 681px) {
.d-none-desktop {
display: none;
}
.breadcrumb-container.sticky {
body:not([data-header-desktop='sticky']) & {
top: 0;
}
// adjust the scroll margin top of the content anchors on the page
body:not([data-header-desktop='auto']) &+.container .content [id] {
scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-offset));
scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-height));
}
}
@@ -80,8 +82,7 @@
display: none;
}
#header-mobile,
.d-none-desktop {
#header-mobile {
display: block;
}
@@ -95,7 +96,7 @@
}
// adjust the scroll margin top of the content anchors on the page
body:not([data-header-mobile='auto']) &+.container .content [id] {
scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-offset));
scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-height));
}
}
@@ -108,7 +109,8 @@
}
.page {
.categories-card {
.categories-card,
.collections-card {
.card-item {
width: 100%;
}
+48
View File
@@ -18,3 +18,51 @@
-webkit-animation-name: #{$prefix}pulse !important;
animation-name: #{$prefix}pulse !important;
}
/**
* After the CSS round() function exceeds 90% browser support in the future, this code can be removed
* See https://caniuse.com/mdn-css_types_round
*/
@supports not (width: ROUND(60%, 2px)) {
@media only screen and (min-width: 1441px) {
%page-style {
width: 60%;
[data-page-style='wide'] & {
width: 64%;
}
[data-page-style='narrow'] & {
max-width: 800px;
}
}
}
@media only screen and (max-width: 1440px) {
%page-style {
width: 56%;
[data-page-style='wide'] & {
width: 60%;
}
}
}
@media only screen and (max-width: 1200px) {
%page-style {
width: 52%;
[data-page-style='wide'] & {
width: 56%;
}
}
}
@media only screen and (max-width: 960px) {
%page-style {
width: 80% !important;
}
}
@media only screen and (max-width: 680px) {
%page-style {
width: 100% !important;
}
}
}
+24 -4
View File
@@ -5,11 +5,31 @@
@each $color, $value in $theme-colors {
--#{$prefix}#{$color}: #{$value};
}
@each $color, $value in $theme-colors {
--#{$prefix}#{$color}-dark: #{darken($value, 5%)};
}
// Scroll margin top and Stack sticky top related
--#{$prefix}scroll-mt: calc(#{$header-height} + #{$global-scroll-margin-top});
--#{$prefix}breadcrumb-offset: 2.5rem;
// Set breadcrumb height to 0px if breadcrumb is disabled
--#{$prefix}breadcrumb-height: 0px;
// hr style
--#{$prefix}hr-background-color: #{darken($global-border-color, 5%)};
--#{$prefix}hr-before-color: #{lighten($single-link-hover-color, 4%)};
// Scrollbar related variables
--#{$prefix}scrollbar-thumb-color: #{$scrollbar-color};
--#{$prefix}scrollbar-thumb-hover-color: #{$scrollbar-hover-color};
--#{$prefix}scrollbar-track-color: transparent;
--#{$prefix}scrollbar-width: thin;
--#{$prefix}scrollbar-width-legacy: 12px;
}
// Dark theme
[data-theme=dark] {
@each $color, $value in $theme-colors {
--#{$prefix}#{$color}: #{darken($value, 5%)};
}
--#{$prefix}hr-background-color: #{lighten($global-border-color-dark, 5%)};
--#{$prefix}hr-before-color: #{darken($global-link-hover-color-dark, 4%)};
}
+1
View File
@@ -2,4 +2,5 @@
@import '_link';
@import '_blur';
@import '_details';
@import '_scrollbar-width';
@import '_z-index';
+8 -2
View File
@@ -1,8 +1,14 @@
@mixin link($light, $dark) {
/**
* Link mixin
* @param {Boolean} $light use global link color
* @param {Boolean} $dark use global link color dark
* @param {String} $decoration text-decoration, default none
*/
@mixin link($light, $dark, $decoration: none) {
a,
a::before,
a::after {
text-decoration: none;
text-decoration: $decoration;
@if $light {
color: $global-link-color;
+4
View File
@@ -0,0 +1,4 @@
@mixin scrollbar-width($width: thin, $widthLegacy: 12px) {
--#{$prefix}scrollbar-width: #{$width};
--#{$prefix}scrollbar-width-legacy: #{$widthLegacy};
}
+6 -2
View File
@@ -29,7 +29,10 @@
font-size: 1.25rem;
font-weight: bold;
margin: 0;
padding: 0.5rem;
&:not(:empty) {
padding: 0.5rem;
}
}
.home-subtitle {
@@ -94,7 +97,8 @@
.featured-image-preview {
width: 100%;
padding: 30% 0 0;
// use the same proportions as the cover image of https://dev.to/
aspect-ratio: auto 1000 / 420;
position: relative;
margin: 0.6rem auto;
@include transition(transform 0.4s ease);
+168 -76
View File
@@ -1,5 +1,6 @@
@import '../_partials/_single/toc';
@import '../_partials/_single/fixit-decryptor';
@import '../_partials/_single/collections';
.single {
.single-title {
@@ -8,16 +9,20 @@
font-size: 1.6rem;
font-weight: bold;
line-height: 140%;
.icon-repost {
color: var(--#{$prefix}success);
.icon-pin {
display: inline-block;
width: max-content;
margin-right: 0.25rem;
transform: rotate(30deg);
margin-right: 0.25em;
color: var(--#{$prefix}danger);
}
[data-theme='dark'] & {
color: var(--#{$prefix}success-dark);
}
.icon-repost {
display: inline-block;
width: max-content;
margin-right: 0.25em;
color: var(--#{$prefix}success);
}
}
@@ -49,7 +54,7 @@
.author {
font-size: 1.05rem;
img.avatar {
width: 1.3rem;
height: 1.3rem;
@@ -68,7 +73,7 @@
}
.featured-image {
margin: 0.5rem 0 1rem 0;
margin: 1rem 0;
img {
display: block;
@@ -89,71 +94,102 @@
padding: 5px;
}
hr {
position: relative;
height: 1em;
background: linear-gradient(to right, var(--#{$prefix}hr-background-color) 50%, transparent 50%);
background-size: 10px 2px;
background-position: center;
background-repeat: repeat-x;
border: none;
&.awesome-hr {
margin-block: 0.5em;
&::before {
display: inline-block;
font-weight: 600;
font-family: 'Font Awesome 6 Free';
text-rendering: auto;
-webkit-font-smoothing: antialiased;
position: absolute;
left: 5%;
top: 50%;
transform: translateY(-50%);
z-index: 1;
color: var(--#{$prefix}hr-before-color);
content: '\f0c4';
font-size: 20px;
line-height: 1;
transition: left 1s ease-in-out, color 0.3s ease, border-color 0.3s ease;
}
&:hover::before {
left: calc(95% - 20px);
}
}
}
.content {
margin-block: 1rem;
> h1,
> h2 {
font-size: 1.5rem;
& code {
font-size: 1.25rem;
}
font-size: 1.5em;
padding-bottom: 0.3em;
border-bottom: 1px solid $global-border-color;
}
> h3 {
font-size: 1.375rem;
& code {
font-size: 1.125rem;
}
font-size: 1.25em;
}
> h4 {
font-size: 1.25rem;
& code {
font-size: 1rem;
}
font-size: 1em;
}
> h5 {
font-size: 1.125rem;
font-size: 0.875em;
}
> h6 {
font-size: 1rem;
font-size: 0.85em;
}
h2,
h3,
h4,
h5,
h6 {
> .heading-element {
display: flex;
font-weight: bold;
margin: 1.2rem 0;
line-height: 1.25;
margin-top: 1.5rem;
margin-bottom: 1rem;
[data-theme='dark'] & {
font-weight: bolder;
}
}
> h2,
> h3,
> h4,
> h5,
> h6 {
> .header-mark::before {
content: '|';
margin-right: 0.3125rem;
color: $single-link-color;
code {
padding: 0 .2em;
font-size: inherit;
}
[data-theme='dark'] & {
color: $single-link-color-dark;
&:hover,
&:target {
> .heading-mark {
opacity: 1;
}
}
}
> h2 > .header-mark::before {
content: '#';
> .heading-mark {
display: inline-flex;
align-items: center;
opacity: 0;
padding-inline: 0.5rem;
transition: all 0.2s ease-in-out;
@include link(false, false);
svg {
fill: currentColor;
}
}
}
p {
@@ -187,15 +223,24 @@
}
ul,
ol {
margin: 0.5rem 0;
padding-left: 2.5rem;
ol,
dl {
margin-block: 0.5em;
}
ul {
list-style-type: disc;
}
dl {
dt {
font-weight: bold;
}
dd {
margin: 0.25em 0 1em;
}
}
ruby {
background: $code-background-color;
@@ -214,13 +259,10 @@
.table-wrapper {
overflow-x: auto;
--#{$prefix}scrollbar-thumb-color: #{$table-background-color};
&::-webkit-scrollbar {
background-color: $table-background-color;
[data-theme='dark'] & {
background-color: $table-background-color-dark;
}
[data-theme='dark'] & {
--#{$prefix}scrollbar-thumb-color: #{$table-background-color-dark};
}
> table {
@@ -251,7 +293,7 @@
background-color: lighten($table-background-color-dark, 2.75%);
}
}
& tr:hover {
background: darken($table-background-color, 4.5%);
@@ -277,10 +319,31 @@
max-width: 100%;
min-height: 1em;
&:not([data-h]) {
&:not([height]) {
height: auto;
}
&[loading='lazy'][srcset]:not([data-lazyloaded]) {
&:not(.suffix-invalid__small) {
width: var(--width-small, var(--width));
aspect-ratio: var(--aspect-ratio-small, var(--aspect-ratio));
}
&:not(.suffix-invalid) {
@media (min-resolution: 1.01dppx) and (max-resolution: 1.5dppx) {
width: calc(var(--width) / 1.5);
aspect-ratio: var(--aspect-ratio);
}
}
&:not(.suffix-invalid__large) {
@media (min-resolution: 1.51dppx) {
width: calc(var(--width-large, var(--width)) / 2);
aspect-ratio: var(--aspect-ratio-large, var(--aspect-ratio));
}
}
}
&.version {
height: 1.25em;
vertical-align: text-bottom;
@@ -308,10 +371,6 @@
display: block;
margin: 0 auto;
overflow: hidden;
&:not([width]) {
width: 100%;
}
}
}
@@ -327,6 +386,10 @@
padding-left: 1.5em;
}
dl dd {
margin-inline-start: 0.25em;
}
[data-theme='dark'] & {
color: $blockquote-color-dark;
border-left-color: $global-border-color-dark;
@@ -335,11 +398,40 @@
@include link(false, true);
}
.footnotes {
color: $global-font-secondary-color;
sup[id^='fnref']:has(.footnote-ref) {
padding: 2px 4px;
background-color: rgba(238, 238, 238, 0.7);
color: #555555;
border-radius: 4px;
cursor: pointer;
[data-theme='dark'] & {
color: $global-font-secondary-color-dark;
background-color: rgba(56, 139, 253, 0.1);
color: #58a6ff;
}
@include link(true, false);
}
.footnotes {
font-size: 0.75rem;
white-space: normal;
color: darken($global-font-secondary-color, 5%);
ol {
margin-block: 1em;
padding-left: 1rem;
}
a:not(.footnote-backref) {
color: inherit;
text-decoration: underline;
}
@include link(false, true);
[data-theme='dark'] & {
color: lighten($global-font-secondary-color-dark, 5%);
}
p {
@@ -347,17 +439,15 @@
}
}
@import '../_partials/_single/code';
@import '../_shortcodes';
hr {
margin: 1rem 0;
position: relative;
border-top: 1px dashed $global-border-color;
border-bottom: none;
margin-block: 0;
}
[data-theme='dark'] & {
border-top: 1px dashed $global-border-color-dark;
.footnotes {
hr {
background-color: var(--#{$prefix}hr-background-color);
height: 1px;
margin-block: 1em;
}
}
@@ -366,7 +456,6 @@
padding: 0 0.25rem;
background-color: $global-background-color;
border: 1px solid $global-border-color;
border-bottom-color: $global-border-color;
font-size: 0.8rem;
font-family: $code-font-family;
color: $code-color;
@@ -376,11 +465,14 @@
[data-theme='dark'] & {
background-color: $global-background-color-dark;
border: 1px solid $global-border-color-dark;
border-bottom-color: $global-border-color-dark;
color: $code-color-dark;
@include box-shadow(inset 0 -1px 0 $global-border-color-dark);
}
}
@import '../_partials/_single/alert';
@import '../_partials/_single/code';
@import '../_shortcodes';
}
@import '../_partials/_single/reward';
+2 -1
View File
@@ -1,4 +1,5 @@
.categories-card {
.categories-card,
.collections-card {
margin: 0 auto;
display: flex;
align-items: flex-start;
+4 -3
View File
@@ -17,11 +17,12 @@ img.emoji {
vertical-align: -0.1em;
}
.hugo-icon,
.fixit-icon {
display: inline-block;
height: 1.5em;
width: 1.5em;
line-height: 1.5em;
height: 1.2em;
width: 1.2em;
line-height: 1.2em;
position: relative;
vertical-align: text-bottom;
}
+16
View File
@@ -0,0 +1,16 @@
// Color map of alert [$type $border-color $color, ... ]
$alert-color-map:
'note' #0969da #0969da,
'tip' #1a7f37 #1a7f37,
'important' #8250df #8250df,
'warning' #bf8700 #9a6700,
'caution' #cf222e #d1242f,
!default;
$alert-color-map-dark:
'note' #316dca #478be6,
'tip' #347d39 #57ab5a,
'important' #8256d0 #986ee2,
'warning' #966600 #c69026,
'caution' #c93c37 #e5534b,
!default;
+3 -3
View File
@@ -180,8 +180,8 @@ $code-type-map: (
"llvm": "LLVM",
"lua": "Lua",
"mako": "Mako",
"md": "markdown",
"mkd": "markdown",
"md": "Markdown",
"mkd": "Markdown",
"mason": "Mason",
"mathematica": "Mathematica",
"mma": "Mathematica",
@@ -368,6 +368,6 @@ $code-type-map: (
"zed": "Zed",
"zig": "Zig",
// Custom code type
"markdown": "markdown",
"markdown": "Markdown",
"yml": "YAML"
) !default;
+36
View File
@@ -0,0 +1,36 @@
/* Modern browsers with `scrollbar-*` support (high priority) */
@supports (scrollbar-width: auto) {
* {
scrollbar-color: var(--#{$prefix}scrollbar-thumb-color) var(--#{$prefix}scrollbar-track-color);;
scrollbar-width: var(--#{$prefix}scrollbar-width);
}
}
/* Legacy browsers with `::-webkit-scrollbar-*` support */
::-webkit-scrollbar {
height: var(--#{$prefix}scrollbar-width-legacy);
width: var(--#{$prefix}scrollbar-width-legacy);
overflow: visible;
}
::-webkit-scrollbar-button {
height: 0;
width: 0;
}
::-webkit-scrollbar-corner {
background-color: var(--#{$prefix}scrollbar-track-color);
}
::-webkit-scrollbar-thumb {
background-color: var(--#{$prefix}scrollbar-thumb-color);
&:hover {
background-color: var(--#{$prefix}scrollbar-thumb-hover-color);
}
}
::-webkit-scrollbar-track {
background-color: var(--#{$prefix}scrollbar-track-color);
}
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-track {
background-clip: padding-box;
border: 3px solid transparent;
border-radius: 100px;
}
+44
View File
@@ -0,0 +1,44 @@
.alert {
padding: 0.5rem 1rem;
margin-block: 1rem;
color: inherit;
border-left: 0.25em solid var(--#{$prefix}alert-border-color);
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
.alert-title {
display: flex;
font-weight: 500;
align-items: center;
line-height: 1;
margin-bottom: 1rem;
color: var(--#{$prefix}alert-color);
> svg.icon {
width: initial;
height: initial;
margin-right: 0.5rem;
}
}
@each $type, $border-color, $color in $alert-color-map {
&.alert-#{$type} {
--#{$prefix}alert-border-color: #{$border-color};
--#{$prefix}alert-color: #{$color};
}
}
[data-theme='dark'] & {
@each $type, $border-color, $color in $alert-color-map-dark {
&.alert-#{$type} {
--#{$prefix}alert-border-color: #{$border-color};
--#{$prefix}alert-color: #{$color};
}
}
}
}
+31 -12
View File
@@ -18,7 +18,7 @@ code {
}
// indented code
pre {
pre:not(.mermaid[data-processed='true']) {
margin: 0;
line-height: 1.45em;
padding: 0.5rem;
@@ -58,6 +58,7 @@ pre {
font-family: $code-font-family;
.table-wrapper {
--#{$prefix}scrollbar-thumb-color: initial;
> table,
> table thead,
> table tr,
@@ -78,6 +79,7 @@ pre {
position: relative;
.code-header {
--#{$prefix}bg-code-header: #{darken($code-background-color, 3%)};
display: flex;
justify-content: space-between;
align-items: center;
@@ -87,13 +89,20 @@ pre {
font-weight: bold;
line-height: 1.4em;
color: $code-info-color;
background-color: darken($code-background-color, 3%);
background-color: var(--#{$prefix}bg-code-header);
@include border-radius($global-border-radius);
@include transition(border-radius 0.2s ease);
// delayed loading table-wrapper
& + .table-wrapper {
max-height: 0;
@include border-radius(0 0 $global-border-radius $global-border-radius);
@include details-transition-open;
}
[data-theme='dark'] & {
color: $code-info-color-dark;
background-color: darken($code-background-color-dark, 6%);
--#{$prefix}bg-code-header: #{darken($code-background-color-dark, 3%)};
}
&:hover {
@@ -114,6 +123,19 @@ pre {
padding: 0 0.2rem;
@include transition(transform 0.2s ease);
}
.title-inner {
position: absolute;
left: 50%;
transform: translateX(-50%);
background-color: var(--#{$prefix}bg-code-header);
padding-inline: 1em;
max-width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@include z-index(0, 1);
}
}
.code-title::after {
@@ -149,10 +171,8 @@ pre {
// delayed loading table-wrapper
.table-wrapper {
max-height: 0;
overflow: hidden;
@include border-radius(0 0 $global-border-radius $global-border-radius);
@include details-transition-open;
@include border-radius($global-border-radius);
}
table {
@@ -211,11 +231,11 @@ pre {
&.open {
.code-header {
background-color: darken($code-background-color, 6%);
--#{$prefix}bg-code-header: #{darken($code-background-color, 6%)};
@include border-radius($global-border-radius $global-border-radius 0 0);
[data-theme='dark'] & {
background-color: darken($code-background-color-dark, 3%);
--#{$prefix}bg-code-header: #{darken($code-background-color-dark, 6%)};
}
}
@@ -342,12 +362,11 @@ pre {
}
.table-wrapper {
.highlight,
&::-webkit-scrollbar {
background-color: #f6f8fa;
.highlight {
background-color: $code-background-color;
[data-theme='dark'] & {
background-color: #2d333b;
background-color: $code-background-color-dark;
}
}
}
@@ -0,0 +1,230 @@
// Collection Navigation
.collection-card {
font-size: 0.875rem;
background-color: darken($global-background-color, 3%);
margin-block: 1rem;
padding: 1rem 1.25rem;
position: relative;
@include border-radius($global-border-radius * 1.5);
@include user-select(none);
@extend .print-d-none;
[data-theme='dark'] & {
background-color: lighten($global-background-color-dark, 3%);
}
&:has(.collection-nav-item:nth-child(2))::before {
content: '';
position: absolute;
left: 50%;
bottom: 0.75rem;
width: 1px;
height: 2rem;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0.03) 100%);
[data-theme='dark'] & {
background: linear-gradient(
to bottom,
rgba(255, 255, 255, 0.03),
rgba(255, 255, 255, 0.05) 50%,
rgba(255, 255, 255, 0.03) 100%
);
}
}
.collection-title {
@include link(false, false);
}
.collection-nav {
display: flex;
justify-content: space-between;
gap: 1rem;
&:not(:empty) {
margin-top: 0.5rem;
}
.collection-nav-item {
flex-grow: 1;
max-width: calc(50% - 0.5rem);
font-weight: 500;
display: flex;
align-items: center;
@include transition(all 0.3s ease-out);
&:only-child {
max-width: 100%;
}
i {
flex-shrink: 0;
}
span {
flex-grow: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&[rel='next'] {
text-align: right;
}
&[rel='prev']:hover {
@include transform(translateX(-4px));
}
&[rel='next']:hover {
@include transform(translateX(4px));
}
}
}
}
// Collection aside container
.aside-collection {
position: sticky;
top: calc(#{$header-height} + var(--#{$prefix}breadcrumb-height));
box-sizing: border-box;
@include overflow-wrap(break-word);
@include blur;
@extend .print-d-none;
}
// Collection List
.collection-details {
&:not(:last-of-type) {
margin-bottom: 0.5rem;
}
&.open {
.collection-summary {
background-color: darken($global-background-color, 4%);
[data-theme='dark'] & {
background-color: lighten($global-background-color-dark, 4%);
}
}
}
.collection-summary {
display: flex;
align-items: baseline;
gap: 0.25em;
padding: 0.2em 0.5em;
background-color: darken($global-background-color, 3%);
[data-theme='dark'] & {
background-color: lighten($global-background-color-dark, 3%);
}
> i.fa-layer-group {
flex-shrink: 0;
}
.collection-name {
flex-grow: 1;
font-weight: bold;
font-size: $collection-title-font-size;
&::before {
content: attr(data-collections) '';
}
}
.collection-count {
flex-shrink: 0;
color: var(--#{$prefix}secondary);
}
.details-icon {
flex-shrink: 0;
}
@include user-select(none);
}
.collection-content {
font-size: $collection-list-font-size;
background-color: darken($global-background-color, 2%);
[data-theme='dark'] & {
background-color: lighten($global-background-color-dark, 2%);
}
.collection-list {
margin: 0;
padding-inline: 1.6em 0.8em;
padding-block: 0.4em;
text-indent: -0.8em;
list-style: none;
overflow-y: scroll;
max-height: 60vh;
@include scrollbar-width(none, 0);
.collection-item > a::before,
.collection-item > span::before {
content: '|';
font-weight: 600;
margin-right: 0.5em;
position: relative;
bottom: 2px;
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
}
.collection-item > .active {
font-weight: bold;
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
&::before {
color: $single-link-hover-color;
[data-theme='dark'] & {
color: $single-link-hover-color-dark;
}
}
}
}
.collection-nav-simple {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5em;
background-color: darken($global-background-color, 3%);
[data-theme='dark'] & {
background-color: lighten($global-background-color-dark, 3%);
}
a.collection-nav-item {
padding-inline: 2px;
border-radius: 50%;
@include transition(background-color 0.3s ease-out);
&:hover {
background-color: darken($global-background-color, 10%);
[data-theme='dark'] & {
background-color: lighten($global-background-color-dark, 10%);
}
}
}
> i.collection-nav-item {
padding: 4px 2px;
cursor: not-allowed;
}
}
}
}
@@ -1,4 +1,8 @@
>#comments {
padding: 2rem 0;
@extend .print-d-none;
iframe {
width: 100%;
}
}
@@ -1,16 +1,16 @@
.fixit-decryptor-container {
font-family: $global-font-family;
text-align: center;
margin-top: 3rem;
margin-block: var(--fixit-decryptor-margin-block);
.fixit-encryptor-shortcode & {
margin-top: 1rem;
.fixit-decryptor-loading {
vertical-align: middle;
}
#fixit-decryptor-input,
.fixit-decryptor-input,
.fixit-decryptor-btn,
.fixit-encryptor-btn {
display: inline-block;
display: none;
box-sizing: border-box;
outline: none;
color: $global-font-color;
@@ -40,9 +40,8 @@
}
}
#fixit-decryptor-input,
.fixit-decryptor-input {
width: clamp(50%, 400px, 100%);
width: calc(clamp(50%, 450px, 100%) - 100px);
height: 3rem;
padding-left: 1rem;
padding-right: 1rem;
@@ -53,10 +52,11 @@
}
}
.fixit-decryptor-btn,
.fixit-encryptor-btn {
cursor: pointer;
@include transition(all 0.1s ease-out);
padding: 0.6rem 1rem;
padding: 0.8rem 1rem;
background-color: $header-background-color;
@@ -64,4 +64,57 @@
background-color: $header-background-color-dark;
}
}
.fixit-encryptor-btn {
display: none;
}
}
fixit-encryptor {
&.initialized > .fixit-decryptor-container {
.fixit-decryptor-input,
.fixit-decryptor-btn {
display: inline-block;
}
.fixit-decryptor-loading {
display: none;
}
}
cipher-text {
display: none !important;
}
}
// fixit-encryptor for for the encrypted pages
article fixit-encryptor {
.fixit-decryptor-container {
--fixit-decryptor-margin-block: 2rem;
}
&.decrypted > .fixit-decryptor-container {
.fixit-decryptor-loading,
.fixit-decryptor-input,
.fixit-decryptor-btn {
display: none;
}
.fixit-encryptor-btn {
display: inline-block;
}
}
}
// fixit-encryptor shortcodes
#content fixit-encryptor {
.fixit-decryptor-container {
--fixit-decryptor-margin-block: 1rem;
}
&.decrypted > .fixit-decryptor-container {
display: none;
}
}
.encrypted-hidden {
display: none !important;
}
+5 -4
View File
@@ -1,13 +1,13 @@
.post-footer {
margin: 2rem 0;
&:has(~.post-reward) {
margin-bottom: 0;
&~.post-reward {
margin-block: -2rem 0;
}
.post-info {
border-bottom: 1px solid $global-border-color;
padding: 1rem 0 0.3rem;
padding: 0.3rem 0;
[data-theme='dark'] & {
border-bottom: 1px solid $global-border-color-dark;
@@ -62,7 +62,7 @@
}
.post-info-more {
padding: 0.3rem 0 1rem;
padding: 0.3rem 0;
display: flex;
justify-content: space-between;
font-size: 0.9rem;
@@ -91,6 +91,7 @@
display: flex;
justify-content: space-between;
gap: 1.5rem;
padding-block: 0.5rem;
@extend .print-d-none;
.post-nav-item {
@@ -1,73 +1,79 @@
/**
* Theme: GitHub Dark Dimmed
* Description: Dark Dimmed theme as seen on github.com
* Author: github.com
* Maintainer: https://github.com/hugo-fixit/FixIt
* Updated: 2022-03-01
* GitHub Dark Dimmed
* Copyright (c) 2012 - current GitHub, Inc.
* Licensed under MIT (https://github.com/primer/github-syntax-theme-generator/blob/master/LICENSE)
* Maintained by @Lruihao for FixIt theme
* Created on 2022-03-01
* Updated on 2024-07-14
*/
& {
--color-fg-default: #adbac7;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
// Blob colors
--#{$prefix}color-blob-num: #778491;
--#{$prefix}color-blob-code-inner: #c5d1de;
// Syntax colors
--#{$prefix}color-prettylights-syntax-comment: #768390;
--#{$prefix}color-prettylights-syntax-constant: #6cb6ff;
--#{$prefix}color-prettylights-syntax-constant-other-reference-link: #96d0ff;
--#{$prefix}color-prettylights-syntax-entity: #dcbdfb;
--#{$prefix}color-prettylights-syntax-storage-modifier-import: #adbac7;
--#{$prefix}color-prettylights-syntax-entity-tag: #8ddb8c;
--#{$prefix}color-prettylights-syntax-keyword: #f47067;
--#{$prefix}color-prettylights-syntax-string: #96d0ff;
--#{$prefix}color-prettylights-syntax-variable: #f69d50;
--#{$prefix}color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--#{$prefix}color-prettylights-syntax-brackethighlighter-angle: #768390;
--#{$prefix}color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--#{$prefix}color-prettylights-syntax-invalid-illegal-bg: #922323;
--#{$prefix}color-prettylights-syntax-carriage-return-text: #cdd9e5;
--#{$prefix}color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--#{$prefix}color-prettylights-syntax-string-regexp: #8ddb8c;
--#{$prefix}color-prettylights-syntax-markup-list: #eac55f;
--#{$prefix}color-prettylights-syntax-markup-heading: #316dca;
--#{$prefix}color-prettylights-syntax-markup-italic: #adbac7;
--#{$prefix}color-prettylights-syntax-markup-bold: #adbac7;
--#{$prefix}color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--#{$prefix}color-prettylights-syntax-markup-deleted-bg: #78191b;
--#{$prefix}color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--#{$prefix}color-prettylights-syntax-markup-inserted-bg: #1b4721;
--#{$prefix}color-prettylights-syntax-markup-changed-text: #ffddb0;
--#{$prefix}color-prettylights-syntax-markup-changed-bg: #682d0f;
--#{$prefix}color-prettylights-syntax-markup-ignored-text: #adbac7;
--#{$prefix}color-prettylights-syntax-markup-ignored-bg: #255ab2;
--#{$prefix}color-prettylights-syntax-meta-diff-range: #dcbdfb;
--#{$prefix}color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
.blob-num,
.blob-num {
color: var(--#{$prefix}color-blob-num);
}
.blob-code-inner {
color: val(--color-fg-default);
color: var(--#{$prefix}color-blob-code-inner);
}
.pl-c /* comment, punctuation.definition.comment, string.comment */ {
color: var(--color-prettylights-syntax-comment);
color: var(--#{$prefix}color-prettylights-syntax-comment);
}
.pl-c1 /* constant, entity.name.constant, variable.other.constant, variable.language, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header, meta.output */,
.pl-s .pl-v /* string variable */ {
color: var(--color-prettylights-syntax-constant);
color: var(--#{$prefix}color-prettylights-syntax-constant);
}
.pl-e /* entity */,
.pl-en /* entity.name */ {
color: var(--color-prettylights-syntax-entity);
color: var(--#{$prefix}color-prettylights-syntax-entity);
}
.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
.pl-s .pl-s1 /* string source */ {
color: var(--color-prettylights-syntax-storage-modifier-import);
color: var(--#{$prefix}color-prettylights-syntax-storage-modifier-import);
}
.pl-ent /* entity.name.tag, markup.quote */ {
color: var(--color-prettylights-syntax-entity-tag);
color: var(--#{$prefix}color-prettylights-syntax-entity-tag);
}
.pl-k /* keyword, storage, storage.type */ {
color: var(--color-prettylights-syntax-keyword);
color: var(--#{$prefix}color-prettylights-syntax-keyword);
}
.pl-s /* string */,
@@ -77,26 +83,26 @@
.pl-sr .pl-cce /* string.regexp constant.character.escape */,
.pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
color: var(--color-prettylights-syntax-string);
color: var(--#{$prefix}color-prettylights-syntax-string);
}
.pl-v /* variable */,
.pl-smw /* sublimelinter.mark.warning */ {
color: var(--color-prettylights-syntax-variable);
color: var(--#{$prefix}color-prettylights-syntax-variable);
}
.pl-bu /* invalid.broken, invalid.deprecated, invalid.unimplemented, message.error, brackethighlighter.unmatched, sublimelinter.mark.error */ {
color: var(--color-prettylights-syntax-brackethighlighter-unmatched);
color: var(--#{$prefix}color-prettylights-syntax-brackethighlighter-unmatched);
}
.pl-ii /* invalid.illegal */ {
color: var(--color-prettylights-syntax-invalid-illegal-text);
background-color: var(--color-prettylights-syntax-invalid-illegal-bg);
color: var(--#{$prefix}color-prettylights-syntax-invalid-illegal-text);
background-color: var(--#{$prefix}color-prettylights-syntax-invalid-illegal-bg);
}
.pl-c2 /* carriage-return */ {
color: var(--color-prettylights-syntax-carriage-return-text);
background-color: var(--color-prettylights-syntax-carriage-return-bg);
color: var(--#{$prefix}color-prettylights-syntax-carriage-return-text);
background-color: var(--#{$prefix}color-prettylights-syntax-carriage-return-bg);
}
.pl-c2::before /* carriage-return */ {
@@ -105,65 +111,65 @@
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
font-weight: bold;
color: var(--color-prettylights-syntax-string-regexp);
color: var(--#{$prefix}color-prettylights-syntax-string-regexp);
}
.pl-ml /* markup.list */ {
color: var(--color-prettylights-syntax-markup-list);
color: var(--#{$prefix}color-prettylights-syntax-markup-list);
}
.pl-mh /* markup.heading */,
.pl-mh .pl-en /* markup.heading entity.name */,
.pl-ms /* meta.separator */ {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-heading);
color: var(--#{$prefix}color-prettylights-syntax-markup-heading);
}
.pl-mi /* markup.italic */ {
font-style: italic;
color: var(--color-prettylights-syntax-markup-italic);
color: var(--#{$prefix}color-prettylights-syntax-markup-italic);
}
.pl-mb /* markup.bold */ {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-bold);
color: var(--#{$prefix}color-prettylights-syntax-markup-bold);
}
.pl-md /* markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted */ {
color: var(--color-prettylights-syntax-markup-deleted-text);
background-color: var(--color-prettylights-syntax-markup-deleted-bg);
color: var(--#{$prefix}color-prettylights-syntax-markup-deleted-text);
background-color: var(--#{$prefix}color-prettylights-syntax-markup-deleted-bg);
}
.pl-mi1 /* markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted */ {
color: var(--color-prettylights-syntax-markup-inserted-text);
background-color: var(--color-prettylights-syntax-markup-inserted-bg);
color: var(--#{$prefix}color-prettylights-syntax-markup-inserted-text);
background-color: var(--#{$prefix}color-prettylights-syntax-markup-inserted-bg);
}
.pl-mc /* markup.changed, punctuation.definition.changed */ {
color: var(--color-prettylights-syntax-markup-changed-text);
background-color: var(--color-prettylights-syntax-markup-changed-bg);
color: var(--#{$prefix}color-prettylights-syntax-markup-changed-text);
background-color: var(--#{$prefix}color-prettylights-syntax-markup-changed-bg);
}
.pl-mi2 /* markup.ignored, markup.untracked */ {
color: var(--color-prettylights-syntax-markup-ignored-text);
background-color: var(--color-prettylights-syntax-markup-ignored-bg);
color: var(--#{$prefix}color-prettylights-syntax-markup-ignored-text);
background-color: var(--#{$prefix}color-prettylights-syntax-markup-ignored-bg);
}
.pl-mdr /* meta.diff.range */ {
font-weight: bold;
color: var(--color-prettylights-syntax-meta-diff-range);
color: var(--#{$prefix}color-prettylights-syntax-meta-diff-range);
}
.pl-ba /* brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote */ {
color: var(--color-prettylights-syntax-brackethighlighter-angle);
color: var(--#{$prefix}color-prettylights-syntax-brackethighlighter-angle);
}
.pl-sg /* sublimelinter.gutter-mark */ {
color: var(--color-prettylights-syntax-sublimelinter-gutter-mark);
color: var(--#{$prefix}color-prettylights-syntax-sublimelinter-gutter-mark);
}
.pl-corl /* constant.other.reference.link, string.other.link */ {
text-decoration: underline;
color: var(--color-prettylights-syntax-constant-other-reference-link);
color: var(--#{$prefix}color-prettylights-syntax-constant-other-reference-link);
}
}
@@ -3,10 +3,6 @@
text-align: center;
@extend .print-d-none;
&~.post-footer {
margin-top: 0;
}
&:has(.reward-ways:empty) {
display: none;
}
+99 -28
View File
@@ -9,14 +9,16 @@
font-size: $toc-content-font-size;
ul {
text-indent: -0.8rem;
padding-left: 0.8rem;
text-indent: -0.8em;
padding-left: 0.8em;
list-style: none;
a:first-child::before {
content: '|';
font-weight: bolder;
margin-right: 0.5rem;
margin-right: 0.5em;
position: relative;
bottom: 2px;
color: $single-link-color;
[data-theme='dark'] & {
@@ -25,7 +27,24 @@
}
ul {
padding-left: 1.5rem;
padding-left: 1em;
}
}
ol {
margin: 0;
padding-left: 2.25em;
ol {
padding-left: 1.25em;
}
li:has(> a:hover)::marker {
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
}
}
}
@@ -50,10 +69,9 @@
#toc-auto {
display: block;
position: sticky;
top: var(--#{$prefix}scroll-mt);
top: calc(#{$header-height} + var(--#{$prefix}breadcrumb-height));
box-sizing: border-box;
visibility: hidden;
@include z-index(1);
@include overflow-wrap(break-word);
@include blur;
@extend .print-d-none;
@@ -63,14 +81,16 @@
}
.toc-title {
margin: 0.5rem 0;
margin-block: 0 0.5em;
cursor: pointer;
@include user-select(none);
&::before {
content: '|';
font-weight: bolder;
margin-right: 0.5rem;
margin-right: 0.5em;
position: relative;
bottom: 2px;
color: $global-border-color;
[data-theme='dark'] & {
@@ -91,12 +111,10 @@
.toc-content {
overflow-y: scroll;
max-height: calc(100vh - #{2*$header-height});
&::-webkit-scrollbar {
width: 0;
}
@include scrollbar-width(none, 0);
&.always-active ul {
&.always-active ul,
&.always-active ol {
display: block;
}
@@ -104,6 +122,29 @@
margin: 0;
}
li.has-active {
&::marker {
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
}
&:has(> .active)::marker {
font-weight: bold;
}
> a {
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
}
}
// for unordered list automatically collapsed
ul {
ul {
display: none;
@@ -112,17 +153,8 @@
.has-active > ul {
display: block;
}
}
a.active {
font-weight: bold;
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
&::before {
a.active::before {
color: $single-link-hover-color;
[data-theme='dark'] & {
@@ -130,12 +162,27 @@
}
}
}
// for ordered list automatically collapsed
ol {
ol {
display: none;
}
.has-active > ol {
display: block;
}
}
a.active {
font-weight: bold;
}
}
}
#toc-static {
display: none;
margin: 0.8rem 0;
margin: 0.8em 0;
&[data-kept='true'] {
display: block;
@@ -145,7 +192,7 @@
display: flex;
justify-content: space-between;
line-height: 2em;
padding: 0 0.75rem;
padding: 0 0.75em;
background: darken($code-background-color, 3%);
[data-theme='dark'] & {
@@ -156,9 +203,33 @@
.toc-content {
background-color: $code-background-color;
> nav > ul {
margin: 0;
padding: 0.4rem 1rem 0.4rem 1.8rem;
> nav {
> ul {
margin: 0;
padding: 0.4em 1em 0.4em 1.8em;
a:hover {
font-weight: bold;
&::before {
color: $single-link-hover-color;
[data-theme='dark'] & {
color: $single-link-hover-color-dark;
}
}
}
}
> ol {
margin: 0;
padding: 0.4em 1em 0.4em 2.25em;
li:has(> a:hover)::marker,
a:hover {
font-weight: bold;
}
}
}
[data-theme='dark'] & {
@@ -9,14 +9,5 @@
}
--ti-cursor-font-family: #{$global-font-family};
--ti-cursor-font-size: #{$global-font-size};
--ti-cursor-font-style: normal;
--ti-cursor-font-weight: #{$global-font-weight};
--ti-cursor-line-height: #{$global-line-height};
--ti-cursor-color: #{$global-font-color};
--ti-cursor-transform: translateX(0);
[data-theme='dark'] & {
--ti-cursor-color: #{$global-font-color-dark};
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
margin: 1rem 0;
padding: 0 0.75rem;
border-left: .25rem solid;
overflow: auto;
overflow: hidden;
@include border-radius($global-border-radius);
.admonition-title {
+3 -3
View File
@@ -1,9 +1,9 @@
.bilibili {
position: relative;
width: 100%;
height: 0;
padding-bottom: 75%;
margin: 3% auto;
height: auto;
aspect-ratio: 16 / 9;
margin: 1rem auto;
text-align: center;
iframe {
+18 -1
View File
@@ -76,11 +76,28 @@
white-space: nowrap;
}
&icon-globe {
&shortcut-icon {
width: 4rem;
height: 4rem;
flex-shrink: 0;
margin-left: 0.25rem;
&:is(i) {
text-align: center;
font-size: 3rem;
display: inline-flex;
align-items: center;
justify-content: center;
}
}
&shortcut-image {
width: 4rem;
height: 4rem !important;
flex-shrink: 0;
margin-left: 0.25rem;
object-fit: cover;
border-radius: 50%;
}
[data-theme='dark'] & {
+2 -2
View File
@@ -1,10 +1,10 @@
.blockquote-center {
blockquote.blockquote-center {
border-left: none;
margin: 40px 0;
padding: 0;
position: relative;
text-align: center;
color: initial;
color: inherit;
&::after,
&::before {
+24
View File
@@ -0,0 +1,24 @@
.douyin {
position: relative;
width: 100%;
height: 0;
padding-bottom: 60.725%;
margin: 1rem auto;
text-align: center;
iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
}
@media only screen and (max-width: 680px) {
.douyin {
width: 92%;
margin-inline: 4%;
padding-bottom: 190%;
}
}
+2
View File
@@ -1,8 +1,10 @@
@import '_admonition';
@import '_bilibili';
@import '_douyin';
@import '_cardlink';
@import '_center-quote';
@import '_echarts';
@import '_instagram';
@import '_mapbox';
@import '_mermaid';
@import '_timeline';
+3 -1
View File
@@ -1,5 +1,7 @@
.mermaid {
text-align: center;
&[data-processed='true'] {
text-align: center;
}
svg {
max-width: 100%;
+108
View File
@@ -0,0 +1,108 @@
.#{$prefix}timeline {
list-style: none;
box-sizing: border-box;
overflow: auto;
margin: 1rem auto;
--timeline-color: #{darken($global-border-color, 5%)};
--timeline-circle-color: #FF735A;
--timeline-circle-size: 10px;
--timeline-width: 2px;
&[data-animation] {
.#{$prefix}timeline-item::before {
border-color: var(--timeline-color);
animation-name: border-color-fade;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-delay: calc(var(--timeline-index) * 0.3s);
@keyframes border-color-fade {
0% {
border-color: var(--timeline-color);
}
50% {
border-color: var(--timeline-circle-color);
}
100% {
border-color: var(--timeline-color);
}
}
}
}
.#{$prefix}timeline-item {
position: relative;
padding: 0.5rem 1.75rem;
@each $color, $value in $theme-colors {
&[data-type='#{$color}'] {
--timeline-circle-color: var(--#{$prefix}#{$color});
}
}
.#{$prefix}timeline-item__timestamp {
font-size: 0.8125rem;
line-height: 1;
color: var(--#{$prefix}secondary);
&.is-top {
margin-bottom: 0.25rem;
padding-top: 0.34375rem;
}
&.is-bottom {
margin-top: 0.25rem;
}
}
.#{$prefix}timeline-item__content {
font-size: 0.875rem;
}
&[data-node='dot']::before {
background-color: var(--timeline-circle-color) !important;
}
&[data-size='small']::before {
transform: scale(0.8) translateY(-50%);
}
&[data-size='large']::before {
transform: scale(1.2) translateY(-50%);
}
&::before {
content: '';
position: absolute;
top: 1.25rem;
transform: translateY(-50%);
left: 0;
width: var(--timeline-circle-size);
height: var(--timeline-circle-size);
font-size: var(--timeline-circle-size);
line-height: var(--timeline-circle-size);
text-align: center;
border-radius: 50%;
border-width: var(--timeline-width);
border-style: solid;
border-color: var(--timeline-circle-color);
background-color: $global-background-color;
color: transparent;
z-index: 1;
[data-theme='dark'] & {
background-color: $global-background-color-dark;
}
}
&::after {
content: '';
position: absolute;
top: 0;
left: calc(var(--timeline-circle-size) / 2 + var(--timeline-width) / 2);
width: var(--timeline-width);
height: 100%;
background-color: var(--timeline-color);
}
[data-theme='dark'] & {
--timeline-color: #{darken($global-border-color, 50%)};
}
}
}
+17 -5
View File
@@ -45,10 +45,10 @@ $global-border-color-dark: #363636 !default;
// ========== Scrollbar ========== //
// Color of the scrollbar
$scrollbar-color: #87878d !default;
$scrollbar-color: #a6a6a6 !default;
// Color of the hover scrollbar
$scrollbar-hover-color: #b1b1ba !default;
$scrollbar-hover-color: #7d7d7d !default;
// ========== Scrollbar ========== //
// ========== Selection ========== //
@@ -73,6 +73,13 @@ $header-title-font-size: 1.5rem !default;
$menu-active-color: #161209 !default;
$menu-active-color-dark: #fff !default;
// Border color of the menu item
$menu-border-color: darken($global-border-color, 5%) !default;
$menu-border-color-dark: lighten($global-border-color-dark, 5%) !default;
// Height of the submenu item of desktop header
$submenu-height: $header-height * 0.5 !default;
// Color of the search background
$search-background-color: #e9e9e9 !default;
$search-background-color-dark: #363636 !default;
@@ -88,8 +95,12 @@ $tag-cloud-end-dark: $global-font-color-dark!default;
// ========== Single Content ========== //
// Font size of the TOC
$toc-title-font-size: 1.2rem !default;
$toc-content-font-size: 1rem !default;
$toc-title-font-size: 1rem !default;
$toc-content-font-size: 0.875rem !default;
// Font size of the Collection List
$collection-title-font-size: 1rem !default;
$collection-list-font-size: 0.875rem !default;
// Color of the single link
$single-link-color: #2376b7 !default; // 花青
@@ -97,7 +108,7 @@ $single-link-color-dark: #1781b5 !default; // 釉蓝
// Color of the hover single link
$single-link-hover-color: #ea517f !default; // 莲瓣红
$single-link-hover-color-dark: #619ac3 !default; // 羽扇豆蓝
$single-link-hover-color-dark: #cc5595 !default; // 龙须红
// Color of the table background
$table-background-color: #fff !default;
@@ -165,6 +176,7 @@ $github-corner-fill-dark: $header-background-color !default;
// ========== GitHub Corners ========== //
@import '_partials/_maps/admonition';
@import '_partials/_maps/alert';
@import '_partials/_maps/code-highlight';
@import '_partials/_maps/code-type';
@import '_partials/_maps/colors';
+1 -1
View File
@@ -7,7 +7,7 @@
@import "_core/base";
@import "_core/layout";
@import "_core/common";
@import "_core/patch";
@import "_page";
@import "_core/media";
@import "_core/patch";
@import "_custom";
+38 -45
View File
@@ -3,19 +3,19 @@
prefix:
libFiles: https://cdn.jsdelivr.net/npm/
# simple-icons@7.12.0 https://github.com/simple-icons/simple-icons
simpleIcons: https://cdn.jsdelivr.net/npm/simple-icons@7.12.0/icons/
# simple-icons@9.19.0 https://github.com/simple-icons/simple-icons
simpleIcons: https://cdn.jsdelivr.net/npm/simple-icons@9.19.0/icons/
libFiles:
# algoliasearch@4.14.2 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@4.14.2/dist/algoliasearch-lite.umd.min.js
# algoliasearch@4.20.0 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@4.20.0/dist/algoliasearch-lite.umd.min.js
# animate.css@4.1.1 https://github.com/daneden/animate.css
animateCSS: animate.css@4.1.1/animate.min.css
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css
aplayerJS: aplayer@1.10.1/dist/APlayer.min.js
# artalk@2.5.2 https://github.com/ArtalkJS/Artalk
artalkCSS: artalk@2.5.2/dist/Artalk.css
artalkJS: artalk@2.5.2/dist/Artalk.js
# artalk@latest https://github.com/ArtalkJS/Artalk
artalkCSS: artalk@latest/dist/Artalk.css
artalkJS: artalk@latest/dist/Artalk.js
# autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
# TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js'
autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js
@@ -24,43 +24,36 @@ libFiles:
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
# crypto-js@4.1.1 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.1.1/core.js
cryptoEncBase64JS: crypto-js@4.1.1/enc-base64.js
cryptoMd5JS: crypto-js@4.1.1/md5.js
cryptoSha256JS: crypto-js@4.1.1/sha256.js
# crypto-js@4.2.0 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.2.0/core.js
cryptoEncBase64JS: crypto-js@4.2.0/enc-base64.js
cryptoSha256JS: crypto-js@4.2.0/sha256.js
# echarts@5.3.3 https://github.com/apache/echarts
echartsJS: echarts@5.3.3/dist/echarts.min.js
# eruda@2.5.0 https://github.com/liriliri/eruda
erudaJS: eruda@2.5.0/eruda.js
# fontawesome-free@6.2.0 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.2.0/css/all.min.css'
# fontawesome-free@6.4.2 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.4.2/css/all.min.css'
# fusejs@6.6.2 https://github.com/krisk/fuse
fuseJS: fuse.js@6.6.2/dist/fuse.min.js
# gitalk@1.7.2 https://github.com/gitalk/gitalk
gitalkCSS: gitalk@1.7.2/dist/gitalk.min.css
gitalkJS: gitalk@1.7.2/dist/gitalk.min.js
# instant.page@5.1.1 https://github.com/instantpage/instant.page
instantPage: instant.page@5.1.1/instantpage.min.js
# katex@0.16.2 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.2/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.2/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.2/dist/katex.min.css
katexJS: katex@0.16.2/dist/katex.min.js
katexMhchemJS: katex@0.16.2/dist/contrib/mhchem.min.js
# lightgallery@2.6.1 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.6.1/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.6.1/lightgallery.min.js
lightgalleryThumbnailJS: lightgallery@2.6.1/plugins/thumbnail/lg-thumbnail.min.js
lightgalleryZoomJS: lightgallery@2.6.1/plugins/zoom/lg-zoom.min.js
# lunr.js@2.3.9 https://github.com/olivernn/lunr.js
lunrJS: lunr@2.3.9/lunr.min.js
# instant.page@5.2.0 https://github.com/instantpage/instant.page
instantPage: instant.page@5.2.0/instantpage.min.js
# katex@0.16.10 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.10/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.10/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.10/dist/katex.min.css
katexJS: katex@0.16.10/dist/katex.min.js
katexMhchemJS: katex@0.16.10/dist/contrib/mhchem.min.js
# lightgallery@2.7.2 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.7.2/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.7.2/lightgallery.min.js
lightgalleryThumbnailJS: lightgallery@2.7.2/plugins/thumbnail/lg-thumbnail.min.js
lightgalleryZoomJS: lightgallery@2.7.2/plugins/zoom/lg-zoom.min.js
# mapbox-gl@2.10.0 https://docs.mapbox.com/mapbox-gl-js
# TODO update to 3.x
mapboxGLCSS: mapbox-gl@2.10.0/dist/mapbox-gl.css
mapboxGLJS: mapbox-gl@2.10.0/dist/mapbox-gl.js
# mermaid@9.4.3 https://github.com/mermaid-js/mermaid
# TODO bump Mermaid from 9.x to 10.x
mermaidJS: mermaid@9.4.3/dist/mermaid.min.js
# meting@2.0.1 https://github.com/metowolf/MetingJS
metingJS: meting@2.0.1/dist/Meting.min.js
# object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
@@ -69,19 +62,19 @@ libFiles:
panguJS: pangu@4.0.7/dist/browser/pangu.min.js
# pace-js@1.2.4 https://github.com/CodeByZach/pace
paceJS: pace-js@1.2.4
# sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
# sharer.js@0.5.1 https://github.com/ellisonleao/sharer.js
sharerJS: sharer.js@0.5.1/sharer.min.js
# twemoji@13.1.0 https://github.com/twitter/twemoji
# twemoji@14.0.2 https://github.com/twitter/twemoji
twemojiJS: twemoji@14.0.2/dist/twemoji.min.js
# twikoo@1.6.8 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.6.8/dist/twikoo.all.min.js
# twikoo@1.6.22 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.6.22/dist/twikoo.all.min.js
# typeit@8.7.1 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.7.1/dist/index.umd.js
# valine@1.5.1 https://github.com/xCss/Valine
valineJS: valine@1.5.1/dist/Valine.min.js
# vconsole@3.14.6 https://github.com/Tencent/vConsole
vconsoleJS: vconsole@3.14.6/dist/vconsole.min.js
# waline@2.14.7 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.14.7/dist/waline.css'
walineJS: '@waline/client@2.14.7/dist/waline.js'
# valine@1.5.2 https://github.com/xCss/Valine
valineJS: valine@1.5.2/dist/Valine.min.js
# waline@2.15.8 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.15.8/dist/waline.css'
walineJS: '@waline/client@2.15.8/dist/waline.js'
# xxhash-wasm@1.0.2 https://github.com/jungomi/xxhash-wasm
xxhashWasmJS: xxhash-wasm@1.0.2/umd/xxhash-wasm.js
+38 -46
View File
@@ -3,19 +3,19 @@
prefix:
libFiles: https://unpkg.com/
# simple-icons@7.12.0 https://github.com/simple-icons/simple-icons
simpleIcons: https://unpkg.com/simple-icons@7.12.0/icons/
# simple-icons@9.19.0 https://github.com/simple-icons/simple-icons
simpleIcons: https://unpkg.com/simple-icons@9.19.0/icons/
libFiles:
# algoliasearch@4.14.2 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@4.14.2/dist/algoliasearch-lite.umd.js
# algoliasearch@4.20.0 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@4.20.0/dist/algoliasearch-lite.umd.js
# animate.css@4.1.1 https://github.com/daneden/animate.css
animateCSS: animate.css@4.1.1/animate.min.css
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css
aplayerJS: aplayer@1.10.1/dist/APlayer.min.js
# artalk@2.5.2 https://github.com/ArtalkJS/Artalk
artalkCSS: artalk@2.5.2/dist/Artalk.css
artalkJS: artalk@2.5.2/dist/Artalk.js
# artalk@latest https://github.com/ArtalkJS/Artalk
artalkCSS: artalk@latest/dist/Artalk.css
artalkJS: artalk@latest/dist/Artalk.js
# autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
# TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js'
autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js
@@ -24,43 +24,36 @@ libFiles:
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
# crypto-js@4.1.1 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.1.1/core.js
cryptoEncBase64JS: crypto-js@4.1.1/enc-base64.js
cryptoMd5JS: crypto-js@4.1.1/md5.js
cryptoSha256JS: crypto-js@4.1.1/sha256.js
# crypto-js@4.2.0 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.2.0/core.js
cryptoEncBase64JS: crypto-js@4.2.0/enc-base64.js
cryptoSha256JS: crypto-js@4.2.0/sha256.js
# echarts@5.3.3 https://github.com/apache/echarts
echartsJS: echarts@5.3.3/dist/echarts.min.js
# eruda@2.5.0 https://github.com/liriliri/eruda
erudaJS: eruda@2.5.0/eruda.js
# fontawesome-free@6.2.0 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.2.0/css/all.min.css'
# fontawesome-free@6.4.2 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.4.2/css/all.min.css'
# fusejs@6.6.2 https://github.com/krisk/fuse
fuseJS: fuse.js@6.6.2/dist/fuse.min.js
# gitalk@1.7.2 https://github.com/gitalk/gitalk
gitalkCSS: gitalk@1.7.2/dist/gitalk.min.css
gitalkJS: gitalk@1.7.2/dist/gitalk.min.js
# instant.page@5.1.1 https://github.com/instantpage/instant.page
instantPage: instant.page@5.1.1/instantpage.js
# katex@0.16.2 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.2/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.2/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.2/dist/katex.min.css
katexJS: katex@0.16.2/dist/katex.min.js
katexMhchemJS: katex@0.16.2/dist/contrib/mhchem.min.js
# lightgallery@2.6.1 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.6.1/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.6.1/lightgallery.min.js
lightgalleryThumbnailJS: lightgallery@2.6.1/plugins/thumbnail/lg-thumbnail.min.js
lightgalleryZoomJS: lightgallery@2.6.1/plugins/zoom/lg-zoom.min.js
# lunr.js@2.3.9 https://github.com/olivernn/lunr.js
lunrJS: lunr@2.3.9/lunr.min.js
# instant.page@5.2.0 https://github.com/instantpage/instant.page
instantPage: instant.page@5.2.0/instantpage.js
# katex@0.16.10 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.10/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.10/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.10/dist/katex.min.css
katexJS: katex@0.16.10/dist/katex.min.js
katexMhchemJS: katex@0.16.10/dist/contrib/mhchem.min.js
# lightgallery@2.7.2 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.7.2/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.7.2/lightgallery.min.js
lightgalleryThumbnailJS: lightgallery@2.7.2/plugins/thumbnail/lg-thumbnail.min.js
lightgalleryZoomJS: lightgallery@2.7.2/plugins/zoom/lg-zoom.min.js
# mapbox-gl@2.10.0 https://docs.mapbox.com/mapbox-gl-js
# TODO update to 3.x
mapboxGLCSS: mapbox-gl@2.10.0/dist/mapbox-gl.css
mapboxGLJS: mapbox-gl@2.10.0/dist/mapbox-gl.js
# mermaid@9.4.3 https://github.com/mermaid-js/mermaid
# TODO bump Mermaid from 9.x to 10.x
mermaidJS: mermaid@9.4.3/dist/mermaid.min.js
# meting@2.0.1 https://github.com/metowolf/MetingJS
metingJS: meting@2.0.1/dist/Meting.min.js
# object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
@@ -69,19 +62,18 @@ libFiles:
panguJS: pangu@4.0.7/dist/browser/pangu.min.js
# pace-js@1.2.4 https://github.com/CodeByZach/pace
paceJS: pace-js@1.2.4
# sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
# sharer.js@0.5.1 https://github.com/ellisonleao/sharer.js
sharerJS: sharer.js@0.5.1/sharer.min.js
# twemoji@13.1.0 https://github.com/twitter/twemoji
# twemoji@14.0.2 https://github.com/twitter/twemoji
twemojiJS: twemoji@14.0.2/dist/twemoji.min.js
# twikoo@1.6.8 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.6.8/dist/twikoo.all.min.js
# twikoo@1.6.22 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.6.22/dist/twikoo.all.min.js
# typeit@8.7.1 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.7.1/dist/index.umd.js
# valine@1.5.1 https://github.com/xCss/Valine
valineJS: valine@1.5.1/dist/Valine.min.js
# vconsole@3.14.6 https://github.com/Tencent/vConsole
vconsoleJS: vconsole@3.14.6/dist/vconsole.min.js
# waline@2.14.7 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.14.7/dist/waline.css'
walineJS: '@waline/client@2.14.7/dist/waline.js'
# valine@1.5.2 https://github.com/xCss/Valine
valineJS: valine@1.5.2/dist/Valine.min.js
# waline@2.15.8 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.15.8/dist/waline.css'
walineJS: '@waline/client@2.15.8/dist/waline.js'
# xxhash-wasm@1.0.2 https://github.com/jungomi/xxhash-wasm
xxhashWasmJS: xxhash-wasm@1.0.2/umd/xxhash-wasm.js
+7 -7
View File
@@ -14,13 +14,13 @@ linkedin:
Icon:
Class: fa-brands fa-linkedin fa-fw
# 003: Twitter
# 003: Twitter (X)
twitter:
Weight: 3
Prefix: https://twitter.com/
Title: Twitter
Title: X
Icon:
Class: fa-brands fa-twitter fa-fw
Class: fa-brands fa-x-twitter fa-fw
# 004: Instagram
instagram:
@@ -547,7 +547,7 @@ qqgroup:
Template: https://qm.qq.com/cgi-bin/qm/qr?k=%v&jump_from=webapi
Title: QQ Group
Icon:
Class: fa-solid fa-users
Simpleicons: tencentqq
# 070: Diaspora
diaspora:
@@ -562,7 +562,7 @@ csdn:
Prefix: https://blog.csdn.net/
Title: CSDN
Icon:
Src: svg/icons/csdn.svg
Src: images/icons/csdn.svg
# 072: Discord User Profile
discord:
@@ -615,7 +615,7 @@ plume:
Weight: 78
Title: Plume
Icon:
Src: svg/icons/plume.svg
Src: images/icons/plume.svg
# 079: Hack The Box
hackthebox:
@@ -631,7 +631,7 @@ rootme:
Title: Root-Me
Prefix: https://www.root-me.org/
Icon:
Src: svg/icons/rootme.svg
Src: images/icons/rootme.svg
# 081: Feishu
feishu:
-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" version="1.1"><defs><style>.fixit-ban{opacity:.9;}</style></defs><path d="M159.12 338.69l24.8-16.54a78.87 78.87 0 0 1-6.77-22.72l-30.88 4.41a16 16 0 0 1-4.54-31.68l34.27-4.9v-.76l98.94 98.95a76.89 76.89 0 0 1-71.68-17.73l-26.39 17.59c-.15.11-.31.21-.47.31a16 16 0 0 1-17.28-26.93zm224.72-48.42a16 16 0 0 0-13.57-18.11l-34.27-4.9V244.9l34.27-4.9a16 16 0 1 0-4.54-31.68l-30.54 4.36a79.31 79.31 0 0 0-6.85-22.85l24.54-16.36a16 16 0 1 0-17.29-26.93l-.46.31-26 17.34a79.9 79.9 0 0 0-102.64-3l139.83 139.88 19.41 2.77a16 16 0 0 0 18.11-13.57z" fill="#358C3C" class="fixit-bug"/><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 432c-101.46 0-184-82.54-184-184a182.84 182.84 0 0 1 33.38-105.37l256 256A182.86 182.86 0 0 1 256 440zm150.62-78.63l-256-256A182.84 182.84 0 0 1 256 72c101.46 0 184 82.54 184 184a182.84 182.84 0 0 1-33.38 105.37z" fill="#FF6347" class="fixit-ban"/></svg>

Before

Width:  |  Height:  |  Size: 968 B

+11
View File
@@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" version="1.1" width="16" height="16">
<defs>
<style>.fixit-ban{opacity:.9;}</style>
</defs>
<path
d="M159.12 338.69l24.8-16.54a78.87 78.87 0 0 1-6.77-22.72l-30.88 4.41a16 16 0 0 1-4.54-31.68l34.27-4.9v-.76l98.94 98.95a76.89 76.89 0 0 1-71.68-17.73l-26.39 17.59c-.15.11-.31.21-.47.31a16 16 0 0 1-17.28-26.93zm224.72-48.42a16 16 0 0 0-13.57-18.11l-34.27-4.9V244.9l34.27-4.9a16 16 0 1 0-4.54-31.68l-30.54 4.36a79.31 79.31 0 0 0-6.85-22.85l24.54-16.36a16 16 0 1 0-17.29-26.93l-.46.31-26 17.34a79.9 79.9 0 0 0-102.64-3l139.83 139.88 19.41 2.77a16 16 0 0 0 18.11-13.57z"
fill="#358C3C" class="fixit-bug" />
<path
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 432c-101.46 0-184-82.54-184-184a182.84 182.84 0 0 1 33.38-105.37l256 256A182.86 182.86 0 0 1 256 440zm150.62-78.63l-256-256A182.84 182.84 0 0 1 256 72c101.46 0 184 82.54 184 184a182.84 182.84 0 0 1-33.38 105.37z"
fill="#FF6347" class="fixit-ban" />
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 370 391" xml:space="preserve" width="16" height="16">
<style type="text/css">
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#FF4088;stroke:#C9177E;stroke-width:27;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
</style>
<path class="st0" d="M207.5,22.4L321.9,89c13.5,7.9,21.9,22.4,21.9,38v136.4c0,17.3-9.3,33.3-24.5,41.8l-113.5,63.9
c-15.1,8.5-33.5,8.4-48.5-0.2L52.8,308.8c-16.4-9.5-26.6-27-26.6-45.9V133.4c0-19.1,9.9-36.8,26.1-46.8l102.8-63.5
C171.1,13.2,191.3,13,207.5,22.4z"/>
<polygon class="st1" points="105.6,298.2 105.6,91 149,91 149,166.5 220.9,166.5 220.9,91 264.4,91 264.4,298.2 220.9,298.2
220.9,207.6 149,207.6 149,298.2 "/>
</svg>

After

Width:  |  Height:  |  Size: 808 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>

After

Width:  |  Height:  |  Size: 409 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>

After

Width:  |  Height:  |  Size: 354 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>

After

Width:  |  Height:  |  Size: 800 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>

After

Width:  |  Height:  |  Size: 524 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>

After

Width:  |  Height:  |  Size: 493 B

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 547 B

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 503 B

+18 -18
View File
@@ -1,35 +1,35 @@
/**
* Custom javascript for FixIt site.
* Custom JavaScript for FixIt blog site.
* @author @Lruihao https://lruihao.cn
*/
const FixItCustom = new (function () {
class FixItBlog {
/**
* Hello World
* You can define your own functions below.
* @returns {FixItCustom}
* say hello
* you can define your own functions below
* @returns {FixItBlog}
*/
this.hello = () => {
console.log('FixItCustom echo: Hello FixIt!');
hello() {
console.log('custom.js: Hello FixIt!');
return this;
};
}
/**
* Initialize.
* @returns {FixItCustom}
* initialize
* @returns {FixItBlog}
*/
this.init = () => {
// Custom infos.
init() {
this.hello();
return this;
};
})();
}
}
/**
* Immediate.
* immediate execution
*/
(() => {
FixItCustom.init();
// It will be executed when the DOM tree is built.
window.fixitBlog = new FixItBlog();
// it will be executed when the DOM tree is built
document.addEventListener('DOMContentLoaded', () => {
// FixItCustom.init();
window.fixitBlog.init();
});
})();
+162 -125
View File
@@ -1,177 +1,205 @@
/**
* FixIt decryptor for encrypted pages and fixit-encryptor shortcode
* @param {Object} options
* @param {Function} [options.decrypted] [Lifecycle Hooks] handler after decrypting
* @param {Function} [options.reset] [Lifecycle Hooks] handler after encrypting again
* @param {Number} [options.duration=86400] number of seconds to cache decryption statistics. unit: s
* @author @Lruihao https://lruihao.cn
* @since v0.2.15
*/
FixItDecryptor = function (options = {}) {
var _proto = FixItDecryptor.prototype;
this.options = options || {};
this.options.duration = this.options.duration || 24 * 60 * 60; // default cache one day
this.decryptedEventSet = new Set();
this.resetEventSet = new Set();
this.$el = document.querySelector('.fixit-decryptor-container');
class FixItDecryptor {
/**
* FixIt decryptor for encrypted pages and fixit-encryptor shortcode
* @param {Object} options
* @param {Function} [options.decrypted] [Lifecycle Hooks] handler after decrypting
* @param {Function} [options.reset] [Lifecycle Hooks] handler after encrypting again
* @param {Number} [options.duration=86400] number of seconds to cache decryption statistics. unit: s
*/
constructor(options = {}) {
this.options = options || {};
this.options.duration = this.options.duration || 24 * 60 * 60; // default cache one day
this.decryptedEventSet = new Set();
this.partialDecryptedEventSet = new Set();
this.resetEventSet = new Set();
customElements.get('fixit-encryptor') || customElements.define('fixit-encryptor', class extends HTMLElement {});
customElements.get('cipher-text') || customElements.define('cipher-text', class extends HTMLElement {});
}
/**
* decrypt content
* @param {String} base64EncodeContent encrypted content
* @param {Element} $cipherText cipher text element
* @param {Element} $target target content element
* @param {String} salt salt string
*/
var _decryptContent = (base64EncodeContent) => {
#decryptContent($cipherText, $target, salt) {
try {
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('#fixit-decryptor-input').classList.add('d-none');
this.$el.querySelector('.fixit-encryptor-btn').classList.remove('d-none');
document.querySelector('#content').insertAdjacentHTML(
'afterbegin',
CryptoJS.enc.Base64.parse(base64EncodeContent).toString(CryptoJS.enc.Utf8)
);
$target.innerHTML = CryptoJS.enc.Base64
.parse($cipherText.innerText.replace(salt, ''))
.toString(CryptoJS.enc.Utf8);
$cipherText.parentElement.classList.add('decrypted');
} catch (err) {
return console.error(err);
}
// decrypted hook
console.log(this.decryptedEventSet)
for (const event of this.decryptedEventSet) {
event();
}
};
const eventSet = $target.id === 'content' ? this.decryptedEventSet : this.partialDecryptedEventSet;
for (const event of eventSet) {
event($target);
}
}
/**
* validate password
* @param {Element} $encryptor fixit-encryptor element
* @param {Function} callback callback function after password validation
* @returns
*/
async #validatePassword($encryptor, callback) {
const $cipherText = $encryptor.querySelector('cipher-text');
const password = $cipherText.dataset.password;
const inputEl = $encryptor.querySelector('.fixit-decryptor-input');
const input = inputEl.value.trim();
// Warning: insufficient-password-hash Weak hashing algorithms for passwords poses security risks.
const { h64ToString } = await xxhash();
const inputHash = h64ToString(input);
const inputSha256 = CryptoJS.SHA256(input).toString();
const saltLen = input.length % 2 ? input.length : input.length + 1;
inputEl.value = '';
inputEl.blur();
if (!input) {
alert('Please enter the correct password!');
return console.warn('Please enter the correct password!');
}
if (inputHash !== password) {
alert(`Password error: ${input} not the correct password!`);
return console.warn(`Password error: ${input} not the correct password!`);
}
callback($cipherText, inputHash, inputSha256.slice(saltLen));
}
/**
* initialize FixIt decryptor
* @param {Object} options
* @param {Boolean} options.all whether to decrypt all content
* @param {String} options.shortcode whether to decrypt fixit-encryptor shortcode
*/
_proto.init = () => {
init({ all, shortcode }) {
this.addEventListener('decrypted', this.options?.decrypted);
this.addEventListener('partial-decrypted', this.options?.partialDecrypted);
this.addEventListener('reset', this.options?.reset);
const $content = document.querySelector('#content');
if (shortcode) {
this.addEventListener('decrypted', () => {
this.initShortcodes($content);
});
this.addEventListener('partial-decrypted', ($parent) => {
this.initShortcodes($parent);
});
}
if (all) {
this.initPage();
} else if (shortcode) {
this.initShortcodes($content);
}
}
/**
* initialize FixIt decryptor for the encrypted pages
*/
initPage() {
this.validateCache();
const $encryptor = document.querySelector('article > fixit-encryptor');
const $content = document.querySelector('#content');
const _decryptor = this;
this.$el.querySelector('#fixit-decryptor-input')?.addEventListener('keydown', function (e) {
if (e.key === 'Enter') {
e.preventDefault();
const $content = document.querySelector('#content');
const password = $content.getAttribute('data-password');
const input = this.value.trim();
const saltLen = input.length % 2 ? input.length : input.length + 1;
const inputMd5 = CryptoJS.MD5(input).toString();
const inputSha256 = CryptoJS.SHA256(input).toString();
this.value = '';
this.blur();
if (!input) {
alert('Please enter the correct password!');
return console.warn('Please enter the correct password!');
}
if (inputMd5 !== password) {
alert(`Password error: ${input} not the correct password!`);
return console.warn(`Password error: ${input} not the correct password!`);
}
const decryptorHandler = () => {
this.#validatePassword($encryptor, ($cipherText, passwordHash, salt) => {
// cache decryption statistics
window.localStorage?.setItem(
`fixit-decryptor/#${location.pathname}`,
JSON.stringify({
expiration: Math.ceil(Date.now() / 1000) + _decryptor.options.duration,
md5: inputMd5,
sha256: inputSha256.slice(saltLen)
expiration: Math.ceil(Date.now() / 1000) + this.options.duration,
password: passwordHash,
salt,
})
);
_decryptContent($content.getAttribute('data-content').replace(inputSha256.slice(saltLen), ''));
this.#decryptContent($cipherText, $content, salt);
});
};
// bind decryptor input enter keydown event
$encryptor.querySelector('.fixit-decryptor-input')?.addEventListener('keydown', (e) => {
if (e.key === 'Enter') {
e.preventDefault();
decryptorHandler();
}
});
this.$el.querySelector('.fixit-encryptor-btn')?.addEventListener('click', function (e) {
// bind decryptor button click event
$encryptor.querySelector('.fixit-decryptor-btn')?.addEventListener('click', (e) => {
e.preventDefault();
this.classList.add('d-none')
_decryptor.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none');
document.querySelector('#content').innerHTML = '';
document.querySelector('#content').insertAdjacentElement(
'afterbegin',
_decryptor.$el
);
decryptorHandler();
});
// bind encryptor button click event
$encryptor.querySelector('.fixit-encryptor-btn')?.addEventListener('click', (e) => {
e.preventDefault();
$encryptor.classList.remove('decrypted');
$content.innerHTML = '';
window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`);
// reset hook
for (const event of _decryptor.resetEventSet) {
for (const event of this.resetEventSet) {
event();
}
});
};
$encryptor.classList.add('initialized');
}
/**
* initialize fixit-encryptor shortcodes
* initialize FixIt decryptor for fixit-encryptor shortcodes
* @param {Element} $parent parent element
*/
_proto.initShortcodes = () => {
// TODO TODO shortcode decrypted event
// this.addEventListener('decrypted', this.options?.decrypted);
const _decryptor = this;
const $shortcodes = document.querySelectorAll('fixit-encryptor:not(.decrypted)');
initShortcodes($parent) {
const $shortcodes = $parent.querySelectorAll('fixit-encryptor:not(.initialized)');
$shortcodes.forEach($shortcode => {
const decryptorHandler = () => {
const $content = $shortcode.querySelector('.decryptor-content');
this.#validatePassword($shortcode, ($cipherText, passwordHash, salt) => {
this.#decryptContent($cipherText, $content, salt);
});
};
// bind decryptor input enter keydown event
$shortcode.querySelector('.fixit-decryptor-input')?.addEventListener('keydown', function (e) {
if (e.key === 'Enter') {
e.preventDefault();
const $decryptor = this.parentElement.parentElement;
const $content = $decryptor.nextElementSibling;
const password = $content.getAttribute('data-password');
const input = this.value.trim();
const saltLen = input.length % 2 ? input.length : input.length + 1;
const inputMd5 = CryptoJS.MD5(input).toString();
const inputSha256 = CryptoJS.SHA256(input).toString();
this.value = '';
this.blur();
if (!input) {
alert('Please enter the correct password!');
return console.warn('Please enter the correct password!');
}
if (inputMd5 !== password) {
alert(`Password error: ${input} not the correct password!`);
return console.warn(`Password error: ${input} not the correct password!`);
}
try {
const base64EncodeContent = $content.getAttribute('data-content').replace(inputSha256.slice(saltLen), '');
$decryptor.querySelector('.fixit-decryptor-input').classList.add('d-none');
$content.insertAdjacentHTML(
'afterbegin',
CryptoJS.enc.Base64.parse(base64EncodeContent).toString(CryptoJS.enc.Utf8)
);
$decryptor.parentElement.classList.add('decrypted');
} catch (err) {
return console.error(err);
}
// TODO shortcode decrypted hook
// for (const event of _decryptor.decryptedEventSet) {
// event();
// }
decryptorHandler();
}
});
// bind decryptor button click event
$shortcode.querySelector('.fixit-decryptor-btn')?.addEventListener('click', function (e) {
e.preventDefault();
decryptorHandler();
});
$shortcode.classList.add('initialized');
});
};
}
/**
* validate the cached decryption statistics in localStorage
* @returns {FixItDecryptor}
*/
_proto.validateCache = () => {
validateCache() {
const $content = document.querySelector('#content');
const password = $content.getAttribute('data-password');
const $encryptor = document.querySelector('article > fixit-encryptor');
const $cipherText = $encryptor.querySelector('cipher-text');
const password = $cipherText.dataset.password;
const cachedStat = JSON.parse(window.localStorage?.getItem(`fixit-decryptor/#${location.pathname}`));
if (!cachedStat) {
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none');
if (!cachedStat || cachedStat?.password !== password || Number(cachedStat?.expiration) < Math.ceil(Date.now() / 1000)) {
if (cachedStat) {
window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`);
console.warn('The password has expired, please re-enter!');
}
return this;
}
if (cachedStat?.md5 !== password || Number(cachedStat?.expiration) < Math.ceil(Date.now() / 1000)) {
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none');
window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`);
console.warn('The password has expired, please re-enter!');
return this;
}
_decryptContent($content.getAttribute('data-content').replace(cachedStat.sha256, ''));
this.#decryptContent($cipherText, $content, cachedStat.salt);
return this;
};
}
/**
* add event listener for FixIt Decryptor
@@ -179,7 +207,7 @@ FixItDecryptor = function (options = {}) {
* @param {Function} listener event handler
* @returns {FixItDecryptor}
*/
_proto.addEventListener = (event, listener) => {
addEventListener(event, listener) {
if (typeof listener !== 'function') {
return this;
}
@@ -187,6 +215,9 @@ FixItDecryptor = function (options = {}) {
case 'decrypted':
this.decryptedEventSet.add(listener);
break;
case 'partial-decrypted':
this.partialDecryptedEventSet.add(listener);
break;
case 'reset':
this.resetEventSet.add(listener);
break;
@@ -195,7 +226,7 @@ FixItDecryptor = function (options = {}) {
break;
}
return this;
};
}
/**
* remove event listener for FixIt Decryptor
@@ -203,7 +234,7 @@ FixItDecryptor = function (options = {}) {
* @param {Function} listener event handler
* @returns {FixItDecryptor}
*/
_proto.removeEventListener = (event, listener) => {
removeEventListener(event, listener) {
if (typeof listener !== 'function') {
return this;
}
@@ -211,6 +242,9 @@ FixItDecryptor = function (options = {}) {
case 'decrypted':
this.decryptedEventSet.delete(listener);
break;
case 'partial-decrypted':
this.partialDecryptedEventSet.delete(listener);
break;
case 'reset':
this.resetEventSet.delete(listener);
break;
@@ -219,5 +253,8 @@ FixItDecryptor = function (options = {}) {
break;
}
return this;
};
};
}
}
window.FixItDecryptor = FixItDecryptor;
-3
View File
@@ -8,14 +8,12 @@ const BASE_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/fixit.min.svg'
];
const OFFLINE_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/fixit.min.svg',
'/offline/'
];
@@ -23,7 +21,6 @@ const NOT_FOUND_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/fixit.min.svg',
'/404.html'
];
+209 -296
View File
@@ -1,66 +1,8 @@
class Util {
forEach(elements, handler) {
elements = elements || [];
for (let i = 0; i < elements.length; i++) {
handler(elements[i]);
}
}
getScrollTop() {
return (document.documentElement ?? document.body).scrollTop;
}
isMobile() {
return window.matchMedia('only screen and (max-width: 680px)').matches;
}
isTocStatic() {
return window.matchMedia('only screen and (max-width: 960px)').matches;
}
/**
* add animate to element
* @param {Element} element animate element
* @param {String|Array<String>} animation animation name
* @param {Boolean} reserved reserved animation
* @param {Function} callback remove callback
*/
animateCSS(element, animation, reserved, callback) {
!Array.isArray(animation) && (animation = [animation]);
element.classList.add('animate__animated', ...animation);
element.addEventListener('animationend', () => {
!reserved && element.classList.remove('animate__animated', ...animation);
typeof callback === 'function' && callback();
}, { once: true });
}
/**
* date validator
* @param {*} date may be date or not
* @returns {Boolean}
*/
isValidDate(date) {
return date instanceof Date && !isNaN(date.getTime());
}
/**
* scroll some element into view
* @param {String} selector element to scroll
*/
scrollIntoView(selector) {
const element = selector.startsWith('#')
? document.getElementById(selector.slice(1))
: document.querySelector(selector);
element?.scrollIntoView({
behavior: 'smooth'
});
}
}
import Util from './util';
class FixIt {
constructor() {
this.config = window.config;
this.data = this.config.data;
this.isDark = document.body.dataset.theme === 'dark';
this.util = new Util();
this.newScrollTop = this.util.getScrollTop();
@@ -106,8 +48,8 @@ class FixIt {
});
}
initTwemoji() {
this.config.twemoji && twemoji.parse(document.body);
initTwemoji(target = document.body) {
this.config.twemoji && twemoji.parse(target);
}
initMenu() {
@@ -151,7 +93,7 @@ class FixIt {
this.isDark = !this.isDark;
window.localStorage?.setItem('theme', this.isDark ? 'dark' : 'light');
for (let event of this.switchThemeEventSet) {
event();
event(this.isDark);
}
}, false);
});
@@ -255,74 +197,7 @@ class FixIt {
$searchClear.style.display = 'inline';
callback(results);
};
if (searchConfig.type === 'lunr') {
const search = () => {
if (lunr.queryHandler) {
query = lunr.queryHandler(query);
}
const results = {};
this._index.search(query).forEach(({ ref, matchData: { metadata } }) => {
const matchData = this._indexData[ref];
let { uri, title, content: context } = matchData;
if (results[uri]) {
return;
}
let position = 0;
Object.values(metadata).forEach(({ content }) => {
if (content) {
const matchPosition = content.position[0][0];
if (matchPosition < position || position === 0) {
position = matchPosition;
}
}
});
position -= snippetLength / 5;
if (position > 0) {
position += context.substr(position, 20).lastIndexOf(' ') + 1;
context = '...' + context.substr(position, snippetLength);
} else {
context = context.substr(0, snippetLength);
}
Object.keys(metadata).forEach((key) => {
title = title.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1</${highlightTag}>`);
context = context.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1</${highlightTag}>`);
});
results[uri] = {
uri: uri,
title: title,
date: matchData.date,
context: context
};
});
return Object.values(results).slice(0, maxResultLength);
};
if (!this._index) {
fetch(searchConfig.lunrIndexURL)
.then((response) => response.json())
.then((data) => {
const indexData = {};
this._index = lunr(function () {
if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);
this.ref('objectID');
this.field('title', { boost: 50 });
this.field('tags', { boost: 20 });
this.field('categories', { boost: 20 });
this.field('content', { boost: 10 });
this.metadataWhitelist = ['position'];
data.forEach((record) => {
indexData[record.objectID] = record;
this.add(record);
});
});
this._indexData = indexData;
finish(search());
})
.catch((err) => {
console.error(err);
finish([]);
});
} else finish(search());
} else if (searchConfig.type === 'algolia') {
if (searchConfig.type === 'algolia') {
this._algoliaIndex =
this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);
this._algoliaIndex
@@ -358,7 +233,7 @@ class FixIt {
const results = {};
window._index.search(query).forEach(({ item, refIndex, matches }) => {
let title = item.title;
let content = item.content;
let content = item.content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
matches.forEach(({ indices, value, key }) => {
if (key === 'content') {
let offset = 0;
@@ -428,17 +303,11 @@ class FixIt {
icon: '<i class="fa-brands fa-algolia fa-fw" aria-hidden="true"></i>',
href: 'https://www.algolia.com/'
}
: (searchConfig.type === 'lunr'
? {
searchType: 'Lunr.js',
icon: '',
href: 'https://lunrjs.com/'
}
: {
searchType: 'Fuse.js',
icon: '',
href: 'https://fusejs.io/'
})
: {
searchType: 'Fuse.js',
icon: '',
href: 'https://fusejs.io/'
}
return `<div class="search-footer">Search by <a href="${href}" rel="noopener noreferrer" target="_blank">${icon} ${searchType}</a></div>`;
}
}
@@ -453,31 +322,19 @@ class FixIt {
this._searchDesktop = autosearch;
}
};
if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {
const script = document.createElement('script');
script.id = 'lunr-segmentit';
script.src = searchConfig.lunrSegmentitURL;
script.async = true;
if (script.readyState) {
script.onreadystatechange = () => {
if (script.readyState == 'loaded' || script.readyState == 'complete') {
script.onreadystatechange = null;
initAutosearch();
}
};
} else {
script.onload = () => {
initAutosearch();
};
}
document.body.appendChild(script);
} else {
initAutosearch();
initAutosearch();
}
initBreadcrumb() {
const $breadcrumbContainer = document.querySelector('.breadcrumb-container.sticky')
this.breadcrumbHeight = $breadcrumbContainer?.clientHeight ?? 0;
if (this.breadcrumbHeight) {
document.querySelector('main.container')?.style.setProperty('--fi-breadcrumb-height', `${this.breadcrumbHeight}px`);
}
}
initDetails() {
this.util.forEach(document.getElementsByClassName('details'), ($details) => {
initDetails(target = document) {
this.util.forEach(target.getElementsByClassName('details'), ($details) => {
const $summary = $details.querySelector('.details-summary');
$summary.addEventListener('click', () => {
$details.classList.toggle('open');
@@ -487,7 +344,8 @@ class FixIt {
initLightGallery() {
if (this.config.lightgallery) {
lightGallery(document.getElementById('content'), {
this.lg && this.lg.destroy(true);
this.lg = lightGallery(document.getElementById('content'), {
plugins: [lgThumbnail, lgZoom],
selector: '.lightgallery',
speed: 400,
@@ -504,7 +362,15 @@ class FixIt {
}
}
initHighlight() {
/**
* init code wrapper
*/
initCodeWrapper() {
if (!this.config.code) {
this.initCopyCode();
return
}
// if markup.highlight.lineNumbersInTable set to false
this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), ($preChroma) => {
const $chroma = document.createElement('div');
$chroma.className = $preChroma.className;
@@ -519,7 +385,13 @@ class FixIt {
$preChroma.parentElement.replaceChild($chroma, $preChroma);
$td.appendChild($preChroma);
});
this.util.forEach(document.querySelectorAll('.highlight > .chroma'), ($chroma) => {
// render code header
this.util.forEach(document.querySelectorAll('.highlight > .chroma:not([data-init])'), ($chroma) => {
$chroma.dataset.init = 'true';
if ($chroma.parentElement.classList.contains('no-header')) {
this.initCopyCode($chroma);
return;
}
const $codeElements = $chroma.querySelectorAll('pre.chroma > code');
if ($codeElements.length) {
const $code = $codeElements[$codeElements.length - 1];
@@ -528,7 +400,13 @@ class FixIt {
// code title
const $title = document.createElement('span');
$title.classList.add('code-title');
$title.insertAdjacentHTML('afterbegin', '<i class="arrow fa-solid fa-chevron-right fa-fw" aria-hidden="true"></i>');
// insert code title inner
$title.insertAdjacentHTML(
'afterbegin',
$chroma.parentNode.title
? `<i class="arrow fa-solid fa-chevron-right fa-fw" aria-hidden="true"></i><span class="title-inner">${$chroma.parentNode.title}</span>`
: '<i class="arrow fa-solid fa-chevron-right fa-fw" aria-hidden="true"></i>'
);
$title.addEventListener('click', () => {
$chroma.classList.toggle('open');
}, false);
@@ -545,20 +423,20 @@ class FixIt {
if (this.config.code.editable) {
const $edit = document.createElement('span');
$edit.classList.add('edit');
$edit.insertAdjacentHTML('afterbegin', `<i class="fa-solid fa-key fa-fw" title="${this.config.code.editUnLockTitle}" aria-hidden="true"></i>`);
$edit.insertAdjacentHTML('afterbegin', `<i class="fa-solid fa-pen-to-square fa-fw" title="${this.config.code.editUnLockTitle}" aria-hidden="true"></i>`);
$edit.addEventListener('click', () => {
const $iconKey = $edit.querySelector('.fa-key');
const $iconKey = $edit.querySelector('.fa-pen-to-square');
const $iconLock = $edit.querySelector('.fa-lock');
const $preChromas = $edit.parentElement.parentElement.querySelectorAll('pre.chroma');
const $preChroma = $preChromas.length === 2 ? $preChromas[1] : $preChromas[0];
if ($iconKey) {
$iconKey.classList.add('fa-lock');
$iconKey.classList.remove('fa-key');
$iconKey.classList.remove('fa-pen-to-square');
$iconKey.title = this.config.code.editLockTitle;
$preChroma.setAttribute('contenteditable', true);
$preChroma.focus();
} else {
$iconLock.classList.add('fa-key');
$iconLock.classList.add('fa-pen-to-square');
$iconLock.classList.remove('fa-lock');
$iconLock.title = this.config.code.editUnLockTitle;
$preChroma.setAttribute('contenteditable', false);
@@ -573,8 +451,15 @@ class FixIt {
$copy.insertAdjacentHTML('afterbegin', '<i class="fa-regular fa-copy fa-fw" aria-hidden="true"></i>');
$copy.classList.add('copy');
// remove the leading and trailing whitespace of the code string
const code = $code.innerText.trim();
if (this.config.code.maxShownLines < 0 || code.split('\n').length < this.config.code.maxShownLines + 2) {
let code = $code.innerText.trim();
// in the details element, the code string cannot be gotten directly.
if ($chroma.closest('details') !== null) {
const _tempEl = document.createElement('div');
_tempEl.appendChild($code.cloneNode(true));
code = _tempEl.innerText.trim();
}
const forceOpen = $chroma.parentElement.dataset.open ? JSON.parse($chroma.parentElement.dataset.open) : void 0;
if (forceOpen ?? (this.config.code.maxShownLines < 0 || code.split('\n').length < this.config.code.maxShownLines + 2)) {
$chroma.classList.add('open');
}
$copy.title = this.config.code.copyTitle;
@@ -592,8 +477,8 @@ class FixIt {
});
}
initTable() {
this.util.forEach(document.querySelectorAll('.content table'), ($table) => {
initTable(target = document) {
this.util.forEach(target.querySelectorAll('.content table'), ($table) => {
const $wrapper = document.createElement('div');
$wrapper.className = 'table-wrapper';
$table.parentElement.replaceChild($wrapper, $table);
@@ -601,29 +486,24 @@ class FixIt {
});
}
initHeaderLink() {
for (let num = 1; num <= 6; num++) {
this.util.forEach(document.querySelectorAll('.single .content > h' + num), ($header) => {
$header.classList.add('header-link');
$header.insertAdjacentHTML('afterbegin', `<a href="#${$header.id}" class="header-mark"></a>`);
});
}
/**
* init simple copy code when there is no code header
* https://github.com/github/clipboard-copy-element
* @param {ELement} singleCode single code block
*/
initCopyCode(singleCode) {
// TODO
}
/**
* init table of contents
*/
initToc() {
let $tocCore = document.getElementById('TableOfContents');
const $tocCore = document.getElementById('TableOfContents');
if ($tocCore === null) {
return;
}
// It's a dirty hack to fix the bug of APlayer, see https://github.com/hugo-fixit/FixIt/issues/292
if (typeof APlayer === 'function') {
const $newTocCore = $tocCore.cloneNode(true);
$tocCore.parentElement.replaceChild($newTocCore, $tocCore);
$tocCore = $newTocCore;
}
if (document.getElementById('toc-static').dataset.kept === true || this.util.isTocStatic()) {
if (document.getElementById('toc-static').dataset.kept === 'true' || this.util.isTocStatic()) {
const $tocContentStatic = document.getElementById('toc-content-static');
if ($tocCore.parentElement !== $tocContentStatic) {
$tocCore.parentElement.removeChild($tocCore);
@@ -643,8 +523,7 @@ class FixIt {
$toc.style.marginTop = `${$postMeta.offsetTop + $postMeta.clientHeight}px`;
const $tocLinkElements = $tocCore.querySelectorAll('a:first-child');
const $tocLiElements = $tocCore.getElementsByTagName('li');
const $headerLinkElements = document.getElementsByClassName('header-link');
const headerIsFixed = document.body.dataset.headerDesktop !== 'normal';
const $headingElements = document.getElementsByClassName('heading-element');
const headerHeight = document.getElementById('header-desktop').offsetHeight;
document.querySelector('.container').addEventListener('resize', () => {
$toc.style.marginBottom = `${document.querySelector('.container').clientHeight - document.querySelector('.post-footer').offsetTop}px`;
@@ -657,17 +536,17 @@ class FixIt {
this.util.forEach($tocLiElements, ($tocLi) => {
$tocLi.classList.remove('has-active');
});
const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);
let activeTocIndex = $headerLinkElements.length - 1;
for (let i = 0; i < $headerLinkElements.length - 1; i++) {
const thisTop = $headerLinkElements[i].getBoundingClientRect().top;
const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;
const INDEX_SPACING = 20 + (document.body.dataset.headerDesktop !== 'normal' ? headerHeight : 0) + this.breadcrumbHeight;
let activeTocIndex = $headingElements.length - 1;
for (let i = 0; i < $headingElements.length - 1; i++) {
const thisTop = $headingElements[i].getBoundingClientRect().top;
const nextTop = $headingElements[i + 1].getBoundingClientRect().top;
if ((i == 0 && thisTop > INDEX_SPACING) || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {
activeTocIndex = i;
break;
}
}
if (activeTocIndex !== -1) {
if (activeTocIndex !== -1 && $tocLinkElements[activeTocIndex]) {
$tocLinkElements[activeTocIndex].classList.add('active');
let $parent = $tocLinkElements[activeTocIndex].parentElement;
while ($parent !== $tocCore) {
@@ -694,30 +573,59 @@ class FixIt {
}, false);
}
initMath() {
if (this.config.math) {
renderMathInElement(document.body, this.config.math);
/**
* It's a dirty hack to fix the bug of APlayer and smoothScroll.
* see https://github.com/hugo-fixit/FixIt/issues/292
*/
fixTocScroll() {
if (typeof APlayer === 'function') {
// remove APlayer click event listener of the toc link
let $tocCore = document.getElementById('TableOfContents');
if ($tocCore) {
const $newTocCore = $tocCore.cloneNode(true);
$tocCore.parentElement.replaceChild($newTocCore, $tocCore);
$tocCore = $newTocCore;
}
// remove APlayer click event listener of the heading mark
this.util.forEach(document.querySelectorAll('.heading-mark'), ($headingMark) => {
const $newHeadingMark = $headingMark.cloneNode(true);
$headingMark.parentElement.replaceChild($newHeadingMark, $headingMark);
});
}
}
switchMermaidTheme(theme) {
const $mermaidElements = document.getElementsByClassName('mermaid');
if ($mermaidElements.length) {
// TODO perf
const themes = this.config.mermaid.themes ?? ['default', 'dark', 'neutral'];
mermaid.initialize({ startOnLoad: false, theme: theme ?? (this.isDark ? themes[1] : themes[0]), securityLevel: 'loose' });
this.util.forEach($mermaidElements, $mermaid => {
mermaid.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {
$mermaid.innerHTML = svgCode;
}, $mermaid);
});
initMath(target = document.body) {
if (this.config.math) {
renderMathInElement(target, this.config.math);
}
};
}
initMermaid() {
this.switchMermaidTheme();
this.switchThemeEventSet.add(() => { this.switchMermaidTheme(); });
this.beforeprintEventSet.add(() => { this.switchMermaidTheme('neutral'); });
if (!window.mermaid?.initialize) {
return;
}
const _initializeAndRun = () => {
const themes = window.mermaid.themes ?? ['default', 'dark'];
window.mermaid.initialize({
securityLevel: 'loose',
startOnLoad: false,
theme: this.isDark ? themes[1] : themes[0],
});
window.mermaid.run()
}
_initializeAndRun()
this.switchThemeEventSet.add(() => {
// Reinitialize and run mermaid when theme changes.
this.util.forEach(document.querySelectorAll('.mermaid[data-processed]'), ($mermaid) => {
$mermaid.dataset.processed = ''
$mermaid.innerHTML = ''
$mermaid.appendChild($mermaid.nextElementSibling.content.cloneNode(true))
})
_initializeAndRun()
});
this.beforeprintEventSet.add(() => {
// Set the theme to neutral when printing.
});
}
initEcharts() {
@@ -732,11 +640,16 @@ class FixIt {
this._echartsArr[i].dispose();
}
this._echartsArr = [];
const stagingDOM = this.util.getStagingDOM()
this.util.forEach(document.getElementsByClassName('echarts'), ($echarts) => {
const chart = echarts.init($echarts, this.isDark ? 'dark' : 'light', { renderer: 'svg' });
chart.setOption(JSON.parse(this.data[$echarts.id]));
this._echartsArr.push(chart);
if ($echarts.nextElementSibling.tagName === 'TEMPLATE') {
const chart = echarts.init($echarts, this.isDark ? 'dark' : 'light', { renderer: 'svg' });
stagingDOM.stage($echarts.nextElementSibling.content.cloneNode(true));
chart.setOption(stagingDOM.contentAsJson());
this._echartsArr.push(chart);
}
});
stagingDOM.destroy();
});
this.switchThemeEventSet.add(this._echartsOnSwitchTheme);
this._echartsOnSwitchTheme();
@@ -750,11 +663,13 @@ class FixIt {
initMapbox() {
if (this.config.mapbox) {
mapboxgl.accessToken = this.config.mapbox.accessToken;
mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);
this._mapboxArr = this._mapboxArr || [];
this.util.forEach(document.getElementsByClassName('mapbox'), ($mapbox) => {
const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];
if (!mapboxgl.accessToken) {
mapboxgl.accessToken = this.config.mapbox.accessToken;
mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);
this._mapboxArr = this._mapboxArr || [];
}
this.util.forEach(document.querySelectorAll('.mapbox:empty'), ($mapbox) => {
const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = JSON.parse($mapbox.dataset.options);
const mapbox = new mapboxgl.Map({
container: $mapbox,
center: [lng, lat],
@@ -793,7 +708,7 @@ class FixIt {
this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {
this.util.forEach(this._mapboxArr, (mapbox) => {
const $mapbox = mapbox.getContainer();
const { lightStyle, darkStyle } = this.data[$mapbox.id];
const { lightStyle, darkStyle } = JSON.parse($mapbox.dataset.options);
mapbox.setStyle(this.isDark ? darkStyle : lightStyle);
mapbox.addControl(new MapboxLanguage());
});
@@ -802,31 +717,52 @@ class FixIt {
}
}
initTypeit() {
initTypeit(target = document) {
if (this.config.typeit) {
const typeitConfig = this.config.typeit;
const speed = typeitConfig.speed || 100;
const cursorSpeed = typeitConfig.cursorSpeed || 1000;
const cursorChar = typeitConfig.cursorChar || '|';
const loop = typeitConfig.loop ?? false;
Object.values(typeitConfig.data).forEach((group) => {
// divide them into different groups according to the data-group attribute value of the element
// results in an object like {group1: [ele1, ele2], group2: [ele3, ele4]}
const typeitElements = target.querySelectorAll('.typeit')
const groupMap = Array.from(typeitElements).reduce((acc, ele) => {
const group = ele.dataset.group || ele.id || Math.random().toString(36).substring(2);
acc[group] = acc[group] || [];
acc[group].push(ele);
return acc;
}, {});
const stagingDOM = this.util.getStagingDOM()
Object.values(groupMap).forEach((group) => {
const typeone = (i) => {
const id = group[i];
const shortcodeLoop = document.querySelector(`#${id}`).parentElement.dataset.loop;
const instance = new TypeIt(`#${id}`, {
strings: this.data[id],
speed: speed,
const typeitElement = group[i];
const singleData = typeitElement.dataset;
stagingDOM.stage(typeitElement.querySelector('template').content.cloneNode(true));
// for shortcodes usage
let targetEle = typeitElement.firstElementChild
// for system elements usage
if (typeitElement.firstElementChild.tagName === 'TEMPLATE') {
typeitElement.innerHTML = '';
targetEle = typeitElement
}
// create a new instance of TypeIt for each element
const instance = new TypeIt(targetEle, {
strings: stagingDOM.$el.querySelector('pre')?.innerHTML || stagingDOM.contentAsHtml(),
speed: Number(singleData.speed) >= 0 ? Number(singleData.speed) : speed,
lifeLike: true,
cursorSpeed: cursorSpeed,
cursorChar: cursorChar,
cursorSpeed: Number(singleData.cursorSpeed) >= 0 ? Number(singleData.cursorSpeed) : cursorSpeed,
cursorChar: singleData.cursorChar || cursorChar,
waitUntilVisible: true,
loop: shortcodeLoop ? JSON.parse(shortcodeLoop) : loop,
loop: singleData.loop ? singleData.loop === 'true' : loop,
afterComplete: () => {
const duration = Number(singleData.duration ?? vtypeitConfig.duration);
if (i === group.length - 1) {
if (typeitConfig.duration >= 0) {
if (duration >= 0) {
window.setTimeout(() => {
instance.destroy();
}, typeitConfig.duration);
}, duration);
}
return;
}
@@ -837,6 +773,7 @@ class FixIt {
};
typeone(0);
});
stagingDOM.destroy();
}
}
@@ -963,7 +900,7 @@ class FixIt {
const giscusConfig = this.config.comment.giscus;
this._giscusOnSwitchTheme = this._giscusOnSwitchTheme || (() => {
const message = { setConfig: { theme: this.isDark ? giscusConfig.darkTheme : giscusConfig.lightTheme }};
document.querySelector('.giscus-frame')?.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
document.querySelector('.giscus-frame')?.contentWindow.postMessage({ giscus: message }, giscusConfig.origin);
});
this.switchThemeEventSet.add(this._giscusOnSwitchTheme);
this.giscus2parentMsg = window.addEventListener('message', (event) => {
@@ -978,7 +915,7 @@ class FixIt {
}
initCookieconsent() {
this.config.cookieconsent && cookieconsent.initialise(this.config.cookieconsent);
this.config.cookieconsent && window.cookieconsent?.initialise(this.config.cookieconsent);
}
getSiteTime = () => {
@@ -1033,7 +970,7 @@ class FixIt {
this.config.watermark?.enable &&
new Watermark({
content: this.config.watermark.content || `${document.querySelector('footer .fixit-icon')?.outerHTML ?? ''} FixIt Theme`,
appendTo: this.config.watermark.appendto || '.wrapper>main',
appendTo: '.widgets',
opacity: this.config.watermark.opacity,
width: this.config.watermark.width,
height: this.config.watermark.height,
@@ -1064,66 +1001,49 @@ class FixIt {
}
initFixItDecryptor() {
const $tocNodes = document.querySelectorAll('#toc-auto>.d-none, #toc-static.d-none');
this.decryptor = new FixItDecryptor({
decrypted: () => {
this.initTwemoji();
this.initDetails();
this.initLightGallery();
this.initHighlight();
this.initCodeWrapper();
this.initTable();
this.initHeaderLink();
this.initMath();
this.initMermaid();
this.initEcharts();
this.initTypeit();
this.initMapbox();
this.util.forEach($tocNodes, ($element) => {
$element.classList.remove('d-none');
});
this.initToc();
this.initTocListener();
this.initPangu();
this.fixTocScroll();
this.util.forEach(document.querySelectorAll('.encrypted-hidden'), ($element) => {
$element.classList.replace('encrypted-hidden', 'decrypted-shown');
});
},
partialDecrypted: ($content) => {
this.initTwemoji($content);
this.initDetails($content);
this.initLightGallery();
this.initCodeWrapper();
this.initTable($content);
this.initMath($content);
this.initMermaid();
this.initEcharts();
this.initTypeit($content);
this.initMapbox();
this.initPangu();
this.util.forEach($content.querySelectorAll('.encrypted-hidden'), ($element) => {
$element.classList.replace('encrypted-hidden', 'decrypted-shown');
});
},
reset: () => {
this.util.forEach($tocNodes, ($element) => {
$element.classList.add('d-none');
this.util.forEach(document.querySelectorAll('.decrypted-shown'), ($element) => {
$element.classList.replace('decrypted-shown', 'encrypted-hidden');
});
}
});
if (this.config.encryption?.shortcode) {
this.decryptor.addEventListener('decrypted', () => {
this.decryptor.initShortcodes();
})
this.decryptor.initShortcodes();
}
this.config.encryption?.all && this.decryptor.init();
}
initMDevtools() {
const type = this.config?.mDevtools;
if (typeof window.orientation === 'undefined') {
return;
}
if (type === 'vConsole') {
const vConsole = new VConsole({
target: '.widgets',
theme: this.isDark ? 'dark' : 'light'
});
this._vConsoleOnSwitchTheme = this._vConsoleOnSwitchTheme || (() => {
vConsole.setOption('theme', this.isDark ? 'dark' : 'light');
});
this.switchThemeEventSet.add(this._vConsoleOnSwitchTheme);
}
if(type === 'eruda') {
eruda.init({
defaults: { theme: this.isDark ? 'Dark' : 'Light' }
});
this._erudaOnSwitchTheme = this._erudaOnSwitchTheme || (() => {
eruda.util.evalCss.setTheme(this.isDark ? 'Dark' : 'Light');
});
this.switchThemeEventSet.add(this._erudaOnSwitchTheme);
}
this.decryptor.init(this.config.encryption);
}
initAutoMark() {
@@ -1131,9 +1051,9 @@ class FixIt {
return;
}
window.addEventListener('beforeunload', () => {
window.localStorage?.setItem(`fixit-bookmark/#${location.pathname}`, this.util.getScrollTop());
window.sessionStorage?.setItem(`fixit-bookmark/#${location.pathname}`, this.util.getScrollTop());
});
const scrollTop = Number(window.localStorage?.getItem(`fixit-bookmark/#${location.pathname}`));
const scrollTop = Number(window.sessionStorage?.getItem(`fixit-bookmark/#${location.pathname}`));
// If the page opens with a specific hash, just jump out
if (scrollTop && location.hash === '') {
window.scrollTo({
@@ -1179,7 +1099,6 @@ class FixIt {
const $fixedButtons = document.querySelector('.fixed-buttons');
const $backToTop = document.querySelector('.back-to-top');
const $readingProgressBar = document.querySelector('.reading-progress-bar');
let scrollTimer = void 0;
if (document.body.dataset.headerDesktop === 'auto') {
$headers.push(document.getElementById('header-desktop'));
}
@@ -1198,12 +1117,6 @@ class FixIt {
const $mask = document.getElementById('mask');
this.newScrollTop = this.util.getScrollTop();
const scroll = this.newScrollTop - this.oldScrollTop;
// body scrollbar style
document.body.toggleAttribute('data-scroll', true);
scrollTimer && window.clearTimeout(scrollTimer);
scrollTimer = window.setTimeout(() => {
document.body.toggleAttribute('data-scroll');
}, 500);
// header animation
this.util.forEach($headers, ($header) => {
if (scroll > ACCURACY) {
@@ -1253,7 +1166,6 @@ class FixIt {
event();
}
this.initToc();
this.switchMermaidTheme();
this.initSearch();
const isMobile = this.util.isMobile()
@@ -1294,13 +1206,13 @@ class FixIt {
try {
if (this.config.encryption) {
this.initFixItDecryptor();
} else if (!this.config.encryption?.all) {
}
if (!this.config.encryption?.all) {
this.initTwemoji();
this.initDetails();
this.initLightGallery();
this.initHighlight();
this.initCodeWrapper();
this.initTable();
this.initHeaderLink();
this.initMath();
this.initMermaid();
this.initEcharts();
@@ -1313,11 +1225,11 @@ class FixIt {
this.initMenu();
this.initSwitchTheme();
this.initSearch();
this.initBreadcrumb();
this.initCookieconsent();
this.initSiteTime();
this.initServiceWorker();
this.initWatermark();
this.initMDevtools();
this.initAutoMark();
this.initReward();
@@ -1326,6 +1238,7 @@ class FixIt {
if (!this.config.encryption?.all) {
this.initToc();
this.initTocListener();
this.fixTocScroll();
}
this.onScroll();
this.onResize();
-3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+89
View File
@@ -0,0 +1,89 @@
export default class Util {
forEach(elements, handler) {
elements = elements || [];
for (let i = 0; i < elements.length; i++) {
handler(elements[i]);
}
}
getScrollTop() {
return (document.documentElement ?? document.body).scrollTop;
}
isMobile() {
return window.matchMedia('only screen and (max-width: 680px)').matches;
}
isTocStatic() {
return window.matchMedia('only screen and (max-width: 960px)').matches;
}
/**
* add animate to element
* @param {Element} element animate element
* @param {String|Array<String>} animation animation name
* @param {Boolean} reserved reserved animation
* @param {Function} callback remove callback
*/
animateCSS(element, animation, reserved, callback) {
!Array.isArray(animation) && (animation = [animation]);
element.classList.add('animate__animated', ...animation);
element.addEventListener('animationend', () => {
!reserved && element.classList.remove('animate__animated', ...animation);
typeof callback === 'function' && callback();
}, { once: true });
}
/**
* date validator
* @param {*} date may be date or not
* @returns {Boolean}
*/
isValidDate(date) {
return date instanceof Date && !isNaN(date.getTime());
}
/**
* scroll some element into view
* @param {String} selector element to scroll
*/
scrollIntoView(selector) {
const element = selector.startsWith('#')
? document.getElementById(selector.slice(1))
: document.querySelector(selector);
element?.scrollIntoView({
behavior: 'smooth'
});
}
/**
* get a hidden element for temporary use
* @returns {Object} { $el: Element, destroy: Function }
*/
getStagingDOM() {
const stagingElement = document.createElement('div')
stagingElement.style.display = 'none';
stagingElement.dataset.stagingId = Math.random().toString(36).slice(2);
document.body.appendChild(stagingElement);
return {
$el: stagingElement,
stage(dom) {
stagingElement.innerHTML = '';
stagingElement.appendChild(dom);
},
contentAsHtml() {
return stagingElement.innerHTML;
},
contentAsText() {
return stagingElement.innerText;
},
contentAsJson() {
return JSON.parse(stagingElement.innerHTML);
},
destroy() {
document.body.removeChild(stagingElement);
}
}
}
}
+13 -15
View File
@@ -1,32 +1,30 @@
algoliasearch@4.14.2 https://github.com/algolia/algoliasearch-client-javascript
algoliasearch@4.20.0 https://github.com/algolia/algoliasearch-client-javascript
animate.css@4.1.1 https://github.com/daneden/animate.css
aplayer@1.10.1 https://github.com/MoePlayer/APlayer
artalk@2.5.2 https://github.com/ArtalkJS/Artalk
artalk@latest https://github.com/ArtalkJS/Artalk
autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
cell-watermark@1.0.3 https://github.com/Lruihao/watermark
cookieconsent@3.1.1 https://github.com/osano/cookieconsent
crypto-js@4.1.1 https://github.com/brix/crypto-js
crypto-js@4.2.0 https://github.com/brix/crypto-js
echarts@5.3.3 https://github.com/apache/echarts
TODO update emoji-data to 15.x
emoji-data@14.0.0 https://github.com/iamcal/emoji-data
eruda@2.5.0 https://github.com/liriliri/eruda
fontawesome-free@6.2.0 https://github.com/FortAwesome/Font-Awesome
fontawesome-free@6.4.2 https://github.com/FortAwesome/Font-Awesome
fusejs@6.6.2 https://github.com/krisk/fuse
gitalk@1.7.2 https://github.com/gitalk/gitalk
instant.page@5.1.1 https://github.com/instantpage/instant.page
katex@0.16.2 https://github.com/KaTeX/KaTeX
lightgallery@2.6.1 https://github.com/sachinchoolur/lightgallery
lunr.js@2.3.9 https://github.com/olivernn/lunr.js
instant.page@5.2.0 https://github.com/instantpage/instant.page
katex@0.16.10 https://github.com/KaTeX/KaTeX
lightgallery@2.7.2 https://github.com/sachinchoolur/lightgallery
mapbox-gl@2.10.0 https://github.com/mapbox/mapbox-gl-js
mermaid@9.4.3 https://github.com/mermaid-js/mermaid
meting@2.0.1 https://github.com/metowolf/MetingJS
normalize.css@8.0.1 https://github.com/necolas/normalize.css
object-fit-images@3.2.4 https://github.com/fregante/object-fit-images [archived]
pangu.js@4.0.7 https://github.com/vinta/pangu.js
sharer.js@0.5.1 https://github.com/ellisonleao/sharer.js
simple-icons@7.12.0 https://github.com/simple-icons/simple-icons
simple-icons@9.19.0 https://github.com/simple-icons/simple-icons
twemoji@14.0.2 https://github.com/twitter/twemoji
twikoo@1.6.8 https://github.com/imaegoo/twikoo
twikoo@1.6.22 https://github.com/imaegoo/twikoo
typeit@8.7.1 https://github.com/alexmacarthur/typeit
valine@1.5.1 https://github.com/xCss/Valine
vconsole@3.14.6 https://github.com/Tencent/vConsole
waline@2.14.7 https://github.com/walinejs/waline
valine@1.5.2 https://github.com/xCss/Valine
waline@2.15.8 https://github.com/walinejs/waline
xxhash-wasm@1.0.2 https://github.com/jungomi/xxhash-wasm
File diff suppressed because one or more lines are too long
-8
View File
@@ -48,14 +48,6 @@
.aplayer-list {
background-color: #212121;
&::-webkit-scrollbar-thumb {
background-color: #999;
}
&::-webkit-scrollbar-thumb:hover {
background-color: #bbb;
}
li {
color: #fff;
border-top-color: #666;
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-268
View File
@@ -1,268 +0,0 @@
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
(function (Math) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Constants table
var T = [];
// Compute constants
(function () {
for (var i = 0; i < 64; i++) {
T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;
}
}());
/**
* MD5 hash algorithm.
*/
var MD5 = C_algo.MD5 = Hasher.extend({
_doReset: function () {
this._hash = new WordArray.init([
0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476
]);
},
_doProcessBlock: function (M, offset) {
// Swap endian
for (var i = 0; i < 16; i++) {
// Shortcuts
var offset_i = offset + i;
var M_offset_i = M[offset_i];
M[offset_i] = (
(((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
(((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
);
}
// Shortcuts
var H = this._hash.words;
var M_offset_0 = M[offset + 0];
var M_offset_1 = M[offset + 1];
var M_offset_2 = M[offset + 2];
var M_offset_3 = M[offset + 3];
var M_offset_4 = M[offset + 4];
var M_offset_5 = M[offset + 5];
var M_offset_6 = M[offset + 6];
var M_offset_7 = M[offset + 7];
var M_offset_8 = M[offset + 8];
var M_offset_9 = M[offset + 9];
var M_offset_10 = M[offset + 10];
var M_offset_11 = M[offset + 11];
var M_offset_12 = M[offset + 12];
var M_offset_13 = M[offset + 13];
var M_offset_14 = M[offset + 14];
var M_offset_15 = M[offset + 15];
// Working varialbes
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
// Computation
a = FF(a, b, c, d, M_offset_0, 7, T[0]);
d = FF(d, a, b, c, M_offset_1, 12, T[1]);
c = FF(c, d, a, b, M_offset_2, 17, T[2]);
b = FF(b, c, d, a, M_offset_3, 22, T[3]);
a = FF(a, b, c, d, M_offset_4, 7, T[4]);
d = FF(d, a, b, c, M_offset_5, 12, T[5]);
c = FF(c, d, a, b, M_offset_6, 17, T[6]);
b = FF(b, c, d, a, M_offset_7, 22, T[7]);
a = FF(a, b, c, d, M_offset_8, 7, T[8]);
d = FF(d, a, b, c, M_offset_9, 12, T[9]);
c = FF(c, d, a, b, M_offset_10, 17, T[10]);
b = FF(b, c, d, a, M_offset_11, 22, T[11]);
a = FF(a, b, c, d, M_offset_12, 7, T[12]);
d = FF(d, a, b, c, M_offset_13, 12, T[13]);
c = FF(c, d, a, b, M_offset_14, 17, T[14]);
b = FF(b, c, d, a, M_offset_15, 22, T[15]);
a = GG(a, b, c, d, M_offset_1, 5, T[16]);
d = GG(d, a, b, c, M_offset_6, 9, T[17]);
c = GG(c, d, a, b, M_offset_11, 14, T[18]);
b = GG(b, c, d, a, M_offset_0, 20, T[19]);
a = GG(a, b, c, d, M_offset_5, 5, T[20]);
d = GG(d, a, b, c, M_offset_10, 9, T[21]);
c = GG(c, d, a, b, M_offset_15, 14, T[22]);
b = GG(b, c, d, a, M_offset_4, 20, T[23]);
a = GG(a, b, c, d, M_offset_9, 5, T[24]);
d = GG(d, a, b, c, M_offset_14, 9, T[25]);
c = GG(c, d, a, b, M_offset_3, 14, T[26]);
b = GG(b, c, d, a, M_offset_8, 20, T[27]);
a = GG(a, b, c, d, M_offset_13, 5, T[28]);
d = GG(d, a, b, c, M_offset_2, 9, T[29]);
c = GG(c, d, a, b, M_offset_7, 14, T[30]);
b = GG(b, c, d, a, M_offset_12, 20, T[31]);
a = HH(a, b, c, d, M_offset_5, 4, T[32]);
d = HH(d, a, b, c, M_offset_8, 11, T[33]);
c = HH(c, d, a, b, M_offset_11, 16, T[34]);
b = HH(b, c, d, a, M_offset_14, 23, T[35]);
a = HH(a, b, c, d, M_offset_1, 4, T[36]);
d = HH(d, a, b, c, M_offset_4, 11, T[37]);
c = HH(c, d, a, b, M_offset_7, 16, T[38]);
b = HH(b, c, d, a, M_offset_10, 23, T[39]);
a = HH(a, b, c, d, M_offset_13, 4, T[40]);
d = HH(d, a, b, c, M_offset_0, 11, T[41]);
c = HH(c, d, a, b, M_offset_3, 16, T[42]);
b = HH(b, c, d, a, M_offset_6, 23, T[43]);
a = HH(a, b, c, d, M_offset_9, 4, T[44]);
d = HH(d, a, b, c, M_offset_12, 11, T[45]);
c = HH(c, d, a, b, M_offset_15, 16, T[46]);
b = HH(b, c, d, a, M_offset_2, 23, T[47]);
a = II(a, b, c, d, M_offset_0, 6, T[48]);
d = II(d, a, b, c, M_offset_7, 10, T[49]);
c = II(c, d, a, b, M_offset_14, 15, T[50]);
b = II(b, c, d, a, M_offset_5, 21, T[51]);
a = II(a, b, c, d, M_offset_12, 6, T[52]);
d = II(d, a, b, c, M_offset_3, 10, T[53]);
c = II(c, d, a, b, M_offset_10, 15, T[54]);
b = II(b, c, d, a, M_offset_1, 21, T[55]);
a = II(a, b, c, d, M_offset_8, 6, T[56]);
d = II(d, a, b, c, M_offset_15, 10, T[57]);
c = II(c, d, a, b, M_offset_6, 15, T[58]);
b = II(b, c, d, a, M_offset_13, 21, T[59]);
a = II(a, b, c, d, M_offset_4, 6, T[60]);
d = II(d, a, b, c, M_offset_11, 10, T[61]);
c = II(c, d, a, b, M_offset_2, 15, T[62]);
b = II(b, c, d, a, M_offset_9, 21, T[63]);
// Intermediate hash value
H[0] = (H[0] + a) | 0;
H[1] = (H[1] + b) | 0;
H[2] = (H[2] + c) | 0;
H[3] = (H[3] + d) | 0;
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
var nBitsTotalL = nBitsTotal;
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
(((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
(((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)
);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
(((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
(((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)
);
data.sigBytes = (dataWords.length + 1) * 4;
// Hash final blocks
this._process();
// Shortcuts
var hash = this._hash;
var H = hash.words;
// Swap endian
for (var i = 0; i < 4; i++) {
// Shortcut
var H_i = H[i];
H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
(((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
}
// Return final computed hash
return hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
function FF(a, b, c, d, x, s, t) {
var n = a + ((b & c) | (~b & d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function GG(a, b, c, d, x, s, t) {
var n = a + ((b & d) | (c & ~d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function HH(a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function II(a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.MD5('message');
* var hash = CryptoJS.MD5(wordArray);
*/
C.MD5 = Hasher._createHelper(MD5);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacMD5(message, key);
*/
C.HmacMD5 = Hasher._createHmacHelper(MD5);
}(Math));
return CryptoJS.MD5;
}));
-23
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+9 -1
View File
@@ -1 +1,9 @@
(()=>{var o,u,f=new Set,b=document.createElement("link").relList.supports("prefetch"),y="instantAllowQueryString"in document.body.dataset,E="instantAllowExternalLinks"in document.body.dataset,L="instantWhitelist"in document.body.dataset,m="instantMousedownShortcut"in document.body.dataset,h=1111,p=65,w=!1,v=!1,c=!1,g=null;navigator.userAgentData&&navigator.userAgentData.brands.forEach(({brand:t,version:e})=>{t=="Chromium"&&(g=parseInt(e))});if("instantIntensity"in document.body.dataset){let t=document.body.dataset.instantIntensity;if(t.startsWith("mousedown"))w=!0,t=="mousedown-only"&&(v=!0);else if(t.startsWith("viewport"))navigator.connection&&(navigator.connection.saveData||navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g"))||(t=="viewport"?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(c=!0):t=="viewport-all"&&(c=!0));else{let e=parseInt(t);isNaN(e)||(p=e)}}if(b){let t={capture:!0,passive:!0};if(v||document.addEventListener("touchstart",I,t),w?m||document.addEventListener("mousedown",O,t):document.addEventListener("mouseover",T,t),m&&document.addEventListener("mousedown",A,t),c){let e=window.requestIdleCallback;e||(e=n=>{n()}),e(function(){let i=new IntersectionObserver(s=>{s.forEach(l=>{if(l.isIntersecting){let d=l.target;i.unobserve(d),a(d.href)}})});document.querySelectorAll("a").forEach(s=>{r(s)&&i.observe(s)})},{timeout:1500})}}function I(t){u=performance.now();let e=t.target.closest("a");r(e)&&a(e.href,"high")}function T(t){if(performance.now()-u<h||!("closest"in t.target))return;let e=t.target.closest("a");r(e)&&(e.addEventListener("mouseout",k,{passive:!0}),o=setTimeout(()=>{a(e.href,"high"),o=void 0},p))}function O(t){let e=t.target.closest("a");r(e)&&a(e.href,"high")}function k(t){t.relatedTarget&&t.target.closest("a")==t.relatedTarget.closest("a")||o&&(clearTimeout(o),o=void 0)}function A(t){if(performance.now()-u<h)return;let e=t.target.closest("a");if(t.which>1||t.metaKey||t.ctrlKey||!e)return;e.addEventListener("click",function(i){i.detail!=1337&&i.preventDefault()},{capture:!0,passive:!1,once:!0});let n=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});e.dispatchEvent(n)}function r(t){if(!(!t||!t.href)&&!(L&&!("instant"in t.dataset))&&!(t.origin!=location.origin&&(!(E||"instant"in t.dataset)||!g))&&["http:","https:"].includes(t.protocol)&&!(t.protocol=="http:"&&location.protocol=="https:")&&!(!y&&t.search&&!("instant"in t.dataset))&&!(t.hash&&t.pathname+t.search==location.pathname+location.search)&&!("noInstant"in t.dataset))return!0}function a(t,e="auto"){if(f.has(t))return;let n=document.createElement("link");n.rel="prefetch",n.href=t,n.fetchPriority=e,n.as="document",document.head.appendChild(n),f.add(t)}})();
/**
* Minified by jsDelivr using Terser v5.15.1.
* Original file: /npm/instant.page@5.2.0/instantpage.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
/*! instant.page v5.2.0 - (C) 2019-2023 Alexandre Dieulot - https://instant.page/license */
let _allowQueryString,_allowExternalLinks,_useWhitelist,_lastTouchTimestamp,_mouseoverTimer,_chromiumMajorVersionInUserAgent=null,_delayOnHover=65,_preloadedList=new Set;const DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION=1111;function init(){if(!document.createElement("link").relList.supports("prefetch"))return;const e="instantVaryAccept"in document.body.dataset||"Shopify"in window,t=navigator.userAgent.indexOf("Chrome/");if(t>-1&&(_chromiumMajorVersionInUserAgent=parseInt(navigator.userAgent.substring(t+"Chrome/".length))),e&&_chromiumMajorVersionInUserAgent&&_chromiumMajorVersionInUserAgent<110)return;const n="instantMousedownShortcut"in document.body.dataset;_allowQueryString="instantAllowQueryString"in document.body.dataset,_allowExternalLinks="instantAllowExternalLinks"in document.body.dataset,_useWhitelist="instantWhitelist"in document.body.dataset;const o={capture:!0,passive:!0};let i=!1,r=!1,s=!1;if("instantIntensity"in document.body.dataset){const e=document.body.dataset.instantIntensity;if(e.startsWith("mousedown"))i=!0,"mousedown-only"==e&&(r=!0);else if(e.startsWith("viewport")){const t=navigator.connection&&navigator.connection.saveData,n=navigator.connection&&navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g");t||n||("viewport"==e?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(s=!0):"viewport-all"==e&&(s=!0))}else{const t=parseInt(e);isNaN(t)||(_delayOnHover=t)}}if(r||document.addEventListener("touchstart",touchstartListener,o),i?n||document.addEventListener("mousedown",mousedownListener,o):document.addEventListener("mouseover",mouseoverListener,o),n&&document.addEventListener("mousedown",mousedownShortcutListener,o),s){let e=window.requestIdleCallback;e||(e=e=>{e()}),e((function(){const e=new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){const n=t.target;e.unobserve(n),preload(n.href)}}))}));document.querySelectorAll("a").forEach((t=>{isPreloadable(t)&&e.observe(t)}))}),{timeout:1500})}}function touchstartListener(e){_lastTouchTimestamp=performance.now();const t=e.target.closest("a");isPreloadable(t)&&preload(t.href,"high")}function mouseoverListener(e){if(performance.now()-_lastTouchTimestamp<1111)return;if(!("closest"in e.target))return;const t=e.target.closest("a");isPreloadable(t)&&(t.addEventListener("mouseout",mouseoutListener,{passive:!0}),_mouseoverTimer=setTimeout((()=>{preload(t.href,"high"),_mouseoverTimer=void 0}),_delayOnHover))}function mousedownListener(e){const t=e.target.closest("a");isPreloadable(t)&&preload(t.href,"high")}function mouseoutListener(e){e.relatedTarget&&e.target.closest("a")==e.relatedTarget.closest("a")||_mouseoverTimer&&(clearTimeout(_mouseoverTimer),_mouseoverTimer=void 0)}function mousedownShortcutListener(e){if(performance.now()-_lastTouchTimestamp<1111)return;const t=e.target.closest("a");if(e.which>1||e.metaKey||e.ctrlKey)return;if(!t)return;t.addEventListener("click",(function(e){1337!=e.detail&&e.preventDefault()}),{capture:!0,passive:!1,once:!0});const n=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});t.dispatchEvent(n)}function isPreloadable(e){if(e&&e.href&&(!_useWhitelist||"instant"in e.dataset)){if(e.origin!=location.origin){if(!(_allowExternalLinks||"instant"in e.dataset)||!_chromiumMajorVersionInUserAgent)return}if(["http:","https:"].includes(e.protocol)&&("http:"!=e.protocol||"https:"!=location.protocol)&&(_allowQueryString||!e.search||"instant"in e.dataset)&&!(e.hash&&e.pathname+e.search==location.pathname+location.search||"noInstant"in e.dataset))return!0}}function preload(e,t="auto"){if(_preloadedList.has(e))return;const n=document.createElement("link");n.rel="prefetch",n.href=e,n.fetchPriority=t,n.as="document",document.head.appendChild(n),_preloadedList.add(e)}init();
//# sourceMappingURL=/sm/60fb95dda2409979534f889b11a4279c9602c20254de5a856d5c95159338bab2.map
+1 -1
View File
@@ -1 +1 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var i={};return function(){n.d(i,{default:function(){return s}});var e=n(771),t=n.n(e),r=function(e,t,r){for(var n=r,i=0,a=e.length;n<t.length;){var o=t[n];if(i<=0&&t.slice(n,n+a)===e)return n;"\\"===o?n++:"{"===o?i++:"}"===o&&i--,n++}return-1},a=/^\\begin{/,o=function(e,t){for(var n,i=[],o=new RegExp("("+t.map((function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")})).join("|")+")");-1!==(n=e.search(o));){n>0&&(i.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var l=t.findIndex((function(t){return e.startsWith(t.left)}));if(-1===(n=r(t[l].right,e,t[l].left.length)))break;var d=e.slice(0,n+t[l].right.length),s=a.test(d)?d:e.slice(t[l].left.length,n);i.push({type:"math",data:s,rawData:d,display:t[l].display}),e=e.slice(n+t[l].right.length)}return""!==e&&i.push({type:"text",data:e}),i},l=function(e,r){var n=o(e,r.delimiters);if(1===n.length&&"text"===n[0].type)return null;for(var i=document.createDocumentFragment(),a=0;a<n.length;a++)if("text"===n[a].type)i.appendChild(document.createTextNode(n[a].data));else{var l=document.createElement("span"),d=n[a].data;r.displayMode=n[a].display;try{r.preProcess&&(d=r.preProcess(d)),t().render(d,l,r)}catch(e){if(!(e instanceof t().ParseError))throw e;r.errorCallback("KaTeX auto-render: Failed to parse `"+n[a].data+"` with ",e),i.appendChild(document.createTextNode(n[a].rawData));continue}i.appendChild(l)}return i},d=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(3===i.nodeType){for(var a=i.textContent,o=i.nextSibling,d=0;o&&o.nodeType===Node.TEXT_NODE;)a+=o.textContent,o=o.nextSibling,d++;var s=l(a,r);if(s){for(var f=0;f<d;f++)i.nextSibling.remove();n+=s.childNodes.length-1,t.replaceChild(s,i)}else n+=d}else 1===i.nodeType&&function(){var t=" "+i.className+" ";-1===r.ignoredTags.indexOf(i.nodeName.toLowerCase())&&r.ignoredClasses.every((function(e){return-1===t.indexOf(" "+e+" ")}))&&e(i,r)}()}},s=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},d(e,r)}}(),i=i.default}()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){r.d(o,{default:function(){return d}});var e=r(771),t=r.n(e);const n=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},i=/^\\begin{/;var a=function(e,t){let r;const o=[],a=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(o.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const a=t.findIndex((t=>e.startsWith(t.left)));if(r=n(t[a].right,e,t[a].left.length),-1===r)break;const l=e.slice(0,r+t[a].right.length),s=i.test(l)?l:e.slice(t[a].left.length,r);o.push({type:"math",data:s,rawData:l,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&o.push({type:"text",data:e}),o};const l=function(e,n){const r=a(e,n.delimiters);if(1===r.length&&"text"===r[0].type)return null;const o=document.createDocumentFragment();for(let e=0;e<r.length;e++)if("text"===r[e].type)o.appendChild(document.createTextNode(r[e].data));else{const i=document.createElement("span");let a=r[e].data;n.displayMode=r[e].display;try{n.preProcess&&(a=n.preProcess(a)),t().render(a,i,n)}catch(i){if(!(i instanceof t().ParseError))throw i;n.errorCallback("KaTeX auto-render: Failed to parse `"+r[e].data+"` with ",i),o.appendChild(document.createTextNode(r[e].rawData));continue}o.appendChild(i)}return o},s=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const s=l(o,t);if(s){for(let e=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&s(r,t)}}};var d=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},s(e,n)}}(),o=o.default}()}));
+1 -1
View File
@@ -1 +1 @@
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={},t={inline:["$","$"],display:["$$","$$"]};var n=function(e,n){void 0===n&&(n=t);for(var r=e.querySelectorAll(".katex-mathml + .katex-html"),a=0;a<r.length;a++){var o=r[a];o.remove?o.remove():o.parentNode&&o.parentNode.removeChild(o)}for(var i=e.querySelectorAll(".katex-mathml"),l=0;l<i.length;l++){var f=i[l],c=f.querySelector("annotation");c&&(f.replaceWith?f.replaceWith(c):f.parentNode&&f.parentNode.replaceChild(c,f),c.innerHTML=n.inline[0]+c.innerHTML+n.inline[1])}for(var d=e.querySelectorAll(".katex-display annotation"),s=0;s<d.length;s++){var p=d[s];p.innerHTML=n.display[0]+p.innerHTML.substr(n.inline[0].length,p.innerHTML.length-n.inline[0].length-n.inline[1].length)+n.display[1]}return e};function r(e){var t=e instanceof Element?e:e.parentElement;return t&&t.closest(".katex")}return document.addEventListener("copy",(function(e){var t=window.getSelection();if(!t.isCollapsed&&e.clipboardData){var a=e.clipboardData,o=t.getRangeAt(0),i=r(o.startContainer);i&&o.setStartBefore(i);var l=r(o.endContainer);l&&o.setEndAfter(l);var f=o.cloneContents();if(f.querySelector(".katex-mathml")){var c=Array.prototype.map.call(f.childNodes,(function(e){return e instanceof Text?e.textContent:e.outerHTML})).join("");a.setData("text/html",c),a.setData("text/plain",n(f).textContent),e.preventDefault()}}})),e=e.default}()}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={};const t={inline:["$","$"],display:["$$","$$"]};var n=function(e,n){void 0===n&&(n=t);const o=e.querySelectorAll(".katex-mathml + .katex-html");for(let e=0;e<o.length;e++){const t=o[e];t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}const r=e.querySelectorAll(".katex-mathml");for(let e=0;e<r.length;e++){const t=r[e],o=t.querySelector("annotation");o&&(t.replaceWith?t.replaceWith(o):t.parentNode&&t.parentNode.replaceChild(o,t),o.innerHTML=n.inline[0]+o.innerHTML+n.inline[1])}const l=e.querySelectorAll(".katex-display annotation");for(let e=0;e<l.length;e++){const t=l[e];t.innerHTML=n.display[0]+t.innerHTML.substr(n.inline[0].length,t.innerHTML.length-n.inline[0].length-n.inline[1].length)+n.display[1]}return e};function o(e){const t=e instanceof Element?e:e.parentElement;return t&&t.closest(".katex")}return document.addEventListener("copy",(function(e){const t=window.getSelection();if(t.isCollapsed||!e.clipboardData)return;const r=e.clipboardData,l=t.getRangeAt(0),i=o(l.startContainer);i&&l.setStartBefore(i);const a=o(l.endContainer);a&&l.setEndAfter(a);const s=l.cloneContents();if(!s.querySelector(".katex-mathml"))return;const c=Array.prototype.map.call(s.childNodes,(e=>e instanceof Text?e.textContent:e.outerHTML)).join("");r.setData("text/html",c),r.setData("text/plain",n(s).textContent),e.preventDefault()})),e=e.default}()}));
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

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