Compare commits

...

105 Commits

Author SHA1 Message Date
Mark Dumay
87529a9d55 Merge pull request #78 from markdumay/develop
Dependencies
2022-12-07 05:39:43 +01:00
mark
7dbf1e09a3 Upgrade dependencies 2022-12-07 05:39:08 +01:00
Mark Dumay
991596d368 Merge pull request #77 from markdumay/main
Synchronize branch
2022-12-07 05:35:20 +01:00
Mark Dumay
72b319323c Merge pull request #76 from markdumay/dependabot/npm_and_yarn/eslint-plugin-n-15.6.0
Bump eslint-plugin-n from 15.5.1 to 15.6.0
2022-12-06 14:32:32 +01:00
Mark Dumay
2170bed0be Merge pull request #75 from markdumay/dependabot/npm_and_yarn/eslint-8.29.0
Bump eslint from 8.28.0 to 8.29.0
2022-12-06 14:32:04 +01:00
Mark Dumay
517185039d Merge pull request #74 from markdumay/dependabot/npm_and_yarn/stylelint-14.16.0
Bump stylelint from 14.15.0 to 14.16.0
2022-12-06 14:31:35 +01:00
dependabot[bot]
8d9eecc4c2 Bump eslint-plugin-n from 15.5.1 to 15.6.0
Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 15.5.1 to 15.6.0.
- [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases)
- [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/15.5.1...15.6.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-n
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 13:18:17 +00:00
dependabot[bot]
c94b4b75ea Bump eslint from 8.28.0 to 8.29.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.28.0 to 8.29.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.28.0...v8.29.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 13:18:07 +00:00
dependabot[bot]
2487a4740d Bump stylelint from 14.15.0 to 14.16.0
Bumps [stylelint](https://github.com/stylelint/stylelint) from 14.15.0 to 14.16.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/14.15.0...14.16.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 13:17:54 +00:00
Mark Dumay
b0239c614a Merge pull request #73 from markdumay/develop
Develop
2022-12-05 10:26:01 +01:00
mark
a1b692965a Fix #71 2022-12-05 10:22:56 +01:00
Mark Dumay
a2149c8966 Merge pull request #72 from markdumay/main
Synchronize branch
2022-12-05 10:01:36 +01:00
Mark Dumay
8bc980d1b7 Merge pull request #70 from markdumay/carousel
Carousel
2022-12-05 09:41:43 +01:00
mark
97864fe177 Extend build timeout 2022-12-05 09:39:57 +01:00
mark
f676190178 Bump version 2022-12-05 09:15:01 +01:00
Mark Dumay
0130aa39ee Merge pull request #69 from markdumay/main
Synchronize branch
2022-12-05 09:14:26 +01:00
Mark Dumay
cc3584d82f Merge branch 'carousel' into main 2022-12-05 09:13:33 +01:00
Mark Dumay
5a6a662eb0 Merge pull request #68 from markdumay/develop
Fixes
2022-12-05 09:06:01 +01:00
mark
d32dd7ec26 Bump version 2022-12-05 08:53:02 +01:00
mark
ff355a56d5 Fix #63 2022-12-05 08:52:54 +01:00
mark
a76b5f34c8 Fix #64 2022-12-05 08:44:15 +01:00
mark
d7cffa69da Fix #66 2022-12-05 08:42:26 +01:00
Mark Dumay
bb24bd4e5e Merge pull request #67 from markdumay/main
Synchronize branch
2022-12-05 08:38:08 +01:00
mark
92aefe5ef7 Bump version 2022-12-05 08:36:28 +01:00
mark
b8540aacc5 Add shortcode description 2022-12-05 08:36:09 +01:00
mark
2bfee732e0 Add carousel shortcode 2022-12-05 08:35:49 +01:00
mark
dbfccb7593 Remove redundant whitespace 2022-12-05 08:35:31 +01:00
mark
f8ae07e536 Add gradient filter for carousel images 2022-12-05 08:34:57 +01:00
mark
b48d4c5c9d Add support for inner html code snippet 2022-12-03 14:38:46 +01:00
mark
4e4ea9d552 Fix typo 2022-12-03 08:24:33 +01:00
Mark Dumay
7ae605a78a Merge pull request #62 from markdumay/language
Language switching
2022-12-03 07:20:31 +01:00
Mark Dumay
7604fd8eb0 Merge pull request #61 from markdumay/dependabot/npm_and_yarn/postcss-cli-10.1.0
Bump postcss-cli from 10.0.0 to 10.1.0
2022-12-01 15:03:30 +01:00
dependabot[bot]
4dbd820f6a Bump postcss-cli from 10.0.0 to 10.1.0
Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/postcss/postcss-cli/releases)
- [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-cli/compare/10.0.0...10.1.0)

---
updated-dependencies:
- dependency-name: postcss-cli
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-01 13:16:23 +00:00
mark
9975795b94 Add Hugo badge 2022-11-27 10:14:24 +01:00
mark
82de138569 Update CDN script references 2022-11-27 09:58:44 +01:00
mark
0c1f4984dd Upgrade dependencies 2022-11-27 08:19:24 +01:00
Mark Dumay
91dbd725b9 Merge pull request #60 from markdumay/main
Synchronize language branch
2022-11-27 08:18:17 +01:00
mark
9aba69838a Bump minor version 2022-11-27 08:15:19 +01:00
mark
dd65f959da Update hugo dependency 2022-11-27 08:13:34 +01:00
mark
441a6de8e1 Bump minor version 2022-11-27 08:09:44 +01:00
mark
cdf5cf88f7 Fix linting issue 2022-11-27 08:09:00 +01:00
mark
27599f8cc4 Make search language aware 2022-11-27 07:42:15 +01:00
mark
37901579b8 Add debug build 2022-11-27 07:41:17 +01:00
mark
787fc7bfb8 Remove redundant config 2022-11-27 07:40:57 +01:00
mark
69400ecbd4 Translate description 2022-11-26 13:46:52 +01:00
mark
055b1c50b2 Add multilingual configuration 2022-11-26 13:26:07 +01:00
mark
9823ec410e Add i8n support for photo credits 2022-11-26 13:20:12 +01:00
mark
ae8181d889 Fix missing i8n support 2022-11-26 13:19:50 +01:00
mark
c1a8624422 Fix missing i8n support 2022-11-26 13:19:32 +01:00
mark
e0d90e5d98 Add i8n support for photo credits 2022-11-26 13:18:53 +01:00
mark
510af56cc0 Add language switcher 2022-11-26 13:18:28 +01:00
mark
c999e1c9e7 Adjust spacing 2022-11-26 13:18:07 +01:00
mark
766961b3a8 Adjust photo credits to support i8n 2022-11-26 13:16:20 +01:00
mark
36fe901504 Add Dutch sample content 2022-11-26 13:15:25 +01:00
mark
0317555d61 Support localized tags 2022-11-26 13:13:29 +01:00
mark
91aebdfc98 Fix missing i8n keyword 2022-11-26 13:12:46 +01:00
mark
933c9d7114 Add Dutch language strings 2022-11-24 06:00:43 +01:00
mark
1bcc11b9a8 Refine English language strings 2022-11-24 06:00:23 +01:00
mark
3063bc51ee Add language meta tag 2022-11-24 05:59:19 +01:00
mark
615b894d0b Simplify date partial 2022-11-24 05:58:44 +01:00
Mark Dumay
242a9662d9 Merge pull request #59 from markdumay/dependabot/npm_and_yarn/bootstrap-5.2.3
Bump bootstrap from 5.2.2 to 5.2.3
2022-11-23 19:57:47 +01:00
dependabot[bot]
c4d6f498f6 Bump bootstrap from 5.2.2 to 5.2.3
Bumps [bootstrap](https://github.com/twbs/bootstrap) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.2.2...v5.2.3)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-23 13:11:35 +00:00
Mark Dumay
814d447d8c Merge pull request #58 from markdumay/dependabot/npm_and_yarn/eslint-8.28.0
Bump eslint from 8.27.0 to 8.28.0
2022-11-21 15:18:01 +01:00
dependabot[bot]
d5e0064a68 Bump eslint from 8.27.0 to 8.28.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.27.0 to 8.28.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.27.0...v8.28.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 13:59:35 +00:00
Mark Dumay
23a51fd1d8 Merge pull request #55 from markdumay/develop
Add npm badge
2022-11-16 06:51:16 +01:00
mark
686397a671 Add npm badge 2022-11-16 06:50:31 +01:00
Mark Dumay
a2e3f8625a Merge pull request #54 from markdumay/develop
Develop
2022-11-16 06:24:46 +01:00
mark
0b8dabe195 Update dependencies 2022-11-16 06:22:25 +01:00
mark
20accdb6b9 Fix indentation 2022-11-16 06:20:08 +01:00
Mark Dumay
22234b15b5 Merge pull request #53 from markdumay/main
Synchronize branch
2022-11-16 06:14:05 +01:00
Mark Dumay
33903c5df8 Merge pull request #52 from markdumay/image-test
Image handling
2022-11-16 06:13:19 +01:00
Mark Dumay
35902ed071 Merge pull request #51 from markdumay/main
Synchronize branch
2022-11-16 06:10:29 +01:00
Mark Dumay
1add0050b6 Merge pull request #50 from markdumay/dependabot/npm_and_yarn/stylelint-14.15.0
Bump stylelint from 14.14.1 to 14.15.0
2022-11-14 14:58:06 +01:00
dependabot[bot]
959c874630 Bump stylelint from 14.14.1 to 14.15.0
Bumps [stylelint](https://github.com/stylelint/stylelint) from 14.14.1 to 14.15.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/14.14.1...14.15.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 13:12:49 +00:00
mark
c15ac68a6f Bump package version 2022-11-14 09:35:22 +01:00
mark
f7e81d2ab9 Reuse partial 2022-11-14 08:55:53 +01:00
mark
1f539bf724 Strip query parameters from external images 2022-11-14 08:55:15 +01:00
Mark Dumay
2e9a26d84a Merge pull request #49 from markdumay/main
Synchronize branch
2022-11-14 05:43:32 +01:00
Mark Dumay
a36890d61d Configure dependabot version updates 2022-11-09 09:47:17 +01:00
Mark Dumay
21a4a8666c Merge pull request #48 from markdumay/develop
Update dependencies
2022-11-09 09:13:19 +01:00
mark
79ad3bdb32 Update dependencies 2022-11-09 09:10:43 +01:00
Mark Dumay
0bc216ed49 Merge pull request #47 from markdumay/develop
Image processing
2022-11-07 06:12:59 +01:00
mark
f3ee0f4fe4 Update dependencies 2022-11-07 06:10:41 +01:00
mark
cefb5e3668 Update version 2022-11-07 06:08:09 +01:00
mark
778704d51b Improve image handling 2022-11-07 06:07:47 +01:00
Mark Dumay
25933a7e39 Merge pull request #46 from markdumay/develop
Change wording
2022-11-04 05:15:40 +01:00
mark
38b6b590f3 Change wording 2022-11-04 05:13:59 +01:00
Mark Dumay
b888ad5b02 Merge pull request #45 from markdumay/develop
Develop
2022-11-03 10:52:53 +01:00
mark
a6cc743573 Update dependencies 2022-11-03 10:49:46 +01:00
mark
577fc55fef Render remote images in img folder 2022-11-03 10:46:27 +01:00
mark
4df6168e87 Move all images to separate folder 2022-11-03 10:45:47 +01:00
Mark Dumay
14b6d25f79 Merge pull request #44 from markdumay/develop
External links
2022-11-03 07:23:02 +01:00
mark
2ed6e0aa4b Refine section about security policy 2022-11-03 07:18:13 +01:00
mark
dd9ccb4351 Refine content security policy 2022-11-03 07:12:40 +01:00
mark
96b7ce6259 Improve image processing 2022-11-01 06:30:06 +01:00
Mark Dumay
9d1a5ad65a Merge pull request #42 from markdumay/develop
Add command prompt to features
2022-10-28 09:53:01 +02:00
mark
c44f35d629 Update dependencies 2022-10-28 09:51:40 +02:00
mark
1efbc967f9 Add command prompt to features 2022-10-28 09:49:06 +02:00
Mark Dumay
72b1cf7eaf Merge pull request #41 from markdumay/develop
Add command shortcode
2022-10-28 08:09:13 +02:00
mark
2094e69b4a Address linting errors 2022-10-28 08:07:49 +02:00
mark
628ba75262 Add command shortcode 2022-10-28 07:54:28 +02:00
Mark Dumay
04d749b2d5 Merge pull request #40 from markdumay/develop
Adjust clipboard button to match Bootstrap style
2022-10-21 05:41:08 +02:00
mark
408f434654 Adjust clipboard button to match Bootstrap style 2022-10-21 05:36:17 +02:00
Mark Dumay
c996f7b902 Merge pull request #39 from markdumay/develop
Update dependencies
2022-10-20 04:49:29 +02:00
mark
6d1af55263 Update dependencies 2022-10-20 04:45:43 +02:00
65 changed files with 1957 additions and 1056 deletions

9
.github/dependabot.yml vendored Normal file
View 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"

View File

@@ -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
![Logo](https://raw.githubusercontent.com/markdumay/hugo-theme-hinode/main/static/logo.png)
![Logo](https://raw.githubusercontent.com/markdumay/hugo-theme-hinode/main/static/img/logo.png)
- [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].
@@ -108,7 +112,7 @@ The main site configuration is available in `./config/_default`. Some remarks:
- **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.
- **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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

View File

@@ -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
@@ -163,7 +166,7 @@ Source:
*/
const svgCopy =
'<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg>';
'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16"><path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/><path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/></svg>';
const svgCheck =
'<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" fill="rgb(63, 185, 80)" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>';

View File

@@ -1,5 +1,8 @@
// Define template variables
$themeColor: {{ site.Params.style.themeColor | default "#007bff" }};
$themeColor: {{ site.Params.style.themeColor | default "#007bff" }};
$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 +64,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";

View File

@@ -0,0 +1,8 @@
.gradient {
width: 100%;
height: 100%;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.3);
}

View File

@@ -5,11 +5,9 @@
right: 0;
padding: 2px 7px 5px;
margin: 5px;
color: #767676;
border-color: #767676;
background-color: #ededed;
border: 1px solid;
border-radius: 6px;
color: $secondary;
background-color: transparent;
border-style: none;
font-size: 0.8em;
z-index: 1;
opacity: 0;
@@ -17,17 +15,16 @@
}
.clipboard-button > svg {
fill: #767676;
fill: $secondary;
}
.clipboard-button:hover {
cursor: pointer;
border-color: #696969;
background-color: #e0e0e0;
color: $primary;
}
.clipboard-button:hover > svg {
fill: #696969;
fill: $primary;
}
.clipboard-button:focus {

View 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;
}

View File

@@ -0,0 +1,2 @@
# Multilingual
mainSections = ["blog", "projects"]

View File

@@ -0,0 +1,2 @@
# Multilingual
mainSections = ["blog", "projecten"]

View File

@@ -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'

View File

@@ -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"

View 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

View File

@@ -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"
@@ -48,8 +48,8 @@ schemaSection = "blog"
themeOpacity = "10"
[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]

View File

@@ -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' \
"""

View File

@@ -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>

View File

@@ -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
@@ -55,3 +56,129 @@ func GetTitleFunc(style string) func(s string) string {
}
}
{{< / highlight >}}
## Command Prompt Shortcode
The `command` shortcode generates terminal output for either `bash`, `powershell`, or `sql` shell languages.
### 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 %}}

View File

@@ -0,0 +1,72 @@
---
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 >}}
## 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`). Supported image types are `.png`, `.jpeg`, `.gif`, `.tiff`, `.bmp`, and `.webp`. 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 | Aspect ratio of the image, either "1x1", "4x3" (default), "16x9", or "21x9". |
| 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">}}
<!-- MARKDOWN MAINTAINED LINKS -->
[mozilla_image]: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images

