Compare commits
155 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2a3a236025 | ||
![]() |
d19cec8547 | ||
![]() |
6800125faa | ||
![]() |
7b6966c48f | ||
![]() |
f8c25163c6 | ||
![]() |
79aae2c355 | ||
![]() |
1adb480281 | ||
![]() |
801733ac98 | ||
![]() |
9f30ce0dfa | ||
![]() |
7ed1309e67 | ||
![]() |
0ed4e12eec | ||
![]() |
29ae08aca8 | ||
![]() |
793eaeaab1 | ||
![]() |
a2b28da988 | ||
![]() |
0999eb451b | ||
![]() |
152a955597 | ||
![]() |
a0fb57d7d3 | ||
![]() |
c6c686ec65 | ||
![]() |
48f967ad92 | ||
![]() |
ba3af4f031 | ||
![]() |
70a175bdaa | ||
![]() |
fdc0750f13 | ||
![]() |
43db7912d0 | ||
![]() |
5a4f0dc14d | ||
![]() |
c93b62817e | ||
![]() |
3a6ab9df76 | ||
![]() |
ad5989d80f | ||
![]() |
0b9eadffb6 | ||
![]() |
9963b746b1 | ||
![]() |
836ef99122 | ||
![]() |
156b444582 | ||
![]() |
aa27ab0f2c | ||
![]() |
76e0040505 | ||
![]() |
d3baf1a86a | ||
![]() |
681bf636dc | ||
![]() |
607b5e3fec | ||
![]() |
5f4192a639 | ||
![]() |
220cd05f6d | ||
![]() |
3cfc732dff | ||
![]() |
f04b37e0d3 | ||
![]() |
05274cef64 | ||
![]() |
8f5ac20310 | ||
![]() |
db65425c06 | ||
![]() |
e475460a48 | ||
![]() |
6dfe7a7045 | ||
![]() |
9b23079fe1 | ||
![]() |
c5c9d6404c | ||
![]() |
42cb871283 | ||
![]() |
39778b9c5b | ||
![]() |
8bb7c354c7 | ||
![]() |
37b76f8816 | ||
![]() |
5164413ab8 | ||
![]() |
857ce9e811 | ||
![]() |
3d6bd7ae3a | ||
![]() |
87529a9d55 | ||
![]() |
7dbf1e09a3 | ||
![]() |
991596d368 | ||
![]() |
72b319323c | ||
![]() |
2170bed0be | ||
![]() |
517185039d | ||
![]() |
8d9eecc4c2 | ||
![]() |
c94b4b75ea | ||
![]() |
2487a4740d | ||
![]() |
b0239c614a | ||
![]() |
a1b692965a | ||
![]() |
a2149c8966 | ||
![]() |
8bc980d1b7 | ||
![]() |
97864fe177 | ||
![]() |
f676190178 | ||
![]() |
0130aa39ee | ||
![]() |
cc3584d82f | ||
![]() |
5a6a662eb0 | ||
![]() |
d32dd7ec26 | ||
![]() |
ff355a56d5 | ||
![]() |
a76b5f34c8 | ||
![]() |
d7cffa69da | ||
![]() |
bb24bd4e5e | ||
![]() |
92aefe5ef7 | ||
![]() |
b8540aacc5 | ||
![]() |
2bfee732e0 | ||
![]() |
dbfccb7593 | ||
![]() |
f8ae07e536 | ||
![]() |
b48d4c5c9d | ||
![]() |
4e4ea9d552 | ||
![]() |
7ae605a78a | ||
![]() |
7604fd8eb0 | ||
![]() |
4dbd820f6a | ||
![]() |
9975795b94 | ||
![]() |
82de138569 | ||
![]() |
0c1f4984dd | ||
![]() |
91dbd725b9 | ||
![]() |
9aba69838a | ||
![]() |
dd65f959da | ||
![]() |
441a6de8e1 | ||
![]() |
cdf5cf88f7 | ||
![]() |
27599f8cc4 | ||
![]() |
37901579b8 | ||
![]() |
787fc7bfb8 | ||
![]() |
69400ecbd4 | ||
![]() |
055b1c50b2 | ||
![]() |
9823ec410e | ||
![]() |
ae8181d889 | ||
![]() |
c1a8624422 | ||
![]() |
e0d90e5d98 | ||
![]() |
510af56cc0 | ||
![]() |
c999e1c9e7 | ||
![]() |
766961b3a8 | ||
![]() |
36fe901504 | ||
![]() |
0317555d61 | ||
![]() |
91aebdfc98 | ||
![]() |
933c9d7114 | ||
![]() |
1bcc11b9a8 | ||
![]() |
3063bc51ee | ||
![]() |
615b894d0b | ||
![]() |
242a9662d9 | ||
![]() |
c4d6f498f6 | ||
![]() |
814d447d8c | ||
![]() |
d5e0064a68 | ||
![]() |
23a51fd1d8 | ||
![]() |
686397a671 | ||
![]() |
a2e3f8625a | ||
![]() |
0b8dabe195 | ||
![]() |
20accdb6b9 | ||
![]() |
22234b15b5 | ||
![]() |
33903c5df8 | ||
![]() |
35902ed071 | ||
![]() |
1add0050b6 | ||
![]() |
959c874630 | ||
![]() |
c15ac68a6f | ||
![]() |
f7e81d2ab9 | ||
![]() |
1f539bf724 | ||
![]() |
2e9a26d84a | ||
![]() |
a36890d61d | ||
![]() |
21a4a8666c | ||
![]() |
79ad3bdb32 | ||
![]() |
0bc216ed49 | ||
![]() |
f3ee0f4fe4 | ||
![]() |
cefb5e3668 | ||
![]() |
778704d51b | ||
![]() |
25933a7e39 | ||
![]() |
38b6b590f3 | ||
![]() |
b888ad5b02 | ||
![]() |
a6cc743573 | ||
![]() |
577fc55fef | ||
![]() |
4df6168e87 | ||
![]() |
14b6d25f79 | ||
![]() |
2ed6e0aa4b | ||
![]() |
dd9ccb4351 | ||
![]() |
96b7ce6259 | ||
![]() |
9d1a5ad65a | ||
![]() |
c44f35d629 | ||
![]() |
1efbc967f9 | ||
![]() |
72b1cf7eaf | ||
![]() |
2094e69b4a | ||
![]() |
628ba75262 |
9
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
28
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: build
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
node-version: [14.x, 16.x, 18.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build
|
@@ -5,7 +5,8 @@
|
||||
"MD024": false,
|
||||
"MD026": false,
|
||||
"MD033": false,
|
||||
"MD034": false
|
||||
"MD034": false,
|
||||
"MD053": false
|
||||
},
|
||||
"ignores": ["node_modules", "CHANGELOG.md"]
|
||||
}
|
||||
|
12
README.md
@@ -8,6 +8,9 @@
|
||||
|
||||
<!-- Badges -->
|
||||
<p align="center">
|
||||
<a href="https://gohugo.io" alt="Hugo website">
|
||||
<img src="https://img.shields.io/badge/generator-hugo-brightgreen" />
|
||||
</a>
|
||||
<a href="https://app.netlify.com/sites/hinode-demo/deploys" alt="Netlify Status">
|
||||
<img src="https://img.shields.io/netlify/151e88a3-d161-4045-856d-778fea43fc2f" />
|
||||
</a>
|
||||
@@ -41,7 +44,7 @@
|
||||
|
||||
## About
|
||||
|
||||

|
||||

