Merge pull request #374 from dillonzq/develop

This commit is contained in:
Dillon
2020-05-19 11:25:43 +08:00
committed by GitHub
81 changed files with 406 additions and 431 deletions
+2
View File
@@ -31,6 +31,8 @@
[theme=dark] & {
color: $global-font-secondary-color-dark;
}
@include link(false, false);
}
.post-info-md {
+4
View File
@@ -115,6 +115,10 @@
display: none;
margin: .8rem 0;
&[kept=true] {
display: block;
}
.toc-title {
display: flex;
justify-content: space-between;
+8 -8
View File
@@ -89,7 +89,7 @@ youtubechannel:
# 012: Tumblr
tumblr:
weight: 12
template: https://%s.tumblr.com/
template: https://%v.tumblr.com/
title: Tumblr
icon:
class: fab fa-tumblr fa-fw
@@ -225,7 +225,7 @@ spotify:
# 029: Bandcamp
bandcamp:
weight: 29
template: https://%s.bandcamp.com/
template: https://%v.bandcamp.com/
title: Bandcamp
icon:
class: fab fa-bandcamp fa-fw
@@ -281,7 +281,7 @@ foursquare:
# 036: Hacker News
hackernews:
weight: 36
template: https://news.ycombinator.com/user?id=%s
template: https://news.ycombinator.com/user?id=%v
title: Hacker News
icon:
class: fab fa-hacker-news fa-fw
@@ -385,7 +385,7 @@ jsfiddle:
# 049: DeviantArt
deviantart:
weight: 49
template: https://%s.deviantart.com/
template: https://%v.deviantart.com/
title: DeviantArt
icon:
class: fab fa-deviantart fa-fw
@@ -409,7 +409,7 @@ dribbble:
# 052: WordPress
wordpress:
weight: 52
template: https://%s.wordpress.com/
template: https://%v.wordpress.com/
title: WordPress
icon:
class: fab fa-wordpress fa-fw
@@ -425,7 +425,7 @@ vine:
# 054: Google Scholar
googlescholar:
weight: 54
template: https://scholar.google.com/citations?%s
template: https://scholar.google.com/citations?%v
title: Google Scholar
icon:
simpleicons: googlescholar
@@ -472,7 +472,7 @@ gitea:
# 060: XMPP
xmpp:
weight: 60
template: xmpp:%s
template: xmpp:%v
title: XMPP
icon:
simpleicons: xmpp
@@ -496,7 +496,7 @@ bilibili:
# 063: Email
email:
weight: 63
template: mailto:%s
template: mailto:%v
title: Email
icon:
class: far fa-envelope fa-fw
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -2,7 +2,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;(function (root, factory) {
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
@@ -203,4 +203,4 @@
lunr.TinySegmenter = TinySegmenter;
};
}));
}));
+2 -2
View File
@@ -22,7 +22,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -378,4 +378,4 @@
lunr.Pipeline.registerFunction(lunr.ar.stopWordFilter, 'stopWordFilter-ar');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -281,4 +281,4 @@
lunr.Pipeline.registerFunction(lunr.da.stopWordFilter, 'stopWordFilter-da');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -381,4 +381,4 @@
lunr.Pipeline.registerFunction(lunr.de.stopWordFilter, 'stopWordFilter-de');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -447,4 +447,4 @@
lunr.Pipeline.registerFunction(lunr.du.stopWordFilter, 'stopWordFilter-du');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -596,4 +596,4 @@
lunr.Pipeline.registerFunction(lunr.es.stopWordFilter, 'stopWordFilter-es');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -700,4 +700,4 @@
lunr.Pipeline.registerFunction(lunr.fr.stopWordFilter, 'stopWordFilter-fr');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -562,4 +562,4 @@
lunr.Pipeline.registerFunction(lunr.hu.stopWordFilter, 'stopWordFilter-hu');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -614,4 +614,4 @@
lunr.Pipeline.registerFunction(lunr.it.stopWordFilter, 'stopWordFilter-it');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -185,4 +185,4 @@
lunr.Pipeline.registerFunction(lunr.jp.trimmer, 'trimmer-jp');
lunr.Pipeline.registerFunction(lunr.jp.stopWordFilter, 'stopWordFilter-jp');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -445,4 +445,4 @@
lunr.Pipeline.registerFunction(lunr.nl.stopWordFilter, 'stopWordFilter-nl');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -255,4 +255,4 @@
lunr.Pipeline.registerFunction(lunr.no.stopWordFilter, 'stopWordFilter-no');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -567,4 +567,4 @@
lunr.Pipeline.registerFunction(lunr.pt.stopWordFilter, 'stopWordFilter-pt');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -388,4 +388,4 @@
lunr.Pipeline.registerFunction(lunr.ru.stopWordFilter, 'stopWordFilter-ru');
};
}))
}))
+1 -1
View File
@@ -11,7 +11,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;(function (root, factory) {
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -253,4 +253,4 @@
lunr.Pipeline.registerFunction(lunr.sv.stopWordFilter, 'stopWordFilter-sv');
};
}))
}))
+1 -1
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -1084,4 +1084,4 @@
lunr.Pipeline.registerFunction(lunr.tr.stopWordFilter, 'stopWordFilter-tr');
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -81,4 +81,4 @@
lunr.Pipeline.registerFunction(lunr.vi.trimmer, 'trimmer-vi');
lunr.vi.stopWordFilter = lunr.generateStopWordFilter('là cái nhưng mà'.split(' '));
};
}))
}))
+2 -2
View File
@@ -19,7 +19,7 @@
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
@@ -138,4 +138,4 @@
'的 一 不 在 人 有 是 为 以 于 上 他 而 后 之 来 及 了 因 下 可 到 由 这 与 也 此 但 并 个 其 已 无 小 我 们 起 最 再 今 去 好 只 又 或 很 亦 某 把 那 你 乃 它 吧 被 比 别 趁 当 从 到 得 打 凡 儿 尔 该 各 给 跟 和 何 还 即 几 既 看 据 距 靠 啦 了 另 么 每 们 嘛 拿 哪 那 您 凭 且 却 让 仍 啥 如 若 使 谁 虽 随 同 所 她 哇 嗡 往 哪 些 向 沿 哟 用 于 咱 则 怎 曾 至 致 着 诸 自'.split(' '));
lunr.Pipeline.registerFunction(lunr.zh.stopWordFilter, 'stopWordFilter-zh');
};
}))
}))
+5 -2
View File
@@ -756,8 +756,11 @@ enableEmoji = true
# whether to enable the table of the contents
# 是否使用目录
enable = true
# whether to make the table of the contents automatically collapsed
# 是否使目录自动折叠展开
# whether to keep the static table of the contents in front of the post
# 是否保持使用文章前面的静态目录
keepStatic = false
# whether to make the table of the contents in the sidebar automatically collapsed
# 是否使侧边目录自动折叠展开
auto = true
# Code config
# 代码配置
@@ -424,7 +424,9 @@ Please open the code block below to view the complete sample configuration :(far
[params.page.toc]
# whether to enable the table of the contents
enable = true
# whether to make the table of the contents automatically collapsed
# {{< version 0.2.9 >}} whether to keep the static table of the contents in front of the post
keepStatic = true
# whether to make the table of the contents in the sidebar automatically collapsed
auto = true
# {{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} mathematical formulas
[params.page.math]
@@ -429,7 +429,9 @@ Please open the code block below to view the complete sample configuration :(far
[params.page.toc]
# whether to enable the table of the contents
enable = true
# whether to make the table of the contents automatically collapsed
# {{< version 0.2.9 >}} whether to keep the static table of the contents in front of the post
keepStatic = true
# whether to make the table of the contents in the sidebar automatically collapsed
auto = true
# {{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} mathematical formulas
[params.page.math]
@@ -427,7 +427,9 @@ hugo
[params.page.toc]
# 是否使用目录
enable = true
# 是否使目录自动折叠展开
# {{< version 0.2.9 >}} 是否保持使用文章前面的静态目录
keepStatic = true
# 是否使侧边目录自动折叠展开
auto = true
# {{< version 0.2.0 >}} 代码配置
[params.page.code]
@@ -130,7 +130,7 @@ library:
* **linkToMarkdown**: if `true`, the footer of the content will be shown the link to the orignal Markdown file.
* **rssFullText**: {{< version 0.2.4 >}} if `true`, the full text content will be shown in RSS.
* **toc**: {{< version 0.2.0 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics#site-configuration).
* **toc**: {{< version 0.2.9 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics#site-configuration).
* **code**: {{< version 0.2.0 >}} the same as the `params.page.code` part in the [site configuration](../theme-documentation-basics#site-configuration).
* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics#site-configuration).
* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics#site-configuration).
@@ -135,7 +135,7 @@ library:
* **linkToMarkdown**: if `true`, the footer of the content will be shown the link to the orignal Markdown file.
* **rssFullText**: {{< version 0.2.4 >}} if `true`, the full text content will be shown in RSS.
* **toc**: {{< version 0.2.0 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics#site-configuration).
* **toc**: {{< version 0.2.9 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics#site-configuration).
* **code**: {{< version 0.2.0 >}} the same as the `params.page.code` part in the [site configuration](../theme-documentation-basics#site-configuration).
* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics#site-configuration).
* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics#site-configuration).
@@ -130,7 +130,7 @@ library:
* **linkToMarkdown**: 如果设为 `true`, 内容的页脚将显示指向原始 Markdown 文件的链接.
* **rssFullText**: {{< version 0.2.4 >}} 如果设为 `true`, 在 RSS 中将会显示全文内容.
* **toc**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.toc` 部分相同.
* **toc**: {{< version 0.2.9 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.toc` 部分相同.
* **code**: {{< version 0.2.0 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.code` 部分相同.
* **math**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.math` 部分相同.
* **mapbox**: {{< version 0.2.0 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.mapbox` 部分相同.
+14 -20
View File
@@ -17,7 +17,7 @@ other = "Artikel"
# === Taxonomy ===
[allSome]
other = "Alle %s"
other = "Alle {{ .Some }}"
[tag]
other = "Tag"
@@ -47,10 +47,7 @@ other = "Thema wechseln"
# === partials/footer.html ===
[poweredBySome]
other = "Ermöglicht durch %s"
[theme]
other = "Thema"
other = "Ermöglicht durch {{ .Hugo }} | Thema - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -108,33 +105,30 @@ other = "Teilen auf"
[contents]
other = "Inhalt"
[publish]
other = "veröffentlicht auf"
[publishedOnDate]
other = "veröffentlicht auf {{ .Date }}"
[included]
other = "enthalten in"
[includedInCategories]
other = "enthalten in {{ .Categories }}"
[wordCount]
one = "Ein Wort"
other = "{{ .Count }} Wörter"
one = "Ein wort"
other = "{{ .Count }} wörter"
[readingTime]
one = "Eine Minute"
other = "{{ .Count }} Minuten"
one = "Eine minute"
other = "{{ .Count }} minuten"
[views]
other = "Aufrufe"
other = "aufrufe"
[author]
other = "Autor"
[lastMod]
other = "Aktualisiert am %s"
[updatedOnDate]
other = "Aktualisiert am {{ .Date }}"
[license]
other = "Veröffentlicht unter der %s Lizenz"
[seeMarkdown]
[readMarkdown]
other = "Markdown anzeigen"
[back]
+13 -17
View File
@@ -16,7 +16,7 @@ other = "Posts"
# === Taxonomy ===
[allSome]
other = "All %s"
other = "All {{ .Some }}"
[tag]
other = "Tag"
@@ -46,10 +46,7 @@ other = "Switch Theme"
# === partials/footer.html ===
[poweredBySome]
other = "Powered by %s"
[theme]
other = "Theme"
other = "Powered by {{ .Hugo }} | Theme - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -104,17 +101,19 @@ other = "Share on"
[contents]
other = "Contents"
[publish]
other = "published on"
[publishedOnDate]
other = "published on {{ .Date }}"
[included]
other = "included in"
[includedInCategories]
other = "included in {{ .Categories }}"
[wordCount]
other = "about {{ .Count }} words"
one = "One word"
other = "{{ .Count }} words"
[readingTime]
other = "{{ .Count }} min"
one = "One minute"
other = "{{ .Count }} minutes"
[views]
other = "views"
@@ -122,13 +121,10 @@ other = "views"
[author]
other = "Author"
[lastMod]
other = "The article was updated on %s"
[updatedOnDate]
other = "Updated on {{ .Date }}"
[license]
other = "Published under the %s license"
[seeMarkdown]
[readMarkdown]
other = "Read Markdown"
[back]
+13 -17
View File
@@ -17,7 +17,7 @@ other = "Artículos"
# === Taxonomy ===
[allSome]
other = "Todo %s"
other = "Todo {{ .Some }}"
[tag]
other = "Etiqueta"
@@ -47,10 +47,7 @@ other = "Cambia el tema"
# === partials/footer.html ===
[poweredBySome]
other = "Provisto por %s"
[theme]
other = "Tema"
other = "Provisto por {{ .Hugo }} | Tema - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -108,17 +105,19 @@ other = "Compartir en"
[contents]
other = "Contenido"
[publish]
other = "publicado el"
[publishedOnDate]
other = "publicado el {{ .Date }}"
[included]
other = "incluido en"
[includedInCategories]
other = "incluido en {{ .Categories }}"
[wordCount]
other = "unas {{ .Count }} palabras"
one = "Una palabra"
other = "{{ .Count }} palabras"
[readingTime]
other = "{{ .Count }} min"
one = "Un minuto"
other = "{{ .Count }} minutos"
[views]
other = "vistas"
@@ -126,13 +125,10 @@ other = "vistas"
[author]
other = "Autor"
[lastMod]
other = "El artículo fue actualizado el %s"
[updatedOnDate]
other = "Actualizado el {{ .Date }}"
[license]
other = "Publicado bajo la licencia %s"
[seeMarkdown]
[readMarkdown]
other = "Leer Markdown"
[back]
+13 -17
View File
@@ -17,7 +17,7 @@ other = "Posts"
# === Taxonomy ===
[allSome]
other = "Tous %s"
other = "Tous {{ .Some }}"
[tag]
other = "Balise"
@@ -47,10 +47,7 @@ other = "Changer de Thème"
# === partials/footer.html ===
[poweredBySome]
other = "Propulsé par %s"
[theme]
other = "Thème"
other = "Propulsé par {{ .Hugo }} | Thème - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -108,17 +105,19 @@ other = "Partager sur"
[contents]
other = "Contenu"
[publish]
other = "publié le"
[publishedOnDate]
other = "publié le {{ .Date }}"
[included]
other = "inclus dans"
[includedInCategories]
other = "inclus dans {{ .Categories }}"
[wordCount]
other = "environ {{ .Count }} mots"
one = "Un mot"
other = "{{ .Count }} mots"
[readingTime]
other = "{{ .Count }} min"
one = "Une minute"
other = "{{ .Count }} minutes"
[views]
other = "vues"
@@ -126,13 +125,10 @@ other = "vues"
[author]
other = "Auteur"
[lastMod]
other = "Dernière mise à jour le %s"
[updatedOnDate]
other = "Mis à jour le {{ .Date }}"
[license]
other = "Publié sous licence %s"
[seeMarkdown]
[readMarkdown]
other = "Lire Markdown"
[back]
+13 -17
View File
@@ -17,7 +17,7 @@ other = "Articoli"
# === Taxonomy ===
[allSome]
other = "Tutti %s"
other = "Tutti {{ .Some }}"
[tag]
other = "Etichetta"
@@ -47,10 +47,7 @@ other = "Cambiare il tema"
# === partials/footer.html ===
[poweredBySome]
other = "Realizzato da %s"
[theme]
other = "Tema"
other = "Realizzato da {{ .Hugo }} | Tema - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -108,17 +105,19 @@ other = "Condividi su"
[contents]
other = "Contenuti"
[publish]
other = "pubblicato su"
[publishedOnDate]
other = "pubblicato su {{ .Date }}"
[included]
other = "incluso in"
[includedInCategories]
other = "incluso in {{ .Categories }}"
[wordCount]
other = "circa {{ .Count }} parole"
one = "Una parola"
other = "{{ .Count }} parole"
[readingTime]
other = "{{ .Count }} min"
one = "Un minuto"
other = "{{ .Count }} minuti"
[views]
other = "visualizzazioni"
@@ -126,13 +125,10 @@ other = "visualizzazioni"
[author]
other = "Autore"
[lastMod]
other = "L'articolo è stato modificato il %s"
[updatedOnDate]
other = "Aggiornato il {{ .Date }}"
[license]
other = "Pubblicato sotto la licenza %s"
[seeMarkdown]
[readMarkdown]
other = "Leggi Markdown"
[back]
+13 -17
View File
@@ -17,7 +17,7 @@ other = "Posty"
# === Taxonomy ===
[allSome]
other = "Wszystkie %s"
other = "Wszystkie {{ .Some }}"
[tag]
other = "Tag"
@@ -47,10 +47,7 @@ other = "Przełącz schemat"
# === partials/footer.html ===
[poweredBySome]
other = "Napędzany przez %s"
[theme]
other = "Szablon"
other = "Napędzany przez {{ .Hugo }} | Szablon - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -96,17 +93,19 @@ other = "Udostępnij na"
[contents]
other = "Spis treści"
[publish]
other = "opublikowano"
[publishedOnDate]
other = "opublikowano {{ .Date }}"
[included]
other = "zawarty w"
[includedInCategories]
other = "zawarty w {{ .Categories }}"
[wordCount]
other = "około {{ .Count }} słów"
one = "Jedno słowo"
other = "{{ .Count }} słów"
[readingTime]
other = "{{ .Count }} min"
one = "Jedna minuta"
other = "{{ .Count }} minuty"
[views]
other = "wyświetleń"
@@ -114,13 +113,10 @@ other = "wyświetleń"
[author]
other = "Autor"
[lastMod]
other = "Artykuł ostatnio zaktualizowany %s"
[updatedOnDate]
other = "Zaktualizowano {{ .Date }}"
[license]
other = "Opublikowano na licencji %s"
[seeMarkdown]
[readMarkdown]
other = "Zobacz Markdown"
[back]
+12 -16
View File
@@ -17,7 +17,7 @@ other = "Posts"
# === Taxonomy ===
[allSome]
other = "Todos %s"
other = "Todos {{ .Some }}"
[tag]
other = "Tag"
@@ -47,10 +47,7 @@ other = "Trocar tema"
# === partials/footer.html ===
[poweredBySome]
other = "Movido a %s"
[theme]
other = "Tema"
other = "Movido a {{ .Hugo }} | Tema - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -108,17 +105,19 @@ other = "Compartilhe em"
[contents]
other = "Conteúdos"
[publish]
other = "publicado em"
[publishedOnDate]
other = "publicado em {{ .Date }}"
[included]
other = "incluido em"
[includedInCategories]
other = "incluido em {{ .Categories }}"
[wordCount]
one = "Uma palavra"
other = "{{ .Count }} palavras"
[readingTime]
other = "{{ .Count }} min"
one = "Um minuto"
other = "{{ .Count }} minutos"
[views]
other = "visualizações"
@@ -126,13 +125,10 @@ other = "visualizações"
[author]
other = "Autor"
[lastMod]
other = "O artigo foi atualizado em %s"
[updatedOnDate]
other = "Atualizado em {{ .Date }}"
[license]
other = "Publicado sobre a licença %s"
[seeMarkdown]
[readMarkdown]
other = "Leia em Markdown"
[back]
+13 -17
View File
@@ -17,7 +17,7 @@ other = "Articole"
# === Taxonomy ===
[allSome]
other = "Toate %s"
other = "Toate {{ .Some }}"
[tag]
other = "Etichetă"
@@ -47,10 +47,7 @@ other = "Schimbare Temă"
# === partials/footer.html ===
[poweredBySome]
other = "Realizat de către %s"
[theme]
other = "Temă"
other = "Realizat de către {{ .Hugo }} | Temă - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -108,17 +105,19 @@ other = "Distribuie pe"
[contents]
other = "Cuprins"
[publish]
other = "publicat la"
[publishedOnDate]
other = "publicat la {{ .Date }}"
[included]
other = "inclus în"
[includedInCategories]
other = "inclus în {{ .Categories }}"
[wordCount]
other = "aproximativ {{ .Count }} cuvinte"
one = "Un cuvânt"
other = "{{ .Count }} cuvinte"
[readingTime]
other = "{{ .Count }} min"
one = "Un minut"
other = "{{ .Count }} minute"
[views]
other = "vizualizări"
@@ -126,13 +125,10 @@ other = "vizualizări"
[author]
other = "Autor"
[lastMod]
other = "Articolul a fost actualizat la %s"
[updatedOnDate]
other = "Actualizat la {{ .Date }}"
[license]
other = "Publicat sub licența %s"
[seeMarkdown]
[readMarkdown]
other = "Citire Markdown"
[back]
+13 -17
View File
@@ -17,7 +17,7 @@ other = "Статьи"
# === Taxonomy ===
[allSome]
other = "Все %s"
other = "Все {{ .Some }}"
[tag]
other = "Тэг"
@@ -47,10 +47,7 @@ other = "Сменить Тему"
# === partials/footer.html ===
[poweredBySome]
other = "Сделано %s"
[theme]
other = "Тема"
other = "Сделано {{ .Hugo }} | Тема - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -108,17 +105,19 @@ other = "Поделиться в"
[contents]
other = "Содержание"
[publish]
other = "Опубликовано"
[publishedOnDate]
other = "Опубликовано {{ .Date }}"
[included]
other = "включен в"
[includedInCategories]
other = "включен в {{ .Categories }}"
[wordCount]
other = "около {{ .Count }} слов"
one = "Одно слово"
other = "{{ .Count }} слов"
[readingTime]
other = "{{ .Count }} мин"
one = "Одна минута"
other = "{{ .Count }} минут"
[views]
other = "просмотров"
@@ -126,13 +125,10 @@ other = "просмотров"
[author]
other = "Автор"
[lastMod]
other = "Статья была обновлена %s"
[updatedOnDate]
other = "Oбновлена {{ .Date }}"
[license]
other = "Опубликовано под лицензии %s"
[seeMarkdown]
[readMarkdown]
other = "Читать Markdown"
[back]
+13 -17
View File
@@ -17,7 +17,7 @@ other = "Постови"
# === Taxonomy ===
[allSome]
other = "Све %s"
other = "Све {{ .Some }}"
[tag]
other = "Таг"
@@ -47,10 +47,7 @@ other = "Промени Тему"
# === partials/footer.html ===
[poweredBySome]
other = "Покреће %s"
[theme]
other = "Тема"
other = "Покреће {{ .Hugo }} | Тема - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -105,17 +102,19 @@ other = "Подели на"
[contents]
other = "Садржаји"
[publish]
other = "објављено"
[publishedOnDate]
other = "објављено {{ .Date }}"
[included]
other = "укључено"
[includedInCategories]
other = "укључено {{ .Categories }}"
[wordCount]
other = "око {{ .Count }} речи"
one = "Једна реч"
other = "{{ .Count }} речи"
[readingTime]
other = "{{ .Count }} мин"
one = "Један минут"
other = "{{ .Count }} минута"
[views]
other = "прегледа"
@@ -123,13 +122,10 @@ other = "прегледа"
[author]
other = "Аутор"
[lastMod]
other = "Чланак је обновљен %s"
[updatedOnDate]
other = "Ажурирано {{ .Date }}"
[license]
other = "Објављено под условима %s лиценце"
[seeMarkdown]
[readMarkdown]
other = "Читај Markdown"
[back]
+9 -15
View File
@@ -17,7 +17,7 @@ other = "文章"
# === Taxonomy ===
[allSome]
other = "所有%s"
other = "所有{{ .Some }}"
[tag]
other = "标签"
@@ -47,10 +47,7 @@ other = "切换主题"
# === partials/footer.html ===
[poweredBySome]
other = "由 %s 强力驱动"
[theme]
other = "主题"
other = "由 {{ .Hugo }} 强力驱动 | 主题 - {{ .Theme }}"
# === partials/footer.html ===
# === partials/comment.html ===
@@ -111,11 +108,11 @@ other = "分享到"
[contents]
other = "目录"
[publish]
other = "发布于"
[publishedOnDate]
other = "发布于 {{ .Date }}"
[included]
other = "收录于"
[includedInCategories]
other = "收录于 {{ .Categories }}"
[wordCount]
other = "约 {{ .Count }} 字"
@@ -129,13 +126,10 @@ other = "次阅读"
[author]
other = "作者"
[lastMod]
other = "本文于 %s 更新"
[updatedOnDate]
other = "更新于 {{ .Date }}"
[license]
other = "采用 %s 协议发布"
[seeMarkdown]
[readMarkdown]
other = "阅读原始文档"
[back]
+1 -1
View File
@@ -1,5 +1,5 @@
{{- define "title" }}
{{- T "pageNotFound" | printf "404 %s" }} - {{ .Site.Title -}}
{{- T "pageNotFound" | printf "404 %v" }} - {{ .Site.Title -}}
{{- end -}}
{{- define "content" -}}
+3 -3
View File
@@ -1,12 +1,12 @@
{{- define "title" }}
{{- .Params.Title | default (T .Section) | default .Section | printf (T "allSome") }} - {{ .Site.Title -}}
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} - {{ .Site.Title -}}
{{- end -}}
{{- define "content" -}}
<div class="page archive">
{{- /* Title */ -}}
<h2 class="single-title animated pulse faster">
{{- .Params.Title | default (T .Section) | default .Section | printf (T "allSome") -}}
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
</h2>
{{- /* Paginate */ -}}
@@ -25,7 +25,7 @@
{{- .Title -}}
</a>
<span class="archive-item-date">
{{- .Date.Format ($.Site.Params.section.dateFormat | default "01-02") -}}
{{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}}
</span>
</article>
{{- end -}}
+1 -1
View File
@@ -15,7 +15,7 @@
{{- /* Content */ -}}
<div class="content" id="content">
{{- dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
</div>
{{- /* Comment */ -}}
+16 -18
View File
@@ -23,22 +23,20 @@
{{- partial "plugin/link.html" $options -}}
</span>
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormat | default "2006-01-02") -}}
&nbsp;<span class="post-publish">
{{ T "publish" }}&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>
</span>
{{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
&nbsp;<span class="post-publish">
{{- printf `<time datetime="%v">%v</time>` . . | dict "Date" | T "publishedOnDate" | safeHTML -}}
</span>
{{- end -}}
{{- with .Params.categories -}}
&nbsp;
<span class="post-category">
{{- T "included" -}}
{{- range $index, $value := . -}}
{{- if gt $index 0 }}&nbsp;{{ end -}}
{{- $category := $value | anchorize | printf "/categories/%s" | $.Site.GetPage -}}
<a href="{{ $category.RelPermalink }}">
<i class="far fa-folder fa-fw"></i>{{ $category.Title }}
</a>
{{- end -}}
{{- $categories := slice -}}
{{- range .Params.categories -}}
{{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
{{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw"></i>%v</a>` $category.RelPermalink $category.Title) -}}
{{- end -}}
{{- with delimit $categories "&nbsp;" -}}
&nbsp;<span class="post-category">
{{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
</span>
{{- end -}}
</div>
@@ -46,7 +44,7 @@
{{- /* Summary content */ -}}
<div class="content">
{{- with .Summary -}}
{{- dict "content" . "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- else -}}
{{- .Description | safeHTML -}}
{{- end -}}
@@ -60,10 +58,10 @@
<i class="fas fa-tags fa-fw"></i>&nbsp;
{{- range $index, $value := . -}}
{{- if gt $index 0 }},&nbsp;{{ end -}}
{{- $tag := $value | anchorize | printf "/tags/%s" | $.Site.GetPage -}}
{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
{{- end -}}
</div>
{{- end -}}
</div>
</article>
</article>
+1 -1
View File
@@ -13,7 +13,7 @@
{{- if .Content -}}
<div class="single">
<div class="content" id="content">
{{- dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
</div>
</div>
{{- end -}}
+5 -5
View File
@@ -12,22 +12,22 @@
{{- $uri = .Permalink -}}
{{- end -}}
{{- $meta := dict "uri" $uri "title" .Title "tags" .Params.tags "categories" .Params.categories -}}
{{- $meta = .PublishDate.Format ($.Site.Params.dateFormat | default "2006-01-02") | dict "date" | merge $meta -}}
{{- $meta = $.Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format | dict "date" | merge $meta -}}
{{- with .Description -}}
{{- $index = $index | append (dict "content" . "objectID" $uri | merge $meta) -}}
{{- end -}}
{{- $params := .Params | merge $.Site.Params.page -}}
{{/* Extended Markdown syntax */}}
{{- $content := dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" -}}
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
{{/* Remove line number for code */}}
{{- $content = $content | replaceRE `<span class="lnt?"> *\d*\n?</span>` "" -}}
{{- range $i, $contenti := split $content "<h2 id=" -}}
{{- if gt $i 0 -}}
{{- $contenti = printf "<h2 id=%s" $contenti -}}
{{- $contenti = printf "<h2 id=%v" $contenti -}}
{{- end -}}
{{- range $j, $contentj := split $contenti "<h3 id=" -}}
{{- if gt $j 0 -}}
{{- $contentj = printf "<h3 id=%s" $contentj -}}
{{- $contentj = printf "<h3 id=%v" $contentj -}}
{{- end -}}
{{/* Plainify, unescape and remove (\n, \t) */}}
{{- $contentj = $contentj | plainify | htmlUnescape | replaceRE `[\n\t ]+` " " -}}
@@ -35,7 +35,7 @@
{{- $contentj = substr $contentj 0 $.Site.Params.search.contentLength -}}
{{- end -}}
{{- if $contentj | and (ne $contentj " ") -}}
{{- $one := printf "%s:%d:%d" $uri $i $j | dict "content" $contentj "objectID" | merge $meta -}}
{{- $one := printf "%v:%v:%v" $uri $i $j | dict "content" $contentj "objectID" | merge $meta -}}
{{- $index = $index | append $one -}}
{{- end -}}
{{- end -}}
+4 -2
View File
@@ -33,9 +33,11 @@
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
</lastBuildDate>
{{- end -}}
<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}}
{{- dict "page" . "site" .Site | partial "rss/item.html" -}}
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
{{- end -}}
</channel>
</rss>
+40 -40
View File
@@ -5,56 +5,56 @@
{{- /* Smooth Scroll */ -}}
{{- $source := $cdn.smoothScrollJS | default "lib/smooth-scroll/smooth-scroll.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- /* Search */ -}}
{{- if .Site.Params.search | and .Site.Params.search.enable -}}
{{- $search := .Site.Params.search -}}
{{- $source := $cdn.autocompleteJS | default "lib/autocomplete/autocomplete.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = dict "maxResultLength" $search.maxResultLength "snippetLength" $search.snippetLength "highlightTag" $search.highlightTag "noResultsFound" (T "noResultsFound") | dict "search" | merge $config -}}
{{- if eq $search.type "lunr" -}}
{{- with .Site.Home.OutputFormats.Get "json" -}}
{{- $config = dict "type" "lunr" "lunrIndexURL" .RelPermalink | dict "search" | merge $config -}}
{{- end -}}
{{- $source := $cdn.lunrJS | default "lib/lunr/lunr.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- if T "lunrLanguageLib" -}}
{{- $config = T "lunrLanguageCode" | dict "lunrLanguageCode" | dict "search" | merge $config -}}
{{- with T "lunrSegmentitLib" -}}
{{- $config = dict "lunrSegmentitURL" (resources.Get .).RelPermalink | dict "search" | merge $config -}}
{{- end -}}
{{- dict "source" "lib/lunr/lunr.stemmer.support.js" "minify" true "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" (T "lunrLanguageLib") "minify" true "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" "lib/lunr/lunr.stemmer.support.js" "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- dict "source" (T "lunrLanguageLib") "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- else if eq $search.type "algolia" -}}
{{- $source := $cdn.algoliasearchJS | default "lib/algoliasearch/algoliasearch-lite.umd.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = dict "type" "algolia" "algoliaIndex" $search.algolia.index "algoliaAppID" $search.algolia.appID "algoliaSearchKey" $search.algolia.searchKey | dict "search" | merge $config -}}
{{- end -}}
{{- end -}}
{{- /* lazysizes */ -}}
{{- $source := $cdn.lazysizesJS | default "lib/lazysizes/lazysizes.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- /* twemoji */ -}}
{{- if $params.twemoji -}}
{{- $source := $cdn.twemojiJS | default "lib/twemoji/twemoji.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = dict "twemoji" true | merge $config -}}
{{- end -}}
{{- /* lightgallery.js */ -}}
{{- if $params.lightgallery -}}
{{- $source := $cdn.lightgalleryCSS | default "lib/lightgallery/lightgallery.min.css" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.lightgalleryJS | default "lib/lightgallery/lightgallery.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $source := $cdn.lightgalleryThumbnailJS | default "lib/lightgallery/lg-thumbnail.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $source := $cdn.lightgalleryZoomJS | default "lib/lightgallery/lg-zoom.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = dict "selector" ".lightgallery" "speed" 400 "hideBarsDelay" 2000 "thumbnail" true "exThumbImage" "data-thumbnail" "thumbWidth" 80 "thumbContHeight" 80 "actualSize" false | dict "lightGallery" | merge $config -}}
{{- $styleArr := (.Scratch.Get "this").styleArr | default slice -}}
{{- $styleArr | append ".lg-toolbar .lg-icon::after { color: #999; }" | .Scratch.SetInMap "this" "styleArr" -}}
@@ -66,21 +66,21 @@
{{- /* clipboard.js */ -}}
{{- if ne $code.copy false -}}
{{- $source := $cdn.clipboardJS | default "lib/clipboard/clipboard.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = T "copyToClipboard" | dict "copyTitle" | dict "code" | merge $config -}}
{{- end -}}
{{- /* Sharer.js */ -}}
{{- if $params.share.enable -}}
{{- $source := $cdn.sharerJS | default "lib/sharer/sharer.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- /* TypeIt */ -}}
{{- with (.Scratch.Get "this").typeitMap -}}
{{- $typeit := $.Site.Params.typeit -}}
{{- $source := $cdn.typeitJS | default "lib/typeit/typeit.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = dict "speed" $typeit.speed "cursorSpeed" $typeit.cursorSpeed "cursorChar" $typeit.cursorChar "duration" $typeit.duration "data" . | dict "typeit" | merge $config -}}
{{- end -}}
@@ -93,20 +93,20 @@
{{- end -}}
{{- if $math.enable -}}
{{- $source := $cdn.katexCSS | default "lib/katex/katex.min.css" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.katexJS | default "lib/katex/katex.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $source := $cdn.katexAutoRenderJS | default "lib/katex/auto-render.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- if $math.copyTex -}}
{{- $source := $cdn.katexCopyTexCSS | default "lib/katex/copy-tex.min.css" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.katexCopyTexJS | default "lib/katex/copy-tex.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- if $math.mhchem -}}
{{- $source := $cdn.katexMhchemJS | default "lib/katex/mhchem.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- $delimiters := slice (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}}
{{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
@@ -122,26 +122,26 @@
{{- /* mermaid */ -}}
{{- if (.Scratch.Get "this").mermaid -}}
{{- $source := $cdn.mermaidJS | default "lib/mermaid/mermaid.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $options := dict "targetPath" "lib/mermaid/mermaid.min.css" "enableSourceMap" true -}}
{{- dict "source" "lib/mermaid/mermaid.scss" "toCSS" $options "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" "lib/mermaid/mermaid.scss" "toCSS" $options "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- end -}}
{{- /* ECharts */ -}}
{{- if (.Scratch.Get "this").echarts -}}
{{- $source := $cdn.echartsJS | default "lib/echarts/echarts.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $source := $cdn.echartsMacaronsJS | default "lib/echarts/macarons.js" -}}
{{- dict "source" $source "minify" true "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- /* Mapbox GL */ -}}
{{- if (.Scratch.Get "this").mapbox -}}
{{- $source := $cdn.mapboxGLCSS | default "lib/mapbox-gl/mapbox-gl.min.css" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.mapboxGLJS | default "lib/mapbox-gl/mapbox-gl.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" "lib/mapbox-gl/mapbox-gl-language.js" "minify" true "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- dict "source" "lib/mapbox-gl/mapbox-gl-language.js" "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = dict "accessToken" $params.mapbox.accessToken "RTLTextPlugin" "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js" | dict "mapbox" | merge $config -}}
{{- end -}}
@@ -149,23 +149,23 @@
{{- if (.Scratch.Get "this").music -}}
{{- /* APlayer */ -}}
{{- $source := $cdn.aplayerCSS | default "lib/aplayer/APlayer.min.css" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $options := dict "targetPath" "lib/aplayer/dark.min.css" "enableSourceMap" true -}}
{{- dict "source" "lib/aplayer/dark.scss" "toCSS" $options "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" "lib/aplayer/dark.scss" "toCSS" $options "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.aplayerJS | default "lib/aplayer/APlayer.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- /* MetingJS */ -}}
{{- $source := $cdn.metingJS | default "lib/meting/Meting.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- /* Cookie Consent */ -}}
{{- if .Site.Params.cookieconsent | and .Site.Params.cookieconsent.enable -}}
{{- $source := $cdn.cookieconsentCSS | default "lib/cookieconsent/cookieconsent.min.css" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.cookieconsentJS | default "lib/cookieconsent/cookieconsent.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $cookieconsentConfig := dict "popup" (dict "background" "#1aa3ff") "button" (dict "background" "#f0f0f0") | dict "theme" "edgeless" "palette" -}}
{{- $cookieconsentConfig = .Site.Params.cookieconsent | merge $cookieconsentConfig -}}
{{- $cookieconsentConfig = dict "message" ($cookieconsentConfig.content.message | default (T "cookieconsentMessage")) "dismiss" ($cookieconsentConfig.content.dismiss | default (T "cookieconsentDismiss")) "link" ($cookieconsentConfig.content.link | default (T "cookieconsentLink")) | dict "content" | merge $cookieconsentConfig -}}
@@ -173,26 +173,26 @@
{{- end -}}
{{- range $params.library.css -}}
{{- dict "source" . "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" . "fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/style.html" -}}
{{- end -}}
{{- range $params.library.js -}}
{{- dict "source" . "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" . "fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- with (.Scratch.Get "this").styleArr -}}
{{- delimit . "" | dict "content" | dict "scratch" $.Scratch "data" | partial "scratch/style.html" -}}
{{- delimit . "" | dict "content" | dict "Scratch" $.Scratch "Data" | partial "scratch/style.html" -}}
{{- end -}}
{{- /* Config script */ -}}
{{- $config | jsonify | printf "window.config=%s;" | dict "content" | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- $config | jsonify | printf "window.config=%s;" | dict "content" | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- /* Theme script */ -}}
{{- dict "source" "js/theme.min.js" "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" "js/theme.min.js" "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}}
{{- with (.Scratch.Get "this").scriptArr -}}
{{- delimit . "\n" | dict "content" | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- delimit . "\n" | dict "content" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- range (.Scratch.Get "this").style -}}
+18 -18
View File
@@ -9,8 +9,8 @@
{{- $disqus := $comment.disqus | default dict -}}
{{- if $disqus.enable -}}
<div id="disqus_thread" class="comment"></div>
{{- $source := printf "https://%s.disqus.com/embed.js" $disqus.shortname -}}
{{- dict "source" $source "defer" true | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- $source := printf "https://%v.disqus.com/embed.js" $disqus.shortname -}}
{{- dict "source" $source "defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://disqus.com/?ref_noscript">Disqus</a>.
</noscript>
@@ -21,9 +21,9 @@
{{- if $gitalk.enable -}}
<div id="gitalk" class="comment"></div>
{{- $source := $cdn.gitalkCSS | default "lib/gitalk/gitalk.css" -}}
{{- dict "source" $source "minify" true "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" $source "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.gitalkJS | default "lib/gitalk/gitalk.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $commentConfig = dict "id" .Date "title" .Title "clientID" $gitalk.clientId "clientSecret" $gitalk.clientSecret "repo" $gitalk.repo "owner" $gitalk.owner "admin" (slice $gitalk.owner) | dict "gitalk" | merge $commentConfig -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://github.com/gitalk/gitalk"></a>Gitalk</a>.
@@ -35,9 +35,9 @@
{{- if $valine.enable -}}
<div id="valine" class="comment"></div>
{{- $options := dict "targetPath" "lib/valine/valine.min.css" -}}
{{- dict "source" "lib/valine/valine.scss" "toCSS" $options | dict "scratch" .Scratch "data" | partial "scratch/style.html" -}}
{{- dict "source" "lib/valine/valine.scss" "toCSS" $options | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.valineJS | default "lib/valine/Valine.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $commentConfig = dict "el" "#valine" "appId" $valine.appId "appKey" $valine.appKey "lang" ($valine.lang | default (T "valineLang")) "visitor" $valine.visitor "recordIP" $valine.recordIP "placeholder" ($valine.placeholder | default (T "valinePlaceholder")) "highlight" (ne $valine.highlight false) "enableQQ" $valine.enableQQ | dict "valine" | merge $commentConfig -}}
{{- with $valine.avatar -}}
{{- $commentConfig = dict "avatar" . | dict "valine" | merge $commentConfig -}}
@@ -51,7 +51,7 @@
{{- with $valine.serverURLs -}}
{{- $commentConfig = dict "serverURLs" . | dict "valine" | merge $commentConfig -}}
{{- end -}}
{{- $commentConfig = $valine.emoji | default "google.yml" | printf "data/emoji/%s" | resources.Get | transform.Unmarshal | dict "valine" | merge $commentConfig -}}
{{- $commentConfig = $valine.emoji | default "google.yml" | printf "data/emoji/%v" | resources.Get | transform.Unmarshal | dict "valine" | merge $commentConfig -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://valine.js.org/">Valine</a>.
</noscript>
@@ -67,8 +67,8 @@
data-width="{{ $facebook.width }}"
data-numposts="{{ $facebook.numPosts }}"
></div>
{{- $source := printf "https://connect.facebook.net/%s/sdk.js#xfbml=1&version=v5.0&appId=%s&autoLogAppEvents=1" ($facebook.languageCode | default (T "facebookLanguageCode")) $facebook.appId -}}
{{- dict "source" $source "defer" true | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- $source := printf "https://connect.facebook.net/%v/sdk.js#xfbml=1&version=v5.0&appId=%v&autoLogAppEvents=1" ($facebook.languageCode | default (T "facebookLanguageCode")) $facebook.appId -}}
{{- dict "source" $source "defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://developers.facebook.com/docs/plugins/comments/"></a>Facebook</a>.
</noscript>
@@ -78,24 +78,24 @@
{{- $telegram := $comment.telegram | default dict -}}
{{- if $telegram.enable -}}
<div id="telegram-comments" class="comment"></div>
{{- $attr := printf `data-comments-app-website="%s"` $telegram.siteID -}}
{{- $attr = printf `%s data-limit="%s"` $attr ($telegram.limit | default 5) -}}
{{- $attr := printf `data-comments-app-website="%v"` $telegram.siteID -}}
{{- $attr = printf `%v data-limit="%v"` $attr ($telegram.limit | default 5) -}}
{{- with $telegram.height -}}
{{- $attr = printf `%s data-height="%s"` $attr . -}}
{{- $attr = printf `%v data-height="%v"` $attr . -}}
{{- end -}}
{{- with $telegram.color -}}
{{- $attr = printf `%s data-color="%s"` $attr . -}}
{{- $attr = printf `%v data-color="%v"` $attr . -}}
{{- end -}}
{{- if $telegram.colorful -}}
{{- $attr = printf `%s data-colorful="1"` $attr -}}
{{- $attr = printf `%v data-colorful="1"` $attr -}}
{{- end -}}
{{- if $telegram.dislikes -}}
{{- $attr = printf `%s data-dislikes="1"` $attr -}}
{{- $attr = printf `%v data-dislikes="1"` $attr -}}
{{- end -}}
{{- if $telegram.outlined -}}
{{- $attr = printf `%s data-outlined="1"` $attr -}}
{{- $attr = printf `%v data-outlined="1"` $attr -}}
{{- end -}}
{{- dict "source" "https://comments.app/js/widget.js?2" "defer" true "attr" $attr | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" "https://comments.app/js/widget.js?2" "defer" true "attr" $attr | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>.
</noscript>
@@ -105,7 +105,7 @@
{{- $commento := $comment.commento | default dict -}}
{{- if $commento.enable -}}
<div id="commento"></div>
{{- dict "source" "https://cdn.commento.io/js/commento.js" "defer" true | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" "https://cdn.commento.io/js/commento.js" "defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://commento.io/">Commento</a>.
</noscript>
+3 -2
View File
@@ -11,8 +11,9 @@
{{- /* Hugo and LoveIt */ -}}
{{- if ne .Site.Params.footer.hugo false -}}
<div class="footer-line">
{{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}}
{{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
{{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %v">Hugo</a>` hugo.Version -}}
{{- $theme := .Scratch.Get "version" | printf `<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt %v"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>` -}}
{{- dict "Hugo" $hugo "Theme" $theme | T "poweredBySome" | safeHTML }}
</div>
{{- end -}}
+4 -4
View File
@@ -1,14 +1,14 @@
{{- $content := .content -}}
{{- $content := .Content -}}
{{- if .ruby -}}
{{- if .Ruby -}}
{{- $content = partial "function/ruby.html" $content -}}
{{- end -}}
{{- if .fraction -}}
{{- if .Fraction -}}
{{- $content = partial "function/fraction.html" $content -}}
{{- end -}}
{{- if .fontawesome -}}
{{- if .Fontawesome -}}
{{- $content = partial "function/fontawesome.html" $content -}}
{{- end -}}
+4 -4
View File
@@ -1,8 +1,8 @@
{{- /* ID */ -}}
{{- $count := (.scratch.Get "this").count | default 1 -}}
{{- $count := (.Scratch.Get "this").count | default 1 -}}
{{- $id := printf "id-%d" $count -}}
{{- $count | add 1 | .scratch.SetInMap "this" "count" -}}
{{- with .content -}}
{{- dict $id . | dict "data" | dict "config" | merge ($.scratch.Get "this") | $.scratch.Set "this" -}}
{{- $count | add 1 | .Scratch.SetInMap "this" "count" -}}
{{- with .Content -}}
{{- dict $id . | dict "data" | dict "config" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
{{- end -}}
{{- return $id -}}
+3
View File
@@ -0,0 +1,3 @@
{{- /* https://discourse.gohugo.io/t/how-decode-urls-in-hugo/7549/4 */ -}}
{{- $URL := . | urlize | urls.Parse -}}
{{- return $URL.Path -}}
+2 -2
View File
@@ -11,7 +11,7 @@
<span class="header-title-pre">{{ . | safeHTML }}</span>
{{- end -}}
{{- if .typeit -}}
{{- $id := dict "content" .name "scratch" $.Scratch | partial "function/id.html" -}}
{{- $id := dict "Content" .name "Scratch" $.Scratch | partial "function/id.html" -}}
<span id="{{ $id }}" class="typeit"></span>
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
{{- else -}}
@@ -95,7 +95,7 @@
<span class="header-title-pre">{{ . | safeHTML }}</span>
{{- end -}}
{{- if .typeit -}}
{{- $id := dict "content" .name "scratch" $.Scratch | partial "function/id.html" -}}
{{- $id := dict "Content" .name "Scratch" $.Scratch | partial "function/id.html" -}}
<span id="{{ $id }}" class="typeit"></span>
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
{{- else -}}
+2 -2
View File
@@ -2,7 +2,7 @@
<div class="home-profile">
{{- $avatar := $profile.avatarURL -}}
{{- with $profile.gravatarEmail -}}
{{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" -}}
{{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%v?s=240&d=mp" -}}
{{- end -}}
{{- if $avatar -}}
<div class="home-avatar">
@@ -30,7 +30,7 @@
{{- with $profile.subtitle -}}
<h2 class="home-subtitle">
{{- if $profile.typeit -}}
{{- $id := dict "content" . "scratch" $.Scratch | partial "function/id.html" -}}
{{- $id := dict "Content" . "Scratch" $.Scratch | partial "function/id.html" -}}
<div id="{{ $id }}" class="typeit"></div>
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
{{- else -}}
+4 -4
View File
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "0.2.8" -}}
{{- .Scratch.Set "version" "0.2.9" -}}
{{- /* LoveIt theme version detection */ -}}
{{- $VERSION := "0.2.X" -}}
@@ -6,7 +6,7 @@
{{- if not .Site.Params.version -}}
{{- errorf "Configuration Error 配置文件错误\n\nYou haven't configured the LoveIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration\n你还没有正确配置 LoveIt 的版本参数. 参考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration\n" -}}
{{- else if ne .Site.Params.version $VERSION -}}
{{- errorf (printf "Compatibility Error 兼容性错误\n\n%s -> %s:\nYou have an incompatible update. See https://github.com/dillonzq/LoveIt/releases\n你进行了一次不兼容的更新. 参考 https://github.com/dillonzq/LoveIt/releases\n" .Site.Params.version $VERSION) -}}
{{- errorf (printf "Compatibility Error 兼容性错误\n\n%v -> %v:\nYou have an incompatible update. See https://github.com/dillonzq/LoveIt/releases\n你进行了一次不兼容的更新. 参考 https://github.com/dillonzq/LoveIt/releases\n" .Site.Params.version $VERSION) -}}
{{- end -}}
{{- end -}}
@@ -15,11 +15,11 @@
{{- if eq hugo.Environment "production" -}}
{{- $cdn := .Site.Params.cdn -}}
{{- with $cdn.data -}}
{{- $cdnData := printf "data/cdn/%s" . | resources.Get | transform.Unmarshal -}}
{{- $cdnData := printf "data/cdn/%v" . | resources.Get | transform.Unmarshal -}}
{{- $cdn = dict "simpleIconsPrefix" $cdnData.prefix.simpleIcons -}}
{{- $prefix := $cdnData.prefix.libFiles | default "" -}}
{{- range $key, $value := $cdnData.libFiles -}}
{{- $cdn = printf "%s%s" $prefix $value | dict $key | merge $cdn -}}
{{- $cdn = printf "%v%v" $prefix $value | dict $key | merge $cdn -}}
{{- end -}}
{{- end -}}
{{- .Scratch.Set "cdn" $cdn -}}
+2 -2
View File
@@ -5,7 +5,7 @@
window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());
gtag('config', '{{ . }}'{{ if $.google.anonymizeIP }}, { 'anonymize_ip': true }{{ end }});
</script>
{{- printf "https://www.googletagmanager.com/gtag/js?id=%s" . | dict "async" true "source" | partial "plugin/script.html" -}}
{{- printf "https://www.googletagmanager.com/gtag/js?id=%v" . | dict "async" true "source" | partial "plugin/script.html" -}}
{{- end -}}
{{- /* Fathom Analytics */ -}}
@@ -15,6 +15,6 @@
fathom('set', 'siteId', '{{ . }}');
fathom('trackPageview');
</script>
{{- dict "source" ($.fathom.server | default "cdn.usefathom.com" | printf "https://%s/tracker.js") "async" true "attr" "id=fathom-script" | partial "plugin/script.html" -}}
{{- dict "source" ($.fathom.server | default "cdn.usefathom.com" | printf "https://%v/tracker.js") "async" true "attr" "id=fathom-script" | partial "plugin/script.html" -}}
{{- end -}}
{{- end -}}
+2 -2
View File
@@ -11,12 +11,12 @@
{{- end -}}
{{- end -}}
{{- with $features | uniq -}}
{{- delimit . "%2C" | printf "https://polyfill.io/v3/polyfill.min.js?features=%s" | dict "source" | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- delimit . "%2C" | printf "https://polyfill.io/v3/polyfill.min.js?features=%v" | dict "source" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- end -}}
{{- /* object-fit-images */ -}}
{{- if $compatibility.objectFit -}}
{{- $source := $cdn.objectFitImagesJS | default "lib/object-fit-images/ofi.min.js" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
+1 -1
View File
@@ -8,7 +8,7 @@
{{- $prefix = . -}}
{{- end -}}
{{- $prefix = $prefix | strings.TrimSuffix "/" -}}
{{- $src = printf "%s/%s.svg" $prefix . -}}
{{- $src = printf "%v/%v.svg" $prefix . -}}
{{- end -}}
{{- if (urls.Parse $src).Host | not -}}
{{- $src = (resources.Get $src | minify).RelPermalink -}}
+2 -2
View File
@@ -2,9 +2,9 @@
{{- with .url -}}
{{- $href = . | relLangURL -}}
{{- else -}}
{{- $template := .template | default "%s" -}}
{{- $template := .template | default "%v" -}}
{{- with .prefix -}}
{{- $template = . | strings.TrimSuffix "/" | printf "%s/%%s" -}}
{{- $template = . | strings.TrimSuffix "/" | printf "%v/%%v" -}}
{{- end -}}
{{- $href = printf (string $template) .id -}}
{{- end -}}
+9 -9
View File
@@ -1,19 +1,19 @@
{{- $params := .page.Params | merge .site.Params.page | merge (dict "author" .site.Author.name) -}}
{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Author.name) -}}
<item>
<title>
{{- .page.Title -}}
{{- .Page.Title -}}
</title>
<link>
{{- .page.Permalink -}}
{{- .Page.Permalink -}}
</link>
<pubDate>
{{- .page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
{{- .Page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
</pubDate>
<author>
{{- .params.author | default (T "author") -}}
</author>
<guid>
{{- .page.Permalink -}}
{{- .Page.Permalink -}}
</guid>
<description>
{{- "<![CDATA[" | safeHTML -}}
@@ -22,12 +22,12 @@
<img src="{{ . | relURL }}" referrerpolicy="no-referrer">
</div>
{{- end -}}
{{- $content := .page.Description -}}
{{- $content := .Page.Description -}}
{{- if $params.rssFullText -}}
{{- $content = dict "content" .page.Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" -}}
{{- $content = dict "Content" .Page.Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
{{- else -}}
{{- with .page.Summary -}}
{{- $content = dict "content" . "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" -}}
{{- with .Page.Summary -}}
{{- $content = dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
{{- end -}}
{{- end -}}
{{- $content | replaceRE `<figure[^>]*>.*</figure>` "" | replaceRE `<img[^>]*( /)?>` "" | safeHTML -}}
+3 -3
View File
@@ -1,4 +1,4 @@
{{- $this := .scratch.Get "this" -}}
{{- $this := .Scratch.Get "this" -}}
{{- $script := $this.script | default slice -}}
{{- $script = $script | append (slice .data) -}}
{{- .scratch.SetInMap "this" "script" $script -}}
{{- $script = $script | append (slice .Data) -}}
{{- .Scratch.SetInMap "this" "script" $script -}}
+3 -3
View File
@@ -1,4 +1,4 @@
{{- $this := .scratch.Get "this" -}}
{{- $this := .Scratch.Get "this" -}}
{{- $style := $this.style | default slice -}}
{{- $style = $style | append (slice .data) -}}
{{- .scratch.SetInMap "this" "style" $style -}}
{{- $style = $style | append (slice .Data) -}}
{{- .Scratch.SetInMap "this" "style" $style -}}
+12 -11
View File
@@ -1,25 +1,26 @@
{{- $params := .Scratch.Get "params" -}}
{{- $modify_date := .Lastmod.Format (.Site.Params.dateformat | default "2006-01-02") -}}
<div class="post-footer" id="post-footer">
<div class="post-info">
<div class="post-info-line">
<div class="post-info-mod">
<span>
{{- printf (T "lastMod") $modify_date -}}
{{- if .Site.Params.gitRepo -}}
{{- with .GitInfo -}}
&nbsp;<a class="git-hash" href="{{ printf `%s/commit/%s` $.Site.Params.gitRepo .Hash }}" target="_blank" title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}">
<i class="fas fa-hashtag fa-fw"></i>{{- .AbbreviatedHash -}}
</a>
{{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}}
{{- dict "Date" . | T "updatedOnDate" -}}
{{- if $.Site.Params.gitRepo -}}
{{- with $.GitInfo -}}
&nbsp;<a class="git-hash" href="{{ printf `%v/commit/%v` $.Site.Params.gitRepo .Hash }}" target="_blank" title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}">
<i class="fas fa-hashtag fa-fw"></i>{{- .AbbreviatedHash -}}
</a>
{{- end -}}
{{- end -}}
{{- end -}}
</span>
</div>
<div class="post-info-license">
{{- with $params.license -}}
{{- with $params.license | string -}}
<span>
{{- printf (T "license") . | safeHTML -}}
{{- . | safeHTML -}}
</span>
{{- end -}}
</div>
@@ -30,7 +31,7 @@
{{- with .OutputFormats.Get "markdown" -}}
<span>
<a class="link-to-markdown" href="{{ .RelPermalink }}" target="_blank">
{{- T "seeMarkdown" -}}
{{- T "readMarkdown" -}}
</a>
</span>
{{- end -}}
@@ -50,7 +51,7 @@
<i class="fas fa-tags fa-fw"></i>&nbsp;
{{- range $index, $value := . -}}
{{- if gt $index 0 }},&nbsp;{{ end -}}
{{- $tag := $value | anchorize | printf "/tags/%s" | $.Site.GetPage -}}
{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
{{- end -}}
{{- end -}}
+3 -3
View File
@@ -1,13 +1,13 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>
{{- .Params.Title | default (T .Section) | default .Section | printf (T "allSome") }} - {{ .Site.Title -}}
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} - {{ .Site.Title -}}
</title>
<link>
{{- .Permalink -}}
</link>
<description>
{{- .Params.Title | default (T .Section) | default .Section | printf (T "allSome") }} | {{ .Site.Title -}}
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} | {{ .Site.Title -}}
</description>
<generator>Hugo -- gohugo.io</generator>
{{- with .Site.LanguageCode -}}
@@ -35,7 +35,7 @@
{{- end -}}
<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
{{- range .Pages | first (.Site.Params.section.rss | default 10) -}}
{{- dict "page" . "site" .Site | partial "rss/item.html" -}}
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
{{- end -}}
</channel>
</rss>
+14 -16
View File
@@ -37,23 +37,21 @@
{{- partial "plugin/link.html" $options -}}
</span>
{{- with .Params.categories -}}
&nbsp;
<span class="post-category">
{{- T "included" -}}
{{- range $index, $value := . -}}
{{- if gt $index 0 }}&nbsp;{{ end -}}
{{- $category := $value | anchorize | printf "/categories/%s" | $.Site.GetPage -}}
<a href="{{ $category.RelPermalink }}">
<i class="far fa-folder fa-fw"></i>{{ $category.Title }}
</a>
{{- end -}}
{{- $categories := slice -}}
{{- range .Params.categories -}}
{{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
{{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw"></i>%v</a>` $category.RelPermalink $category.Title) -}}
{{- end -}}
{{- with delimit $categories "&nbsp;" -}}
&nbsp;<span class="post-category">
{{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
</span>
{{- end -}}
</div>
<div class="post-meta-line">
{{- $publish_date := .PublishDate.Format (.Site.Params.dateformat | default "2006-01-02") -}}
<i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;
{{- with .Site.Params.dateformat | default "2006-01-02" | .PublishDate.Format -}}
<i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="{{ . }}">{{ . }}</time>&nbsp;
{{- end -}}
<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;{{ T "wordCount" .WordCount }}&nbsp;
<i class="far fa-clock fa-fw"></i>&nbsp;{{ T "readingTime" .ReadingTime }}&nbsp;
{{- $comment := .Scratch.Get "comment" | default dict -}}
@@ -74,20 +72,20 @@
{{- /* Static TOC */ -}}
{{- if ne $toc.enable false -}}
<div class="details toc" id="toc-static">
<div class="details toc" id="toc-static" kept="{{ if $toc.keepStatic }}true{{ end }}">
<div class="details-summary toc-title">
<span>{{ T "contents" }}</span>
<span><i class="details-icon fas fa-angle-right"></i></span>
</div>
<div class="details-content toc-content" id="toc-content-static">
{{- dict "content" .TableOfContents "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- dict "Content" .TableOfContents "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
</div>
</div>
{{- end -}}
{{- /* Content */ -}}
<div class="content" id="content">
{{- dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
</div>
{{- /* Footer */ -}}
+1 -1
View File
@@ -1,5 +1,5 @@
{{- $content := .Inner | transform.Unmarshal | jsonify -}}
{{- $id := dict "content" $content "scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $id := dict "Content" $content "Scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $width := cond .IsNamedParams (.Get "width") (.Get 0) | default "100%" -}}
{{- $height := cond .IsNamedParams (.Get "height") (.Get 1) | default "30rem" -}}
<div class="echarts" id="{{ $id }}" style="width: {{ $width }}; height: {{ $height }};"></div>
+1 -1
View File
@@ -28,6 +28,6 @@
{{- end -}}
{{- $darkStyle = $darkStyle | default $lightStyle -}}
{{- $options := dict "lng" $lng "lat" $lat "zoom" $zoom "marked" $marked "lightStyle" $lightStyle "darkStyle" $darkStyle "geolocate" $geolocate "navigation" $navigation "scale" $scale "fullscreen" $fullscreen -}}
{{- $id := dict "content" $options "scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $id := dict "Content" $options "Scratch" .Page.Scratch | partial "function/id.html" -}}
<div class="mapbox" id="{{ $id }}" style="width: {{ $width }}; height: {{ $height }};"></div>
{{- .Page.Scratch.SetInMap "this" "mapbox" true -}}
+1 -1
View File
@@ -1,3 +1,3 @@
{{- $id := dict "content" (trim .Inner "\n") "scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $id := dict "Content" (trim .Inner "\n") "Scratch" .Page.Scratch | partial "function/id.html" -}}
<div class="mermaid" id="{{ $id }}"></div>
{{- .Page.Scratch.SetInMap "this" "mermaid" true -}}
+6 -6
View File
@@ -1,11 +1,11 @@
{{- $content := .Inner | .Page.RenderString -}}
{{- $id := dict "scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $id := dict "Scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $tag := .Get 1 | default "div" -}}
{{- printf `<%s id="%s">%s</%s>` $tag $id $content $tag | safeHTML -}}
{{- printf `<%v id="%v">%v</%v>` $tag $id $content $tag | safeHTML -}}
{{- $style := .Get 0 | printf "#%s{%s}" $id -}}
{{- $path := printf "style/%s/%s" (md5 .Page.RelPermalink) $id -}}
{{- $res := resources.FromString (printf "%s.scss" $path) $style -}}
{{- $res = $res | toCSS (dict "targetPath" (printf "%s.css" $path) "outputStyle" "compressed") -}}
{{- $style := .Get 0 | printf "#%v{%v}" $id -}}
{{- $path := printf "style/%v/%v" (md5 .Page.RelPermalink) $id -}}
{{- $res := resources.FromString (printf "%v.scss" $path) $style -}}
{{- $res = $res | toCSS (dict "targetPath" (printf "%v.css" $path) "outputStyle" "compressed") -}}
{{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}}
{{- $styleArr | append $res.Content | .Page.Scratch.SetInMap "this" "styleArr" -}}
+2 -2
View File
@@ -19,7 +19,7 @@
{{- end -}}
{{- /* trim the newline */ -}}
{{- $id := dict "content" $content "scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $id := dict "Content" $content "Scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $key := .Get "group" | string | default $id -}}
{{- $typeitMap := (.Page.Scratch.Get "this").typeitMap | default dict -}}
{{- $group := index $typeitMap $key -}}
@@ -27,5 +27,5 @@
{{- dict $key $group | merge $typeitMap | .Page.Scratch.SetInMap "this" "typeitMap" -}}
<div class="typeit">
{{- printf `<%s id="%s" class="%s"></%s>` $tag $id (delimit $classList " ") $tag | safeHTML -}}
{{- printf `<%v id="%v" class="%v"></%v>` $tag $id (delimit $classList " ") $tag | safeHTML -}}
</div>
+3 -3
View File
@@ -1,13 +1,13 @@
{{- $version := .Get 0 -}}
{{- $url := printf "https://github.com/dillonzq/LoveIt/releases/tag/v%s" $version -}}
{{- $url := printf "https://github.com/dillonzq/LoveIt/releases/tag/v%v" $version -}}
{{- $type := .Get 1 | default "new" | lower -}}
{{- $label := T $type -}}
{{- $color := cond (eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}}
{{- $pathTemplate := cond .Site.IsMultiLingual (printf "svg/version/%%s-%%s.%s.svg" .Page.Language.Lang) "svg/version/%s-%s.svg" -}}
{{- $pathTemplate := cond .Site.IsMultiLingual (printf "svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
{{- $path := printf $pathTemplate $version $type -}}
{{- $res := resources.Get "svg/version.template.svg" -}}
{{- $res = $res | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
{{- $alt := printf "LoveIt %s | %s" $label $version -}}
{{- $alt := printf "LoveIt %v | %v" $label $version -}}
<a href="{{ $url }}" rel="noopener noreffer" target="_blank">
{{- dict "src" $res.RelPermalink "alt" $alt "class" "version" | partial "plugin/image.html" -}}
</a>
+2 -2
View File
@@ -12,7 +12,7 @@
{{- else if eq $taxonomy "tag" -}}
<i class="fas fa-tag fa-fw"></i>&nbsp;{{ .Title }}
{{- else -}}
{{- printf "%s - %s" (T $taxonomy | default $taxonomy) .Title -}}
{{- printf "%v - %v" (T $taxonomy | default $taxonomy) .Title -}}
{{- end -}}
</h2>
@@ -32,7 +32,7 @@
{{- .Title -}}
</a>
<span class="archive-item-date">
{{- .Date.Format ($.Site.Params.list.dateFormat | default "01-02") -}}
{{- $.Site.Params.list.dateFormat | default "01-02" | .Date.Format -}}
</span>
</article>
{{- end -}}
+1 -1
View File
@@ -35,7 +35,7 @@
{{- end -}}
<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
{{- range .Pages | first (.Site.Params.list.rss | default 10) -}}
{{- dict "page" . "site" .Site | partial "rss/item.html" -}}
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
{{- end -}}
</channel>
</rss>
+3 -3
View File
@@ -1,5 +1,5 @@
{{- define "title" -}}
{{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | printf (T "allSome") }} - {{ .Site.Title -}}
{{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "allSome" }} - {{ .Site.Title -}}
{{- end -}}
{{- define "content" -}}
@@ -10,7 +10,7 @@
<div class="page archive">
{{- /* Title */ -}}
<h2 class="single-title animated pulse faster">
{{- .Params.Title | default (T $taxonomies) | default $taxonomies | printf (T "allSome") -}}
{{- .Params.Title | default (T $taxonomies) | default $taxonomies | dict "Some" | T "allSome" -}}
</h2>
{{- /* Categories Page */ -}}
@@ -19,7 +19,7 @@
{{- range $terms -}}
{{- $term := .Term -}}
{{- $pages := .Pages -}}
{{- with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) -}}
{{- with $.Site.GetPage "taxonomy" (printf "%v/%v" $type $term) -}}
<div class="card-item">
<div class="card-item-wrapper">
<h3 class="card-item-title">
+1 -1
View File
@@ -31,7 +31,7 @@
},
"husky": {
"hooks": {
"pre-commit": "npm run build && npm run copy && git add ."
"pre-commit": "npm run build && npm run copy && git add resources assets/js"
}
},
"repository": {
File diff suppressed because one or more lines are too long
+12 -7
View File
@@ -397,7 +397,7 @@ class Theme {
initToc() {
const $tocCore = document.getElementById('TableOfContents');
if ($tocCore === null) return;
if (this.util.isTocStatic()) {
if (document.getElementById('toc-static').getAttribute('kept') || this.util.isTocStatic()) {
const $tocContentStatic = document.getElementById('toc-content-static');
if ($tocCore.parentElement !== $tocContentStatic) {
$tocCore.parentElement.removeChild($tocCore);
@@ -640,29 +640,34 @@ class Theme {
$viewComments.style.display = 'block';
}
const $fixedButtons = document.getElementById('fixed-buttons');
const MIN_SCROLL = 20;
const ACCURACY = 20, MINIMUM = 100;
window.addEventListener('scroll', () => {
this.newScrollTop = this.util.getScrollTop();
const scroll = this.newScrollTop - this.oldScrollTop;
const isMobile = this.util.isMobile();
this.util.forEach($headers, $header => {
if (scroll > MIN_SCROLL) {
if (scroll > ACCURACY) {
$header.classList.remove('fadeInDown');
this.util.animateCSS($header, ['fadeOutUp', 'faster'], true);
} else if (scroll < - MIN_SCROLL) {
} else if (scroll < - ACCURACY) {
$header.classList.remove('fadeOutUp');
this.util.animateCSS($header, ['fadeInDown', 'faster'], true);
}
});
if (this.newScrollTop > MIN_SCROLL) {
if (scroll > MIN_SCROLL) {
if (this.newScrollTop > MINIMUM) {
if (isMobile && scroll > ACCURACY) {
$fixedButtons.classList.remove('fadeIn');
this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);
} else if (scroll < - MIN_SCROLL) {
} else if (!isMobile || scroll < - ACCURACY) {
$fixedButtons.style.display = 'block';
$fixedButtons.classList.remove('fadeOut');
this.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);
}
} else {
if (!isMobile) {
$fixedButtons.classList.remove('fadeIn');
this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);
}
$fixedButtons.style.display = 'none';
}
for (let event of this.scrollEventSet) event();