View File

@@ -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.

View File

@@ -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.

View File

@@ -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**.

View File

@@ -5,7 +5,8 @@ date: 2021-07-13
description: "A brief description of Hugo Shortcodes"
tags: ["shortcodes", "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.

View File

@@ -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.

View File

@@ -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
View File

@@ -0,0 +1,3 @@
---
author: "Hugo Authors"
---

49
content/nl/about.md Normal file
View 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.

View File

@@ -0,0 +1,4 @@
---
author: Katheryn Fox
title: Blog
---

View File

@@ -0,0 +1,186 @@
---
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 Partial
Gebruik de `highlight` partial 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 >}}
## Command Prompt Shortcode
De `command` shortcode simuleert een terminal voor `bash`, `powershell` of `sql` shell talen.
### 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 %}}

View File

@@ -0,0 +1,73 @@
---
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 >}}
## 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 geschikte bestandsformaten zijn `.png`, `.jpeg`, `.gif`, `.tiff`, `.bmp` en `.webp`. 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" (standaard), "16x9", en "21x9". |
| 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">}}
<!-- MARKDOWN MAINTAINED LINKS -->
[mozilla_image]: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images

View 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.

View 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.

View File

@@ -0,0 +1,35 @@
---
author: "Hugo Authors"
slug: "multimedia"
title: "Multimedia"
date: 2021-07-13
description: "Een overzicht van enkele Hugo Shortcodes"
tags: ["shortcodes", "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" >}}