|
||||
|
||||
- [Online Demo][demo]
|
||||
- [PageSpeed Insights][pagespeed]
|
||||
@@ -55,8 +58,9 @@ Additional features include:
|
||||
- Social links
|
||||
- Blog pagination
|
||||
- Code highlighting
|
||||
- Command prompt
|
||||
- Color customization
|
||||
- i18n support
|
||||
- Language switcher
|
||||
|
||||
<!-- TODO: add tutorial deep-link
|
||||
Detailed background information is available on the author's [personal blog][blog].
|
||||
@@ -106,9 +110,9 @@ The main site configuration is available in `./config/_default`. Some remarks:
|
||||
|
||||
- **Menu items** - `menus/menus.en.toml` contains language-specific items for the navigation bar and social media links for the home page's footer.
|
||||
- **Content** - Ensure the `mainSections` in `config.toml` is synchronized with the `content` folder, default values are `["blog", "projects"]`.
|
||||
- **Theme color** - Update `themeColor` and `themeOpacity` within the `[style]` section of `params.toml` to update the site's primary color and opacity. You can use the [WCAG Color Contrast Checker][contrast_checker] to validate the contrast ratio of your color to improve accessibility.
|
||||
- **Theme style** - Update `themeColor` and `themeOpacity` within the `[style]` section of `params.toml` to update the site's primary color and opacity. You can use the [WCAG Color Contrast Checker][contrast_checker] to validate the contrast ratio of your color to improve accessibility. Additionally, set `themeFont` and `themeFontPath` to override the default font.
|
||||
- **Comments** - Comments are powered by [utterances][utterances], a lightweight comments widget built on GitHub issues. Update the `repo` of the `[comments]` section of `params.toml`.
|
||||
- **Security headings** - The local development server uses the header configuration as provided by `server.toml`. Similar settings are defined in the `netlify.toml` file provided in the repository's root when deploying to [Netlify][netlify].
|
||||
- **Security policy** - The theme uses rather strict security policies by default. Be sure to include references to external sources in the header configuration to avoid broken links. The settings of the local development server are defined in `server.toml`. Similar settings are defined in the `netlify.toml` file provided in the repository's root when deploying to [Netlify][netlify].
|
||||
|
||||
## Contributing
|
||||
|
||||
|
BIN
assets/img/boots.jpg
Normal file
After Width: | Height: | Size: 4.8 MiB |
@@ -72,23 +72,24 @@ Source:
|
||||
tokenize: "forward",
|
||||
cache: 100,
|
||||
document: {
|
||||
id: 'id',
|
||||
store: [
|
||||
"href", "title", "description"
|
||||
],
|
||||
id: "id",
|
||||
tag: "tag",
|
||||
store: ["href", "title", "description"],
|
||||
index: ["title", "description", "content"]
|
||||
}
|
||||
});
|
||||
|
||||
// https://discourse.gohugo.io/t/range-length-or-last-element/3803/2
|
||||
|
||||
{{ $list := (site.RegularPages) -}}
|
||||
// Note: uses .Site.AllPages as .Site.RegularPages only returns content for the current language
|
||||
// pages without a title (such as browserconfig.xml) are excluded
|
||||
{{ $list := where (where .Site.AllPages "Kind" "in" "page") "Title" "!=" "" }}
|
||||
{{ $len := (len $list) -}}
|
||||
|
||||
index.add(
|
||||
{{ range $index, $element := $list -}}
|
||||
{
|
||||
id: {{ $index }},
|
||||
tag: "{{ .Lang }}",
|
||||
href: "{{ .RelPermalink }}",
|
||||
title: {{ .Title | jsonify }},
|
||||
{{ with .Description -}}
|
||||
@@ -109,7 +110,9 @@ Source:
|
||||
function show_results(){
|
||||
const maxResult = 5;
|
||||
var searchQuery = this.value;
|
||||
var results = index.search(searchQuery, {limit: maxResult, enrich: true});
|
||||
// filter the results for the currently tagged language
|
||||
const lang = document.documentElement.lang;
|
||||
var results = index.search(searchQuery, { index: ['title', 'description', 'content'], limit: maxResult, tag: lang, enrich: true });
|
||||
|
||||
// flatten results since index.search() returns results for each indexed field
|
||||
const flatResults = new Map(); // keyed by href to dedupe results
|
||||
|
@@ -1,5 +1,9 @@
|
||||
// Define template variables
|
||||
$themeColor: {{ site.Params.style.themeColor | default "#007bff" }};
|
||||
$themeColor: {{ site.Params.style.themeColor | default "#007bff" }};
|
||||
$themeFont: {{ site.Params.style.themeFont | default "Inter" }};
|
||||
$carousel-control-prev-icon-bg: url("/img/carousel_prev.svg") !default;
|
||||
$carousel-control-next-icon-bg: url("/img/carousel_next.svg") !default;
|
||||
|
||||
|
||||
// Import Bootstrap functions
|
||||
@import "bootstrap/scss/functions";
|
||||
@@ -61,7 +65,9 @@ $themeColor: {{ site.Params.style.themeColor | default "#007bff" }};
|
||||
@import "components/blockquote.scss";
|
||||
@import "components/buttons.scss";
|
||||
@import "components/card.scss";
|
||||
@import "components/carousel.scss";
|
||||
@import "components/clipboard.scss";
|
||||
@import "components/command.scss";
|
||||
@import "components/comments.scss";
|
||||
@import "components/navbar.scss";
|
||||
@import "components/img.scss";
|
||||
|
@@ -8,7 +8,7 @@ $fa-font-path: "../fonts";
|
||||
// Remove the border from the focused navigation toggler
|
||||
$navbar-toggler-focus-width: 0 !default;
|
||||
|
||||
$font-family-sans-serif: "Inter", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
|
||||
$font-family-sans-serif: $themeFont, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
|
||||
$headings-font-weight: 600 !default;
|
||||
$font-weight-lighter: lighter !default;
|
||||
$font-weight-light: 200 !default;
|
||||
|
8
assets/scss/components/_carousel.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
.gradient {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
43
assets/scss/components/_command.scss
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Adapted from PrismJS 1.29.0
|
||||
https://prismjs.com/download.html#themes=prism&plugins=command-line */
|
||||
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
|
||||
.command-line-prompt {
|
||||
border-right: 1px solid #999;
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 100%;
|
||||
letter-spacing: -1px;
|
||||
margin-right: 1em;
|
||||
pointer-events: none;
|
||||
text-align: right;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.command-line-prompt > span::before {
|
||||
opacity: 0.7;
|
||||
content: " ";
|
||||
display: block;
|
||||
padding-right: 0.8em;
|
||||
}
|
||||
|
||||
.command-line-prompt > span[data-prompt]::before {
|
||||
content: attr(data-prompt);
|
||||
}
|
||||
|
||||
.command-line-prompt > span[data-continuation-prompt]::before {
|
||||
content: attr(data-continuation-prompt);
|
||||
}
|
||||
|
||||
.command-line span.token.output {
|
||||
/* Make shell output lines a bit lighter to distinguish them from shell commands */
|
||||
opacity: 0.7;
|
||||
}
|
2
config/_default/config.en.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
# Multilingual
|
||||
mainSections = ["blog", "projects"]
|
2
config/_default/config.nl.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
# Multilingual
|
||||
mainSections = ["blog", "projecten"]
|
@@ -12,14 +12,12 @@ enableInlineShortcodes = true
|
||||
# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456
|
||||
ignoreErrors = ["error-remote-getjson"]
|
||||
enableEmoji = true
|
||||
timeout = "60s"
|
||||
|
||||
# Multilingual
|
||||
defaultContentLanguage = "en"
|
||||
disableLanguages = ["nl"]
|
||||
|
||||
|
||||
|
||||
mainSections = ["blog", "projects"]
|
||||
# disableLanguages = ["nl"]
|
||||
DefaultContentLanguageInSubdir = true
|
||||
|
||||
[taxonomies]
|
||||
tag = 'tags'
|
||||
|
@@ -5,8 +5,21 @@
|
||||
[en.params]
|
||||
introTitle = "Welcome to Hinode!"
|
||||
introCaption = "A clean blog theme for your Hugo site based on Bootstrap 5."
|
||||
introLink = "/about"
|
||||
introLink = "/en/about"
|
||||
introLinkTitle = "About"
|
||||
license = "Licensed under Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank'>CC BY-NC-SA 4.0</a>)."
|
||||
socialTitle = "Follow me"
|
||||
socialCaption = "I work on everything coding and tweet developer memes"
|
||||
socialCaption = "I work on everything coding and tweet developer memes"
|
||||
|
||||
[nl]
|
||||
languageName = "Nederlands"
|
||||
contentDir = "content/nl"
|
||||
weight = 2
|
||||
[nl.params]
|
||||
introTitle = "Welkom bij Hinode!"
|
||||
introCaption = "Een thema voor Hugo gebaseerd op Bootstrap 5."
|
||||
introLink = "/nl/over-mij"
|
||||
introLinkTitle = "Over mij"
|
||||
license = "Gelicenseerd onder Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank'>CC BY-NC-SA 4.0</a>)."
|
||||
socialTitle = "Volg mij"
|
||||
socialCaption = "Ik doe aan programmeren en tweet memes"
|
37
config/_default/menus/menus.nl.toml
Normal file
@@ -0,0 +1,37 @@
|
||||
[[main]]
|
||||
name = "Over mij"
|
||||
url = "/over-mij/"
|
||||
weight = 10
|
||||
|
||||
[[main]]
|
||||
name = "Blog"
|
||||
url = "/blog/"
|
||||
weight = 20
|
||||
|
||||
[[main]]
|
||||
name = "Projecten"
|
||||
url = "/projecten/"
|
||||
weight = 30
|
||||
|
||||
[[main]]
|
||||
name = "Tags"
|
||||
url = "/tags/"
|
||||
weight = 40
|
||||
|
||||
[[social]]
|
||||
name = "LinkedIn"
|
||||
pre = "<i class=\"fab fa-linkedin fa-2x\"></i>"
|
||||
url = "https://linkedin.com/"
|
||||
weight = 10
|
||||
|
||||
[[social]]
|
||||
name = "GitHub"
|
||||
pre = "<i class=\"fab fa-github fa-2x\"></i>"
|
||||
url = "https://github.com/"
|
||||
weight = 20
|
||||
|
||||
[[social]]
|
||||
name = "Medium"
|
||||
pre = "<i class=\"fab fa-medium fa-2x\"></i>"
|
||||
url = "https://medium.com/"
|
||||
weight = 30
|
@@ -21,10 +21,10 @@ schemaAuthorTwitter = "https://twitter.com/markdumay"
|
||||
schemaAuthorLinkedIn = "https://www.linkedin.com/in/markdumay/"
|
||||
schemaAuthorGitHub = "https://github.com/markdumay"
|
||||
schemaLocale = "en-US"
|
||||
schemaLogo = "logo512x512.png"
|
||||
schemaLogo = "img/logo512x512.png"
|
||||
schemaLogoWidth = 512
|
||||
schemaLogoHeight = 512
|
||||
schemaImage = "logo1280x640.png"
|
||||
schemaImage = "img/logo1280x640.png"
|
||||
schemaImageWidth = 1280
|
||||
schemaImageHeight = 640
|
||||
# schemaTwitter = "https://twitter.com/gethinode"
|
||||
@@ -46,10 +46,12 @@ schemaSection = "blog"
|
||||
[style]
|
||||
themeColor = "#D43900" #00b0f0
|
||||
themeOpacity = "10"
|
||||
themeFont = "Inter"
|
||||
themeFontPath = "https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap"
|
||||
|
||||
[main]
|
||||
featurePhoto = "img/sunrise.jpg" # source: https://unsplash.com/photos/ZX6BPboJrYk
|
||||
logo = "/logo_embedded.svg"
|
||||
featurePhoto = "/img/sunrise.jpg" # source: https://unsplash.com/photos/ZX6BPboJrYk
|
||||
logo = "/img/logo_embedded.svg"
|
||||
|
||||
|
||||
[comments]
|
||||
|
@@ -7,8 +7,8 @@ for = '/**'
|
||||
Content-Security-Policy = """\
|
||||
default-src 'self'; \
|
||||
script-src 'self' \
|
||||
https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js \
|
||||
https://cdn.jsdelivr.net/npm/flexsearch@0.7.21/dist/flexsearch.bundle.js \
|
||||
https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js \
|
||||
https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.7.31/dist/flexsearch.bundle.js \
|
||||
https://utteranc.es/client.js; \
|
||||
style-src 'self' localhost:1313 https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \
|
||||
object-src 'none'; \
|
||||
@@ -16,7 +16,7 @@ for = '/**'
|
||||
connect-src 'self' localhost:1313 ws://localhost:1313/livereload; \
|
||||
font-src 'self' https://fonts.gstatic.com; \
|
||||
frame-src 'self' localhost:1313 https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com; \
|
||||
img-src 'self' https://i.vimeocdn.com https://i.ytimg.com; \
|
||||
img-src 'self' https: data:; \
|
||||
manifest-src 'self'; \
|
||||
media-src 'self' \
|
||||
"""
|
||||
|
@@ -5,7 +5,7 @@ date: "2022-04-11"
|
||||
showComments: false
|
||||
---
|
||||
|
||||
<p class="text-center"><img src="/logo_embedded.svg" class="img-fluid w-50" alt="Logo"></p>
|
||||
<p class="text-center"><img src="/img/logo_embedded.svg" class="img-fluid w-50" alt="Logo"></p>
|
||||
|
||||
<center>Hinode is a clean blog theme for Hugo, an open-source static site generator.</center>
|
||||
|
||||
|
@@ -5,7 +5,8 @@ date: 2022-04-16
|
||||
description: "Examples on how to enable code highlighting"
|
||||
tags: ["code"]
|
||||
thumbnail: img/notepad.jpg
|
||||
credits: Photo by <a href="https://unsplash.com/@frederickjmedina">Frederick Medina</a> on <a href="https://unsplash.com/photos/PdfRE-xB--s">Unsplash</a>
|
||||
photoCredits: <a href="https://unsplash.com/@frederickjmedina">Frederick Medina</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/PdfRE-xB--s">Unsplash</a>
|
||||
---
|
||||
|
||||
## Code Fencing
|
||||
@@ -29,9 +30,9 @@ Use code fencing to highlight the syntax of a specific language.
|
||||
</div>
|
||||
```
|
||||
|
||||
## Highlight Partial
|
||||
## Highlight Shortcode
|
||||
|
||||
Use the `highlight` partial to customize the layout of a specific code block.
|
||||
Use the `highlight` shortcode to customize the layout of a specific code block.
|
||||
|
||||
{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
|
||||
// GetTitleFunc returns a func that can be used to transform a string to
|
||||
|
206
content/en/blog/custom-shortcodes.md
Normal file
@@ -0,0 +1,206 @@
|
||||
---
|
||||
author: "Mark Dumay"
|
||||
title: "Custom Shortcodes"
|
||||
date: 2022-12-05
|
||||
description: "Available shortcodes using Bootstrap components and styling"
|
||||
tags: ["bootstrap", "shortcode"]
|
||||
thumbnail: img/boots.jpg
|
||||
photoCredits: <a href="https://unsplash.com/@nate_dumlao">Nathan Dumlao</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/QLPWQvHvmII">Unsplash</a>
|
||||
---
|
||||
|
||||
Bootstrap is an open-source web development framework originally created by Twitter. It uses a responsive, mobile-first approach that scales seamlessly across different screen sizes. Bootstrap includes an extensive collection of ready-to-use components, such as navigation bars, pagination controls, buttons, and much more. The Hinode theme exposes several of those components as Hugo shortcodes to simplify their usage within markdown content. The below paragraphs illustrate the available shortcodes and how to use them.
|
||||
|
||||
## Carousel Shortcode
|
||||
|
||||
Use the `carousel` shortcode to display a carousel of several images, with behavior similar as the [Image Shortcode](#image-shortcode). The shortcode supports the following arguments:
|
||||
|
||||
| Argument | Required | Description |
|
||||
|-----------|----------|-------------|
|
||||
| ratio | No | Aspect ratio of the image, either "1x1", "4x3" (default), "16x9", or "21x9". |
|
||||
| class | No | Optional class attribute of the `carousel` element, e.g. "w-75". |
|
||||
{.table}
|
||||
|
||||
Add an inner `img` element for each slide of the carousel. The `img` element supports the following arguments:
|
||||
|
||||
| Argument | Required | Description |
|
||||
|-----------|----------|-------------|
|
||||
| src | Yes | Required url of the image, e.g. "img/boots.jpg" or "https://picsum.photos/id/27/3264/1836". |
|
||||
| caption | No | Optional image caption. If set, the image is darkened to improve the contrast. The caption is hidden on smaller screens. |
|
||||
{.table}
|
||||
|
||||
As an example, the following shortcode displays a centered carousel with three slides, 16x9 aspect ratio, and a relative width of 67% on large screens.
|
||||
|
||||
```html
|
||||
{{</* carousel ratio="16x9" class="col-sm-12 col-lg-8 mx-auto" */>}}
|
||||
{{</* img src="img/coffee.jpg" caption="slide 1" */>}}
|
||||
{{</* img src="img/phone.jpg" caption="slide 2" */>}}
|
||||
{{</* img src="img/dunes.jpg" caption="slide 3" */>}}
|
||||
{{</* /carousel */>}}
|
||||
```
|
||||
|
||||
The result looks like this:
|
||||
{{< carousel ratio="16x9" class="col-sm-12 col-lg-8 mx-auto" >}}
|
||||
{{< img src="img/coffee.jpg" caption="slide 1" >}}
|
||||
{{< img src="img/phone.jpg" caption="slide 2" >}}
|
||||
{{< img src="img/dunes.jpg" caption="slide 3" >}}
|
||||
{{< /carousel >}}
|
||||
|
||||
## Command Prompt Shortcode
|
||||
|
||||
The `command` shortcode generates terminal output for either `bash`, `powershell`, or `sql` shell languages. The shortcode supports the following arguments:
|
||||
|
||||
| Argument | Required | Description |
|
||||
|-----------|----------|-------------|
|
||||
| user | No | Optional user to add to the prompt, e.g. "user". |
|
||||
| host | No | Optional host to add to the prompt, e.g. "localhost". |
|
||||
| prompt | No | Optional prompt override, e.g. "PS C:\Users\User>". |
|
||||
| shell | No | Type of shell, either "bash" (default), "powershell", or "sql". |
|
||||
{.table}
|
||||
|
||||
### Bash (default shell)
|
||||
|
||||
Use the `command` shortcode to generate a block with a default bash command prompt.
|
||||
|
||||
```html
|
||||
{{%/* command */%}}
|
||||
export MY_VAR=123
|
||||
{{%/* /command */%}}
|
||||
```
|
||||
|
||||
The result looks like this:
|
||||
{{% command %}}
|
||||
export MY_VAR=123
|
||||
{{% /command %}}
|
||||
|
||||
Specify `user` and `host` to add the user context to the prompt. In addition, use `(out)` to specify an output line and use `\` to denote a line continuation.
|
||||
|
||||
```html
|
||||
{{%/* command user="user" host="localhost" */%}}
|
||||
export MY_VAR=123
|
||||
echo "hello"
|
||||
(out)hello
|
||||
echo one \
|
||||
two \
|
||||
three
|
||||
(out)one two three
|
||||
echo "goodbye"
|
||||
(out)goodbye
|
||||
{{%/* /command */%}}
|
||||
```
|
||||
|
||||
The result looks like this:
|
||||
{{% command user="user" host="localhost" %}}
|
||||
export MY_VAR=123
|
||||
echo "hello"
|
||||
(out)hello
|
||||
echo one \
|
||||
two \
|
||||
three
|
||||
(out)one two three
|
||||
echo "goodbye"
|
||||
(out)goodbye
|
||||
{{% /command %}}
|
||||
|
||||
### PowerShell
|
||||
|
||||
Set the `shell` argument to `powershell` to generate a PowerShell terminal. Override the `prompt` to add a directory if needed. Use the backtick `` ` `` symbol to denote a line continuation.
|
||||
|
||||
```html
|
||||
{{%/* command prompt="PS C:\Users\User>" shell="powershell" */%}}
|
||||
Write-Host `
|
||||
'Hello' `
|
||||
'from' `
|
||||
'PowerShell!'
|
||||
(out)Hello from PowerShell!
|
||||
Write-Host 'Goodbye from PowerShell!'
|
||||
(out)Goodbye from PowerShell!
|
||||
{{%/* /command */%}}
|
||||
```
|
||||
|
||||
The result looks like this:
|
||||
{{% command prompt="PS C:\Users\User>" shell="powershell" %}}
|
||||
Write-Host `
|
||||
'Hello' `
|
||||
'from' `
|
||||
'PowerShell!'
|
||||
(out)Hello from PowerShell!
|
||||
Write-Host 'Goodbye from PowerShell!'
|
||||
(out)Goodbye from PowerShell!
|
||||
{{% /command %}}
|
||||
|
||||
### SQL
|
||||
|
||||
Set the `shell` argument to `sql` to generate a SQL terminal. Use the `(con)` suffix to denote a line continuation.
|
||||
|
||||
```html
|
||||
{{%/* command prompt="mysql>" shell="sql" */%}}
|
||||
set @my_var = 'foo';
|
||||
set @my_other_var = 'bar';
|
||||
CREATE TABLE people ((con)
|
||||
first_name VARCHAR(30) NOT NULL,(con)
|
||||
last_name VARCHAR(30) NOT NULL(con)
|
||||
);
|
||||
(out)Query OK, 0 rows affected (0.09 sec)
|
||||
insert into people(con)
|
||||
values ('John', 'Doe');
|
||||
(out)Query OK, 1 row affected (0.02 sec)
|
||||
select *(con)
|
||||
from people(con)
|
||||
order by last_name;
|
||||
(out)+------------+-----------+
|
||||
(out)| first_name | last_name |
|
||||
(out)+------------+-----------+
|
||||
(out)| John | Doe |
|
||||
(out)+------------+-----------+
|
||||
(out)1 row in set (0.00 sec)
|
||||
{{%/* /command */%}}
|
||||
```
|
||||
|
||||
The result looks like this:
|
||||
{{% command prompt="mysql>" shell="sql" %}}
|
||||
set @my_var = 'foo';
|
||||
set @my_other_var = 'bar';
|
||||
CREATE TABLE people ((con)
|
||||
first_name VARCHAR(30) NOT NULL,(con)
|
||||
last_name VARCHAR(30) NOT NULL(con)
|
||||
);
|
||||
(out)Query OK, 0 rows affected (0.09 sec)
|
||||
insert into people(con)
|
||||
values ('John', 'Doe');
|
||||
(out)Query OK, 1 row affected (0.02 sec)
|
||||
select *(con)
|
||||
from people(con)
|
||||
order by last_name;
|
||||
(out)+------------+-----------+
|
||||
(out)| first_name | last_name |
|
||||
(out)+------------+-----------+
|
||||
(out)| John | Doe |
|
||||
(out)+------------+-----------+
|
||||
(out)1 row in set (0.00 sec)
|
||||
{{% /command %}}
|
||||
|
||||
## Image Shortcode
|
||||
|
||||
Use the `image` shortcode to display a responsive image with a specific aspect ratio. The source link can refer to either an image available in the `/assets/img` folder of your site or a public web location. The shortcode renders the image as a so-called [image set][mozilla_image] to optimize the image for different screen sizes and resolutions. Behind the scenes, Hugo renders the images in `WebP` format and stores them in a local folder (`resources` or `public`). The images are processed using the quality setting specified in the `[imaging]` section of the main [config file][hugo_imaging] (defaults to 75). Supported image types are `.png`, `.jpeg`, `.gif`, `.tiff`, `.bmp`, and `.webp`. A fallback image of type `.jpeg` is provided for older browsers.The shortcode supports the following arguments:
|
||||
|
||||
| Argument | Required | Description |
|
||||
|-----------|----------|-------------|
|
||||
| src | Yes | Required url of the image, e.g. "img/boots.jpg" or "https://picsum.photos/id/27/3264/1836". |
|
||||
| ratio | No | Optional aspect ratio of the image, either "1x1", "4x3", "16x9", or "21x9". If set, the image is resized and cropped to match the ratio. Else the original aspect ratio of the image is kept. |
|
||||
| class | No | Optional class attribute of the inner `img` element, e.g. "rounded". |
|
||||
| title | No | Optional alternate text of the image. |
|
||||
| caption | No | Optional figure caption. |
|
||||
{.table}
|
||||
|
||||
As an example, the following shortcode displays an image with rounded corners and a 21x9 aspect ratio.
|
||||
|
||||
```html
|
||||
{{</* image src="img/flowers.jpg" ratio="21x9" caption="Figure caption" class="rounded" */>}}
|
||||
```
|
||||
|
||||
The result looks like this:
|
||||
{{< image src="img/flowers.jpg" ratio="21x9" caption="Figure caption" class="rounded">}}
|
||||
|
||||
[mozilla_image]: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
|
||||
[hugo_imaging]: https://gohugo.io/content-management/image-processing/#imaging-configuration
|
@@ -4,8 +4,10 @@ title: "Emoji Support"
|
||||
date: 2021-07-15
|
||||
description: "Guide to emoji usage in Hugo"
|
||||
tags: ["emoji"]
|
||||
thumbnail: img/dunes.jpg # https://picsum.photos/id/184/4288/2848
|
||||
credits: Photo by <a href="https://unsplash.com/@timdegroot">Tim de Groot</a> on <a href="https://unsplash.com/photos/yNGQ830uFB4">Unsplash</a>
|
||||
# thumbnail: img/dunes.jpg
|
||||
thumbnail: https://picsum.photos/id/184/4288/2848.jpg
|
||||
photoCredits: <a href="https://unsplash.com/@timdegroot">Tim de Groot</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/yNGQ830uFB4">Unsplash</a>
|
||||
---
|
||||
|
||||
Emoji can be enabled in a Hugo project in a number of ways.
|
||||
|
@@ -5,7 +5,8 @@ description: "Sample article showcasing basic Markdown syntax and formatting for
|
||||
tags: ["markdown", "css", "html"]
|
||||
date: 2022-01-14
|
||||
thumbnail: img/phone.jpg # https://picsum.photos/id/160/3200/2119
|
||||
credits: Photo by <a href="https://unsplash.com/@thomweerd">Thom</a> on <a href="https://unsplash.com/photos/Zdcq3iKly6g">Unsplash</a>
|
||||
photoCredits: <a href="https://unsplash.com/@thomweerd">Thom</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/Zdcq3iKly6g">Unsplash</a>
|
||||
---
|
||||
|
||||
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
||||
|
@@ -1,40 +0,0 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
title: "Placeholder Text"
|
||||
date: 2021-07-13
|
||||
description: "Lorem Ipsum Dolor Si Amet"
|
||||
tags: ["markdown", "text"]
|
||||
thumbnail: img/city.jpg # https://picsum.photos/id/1067/5760/3840
|
||||
credits: Photo by <a href="https://unsplash.com/@kevinjyoung">Kevin Young</a> on <a href="https://unsplash.com/photos/-icmOdYWXuQ">Unsplash</a>
|
||||
---
|
||||
|
||||
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
|
||||
|
||||
{{< image src="img/flowers.jpg" ratio="21x9" caption="Figure caption" class="rounded">}}
|
||||
|
||||
1. Exierant elisi ambit vivere dedere
|
||||
2. Duce pollice
|
||||
3. Eris modo
|
||||
4. Spargitque ferrea quos palude
|
||||
|
||||
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
|
||||
|
||||
1. Comas hunc haec pietate fetum procerum dixit
|
||||
2. Post torum vates letum Tiresia
|
||||
3. Flumen querellas
|
||||
4. Arcanaque montibus omnes
|
||||
5. Quidem et
|
||||
|
||||
## Vagus elidunt
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||
|
||||
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
|
||||
|
||||
## Mane refeci capiebant unda mulcebat
|
||||
|
||||
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
|
||||
|
||||
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
|
||||
|
||||
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, _oculos nomen_ non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
|
@@ -3,9 +3,10 @@ author: "Hugo Authors"
|
||||
title: "Rich Content"
|
||||
date: 2021-07-13
|
||||
description: "A brief description of Hugo Shortcodes"
|
||||
tags: ["shortcodes", "privacy"]
|
||||
tags: ["shortcode", "privacy"]
|
||||
thumbnail: img/flowers.jpg # https://picsum.photos/id/106/2592/1728
|
||||
credits: Photo by <a href="https://unsplash.com/@flutterhappy">Arvee Marie</a> on <a href="https://unsplash.com/photos/YnfGtpt2gf4">Unsplash</a>
|
||||
photoCredits: <a href="https://unsplash.com/@flutterhappy">Arvee Marie</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/YnfGtpt2gf4">Unsplash</a>
|
||||
---
|
||||
|
||||
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
|
||||
|
@@ -5,7 +5,8 @@ date: 2021-07-15
|
||||
description: "Another project"
|
||||
tags: ["javascript", "golang"]
|
||||
thumbnail: img/coffee.jpg # https://picsum.photos/id/1060/5598/3732
|
||||
credits: Photo by <a href="https://unsplash.com/@kfred">Karl Fredrickson</a> on <a href="https://unsplash.com/photos/TYIzeCiZ_60">Unsplash</a>
|
||||
photoCredits: <a href="https://unsplash.com/@kfred">Karl Fredrickson</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/TYIzeCiZ_60">Unsplash</a>
|
||||
---
|
||||
|
||||
Vivamus iaculis metus sed magna porta tincidunt. Aliquam molestie eget orci eu elementum. Integer pellentesque dolor sit amet suscipit maximus. Duis consequat, massa vitae volutpat rhoncus, erat augue venenatis velit, a auctor leo nulla nec turpis. Nunc ut libero sapien. Vivamus aliquam ultrices vestibulum. Sed sit amet vestibulum dolor, ut vehicula diam. Sed felis purus, feugiat vitae vulputate quis, sodales vitae dui. Pellentesque volutpat fringilla sapien varius condimentum. Integer odio massa, pharetra at bibendum vitae, aliquam nec erat.
|
||||
|
@@ -5,7 +5,8 @@ date: 2021-07-15
|
||||
description: "A sample project"
|
||||
tags: ["html", "css"]
|
||||
thumbnail: img/laptop.jpg # https://picsum.photos/id/0/5616/3744
|
||||
credits: Photo by <a href="https://unsplash.com/@alejandroescamilla">Alejandro Escamilla</a> on <a href="https://unsplash.com/photos/yC-Yzbqy7PY">Unsplash</a>
|
||||
photoCredits: <a href="https://unsplash.com/@alejandroescamilla">Alejandro Escamilla</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/yC-Yzbqy7PY">Unsplash</a>
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
3
content/nl/_index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
---
|
49
content/nl/about.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
slug: "over-mij"
|
||||
title: "Over mij"
|
||||
description: "Een blog thema voor Hugo gebaseerd op Bootstrap 5."
|
||||
date: "2022-04-11"
|
||||
showComments: false
|
||||
---
|
||||
|
||||
<p class="text-center"><img src="/img/logo_embedded.svg" class="img-fluid w-50" alt="Logo"></p>
|
||||
|
||||
<center>Hinode is een blog thema voor Hugo, een open-source statische website generator.</center>
|
||||
|
||||
<section class="section section-sm mt-5">
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-4">
|
||||
<i class="fa-brands fa-bootstrap fa-2xl"></i>
|
||||
<h2 class="h4">Bootstrap raamwerk</h2>
|
||||
<p>Bouw snelle websites geschikt voor mobiele en desktop schermen met Bootstrap 5. Pas de site eenvoudig aan met bronbestanden in Sass.</p>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<i class="fa-solid fa-magnifying-glass fa-2xl"></i>
|
||||
<h2 class="h4">Volledig doorzoekbaar</h2>
|
||||
<p>Doorzoek je site met FlexSearch, een software bibliotheek zonder afhankelijkheden.</p>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<i class="fa-solid fa-code fa-2xl"></i>
|
||||
<h2 class="h4">Ontwikkelgereedschap</h2>
|
||||
<p>Gebruik Node Package Manager om het bouwproces inclusief versiebeheer volledig te automatiseren.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Overige functies:
|
||||
|
||||
* Reacties
|
||||
* Sociale links
|
||||
* Paginering
|
||||
* Scrollspy
|
||||
* Code markeren
|
||||
* Kleuren aanpassen
|
||||
* Internationalisering
|
||||
|
||||
Hinode is geinspireerd door de volgende thema's:
|
||||
|
||||
* [Blist](https://github.com/apvarun/blist-hugo-theme) - een blog thema voor Hugo op basis van Tailwind CSS.
|
||||
* [Doks](https://github.com/h-enk/doks) - een Hugo thema voor het bouwen van veilige, snelle, en SEO-geoptimaliseerde documentatiesites, die je eenvoudig kunt actualiseren en aanpassen.
|
4
content/nl/blog/_index.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
author: Katheryn Fox
|
||||
title: Blog
|
||||
---
|
60
content/nl/blog/code-highlighting.md
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
author: "Mark Dumay"
|
||||
slug: "code-markeren"
|
||||
title: "Code markeren"
|
||||
date: 2022-04-16
|
||||
description: "Voorbeelden om de syntax van een taal te markeren."
|
||||
tags: ["code"]
|
||||
thumbnail: img/notepad.jpg
|
||||
photoCredits: <a href="https://unsplash.com/@frederickjmedina">Frederick Medina</a>
|
||||
# credits: Photo by <a href="https://unsplash.com/@frederickjmedina">Frederick Medina</a> on <a href="https://unsplash.com/photos/PdfRE-xB--s">Unsplash</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/PdfRE-xB--s">Unsplash</a>
|
||||
---
|
||||
|
||||
## Code Fencing
|
||||
|
||||
Gebruik code fencing om de syntax voor een specifieke taal te markeren.
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"themes": [],
|
||||
"projects": [],
|
||||
"configuration": {}
|
||||
}
|
||||
```
|
||||
|
||||
```html
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
<code>some code...</code>
|
||||
</pre>
|
||||
</div>
|
||||
```
|
||||
|
||||
## Highlight Shortcode
|
||||
|
||||
Gebruik de `highlight` shortcode om de lay-out van een taalfragment aan te passen.
|
||||
|
||||
{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
|
||||
// GetTitleFunc returns a func that can be used to transform a string to
|
||||
// title case.
|
||||
//
|
||||
// The supported styles are
|
||||
//
|
||||
// - "Go" (strings.Title)
|
||||
// - "AP" (see https://www.apstylebook.com/)
|
||||
// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
|
||||
//
|
||||
// If an unknown or empty style is provided, AP style is what you get.
|
||||
func GetTitleFunc(style string) func(s string) string {
|
||||
switch strings.ToLower(style) {
|
||||
case "go":
|
||||
return strings.Title
|
||||
case "chicago":
|
||||
return transform.NewTitleConverter(transform.ChicagoStyle)
|
||||
default:
|
||||
return transform.NewTitleConverter(transform.APStyle)
|
||||
}
|
||||
}
|
||||
{{< / highlight >}}
|
207
content/nl/blog/custom-shortcodes.md
Normal file
@@ -0,0 +1,207 @@
|
||||
---
|
||||
author: "Mark Dumay"
|
||||
title: "Extra shortcodes"
|
||||
date: 2022-12-05
|
||||
description: "Beschikbare shortcodes die gebruik maken van Bootstrap componenten en vormgeving"
|
||||
tags: ["bootstrap", "shortcode"]
|
||||
thumbnail: img/boots.jpg
|
||||
photoCredits: <a href="https://unsplash.com/@nate_dumlao">Nathan Dumlao</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/QLPWQvHvmII">Unsplash</a>
|
||||
---
|
||||
|
||||
|
||||
Bootstrap is een open-source raamwerk voor het ontwikkelen van websites gemaakt door Twitter. Het volgt een aanpak die geschikt is voor meerdere schermformaten, inclusief mobiele apparaten. Bootstrap bevat een uitgebreide collectie van direct bruikbare componenten, zoals navigatiemenu's, paginering, knoppen, en nog veel meer. Om het gebruik hiervan in markdown pagina's te vergemakkelijken, stelt het Hinode thema enkele van deze componenten beschikbaar als Hugo shortcode. De onderstaande paragrafen bieden een overzicht en uitleg van de beschikbare shortcodes.
|
||||
|
||||
## Carousel Shortcode
|
||||
|
||||
Gebruik de `carousel` shortcode om een carousel van meerdere plaatjes te tonen, analoog aan de [Image Shortcode](#image-shortcode). De shortcode ondersteunt de volgende parameters:
|
||||
|
||||
| Parameter | Verplicht | Toelichting |
|
||||
|-----------|-----------|-------------|
|
||||
| ratio | Nee | Verhouding van het plaatje, de mogelijke waarden zijn "1x1", "4x3" (standaard), "16x9", en "21x9". |
|
||||
| class | Nee | Optionele `class` waarde van het `carousel` element, bijvoorbeeld "w-75". |
|
||||
{.table}
|
||||
|
||||
Voeg een `img` element toe voor elke pagina van de carousel. Het `img` element ondersteunt de volgende parameters:
|
||||
|
||||
| Parameter | Verplicht | Toelichting |
|
||||
|-----------|-----------|-------------|
|
||||
| src | Ja | Verplichte url van het plaatje, bijvoorbeeld "img/boots.jpg" of "https://picsum.photos/id/27/3264/1836". |
|
||||
| caption | Nee | Optionele beschrijving van het plaatje. Het plaatje wordt iets donkerder gemaakt om het contrast te verhogen. Op kleinere schermen wordt de beschrijving weggelaten. |
|
||||
{.table}
|
||||
|
||||
Ter illustratie toont de volgende shortcode een carousel met drie pagina's in een verhouding van 16x9 en een relatieve breedte van 67% voor grote schermen.
|
||||
|
||||
```html
|
||||
{{</* carousel ratio="16x9" class="col-sm-12 col-lg-8 mx-auto" */>}}
|
||||
{{</* img src="img/coffee.jpg" caption="slide 1" */>}}
|
||||
{{</* img src="img/phone.jpg" caption="slide 2" */>}}
|
||||
{{</* img src="img/dunes.jpg" caption="slide 3" */>}}
|
||||
{{</* /carousel */>}}
|
||||
```
|
||||
|
||||
Het resultaat ziet er als volgt uit:
|
||||
{{< carousel ratio="16x9" class="col-sm-12 col-lg-8 mx-auto" >}}
|
||||
{{< img src="img/coffee.jpg" caption="slide 1" >}}
|
||||
{{< img src="img/phone.jpg" caption="slide 2" >}}
|
||||
{{< img src="img/dunes.jpg" caption="slide 3" >}}
|
||||
{{< /carousel >}}
|
||||
|
||||
## Command Prompt Shortcode
|
||||
|
||||
De `command` shortcode simuleert een terminal voor `bash`, `powershell` of `sql` shell talen. De shortcode ondersteunt de volgende parameters:
|
||||
|
||||
| Parameter | Verplicht | Toelichting |
|
||||
|-----------|----------|-------------|
|
||||
| user | Nee | Optionele gebruiker om toe te voegen aan de prompt, bijvoorbeeld "user". |
|
||||
| host | Nee | Optionele omgeving om toe te voegen aan de prompt, bijvoorbeeld "localhost". |
|
||||
| prompt | Nee | Optionele vervanging van de prompt, bijvoorbeeld "PS C:\Users\User>". |
|
||||
| shell | Nee | Type shell, met ondersteuning voor "bash" (standaard), "powershell", of "sql". |
|
||||
{.table}
|
||||
|
||||
### Bash (standaard shell)
|
||||
|
||||
Gebruik de `command` shortcode om een bash terminal te simuleren.
|
||||
|
||||
```html
|
||||
{{%/* command */%}}
|
||||
export MY_VAR=123
|
||||
{{%/* /command */%}}
|
||||
```
|
||||
|
||||
Het resultaat ziet er als volgt uit:
|
||||
{{% command %}}
|
||||
export MY_VAR=123
|
||||
{{% /command %}}
|
||||
|
||||
Gebruik `user` en `host` om de gebruikerscontext mee te geven aan de prompt. Maak daarnaast gebruik van `(out)` om output aan te geven, met `\` als markering van een bijbehorende regel.
|
||||
|
||||
```html
|
||||
{{%/* command user="user" host="localhost" */%}}
|
||||
export MY_VAR=123
|
||||
echo "hello"
|
||||
(out)hello
|
||||
echo one \
|
||||
two \
|
||||
three
|
||||
(out)one two three
|
||||
echo "goodbye"
|
||||
(out)goodbye
|
||||
{{%/* /command */%}}
|
||||
```
|
||||
|
||||
Het resultaat ziet er als volgt uit:
|
||||
{{% command user="user" host="localhost" %}}
|
||||
export MY_VAR=123
|
||||
echo "hello"
|
||||
(out)hello
|
||||
echo one \
|
||||
two \
|
||||
three
|
||||
(out)one two three
|
||||
echo "goodbye"
|
||||
(out)goodbye
|
||||
{{% /command %}}
|
||||
|
||||
### PowerShell
|
||||
|
||||
Geef `powershell` op als waarde voor het argument `shell` om een PowerShell terminal te simuleren. Je kunt `prompt` aanpassen om een eventule directory aan te geven. Het backtick `` ` `` symbool geeft aan dat het commando doorgaat op de volgende regel.
|
||||
|
||||
```html
|
||||
{{%/* command prompt="PS C:\Users\User>" shell="powershell" */%}}
|
||||
Write-Host `
|
||||
'Hello' `
|
||||
'from' `
|
||||
'PowerShell!'
|
||||
(out)Hello from PowerShell!
|
||||
Write-Host 'Goodbye from PowerShell!'
|
||||
(out)Goodbye from PowerShell!
|
||||
{{%/* /command */%}}
|
||||
```
|
||||
|
||||
Het resultaat ziet er als volgt uit:
|
||||
{{% command prompt="PS C:\Users\User>" shell="powershell" %}}
|
||||
Write-Host `
|
||||
'Hello' `
|
||||
'from' `
|
||||
'PowerShell!'
|
||||
(out)Hello from PowerShell!
|
||||
Write-Host 'Goodbye from PowerShell!'
|
||||
(out)Goodbye from PowerShell!
|
||||
{{% /command %}}
|
||||
|
||||
### SQL
|
||||
|
||||
Geef `sql` op als waarde voor het argument `shell` om een SQL terminal te simuleren. Gebruik `(con)` als markering van een bijbehorende regel.
|
||||
|
||||
```html
|
||||
{{%/* command prompt="mysql>" shell="sql" */%}}
|
||||
set @my_var = 'foo';
|
||||
set @my_other_var = 'bar';
|
||||
CREATE TABLE people ((con)
|
||||
first_name VARCHAR(30) NOT NULL,(con)
|
||||
last_name VARCHAR(30) NOT NULL(con)
|
||||
);
|
||||
(out)Query OK, 0 rows affected (0.09 sec)
|
||||
insert into people(con)
|
||||
values ('John', 'Doe');
|
||||
(out)Query OK, 1 row affected (0.02 sec)
|
||||
select *(con)
|
||||
from people(con)
|
||||
order by last_name;
|
||||
(out)+------------+-----------+
|
||||
(out)| first_name | last_name |
|
||||
(out)+------------+-----------+
|
||||
(out)| John | Doe |
|
||||
(out)+------------+-----------+
|
||||
(out)1 row in set (0.00 sec)
|
||||
{{%/* /command */%}}
|
||||
```
|
||||
|
||||
Het resultaat ziet er als volgt uit:
|
||||
{{% command prompt="mysql>" shell="sql" %}}
|
||||
set @my_var = 'foo';
|
||||
set @my_other_var = 'bar';
|
||||
CREATE TABLE people ((con)
|
||||
first_name VARCHAR(30) NOT NULL,(con)
|
||||
last_name VARCHAR(30) NOT NULL(con)
|
||||
);
|
||||
(out)Query OK, 0 rows affected (0.09 sec)
|
||||
insert into people(con)
|
||||
values ('John', 'Doe');
|
||||
(out)Query OK, 1 row affected (0.02 sec)
|
||||
select *(con)
|
||||
from people(con)
|
||||
order by last_name;
|
||||
(out)+------------+-----------+
|
||||
(out)| first_name | last_name |
|
||||
(out)+------------+-----------+
|
||||
(out)| John | Doe |
|
||||
(out)+------------+-----------+
|
||||
(out)1 row in set (0.00 sec)
|
||||
{{% /command %}}
|
||||
|
||||
## Image Shortcode
|
||||
|
||||
Gebruik de `image` shortcode om een adaptief plaatje met een specifieke verhouding te tonen. De bron kan verwijzen naar een bestand in de `/assets/img` folder van je website of naar een publieke weblocatie. De shortcode genereert het plaatje als een zogenaamde [image set][mozilla_image] om deze te optimaliseren voor meerdere schermformaten en verschillende resoluties. Achter de schermen converteert Hugo de plaatjes naar een `WebP` bestandsformaat en slaat deze op in een lokale folder (`resources` of `public`). De kwaliteit van het plaatje kan worden opgegeven in de sectie `[imaging]` van de site [configuratie][hugo_imaging] (75 is de standaardwaarde). De geschikte bestandsformaten zijn `.png`, `.jpeg`, `.gif`, `.tiff`, `.bmp` en `.webp`. Een plaatje in het formaat `.jpeg` is beschikbaar voor oudere browsers. De shortcode ondersteunt de volgende parameters:
|
||||
|
||||
| Parameter | Verplicht | Toelichting |
|
||||
|-----------|----------|-------------|
|
||||
| src | Ja | Verplichte url van het plaatje, bijvoorbeeld "img/boots.jpg" of "https://picsum.photos/id/27/3264/1836". |
|
||||
| ratio | Nee | Verhouding van het plaatje, de mogelijke waarden zijn "1x1", "4x3", "16x9", en "21x9". Indien opgegeven wordt het plaatje bijgesneden en verkleind om te voldoen aan de ratio. Als de verhouding niet is opgegeven dan wordt de verhouding van het originele bestand gebruikt. |
|
||||
| class | Nee | Optionele `class` waarde van het `img` element, bijvoorbeeld "rounded". |
|
||||
| title | Nee | Optionele beschrijving van het plaatje. |
|
||||
| caption | Nee | Optioneel onderschrift van het plaatje. |
|
||||
{.table}
|
||||
|
||||
Ter illustratie toont de volgende shortcode een plaatje met afgeronde hoeken en een verhouding van 21x9.
|
||||
|
||||
```html
|
||||
{{</* image src="img/flowers.jpg" ratio="21x9" caption="Onderschrift" class="rounded" */>}}
|
||||
```
|
||||
|
||||
Het resultaat ziet er als volgt uit:
|
||||
{{< image src="img/flowers.jpg" ratio="21x9" caption="Onderschrift" class="rounded">}}
|
||||
|
||||
[mozilla_image]: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
|
||||
[hugo_imaging]: https://gohugo.io/content-management/image-processing/#imaging-configuration
|
25
content/nl/blog/emoji-support.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
slug: "emoji-ondersteuning"
|
||||
title: "Emoji ondersteuning"
|
||||
date: 2021-07-15
|
||||
description: "Gids voor het gebruik van emoji met Hugo"
|
||||
tags: ["emoji"]
|
||||
# thumbnail: img/dunes.jpg
|
||||
thumbnail: https://picsum.photos/id/184/4288/2848.jpg
|
||||
photoCredits: <a href="https://unsplash.com/@timdegroot">Tim de Groot</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/yNGQ830uFB4">Unsplash</a>
|
||||
---
|
||||
|
||||
Je kunt op meerdere manieren emoji gebruiken binnen Hugo.
|
||||
|
||||
<!--more-->
|
||||
|
||||
Je kunt de [`emojify`](https://gohugo.io/functions/emojify/) functie direct aanroepen vanuit een template of [Inline Shortcode](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||
|
||||
Zet de waarde `enableEmoji` op `true` in de globale [configuratie](https://gohugo.io/getting-started/configuration/) om emoji direct te kunnen gebruiken in content, bijvoorbeeld:
|
||||
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
De [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) geeft een handig overzicht van alle beschikbare emoji codes.
|
15
content/nl/blog/markdown-syntax.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
slug: "markdown-syntax-handleiding"
|
||||
title: "Markdown syntax handleiding"
|
||||
description: "Een voorbeeldartikel die het gebruik van Markdown illustreert."
|
||||
tags: ["markdown", "css", "html"]
|
||||
date: 2022-01-14
|
||||
thumbnail: img/phone.jpg # https://picsum.photos/id/160/3200/2119
|
||||
photoCredits: <a href="https://unsplash.com/@thomweerd">Thom</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/Zdcq3iKly6g">Unsplash</a>
|
||||
---
|
||||
|
||||
Nunc porta nisi ac massa tincidunt, ac facilisis magna faucibus. Nullam consectetur luctus ante, sed venenatis quam malesuada id. Curabitur tempus semper elit, in euismod justo vestibulum nec. Nulla luctus, arcu non venenatis posuere, sapien dolor interdum massa, eget feugiat ipsum nulla sed orci. Vivamus sit amet gravida diam. Morbi aliquam urna et congue tincidunt. Vestibulum tincidunt libero non dolor viverra, non malesuada nisl ultricies. Fusce venenatis justo non nisl pretium auctor. Aliquam fermentum metus sem, porttitor auctor diam elementum a. Phasellus vel ornare ante. Nunc blandit dictum rhoncus.
|
||||
|
||||
Proin sagittis felis sed euismod interdum. Duis pellentesque tempus leo non luctus. Integer convallis ultricies rhoncus. Donec eu mauris eget justo dictum efficitur imperdiet et nibh. Sed ornare enim eros, et ornare sem accumsan sodales. Maecenas pellentesque sollicitudin massa quis varius. Integer et tempor arcu. Curabitur vitae varius metus, at luctus massa. Pellentesque fringilla neque congue ultricies fermentum. Curabitur vulputate eros eget eros pharetra dignissim. Morbi pulvinar iaculis tincidunt.
|
35
content/nl/blog/rich-content.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
slug: "multimedia"
|
||||
title: "Multimedia"
|
||||
date: 2021-07-13
|
||||
description: "Een overzicht van enkele Hugo Shortcodes"
|
||||
tags: ["shortcode", "privacy"]
|
||||
thumbnail: img/flowers.jpg # https://picsum.photos/id/106/2592/1728
|
||||
photoCredits: <a href="https://unsplash.com/@flutterhappy">Arvee Marie</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/YnfGtpt2gf4">Unsplash</a>
|
||||
---
|
||||
|
||||
Hugo biedt diverse [shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) voor het toevoegen van multimedia, inclusief een [privacy configuratie](https://gohugo.io/about/hugo-and-gdpr/) en een verzameling van eenvoudige shortcodes voor het toevoegen van statische en no-JS versies van diverse sociale media.
|
||||
|
||||
## <!--more-->
|
||||
|
||||
## YouTube Privacy Enhanced Shortcode
|
||||
|
||||
{{< youtube id="ZJthWmvUzzc" class="video">}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Twitter Simple Shortcode
|
||||
|
||||
{{< twitter_simple user="SanDiegoZoo" id="1453110110599868418" >}}
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
## Vimeo Simple Shortcode
|
||||
|
||||
{{< vimeo_simple id="48912912" class="__h_video" >}}
|
6
content/nl/browserconfig.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
draft: false
|
||||
outputs:
|
||||
- xml
|
||||
url: browserconfig.xml
|
||||
---
|
5
content/nl/projects/_index.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
author: Katheryn Fox
|
||||
title: Projecten
|
||||
url: "projecten"
|
||||
---
|
13
content/nl/projects/another-project.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
slug: "ander-project"
|
||||
title: "Ander project"
|
||||
date: 2021-07-15
|
||||
description: "Ander project"
|
||||
tags: ["javascript", "golang"]
|
||||
thumbnail: img/coffee.jpg # https://picsum.photos/id/1060/5598/3732
|
||||
photoCredits: <a href="https://unsplash.com/@kfred">Karl Fredrickson</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/TYIzeCiZ_60">Unsplash</a>
|
||||
---
|
||||
|
||||
Vivamus iaculis metus sed magna porta tincidunt. Aliquam molestie eget orci eu elementum. Integer pellentesque dolor sit amet suscipit maximus. Duis consequat, massa vitae volutpat rhoncus, erat augue venenatis velit, a auctor leo nulla nec turpis. Nunc ut libero sapien. Vivamus aliquam ultrices vestibulum. Sed sit amet vestibulum dolor, ut vehicula diam. Sed felis purus, feugiat vitae vulputate quis, sodales vitae dui. Pellentesque volutpat fringilla sapien varius condimentum. Integer odio massa, pharetra at bibendum vitae, aliquam nec erat.
|
13
content/nl/projects/sample-project.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
author: "Hugo Authors"
|
||||
slug: "voorbeeldproject"
|
||||
title: "Voorbeeldproject"
|
||||
date: 2021-07-15
|
||||
description: "Een voorbeeldproject"
|
||||
tags: ["html", "css"]
|
||||
thumbnail: img/laptop.jpg # https://picsum.photos/id/0/5616/3744
|
||||
photoCredits: <a href="https://unsplash.com/@alejandroescamilla">Alejandro Escamilla</a>
|
||||
photoSource: <a href="https://unsplash.com/photos/yC-Yzbqy7PY">Unsplash</a>
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
108
i18n/de.yaml
Normal file
@@ -0,0 +1,108 @@
|
||||
# Content
|
||||
- id: postedOnDate
|
||||
translation: "Veröffentlicht am {{ . }}"
|
||||
- id: lastModified
|
||||
translation: "(Zuletzt verändert am {{ . }})"
|
||||
- id: translationsLabel
|
||||
translation: "Andere Sprachen: "
|
||||
- id: translationsSeparator
|
||||
translation: ", "
|
||||
- id: readMore
|
||||
translation: "Weiterlesen"
|
||||
- id: morePosts
|
||||
translation: "Weitere Beiträge"
|
||||
- id: olderPosts
|
||||
translation: "Ältere Beiträge"
|
||||
- id: recentPosts
|
||||
translation: "Aktuelle Beiträge"
|
||||
- id: newerPosts
|
||||
translation: "Neuere Beiträge"
|
||||
- id: previousPost
|
||||
translation: "Vorheriger Beitrag"
|
||||
- id: nextPost
|
||||
translation: "Nächster Beitrag"
|
||||
- id: read
|
||||
translation: "Lesezeit"
|
||||
- id: minutesShort
|
||||
translation: "Min."
|
||||
- id: words
|
||||
translation: "Wörter"
|
||||
- id: copyright
|
||||
translation: "Copyright"
|
||||
- id: photoBy
|
||||
translation: "Foto von"
|
||||
- id: photoOn
|
||||
translation: "auf"
|
||||
- id: article
|
||||
translation: "Artikel"
|
||||
- id: articles
|
||||
translation: "Artikel"
|
||||
- id: paginationPrevious
|
||||
translation: "Vorherige"
|
||||
- id: paginationNext
|
||||
translation: "Nächste"
|
||||
- id: paginationFirst
|
||||
translation: "Erste"
|
||||
- id: paginationLast
|
||||
translation: "Letzte"
|
||||
|
||||
# 404 page
|
||||
- id: pageNotFound
|
||||
translation: "Ups! Diese Seite existiert nicht. Versuche es über die"
|
||||
- id: pageNotFoundTitle
|
||||
translation: "Nicht gefunden"
|
||||
- id: pageNotFoundHome
|
||||
translation: "Startseite"
|
||||
|
||||
|
||||
# Navigation
|
||||
- id: toggleNavigation
|
||||
translation: "Navigation umschalten"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Sprache"
|
||||
- id: gcseLabelShort
|
||||
translation: "Suche"
|
||||
- id: gcseLabelLong
|
||||
translation: "Suche {{ .Site.Title }}"
|
||||
- id: gcseClose
|
||||
translation: "Schließen"
|
||||
|
||||
# Staticman
|
||||
- id: noComment
|
||||
translation: "Kein Kommentar"
|
||||
- id: oneComment
|
||||
translation: "Kommentar"
|
||||
- id: moreComment
|
||||
translation: "Kommentare"
|
||||
- id: useMarkdown
|
||||
translation: "Du kannst Markdown-Syntax benutzen"
|
||||
- id: yourName
|
||||
translation: "Dein Name"
|
||||
- id: yourEmail
|
||||
translation: "Deine E-Mail-Adresse"
|
||||
- id: yourWebsite
|
||||
translation: "Deine Webseite"
|
||||
|
||||
# Delayed Disqus
|
||||
- id: show
|
||||
translation: "Zeige"
|
||||
- id: comments
|
||||
translation: "Kommentare"
|
||||
|
||||
# Related posts
|
||||
- id: seeAlso
|
||||
translation: "Siehe auch"
|
||||
|
||||
# Table of contents
|
||||
- id: toc
|
||||
translation: "Auf dieser Seite"
|
||||
|
||||
# Search
|
||||
- id: ui_search
|
||||
translation: "Durchsuche diese Seite..."
|
||||
- id: ui_no_results
|
||||
translation: "Keine Ergebnisse für"
|
||||
|
||||
# Draft
|
||||
- id: draft
|
||||
translation: "Entwurf"
|
30
i18n/en.yaml
@@ -13,6 +13,8 @@
|
||||
translation: "More Posts"
|
||||
- id: olderPosts
|
||||
translation: "Older Posts"
|
||||
- id: recentPosts
|
||||
translation: "Recent Posts"
|
||||
- id: newerPosts
|
||||
translation: "Newer Posts"
|
||||
- id: previousPost
|
||||
@@ -27,15 +29,31 @@
|
||||
translation: "words"
|
||||
- id: copyright
|
||||
translation: "Copyright"
|
||||
|
||||
- id: photoBy
|
||||
translation: "Photo by"
|
||||
- id: photoOn
|
||||
translation: "on"
|
||||
- id: article
|
||||
translation: "Article"
|
||||
- id: articles
|
||||
translation: "Articles"
|
||||
- id: paginationPrevious
|
||||
translation: "Previous"
|
||||
- id: paginationNext
|
||||
translation: "Next"
|
||||
- id: paginationFirst
|
||||
translation: "First"
|
||||
- id: paginationLast
|
||||
translation: "Last"
|
||||
|
||||
# 404 page
|
||||
- id: pageNotFound
|
||||
translation: "Whoops, this page doesn't exist. Move along. (404 error)"
|
||||
translation: "Oops! This page doesn't exist. Try going back to our"
|
||||
- id: pageNotFoundTitle
|
||||
translation: "Not found"
|
||||
- id: pageNotFoundHome
|
||||
translation: "home page"
|
||||
|
||||
# Footer
|
||||
- id: poweredBy # Accepts HTML
|
||||
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered • Theme <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adapted from <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||
|
||||
# Navigation
|
||||
- id: toggleNavigation
|
||||
@@ -77,7 +95,7 @@
|
||||
|
||||
# Table of contents
|
||||
- id: toc
|
||||
translation: "What's on this Page"
|
||||
translation: "On this page"
|
||||
|
||||
# Search
|
||||
- id: ui_search
|
||||
|
108
i18n/nl.yaml
Normal file
@@ -0,0 +1,108 @@
|
||||
# Content
|
||||
- id: postedOnDate
|
||||
translation: "Gepubliceerd op {{ . }}"
|
||||
- id: lastModified
|
||||
translation: "(Laatst gewijzigd op {{ . }})"
|
||||
- id: translationsLabel
|
||||
translation: "Overige talen: "
|
||||
- id: translationsSeparator
|
||||
translation: ", "
|
||||
- id: readMore
|
||||
translation: "Lees meer"
|
||||
- id: morePosts
|
||||
translation: "Meer berichten"
|
||||
- id: olderPosts
|
||||
translation: "Oudere berichten"
|
||||
- id: recentPosts
|
||||
translation: "Recente berichten"
|
||||
- id: newerPosts
|
||||
translation: "Nieuwere berichten"
|
||||
- id: previousPost
|
||||
translation: "Vorig bericht"
|
||||
- id: nextPost
|
||||
translation: "Volgend bericht"
|
||||
- id: read
|
||||
translation: "leestijd"
|
||||
- id: minutesShort
|
||||
translation: "min"
|
||||
- id: words
|
||||
translation: "woorden"
|
||||
- id: copyright
|
||||
translation: "Copyright"
|
||||
- id: photoBy
|
||||
translation: "Foto van"
|
||||
- id: photoOn
|
||||
translation: "via"
|
||||
- id: article
|
||||
translation: "Artikel"
|
||||
- id: articles
|
||||
translation: "Artikelen"
|
||||
- id: paginationPrevious
|
||||
translation: "Vorige"
|
||||
- id: paginationNext
|
||||
translation: "Volgende"
|
||||
- id: paginationFirst
|
||||
translation: "Eerste"
|
||||
- id: paginationLast
|
||||
translation: "Laatste"
|
||||
|
||||
# 404 page
|
||||
- id: pageNotFound
|
||||
translation: "Oeps, deze pagina bestaat niet. Ga terug naar het"
|
||||
- id: pageNotFoundTitle
|
||||
translation: "Niet gevonden"
|
||||
- id: pageNotFoundHome
|
||||
translation: "begin"
|
||||
|
||||
|
||||
# Navigation
|
||||
- id: toggleNavigation
|
||||
translation: "Toon/verberg navigatie"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Taal"
|
||||
- id: gcseLabelShort
|
||||
translation: "Zoeken"
|
||||
- id: gcseLabelLong
|
||||
translation: "Zoeken op {{ .Site.Title }}"
|
||||
- id: gcseClose
|
||||
translation: "Sluiten"
|
||||
|
||||
# Staticman
|
||||
- id: noComment
|
||||
translation: "Geen commentaar"
|
||||
- id: oneComment
|
||||
translation: "commentaar"
|
||||
- id: moreComment
|
||||
translation: "commentaar"
|
||||
- id: useMarkdown
|
||||
translation: "Je kunt Markdown syntax gebruiken"
|
||||
- id: yourName
|
||||
translation: "Jouw naam"
|
||||
- id: yourEmail
|
||||
translation: "Jouw email adres"
|
||||
- id: yourWebsite
|
||||
translation: "Jouw website"
|
||||
|
||||
# Delayed Disqus
|
||||
- id: show
|
||||
translation: "Tonen"
|
||||
- id: comments
|
||||
translation: "commentaar"
|
||||
|
||||
# Related posts
|
||||
- id: seeAlso
|
||||
translation: "Zie ook"
|
||||
|
||||
# Table of contents
|
||||
- id: toc
|
||||
translation: "Inhoudsopgave"
|
||||
|
||||
# Search
|
||||
- id: ui_search
|
||||
translation: "Zoeken op deze site..."
|
||||
- id: ui_no_results
|
||||
translation: "Geen resultaten voor"
|
||||
|
||||
# Draft
|
||||
- id: draft
|
||||
translation: "Concept"
|
@@ -1,8 +1,8 @@
|
||||
{{ define "main"}}
|
||||
<main id="main">
|
||||
<div>
|
||||
<h1 id="title">Not found</h1>
|
||||
<p>Oops! This page doesn't exist. Try going back to our <a href="{{ "/" | relURL }}">home page</a>.</p>
|
||||
<h1 id="title">{{ T "pageNotFoundTitle" }}</h1>
|
||||
<p>{{ T "pageNotFound" }} <a href="{{ "/" | relURL }}">{{ T "pageNotFoundHome" }}</a>.</p>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
@@ -1,13 +1,13 @@
|
||||
{{ define "main" -}}
|
||||
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "language" $.Page.Language "format" "long")) -}}
|
||||
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "language" $.Page.Language "format" "long")) -}}
|
||||
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
|
||||
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-3">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-12 col-md-8">
|
||||
{{ range .Params.tags -}}
|
||||
<a class="btn btn-light btn-sm" href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}" role="button">{{ . }}</a>
|
||||
{{ range (.GetTerms "tags") -}}
|
||||
<a class="btn btn-light btn-sm" href="{{ (path.Join .Page.RelPermalink) | relURL }}" role="button">{{ .LinkTitle }}</a>
|
||||
{{ end -}}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
@@ -30,7 +30,9 @@
|
||||
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-3">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-12 col-md-8">
|
||||
{{- partial "image.html" (dict "url" .Params.thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" .Params.credits) -}}
|
||||
{{- $credits := "" -}}
|
||||
{{- if .Params.photoCredits }}{{ if .Params.PhotoSource }}{{ $credits = printf "%s %s %s %s" (T "photoBy") .Params.photoCredits (T "photoOn") .Params.PhotoSource }}{{ end }}{{ end -}}
|
||||
{{- partial "image.html" (dict "url" .Params.thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" $credits) -}}
|
||||
</div>
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
</div>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
{{ range $section, $taxonomy := .Site.Sections -}}
|
||||
{{ if eq $section 0 -}}
|
||||
<div class="p-4">
|
||||
<h1>Recent posts</h1>
|
||||
<h1>{{ T "recentPosts" }}</h1>
|
||||
<div class="container-fluid p-0">
|
||||
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3">
|
||||
{{ $items := first 3 ($taxonomy.Pages.ByDate.Reverse) -}}
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
{{ if gt (len $taxonomy.Pages) 3 -}}
|
||||
<a class="btn btn-outline-primary" href="{{ $taxonomy.Permalink | safeURL }}" role="button">More {{ $taxonomy.Title }} posts</a>
|
||||
<a class="btn btn-outline-primary" href="{{ $taxonomy.Permalink | safeURL }}" role="button">{{ T "morePosts" }}</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ else -}}
|
||||
|
@@ -7,11 +7,11 @@
|
||||
<div class="card-body d-flex flex-column p-0">
|
||||
<p class="card-text">
|
||||
<small class="text-muted text-uppercase">
|
||||
{{- partial "utilities/date.html" (dict "date" .Date "language" $.Page.Language "format" "long") -}}
|
||||
• {{ .ReadingTime }} {{ i18n "minutesShort" }} {{ i18n "read" }}
|
||||
{{- partial "utilities/date.html" (dict "date" .Date "format" "long") -}}
|
||||
• {{ .ReadingTime }} {{ i18n "minutesShort" }} {{ i18n "read" }}
|
||||
{{ if isset .Params "tags" -}}
|
||||
{{ range first 1 .Params.tags -}}
|
||||
• <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}" class="text-decoration-none text-primary" aria-label="Tag: {{ . }}">{{ . }}</a>
|
||||
{{ range first 1 (.GetTerms "tags") -}}
|
||||
• <a href="{{ (path.Join .Page.RelPermalink) | relURL }}" class="text-decoration-none text-primary" aria-label="Tag: {{ .LinkTitle }}">{{ .LinkTitle }}</a>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</small>
|
||||
|
@@ -30,9 +30,34 @@
|
||||
{{ $baseurl := urls.Parse $.Site.Params.Baseurl -}}
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }} class="active"{{end}}>{{ .Name }}</span>{{ with .Post}}{{ $post }}{{ end }}</a>
|
||||
<a class="nav-link {{ if $active }}active{{ end }}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }} class="active"{{end}}>{{ .Name }}</span>{{ with .Post}}{{ $post }}{{ end }}</a>
|
||||
</li>
|
||||
{{ end -}}
|
||||
|
||||
{{ if .IsTranslated }}
|
||||
{{ $currentLang := .Language.Lang }}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa-regular fa-globe"></i> {{ T "languageSwitcherLabel" }}
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
{{ range .AllTranslations }}
|
||||
<li><a class="dropdown-item {{ if eq .Language.Lang $currentLang }}active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</li>
|
||||
{{ else if .Site.IsMultiLingual }}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa-regular fa-globe"></i> {{ T "languageSwitcherLabel" }}
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
{{ range .Site.Languages }}
|
||||
<li><a class="dropdown-item" href="/{{ .Lang }}">{{ default .Lang .LanguageName }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -39,22 +39,22 @@
|
||||
{{- with .First }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="First" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-left"></i></span></a>
|
||||
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-left"></i></span></a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<a aria-disabled="true" aria-label="First" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-double-left"></i></span></a>
|
||||
<a aria-disabled="true" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-double-left"></i></span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Prev }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Previous" class="page-link" role="button"><span aria-hidden="true">Previous</span></a>
|
||||
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationPrevious" }}</span></a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<a aria-disabled="true" aria-label="Previous" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">Previous</span></a>
|
||||
<a aria-disabled="true" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ T "paginationPrevious" }}</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
@@ -79,22 +79,22 @@
|
||||
|
||||
{{- with .Next }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Next" class="page-link" role="button"><span aria-hidden="true">Next</span></a>
|
||||
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationNext" }}</span></a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<a aria-disabled="true" aria-label="Next" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">Next</span></a>
|
||||
<a aria-disabled="true" aria-label="{{ T "paginationNext" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ T "paginationNext" }}</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Last }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Last" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
||||
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<a aria-disabled="true" aria-label="Last" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
||||
<a aria-disabled="true" aria-label="{{ T "paginationLast" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -110,14 +110,14 @@
|
||||
{{- with .First }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="First" class="page-link" role="button"><span aria-hidden="true">Previous</span></a>
|
||||
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationFirst" }}</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Prev }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Previous" class="page-link" role="button"><span aria-hidden="true">Previous</span></a>
|
||||
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationPrevious" }}</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
@@ -142,16 +142,16 @@
|
||||
|
||||
{{- with .Next }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Next" class="page-link" role="button"><span aria-hidden="true">Next</span></a>
|
||||
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationNext" }}</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Last }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Last" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
||||
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-double-right"></i></span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
@@ -9,9 +9,9 @@
|
||||
|
||||
{{ if isset .Params "tags" }}
|
||||
<small class="text-muted text-uppercase">
|
||||
{{ range $index, $element := .Params.tags }}
|
||||
{{ range $index, $element := (.GetTerms "tags") }}
|
||||
{{ if gt $index 0 }}• {{ end }}
|
||||
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}" class="text-decoration-none text-primary" aria-label="Tag: {{ . }}">{{ . }}</a>
|
||||
<a href="{{ (path.Join .Page.RelPermalink) | relURL }}" class="text-decoration-none text-primary" aria-label="Tag: {{ .LinkTitle }}">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</small>
|
||||
{{ end }}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{{ $items := len (findRE "<li.*?>(.|\n)*?</li>" .TableOfContents) -}}
|
||||
{{ if (gt $items 1) -}}
|
||||
<div class="mt-4 mb-5 my-md-0 ps-xl-3 mb-lg-5 text-muted sticky-top toc d-none d-lg-block">
|
||||
<strong class="d-block h6 my-2 pb-2 border-bottom">On this page</strong>
|
||||
<strong class="d-block h6 my-2 pb-2 border-bottom">{{ T "toc" }}</strong>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end -}}
|
@@ -1,12 +1,12 @@
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/flexsearch@0.7.21/dist/flexsearch.bundle.js"
|
||||
integrity="sha256-i3A0NZGkhsKjVMzFxv3ksk0DZh3aXqu0l49Bbh0MdjE="
|
||||
src="https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.7.31/dist/flexsearch.bundle.js"
|
||||
integrity="sha384-1LalyFI+BycKouEClZE5CoFnlLr+Kx8Wslc45o5NATVo+c2mEh02i8HNaaT7XOdQ"
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
|
||||
|
@@ -6,4 +6,7 @@
|
||||
{{ partial "head/stylesheet.html" -}}
|
||||
{{ partial "head/seo.html" . }}
|
||||
{{ partialCached "head/favicon.html" . -}}
|
||||
{{ if gt (len .Site.Languages) 1}}
|
||||
<meta name="lang" content="{{ .Site.Language }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -1,35 +1,37 @@
|
||||
<!-- Copied from doks -->
|
||||
{{ with .Title }}
|
||||
{{ $.Scratch.Set "title" . }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "title" .Site.Params.title }}
|
||||
{{ end }}
|
||||
<!-- Adapted from doks -->
|
||||
{{ with .Title -}}
|
||||
{{ $.Scratch.Set "title" . -}}
|
||||
{{ else -}}
|
||||
{{ $.Scratch.Set "title" .Site.Params.title -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Description -}}
|
||||
{{ $.Scratch.Set "description" . }}
|
||||
{{ $.Scratch.Set "description" . -}}
|
||||
{{ else -}}
|
||||
{{ with .Summary | plainify -}}
|
||||
{{ $.Scratch.Set "description" . }}
|
||||
{{ $.Scratch.Set "description" . -}}
|
||||
{{ else -}}
|
||||
{{ $.Scratch.Set "description" .Site.Params.description }}
|
||||
{{ $.Scratch.Set "description" .Site.Params.description -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Params.thumbnail }}
|
||||
{{ $source := resources.Get . -}}
|
||||
{{ $dim := "1280x640" -}}
|
||||
{{ $img := ($source.Fill (printf "%s jpg" $dim)) -}}
|
||||
{{ $.Scratch.Set "thumbnail" ($img.Permalink | absURL) -}}
|
||||
{{ else }}
|
||||
{{ with .Params.thumbnail -}}
|
||||
{{ $source := partial "utilities/GetImage.html" (dict "url" .) -}}
|
||||
{{ with $source -}}
|
||||
{{ $dim := "1280x640" -}}
|
||||
{{ $img := (.Fill (printf "%s jpg" $dim)) -}}
|
||||
{{ $.Scratch.Set "thumbnail" ($img.Permalink | absURL) -}}
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ with .Site.Params.schemaImage -}}
|
||||
{{ $.Scratch.Set "thumbnail" (. | absURL) }}
|
||||
{{ $.Scratch.Set "thumbnail" (. | absURL) -}}
|
||||
{{ else -}}
|
||||
{{ $images := $.Resources.ByType "image" -}}
|
||||
{{ $featured := $images.GetMatch "*feature*" -}}
|
||||
{{ if not $featured -}}
|
||||
{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" -}}
|
||||
{{ end -}}
|
||||
{{ with $featured }}
|
||||
{{ with $featured -}}
|
||||
{{ $.Scratch.Set "thumbnail" $featured.Permalink -}}
|
||||
{{ else -}}
|
||||
{{ with $.Site.Params.images -}}
|
||||
|
@@ -8,4 +8,4 @@
|
||||
{{ end -}}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap">
|
||||
<link rel="stylesheet" href="{{ site.Params.style.themeFontPath | default "https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap" }}">
|
@@ -1,11 +1,12 @@
|
||||
<!--
|
||||
Render an image with responsive image sizing. The image should be available as resource stored in the "assets"
|
||||
folder. Images are resized using default media breakpoints and are converted to webp format. The image is
|
||||
processed using the quality setting specified in the [imaging] section of the main config file (defaults to 75).
|
||||
A fallback image is provided for older browsers. The image is wrapped in a figure if a caption is provided, else
|
||||
the image is wrapped in a div with a ratio constraint. The partial supports the following arguments:
|
||||
Render a local or remote image with responsive image sizing. Images are resized using default media breakpoints
|
||||
and are converted to webp format. The image is processed using the quality setting specified in the [imaging]
|
||||
section of the main config file (defaults to 75). A fallback image is provided for older browsers. The image is
|
||||
wrapped in a figure if a caption is provided, else the image is wrapped in a div with a ratio constraint. The
|
||||
partial supports the following arguments:
|
||||
"url": Required relative url of the image, e.g. "img/example.jpg"
|
||||
"ratio": Bootstrap ratio of the image, either "1x1", "4x3" (default), "16x9", or "21x9".
|
||||
"ratio": Optional ratio of the image, either "1x1", "4x3", "16x9", or "21x9". If set, the image is
|
||||
resized and cropped to match the ratio. Else the original aspect ratio of the image is kept.
|
||||
"outerClass": Optional class attribute of the outer div element, e.g. "img-wrap".
|
||||
"innerClass": Optional class attribute of the inner img element, e.g. "rounded".
|
||||
"title": Optional alternate text of the image.
|
||||
@@ -13,70 +14,104 @@
|
||||
-->
|
||||
|
||||
|
||||
{{ $img := resources.Get .url -}}
|
||||
{{- $validRatios := slice "1x1" "4x3" "16x9" "21x9" }}
|
||||
{{ $ratio := .ratio -}}
|
||||
{{ $url := .url -}}
|
||||
{{ $outerClass := .outerClass -}}
|
||||
{{ $innerClass := .innerClass -}}
|
||||
{{ $title := .title -}}
|
||||
{{ $caption := .caption -}}
|
||||
{{ $inner := .inner -}}
|
||||
|
||||
<!-- default ratio 4x3 -->
|
||||
{{ $smDim := "576x432" -}}
|
||||
{{ $mdDim := "768x576" -}}
|
||||
{{ $lgDim := "992x744" -}}
|
||||
{{ $xlDim := "1200x900" -}}
|
||||
{{ $xxlDim := "1400x1050" -}}
|
||||
{{- $img := partial "utilities/GetImage.html" (dict "url" $url) -}}
|
||||
{{ with $img -}}
|
||||
{{ $smDim := "" -}}
|
||||
{{ $mdDim := "" -}}
|
||||
{{ $lgDim := "" -}}
|
||||
{{ $xlDim := "" -}}
|
||||
{{ $xxlDim := "" -}}
|
||||
{{ if eq $ratio "4x3" -}}
|
||||
{{ $smDim = "576x432" -}}
|
||||
{{ $mdDim = "768x576" -}}
|
||||
{{ $lgDim = "992x744" -}}
|
||||
{{ $xlDim = "1200x900" -}}
|
||||
{{ $xxlDim = "1400x1050" -}}
|
||||
{{ else if eq $ratio "1x1" -}}
|
||||
{{ $smDim = "576x576" -}}
|
||||
{{ $mdDim = "768x768" -}}
|
||||
{{ $lgDim = "992x992" -}}
|
||||
{{ $xlDim = "1200x1200" -}}
|
||||
{{ $xxlDim = "1400x1400" -}}
|
||||
{{ else if eq $ratio "16x9" -}}
|
||||
{{ $smDim = "576x324" -}}
|
||||
{{ $mdDim = "768x432" -}}
|
||||
{{ $lgDim = "992x558" -}}
|
||||
{{ $xlDim = "1200x675" -}}
|
||||
{{ $xxlDim = "1400x788" -}}
|
||||
{{ else if eq $ratio "21x9" -}}
|
||||
{{ $smDim = "576x247" -}}
|
||||
{{ $mdDim = "768x329" -}}
|
||||
{{ $lgDim = "992x425" -}}
|
||||
{{ $xlDim = "1200x514" -}}
|
||||
{{ $xxlDim = "1400x600" -}}
|
||||
{{ else }}
|
||||
{{ $smDim = printf "576x%d" (int (math.Round (mul (div 576.0 $img.Width) $img.Height))) -}}
|
||||
{{ $mdDim = printf "768x%d" (int (math.Round (mul (div 768.0 $img.Width) $img.Height))) -}}
|
||||
{{ $lgDim = printf "992x%d" (int (math.Round (mul (div 992.0 $img.Width) $img.Height))) -}}
|
||||
{{ $xlDim = printf "1200x%d" (int (math.Round (mul (div 1200.0 $img.Width) $img.Height))) -}}
|
||||
{{ $xxlDim = printf "1400x%d" (int (math.Round (mul (div 1400.0 $img.Width) $img.Height))) -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if eq .ratio "1x1" -}}
|
||||
{{ $smDim = "576x576" -}}
|
||||
{{ $mdDim = "768x768" -}}
|
||||
{{ $lgDim = "992x992" -}}
|
||||
{{ $xlDim = "1200x1200" -}}
|
||||
{{ $xxlDim = "1400x1400" -}}
|
||||
{{ else if eq .ratio "16x9" -}}
|
||||
{{ $smDim = "576x324" -}}
|
||||
{{ $mdDim = "768x432" -}}
|
||||
{{ $lgDim = "992x558" -}}
|
||||
{{ $xlDim = "1200x675" -}}
|
||||
{{ $xxlDim = "1400x788" -}}
|
||||
{{ else if eq .ratio "21x9" -}}
|
||||
{{ $smDim = "576x247" -}}
|
||||
{{ $mdDim = "768x329" -}}
|
||||
{{ $lgDim = "992x425" -}}
|
||||
{{ $xlDim = "1200x514" -}}
|
||||
{{ $xxlDim = "1400x600" -}}
|
||||
{{ end -}}
|
||||
{{- $sm := "" -}}
|
||||
{{ $md := "" -}}
|
||||
{{ $lg := "" -}}
|
||||
{{ $xl := "" -}}
|
||||
{{ $xxl := "" -}}
|
||||
{{ $fallback := "" -}}
|
||||
{{ if $ratio }}
|
||||
{{- $sm = ($img.Fill (printf "%s webp" $smDim)) -}}
|
||||
{{ $md = ($img.Fill (printf "%s webp" $mdDim)) -}}
|
||||
{{ $lg = ($img.Fill (printf "%s webp" $lgDim)) -}}
|
||||
{{ $xl = ($img.Fill (printf "%s webp" $xlDim)) -}}
|
||||
{{ $xxl = ($img.Fill (printf "%s webp" $xxlDim)) -}}
|
||||
{{ $fallback = ($img.Fill (printf "%s jpg" $xxlDim)) -}}
|
||||
{{ else }}
|
||||
{{- $sm = ($img.Fit (printf "%s webp" $smDim)) -}}
|
||||
{{ $md = ($img.Fit (printf "%s webp" $mdDim)) -}}
|
||||
{{ $lg = ($img.Fit (printf "%s webp" $lgDim)) -}}
|
||||
{{ $xl = ($img.Fit (printf "%s webp" $xlDim)) -}}
|
||||
{{ $xxl = ($img.Fit (printf "%s webp" $xxlDim)) -}}
|
||||
{{ $fallback = ($img.Fit (printf "%s jpg" $xxlDim)) -}}
|
||||
{{ end}}
|
||||
|
||||
{{ $sm := ($img.Fill (printf "%s webp" $smDim)) -}}
|
||||
{{ $md := ($img.Fill (printf "%s webp" $mdDim)) -}}
|
||||
{{ $lg := ($img.Fill (printf "%s webp" $lgDim)) -}}
|
||||
{{ $xl := ($img.Fill (printf "%s webp" $xlDim)) -}}
|
||||
{{ $xxl := ($img.Fill (printf "%s webp" $xxlDim)) -}}
|
||||
{{ $fallback := ($img.Fill (printf "%s jpg" $xxlDim)) -}}
|
||||
|
||||
|
||||
{{ with .caption -}}
|
||||
<figure class="figure">
|
||||
<img class="figure-img img-fluid {{ $innerClass }}"
|
||||
srcset="
|
||||
{{- with $xxl.RelPermalink -}}{{.}} 1400w{{- end -}}
|
||||
{{- with $xl.RelPermalink -}}, {{.}} 1200w{{- end -}}
|
||||
{{- with $lg.RelPermalink -}}, {{.}} 992w{{- end -}}
|
||||
{{- with $md.RelPermalink -}}, {{.}} 768w{{- end -}}
|
||||
{{- with $sm.RelPermalink -}}, {{.}} 576w{{- end -}}"
|
||||
sizes="100vw"
|
||||
src="{{ $fallback.RelPermalink }}"
|
||||
alt="{{ $title }}">
|
||||
<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>
|
||||
</figure>
|
||||
{{ else -}}
|
||||
<div class="ratio ratio-{{ .ratio }} {{ .outerClass }}">
|
||||
<img class="img-fluid {{ $innerClass }}"
|
||||
srcset="
|
||||
{{- with $xxl.RelPermalink -}}{{.}} 1400w{{- end -}}
|
||||
{{- with $xl.RelPermalink -}}, {{.}} 1200w{{- end -}}
|
||||
{{- with $lg.RelPermalink -}}, {{.}} 992w{{- end -}}
|
||||
{{- with $md.RelPermalink -}}, {{.}} 768w{{- end -}}
|
||||
{{- with $sm.RelPermalink -}}, {{.}} 576w{{- end -}}"
|
||||
sizes="100vw"
|
||||
src="{{ $fallback.RelPermalink }}"
|
||||
alt="{{ $title }}">
|
||||
</div>
|
||||
{{ end -}}
|
||||
{{- with $caption -}}
|
||||
<figure class="figure">
|
||||
<img class="figure-img img-fluid {{ $innerClass }}"
|
||||
srcset="
|
||||
{{- with $xxl.RelPermalink -}}{{.}} 1400w{{- end -}}
|
||||
{{- with $xl.RelPermalink -}}, {{.}} 1200w{{- end -}}
|
||||
{{- with $lg.RelPermalink -}}, {{.}} 992w{{- end -}}
|
||||
{{- with $md.RelPermalink -}}, {{.}} 768w{{- end -}}
|
||||
{{- with $sm.RelPermalink -}}, {{.}} 576w{{- end -}}"
|
||||
sizes="100vw"
|
||||
src="{{ $fallback.RelPermalink }}"
|
||||
alt="{{ $title }}">
|
||||
<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>
|
||||
{{ $inner }}
|
||||
</figure>
|
||||
{{- else -}}
|
||||
<div class="{{ with $ratio }}ratio ratio-{{ . }}{{ end }} {{ $outerClass }}">
|
||||
<img class="img-fluid {{ $innerClass }}"
|
||||
srcset="
|
||||
{{- with $xxl.RelPermalink -}}{{.}} 1400w{{- end -}}
|
||||
{{- with $xl.RelPermalink -}}, {{.}} 1200w{{- end -}}
|
||||
{{- with $lg.RelPermalink -}}, {{.}} 992w{{- end -}}
|
||||
{{- with $md.RelPermalink -}}, {{.}} 768w{{- end -}}
|
||||
{{- with $sm.RelPermalink -}}, {{.}} 576w{{- end -}}"
|
||||
sizes="100vw"
|
||||
src="{{ $fallback.RelPermalink }}"
|
||||
alt="{{ $title }}">
|
||||
{{ $inner }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
39
layouts/partials/utilities/GetImage.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Retrieve a local or remote resource compatible with Hugo's image processing. The path of a remote image is
|
||||
rewritten to ensure processed files are stored in the final '/img' folder. The partial returns nil if the
|
||||
resource cannot be found or is incompatibile. The partial supports the following arguments:
|
||||
"url": Required path or url of the image, e.g. "img/example.jpg" or "https://example.com/img.jpg"
|
||||
-->
|
||||
|
||||
{{ $url := .url -}}
|
||||
{{ $supportedMediaTypes := slice "image/png" "image/jpeg" "image/gif" "image/tiff" "image/bmp" "image/webp" -}}
|
||||
{{ $img := "" }}
|
||||
{{ $remote := hasPrefix (lower $url) "http" }}
|
||||
{{ if $remote }}
|
||||
{{ $img = resources.GetRemote $url -}}
|
||||
{{ else }}
|
||||
{{ $img = resources.GetMatch $url -}}
|
||||
{{ end }}
|
||||
|
||||
{{ with $img -}}
|
||||
{{ if in $supportedMediaTypes (string $img.MediaType) -}}
|
||||
<!-- Rewrite the path of remote images to avoid storing processed files in the site's root -->
|
||||
<!-- Add a file extension based on the media type if needed to avoid Hugo processing errors -->
|
||||
{{ if $remote -}}
|
||||
{{ $path := (urls.Parse $url).Path }}
|
||||
{{ $filename := index (last 1 (split (delimit (split $path "/") "," "") ",")) 0 -}}
|
||||
{{ if not (path.Ext $filename) -}}
|
||||
{{ $extension := string $img.MediaType.SubType -}}
|
||||
{{ $filename = printf "%s.%s" $filename $extension -}}
|
||||
{{ end -}}
|
||||
{{ $img = $img.Content | resources.FromString (printf "/img/%s" $filename) -}}
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ warnf "Image type '%s' is not supported: %s" $img.MediaType $url -}}
|
||||
{{ $img = "" -}}
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ warnf "Cannot find image resource: %q" $url -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ return $img -}}
|
@@ -1,13 +1 @@
|
||||
{{ if eq "de" .language.Lang }}
|
||||
{{ if eq "long" .format }}
|
||||
{{ .date.Format "02" }}. {{ i18n (.date.Format "January")}} {{ .date.Format "2006"}}
|
||||
{{ else }}
|
||||
{{ .date.Format "02" }}. {{ substr (i18n (.date.Format "January")) 0 3 }} {{ .date.Format "06"}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ if eq "long" .format }}
|
||||
{{ .date.Format "January 2, 2006" }}
|
||||
{{ else }}
|
||||
{{ .date.Format "Jan 2, 06" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .format "long" }}{{ .date | time.Format ":date_long" }}{{ else }}{{ .date | time.Format ":date_short" }}{{ end }}
|
33
layouts/shortcodes/carousel.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Displays a carousel of several responsive images (see the image shortcode for more details). Add inner <img>
|
||||
elements to define individual image slides. The shortcode supports the following arguments:
|
||||
"ratio": Optional ratio of the image, either "1x1", "4x3", "16x9", or "21x9". Other values are ignored.
|
||||
Instead, the original aspect ratio of the image is preserved.
|
||||
-->
|
||||
|
||||
{{ $ratio := "" -}}
|
||||
{{ $class := "" -}}
|
||||
{{ with .Get "ratio" }}{{ $ratio = . }}{{ end -}}
|
||||
{{ with .Get "class" }}{{ $class = . }}{{ end -}}
|
||||
{{ $id := .Ordinal -}}
|
||||
{{ $images := .Inner -}}
|
||||
{{ $items := len (findRE "carousel-item" $images) -}}
|
||||
|
||||
<div id="carousel-{{ $id }}" class="carousel slide {{ $class }}" data-bs-ride="true">
|
||||
<div class="carousel-indicators">
|
||||
{{ range $index := (seq $items) -}}
|
||||
<button type="button" data-bs-target="#carousel-{{ $id }}" data-bs-slide-to="{{ sub $index 1 }}" {{ if eq $index 1 }}class="active"{{ end }} aria-current="true" aria-label="Slide {{ $index }}"></button>
|
||||
{{ end -}}
|
||||
</div>
|
||||
<div class="carousel-inner">
|
||||
{{ $images }}
|
||||
</div>
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#carousel-{{ $id }}" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#carousel-{{ $id }}" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
</div>
|
70
layouts/shortcodes/command.html
Normal file
@@ -0,0 +1,70 @@
|
||||
{{ $host := .Get "host" }}
|
||||
{{ $user := .Get "user" }}
|
||||
{{ $prompt := .Get "prompt" }}
|
||||
{{ $filter := "(out)" }}
|
||||
{{ $input := trim .Inner "\n" }}
|
||||
|
||||
{{ $shell := lower (.Get "shell") }}
|
||||
{{ $continuationPrompt := ">" }}
|
||||
{{ $continuationStr := "\\" }}
|
||||
{{ if eq $shell "powershell" }}
|
||||
{{ if not $prompt }}{{ $prompt = "PS>" }}{{ end }}
|
||||
{{ $continuationPrompt = ">>" }}
|
||||
{{ $continuationStr = "`" }}
|
||||
{{ else if eq $shell "sql" }}
|
||||
{{ if not $prompt }}{{ $prompt = "sql>" }}{{ end }}
|
||||
{{ $continuationPrompt = "->" }}
|
||||
{{ $continuationStr = "(con)" }}
|
||||
{{ else }}
|
||||
{{ $shell = "bash" }}
|
||||
{{ if not $prompt }}{{ $prompt = "$" }}{{ end }}
|
||||
{{ if (and ($host) ($user)) }}
|
||||
{{ $prompt = printf "[%s@%s] %s" $user $host $prompt}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
|
||||
{{ $lines := split $input "\n" }}
|
||||
{{ $prefix := ""}}
|
||||
{{ $prevLine := "" }}
|
||||
{{ $refined := "" }}
|
||||
{{ range $line := $lines }}
|
||||
{{ if hasPrefix $line $filter }}
|
||||
{{ $prefix = printf "%s<span></span>" $prefix }}
|
||||
{{ if eq $shell "sql" }}
|
||||
{{ $line = printf "--%s" (strings.TrimPrefix $filter $line) }}
|
||||
{{ else }}
|
||||
{{ $line = printf "#%s" (strings.TrimPrefix $filter $line) }}
|
||||
{{ end }}
|
||||
{{ else if (strings.HasSuffix $prevLine $continuationStr) }}
|
||||
{{ $prefix = printf "%s<span data-prompt=\"%s\"></span>" $prefix $continuationPrompt }}
|
||||
{{ else }}
|
||||
{{ $prefix = printf "%s<span data-prompt=\"%s\"></span>" $prefix $prompt }}
|
||||
{{ end }}
|
||||
{{ $prevLine = $line }}
|
||||
{{ if (and (eq $shell "sql") (strings.HasSuffix $line $continuationStr)) }}
|
||||
{{ $line = strings.TrimSuffix $continuationStr $line }}
|
||||
{{ end }}
|
||||
{{ $refined = printf "%s\n%s" $refined $line }}
|
||||
{{ end }}
|
||||
|
||||
{{ $refined := trim $refined "\n" }}
|
||||
|
||||
{{ $output := (transform.Highlight $refined $shell | safeHTML) }}
|
||||
|
||||
|
||||
|
||||
{{ $insert := printf "<span class=\"command-line-prompt\">%s</span><span class=\"line\">" $prefix }}
|
||||
|
||||
{{ $output := (replace $output ("<span class=\"line\">" | safeHTML) $insert 1 | safeHTML) }}
|
||||
|
||||
{{ if eq $shell "sql"}}
|
||||
{{ $output = (replace $output "<span class=\"c1\">--" "<span class=\"c1\">" | safeHTML) }}
|
||||
{{ else }}
|
||||
{{ $output = (replace $output "<span class=\"c1\">#" "<span class=\"c1\">" | safeHTML) }}
|
||||
{{ $output = (replace $output "<span class=\"c\">#" "<span class=\"c\">" | safeHTML) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $output }}
|
@@ -1,76 +1,31 @@
|
||||
<!--
|
||||
Render an image with responsive image sizing. The image should be available as resource stored in the "assets"
|
||||
folder. Images are resized using default media breakpoints and are converted to webp format. The image is
|
||||
processed using the quality setting specified in the [imaging] section of the main config file (defaults to 75).
|
||||
A fallback image is provided for older browsers. The partial supports the following arguments:
|
||||
Render a local or remote image with responsive image sizing. Images are resized using default media breakpoints
|
||||
and are converted to webp format. The image is processed using the quality setting specified in the [imaging]
|
||||
section of the main config file (defaults to 75). A fallback image is provided for older browsers. The partial
|
||||
supports the following arguments:
|
||||
"src": Required relative url of the image, e.g. "img/example.jpg"
|
||||
"ratio": Bootstrap ratio of the image, either "1x1", "4x3" (default), "16x9", or "21x9".
|
||||
"ratio": Optional ratio of the image, either "1x1", "4x3", "16x9", or "21x9". Leave empty to keep the
|
||||
original aspect ratio of the image.
|
||||
"class": Optional class attribute of the inner img element, e.g. "rounded".
|
||||
"title": Optional alternate text of the image.
|
||||
"caption": Optional figure caption.
|
||||
-->
|
||||
|
||||
{{ if isset .Params "src" }}
|
||||
{{ $url := .Get "src" }}
|
||||
{{ $ratio := "4x3" }}
|
||||
{{ $class := "" }}
|
||||
{{ $title := "" }}
|
||||
{{ $caption := "" }}
|
||||
{{- if isset .Params "src" -}}
|
||||
{{ $url := .Get "src" -}}
|
||||
{{- $validRatios := slice "1x1" "4x3" "16x9" "21x9" -}}
|
||||
{{ $ratio := .Get "ratio" -}}
|
||||
{{ if $ratio -}}
|
||||
{{ if not (in $validRatios $ratio) -}}
|
||||
{{ errorf "Invalid value for param 'ratio': %s" .Position -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{- $class := .Get "class" -}}
|
||||
{{ $title := .Get "title" -}}
|
||||
{{ $caption := .Get "caption" -}}
|
||||
|
||||
{{ $img := resources.Get $url }}
|
||||
{{ with .Get "ratio" }}{{ $ratio = . }}{{ end }}
|
||||
{{ with .Get "class" }}{{ $class = . }}{{ end }}
|
||||
{{ with .Get "title" }}{{ $title = . }}{{ end }}
|
||||
{{ with .Get "caption" }}{{ $caption = . }}{{ end }}
|
||||
|
||||
<!-- default ratio 4x3 -->
|
||||
{{ $smDim := "576x432" }}
|
||||
{{ $mdDim := "768x576" }}
|
||||
{{ $lgDim := "992x744" }}
|
||||
{{ $xlDim := "1200x900" }}
|
||||
{{ $xxlDim := "1400x1050" }}
|
||||
|
||||
{{ if eq $ratio "1x1"}}
|
||||
{{ $smDim = "576x576" }}
|
||||
{{ $mdDim = "768x768" }}
|
||||
{{ $lgDim = "992x992" }}
|
||||
{{ $xlDim = "1200x1200" }}
|
||||
{{ $xxlDim = "1400x1400" }}
|
||||
{{ else if eq $ratio "16x9"}}
|
||||
{{ $smDim = "576x324" }}
|
||||
{{ $mdDim = "768x432" }}
|
||||
{{ $lgDim = "992x558" }}
|
||||
{{ $xlDim = "1200x675" }}
|
||||
{{ $xxlDim = "1400x788" }}
|
||||
{{ else if eq $ratio "21x9"}}
|
||||
{{ $smDim = "576x247" }}
|
||||
{{ $mdDim = "768x329" }}
|
||||
{{ $lgDim = "992x425" }}
|
||||
{{ $xlDim = "1200x514" }}
|
||||
{{ $xxlDim = "1400x600" }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sm := ($img.Fill (printf "%s webp" $smDim)) }}
|
||||
{{ $md := ($img.Fill (printf "%s webp" $mdDim)) }}
|
||||
{{ $lg := ($img.Fill (printf "%s webp" $lgDim)) }}
|
||||
{{ $xl := ($img.Fill (printf "%s webp" $xlDim)) }}
|
||||
{{ $xxl := ($img.Fill (printf "%s webp" $xxlDim)) }}
|
||||
{{ $fallback := ($img.Fill (printf "%s jpg" $xxlDim)) }}
|
||||
|
||||
|
||||
<figure class="figure">
|
||||
<img class="figure-img img-fluid {{ $class}}"
|
||||
srcset="
|
||||
{{- with $xxl.RelPermalink -}}{{.}} 1400w{{- end -}}
|
||||
{{- with $xl.RelPermalink -}}, {{.}} 1200w{{- end -}}
|
||||
{{- with $lg.RelPermalink -}}, {{.}} 992w{{- end -}}
|
||||
{{- with $md.RelPermalink -}}, {{.}} 768w{{- end -}}
|
||||
{{- with $sm.RelPermalink -}}, {{.}} 576w{{- end -}}"
|
||||
sizes="100vw"
|
||||
src="{{ $fallback.RelPermalink }}"
|
||||
alt="{{ $title }}">
|
||||
<figcaption class="figure-caption">{{ $caption }}</figcaption>
|
||||
</figure>
|
||||
{{ else }}
|
||||
{{ errorf "missing value for param 'src': %s" .Position }}
|
||||
{{ end }}
|
||||
{{- partial "image.html" (dict "url" $url "ratio" $ratio "innerClass" $class "title" $title "caption" $caption) -}}
|
||||
{{ else -}}
|
||||
{{ errorf "Missing value for param 'src': %s" .Position -}}
|
||||
{{ end -}}
|
34
layouts/shortcodes/img.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
Renders a carousel item with a responsive image (see the image shortcode for more details). The shortcode
|
||||
supports the following arguments:
|
||||
"src": Required relative url of the image, e.g. "img/example.jpg"
|
||||
"ratio": Optional ratio of the image, either "1x1", "4x3", "16x9", or "21x9". Other values are ignored.
|
||||
Instead, the original aspect ratio of the image is preserved.
|
||||
"caption": Optional carousel slide caption.
|
||||
-->
|
||||
|
||||
{{- $src := .Get "src" -}}
|
||||
{{ $caption := .Get "caption" -}}
|
||||
{{- $ratio := "" -}}
|
||||
{{ with .Parent -}}
|
||||
{{ with .Get "ratio" }}{{ $ratio = . }}{{ end -}}
|
||||
{{ else }}
|
||||
{{ with .Get "ratio" }}{{ $ratio = . }}{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{- if $src -}}
|
||||
<div class="carousel-item {{ if eq .Ordinal 0 }}active{{ end }}">
|
||||
{{ partial "image.html" (dict "url" $src "ratio" $ratio "innerClass" "d-block w-100") }}
|
||||
{{ with $caption }}
|
||||
<div class="carousel-caption d-none d-md-block gradient">
|
||||
<div class="d-flex justify-content-center align-items-end h-100 w-100 p-4">{{ . }}</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else -}}
|
||||
{{ with .Parent -}}
|
||||
{{ errorf "Missing value for param 'src': %s" .Position -}}
|
||||
{{ else -}}
|
||||
{{ errorf "Missing value for param 'src': %s" .Position -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
@@ -10,10 +10,10 @@
|
||||
{{ range $.Site.Taxonomies.tags.ByCount }}
|
||||
<div class="row mt-2">
|
||||
<div class="d-none d-sm-block col-sm-3 mt-auto text-right">
|
||||
{{ .Count }} {{ if gt .Count 1 }} Articles {{ else }} Article {{ end }}
|
||||
{{ .Count }} {{ if gt .Count 1 }} {{ T "articles" }} {{ else }} {{ T "article" }} {{ end }}
|
||||
</div>
|
||||
<div class="col">
|
||||
<a href="/tags{{ .Name | relURL }}">{{ .Name | markdownify }}</a>
|
||||
<a href="{{ (path.Join .Page.RelPermalink) | relURL }}">{{ .Name | markdownify }}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@@ -22,8 +22,8 @@
|
||||
Content-Security-Policy = """\
|
||||
default-src 'self'; \
|
||||
script-src 'self' \
|
||||
https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js \
|
||||
https://cdn.jsdelivr.net/npm/flexsearch@0.7.21/dist/flexsearch.bundle.js \
|
||||
https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js \
|
||||
https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.7.31/dist/flexsearch.bundle.js \
|
||||
https://utteranc.es/client.js; \
|
||||
style-src 'self' https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \
|
||||
object-src 'none'; \
|
||||
|
1495
package-lock.json
generated
23
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@markdumay/hugo-theme-hinode",
|
||||
"version": "0.4.6",
|
||||
"version": "0.7.9",
|
||||
"description": "Hinode is a clean blog theme for Hugo, an open-source static site generator",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
@@ -15,6 +15,7 @@
|
||||
"prod": "exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender -e production",
|
||||
"prebuild": "npm run clean",
|
||||
"build": "exec-bin node_modules/.bin/hugo/hugo --gc --minify",
|
||||
"build:debug": "exec-bin node_modules/.bin/hugo/hugo -e debug --debug",
|
||||
"build:preview": "npm run build -D -F",
|
||||
"clean": "shx rm -rf public resources",
|
||||
"clean:install": "shx rm -rf package-lock.json node_modules ",
|
||||
@@ -45,26 +46,26 @@
|
||||
},
|
||||
"homepage": "https://github.com/markdumay/hugo-theme-hinode#readme",
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.2.0",
|
||||
"@fortawesome/fontawesome-free": "^6.2.1",
|
||||
"@fullhuman/postcss-purgecss": "^5.0.0",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"bootstrap": "^5.2.2",
|
||||
"eslint": "^8.25.0",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"bootstrap": "^5.2.3",
|
||||
"eslint": "^8.31.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-n": "^15.3.0",
|
||||
"eslint-plugin-n": "^15.6.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"exec-bin": "^1.0.0",
|
||||
"flexsearch": "^0.7.31",
|
||||
"hugo-installer": "^4.0.1",
|
||||
"markdownlint-cli2": "^0.5.1",
|
||||
"postcss-cli": "^10.0.0",
|
||||
"markdownlint-cli2": "^0.6.0",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"purgecss-whitelister": "^2.4.0",
|
||||
"shx": "^0.3.4",
|
||||
"stylelint": "^14.14.0",
|
||||
"stylelint-config-standard-scss": "^5.0.0"
|
||||
"stylelint": "^14.16.1",
|
||||
"stylelint-config-standard-scss": "^6.1.0"
|
||||
},
|
||||
"otherDependencies": {
|
||||
"hugo": "0.104.3"
|
||||
"hugo": "0.109.0"
|
||||
}
|
||||
}
|
||||
|
1
static/img/carousel_next.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/></svg>
|
After Width: | Height: | Size: 209 B |
1
static/img/carousel_prev.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/></svg>
|
After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |