Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1300e0d714 | ||
|
|
5d004786d6 | ||
|
|
87fad5fd81 | ||
|
|
21a5834a2f | ||
|
|
3e8490da1d | ||
|
|
9befda7310 | ||
|
|
d5268a41e0 | ||
|
|
38eb9c4eaf | ||
|
|
e61bca1dbd | ||
|
|
96db925b06 | ||
|
|
0429678d57 | ||
|
|
cef9fe2549 | ||
|
|
21b42f0b6c | ||
|
|
79412144d9 | ||
|
|
79d8c1db38 | ||
|
|
8b6622792d | ||
|
|
1814a14c20 | ||
|
|
bdd2bd429a | ||
|
|
6c27767dac | ||
|
|
e661fe2ead | ||
|
|
8b17b8a4ee | ||
|
|
326c052a24 | ||
|
|
9914bba42c | ||
|
|
a37ebbe2aa | ||
|
|
83e3a4e8e1 | ||
|
|
a8718592df | ||
|
|
70cc14fcbe | ||
|
|
90e259f31e | ||
|
|
1ec73b2d76 | ||
|
|
0de250c9ff | ||
|
|
84dd80959a | ||
|
|
2ee854dd6a | ||
|
|
ced387cbd5 | ||
|
|
efa3452cdb | ||
|
|
5ac2552e7c | ||
|
|
ae477ab224 | ||
|
|
3572fff280 | ||
|
|
400b0a9283 | ||
|
|
bccb62cd46 | ||
|
|
0d645fe664 | ||
|
|
d790d42441 | ||
|
|
464f4b1d3b | ||
|
|
f2955aac27 | ||
|
|
a5820c6f52 | ||
|
|
80be1b2435 | ||
|
|
3326cf886a | ||
|
|
39dd18e603 | ||
|
|
de79b8a470 |
@@ -0,0 +1,44 @@
|
|||||||
|
name: Build Hugo Artifact
|
||||||
|
|
||||||
|
# Controls when the action will run.
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
|
jobs:
|
||||||
|
# This workflow contains a single job called "build"
|
||||||
|
build:
|
||||||
|
# The type of runner that the job will run on
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
|
steps:
|
||||||
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Hugo setup
|
||||||
|
uses: peaceiris/[email protected]
|
||||||
|
with:
|
||||||
|
# The Hugo version to download (if necessary) and use. Example: 0.58.2
|
||||||
|
hugo-version: latest # optional, default is latest
|
||||||
|
# Download (if necessary) and use Hugo extended version. Example: true
|
||||||
|
extended: true # optional, default is false
|
||||||
|
|
||||||
|
# Runs a set of commands using the runners shell
|
||||||
|
- name: Generate Hugo site
|
||||||
|
run: cd exampleSite && hugo --gc --themesDir ../..
|
||||||
|
|
||||||
|
- name: Upload Hugo artifact
|
||||||
|
uses: actions/[email protected]
|
||||||
|
with:
|
||||||
|
# Artifact name
|
||||||
|
name: resources
|
||||||
|
# A file, directory or wildcard pattern that describes what to upload
|
||||||
|
path: |
|
||||||
|
exampleSite/resources
|
||||||
|
!exampleSite/resources/_gen/images
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
image:
|
||||||
|
style:
|
||||||
|
background: "#2a9d8f"
|
||||||
|
color: "#fff"
|
||||||
|
---
|
||||||
+11
-2
@@ -1,2 +1,11 @@
|
|||||||
+++
|
---
|
||||||
+++
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
description:
|
||||||
|
date: {{ .Date }}
|
||||||
|
image:
|
||||||
|
math:
|
||||||
|
license:
|
||||||
|
hidden: false
|
||||||
|
comments: true
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
description:
|
||||||
|
image:
|
||||||
|
---
|
||||||
@@ -112,8 +112,6 @@ main.main {
|
|||||||
padding-top: var(--main-top-padding);
|
padding-top: var(--main-top-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-grid {
|
.main-container {
|
||||||
@media (max-width: $on-phone) {
|
min-height: 100vh;
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -56,24 +56,6 @@
|
|||||||
padding: var(--card-padding);
|
padding: var(--card-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-category {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
a {
|
|
||||||
display: inline-block;
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 8px 16px;
|
|
||||||
font-size: 1.4rem;
|
|
||||||
background: nth($defaultTagBackgrounds, 1);
|
|
||||||
color: nth($defaultTagColors, 1);
|
|
||||||
border-radius: var(--tag-border-radius);
|
|
||||||
|
|
||||||
@media (max-width: $on-phone) {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
padding: 8px 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.article-title {
|
.article-title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
@@ -128,11 +110,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.article-category,
|
||||||
.article-tags {
|
.article-tags {
|
||||||
a {
|
a {
|
||||||
color: var(--accent-color-text);
|
color: var(--accent-color-text);
|
||||||
background-color: var(--accent-color);
|
background-color: var(--accent-color);
|
||||||
padding: 8px 18px;
|
padding: 8px 16px;
|
||||||
border-radius: var(--tag-border-radius);
|
border-radius: var(--tag-border-radius);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
@@ -193,6 +176,7 @@
|
|||||||
img {
|
img {
|
||||||
width: var(--image-size);
|
width: var(--image-size);
|
||||||
height: var(--image-size);
|
height: var(--image-size);
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +184,7 @@
|
|||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-preview{
|
.article-preview {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
color: var(--card-text-color-tertiary);
|
color: var(--card-text-color-tertiary);
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|||||||
@@ -14,8 +14,7 @@
|
|||||||
|
|
||||||
/* Error */
|
/* Error */
|
||||||
.chroma .err {
|
.chroma .err {
|
||||||
color: #960050;
|
color: #bb0064;
|
||||||
background-color: #1e0010
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LineTableTD */
|
/* LineTableTD */
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
/* Error */
|
/* Error */
|
||||||
.chroma .err {
|
.chroma .err {
|
||||||
color: #960050;
|
color: #960050;
|
||||||
background-color: #1e0010
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LineTableTD */
|
/* LineTableTD */
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
@import "variables.scss";
|
|
||||||
|
|
||||||
.keep-sidebar {
|
.keep-sidebar {
|
||||||
@media (min-width: $on-phone) and (max-width: $on-tablet) {
|
@media (min-width: $on-phone) and (max-width: $on-tablet) {
|
||||||
--main-top-padding: 50px;
|
--main-top-padding: 50px;
|
||||||
@@ -189,11 +187,11 @@
|
|||||||
.article-content {
|
.article-content {
|
||||||
font-family: var(--article-font-family);
|
font-family: var(--article-font-family);
|
||||||
font-size: var(--article-font-size);
|
font-size: var(--article-font-size);
|
||||||
|
padding: 0 var(--card-padding);
|
||||||
line-height: var(--article-line-height);
|
line-height: var(--article-line-height);
|
||||||
|
|
||||||
& > p {
|
& > p {
|
||||||
margin: 1.5em 0;
|
margin: 1.5em 0;
|
||||||
padding: 0 var(--card-padding);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
@@ -202,12 +200,12 @@
|
|||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6 {
|
h6 {
|
||||||
padding: 0 calc(var(--card-padding) - var(--heading-border-size));
|
margin-left: calc((var(--card-padding)) * -1);
|
||||||
|
padding-left: calc(var(--card-padding) - var(--heading-border-size));
|
||||||
border-left: var(--heading-border-size) solid var(--accent-color);
|
border-left: var(--heading-border-size) solid var(--accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
margin: 0 auto;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
figcaption {
|
figcaption {
|
||||||
@@ -218,17 +216,12 @@
|
|||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 10px 0;
|
margin: 1.5em 0;
|
||||||
border-left: var(--blockquote-border-size) solid var(--card-separator-color);
|
border-left: var(--blockquote-border-size) solid var(--card-separator-color);
|
||||||
padding: 15px calc(var(--card-padding) - var(--blockquote-border-size));
|
padding: 15px calc(var(--card-padding) - var(--blockquote-border-size));
|
||||||
background-color: var(--blockquote-background-color);
|
background-color: var(--blockquote-background-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
& > ul,
|
|
||||||
& > ol {
|
|
||||||
margin: 1em var(--card-padding);
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin: 40px auto;
|
margin: 40px auto;
|
||||||
@@ -244,7 +237,6 @@
|
|||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
border-radius: var(--tag-border-radius);
|
border-radius: var(--tag-border-radius);
|
||||||
font-family: var(--code-font-family);
|
font-family: var(--code-font-family);
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery {
|
.gallery {
|
||||||
@@ -252,7 +244,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 20px 0;
|
margin: 1.5em 0;
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -282,9 +274,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
margin: 0 var(--card-padding);
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: calc(100% - var(--card-padding) * 2);
|
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
margin-bottom: 1.5em;
|
margin-bottom: 1.5em;
|
||||||
@@ -305,4 +295,37 @@
|
|||||||
tr:nth-child(even) {
|
tr:nth-child(even) {
|
||||||
background-color: var(--tr-even-background-color);
|
background-color: var(--tr-even-background-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.twitter-tweet {
|
||||||
|
color: var(--card-text-color-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-wrapper {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
& > iframe {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Negative margins
|
||||||
|
blockquote,
|
||||||
|
figure,
|
||||||
|
.gallery,
|
||||||
|
pre,
|
||||||
|
.video-wrapper,
|
||||||
|
.s_video_simple {
|
||||||
|
margin-left: calc((var(--card-padding)) * -1);
|
||||||
|
margin-right: calc((var(--card-padding)) * -1);
|
||||||
|
width: calc(100% + var(--card-padding) * 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
--sys-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Droid Sans", "Helvetica Neue";
|
--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";
|
--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);
|
--base-font-family: "Lato", var(--sys-font-family), var(--zh-font-family), sans-serif;
|
||||||
--code-font-family: Menlo, Monaco, Consolas, "Courier New";
|
--code-font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ class StackColorScheme {
|
|||||||
this.bindMatchMedia();
|
this.bindMatchMedia();
|
||||||
this.currentScheme = this.getSavedScheme();
|
this.currentScheme = this.getSavedScheme();
|
||||||
|
|
||||||
|
this.dispatchEvent(document.body.dataset.scheme as colorScheme);
|
||||||
|
|
||||||
if (toggleEl)
|
if (toggleEl)
|
||||||
this.bindClick(toggleEl);
|
this.bindClick(toggleEl);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
Vibrant:
|
||||||
|
- src: https://cdn.jsdelivr.net/npm/[email protected]/dist/vibrant.min.js
|
||||||
|
integrity: sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g=
|
||||||
|
type: script
|
||||||
|
|
||||||
|
PhotoSwipe:
|
||||||
|
- src: https://cdn.jsdelivr.net/npm/[email protected]/dist/photoswipe.min.js
|
||||||
|
integrity: sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=
|
||||||
|
type: script
|
||||||
|
defer: true
|
||||||
|
|
||||||
|
- src: https://cdn.jsdelivr.net/npm/[email protected]/dist/photoswipe-ui-default.min.js
|
||||||
|
integrity: sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU=
|
||||||
|
type: script
|
||||||
|
defer: true
|
||||||
|
|
||||||
|
- src: https://cdn.jsdelivr.net/npm/[email protected]/dist/default-skin/default-skin.css
|
||||||
|
integrity: sha256-c0uckgykQ9v5k+IqViZOZKc47Jn7KQil4/MP3ySA3F8=
|
||||||
|
type: style
|
||||||
|
|
||||||
|
- src: https://cdn.jsdelivr.net/npm/[email protected]/dist/photoswipe.css
|
||||||
|
integrity: sha256-SBLU4vv6CA6lHsZ1XyTdhyjJxCjPif/TRkjnsyGAGnE=
|
||||||
|
type: style
|
||||||
|
|
||||||
|
KaTeX:
|
||||||
|
- src: https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css
|
||||||
|
integrity: sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X
|
||||||
|
type: style
|
||||||
|
|
||||||
|
- src: https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js
|
||||||
|
integrity: sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4
|
||||||
|
type: script
|
||||||
|
defer: true
|
||||||
|
|
||||||
|
- src: https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js
|
||||||
|
integrity: sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa
|
||||||
|
type: script
|
||||||
|
defer: true
|
||||||
+13
-21
@@ -7,8 +7,11 @@ title: Example Site
|
|||||||
# Change it to your Disqus shortname before using
|
# Change it to your Disqus shortname before using
|
||||||
disqusShortname: hugo-theme-stack
|
disqusShortname: hugo-theme-stack
|
||||||
|
|
||||||
|
# GA Tracking ID
|
||||||
|
googleAnalytics:
|
||||||
|
|
||||||
# Theme i18n support
|
# Theme i18n support
|
||||||
# Available values: en, fr, id, ja, ko, pt-br, zh-cn
|
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de
|
||||||
DefaultContentLanguage: en
|
DefaultContentLanguage: en
|
||||||
|
|
||||||
permalinks:
|
permalinks:
|
||||||
@@ -46,11 +49,16 @@ params:
|
|||||||
comments:
|
comments:
|
||||||
enabled: true
|
enabled: true
|
||||||
provider: disqus
|
provider: disqus
|
||||||
|
|
||||||
utterances:
|
utterances:
|
||||||
repo:
|
repo:
|
||||||
issueTerm: pathname
|
issueTerm: pathname
|
||||||
label:
|
label:
|
||||||
theme: preferred-color-scheme
|
|
||||||
|
remark42:
|
||||||
|
host:
|
||||||
|
site:
|
||||||
|
locale:
|
||||||
|
|
||||||
widgets:
|
widgets:
|
||||||
enabled:
|
enabled:
|
||||||
@@ -60,7 +68,6 @@ params:
|
|||||||
|
|
||||||
archives:
|
archives:
|
||||||
limit: 5
|
limit: 5
|
||||||
path: archives
|
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
limit: 10
|
limit: 10
|
||||||
@@ -92,6 +99,9 @@ params:
|
|||||||
content:
|
content:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
### Custom menu
|
||||||
|
### See https://docs.stack.jimmycai.com/configuration/custom-menu
|
||||||
|
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
- identifier: home
|
- identifier: home
|
||||||
@@ -100,24 +110,6 @@ menu:
|
|||||||
weight: -100
|
weight: -100
|
||||||
pre: home
|
pre: home
|
||||||
|
|
||||||
- identifier: about
|
|
||||||
name: About
|
|
||||||
url: about
|
|
||||||
weight: -90
|
|
||||||
pre: user
|
|
||||||
|
|
||||||
- identifier: archives
|
|
||||||
name: Archives
|
|
||||||
url: archives
|
|
||||||
weight: -70
|
|
||||||
pre: archives
|
|
||||||
|
|
||||||
- identifier: search
|
|
||||||
name: Search
|
|
||||||
url: search
|
|
||||||
weight: -60
|
|
||||||
pre: search
|
|
||||||
|
|
||||||
related:
|
related:
|
||||||
includeNewer: true
|
includeNewer: true
|
||||||
threshold: 60
|
threshold: 60
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
+++
|
---
|
||||||
title = "About"
|
title: About
|
||||||
description = "Hugo, the world's fastest framework for building websites"
|
description: Hugo, the world's fastest framework for building websites
|
||||||
date = "2019-02-28"
|
date: '2019-02-28'
|
||||||
aliases = ["about-us", "about-hugo", "contact"]
|
aliases:
|
||||||
author = "Hugo Authors"
|
- about-us
|
||||||
license = "CC BY-NC-ND"
|
- about-hugo
|
||||||
lastmod = "2020-10-09"
|
- contact
|
||||||
+++
|
license: CC BY-NC-ND
|
||||||
|
lastmod: '2020-10-09'
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: -90
|
||||||
|
pre: user
|
||||||
|
---
|
||||||
|
|
||||||
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,8 @@ title: "Archives"
|
|||||||
date: 2019-05-28
|
date: 2019-05-28
|
||||||
layout: "archives"
|
layout: "archives"
|
||||||
slug: "archives"
|
slug: "archives"
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: -70
|
||||||
|
pre: archives
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -5,4 +5,8 @@ layout: "search"
|
|||||||
outputs:
|
outputs:
|
||||||
- html
|
- html
|
||||||
- json
|
- json
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
weight: -60
|
||||||
|
pre: search
|
||||||
---
|
---
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Menü umschalten
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Dunkler Modus
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} Seite"
|
||||||
|
other: "{{ .Count }} Seiten"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Abschnitt
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Unterabschnitt
|
||||||
|
other: Unterabschnitte
|
||||||
|
|
||||||
|
article:
|
||||||
|
relatedContents:
|
||||||
|
other: Verwandte Inhalte
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Zuletzt aktualisiert am
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Seite nicht gefunden
|
||||||
|
subtitle:
|
||||||
|
other: Diese Seite existiert nicht.
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Archiv
|
||||||
|
more:
|
||||||
|
other: Weitere
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Schlagwörter
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Suche
|
||||||
|
placeholder:
|
||||||
|
other: Etwas tippen...
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Erstellt mit {{ .Generator }}
|
||||||
|
designedBy:
|
||||||
|
other: Theme {{ .Theme }} gestaltet von {{ .DesignedBy }}
|
||||||
@@ -16,10 +16,6 @@ list:
|
|||||||
one: Subsection
|
one: Subsection
|
||||||
other: Subsections
|
other: Subsections
|
||||||
|
|
||||||
archives:
|
|
||||||
categories:
|
|
||||||
other: Categories
|
|
||||||
|
|
||||||
article:
|
article:
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: Related contents
|
other: Related contents
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Toggle Menu
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Modo oscuro
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} página"
|
||||||
|
other: "{{ .Count }} páginas"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Sección
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Subsección
|
||||||
|
other: Subsecciones
|
||||||
|
|
||||||
|
article:
|
||||||
|
relatedContents:
|
||||||
|
other: Contenidos relacionados
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Última vez actualizado
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: No Encontrado
|
||||||
|
subtitle:
|
||||||
|
other: Esta página no existe
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Archivo
|
||||||
|
more:
|
||||||
|
other: Más
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Etiquetas
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Búsqueda
|
||||||
|
placeholder:
|
||||||
|
other: Teclea algo...
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Creado con {{ .Generator }}
|
||||||
|
designedBy:
|
||||||
|
other: Tema {{ .Theme }} diseñado por {{ .DesignedBy }}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
toggleMenu:
|
toggleMenu:
|
||||||
other: メニューを開く・閉じる
|
other: メニューを開く・閉じる
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: ダークモード
|
||||||
|
|
||||||
article:
|
article:
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: 関連するコンテンツ
|
other: 関連するコンテンツ
|
||||||
@@ -22,3 +25,11 @@ widget:
|
|||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: タグ
|
other: タグ
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: サーチ
|
||||||
|
placeholder:
|
||||||
|
other: 入力...
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT 件 (#TIME_SECONDS 秒)"
|
||||||
|
|||||||
+14
-3
@@ -1,9 +1,20 @@
|
|||||||
toggleMenu:
|
toggleMenu:
|
||||||
other: Alternar Menu
|
other: Alternar Menu
|
||||||
|
|
||||||
archives:
|
darkMode:
|
||||||
categories:
|
other: Modo Escuro
|
||||||
other: Categorias
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} página"
|
||||||
|
other: "{{ .Count }} páginas"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Seção
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Subseção
|
||||||
|
other: Subseções
|
||||||
|
|
||||||
article:
|
article:
|
||||||
relatedContents:
|
relatedContents:
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Показать/скрыть меню
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Тёмный режим
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} страница"
|
||||||
|
few: "{{ .Count }} страницы"
|
||||||
|
many: "{{ .Count }} страниц"
|
||||||
|
other: "{{ .Count }} страниц"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Раздел
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Подраздел
|
||||||
|
few: Подразделы
|
||||||
|
many: Подразделы
|
||||||
|
other: Подразделы
|
||||||
|
|
||||||
|
article:
|
||||||
|
relatedContents:
|
||||||
|
other: Также рекомендуем
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Обновлено
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Не найдено
|
||||||
|
subtitle:
|
||||||
|
other: Запрашиваемая страница не существует
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Архивы
|
||||||
|
more:
|
||||||
|
other: Ещё
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Теги
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Поиск
|
||||||
|
placeholder:
|
||||||
|
other: Введите что-нибудь...
|
||||||
|
resultTitle:
|
||||||
|
other: "Найдено #PAGES_COUNT страниц (за #TIME_SECONDS с.)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Создано при помощи {{ .Generator }}
|
||||||
|
designedBy:
|
||||||
|
other: Тема {{ .Theme }}, дизайн {{ .DesignedBy }}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Menüyü Gizle
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Koyu Mod
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} makale"
|
||||||
|
other: "{{ .Count }} makale"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Bölüm
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Alt bölüm
|
||||||
|
other: Alt bölümler
|
||||||
|
|
||||||
|
article:
|
||||||
|
relatedContents:
|
||||||
|
other: Alakalı içerikler
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Son güncelleme
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Bulunamadı
|
||||||
|
subtitle:
|
||||||
|
other: Aradığınız sayfa mevcut değil.
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Arşiv
|
||||||
|
more:
|
||||||
|
other: Daha fazla
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Etiketler
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Arama
|
||||||
|
placeholder:
|
||||||
|
other: Birşeyler yazın...
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT sayfa (#TIME_SECONDS saniye)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: "{{ .Generator }} ile oluşturuldu."
|
||||||
|
designedBy:
|
||||||
|
other: "{{ .Theme }} teması {{ .DesignedBy }} tarafından tasarlandı"
|
||||||
@@ -4,10 +4,6 @@ toggleMenu:
|
|||||||
darkMode:
|
darkMode:
|
||||||
other: 暗色模式
|
other: 暗色模式
|
||||||
|
|
||||||
archives:
|
|
||||||
categories:
|
|
||||||
other: 分类
|
|
||||||
|
|
||||||
article:
|
article:
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: 相关文章
|
other: 相关文章
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
|
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
|
||||||
{{- if $image -}}
|
{{- if and $image (ne (path.Ext .Destination) ".svg") -}}
|
||||||
{{- $alt := .PlainText | safeHTML -}}
|
{{- $alt := .PlainText | safeHTML -}}
|
||||||
<figure style="flex-grow: {{ div (mul $image.Width 100) $image.Height }}; flex-basis: {{ div (mul $image.Width 240) $image.Height }}px">
|
<figure style="flex-grow: {{ div (mul $image.Width 100) $image.Height }}; flex-basis: {{ div (mul $image.Width 240) $image.Height }}px">
|
||||||
<a href="{{ $image.RelPermalink }}" data-size="{{ $image.Width }}x{{ $image.Height }}">
|
<a href="{{ $image.RelPermalink }}" data-size="{{ $image.Width }}x{{ $image.Height }}">
|
||||||
@@ -26,5 +26,5 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} />
|
<img src="{{ .Destination | relURL | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} />
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
{{ define "body-class" }}template-archives{{ end }}
|
{{ define "body-class" }}template-archives{{ end }}
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
|
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
|
||||||
{{ if $categories }}
|
{{- $terms := $taxonomy.Pages -}}
|
||||||
<h2 class="section-title">{{ T "archives.categories" }}</h2>
|
{{ if $terms }}
|
||||||
|
<h2 class="section-title">{{ $taxonomy.Title }}</h2>
|
||||||
<div class="subsection-list">
|
<div class="subsection-list">
|
||||||
<div class="article-list--tile">
|
<div class="article-list--tile">
|
||||||
{{ range $categories }}
|
{{ range $terms }}
|
||||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }}
|
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body class="{{ block `body-class` . }}{{ end }}">
|
<body class="{{ block `body-class` . }}{{ end }}">
|
||||||
{{- partial "head/colorScheme" . -}}
|
{{- partial "head/colorScheme" . -}}
|
||||||
<div class="container flex on-phone--column {{ if .Site.Params.widgets.enabled }}extended{{ else }}compact{{ end }} {{ block `container-class` . }}{{end}}">
|
<div class="container main-container flex on-phone--column {{ if .Site.Params.widgets.enabled }}extended{{ else }}compact{{ end }} {{ block `container-class` . }}{{end}}">
|
||||||
{{ partial "sidebar/left.html" . }}
|
{{ partial "sidebar/left.html" . }}
|
||||||
<main class="main full-width">
|
<main class="main full-width">
|
||||||
{{- block "main" . }}{{- end }}
|
{{- block "main" . }}{{- end }}
|
||||||
|
|||||||
@@ -42,8 +42,17 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ $subsections := .Sections }}
|
{{- $subsections := .Sections -}}
|
||||||
{{ with $subsections }}
|
{{- $pages := .Pages | complement $subsections -}}
|
||||||
|
|
||||||
|
{{- if eq (len $pages) 0 -}}
|
||||||
|
{{/* If there are no normal pages, display subsections in list style, with pagination */}}
|
||||||
|
{{/* This happens with taxonomies like categories or tags */}}
|
||||||
|
{{- $pages = $subsections -}}
|
||||||
|
{{- $subsections = slice -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- with $subsections -}}
|
||||||
<h2 class="section-title">{{ T "list.subsection" (len $subsections) }}</h2>
|
<h2 class="section-title">{{ T "list.subsection" (len $subsections) }}</h2>
|
||||||
<div class="subsection-list">
|
<div class="subsection-list">
|
||||||
<div class="article-list--tile">
|
<div class="article-list--tile">
|
||||||
@@ -52,10 +61,10 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
|
|
||||||
{{/* List only pages that are not a subsection */}}
|
{{/* List only pages that are not a subsection */}}
|
||||||
{{ $paginator := .Paginate (.Pages | complement $subsections) }}
|
{{ $paginator := .Paginate $pages }}
|
||||||
<section class="article-list--compact">
|
<section class="article-list--compact">
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
{{ partial "article-list/compact" . }}
|
{{ partial "article-list/compact" . }}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<input name="keyword" placeholder="{{ T `search.placeholder` }}" />
|
<input name="keyword" placeholder="{{ T `search.placeholder` }}" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<button title="Search">
|
<button title="{{ T `search.title` }}">
|
||||||
{{ partial "helper/icon" "search" }}
|
{{ partial "helper/icon" "search" }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -8,15 +8,17 @@
|
|||||||
{{- $data := dict "title" .Title "date" .Date "permalink" .Permalink "content" (.Plain) -}}
|
{{- $data := dict "title" .Title "date" .Date "permalink" .Permalink "content" (.Plain) -}}
|
||||||
|
|
||||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}}
|
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}}
|
||||||
{{- if and $image.exists $image.resource -}}
|
{{- if $image.exists -}}
|
||||||
{{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}}
|
{{- $imagePermalink := "" -}}
|
||||||
|
{{- if and $image.resource (default true .Page.Site.Params.imageProcessing.cover.enabled) -}}
|
||||||
{{- $thumbnail := $image.resource.Fill "120x120" -}}
|
{{- $thumbnail := $image.resource.Fill "120x120" -}}
|
||||||
{{- $image := dict "image" (absURL $thumbnail.Permalink) -}}
|
{{- $imagePermalink = (absURL $thumbnail.Permalink) -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $image := dict "image" (absURL $image.resource.Permalink) -}}
|
{{- $imagePermalink = $image.permalink -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $data = merge $data $image -}}
|
|
||||||
{{ end }}
|
{{- $data = merge $data (dict "image" (absURL $imagePermalink)) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- $result = $result | append $data -}}
|
{{- $result = $result | append $data -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
|
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
||||||
integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
|
<script>
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
|
window.addEventListener("DOMContentLoaded", () => {
|
||||||
integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4"
|
renderMathInElement(document.querySelector(`.article-content`), {
|
||||||
crossorigin="anonymous"></script>
|
delimiters: [
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
|
{ left: "$$", right: "$$", display: true },
|
||||||
integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
|
{ left: "$", right: "$", display: false },
|
||||||
onload="renderMathInElement(document.querySelector(`.article-content`));"></script>
|
{ left: "\\(", right: "\\)", display: false },
|
||||||
|
{ left: "\\[", right: "\\]", display: true }
|
||||||
|
]
|
||||||
|
});})
|
||||||
|
</script>
|
||||||
@@ -65,8 +65,4 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/photoswipe.min.js"></script>
|
{{- partial "helper/external" (dict "Context" . "Namespace" "PhotoSwipe") -}}
|
||||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/photoswipe-ui-default.min.js"></script>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/default-skin/default-skin.css">
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/photoswipe.css">
|
|
||||||
@@ -10,3 +10,13 @@
|
|||||||
padding: var(--card-padding);
|
padding: var(--card-padding);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.addEventListener('onColorSchemeChange', (e) => {
|
||||||
|
if (DISQUS) {
|
||||||
|
DISQUS.reset({
|
||||||
|
reload: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{{- with .Site.Params.comments.remark42 -}}
|
||||||
|
<div id="remark42"></div>
|
||||||
|
<script>
|
||||||
|
var remark_config = {
|
||||||
|
host: "{{ .host }}",
|
||||||
|
site_id: '{{ .site }}',
|
||||||
|
components: ['embed'],
|
||||||
|
url: "{{ $.Permalink }}",
|
||||||
|
max_shown_comments: {{ default 15 .max_shown_comments }},
|
||||||
|
theme: document.body.dataset.scheme,
|
||||||
|
page_title: '{{ $.Title }}',
|
||||||
|
locale: '{{ default "en" .locale }}',
|
||||||
|
show_email_subscription: {{ default true .show_email_subscription }}
|
||||||
|
};
|
||||||
|
|
||||||
|
(function (c) {
|
||||||
|
for (var i = 0; i < c.length; i++) {
|
||||||
|
var d = document, s = d.createElement('script');
|
||||||
|
s.src = remark_config.host + '/web/' + c[i] + '.js';
|
||||||
|
s.defer = true;
|
||||||
|
(d.head || d.body).appendChild(s);
|
||||||
|
}
|
||||||
|
})(remark_config.components || ['embed']);
|
||||||
|
|
||||||
|
window.addEventListener('onColorSchemeChange', (e) => {
|
||||||
|
window.REMARK42.changeTheme(e.detail);
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
{{- end -}}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<script src="https://utteranc.es/client.js"
|
<script src="https://utteranc.es/client.js"
|
||||||
repo="{{ .Site.Params.comments.utterances.repo }}"
|
repo="{{ .Site.Params.comments.utterances.repo }}"
|
||||||
issue-term="{{ .Site.Params.comments.utterances.issueTerm }}"
|
issue-term="{{ .Site.Params.comments.utterances.issueTerm }}"
|
||||||
theme="{{ .Site.Params.comments.utterances.theme }}"
|
|
||||||
{{ with .Site.Params.comments.utterances.label }}
|
{{ with .Site.Params.comments.utterances.label }}
|
||||||
label="{{ . }}"
|
label="{{ . }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
async>
|
async
|
||||||
|
>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -14,3 +14,27 @@
|
|||||||
max-width: unset;
|
max-width: unset;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function setUtterancesTheme(theme) {
|
||||||
|
let utterances = document.querySelector('.utterances iframe');
|
||||||
|
if (utterances) {
|
||||||
|
utterances.contentWindow.postMessage(
|
||||||
|
{
|
||||||
|
type: 'set-theme',
|
||||||
|
theme: `github-${theme}`
|
||||||
|
},
|
||||||
|
'https://utteranc.es'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
addEventListener('message', event => {
|
||||||
|
if (event.origin !== 'https://utteranc.es') return;
|
||||||
|
setUtterancesTheme(document.body.dataset.scheme)
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener('onColorSchemeChange', (e) => {
|
||||||
|
setUtterancesTheme(e.detail)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vibrant.min.js"
|
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
|
||||||
integrity="sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
{{- $opts := dict "minify" hugo.IsProduction -}}
|
{{- $opts := dict "minify" hugo.IsProduction -}}
|
||||||
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
|
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- $ThemeVersion := "2.0.0" -}}
|
{{- $ThemeVersion := "2.3.0" -}}
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<section class="copyright">
|
<section class="copyright">
|
||||||
©
|
©
|
||||||
|
|||||||
@@ -21,4 +21,5 @@
|
|||||||
<link rel="shortcut icon" href="{{ . }}" />
|
<link rel="shortcut icon" href="{{ . }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{- template "_internal/google_analytics_async.html" . -}}
|
||||||
{{- partial "head/custom.html" . -}}
|
{{- partial "head/custom.html" . -}}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{{- $List := index .Context.Site.Data.external .Namespace -}}
|
||||||
|
{{- with $List -}}
|
||||||
|
{{- range . -}}
|
||||||
|
{{- if eq .type "script" -}}
|
||||||
|
<script
|
||||||
|
src="{{ .src }}"
|
||||||
|
{{- with .integrity -}}
|
||||||
|
integrity="{{ . }}"
|
||||||
|
{{- end -}}
|
||||||
|
crossorigin="anonymous"
|
||||||
|
defer="{{ default false .defer }}"
|
||||||
|
>
|
||||||
|
</script>
|
||||||
|
{{- else if eq .type "style" -}}
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="{{ .src }}"
|
||||||
|
{{- with .integrity -}}
|
||||||
|
integrity="{{ . }}"
|
||||||
|
{{- end -}}
|
||||||
|
crossorigin="anonymous"
|
||||||
|
>
|
||||||
|
{{- else -}}
|
||||||
|
{{- errorf "Error: unknown external resource type: %s" .type -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- errorf "Error: external resource '%s' is not found" .Namespace -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -16,10 +16,14 @@
|
|||||||
{{ if $pageResourceImage }}
|
{{ if $pageResourceImage }}
|
||||||
<!-- If image is found under page bundle -->
|
<!-- If image is found under page bundle -->
|
||||||
{{ $result = merge $result (dict "permalink" $pageResourceImage.RelPermalink) }}
|
{{ $result = merge $result (dict "permalink" $pageResourceImage.RelPermalink) }}
|
||||||
{{ $result = merge $result (dict "resource" $pageResourceImage) }}
|
|
||||||
|
<!-- Disable SVG image processing, not supported by Hugo -->
|
||||||
|
{{ if ne (path.Ext $imageValue) ".svg" }}
|
||||||
|
{{ $result = merge $result (dict "resource" $pageResourceImage) }}
|
||||||
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<!-- Can not find the image under page bundle. Could be a relative linked image -->
|
<!-- Can not find the image under page bundle. Could be a relative linked image -->
|
||||||
{{ $result = merge $result (dict "permalink" $imageValue) }}
|
{{ $result = merge $result (dict "permalink" (relURL $imageValue)) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -47,7 +51,7 @@
|
|||||||
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<!-- External image -->
|
<!-- External image -->
|
||||||
{{ $result = merge $result (dict "permalink" $defaultImageSetting.src) }}
|
{{ $result = merge $result (dict "permalink" (relURL $defaultImageSetting.src)) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||||
|
|
||||||
<li {{ if $active }} class='current' {{ end }}>
|
<li {{ if $active }} class='current' {{ end }}>
|
||||||
<a href='{{ .URL | relURL }}'>
|
<a href='{{ .URL }}'>
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
{{ partial "helper/icon" .Pre }}
|
{{ partial "helper/icon" .Pre }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -1,27 +1,33 @@
|
|||||||
<section class="widget archives">
|
{{- $query := first 1 (where .Site.Pages "Layout" "==" "archives") -}}
|
||||||
<div class="widget-icon">
|
{{- if $query -}}
|
||||||
{{ partial "helper/icon" "infinity" }}
|
{{- $archivesPage := index $query 0 -}}
|
||||||
</div>
|
<section class="widget archives">
|
||||||
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
|
<div class="widget-icon">
|
||||||
|
{{ partial "helper/icon" "infinity" }}
|
||||||
|
</div>
|
||||||
|
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
|
||||||
|
|
||||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
{{ $filtered := ($pages | intersect $notHidden) }}
|
||||||
{{ $archives := $filtered.GroupByDate "2006" }}
|
{{ $archives := $filtered.GroupByDate "2006" }}
|
||||||
|
|
||||||
<div class="widget-archive--list">
|
<div class="widget-archive--list">
|
||||||
{{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }}
|
{{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }}
|
||||||
{{- $id := lower (replace $item.Key " " "-") -}}
|
{{- $id := lower (replace $item.Key " " "-") -}}
|
||||||
<div class="archives-year">
|
<div class="archives-year">
|
||||||
<a href="{{ $.Site.Params.widgets.archives.path | relLangURL }}#{{ $id }}">
|
<a href="{{ $archivesPage.RelPermalink }}#{{ $id }}">
|
||||||
{{ if eq $index $.Site.Params.widgets.archives.limit }}
|
{{ if eq $index $.Site.Params.widgets.archives.limit }}
|
||||||
<span class="year">{{ T "widget.archives.more" }}</span>
|
<span class="year">{{ T "widget.archives.more" }}</span>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<span class="year">{{ .Key }}</span>
|
<span class="year">{{ .Key }}</span>
|
||||||
<span class="count">{{ len $item.Pages }}</span>
|
<span class="count">{{ len $item.Pages }}</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
{{- else -}}
|
||||||
|
{{- warnf "Archives page not found. Create a page with layout: archives." -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -1,10 +1,16 @@
|
|||||||
<form action="/search" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
|
{{- $query := first 1 (where .Site.Pages "Layout" "==" "search") -}}
|
||||||
<p>
|
{{- if $query -}}
|
||||||
<label>{{ T "search.title" }}</label>
|
{{- $searchPage := index $query 0 -}}
|
||||||
<input name="keyword" required placeholder="{{ T `search.placeholder` }}" />
|
<form action="{{ $searchPage.RelPermalink }}" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
|
||||||
|
<p>
|
||||||
|
<label>{{ T "search.title" }}</label>
|
||||||
|
<input name="keyword" required placeholder="{{ T `search.placeholder` }}" />
|
||||||
|
|
||||||
<button title="Search">
|
<button title="{{ T `search.title` }}">
|
||||||
{{ partial "helper/icon" "search" }}
|
{{ partial "helper/icon" "search" }}
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
{{- else -}}
|
||||||
|
{{- warnf "Search page not found. Create a page with layout: search." -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{{ $vid := (.Get 0) }}
|
||||||
|
{{ $videopage := default 1 (.Get 1) }}
|
||||||
|
{{ $basicQuery := querify "page" $videopage "high_quality" 1 "as_wide" 1 }}
|
||||||
|
{{ $videoQuery := "" }}
|
||||||
|
|
||||||
|
{{ if strings.HasPrefix (lower $vid) "av" }}
|
||||||
|
{{ $videoQuery = querify "aid" (strings.TrimPrefix "av" (lower $vid)) }}
|
||||||
|
{{ else if strings.HasPrefix (lower $vid) "bv" }}
|
||||||
|
{{ $videoQuery = querify "bvid" $vid }}
|
||||||
|
{{ else }}
|
||||||
|
<p>Bilibili 视频av号或BV号错误!请检查视频av号或BV号是否正确</p>
|
||||||
|
<p>当前视频av或BV号:{{ $vid }},视频分P:{{ $videopage }}</p>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="video-wrapper">
|
||||||
|
<iframe src="//player.bilibili.com/player.html?{{ $basicQuery | safeURL }}&{{ $videoQuery | safeURL }}"
|
||||||
|
scrolling="no"
|
||||||
|
frameborder="no"
|
||||||
|
framespacing="0"
|
||||||
|
allowfullscreen="true"
|
||||||
|
>
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{{ $vid := .Get 0 }}
|
||||||
|
<div class="video-wrapper">
|
||||||
|
<iframe src="http://v.qq.com/txp/iframe/player.html?vid={{ $vid }}&auto=0"
|
||||||
|
scrolling="no"
|
||||||
|
frameborder="no"
|
||||||
|
framespacing="0"
|
||||||
|
allowfullscreen="true"
|
||||||
|
>
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
@@ -2,8 +2,12 @@
|
|||||||
{{- if not $pc.Disable -}}
|
{{- if not $pc.Disable -}}
|
||||||
{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
|
{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
|
||||||
{{- $id := .Get "id" | default (.Get 0) -}}
|
{{- $id := .Get "id" | default (.Get 0) -}}
|
||||||
{{- $class := .Get "class" | default (.Get 1) }}
|
<div class="video-wrapper">
|
||||||
<div {{ with $class }}class="{{ . }}"{{ else }}style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"{{ end }}>
|
<iframe loading="lazy"
|
||||||
<iframe loading="lazy" src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}" {{ if not $class }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" {{ end }}allowfullscreen title="YouTube Video"></iframe>
|
src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}"
|
||||||
|
allowfullscreen
|
||||||
|
title="YouTube Video"
|
||||||
|
>
|
||||||
|
</iframe>
|
||||||
</div>
|
</div>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user