View File

@@ -0,0 +1,6 @@
---
draft: false
outputs:
- xml
url: browserconfig.xml
---

View File

@@ -0,0 +1,5 @@
---
author: Katheryn Fox
title: Projecten
url: "projecten"
---

View 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.

View 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.

View File

@@ -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,24 @@
translation: "words"
- id: copyright
translation: "Copyright"
- id: photoBy
translation: "Photo by"
- id: photoOn
translation: "on"
- id: article
translation: "Article"
- id: articles
translation: "Articles"
# 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 &nbsp;&bull;&nbsp; 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 +88,7 @@
# Table of contents
- id: toc
translation: "What's on this Page"
translation: "On this page"
# Search
- id: ui_search

101
i18n/nl.yaml Normal file
View File

@@ -0,0 +1,101 @@
# 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"
# 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"

View File

@@ -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 }}

View File

@@ -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>

View File

@@ -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 -}}

View File

@@ -7,7 +7,7 @@
<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") -}}
{{- partial "utilities/date.html" (dict "date" .Date "format" "long") -}}
&bull; {{ .ReadingTime }}&nbsp;{{ i18n "minutesShort" }} {{ i18n "read" }}
{{ if isset .Params "tags" -}}
{{ range first 1 .Params.tags -}}

View File

@@ -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>

