Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f1d676948 | ||
|
|
d84d0a8522 | ||
|
|
418d5677b1 | ||
|
|
be4fd55095 | ||
|
|
d3682b3567 | ||
|
|
ce0a252bfa | ||
|
|
d11923f32b | ||
|
|
40712eb781 | ||
|
|
d197d9b249 | ||
|
|
c6d1d73dd2 | ||
|
|
5d90624441 | ||
|
|
5edd4afaf3 | ||
|
|
41c3033d1a | ||
|
|
4e2e90da4c | ||
|
|
eefa686661 | ||
|
|
1668ebc3e4 | ||
|
|
f7e442cabb | ||
|
|
cabaf06ef2 | ||
|
|
26d2859f70 | ||
|
|
51e0ec7f99 | ||
|
|
13568d8ff0 | ||
|
|
2fb534f9a6 | ||
|
|
58559c5b3f | ||
|
|
0bc942bb12 | ||
|
|
a88fe3f5a7 | ||
|
|
1bd4dcd415 | ||
|
|
aae9cf67db | ||
|
|
cb42d2041f | ||
|
|
4272da7ee4 | ||
|
|
d382ca993d | ||
|
|
3ff06fe033 | ||
|
|
ff7a56a7ac | ||
|
|
196116f20d | ||
|
|
b03390d237 | ||
|
|
8a597a5c9c | ||
|
|
d60083e055 | ||
|
|
5d34c3de44 | ||
|
|
30e033c660 | ||
|
|
86314608e3 | ||
|
|
8611363549 |
@@ -1,17 +1,15 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[Bug]: "
|
||||
labels: ["bug"]
|
||||
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://docs.stack.jimmycai.com/).
|
||||
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/).
|
||||
- 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, include 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, including screenshots and any other information that might help us reproduce the problem.
|
||||
placeholder: Tell us what you see!
|
||||
validations:
|
||||
required: true
|
||||
@@ -55,21 +53,13 @@ body:
|
||||
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: markdown
|
||||
attributes:
|
||||
value: |
|
||||
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).
|
||||
Or link to a minimal reproduction of the problem if there are sensible data.
|
||||
- type: input
|
||||
id: bug-url
|
||||
id: minimal-reproduction-url
|
||||
attributes:
|
||||
label: Link to the page with bug
|
||||
placeholder: https://demo.stack.jimmycai.com
|
||||
value: https://demo.stack.jimmycai.com
|
||||
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
|
||||
- type: input
|
||||
id: source-repo
|
||||
attributes:
|
||||
label: Link to the source repository
|
||||
placeholder: https://github.com/CaiJimmy/hugo-theme-stack
|
||||
|
||||
@@ -12,7 +12,7 @@ Use this template: [CaiJimmy/hugo-theme-stack-starter](https://github.com/CaiJim
|
||||
|
||||
## Demo
|
||||
|
||||
* Stater template demo: [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com)
|
||||
* Starter template demo: [demo.stack.jimmycai.com](https://demo.stack.jimmycai.com)
|
||||
* Dev build: [dev.stack.jimmycai.com](https://dev.stack.jimmycai.com)
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -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,6 +117,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.article-time {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.article-translations {
|
||||
& > div {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
.article-category,
|
||||
.article-tags {
|
||||
display: flex;
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
margin-right: 0.4em;
|
||||
padding: 0 0.4em 0 0.4em;
|
||||
color: #7f7f7f;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* LineNumbers */
|
||||
|
||||
@@ -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;
|
||||
@@ -264,6 +268,11 @@
|
||||
font-family: var(--code-font-family);
|
||||
}
|
||||
|
||||
a,
|
||||
code {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.gallery {
|
||||
position: relative;
|
||||
display: flex;
|
||||
@@ -412,4 +421,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,8 +176,8 @@
|
||||
}
|
||||
|
||||
svg {
|
||||
stroke: currentColor;
|
||||
stroke-width: 1.33;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
@include respond(lg) {
|
||||
padding-top: var(--main-top-padding);
|
||||
padding-bottom: var(--main-top-padding);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -227,6 +227,7 @@ class Search {
|
||||
Search.updateQueryString(keywords, true);
|
||||
|
||||
if (keywords === '') {
|
||||
lastSearch = '';
|
||||
return this.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ function setupSmoothAnchors() {
|
||||
aElement.addEventListener("click", clickEvent => {
|
||||
clickEvent.preventDefault();
|
||||
|
||||
const targetId = aElement.getAttribute("href").substring(1),
|
||||
target = document.getElementById(targetId) 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"));
|
||||
|
||||
+2
-3
@@ -73,9 +73,8 @@ params:
|
||||
emoji:
|
||||
- https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo
|
||||
requiredMeta:
|
||||
- name
|
||||
- email
|
||||
- url
|
||||
- nick
|
||||
- mail
|
||||
placeholder:
|
||||
locale:
|
||||
admin: Admin
|
||||
|
||||
@@ -3,24 +3,28 @@ languageCode: en-us
|
||||
theme: hugo-theme-stack
|
||||
paginate: 5
|
||||
title: Example Site
|
||||
copyright: Example Person
|
||||
|
||||
languages:
|
||||
en:
|
||||
languageName: English
|
||||
title: Example Site
|
||||
description: Example description
|
||||
weight: 1
|
||||
params:
|
||||
description: Example description
|
||||
zh-cn:
|
||||
languageName: 中文
|
||||
title: 演示站点
|
||||
description: 演示说明
|
||||
weight: 2
|
||||
params:
|
||||
description: 演示说明
|
||||
ar:
|
||||
languageName: عربي
|
||||
languagedirection: rtl
|
||||
title: موقع تجريبي
|
||||
description: وصف تجريبي
|
||||
weight: 3
|
||||
params:
|
||||
description: وصف تجريبي
|
||||
|
||||
# Change it to your Disqus shortname before using
|
||||
disqusShortname: hugo-theme-stack
|
||||
@@ -224,7 +228,7 @@ markup:
|
||||
goldmark:
|
||||
renderer:
|
||||
## Set to true if you have HTML content inside Markdown
|
||||
unsafe: false
|
||||
unsafe: true
|
||||
tableOfContents:
|
||||
endLevel: 4
|
||||
ordered: true
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -37,11 +37,7 @@ In this example we will be using [KaTeX](https://katex.org/)
|
||||
|
||||
### 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:
|
||||
$$
|
||||
|
||||
@@ -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 }}
|
||||
@@ -21,6 +21,8 @@ article:
|
||||
other: Gerelateerde inhoud
|
||||
lastUpdatedOn:
|
||||
other: Laatst bijgewerkt op
|
||||
readingTime:
|
||||
other: "{{ .Count }} leestijd"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
|
||||
+12
-3
@@ -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:
|
||||
@@ -28,9 +32,11 @@ article:
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Ostatnio zaktualizowany
|
||||
|
||||
|
||||
readingTime:
|
||||
one: "Przeczytasz w {{ .Count }} minutę"
|
||||
few: "Przeczytasz w {{ .Count }} minuty"
|
||||
many: "Przeczytasz w {{ .Count }} minut"
|
||||
other: "Przeczytasz w {{ .Count }} minut"
|
||||
|
||||
notFound:
|
||||
@@ -50,7 +56,7 @@ widget:
|
||||
tagCloud:
|
||||
title:
|
||||
other: Tagi
|
||||
|
||||
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Kategorie
|
||||
@@ -63,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:
|
||||
|
||||
@@ -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 }}
|
||||
@@ -4,6 +4,18 @@ toggleMenu:
|
||||
darkMode:
|
||||
other: 夜晚模式
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "第 {{ .Count }} 頁"
|
||||
other: "第 {{ .Count }} 頁"
|
||||
|
||||
section:
|
||||
other: 段落
|
||||
|
||||
subsection:
|
||||
one: 小節
|
||||
other: 小節
|
||||
|
||||
article:
|
||||
back:
|
||||
other: 返回
|
||||
@@ -18,11 +30,13 @@ article:
|
||||
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 }} 設計
|
||||
|
||||
@@ -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` }}" />
|
||||
|
||||
@@ -23,9 +23,12 @@
|
||||
{{ 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">
|
||||
@@ -34,7 +37,7 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if (.Params.readingTime | default (.Site.Params.article.readingTime)) }}
|
||||
{{ if $showReadingTime }}
|
||||
<div>
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<time class="article-time--reading">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true }
|
||||
]
|
||||
],
|
||||
ignoredClasses: ["gist"]
|
||||
});})
|
||||
</script>
|
||||
@@ -13,7 +13,7 @@
|
||||
show_email_subscription: {{ default true .show_email_subscription }}
|
||||
};
|
||||
|
||||
function(e, n) {
|
||||
!function(e, n) {
|
||||
for (var o = 0; o < e.length; o++) {
|
||||
var r = n.createElement('script'),
|
||||
c = '.js',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script src="//cdn.jsdelivr.net/npm/twikoo@1.5.11/dist/twikoo.all.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.11/dist/twikoo.all.min.js"></script>
|
||||
<div id="tcomment"></div>
|
||||
<style>
|
||||
.twikoo {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{{- $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 -}}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{{- $ThemeVersion := "3.15.0" -}}
|
||||
{{- $ThemeVersion := "3.20.0" -}}
|
||||
<footer class="site-footer">
|
||||
<section class="copyright">
|
||||
©
|
||||
{{ 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">
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
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,9 +61,8 @@
|
||||
{{ $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 }}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
publish = "exampleSite/public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.100.2"
|
||||
HUGO_VERSION = "0.117.0"
|
||||
HUGO_THEME = "repo"
|
||||
|
||||
[context.production]
|
||||
|
||||
Reference in New Issue
Block a user