Compare commits

..

No commits in common. "master" and "v3.16.0" have entirely different histories.

60 changed files with 167 additions and 937 deletions

View File

@ -1,15 +1,17 @@
name: Bug Report name: Bug Report
description: File a bug report description: File a bug report
title: "[Bug]: "
labels: ["bug"]
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: | 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/). 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://docs.stack.jimmycai.com/).
- type: textarea - type: textarea
id: what-happened id: what-happened
attributes: attributes:
label: What happened? 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. description: Also tell us, what did you expect to happen? Please be as detailed as possible, include screenshots and any other information that might help us reproduce the problem.
placeholder: Tell us what you see! placeholder: Tell us what you see!
validations: validations:
required: true required: true
@ -53,13 +55,21 @@ body:
label: Relevant log output 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. description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell render: shell
- type: input - type: markdown
id: minimal-reproduction-url
attributes: attributes:
label: Link to Minimal Reproducible Example value: |
description: | If the issue is not present on the [demo site](https://demo.stack.jimmycai.com), in order to better understand the problem, please provide the link to the source code of your website (not the generated HTML).
Use [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJimmy/hugo-theme-stack-starter) to create a minimal reproduction of the problem. Or link to a minimal reproduction of the problem if there are sensible data.
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. - type: input
placeholder: https://github.com/username/your-repository id: bug-url
attributes:
label: Link to the page with bug
placeholder: https://demo.stack.jimmycai.com
value: https://demo.stack.jimmycai.com
validations: validations:
required: true required: true
- type: input
id: source-repo
attributes:
label: Link to the source repository
placeholder: https://github.com/CaiJimmy/hugo-theme-stack

View File

@ -12,7 +12,7 @@ Use this template: [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJim
## Demo ## Demo
* Starter template demo: [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com) * Stater template demo: [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com)
* Dev build: [dev.stack.jimmycai.com](https://dev.stack.jimmycai.com) * Dev build: [dev.stack.jimmycai.com](https://dev.stack.jimmycai.com)
## Documentation ## Documentation

View File

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

View File

@ -55,7 +55,6 @@
margin-right: 0.4em; margin-right: 0.4em;
padding: 0 0.4em 0 0.4em; padding: 0 0.4em 0 0.4em;
color: #7f7f7f; color: #7f7f7f;
display: block;
} }
/* LineNumbers */ /* LineNumbers */

View File

@ -33,10 +33,6 @@
margin: var(--card-padding) 0; margin: var(--card-padding) 0;
color: var(--card-text-color-main); color: var(--card-text-color-main);
.footnotes {
font-family: var(--base-font-family);
}
img { img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
@ -67,6 +63,7 @@
} }
.article-tags { .article-tags {
flex-wrap: wrap;
text-transform: unset; text-transform: unset;
} }
@ -221,28 +218,6 @@
margin-inline-start: calc((var(--card-padding)) * -1); margin-inline-start: calc((var(--card-padding)) * -1);
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size)); padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
border-inline-start: var(--heading-border-size) solid var(--accent-color); 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 { figure {
@ -289,11 +264,6 @@
font-family: var(--code-font-family); font-family: var(--code-font-family);
} }
a,
code {
word-break: break-word;
}
.gallery { .gallery {
position: relative; position: relative;
display: flex; display: flex;
@ -448,14 +418,4 @@
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; 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,8 +127,10 @@
} }
/* Menu style */ /* Menu style */
#main-menu { .menu {
padding-left: 0;
list-style: none; list-style: none;
flex-direction: column;
overflow-y: auto; overflow-y: auto;
flex-grow: 1; flex-grow: 1;
font-size: 1.4rem; font-size: 1.4rem;
@ -139,15 +141,13 @@
margin: 0 calc(var(--container-padding) * -1); margin: 0 calc(var(--container-padding) * -1);
padding: 30px 30px; padding: 30px 30px;
@include respond(xl) { @include respond(xl) {
padding: 15px 0; padding: 15px 0;
} }
&, .menu-bottom-section ol { &,
flex-direction: column; .menu-bottom-section {
gap: 30px; gap: 30px;
@include respond(xl) { @include respond(xl) {
gap: 25px; gap: 25px;
} }
@ -176,8 +176,8 @@
} }
svg { svg {
stroke: currentColor;
stroke-width: 1.33; stroke-width: 1.33;
width: 20px; width: 20px;
height: 20px; height: 20px;
} }
@ -200,19 +200,17 @@
font-weight: bold; font-weight: bold;
} }
} }
}
&.menu-bottom-section { .menu-bottom-section {
margin-top: auto; margin-top: auto;
display: flex;
ol { flex-direction: column;
display: flex; width: 100%;
padding-left: 0;
}
}
} }
} }
.menu-social { .social-menu {
list-style: none; list-style: none;
padding: 0; padding: 0;
margin: 0; margin: 0;

View File

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

View File

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

View File

@ -8,10 +8,6 @@ class StackColorScheme {
constructor(toggleEl: HTMLElement) { constructor(toggleEl: HTMLElement) {
this.bindMatchMedia(); this.bindMatchMedia();
this.currentScheme = this.getSavedScheme(); 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); this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);

View File

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

View File

@ -21,7 +21,7 @@ function setupSmoothAnchors() {
aElement.addEventListener("click", clickEvent => { aElement.addEventListener("click", clickEvent => {
clickEvent.preventDefault(); clickEvent.preventDefault();
const targetId = decodeURI(aElement.getAttribute("href").substring(1)), const targetId = aElement.getAttribute("href").substring(1),
target = document.getElementById(targetId) as HTMLElement, target = document.getElementById(targetId) as HTMLElement,
offset = target.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top; offset = target.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top;

View File

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

View File

@ -21,17 +21,17 @@ PhotoSwipe:
type: style type: style
KaTeX: KaTeX:
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.css
integrity: sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV integrity: sha256-J+iAE0sgH8QSz9hpcDxXIftnj65JEZgNhGcgReTTK9s=
type: style type: style
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.js
integrity: sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8 integrity: sha256-InsNdER1b2xUewP+pKCUJpkhiqwHgqiPXDlIk7GzBu4=
type: script type: script
defer: true defer: true
- src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/contrib/auto-render.min.js
integrity: sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05 integrity: sha256-y39Mpg7V3D4lhBX4x6O0bUqTV4pSrfgwEfGKfxkOdgI=
type: script type: script
defer: true defer: true

View File

@ -1,3 +1 @@
This is an example site used for solely for testing purposes. **It is not meant to be used as a template for your site**. Example site modified from https://github.com/gohugoio/hugoBasicExample
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,8 +1,32 @@
baseurl: https://example.com/ baseurl: https://example.com
languageCode: en-us languageCode: en-us
theme: hugo-theme-stack theme: hugo-theme-stack
paginate: 5
title: Example Site title: Example Site
copyright: Example Person
languages:
en:
languageName: English
title: Example Site
description: Example description
weight: 1
zh-cn:
languageName: 中文
title: 演示站点
description: 演示说明
weight: 2
ar:
languageName: عربي
languagedirection: rtl
title: موقع تجريبي
description: وصف تجريبي
weight: 3
# Change it to your Disqus shortname before using
disqusShortname: hugo-theme-stack
# GA Tracking ID
googleAnalytics:
# Theme i18n support # 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 # 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
@ -12,41 +36,6 @@ DefaultContentLanguage: en
# This will make .Summary and .WordCount behave correctly for CJK languages. # This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: false hasCJKLanguage: false
languages:
en:
languageName: English
title: Example Site
weight: 1
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
disqus:
shortname: "hugo-theme-stack"
# GA Tracking ID
googleAnalytics:
id:
pagination:
pagerSize: 3
permalinks: permalinks:
post: /p/:slug/ post: /p/:slug/
page: /:slug/ page: /:slug/
@ -56,7 +45,7 @@ params:
- post - post
featuredImageField: image featuredImageField: image
rssFullContent: true rssFullContent: true
favicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary) favicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary)
footer: footer:
since: 2020 since: 2020
@ -98,12 +87,6 @@ params:
issueTerm: pathname issueTerm: pathname
label: label:
beaudar:
repo:
issueTerm: pathname
label:
theme:
remark42: remark42:
host: host:
site: site:
@ -161,7 +144,6 @@ params:
repo: repo:
clientID: clientID:
clientSecret: clientSecret:
proxy:
cusdis: cusdis:
host: host:
@ -209,7 +191,7 @@ params:
enabled: true enabled: true
### Custom menu ### Custom menu
### See https://stack.jimmycai.com/config/menu ### See https://docs.stack.jimmycai.com/configuration/custom-menu.html
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter ### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
menu: menu:
main: [] main: []
@ -240,21 +222,9 @@ related:
markup: markup:
goldmark: goldmark:
extensions:
passthrough:
enable: true
delimiters:
block:
- - \[
- \]
- - $$
- $$
inline:
- - \(
- \)
renderer: renderer:
## Set to true if you have HTML content inside Markdown ## Set to true if you have HTML content inside Markdown
unsafe: true unsafe: false
tableOfContents: tableOfContents:
endLevel: 4 endLevel: 4
ordered: true ordered: true

View File

@ -15,7 +15,7 @@ menu:
icon: user icon: user
--- ---
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. 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.
Hugo makes use of a variety of open source projects including: 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. 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 extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Websites built with Hugo are extremelly 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). Learn more and contribute on [GitHub](https://github.com/gohugoio).

View File

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

View File

@ -21,23 +21,27 @@ In this example we will be using [KaTeX](https://katex.org/)
{{ end }} {{ end }}
``` ```
- To enable KaTeX globally set the parameter `math` to `true` in a project's configuration - 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 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) **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}} {{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }} {{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX --> <!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous"> <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.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script> <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.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body);"></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>
{{ end }} {{ end }}
{{</ math.inline >}} {{</ math.inline >}}
### Examples ### Examples
Inline math: $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$ {{< math.inline >}}
<p>
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
</p>
{{</ math.inline >}}
Block math: Block math:
$$ $$

View File

@ -68,7 +68,7 @@ search:
footer: footer:
builtWith: builtWith:
other: "مبني باستخدام {{ .Generator }}" other: "مبني بستخدام {{ .Generator }}"
designedBy: designedBy:
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}" other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"

View File

@ -1,72 +0,0 @@
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 }}

View File

@ -1,73 +0,0 @@
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 }}

View File

@ -1,73 +0,0 @@
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

@ -1,5 +1,5 @@
toggleMenu: toggleMenu:
other: Ocultar menú other: Toggle Menu
darkMode: darkMode:
other: Modo oscuro other: Modo oscuro
@ -27,11 +27,11 @@ article:
other: Contenidos relacionados other: Contenidos relacionados
lastUpdatedOn: lastUpdatedOn:
other: Última actualización other: Última vez actualizado
readingTime: readingTime:
one: "Tiempo de lectura {{ .Count }} minuto" one: "{{ .Count }} minuto a leer"
other: "Tiempo de lectura {{ .Count }} minutos" other: "{{ .Count }} minutos a leer"
notFound: notFound:
title: title:
@ -60,7 +60,7 @@ search:
other: Búsqueda other: Búsqueda
placeholder: placeholder:
other: Escribe algo... other: Teclea algo...
resultTitle: resultTitle:
other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)" other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)"

View File

@ -50,9 +50,6 @@ widget:
tagCloud: tagCloud:
title: title:
other: Mots clés other: Mots clés
categoriesCloud:
title:
other: Catégories
search: search:
title: title:

View File

@ -1,73 +0,0 @@
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 }}