View File

@@ -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 -}}

View File

@@ -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>

View File

@@ -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 }}

View File

@@ -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 -}}

View File

@@ -1,9 +1,9 @@
<!--
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".
"outerClass": Optional class attribute of the outer div element, e.g. "img-wrap".
@@ -12,71 +12,78 @@
"caption": Optional figure caption.
-->
{{ $img := resources.Get .url -}}
{{- $url := .url -}}
{{ $ratio := .ratio -}}
{{ $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 -}}
<!-- 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 -}}
{{ 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)) -}}
{{- $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="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 }}">
{{ $inner }}
</div>
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,40 @@
<!--
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" -}}
{{ $remote := false -}}
{{ $img := resources.GetMatch $url -}}
{{ if (hasPrefix (lower $url) "http") -}}
{{ $img = resources.GetRemote $url -}}
{{ $remote = true -}}
{{ 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 -}}

View File

@@ -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 }}

View File

@@ -0,0 +1,32 @@
<!--
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": Bootstrap ratio of the image, either "1x1", "4x3" (default), "16x9", or "21x9".
-->
{{ $ratio := "4x3" -}}
{{ $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>

View 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 }}

View File

@@ -1,8 +1,8 @@
<!--
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".
"class": Optional class attribute of the inner img element, e.g. "rounded".
@@ -13,64 +13,12 @@
{{ if isset .Params "src" }}
{{ $url := .Get "src" }}
{{ $ratio := "4x3" }}
{{ $class := "" }}
{{ $title := "" }}
{{ $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)) }}
{{ $class := .Get "class" }}
{{ $title := .Get "title" }}
{{ $caption := .Get "caption" }}
<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>
{{ partial "image.html" (dict "url" $url "ratio" $ratio "innerClass" $class "title" $title "caption" $caption) -}}
{{ else }}
{{ errorf "missing value for param 'src': %s" .Position }}
{{ errorf "Missing value for param 'src': %s" .Position }}
{{ end }}

