thing
This commit is contained in:
parent
b94c2359b7
commit
96c966c274
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/public
|
||||
/resources/_gen
|
||||
|
@ -1,4 +0,0 @@
|
||||
baseURL = 'https://www.gardling.com'
|
||||
languageCode = 'en-us'
|
||||
title = 'Simon Gardling'
|
||||
theme = "hugo-theme-monochrome"
|
@ -1,5 +1,3 @@
|
||||
## My Information
|
||||
|
||||
[My own gitea :)](https://git.gardling.com)
|
||||
|
||||
[Github: titaniumtown](https://github.com/titaniumtown)
|
||||
@ -27,3 +25,6 @@ This website is a landing page for myself. It also contains some information as
|
||||
### How did I make this site
|
||||
|
||||
I originally used [lowdown](https://github.com/kristapsdz/lowdown) and [ssg5](https://github.com/fmash16/ssg5) in order to generate this site from markdown files. But I recently switched to using [Hugo](https://github.com/gohugoio/hugo) with the [Monochrome theme](https://github.com/kaiiiz/hugo-theme-monochrome).
|
||||
|
||||
|
||||
<!-- {{< hugo-neko/oneko >}} -->
|
||||
|
5
go.mod
Normal file
5
go.mod
Normal file
@ -0,0 +1,5 @@
|
||||
module gardling.com
|
||||
|
||||
go 1.23.6
|
||||
|
||||
require github.com/ystepanoff/hugo-neko v1.0.1 // indirect
|
2
go.sum
Normal file
2
go.sum
Normal file
@ -0,0 +1,2 @@
|
||||
github.com/ystepanoff/hugo-neko v1.0.1 h1:PZwBQb+CoE6Ou8wF5z9FJ5xG8paWlRN+ykVS5YlCHLw=
|
||||
github.com/ystepanoff/hugo-neko v1.0.1/go.mod h1:1walgyMiIrU8IKHJ7JAHqZ/iM1Anqxv9lWaf5Clck8k=
|
9
hugo.toml
Normal file
9
hugo.toml
Normal file
@ -0,0 +1,9 @@
|
||||
baseURL = 'https://www.gardling.com'
|
||||
languageCode = 'en-us'
|
||||
title = 'Simon Gardling'
|
||||
theme = "hugo-PaperMod"
|
||||
contentDir = "content"
|
||||
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = "github.com/ystepanoff/hugo-neko"
|
8
push.sh
8
push.sh
@ -1,11 +1,9 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set -e
|
||||
# set -e
|
||||
|
||||
hugo --minify
|
||||
|
||||
rsync -rvz --delete public/ server-public:/tank/services/http/ \
|
||||
--exclude={"/ytbn", "/hdr_plus", "/caddy"}
|
||||
rsync -rvz --delete --exclude={"/hdr_plus" "/caddy" "/cdn"} public/ server:/tank/services/http/
|
||||
|
||||
rsync -rvz --delete ~/projects/integral_site/titaniumtown.github.io/ server-public:/tank/services/http/ytbn/ \
|
||||
--exclude={".git"}
|
||||
# rsync -rvz --delete ~/projects/integral_site/titaniumtown.github.io/ server-public:/tank/services/http/ytbn/
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"Target":"style.min.fae245b6ce34259555eab2b011d31eb69cfeb04f46398e9c82df62439ad6edea66fa04d14a95b4bbf3ce9679be82b4badfed247f9962c2af62f53d0f389b424f.css","MediaType":"text/css","Data":{"Integrity":"sha512-+uJFts40JZVV6rKwEdMetpz+sE9GOY6cgt9iQ5rW7epm+gTRSpW0u/POlnm+grS63+0kf5liwq9i9T0POJtCTw=="}}
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"Target":"style.min.5ad6f871a848133f8894763c3c794e85e28779e8b81e823beba7bb6063f50e2b908186e33799ea1182e9c090f94855c586b5f90edfd8d11a02eac66f354b0b1e.css","MediaType":"text/css","Data":{"Integrity":"sha512-Wtb4cahIEz+IlHY8PHlOheKHeei4HoI766e7YGP1DiuQgYbjN5nqEYLpwJD5SFXFhrX5Dt/Y0RoC6sZvNUsLHg=="}}
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"Target":"style.min.79ee4530e2218018d2c114e16552697a0e232ecbf3214e8103a24d37cf0225b3.css","MediaType":"text/css","Data":{"Integrity":"sha256-ee5FMOIhgBjSwRThZVJpeg4jLsvzIU6BA6JNN88CJbM="}}
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"Target":"style.min.fae245b6ce34259555eab2b011d31eb69cfeb04f46398e9c82df62439ad6edea66fa04d14a95b4bbf3ce9679be82b4badfed247f9962c2af62f53d0f389b424f.css","MediaType":"text/css","Data":{"Integrity":"sha512-+uJFts40JZVV6rKwEdMetpz+sE9GOY6cgt9iQ5rW7epm+gTRSpW0u/POlnm+grS63+0kf5liwq9i9T0POJtCTw=="}}
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
{"Target":"style.css","MediaType":"text/css","Data":{}}
|
1
themes/hugo-PaperMod
Submodule
1
themes/hugo-PaperMod
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 243ba38a34ce03a6c44c1eed36e22bc992ccc019
|
@ -1,41 +0,0 @@
|
||||
name: github pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: main
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
ssh-key: ${{ secrets.SSH_PRIVATE }}
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: '0.115.4'
|
||||
extended: true
|
||||
|
||||
- name: Setup public
|
||||
run: git worktree add -B gh-pages ./exampleSite/public origin/gh-pages
|
||||
|
||||
- name: Clean public
|
||||
run: rm -rf ./exampleSite/public/*
|
||||
|
||||
- name: Build
|
||||
run: hugo -s exampleSite --baseURL https://kaiiiz.github.io/hugo-theme-monochrome --themesDir=../.. --minify --environment production
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.ACCESS_TOKEN }}
|
||||
deploy_key: ${{ secrets.SSH_PRIVATE }}
|
||||
publish_dir: ./exampleSite/public
|
||||
publish_branch: gh-pages
|
||||
|
@ -1,22 +0,0 @@
|
||||
name: github pages
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: dev
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
ssh-key: ${{ secrets.SSH_PRIVATE }}
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
draft: true
|
158
themes/hugo-theme-monochrome/.gitignore
vendored
158
themes/hugo-theme-monochrome/.gitignore
vendored
@ -1,158 +0,0 @@
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/node
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=node
|
||||
|
||||
### Node ###
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
.env*.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/node
|
||||
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/macos
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=macos
|
||||
|
||||
### macOS ###
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/macos
|
||||
|
||||
# Ignore files generated from Hugo build
|
||||
/assets/jsconfig.json
|
||||
.hugo_build.lock
|
@ -1,20 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 kaiiiz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,57 +0,0 @@
|
||||
<p align="center">
|
||||
<a href="https://kaiiiz.github.io/hugo-theme-monochrome">
|
||||
<img alt="Monochrome" src="https://github.com/kaiiiz/hugo-theme-monochrome/blob/dev/images/screenshot.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h2 align="center">
|
||||
Monochrome
|
||||
</h2>
|
||||
|
||||
<p align="center">
|
||||
A fast, clean and responsive hugo theme
|
||||
</p>
|
||||
|
||||
## Demo & Documents
|
||||
|
||||
See [kaiiiz.github.io/hugo-theme-monochrome](https://kaiiiz.github.io/hugo-theme-monochrome)
|
||||
|
||||
## Features
|
||||
|
||||
1. **Clean UI with small resources.** Monochrome has clean UI design with ~5KB gzipped bundled CSS.
|
||||
|
||||
2. **Self-Contained.** Monochrome doesn't require webpack, nodejs and other dependencies to setup or edit, just hugo.
|
||||
|
||||
3. **Responsive layout.** Adapt to different viewpoint, from desktop to mobile.
|
||||
|
||||
4. **Support light/dark mode.** Low-light UI.
|
||||
|
||||
5. **Multiple layouts built-in.** Monochrome now supports 6 different layouts. See [Demo](https://kaiiiz.github.io/hugo-theme-monochrome/layouts/).
|
||||
|
||||
6. **Nested navbar and Multilingual mode.** Make good use of hugo's well-designed structure.
|
||||
|
||||
7. **Syntax Highlighting (with copy feature).** Integrate both server-side solution (Chroma, hugo built-in) and client-side solution (Prism.js, for someone who need more languages supported).
|
||||
|
||||
8. **Site Search with real-time matches highlight.** Powered by Fuse.js.
|
||||
|
||||
9. **SEO-friendly.** Easily change your author, description, keywords, open graph, twitter card meatdata.
|
||||
|
||||
10. **Support mathematical notation.** Powered by MathJax.
|
||||
|
||||
11. **Useful shortcodes.** See [Document](https://kaiiiz.github.io/hugo-theme-monochrome/shortcodes/).
|
||||
|
||||
## Installation
|
||||
|
||||
See [Setup](https://kaiiiz.github.io/hugo-theme-monochrome/setup)
|
||||
|
||||
## Configuration
|
||||
|
||||
See [Configuration](https://kaiiiz.github.io/hugo-theme-monochrome/configuration/)
|
||||
|
||||
## Acknowledgement
|
||||
|
||||
* [PrismJS/prism](https://github.com/PrismJS/prism)
|
||||
* [krisk/Fuse](https://github.com/krisk/Fuse)
|
||||
* [mathjax/MathJax](https://github.com/mathjax/MathJax)
|
||||
* [kingdido999/zooming](https://github.com/kingdido999/zooming)
|
||||
* [feathericons/feather](https://github.com/feathericons/feather)
|
@ -1,2 +0,0 @@
|
||||
+++
|
||||
+++
|
@ -1,78 +0,0 @@
|
||||
function registerHoverEvent(wrapper, button) {
|
||||
wrapper.addEventListener('mouseenter', function () {
|
||||
button.classList.remove("hidden");
|
||||
});
|
||||
wrapper.addEventListener('mouseleave', function () {
|
||||
button.classList.add("hidden");
|
||||
});
|
||||
}
|
||||
|
||||
function registerTouchedEvent(pre, button) {
|
||||
pre.addEventListener("touchend", function () {
|
||||
if (button.classList.contains("hidden")) {
|
||||
button.classList.remove("hidden");
|
||||
} else {
|
||||
button.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function registerClipboard(button, code_block) {
|
||||
button.addEventListener('click', async function () {
|
||||
try {
|
||||
await navigator.clipboard.writeText(code_block.innerText);
|
||||
button.blur();
|
||||
button.innerText = 'Copied!';
|
||||
setTimeout(function () {
|
||||
button.innerText = 'Copy';
|
||||
}, 2000);
|
||||
} catch (e) {
|
||||
button.innerText = 'Error';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", function () {
|
||||
document.querySelectorAll('pre:not(.emgithub-pre) > code').forEach((code_block) => {
|
||||
var button = document.createElement('span');
|
||||
button.className = 'copy-code-button hidden';
|
||||
button.type = 'button';
|
||||
button.innerText = 'Copy';
|
||||
|
||||
var pre = code_block.parentNode;
|
||||
if (pre.parentNode.classList.contains('highlight')) {
|
||||
var highlight = pre.parentNode;
|
||||
highlight.appendChild(button);
|
||||
registerHoverEvent(highlight, button);
|
||||
registerTouchedEvent(pre, button);
|
||||
registerClipboard(button, code_block);
|
||||
} else if (pre.parentNode.tagName === "TD") {
|
||||
// check is line no
|
||||
var td = pre.parentNode;
|
||||
var tr = td.parentNode;
|
||||
if (td === tr.firstChild) {
|
||||
return;
|
||||
}
|
||||
// get highlight block
|
||||
var highlight = pre.parentNode;
|
||||
while (!highlight.classList.contains('highlight') && highlight.tagName !== 'BODY') {
|
||||
highlight = highlight.parentNode;
|
||||
}
|
||||
if (highlight.tagName !== 'BODY') {
|
||||
highlight.appendChild(button);
|
||||
registerHoverEvent(highlight, button);
|
||||
registerTouchedEvent(pre, button);
|
||||
registerClipboard(button, code_block);
|
||||
}
|
||||
} else {
|
||||
var wrapper = document.createElement('div');
|
||||
wrapper.style = "position: relative;"
|
||||
pre.parentNode.insertBefore(wrapper, pre);
|
||||
wrapper.appendChild(pre);
|
||||
wrapper.appendChild(button);
|
||||
registerHoverEvent(wrapper, button);
|
||||
registerTouchedEvent(pre, button);
|
||||
registerClipboard(button, code_block);
|
||||
}
|
||||
});
|
||||
});
|
@ -1,74 +0,0 @@
|
||||
var currentScript = document.currentScript;
|
||||
|
||||
function removeMask (container) {
|
||||
const emgithubPre = container.querySelector(".emgithub-pre");
|
||||
const emgithubLoading = container.querySelector(".emgithub-loading");
|
||||
emgithubLoading.classList.add("hide");
|
||||
emgithubPre.classList.remove("hide");
|
||||
emgithubPre.classList.remove("loading");
|
||||
}
|
||||
|
||||
function embedTextToEle (codeText, container, lang, lineBegin, lineEnd) {
|
||||
const emgithubPre = container.querySelector(".emgithub-pre");
|
||||
const emgithubCode = document.createElement("code");
|
||||
emgithubPre.appendChild(emgithubCode);
|
||||
|
||||
if (lineBegin > 0) {
|
||||
const codeTextSplit = codeText.split("\n");
|
||||
codeText = codeTextSplit.slice(lineBegin - 1, lineEnd).join("\n") + '\n';
|
||||
}
|
||||
|
||||
// Dynamically adjust padding of pre to fit in the line numbers
|
||||
const lineBeginDigit = lineBegin.toString().length;
|
||||
const lineEndDigit = lineEnd.toString().length;
|
||||
if (lineBeginDigit >= 4 || lineEndDigit >= 4) {
|
||||
emgithubPre.style.paddingLeft = "4.5rem";
|
||||
} else if (lineBeginDigit >= 3 || lineEndDigit >= 3) {
|
||||
emgithubPre.style.paddingLeft = "4rem";
|
||||
} else if (lineBeginDigit >= 2 || lineEndDigit >= 2) {
|
||||
emgithubPre.style.paddingLeft = "3.5rem";
|
||||
}
|
||||
|
||||
emgithubCode.classList.add(`language-${lang}`);
|
||||
emgithubCode.textContent = codeText;
|
||||
Prism.highlightAllUnder(container, false, () => {
|
||||
requestAnimationFrame(() => {
|
||||
removeMask(container);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function embedErrorToEle (errText, container) {
|
||||
const emgithubPre = container.querySelector(".emgithub-code .emgithub-pre");
|
||||
const emgithubCode = document.createElement("code");
|
||||
emgithubPre.appendChild(emgithubCode);
|
||||
|
||||
emgithubPre.classList.remove("line-numbers");
|
||||
emgithubPre.classList.add("no-line-numbers");
|
||||
emgithubCode.textContent = errText;
|
||||
|
||||
removeMask(container);
|
||||
}
|
||||
|
||||
async function embed () {
|
||||
const sourceURL = new URL(currentScript.src);
|
||||
const params = sourceURL.searchParams;
|
||||
const rawFileURL = new URL(params.get("raw_file_url"));
|
||||
const lang = params.get("lang");
|
||||
const id = params.get("id");
|
||||
const lineBegin = Number(params.get("line_begin"));
|
||||
const lineEnd = Number(params.get("line_end"));
|
||||
|
||||
const emgithubContainer = document.getElementById(id);
|
||||
const response = await fetch(rawFileURL);
|
||||
if (response.ok) {
|
||||
const text = await response.text();
|
||||
embedTextToEle(text, emgithubContainer, lang, lineBegin, lineEnd);
|
||||
} else {
|
||||
embedErrorToEle(`Failed to process ${rawFileURL}\n${response.status}`, emgithubContainer);
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
embed();
|
||||
});
|
@ -1,46 +0,0 @@
|
||||
function hide_canvas() {
|
||||
const sidebar_canvas_overlay = document.getElementById("sidebar_canvas_overlay");
|
||||
sidebar_canvas_overlay.classList.add("hidden");
|
||||
}
|
||||
|
||||
function show_canvas() {
|
||||
const sidebar_canvas_overlay = document.getElementById("sidebar_canvas_overlay");
|
||||
sidebar_canvas_overlay.classList.remove("hidden");
|
||||
}
|
||||
|
||||
function hide_sidebar() {
|
||||
const sidebar = document.getElementById("sidebar");
|
||||
sidebar.classList.add("close");
|
||||
}
|
||||
|
||||
function show_sidebar() {
|
||||
const sidebar = document.getElementById("sidebar");
|
||||
sidebar.classList.remove("close");
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
const sidebar_btn = document.getElementById("sidebar_btn");
|
||||
sidebar_btn.addEventListener("click", function() {
|
||||
show_canvas();
|
||||
show_sidebar();
|
||||
});
|
||||
|
||||
const sidebar_canvas_overlay = document.getElementById("sidebar_canvas_overlay");
|
||||
sidebar_canvas_overlay.addEventListener("click", function() {
|
||||
hide_canvas();
|
||||
hide_sidebar();
|
||||
});
|
||||
|
||||
const dark_mode_btn = document.getElementById("dark_mode_btn");
|
||||
const light_mode_btn = document.getElementById("light_mode_btn");
|
||||
|
||||
dark_mode_btn.addEventListener('click', function() {
|
||||
document.documentElement.setAttribute("data-theme", "dark");
|
||||
localStorage.theme = 'dark';
|
||||
});
|
||||
|
||||
light_mode_btn.addEventListener('click', function() {
|
||||
document.documentElement.setAttribute("data-theme", "light");
|
||||
localStorage.theme = 'light';
|
||||
});
|
||||
});
|
@ -1,11 +0,0 @@
|
||||
window.MathJax = {
|
||||
tex: {
|
||||
inlineMath: [['$', '$']],
|
||||
displayMath: [['$$', '$$']],
|
||||
processEscapes: true,
|
||||
processEnvironments: true
|
||||
},
|
||||
options: {
|
||||
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
||||
}
|
||||
};
|
@ -1 +0,0 @@
|
||||
Prism.plugins.autoloader.languages_path = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/';
|
@ -1,13 +0,0 @@
|
||||
function highlight() {
|
||||
document.querySelectorAll("pre:not(.emgithub-pre)").forEach(e => {
|
||||
Prism.highlightAllUnder(e, false, () => {
|
||||
requestAnimationFrame(() => {
|
||||
e.classList.remove("hide");
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
highlight();
|
||||
})
|
@ -1,143 +0,0 @@
|
||||
import * as params from '@params';
|
||||
import Fuse from '../lib/js/fuse-v6.6.2.min.js';
|
||||
|
||||
async function init() {
|
||||
const data = fetch(params.index_url);
|
||||
|
||||
const search_btn = document.getElementById("search_btn");
|
||||
const search_menu_wrapper = document.getElementById("search_menu_wrapper");
|
||||
const search_menu_close_btn = document.getElementById("search_menu_close_btn");
|
||||
const search_menu_input = document.getElementById("search_menu_input");
|
||||
const search_menu_results = document.getElementById("search_menu_results");
|
||||
|
||||
search_btn.addEventListener("click", function() {
|
||||
search_menu_wrapper.classList.remove("hidden");
|
||||
search_menu_input.focus();
|
||||
});
|
||||
|
||||
search_menu_close_btn.addEventListener("click", function() {
|
||||
search_menu_wrapper.classList.add("hidden");
|
||||
});
|
||||
|
||||
const index_json = await (await data).json();
|
||||
const options = {
|
||||
distance: 100,
|
||||
threshold: 0.3,
|
||||
ignoreLocation: true,
|
||||
minMatchCharLength: 2,
|
||||
keys: [
|
||||
'title',
|
||||
'permalink',
|
||||
'content',
|
||||
],
|
||||
includeMatches: true,
|
||||
};
|
||||
const fuse = new Fuse(index_json, options);
|
||||
|
||||
const createItem = (title, permalink, content) => {
|
||||
return `<a href="${permalink}">
|
||||
<div class="search-menu-result-item">
|
||||
<div class="search-menu-result-item-title">${title}</div>
|
||||
<div class="search-menu-result-item-content">${content}</div>
|
||||
</div>
|
||||
</a>`;
|
||||
};
|
||||
|
||||
const hlItem = (item, matches) => {
|
||||
const highlightTitle = (text, match) => {
|
||||
let textHl = "", ptr = 0;
|
||||
match.forEach(idx => {
|
||||
if (ptr < idx[0]) {
|
||||
textHl += text.substring(ptr, idx[0]);
|
||||
}
|
||||
textHl += "<mark>" + text.substring(idx[0], idx[1] + 1) + "</mark>";
|
||||
ptr = idx[1] + 1;
|
||||
})
|
||||
textHl += text.substring(ptr, text.length);
|
||||
return textHl;
|
||||
};
|
||||
|
||||
const highlightContent = (text, match) => {
|
||||
let textHl = "<mark>" + text.substring(match[0][0], match[0][1] + 1) + "</mark>";
|
||||
let ptr = match[0][1] + 1;
|
||||
let length = match[0][1] + 1 - match[0][0];
|
||||
if (match[0][0] > 0) {
|
||||
textHl = "..." + textHl;
|
||||
}
|
||||
for (let i = 1; i < match.length; i++) {
|
||||
const idx = match[i];
|
||||
if (ptr < idx[0] && (length + idx[0] - ptr) >= 100) {
|
||||
textHl += text.substring(ptr, ptr + (100 - length + 1)) + "...";
|
||||
length = 100;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ptr < idx[0]) {
|
||||
textHl += text.substring(ptr, idx[0]);
|
||||
length += idx[0] - ptr;
|
||||
}
|
||||
textHl += "<mark>" + text.substring(idx[0], idx[1] + 1) + "</mark>";
|
||||
length += idx[1] + 1 - idx[0];
|
||||
ptr = idx[1] + 1;
|
||||
if (length >= 100) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (length < 100) {
|
||||
textHl += text.substring(ptr, ptr + (100 - length));
|
||||
}
|
||||
if (ptr <= text.length) {
|
||||
textHl += "...";
|
||||
}
|
||||
return textHl;
|
||||
}
|
||||
|
||||
let itemHl = {
|
||||
title: undefined,
|
||||
permalink: item.permalink,
|
||||
content: undefined,
|
||||
};
|
||||
matches.forEach(match => {
|
||||
if (match.key == 'title') {
|
||||
itemHl.title = highlightTitle(item.title, match.indices);
|
||||
} else if (match.key == 'content') {
|
||||
itemHl.content = highlightContent(item.content, match.indices);
|
||||
}
|
||||
});
|
||||
if (itemHl.title === undefined) itemHl.title = item.title;
|
||||
if (itemHl.content === undefined) itemHl.content = item.content;
|
||||
return itemHl;
|
||||
}
|
||||
|
||||
const buildAllItems = () => {
|
||||
search_menu_results.innerHTML = index_json.reduce((acc, curr) => {
|
||||
let content = (curr.content.length > 100) ? curr.content.substring(0, 100) + "..." : curr.content;
|
||||
return acc + createItem(curr.title, curr.permalink, content);
|
||||
}, "");
|
||||
};
|
||||
|
||||
const search = (value) => {
|
||||
const results = fuse.search(value);
|
||||
|
||||
if (results.length == 0) {
|
||||
search_menu_results.innerHTML = '';
|
||||
} else {
|
||||
search_menu_results.innerHTML = results.reduce((acc, curr) => {
|
||||
const item = hlItem(curr.item, curr.matches);
|
||||
return acc + createItem(item.title, item.permalink, item.content);
|
||||
}, "")
|
||||
}
|
||||
};
|
||||
|
||||
search_menu_input.addEventListener("input", function() {
|
||||
if (this.value === '') {
|
||||
buildAllItems();
|
||||
} else {
|
||||
search(this.value.trim());
|
||||
}
|
||||
});
|
||||
|
||||
buildAllItems();
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", init);
|
@ -1,27 +0,0 @@
|
||||
import Zooming from '../lib/js/zooming-v2.1.1.min.js';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
let bgColor;
|
||||
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
||||
bgColor = '#333';
|
||||
} else {
|
||||
bgColor = '#fff';
|
||||
}
|
||||
|
||||
zooming = new Zooming({
|
||||
transitionDuration: 0.2,
|
||||
bgColor: bgColor,
|
||||
});
|
||||
zooming.listen('#content img');
|
||||
|
||||
const dark_mode_btn = document.getElementById("dark_mode_btn");
|
||||
const light_mode_btn = document.getElementById("light_mode_btn");
|
||||
|
||||
dark_mode_btn.addEventListener('click', function () {
|
||||
zooming.config({bgColor: '#333'});
|
||||
});
|
||||
|
||||
light_mode_btn.addEventListener('click', function () {
|
||||
zooming.config({bgColor: '#fff'});
|
||||
});
|
||||
});
|
@ -1,300 +0,0 @@
|
||||
/* PrismJS 1.27.0
|
||||
https://prismjs.com/download.html#themes=prism-tomorrow */
|
||||
/**
|
||||
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
|
||||
* Based on https://github.com/chriskempson/tomorrow-theme
|
||||
* @author Rose Pritchard
|
||||
*/
|
||||
|
||||
/* !!! Be aware that this file is modified version for hugo-theme-monochrome */
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #ddd;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
/* margin: 0.5em 0; */
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* :not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #2d2d2d;
|
||||
} */
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0.1em;
|
||||
border-radius: 0.3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.block-comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.attr-name,
|
||||
.token.namespace,
|
||||
.token.deleted {
|
||||
color: #e2777a;
|
||||
}
|
||||
|
||||
.token.function-name {
|
||||
color: #6196cc;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.function {
|
||||
color: #f08d49;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.class-name,
|
||||
.token.constant,
|
||||
.token.symbol {
|
||||
color: #f8c555;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.important,
|
||||
.token.atrule,
|
||||
.token.keyword,
|
||||
.token.builtin {
|
||||
color: #cc99cd;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.attr-value,
|
||||
.token.regex,
|
||||
.token.variable {
|
||||
color: #7ec699;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url {
|
||||
color: #67cdcc;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
color: green;
|
||||
}
|
||||
|
||||
/* line-numbers */
|
||||
|
||||
pre[class*="language-"].line-numbers {
|
||||
position: relative;
|
||||
padding-left: 3.8em;
|
||||
counter-reset: linenumber;
|
||||
}
|
||||
|
||||
pre[class*="language-"].line-numbers > code {
|
||||
position: relative;
|
||||
white-space: inherit;
|
||||
}
|
||||
|
||||
.line-numbers .line-numbers-rows {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
top: 0;
|
||||
font-size: 100%;
|
||||
left: -3.8em;
|
||||
min-width: 3em;
|
||||
/* width: 3em; /* works for line-numbers below 1000 lines */
|
||||
letter-spacing: -1px;
|
||||
border-right: 1px solid #999;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span {
|
||||
display: block;
|
||||
counter-increment: linenumber;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
content: counter(linenumber);
|
||||
color: #999;
|
||||
display: block;
|
||||
padding-right: 0.8em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* toolbar */
|
||||
|
||||
div.code-toolbar {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 0.3em;
|
||||
right: 0.2em;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
div.code-toolbar:hover > .toolbar {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Separate line b/c rules are thrown out if selector is invalid.
|
||||
IE11 and old Edge versions don't support :focus-within. */
|
||||
div.code-toolbar:focus-within > .toolbar {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item > a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item > button {
|
||||
background: none;
|
||||
border: 0;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
line-height: normal;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
-webkit-user-select: none; /* for button */
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item > a,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > button,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > span {
|
||||
color: #bbb;
|
||||
font-size: 0.8em;
|
||||
padding: 0 0.5em;
|
||||
background: #f5f2f0;
|
||||
background: rgba(224, 224, 224, 0.2);
|
||||
box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2);
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar > .toolbar-item > a:hover,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > a:focus,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > button:hover,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > button:focus,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > span:hover,
|
||||
div.code-toolbar > .toolbar > .toolbar-item > span:focus {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line highlight */
|
||||
.line-highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: inherit 0;
|
||||
margin-top: 1em; /* Same as .prism’s padding-top */
|
||||
|
||||
background: hsla(50, 100%, 83%, 0.2);
|
||||
/* background: linear-gradient(to right, hsla(24, 20%, 50%, 0.1) 70%, hsla(24, 20%, 50%, 0)); */
|
||||
|
||||
pointer-events: none;
|
||||
|
||||
line-height: inherit;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.line-highlight {
|
||||
/*
|
||||
* This will prevent browsers from replacing the background color with white.
|
||||
* It's necessary because the element is layered on top of the displayed code.
|
||||
*/
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
}
|
||||
|
||||
.line-highlight:before,
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-start);
|
||||
position: absolute;
|
||||
top: 0.4em;
|
||||
left: 0.6em;
|
||||
min-width: 1em;
|
||||
padding: 0 0.5em;
|
||||
background-color: hsla(24, 20%, 50%, 0.4);
|
||||
color: hsl(24, 20%, 95%);
|
||||
font: bold 65%/1.5 sans-serif;
|
||||
text-align: center;
|
||||
vertical-align: 0.3em;
|
||||
border-radius: 999px;
|
||||
text-shadow: none;
|
||||
box-shadow: 0 1px white;
|
||||
}
|
||||
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-end);
|
||||
top: auto;
|
||||
bottom: 0.4em;
|
||||
}
|
||||
|
||||
.line-numbers .line-highlight:before,
|
||||
.line-numbers .line-highlight:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows {
|
||||
pointer-events: all;
|
||||
}
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows > span:before {
|
||||
cursor: pointer;
|
||||
}
|
||||
pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
|
||||
background-color: rgba(128, 128, 128, 0.2);
|
||||
}
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 59 KiB |
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
!function() { function t(t) { var e = document.createElement("textarea"); e.value = t.getText(), e.style.top = "0", e.style.left = "0", e.style.position = "fixed", document.body.appendChild(e), e.focus(), e.select(); try { var o = document.execCommand("copy"); setTimeout((function() { o ? t.success() : t.error() }), 1) } catch (e) { setTimeout((function() { t.error(e) }), 1) } document.body.removeChild(e) } "undefined" != typeof Prism && "undefined" != typeof document && (Prism.plugins.toolbar ? Prism.plugins.toolbar.registerButton("copy-to-clipboard", (function(e) { var o = e.element, n = function(t) { var e = { copy: "Copy", "copy-error": "Press Ctrl+C to copy", "copy-success": "Copied!", "copy-timeout": 5e3 }; for (var o in e) { for (var n = "data-prismjs-" + o, c = t; c && !c.hasAttribute(n);)c = c.parentElement; c && (e[o] = c.getAttribute(n)) } return e }(o), c = document.createElement("button"); c.className = "copy-to-clipboard-button", c.setAttribute("type", "button"); var r = document.createElement("span"); return c.appendChild(r), u("copy"), function(e, o) { e.addEventListener("click", (function() { !function(e) { navigator.clipboard ? navigator.clipboard.writeText(e.getText()).then(e.success, (function() { t(e) })) : t(e) }(o) })) }(c, { getText: function() { return o.textContent }, success: function() { u("copy-success"), i() }, error: function() { u("copy-error"), setTimeout((function() { !function(t) { window.getSelection().selectAllChildren(t) }(o) }), 1), i() } }), c; function i() { setTimeout((function() { u("copy") }), n["copy-timeout"]) } function u(t) { r.textContent = n[t], c.setAttribute("data-copy-state", t) } })) : console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")) }();
|
@ -1,3 +0,0 @@
|
||||
/* PrismJS 1.27.0
|
||||
https://prismjs.com/download.html#themes=prism-tomorrow&plugins=line-numbers */
|
||||
!function() { if ("undefined" != typeof Prism && "undefined" != typeof document) { var e = "line-numbers", n = /\n(?!$)/g, t = Prism.plugins.lineNumbers = { getLine: function(n, t) { if ("PRE" === n.tagName && n.classList.contains(e)) { var i = n.querySelector(".line-numbers-rows"); if (i) { var r = parseInt(n.getAttribute("data-start"), 10) || 1, s = r + (i.children.length - 1); t < r && (t = r), t > s && (t = s); var l = t - r; return i.children[l] } } }, resize: function(e) { r([e]) }, assumeViewportIndependence: !0 }, i = void 0; window.addEventListener("resize", (function() { t.assumeViewportIndependence && i === window.innerWidth || (i = window.innerWidth, r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers")))) })), Prism.hooks.add("complete", (function(t) { if (t.code) { var i = t.element, s = i.parentNode; if (s && /pre/i.test(s.nodeName) && !i.querySelector(".line-numbers-rows") && Prism.util.isActive(i, e)) { i.classList.remove(e), s.classList.add(e); var l, o = t.code.match(n), a = o ? o.length + 1 : 1, u = new Array(a + 1).join("<span></span>"); (l = document.createElement("span")).setAttribute("aria-hidden", "true"), l.className = "line-numbers-rows", l.innerHTML = u, s.hasAttribute("data-start") && (s.style.counterReset = "linenumber " + (parseInt(s.getAttribute("data-start"), 10) - 1)), t.element.appendChild(l), r([s]), Prism.hooks.run("line-numbers", t) } } })), Prism.hooks.add("line-numbers", (function(e) { e.plugins = e.plugins || {}, e.plugins.lineNumbers = !0 })) } function r(e) { if (0 != (e = e.filter((function(e) { var n, t = (n = e, n ? window.getComputedStyle ? getComputedStyle(n) : n.currentStyle || null : null)["white-space"]; return "pre-wrap" === t || "pre-line" === t }))).length) { var t = e.map((function(e) { var t = e.querySelector("code"), i = e.querySelector(".line-numbers-rows"); if (t && i) { var r = e.querySelector(".line-numbers-sizer"), s = t.textContent.split(n); r || ((r = document.createElement("span")).className = "line-numbers-sizer", t.appendChild(r)), r.innerHTML = "0", r.style.display = "block"; var l = r.getBoundingClientRect().height; return r.innerHTML = "", { element: e, lines: s, lineHeights: [], oneLinerHeight: l, sizer: r } } })).filter(Boolean); t.forEach((function(e) { var n = e.sizer, t = e.lines, i = e.lineHeights, r = e.oneLinerHeight; i[t.length - 1] = void 0, t.forEach((function(e, t) { if (e && e.length > 1) { var s = n.appendChild(document.createElement("span")); s.style.display = "block", s.textContent = e } else i[t] = r })) })), t.forEach((function(e) { for (var n = e.sizer, t = e.lineHeights, i = 0, r = 0; r < t.length; r++)void 0 === t[r] && (t[r] = n.children[i++].getBoundingClientRect().height) })), t.forEach((function(e) { var n = e.sizer, t = e.element.querySelector(".line-numbers-rows"); n.style.display = "none", n.innerHTML = "", e.lineHeights.forEach((function(e, n) { t.children[n].style.height = e + "px" })) })) } } }();
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,108 +0,0 @@
|
||||
html, button, input, select, textarea,
|
||||
.pure-g [class *= "pure-u"] {
|
||||
font-family: system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji;
|
||||
}
|
||||
|
||||
code, kbd, pre {
|
||||
font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,liberation mono,courier new,monospace;
|
||||
}
|
||||
|
||||
main {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
@include font-bold;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@include text-3xl;
|
||||
}
|
||||
|
||||
h2 {
|
||||
@include text-2xl;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@include text-xl;
|
||||
}
|
||||
|
||||
h4 {
|
||||
@include text-lg;
|
||||
}
|
||||
|
||||
h5 {
|
||||
@include text-base;
|
||||
}
|
||||
|
||||
h6 {
|
||||
@include text-sm;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: var(--color-background);
|
||||
color: var(--color-text);
|
||||
border: none;
|
||||
}
|
||||
|
||||
mark {
|
||||
background-color: var(--color-background-mark);
|
||||
}
|
||||
|
||||
details > summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
details[open] > summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.content-margin {
|
||||
@include my-8;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (min-width: $sm_min_width) {
|
||||
main {
|
||||
width: $sm_main_width;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: $md_min_width) {
|
||||
main {
|
||||
width: $md_main_width;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: $lg_min_width) {
|
||||
main {
|
||||
width: $lg_main_width;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: $xl_min_width) {
|
||||
main {
|
||||
width: $xl_main_width;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: $xxl_min_width) {
|
||||
main {
|
||||
width: $xxl_main_width;
|
||||
}
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
$gray-0: #fff;
|
||||
$gray-50: #f7f7f7;
|
||||
$gray-100: #f5f5f5;
|
||||
$gray-150: #ededed;
|
||||
$gray-200: #e5e5e5;
|
||||
$gray-250: #dddddd;
|
||||
$gray-300: #d4d4d4;
|
||||
$gray-350: #bcbcbc;
|
||||
$gray-400: #a3a3a3;
|
||||
$gray-450: #8b8b8b;
|
||||
$gray-500: #737373;
|
||||
$gray-550: #636363;
|
||||
$gray-600: #525252;
|
||||
$gray-650: #494949;
|
||||
$gray-700: #404040;
|
||||
$gray-750: #333333;
|
||||
$gray-800: #262626;
|
||||
$gray-850: #1f1f1f;
|
||||
$gray-900: #171717;
|
||||
$gray-1000: #000;
|
||||
|
||||
html[data-theme="light"] {
|
||||
--color-text: #{$gray-900};
|
||||
--color-text-secondary: #{$gray-500};
|
||||
--color-text-footer: #{$gray-500};
|
||||
--color-border: #{$gray-300};
|
||||
--color-border-collapsible-menu: #{$gray-200};
|
||||
--color-background: #{$gray-0};
|
||||
--color-background-hover: #{$gray-50};
|
||||
--color-background-overlay: #{$gray-150};
|
||||
--color-background-inline-code: #{$gray-100};
|
||||
--color-background-card: #{$gray-0};
|
||||
--color-background-mark: #fff1a7;
|
||||
--color-link: #2563eb;
|
||||
--color-navbar-item-inactive: #{$gray-400};
|
||||
--color-navbar-item-active: #{$gray-900};
|
||||
--color-navbar-item-in-section: #{$gray-600};
|
||||
}
|
||||
|
||||
html[data-theme="dark"] {
|
||||
--color-text: #{$gray-150};
|
||||
--color-text-secondary: #{$gray-450};
|
||||
--color-text-footer: #{$gray-400};
|
||||
--color-border: #{$gray-500};
|
||||
--color-border-collapsible-menu: #{$gray-550};
|
||||
--color-background: #{$gray-750};
|
||||
--color-background-hover: #{$gray-600};
|
||||
--color-background-overlay: #{$gray-700};
|
||||
--color-background-inline-code: #{$gray-600};
|
||||
--color-background-card: #{$gray-700};
|
||||
--color-background-mark: #fff1a7;
|
||||
--color-link: #93c5fd;
|
||||
--color-navbar-item-inactive: #{$gray-400};
|
||||
--color-navbar-item-active: #{$gray-100};
|
||||
--color-navbar-item-in-section: #{$gray-250};
|
||||
}
|
||||
|
||||
// Default color settings
|
||||
|
||||
html {
|
||||
color: var(--color-text);
|
||||
background: var(--color-background);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-link);
|
||||
text-decoration: none;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
.breadcrumbs {
|
||||
@include font-bold;
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
color: var(--color-text);
|
||||
border-bottom: 2px solid transparent;
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
display: inline;
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
#TableOfContents {
|
||||
line-height: 1.5rem;
|
||||
|
||||
ul, li {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul ul {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-top: .375rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-text);
|
||||
}
|
||||
}
|
||||
|
||||
article#collapsible_menu_changelogs {
|
||||
line-height: 1.75rem;
|
||||
display: grid;
|
||||
gap: .5rem;
|
||||
grid-template-columns: max-content 1fr;
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
.collapsible-menu-wrapper {
|
||||
@include my-8;
|
||||
font-size: 0.875rem;
|
||||
padding: 1rem;
|
||||
border: 2px solid var(--color-border-collapsible-menu);
|
||||
border-radius: .25rem;
|
||||
|
||||
.collapsible-menu-type {
|
||||
span {
|
||||
@include font-bold;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
summary.collapsible-menu-type {
|
||||
span {
|
||||
margin-left: .3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.collapsible-menu {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
.color-block {
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.75rem;
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
.emgithub-container {
|
||||
@include my-6;
|
||||
|
||||
.emgithub-code {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.emgithub-loading {
|
||||
@include mx-auto;
|
||||
@include my-4;
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 2rem;
|
||||
|
||||
&.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
animation: spin 1s linear infinite;
|
||||
color: white;
|
||||
fill: #969696;
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.emgithub-pre {
|
||||
@include my-0;
|
||||
border-bottom-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
|
||||
&.loading {
|
||||
min-height: 5rem;
|
||||
}
|
||||
|
||||
code {
|
||||
tab-size: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.emgithub-toolbar {
|
||||
@include text-xs;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding: 0.75rem 0.75rem 0.625rem 0.75rem;
|
||||
border-bottom-right-radius: 0.375rem;
|
||||
border-bottom-left-radius: 0.375rem;
|
||||
background-color: $gray-900;
|
||||
|
||||
a {
|
||||
@include font-semibold;
|
||||
color: white;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
footer {
|
||||
@include my-4;
|
||||
@include text-xs;
|
||||
text-align: center;
|
||||
color: var(--color-text-footer);
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
html[data-theme="dark"] {
|
||||
#dark_mode_btn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
html[data-theme="light"] {
|
||||
#light_mode_btn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 1rem 0;
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
a {
|
||||
@include text-3xl;
|
||||
@include font-bold;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
#sidebar_btn {
|
||||
display: flex;
|
||||
margin-right: 0.5rem;
|
||||
|
||||
@media screen and (min-width: $md_min_width) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toolbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 0.5rem;
|
||||
|
||||
.toolbox-btn {
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-wrapper {
|
||||
.dropdown-btn.pure-menu-link {
|
||||
color: unset;
|
||||
}
|
||||
|
||||
.dropdown-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
|
||||
&:hover {
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dropdown-desc {
|
||||
@include text-sm;
|
||||
margin-left: 0.35rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
.icon-group {
|
||||
@include my-4;
|
||||
display: inline-grid;
|
||||
grid-auto-flow: column;
|
||||
gap: 0.375rem;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
.icon {
|
||||
display: inline-block;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
|
||||
a {
|
||||
color: var(--color-text);
|
||||
|
||||
&:hover {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,202 +0,0 @@
|
||||
/*!
|
||||
Pure v2.1.0
|
||||
Copyright 2013 Yahoo!
|
||||
Licensed under the BSD License.
|
||||
https://github.com/pure-css/pure/blob/master/LICENSE
|
||||
*/
|
||||
/*csslint adjoining-classes: false, box-model:false*/
|
||||
|
||||
.pure-menu {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pure-menu-fixed {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.pure-menu-list, .pure-menu-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pure-menu-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pure-menu-item {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
@include text-sm;
|
||||
}
|
||||
|
||||
.pure-menu-link, .pure-menu-heading {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* HORIZONTAL MENU */
|
||||
|
||||
.pure-menu-horizontal {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
|
||||
.pure-menu-list {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pure-menu-item, .pure-menu-heading, .pure-menu-separator {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initial menus should be inline-block so that they are horizontal */
|
||||
|
||||
/* Submenus should still be display: block; */
|
||||
|
||||
.pure-menu-item .pure-menu-item {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pure-menu-children {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
z-index: 3;
|
||||
|
||||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.pure-menu-horizontal .pure-menu-children {
|
||||
left: 0;
|
||||
top: auto;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.pure-menu-allow-hover:hover > .pure-menu-children, .pure-menu-active > .pure-menu-children {
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* Vertical Menus - show the dropdown arrow */
|
||||
|
||||
.pure-menu-has-children > .pure-menu-link:after {
|
||||
padding-left: 0.35rem;
|
||||
font-family: sans-serif;
|
||||
content: "▸";
|
||||
}
|
||||
|
||||
/* Horizontal Menus - show the dropdown arrow */
|
||||
|
||||
.pure-menu-horizontal .pure-menu-has-children > .pure-menu-link:after {
|
||||
font-family: sans-serif;
|
||||
content: "▾";
|
||||
}
|
||||
|
||||
/* scrollable menus */
|
||||
|
||||
.pure-menu-scrollable {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
.pure-menu-list {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.pure-menu-horizontal.pure-menu-scrollable {
|
||||
.pure-menu-list {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
white-space: nowrap;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
|
||||
/* a little extra padding for this style to allow for scrollbars */
|
||||
padding: .5em 0;
|
||||
}
|
||||
|
||||
/* misc default styling */
|
||||
|
||||
.pure-menu-separator {
|
||||
background-color: #ccc;
|
||||
height: 1px;
|
||||
margin: .3em 0;
|
||||
}
|
||||
|
||||
.pure-menu-horizontal {
|
||||
.pure-menu-children .pure-menu-separator {
|
||||
background-color: #ccc;
|
||||
height: 1px;
|
||||
margin: .3em 0;
|
||||
}
|
||||
|
||||
.pure-menu-separator {
|
||||
width: 1px;
|
||||
height: 1.3em;
|
||||
margin: 0 0.3em;
|
||||
}
|
||||
|
||||
.pure-menu-children .pure-menu-separator {
|
||||
display: block;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Need to reset the separator since submenu is vertical */
|
||||
|
||||
.pure-menu-heading {
|
||||
text-transform: uppercase;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.pure-menu-link {
|
||||
color: var(--color-text);
|
||||
@include text-sm;
|
||||
}
|
||||
|
||||
.pure-menu-children {
|
||||
background-color: var(--color-background);
|
||||
}
|
||||
|
||||
.pure-menu-link, .pure-menu-heading {
|
||||
padding: .5rem;
|
||||
}
|
||||
|
||||
.pure-menu-disabled {
|
||||
opacity: .5;
|
||||
|
||||
.pure-menu-link:hover {
|
||||
background-color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.pure-menu-active > .pure-menu-link {
|
||||
background-color: var(--color-background-hover);
|
||||
}
|
||||
|
||||
.pure-menu-link {
|
||||
&:hover, &:focus {
|
||||
background-color: var(--color-background-hover);
|
||||
}
|
||||
}
|
||||
|
||||
.pure-menu-selected > .pure-menu-link {
|
||||
color: var(--color-navbar-item-active);
|
||||
|
||||
&:visited {
|
||||
color: var(--color-navbar-item-active);
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
#navbar {
|
||||
margin: 1rem 0;
|
||||
|
||||
@media screen and (max-width: $md_min_width) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
> ul.pure-menu-list {
|
||||
display: flex;
|
||||
|
||||
.navbar-dropdown {
|
||||
> a.pure-menu-link:after {
|
||||
content: "▾";
|
||||
}
|
||||
|
||||
> ul.pure-menu-children {
|
||||
left: 0;
|
||||
top: 27px;
|
||||
width: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-item {
|
||||
margin: 0 .5rem 0 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
|
||||
> a.pure-menu-link {
|
||||
@include font-medium;
|
||||
padding: 0 0 .3rem 0;
|
||||
color: var(--color-navbar-item-inactive);
|
||||
|
||||
&:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: var(--color-navbar-item-active);
|
||||
|
||||
> a {
|
||||
color: var(--color-navbar-item-active);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-item.active {
|
||||
border-bottom-color: var(--color-navbar-item-active);
|
||||
|
||||
> a {
|
||||
color: var(--color-navbar-item-active);
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-item.insection {
|
||||
border-bottom-color: var(--color-navbar-item-in-section);
|
||||
|
||||
> a {
|
||||
color: var(--color-navbar-item-in-section);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
.pagination {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
display: inline;
|
||||
margin: 0 .1rem;
|
||||
}
|
||||
|
||||
a, span {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
li.active a {
|
||||
@include font-semibold;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
li:not(.disabled) a:hover {
|
||||
color: var(--color-text);
|
||||
|
||||
span {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.postcard-layout {
|
||||
.pagination {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
#search_menu_wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 40;
|
||||
background-color: rgba(0,0,0,.75);
|
||||
|
||||
mark {
|
||||
background-color: unset;
|
||||
color: unset;
|
||||
border-bottom: 2px solid var(--color-text);
|
||||
}
|
||||
|
||||
#search_menu {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
background-color: var(--color-background);
|
||||
|
||||
@media screen and (min-width: $sm_min_width) {
|
||||
height: auto;
|
||||
top: 6rem;
|
||||
bottom: 6rem;
|
||||
width: 30rem;
|
||||
z-index: 50;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
#search_menu_toolbar {
|
||||
display: flex;
|
||||
min-height: 2.5rem;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
|
||||
#search_menu_input_wrapper {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
|
||||
input {
|
||||
@include px-4;
|
||||
flex-grow: 1;
|
||||
border-top-left-radius: 0.375rem;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
#search_menu_close_btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 2.5rem;
|
||||
border-top-right-radius: 0.375rem;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-background-overlay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#search_menu_results {
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
|
||||
.search-menu-result-item {
|
||||
@include px-4;
|
||||
padding-top: 0.875rem;
|
||||
padding-bottom: 0.875rem;
|
||||
min-height: 2.5rem;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-background-overlay);
|
||||
}
|
||||
|
||||
.search-menu-result-item-title {
|
||||
@include font-bold;
|
||||
line-height: 1.7rem;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.search-menu-result-item-content {
|
||||
@include text-xs;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
#sidebar_canvas_overlay {
|
||||
background-color: rgba(0,0,0,.75);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
z-index: 20;
|
||||
background-color: var(--color-background);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
transform: translateX(0);
|
||||
transition: transform 0.2s;
|
||||
overflow-y: auto;
|
||||
width: 60%;
|
||||
|
||||
@media screen and (min-width: $sm_min_width) {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
summary span {
|
||||
margin-left: .2rem;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 1.2rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-text);
|
||||
}
|
||||
}
|
||||
|
||||
#sidebar.close {
|
||||
display: block;
|
||||
transform: translateX(-100%);
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
.term-item {
|
||||
@include list-link-item;
|
||||
margin-right: 0.375rem;
|
||||
line-height: 1.7rem;
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
@import 'purecss/base';
|
||||
|
||||
@import 'mixins/text';
|
||||
@import 'mixins/margin';
|
||||
@import 'mixins/padding';
|
||||
@import 'mixins/items';
|
||||
|
||||
@import 'color';
|
||||
@import 'vars';
|
||||
|
||||
@import 'base';
|
||||
@import 'layout/article';
|
||||
@import 'layout/bookcase';
|
||||
@import 'layout/gallery';
|
||||
@import 'layout/balloon';
|
||||
@import 'layout/list';
|
||||
@import 'layout/postcard';
|
||||
@import 'layout/term';
|
||||
@import 'components/header';
|
||||
@import 'components/footer';
|
||||
@import 'components/menus';
|
||||
@import 'components/nav';
|
||||
@import 'components/collapsible-menu';
|
||||
@import 'components/emgithub';
|
||||
@import 'components/terms-cloud';
|
||||
@import 'components/icon';
|
||||
@import 'components/breadcrumbs';
|
||||
@import 'components/color-block';
|
||||
@import 'components/icon-group';
|
||||
@import 'components/search-menu';
|
||||
@import 'components/sidebar';
|
||||
@import 'components/pagination';
|
@ -1,197 +0,0 @@
|
||||
article {
|
||||
line-height: 1.7;
|
||||
|
||||
> *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
> *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
@include my-8;
|
||||
}
|
||||
|
||||
p {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: disc;
|
||||
@include my-2;
|
||||
|
||||
p {
|
||||
@include my-0;
|
||||
}
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
@include my-4;
|
||||
padding-left: 1.3rem;
|
||||
}
|
||||
|
||||
ol {
|
||||
li {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
@include my-2;
|
||||
|
||||
li:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
@include px-4;
|
||||
@include my-6;
|
||||
@include mx-0;
|
||||
border-left: 2px solid var(--color-border);
|
||||
|
||||
p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
@include my-0;
|
||||
}
|
||||
}
|
||||
|
||||
code { /* Inline code style */
|
||||
border-radius: .25rem;
|
||||
padding: .2rem .375rem .2rem .375rem;
|
||||
background-color: var(--color-background-inline-code);
|
||||
}
|
||||
|
||||
pre {
|
||||
@include my-6;
|
||||
padding: 1rem;
|
||||
overflow-x: auto;
|
||||
border-radius: .5rem;
|
||||
background-color: $gray-850;
|
||||
color: $gray-50;
|
||||
|
||||
code { /* Disable inline code style */
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
pre.mc-prism.hide code { /* Smooth transition for prism.js */
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
pre.mc-prism code { /* Smooth transition for prism.js */
|
||||
opacity: 1;
|
||||
transition: opacity 0.1s ease-in;
|
||||
}
|
||||
|
||||
.code-toolbar {
|
||||
.toolbar-item {
|
||||
@include mx-1;
|
||||
}
|
||||
}
|
||||
|
||||
.highlight {
|
||||
@include my-6;
|
||||
position: relative;
|
||||
|
||||
.code-toolbar {
|
||||
padding: 0;
|
||||
|
||||
pre {
|
||||
padding: 1rem;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
}
|
||||
|
||||
> div,
|
||||
> pre {
|
||||
padding: 0.75rem;
|
||||
border-radius: 0.375rem;
|
||||
overflow-x: auto;
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
|
||||
code { /* Disable inline code style */
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copy-code-button {
|
||||
@include text-xs;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 1.5rem;
|
||||
top: -1.5rem;
|
||||
padding-left: 0.375rem;
|
||||
padding-right: 0.375rem;
|
||||
border-radius: .25rem;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-background-hover);
|
||||
}
|
||||
}
|
||||
|
||||
table.mc-table {
|
||||
@include my-6;
|
||||
table-layout: auto;
|
||||
border-collapse: collapse;
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
|
||||
td, th {
|
||||
@include px-3;
|
||||
@include py-2;
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
}
|
||||
|
||||
figure {
|
||||
@include my-4;
|
||||
text-align: center;
|
||||
|
||||
figcaption {
|
||||
@include my-2;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
@include mx-auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
html[data-theme='dark'] {
|
||||
.twitter-tweet {
|
||||
color: var(--color-text);
|
||||
|
||||
a {
|
||||
color: var(--color-link);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,152 +0,0 @@
|
||||
%balloon-item-base {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@media screen and (min-width: $md_min_width) {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
%balloon-item-line-base {
|
||||
width: 7rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
|
||||
@media screen and (max-width: $md_min_width) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
%balloon-item-content-base {
|
||||
display: flex;
|
||||
flex: 1 1 0%;
|
||||
margin-left: -12px;
|
||||
|
||||
@media screen and (max-width: $md_min_width) {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.balloon-layout {
|
||||
@media screen and (min-width: $md_min_width) {
|
||||
margin-left: -1.75rem;
|
||||
}
|
||||
|
||||
.balloon-head-item {
|
||||
@extend %balloon-item-base;
|
||||
width: 100%;
|
||||
gap: 20px;
|
||||
|
||||
.balloon-head-item-desktop {
|
||||
@extend %balloon-item-line-base;
|
||||
}
|
||||
|
||||
.balloon-head-item-mobile {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
|
||||
@media screen and (min-width: $md_min_width) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.balloon-head-item-img-light, .balloon-head-item-img-dark {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.balloon-head-item-img {
|
||||
img {
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
}
|
||||
|
||||
.rounded {
|
||||
border-radius: 9999px;
|
||||
}
|
||||
}
|
||||
|
||||
.balloon-head-item-content {
|
||||
@extend %balloon-item-content-base;
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
|
||||
@media screen and (max-width: $md_min_width) {
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.balloon-title-item {
|
||||
@extend %balloon-item-base;
|
||||
|
||||
.balloon-title-item-line {
|
||||
@extend %balloon-item-line-base;
|
||||
}
|
||||
|
||||
.balloon-title-item-content {
|
||||
@extend %balloon-item-content-base;
|
||||
|
||||
@media screen and (max-width: $md_min_width) {
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.balloon-card-item {
|
||||
@extend %balloon-item-base;
|
||||
|
||||
.balloon-card-item-line {
|
||||
@extend %balloon-item-line-base;
|
||||
}
|
||||
|
||||
.balloon-card-item-content {
|
||||
@extend %balloon-item-content-base;
|
||||
@include text-sm;
|
||||
overflow: auto;
|
||||
border-radius: 0.375rem;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
background-color: var(--color-background-card);
|
||||
padding: 1rem 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.balloon-dot {
|
||||
width: .8rem;
|
||||
height: .8rem;
|
||||
border-radius: 1rem;
|
||||
margin: 0.25rem 0;
|
||||
border: 2px solid var(--color-text);
|
||||
}
|
||||
|
||||
.balloon-line-container {
|
||||
display: flex;
|
||||
flex: 1 1 0%;
|
||||
justify-content: center;
|
||||
|
||||
.balloon-line {
|
||||
background-color: var(--color-text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
html[data-theme="dark"] {
|
||||
.balloon-head-item {
|
||||
.balloon-head-item-img-light {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
html[data-theme="light"] {
|
||||
.balloon-head-item {
|
||||
.balloon-head-item-img-dark {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
.bookcase-layout {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
grid-template-columns: repeat(auto-fill, 8rem);
|
||||
|
||||
.bookcase-item {
|
||||
figure {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
@include text-sm;
|
||||
text-align: center;
|
||||
margin-top: .7rem;
|
||||
|
||||
a {
|
||||
color: var(--color-text);
|
||||
}
|
||||
}
|
||||
|
||||
img, .bookcase-item-overlay {
|
||||
width: 8rem;
|
||||
height: 12rem;
|
||||
border-radius: 0.375rem;
|
||||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.bookcase-item-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: transparent;
|
||||
opacity: 0.25;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-background-overlay);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
html[data-theme="light"] {
|
||||
.bookcase-item-img-dark {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
html[data-theme="dark"] {
|
||||
.bookcase-item-img-light {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
@ -1,46 +0,0 @@
|
||||
.gallery-layout {
|
||||
figure {
|
||||
@media screen and (min-width: $md_min_width) {
|
||||
margin-left: -1.25rem;
|
||||
margin-right: -1.25rem;
|
||||
}
|
||||
|
||||
img {
|
||||
@include mx-auto;
|
||||
}
|
||||
}
|
||||
|
||||
figcaption {
|
||||
@include my-2;
|
||||
@include text-xs;
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.gallery-item {
|
||||
margin-bottom: 4rem;
|
||||
}
|
||||
|
||||
.gallery-item-title {
|
||||
margin: 1rem 0;
|
||||
|
||||
a {
|
||||
@include list-link-item;
|
||||
}
|
||||
|
||||
span {
|
||||
@include text-3xl;
|
||||
@include font-bold;
|
||||
}
|
||||
}
|
||||
|
||||
.gallery-item-content {
|
||||
@include my-4;
|
||||
}
|
||||
|
||||
.gallery-item-statistic {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
grid-template-columns: max-content 1fr;
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
ul.list-layout {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
margin-bottom: .5rem;
|
||||
line-height: 1.625;
|
||||
display: list-item;
|
||||
list-style-type: none;
|
||||
|
||||
a {
|
||||
@include list-link-item;
|
||||
line-height: 1.7rem;
|
||||
}
|
||||
|
||||
span {
|
||||
@include text-xs;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
.postcard-layout {
|
||||
a {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.postcard-item {
|
||||
padding: 1rem;
|
||||
background-color: var(--color-background-card);
|
||||
border-radius: .375rem;
|
||||
margin: 2rem 0;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-background-hover);
|
||||
}
|
||||
|
||||
.postcard-title {
|
||||
@include text-xl;
|
||||
@include font-medium;
|
||||
}
|
||||
|
||||
.postcard-summary {
|
||||
@include text-xs;
|
||||
color: var(--color-text-secondary);
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin: .5rem 0;
|
||||
}
|
||||
|
||||
.postcard-metadata {
|
||||
@include text-xs;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
.term-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 2rem 0;
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
@mixin list-link-item {
|
||||
color: var(--color-text);
|
||||
border-bottom: 2px solid var(--color-border);
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
@mixin my-0 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@mixin my-2 {
|
||||
margin-top: .5rem;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
@mixin my-4 {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
@mixin my-6 {
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
@mixin my-8 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
@mixin mx-auto {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
@mixin mx-0 {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
@mixin mx-1 {
|
||||
margin-left: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
@mixin mx-2 {
|
||||
margin-left: .5rem;
|
||||
margin-right: .5rem;
|
||||
}
|
||||
@mixin mx-4 {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
@mixin mx-6 {
|
||||
margin-left: 1.5rem;
|
||||
margin-right: 1.5rem;
|
||||
}
|
||||
@mixin mx-8 {
|
||||
margin-left: 2rem;
|
||||
margin-right: 2rem;
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
@mixin py-0 {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
@mixin py-2 {
|
||||
padding-top: .5rem;
|
||||
padding-bottom: .5rem;
|
||||
}
|
||||
@mixin py-4 {
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
@mixin py-6 {
|
||||
padding-top: 1.5rem;
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
@mixin py-8 {
|
||||
padding-top: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
@mixin px-0 {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
@mixin px-2 {
|
||||
padding-left: .5rem;
|
||||
padding-right: .5rem;
|
||||
}
|
||||
@mixin px-3 {
|
||||
padding-left: .75rem;
|
||||
padding-right: .75rem;
|
||||
}
|
||||
@mixin px-4 {
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
@mixin px-6 {
|
||||
padding-left: 1.5rem;
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
@mixin px-8 {
|
||||
padding-left: 2rem;
|
||||
padding-right: 2rem;
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
@mixin text-xs {
|
||||
font-size: 0.75rem; /* 12px */
|
||||
line-height: 1rem; /* 16px */
|
||||
}
|
||||
@mixin text-sm {
|
||||
font-size: 0.875rem; /* 14px */
|
||||
line-height: 1.25rem; /* 20px */
|
||||
}
|
||||
@mixin text-base {
|
||||
font-size: 1rem; /* 16px */
|
||||
line-height: 1.5rem; /* 24px */
|
||||
}
|
||||
@mixin text-lg {
|
||||
font-size: 1.125rem; /* 18px */
|
||||
line-height: 1.75rem; /* 28px */
|
||||
}
|
||||
@mixin text-xl {
|
||||
font-size: 1.25rem; /* 20px */
|
||||
line-height: 1.75rem; /* 28px */
|
||||
}
|
||||
@mixin text-2xl {
|
||||
font-size: 1.375rem; /* 22px */
|
||||
line-height: 1.875rem; /* 30px */
|
||||
}
|
||||
@mixin text-3xl {
|
||||
font-size: 1.5rem; /* 24px */
|
||||
line-height: 2rem; /* 32px */
|
||||
}
|
||||
|
||||
@mixin font-thin {
|
||||
font-weight: 100;
|
||||
}
|
||||
@mixin font-extralight {
|
||||
font-weight: 200;
|
||||
}
|
||||
@mixin font-light {
|
||||
font-weight: 300;
|
||||
}
|
||||
@mixin font-normal {
|
||||
font-weight: 400;
|
||||
}
|
||||
@mixin font-medium {
|
||||
font-weight: 500;
|
||||
}
|
||||
@mixin font-semibold {
|
||||
font-weight: 600;
|
||||
}
|
||||
@mixin font-bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
@mixin font-extrabold {
|
||||
font-weight: 800;
|
||||
}
|
||||
@mixin font-black {
|
||||
font-weight: 900;
|
||||
}
|
@ -1,431 +0,0 @@
|
||||
/*!
|
||||
Pure v2.1.0
|
||||
Copyright 2013 Yahoo!
|
||||
Licensed under the BSD License.
|
||||
https://github.com/pure-css/pure/blob/master/LICENSE
|
||||
*/
|
||||
/*!
|
||||
normalize.css v | MIT License | git.io/normalize
|
||||
Copyright (c) Nicolas Gallagher and Jonathan Neal
|
||||
*/
|
||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15;
|
||||
|
||||
/* 1 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
|
||||
/* 1 */
|
||||
height: 0;
|
||||
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace;
|
||||
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
|
||||
/* 1 */
|
||||
text-decoration: underline;
|
||||
|
||||
/* 2 */
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b, strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code, kbd, samp {
|
||||
font-family: monospace, monospace;
|
||||
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub, sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button, input, optgroup, select, textarea {
|
||||
font-family: inherit;
|
||||
|
||||
/* 1 */
|
||||
font-size: 100%;
|
||||
|
||||
/* 1 */
|
||||
line-height: 1.15;
|
||||
|
||||
/* 1 */
|
||||
margin: 0;
|
||||
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button, input {
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button, select {
|
||||
/* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button, [type="button"], [type="reset"], [type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
|
||||
/* 2 */
|
||||
display: table;
|
||||
|
||||
/* 1 */
|
||||
max-width: 100%;
|
||||
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
|
||||
/* 3 */
|
||||
white-space: normal;
|
||||
|
||||
/* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"], [type="radio"] {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"] {
|
||||
&::-webkit-inner-spin-button, &::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
|
||||
/* 1 */
|
||||
outline-offset: -2px;
|
||||
|
||||
/* 2 */
|
||||
|
||||
&::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
|
||||
/* 1 */
|
||||
font: inherit;
|
||||
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template, [hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
/*csslint important:false*/
|
||||
|
||||
/* ==========================================================================
|
||||
Pure Base Extras
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Extra rules that Pure adds on top of Normalize.css
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
/**
|
||||
* Always hide an element when it has the `hidden` HTML attribute.
|
||||
*/
|
||||
|
||||
.hidden, [hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add this class to an image to make it fit within it's fluid parent wrapper while maintaining
|
||||
* aspect ratio.
|
||||
*/
|
||||
|
||||
.pure-img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
$sm_min_width: 35.5rem;
|
||||
$md_min_width: 48rem;
|
||||
$lg_min_width: 64rem;
|
||||
$xl_min_width: 80rem;
|
||||
$xxl_min_width: 120rem;
|
||||
|
||||
$sm_main_width: 100%;
|
||||
$md_main_width: 80%;
|
||||
$lg_main_width: 55%;
|
||||
$xl_main_width: 55%;
|
||||
$xxl_main_width: 55%;
|
||||
|
133
themes/hugo-theme-monochrome/exampleSite/.gitignore
vendored
133
themes/hugo-theme-monochrome/exampleSite/.gitignore
vendored
@ -1,133 +0,0 @@
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/node
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=node
|
||||
|
||||
### Node ###
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
.env*.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/node
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/hugo
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=hugo
|
||||
|
||||
### Hugo ###
|
||||
# Generated files by hugo
|
||||
/public/
|
||||
|
||||
# Executable may be added to repository
|
||||
hugo.exe
|
||||
hugo.darwin
|
||||
hugo.linux
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/hugo
|
@ -1,16 +0,0 @@
|
||||
baseURL = "https://example.com"
|
||||
languageCode = "en"
|
||||
title = "Monochrome"
|
||||
theme = "hugo-theme-monochrome"
|
||||
defaultContentLanguage = "en"
|
||||
enableEmoji = true
|
||||
paginate = 5
|
||||
enableGitInfo = true
|
||||
|
||||
[taxonomies]
|
||||
category = "categories"
|
||||
tag = "tags"
|
||||
series = "series"
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "JSON"]
|
@ -1,11 +0,0 @@
|
||||
[en]
|
||||
contentDir = "content/en"
|
||||
languageName = "English"
|
||||
languageCode = "en"
|
||||
weight = 1
|
||||
|
||||
[zh-tw]
|
||||
contentDir = "content/zh-tw"
|
||||
languageName = "正體中文"
|
||||
languageCode = "zh-tw"
|
||||
weight = 2
|
@ -1,16 +0,0 @@
|
||||
[goldmark.renderer]
|
||||
unsafe= true
|
||||
|
||||
[highlight]
|
||||
anchorLineNos = false
|
||||
codeFences = false
|
||||
guessSyntax = false
|
||||
hl_Lines = ""
|
||||
lineAnchors = ""
|
||||
lineNoStart = 1
|
||||
lineNos = false
|
||||
lineNumbersInTable = true
|
||||
noHl = false
|
||||
noClasses = true
|
||||
style = "monokai"
|
||||
tabWidth = 4
|
@ -1,150 +0,0 @@
|
||||
[[navbar]]
|
||||
identifier = "setup"
|
||||
name = "Setup"
|
||||
url = "/setup/"
|
||||
weight = 1
|
||||
[[navbar]]
|
||||
identifier = "changelog"
|
||||
name = "Changelog"
|
||||
url = "/changelog/"
|
||||
weight = 2
|
||||
[[navbar]]
|
||||
identifier = "configuration"
|
||||
name = "Configuration"
|
||||
url = "/configuration/"
|
||||
weight = 3
|
||||
[[navbar]]
|
||||
identifier = "site_settings"
|
||||
name = "Site Settings"
|
||||
url = "/configuration/site"
|
||||
parent = "configuration"
|
||||
weight = 1
|
||||
[[navbar]]
|
||||
identifier = "theme_settings"
|
||||
name = "Theme Settings"
|
||||
url = "/configuration/theme"
|
||||
parent = "configuration"
|
||||
weight = 2
|
||||
[[navbar]]
|
||||
identifier = "page_settings"
|
||||
name = "Page Settings"
|
||||
url = "/configuration/page"
|
||||
parent = "configuration"
|
||||
weight = 3
|
||||
[[navbar]]
|
||||
identifier = "layouts"
|
||||
name = "Layouts"
|
||||
url = "/layouts/"
|
||||
weight = 4
|
||||
[[navbar]]
|
||||
identifier = "balloon"
|
||||
name = "Balloon"
|
||||
url = "/layouts/balloon"
|
||||
parent = "layouts"
|
||||
[[navbar]]
|
||||
identifier = "balloon_demo"
|
||||
name = "Demo"
|
||||
url = "/layouts/balloon/demo"
|
||||
parent = "balloon"
|
||||
weight = 1
|
||||
[[navbar]]
|
||||
identifier = "balloon_docs"
|
||||
name = "Document"
|
||||
url = "/layouts/balloon/docs"
|
||||
parent = "balloon"
|
||||
weight = 2
|
||||
[[navbar]]
|
||||
identifier = "bookcase"
|
||||
name = "Bookcase"
|
||||
url = "/layouts/bookcase"
|
||||
parent = "layouts"
|
||||
[[navbar]]
|
||||
identifier = "bookcase_demo"
|
||||
name = "Demo"
|
||||
url = "/layouts/bookcase/demo"
|
||||
parent = "bookcase"
|
||||
weight = 1
|
||||
[[navbar]]
|
||||
identifier = "bookcase_docs"
|
||||
name = "Document"
|
||||
url = "/layouts/bookcase/docs"
|
||||
parent = "bookcase"
|
||||
weight = 2
|
||||
[[navbar]]
|
||||
identifier = "gallery"
|
||||
name = "Gallery"
|
||||
url = "/layouts/gallery"
|
||||
parent = "layouts"
|
||||
[[navbar]]
|
||||
identifier = "gallery_demo"
|
||||
name = "Demo"
|
||||
url = "/layouts/gallery/demo"
|
||||
parent = "gallery"
|
||||
weight = 1
|
||||
[[navbar]]
|
||||
identifier = "gallery_docs"
|
||||
name = "Document"
|
||||
url = "/layouts/gallery/docs"
|
||||
parent = "gallery"
|
||||
weight = 2
|
||||
[[navbar]]
|
||||
identifier = "list"
|
||||
name = "List"
|
||||
url = "/layouts/list"
|
||||
parent = "layouts"
|
||||
[[navbar]]
|
||||
identifier = "list_demo"
|
||||
name = "Demo"
|
||||
url = "/layouts/list/demo"
|
||||
parent = "list"
|
||||
weight = 1
|
||||
[[navbar]]
|
||||
identifier = "list_docs"
|
||||
name = "Document"
|
||||
url = "/layouts/list/docs"
|
||||
parent = "list"
|
||||
weight = 2
|
||||
[[navbar]]
|
||||
identifier = "postcard"
|
||||
name = "Postcard"
|
||||
url = "/layouts/postcard"
|
||||
parent = "layouts"
|
||||
[[navbar]]
|
||||
identifier = "postcard_demo"
|
||||
name = "Demo"
|
||||
url = "/layouts/postcard/demo"
|
||||
parent = "postcard"
|
||||
weight = 1
|
||||
[[navbar]]
|
||||
identifier = "postcard_docs"
|
||||
name = "Document"
|
||||
url = "/layouts/postcard/docs"
|
||||
parent = "postcard"
|
||||
weight = 2
|
||||
[[navbar]]
|
||||
identifier = "blank"
|
||||
name = "Blank"
|
||||
url = "/layouts/blank"
|
||||
parent = "layouts"
|
||||
[[navbar]]
|
||||
identifier = "blank_demo"
|
||||
name = "Demo"
|
||||
url = "/layouts/blank/demo"
|
||||
parent = "blank"
|
||||
weight = 1
|
||||
[[navbar]]
|
||||
identifier = "blank_docs"
|
||||
name = "Document"
|
||||
url = "/layouts/blank/docs"
|
||||
parent = "blank"
|
||||
weight = 2
|
||||
[[navbar]]
|
||||
identifier = "shortcodes"
|
||||
name = "Shortcodes"
|
||||
url = "/shortcodes/"
|
||||
weight = 5
|
||||
[[navbar]]
|
||||
identifier = "posts"
|
||||
name = "Posts"
|
||||
url = "/posts/"
|
||||
weight = 6
|
@ -1,8 +0,0 @@
|
||||
[[navbar]]
|
||||
identifier = "posts"
|
||||
name = "文章"
|
||||
url = "/zh-tw/posts/"
|
||||
weight = 1
|
||||
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
navbar_title = 'Monochrome'
|
||||
footer = "Copyright © 2021-2023 by kaiiiz"
|
||||
author = "kaiiiz"
|
||||
color_scheme = "light"
|
||||
|
||||
enable_zooming_js = true
|
||||
enable_toc = true
|
||||
enable_site_search = true
|
||||
enable_math = false
|
||||
|
||||
# SEO
|
||||
enable_open_graph = true
|
||||
enable_twitter_cards = true
|
||||
|
||||
# Collapsible Menu
|
||||
enable_collapsible_toc = false
|
||||
enable_collapsible_changelogs = true
|
||||
|
||||
[list_layout]
|
||||
enable_group_by_year = true
|
||||
enable_show_date = true
|
||||
enable_pagination = false
|
||||
|
||||
# syntax highlight settings
|
||||
[syntax_highlight]
|
||||
lib = "prism.js" # "builtin" | "prism.js"
|
||||
|
||||
[syntax_highlight.builtin]
|
||||
enable_code_copy = true
|
||||
|
||||
[syntax_highlight.prism]
|
||||
enable_code_copy = true
|
||||
enable_line_no = false
|
@ -1,20 +0,0 @@
|
||||
---
|
||||
type: 'balloon'
|
||||
balloon_img_src: "icons/vase.svg"
|
||||
balloon_img_src_dark: "icons/vase_dark.svg"
|
||||
balloon_circle: false
|
||||
balloon_resources: "/about"
|
||||
description: "Demo site of hugo-theme-monochrome"
|
||||
zooming_js: false
|
||||
keywords:
|
||||
- hugo
|
||||
- hugo theme
|
||||
- hugo theme monochrome
|
||||
- clean
|
||||
- responsive
|
||||
- programmer-friendly
|
||||
---
|
||||
|
||||
{{< icon vendor="feather" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" >}}
|
||||
|
||||
This is the demo of hugo-theme-monochrome.
|
@ -1,19 +0,0 @@
|
||||
---
|
||||
title: 'Acknowledgement'
|
||||
weight: 1000
|
||||
gallery_img_src: 'thanks.jpg'
|
||||
gallery_img_caption: '<span>Photo by <a href="https://unsplash.com/@swimstaralex?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Alexander Sinn</a> on <a href="https://unsplash.com/s/photos/thanks?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></span>'
|
||||
gallery_statistic:
|
||||
- key: '**key1**'
|
||||
value: '*value1*'
|
||||
- key: '**key2**'
|
||||
value: '*value2*'
|
||||
- key: '**key3**'
|
||||
value: '*value3*'
|
||||
---
|
||||
|
||||
* [PrismJS/prism](https://github.com/PrismJS/prism)
|
||||
* [krisk/Fuse](https://github.com/krisk/Fuse)
|
||||
* [mathjax/MathJax](https://github.com/mathjax/MathJax)
|
||||
* [kingdido999/zooming](https://github.com/kingdido999/zooming)
|
||||
* [feathericons/feather](https://github.com/feathericons/feather)
|
@ -1,25 +0,0 @@
|
||||
---
|
||||
title: 'Features'
|
||||
weight: 1
|
||||
gallery_img_src: 'pottery.jpg'
|
||||
gallery_img_caption: '<span>Photo by <a href="https://unsplash.com/@mochiel?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Mercy</a> on <a href="https://unsplash.com/s/photos/vase?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></span>'
|
||||
gallery_statistic:
|
||||
- key: '**key1**'
|
||||
value: '*value1*'
|
||||
- key: '**key2**'
|
||||
value: '*value2*'
|
||||
- key: '**key3**'
|
||||
value: '*value3*'
|
||||
---
|
||||
|
||||
1. **Clean UI with small resources.** Monochrome has clean UI design with ~5KB gzipped bundled CSS.
|
||||
2. **Self-Contained.** Monochrome doesn't require webpack, nodejs and other dependencies to setup or edit, just hugo.
|
||||
3. **Responsive layout.** Adapt to different viewpoint, from desktop to mobile.
|
||||
4. **Support light/dark mode.** Low-light UI.
|
||||
5. **Multiple layouts built-in.** Monochrome now supports 6 different layouts. See [Demo](https://kaiiiz.github.io/hugo-theme-monochrome/layouts/).
|
||||
6. **Nested navbar and Multilingual mode.** Make good use of hugo's well-designed structure.
|
||||
7. **Syntax Highlighting (with copy feature).** Integrate both server-side solution (Chroma, hugo built-in) and client-side solution (Prism.js, for someone who need more languages supported).
|
||||
8. **Site Search with real-time matches highlight.** Powered by Fuse.js.
|
||||
9. **SEO-friendly.** Easily change your author, description, keywords, open graph, twitter card meatdata.
|
||||
10. **Support mathematical notation.** Powered by MathJax.
|
||||
11. **Useful shortcodes.** See [Document](https://kaiiiz.github.io/hugo-theme-monochrome/shortcodes/).
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
headless: true
|
||||
---
|
@ -1,31 +0,0 @@
|
||||
---
|
||||
title: 'Timeline'
|
||||
weight: 2
|
||||
gallery_img_src: 'clock.jpg'
|
||||
gallery_img_caption: '<span>Photo by <a href="https://unsplash.com/@oceanng?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Ocean Ng</a> on <a href="https://unsplash.com/s/photos/clock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></span>'
|
||||
gallery_statistic:
|
||||
- key: '**key1**'
|
||||
value: '*value1*'
|
||||
- key: '**key2**'
|
||||
value: '*value2*'
|
||||
- key: '**key3**'
|
||||
value: '*value3*'
|
||||
---
|
||||
|
||||
* 2023/07/23 - v2.0.0 release
|
||||
* 2022/04/02 - v1.0.1 release
|
||||
* 2022/04/01 - v1.0.0 release
|
||||
* 2022/02/25 - v0.9.2 release
|
||||
* 2022/02/25 - v0.9.1 release
|
||||
* 2022/01/31 - v0.9.0 release
|
||||
* 2021/07/29 - v0.8.0 release
|
||||
* 2021/07/08 - v0.7.1 release
|
||||
* 2021/06/24 - v0.7.0 release
|
||||
* 2021/04/15 - v0.6.2 release
|
||||
* 2021/02/17 - v0.6.1 release
|
||||
* 2021/02/16 - v0.6.0 release
|
||||
* 2021/02/15 - v0.5.0 release
|
||||
* 2021/02/12 - v0.4.0 release
|
||||
* 2021/02/10 - v0.3.0 release
|
||||
* 2021/02/09 - v0.2.0 release
|
||||
* 2021/02/08 - v0.1.0 release
|
@ -1,222 +0,0 @@
|
||||
---
|
||||
title: 'Changelog'
|
||||
toc: false
|
||||
---
|
||||
|
||||
# Changelog
|
||||
|
||||
## v2.0.0 (2023/07/23)
|
||||
|
||||
- Fixed
|
||||
- Fix navbar item padding ([#15](https://github.com/kaiiiz/hugo-theme-monochrome/issues/15))
|
||||
- Fix TOC collapse cursor style ([#25](https://github.com/kaiiiz/hugo-theme-monochrome/issues/25), [#36](https://github.com/kaiiiz/hugo-theme-monochrome/pull/36))
|
||||
- Fix site search resource retrieval bug ([#29](https://github.com/kaiiiz/hugo-theme-monochrome/issues/29))
|
||||
- Fix wrong variable in base.scss ([#44](https://github.com/kaiiiz/hugo-theme-monochrome/pull/44))
|
||||
- Fix inappropriate navbar decoration for item that links to home page
|
||||
- Fix color scheme button FOUC bug
|
||||
- Fix twitter card text color in dark mode
|
||||
- Changed
|
||||
- **BREAKING CHANGE** The minimum hugo version requirement is now `0.112.0`
|
||||
- **BREAKING CHANGE** Support all feather icons, `vendor="feather"` is required to migrate from old shortcode ([#19](https://github.com/kaiiiz/hugo-theme-monochrome/issues/19))
|
||||
- Images in an aritcle are centered by default ([#35](https://github.com/kaiiiz/hugo-theme-monochrome/issues/35))
|
||||
- Term's layout now respects the `enable_group_by_year`, `enable_show_date`, `enable_pagination` parameters
|
||||
- Upgrade dependencies
|
||||
- Prism: v1.27.0 -> v1.29.0
|
||||
- Fuse.js: v6.5.3 -> v6.6.2
|
||||
- New
|
||||
- Support custom CSS ([#23](https://github.com/kaiiiz/hugo-theme-monochrome/issues/23), [#33](https://github.com/kaiiiz/hugo-theme-monochrome/issues/33))
|
||||
- Support GA4 ([#37](https://github.com/kaiiiz/hugo-theme-monochrome/issues/37))
|
||||
- Support custom title for bookcase item ([#32](https://github.com/kaiiiz/hugo-theme-monochrome/issues/32))
|
||||
- Support hiding bookcase items ([#27](https://github.com/kaiiiz/hugo-theme-monochrome/issues/27))
|
||||
- Add default color scheme setting ([#40](https://github.com/kaiiiz/hugo-theme-monochrome/issues/40))
|
||||
- Add `bookcase` shortcode ([#34](https://github.com/kaiiiz/hugo-theme-monochrome/issues/34))
|
||||
- Add `recent-posts` shortcode
|
||||
- Add an RSS button next to the title in the term's layout
|
||||
|
||||
---
|
||||
|
||||
## v1.0.1 (2022/04/02)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix `img` style issue, it should be `max-width` instead of `width` ([#10](https://github.com/kaiiiz/hugo-theme-monochrome/issues/10#issuecomment-1086111789))
|
||||
|
||||
---
|
||||
|
||||
## v1.0.0 - First Major Release (2022/04/01)
|
||||
|
||||
### Added
|
||||
|
||||
* Layout
|
||||
* New Layout: Postcard Layout, Blank Layout
|
||||
* Support pagination for Postcard Layout and List Layout
|
||||
* Enhance list layout date format. If current list layout is grouped by year, hide list item's year.
|
||||
* Redesign default home page layout using Postcard Layout
|
||||
* Add sidebar for better navbar responsiveness on small screen
|
||||
* New Shortcode
|
||||
* `emgithub`: directly embed github source code like gist with Prism.js syntax highlighting
|
||||
* External Library
|
||||
* Optimize Prism.js integration
|
||||
* Add smooth transition to prevent line number jittering while page rendering
|
||||
* Integrate Prism.js autoloader to prevent huge bundle file
|
||||
* Optimize Zooming.js integration
|
||||
* Background color is now dynamically changed based on current theme
|
||||
* Fuse.js integration
|
||||
* Support highlight matched text in search menu
|
||||
* New Theme Parameters
|
||||
* `list_layout.enable_group_by_year`
|
||||
* `list_layout.enable_show_date`
|
||||
* `list_layout.enable_pagination`
|
||||
* `syntax_highlight.lib`
|
||||
* `syntax_highlight.builtin.enable_code_copy`
|
||||
* `syntax_highlight.prism.enable_code_copy`
|
||||
* `syntax_highlight.prism.enable_line_no`
|
||||
* New Page Parameters
|
||||
* `search_hidden`: hide page from search index
|
||||
* `pagination`: control pagination for List Layout
|
||||
|
||||
### Changed
|
||||
|
||||
* Change RSS content from full post to summary for smaller resource purpose
|
||||
* Change all icons to feathericons
|
||||
* Site search engine has been changed from flexsearch to fuse.js for better CJK language supports
|
||||
* Parameter name has all been changed to snake_case for consistency
|
||||
* Syntax highlight settings are now grouped by `syntax_highlight`
|
||||
* `svg-wrapper` shortcode has been changed to `icon`
|
||||
|
||||
### Removed
|
||||
|
||||
* **All** javascript package dependencies are removed, Monochrome is now self-contained without the help of npm and become extremely easy to setup and modify.
|
||||
* Remove `list_posts` property from list layout, this functionality has been replaced by Blank Layout
|
||||
|
||||
---
|
||||
|
||||
## v0.9.2 (2022/02/25)
|
||||
|
||||
* Fix: reimplement terms-cloud to prevent size overflow (max size: 1.6 rem)
|
||||
|
||||
---
|
||||
|
||||
## v0.9.1 (2022/02/25)
|
||||
|
||||
* Change: set terms-cloud max font size to 1.4 rem
|
||||
* Fix: site search url from absLangURL to relLangURL
|
||||
|
||||
---
|
||||
|
||||
## v0.9.0 (2022/01/31)
|
||||
|
||||
* Improve: search implementation
|
||||
* hide the mismatch objects instead of removing it while searching
|
||||
* widen the control range of search result
|
||||
* Improve: gallery layout's key and value now support markdown syntax
|
||||
* Improve: Zooming.js configuration
|
||||
* speed up animations
|
||||
* setup transparent background
|
||||
* Change: for consistency, the names of the following parameters are changed:
|
||||
* page's `collapsibleTOC` => `collapsible_toc`
|
||||
* page's `collapsibleChangelogs` => `collapsible_changelogs`
|
||||
* Change: font-size of html is changed from `18px` to `16px`
|
||||
* Add: `breadcrumbs` shortcode
|
||||
* Add: list layout properties `group_by_year` and `show_date`
|
||||
* Fix: terms-cloud typo ([#4](https://github.com/kaiiiz/hugo-theme-monochrome/pull/4))
|
||||
|
||||
---
|
||||
|
||||
## v0.8.0 (2021/07/29)
|
||||
|
||||
* Improve: flexsearch multilingual search capability
|
||||
* Improve: widen the control range of navbar menu items
|
||||
* Change: flexsearch can now search index pages
|
||||
* Change: the post content in RSS is changed from summary to full text
|
||||
* Add: collapsible TOC and Changelogs
|
||||
|
||||
---
|
||||
|
||||
## v0.7.1 (2021/07/08)
|
||||
|
||||
* Change: adjust the style of changelogs
|
||||
* Fix: flexsearch search API issue
|
||||
|
||||
---
|
||||
|
||||
## v0.7.0 (2021/06/24)
|
||||
|
||||
* Bump dependencies version
|
||||
* Add: `changelogs` property
|
||||
* Add: support disqus for index page (turn off by default)
|
||||
* Change: theme name from 'Graytr' to 'Monochrome'
|
||||
* Change: improve navbar responsiveness
|
||||
* Fix: widen the control range of navbar menu icon
|
||||
|
||||
---
|
||||
|
||||
## v0.6.2 (2021/04/15)
|
||||
|
||||
* Fix: google search console authentication failed if ga code not in `<head>`
|
||||
* Fix: `clipboard-polyfill/text` dependency resolved issue
|
||||
|
||||
---
|
||||
|
||||
## v0.6.1 (2021/02/17)
|
||||
|
||||
* Fix: codepen shortcode id
|
||||
* Change baseurl to example.com in exampleSite
|
||||
|
||||
---
|
||||
|
||||
## v0.6.0 (2021/02/16)
|
||||
|
||||
* Support MathJax
|
||||
* Add shortcodes: `jsfiddle`, `codepen`, `color-block`, `icon-group`, `terms-cloud`
|
||||
* Add option: `list_posts` in list layout
|
||||
* Fix: not register touchend event
|
||||
|
||||
---
|
||||
|
||||
## v0.5.0 (2021/02/15)
|
||||
|
||||
* Support multilingual mode
|
||||
* Add i18n
|
||||
* Support Open Graph, Twitter Card
|
||||
* Adjust svg-wrapper shortcode
|
||||
* Add some social icons: `facebook`, `github`, `twitter`, `rss`, `mail`
|
||||
* Support site search (powered by flexsearch)
|
||||
* Disable unused features in tailwindcss (speedup building time)
|
||||
* Reorganize parameters
|
||||
* Remove default image to figure transformation, using built-in shortcode instead
|
||||
|
||||
---
|
||||
|
||||
## v0.4.0 (2021/02/12)
|
||||
|
||||
* Support dark mode
|
||||
* Add `bookcase_cover_src_dark` for bookcase layout
|
||||
* Add `balloon_img_src_dark` for balloon layout
|
||||
* Add shortcode: svg-wrapper
|
||||
* Prism.js integration (v1.23.0)
|
||||
* Code copy feature for code block
|
||||
|
||||
---
|
||||
|
||||
## v0.3.0 (2021/02/10)
|
||||
|
||||
* Support nested navbar
|
||||
* Implement default homepage layout
|
||||
* Adjust the purpose of bookcase layout
|
||||
* Remove catalog layout
|
||||
|
||||
---
|
||||
|
||||
## v0.2.0 (2021/02/09)
|
||||
|
||||
* A better responsive navbar
|
||||
* Implement default taxonomy and term layout
|
||||
* Adjust article styles
|
||||
|
||||
---
|
||||
|
||||
## v0.1.0 (2021/02/08)
|
||||
|
||||
Initial release.
|
||||
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
title: 'Configuration'
|
||||
type: 'bookcase'
|
||||
---
|
||||
|
||||
These documents show some customizable values that are used in this theme. By adjusting these values, you can easily change the behavior of your website without touching the source code.
|
||||
|
||||
You can refer to the example config in [github](https://github.com/kaiiiz/hugo-theme-monochrome/tree/main/exampleSite/config).
|
@ -1,217 +0,0 @@
|
||||
---
|
||||
title: 'Page Settings'
|
||||
weight: 3
|
||||
bookcase_cover_src: 'cover/catalogue.png'
|
||||
bookcase_cover_src_dark: 'cover/catalogue_dark.png'
|
||||
changelogs:
|
||||
---
|
||||
|
||||
# Page Settings
|
||||
|
||||
These values are inside your page's front-matter.
|
||||
|
||||
## Layout
|
||||
|
||||
Monochrome support different types of layout. You can change the layout of section or regular page according to your needs. Checkout [Layout](/hugo-theme-monochrome/layouts) for more details.
|
||||
|
||||
## Navbar title
|
||||
|
||||
HTML is available.
|
||||
|
||||
```yaml
|
||||
---
|
||||
navbar_title: "Monochrome"
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`navbar_title`](/hugo-theme-monochrome/configuration/theme#navbar-title)
|
||||
|
||||
## Footer
|
||||
|
||||
HTML is available.
|
||||
|
||||
```yaml
|
||||
---
|
||||
footer: "Copyright © 2021 by kaiiiz"
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`footer`](/hugo-theme-monochrome/configuration/theme/#footer)
|
||||
|
||||
## Site Search
|
||||
|
||||
Hide the page from the search result.
|
||||
|
||||
```yaml
|
||||
search_hidden: true
|
||||
```
|
||||
|
||||
> default: false
|
||||
|
||||
## Table of Contents
|
||||
|
||||
```yaml
|
||||
---
|
||||
toc: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`enable_toc`](/hugo-theme-monochrome/configuration/theme/#table-of-contents)
|
||||
|
||||
### Collapsible Table of Contents
|
||||
|
||||
```yaml
|
||||
---
|
||||
collapsible_toc: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`enable_collapsible_toc`](/hugo-theme-monochrome/configuration/theme/#collapsible-menu)
|
||||
|
||||
## Changelogs
|
||||
|
||||
```yaml
|
||||
---
|
||||
changelogs:
|
||||
- tag: '20210623'
|
||||
description:
|
||||
- 'changelog example 1'
|
||||
- 'changelog example 2'
|
||||
- tag: '20210624'
|
||||
description:
|
||||
- 'changelog example 3'
|
||||
- 'changelog example 4'
|
||||
---
|
||||
```
|
||||
|
||||
tag and description both support markdown syntax.
|
||||
|
||||
> default: None
|
||||
|
||||
### Collapsible Changelogs
|
||||
|
||||
```yaml
|
||||
---
|
||||
collapsible_changelogs: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`enable_collapsible_changelogs`](/hugo-theme-monochrome/configuration/theme/#collapsible-menu)
|
||||
|
||||
## External library
|
||||
|
||||
### MathJax
|
||||
|
||||
```yaml
|
||||
---
|
||||
math: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`enable_math`](/hugo-theme-monochrome/configuration/theme/#mathjax)
|
||||
|
||||
### Zooming.js
|
||||
|
||||
```yaml
|
||||
---
|
||||
zooming_js: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`enable_zooming_js`](/hugo-theme-monochrome/configuration/theme/#zooming_js)
|
||||
|
||||
### Disqus
|
||||
|
||||
```yaml
|
||||
---
|
||||
disqus: false
|
||||
---
|
||||
```
|
||||
|
||||
> default for post page: site's [`disqusShortname`](/hugo-theme-monochrome/zh-tw/configuration/site/#disqus)
|
||||
>
|
||||
> default for other pages: false
|
||||
|
||||
### Google Analytics
|
||||
|
||||
```yaml
|
||||
---
|
||||
ga: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: site's [`googleAnalytics`](/hugo-theme-monochrome/configuration/site/#google-analytics)
|
||||
|
||||
## Syntax Highlighting
|
||||
|
||||
### Chroma
|
||||
|
||||
```yaml
|
||||
---
|
||||
code_copy: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`enable_code_copy`](/hugo-theme-monochrome/configuration/theme/#using-chroma-hugo-built-in)
|
||||
|
||||
## SEO
|
||||
|
||||
### Author
|
||||
|
||||
```yaml
|
||||
---
|
||||
author: "kaiiiz"
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`author`](/hugo-theme-monochrome/configuration/theme/#author)
|
||||
|
||||
### Description
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: "Configuration of hugo-theme-monochrome"
|
||||
---
|
||||
```
|
||||
|
||||
> default: not generate description `meta` tag
|
||||
|
||||
### Keywords
|
||||
|
||||
In page front-matter
|
||||
|
||||
```yaml
|
||||
---
|
||||
keywords:
|
||||
- hugo
|
||||
- hugo theme
|
||||
- hugo theme monochrome
|
||||
---
|
||||
```
|
||||
|
||||
> default: not generate keywords `meta` tag
|
||||
|
||||
|
||||
### Open Graph
|
||||
|
||||
A flag to render open graph internal template. See [Open Graph](https://gohugo.io/templates/internal#open-graph) for additional settings.
|
||||
|
||||
```yaml
|
||||
---
|
||||
open_graph: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`enable_open_graph`](/hugo-theme-monochrome/configuration/theme/#open-graph)
|
||||
|
||||
### Twitter Cards
|
||||
|
||||
A flag to render open twitter cards template. See [Twitter Cards](https://gohugo.io/templates/internal#twitter-cards) for additional settings.
|
||||
|
||||
```yaml
|
||||
---
|
||||
twitter_cards: false
|
||||
---
|
||||
```
|
||||
|
||||
> default: theme's [`enable_twitter_cards`](/hugo-theme-monochrome/configuration/theme/#twitter-cards)
|
@ -1,54 +0,0 @@
|
||||
---
|
||||
title: 'Site Settings'
|
||||
weight: 1
|
||||
bookcase_cover_src: 'cover/catalogue.png'
|
||||
bookcase_cover_src_dark: 'cover/catalogue_dark.png'
|
||||
---
|
||||
|
||||
# Site Configuration
|
||||
|
||||
These settings are important for building a website using hugo. See [All Configuration Settings](https://gohugo.io/getting-started/configuration/#all-configuration-settings) for more details.
|
||||
|
||||
## Site title
|
||||
|
||||
Site title. This value will become the content of `<title>` tag in html.
|
||||
|
||||
```toml
|
||||
title = "Monochrome"
|
||||
```
|
||||
|
||||
## Theme
|
||||
|
||||
Set this value to the corresponding folder name of your theme. (located by default in `/themes/THEMENAME/`)
|
||||
|
||||
```toml
|
||||
theme = "hugo-theme-monochrome"
|
||||
```
|
||||
|
||||
## Base URL
|
||||
|
||||
Hostname (and path) to the root.
|
||||
|
||||
```toml
|
||||
baseURL = "https://kaiiiz.github.io/hugo-theme-monochrome"
|
||||
```
|
||||
|
||||
## favicon
|
||||
|
||||
Add `favicon.ico` to your site's static folder.
|
||||
|
||||
## External library
|
||||
|
||||
### Disqus
|
||||
|
||||
```toml
|
||||
disqusShortname = "xxx"
|
||||
```
|
||||
|
||||
Other settings checkout [Disqus - Internal Templates](https://gohugo.io/templates/internal/#disqus) for more details.
|
||||
|
||||
### Google Analytics
|
||||
|
||||
```toml
|
||||
googleAnalytics = "xxx"
|
||||
```
|
@ -1,239 +0,0 @@
|
||||
---
|
||||
title: 'Theme Settings'
|
||||
weight: 2
|
||||
bookcase_cover_src: 'cover/catalogue.png'
|
||||
bookcase_cover_src_dark: 'cover/catalogue_dark.png'
|
||||
changelogs:
|
||||
---
|
||||
|
||||
# Theme Configuration
|
||||
|
||||
These values are inside your toml config file.
|
||||
|
||||
## Navbar title
|
||||
|
||||
HTML is available.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
navbar_title = "Monochrome" # default: site's `title`
|
||||
```
|
||||
|
||||
## Footer
|
||||
|
||||
HTML is available.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
footer = "Copyright © 2021 by kaiiiz" # default: None
|
||||
```
|
||||
|
||||
## Table of Contents
|
||||
|
||||
TOC global settings.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
enable_toc = true # default: true
|
||||
```
|
||||
|
||||
## Collapsible Menu
|
||||
|
||||
Collapsible global settings.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
enable_collapsible_toc = false # default: false
|
||||
enable_collapsible_changelogs = false # default: false
|
||||
```
|
||||
## Navbar menu
|
||||
|
||||
Monochrome uses built-in menu system supported by hugo itself. (Checkout [document](https://gohugo.io/content-management/menus) for more deatil.) By default, the menu called `navbar` is used to decide which item need to be rendered on the navbar.
|
||||
|
||||
So you can simply add the following code to your page front-matter, and the menu info will be handled by hugo out of the box. ([simple method mentioned in document](https://gohugo.io/content-management/menus#simple))
|
||||
|
||||
```yaml
|
||||
---
|
||||
menu: navbar
|
||||
---
|
||||
```
|
||||
|
||||
Also, weighted value is supported out of the box, you can explicit assign the weight of the navbar entry, hugo will first sort the menu using weight, if there has two entries shared the same weight, the [default order](https://gohugo.io/templates/lists/#order-content) will be applied.
|
||||
|
||||
```yaml
|
||||
---
|
||||
menu:
|
||||
navbar:
|
||||
weight: -99
|
||||
---
|
||||
```
|
||||
|
||||
### Navbar settings in config
|
||||
If you try to put entry that aren't attached to a piece of content, or you want to organize your navbar into a single file, checkout [Add Non-content Entries to a Menu](https://gohugo.io/content-management/menus#add-non-content-entries-to-a-menu) or [Configuration file of demo site](https://github.com/kaiiiz/hugo-theme-monochrome/tree/main/exampleSite/config/_default/menus) and set these values in your toml settings file.
|
||||
|
||||
toml example:
|
||||
|
||||
```toml
|
||||
[[menu.navbar]]
|
||||
identifier = "about"
|
||||
name = "about"
|
||||
title = "about"
|
||||
url = "/about/"
|
||||
weight = 100
|
||||
|
||||
[[menu.navbar]]
|
||||
identifier = "series"
|
||||
name = "series"
|
||||
url = "/series/"
|
||||
weight = -100
|
||||
|
||||
[[menu.navbar]]
|
||||
identifier = "categories"
|
||||
name = "categories"
|
||||
url = "/categories/"
|
||||
weight = 80
|
||||
```
|
||||
|
||||
yaml example:
|
||||
|
||||
```yaml
|
||||
menu:
|
||||
navbar:
|
||||
- identifier: about
|
||||
name: about
|
||||
title: about
|
||||
url: /about/
|
||||
weight: 100
|
||||
- identifier: series
|
||||
name: series
|
||||
url: /series/
|
||||
weight: -100
|
||||
- identifier: categories
|
||||
name: categories
|
||||
url: /categories/
|
||||
weight: 80
|
||||
```
|
||||
|
||||
## List Layout
|
||||
|
||||
```toml
|
||||
[params]
|
||||
[params.list_layout]
|
||||
enable_group_by_year = true # default: true
|
||||
enable_show_date = true # default: true
|
||||
enable_pagination = false # default: false
|
||||
```
|
||||
|
||||
## External Library
|
||||
|
||||
### MathJax
|
||||
|
||||
Use `$` to create inline result, `$$` to create block result.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
enable_math = true # default: false
|
||||
```
|
||||
|
||||
### Zooming.js
|
||||
|
||||
Zooming.js global setting.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
enable_zooming_js = false # default: true
|
||||
```
|
||||
|
||||
### Site Search
|
||||
|
||||
Add the following settings to config.toml:
|
||||
|
||||
```toml
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "JSON"]
|
||||
```
|
||||
|
||||
Enable site search
|
||||
|
||||
```toml
|
||||
[params]
|
||||
enable_site_search = true # default: false
|
||||
```
|
||||
|
||||
## Syntax Highlighting
|
||||
|
||||
### Using Chroma (server-side)
|
||||
|
||||
See [Syntax Highlighting](https://gohugo.io/content-management/syntax-highlighting) for more details.
|
||||
|
||||
```toml
|
||||
[param]
|
||||
[param.syntax_highlight]
|
||||
lib = "builtin" # "builtin" | "prism.js" (default: "builtin")
|
||||
[param.syntax_highlight.builtin]
|
||||
enable_code_copy = true # default: true
|
||||
```
|
||||
|
||||
### Using Prism.js (client-side)
|
||||
|
||||
Disable markup highlight feature
|
||||
|
||||
```toml
|
||||
[markup.highlight]
|
||||
codeFences = false
|
||||
lineNos = false
|
||||
```
|
||||
|
||||
Enable Prism.js
|
||||
|
||||
```toml
|
||||
[param]
|
||||
[params.syntax_highlight]
|
||||
lib = "prism.js" # "builtin" | "prism.js" (default: "builtin")
|
||||
[params.syntax_highlight.prism]
|
||||
enable_code_copy = true # default: true
|
||||
enable_line_no = true # default: true
|
||||
```
|
||||
|
||||
## SEO
|
||||
|
||||
### Author
|
||||
|
||||
```toml
|
||||
[params]
|
||||
author = "kaiiiz" # default: no author `meta` tag
|
||||
```
|
||||
|
||||
### Open Graph
|
||||
|
||||
A flag to render open graph internal template. See [Open Graph](https://gohugo.io/templates/internal#open-graph) for additional settings.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
enable_open_graph = false # default: true
|
||||
```
|
||||
|
||||
### Twitter Cards
|
||||
|
||||
A flag to render open twitter cards template. See [Twitter Cards](https://gohugo.io/templates/internal#twitter-cards) for additional settings.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
enable_twitter_cards = false # default: true
|
||||
```
|
||||
|
||||
## Custom CSS
|
||||
|
||||
You can override the default styles by creating a new `/static/user.css` file.
|
||||
|
||||
## Default Color Scheme
|
||||
|
||||
You can set the default color scheme for your website
|
||||
|
||||
```toml
|
||||
[params]
|
||||
color_scheme = "dark" # "light" or "dark"
|
||||
```
|
||||
|
||||
> default: "light"
|
||||
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
title: 'Layouts'
|
||||
type: 'bookcase'
|
||||
---
|
||||
|
||||
Monochrome has multiple layouts built in. You can change the layout of section or regular page according to your needs.
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
title: 'Balloon Layout'
|
||||
bookcase_cover_src: 'cover/balloon.png'
|
||||
bookcase_cover_src_dark: 'cover/balloon_dark.png'
|
||||
type: "bookcase"
|
||||
---
|
||||
|
||||
Balloon layout is useful for demonstrating information step-by-step.
|
||||
|
||||
> This layout can be used on both section page (`_index.md`) and regular post (`xxx.md`).
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
title: 'Balloon Layout Demo'
|
||||
bookcase_cover_src: 'cover/balloon.png'
|
||||
bookcase_cover_src_dark: 'cover/balloon_dark.png'
|
||||
type: 'balloon'
|
||||
balloon_img_src: "icons/balloon.svg"
|
||||
balloon_img_src_dark: "icons/balloon_dark.svg"
|
||||
balloon_circle: false
|
||||
balloon_resources: "/about"
|
||||
weight: 10
|
||||
---
|
||||
|
||||
Balloon layout is useful for demonstrating information step-by-step.
|
||||
|
||||
[Go to single page demo](/hugo-theme-monochrome/layouts/demo/balloon/single)
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
title: 'balloon layout single demo'
|
||||
type: 'balloon'
|
||||
balloon_img_src: "icons/balloon.svg"
|
||||
balloon_img_src_dark: "icons/balloon_dark.svg"
|
||||
balloon_circle: false
|
||||
balloon_resources: "/about"
|
||||
---
|
||||
|
||||
Balloon layout can also be used in regular page.
|
||||
|
||||
[Go to list demo](/hugo-theme-monochrome/layouts/demo/balloon)
|
@ -1,130 +0,0 @@
|
||||
---
|
||||
title: 'Balloon Layout Document'
|
||||
bookcase_cover_src: 'cover/balloon.png'
|
||||
bookcase_cover_src_dark: 'cover/balloon_dark.png'
|
||||
date: 2022-03-29
|
||||
---
|
||||
|
||||
# Balloon Layout Document
|
||||
|
||||
Balloon is useful for demonstrating information step-by-step.
|
||||
|
||||
> This layout can be used on both section page (`_index.md`) and regular post (`xxx.md`).
|
||||
|
||||
## Configuration
|
||||
|
||||
```yaml
|
||||
---
|
||||
type: 'balloon'
|
||||
---
|
||||
```
|
||||
|
||||
> Specify `type` in front-matter will change the template lookup order.
|
||||
|
||||
### balloon_resources
|
||||
|
||||
Content resources. URL can be an absolute path (with `/` prefix, relative to base URL), or relative path (without `/`, relative to current path)
|
||||
|
||||
> Hugo will handle multilingual scenario out of the box
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
https://kaiiiz.github.io/hugo-theme-monochrome/about
|
||||
\____________________________________/\____/
|
||||
base URL balloon_resources
|
||||
```
|
||||
|
||||
```yaml
|
||||
---
|
||||
balloon_resources: "/about"
|
||||
---
|
||||
```
|
||||
|
||||
> default: error will occur in page
|
||||
|
||||
### balloon_img_src
|
||||
|
||||
Balloon head image URL. URL must be relative to the base URL. (without `/` prefix)
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg
|
||||
\_____________________________________/\________/
|
||||
base URL balloon_img_src
|
||||
```
|
||||
|
||||
```yaml
|
||||
---
|
||||
balloon_img_src: 'thanks.jpg'
|
||||
---
|
||||
```
|
||||
|
||||
> default: fallback to balloon_img_src_dark, if failed, image become dot
|
||||
|
||||
### balloon_img_src_dark
|
||||
|
||||
Balloon head image URL for dark mode. URL must be relative to the base URL. (without `/` prefix)
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg
|
||||
\_____________________________________/\________/
|
||||
base URL balloon_img_src
|
||||
```
|
||||
|
||||
```yaml
|
||||
---
|
||||
balloon_img_src_dark: 'thanks.jpg'
|
||||
---
|
||||
```
|
||||
|
||||
> default: fallback to balloon_img_src, if failed, image become dot
|
||||
|
||||
### balloon_circle
|
||||
|
||||
balloon head shape can be square or circle.
|
||||
|
||||
```yaml
|
||||
---
|
||||
balloon_circle: true
|
||||
---
|
||||
```
|
||||
|
||||
> default: true
|
||||
|
||||
## Resouces Configuration
|
||||
|
||||
These settings are under the resource specified in `balloon_resources`.
|
||||
|
||||
### title
|
||||
|
||||
Title of content card.
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: 'Story before hugo'
|
||||
---
|
||||
```
|
||||
|
||||
> default: no title
|
||||
|
||||
### weight
|
||||
|
||||
```yaml
|
||||
---
|
||||
weight: 3
|
||||
---
|
||||
```
|
||||
|
||||
> default: [default order](https://gohugo.io/templates/lists/#order-content)
|
||||
|
||||
## Headless Bundle
|
||||
|
||||
Hugo supports an amazing feature called **Headless Bundle**, which elegantly resolved the resouces publish issue.
|
||||
|
||||
For example, if you don't want to publish the resouces of the balloon layout, you can create a leaf bundle and specified `headless = true` in `index.md`'s front-matter. These resources will only be used during rendering process. In other word, no file will be generated to `/public` folder.
|
||||
|
||||
Checkout [Headless Bundle](https://gohugo.io/content-management/page-bundles/#headless-bundle) for more details.
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
title: 'Blank Layout'
|
||||
bookcase_cover_src: 'cover/coding.png'
|
||||
bookcase_cover_src_dark: 'cover/coding_dark.png'
|
||||
type: "bookcase"
|
||||
---
|
||||
|
||||
Sometimes, it's useful to fully control your section page, so I create a layout with only render the `_index.md` content and called this Blank Layout.
|
||||
|
||||
> This layout can only be used on section page (`_index.md`).
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
title: 'Blank Layout Demo'
|
||||
bookcase_cover_src: 'cover/coding.png'
|
||||
bookcase_cover_src_dark: 'cover/coding_dark.png'
|
||||
type: 'blank'
|
||||
weight: 40
|
||||
---
|
||||
|
||||
```
|
||||
.
|
||||
├── _index.md <- you're here!
|
||||
├── post1.md
|
||||
├── post2.md
|
||||
└── post3.md
|
||||
```
|
||||
|
||||
Fully customized section page.
|
||||
|
||||
* [post1](./post1)
|
||||
* [post2](./post2)
|
||||
* [post3](./post3)
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
title: 'post1'
|
||||
date: 2021-02-06
|
||||
search_hidden: true
|
||||
---
|
||||
|
||||
Hello world!
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
title: 'post2'
|
||||
date: 2021-02-06
|
||||
search_hidden: true
|
||||
---
|
||||
|
||||
Hello world!
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
title: 'post3'
|
||||
date: 2021-02-06
|
||||
search_hidden: true
|
||||
---
|
||||
|
||||
Hello world!
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
title: 'Blank Layout Document'
|
||||
bookcase_cover_src: 'cover/coding.png'
|
||||
bookcase_cover_src_dark: 'cover/coding_dark.png'
|
||||
weight: 40
|
||||
changelogs:
|
||||
---
|
||||
|
||||
Blank layout render only the content of `_index.md`, it's useful for fully customizing your list layout.
|
||||
|
||||
> This layout can only be used on section page (`_index.md`).
|
||||
|
||||
## Configuration
|
||||
|
||||
```yaml
|
||||
---
|
||||
type: 'blank'
|
||||
---
|
||||
```
|
||||
|
||||
> Specify `type` in front-matter will change the template lookup order.
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
title: 'Bookcase Layout'
|
||||
bookcase_cover_src: 'cover/bookcase.png'
|
||||
bookcase_cover_src_dark: 'cover/bookcase_dark.png'
|
||||
type: "bookcase"
|
||||
---
|
||||
|
||||
Bookcase layout is useful for creating another viewpoint of list contents.
|
||||
|
||||
> This layout can only be used on section page (`_index.md`).
|
@ -1,19 +0,0 @@
|
||||
---
|
||||
title: 'Bookcase Layout Demo'
|
||||
type: 'bookcase'
|
||||
bookcase_cover_src: 'cover/bookcase.png'
|
||||
bookcase_cover_src_dark: 'cover/bookcase_dark.png'
|
||||
weight: 20
|
||||
---
|
||||
|
||||
Bookcase layout is useful for creating another viewpoint of list contents.
|
||||
|
||||
```
|
||||
.
|
||||
├── balloon
|
||||
│ └── _index.md
|
||||
├── regular-page.md
|
||||
├── _index.md <- you are here
|
||||
└── normal
|
||||
└── _index.md
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
title: 'balloon'
|
||||
bookcase_cover_src: 'cover/balloon.png'
|
||||
bookcase_cover_src_dark: 'cover/balloon_dark.png'
|
||||
type: 'balloon'
|
||||
balloon_img_src: "icons/balloon.svg"
|
||||
balloon_img_src_dark: "icons/balloon_dark.svg"
|
||||
balloon_circle: false
|
||||
balloon_resources: "/about"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
balloon layout in bookcase.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user