View File

@ -4,16 +4,6 @@ toggleMenu:
darkMode: darkMode:
other: ダークモード other: ダークモード
list:
page:
other: "{{ .Count }} ページ目"
section:
other: セクション
subsection:
other: サブセクション
article: article:
back: back:
other: 前のページ other: 前のページ
@ -64,7 +54,7 @@ search:
footer: footer:
builtWith: builtWith:
other: "{{ .Generator }} で構築されています。" other: Built with {{ .Generator }}
designedBy: designedBy:
other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。 other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。

View File

@ -21,8 +21,6 @@ article:
other: Gerelateerde inhoud other: Gerelateerde inhoud
lastUpdatedOn: lastUpdatedOn:
other: Laatst bijgewerkt op other: Laatst bijgewerkt op
readingTime:
other: "{{ .Count }} leestijd"
notFound: notFound:
title: title:

View File

@ -1,72 +0,0 @@
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,8 +7,6 @@ darkMode:
list: list:
page: page:
one: "{{ .Count }} strona" one: "{{ .Count }} strona"
few: "{{ .Count }} strony"
many: "{{ .Count }} stron"
other: "{{ .Count }} stron" other: "{{ .Count }} stron"
section: section:
@ -16,9 +14,7 @@ list:
subsection: subsection:
one: Podsekcja one: Podsekcja
few: Podsekcje other: Podsekcje
many: Podsekcji
other: Podsekcji
article: article:
back: back:
@ -35,8 +31,6 @@ article:
readingTime: readingTime:
one: "Przeczytasz w {{ .Count }} minutę" one: "Przeczytasz w {{ .Count }} minutę"
few: "Przeczytasz w {{ .Count }} minuty"
many: "Przeczytasz w {{ .Count }} minut"
other: "Przeczytasz w {{ .Count }} minut" other: "Przeczytasz w {{ .Count }} minut"
notFound: notFound:
@ -69,9 +63,6 @@ search:
other: Wpisz coś... other: Wpisz coś...
resultTitle: 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)" other: "#PAGES_COUNT stron (#TIME_SECONDS sekund)"
footer: footer:

