Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1fa573dae3 | ||
|
|
ac18f600c1 | ||
|
|
46908815fc | ||
|
|
be2defe8fb | ||
|
|
94a14a4665 | ||
|
|
7ebe7e1af8 | ||
|
|
42eb1f5067 | ||
|
|
0c8643e458 | ||
|
|
70615246c5 | ||
|
|
41fa65cbf5 | ||
|
|
dda55f87e2 | ||
|
|
495a3b0289 | ||
|
|
028ae12ea5 | ||
|
|
ed4a1bc56e | ||
|
|
58e8fadafe | ||
|
|
2c0bf8c940 | ||
|
|
159cc30570 | ||
|
|
45b16a0bb4 | ||
|
|
325303a7f8 | ||
|
|
7dab67b358 | ||
|
|
80bd7689a2 | ||
|
|
2bd9bc4f7d | ||
|
|
b10d028ca9 | ||
|
|
1300e0d714 | ||
|
|
5d004786d6 | ||
|
|
87fad5fd81 | ||
|
|
21a5834a2f | ||
|
|
3e8490da1d | ||
|
|
9befda7310 | ||
|
|
d5268a41e0 | ||
|
|
38eb9c4eaf | ||
|
|
e61bca1dbd | ||
|
|
96db925b06 | ||
|
|
0429678d57 | ||
|
|
cef9fe2549 | ||
|
|
21b42f0b6c | ||
|
|
79412144d9 | ||
|
|
79d8c1db38 |
@@ -7,32 +7,39 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Describe the bug**
|
<!--
|
||||||
|
Before creating this bug report, make sure you have read the theme documentation: https://docs.stack.jimmycai.com/
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Describe the bug
|
||||||
A clear and concise description of what the bug is.
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
**To Reproduce**
|
## Expected behavior
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
**Screenshots**
|
## To Reproduce
|
||||||
If applicable, add screenshots to help explain your problem.
|
Indicate the steps to reproduce this bug, if applicable.
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
Add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
- **Hugo version** [e.g: 0.80.0]:
|
||||||
|
- **Hugo extended?**: Yes / No
|
||||||
|
|
||||||
|
## Additional context
|
||||||
|
Add any other context about the problem here.
|
||||||
|
|
||||||
|
If it's a UI issue, fill the following information:
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
|
||||||
- OS: [e.g. iOS]
|
- OS: [e.g. iOS]
|
||||||
- Browser [e.g. chrome, safari]
|
- Browser [e.g. chrome, safari]
|
||||||
- Version [e.g. 22]
|
- Version [e.g. 22]
|
||||||
|
|
||||||
**Smartphone (please complete the following information):**
|
## Content of config.yaml
|
||||||
- Device: [e.g. iPhone6]
|
```yaml
|
||||||
- OS: [e.g. iOS8.1]
|
### Paste the content of the config file here
|
||||||
- Browser [e.g. stock browser, safari]
|
```
|
||||||
- Version [e.g. 22]
|
|
||||||
|
|
||||||
**Additional context**
|
## Link to the demo site and/or source repository
|
||||||
Add any other context about the problem here.
|
|
||||||
|
|||||||
@@ -39,4 +39,6 @@ jobs:
|
|||||||
# Artifact name
|
# Artifact name
|
||||||
name: resources
|
name: resources
|
||||||
# A file, directory or wildcard pattern that describes what to upload
|
# A file, directory or wildcard pattern that describes what to upload
|
||||||
path: exampleSite/resources
|
path: |
|
||||||
|
exampleSite/resources
|
||||||
|
!exampleSite/resources/_gen/images
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
## Documentation & more information
|
## Documentation & more information
|
||||||
|
|
||||||
[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
|
## Introduction
|
||||||
|
|
||||||
@@ -27,6 +27,7 @@ Stack is a simple card-style Hugo theme designed for bloggers, some of its featu
|
|||||||
- No CSS framework, keep it simple and minimal
|
- No CSS framework, keep it simple and minimal
|
||||||
- Properly cropped thumbnails
|
- Properly cropped thumbnails
|
||||||
- Subsection support
|
- Subsection support
|
||||||
|
- Table of contents
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
---
|
||||||
@@ -1,4 +1,17 @@
|
|||||||
$on-phone: 812px;
|
$breakpoints: (
|
||||||
$on-tablet: 1024px;
|
sm: 640px,
|
||||||
$on-desktop: 1519px;
|
md: 768px,
|
||||||
$on-desktop-large: 1920px;
|
lg: 1024px,
|
||||||
|
xl: 1280px,
|
||||||
|
2xl: 1536px,
|
||||||
|
);
|
||||||
|
|
||||||
|
@mixin respond($breakpoint) {
|
||||||
|
@if not map-has-key($breakpoints, $breakpoint) {
|
||||||
|
@warn "'#{$breakpoint}' is not a valid breakpoint";
|
||||||
|
} @else {
|
||||||
|
@media (min-width: map-get($breakpoints, $breakpoint)) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+42
-50
@@ -2,67 +2,52 @@
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
|
||||||
|
.left-sidebar {
|
||||||
|
max-width: var(--left-sidebar-max-width);
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-sidebar {
|
||||||
|
max-width: var(--right-sidebar-max-width);
|
||||||
|
|
||||||
|
/// Display right sidebar when min-width: lg
|
||||||
|
@include respond(lg) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.extended {
|
&.extended {
|
||||||
@media (min-width: $on-phone) {
|
@include respond(md) {
|
||||||
max-width: 800px;
|
max-width: 1024px;
|
||||||
|
--left-sidebar-max-width: 25%;
|
||||||
.left-sidebar {
|
--right-sidebar-max-width: 30%;
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $on-tablet) {
|
@include respond(lg) {
|
||||||
max-width: 972px;
|
max-width: 1280px;
|
||||||
|
--left-sidebar-max-width: 20%;
|
||||||
.right-sidebar {
|
--right-sidebar-max-width: 30%;
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $on-desktop) {
|
@include respond(xl) {
|
||||||
max-width: 1200px;
|
|
||||||
|
|
||||||
.left-sidebar {
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right-sidebar {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-desktop-large) {
|
|
||||||
max-width: 1536px;
|
max-width: 1536px;
|
||||||
|
--left-sidebar-max-width: 15%;
|
||||||
.left-sidebar {
|
--right-sidebar-max-width: 25%;
|
||||||
width: 15%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.compact {
|
&.compact {
|
||||||
@media (min-width: $on-phone) {
|
@include respond(md) {
|
||||||
max-width: 800px;
|
--left-sidebar-max-width: 25%;
|
||||||
|
max-width: 768px;
|
||||||
.left-sidebar {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $on-tablet) {
|
@include respond(lg) {
|
||||||
max-width: 972px;
|
max-width: 1024px;
|
||||||
|
--left-sidebar-max-width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $on-desktop) {
|
@include respond(xl) {
|
||||||
max-width: 1050px;
|
max-width: 1280px;
|
||||||
|
|
||||||
.left-sidebar {
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-desktop-large) {
|
|
||||||
max-width: 1300px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,8 +61,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.on-phone--column {
|
&.on-phone--column {
|
||||||
@media (max-width: $on-phone) {
|
flex-direction: column;
|
||||||
flex-direction: column;
|
@include respond(md) {
|
||||||
|
flex-direction: unset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +92,6 @@
|
|||||||
|
|
||||||
main.main {
|
main.main {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding: 0 15px;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
padding-top: var(--main-top-padding);
|
padding-top: var(--main-top-padding);
|
||||||
@@ -114,4 +99,11 @@ main.main {
|
|||||||
|
|
||||||
.main-container {
|
.main-container {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 0 15px;
|
||||||
|
column-gap: var(--section-separation);
|
||||||
|
|
||||||
|
@include respond(md) {
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -24,14 +24,14 @@
|
|||||||
.article-image {
|
.article-image {
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200px;
|
height: 150px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
|
||||||
@media (max-width: $on-tablet) {
|
@include respond(md) {
|
||||||
height: 150px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $on-desktop-large) {
|
@include respond(xl) {
|
||||||
height: 250px;
|
height: 250px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
color: var(--card-text-color-main);
|
color: var(--card-text-color-main);
|
||||||
font-size: 2.2rem;
|
font-size: 2.2rem;
|
||||||
|
|
||||||
@media (min-width: $on-desktop-large) {
|
@include respond(xl) {
|
||||||
font-size: 2.4rem;
|
font-size: 2.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
|
||||||
font-size: 1.75rem;
|
font-size: 1.75rem;
|
||||||
@media (min-width: $on-desktop-large) {
|
@include respond(xl) {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,10 +135,10 @@
|
|||||||
border-radius: var(--card-border-radius);
|
border-radius: var(--card-border-radius);
|
||||||
box-shadow: var(--shadow-l1);
|
box-shadow: var(--shadow-l1);
|
||||||
background-color: var(--card-background);
|
background-color: var(--card-background);
|
||||||
--image-size: 60px;
|
--image-size: 50px;
|
||||||
|
|
||||||
@media (max-width: $on-tablet) {
|
@include respond(md) {
|
||||||
--image-size: 50px;
|
--image-size: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
& + .pagination {
|
& + .pagination {
|
||||||
@@ -165,10 +165,10 @@
|
|||||||
|
|
||||||
.article-title {
|
.article-title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 1.8rem;
|
font-size: 1.6rem;
|
||||||
|
|
||||||
@media (max-width: $on-tablet) {
|
@include respond(md) {
|
||||||
font-size: 1.6rem;
|
font-size: 1.8rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,20 +242,20 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
padding: 20px;
|
padding: 15px;
|
||||||
|
|
||||||
@media (max-width: $on-phone) {
|
@include respond(sm) {
|
||||||
padding: 15px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-title {
|
.article-title {
|
||||||
font-size: 2.2rem;
|
font-size: 2rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--card-text-color-main);
|
color: var(--card-text-color-main);
|
||||||
|
|
||||||
@media (max-width: $on-phone) {
|
@include respond(sm) {
|
||||||
font-size: 2rem;
|
font-size: 2.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
html {
|
html {
|
||||||
font-size: 62.5%;
|
font-size: 62.5%;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
@@ -15,3 +16,24 @@ body {
|
|||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* scrollbar styles for Firefox */
|
||||||
|
* {
|
||||||
|
scrollbar-width: auto;
|
||||||
|
scrollbar-color: var(--scrollbar-thumb) transparent;
|
||||||
|
}
|
||||||
|
/**/
|
||||||
|
|
||||||
|
/* scrollbar styles for Chromium */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background-color: var(--scrollbar-thumb);
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
/**/
|
||||||
|
|||||||
@@ -1,45 +1,9 @@
|
|||||||
@import "variables.scss";
|
|
||||||
|
|
||||||
.keep-sidebar {
|
|
||||||
@media (min-width: $on-phone) and (max-width: $on-tablet) {
|
|
||||||
--main-top-padding: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.article-page {
|
.article-page {
|
||||||
&.with-toolbar {
|
&.hide-sidebar-sm .left-sidebar {
|
||||||
@media (max-width: $on-tablet) {
|
display: none;
|
||||||
--main-top-padding: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(.keep-sidebar) .left-sidebar {
|
@include respond(md) {
|
||||||
@media (max-width: $on-tablet) {
|
display: inherit;
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.article-sidebar {
|
|
||||||
position: sticky;
|
|
||||||
top: 50px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
@media (max-width: $on-tablet) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-tablet) {
|
|
||||||
padding-left: 15px;
|
|
||||||
margin-left: 1%;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-tablet) {
|
|
||||||
width: 25%;
|
|
||||||
margin-right: 1%;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-desktop) {
|
|
||||||
width: 30%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,12 +77,9 @@
|
|||||||
#article-toolbar {
|
#article-toolbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin: 20px 0;
|
||||||
|
|
||||||
@media (max-width: $on-tablet) {
|
@include respond(md) {
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-tablet) {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,6 +110,115 @@
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-page.has-toc {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
|
||||||
|
.left-sidebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-sidebar {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
@include respond(xl) {
|
||||||
|
display: block;
|
||||||
|
top: var(--main-top-padding);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#article-toolbar {
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
@include respond(md) {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond(xl) {
|
||||||
|
margin-top: 0;
|
||||||
|
position: sticky;
|
||||||
|
top: var(--main-top-padding);
|
||||||
|
flex-shrink: 1;
|
||||||
|
|
||||||
|
a {
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
border: 1px solid var(--body-text-color);
|
||||||
|
width: 100%;
|
||||||
|
margin-right: 0;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-container {
|
||||||
|
align-items: start;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
@include respond(xl) {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
padding-top: 0;
|
||||||
|
|
||||||
|
@include respond(xl) {
|
||||||
|
padding-top: var(--main-top-padding);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget--toc {
|
||||||
|
background-color: var(--card-background);
|
||||||
|
border-radius: var(--card-border-radius);
|
||||||
|
box-shadow: var(--shadow-l1);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
color: var(--card-text-color-main);
|
||||||
|
|
||||||
|
#TableOfContents {
|
||||||
|
ol {
|
||||||
|
counter-reset: item;
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > li {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin: 15px 20px;
|
||||||
|
padding: 5px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
counter-increment: item;
|
||||||
|
content: counters(item, ".") ". ";
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > ol {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-left: 10px;
|
||||||
|
margin-bottom: -5px;
|
||||||
|
|
||||||
|
& > li:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,11 +259,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 +272,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 +288,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;
|
||||||
@@ -251,7 +316,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;
|
||||||
@@ -281,9 +346,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;
|
||||||
@@ -308,4 +371,33 @@
|
|||||||
.twitter-tweet {
|
.twitter-tweet {
|
||||||
color: var(--card-text-color-main);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,9 +106,10 @@
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
@media (min-width: $on-phone + 1) {
|
@include respond(md) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
||||||
&.is-active {
|
&.is-active {
|
||||||
@@ -126,67 +127,58 @@
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-top: var(--sidebar-element-separation);
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
font-size: 1.5rem;
|
font-size: 1.4rem;
|
||||||
|
|
||||||
@media (min-width: $on-desktop-large) {
|
background-color: var(--card-background);
|
||||||
margin-top: 30px;
|
margin-top: 0;
|
||||||
|
padding: 15px 0;
|
||||||
|
box-shadow: var(--shadow-l1);
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $on-phone) {
|
@include respond(md) {
|
||||||
background-color: var(--card-background);
|
|
||||||
margin-top: 0;
|
|
||||||
padding: 15px 0;
|
|
||||||
box-shadow: var(--shadow-l1);
|
|
||||||
display: none;
|
|
||||||
|
|
||||||
&.show {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-phone + 1) {
|
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
display: flex;
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
margin-top: var(--sidebar-element-separation);
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond(xl) {
|
||||||
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
position: relative;
|
position: relative;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 10px 0;
|
padding: 10px 30px;
|
||||||
|
|
||||||
&:not(:last-of-type) {
|
&:not(:last-of-type) {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
|
||||||
@media (min-width: $on-desktop-large) {
|
@include respond(xl) {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $on-phone) {
|
@include respond(md) {
|
||||||
padding: 10px 30px;
|
width: 100%;
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-phone + 1) and (max-width: ($on-desktop - 1)) {
|
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $on-phone + 1) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
stroke-width: 1.33;
|
stroke-width: 1.33;
|
||||||
margin-right: 40px;
|
margin-right: 40px;
|
||||||
|
|
||||||
@media (max-width: $on-desktop-large) {
|
width: 20px;
|
||||||
width: 20px;
|
height: 20px;
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@@ -194,10 +186,6 @@
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: var(--body-text-color);
|
color: var(--body-text-color);
|
||||||
|
|
||||||
@media (max-width: $on-desktop-large) {
|
|
||||||
font-size: 1.4rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
.sidebar {
|
.sidebar {
|
||||||
padding: 0 15px;
|
|
||||||
&.sticky {
|
&.sticky {
|
||||||
@media (min-width: ($on-phone + 1)) {
|
@include respond(md) {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,45 +10,41 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
align-self: stretch;
|
||||||
|
|
||||||
--sidebar-avatar-size: 150px;
|
width: 100%;
|
||||||
--sidebar-element-separation: 25px;
|
padding: 30px 0 15px 0;
|
||||||
|
max-width: none;
|
||||||
|
|
||||||
@media (max-width: $on-desktop-large) {
|
--sidebar-avatar-size: 120px;
|
||||||
--sidebar-avatar-size: 120px;
|
--sidebar-element-separation: 20px;
|
||||||
--sidebar-element-separation: 20px;
|
|
||||||
|
@include respond(md) {
|
||||||
|
width: auto;
|
||||||
|
padding-top: var(--main-top-padding);
|
||||||
|
padding-bottom: var(--main-top-padding);
|
||||||
|
max-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $on-phone) {
|
@include respond(2xl) {
|
||||||
width: 100%;
|
--sidebar-avatar-size: 140px;
|
||||||
padding: 30px 0;
|
--sidebar-element-separation: 25px;
|
||||||
max-width: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.sticky {
|
&.sticky {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $on-phone + 1) {
|
|
||||||
margin-right: 1%;
|
|
||||||
padding: var(--main-top-padding) 15px;
|
|
||||||
max-height: 100vh;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-sidebar {
|
.right-sidebar {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
display: none;
|
||||||
|
|
||||||
&.sticky {
|
&.sticky {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $on-desktop - 1) {
|
@include respond(lg) {
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $on-tablet) {
|
|
||||||
margin-left: 1%;
|
|
||||||
padding-top: var(--main-top-padding);
|
padding-top: var(--main-top-padding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,8 +53,10 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
transition: box-shadow 0.5s ease;
|
transition: box-shadow 0.5s ease;
|
||||||
|
|
||||||
@media (max-width: $on-phone) {
|
padding: 15px;
|
||||||
padding: 15px 30px;
|
|
||||||
|
@include respond(md) {
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-avatar {
|
.site-avatar {
|
||||||
@@ -79,9 +76,9 @@
|
|||||||
|
|
||||||
.emoji {
|
.emoji {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 50px;
|
width: 40px;
|
||||||
height: 50px;
|
height: 40px;
|
||||||
line-height: 50px;
|
line-height: 40px;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -90,20 +87,20 @@
|
|||||||
background-color: var(--card-background);
|
background-color: var(--card-background);
|
||||||
box-shadow: var(--shadow-l2);
|
box-shadow: var(--shadow-l2);
|
||||||
|
|
||||||
@media (max-width: $on-desktop-large) {
|
@include respond(2xl) {
|
||||||
width: 40px;
|
width: 50px;
|
||||||
height: 40px;
|
height: 50px;
|
||||||
line-height: 40px;
|
line-height: 50px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-name {
|
.site-name {
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
font-size: 2.4rem;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
|
||||||
@media (max-width: $on-desktop-large) {
|
@include respond(2xl) {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,10 +109,10 @@
|
|||||||
color: var(--body-text-color);
|
color: var(--body-text-color);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
font-size: 1.8rem;
|
font-size: 1.6rem;
|
||||||
|
|
||||||
@media (max-width: $on-desktop-large) {
|
@include respond(2xl) {
|
||||||
font-size: 1.6rem;
|
font-size: 1.8rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-15
@@ -17,11 +17,11 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
* Global style
|
* Global style
|
||||||
*/
|
*/
|
||||||
:root {
|
:root {
|
||||||
@media (min-width: $on-phone + 1) {
|
@include respond(md) {
|
||||||
--main-top-padding: 35px;
|
--main-top-padding: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $on-desktop-large) {
|
@include respond(xl) {
|
||||||
--main-top-padding: 50px;
|
--main-top-padding: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,12 +36,17 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
|
|
||||||
--section-separation: 40px;
|
--section-separation: 40px;
|
||||||
|
|
||||||
[data-scheme="dark"] {
|
--scrollbar-thumb: hsl(0, 0%, 85%);
|
||||||
|
--scrollbar-track: var(--body-background);
|
||||||
|
|
||||||
|
&[data-scheme="dark"] {
|
||||||
--body-background: #303030;
|
--body-background: #303030;
|
||||||
--accent-color: #ecf0f1;
|
--accent-color: #ecf0f1;
|
||||||
--accent-color-darker: #bdc3c7;
|
--accent-color-darker: #bdc3c7;
|
||||||
--accent-color-text: #000;
|
--accent-color-text: #000;
|
||||||
--body-text-color: rgba(255, 255, 255, 0.7);
|
--body-text-color: rgba(255, 255, 255, 0.7);
|
||||||
|
--scrollbar-thumb: #424242;
|
||||||
|
--scrollbar-track: var(--body-background);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,20 +75,23 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
|
|
||||||
--card-border-radius: 10px;
|
--card-border-radius: 10px;
|
||||||
|
|
||||||
--card-padding: 30px;
|
--card-padding: 20px;
|
||||||
@media (max-width: $on-desktop-large) {
|
|
||||||
|
@include respond(md) {
|
||||||
--card-padding: 25px;
|
--card-padding: 25px;
|
||||||
}
|
}
|
||||||
@media (max-width: $on-tablet) {
|
|
||||||
--card-padding: 20px;
|
@include respond(xl) {
|
||||||
|
--card-padding: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
--small-card-padding: 25px;
|
--small-card-padding: 25px 20px;
|
||||||
@media (max-width: $on-tablet) {
|
|
||||||
--small-card-padding: 25px 20px;
|
@include respond(md) {
|
||||||
|
--small-card-padding: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-scheme="dark"] {
|
&[data-scheme="dark"] {
|
||||||
--card-background: #424242;
|
--card-background: #424242;
|
||||||
--card-background-selected: rgba(255, 255, 255, 0.16);
|
--card-background-selected: rgba(255, 255, 255, 0.16);
|
||||||
--card-text-color-main: rgba(255, 255, 255, 0.9);
|
--card-text-color-main: rgba(255, 255, 255, 0.9);
|
||||||
@@ -98,10 +106,12 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
*/
|
*/
|
||||||
:root {
|
:root {
|
||||||
--article-font-family: var(--base-font-family);
|
--article-font-family: var(--base-font-family);
|
||||||
--article-font-size: 1.7rem;
|
--article-font-size: 1.6rem;
|
||||||
@media (max-width: $on-tablet) {
|
|
||||||
--article-font-size: 1.6rem;
|
@include respond(md) {
|
||||||
|
--article-font-size: 1.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
--article-line-height: 1.85;
|
--article-line-height: 1.85;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +137,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
--table-border-color: #dadada;
|
--table-border-color: #dadada;
|
||||||
--tr-even-background-color: #efefee;
|
--tr-even-background-color: #efefee;
|
||||||
|
|
||||||
[data-scheme="dark"] {
|
&[data-scheme="dark"] {
|
||||||
--code-background-color: #272822;
|
--code-background-color: #272822;
|
||||||
--code-text-color: rgba(255, 255, 255, 0.9);
|
--code-text-color: rgba(255, 255, 255, 0.9);
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class StackColorScheme {
|
|||||||
this.bindMatchMedia();
|
this.bindMatchMedia();
|
||||||
this.currentScheme = this.getSavedScheme();
|
this.currentScheme = this.getSavedScheme();
|
||||||
|
|
||||||
this.dispatchEvent(document.body.dataset.scheme as colorScheme);
|
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);
|
||||||
|
|
||||||
if (toggleEl)
|
if (toggleEl)
|
||||||
this.bindClick(toggleEl);
|
this.bindClick(toggleEl);
|
||||||
@@ -22,7 +22,7 @@ class StackColorScheme {
|
|||||||
localStorage.setItem(this.localStorageKey, this.currentScheme);
|
localStorage.setItem(this.localStorageKey, this.currentScheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bindClick(toggleEl) {
|
private bindClick(toggleEl: HTMLElement) {
|
||||||
toggleEl.addEventListener('click', (e) => {
|
toggleEl.addEventListener('click', (e) => {
|
||||||
if (this.isDark()) {
|
if (this.isDark()) {
|
||||||
/// Disable dark mode
|
/// Disable dark mode
|
||||||
@@ -56,13 +56,13 @@ class StackColorScheme {
|
|||||||
|
|
||||||
private setBodyClass() {
|
private setBodyClass() {
|
||||||
if (this.isDark()) {
|
if (this.isDark()) {
|
||||||
document.body.dataset.scheme = 'dark';
|
document.documentElement.dataset.scheme = 'dark';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.body.dataset.scheme = 'light';
|
document.documentElement.dataset.scheme = 'light';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dispatchEvent(document.body.dataset.scheme as colorScheme);
|
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
private getSavedScheme(): colorScheme {
|
private getSavedScheme(): colorScheme {
|
||||||
|
|||||||
+38
-19
@@ -11,7 +11,7 @@ disqusShortname: hugo-theme-stack
|
|||||||
googleAnalytics:
|
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, nl
|
||||||
DefaultContentLanguage: en
|
DefaultContentLanguage: en
|
||||||
|
|
||||||
permalinks:
|
permalinks:
|
||||||
@@ -42,6 +42,7 @@ params:
|
|||||||
|
|
||||||
article:
|
article:
|
||||||
math: false
|
math: false
|
||||||
|
toc: true
|
||||||
license:
|
license:
|
||||||
enabled: true
|
enabled: true
|
||||||
default: Licensed under CC BY-NC-SA 4.0
|
default: Licensed under CC BY-NC-SA 4.0
|
||||||
@@ -49,11 +50,40 @@ params:
|
|||||||
comments:
|
comments:
|
||||||
enabled: true
|
enabled: true
|
||||||
provider: disqus
|
provider: disqus
|
||||||
|
|
||||||
utterances:
|
utterances:
|
||||||
repo:
|
repo:
|
||||||
issueTerm: pathname
|
issueTerm: pathname
|
||||||
label:
|
label:
|
||||||
|
|
||||||
|
remark42:
|
||||||
|
host:
|
||||||
|
site:
|
||||||
|
locale:
|
||||||
|
|
||||||
|
vssue:
|
||||||
|
platform:
|
||||||
|
owner:
|
||||||
|
repo:
|
||||||
|
clientId:
|
||||||
|
clientSecret:
|
||||||
|
|
||||||
|
# Waline client configuration see: https://waline.js.org/en/reference/client.html
|
||||||
|
waline:
|
||||||
|
serverURL:
|
||||||
|
lang:
|
||||||
|
visitor:
|
||||||
|
avatar:
|
||||||
|
emoji:
|
||||||
|
- https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo
|
||||||
|
requiredMeta:
|
||||||
|
- name
|
||||||
|
- email
|
||||||
|
- url
|
||||||
|
placeholder:
|
||||||
|
locale:
|
||||||
|
admin: Admin
|
||||||
|
|
||||||
widgets:
|
widgets:
|
||||||
enabled:
|
enabled:
|
||||||
- search
|
- search
|
||||||
@@ -93,6 +123,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
|
||||||
@@ -101,24 +134,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
|
||||||
@@ -131,5 +146,9 @@ related:
|
|||||||
weight: 200
|
weight: 200
|
||||||
|
|
||||||
markup:
|
markup:
|
||||||
|
tableOfContents:
|
||||||
|
endLevel: 4
|
||||||
|
ordered: true
|
||||||
|
startLevel: 2
|
||||||
highlight:
|
highlight:
|
||||||
noClasses: false
|
noClasses: false
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "Test"
|
title: "Test"
|
||||||
description: "This is a example category"
|
description: "This is an example category"
|
||||||
slug: "test"
|
slug: "test"
|
||||||
image: "hutomo-abrianto-l2jk-uxb1BY-unsplash.jpg"
|
image: "hutomo-abrianto-l2jk-uxb1BY-unsplash.jpg"
|
||||||
style:
|
style:
|
||||||
|
|||||||
@@ -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 }}
|
||||||
@@ -17,8 +17,15 @@ list:
|
|||||||
other: Subsections
|
other: Subsections
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: Back
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Table of contents
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: Related contents
|
other: Related contents
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: Last updated on
|
other: Last updated on
|
||||||
|
|
||||||
@@ -32,8 +39,10 @@ widget:
|
|||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: Archives
|
other: Archives
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: More
|
other: More
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Tags
|
other: Tags
|
||||||
@@ -41,13 +50,16 @@ widget:
|
|||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: Search
|
other: Search
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: Type something...
|
other: Type something...
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)"
|
other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)"
|
||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: Built with {{ .Generator }}
|
other: Built with {{ .Generator }}
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: Theme {{ .Theme }} designed by {{ .DesignedBy }}
|
other: Theme {{ .Theme }} designed by {{ .DesignedBy }}
|
||||||
|
|||||||
@@ -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 }}
|
||||||
+12
-1
@@ -5,8 +5,15 @@ darkMode:
|
|||||||
other: ダークモード
|
other: ダークモード
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: 前のページ
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: 目次
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: 関連するコンテンツ
|
other: 関連するコンテンツ
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: 最終更新
|
other: 最終更新
|
||||||
|
|
||||||
@@ -20,16 +27,20 @@ widget:
|
|||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: アーカイブ
|
other: アーカイブ
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: さらに見る
|
other: さらに見る
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: タグ
|
other: タグ
|
||||||
|
|
||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: サーチ
|
other: 検索
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: 入力...
|
other: 入力...
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT 件 (#TIME_SECONDS 秒)"
|
other: "#PAGES_COUNT 件 (#TIME_SECONDS 秒)"
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Open Menu
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Donkere modus
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} pagina"
|
||||||
|
other: "{{ .Count }} pagina's"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Sectie
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Subsectie
|
||||||
|
other: Subsecties
|
||||||
|
|
||||||
|
article:
|
||||||
|
relatedContents:
|
||||||
|
other: Gerelateerde inhoud
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Laatst bijgewerkt op
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Niet gevonden
|
||||||
|
subtitle:
|
||||||
|
other: Deze pagina bestaat niet.
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Archief
|
||||||
|
more:
|
||||||
|
other: Meer
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Tags
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Zoeken
|
||||||
|
placeholder:
|
||||||
|
other: Typ iets
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT pagina's (#TIME_SECONDS seconden)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Gemaakt met {{ .Generator }}
|
||||||
|
designedBy:
|
||||||
|
other: Theme {{ .Theme }} ontworpen door {{ .DesignedBy }}
|
||||||
@@ -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 }}
|
||||||
@@ -5,8 +5,15 @@ darkMode:
|
|||||||
other: 暗色模式
|
other: 暗色模式
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: 返回
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: 目录
|
||||||
|
|
||||||
relatedContents:
|
relatedContents:
|
||||||
other: 相关文章
|
other: 相关文章
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: 最后更新于
|
other: 最后更新于
|
||||||
|
|
||||||
@@ -20,8 +27,10 @@ widget:
|
|||||||
archives:
|
archives:
|
||||||
title:
|
title:
|
||||||
other: 归档
|
other: 归档
|
||||||
|
|
||||||
more:
|
more:
|
||||||
other: 更多
|
other: 更多
|
||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: 标签云
|
other: 标签云
|
||||||
@@ -29,7 +38,9 @@ widget:
|
|||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
other: 搜索
|
other: 搜索
|
||||||
|
|
||||||
placeholder:
|
placeholder:
|
||||||
other: 输入关键词...
|
other: 输入关键词...
|
||||||
|
|
||||||
resultTitle:
|
resultTitle:
|
||||||
other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)"
|
other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)"
|
||||||
|
|||||||
@@ -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 -}}
|
||||||
@@ -6,8 +6,10 @@
|
|||||||
</head>
|
</head>
|
||||||
<body class="{{ block `body-class` . }}{{ end }}">
|
<body class="{{ block `body-class` . }}{{ end }}">
|
||||||
{{- partial "head/colorScheme" . -}}
|
{{- partial "head/colorScheme" . -}}
|
||||||
<div class="container main-container flex on-phone--column {{ if .Site.Params.widgets.enabled }}extended{{ else }}compact{{ end }} {{ block `container-class` . }}{{end}}">
|
<div class="container main-container flex {{ block `container-class` . }}on-phone--column {{ if .Site.Params.widgets.enabled }}extended{{ else }}compact{{ end }}{{ end }}">
|
||||||
{{ partial "sidebar/left.html" . }}
|
{{- block "left-sidebar" . -}}
|
||||||
|
{{ partial "sidebar/left.html" . }}
|
||||||
|
{{- end -}}
|
||||||
<main class="main full-width">
|
<main class="main full-width">
|
||||||
{{- block "main" . }}{{- end }}
|
{{- block "main" . }}{{- end }}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -1,7 +1,22 @@
|
|||||||
{{ define "body-class" }}article-page keep-sidebar{{ end }}
|
{{ define "body-class" }}
|
||||||
|
{{ $TOCEnabled := default (default false .Site.Params.article.toc) .Params.toc }}
|
||||||
|
{{- .Scratch.Set "hasTOC" (and (ge (len .TableOfContents) 100) $TOCEnabled) -}}
|
||||||
|
article-page {{ if (.Scratch.Get "hasTOC") }}has-toc{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "container-class" }}
|
||||||
|
{{ if (.Scratch.Get "hasTOC") }}
|
||||||
|
extended
|
||||||
|
{{ else }}
|
||||||
|
on-phone--column {{ if .Site.Params.widgets.enabled }}extended{{ else }}compact{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ partial "article/article.html" . }}
|
{{ partial "article/article.html" . }}
|
||||||
|
|
||||||
|
{{ partial "article/components/related-contents" . }}
|
||||||
|
|
||||||
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
||||||
{{ partial "comments/include" . }}
|
{{ partial "comments/include" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -10,3 +25,33 @@
|
|||||||
|
|
||||||
{{ partialCached "article/components/photoswipe" . }}
|
{{ partialCached "article/components/photoswipe" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "left-sidebar" }}
|
||||||
|
{{ if (.Scratch.Get "hasTOC") }}
|
||||||
|
<div id="article-toolbar">
|
||||||
|
<a href="{{ .Site.BaseURL }}" class="back-home">
|
||||||
|
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
|
||||||
|
<span>{{ T "article.back" }}</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
{{ partial "sidebar/left.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "right-sidebar" }}
|
||||||
|
{{ if (.Scratch.Get "hasTOC") }}
|
||||||
|
<aside class="sidebar right-sidebar sticky">
|
||||||
|
<section class="widget archives">
|
||||||
|
<div class="widget-icon">
|
||||||
|
{{ partial "helper/icon" "hash" }}
|
||||||
|
</div>
|
||||||
|
<h2 class="widget-title section-title">{{ T "article.tableOfContents" }}</h2>
|
||||||
|
|
||||||
|
<div class="widget--toc">
|
||||||
|
{{ .TableOfContents }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</aside>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
@@ -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.documentElement.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 -}}
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
addEventListener('message', event => {
|
addEventListener('message', event => {
|
||||||
if (event.origin !== 'https://utteranc.es') return;
|
if (event.origin !== 'https://utteranc.es') return;
|
||||||
setUtterancesTheme(document.body.dataset.scheme)
|
setUtterancesTheme(document.documentElement.dataset.scheme)
|
||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener('onColorSchemeChange', (e) => {
|
window.addEventListener('onColorSchemeChange', (e) => {
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{{- with .Site.Params.comments.vssue -}}
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/vssue/dist/vssue.min.css" />
|
||||||
|
|
||||||
|
<div id="vssue"></div>
|
||||||
|
|
||||||
|
<script src="https://unpkg.com/vue/dist/vue.runtime.min.js"></script>
|
||||||
|
<script src="https://unpkg.com/vssue/dist/vssue.{{ .platform }}.min.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: "#vssue",
|
||||||
|
render: (h) =>
|
||||||
|
h("Vssue", {
|
||||||
|
props: {
|
||||||
|
title: "{{ $.Title }}",
|
||||||
|
options: {
|
||||||
|
proxy: (url) => "https://cors-anywhere.azm.workers.dev/" + url,
|
||||||
|
owner: "{{ .owner }}",
|
||||||
|
repo: "{{ .repo }}",
|
||||||
|
clientId: "{{ .clientId }}",
|
||||||
|
clientSecret: "{{ .clientSecret }}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<script src='//cdn.jsdelivr.net/npm/@waline/client/dist/Waline.min.js'></script>
|
||||||
|
<div id="waline" class="waline-container"></div>
|
||||||
|
<style>
|
||||||
|
.waline-container {
|
||||||
|
background-color: var(--card-background);
|
||||||
|
border-radius: var(--card-border-radius);
|
||||||
|
box-shadow: var(--shadow-l1);
|
||||||
|
padding: var(--card-padding);
|
||||||
|
}
|
||||||
|
.waline-container .vcount {
|
||||||
|
color: var(--card-text-color-main);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
{{- with .Site.Params.comments.waline -}}
|
||||||
|
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
|
||||||
|
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "avatarcdn" "avatarCDN" "avatarforce" "avatarForce" -}}
|
||||||
|
|
||||||
|
{{- range $key, $val := . -}}
|
||||||
|
{{- if $val -}}
|
||||||
|
{{- $replaceKey := index $replaceKeys $key -}}
|
||||||
|
{{- $k := default $key $replaceKey -}}
|
||||||
|
|
||||||
|
{{- $config = merge $config (dict $k $val) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/// Waline client configuration see: https://waline.js.org/en/reference/client.html
|
||||||
|
new Waline({{ $config | jsonify | safeJS }});
|
||||||
|
</script>
|
||||||
|
{{- end -}}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- $ThemeVersion := "2.1.0" -}}
|
{{- $ThemeVersion := "2.5.0" -}}
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<section class="copyright">
|
<section class="copyright">
|
||||||
©
|
©
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
* 1. If dark mode is set already (in local storage)
|
* 1. If dark mode is set already (in local storage)
|
||||||
* 2. Auto mode & prefere color scheme is dark
|
* 2. Auto mode & prefere color scheme is dark
|
||||||
*/
|
*/
|
||||||
document.body.dataset.scheme = 'dark';
|
document.documentElement.dataset.scheme = 'dark';
|
||||||
} else {
|
} else {
|
||||||
document.body.dataset.scheme = 'light';
|
document.documentElement.dataset.scheme = 'light';
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
@@ -21,5 +21,5 @@
|
|||||||
<link rel="shortcut icon" href="{{ . }}" />
|
<link rel="shortcut icon" href="{{ . }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- template "_internal/google_analytics_async.html" . -}}
|
{{- template "_internal/google_analytics.html" . -}}
|
||||||
{{- partial "head/custom.html" . -}}
|
{{- partial "head/custom.html" . -}}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{{- with .Site.Params.opengraph.twitter.site -}}
|
{{- with .Site.Params.opengraph.twitter.site -}}
|
||||||
<meta name="twitter:site" content="{{ . }}">
|
<meta name="twitter:site" content="@{{ . }}">
|
||||||
|
<meta name="twitter:creator" content="@{{ . }}">
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{{ $url := urls.Parse $imageValue }}
|
{{ $url := urls.Parse $imageValue }}
|
||||||
|
|
||||||
{{ if or (eq $url.Scheme "http") (eq $url.Scheme "https") }}
|
{{ if or (eq $url.Scheme "http") (eq $url.Scheme "https") }}
|
||||||
<!-- Is a external image -->
|
<!-- Is an external image -->
|
||||||
{{ $result = merge $result (dict "permalink" $imageValue) }}
|
{{ $result = merge $result (dict "permalink" $imageValue) }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $pageResourceImage := .Context.Resources.GetMatch (printf "%s" ($imageValue | safeURL)) }}
|
{{ $pageResourceImage := .Context.Resources.GetMatch (printf "%s" ($imageValue | safeURL)) }}
|
||||||
@@ -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,21 +0,0 @@
|
|||||||
{{ define "container-class" }}article-page with-toolbar{{ end }}
|
|
||||||
{{ define "main" }}
|
|
||||||
<div id="article-toolbar">
|
|
||||||
<a href="{{ .Site.BaseURL }}" class="back-home">
|
|
||||||
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
|
|
||||||
<span>Back</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ partial "article/article.html" . }}
|
|
||||||
|
|
||||||
{{ partial "article/components/related-contents" . }}
|
|
||||||
|
|
||||||
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
|
||||||
{{ partial "comments/include" . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ partialCached "footer/footer" . }}
|
|
||||||
|
|
||||||
{{- partialCached "article/components/photoswipe.html" . -}}
|
|
||||||
{{ end }}
|
|
||||||
@@ -12,13 +12,12 @@
|
|||||||
<p>当前视频av或BV号:{{ $vid }},视频分P:{{ $videopage }}</p>
|
<p>当前视频av或BV号:{{ $vid }},视频分P:{{ $videopage }}</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div style="position: relative; width: 100%; height: 0; padding-bottom: 56.25%;">
|
<div class="video-wrapper">
|
||||||
<iframe src="//player.bilibili.com/player.html?{{ $basicQuery | safeURL }}&{{ $videoQuery | safeURL }}"
|
<iframe src="//player.bilibili.com/player.html?{{ $basicQuery | safeURL }}&{{ $videoQuery | safeURL }}"
|
||||||
scrolling="no"
|
scrolling="no"
|
||||||
frameborder="no"
|
frameborder="no"
|
||||||
framespacing="0"
|
framespacing="0"
|
||||||
allowfullscreen="true"
|
allowfullscreen="true"
|
||||||
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"
|
|
||||||
>
|
>
|
||||||
</iframe>
|
</iframe>
|
||||||
</div>
|
</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
+12
-12
@@ -5,23 +5,23 @@ name = "Stack"
|
|||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
||||||
description = "Card-style Hugo theme designed for bloggers"
|
description = "Card-style Hugo theme designed for bloggers"
|
||||||
homepage = "https://theme-stack.jimmycai.com"
|
homepage = "https://github.com/CaiJimmy/hugo-theme-stack"
|
||||||
tags = [
|
demosite = "https://theme-stack.jimmycai.com"
|
||||||
"blog",
|
|
||||||
"responsive",
|
tags = ["blog", "responsive", "clean", "light", "dark", "personal"]
|
||||||
"clean",
|
|
||||||
"light",
|
|
||||||
"dark",
|
|
||||||
"personal"
|
|
||||||
]
|
|
||||||
features = [
|
features = [
|
||||||
"disqus",
|
"disqus",
|
||||||
"photoswipe",
|
"photoswipe",
|
||||||
"opengraph",
|
"opengraph",
|
||||||
"widgets"
|
"widgets",
|
||||||
|
"darkmode",
|
||||||
|
"table of contents",
|
||||||
|
"search",
|
||||||
]
|
]
|
||||||
|
|
||||||
min_version = "0.78.0"
|
min_version = "0.78.0"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Jimmy Cai"
|
name = "Jimmy Cai"
|
||||||
homepage = "https://jimmycai.com"
|
homepage = "https://jimmycai.com"
|
||||||
|
|||||||
Reference in New Issue
Block a user