Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1055adf498 | ||
|
|
24915a912f | ||
|
|
4a0cbac234 | ||
|
|
a052245f28 | ||
|
|
3b9e248bfd | ||
|
|
5539a42b30 | ||
|
|
61c021dae2 | ||
|
|
2fd3bde9a4 | ||
|
|
7b51bea912 | ||
|
|
5f1a5ab83f | ||
|
|
910d93b4ce | ||
|
|
99c4c89f0a | ||
|
|
8d0c65c374 | ||
|
|
d86b857635 | ||
|
|
44e3d20bad | ||
|
|
dcfc7b5589 | ||
|
|
a25e6463bd | ||
|
|
8cb11d721f | ||
|
|
99418f1056 | ||
|
|
230468d613 | ||
|
|
0afa502cdd | ||
|
|
90e7761967 | ||
|
|
5d1a7b8768 | ||
|
|
28ab0dd980 | ||
|
|
1857909fe4 | ||
|
|
b7d4048298 | ||
|
|
45a944412c | ||
|
|
1fa573dae3 | ||
|
|
ac18f600c1 | ||
|
|
46908815fc | ||
|
|
be2defe8fb | ||
|
|
94a14a4665 | ||
|
|
7ebe7e1af8 | ||
|
|
42eb1f5067 | ||
|
|
0c8643e458 |
@@ -9,9 +9,9 @@
|
||||
|
||||
[](https://app.netlify.com/sites/hugo-theme-stack/deploys)
|
||||
|
||||
## Documentation & more information
|
||||
## Documentation
|
||||
|
||||
[Documentation](https://docs.stack.jimmycai.com/) | [中文文档](https://docs.stack.jimmycai.com/v/zh-cn/)
|
||||
[Documentation](https://docs.stack.jimmycai.com/) | [中文文档](https://docs.stack.jimmycai.com/zh/)
|
||||
|
||||
## Introduction
|
||||
|
||||
@@ -31,18 +31,13 @@ Stack is a simple card-style Hugo theme designed for bloggers, some of its featu
|
||||
|
||||
## Requirements
|
||||
|
||||
It's necessary to use **Hugo ≥ 0.78.0**.
|
||||
|
||||
Use Hugo Extended version (recommended) if you want to:
|
||||
|
||||
* Use the latest feature/fix from `master` branch
|
||||
* Edit SCSS files
|
||||
|
||||
**Compiled CSS are updated once per release.**
|
||||
It's necessary to use **Hugo Extended ≥ 0.87.0**.
|
||||
|
||||
## Installation
|
||||
|
||||
Clone / Download this repository to `theme` folder, and edit your site config following `exampleSite/config.toml`.
|
||||
Clone / Download this repository to `theme` folder, and edit your site config following `exampleSite/config.yaml`.
|
||||
|
||||
*Note: Remove `config.toml` if there is one in the site folder.*
|
||||
|
||||
Check [documentation](https://docs.stack.jimmycai.com/) for more details.
|
||||
|
||||
@@ -64,13 +59,22 @@ Your support is greatly appreciated :)
|
||||
|
||||
## Thanks to
|
||||
|
||||
- [Vibrant-Colors/node-vibrant](https://github.com/Vibrant-Colors/node-vibrant)
|
||||
- [Normalize.css](https://necolas.github.io/normalize.css/)
|
||||
- [Tabler icons](https://tablericons.com/)
|
||||
- [Pure CSS implementation of Google Photos / 500px image layout](https://github.com/xieranmaya/blog/issues/6)
|
||||
- [jonsuh/hamburgers](https://github.com/jonsuh/hamburgers)
|
||||
- [PhotoSwipe](https://photoswipe.com/)
|
||||
- [artchen/hexo-theme-element](https://github.com/artchen/hexo-theme-element)
|
||||
- [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo)
|
||||
- [lepture/yue.css](https://github.com/lepture/yue.css)
|
||||
- Markdown gallery syntax from [Typlog](https://typlog.com/)
|
||||
| Project | Description | Licence |
|
||||
| ------- | ----------- | ------- |
|
||||
| [PhotoSwipe](https://photoswipe.com/) | For the lightbox effect | [MIT](https://github.com/dimsemenov/PhotoSwipe/blob/master/LICENSE) |
|
||||
| [Normalize.css](https://github.com/necolas/normalize.css) | - | [MIT](https://github.com/necolas/normalize.css/blob/master/LICENSE.md) |
|
||||
| [Node Vibrant](https://github.com/Vibrant-Colors/node-vibrant) | To extract the color from images | [MIT](https://github.com/Vibrant-Colors/node-vibrant/blob/master/LICENSE.md)
|
||||
| [Tabler icons](https://github.com/tabler/tabler-icons) | Default menu icons | [MIT](https://github.com/tabler/tabler-icons/blob/master/LICENSE) |
|
||||
| [jonsuh/hamburgers](https://github.com/jonsuh/hamburgers) | Hamburger icon of menu | [MIT](https://github.com/jonsuh/hamburgers/blob/master/LICENSE) |
|
||||
| [lepture/yue.css](https://github.com/lepture/yue.css) | Part of it is used for styling article content | MIT |
|
||||
| [Typlog](https://typlog.com/) | Where the markdown gallery syntax is borrowed from | The author gave me the permission |
|
||||
| [Pure CSS implementation of Google Photos / 500px image layout](https://github.com/xieranmaya/blog/issues/6) | Used for image gallery | - |
|
||||
|
||||
### References
|
||||
|
||||
Some references that I took while building this theme:
|
||||
|
||||
| Project | Licence|
|
||||
| ------- | ------|
|
||||
| [artchen/hexo-theme-element](https://github.com/artchen/hexo-theme-element) | [MIT](https://github.com/artchen/hexo-theme-element/blob/master/LICENSE) |
|
||||
| [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo) | [MIT](https://github.com/MunifTanjim/minimo/blob/master/LICENSE) |
|
||||
@@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z"/>
|
||||
<path d="M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4" />
|
||||
<circle cx="18" cy="18" r="4" />
|
||||
<path d="M15 3v4" />
|
||||
<path d="M7 3v4" />
|
||||
<path d="M3 11h16" />
|
||||
<path d="M18 16.496v1.504l1 1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 508 B |
@@ -95,7 +95,9 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--card-text-color-tertiary);
|
||||
gap: 15px;
|
||||
margin-top: 10px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
@@ -108,6 +110,11 @@
|
||||
time {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
& > div {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.article-category,
|
||||
|
||||
@@ -70,6 +70,12 @@
|
||||
flex-wrap: wrap;
|
||||
text-transform: unset;
|
||||
}
|
||||
|
||||
.article-copyright {
|
||||
a {
|
||||
color: var(--body-text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,6 +116,7 @@
|
||||
|
||||
span {
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,32 +191,40 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--card-text-color-main);
|
||||
overflow: hidden;
|
||||
|
||||
#TableOfContents {
|
||||
ol {
|
||||
counter-reset: item;
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
overflow-x: auto;
|
||||
max-height: 75vh;
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
& > li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
ol {
|
||||
list-style-type: none;
|
||||
counter-reset: item;
|
||||
|
||||
li:before {
|
||||
counter-increment: item;
|
||||
content: counters(item, ".") ". ";
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
& > ul {
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 15px 20px;
|
||||
padding: 5px;
|
||||
|
||||
&::before {
|
||||
counter-increment: item;
|
||||
content: counters(item, ".") ". ";
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
& > ol {
|
||||
& > ol,
|
||||
& > ul {
|
||||
margin-top: 10px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: -5px;
|
||||
@@ -378,7 +393,8 @@
|
||||
padding-bottom: 56.25%;
|
||||
overflow: hidden;
|
||||
|
||||
& > iframe {
|
||||
& > iframe,
|
||||
& > video {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -399,4 +415,30 @@
|
||||
margin-right: calc((var(--card-padding)) * -1);
|
||||
width: calc(100% + var(--card-padding) * 2);
|
||||
}
|
||||
|
||||
.highlight {
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
.copyCodeButton {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copyCodeButton {
|
||||
position: absolute;
|
||||
top: calc(var(--card-padding));
|
||||
right: 0;
|
||||
background: var(--card-background);
|
||||
border: none;
|
||||
box-shadow: var(--shadow-l2);
|
||||
border-radius: var(--tag-border-radius);
|
||||
padding: 8px 16px;
|
||||
color: var(--card-text-color-main);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,17 +127,17 @@
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 0;
|
||||
overflow-y: auto;
|
||||
flex-grow: 1;
|
||||
font-size: 1.4rem;
|
||||
|
||||
background-color: var(--card-background);
|
||||
margin-top: 0;
|
||||
padding: 15px 0;
|
||||
box-shadow: var(--shadow-l1);
|
||||
display: none;
|
||||
|
||||
margin: 0 -15px;
|
||||
|
||||
&.show {
|
||||
display: block;
|
||||
}
|
||||
@@ -148,6 +148,7 @@
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
margin: 0;
|
||||
margin-top: var(--sidebar-element-separation);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class StackColorScheme {
|
||||
localStorage.setItem(this.localStorageKey, this.currentScheme);
|
||||
}
|
||||
|
||||
private bindClick(toggleEl) {
|
||||
private bindClick(toggleEl: HTMLElement) {
|
||||
toggleEl.addEventListener('click', (e) => {
|
||||
if (this.isDark()) {
|
||||
/// Disable dark mode
|
||||
|
||||
@@ -54,6 +54,38 @@ let Stack = {
|
||||
observer.observe(articleTile)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add copy button to code block
|
||||
*/
|
||||
const codeBlocks = document.querySelectorAll('.article-content .highlight');
|
||||
const copyText = `Copy`,
|
||||
copiedText = `Copied!`;
|
||||
codeBlocks.forEach(codeBlock => {
|
||||
const copyButton = document.createElement('button');
|
||||
copyButton.innerHTML = copyText;
|
||||
copyButton.classList.add('copyCodeButton');
|
||||
codeBlock.appendChild(copyButton);
|
||||
|
||||
const pre = codeBlock.getElementsByTagName('pre');
|
||||
const code = pre[0].textContent;
|
||||
|
||||
copyButton.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(code)
|
||||
.then(() => {
|
||||
copyButton.textContent = copiedText;
|
||||
|
||||
setTimeout(() => {
|
||||
copyButton.textContent = copyText;
|
||||
}, 1000);
|
||||
})
|
||||
.catch(err => {
|
||||
alert(err)
|
||||
console.log('Something went wrong', err);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
new StackColorScheme(document.getElementById('dark-mode-toggle'));
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -23,16 +23,16 @@ PhotoSwipe:
|
||||
type: style
|
||||
|
||||
KaTeX:
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css
|
||||
integrity: sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css
|
||||
integrity: sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn
|
||||
type: style
|
||||
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js
|
||||
integrity: sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js
|
||||
integrity: sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8
|
||||
type: script
|
||||
defer: true
|
||||
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js
|
||||
integrity: sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa
|
||||
- src: https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js
|
||||
integrity: sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl
|
||||
type: script
|
||||
defer: true
|
||||
|
||||
+13
-1
@@ -11,7 +11,7 @@ disqusShortname: hugo-theme-stack
|
||||
googleAnalytics:
|
||||
|
||||
# Theme i18n support
|
||||
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl
|
||||
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, it
|
||||
DefaultContentLanguage: en
|
||||
|
||||
permalinks:
|
||||
@@ -37,12 +37,14 @@ params:
|
||||
emoji: 🍥
|
||||
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
avatar:
|
||||
enabled: true
|
||||
local: true
|
||||
src: img/avatar.png
|
||||
|
||||
article:
|
||||
math: false
|
||||
toc: true
|
||||
readingTime: true
|
||||
license:
|
||||
enabled: true
|
||||
default: Licensed under CC BY-NC-SA 4.0
|
||||
@@ -67,6 +69,7 @@ params:
|
||||
repo:
|
||||
clientId:
|
||||
clientSecret:
|
||||
autoCreateIssue: false
|
||||
|
||||
# Waline client configuration see: https://waline.js.org/en/reference/client.html
|
||||
waline:
|
||||
@@ -84,6 +87,12 @@ params:
|
||||
locale:
|
||||
admin: Admin
|
||||
|
||||
twikoo:
|
||||
envId:
|
||||
region:
|
||||
path:
|
||||
lang:
|
||||
|
||||
widgets:
|
||||
enabled:
|
||||
- search
|
||||
@@ -133,6 +142,9 @@ menu:
|
||||
url: /
|
||||
weight: -100
|
||||
pre: home
|
||||
params:
|
||||
### For demonstration purpose, the home link will be open in a new tab
|
||||
newTab: true
|
||||
|
||||
related:
|
||||
includeNewer: true
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
> Original Repo: https://github.com/cdeleeuwe/netlify-plugin-hugo-cache-resources
|
||||
>
|
||||
# Netlify Build Plugin: Persist Hugo resources Between Builds
|
||||
|
||||
Persist [Hugo](https://gohugo.io/) resources folder between Netlify builds for huge build speed improvements! ⚡️
|
||||
|
||||
This plugin caches the `resources` folder after build. If you are processing many images, this would improve build duration significantly.
|
||||
|
||||
Note: Restoring cache only comes from the production branch. So once cache is saved on the production branch, the next preview build would use the cache. For example, when pushing to the same preview build, the latest preview build will not get the cache from the previous preview build, but will get it from master.
|
||||
|
||||
## Usage
|
||||
|
||||
To install, add the following lines to your `netlify.toml` file:
|
||||
|
||||
```toml
|
||||
[build]
|
||||
publish = "public"
|
||||
|
||||
[[plugins]]
|
||||
package = "netlify-plugin-hugo-cache-resources"
|
||||
|
||||
[plugins.inputs]
|
||||
# If it should show more verbose logs (optional, default = true)
|
||||
debug = true
|
||||
```
|
||||
|
||||
Note: The `[[plugins]]` line is required for each plugin, even if you have other plugins in your `netlify.toml` file already.
|
||||
@@ -1,39 +0,0 @@
|
||||
const getResourcesDir = () => {
|
||||
return 'exampleSite/resources';
|
||||
}
|
||||
|
||||
const printList = (items) => {
|
||||
console.log('---');
|
||||
items.forEach((item, index) => {
|
||||
console.log(`${index + 1}. ${item}`);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
async onPreBuild({ utils, inputs }) {
|
||||
const path = getResourcesDir();
|
||||
const success = await utils.cache.restore(path);
|
||||
|
||||
if (success) {
|
||||
const cachedFiles = await utils.cache.list(path);
|
||||
console.log(`Restored cached resources folder. Total files: ${cachedFiles.length}`);
|
||||
if (inputs.debug) printList(cachedFiles);
|
||||
} else {
|
||||
console.log(`No cache found for resources folder`);
|
||||
}
|
||||
},
|
||||
|
||||
async onPostBuild({ utils, inputs }) {
|
||||
const path = getResourcesDir();
|
||||
const success = await utils.cache.save(path);
|
||||
|
||||
if (success) {
|
||||
const cachedFiles = await utils.cache.list(path);
|
||||
console.log(`Saved resources folder to cache. Total files: ${cachedFiles.length}`);
|
||||
if (inputs.debug) printList(cachedFiles);
|
||||
} else {
|
||||
console.log(`No resources folder cached`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
name: netlify-plugin-hugo-cache
|
||||
inputs:
|
||||
- name: debug
|
||||
description: Show more verbose logs
|
||||
default: true
|
||||
@@ -29,6 +29,11 @@ article:
|
||||
lastUpdatedOn:
|
||||
other: Last updated on
|
||||
|
||||
readingTime:
|
||||
one: "{{ .Count }} min read"
|
||||
### Seems that there's no need to add 's' even if it's plural in English
|
||||
other: "{{ .Count }} min read"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Not Found
|
||||
|
||||
@@ -1,9 +1,31 @@
|
||||
toggleMenu:
|
||||
other: Afficher le menu
|
||||
|
||||
darkMode:
|
||||
other: Mode sombre
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} page"
|
||||
other: "{{ .Count }} pages"
|
||||
|
||||
section:
|
||||
other: Section
|
||||
|
||||
subsection:
|
||||
one: Sous-section
|
||||
other: Sous-sections
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Retour
|
||||
|
||||
tableOfContents:
|
||||
other: Table des matières
|
||||
|
||||
relatedContents:
|
||||
other: Contenus liés
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Dernière mise à jour le
|
||||
|
||||
@@ -17,8 +39,10 @@ widget:
|
||||
archives:
|
||||
title:
|
||||
other: Archives
|
||||
|
||||
more:
|
||||
other: Autres
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Mots clés
|
||||
@@ -26,13 +50,16 @@ widget:
|
||||
search:
|
||||
title:
|
||||
other: Rechercher
|
||||
|
||||
placeholder:
|
||||
other: Cherchez un article, une publication, etc.
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT pages (#TIME_SECONDS secondes)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Généré avec {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Thème {{ .Theme }} conçu par {{ .DesignedBy }}
|
||||
|
||||
+33
-2
@@ -1,24 +1,52 @@
|
||||
toggleMenu:
|
||||
other: Tampilkan Menu
|
||||
|
||||
darkMode:
|
||||
other: Mode Gelap
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} halaman"
|
||||
other: "{{ .Count }} halaman"
|
||||
|
||||
section:
|
||||
other: Bagian
|
||||
|
||||
subsection:
|
||||
one: Subbagian
|
||||
other: Subbagian
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Kembali
|
||||
|
||||
tableOfContents:
|
||||
other: Daftar Isi
|
||||
|
||||
relatedContents:
|
||||
other: Konten terkait
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Terakhir diperbarui pada
|
||||
|
||||
readingTime:
|
||||
one: "Waktu Membaca: {{ .Count }} menit"
|
||||
other: "Waktu Membaca: {{ .Count }} menit"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Not Found
|
||||
other: Tidak ditemukan
|
||||
subtitle:
|
||||
other: Halaman ini tidak ada.
|
||||
other: Halaman yang Anda akses tidak ditemukan.
|
||||
|
||||
widget:
|
||||
archives:
|
||||
title:
|
||||
other: Arsip
|
||||
|
||||
more:
|
||||
other: Lebih
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Tag
|
||||
@@ -26,13 +54,16 @@ widget:
|
||||
search:
|
||||
title:
|
||||
other: Cari
|
||||
|
||||
placeholder:
|
||||
other: Ketik sesuatu...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT halaman (#TIME_SECONDS detik)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Dibangun dengan {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Tema {{ .Theme }} dirancang oleh {{ .DesignedBy }}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
toggleMenu:
|
||||
other: Toggle Menu
|
||||
|
||||
darkMode:
|
||||
other: Dark Mode
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} pagina"
|
||||
other: "{{ .Count }} pagine"
|
||||
|
||||
section:
|
||||
other: Sezione
|
||||
|
||||
subsection:
|
||||
one: Sottosezione
|
||||
other: Sottosezioni
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Indietro
|
||||
|
||||
tableOfContents:
|
||||
other: Indice
|
||||
|
||||
relatedContents:
|
||||
other: Contenuti correlati
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Aggiornato il
|
||||
|
||||
readingTime:
|
||||
one: "{{ .Count }} min per leggere"
|
||||
other: "{{ .Count }} min per leggere"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Non trovato
|
||||
subtitle:
|
||||
other: Questa pagina non esiste.
|
||||
|
||||
widget:
|
||||
archives:
|
||||
title:
|
||||
other: Archivi
|
||||
|
||||
more:
|
||||
other: Di più
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Tags
|
||||
|
||||
search:
|
||||
title:
|
||||
other: Cerca
|
||||
|
||||
placeholder:
|
||||
other: Scrivi qualcosa...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT pagine (#TIME_SECONDS secondi)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Realizzato con {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Tema {{ .Theme }} realizzato da {{ .DesignedBy }}
|
||||
@@ -5,11 +5,21 @@ darkMode:
|
||||
other: ダークモード
|
||||
|
||||
article:
|
||||
back:
|
||||
other: 前のページ
|
||||
|
||||
tableOfContents:
|
||||
other: 目次
|
||||
|
||||
relatedContents:
|
||||
other: 関連するコンテンツ
|
||||
|
||||
lastUpdatedOn:
|
||||
other: 最終更新
|
||||
|
||||
readingTime:
|
||||
other: "読了時間: {{ .Count }}分"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: 404 Not Found
|
||||
@@ -20,8 +30,10 @@ widget:
|
||||
archives:
|
||||
title:
|
||||
other: アーカイブ
|
||||
|
||||
more:
|
||||
other: さらに見る
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: タグ
|
||||
@@ -29,7 +41,9 @@ widget:
|
||||
search:
|
||||
title:
|
||||
other: 検索
|
||||
|
||||
placeholder:
|
||||
other: 入力...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT 件 (#TIME_SECONDS 秒)"
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
toggleMenu:
|
||||
other: Przełącz Menu
|
||||
|
||||
darkMode:
|
||||
other: Tryb ciemny
|
||||
|
||||
list:
|
||||
page:
|
||||
one: "{{ .Count }} strona"
|
||||
other: "{{ .Count }} stron"
|
||||
|
||||
section:
|
||||
other: Sekcja
|
||||
|
||||
subsection:
|
||||
one: Podsekcja
|
||||
other: Podsekcje
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Wróć
|
||||
|
||||
tableOfContents:
|
||||
other: Spis treści
|
||||
|
||||
relatedContents:
|
||||
other: Powiązane artykuły
|
||||
|
||||
lastUpdatedOn:
|
||||
other: Ostatnio zaktualizowany
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: Nie znaleziono
|
||||
subtitle:
|
||||
other: Ta strona nie istnieje
|
||||
|
||||
widget:
|
||||
archives:
|
||||
title:
|
||||
other: Archiwum
|
||||
|
||||
more:
|
||||
other: Więcej
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: Tagi
|
||||
|
||||
search:
|
||||
title:
|
||||
other: Szukaj
|
||||
|
||||
placeholder:
|
||||
other: Wpisz coś...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT stron (#TIME_SECONDS sekund)"
|
||||
|
||||
footer:
|
||||
builtWith:
|
||||
other: Zbudowano z {{ .Generator }}
|
||||
|
||||
designedBy:
|
||||
other: Motyw {{ .Theme }} zaprojektowany przez {{ .DesignedBy }}
|
||||
@@ -21,10 +21,14 @@ list:
|
||||
other: Подразделы
|
||||
|
||||
article:
|
||||
back:
|
||||
other: Назад
|
||||
relatedContents:
|
||||
other: Также рекомендуем
|
||||
lastUpdatedOn:
|
||||
other: Обновлено
|
||||
tableOfContents:
|
||||
other: Содержание
|
||||
|
||||
notFound:
|
||||
title:
|
||||
|
||||
@@ -5,11 +5,21 @@ darkMode:
|
||||
other: 暗色模式
|
||||
|
||||
article:
|
||||
back:
|
||||
other: 返回
|
||||
|
||||
tableOfContents:
|
||||
other: 目录
|
||||
|
||||
relatedContents:
|
||||
other: 相关文章
|
||||
|
||||
lastUpdatedOn:
|
||||
other: 最后更新于
|
||||
|
||||
readingTime:
|
||||
other: "阅读时长: {{ .Count }} 分钟"
|
||||
|
||||
notFound:
|
||||
title:
|
||||
other: 404 错误
|
||||
@@ -20,8 +30,10 @@ widget:
|
||||
archives:
|
||||
title:
|
||||
other: 归档
|
||||
|
||||
more:
|
||||
other: 更多
|
||||
|
||||
tagCloud:
|
||||
title:
|
||||
other: 标签云
|
||||
@@ -29,7 +41,9 @@ widget:
|
||||
search:
|
||||
title:
|
||||
other: 搜索
|
||||
|
||||
placeholder:
|
||||
other: 输入关键词...
|
||||
|
||||
resultTitle:
|
||||
other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)"
|
||||
|
||||
@@ -21,12 +21,25 @@
|
||||
</h3>
|
||||
{{ end }}
|
||||
|
||||
{{- if not .Date.IsZero -}}
|
||||
{{ if or (not .Date.IsZero) (.Site.Params.article.readingTime) }}
|
||||
<footer class="article-time">
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<time class="article-time--published">
|
||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
{{ if not .Date.IsZero }}
|
||||
<div>
|
||||
{{ partial "helper/icon" "date" }}
|
||||
<time class="article-time--published">
|
||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.article.readingTime }}
|
||||
<div>
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<time class="article-time--reading">
|
||||
{{ T "article.readingTime" .ReadingTime }}
|
||||
</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
</footer>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -4,7 +4,7 @@
|
||||
{{ if and (.Site.Params.article.license.enabled) (not (eq .Params.license false)) }}
|
||||
<section class="article-copyright">
|
||||
{{ partial "helper/icon" "copyright" }}
|
||||
<span>{{ default .Site.Params.article.license.default .Params.license }}</span>
|
||||
<span>{{ default .Site.Params.article.license.default .Params.license | markdownify }}</span>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
</span>
|
||||
</section>
|
||||
{{- end -}}
|
||||
</footer>
|
||||
</footer>
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<script src="//cdn.jsdelivr.net/npm/twikoo@1.4.3/dist/twikoo.all.min.js"></script>
|
||||
<div id="tcomment"></div>
|
||||
<style>
|
||||
.twikoo {
|
||||
background-color: var(--card-background);
|
||||
border-radius: var(--card-border-radius);
|
||||
box-shadow: var(--shadow-l1);
|
||||
padding: var(--card-padding);
|
||||
}
|
||||
:root[data-scheme="dark"] {
|
||||
--twikoo-body-text-color-main: rgba(255, 255, 255, 0.9);
|
||||
--twikoo-body-text-color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
.twikoo .el-input-group__prepend,
|
||||
.twikoo .tk-action-icon,
|
||||
.twikoo .tk-time,
|
||||
.twikoo .tk-comments-count {
|
||||
color: var(--twikoo-body-text-color);
|
||||
}
|
||||
.twikoo .el-input__inner,
|
||||
.twikoo .el-textarea__inner,
|
||||
.twikoo .tk-preview-container,
|
||||
.twikoo .tk-content,
|
||||
.twikoo .tk-nick,
|
||||
.twikoo .tk-send {
|
||||
color: var(--twikoo-body-text-color-main);
|
||||
}
|
||||
.twikoo .el-button{
|
||||
color: var(--twikoo-body-text-color)!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
{{- with .Site.Params.comments.twikoo -}}
|
||||
<script>
|
||||
twikoo.init({
|
||||
envId: '{{- .envId -}}',
|
||||
el: '#tcomment',
|
||||
{{- with .region -}}
|
||||
region: '{{- . -}}',
|
||||
{{- end -}}
|
||||
{{- with .path -}}
|
||||
path: '{{- . -}}',
|
||||
{{- end -}}
|
||||
{{- with .lang -}}
|
||||
lang: '{{- . -}}',
|
||||
{{- end -}}
|
||||
})
|
||||
</script>
|
||||
{{- end -}}
|
||||
@@ -14,7 +14,7 @@
|
||||
props: {
|
||||
title: "{{ $.Title }}",
|
||||
options: {
|
||||
proxy: (url) => "https://cors-anywhere.azm.workers.dev/" + url,
|
||||
autoCreateIssue: {{ default false .autoCreateIssue }},
|
||||
owner: "{{ .owner }}",
|
||||
repo: "{{ .repo }}",
|
||||
clientId: "{{ .clientId }}",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- $ThemeVersion := "2.4.0" -}}
|
||||
{{- $ThemeVersion := "3.0.0" -}}
|
||||
<footer class="site-footer">
|
||||
<section class="copyright">
|
||||
©
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
<header class="site-info">
|
||||
{{ with .Site.Params.sidebar.avatar }}
|
||||
{{ if (default true .enabled) }}
|
||||
<figure class="site-avatar">
|
||||
{{ if not .local }}
|
||||
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
||||
@@ -26,6 +27,7 @@
|
||||
<span class="emoji">{{ . }}</span>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
||||
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
||||
@@ -37,7 +39,7 @@
|
||||
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||
|
||||
<li {{ if $active }} class='current' {{ end }}>
|
||||
<a href='{{ .URL }}'>
|
||||
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||
{{ if .Pre }}
|
||||
{{ partial "helper/icon" .Pre }}
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="video-wrapper">
|
||||
<video
|
||||
controls
|
||||
{{ with .Get "poster" }}poster="{{- . -}}"{{ end }}
|
||||
{{ with .Get "src" }}src="{{- . -}}"{{ end }}
|
||||
{{ with .Get "autoplay" }}autoplay{{ end }}
|
||||
>
|
||||
<p>
|
||||
Your browser doesn't support HTML5 video. Here is a
|
||||
<a href="{{ with .Get "src" }}{{- . -}}{{ end }}">link to the video</a> instead.
|
||||
</p>
|
||||
</video>
|
||||
</div>
|
||||
+8
-2
@@ -2,7 +2,7 @@
|
||||
publish = "exampleSite/public"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.79.0"
|
||||
HUGO_VERSION = "0.87.0"
|
||||
HUGO_THEME = "repo"
|
||||
|
||||
[context.production]
|
||||
@@ -17,4 +17,10 @@
|
||||
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}"
|
||||
|
||||
[[plugins]]
|
||||
package = "/exampleSite/plugins/netlify-plugin-hugo-cache-resources"
|
||||
package = "netlify-plugin-hugo-cache-resources"
|
||||
|
||||
[plugins.inputs]
|
||||
# If it should show more verbose logs (optional, default = true)
|
||||
debug = true
|
||||
# Relative path to source directory in case you use Hugo's "--s" option
|
||||
srcdir = "exampleSite"
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"Target":"scss/style.min.css","MediaType":"text/css","Data":{}}
|
||||
+12
-12
@@ -5,23 +5,23 @@ name = "Stack"
|
||||
license = "GPL-3.0-only"
|
||||
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
||||
description = "Card-style Hugo theme designed for bloggers"
|
||||
homepage = "https://theme-stack.jimmycai.com"
|
||||
tags = [
|
||||
"blog",
|
||||
"responsive",
|
||||
"clean",
|
||||
"light",
|
||||
"dark",
|
||||
"personal"
|
||||
]
|
||||
homepage = "https://github.com/CaiJimmy/hugo-theme-stack"
|
||||
demosite = "https://theme-stack.jimmycai.com"
|
||||
|
||||
tags = ["blog", "responsive", "clean", "light", "dark", "personal"]
|
||||
|
||||
features = [
|
||||
"disqus",
|
||||
"photoswipe",
|
||||
"opengraph",
|
||||
"widgets"
|
||||
"widgets",
|
||||
"darkmode",
|
||||
"table of contents",
|
||||
"search",
|
||||
]
|
||||
|
||||
min_version = "0.78.0"
|
||||
|
||||
[author]
|
||||
name = "Jimmy Cai"
|
||||
homepage = "https://jimmycai.com"
|
||||
name = "Jimmy Cai"
|
||||
homepage = "https://jimmycai.com"
|
||||
|
||||
Reference in New Issue
Block a user