View File

@ -1,71 +0,0 @@
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

@ -1,74 +0,0 @@
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,13 +4,6 @@ toggleMenu:
darkMode: darkMode:
other: 暗色模式 other: 暗色模式
list:
page: "{{ .Count }} 个页面"
section: 章节
subsection: 子章节
article: article:
back: back:
other: 返回 other: 返回
@ -61,7 +54,7 @@ search:
footer: footer:
builtWith: builtWith:
other: 使用 {{ .Generator }} 构建 other: Built with {{ .Generator }}
designedBy: designedBy:
other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计 other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计

View File

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

View File

@ -3,43 +3,5 @@
<h1 class="article-title">{{ T "notFound.title" }}</h1> <h1 class="article-title">{{ T "notFound.title" }}</h1>
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2> <h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
</div> </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" . }} {{ partialCached "footer/footer" . }}
{{ end }} {{ end }}

View File

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

View File

@ -18,11 +18,11 @@
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <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 }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }} <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}} {{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}} {{- end -}}
@ -35,7 +35,7 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description> <description>
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}} {{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}

View File

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

View File

@ -32,7 +32,7 @@
<div> <div>
{{ partial "helper/icon" "date" }} {{ partial "helper/icon" "date" }}
<time class="article-time--published"> <time class="article-time--published">
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}} {{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
</time> </time>
</div> </div>
{{ end }} {{ end }}

View File

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

View File

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

View File

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

View File

@ -1,46 +0,0 @@
<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

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

View File

@ -12,7 +12,6 @@
data-input-position="{{- default `top` .inputPosition -}}" data-input-position="{{- default `top` .inputPosition -}}"
data-theme="{{- default `light` .lightTheme -}}" data-theme="{{- default `light` .lightTheme -}}"
data-lang="{{- default `en` .lang -}}" data-lang="{{- default `en` .lang -}}"
data-loading="{{- .loading -}}"
crossorigin="anonymous" crossorigin="anonymous"
async async
></script> ></script>

View File

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

View File

@ -13,7 +13,7 @@
show_email_subscription: {{ default true .show_email_subscription }} show_email_subscription: {{ default true .show_email_subscription }}
}; };
!function(e, n) { function(e, n) {
for (var o = 0; o < e.length; o++) { for (var o = 0; o < e.length; o++) {
var r = n.createElement('script'), var r = n.createElement('script'),
c = '.js', c = '.js',

View File

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

View File

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

View File

@ -19,7 +19,7 @@
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}} {{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}}
{{- range $key, $val := . -}} {{- range $key, $val := . -}}
{{- if ne $val nil -}} {{- if $val -}}
{{- $replaceKey := index $replaceKeys $key -}} {{- $replaceKey := index $replaceKeys $key -}}
{{- $k := default $key $replaceKey -}} {{- $k := default $key $replaceKey -}}

View File

@ -14,4 +14,4 @@
{{ $description = .Summary }} {{ $description = .Summary }}
{{ end }} {{ end }}
{{ return (replaceRE "\n" " " $description | plainify) }} {{ return ($description | plainify)}}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -38,7 +38,7 @@
</header> </header>
{{- with .Site.Menus.social -}} {{- with .Site.Menus.social -}}
<ol class="menu-social"> <ol class="social-menu">
{{ range . }} {{ range . }}
<li> <li>
<a <a
@ -61,11 +61,12 @@
{{ $currentPage := . }} {{ $currentPage := . }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }} {{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
<li {{ if $active }} class='current' {{ end }}> <li {{ if $active }} class='current' {{ end }}>
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}> <a href='{{ .URL | relLangURL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
{{ $icon := default .Pre .Params.Icon }} {{ $icon := default .Pre .Params.Icon }}
{{ if .Pre }} {{ if .Pre }}
{{ 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 }} {{ 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 }}
{{ end }} {{ end }}
{{ with $icon }} {{ with $icon }}
{{ partial "helper/icon" . }} {{ partial "helper/icon" . }}
@ -74,30 +75,27 @@
</a> </a>
</li> </li>
{{ end }} {{ end }}
<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" 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) }} <div class="menu-bottom-section">
<li id="dark-mode-toggle"> {{- $currentLanguageCode := .Language.Lang -}}
{{ partial "helper/icon" "toggle-left" }} {{ with .Site.Home.AllTranslations }}
{{ partial "helper/icon" "toggle-right" }} <li id="i18n-switch">
<span>{{ T "darkMode" }}</span> {{ partial "helper/icon" "language" }}
</li> <select name="language" onchange="window.location.href = this.selectedOptions[0].value">
{{ end }} {{ range . }}
</ol> <option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
</li> {{ end }}
</select>
</li>
{{ end }}
{{ if (default false .Site.Params.colorScheme.toggle) }}
<li id="dark-mode-toggle">
{{ partial "helper/icon" "toggle-left" }}
{{ partial "helper/icon" "toggle-right" }}
<span>{{ T "darkMode" }}</span>
</li>
{{ end }}
</div>
</ol> </ol>
</aside> </aside>

View File

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

View File

@ -2,7 +2,7 @@
publish = "exampleSite/public" publish = "exampleSite/public"
[build.environment] [build.environment]
HUGO_VERSION = "0.124.0" HUGO_VERSION = "0.100.2"
HUGO_THEME = "repo" HUGO_THEME = "repo"
[context.production] [context.production]

View File

@ -20,7 +20,7 @@ features = [
"search", "search",
] ]
min_version = "0.123.0" min_version = "0.87.0"
[author] [author]
name = "Jimmy Cai" name = "Jimmy Cai"