View File

@@ -0,0 +1,33 @@
<!--
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": Bootstrap ratio of the image, either "1x1", "4x3" (default), "16x9", or "21x9".
"caption": Optional carousel slide caption.
-->
{{- $src := .Get "src" -}}
{{ $caption := .Get "caption" -}}
{{- $ratio := "4x3" -}}
{{ 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 -}}

View File

@@ -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 }}

View File

@@ -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'; \

1479
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@markdumay/hugo-theme-hinode",
"version": "0.4.4",
"version": "0.7.2",
"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.1",
"eslint": "^8.24.0",
"autoprefixer": "^10.4.13",
"bootstrap": "^5.2.3",
"eslint": "^8.29.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.3.0",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-n": "^15.6.0",
"eslint-plugin-promise": "^6.1.1",
"exec-bin": "^1.0.0",
"flexsearch": "^0.7.21",
"flexsearch": "^0.7.31",
"hugo-installer": "^4.0.1",
"markdownlint-cli2": "^0.5.1",
"postcss-cli": "^10.0.0",
"postcss-cli": "^10.1.0",
"purgecss-whitelister": "^2.4.0",
"shx": "^0.3.4",
"stylelint": "^14.13.0",
"stylelint-config-standard-scss": "^5.0.0"
"stylelint": "^14.16.0",
"stylelint-config-standard-scss": "^6.1.0"
},
"otherDependencies": {
"hugo": "0.104.2"
"hugo": "0.108.0"
}
}

View 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

View 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

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB