Compare commits

...

176 Commits

Author SHA1 Message Date
Jimmy Cai
9e6b7b22a9 release: 3.30.0 2025-01-23 22:55:27 +01:00
Jimmy
f1ab6c6aba
fix(giscus): no longer use $.Language.LanguageCode for the language of Giscus (#1118)
fix(giscus): rollback https://github.com/CaiJimmy/hugo-theme-stack/pull/1075

User can still customize the language used for Giscus using `.Site.Params.comments.giscus.lang` parameter.
2025-01-23 22:54:37 +01:00
Hamza
087989e427
chore(i18n): fix a tiny typo in the footer (#1099) 2024-12-22 14:53:10 +01:00
fsj2009yx
0991f61d49
fix(comment/waline): cannot read property ‘insertBefore’ of null (#1103)
* fix: resolve issue with comments not displaying due to KaTeX and Waline render order

* Fix the problem that comment data couldn't be pulled successfully and raise Error "Cannot read property ‘insertBefore’ of null""
2024-12-22 12:44:13 +01:00
Jimmy Cai
839fbd0ecb release: 3.29.0 2024-10-20 08:05:45 +00:00
Jimmy Cai
5175ac5ae3
fix(giscus): fallback to en if no language code is set (#1084) 2024-10-20 10:04:59 +02:00
Jimmy Cai
37f1541c20
feat: search box in 404 page (#1081) 2024-10-20 00:26:59 +02:00
Jimmy Cai
f4eb5d3e99 release: 3.28.0 2024-10-19 21:32:49 +00:00
xiaoxiyao
788dd497b3
feat: add fingerprints to the JS file URL to utilize HTTP caching (#1076) 2024-10-19 21:14:35 +02:00
xiaoxiyao
8a7fb33163
feat(giscus): use current language as fallback for lang param and add loading param (#1075)
fix: giscus use current lang as default, and add missing `loading` params
2024-10-19 20:46:27 +02:00
onavas33
2a18a92901
fix(i18n): missing translation for title of categories widget in fr.yaml (#1059) 2024-10-06 19:33:20 +02:00
PukNgae Cryolitia
245b0f2810
fix(colorScheme): systemPreferScheme not initialized on start up (#1061) 2024-10-06 19:32:13 +02:00
Jimmy Cai
0fb25c808b
fix: show different subtitle for each i18n variant in exampleSite (#1068) 2024-10-06 19:17:40 +02:00
Jimmy Cai
048a000f17 release: 3.27.0 2024-09-07 18:57:23 +02:00
Jimmy Cai
5f157478aa
fix(exampleSite): site config key paginate was deprecated (#1057)
fix: site config key paginate was deprecated
2024-09-07 18:51:18 +02:00
Jimmy Cai
8556681b7c
doc: add markup.goldmark.extensions.passthrough in exampleSite (#1056)
Related: https://github.com/CaiJimmy/hugo-theme-stack/issues/1019
2024-09-07 18:47:15 +02:00
powerfullz
fa760d70cb
fix: use css.Sass instead of deprecated resources.ToCSS (#1054) 2024-09-07 18:42:07 +02:00
Syafa Adena
bdcab89d86
chore: bump Twikoo front-end to latest released version 1.6.39 (#1021) 2024-09-07 18:14:57 +02:00
saikadaramakaisosjupita
b3907acdae
doc: add backslash to baseURL in exampleSite (#1009) 2024-09-07 17:59:59 +02:00
Vladimir Vitkov
23ff70d41a
feat(i18n): add Bulgarian translations (#1007) 2024-09-07 17:56:17 +02:00
ensag-dev
41a3e5ee13
feat(i18n): add Occitan translations (#1034) 2024-09-07 17:52:40 +02:00
DashJay
0558108e30
feat(comments): add support to Gitalk proxy parameter (#1012)
Co-authored-by: Jimmy Cai <hi@jimmycai.com>
2024-09-07 17:18:03 +02:00
Anthony Simmon
12f31dfd8a
fix: use Hugo's default RSS template value source for lastBuildDate (#1006)
Use Hugo's default RSS template value source for lastBuildDate
2024-09-07 14:22:17 +02:00
weeix
374b25a60f
fix(i18n): fix unlocalized article publish/lastUpdated date (#1050)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1040
2024-09-07 13:48:09 +02:00
Jimmy Cai
fcd56dd21c
fix: article category overflow (#1055)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1045
2024-09-07 13:25:26 +02:00
Jimmy Cai
fddab05362 release: 3.26.0 2024-05-02 23:28:01 +02:00
Jimmy Cai
f3783856ad
feat: add article.headingAnchor parameter and use CSS pseudo-element to display # symbol of heading anchor (#1016)
* feat: add `article.headingAnchor` parameter

* feat: use CSS pseudo-element to display `#` symbol of heading anchor

This prevents RSS feed readers and screen readers from seeing an extra `#`.

* Deactivate `article.headingAnchor` by default
2024-05-02 23:27:17 +02:00
Jimmy Cai
130e2f6607
feat: display header anchor on hover (#999) 2024-03-30 23:22:18 +01:00
Jimmy Cai
ce798a32a9 release: 3.25.0 2024-03-27 17:01:23 +01:00
Jimmy Cai
609d43b088
fix: make KaTeX render all math inside document.body (#994)
Since it only accepts one element, I cannot pass `.article-content` and `#TableOfContent` to it. The official documentation uses `document.body` directly, so I guess that's fine.

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/882
2024-03-27 16:38:30 +01:00
Jimmy Cai
797949b37f
fix: rename .social-menu to .menu-social to avoid being blocked by ad blockers (#993)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/924
2024-03-27 16:24:03 +01:00
Jimmy Cai
539c39d69a
feat: add anchor link to markdown heading (#992)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/935
2024-03-27 16:08:19 +01:00
Jimmy Cai
f8466d94d2
fix(i18n): wrap footer.builtWith with double quotes in Japanese translation (#991) 2024-03-27 16:01:43 +01:00
Shun Sakai
43e074364c
feat(i18n): update translations for ja (#984)
* feat(i18n): update translations for `ja`

* Apply review suggestions
2024-03-27 11:21:32 +01:00
andrewmoise
b2157bdf78
docs: update some invalid documentation links (#983)
Update some documentation links (some were dead links)
2024-03-27 11:09:17 +01:00
Jimmy Cai
23607527e4
fix: use page resource permalink in link image (#990)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/982
2024-03-27 10:58:22 +01:00
Jimmy Cai
54a8ace564 release 3.24.2 2024-03-17 20:41:27 +01:00
Andreas Deininger
b3fbe78ca5
fix: deprecation warning for .Site.Author (#979)
Fix deprecation warning for .Site.Author, deprecated in Hugo 0.124.0
2024-03-17 20:40:56 +01:00
Jimmy Cai
2cb5ba683b
fix: remove \n character from meta description (#980) 2024-03-17 20:39:16 +01:00
Jimmy Cai
5a8607e4a8 release: 3.24.1 2024-03-12 14:52:03 +01:00
Andrew Doering
eafcf894c8
fix: favicon does not load if baseurl includes a subfolder (#972)
Use relURL https://gohugo.io/functions/urls/relurl/
2024-03-12 14:50:49 +01:00
Jimmy Cai
0b9f6c36ad
fix(head): prevent Go template from escaping HTML entities in meta description (#973) 2024-03-12 14:45:59 +01:00
Jimmy Cai
04bf1956b9 release: 3.24.0 2024-03-10 22:57:26 +01:00
Jiahao Li
6c7d42d45a
fix(sidebar): menu-bottom-section not showing in mobile (#966)
* fix(sidebar): Bottom section not showing in mobile

* fix(sidebar): Align bottom section to bottom

* fix(sidebar): Gap missing in bottom section

* refactor(sidebar): Simplify styles

* refactor(sidebar): Remove useless padding-left

* refactor(sidebar): Remove useless margin-top

* refactor(sidebar): Combine duplicate flex-direction

* refactor(sidebar): Remove redundant width
2024-03-10 22:56:30 +01:00
Andreas Deininger
2cda779706
feat: bump KaTeX to latest released version 0.16.9 (#969)
Bump KaTeX to latest released version 0.16.9
2024-03-10 22:24:21 +01:00
Andreas Deininger
4948a3723e
fix: .Site.LastChange deprecation (#968)
Fix the deprecation warning emitted from Hugo, and fix the typo in ` exampleSite/content/page/about/index.md`
2024-03-10 19:57:03 +01:00
Jimmy Cai
43224bd39a
feat: update Hugo version and minimum version requirement to 0.123.0 (#970) 2024-03-10 19:54:09 +01:00
Zeyu Huang
4e7865c185
fix(i18n): add missing zh-cn translations (#964) 2024-03-06 09:37:31 +01:00
Jimmy Cai
2f9306502d release: 3.23.0 2024-03-02 23:49:21 +01:00
Jiahao Li
5b0d6fdf7d
fix(sidebar): improve accessibility of sidebar bottom menu (#925)
* fix(menu): <ol> containing other than <li>, <script> or <template> elements

* fix(menu): add title to language select menu
2024-03-02 23:48:34 +01:00
L-Super
65cd7f586f
fix(comment): moved waline placeholder parameter to locale.placeholder (#914)
fix waline parameter
2024-03-02 23:39:43 +01:00
Jiarong Hong
f398fb9dd1
feat(comments): add support for Beaudar(表达)comment system (#931)
https://beaudar.lipk.org/
2024-03-02 23:33:11 +01:00
James McMurry
9bb3165ff0
fix(sidebar): translation selector - avoid cast per PR #950 (#961)
avoid cast per PR #950
2024-03-02 23:16:27 +01:00
Jimmy Cai
405e84291a release: 3.22.0 2024-02-26 12:44:11 +01:00
James McMurry
800f815988
fix(sidebar): hide translations selector if only one translation available (#950)
hide translations menu if only one translation available
2024-02-26 12:43:14 +01:00
kragleh
255abd5c88
feat(i18n): add Slovak translation (#930) 2024-02-23 23:58:07 +01:00
flexxgaad
f53fc128bd
fix(config): site.DisqusShortname and site.GoogleAnalytics are deprecated (#952)
Remove deprecations. Fixes #895
2024-02-23 23:16:24 +01:00
WaterLemons2k
188e49ef41
fix(widgets): ensure params is not nil (#943)
* fix(partials): ensure params always exist

If the `params` key is not defined in the config file, accessing `params` results in a `nil pointer evaluating interface {}` error because `params` does not exist.

This can be fixed by ensuring that params is always a map.

* style(widgets): `default` no pipes required
2024-02-23 23:00:39 +01:00
Gleb A
76dc61f0d5
feat(i18n): add Belarusian translation (#937)
* feat(i18n): add Belarusian translation

* Removed .gitignore changes
2024-02-23 00:03:55 +01:00
Jimmy Cai
03ee3369e1
fix: title does not show pagination data (#945)
* fix: title does not show pagination data

This is caused by partialCached. It turns out that the `.RelPermalink` is the same for all pages generated by the paginator, so they will show the same title as the first page.

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/941

* doc(exampleSite): set paginate to 3 to force pagination
2024-02-19 10:54:02 +01:00
Aman Rawat
21da06e448
feat(i18n): add Hindi translation (#889) 2023-10-28 23:59:27 +02:00
Jarao
20bf719411
fix(comments): twikoo icon & count text color not visible on dark theme (#890)
* fix(comments): twikoo icon & count text color

* fix(comments): twikoo prompt color
2023-10-28 23:51:05 +02:00
Jimmy Cai
bdb9e7fc00 release: 3.21.0 2023-10-11 20:53:09 +00:00
潇潇雨歇
5c98a38a80
chore(comments): update twikoo to 1.6.21 (#877) 2023-10-07 13:08:02 +02:00
Fabian Alvarez
bda734fb23
i18n(es): minor grammatical changes (#873)
* Update es.yaml

Minus grammatically corrections

* Update es.yaml

Fix grammar mistakes
2023-09-18 23:24:52 +02:00
Jimmy Cai
70bcf9cbe0 doc: added a note that exampleSite should not be used as a starter template 2023-09-07 21:30:32 +02:00
Jimmy Cai
6f1d676948 release: 3.20.0 2023-09-03 16:17:25 +02:00
Brandon Szeto
d84d0a8522
fix(menu): consistent svg coloring in menu (#837)
* Consistent svg coloring in menu

* fix: use `currentColor` to avoid breaking style of active element

---------

Co-authored-by: Jimmy Cai <hi@jimmycai.com>
2023-09-03 16:15:51 +02:00
sand3rk
418d5677b1
feat(i18n): add readtime translation in Dutch (#801)
* Update nl.yaml

Added readtime translation in Dutch

* style(i18n/nl): remove duplicated translation

---------

Co-authored-by: Jimmy Cai <hi@jimmycai.com>
2023-09-03 16:10:23 +02:00
Jacob Zhong
be4fd55095
feat(article): font enhancement (#767)
Change font settings
2023-09-03 15:32:44 +02:00
SimbaFs
d3682b3567
fix(article): margin collapsing in code block (firefox) (#833)
fix margin collasping in codeblock
2023-09-03 13:03:17 +02:00
Jimmy Cai
ce0a252bfa release: 3.19.0 2023-08-27 18:49:37 +02:00
Alex Hua
d11923f32b
fix: a waline config param with false value will be ignored (#812)
Co-authored-by: Jimmy Cai <hi@jimmycai.com>
2023-08-27 18:06:00 +02:00
Lukáš Trkan
40712eb781
feat(i18n): add Czech support (#793) 2023-08-27 18:03:26 +02:00
Alex Hua
d197d9b249
fix: invalid params used in requiredMeta of waline (#811)
Fix the invalid parameters used in waline requiredMeta
2023-08-27 13:48:42 +02:00
Jimmy Cai
c6d1d73dd2
chore: update issue report template to include minimal reproducible example (#864) 2023-08-17 11:15:07 +02:00
Brandon Szeto
5d90624441
doc: Inline math example previously not working as intended (#834)
Inline math example previously not working as intended
2023-08-16 14:21:23 +02:00
Jimmy Cai
5edd4afaf3 release: 3.18.0 2023-08-15 13:17:22 +02:00
Jimmy Cai
41c3033d1a
feat(article): add style to <kbd> tag (#862)
* fix: set `unsafe` to true for exampleSite

To display `<kbd>` tag correctly

* feat(article): add style to `kbd` tag

* feat: improve `<kbd>` style
2023-08-15 13:15:32 +02:00
Jimmy Cai
4e2e90da4c
fix: page translation links overflow (#861)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/788
2023-08-15 12:46:29 +02:00
Jimmy Cai
eefa686661
fix: add word-break: break-word; to <a> and <code> (#860)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/746
2023-08-15 11:47:48 +02:00
Jimmy Cai
1668ebc3e4
feat: use .RelPermalink for search JSON (#859)
Avoids CORS problem when the user inputs `baseurl` incorrectly.
2023-08-15 11:40:43 +02:00
Jimmy Cai
f7e442cabb
fix(search): reset lastSearch variable if keywords are empty (#858)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/832
2023-08-12 13:03:45 +02:00
Jimmy Cai
cabaf06ef2
fix: custom params on the language top level is deprecated (#857)
* fix: custom params on the language top level is deprecated

New with Hugo 0.112.0

closes #853

* ci: upgrade Netlify CI Hugo version to 0.117.0
2023-08-12 12:20:19 +02:00
Mehedi Hasan
26d2859f70
fix: very poor color contrast for default text (#845)
Resolves #754

Co-authored-by: Nick Kocharhook <nick@kocharhook.com>
2023-08-12 11:57:02 +02:00
Rich
51e0ec7f99
feat: allow footer copyright to be different to the site title (#839)
* Allow copyright to be different to the site title

* Add copyright to exampleSite
2023-08-12 11:29:56 +02:00
Jimmy Cai
13568d8ff0 release: 3.17.0 2023-07-18 00:07:02 +00:00
SimbaFs
2fb534f9a6
feat(i18n): update translations for zh-tw (#786)
* sync with latest

* translate zh-tw
2023-07-15 10:13:16 +08:00
Piotr Halama
58559c5b3f
feat(i18n): add missing plural forms for the Polish language (#818)
Add missing plural forms for the Polish language
2023-07-15 09:35:09 +08:00
Tsung-Yu Chan
0bc942bb12
fix: remark42 comment system won't show (#799) 2023-07-12 09:37:39 +08:00
Weltolk
a88fe3f5a7
chore: update twikoo version (#783) 2023-07-12 09:20:25 +08:00
Jacob Zhong
1bd4dcd415
fix(sidebar): add padding-bottom to the right sidebar (#765)
Add bottom padding to the right sidebar
2023-07-12 09:12:58 +08:00
Jimmy Cai
aae9cf67db
fix: typo in README: stater -> starter
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/764
2023-02-16 20:07:43 +01:00
Nagakawa Yuno
cb42d2041f
fix: KaTeX may render contents in gist under certain conditions (#755)
add gist to katex's ignoredClasses
2023-02-16 20:03:32 +01:00
ttheng3810
4272da7ee4
feat(i18n): add footer translation for ZH-TW (#748) 2022-12-29 21:18:14 +01:00
Parasomnia
d382ca993d
fix(comment/utterances): the target origin mismatch recipient window's origin (#735) 2022-12-06 14:55:40 +01:00
rock G
3ff06fe033
fix: anchor link need decode (#719) 2022-12-05 21:21:37 +01:00
Anh Nhat Tran
ff7a56a7ac
feat(i18n): add vietnamese translation (#717) 2022-12-03 13:27:55 +01:00
Jimmy Cai
196116f20d
fix: incorrect menu URL when baseURL is a subpath (#713) 2022-10-29 17:28:47 +02:00
Jimmy Cai
b03390d237
Revert "Merge branch 'canary' into master" (#712)
Revert "Merge branch 'canary' into master (#711)"

This reverts commit 8a597a5c9c.
2022-10-29 17:14:19 +02:00
Jimmy Cai
8a597a5c9c
Merge branch 'canary' into master (#711)
* refactor(i18n): simplify the structure of the translation file

* chore: prepare repository for v4.0.0-alpha

* chore: modify go.mod to v4

* refactor: migrate theme configuration to TOML

* fix: exampleSite not using correct theme

* feat: add favicon from assets folder

* refactor: drop linear grandient background feature

remove node-vibrant from dependencies

* feat: use Hugo's code block render hook to implement code copy button

Now it can have i18n support

* refactor: delete color.ts

* refactor: delete Emoji support post from example site

* refactor: drop support for `hidden` field in front matter

* feat: upgrade to PhotoSwipe v5

* chore: bump the required hugo version to 0.100.0

* refactor: remove PhotoSwipe from external.yaml

* fix: extra margin in search result

* fix: incorrect markdown heading level in example site

* refactor: remove some usages of `default` in template

No longer needed thanks to Hugo's configuration merge

* fix: one line codeblock style in firefox

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/564

* feat: add style to new codeblock

* feat: i18n support for codeblock copy text

* fix(menu): jitter when closing menu

It's caused by flexbox gap property, which can't animate

* fix(search): long text overflows under the Search icon

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/515
2022-10-29 17:02:24 +02:00
Jimmy Cai
d60083e055 release: 3.16.0 2022-10-29 14:46:07 +00:00
Jimmy Cai
5d34c3de44
fix(article): frontmatter field .ReadingTime should overwrite global configuration (#710) 2022-10-29 14:50:15 +02:00
MartinAramayo
30e033c660
feat(article): make long KaTeX equations scrollable in the x-axis (#706)
* Make long KaTeX equations scrollable in the x-axis

Suggested from: https://katex.org/docs/issues.html, I have tested it adding a long equation and activating a phone user agent.

* refactor: move KaTeX style to article.scss
2022-10-29 14:38:44 +02:00
Jimmy Cai
86314608e3 style: fix indent 2022-10-29 12:19:09 +00:00
Tom Morris
8611363549
feat: add rel=me to social links (#707)
Adds rel-me to social links

[rel="me"] is a commonly used way to show that that two websites or
social
media accounts are the same, and is used for authentication and proving
site ownership in a variety of ways.

[rel="me"]: https://indieweb.org/rel-me
2022-10-29 14:04:21 +02:00
Jimmy Cai
73437f24ea release: 3.15.0 2022-10-22 10:17:46 +00:00
gursi26
9b464bd9fc
feat(page): add keywords front matter field for better SEO (#664)
* added keywords metadata tag for google SEO

* fix: avoid empty keywords meta tag

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2022-10-22 12:13:24 +02:00
FarisZR
70f431ea18
feat: add a separate configuration field for site description (#672)
* Add an optional site description option

* Add site description to the example site (Chinese Auto-translated)
2022-10-22 11:56:38 +02:00
Ahmad Helaly
30fdd000f9
feat(article): add readingTime front matter field to overwrite global configuration (#701)
* add DisableReadTime for articles

* change frontmatter disableReadingTime to readingTime
2022-10-22 11:48:00 +02:00
星の光
ae497c4789
refactor(grid): avoid sidebar layout shift when main content loads slowly (#677)
Co-authored-by: Luguoba <80254980+luguoba@users.noreply.github.com>
2022-10-21 13:06:06 +02:00
Celso Miranda
299b80c5f8
feat(i18n): add european portuguese translation (#699)
Very subtle changes from the Brazilian Portuguese translation
2022-10-21 12:56:00 +02:00
Jimmy Cai
414a9915e5 release: 3.14.0 2022-10-02 09:59:23 +00:00
TsaiRongFu
378370f6db
docs: update the notes about favicon in the configuration file (#670)
* Update the notes about favicon in the configuration theme

* Update note about favicon

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2022-10-02 11:56:56 +02:00
Allen Guan
e1a85aa5cd
refactor(highlight): extract common parts of styles and keep line number visible when scrolling (#681)
* merge highlight.scss

* show line number when scroll
2022-10-02 11:38:42 +02:00
FarisZR
b1e8472bcf
feat(i18n): add categories cloud translation for Arabic (#673)
Add categories cloud translation
2022-09-29 16:30:47 +02:00
Mehedi Hasan
22d8a396ab
feat(i18n): update Bengali translation (#665) 2022-09-29 16:28:58 +02:00
Daniel Pessoa
94a1f4ade0
feat(i18n): add missing pt-BR translations (#680)
* feat(i18n): Add categoriesCloud for pt-BR
2022-09-29 16:25:58 +02:00
Dmitry Verkhoturov
8826674b1f
fix(comments): update Remark42 source code (#683)
update remark42 source code

Updated frontend code taken from https://remark42.com/docs/configuration/frontend/
2022-09-29 16:22:01 +02:00
Jimmy Cai
efd6f1de37
chore: simplify README.md 2022-09-17 15:38:44 +02:00
Wontory
72c5f4ea24
feat(i18n): added missing korean translation (categories cloud widget) (#653) 2022-08-03 20:49:10 +02:00
Jimmy Cai
5869a7ab83 release: 3.13.0 2022-07-31 10:55:27 +00:00
辛巳流火
d00dbc17bc
feat(comment): add strict and input-position to Giscus config (#648)
* 添加giscus设置选项

根据giscus官方文档,添加了data-strict和data-input-position设置选项

* feat: add strict and inputPosition to giscus config section

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2022-07-31 12:39:20 +02:00
Jimmy Cai
655b5102c4 fix(article): footnote reference does not work
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/632
2022-07-28 16:48:37 +00:00
Jimmy Cai
b02569add9 chore(github): delete unused Github actions 2022-06-11 12:45:39 +00:00
Jimmy Cai
4546d74af3
chore(github): add browser info field to issue form 2022-06-11 14:37:39 +02:00
Jimmy Cai
c6ccfc8f26
fix(github): try to fix errors with the issue form 2022-06-11 14:32:34 +02:00
Jimmy Cai
5fe1b35ba5
chore(github): change issue report template to a form 2022-06-11 14:29:02 +02:00
Jimmy Cai
d53ba6ea20
docs(github): create issue config.yml
Disable blank issue
2022-06-11 14:00:36 +02:00
Jimmy Cai
722950c167 docs(github): remove feature request template
see https://github.com/CaiJimmy/hugo-theme-stack/discussions/630
2022-06-11 11:56:38 +00:00
rmdhnreza
3d09c23284
feat(article): GitLab Snippets Shortcode (#627) 2022-06-11 11:04:20 +02:00
Jimmy Cai
7a38f3ad50
chore: update Hugo version in Netlify CI 2022-06-11 10:59:20 +02:00
Jimmy Cai
5608f0a5e1 release: 3.12.0 2022-06-10 22:54:12 +00:00
Jimmy Cai
165c96a8e0 fix(comments): Twikoo dark mode emoji selector background
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/583

credit: https://github.com/CaiJimmy/hugo-theme-stack/issues/583#issuecomment-1096270207 (@rmdhnreza)
2022-06-10 22:43:16 +00:00
lonzzi
7142de24cc
fix(article): TOC link not working when the heading starts with digits (#603) 2022-06-11 00:39:16 +02:00
cubercsl
9aa6b4925b
fix(style): toc counter is incorrect when there are <a> in heading (#601)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/495, https://github.com/CaiJimmy/hugo-theme-stack/issues/589
2022-06-11 00:34:19 +02:00
Sajjad Shirazy
92a6d71ce5
feat(i18n): add Persian(Farsi) translation (#602) 2022-06-10 20:55:59 +02:00
Jimmy Cai
01eb9a4b0e
fix: check if DISQUS is loaded before accessing it (#626)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/571
2022-06-09 22:43:08 +02:00
Mehedi Hasan
49c0a2bc56
feat(i18n): add Bengali translation (#625) 2022-06-09 20:48:24 +02:00
luoboQAQ
9eec31f0b6
feat(comment): Update Waline to V2 version (#616)
*  feat(comment): 更新Waline至V2版本

* 保留placeholder属性
2022-06-08 18:30:52 +02:00
Simon Guest
772b9e3ba8
fix(article): regression in article copyright link box-shadow (#611)
Somewhere between hugo 0.88.1 and 0.98.0, box-shadow got applied
to the article copyright, which is an ugly regression.
2022-06-08 18:21:28 +02:00
Simon Guest
955bb8dd7f
feat(shortcodes): add quote shortcode, and example (#414)
* Add quote shortcode, and example

* Use trim to improve whitespace

* Allow for quote with neither author nor source

* Format code and move quote.scss to article.scss

This style is only used on the article page, so it makes more sense to have it there.

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2022-06-08 17:59:23 +02:00
Felix Niederwanger
0a5cbea10f
feat(i18n): add missing translation (it, nl) for categories (#614) 2022-06-05 19:01:31 +02:00
baptiste313
e8f1b8f7b7
chore: update dependencies (KaTeX, node-vibrant) (#477) 2022-06-05 18:50:27 +02:00
Weltolk
06c68e2aa2
chore: update twikoo version to 1.5.11 (#613) 2022-06-05 18:48:01 +02:00
Jimmy Cai
3a79e9856e
fix: read imageProcessing.cover.enabled correctly (#621) 2022-06-05 18:21:08 +02:00
Zsombor Udvardy
add8f364e0
feat(i18n): add Hungarian translation (#584) 2022-06-05 18:00:05 +02:00
Spence Churchill
5e350b92e8
refactor: rename "Related contents" to "Related content" (#567) 2022-06-05 17:20:08 +02:00
Allen Guan
58b1e0706a
feat: add general.scss and change link hover style (#550) 2022-06-05 17:00:14 +02:00
Niko Köser
14bb05c8db
docs(i18n): add German translation for categories widget (#596) 2022-06-05 13:02:41 +02:00
ti777777
c1fcec95a6
chore(README): fix a typo (#543) 2022-03-20 12:42:28 +01:00
Jimmy Cai
69ac21d0f7 release: 3.11.0 2022-03-19 23:56:29 +00:00
慕枫Go
8c04e8362c
fix(vssue): Vue version compatibility (#546) 2022-03-20 00:52:06 +01:00
RADDAH
c5eee559c2
fix(i18n/ar): update Reading Time localization for Arabic language (#527)
* update the localization based on Arabic syntax

readingTime variable updated to match the exact syntax for Arabic language

One variable in Arabic no need to add the count variable for 1 minute, there is a word to describe that specifically. 
Other variable localization updated to match Arabic grammar tenses.

* remove unnecessary leading space

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2022-03-20 00:41:18 +01:00
Farrel Franqois
2726cf7549
feat(i18n/id): Add translation for Category Widget (#548) 2022-03-20 00:38:00 +01:00
Jimmy Cai
de952be116 fix(exampleSite): cn.md -> zh-cn.md 2022-03-19 23:16:58 +00:00
Hugoo
1cfd39c627
feat(i18n): add Catalan translation (#557) 2022-03-20 00:14:26 +01:00
Hugoo
bf8868c8e7
feat(i18n/es): add translation for Category widget (#558) 2022-03-20 00:06:27 +01:00
Konnyaku
da6a50ddb5
feat(i18n): add Chinese(Hong Kong) translation (#560) 2022-03-20 00:05:12 +01:00
zhixuan
2671f292fd
fix(exampleSite): wrong zh-cn about page filename (#562) 2022-03-20 00:00:08 +01:00
Kacper Betański
9d922272e4
feat(i18n/pl): Add translation for Category widget (#563) 2022-03-19 23:58:05 +01:00
Jimmy Cai
5699510c36 refactor(article): remove article toolbar style 2022-03-19 22:41:37 +00:00
Jimmy Cai
7d1713d407 refactor(i18n): use lowercase language codes
Related with this Hugo issue: https://github.com/gohugoio/hugo/issues/7344
2022-03-09 15:04:24 +00:00
Jimmy Cai
b5d0c5b37d fix(exampleSite): cn -> zh-CN 2022-03-09 14:59:36 +00:00
zhixuan
0167edcbf2
feat(i18n): add missing ja & zh-CN translations (#538) 2022-03-07 21:33:04 +01:00
Jimmy Cai
7a5dccdfd3
doc: add quickstart template 2022-03-06 11:17:03 +01:00
Jimmy Cai
de9756291b
release: 3.10.0 2022-03-06 10:58:31 +01:00
Jimmy Cai
07e1b856b0
feat: same container width on all pages (#534) 2022-03-06 10:58:02 +01:00
Jimmy Cai
8f5164b5b9 chore: add go.mod again 2022-03-05 17:35:18 +00:00
Jimmy Cai
07da61b1f2 chore: delete go.mod 2022-03-05 17:25:02 +00:00
Jimmy Cai
76925213a3 chore: update go.mod
Trying to figure out what's wrong
2022-03-05 17:22:11 +00:00
Jimmy Cai
0317e19ef2 fix(RSS): page context selection 2022-03-05 17:15:08 +00:00
Jimmy Cai
863e6d4116 Resolve merge conflict 2022-03-05 17:14:24 +00:00
Jimmy Cai
72629cf476 Merge branch 'fix-rss-pctx' of https://github.com/nella17/hugo-theme-stack into nella17-fix-rss-pctx 2022-03-05 17:13:42 +00:00
Jimmy Cai
d455336d57
fix: remove section filter in rss.xml 2022-03-05 18:11:48 +01:00
Allen Guan
9dbc0a4f38
fix(RSS): page context selection 2022-03-03 12:38:47 +08:00
102 changed files with 2157 additions and 1291 deletions

View File

@ -1,45 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
<!--
Before creating this bug report, make sure you have read the theme documentation: https://docs.stack.jimmycai.com/
-->
## Describe the bug
A clear and concise description of what the bug is.
## Expected behavior
A clear and concise description of what you expected to happen.
## To Reproduce
Indicate the steps to reproduce this bug, if applicable.
## Screenshots
Add screenshots to help explain your problem.
## Environment
- **Hugo version** [e.g: 0.80.0]:
- **Hugo extended?**: Yes / No
## Additional context
Add any other context about the problem here.
If it's a UI issue, fill the following information:
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
## Content of config.yaml
```yaml
### Paste the content of the config file here
```
## Link to the demo site and/or source repository

65
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@ -0,0 +1,65 @@
name: Bug Report
description: File a bug report
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/guide/).
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen? Please be as detailed as possible, including screenshots and any other information that might help us reproduce the problem.
placeholder: Tell us what you see!
validations:
required: true
- type: input
id: hugo-version
attributes:
label: Hugo version
description: "What is the version of Hugo you are using? (Note: this theme does not support non-extended version of Hugo)"
placeholder: ex. 0.100.0
validations:
required: true
- type: input
id: theme-version
attributes:
label: Theme version
description: "What is the version of Stack theme you are using?"
placeholder: ex. 3.12.0
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- type: input
id: browser-info
attributes:
label: More information about the browser
description: "E.g: Browser version, OS version, etc."
placeholder: ex. Chrome 104, Windows 11
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: input
id: minimal-reproduction-url
attributes:
label: Link to Minimal Reproducible Example
description: |
Use [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJimmy/hugo-theme-stack-starter) to create a minimal reproduction of the problem.
A minimal reproduction is required so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed.
placeholder: https://github.com/username/your-repository
validations:
required: true

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/CaiJimmy/hugo-theme-stack/discussions
about: Please ask and answer questions here.

View File

@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -1,33 +0,0 @@
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
label: "chore"
- title: "♻️ Refactor"
label: refactor
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES

View File

@ -1,44 +0,0 @@
name: Build Hugo Artifact
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
# 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
- uses: actions/checkout@v2
- name: Hugo setup
uses: peaceiris/actions-hugo@v2.4.13
with:
# The Hugo version to download (if necessary) and use. Example: 0.58.2
hugo-version: latest # optional, default is latest
# Download (if necessary) and use Hugo extended version. Example: true
extended: true # optional, default is false
# Runs a set of commands using the runners shell
- name: Generate Hugo site
run: cd exampleSite && hugo --gc --themesDir ../..
- name: Upload Hugo artifact
uses: actions/upload-artifact@v2.2.2
with:
# Artifact name
name: resources
# A file, directory or wildcard pattern that describes what to upload
path: |
exampleSite/resources
!exampleSite/resources/_gen/images

View File

@ -1,16 +0,0 @@
name: Release Drafter
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,48 +1,23 @@
![Stack](https://i.imgur.com/cCiHOGS.jpg)
![image](https://user-images.githubusercontent.com/5889006/190859441-141b5f81-8483-40d2-bd96-ebf85616a46d.png)
# Hugo Theme Stack
> Card-style Hugo theme designed for bloggers.
<img align="right" width="150" alt="logo" src="https://user-images.githubusercontent.com/5889006/190859553-5b229b4f-c476-4cbd-928f-890f5265ca4c.png">
Card-style Hugo theme designed for bloggers.
## Quickstart
Use this template: [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJimmy/hugo-theme-stack-starter)
## Demo
[Example Site](https://demo.stack.jimmycai.com/)
[![Netlify Status](https://api.netlify.com/api/v1/badges/a2d2807a-a905-4bcb-97da-8da8d847da3d/deploy-status)](https://app.netlify.com/sites/hugo-theme-stack/deploys)
* Starter template demo: [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com)
* Dev build: [dev.stack.jimmycai.com](https://dev.stack.jimmycai.com)
## Documentation
[Documentation](https://docs.stack.jimmycai.com/) | [中文文档](https://docs.stack.jimmycai.com/zh/)
## Introduction
Stack is a simple card-style Hugo theme designed for bloggers, some of its features are:
- Responsive images support
- Lazy load images
- Dark mode
- Local search
- [PhotoSwipe](https://photoswipe.com/) integration
- Archive page template
- Full native JavaScript, no jQuery or any other frameworks are used
- No CSS framework, keep it simple and minimal
- Properly cropped thumbnails
- Subsection support
- Table of contents
## Requirements
It's necessary to use **Hugo Extended ≥ 0.87.0**.
## Installation
* Route 1: Clone / Download this repository to `theme` folder
* Route 2: Turn your site into a hugo module and add this theme as a module dependency
Edit your site config following `exampleSite/config.yaml`.
*Note: Remove `config.toml` if there is one in the site folder.*
Check [documentation](https://docs.stack.jimmycai.com/) for more details.
Visit [stack.jimmycai.com](https://stack.jimmycai.com)
## Copyright
@ -51,33 +26,3 @@ Check [documentation](https://docs.stack.jimmycai.com/) for more details.
Please do not remove the "*Theme Stack designed by Jimmy*" text and link.
If you want to port this theme to another blogging platform, please let me know🙏.
## Sponsoring
If you like this theme, give it a star, and consider supporting its development:
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/C0C530AXX)
Your support is greatly appreciated :)
## Thanks to
| Project | Description | Licence |
| ------- | ----------- | ------- |
| [PhotoSwipe](https://photoswipe.com/) | For the lightbox effect | [MIT](https://github.com/dimsemenov/PhotoSwipe/blob/master/LICENSE) |
| [Normalize.css](https://github.com/necolas/normalize.css) | - | [MIT](https://github.com/necolas/normalize.css/blob/master/LICENSE.md) |
| [Node Vibrant](https://github.com/Vibrant-Colors/node-vibrant) | To extract the color from images | [MIT](https://github.com/Vibrant-Colors/node-vibrant/blob/master/LICENSE.md)
| [Tabler icons](https://github.com/tabler/tabler-icons) | Default menu icons | [MIT](https://github.com/tabler/tabler-icons/blob/master/LICENSE) |
| [jonsuh/hamburgers](https://github.com/jonsuh/hamburgers) | Hamburger icon of menu | [MIT](https://github.com/jonsuh/hamburgers/blob/master/LICENSE) |
| [lepture/yue.css](https://github.com/lepture/yue.css) | Part of it is used for styling article content | MIT |
| [Typlog](https://typlog.com/) | Where the markdown gallery syntax is borrowed from | The author gave me the permission |
| [Pure CSS implementation of Google Photos / 500px image layout](https://github.com/xieranmaya/blog/issues/6) | Used for image gallery | - |
### References
Some references that I took while building this theme:
| Project | Licence|
| ------- | ------|
| [artchen/hexo-theme-element](https://github.com/artchen/hexo-theme-element) | [MIT](https://github.com/artchen/hexo-theme-element/blob/master/LICENSE) |
| [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo) | [MIT](https://github.com/MunifTanjim/minimo/blob/master/LICENSE) |

31
assets/scss/general.scss Normal file
View File

@ -0,0 +1,31 @@
a {
text-decoration: none;
color: var(--accent-color);
&:hover {
color: var(--accent-color-darker);
}
&.link {
box-shadow: 0px -2px 0px rgba(var(--link-background-color), var(--link-background-opacity)) inset;
transition: all 0.3s ease;
&:hover {
box-shadow: 0px calc(-1rem * var(--article-line-height)) 0px rgba(var(--link-background-color), var(--link-background-opacity-hover)) inset;
}
}
}
.section-title {
text-transform: uppercase;
margin-top: 0;
margin-bottom: 10px;
display: block;
font-size: 1.6rem;
font-weight: bold;
color: var(--body-text-color);
a {
color: var(--body-text-color);
}
}

View File

@ -3,10 +3,12 @@
margin-right: auto;
.left-sidebar {
order: -3;
max-width: var(--left-sidebar-max-width);
}
.right-sidebar {
order: -1;
max-width: var(--right-sidebar-max-width);
/// Display right sidebar when min-width: lg
@ -73,6 +75,7 @@
}
main.main {
order: -2;
min-width: 0;
max-width: 100%;
flex-grow: 1;

View File

@ -54,6 +54,7 @@
}
.article-title {
font-family: var(--article-font-family);
font-weight: 600;
margin: 0;
color: var(--card-text-color-main);
@ -92,16 +93,15 @@
.article-time,
.article-translations {
display: flex;
align-items: center;
color: var(--card-text-color-tertiary);
gap: 15px;
flex-wrap: wrap;
svg {
vertical-align: middle;
width: 20px;
height: 20px;
stroke-width: 1.33;
flex-shrink: 0;
}
time,
@ -117,10 +117,21 @@
}
}
.article-time {
flex-wrap: wrap;
}
.article-translations {
& > div {
flex-wrap: wrap;
}
}
.article-category,
.article-tags {
display: flex;
gap: 10px;
flex-wrap: wrap;
a {
color: var(--accent-color-text);

View File

@ -0,0 +1,428 @@
/* Background */
.chroma {
color: $color;
background-color: $background-color;
}
/* Other */
.chroma .x {
}
/* Error */
.chroma .err {
color: $error-color;
}
/* LineTableTD */
.chroma .lntd {
vertical-align: top;
padding: 0;
margin: 0;
border: 0;
}
/* LineTable */
.chroma .lntable {
border-spacing: 0;
padding: 0;
margin: 0;
border: 0;
width: 100%;
display: block;
> tbody {
display: block;
width: 100%;
> tr {
display: flex;
width: 100%;
> td:last-child {
overflow-x: auto;
}
}
}
}
/* LineHighlight */
.chroma .hl {
display: block;
width: 100%;
background-color: #ffffcc;
}
/* LineNumbersTable */
.chroma .lnt {
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
color: #7f7f7f;
display: block;
}
/* LineNumbers */
.chroma .ln {
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
color: #7f7f7f;
}
/* Keyword */
.chroma .k {
color: $keyword-color;
}
/* KeywordConstant */
.chroma .kc {
color: $keyword-color;
}
/* KeywordDeclaration */
.chroma .kd {
color: $keyword-color;
}
/* KeywordNamespace */
.chroma .kn {
color: #f92672;
}
/* KeywordPseudo */
.chroma .kp {
color: $keyword-color;
}
/* KeywordReserved */
.chroma .kr {
color: $keyword-color;
}
/* KeywordType */
.chroma .kt {
color: $keyword-color;
}
/* Name */
.chroma .n {
color: $text-color;
}
/* NameAttribute */
.chroma .na {
color: $name-color;
}
/* NameBuiltin */
.chroma .nb {
color: $text-color;
}
/* NameBuiltinPseudo */
.chroma .bp {
color: $text-color;
}
/* NameClass */
.chroma .nc {
color: $name-color;
}
/* NameConstant */
.chroma .no {
color: $keyword-color;
}
/* NameDecorator */
.chroma .nd {
color: $name-color;
}
/* NameEntity */
.chroma .ni {
color: $text-color;
}
/* NameException */
.chroma .ne {
color: $name-color;
}
/* NameFunction */
.chroma .nf {
color: $name-color;
}
/* NameFunctionMagic */
.chroma .fm {
color: $text-color;
}
/* NameLabel */
.chroma .nl {
color: $text-color;
}
/* NameNamespace */
.chroma .nn {
color: $text-color;
}
/* NameOther */
.chroma .nx {
color: $name-color;
}
/* NameProperty */
.chroma .py {
color: $text-color;
}
/* NameTag */
.chroma .nt {
color: #f92672;
}
/* NameVariable */
.chroma .nv {
color: $text-color;
}
/* NameVariableClass */
.chroma .vc {
color: $text-color;
}
/* NameVariableGlobal */
.chroma .vg {
color: $text-color;
}
/* NameVariableInstance */
.chroma .vi {
color: $text-color;
}
/* NameVariableMagic */
.chroma .vm {
color: $text-color;
}
/* Literal */
.chroma .l {
color: #ae81ff;
}
/* LiteralDate */
.chroma .ld {
color: $literal-color;
}
/* LiteralString */
.chroma .s {
color: $literal-color;
}
/* LiteralStringAffix */
.chroma .sa {
color: $literal-color;
}
/* LiteralStringBacktick */
.chroma .sb {
color: $literal-color;
}
/* LiteralStringChar */
.chroma .sc {
color: $literal-color;
}
/* LiteralStringDelimiter */
.chroma .dl {
color: $literal-color;
}
/* LiteralStringDoc */
.chroma .sd {
color: $literal-color;
}
/* LiteralStringDouble */
.chroma .s2 {
color: $literal-color;
}
/* LiteralStringEscape */
.chroma .se {
color: #ae81ff;
}
/* LiteralStringHeredoc */
.chroma .sh {
color: $literal-color;
}
/* LiteralStringInterpol */
.chroma .si {
color: $literal-color;
}
/* LiteralStringOther */
.chroma .sx {
color: $literal-color;
}
/* LiteralStringRegex */
.chroma .sr {
color: $literal-color;
}
/* LiteralStringSingle */
.chroma .s1 {
color: $literal-color;
}
/* LiteralStringSymbol */
.chroma .ss {
color: $literal-color;
}
/* LiteralNumber */
.chroma .m {
color: #ae81ff;
}
/* LiteralNumberBin */
.chroma .mb {
color: #ae81ff;
}
/* LiteralNumberFloat */
.chroma .mf {
color: #ae81ff;
}
/* LiteralNumberHex */
.chroma .mh {
color: #ae81ff;
}
/* LiteralNumberInteger */
.chroma .mi {
color: #ae81ff;
}
/* LiteralNumberIntegerLong */
.chroma .il {
color: #ae81ff;
}
/* LiteralNumberOct */
.chroma .mo {
color: #ae81ff;
}
/* Operator */
.chroma .o {
color: #f92672;
}
/* OperatorWord */
.chroma .ow {
color: #f92672;
}
/* Punctuation */
.chroma .p {
color: $text-color;
}
/* Comment */
.chroma .c {
color: #75715e;
}
/* CommentHashbang */
.chroma .ch {
color: #75715e;
}
/* CommentMultiline */
.chroma .cm {
color: #75715e;
}
/* CommentSingle */
.chroma .c1 {
color: #75715e;
}
/* CommentSpecial */
.chroma .cs {
color: #75715e;
}
/* CommentPreproc */
.chroma .cp {
color: #75715e;
}
/* CommentPreprocFile */
.chroma .cpf {
color: #75715e;
}
/* Generic */
.chroma .g {
}
/* GenericDeleted */
.chroma .gd {
color: #f92672;
}
/* GenericEmph */
.chroma .ge {
font-style: italic;
}
/* GenericError */
.chroma .gr {
}
/* GenericHeading */
.chroma .gh {
}
/* GenericInserted */
.chroma .gi {
color: $name-color;
}
/* GenericOutput */
.chroma .go {
}
/* GenericPrompt */
.chroma .gp {
}
/* GenericStrong */
.chroma .gs {
font-weight: bold;
}
/* GenericSubheading */
.chroma .gu {
color: #75715e;
}
/* GenericTraceback */
.chroma .gt {
}
/* GenericUnderline */
.chroma .gl {
}
/* TextWhitespace */
.chroma .w {
}

View File

@ -3,382 +3,12 @@
* https://xyproto.github.io/splash/docs/monokai.html
*/
/* Background */
.chroma {
color: #f8f8f2;
background-color: #272822
}
/* Other */
.chroma .x {}
/* Error */
.chroma .err {
color: #bb0064;
}
/* LineTableTD */
.chroma .lntd {
vertical-align: top;
padding: 0;
margin: 0;
border: 0;
}
/* LineTable */
.chroma .lntable {
border-spacing: 0;
padding: 0;
margin: 0;
border: 0;
width: auto;
overflow: auto;
display: block;
}
/* LineHighlight */
.chroma .hl {
display: block;
width: 100%;
background-color: #ffffcc
}
/* LineNumbersTable */
.chroma .lnt {
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
color: #7f7f7f
}
/* LineNumbers */
.chroma .ln {
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
color: #7f7f7f
}
/* Keyword */
.chroma .k {
color: #66d9ef
}
/* KeywordConstant */
.chroma .kc {
color: #66d9ef
}
/* KeywordDeclaration */
.chroma .kd {
color: #66d9ef
}
/* KeywordNamespace */
.chroma .kn {
color: #f92672
}
/* KeywordPseudo */
.chroma .kp {
color: #66d9ef
}
/* KeywordReserved */
.chroma .kr {
color: #66d9ef
}
/* KeywordType */
.chroma .kt {
color: #66d9ef
}
/* Name */
.chroma .n {}
/* NameAttribute */
.chroma .na {
color: #a6e22e
}
/* NameBuiltin */
.chroma .nb {}
/* NameBuiltinPseudo */
.chroma .bp {}
/* NameClass */
.chroma .nc {
color: #a6e22e
}
/* NameConstant */
.chroma .no {
color: #66d9ef
}
/* NameDecorator */
.chroma .nd {
color: #a6e22e
}
/* NameEntity */
.chroma .ni {}
/* NameException */
.chroma .ne {
color: #a6e22e
}
/* NameFunction */
.chroma .nf {
color: #a6e22e
}
/* NameFunctionMagic */
.chroma .fm {}
/* NameLabel */
.chroma .nl {}
/* NameNamespace */
.chroma .nn {}
/* NameOther */
.chroma .nx {
color: #a6e22e
}
/* NameProperty */
.chroma .py {}
/* NameTag */
.chroma .nt {
color: #f92672
}
/* NameVariable */
.chroma .nv {}
/* NameVariableClass */
.chroma .vc {}
/* NameVariableGlobal */
.chroma .vg {}
/* NameVariableInstance */
.chroma .vi {}
/* NameVariableMagic */
.chroma .vm {}
/* Literal */
.chroma .l {
color: #ae81ff
}
/* LiteralDate */
.chroma .ld {
color: #e6db74
}
/* LiteralString */
.chroma .s {
color: #e6db74
}
/* LiteralStringAffix */
.chroma .sa {
color: #e6db74
}
/* LiteralStringBacktick */
.chroma .sb {
color: #e6db74
}
/* LiteralStringChar */
.chroma .sc {
color: #e6db74
}
/* LiteralStringDelimiter */
.chroma .dl {
color: #e6db74
}
/* LiteralStringDoc */
.chroma .sd {
color: #e6db74
}
/* LiteralStringDouble */
.chroma .s2 {
color: #e6db74
}
/* LiteralStringEscape */
.chroma .se {
color: #ae81ff
}
/* LiteralStringHeredoc */
.chroma .sh {
color: #e6db74
}
/* LiteralStringInterpol */
.chroma .si {
color: #e6db74
}
/* LiteralStringOther */
.chroma .sx {
color: #e6db74
}
/* LiteralStringRegex */
.chroma .sr {
color: #e6db74
}
/* LiteralStringSingle */
.chroma .s1 {
color: #e6db74
}
/* LiteralStringSymbol */
.chroma .ss {
color: #e6db74
}
/* LiteralNumber */
.chroma .m {
color: #ae81ff
}
/* LiteralNumberBin */
.chroma .mb {
color: #ae81ff
}
/* LiteralNumberFloat */
.chroma .mf {
color: #ae81ff
}
/* LiteralNumberHex */
.chroma .mh {
color: #ae81ff
}
/* LiteralNumberInteger */
.chroma .mi {
color: #ae81ff
}
/* LiteralNumberIntegerLong */
.chroma .il {
color: #ae81ff
}
/* LiteralNumberOct */
.chroma .mo {
color: #ae81ff
}
/* Operator */
.chroma .o {
color: #f92672
}
/* OperatorWord */
.chroma .ow {
color: #f92672
}
/* Punctuation */
.chroma .p {}
/* Comment */
.chroma .c {
color: #75715e
}
/* CommentHashbang */
.chroma .ch {
color: #75715e
}
/* CommentMultiline */
.chroma .cm {
color: #75715e
}
/* CommentSingle */
.chroma .c1 {
color: #75715e
}
/* CommentSpecial */
.chroma .cs {
color: #75715e
}
/* CommentPreproc */
.chroma .cp {
color: #75715e
}
/* CommentPreprocFile */
.chroma .cpf {
color: #75715e
}
/* Generic */
.chroma .g {}
/* GenericDeleted */
.chroma .gd {
color: #f92672
}
/* GenericEmph */
.chroma .ge {
font-style: italic
}
/* GenericError */
.chroma .gr {}
/* GenericHeading */
.chroma .gh {}
/* GenericInserted */
.chroma .gi {
color: #a6e22e
}
/* GenericOutput */
.chroma .go {}
/* GenericPrompt */
.chroma .gp {}
/* GenericStrong */
.chroma .gs {
font-weight: bold
}
/* GenericSubheading */
.chroma .gu {
color: #75715e
}
/* GenericTraceback */
.chroma .gt {}
/* GenericUnderline */
.chroma .gl {}
/* TextWhitespace */
.chroma .w {}
$color: #f8f8f2;
$background-color: #272822;
$error-color: #bb0064;
$keyword-color: #66d9ef;
$text-color: $color;
$name-color: #a6e22e;
$literal-color: #e6db74;
@import "common.scss";

View File

@ -3,407 +3,12 @@
* https://xyproto.github.io/splash/docs/monokailight.html
*/
/* Background */
.chroma {
color: #272822;
background-color: #fafafa;
}
/* Other */
.chroma .x {
}
/* Error */
.chroma .err {
color: #960050;
}
/* LineTableTD */
.chroma .lntd {
vertical-align: top;
padding: 0;
margin: 0;
border: 0;
}
/* LineTable */
.chroma .lntable {
border-spacing: 0;
padding: 0;
margin: 0;
border: 0;
width: auto;
overflow: auto;
display: block;
}
/* LineHighlight */
.chroma .hl {
display: block;
width: 100%;
background-color: #ffffcc;
}
/* LineNumbersTable */
.chroma .lnt {
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
color: #7f7f7f;
}
/* LineNumbers */
.chroma .ln {
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
color: #7f7f7f;
}
/* Keyword */
.chroma .k {
color: #00a8c8;
}
/* KeywordConstant */
.chroma .kc {
color: #00a8c8;
}
/* KeywordDeclaration */
.chroma .kd {
color: #00a8c8;
}
/* KeywordNamespace */
.chroma .kn {
color: #f92672;
}
/* KeywordPseudo */
.chroma .kp {
color: #00a8c8;
}
/* KeywordReserved */
.chroma .kr {
color: #00a8c8;
}
/* KeywordType */
.chroma .kt {
color: #00a8c8;
}
/* Name */
.chroma .n {
color: #111111;
}
/* NameAttribute */
.chroma .na {
color: #75af00;
}
/* NameBuiltin */
.chroma .nb {
color: #111111;
}
/* NameBuiltinPseudo */
.chroma .bp {
color: #111111;
}
/* NameClass */
.chroma .nc {
color: #75af00;
}
/* NameConstant */
.chroma .no {
color: #00a8c8;
}
/* NameDecorator */
.chroma .nd {
color: #75af00;
}
/* NameEntity */
.chroma .ni {
color: #111111;
}
/* NameException */
.chroma .ne {
color: #75af00;
}
/* NameFunction */
.chroma .nf {
color: #75af00;
}
/* NameFunctionMagic */
.chroma .fm {
color: #111111;
}
/* NameLabel */
.chroma .nl {
color: #111111;
}
/* NameNamespace */
.chroma .nn {
color: #111111;
}
/* NameOther */
.chroma .nx {
color: #75af00;
}
/* NameProperty */
.chroma .py {
color: #111111;
}
/* NameTag */
.chroma .nt {
color: #f92672;
}
/* NameVariable */
.chroma .nv {
color: #111111;
}
/* NameVariableClass */
.chroma .vc {
color: #111111;
}
/* NameVariableGlobal */
.chroma .vg {
color: #111111;
}
/* NameVariableInstance */
.chroma .vi {
color: #111111;
}
/* NameVariableMagic */
.chroma .vm {
color: #111111;
}
/* Literal */
.chroma .l {
color: #ae81ff;
}
/* LiteralDate */
.chroma .ld {
color: #d88200;
}
/* LiteralString */
.chroma .s {
color: #d88200;
}
/* LiteralStringAffix */
.chroma .sa {
color: #d88200;
}
/* LiteralStringBacktick */
.chroma .sb {
color: #d88200;
}
/* LiteralStringChar */
.chroma .sc {
color: #d88200;
}
/* LiteralStringDelimiter */
.chroma .dl {
color: #d88200;
}
/* LiteralStringDoc */
.chroma .sd {
color: #d88200;
}
/* LiteralStringDouble */
.chroma .s2 {
color: #d88200;
}
/* LiteralStringEscape */
.chroma .se {
color: #8045ff;
}
/* LiteralStringHeredoc */
.chroma .sh {
color: #d88200;
}
/* LiteralStringInterpol */
.chroma .si {
color: #d88200;
}
/* LiteralStringOther */
.chroma .sx {
color: #d88200;
}
/* LiteralStringRegex */
.chroma .sr {
color: #d88200;
}
/* LiteralStringSingle */
.chroma .s1 {
color: #d88200;
}
/* LiteralStringSymbol */
.chroma .ss {
color: #d88200;
}
/* LiteralNumber */
.chroma .m {
color: #ae81ff;
}
/* LiteralNumberBin */
.chroma .mb {
color: #ae81ff;
}
/* LiteralNumberFloat */
.chroma .mf {
color: #ae81ff;
}
/* LiteralNumberHex */
.chroma .mh {
color: #ae81ff;
}
/* LiteralNumberInteger */
.chroma .mi {
color: #ae81ff;
}
/* LiteralNumberIntegerLong */
.chroma .il {
color: #ae81ff;
}
/* LiteralNumberOct */
.chroma .mo {
color: #ae81ff;
}
/* Operator */
.chroma .o {
color: #f92672;
}
/* OperatorWord */
.chroma .ow {
color: #f92672;
}
/* Punctuation */
.chroma .p {
color: #111111;
}
/* Comment */
.chroma .c {
color: #75715e;
}
/* CommentHashbang */
.chroma .ch {
color: #75715e;
}
/* CommentMultiline */
.chroma .cm {
color: #75715e;
}
/* CommentSingle */
.chroma .c1 {
color: #75715e;
}
/* CommentSpecial */
.chroma .cs {
color: #75715e;
}
/* CommentPreproc */
.chroma .cp {
color: #75715e;
}
/* CommentPreprocFile */
.chroma .cpf {
color: #75715e;
}
/* Generic */
.chroma .g {
}
/* GenericDeleted */
.chroma .gd {
color: #f92672;
}
/* GenericEmph */
.chroma .ge {
font-style: italic;
}
/* GenericError */
.chroma .gr {
}
/* GenericHeading */
.chroma .gh {
}
/* GenericInserted */
.chroma .gi {
color: #7ca727;
}
/* GenericOutput */
.chroma .go {
}
/* GenericPrompt */
.chroma .gp {
}
/* GenericStrong */
.chroma .gs {
font-weight: bold;
}
/* GenericSubheading */
.chroma .gu {
color: #75715e;
}
/* GenericTraceback */
.chroma .gt {
}
/* GenericUnderline */
.chroma .gl {
}
/* TextWhitespace */
.chroma .w {
}
$color: #272822;
$background-color: #fafafa;
$error-color: #960050;
$keyword-color: #00a8c8;
$text-color: #111111;
$name-color: #75af00;
$literal-color: #d88200;
@import "common.scss";

View File

@ -33,6 +33,10 @@
margin: var(--card-padding) 0;
color: var(--card-text-color-main);
.footnotes {
font-family: var(--base-font-family);
}
img {
max-width: 100%;
height: auto;
@ -63,7 +67,6 @@
}
.article-tags {
flex-wrap: wrap;
text-transform: unset;
}
@ -72,50 +75,13 @@
a {
color: var(--body-text-color);
}
a.link {
box-shadow: unset;
}
}
}
}
#article-toolbar {
display: flex;
align-items: center;
margin: 20px 0;
@include respond(md) {
display: none;
}
.back-home {
background: var(--card-background);
border-radius: var(--tag-border-radius);
color: var(--card-text-color-tertiary);
margin-right: 30px;
display: inline-flex;
align-items: center;
font-size: 1.4rem;
text-transform: uppercase;
padding: 10px 20px 10px 15px;
transition: box-shadow 0.3s ease;
box-shadow: var(--shadow-l1);
&:hover {
box-shadow: var(--shadow-l2);
}
svg {
margin-right: 5px;
width: 20px;
height: 20px;
}
span {
font-weight: 500;
white-space: nowrap;
}
}
}
.widget--toc {
@ -145,7 +111,7 @@
list-style-type: none;
counter-reset: item;
li a::before {
li a:first-of-type::before {
counter-increment: item;
content: counters(item, ".") ". ";
font-weight: bold;
@ -207,7 +173,7 @@
}
}
.related-contents {
.related-content {
overflow-x: auto;
padding-bottom: 15px;
@ -255,6 +221,28 @@
margin-inline-start: calc((var(--card-padding)) * -1);
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
border-inline-start: var(--heading-border-size) solid var(--accent-color);
position: relative;
a.header-anchor {
transition: opacity 0.3s ease;
opacity: 0;
position: absolute;
left: 0;
width: var(--card-padding);
text-align: center;
color: var(--accent-color);
&:before {
content: "#";
}
}
&:hover,
&:focus {
a.header-anchor {
opacity: 1;
}
}
}
figure {
@ -272,6 +260,16 @@
border-inline-start: var(--blockquote-border-size) solid var(--card-separator-color);
padding: 15px calc(var(--card-padding) - var(--blockquote-border-size));
background-color: var(--blockquote-background-color);
.cite {
display: block;
text-align: right;
font-size: 0.75em;
a {
text-decoration: underline;
}
}
}
hr {
@ -291,6 +289,11 @@
font-family: var(--code-font-family);
}
a,
code {
word-break: break-word;
}
.gallery {
position: relative;
display: flex;
@ -414,6 +417,18 @@
}
}
.gitlab-embed-snippets {
margin: 0 !important;
.file-holder.snippet-file-content {
margin-block-end: 0 !important;
margin-block-start: 0 !important;
margin-left: calc((var(--card-padding)) * -1) !important;
margin-right: calc((var(--card-padding)) * -1) !important;
padding: 0 var(--card-padding) !important;
}
}
/// Negative margins
blockquote,
figure,
@ -427,4 +442,20 @@
margin-right: calc((var(--card-padding)) * -1);
width: calc(100% + var(--card-padding) * 2);
}
/// Make long KaTeX equations scrollable in the x-axis
.katex-display > .katex {
overflow-x: auto;
overflow-y: hidden;
}
kbd {
border: 1px solid var(--kbd-border-color);
font-weight: bold;
font-size: 0.9em;
line-height: 1;
padding: 2px 4px;
border-radius: 4px;
display: inline-block;
}
}

View File

@ -127,10 +127,8 @@
}
/* Menu style */
.menu {
padding-left: 0;
#main-menu {
list-style: none;
flex-direction: column;
overflow-y: auto;
flex-grow: 1;
font-size: 1.4rem;
@ -141,13 +139,15 @@
margin: 0 calc(var(--container-padding) * -1);
padding: 30px 30px;
@include respond(xl) {
padding: 15px 0;
}
&,
.menu-bottom-section {
&, .menu-bottom-section ol {
flex-direction: column;
gap: 30px;
@include respond(xl) {
gap: 25px;
}
@ -176,8 +176,8 @@
}
svg {
stroke: currentColor;
stroke-width: 1.33;
width: 20px;
height: 20px;
}
@ -200,17 +200,19 @@
font-weight: bold;
}
}
}
.menu-bottom-section {
&.menu-bottom-section {
margin-top: auto;
ol {
display: flex;
flex-direction: column;
width: 100%;
padding-left: 0;
}
}
}
}
.social-menu {
.menu-social {
list-style: none;
padding: 0;
margin: 0;

View File

@ -79,6 +79,7 @@
@include respond(lg) {
padding-top: var(--main-top-padding);
padding-bottom: var(--main-top-padding);
}
}

View File

@ -24,36 +24,5 @@
@import "partials/layout/404.scss";
@import "partials/layout/search.scss";
@import "general.scss";
@import "custom.scss";
a {
text-decoration: none;
color: var(--accent-color);
&:hover {
color: var(--accent-color-darker);
}
&.link {
box-shadow: 0px -2px 0px rgba(var(--link-background-color), var(--link-background-opacity)) inset;
transition: all 0.3s ease;
&:hover {
box-shadow: 0px -10px 0px rgba(var(--link-background-color), var(--link-background-opacity-hover)) inset;
}
}
}
.section-title {
text-transform: uppercase;
margin-top: 0;
margin-bottom: 10px;
display: block;
font-size: 1.6rem;
font-weight: bold;
color: var(--body-text-color);
a {
color: var(--body-text-color);
}
}

View File

@ -16,7 +16,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
--accent-color: #34495e;
--accent-color-darker: #2c3e50;
--accent-color-text: #fff;
--body-text-color: #bababa;
--body-text-color: #707070;
--tag-border-radius: 4px;
@ -44,7 +44,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
--zh-font-family: "PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei";
--base-font-family: "Lato", var(--sys-font-family), var(--zh-font-family), sans-serif;
--code-font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
--code-font-family: Menlo, Monaco, Consolas, "Courier New", var(--zh-font-family), monospace;
}
/*
@ -56,7 +56,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
--card-text-color-main: #000;
--card-text-color-secondary: #747474;
--card-text-color-tertiary: #bababa;
--card-text-color-tertiary: #767676;
--card-separator-color: rgba(218, 218, 218, 0.5);
--card-border-radius: 10px;
@ -123,6 +123,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
--table-border-color: #dadada;
--tr-even-background-color: #efefee;
--kbd-border-color: #dadada;
&[data-scheme="dark"] {
--code-background-color: #272822;
--code-text-color: rgba(255, 255, 255, 0.9);

View File

@ -8,6 +8,10 @@ class StackColorScheme {
constructor(toggleEl: HTMLElement) {
this.bindMatchMedia();
this.currentScheme = this.getSavedScheme();
if (window.matchMedia('(prefers-color-scheme: dark)').matches === true)
this.systemPreferScheme = 'dark'
else
this.systemPreferScheme = 'light';
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);

View File

@ -53,7 +53,14 @@ class Search {
this.resultTitle = resultTitle;
this.resultTitleTemplate = resultTitleTemplate;
/// Check if there's already value in the search input
if (this.input.value.trim() !== '') {
this.doSearch(this.input.value.split(' '));
}
else {
this.handleQueryString();
}
this.bindQueryStringChange();
this.bindSearchForm();
}
@ -227,6 +234,7 @@ class Search {
Search.updateQueryString(keywords, true);
if (keywords === '') {
lastSearch = '';
return this.clear();
}

View File

@ -21,12 +21,15 @@ function setupSmoothAnchors() {
aElement.addEventListener("click", clickEvent => {
clickEvent.preventDefault();
let targetId = aElement.getAttribute("href").substring(1);
// The replace done on ':' is here for footnotes, as this character would otherwise interfere when used as a CSS selector.
let target = document.querySelector(`#${targetId.replace(":", "\\:")}`) as HTMLElement;
const targetId = decodeURI(aElement.getAttribute("href").substring(1)),
target = document.getElementById(targetId) as HTMLElement,
offset = target.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top;
window.history.pushState({}, "", aElement.getAttribute("href"));
scrollTo({ top: target.offsetTop, behavior: "smooth" });
scrollTo({
top: offset,
behavior: "smooth"
});
});
});
}

View File

@ -28,6 +28,7 @@ params:
src: img/avatar.png
article:
headingAnchor: false
math: false
toc: true
readingTime: true
@ -51,6 +52,12 @@ params:
issueTerm: pathname
label:
beaudar:
repo:
issueTerm: pathname
label:
theme:
remark42:
host:
site:
@ -64,7 +71,7 @@ params:
clientSecret:
autoCreateIssue: false
# Waline client configuration see: https://waline.js.org/en/reference/client.html
# Waline client configuration see: https://waline.js.org/en/reference/client/props.html
waline:
serverURL:
lang:
@ -73,12 +80,11 @@ params:
emoji:
- https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo
requiredMeta:
- name
- email
- url
placeholder:
- nick
- mail
locale:
admin: Admin
placeholder:
twikoo:
envId:
@ -92,10 +98,12 @@ params:
category:
categoryID:
mapping:
strict:
lightTheme:
darkTheme:
reactionsEnabled: 1
emitMetadata: 0
inputPosition:
lang:
gitalk:

View File

@ -1,6 +1,6 @@
Vibrant:
- src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.5/dist/vibrant.min.js
integrity: sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g=
- src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js
integrity: sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=
type: script
PhotoSwipe:
@ -14,26 +14,24 @@ PhotoSwipe:
type: script
defer: true
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.css
integrity: sha256-c0uckgykQ9v5k+IqViZOZKc47Jn7KQil4/MP3ySA3F8=
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css
type: style
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.css
integrity: sha256-SBLU4vv6CA6lHsZ1XyTdhyjJxCjPif/TRkjnsyGAGnE=
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css
type: style
KaTeX:
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css
integrity: sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css
integrity: sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV
type: style
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js
integrity: sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js
integrity: sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8
type: script
defer: true
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js
integrity: sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js
integrity: sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05
type: script
defer: true

View File

@ -1 +1,3 @@
Example site modified from https://github.com/gohugoio/hugoBasicExample
This is an example site used for solely for testing purposes. **It is not meant to be used as a template for your site**.
To create a new site, please use the starter template: [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJimmy/hugo-theme-stack-starter/)

View File

@ -1,5 +0,0 @@
---
title: 关于
---
This is a test page for i18n support.

View File

@ -15,7 +15,7 @@ menu:
icon: user
---
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
Written in Go, Hugo is an open source static site generator available under the [Apache License 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
Hugo makes use of a variety of open source projects including:
@ -29,6 +29,6 @@ Hugo is ideal for blogs, corporate websites, creative portfolios, online magazin
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
Learn more and contribute on [GitHub](https://github.com/gohugoio).

View File

@ -0,0 +1,10 @@
---
title: 关于
menu:
main:
weight: -90
params:
icon: user
---
This is a test page for i18n support.

View File

@ -159,7 +159,7 @@ H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.

View File

@ -21,27 +21,23 @@ In this example we will be using [KaTeX](https://katex.org/)
{{ end }}
```
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
- To enable KaTex on a per page basis include the parameter `math: true` in content files
- To enable KaTeX globally set the parameter `math` to `true` in a project's configuration
- To enable KaTeX on a per page basis include the parameter `math: true` in content files
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{</ math.inline >}}
### Examples
{{< math.inline >}}
<p>
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
</p>
{{</ math.inline >}}
Inline math: $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$
Block math:
$$

View File

@ -23,7 +23,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
## Twitter Simple Shortcode
{{< twitter_simple 1085870671291310081 >}}
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
<br>
@ -40,3 +40,28 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
## Gist Shortcode
{{< gist spf13 7896402 >}}
## Gitlab Snippets Shortcode
{{< gitlab 2349278 >}}
## Quote Shortcode
Stack adds a `quote` shortcode. For example:
{{< quote author="A famous person" source="The book they wrote" url="https://en.wikipedia.org/wiki/Book">}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{< /quote >}}
{{< quote source="Anonymous book" url="https://en.wikipedia.org/wiki/Book">}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{< /quote >}}
{{< quote source="Some book">}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{< /quote >}}
{{< quote author="Somebody">}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{< /quote >}}

View File

@ -1,37 +1,51 @@
baseurl: https://example.com
baseurl: https://example.com/
languageCode: en-us
theme: hugo-theme-stack
paginate: 5
title: Example Site
copyright: Example Person
# Theme i18n support
# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
DefaultContentLanguage: en
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
# This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: false
languages:
en:
languageName: English
title: Example Site
weight: 1
cn:
params:
sidebar:
subtitle: Example description
zh-cn:
languageName: 中文
title: 演示站点
weight: 2
params:
sidebar:
subtitle: 演示说明
ar:
languageName: عربي
languagedirection: rtl
title: موقع تجريبي
weight: 3
params:
sidebar:
subtitle: وصف تجريبي
services:
# Change it to your Disqus shortname before using
disqusShortname: hugo-theme-stack
disqus:
shortname: "hugo-theme-stack"
# GA Tracking ID
googleAnalytics:
id:
# Theme i18n support
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, zh-tw, es, de, nl, it, th, el, uk, ar
DefaultContentLanguage: en
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
# This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: false
pagination:
pagerSize: 3
permalinks:
post: /p/:slug/
@ -42,7 +56,7 @@ params:
- post
featuredImageField: image
rssFullContent: true
favicon:
favicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary)
footer:
since: 2020
@ -84,6 +98,12 @@ params:
issueTerm: pathname
label:
beaudar:
repo:
issueTerm: pathname
label:
theme:
remark42:
host:
site:
@ -97,21 +117,20 @@ params:
clientSecret:
autoCreateIssue: false
# Waline client configuration see: https://waline.js.org/en/reference/client.html
# Waline client configuration see: https://waline.js.org/en/reference/component.html
waline:
serverURL:
lang:
visitor:
avatar:
pageview:
emoji:
- https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo
- https://unpkg.com/@waline/emojis@1.0.1/weibo
requiredMeta:
- name
- email
- url
placeholder:
locale:
admin: Admin
placeholder:
twikoo:
envId:
@ -142,6 +161,7 @@ params:
repo:
clientID:
clientSecret:
proxy:
cusdis:
host:
@ -189,7 +209,7 @@ params:
enabled: true
### Custom menu
### See https://docs.stack.jimmycai.com/configuration/custom-menu.html
### See https://stack.jimmycai.com/config/menu
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
menu:
main: []
@ -220,9 +240,21 @@ related:
markup:
goldmark:
extensions:
passthrough:
enable: true
delimiters:
block:
- - \[
- \]
- - $$
- $$
inline:
- - \(
- \)
renderer:
## Set to true if you have HTML content inside Markdown
unsafe: false
unsafe: true
tableOfContents:
endLevel: 4
ordered: true

2
go.mod
View File

@ -1,3 +1,3 @@
module github.com/CaiJimmy/hugo-theme-stack/v3
go 1.12
go 1.17

View File

@ -23,15 +23,15 @@ article:
tableOfContents:
other: جدول المحتويات
relatedContents:
relatedContent:
other: محتوى مشابهه
lastUpdatedOn:
other: التعديل الاخير
readingTime:
one: "قرائة {{ .Count }} دقيقة"
other: "قرائة {{ .Count }} دقائق"
one: "تُقرأ خلال دقيقة"
other: "تُقرأ خلال {{ .Count }} دقائق"
notFound:
title:
@ -52,6 +52,10 @@ widget:
title:
other: وسوم
categoriesCloud:
title:
other: التصنيفات
search:
title:
other: بحث
@ -64,7 +68,7 @@ search:
footer:
builtWith:
other: "مبني بستخدام {{ .Generator }}"
other: "مبني باستخدام {{ .Generator }}"
designedBy:
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"

72
i18n/be.yaml Normal file
View File

@ -0,0 +1,72 @@
toggleMenu:
other: Паказаць/схаваць меню
darkMode:
other: Цёмны рэжым
list:
page:
one: "{{ .Count }} старонка"
few: "{{ .Count }} старонкі"
many: "{{ .Count }} старонак"
other: "{{ .Count }} старонкі"
section:
other: Раздзел
subsection:
one: Падраздзел
few: Падраздзелы
many: Падраздзелы
other: Падраздзелы
article:
back:
other: Назад
relatedContent:
other: Таксама рэкамендуем
lastUpdatedOn:
other: Абноўлена
tableOfContents:
other: Змест
readingTime:
other: "Час чытання: {{ .Count }} хв."
notFound:
title:
other: Не знойдзена
subtitle:
other: Запытваемая старонка не існуе
widget:
archives:
title:
other: Архівы
more:
other: Яшчэ
tagCloud:
title:
other: Тэгі
search:
title:
other: Пошук
placeholder:
other: Увядзіце нешта...
resultTitle:
other: "Знайдзена #PAGES_COUNT старонак (за #TIME_SECONDS с.)"
footer:
builtWith:
other: Створана пры дапамозе {{ .Generator }}
designedBy:
other: Тэма {{ .Theme }}, дызайн {{ .DesignedBy }}

73
i18n/bg.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: Покажи Меню
darkMode:
other: Тъмен Режим
list:
page:
one: "{{ .Count }} страница"
other: "{{ .Count }} страници"
section:
other: Секция
subsection:
one: Подсекция
other: Подсекции
article:
back:
other: Назад
tableOfContents:
other: Съдържание
relatedContent:
other: Свързано Съдържание
lastUpdatedOn:
other: Последна промяна на
readingTime:
one: "{{ .Count }} minute read"
other: "{{ .Count }} minute read"
notFound:
title:
other: Не е намерено
subtitle:
other: Страницата която търсите не е открита
widget:
archives:
title:
other: Архиви
more:
other: Повече
tagCloud:
title:
other: Тагове
categoriesCloud:
title:
other: Категории
search:
title:
other: Търсене
placeholder:
other: Напишете нещо...
resultTitle:
other: "#PAGES_COUNT страници (#TIME_SECONDS секунди)"
footer:
builtWith:
other: Създадено с {{ .Generator }}
designedBy:
other: Тема {{ .Theme }} създадена от {{ .DesignedBy }}

73
i18n/bn.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: টগল মেনু
darkMode:
other: ডার্ক মোড
list:
page:
one: "{{ .Count }} পাতা"
other: "{{ .Count }} পাতা"
section:
other: অনুচ্ছেদ
subsection:
one: উপ-অনুচ্ছেদ
other: উপ-অনুচ্ছেদ
article:
back:
other: পেছনে
tableOfContents:
other: সূচিপত্র
relatedContent:
other: সম্পর্কিত বিষয়বস্তু
lastUpdatedOn:
other: সর্বশেষ আপডেট করা হয়েছে
readingTime:
one: "{{ .Count }} মিনিটে পড়া যাবে"
other: "{{ .Count }} মিনিটে পড়া যাবে"
notFound:
title:
other: পাওয়া যায়নি
subtitle:
other: এই পাতাটি বিদ্যমান নেই
widget:
archives:
title:
other: আর্কাইভ
more:
other: আরও
tagCloud:
title:
other: ট্যাগ
categoriesCloud:
title:
other: বিভাগ
search:
title:
other: অনুসন্ধান
placeholder:
other: কিছু টাইপ করুন...
resultTitle:
other: "#PAGES_COUNT পাতা (#TIME_SECONDS সেকেন্ড)"
footer:
builtWith:
other: "{{ .Generator }} দিয়ে নির্মিত"
designedBy:
other: "থিম {{ .Theme }} ডিজাইন করেছেন {{ .DesignedBy }}"

73
i18n/ca.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: Toggle Menu
darkMode:
other: Mode fosc
list:
page:
one: "{{ .Count }} pàgina"
other: "{{ .Count }} pàgines"
section:
other: Secció
subsection:
one: Subsecció
other: Subseccions
article:
back:
other: Tornar
tableOfContents:
other: Taula de contingut
relatedContent:
other: Continguts relacionats
lastUpdatedOn:
other: Última vegada actualitzat
readingTime:
one: "{{ .Count }} minut a llegir"
other: "{{ .Count }} minuts a llegir"
notFound:
title:
other: No Trobat
subtitle:
other: Aquesta pàgina no existeix
widget:
archives:
title:
other: Arxiu
more:
other: Més
tagCloud:
title:
other: Etiquetes
categoriesCloud:
title:
other: Categories
search:
title:
other: Cerca
placeholder:
other: Tecleja alguna cosa...
resultTitle:
other: "#PAGES_COUNT pàgines en (#TIME_SECONDS segons)"
footer:
builtWith:
other: Creat amb {{ .Generator }}
designedBy:
other: Tema {{ .Theme }} dissenyat per {{ .DesignedBy }}

73
i18n/cs.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: Skrýt menu
darkMode:
other: Tmavý režim
list:
page:
one: "{{ .Count }} stránka"
other: "{{ .Count }} stránek"
section:
other: Kategorie
subsection:
one: Podkategorie
other: Podkategorie
article:
back:
other: Zpět
tableOfContents:
other: Obsah
relatedContent:
other: Související
lastUpdatedOn:
other: Naposledy aktualizováno
readingTime:
one: "{{ .Count }} minuta"
other: "{{ .Count }} minut"
notFound:
title:
other: Nenalezeno
subtitle:
other: Tato stránka neexistuje
widget:
archives:
title:
other: Archivy
more:
other: Více
tagCloud:
title:
other: Štítky
categoriesCloud:
title:
other: Kategorie
search:
title:
other: Hledat
placeholder:
other: Zadejte něco...
resultTitle:
other: "#PAGES_COUNT stránek (#TIME_SECONDS sekund)"
footer:
builtWith:
other: Vytvořeno pomocí {{ .Generator }}
designedBy:
other: Šablona {{ .Theme }} od {{ .DesignedBy }}

View File

@ -23,7 +23,7 @@ article:
tableOfContents:
other: Inhaltsverzeichnis
relatedContents:
relatedContent:
other: Verwandte Inhalte
lastUpdatedOn:
@ -52,6 +52,10 @@ widget:
title:
other: Schlagwörter
categoriesCloud:
title:
other: Kategorien
search:
title:
other: Suche

View File

@ -23,7 +23,7 @@ article:
tableOfContents:
other: Πινακας περιεχομενων
relatedContents:
relatedContent:
other: Σχετικο περιεχομενο
lastUpdatedOn:

View File

@ -23,8 +23,8 @@ article:
tableOfContents:
other: Table of contents
relatedContents:
other: Related contents
relatedContent:
other: Related content
lastUpdatedOn:
other: Last updated on

View File

@ -1,5 +1,5 @@
toggleMenu:
other: Toggle Menu
other: Ocultar menú
darkMode:
other: Modo oscuro
@ -23,15 +23,15 @@ article:
tableOfContents:
other: Tabla de contenido
relatedContents:
relatedContent:
other: Contenidos relacionados
lastUpdatedOn:
other: Última vez actualizado
other: Última actualización
readingTime:
one: "{{ .Count }} minuto a leer"
other: "{{ .Count }} minutos a leer"
one: "Tiempo de lectura {{ .Count }} minuto"
other: "Tiempo de lectura {{ .Count }} minutos"
notFound:
title:
@ -51,13 +51,16 @@ widget:
tagCloud:
title:
other: Etiquetas
categoriesCloud:
title:
other: Categorías
search:
title:
other: Búsqueda
placeholder:
other: Teclea algo...
other: Escribe algo...
resultTitle:
other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)"

73
i18n/fa.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: منو
darkMode:
other: حالت شب
list:
page:
one: "{{ .Count }} صفحه"
other: "{{ .Count }} صفحه"
section:
other: بخش
subsection:
one: زیربخش
other: زیربخش
article:
back:
other: قبلی
tableOfContents:
other: فهرست
relatedContent:
other: مطالب مرتبط
lastUpdatedOn:
other: آخرین بروزرسانی در
readingTime:
one: "مطالعه در {{ .Count }} دقیقه"
other: "مطالعه در {{ .Count }} دقیقه"
notFound:
title:
other: یافت نشد
subtitle:
other: این صحه وجود ندارد
widget:
archives:
title:
other: آرشیو
more:
other: بیشتر
tagCloud:
title:
other: تگ ها
categoriesCloud:
title:
other: دسته بندی
search:
title:
other: جستجو
placeholder:
other: تایپ کنید ...
resultTitle:
other: "#PAGES_COUNT صفحه (#TIME_SECONDS ثانیه)"
footer:
builtWith:
other: قدرت گرفته از {{ .Generator }}
designedBy:
other: قالب {{ .Theme }} ساخته شده توسط {{ .DesignedBy }}

View File

@ -23,7 +23,7 @@ article:
tableOfContents:
other: Table des matières
relatedContents:
relatedContent:
other: Contenus liés
lastUpdatedOn:
@ -50,6 +50,9 @@ widget:
tagCloud:
title:
other: Mots clés
categoriesCloud:
title:
other: Catégories
search:
title:

73
i18n/hi.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: मेनू टॉगल करें
darkMode:
other: डार्क मोड
list:
page:
one: "{{ .Count }} पेज"
other: "{{ .Count }} पेज"
section:
other: अनुभाग
subsection:
one: उपधारा
other: उपखंड
article:
back:
other: पीछे
tableOfContents:
other: विषयसूची
relatedContent:
other: संबंधित सामग्री
lastUpdatedOn:
other: अंतिम बार अपडेट किया गया
readingTime:
one: "{{ .Count }} मिनट पढ़ें"
other: "{{ .Count }} मिनट पढ़ें"
notFound:
title:
other: 404 नहीं मिला।
subtitle:
other: यह पृष्ठ मौजूद नहीं है।
widget:
archives:
title:
other: अभिलेखागार
more:
other: अधिक
tagCloud:
title:
other: टैग
categoriesCloud:
title:
other: श्रेणियाँ
search:
title:
other: खोज
placeholder:
other: कुछ लिखें...
resultTitle:
other: "#PAGES_COUNT पेज (#TIME_SECONDS सेकंड)"
footer:
builtWith:
other: निर्मित {{ .Generator }} के साथ
designedBy:
other: थीम {{ .Theme }} द्वारा डिज़ाइन किया गया {{ .DesignedBy }}

73
i18n/hu.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: Menü Kapcsolása
darkMode:
other: Sötét Mód
list:
page:
one: "{{ .Count }} oldal"
other: "{{ .Count }} oldalak"
section:
other: Szekció
subsection:
one: Alszekció
other: Alszekciók
article:
back:
other: Vissza
tableOfContents:
other: Tartalomjegyzék
relatedContent:
other: Kapcsolódó tartalom
lastUpdatedOn:
other: Utolsó frissítés időpontja
readingTime:
one: "{{ .Count }} percnyi olvasmány"
other: "{{ .Count }} percnyi olvasmány"
notFound:
title:
other: Nem található
subtitle:
other: Ez az oldal nem létezik
widget:
archives:
title:
other: Archívum
more:
other: Több
tagCloud:
title:
other: Cimkék
categoriesCloud:
title:
other: Kategóriák
search:
title:
other: Keresés
placeholder:
other: Írj valamit...
resultTitle:
other: "#PAGES_COUNT oldal (#TIME_SECONDS másodperc alatt)"
footer:
builtWith:
other: "{{ .Generator }} használatával készült"
designedBy:
other: A {{ .Theme }} dizájnt {{ .DesignedBy }} tervezte

View File

@ -23,7 +23,7 @@ article:
tableOfContents:
other: Daftar Isi
relatedContents:
relatedContent:
other: Konten terkait
lastUpdatedOn:
@ -51,6 +51,10 @@ widget:
title:
other: Tag
categoriesCloud:
title:
other: Kategori
search:
title:
other: Cari

View File

@ -23,7 +23,7 @@ article:
tableOfContents:
other: Indice
relatedContents:
relatedContent:
other: Contenuti correlati
lastUpdatedOn:
@ -51,6 +51,10 @@ widget:
title:
other: Tags
categoriesCloud:
title:
other: Categorie
search:
title:
other: Cerca

View File

@ -4,6 +4,16 @@ toggleMenu:
darkMode:
other: ダークモード
list:
page:
other: "{{ .Count }} ページ目"
section:
other: セクション
subsection:
other: サブセクション
article:
back:
other: 前のページ
@ -11,7 +21,7 @@ article:
tableOfContents:
other: 目次
relatedContents:
relatedContent:
other: 関連するコンテンツ
lastUpdatedOn:
@ -38,6 +48,10 @@ widget:
title:
other: タグ
categoriesCloud:
title:
other: カテゴリ
search:
title:
other: 検索
@ -47,3 +61,10 @@ search:
resultTitle:
other: "#PAGES_COUNT 件 #TIME_SECONDS 秒)"
footer:
builtWith:
other: "{{ .Generator }} で構築されています。"
designedBy:
other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。

View File

@ -23,7 +23,7 @@ article:
tableOfContents:
other: 목차
relatedContents:
relatedContent:
other: 관련 글
lastUpdatedOn:
@ -47,6 +47,10 @@ widget:
more:
other: 더보기
categoriesCloud:
title:
other: 카테고리
tagCloud:
title:
other: 태그

View File

@ -17,10 +17,12 @@ list:
other: Subsecties
article:
relatedContents:
relatedContent:
other: Gerelateerde inhoud
lastUpdatedOn:
other: Laatst bijgewerkt op
readingTime:
other: "{{ .Count }} leestijd"
notFound:
title:
@ -38,6 +40,10 @@ widget:
title:
other: Tags
categoriesCloud:
title:
other: Categorie
search:
title:
other: Zoeken

72
i18n/oc.yaml Normal file
View File

@ -0,0 +1,72 @@
toggleMenu:
other: Alternar menú
darkMode:
other: Mòde fosc
list:
page:
one: "{{ .Count }} pagina"
other: "{{ .Count }} paginas"
section:
other: Seccion
subsection:
one: Josseccion
other: Josseccions
article:
back:
other: Tornar
tableOfContents:
other: Taula de contengut
relatedContent:
other: Contenguts relacionats
lastUpdatedOn:
other: Darrièra actualizacion
readingTime:
one: "{{ .Count }} minuta de lectura"
other: "{{ .Count }} minutas de lectura"
notFound:
title:
other: Non trobat
subtitle:
other: Aquesta pagina existís pas
widget:
archives:
title:
other: Archiu
more:
other: Mai
tagCloud:
title:
other: Etiquetas
categoriesCloud:
title:
other: Categorias
search:
title:
other: Cercar
placeholder:
other: Picatz quicòm...
resultTitle:
other: "#PAGES_COUNT paginas dins (#TIME_SECONDS segons)"
footer:
builtWith:
other: Creat amb {{ .Generator }}
designedBy:
other: Tàma {{ .Theme }} concebut per {{ .DesignedBy }}

View File

@ -7,6 +7,8 @@ darkMode:
list:
page:
one: "{{ .Count }} strona"
few: "{{ .Count }} strony"
many: "{{ .Count }} stron"
other: "{{ .Count }} stron"
section:
@ -14,7 +16,9 @@ list:
subsection:
one: Podsekcja
other: Podsekcje
few: Podsekcje
many: Podsekcji
other: Podsekcji
article:
back:
@ -23,7 +27,7 @@ article:
tableOfContents:
other: Spis treści
relatedContents:
relatedContent:
other: Powiązane artykuły
lastUpdatedOn:
@ -31,6 +35,8 @@ article:
readingTime:
one: "Przeczytasz w {{ .Count }} minutę"
few: "Przeczytasz w {{ .Count }} minuty"
many: "Przeczytasz w {{ .Count }} minut"
other: "Przeczytasz w {{ .Count }} minut"
notFound:
@ -51,6 +57,10 @@ widget:
title:
other: Tagi
categoriesCloud:
title:
other: Kategorie
search:
title:
other: Szukaj
@ -59,6 +69,9 @@ search:
other: Wpisz coś...
resultTitle:
one: "#PAGES_COUNT strona (#TIME_SECONDS sekund)"
few: "#PAGES_COUNT strony (#TIME_SECONDS sekund)"
many: "#PAGES_COUNT stron (#TIME_SECONDS sekund)"
other: "#PAGES_COUNT stron (#TIME_SECONDS sekund)"
footer:

View File

@ -23,7 +23,7 @@ article:
tableOfContents:
other: Índice
relatedContents:
relatedContent:
other: Conteúdo relacionado
lastUpdatedOn:
@ -48,6 +48,9 @@ widget:
tagCloud:
title:
other: Tags
categoriesCloud:
title:
other: Categorias
search:
title:

67
i18n/pt-pt.yaml Normal file
View File

@ -0,0 +1,67 @@
toggleMenu:
other: Alternar Menu
darkMode:
other: Modo Escuro
list:
page:
one: "{{ .Count }} página"
other: "{{ .Count }} páginas"
section:
other: Secção
subsection:
one: Subsecção
other: Subsecções
article:
back:
other: Voltar
tableOfContents:
other: Índice
relatedContent:
other: Conteúdo relacionado
lastUpdatedOn:
other: Última atualização a
readingTime:
one: "{{ .Count }} minuto de leitura"
other: "{{ .Count }} minutos de leitura"
notFound:
title:
other: Não Encontrado
subtitle:
other: Esta página não existe.
widget:
archives:
title:
other: Arquivos
more:
other: Mais
tagCloud:
title:
other: Tags
categoriesCloud:
title:
other: Categorias
search:
title:
other: Pesquisa
placeholder:
other: Escreva algo...
resultTitle:
other: "#PAGES_COUNT páginas (#TIME_SECONDS segundos)"
footer:
builtWith:
other: Criado com {{ .Generator }}
designedBy:
other: Tema {{ .Theme }} desenvolvido por {{ .DesignedBy }}

View File

@ -23,7 +23,7 @@ list:
article:
back:
other: Назад
relatedContents:
relatedContent:
other: Также рекомендуем
lastUpdatedOn:
other: Обновлено

71
i18n/sk.yaml Normal file
View File

@ -0,0 +1,71 @@
toggleMenu:
other: Skryť menu
darkMode:
other: Tmavý režim
list:
page:
one: "{{ .Count }} stránka"
other: "{{ .Count }} stránok"
section:
other: Kategórie
subsection:
one: Podkategória
other: Podkategórie
article:
back:
other: Späť
tableOfContents:
other: Obsah
relatedContent:
other: Súvisiace
lastUpdatedOn:
other: Naposledy aktualizované
readingTime:
one: "{{ .Count }} minúta"
other: "{{ .Count }} minút"
notFound:
title:
other: Nenájdené
subtitle:
other: Tato stránka neexistuje
widget:
archives:
title:
other: Archívy
more:
other: Viac
tagCloud:
title:
other: Štítky
categoriesCloud:
title:
other: Kategórie
search:
title:
other: Hladať
placeholder:
other: Zadajte niečo...
resultTitle:
other: "#PAGES_COUNT stránok (#TIME_SECONDS sekúnd)"
footer:
builtWith:
other: Vytvorené pomocou {{ .Generator }}
designedBy:
other: Šablóna {{ .Theme }} od {{ .DesignedBy }}

View File

@ -23,7 +23,7 @@ article:
tableOfContents:
other: สารบัญ
relatedContents:
relatedContent:
other: เนื้อหาคล้ายคลึงกัน
lastUpdatedOn:

View File

@ -17,7 +17,7 @@ list:
other: Alt bölümler
article:
relatedContents:
relatedContent:
other: Alakalı içerikler
lastUpdatedOn:
other: Son güncelleme

View File

@ -24,7 +24,7 @@ article:
tableOfContents:
other: Зміст
relatedContents:
relatedContent:
other: Схожі матеріали
lastUpdatedOn:

74
i18n/vi.yaml Normal file
View File

@ -0,0 +1,74 @@
toggleMenu:
other: Hiển thị Menu
darkMode:
other: Chế độ nền tối
list:
page:
one: "{{ .Count }} trang"
other: "{{ .Count }} trang"
section:
other: Section
subsection:
one: Subsection
other: Subsections
article:
back:
other: Trở lại
tableOfContents:
other: Mục lục
relatedContent:
other: Bài viết liên quan
lastUpdatedOn:
other: Cập nhật lần cuối
readingTime:
one: "{{ .Count }} phút đọc"
other: "{{ .Count }} phút đọc"
notFound:
title:
other: Không tìm thấy
subtitle:
other: Trang này không tồn tại
widget:
archives:
title:
other: Lưu trữ
more:
other: Còn nữa
tagCloud:
title:
other: Nhãn dán
categoriesCloud:
title:
other: Chuỗi bài
search:
title:
other: Tìm kiếm
placeholder:
other: Nhập từ khoá ...
resultTitle:
other: "#PAGES_COUNT trang (#TIME_SECONDS giây)"
footer:
builtWith:
other: Built with {{ .Generator }}
designedBy:
other: Theme {{ .Theme }} thiết kế bởi {{ .DesignedBy }}

View File

@ -4,6 +4,13 @@ toggleMenu:
darkMode:
other: 暗色模式
list:
page: "{{ .Count }} 个页面"
section: 章节
subsection: 子章节
article:
back:
other: 返回
@ -11,7 +18,7 @@ article:
tableOfContents:
other: 目录
relatedContents:
relatedContent:
other: 相关文章
lastUpdatedOn:
@ -38,6 +45,10 @@ widget:
title:
other: 标签云
categoriesCloud:
title:
other: 分类
search:
title:
other: 搜索
@ -47,3 +58,10 @@ search:
resultTitle:
other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)"
footer:
builtWith:
other: 使用 {{ .Generator }} 构建
designedBy:
other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计

73
i18n/zh-hk.yaml Normal file
View File

@ -0,0 +1,73 @@
toggleMenu:
other: 切換選單
darkMode:
other: 深色模式
list:
page:
one: "第 {{ .Count }} 頁"
other: "第 {{ .Count }} 頁"
section:
other: Section
subsection:
one: Subsection
other: Subsections
article:
back:
other: 返回
tableOfContents:
other: 目錄
relatedContent:
other: 相關內容
lastUpdatedOn:
other: 上次改過於
readingTime:
one: "需要 {{ .Count }} 分鐘閱讀"
other: "需要 {{ .Count }} 分鐘閱讀"
notFound:
title:
other: Not Found
subtitle:
other: 頁面不存在
widget:
archives:
title:
other: Archives
more:
other: 更多
tagCloud:
title:
other: Tags
categoriesCloud:
title:
other: Categories
search:
title:
other: 搜尋
placeholder:
other: Type 關鍵字...
resultTitle:
other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)"
footer:
builtWith:
other: Built with {{ .Generator }}
designedBy:
other: 主題 {{ .Theme }} 由 {{ .DesignedBy }} 設計

View File

@ -4,6 +4,18 @@ toggleMenu:
darkMode:
other: 夜晚模式
list:
page:
one: "第 {{ .Count }} 頁"
other: "第 {{ .Count }} 頁"
section:
other: 段落
subsection:
one: 小節
other: 小節
article:
back:
other: 返回
@ -11,18 +23,20 @@ article:
tableOfContents:
other: 目錄
relatedContents:
relatedContent:
other: 相關文章
lastUpdatedOn:
other: 最後更新
readingTime:
one: "閱讀時間: {{ .Count }} 分鐘"
other: "閱讀時間: {{ .Count }} 分鐘"
notFound:
title:
other: 404 錯誤
subtitle:
other: 頁面不存在
@ -37,6 +51,9 @@ widget:
tagCloud:
title:
other: 標籤雲
categoriesCloud:
title:
other: 分類
search:
title:
@ -47,3 +64,10 @@ search:
resultTitle:
other: "#PAGES_COUNT 個結果 (用時 #TIME_SECONDS 秒)"
footer:
builtWith:
other: 使用 {{ .Generator }} 建立
designedBy:
other: 主題 {{ .Theme }} 由 {{ .DesignedBy }} 設計

View File

@ -3,5 +3,43 @@
<h1 class="article-title">{{ T "notFound.title" }}</h1>
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
</div>
{{- $query := first 1 (where .Site.Pages "Layout" "==" "search") -}}
{{- $searchPage := index $query 0 -}}
{{- with $searchPage -}}
<form action="{{ $searchPage.RelPermalink }}" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
<p>
<label>{{ T "search.title" }}</label>
<input id="searchInput" name="keyword" required placeholder="{{ T `search.placeholder` }}" />
<button title="{{ T `search.title` }}">
{{ partial "helper/icon" "search" }}
</button>
</p>
</form>
<div class="search-result">
<h3 class="search-result--title section-title"></h3>
<div class="search-result--list article-list--compact"></div>
</div>
<script>
window.searchResultTitleTemplate = "{{ T `search.resultTitle` }}"
</script>
{{- $opts := dict "minify" hugo.IsProduction "JSXFactory" "createElement" -}}
{{- $searchScript := resources.Get "ts/search.tsx" | js.Build $opts -}}
<script type="text/javascript" src="{{ $searchScript.RelPermalink }}" defer></script>
<script>
const wrongUrl = new URL(window.location.href);
/// Get the search keyword from the wrong URL by removing all slashes and dashes
const searchKeyword = wrongUrl.pathname.split(/[/|-]/).join(' ').trim();
document.getElementById('searchInput').setAttribute('value', searchKeyword);
</script>
{{- end -}}
{{ partialCached "footer/footer" . }}
{{ end }}

View File

@ -0,0 +1,6 @@
<h{{ .Level }} id="{{ .Anchor }}">
{{- if site.Params.Article.HeadingAnchor -}}
<a href="#{{ .Anchor }}" class="header-anchor"></a>
{{- end -}}
{{ .Text | safeHTML }}
</h{{ .Level }}>

View File

@ -6,15 +6,22 @@
</head>
<body class="{{ block `body-class` . }}{{ end }}">
{{- partial "head/colorScheme" . -}}
{{- $hasWidget := default (gt (len .Site.Params.widgets.homepage) 0) (.Scratch.Get "hasWidget") -}}
{{/* The container is wider when there's any activated widget */}}
{{- $hasWidget := false -}}
{{- range .Site.Params.widgets -}}
{{- if gt (len .) 0 -}}
{{- $hasWidget = true -}}
{{- end -}}
{{- end -}}
<div class="container main-container flex on-phone--column {{ if $hasWidget }}extended{{ else }}compact{{ end }}">
{{- block "left-sidebar" . -}}
{{ partial "sidebar/left.html" . }}
{{- end -}}
{{- block "right-sidebar" . -}}{{ end }}
<main class="main full-width">
{{- block "main" . }}{{- end }}
</main>
{{- block "right-sidebar" . -}}{{ end }}
</div>
{{ partial "footer/include.html" . }}
</body>

View File

@ -1,9 +1,15 @@
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
{{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}}
{{- $filtered := ($pages | intersect $notHidden) -}}
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $pages := where $pages "Params.hidden" "!=" true -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $filtered = $filtered | first $limit -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
@ -12,15 +18,15 @@
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
{{ range $filtered }}
{{ range $pages }}
{{- $content := safeHTML (.Summary | html) -}}
{{- if .Site.Params.rssFullContent -}}
{{- $content = safeHTML (.Content | html) -}}
@ -29,7 +35,7 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}

View File

@ -30,7 +30,7 @@
{{ partial "article/components/links" . }}
{{ end }}
{{ partial "article/components/related-contents" . }}
{{ partial "article/components/related-content" . }}
{{ if not (eq .Params.comments false) }}
{{ partial "comments/include" . }}

View File

@ -1,11 +1,11 @@
{{ define "body-class" }}template-search{{ end }}
{{ define "head" }}
{{- with .OutputFormats.Get "json" -}}
<link rel="preload" href="{{ .Permalink }}" as="fetch" crossorigin="anonymous">
<link rel="preload" href="{{ .RelPermalink }}" as="fetch" crossorigin="anonymous">
{{- end -}}
{{ end }}
{{ define "main" }}
<form action="{{ .Permalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .Permalink }}"{{- end }}>
<form action="{{ .RelPermalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .RelPermalink }}"{{- end }}>
<p>
<label>{{ T "search.title" }}</label>
<input name="keyword" placeholder="{{ T `search.placeholder` }}" />

View File

@ -10,7 +10,7 @@
{{- $Width := $imageRaw.Width -}}
{{- $Height := $imageRaw.Height -}}
{{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}}
{{- if .context.Site.Params.imageProcessing.cover.enabled -}}
{{- $thumbnail := $imageRaw.Fill .size -}}
{{- $Permalink = $thumbnail.RelPermalink -}}
{{- $Width = $thumbnail.Width -}}

View File

@ -23,18 +23,21 @@
{{ end }}
</div>
{{ if or (not .Date.IsZero) (.Site.Params.article.readingTime) }}
{{ $showReadingTime := .Params.readingTime | default (.Site.Params.article.readingTime) }}
{{ $showDate := not .Date.IsZero }}
{{ $showFooter := or $showDate $showReadingTime }}
{{ if $showFooter }}
<footer class="article-time">
{{ if not .Date.IsZero }}
{{ if $showDate }}
<div>
{{ partial "helper/icon" "date" }}
<time class="article-time--published">
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
</time>
</div>
{{ end }}
{{ if .Site.Params.article.readingTime }}
{{ if $showReadingTime }}
<div>
{{ partial "helper/icon" "clock" }}
<time class="article-time--reading">

View File

@ -12,7 +12,7 @@
<section class="article-lastmod">
{{ partial "helper/icon" "clock" }}
<span>
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
</span>
</section>
{{- end -}}

View File

@ -16,8 +16,12 @@
</div>
{{ with $link.image }}
{{ $permalink := . }}
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
{{ $permalink = .RelPermalink }}
{{ end }}
<div class="article-image">
<img src="{{ . }}" loading="lazy">
<img src="{{ $permalink }}" loading="lazy">
</div>
{{ end }}
</a>

View File

@ -1,12 +1,14 @@
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
<script>
window.addEventListener("DOMContentLoaded", () => {
renderMathInElement(document.querySelector(`.article-content`), {
const mainArticleElement = document.querySelector(".main-article");
renderMathInElement(mainArticleElement, {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false },
{ left: "\\(", right: "\\)", display: false },
{ left: "\\[", right: "\\]", display: true }
]
],
ignoredClasses: ["gist"]
});})
</script>

View File

@ -1,8 +1,8 @@
{{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }}
{{ with $related }}
<aside class="related-contents--wrapper">
<h2 class="section-title">{{ T "article.relatedContents" }}</h2>
<div class="related-contents">
<aside class="related-content--wrapper">
<h2 class="section-title">{{ T "article.relatedContent" }}</h2>
<div class="related-content">
<div class="flex article-list--tile">
{{ range . }}
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}

View File

@ -0,0 +1,46 @@
<script
src="https://beaudar.lipk.org/client.js"
repo="{{ .Site.Params.comments.beaudar.repo }}"
issue-term="{{ .Site.Params.comments.beaudar.issueTerm }}"
{{ with .Site.Params.comments.beaudar.label }}
label="{{ . }}"
{{ end }}
theme="{{ .Site.Params.comments.beaudar.theme }}"
crossorigin="anonymous"
async
></script>
<style>
.beaudar {
max-width: unset;
}
</style>
<script>
let beaudarLoaded = false;
function setBeaudarTheme(theme) {
let beaudar = document.querySelector(".beaudar iframe");
if (beaudar) {
beaudar.contentWindow.postMessage(
{
type: "set-theme",
theme: `github-${theme}`,
},
"https://beaudar.lipk.org"
);
}
}
addEventListener("message", (event) => {
if (event.origin !== "https://beaudar.lipk.org") return;
/// Called when Beaudar is ready
beaudarLoaded = true;
setBeaudarTheme(document.documentElement.dataset.scheme);
});
window.addEventListener("onColorSchemeChange", (e) => {
if (!beaudarLoaded) return;
setBeaudarTheme(e.detail);
});
</script>

View File

@ -13,7 +13,7 @@
<script>
window.addEventListener('onColorSchemeChange', (e) => {
if (DISQUS) {
if (typeof DISQUS == 'object') {
DISQUS.reset({
reload: true
});

View File

@ -2,7 +2,7 @@
{{- $disqusjs := .Site.Params.Comments.disqusjs -}}
{{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}}
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | resources.ToCSS | minify -}}
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | toCSS | minify -}}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
<div class="disqus-container">

View File

@ -6,10 +6,13 @@
data-category="{{- .category -}}"
data-category-id="{{- .categoryID -}}"
data-mapping="{{- default `title` .mapping -}}"
data-strict="{{- default 0 .strict -}}"
data-reactions-enabled="{{- default 1 .reactionsEnabled -}}"
data-emit-metadata="{{- default 0 .emitMetadata -}}"
data-input-position="{{- default `top` .inputPosition -}}"
data-theme="{{- default `light` .lightTheme -}}"
data-lang="{{- default `en` .lang -}}"
data-loading="{{- .loading -}}"
crossorigin="anonymous"
async
></script>

View File

@ -15,6 +15,7 @@
admin: ["{{- .admin -}}"],
distractionFreeMode: false, // Facebook-like distraction free mode
id: md5(location.pathname), // Max Location.pathname Legth:75 https://github.com/gitalk/gitalk/issues/102
proxy: {{- .proxy -}},
});
(function () {
if (

View File

@ -2,10 +2,10 @@
<div id="remark42"></div>
<script>
var remark_config = {
host: "{{ .host }}",
host: '{{ .host }}',
site_id: '{{ .site }}',
components: ['embed'],
url: "{{ $.Permalink }}",
url: '{{ $.Permalink }}',
max_shown_comments: {{ default 15 .max_shown_comments }},
theme: document.documentElement.dataset.scheme,
page_title: '{{ $.Title }}',
@ -13,14 +13,14 @@
show_email_subscription: {{ default true .show_email_subscription }}
};
(function (c) {
for (var i = 0; i < c.length; i++) {
var d = document, s = d.createElement('script');
s.src = remark_config.host + '/web/' + c[i] + '.js';
s.defer = true;
(d.head || d.body).appendChild(s);
!function(e, n) {
for (var o = 0; o < e.length; o++) {
var r = n.createElement('script'),
c = '.js',
d = n.head || n.body;
'noModule' in r ? (r.type = 'module', c = '.mjs') : r.async = !0, r.defer = !0, r.src = remark_config.host + '/web/' + e[o] + c, d.appendChild(r)
}
})(remark_config.components || ['embed']);
}(remark_config.components || ['embed'], document);
window.addEventListener('onColorSchemeChange', (e) => {
window.REMARK42.changeTheme(e.detail);

View File

@ -1,4 +1,4 @@
<script src="//cdn.jsdelivr.net/npm/twikoo@1.4.18/dist/twikoo.all.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.39/dist/twikoo.all.min.js"></script>
<div id="tcomment"></div>
<style>
.twikoo {
@ -13,7 +13,9 @@
}
.twikoo .el-input-group__prepend,
.twikoo .tk-action-icon,
.twikoo .tk-submit-action-icon,
.twikoo .tk-time,
.twikoo .tk-comments-no,
.twikoo .tk-comments-count {
color: var(--twikoo-body-text-color);
}
@ -28,6 +30,13 @@
.twikoo .el-button{
color: var(--twikoo-body-text-color)!important;
}
.twikoo .el-input__count {
color: var(--twikoo-body-text-color) !important;
}
.OwO .OwO-body {
background-color: var(--body-background) !important;
color: var(--body-text-color) !important;
}
</style>
{{- with .Site.Params.comments.twikoo -}}

View File

@ -16,6 +16,8 @@
</style>
<script>
let utterancesLoaded = false;
function setUtterancesTheme(theme) {
let utterances = document.querySelector('.utterances iframe');
if (utterances) {
@ -31,10 +33,14 @@
addEventListener('message', event => {
if (event.origin !== 'https://utteranc.es') return;
/// Called when Utterances is ready
utterancesLoaded = true;
setUtterancesTheme(document.documentElement.dataset.scheme)
});
window.addEventListener('onColorSchemeChange', (e) => {
if (!utterancesLoaded) return;
setUtterancesTheme(e.detail)
})
</script>

View File

@ -3,7 +3,7 @@
<div id="vssue"></div>
<script src="https://unpkg.com/vue/dist/vue.runtime.min.js"></script>
<script src="https://unpkg.com/vue@2/dist/vue.runtime.min.js"></script>
<script src="https://unpkg.com/vssue/dist/vssue.{{ .platform }}.min.js"></script>
<script>

View File

@ -1,4 +1,5 @@
<script src='//cdn.jsdelivr.net/npm/@waline/client/dist/Waline.min.js'></script>
<script src='//unpkg.com/@waline/client@v2/dist/waline.js'></script>
<link href='//unpkg.com/@waline/client@v2/dist/waline.css' rel='stylesheet'/>
<div id="waline" class="waline-container"></div>
<style>
.waline-container {
@ -6,18 +7,19 @@
border-radius: var(--card-border-radius);
box-shadow: var(--shadow-l1);
padding: var(--card-padding);
--waline-font-size: var(--article-font-size);
}
.waline-container .vcount {
.waline-container .wl-count {
color: var(--card-text-color-main);
}
</style>
{{- with .Site.Params.comments.waline -}}
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "avatarcdn" "avatarCDN" "avatarforce" "avatarForce" -}}
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}}
{{- range $key, $val := . -}}
{{- if $val -}}
{{- if ne $val nil -}}
{{- $replaceKey := index $replaceKeys $key -}}
{{- $k := default $key $replaceKey -}}
@ -27,6 +29,6 @@
<script>
/// Waline client configuration see: https://waline.js.org/en/reference/client.html
new Waline({{ $config | jsonify | safeJS }});
Waline.init({{ $config | jsonify | safeJS }});
</script>
{{- end -}}

View File

@ -1,6 +1,11 @@
<!-- Use site subtitle by default -->
{{ $description := .Site.Params.sidebar.subtitle }}
<!-- Seprate description exists -->
{{ if .Site.Params.description }}
{{ $description = .Site.Params.description }}
{{ end }}
{{ if .Description }}
<!-- Page description exists -->
{{ $description = .Description }}
@ -9,4 +14,4 @@
{{ $description = .Summary }}
{{ end }}
{{ return ($description | plainify)}}
{{ return (replaceRE "\n" " " $description | plainify) }}

View File

@ -1,12 +1,12 @@
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
{{- $opts := dict "minify" hugo.IsProduction -}}
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
{{- $script := resources.Get "ts/main.ts" | js.Build $opts | fingerprint -}}
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
{{- with resources.Get "ts/custom.ts" -}}
{{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
{{- $customScript := . | js.Build $opts -}}
{{- $customScript := . | js.Build $opts | fingerprint -}}
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
{{- end -}}

View File

@ -1,11 +1,11 @@
{{- $ThemeVersion := "3.9.0" -}}
{{- $ThemeVersion := "3.30.0" -}}
<footer class="site-footer">
<section class="copyright">
&copy;
{{ if and (.Site.Params.footer.since) (ne .Site.Params.footer.since (int (now.Format "2006"))) }}
{{ .Site.Params.footer.since }} -
{{ end }}
{{ now.Format "2006" }} {{ .Site.Title }}
{{ now.Format "2006" }} {{ default .Site.Title .Site.Copyright }}
</section>
<section class="powerby">

View File

@ -2,9 +2,10 @@
<meta name='viewport' content='width=device-width, initial-scale=1'>
{{- $description := partialCached "data/description" . .RelPermalink -}}
<meta name='description' content='{{ $description }}'>
<meta name='description' {{ printf "content=%q" $description | safeHTMLAttr }}>
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
{{- $title := partialCached "data/title" . .RelPermalink -}}
{{- $title := partial "data/title" . -}}
<title>{{ $title }}</title>
<link rel='canonical' href='{{ .Permalink }}'>
@ -18,7 +19,7 @@
{{- end -}}
{{ with .Site.Params.favicon }}
<link rel="shortcut icon" href="{{ . }}" />
<link rel="shortcut icon" href="{{ . | relURL }}" />
{{ end }}
{{- template "_internal/google_analytics.html" . -}}

View File

@ -1,8 +1,8 @@
{{- $title := partialCached "data/title" . .RelPermalink -}}
{{- $description := partialCached "data/description" . .RelPermalink -}}
<meta property='og:title' content='{{ $title }}'>
<meta property='og:description' content='{{ $description }}'>
<meta property='og:title' {{ printf "content=%q" $title | safeHTMLAttr }}>
<meta property='og:description' {{ printf "content=%q" $description | safeHTMLAttr }}>
<meta property='og:url' content='{{ .Permalink }}'>
<meta property='og:site_name' content='{{ .Site.Title }}'>
<meta property='og:type' content='
@ -32,8 +32,8 @@
<meta property='article:modified_time' content='{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
{{- end -}}
{{- else -}}
{{- if not .Site.LastChange.IsZero -}}
<meta property='og:updated_time' content='{{ .Site.LastChange.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/>
{{- if not .Site.Lastmod.IsZero -}}
<meta property='og:updated_time' content='{{ .Site.Lastmod.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/>
{{- end -}}
{{- end -}}

View File

@ -6,8 +6,8 @@
{{- $title := partialCached "data/title" . .RelPermalink -}}
{{- $description := partialCached "data/description" . .RelPermalink -}}
<meta name="twitter:title" content="{{ $title }}">
<meta name="twitter:description" content="{{ $description }}">
<meta name="twitter:title" {{ printf "content=%q" $title | safeHTMLAttr }}>
<meta name="twitter:description" {{ printf "content=%q" $description | safeHTMLAttr }}>
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
{{- if $image.exists -}}

View File

@ -1,3 +1,3 @@
{{ $sass := resources.Get "scss/style.scss" }}
{{ $style := $sass | resources.ToCSS | minify | resources.Fingerprint "sha256" }}
{{ $style := $sass | toCSS | minify | resources.Fingerprint "sha256" }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">

View File

@ -38,13 +38,14 @@
</header>
{{- with .Site.Menus.social -}}
<ol class="social-menu">
<ol class="menu-social">
{{ range . }}
<li>
<a
href='{{ .URL }}'
{{ if eq (default true .Params.newTab) true }}target="_blank"{{ end }}
{{ with .Name }}title="{{ . }}"{{ end }}
rel="me"
>
{{ $icon := default "link" .Params.Icon }}
{{ with $icon }}
@ -60,12 +61,11 @@
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
<li {{ if $active }} class='current' {{ end }}>
<a href='{{ .URL | relLangURL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
{{ $icon := default .Pre .Params.Icon }}
{{ if .Pre }}
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://docs.stack.jimmycai.com/configuration/custom-menu.html" .URL }}
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://stack.jimmycai.com/config/menu" .URL }}
{{ end }}
{{ with $icon }}
{{ partial "helper/icon" . }}
@ -74,19 +74,21 @@
</a>
</li>
{{ end }}
<div class="menu-bottom-section">
<li class="menu-bottom-section">
<ol class="menu">
{{- $currentLanguageCode := .Language.Lang -}}
{{ if ( compare.Gt .Site.Home.AllTranslations.Len 1 ) }}
{{ with .Site.Home.AllTranslations }}
<li id="i18n-switch">
{{ partial "helper/icon" "language" }}
<select name="language" onchange="window.location.href = this.selectedOptions[0].value">
<select name="language" title="language" onchange="window.location.href = this.selectedOptions[0].value">
{{ range . }}
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
{{ end }}
</select>
</li>
{{ end }}
{{ end }}
{{ if (default false .Site.Params.colorScheme.toggle) }}
<li id="dark-mode-toggle">
@ -95,6 +97,7 @@
<span>{{ T "darkMode" }}</span>
</li>
{{ end }}
</div>
</ol>
</li>
</ol>
</aside>

View File

@ -4,7 +4,10 @@
<aside class="sidebar right-sidebar sticky">
{{ range $widget := . }}
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" .params) }}
<!-- Ensure that the `params` is not nil -->
{{- $params := default dict .params -}}
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" $params) }}
{{ else }}
{{ warnf "Widget %s not found" .type }}
{{ end }}

View File

@ -0,0 +1,4 @@
<script
type="application/javascript"
src="https://gitlab.com/-/snippets/{{ index .Params 0 }}.js"
></script>

View File

@ -0,0 +1,15 @@
<blockquote>
<p>{{ .Inner | markdownify }}</p>
{{- if or (.Get "author") (.Get "source") -}}
<span class="cite"><span></span>
{{- if .Get "author" -}}
<span>
{{- .Get "author" -}}{{- if .Get "source" -}}, {{ end -}}
</span>
{{- end -}}
{{- with .Get "url" -}}<a href="{{ . }}">{{- end -}}
<cite>{{ .Get "source" }}</cite>
{{- if .Get "url" -}}</a>{{- end -}}
</span>
{{- end -}}
</blockquote>

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