Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffab83a637 | ||
|
|
9add062300 | ||
|
|
12daa8c9fc | ||
|
|
f804db2c80 | ||
|
|
090378e4da | ||
|
|
d6ced60f51 | ||
|
|
dc36aa60a9 | ||
|
|
475d01b046 | ||
|
|
5a5876e3ea | ||
|
|
ba9a5caa16 | ||
|
|
47db505228 | ||
|
|
dc94a29617 | ||
|
|
7df31001af | ||
|
|
73ccacec4d | ||
|
|
2612ca87dc | ||
|
|
e8fc315ead | ||
|
|
145cda7d45 | ||
|
|
d507f2ef7c | ||
|
|
8f7eeb7de6 | ||
|
|
dd3bb1ea13 | ||
|
|
291fe5fd7e | ||
|
|
512a9ab625 | ||
|
|
5a10223f4c | ||
|
|
0b22c0a293 | ||
|
|
c413980b89 | ||
|
|
6d98e8463f | ||
|
|
50a42f28c0 | ||
|
|
f824d08f6f | ||
|
|
2f47d14a8a | ||
|
|
2d1d6727f5 | ||
|
|
8cb1646198 | ||
|
|
9e96c6e975 | ||
|
|
47832083d8 | ||
|
|
d9acd77015 | ||
|
|
06aa627d3c | ||
|
|
9e6b7b22a9 | ||
|
|
f1ab6c6aba | ||
|
|
087989e427 | ||
|
|
0991f61d49 | ||
|
|
839fbd0ecb | ||
|
|
5175ac5ae3 | ||
|
|
37f1541c20 | ||
|
|
f4eb5d3e99 | ||
|
|
788dd497b3 | ||
|
|
8a7fb33163 | ||
|
|
2a18a92901 | ||
|
|
245b0f2810 | ||
|
|
0fb25c808b | ||
|
|
048a000f17 | ||
|
|
5f157478aa | ||
|
|
8556681b7c | ||
|
|
fa760d70cb | ||
|
|
bdcab89d86 | ||
|
|
b3907acdae | ||
|
|
23ff70d41a | ||
|
|
41a3e5ee13 | ||
|
|
0558108e30 | ||
|
|
12f31dfd8a | ||
|
|
374b25a60f | ||
|
|
fcd56dd21c | ||
|
|
fddab05362 | ||
|
|
f3783856ad | ||
|
|
130e2f6607 | ||
|
|
ce798a32a9 | ||
|
|
609d43b088 | ||
|
|
797949b37f | ||
|
|
539c39d69a | ||
|
|
f8466d94d2 | ||
|
|
43e074364c | ||
|
|
b2157bdf78 | ||
|
|
23607527e4 | ||
|
|
54a8ace564 | ||
|
|
b3fbe78ca5 | ||
|
|
2cb5ba683b | ||
|
|
5a8607e4a8 | ||
|
|
eafcf894c8 | ||
|
|
0b9f6c36ad |
@@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# @file
|
||||||
|
# Builds a Hugo site hosted on a Cloudflare Worker.
|
||||||
|
#
|
||||||
|
# The Cloudflare Worker automatically installs Node.js dependencies.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
main() {
|
||||||
|
DART_SASS_VERSION=1.97.1
|
||||||
|
GO_VERSION=1.25.5
|
||||||
|
HUGO_VERSION=0.154.5
|
||||||
|
NODE_VERSION=24.12.0
|
||||||
|
|
||||||
|
export TZ=Europe/Oslo
|
||||||
|
|
||||||
|
# Install Dart Sass
|
||||||
|
echo "Installing Dart Sass ${DART_SASS_VERSION}..."
|
||||||
|
curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
|
||||||
|
tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
|
||||||
|
rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
|
||||||
|
export PATH="${HOME}/.local/dart-sass:${PATH}"
|
||||||
|
|
||||||
|
# Install Go
|
||||||
|
echo "Installing Go ${GO_VERSION}..."
|
||||||
|
curl -sLJO "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz"
|
||||||
|
tar -C "${HOME}/.local" -xf "go${GO_VERSION}.linux-amd64.tar.gz"
|
||||||
|
rm "go${GO_VERSION}.linux-amd64.tar.gz"
|
||||||
|
export PATH="${HOME}/.local/go/bin:${PATH}"
|
||||||
|
|
||||||
|
# Install Hugo
|
||||||
|
echo "Installing Hugo ${HUGO_VERSION}..."
|
||||||
|
curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||||
|
mkdir "${HOME}/.local/hugo"
|
||||||
|
tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||||
|
rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||||
|
export PATH="${HOME}/.local/hugo:${PATH}"
|
||||||
|
|
||||||
|
# Install Node.js
|
||||||
|
echo "Installing Node.js ${NODE_VERSION}..."
|
||||||
|
curl -sLJO "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||||
|
tar -C "${HOME}/.local" -xf "node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||||
|
rm "node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||||
|
export PATH="${HOME}/.local/node-v${NODE_VERSION}-linux-x64/bin:${PATH}"
|
||||||
|
|
||||||
|
# Verify installations
|
||||||
|
echo "Verifying installations..."
|
||||||
|
echo Dart Sass: "$(sass --version)"
|
||||||
|
echo Go: "$(go version)"
|
||||||
|
echo Hugo: "$(hugo version)"
|
||||||
|
echo Node.js: "$(node --version)"
|
||||||
|
|
||||||
|
# Configure Git
|
||||||
|
echo "Configuring Git..."
|
||||||
|
git config core.quotepath false
|
||||||
|
if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then
|
||||||
|
git fetch --unshallow
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build the site
|
||||||
|
echo "Building the site..."
|
||||||
|
cd demo
|
||||||
|
hugo --gc --minify --themesDir=/opt/buildhome --theme=repo
|
||||||
|
}
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
main "$@"
|
||||||
@@ -1,31 +1,56 @@
|
|||||||
# Update the NODE_VERSION arg in docker-compose.yml to pick a Node version: 10, 12, 14
|
# syntax=docker/dockerfile:1
|
||||||
ARG NODE_VERSION=14
|
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
|
||||||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${NODE_VERSION}
|
|
||||||
|
ARG USER=vscode
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
RUN usermod -s /usr/bin/zsh ${USER}
|
||||||
|
|
||||||
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
|
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
|
||||||
ARG VARIANT=hugo
|
ARG VARIANT=hugo_extended
|
||||||
# VERSION can be either 'latest' or a specific version number
|
# VERSION can be either 'latest' or a specific version number
|
||||||
ARG VERSION=latest
|
ARG VERSION=latest
|
||||||
|
|
||||||
# Download Hugo
|
# Download Hugo
|
||||||
RUN apt-get update && apt-get install -y ca-certificates openssl git curl && \
|
RUN case ${VERSION} in \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
|
||||||
case ${VERSION} in \
|
|
||||||
latest) \
|
latest) \
|
||||||
export VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') ;;\
|
export VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') ;;\
|
||||||
esac && \
|
esac && \
|
||||||
echo ${VERSION} && \
|
echo ${VERSION} && \
|
||||||
wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-64bit.tar.gz && \
|
case $(uname -m) in \
|
||||||
|
aarch64) \
|
||||||
|
export ARCH=ARM64 ;; \
|
||||||
|
*) \
|
||||||
|
export ARCH=64bit ;; \
|
||||||
|
esac && \
|
||||||
|
echo ${ARCH} && \
|
||||||
|
wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-${ARCH}.tar.gz && \
|
||||||
tar xf ${VERSION}.tar.gz && \
|
tar xf ${VERSION}.tar.gz && \
|
||||||
mv hugo /usr/bin/hugo
|
mv hugo /usr/bin/hugo
|
||||||
|
|
||||||
# Hugo dev server port
|
# Hugo dev server port
|
||||||
EXPOSE 1313
|
EXPOSE 1313
|
||||||
|
|
||||||
# [Optional] Uncomment this section to install additional OS packages you may want.
|
|
||||||
#
|
|
||||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
|
||||||
|
|
||||||
# [Optional] Uncomment if you want to install more global node packages
|
USER ${USER}
|
||||||
# RUN sudo -u node npm install -g <your-package-list-here>
|
ARG HOME=/home/${USER}
|
||||||
|
WORKDIR ${HOME}
|
||||||
|
|
||||||
|
ARG PNPM_HOME=${HOME}/.local/share/pnpm
|
||||||
|
ENV PATH="${PNPM_HOME}:$PATH"
|
||||||
|
RUN <<EOT
|
||||||
|
wget -qO- https://get.pnpm.io/install.sh | ENV="${HOME}/.zshrc" SHELL=/bin/zsh sh -
|
||||||
|
pnpm env use -g lts
|
||||||
|
EOT
|
||||||
|
|
||||||
|
ARG OHMYZSH_HOME=${HOME}/.oh-my-zsh
|
||||||
|
|
||||||
|
# ARG OHMYZSH_THEME=${OHMYZSH_HOME}/custom/themes
|
||||||
|
# RUN <<EOT
|
||||||
|
# git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${OHMYZSH_THEME}/powerlevel10k
|
||||||
|
# sed -i 's|ZSH_THEME="devcontainers"|ZSH_THEME="powerlevel10k/powerlevel10k"|g' .zshrc
|
||||||
|
# echo 'POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true' >> .zshrc
|
||||||
|
# EOT
|
||||||
|
|
||||||
|
RUN <<EOT
|
||||||
|
hugo completion zsh > ${OHMYZSH_HOME}/plugins/git/_hugo
|
||||||
|
EOT
|
||||||
|
|||||||
@@ -1,45 +1,51 @@
|
|||||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
|
||||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.3/containers/hugo
|
|
||||||
{
|
{
|
||||||
"name": "Hugo (Community)",
|
"name": "Hugo & pnpm",
|
||||||
"build": {
|
|
||||||
"dockerfile": "Dockerfile",
|
|
||||||
"args": {
|
|
||||||
// Update VARIANT to pick hugo variant.
|
|
||||||
// Example variants: hugo, hugo_extended
|
|
||||||
// Rebuild the container if it already exists to update.
|
|
||||||
"VARIANT": "hugo_extended",
|
|
||||||
// Update VERSION to pick a specific hugo version.
|
|
||||||
// Example versions: latest, 0.73.0, 0,71.1
|
|
||||||
// Rebuild the container if it already exists to update.
|
|
||||||
"VERSION": "latest",
|
|
||||||
// Update NODE_VERSION to pick the Node.js version: 12, 14
|
|
||||||
"NODE_VERSION": "14",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Set *default* container specific settings.json values on container create.
|
"build": {
|
||||||
"settings": {
|
"dockerfile": "Dockerfile"
|
||||||
"html.format.templating": true,
|
},
|
||||||
},
|
|
||||||
|
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
// 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features.
|
||||||
"extensions": [
|
// "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {} },
|
||||||
"bungcip.better-toml",
|
|
||||||
"davidanson.vscode-markdownlint"
|
|
||||||
],
|
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// 👇 Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
"forwardPorts": [
|
// "forwardPorts": [],
|
||||||
1313
|
|
||||||
],
|
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Configure tool-specific properties.
|
||||||
// "postCreateCommand": "uname -a",
|
"customizations": {
|
||||||
|
// Configure properties specific to VS Code.
|
||||||
|
"vscode": {
|
||||||
|
// Set *default* container specific settings.json values on container create.
|
||||||
|
"settings": {
|
||||||
|
"html.format.templating": true
|
||||||
|
},
|
||||||
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
|
"extensions": [
|
||||||
|
// https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter
|
||||||
|
"eliostruyf.vscode-front-matter",
|
||||||
|
// https://marketplace.visualstudio.com/items?itemName=rusnasonov.vscode-hugo
|
||||||
|
"rusnasonov.vscode-hugo",
|
||||||
|
// https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode
|
||||||
|
"budparr.language-hugo-vscode",
|
||||||
|
// https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hugo-themer
|
||||||
|
"eliostruyf.vscode-hugo-themer",
|
||||||
|
// https://marketplace.visualstudio.com/items?itemName=kaellarkin.hugo-shortcode-syntax
|
||||||
|
"kaellarkin.hugo-shortcode-syntax",
|
||||||
|
|
||||||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
// "csstools.postcss",
|
||||||
"remoteUser": "node",
|
|
||||||
"features": {
|
// "esbenp.prettier-vscode",
|
||||||
"golang": "latest"
|
// "tamasfe.even-better-toml",
|
||||||
}
|
// "naumovs.color-highlight",
|
||||||
|
// "GitHub.vscode-pull-request-github",
|
||||||
|
// "eamodio.gitlens",
|
||||||
|
"davidanson.vscode-markdownlint",
|
||||||
|
"streetsidesoftware.code-spell-checker"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"remoteUser": "vscode",
|
||||||
|
|
||||||
|
"postCreateCommand": "pnpm install-completion zsh"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ body:
|
|||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/).
|
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/guide/).
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: what-happened
|
id: what-happened
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-left"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>
|
||||||
|
After Width: | Height: | Size: 336 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-right"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>
|
||||||
|
After Width: | Height: | Size: 336 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-dots"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>
|
||||||
|
After Width: | Height: | Size: 459 B |
@@ -33,15 +33,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@for $i from 1 through length($defaultTagBackgrounds) {
|
|
||||||
&:nth-child(#{length($defaultTagBackgrounds)}n + #{$i}) {
|
|
||||||
.article-category a {
|
|
||||||
background: nth($defaultTagBackgrounds, $i);
|
|
||||||
color: nth($defaultTagColors, $i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,6 +122,7 @@
|
|||||||
.article-tags {
|
.article-tags {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--accent-color-text);
|
color: var(--accent-color-text);
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: var(--base-font-family);
|
font-family: var(--base-font-family);
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
|
text-autospace: ideograph-alpha ideograph-numeric punctuation insert;
|
||||||
|
text-spacing-trim: trim-start allow-end;
|
||||||
|
-ms-text-autospace: ideograph-alpha;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.article-tags {
|
.article-tags {
|
||||||
flex-wrap: wrap;
|
|
||||||
text-transform: unset;
|
text-transform: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,6 +221,28 @@
|
|||||||
margin-inline-start: calc((var(--card-padding)) * -1);
|
margin-inline-start: calc((var(--card-padding)) * -1);
|
||||||
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
|
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
|
||||||
border-inline-start: var(--heading-border-size) solid var(--accent-color);
|
border-inline-start: var(--heading-border-size) solid var(--accent-color);
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
a.header-anchor {
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
width: var(--card-padding);
|
||||||
|
text-align: center;
|
||||||
|
color: var(--accent-color);
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: "#";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
a.header-anchor {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
img {
|
img {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,10 +48,12 @@
|
|||||||
|
|
||||||
.subsection-list {
|
.subsection-list {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
margin-left: -24px;
|
||||||
|
|
||||||
.article-list--tile {
|
.article-list--tile {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: 15px;
|
padding: 8px 0 34px 24px;
|
||||||
|
width: max-content;
|
||||||
|
|
||||||
article {
|
article {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
|
|||||||
@@ -212,7 +212,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.social-menu {
|
.menu-social {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -4,18 +4,47 @@
|
|||||||
box-shadow: var(--shadow-l1);
|
box-shadow: var(--shadow-l1);
|
||||||
border-radius: var(--card-border-radius);
|
border-radius: var(--card-border-radius);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.page-link {
|
.page-link {
|
||||||
padding: 16px 32px;
|
padding: 16px 0;
|
||||||
display: inline-flex;
|
margin: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 48px;
|
||||||
|
color: var(--card-text-color-secondary);
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
&.current {
|
&:first-child,
|
||||||
font-weight: bold;
|
&:last-child {
|
||||||
background-color: var(--card-background-selected);
|
flex: 0 0 48px;
|
||||||
color: var(--card-text-color-main);
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
color: var(--card-text-color-secondary);
|
&:hover:not(.current):not(.disabled) {
|
||||||
|
background-color: var(--card-background-selected);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.current {
|
||||||
|
background-color: var(--card-background-selected);
|
||||||
|
color: var(--card-text-color-main);
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
opacity: 0.3;
|
||||||
|
cursor: not-allowed;
|
||||||
|
pointer-events: none;
|
||||||
|
color: var(--card-text-color-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
$defaultTagBackgrounds: #8ea885, #df7988, #0177b8, #ffb900, #6b69d6;
|
|
||||||
$defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global style
|
* Global style
|
||||||
*/
|
*/
|
||||||
@@ -41,10 +38,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
*/
|
*/
|
||||||
:root {
|
:root {
|
||||||
--sys-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Droid Sans", "Helvetica Neue";
|
--sys-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Droid Sans", "Helvetica Neue";
|
||||||
--zh-font-family: "PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei";
|
--base-font-family: "Lato", var(--sys-font-family), sans-serif;
|
||||||
|
--code-font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||||
--base-font-family: "Lato", var(--sys-font-family), var(--zh-font-family), sans-serif;
|
|
||||||
--code-font-family: Menlo, Monaco, Consolas, "Courier New", var(--zh-font-family), monospace;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ class StackColorScheme {
|
|||||||
constructor(toggleEl: HTMLElement) {
|
constructor(toggleEl: HTMLElement) {
|
||||||
this.bindMatchMedia();
|
this.bindMatchMedia();
|
||||||
this.currentScheme = this.getSavedScheme();
|
this.currentScheme = this.getSavedScheme();
|
||||||
|
if (window.matchMedia('(prefers-color-scheme: dark)').matches === true)
|
||||||
|
this.systemPreferScheme = 'dark'
|
||||||
|
else
|
||||||
|
this.systemPreferScheme = 'light';
|
||||||
|
|
||||||
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);
|
this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme);
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,11 @@ function buildIdToNavigationElementMap(navigation: NodeListOf<Element>): IdToEle
|
|||||||
const sectionLinkRef: IdToElementMap = {};
|
const sectionLinkRef: IdToElementMap = {};
|
||||||
navigation.forEach((navigationElement: HTMLElement) => {
|
navigation.forEach((navigationElement: HTMLElement) => {
|
||||||
const link = navigationElement.querySelector("a");
|
const link = navigationElement.querySelector("a");
|
||||||
const href = link.getAttribute("href");
|
if (link) {
|
||||||
if (href.startsWith("#")) {
|
const href = link.getAttribute("href");
|
||||||
sectionLinkRef[href.slice(1)] = navigationElement;
|
if (href.startsWith("#")) {
|
||||||
|
sectionLinkRef[href.slice(1)] = navigationElement;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -125,6 +127,13 @@ function setupScrollspy() {
|
|||||||
scrollHandler();
|
scrollHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use ResizeObserver to detect changes in the size of .article-content
|
||||||
|
const articleContent = document.querySelector(".article-content");
|
||||||
|
if (articleContent) {
|
||||||
|
const resizeObserver = new ResizeObserver(debounced(resizeHandler));
|
||||||
|
resizeObserver.observe(articleContent);
|
||||||
|
}
|
||||||
|
|
||||||
window.addEventListener("resize", debounced(resizeHandler));
|
window.addEventListener("resize", debounced(resizeHandler));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,14 @@ class Search {
|
|||||||
this.resultTitle = resultTitle;
|
this.resultTitle = resultTitle;
|
||||||
this.resultTitleTemplate = resultTitleTemplate;
|
this.resultTitleTemplate = resultTitleTemplate;
|
||||||
|
|
||||||
this.handleQueryString();
|
/// Check if there's already value in the search input
|
||||||
|
if (this.input.value.trim() !== '') {
|
||||||
|
this.doSearch(this.input.value.split(' '));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.handleQueryString();
|
||||||
|
}
|
||||||
|
|
||||||
this.bindQueryStringChange();
|
this.bindQueryStringChange();
|
||||||
this.bindSearchForm();
|
this.bindSearchForm();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
name: ホーム
|
||||||
|
weight: -100
|
||||||
|
params:
|
||||||
|
icon: home
|
||||||
|
---
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
name: 主頁
|
||||||
|
weight: -100
|
||||||
|
params:
|
||||||
|
icon: home
|
||||||
|
---
|
||||||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: Japanese Test
|
||||||
|
description: これはサブタイトル
|
||||||
|
date: 2020-09-09
|
||||||
|
slug: test-chinese
|
||||||
|
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||||
|
categories:
|
||||||
|
- Test
|
||||||
|
- テスト
|
||||||
|
---
|
||||||
|
|
||||||
|
## 本文テスト(フォント)
|
||||||
|
|
||||||
|
返扇花週認契適違込遷雇述請曜藤突扉直角
|
||||||
|
|
||||||
|
## 引用
|
||||||
|
|
||||||
|
> 国破れて山河在り\
|
||||||
|
> 城春にして草木深し\
|
||||||
|
> 時に感じては花にも涙を濺ぎ\
|
||||||
|
> 別れを恨んでは鳥にも心を驚かす
|
||||||
|
>
|
||||||
|
> 烽火三月に連なり\
|
||||||
|
> 家書万金に抵たる\
|
||||||
|
> 白頭掻けば更に短く\
|
||||||
|
> 渾べて簪に勝へざらんと欲す
|
||||||
@@ -37,3 +37,7 @@ categories:
|
|||||||
```
|
```
|
||||||
|
|
||||||
相册语法来自 [Typlog](https://typlog.com/)
|
相册语法来自 [Typlog](https://typlog.com/)
|
||||||
|
|
||||||
|
## 字体
|
||||||
|
|
||||||
|
返扇花週認契適違込遷雇述請曜藤突扉直角
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
title: Chinese Test
|
||||||
|
description: 這是一個副標題
|
||||||
|
date: 2020-09-09
|
||||||
|
slug: test-chinese
|
||||||
|
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||||
|
categories:
|
||||||
|
- Test
|
||||||
|
- 測試
|
||||||
|
---
|
||||||
|
|
||||||
|
## 正文測試(字體)
|
||||||
|
|
||||||
|
返扇花週認契適違込遷雇述請曜藤突扉直角
|
||||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@@ -21,7 +21,7 @@ To enable emoji globally, set `enableEmoji` to `true` in your site's [configurat
|
|||||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
|
The [Emoji cheat sheet](https://www.webfx.com/tools/emoji-cheat-sheet/) is a useful reference for emoji shorthand codes.
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -21,9 +21,9 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Twitter Simple Shortcode
|
## X Simple Shortcode
|
||||||
|
|
||||||
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
|
{{< x user="DesignReviewed" id="1085870671291310081" >}}
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -37,10 +37,6 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
|
|||||||
|
|
||||||
{{< bilibili av498363026 >}}
|
{{< bilibili av498363026 >}}
|
||||||
|
|
||||||
## Gist Shortcode
|
|
||||||
|
|
||||||
{{< gist spf13 7896402 >}}
|
|
||||||
|
|
||||||
## Gitlab Snippets Shortcode
|
## Gitlab Snippets Shortcode
|
||||||
|
|
||||||
{{< gitlab 2349278 >}}
|
{{< gitlab 2349278 >}}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
baseurl: https://example.com
|
baseurl: https://example.com/
|
||||||
languageCode: en-us
|
languageCode: en-us
|
||||||
theme: hugo-theme-stack
|
theme: hugo-theme-stack
|
||||||
paginate: 3
|
|
||||||
title: Example Site
|
title: Example Site
|
||||||
copyright: Example Person
|
copyright: Example Person
|
||||||
|
|
||||||
@@ -19,20 +18,39 @@ languages:
|
|||||||
title: Example Site
|
title: Example Site
|
||||||
weight: 1
|
weight: 1
|
||||||
params:
|
params:
|
||||||
description: Example description
|
sidebar:
|
||||||
|
subtitle: Example description
|
||||||
zh-cn:
|
zh-cn:
|
||||||
languageName: 中文
|
languageName: 简体中文
|
||||||
title: 演示站点
|
title: 演示站点
|
||||||
weight: 2
|
weight: 2
|
||||||
params:
|
params:
|
||||||
description: 演示说明
|
sidebar:
|
||||||
|
subtitle: 演示说明
|
||||||
|
|
||||||
|
zh-tw:
|
||||||
|
languageName: 正體中文
|
||||||
|
title: 演示站點
|
||||||
|
weight: 2
|
||||||
|
params:
|
||||||
|
sidebar:
|
||||||
|
subtitle: 演示說明
|
||||||
|
|
||||||
|
ja:
|
||||||
|
languageName: 日本語
|
||||||
|
title: サンプルサイト
|
||||||
|
weight: 2
|
||||||
|
params:
|
||||||
|
sidebar:
|
||||||
|
subtitle: サンプル説明
|
||||||
ar:
|
ar:
|
||||||
languageName: عربي
|
languageName: عربي
|
||||||
languagedirection: rtl
|
languagedirection: rtl
|
||||||
title: موقع تجريبي
|
title: موقع تجريبي
|
||||||
weight: 3
|
weight: 3
|
||||||
params:
|
params:
|
||||||
description: وصف تجريبي
|
sidebar:
|
||||||
|
subtitle: وصف تجريبي
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# Change it to your Disqus shortname before using
|
# Change it to your Disqus shortname before using
|
||||||
@@ -42,6 +60,9 @@ services:
|
|||||||
googleAnalytics:
|
googleAnalytics:
|
||||||
id:
|
id:
|
||||||
|
|
||||||
|
pagination:
|
||||||
|
pagerSize: 3
|
||||||
|
|
||||||
permalinks:
|
permalinks:
|
||||||
post: /p/:slug/
|
post: /p/:slug/
|
||||||
page: /:slug/
|
page: /:slug/
|
||||||
@@ -156,6 +177,7 @@ params:
|
|||||||
repo:
|
repo:
|
||||||
clientID:
|
clientID:
|
||||||
clientSecret:
|
clientSecret:
|
||||||
|
proxy:
|
||||||
|
|
||||||
cusdis:
|
cusdis:
|
||||||
host:
|
host:
|
||||||
@@ -203,7 +225,7 @@ params:
|
|||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
### Custom menu
|
### Custom menu
|
||||||
### See https://docs.stack.jimmycai.com/configuration/custom-menu.html
|
### See https://stack.jimmycai.com/config/menu
|
||||||
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
|
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
|
||||||
menu:
|
menu:
|
||||||
main: []
|
main: []
|
||||||
@@ -234,6 +256,18 @@ related:
|
|||||||
|
|
||||||
markup:
|
markup:
|
||||||
goldmark:
|
goldmark:
|
||||||
|
extensions:
|
||||||
|
passthrough:
|
||||||
|
enable: true
|
||||||
|
delimiters:
|
||||||
|
block:
|
||||||
|
- - \[
|
||||||
|
- \]
|
||||||
|
- - $$
|
||||||
|
- $$
|
||||||
|
inline:
|
||||||
|
- - \(
|
||||||
|
- \)
|
||||||
renderer:
|
renderer:
|
||||||
## Set to true if you have HTML content inside Markdown
|
## Set to true if you have HTML content inside Markdown
|
||||||
unsafe: true
|
unsafe: true
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
hugo server --gc --themesDir=../..
|
||||||
@@ -28,6 +28,7 @@ params:
|
|||||||
src: img/avatar.png
|
src: img/avatar.png
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
headingAnchor: false
|
||||||
math: false
|
math: false
|
||||||
toc: true
|
toc: true
|
||||||
readingTime: true
|
readingTime: true
|
||||||
@@ -68,7 +68,7 @@ search:
|
|||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: "مبني بستخدام {{ .Generator }}"
|
other: "مبني باستخدام {{ .Generator }}"
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
|
other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}"
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Покажи Меню
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Тъмен Режим
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} страница"
|
||||||
|
other: "{{ .Count }} страници"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Секция
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Подсекция
|
||||||
|
other: Подсекции
|
||||||
|
|
||||||
|
article:
|
||||||
|
back:
|
||||||
|
other: Назад
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Съдържание
|
||||||
|
|
||||||
|
relatedContent:
|
||||||
|
other: Свързано Съдържание
|
||||||
|
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Последна промяна на
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
one: "{{ .Count }} minute read"
|
||||||
|
other: "{{ .Count }} minute read"
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Не е намерено
|
||||||
|
|
||||||
|
subtitle:
|
||||||
|
other: Страницата която търсите не е открита
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Архиви
|
||||||
|
|
||||||
|
more:
|
||||||
|
other: Повече
|
||||||
|
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Тагове
|
||||||
|
categoriesCloud:
|
||||||
|
title:
|
||||||
|
other: Категории
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Търсене
|
||||||
|
|
||||||
|
placeholder:
|
||||||
|
other: Напишете нещо...
|
||||||
|
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT страници (#TIME_SECONDS секунди)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Създадено с {{ .Generator }}
|
||||||
|
|
||||||
|
designedBy:
|
||||||
|
other: Тема {{ .Theme }} създадена от {{ .DesignedBy }}
|
||||||
@@ -50,6 +50,9 @@ widget:
|
|||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Mots clés
|
other: Mots clés
|
||||||
|
categoriesCloud:
|
||||||
|
title:
|
||||||
|
other: Catégories
|
||||||
|
|
||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ toggleMenu:
|
|||||||
other: Toggle Menu
|
other: Toggle Menu
|
||||||
|
|
||||||
darkMode:
|
darkMode:
|
||||||
other: Dark Mode
|
other: Modalità scura
|
||||||
|
|
||||||
list:
|
list:
|
||||||
page:
|
page:
|
||||||
@@ -49,7 +49,7 @@ widget:
|
|||||||
|
|
||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Tags
|
other: Tag
|
||||||
|
|
||||||
categoriesCloud:
|
categoriesCloud:
|
||||||
title:
|
title:
|
||||||
|
|||||||
@@ -4,6 +4,16 @@ toggleMenu:
|
|||||||
darkMode:
|
darkMode:
|
||||||
other: ダークモード
|
other: ダークモード
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
other: "{{ .Count }} ページ目"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: セクション
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
other: サブセクション
|
||||||
|
|
||||||
article:
|
article:
|
||||||
back:
|
back:
|
||||||
other: 前のページ
|
other: 前のページ
|
||||||
@@ -54,7 +64,7 @@ search:
|
|||||||
|
|
||||||
footer:
|
footer:
|
||||||
builtWith:
|
builtWith:
|
||||||
other: Built with {{ .Generator }}
|
other: "{{ .Generator }} で構築されています。"
|
||||||
|
|
||||||
designedBy:
|
designedBy:
|
||||||
other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。
|
other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
toggleMenu:
|
||||||
|
other: Alternar menú
|
||||||
|
|
||||||
|
darkMode:
|
||||||
|
other: Mòde fosc
|
||||||
|
|
||||||
|
list:
|
||||||
|
page:
|
||||||
|
one: "{{ .Count }} pagina"
|
||||||
|
other: "{{ .Count }} paginas"
|
||||||
|
|
||||||
|
section:
|
||||||
|
other: Seccion
|
||||||
|
|
||||||
|
subsection:
|
||||||
|
one: Josseccion
|
||||||
|
other: Josseccions
|
||||||
|
|
||||||
|
article:
|
||||||
|
back:
|
||||||
|
other: Tornar
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: Taula de contengut
|
||||||
|
|
||||||
|
relatedContent:
|
||||||
|
other: Contenguts relacionats
|
||||||
|
|
||||||
|
lastUpdatedOn:
|
||||||
|
other: Darrièra actualizacion
|
||||||
|
readingTime:
|
||||||
|
one: "{{ .Count }} minuta de lectura"
|
||||||
|
other: "{{ .Count }} minutas de lectura"
|
||||||
|
|
||||||
|
notFound:
|
||||||
|
title:
|
||||||
|
other: Non trobat
|
||||||
|
|
||||||
|
subtitle:
|
||||||
|
other: Aquesta pagina existís pas
|
||||||
|
|
||||||
|
widget:
|
||||||
|
archives:
|
||||||
|
title:
|
||||||
|
other: Archiu
|
||||||
|
|
||||||
|
more:
|
||||||
|
other: Mai
|
||||||
|
|
||||||
|
tagCloud:
|
||||||
|
title:
|
||||||
|
other: Etiquetas
|
||||||
|
categoriesCloud:
|
||||||
|
title:
|
||||||
|
other: Categorias
|
||||||
|
|
||||||
|
search:
|
||||||
|
title:
|
||||||
|
other: Cercar
|
||||||
|
|
||||||
|
placeholder:
|
||||||
|
other: Picatz quicòm...
|
||||||
|
|
||||||
|
resultTitle:
|
||||||
|
other: "#PAGES_COUNT paginas dins (#TIME_SECONDS segons)"
|
||||||
|
|
||||||
|
footer:
|
||||||
|
builtWith:
|
||||||
|
other: Creat amb {{ .Generator }}
|
||||||
|
|
||||||
|
designedBy:
|
||||||
|
other: Tàma {{ .Theme }} concebut per {{ .DesignedBy }}
|
||||||
@@ -47,6 +47,9 @@ widget:
|
|||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Теги
|
other: Теги
|
||||||
|
categoriesCloud:
|
||||||
|
title:
|
||||||
|
other: Категории
|
||||||
|
|
||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
|
|||||||
@@ -17,11 +17,22 @@ list:
|
|||||||
other: Alt bölümler
|
other: Alt bölümler
|
||||||
|
|
||||||
article:
|
article:
|
||||||
|
back:
|
||||||
|
other: Geri
|
||||||
|
|
||||||
|
tableOfContents:
|
||||||
|
other: İçindekiler
|
||||||
|
|
||||||
relatedContent:
|
relatedContent:
|
||||||
other: Alakalı içerikler
|
other: Benzer içerikler
|
||||||
|
|
||||||
lastUpdatedOn:
|
lastUpdatedOn:
|
||||||
other: Son güncelleme
|
other: Son güncelleme
|
||||||
|
|
||||||
|
readingTime:
|
||||||
|
one: "{{ .Count }} dakika okuma süresi"
|
||||||
|
other: "{{ .Count }} dakika okuma süresi"
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title:
|
title:
|
||||||
other: Bulunamadı
|
other: Bulunamadı
|
||||||
@@ -37,6 +48,9 @@ widget:
|
|||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Etiketler
|
other: Etiketler
|
||||||
|
categoriesCloud:
|
||||||
|
title:
|
||||||
|
other: Kategoriler
|
||||||
|
|
||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ widget:
|
|||||||
tagCloud:
|
tagCloud:
|
||||||
title:
|
title:
|
||||||
other: Теґи
|
other: Теґи
|
||||||
|
categoriesCloud:
|
||||||
|
title:
|
||||||
|
other: Категорії
|
||||||
|
|
||||||
search:
|
search:
|
||||||
title:
|
title:
|
||||||
|
|||||||
@@ -3,5 +3,43 @@
|
|||||||
<h1 class="article-title">{{ T "notFound.title" }}</h1>
|
<h1 class="article-title">{{ T "notFound.title" }}</h1>
|
||||||
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
|
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{- $query := first 1 (where .Site.Pages "Layout" "==" "search") -}}
|
||||||
|
{{- $searchPage := index $query 0 -}}
|
||||||
|
|
||||||
|
{{- with $searchPage -}}
|
||||||
|
<form action="{{ $searchPage.RelPermalink }}" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
|
||||||
|
<p>
|
||||||
|
<label>{{ T "search.title" }}</label>
|
||||||
|
<input id="searchInput" name="keyword" required placeholder="{{ T `search.placeholder` }}" />
|
||||||
|
|
||||||
|
<button title="{{ T `search.title` }}">
|
||||||
|
{{ partial "helper/icon" "search" }}
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="search-result">
|
||||||
|
<h3 class="search-result--title section-title"></h3>
|
||||||
|
<div class="search-result--list article-list--compact"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.searchResultTitleTemplate = "{{ T `search.resultTitle` }}"
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{{- $opts := dict "minify" hugo.IsProduction "JSXFactory" "createElement" -}}
|
||||||
|
{{- $searchScript := resources.Get "ts/search.tsx" | js.Build $opts -}}
|
||||||
|
<script type="text/javascript" src="{{ $searchScript.RelPermalink }}" defer></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const wrongUrl = new URL(window.location.href);
|
||||||
|
|
||||||
|
/// Get the search keyword from the wrong URL by removing all slashes and dashes
|
||||||
|
const searchKeyword = decodeURIComponent(wrongUrl.pathname).split(/[/|-]/).join(' ').trim();
|
||||||
|
|
||||||
|
document.getElementById('searchInput').setAttribute('value', searchKeyword);
|
||||||
|
</script>
|
||||||
|
{{- end -}}
|
||||||
{{ partialCached "footer/footer" . }}
|
{{ partialCached "footer/footer" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<pre class="mermaid">
|
||||||
|
{{ .Inner | htmlEscape | safeHTML }}
|
||||||
|
</pre>
|
||||||
|
{{ .Page.Store.Set "hasMermaid" true }}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<h{{ .Level }} id="{{ .Anchor }}">
|
||||||
|
{{- if site.Params.Article.HeadingAnchor -}}
|
||||||
|
<a href="#{{ .Anchor }}" class="header-anchor"></a>
|
||||||
|
{{- end -}}
|
||||||
|
{{ .Text | safeHTML }}
|
||||||
|
</h{{ .Level }}>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
|
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
|
||||||
{{- $terms := $taxonomy.Pages -}}
|
{{- $terms := $taxonomy.Pages -}}
|
||||||
{{ if $terms }}
|
{{ if $terms }}
|
||||||
<h2 class="section-title">{{ $taxonomy.Title }}</h2>
|
<h2 class="section-title">{{ T "widget.categoriesCloud.title" }}</h2>
|
||||||
<div class="subsection-list">
|
<div class="subsection-list">
|
||||||
<div class="article-list--tile">
|
<div class="article-list--tile">
|
||||||
{{ range $terms }}
|
{{ range $terms }}
|
||||||
@@ -16,8 +16,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
{{ $filtered := where $pages "Params.hidden" "!=" true }}
|
||||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
|
||||||
|
|
||||||
{{ range $filtered.GroupByDate "2006" }}
|
{{ range $filtered.GroupByDate "2006" }}
|
||||||
{{ $id := lower (replace .Key " " "-") }}
|
{{ $id := lower (replace .Key " " "-") }}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
|
|
||||||
{{- $subsections := .Sections -}}
|
{{- $subsections := .Sections -}}
|
||||||
{{- $pages := .Pages | complement $subsections -}}
|
{{- $pages := .Pages | complement $subsections -}}
|
||||||
|
{{- $pages = where $pages "Params.hidden" "!=" true -}}
|
||||||
|
|
||||||
{{- if eq (len $pages) 0 -}}
|
{{- if eq (len $pages) 0 -}}
|
||||||
{{/* If there are no normal pages, display subsections in list style, with pagination */}}
|
{{/* If there are no normal pages, display subsections in list style, with pagination */}}
|
||||||
@@ -68,12 +69,14 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/* List only pages that are not a subsection */}}
|
{{/* List only pages that are not a subsection */}}
|
||||||
{{ $paginator := .Paginate $pages }}
|
{{ $paginator := partial "helper/paginator.html" . }}
|
||||||
<section class="article-list--compact">
|
{{ with $paginator }}
|
||||||
{{ range $paginator.Pages }}
|
<section class="article-list--compact">
|
||||||
{{ partial "article-list/compact" . }}
|
{{ range .Pages }}
|
||||||
{{ end }}
|
{{ partial "article-list/compact" . }}
|
||||||
</section>
|
{{ end }}
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{- partial "pagination.html" . -}}
|
{{- partial "pagination.html" . -}}
|
||||||
|
|
||||||
|
|||||||
@@ -18,11 +18,11 @@
|
|||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
|
||||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
|
||||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||||
{{- with .OutputFormats.Get "RSS" -}}
|
{{- with .OutputFormats.Get "RSS" -}}
|
||||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||||
<guid>{{ .Permalink }}</guid>
|
<guid>{{ .Permalink }}</guid>
|
||||||
<description>
|
<description>
|
||||||
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
|
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
{{ partialCached "footer/footer" . }}
|
{{ partialCached "footer/footer" . }}
|
||||||
|
|
||||||
{{ partialCached "article/components/photoswipe" . }}
|
{{ partialCached "article/components/photoswipe" . }}
|
||||||
|
{{ partial "article/components/mermaid" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "right-sidebar" }}
|
{{ define "right-sidebar" }}
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
{{- $paginator := partial "helper/paginator.html" . -}}
|
||||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
|
||||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
|
||||||
{{ $pag := .Paginate ($filtered) }}
|
|
||||||
|
|
||||||
<section class="article-list">
|
<section class="article-list">
|
||||||
{{ range $index, $element := $pag.Pages }}
|
{{ range $index, $element := $paginator.Pages }}
|
||||||
{{ partial "article-list/default" . }}
|
{{ partial "article-list/default" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
|
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
|
||||||
{{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}}
|
{{- $filtered := where $pages "Params.hidden" "!=" true -}}
|
||||||
{{- $filtered := ($pages | intersect $notHidden) -}}
|
|
||||||
|
|
||||||
{{- $result := slice -}}
|
{{- $result := slice -}}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<footer class="article-time">
|
<footer class="article-time">
|
||||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||||
</time>
|
</time>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
{{ if .Params.categories }}
|
{{ if .Params.categories }}
|
||||||
<header class="article-category">
|
<header class="article-category">
|
||||||
{{ range (.GetTerms "categories") }}
|
{{ range (.GetTerms "categories") }}
|
||||||
<a href="{{ .RelPermalink }}" {{ with .Params.style }}style="background-color: {{ .background }}; color: {{ .color }};"{{ end }}>
|
{{ $color := partial "helper/color-from-str" .LinkTitle }}
|
||||||
|
{{ $BackgroundColor := default $color.BackgroundColor .Params.style.background }}
|
||||||
|
{{ $TextColor := default $color.TextColor .Params.style.color }}
|
||||||
|
<a href="{{ .RelPermalink }}" style="background-color: {{ $BackgroundColor | safeCSS }}; color: {{ $TextColor | safeCSS }};">
|
||||||
{{ .LinkTitle }}
|
{{ .LinkTitle }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -31,8 +34,8 @@
|
|||||||
{{ if $showDate }}
|
{{ if $showDate }}
|
||||||
<div>
|
<div>
|
||||||
{{ partial "helper/icon" "date" }}
|
{{ partial "helper/icon" "date" }}
|
||||||
<time class="article-time--published">
|
<time class="article-time--published" datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||||
</time>
|
</time>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<section class="article-lastmod">
|
<section class="article-lastmod">
|
||||||
{{ partial "helper/icon" "clock" }}
|
{{ partial "helper/icon" "clock" }}
|
||||||
<span>
|
<span>
|
||||||
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||||
</span>
|
</span>
|
||||||
</section>
|
</section>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -16,8 +16,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ with $link.image }}
|
{{ with $link.image }}
|
||||||
|
{{ $permalink := . }}
|
||||||
|
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
|
||||||
|
{{ $permalink = .RelPermalink }}
|
||||||
|
{{ end }}
|
||||||
<div class="article-image">
|
<div class="article-image">
|
||||||
<img src="{{ . }}" loading="lazy">
|
<img src="{{ $permalink }}" loading="lazy"{{ with $link.alt }} alt="{{ . }}"{{ end }}>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("DOMContentLoaded", () => {
|
window.addEventListener("DOMContentLoaded", () => {
|
||||||
renderMathInElement(document.querySelector(`.article-content`), {
|
const elementsToRender = [".main-article", ".widget--toc"];
|
||||||
delimiters: [
|
|
||||||
{ left: "$$", right: "$$", display: true },
|
elementsToRender.forEach(selector => {
|
||||||
{ left: "$", right: "$", display: false },
|
const element = document.querySelector(selector);
|
||||||
{ left: "\\(", right: "\\)", display: false },
|
if (element) {
|
||||||
{ left: "\\[", right: "\\]", display: true }
|
renderMathInElement(element, {
|
||||||
],
|
delimiters: [
|
||||||
ignoredClasses: ["gist"]
|
{ left: "$$", right: "$$", display: true },
|
||||||
});})
|
{ left: "$", right: "$", display: false },
|
||||||
|
{ left: "\\(", right: "\\)", display: false },
|
||||||
|
{ left: "\\[", right: "\\]", display: true }
|
||||||
|
],
|
||||||
|
ignoredClasses: ["gist"]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{{ if .Store.Get "hasMermaid" }}
|
||||||
|
<script type="module">
|
||||||
|
import mermaid from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm';
|
||||||
|
mermaid.initialize({
|
||||||
|
startOnLoad: true,
|
||||||
|
theme: 'neutral',
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
@@ -1,20 +1,26 @@
|
|||||||
{{- $host := default "https://cusdis.com" .Site.Params.comments.cusdis.host -}}
|
{{- $host := default "https://cusdis.com" .Site.Params.comments.cusdis.host -}}
|
||||||
<div id="cusdis_thread"
|
<div id="cusdis_thread" data-host="{{ $host }}" data-app-id="{{ .Site.Params.comments.cusdis.id }}"
|
||||||
data-host="{{ $host }}"
|
data-page-id="{{ .File.UniqueID }}" data-page-url="{{ .Permalink }}" data-page-title="{{ .Title }}"></div>
|
||||||
data-app-id="{{ .Site.Params.comments.cusdis.id }}"
|
|
||||||
data-page-id="{{ .File.UniqueID }}"
|
|
||||||
data-page-url="{{ .Permalink }}"
|
|
||||||
data-page-title="{{ .Title }}"></div>
|
|
||||||
<script async defer src="{{ $host }}/js/cusdis.es.js"></script>
|
<script async defer src="{{ $host }}/js/cusdis.es.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function setCusdisTheme(theme) {
|
function setCusdisTheme(theme) {
|
||||||
let cusdis = document.querySelector('#cusdis_thread iframe');
|
let cusdis = document.querySelector('#cusdis_thread iframe');
|
||||||
if (cusdis) {
|
if (cusdis) {
|
||||||
window.CUSDIS.setTheme(theme)
|
window.CUSDIS.setTheme(theme);
|
||||||
|
cusdis.contentWindow.document.body.style.backgroundColor = window.getComputedStyle(document.body).backgroundColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
window.addEventListener('load', function () {
|
||||||
|
let iframe = document.querySelector("#cusdis_thread iframe");
|
||||||
|
if (iframe) {
|
||||||
|
let observer = new MutationObserver(() => {
|
||||||
|
let scrollHeight = iframe.contentWindow.document.body.scrollHeight;
|
||||||
|
iframe.style.height = scrollHeight + "px";
|
||||||
|
});
|
||||||
|
observer.observe(iframe.contentWindow.document.body, { childList: true, subtree: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
window.addEventListener('onColorSchemeChange', (e) => {
|
window.addEventListener('onColorSchemeChange', (e) => {
|
||||||
setCusdisTheme(e.detail)
|
setCusdisTheme(e.detail)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="disqus-container">
|
<div class="disqus-container">
|
||||||
{{ template "_internal/disqus.html" . }}
|
{{ partial "disqus.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{{- $disqusjs := .Site.Params.Comments.disqusjs -}}
|
{{- $disqusjs := .Site.Params.Comments.disqusjs -}}
|
||||||
{{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}}
|
{{- if and (not $pc.Disable) (and $disqusjs.Shortname $disqusjs.ApiKey) -}}
|
||||||
|
|
||||||
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | resources.ToCSS | minify -}}
|
{{- $style := resources.Get "scss/partials/comments/disqusjs.scss" | toCSS | minify -}}
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||||
|
|
||||||
<div class="disqus-container">
|
<div class="disqus-container">
|
||||||
@@ -21,8 +21,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function lazyLoadDisqusJS() {
|
function lazyLoadDisqusJS() {
|
||||||
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
|
const excludedHosts = ["localhost", "127.0.0.1"];
|
||||||
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
|
const hostname = window.location.hostname;
|
||||||
|
|
||||||
|
if (excludedHosts.includes(hostname)) {
|
||||||
|
document.getElementById('disqus_thread').innerHTML =
|
||||||
|
'Disqus comments not available by default when the website is previewed locally.';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
data-input-position="{{- default `top` .inputPosition -}}"
|
data-input-position="{{- default `top` .inputPosition -}}"
|
||||||
data-theme="{{- default `light` .lightTheme -}}"
|
data-theme="{{- default `light` .lightTheme -}}"
|
||||||
data-lang="{{- default `en` .lang -}}"
|
data-lang="{{- default `en` .lang -}}"
|
||||||
|
data-loading="{{- .loading -}}"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
async
|
async
|
||||||
></script>
|
></script>
|
||||||
|
|||||||
@@ -15,11 +15,13 @@
|
|||||||
admin: ["{{- .admin -}}"],
|
admin: ["{{- .admin -}}"],
|
||||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||||
id: md5(location.pathname), // Max Location.pathname Legth:75 https://github.com/gitalk/gitalk/issues/102
|
id: md5(location.pathname), // Max Location.pathname Legth:75 https://github.com/gitalk/gitalk/issues/102
|
||||||
|
proxy: {{- .proxy -}},
|
||||||
});
|
});
|
||||||
(function () {
|
(function () {
|
||||||
if (
|
const excludedHosts = ["localhost", "127.0.0.1"];
|
||||||
["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1
|
const hostname = window.location.hostname;
|
||||||
) {
|
|
||||||
|
if (excludedHosts.includes(hostname)) {
|
||||||
document.getElementById("gitalk-container").innerHTML =
|
document.getElementById("gitalk-container").innerHTML =
|
||||||
"Gitalk comments not available by default when the website is previewed locally.";
|
"Gitalk comments not available by default when the website is previewed locally.";
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<script src="//cdn.jsdelivr.net/npm/[email protected].21/dist/twikoo.all.min.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/[email protected].44/dist/twikoo.all.min.js"></script>
|
||||||
<div id="tcomment"></div>
|
<div id="tcomment"></div>
|
||||||
<style>
|
<style>
|
||||||
.twikoo {
|
.twikoo {
|
||||||
@@ -24,8 +24,11 @@
|
|||||||
.twikoo .tk-preview-container,
|
.twikoo .tk-preview-container,
|
||||||
.twikoo .tk-content,
|
.twikoo .tk-content,
|
||||||
.twikoo .tk-nick,
|
.twikoo .tk-nick,
|
||||||
.twikoo .tk-send {
|
.twikoo .tk-send,
|
||||||
color: var(--twikoo-body-text-color-main);
|
.twikoo .tk-comments-no,
|
||||||
|
.twikoo .el-input__count,
|
||||||
|
.twikoo .tk-submit-action-icon {
|
||||||
|
color: var(--twikoo-body-text-color-main)!important;
|
||||||
}
|
}
|
||||||
.twikoo .el-button{
|
.twikoo .el-button{
|
||||||
color: var(--twikoo-body-text-color)!important;
|
color: var(--twikoo-body-text-color)!important;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
{{- with .Site.Params.comments.waline -}}
|
{{- with .Site.Params.comments.waline -}}
|
||||||
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
|
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
|
||||||
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}}
|
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" "turnstilekey" "turnstileKey" -}}
|
||||||
|
|
||||||
{{- range $key, $val := . -}}
|
{{- range $key, $val := . -}}
|
||||||
{{- if ne $val nil -}}
|
{{- if ne $val nil -}}
|
||||||
|
|||||||
@@ -14,4 +14,4 @@
|
|||||||
{{ $description = .Summary }}
|
{{ $description = .Summary }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ return ($description | plainify)}}
|
{{ return (replaceRE "\n" " " $description | plainify) }}
|
||||||
@@ -1,38 +1,20 @@
|
|||||||
{{- $title := .Title -}}
|
{{- $pageTitle := .Title -}}
|
||||||
{{- $siteTitle := .Site.Title -}}
|
{{- $siteTitle := .Site.Title -}}
|
||||||
|
{{- $paginator := partial "helper/paginator.html" . -}}
|
||||||
|
|
||||||
{{- if .IsHome -}}
|
{{- $title := slice -}}
|
||||||
<!-- Homepage, and it's pagination -->
|
|
||||||
|
|
||||||
<!-- Build paginator -->
|
{{- if $pageTitle }}
|
||||||
{{ $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
|
{{- $title = slice $pageTitle -}}
|
||||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
|
||||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
|
||||||
{{ $pag := .Paginate ($filtered) }}
|
|
||||||
|
|
||||||
{{ if .Paginator.HasPrev }}
|
|
||||||
<!-- Paginated. Append page number to title -->
|
|
||||||
{{ $title = printf "%s - %s" .Paginator $siteTitle }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $title = $siteTitle}}
|
|
||||||
{{ end }}
|
|
||||||
{{- else if eq .Kind "term" -}}
|
|
||||||
<!-- Taxonomy page -->
|
|
||||||
|
|
||||||
<!-- Build paginator -->
|
|
||||||
{{ $notHidden := where .Pages "Params.hidden" "!=" true }}
|
|
||||||
{{ $pag := .Paginate ($notHidden) }}
|
|
||||||
|
|
||||||
<!-- {TAXONOMY_TYPE}: {TAXONOMY_TERM} -->
|
|
||||||
{{ $title = slice (title .Data.Singular) ": " $title }}
|
|
||||||
|
|
||||||
{{ if .Paginator.HasPrev }}
|
|
||||||
<!-- Add page number-->
|
|
||||||
{{ $title = $title | append " - " .Paginator }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $title = $title | append " - " $siteTitle }}
|
|
||||||
{{ $title = delimit $title "" }}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ return $title }}
|
{{- if and $paginator $paginator.HasPrev -}}
|
||||||
|
<!-- Add page number-->
|
||||||
|
{{ $title = $title | append (printf "Page %d" $paginator.PageNumber) }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if not .IsPage -}}
|
||||||
|
{{ $title = $title | append $siteTitle }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ return delimit $title " - " }}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
|
{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
|
||||||
|
|
||||||
{{- $opts := dict "minify" hugo.IsProduction -}}
|
{{- $opts := dict "minify" hugo.IsProduction -}}
|
||||||
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
|
{{- $script := resources.Get "ts/main.ts" | js.Build $opts | fingerprint -}}
|
||||||
|
|
||||||
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
|
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
|
||||||
|
|
||||||
{{- with resources.Get "ts/custom.ts" -}}
|
{{- with resources.Get "ts/custom.ts" -}}
|
||||||
{{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
|
{{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
|
||||||
{{- $customScript := . | js.Build $opts -}}
|
{{- $customScript := . | js.Build $opts | fingerprint -}}
|
||||||
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
|
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- $ThemeVersion := "3.24.0" -}}
|
{{- $ThemeVersion := "3.34.0" -}}
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<section class="copyright">
|
<section class="copyright">
|
||||||
©
|
©
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||||
|
|
||||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
<meta name='description' content='{{ $description }}'>
|
<meta name='description' {{ printf "content=%q" $description | safeHTMLAttr }}>
|
||||||
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
||||||
|
|
||||||
{{- $title := partial "data/title" . -}}
|
{{- $title := partial "data/title" . -}}
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ with .Site.Params.favicon }}
|
{{ with .Site.Params.favicon }}
|
||||||
<link rel="shortcut icon" href="{{ . }}" />
|
<link rel="shortcut icon" href="{{ . | relURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- template "_internal/google_analytics.html" . -}}
|
{{- partial "google_analytics.html" . -}}
|
||||||
{{- partial "head/custom.html" . -}}
|
{{- partial "head/custom.html" . -}}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
|
|
||||||
<meta property='og:title' content='{{ $title }}'>
|
<meta property='og:title' {{ printf "content=%q" $title | safeHTMLAttr }}>
|
||||||
<meta property='og:description' content='{{ $description }}'>
|
<meta property='og:description' {{ printf "content=%q" $description | safeHTMLAttr }}>
|
||||||
<meta property='og:url' content='{{ .Permalink }}'>
|
<meta property='og:url' content='{{ .Permalink }}'>
|
||||||
<meta property='og:site_name' content='{{ .Site.Title }}'>
|
<meta property='og:site_name' content='{{ .Site.Title }}'>
|
||||||
<meta property='og:type' content='
|
<meta property='og:type' content='
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
|
|
||||||
<meta name="twitter:title" content="{{ $title }}">
|
<meta name="twitter:title" {{ printf "content=%q" $title | safeHTMLAttr }}>
|
||||||
<meta name="twitter:description" content="{{ $description }}">
|
<meta name="twitter:description" {{ printf "content=%q" $description | safeHTMLAttr }}>
|
||||||
|
|
||||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
|
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
|
||||||
{{- if $image.exists -}}
|
{{- if $image.exists -}}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{{ $sass := resources.Get "scss/style.scss" }}
|
{{ $sass := resources.Get "scss/style.scss" }}
|
||||||
{{ $style := $sass | resources.ToCSS | minify | resources.Fingerprint "sha256" }}
|
{{ $style := $sass | toCSS | minify | resources.Fingerprint "sha256" }}
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{{/*
|
||||||
|
This helper is used to generate a background color and text color from a string
|
||||||
|
Used to generate deterministic colors for tags, categories, etc.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- $str := . -}}
|
||||||
|
{{- $hash := hash.FNV32a $str -}}
|
||||||
|
{{- $h := mod $hash 360 -}}
|
||||||
|
|
||||||
|
{{- $backgroundColor := printf "hsl(%d, 60%%, 84%%)" $h -}}
|
||||||
|
{{- $textColor := printf "hsl(%d, 60%%, 15%%)" $h -}}
|
||||||
|
|
||||||
|
{{- return dict "BackgroundColor" $backgroundColor "TextColor" $textColor "Hue" $h -}}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{{- $pages := "" -}}
|
||||||
|
|
||||||
|
{{- if .IsHome -}}
|
||||||
|
{{ $pages = where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
|
||||||
|
{{ $pages = where $pages "Params.hidden" "!=" true }}
|
||||||
|
{{- else if eq .Kind "term" -}}
|
||||||
|
{{ $pages = where .Pages "Params.hidden" "!=" true }}
|
||||||
|
{{- else if or (eq .Kind "section") (eq .Kind "taxonomy") -}}
|
||||||
|
{{ $subsections := .Sections }}
|
||||||
|
{{ $pages = .Pages | complement $subsections }}
|
||||||
|
{{ $pages = where $pages "Params.hidden" "!=" true }}
|
||||||
|
|
||||||
|
{{- if eq (len $pages) 0 -}}
|
||||||
|
{{/* See complete logic in list.html */}}
|
||||||
|
{{- $pages = $subsections -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if $pages -}}
|
||||||
|
{{ $pages = .Paginate $pages }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ return $pages }}
|
||||||
@@ -1,26 +1,70 @@
|
|||||||
{{ if gt .Paginator.TotalPages 1 }}
|
{{- $pag := $.Paginator -}}
|
||||||
<nav class='pagination'>
|
{{- if gt $pag.TotalPages 1 -}}
|
||||||
{{ $.Scratch.Set "hasPrevDots" false }}
|
<nav class="pagination" role="navigation" aria-label="pagination">
|
||||||
{{ $.Scratch.Set "hasNextDots" false }}
|
{{- /* Previous page button */ -}}
|
||||||
|
<a class="page-link {{ if not $pag.Prev }}disabled{{ end }}"
|
||||||
|
{{- if $pag.Prev -}}href="{{ $pag.Prev.URL }}" {{- end -}}
|
||||||
|
aria-label="Previous page"
|
||||||
|
{{- if not $pag.Prev -}}aria-disabled="true"{{- end -}}>
|
||||||
|
{{ partial "helper/icon" "chevron-left" }}
|
||||||
|
</a>
|
||||||
|
|
||||||
{{ range .Paginator.Pagers }}
|
{{- /* Page numbers logic */ -}}
|
||||||
{{ if eq . $.Paginator }}
|
{{- $window := 4 -}}
|
||||||
<span class='page-link current'>
|
{{- $showFirst := true -}}
|
||||||
{{- .PageNumber -}}
|
{{- $showLast := true -}}
|
||||||
</span>
|
|
||||||
{{ else if or (or (eq . $.Paginator.First) (eq . $.Paginator.Prev)) (or (eq . $.Paginator.Next) (eq . $.Paginator.Last )) }}
|
{{- /* First page */ -}}
|
||||||
<a class='page-link' href='{{ .URL }}'>
|
<a class="page-link {{ if eq $pag.PageNumber 1 }}current{{ end }}" aria-label="Page 1"
|
||||||
{{- .PageNumber -}}
|
{{- if eq $pag.PageNumber 1 -}}aria-current="page" {{- end -}}
|
||||||
</a>
|
{{- if ne $pag.PageNumber 1 -}}href="{{ $pag.First.URL }}"{{- end -}}>
|
||||||
{{ else }}
|
1
|
||||||
{{ if and (not ($.Scratch.Get "hasPrevDots")) (lt .PageNumber $.Paginator.PageNumber) }}
|
</a>
|
||||||
{{ $.Scratch.Set "hasPrevDots" true }}
|
|
||||||
<span class='page-link dots'>…</span>
|
{{- /* Left ellipsis - show if current page is > 3 */ -}}
|
||||||
{{ else if and (not ($.Scratch.Get "hasNextDots")) (gt .PageNumber $.Paginator.PageNumber) }}
|
{{- if gt $pag.PageNumber 3 -}}
|
||||||
{{ $.Scratch.Set "hasNextDots" true }}
|
<span class="page-link pagination-link">
|
||||||
<span class='page-link dots'>…</span>
|
{{ partial "helper/icon" "dots" }}
|
||||||
{{ end }}
|
</span>
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
{{ end }}
|
|
||||||
</nav>
|
{{- /* Middle pages - show current and neighbors */ -}}
|
||||||
{{ end }}
|
{{- range $pag.Pagers -}}
|
||||||
|
{{- if and (gt .PageNumber 1) (lt .PageNumber $pag.TotalPages) -}}
|
||||||
|
{{- if and (ge .PageNumber (sub $pag.PageNumber $window)) (le .PageNumber (add $pag.PageNumber $window)) -}}
|
||||||
|
<a class="page-link {{ if eq .PageNumber $pag.PageNumber }}current{{ end }}"
|
||||||
|
{{- if eq .PageNumber $pag.PageNumber -}}aria-current="page" {{- end -}} href="{{ .URL }}"
|
||||||
|
aria-label="Page {{ .PageNumber }}">
|
||||||
|
{{ .PageNumber }}
|
||||||
|
</a>
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- /* Right ellipsis - show if current page is < last-2 */ -}}
|
||||||
|
{{- if lt $pag.PageNumber (sub $pag.TotalPages 2) -}}
|
||||||
|
<span class="page-link pagination-link">
|
||||||
|
{{ partial "helper/icon" "dots" }}
|
||||||
|
</span>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- /* Last page (if more than 1 page total) */ -}}
|
||||||
|
|
||||||
|
{{- if gt $pag.TotalPages 1 -}}
|
||||||
|
<a class="page-link {{ if eq $pag.PageNumber $pag.TotalPages }}current{{ end }}"
|
||||||
|
{{- if ne $pag.PageNumber $pag.TotalPages -}}href="{{ $pag.Last.URL }}" {{- end -}}
|
||||||
|
aria-label="Page {{ $pag.TotalPages }}"
|
||||||
|
{{- if eq $pag.PageNumber $pag.TotalPages -}}aria-current="page"{{- end -}}>
|
||||||
|
{{ $pag.TotalPages }}
|
||||||
|
</a>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- /* Next page button */ -}}
|
||||||
|
<a class="page-link {{ if not $pag.Next }}disabled{{ end }}"
|
||||||
|
{{- if $pag.Next -}}href="{{ $pag.Next.URL }}" {{- end -}}
|
||||||
|
aria-label="Next page"
|
||||||
|
{{- if not $pag.Next -}}aria-disabled="true"{{- end -}}>
|
||||||
|
{{ partial "helper/icon" "chevron-right" }}
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
{{- end -}}
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{- with .Site.Menus.social -}}
|
{{- with .Site.Menus.social -}}
|
||||||
<ol class="social-menu">
|
<ol class="menu-social">
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
@@ -60,12 +60,12 @@
|
|||||||
<ol class="menu" id="main-menu">
|
<ol class="menu" id="main-menu">
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
{{ $active := or (eq $currentPage.RelPermalink .URL) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||||
<li {{ if $active }} class='current' {{ end }}>
|
<li {{ if $active }} class='current' {{ end }}>
|
||||||
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||||
{{ $icon := default .Pre .Params.Icon }}
|
{{ $icon := default .Pre .Params.Icon }}
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://docs.stack.jimmycai.com/configuration/custom-menu.html" .URL }}
|
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://stack.jimmycai.com/config/menu" .URL }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with $icon }}
|
{{ with $icon }}
|
||||||
{{ partial "helper/icon" . }}
|
{{ partial "helper/icon" . }}
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
|
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
|
||||||
|
|
||||||
{{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }}
|
{{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }}
|
||||||
{{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }}
|
{{ $filtered := where $pages "Params.hidden" "!=" true }}
|
||||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
|
||||||
{{ $archives := $filtered.GroupByDate "2006" }}
|
{{ $archives := $filtered.GroupByDate "2006" }}
|
||||||
|
|
||||||
<div class="widget-archive--list">
|
<div class="widget-archive--list">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<div class="tagCloud-tags">
|
<div class="tagCloud-tags">
|
||||||
{{ range first $limit $context.Site.Taxonomies.tags.ByCount }}
|
{{ range first $limit $context.Site.Taxonomies.tags.ByCount }}
|
||||||
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
|
<a href="{{ .Page.RelPermalink }}">
|
||||||
{{ .Page.Title }}
|
{{ .Page.Title }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
[build]
|
|
||||||
publish = "exampleSite/public"
|
|
||||||
|
|
||||||
[build.environment]
|
|
||||||
HUGO_VERSION = "0.123.8"
|
|
||||||
HUGO_THEME = "repo"
|
|
||||||
|
|
||||||
[context.production]
|
|
||||||
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${URL}"
|
|
||||||
[context.production.environment]
|
|
||||||
HUGO_ENV = "production"
|
|
||||||
|
|
||||||
[context.branch-deploy]
|
|
||||||
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}"
|
|
||||||
|
|
||||||
[context.deploy-preview]
|
|
||||||
command = "cd exampleSite && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}"
|
|
||||||
|
|
||||||
[[plugins]]
|
|
||||||
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"
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
name = "hugo-theme-stack"
|
||||||
|
compatibility_date = "2026-01-25"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
command = "chmod a+x ./.ci/build.sh && ./.ci/build.sh"
|
||||||
|
|
||||||
|
[assets]
|
||||||
|
directory = "demo/public"
|
||||||
|
not_found_handling = "404-page"
|
||||||