Prepare for Docker Deploy
This commit is contained in:
@@ -2,7 +2,8 @@ baseURL: https://blog.mitsea.com/
|
||||
languageCode: zh-cn
|
||||
title: Mitsea Blog
|
||||
theme: hugo-theme-stack
|
||||
paginate: 10
|
||||
pagination:
|
||||
pagerSize: 10
|
||||
|
||||
languages:
|
||||
zh-cn:
|
||||
|
||||
1
themes/hugo-theme-stack/assets/icons/chevron-left.svg
Normal file
1
themes/hugo-theme-stack/assets/icons/chevron-left.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-left"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>
|
||||
|
After Width: | Height: | Size: 336 B |
1
themes/hugo-theme-stack/assets/icons/chevron-right.svg
Normal file
1
themes/hugo-theme-stack/assets/icons/chevron-right.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-right"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>
|
||||
|
After Width: | Height: | Size: 336 B |
1
themes/hugo-theme-stack/assets/icons/dots.svg
Normal file
1
themes/hugo-theme-stack/assets/icons/dots.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-dots"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>
|
||||
|
After Width: | Height: | Size: 459 B |
@@ -131,6 +131,7 @@
|
||||
.article-tags {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
a {
|
||||
color: var(--accent-color-text);
|
||||
|
||||
@@ -12,6 +12,9 @@ body {
|
||||
margin: 0;
|
||||
font-family: var(--base-font-family);
|
||||
font-size: 1.6rem;
|
||||
text-autospace: ideograph-alpha ideograph-numeric punctuation insert;
|
||||
text-spacing-trim: trim-start allow-end;
|
||||
-ms-text-autospace: ideograph-alpha;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
}
|
||||
|
||||
.article-tags {
|
||||
flex-wrap: wrap;
|
||||
text-transform: unset;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,10 +48,12 @@
|
||||
|
||||
.subsection-list {
|
||||
overflow-x: auto;
|
||||
margin-left: -24px;
|
||||
|
||||
.article-list--tile {
|
||||
display: flex;
|
||||
padding-bottom: 15px;
|
||||
padding: 8px 0 34px 24px;
|
||||
width: max-content;
|
||||
|
||||
article {
|
||||
width: 250px;
|
||||
|
||||
@@ -4,18 +4,47 @@
|
||||
box-shadow: var(--shadow-l1);
|
||||
border-radius: var(--card-border-radius);
|
||||
overflow: hidden;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.page-link {
|
||||
padding: 16px 32px;
|
||||
display: inline-flex;
|
||||
padding: 16px 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1 1 auto;
|
||||
min-width: 48px;
|
||||
color: var(--card-text-color-secondary);
|
||||
text-decoration: none;
|
||||
|
||||
&.current {
|
||||
font-weight: bold;
|
||||
background-color: var(--card-background-selected);
|
||||
color: var(--card-text-color-main);
|
||||
&:first-child,
|
||||
&:last-child {
|
||||
flex: 0 0 48px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
color: var(--card-text-color-secondary);
|
||||
&:hover:not(.current):not(.disabled) {
|
||||
background-color: var(--card-background-selected);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
&.current {
|
||||
background-color: var(--card-background-selected);
|
||||
color: var(--card-text-color-main);
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
color: var(--card-text-color-secondary);
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,10 +41,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
*/
|
||||
:root {
|
||||
--sys-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Droid Sans", "Helvetica Neue";
|
||||
--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", var(--zh-font-family), monospace;
|
||||
--base-font-family: "Lato", var(--sys-font-family), sans-serif;
|
||||
--code-font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,6 +8,10 @@ class StackColorScheme {
|
||||
constructor(toggleEl: HTMLElement) {
|
||||
this.bindMatchMedia();
|
||||
this.currentScheme = this.getSavedScheme();
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches === true)
|
||||
this.systemPreferScheme = 'dark'
|
||||
else
|
||||
this.systemPreferScheme = 'light';
|
||||
|
||||
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);
|
||||
|
||||
|
||||
@@ -32,9 +32,11 @@ function buildIdToNavigationElementMap(navigation: NodeListOf<Element>): IdToEle
|
||||
const sectionLinkRef: IdToElementMap = {};
|
||||
navigation.forEach((navigationElement: HTMLElement) => {
|
||||
const link = navigationElement.querySelector("a");
|
||||
const href = link.getAttribute("href");
|
||||
if (href.startsWith("#")) {
|
||||
sectionLinkRef[href.slice(1)] = navigationElement;
|
||||
if (link) {
|
||||
const href = link.getAttribute("href");
|
||||
if (href.startsWith("#")) {
|
||||
sectionLinkRef[href.slice(1)] = navigationElement;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -125,6 +127,13 @@ function setupScrollspy() {
|
||||
scrollHandler();
|
||||
}
|
||||
|
||||
// Use ResizeObserver to detect changes in the size of .article-content
|
||||
const articleContent = document.querySelector(".article-content");
|
||||
if (articleContent) {
|
||||
const resizeObserver = new ResizeObserver(debounced(resizeHandler));
|
||||
resizeObserver.observe(articleContent);
|
||||
}
|
||||
|
||||
window.addEventListener("resize", debounced(resizeHandler));
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,14 @@ class Search {
|
||||
this.resultTitle = resultTitle;
|
||||
this.resultTitleTemplate = resultTitleTemplate;
|
||||
|
||||
this.handleQueryString();
|
||||
/// Check if there's already value in the search input
|
||||
if (this.input.value.trim() !== '') {
|
||||
this.doSearch(this.input.value.split(' '));
|
||||
}
|
||||
else {
|
||||
this.handleQueryString();
|
||||
}
|
||||
|
||||
this.bindQueryStringChange();
|
||||
this.bindSearchForm();
|
||||
}
|
||||
|
||||
8
themes/hugo-theme-stack/exampleSite/content/_index.ja.md
Normal file
8
themes/hugo-theme-stack/exampleSite/content/_index.ja.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
menu:
|
||||
main:
|
||||
name: ホーム
|
||||
weight: -100
|
||||
params:
|
||||
icon: home
|
||||
---
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
menu:
|
||||
main:
|
||||
name: 主頁
|
||||
weight: -100
|
||||
params:
|
||||
icon: home
|
||||
---
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
title: Japanese Test
|
||||
description: これはサブタイトル
|
||||
date: 2020-09-09
|
||||
slug: test-chinese
|
||||
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||
categories:
|
||||
- Test
|
||||
- テスト
|
||||
---
|
||||
|
||||
## 本文テスト(フォント)
|
||||
|
||||
返扇花週認契適違込遷雇述請曜藤突扉直角
|
||||
|
||||
## 引用
|
||||
|
||||
> 国破れて山河在り\
|
||||
> 城春にして草木深し\
|
||||
> 時に感じては花にも涙を濺ぎ\
|
||||
> 別れを恨んでは鳥にも心を驚かす
|
||||
>
|
||||
> 烽火三月に連なり\
|
||||
> 家書万金に抵たる\
|
||||
> 白頭掻けば更に短く\
|
||||
> 渾べて簪に勝へざらんと欲す
|
||||
@@ -37,3 +37,7 @@ categories:
|
||||
```
|
||||
|
||||
相册语法来自 [Typlog](https://typlog.com/)
|
||||
|
||||
## 字体
|
||||
|
||||
返扇花週認契適違込遷雇述請曜藤突扉直角
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Chinese Test
|
||||
description: 這是一個副標題
|
||||
date: 2020-09-09
|
||||
slug: test-chinese
|
||||
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||
categories:
|
||||
- Test
|
||||
- 測試
|
||||
---
|
||||
|
||||
## 正文測試(字體)
|
||||
|
||||
返扇花週認契適違込遷雇述請曜藤突扉直角
|
||||
@@ -21,7 +21,7 @@ To enable emoji globally, set `enableEmoji` to `true` in your site's [configurat
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
|
||||
The [Emoji cheat sheet](https://www.webfx.com/tools/emoji-cheat-sheet/) is a useful reference for emoji shorthand codes.
|
||||
|
||||
***
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
|
||||
|
||||
---
|
||||
|
||||
## Twitter Simple Shortcode
|
||||
## X Simple Shortcode
|
||||
|
||||
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
|
||||
{{< x user="DesignReviewed" id="1085870671291310081" >}}
|
||||
|
||||
<br>
|
||||
|
||||
@@ -37,10 +37,6 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
|
||||
|
||||
{{< bilibili av498363026 >}}
|
||||
|
||||
## Gist Shortcode
|
||||
|
||||
{{< gist spf13 7896402 >}}
|
||||
|
||||
## Gitlab Snippets Shortcode
|
||||
|
||||
{{< gitlab 2349278 >}}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
baseurl: https://example.com
|
||||
baseurl: https://example.com/
|
||||
languageCode: en-us
|
||||
theme: hugo-theme-stack
|
||||
paginate: 3
|
||||
title: Example Site
|
||||
copyright: Example Person
|
||||
|
||||
@@ -19,20 +18,39 @@ languages:
|
||||
title: Example Site
|
||||
weight: 1
|
||||
params:
|
||||
description: Example description
|
||||
sidebar:
|
||||
subtitle: Example description
|
||||
zh-cn:
|
||||
languageName: 中文
|
||||
languageName: 简体中文
|
||||
title: 演示站点
|
||||
weight: 2
|
||||
params:
|
||||
description: 演示说明
|
||||
sidebar:
|
||||
subtitle: 演示说明
|
||||
|
||||
zh-tw:
|
||||
languageName: 正體中文
|
||||
title: 演示站點
|
||||
weight: 2
|
||||
params:
|
||||
sidebar:
|
||||
subtitle: 演示說明
|
||||
|
||||
ja:
|
||||
languageName: 日本語
|
||||
title: サンプルサイト
|
||||
weight: 2
|
||||
params:
|
||||
sidebar:
|
||||
subtitle: サンプル説明
|
||||
ar:
|
||||
languageName: عربي
|
||||
languagedirection: rtl
|
||||
title: موقع تجريبي
|
||||
weight: 3
|
||||
params:
|
||||
description: وصف تجريبي
|
||||
sidebar:
|
||||
subtitle: وصف تجريبي
|
||||
|
||||
services:
|
||||
# Change it to your Disqus shortname before using
|
||||
@@ -42,6 +60,9 @@ services:
|
||||
googleAnalytics:
|
||||
id:
|
||||
|
||||
pagination:
|
||||
pagerSize: 3
|
||||
|
||||
permalinks:
|
||||
post: /p/:slug/
|
||||
page: /:slug/
|
||||
@@ -156,6 +177,7 @@ params:
|
||||
repo:
|
||||
clientID:
|
||||
clientSecret:
|
||||
proxy:
|
||||
|
||||
cusdis:
|
||||
host:
|
||||
@@ -234,6 +256,18 @@ related:
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
extensions:
|
||||
passthrough:
|
||||
enable: true
|
||||
delimiters:
|
||||
block:
|
||||
- - \[
|
||||
- \]
|
||||
- - $$
|
||||
- $$
|
||||
inline:
|
||||
- - \(
|
||||
- \)
|
||||
renderer:
|
||||
## Set to true if you have HTML content inside Markdown
|
||||
unsafe: true
|
||||
|
||||
@@ -11,8 +11,8 @@ params:
|
||||
favicon:
|
||||
|
||||
footer:
|
||||
since: 2018
|
||||
customText: <a href="https://beian.miit.gov.cn/">皖ICP备19023860号</a>
|
||||
since:
|
||||
customText:
|
||||
|
||||
dateFormat:
|
||||
published: Jan 02, 2006
|
||||
@@ -25,7 +25,7 @@ params:
|
||||
avatar:
|
||||
enabled: true
|
||||
local: true
|
||||
src: img/avatar.jpeg
|
||||
src: img/avatar.png
|
||||
|
||||
article:
|
||||
headingAnchor: false
|
||||
@@ -68,7 +68,7 @@ search:
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: "مبني بستخدام {{ .Generator }}"
|
||||
other: "مبني باستخدام {{ .Generator }}"
|
||||
|
||||
designedBy:
|
||||
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
|
||||
|
||||
73
themes/hugo-theme-stack/i18n/bg.yaml
Normal file
73
themes/hugo-theme-stack/i18n/bg.yaml
Normal file
@@ -0,0 +1,73 @@
|
||||
toggleMenu:
|
||||
other: Покажи Меню
|
||||
|
||||
darkMode:
|
||||
other: Тъмен Режим
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} страница"
|
||||
other: "{{ .Count }} страници"
|
||||
|
||||
section:
|
||||
other: Секция
|
||||
|
||||
subsection:
|
||||
one: Подсекция
|
||||
other: Подсекции
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Назад
|
||||
|
||||
tableOfContents:
|
||||
other: Съдържание
|
||||
|
||||
relatedContent:
|
||||
other: Свързано Съдържание
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Последна промяна на
|
||||
|
||||
readingTime:
|
||||
one: "{{ .Count }} minute read"
|
||||
other: "{{ .Count }} minute read"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Не е намерено
|
||||
|
||||
subtitle:
|
||||
other: Страницата която търсите не е открита
|
||||
|
||||
widget:
|
||||
archives:
|
||||
title:
|
||||
other: Архиви
|
||||
|
||||
more:
|
||||
other: Повече
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Тагове
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Категории
|
||||
|
||||
search:
|
||||
title:
|
||||
other: Търсене
|
||||
|
||||
placeholder:
|
||||
other: Напишете нещо...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT страници (#TIME_SECONDS секунди)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Създадено с {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Тема {{ .Theme }} създадена от {{ .DesignedBy }}
|
||||
@@ -50,6 +50,9 @@ widget:
|
||||
tagCloud:
|
||||
title:
|
||||
other: Mots clés
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Catégories
|
||||
|
||||
search:
|
||||
title:
|
||||
|
||||
@@ -2,7 +2,7 @@ toggleMenu:
|
||||
other: Toggle Menu
|
||||
|
||||
darkMode:
|
||||
other: Dark Mode
|
||||
other: Modalità scura
|
||||
|
||||
list:
|
||||
page:
|
||||
@@ -49,7 +49,7 @@ widget:
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Tags
|
||||
other: Tag
|
||||
|
||||
categoriesCloud:
|
||||
title:
|
||||
|
||||
72
themes/hugo-theme-stack/i18n/oc.yaml
Normal file
72
themes/hugo-theme-stack/i18n/oc.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
toggleMenu:
|
||||
other: Alternar menú
|
||||
|
||||
darkMode:
|
||||
other: Mòde fosc
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} pagina"
|
||||
other: "{{ .Count }} paginas"
|
||||
|
||||
section:
|
||||
other: Seccion
|
||||
|
||||
subsection:
|
||||
one: Josseccion
|
||||
other: Josseccions
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Tornar
|
||||
|
||||
tableOfContents:
|
||||
other: Taula de contengut
|
||||
|
||||
relatedContent:
|
||||
other: Contenguts relacionats
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Darrièra actualizacion
|
||||
readingTime:
|
||||
one: "{{ .Count }} minuta de lectura"
|
||||
other: "{{ .Count }} minutas de lectura"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Non trobat
|
||||
|
||||
subtitle:
|
||||
other: Aquesta pagina existís pas
|
||||
|
||||
widget:
|
||||
archives:
|
||||
title:
|
||||
other: Archiu
|
||||
|
||||
more:
|
||||
other: Mai
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Etiquetas
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Categorias
|
||||
|
||||
search:
|
||||
title:
|
||||
other: Cercar
|
||||
|
||||
placeholder:
|
||||
other: Picatz quicòm...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT paginas dins (#TIME_SECONDS segons)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Creat amb {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Tàma {{ .Theme }} concebut per {{ .DesignedBy }}
|
||||
@@ -47,6 +47,9 @@ widget:
|
||||
tagCloud:
|
||||
title:
|
||||
other: Теги
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Категории
|
||||
|
||||
search:
|
||||
title:
|
||||
|
||||
@@ -17,11 +17,22 @@ list:
|
||||
other: Alt bölümler
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Geri
|
||||
|
||||
tableOfContents:
|
||||
other: İçindekiler
|
||||
|
||||
relatedContent:
|
||||
other: Alakalı içerikler
|
||||
other: Benzer içerikler
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Son güncelleme
|
||||
|
||||
readingTime:
|
||||
one: "{{ .Count }} dakika okuma süresi"
|
||||
other: "{{ .Count }} dakika okuma süresi"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Bulunamadı
|
||||
@@ -37,6 +48,9 @@ widget:
|
||||
tagCloud:
|
||||
title:
|
||||
other: Etiketler
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Kategoriler
|
||||
|
||||
search:
|
||||
title:
|
||||
|
||||
@@ -52,6 +52,9 @@ widget:
|
||||
tagCloud:
|
||||
title:
|
||||
other: Теґи
|
||||
categoriesCloud:
|
||||
title:
|
||||
other: Категорії
|
||||
|
||||
search:
|
||||
title:
|
||||
|
||||
@@ -31,7 +31,7 @@ notFound:
|
||||
title:
|
||||
other: 404 错误
|
||||
subtitle:
|
||||
other: 页面不存在。你可以尝试将链接中的 https://blog.mitsea.com/ 替换为 https://www.notion.so/flintylemming/ 查看原档。
|
||||
other: 页面不存在
|
||||
|
||||
widget:
|
||||
archives:
|
||||
|
||||
@@ -3,5 +3,43 @@
|
||||
<h1 class="article-title">{{ T "notFound.title" }}</h1>
|
||||
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
|
||||
</div>
|
||||
|
||||
{{- $query := first 1 (where .Site.Pages "Layout" "==" "search") -}}
|
||||
{{- $searchPage := index $query 0 -}}
|
||||
|
||||
{{- with $searchPage -}}
|
||||
<form action="{{ $searchPage.RelPermalink }}" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
|
||||
<p>
|
||||
<label>{{ T "search.title" }}</label>
|
||||
<input id="searchInput" name="keyword" required placeholder="{{ T `search.placeholder` }}" />
|
||||
|
||||
<button title="{{ T `search.title` }}">
|
||||
{{ partial "helper/icon" "search" }}
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<div class="search-result">
|
||||
<h3 class="search-result--title section-title"></h3>
|
||||
<div class="search-result--list article-list--compact"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.searchResultTitleTemplate = "{{ T `search.resultTitle` }}"
|
||||
</script>
|
||||
|
||||
{{- $opts := dict "minify" hugo.IsProduction "JSXFactory" "createElement" -}}
|
||||
{{- $searchScript := resources.Get "ts/search.tsx" | js.Build $opts -}}
|
||||
<script type="text/javascript" src="{{ $searchScript.RelPermalink }}" defer></script>
|
||||
|
||||
<script>
|
||||
const wrongUrl = new URL(window.location.href);
|
||||
|
||||
/// Get the search keyword from the wrong URL by removing all slashes and dashes
|
||||
const searchKeyword = decodeURIComponent(wrongUrl.pathname).split(/[/|-]/).join(' ').trim();
|
||||
|
||||
document.getElementById('searchInput').setAttribute('value', searchKeyword);
|
||||
</script>
|
||||
{{- end -}}
|
||||
{{ partialCached "footer/footer" . }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,4 @@
|
||||
<pre class="mermaid">
|
||||
{{ .Inner | htmlEscape | safeHTML }}
|
||||
</pre>
|
||||
{{ .Page.Store.Set "hasMermaid" true }}
|
||||
@@ -4,7 +4,7 @@
|
||||
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
|
||||
{{- $terms := $taxonomy.Pages -}}
|
||||
{{ if $terms }}
|
||||
<h2 class="section-title">{{ $taxonomy.Title }}</h2>
|
||||
<h2 class="section-title">{{ T "widget.categoriesCloud.title" }}</h2>
|
||||
<div class="subsection-list">
|
||||
<div class="article-list--tile">
|
||||
{{ range $terms }}
|
||||
@@ -16,8 +16,7 @@
|
||||
</header>
|
||||
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
||||
{{ $filtered := where $pages "Params.hidden" "!=" true }}
|
||||
|
||||
{{ range $filtered.GroupByDate "2006" }}
|
||||
{{ $id := lower (replace .Key " " "-") }}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
{{ partialCached "footer/footer" . }}
|
||||
|
||||
{{ partialCached "article/components/photoswipe" . }}
|
||||
{{ partialCached "article/components/mermaid" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "right-sidebar" }}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{{ define "main" }}
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
||||
{{ $filtered := where $pages "Params.hidden" "!=" true }}
|
||||
{{ $pag := .Paginate ($filtered) }}
|
||||
|
||||
<section class="article-list">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
|
||||
{{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}}
|
||||
{{- $filtered := ($pages | intersect $notHidden) -}}
|
||||
{{- $filtered := where $pages "Params.hidden" "!=" true -}}
|
||||
|
||||
{{- $result := slice -}}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</h2>
|
||||
<footer class="article-time">
|
||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
{{ if $showDate }}
|
||||
<div>
|
||||
{{ partial "helper/icon" "date" }}
|
||||
<time class="article-time--published">
|
||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
<time class="article-time--published" datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<section class="article-lastmod">
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<span>
|
||||
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
</span>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
{{ $permalink = .RelPermalink }}
|
||||
{{ end }}
|
||||
<div class="article-image">
|
||||
<img src="{{ $permalink }}" loading="lazy">
|
||||
<img src="{{ $permalink }}" loading="lazy"{{ with $link.alt }} alt="{{ . }}"{{ end }}>
|
||||
</div>
|
||||
{{ end }}
|
||||
</a>
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true }
|
||||
],
|
||||
ignoredClasses: ["gist"]
|
||||
});})
|
||||
const elementsToRender = [".main-article", ".widget--toc"];
|
||||
|
||||
elementsToRender.forEach(selector => {
|
||||
const element = document.querySelector(selector);
|
||||
if (element) {
|
||||
renderMathInElement(element, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true }
|
||||
],
|
||||
ignoredClasses: ["gist"]
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,9 @@
|
||||
{{ if .Store.Get "hasMermaid" }}
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11.12.2/+esm';
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: 'neutral',
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
@@ -1,20 +1,26 @@
|
||||
{{- $host := default "https://cusdis.com" .Site.Params.comments.cusdis.host -}}
|
||||
<div id="cusdis_thread"
|
||||
data-host="{{ $host }}"
|
||||
data-app-id="{{ .Site.Params.comments.cusdis.id }}"
|
||||
data-page-id="{{ .File.UniqueID }}"
|
||||
data-page-url="{{ .Permalink }}"
|
||||
data-page-title="{{ .Title }}"></div>
|
||||
<div id="cusdis_thread" data-host="{{ $host }}" data-app-id="{{ .Site.Params.comments.cusdis.id }}"
|
||||
data-page-id="{{ .File.UniqueID }}" data-page-url="{{ .Permalink }}" data-page-title="{{ .Title }}"></div>
|
||||
<script async defer src="{{ $host }}/js/cusdis.es.js"></script>
|
||||
|
||||
<script>
|
||||
function setCusdisTheme(theme) {
|
||||
let cusdis = document.querySelector('#cusdis_thread iframe');
|
||||
if (cusdis) {
|
||||
window.CUSDIS.setTheme(theme)
|
||||
window.CUSDIS.setTheme(theme);
|
||||
cusdis.contentWindow.document.body.style.backgroundColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('load', function () {
|
||||
let iframe = document.querySelector("#cusdis_thread iframe");
|
||||
if (iframe) {
|
||||
let observer = new MutationObserver(() => {
|
||||
let scrollHeight = iframe.contentWindow.document.body.scrollHeight;
|
||||
iframe.style.height = scrollHeight + "px";
|
||||
});
|
||||
observer.observe(iframe.contentWindow.document.body, { childList: true, subtree: true });
|
||||
}
|
||||
});
|
||||
window.addEventListener('onColorSchemeChange', (e) => {
|
||||
setCusdisTheme(e.detail)
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="disqus-container">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ partial "disqus.html" . }}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{- $disqusjs := .Site.Params.Comments.disqusjs -}}
|
||||
{{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}}
|
||||
|
||||
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | resources.ToCSS | minify -}}
|
||||
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | toCSS | minify -}}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
|
||||
<div class="disqus-container">
|
||||
@@ -21,8 +21,12 @@
|
||||
}
|
||||
|
||||
function lazyLoadDisqusJS() {
|
||||
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
|
||||
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
|
||||
const excludedHosts = ["localhost", "127.0.0.1"];
|
||||
const hostname = window.location.hostname;
|
||||
|
||||
if (excludedHosts.includes(hostname)) {
|
||||
document.getElementById('disqus_thread').innerHTML =
|
||||
'Disqus comments not available by default when the website is previewed locally.';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
data-input-position="{{- default `top` .inputPosition -}}"
|
||||
data-theme="{{- default `light` .lightTheme -}}"
|
||||
data-lang="{{- default `en` .lang -}}"
|
||||
data-loading="{{- .loading -}}"
|
||||
crossorigin="anonymous"
|
||||
async
|
||||
></script>
|
||||
|
||||
@@ -15,11 +15,13 @@
|
||||
admin: ["{{- .admin -}}"],
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
id: md5(location.pathname), // Max Location.pathname Legth:75 https://github.com/gitalk/gitalk/issues/102
|
||||
proxy: {{- .proxy -}},
|
||||
});
|
||||
(function () {
|
||||
if (
|
||||
["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1
|
||||
) {
|
||||
const excludedHosts = ["localhost", "127.0.0.1"];
|
||||
const hostname = window.location.hostname;
|
||||
|
||||
if (excludedHosts.includes(hostname)) {
|
||||
document.getElementById("gitalk-container").innerHTML =
|
||||
"Gitalk comments not available by default when the website is previewed locally.";
|
||||
return;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.21/dist/twikoo.all.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/twikoo@1.6.44/dist/twikoo.all.min.js"></script>
|
||||
<div id="tcomment"></div>
|
||||
<style>
|
||||
.twikoo {
|
||||
@@ -24,8 +24,11 @@
|
||||
.twikoo .tk-preview-container,
|
||||
.twikoo .tk-content,
|
||||
.twikoo .tk-nick,
|
||||
.twikoo .tk-send {
|
||||
color: var(--twikoo-body-text-color-main);
|
||||
.twikoo .tk-send,
|
||||
.twikoo .tk-comments-no,
|
||||
.twikoo .el-input__count,
|
||||
.twikoo .tk-submit-action-icon {
|
||||
color: var(--twikoo-body-text-color-main)!important;
|
||||
}
|
||||
.twikoo .el-button{
|
||||
color: var(--twikoo-body-text-color)!important;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
{{- with .Site.Params.comments.waline -}}
|
||||
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
|
||||
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}}
|
||||
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" "turnstilekey" "turnstileKey" -}}
|
||||
|
||||
{{- range $key, $val := . -}}
|
||||
{{- if ne $val nil -}}
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
<!-- Build paginator -->
|
||||
{{ $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
|
||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
||||
{{ $filtered := where $pages "Params.hidden" "!=" true }}
|
||||
{{ $pag := .Paginate ($filtered) }}
|
||||
|
||||
{{ if .Paginator.HasPrev }}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
|
||||
|
||||
{{- $opts := dict "minify" hugo.IsProduction -}}
|
||||
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
|
||||
{{- $script := resources.Get "ts/main.ts" | js.Build $opts | fingerprint -}}
|
||||
|
||||
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
|
||||
|
||||
{{- with resources.Get "ts/custom.ts" -}}
|
||||
{{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
|
||||
{{- $customScript := . | js.Build $opts -}}
|
||||
{{- $customScript := . | js.Build $opts | fingerprint -}}
|
||||
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
|
||||
{{- end -}}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- $ThemeVersion := "3.26.0" -}}
|
||||
{{- $ThemeVersion := "3.33.0" -}}
|
||||
<footer class="site-footer">
|
||||
<section class="copyright">
|
||||
©
|
||||
|
||||
@@ -22,5 +22,5 @@
|
||||
<link rel="shortcut icon" href="{{ . | relURL }}" />
|
||||
{{ end }}
|
||||
|
||||
{{- template "_internal/google_analytics.html" . -}}
|
||||
{{- partial "google_analytics.html" . -}}
|
||||
{{- partial "head/custom.html" . -}}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{ $sass := resources.Get "scss/style.scss" }}
|
||||
{{ $style := $sass | resources.ToCSS | minify | resources.Fingerprint "sha256" }}
|
||||
{{ $style := $sass | toCSS | minify | resources.Fingerprint "sha256" }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
@@ -1,26 +1,70 @@
|
||||
{{ if gt .Paginator.TotalPages 1 }}
|
||||
<nav class='pagination'>
|
||||
{{ $.Scratch.Set "hasPrevDots" false }}
|
||||
{{ $.Scratch.Set "hasNextDots" false }}
|
||||
{{- $pag := $.Paginator -}}
|
||||
{{- if gt $pag.TotalPages 1 -}}
|
||||
<nav class="pagination" role="navigation" aria-label="pagination">
|
||||
{{- /* Previous page button */ -}}
|
||||
<a class="page-link {{ if not $pag.Prev }}disabled{{ end }}"
|
||||
{{- if $pag.Prev -}}href="{{ $pag.Prev.URL }}" {{- end -}}
|
||||
aria-label="Previous page"
|
||||
{{- if not $pag.Prev -}}aria-disabled="true"{{- end -}}>
|
||||
{{ partial "helper/icon" "chevron-left" }}
|
||||
</a>
|
||||
|
||||
{{ range .Paginator.Pagers }}
|
||||
{{ if eq . $.Paginator }}
|
||||
<span class='page-link current'>
|
||||
{{- .PageNumber -}}
|
||||
</span>
|
||||
{{ else if or (or (eq . $.Paginator.First) (eq . $.Paginator.Prev)) (or (eq . $.Paginator.Next) (eq . $.Paginator.Last )) }}
|
||||
<a class='page-link' href='{{ .URL }}'>
|
||||
{{- .PageNumber -}}
|
||||
</a>
|
||||
{{ else }}
|
||||
{{ if and (not ($.Scratch.Get "hasPrevDots")) (lt .PageNumber $.Paginator.PageNumber) }}
|
||||
{{ $.Scratch.Set "hasPrevDots" true }}
|
||||
<span class='page-link dots'>…</span>
|
||||
{{ else if and (not ($.Scratch.Get "hasNextDots")) (gt .PageNumber $.Paginator.PageNumber) }}
|
||||
{{ $.Scratch.Set "hasNextDots" true }}
|
||||
<span class='page-link dots'>…</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
{{- /* Page numbers logic */ -}}
|
||||
{{- $window := 4 -}}
|
||||
{{- $showFirst := true -}}
|
||||
{{- $showLast := true -}}
|
||||
|
||||
{{- /* First page */ -}}
|
||||
<a class="page-link {{ if eq $pag.PageNumber 1 }}current{{ end }}" aria-label="Page 1"
|
||||
{{- if eq $pag.PageNumber 1 -}}aria-current="page" {{- end -}}
|
||||
{{- if ne $pag.PageNumber 1 -}}href="{{ $pag.First.URL }}"{{- end -}}>
|
||||
1
|
||||
</a>
|
||||
|
||||
{{- /* Left ellipsis - show if current page is > 3 */ -}}
|
||||
{{- if gt $pag.PageNumber 3 -}}
|
||||
<span class="page-link pagination-link">
|
||||
{{ partial "helper/icon" "dots" }}
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Middle pages - show current and neighbors */ -}}
|
||||
{{- range $pag.Pagers -}}
|
||||
{{- if and (gt .PageNumber 1) (lt .PageNumber $pag.TotalPages) -}}
|
||||
{{- if and (ge .PageNumber (sub $pag.PageNumber $window)) (le .PageNumber (add $pag.PageNumber $window)) -}}
|
||||
<a class="page-link {{ if eq .PageNumber $pag.PageNumber }}current{{ end }}"
|
||||
{{- if eq .PageNumber $pag.PageNumber -}}aria-current="page" {{- end -}} href="{{ .URL }}"
|
||||
aria-label="Page {{ .PageNumber }}">
|
||||
{{ .PageNumber }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Right ellipsis - show if current page is < last-2 */ -}}
|
||||
{{- if lt $pag.PageNumber (sub $pag.TotalPages 2) -}}
|
||||
<span class="page-link pagination-link">
|
||||
{{ partial "helper/icon" "dots" }}
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Last page (if more than 1 page total) */ -}}
|
||||
|
||||
{{- if gt $pag.TotalPages 1 -}}
|
||||
<a class="page-link {{ if eq $pag.PageNumber $pag.TotalPages }}current{{ end }}"
|
||||
{{- if ne $pag.PageNumber $pag.TotalPages -}}href="{{ $pag.Last.URL }}" {{- end -}}
|
||||
aria-label="Page {{ $pag.TotalPages }}"
|
||||
{{- if eq $pag.PageNumber $pag.TotalPages -}}aria-current="page"{{- end -}}>
|
||||
{{ $pag.TotalPages }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Next page button */ -}}
|
||||
<a class="page-link {{ if not $pag.Next }}disabled{{ end }}"
|
||||
{{- if $pag.Next -}}href="{{ $pag.Next.URL }}" {{- end -}}
|
||||
aria-label="Next page"
|
||||
{{- if not $pag.Next -}}aria-disabled="true"{{- end -}}>
|
||||
{{ partial "helper/icon" "chevron-right" }}
|
||||
</a>
|
||||
</nav>
|
||||
{{- end -}}
|
||||
@@ -60,7 +60,7 @@
|
||||
<ol class="menu" id="main-menu">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||
{{ $active := or (eq $currentPage.RelPermalink .URL) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||
<li {{ if $active }} class='current' {{ end }}>
|
||||
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||
{{ $icon := default .Pre .Params.Icon }}
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
|
||||
|
||||
{{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }}
|
||||
{{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }}
|
||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
||||
{{ $filtered := where $pages "Params.hidden" "!=" true }}
|
||||
{{ $archives := $filtered.GroupByDate "2006" }}
|
||||
|
||||
<div class="widget-archive--list">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<div class="tagCloud-tags">
|
||||
{{ range first $limit $context.Site.Taxonomies.tags.ByCount }}
|
||||
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
|
||||
<a href="{{ .Page.RelPermalink }}">
|
||||
{{ .Page.Title }}
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
publish = "exampleSite/public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.124.0"
|
||||
HUGO_VERSION = "0.152.2"
|
||||
HUGO_THEME = "repo"
|
||||
|
||||
[context.production]
|
||||
|
||||
Reference in New Issue
Block a user