mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-08 10:34:26 +00:00
Compare commits
185 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8c4e11b99f | ||
![]() |
00818cb91f | ||
![]() |
b3469d277c | ||
![]() |
3627059227 | ||
![]() |
4f92886b21 | ||
![]() |
0c2f951b81 | ||
![]() |
300efb780c | ||
![]() |
42a4fc4618 | ||
![]() |
683ffff1b2 | ||
![]() |
7738c06b6c | ||
![]() |
9aca661574 | ||
![]() |
3d5440fa3d | ||
![]() |
4854d238b7 | ||
![]() |
898764eb12 | ||
![]() |
40e66bba8a | ||
![]() |
a543db250f | ||
![]() |
8d6b34716f | ||
![]() |
ea89e1c8b5 | ||
![]() |
fb6d47c33e | ||
![]() |
dc71f43faf | ||
![]() |
78df40873f | ||
![]() |
43f996acc3 | ||
![]() |
dd51fbd542 | ||
![]() |
49df936f3b | ||
![]() |
b6643f12dd | ||
![]() |
2de996242a | ||
![]() |
3b8611ebd0 | ||
![]() |
3274c7453e | ||
![]() |
ff622c8080 | ||
![]() |
455e77b3e9 | ||
![]() |
22c85f7997 | ||
![]() |
d8799fabb5 | ||
![]() |
8ae01a2ce1 | ||
![]() |
d9d3054f22 | ||
![]() |
0bf25f7acd | ||
![]() |
d5c228d43c | ||
![]() |
96886e20d7 | ||
![]() |
171259fb29 | ||
![]() |
a706936849 | ||
![]() |
f538f3b772 | ||
![]() |
a848fccec8 | ||
![]() |
69352dd60a | ||
![]() |
e1c8641d41 | ||
![]() |
deb8dfb3cb | ||
![]() |
0dcd3f02c9 | ||
![]() |
d3105436a3 | ||
![]() |
38c982f7f4 | ||
![]() |
9c19327e19 | ||
![]() |
a9f2d56dd6 | ||
![]() |
434e02e7f5 | ||
![]() |
7e44d71ecb | ||
![]() |
be8c6d539b | ||
![]() |
3db2b1f734 | ||
![]() |
6802524aac | ||
![]() |
71cdad17d3 | ||
![]() |
626b82a619 | ||
![]() |
fbb60a0622 | ||
![]() |
a0684a8a49 | ||
![]() |
55516602e5 | ||
![]() |
fcab852216 | ||
![]() |
cb714201bc | ||
![]() |
c8de62f46b | ||
![]() |
53ab00357e | ||
![]() |
0cc246a79a | ||
![]() |
21541b9f80 | ||
![]() |
e3d4339730 | ||
![]() |
710efd0caa | ||
![]() |
493ff64be0 | ||
![]() |
f2e35074c2 | ||
![]() |
7597710980 | ||
![]() |
c44340ef9e | ||
![]() |
8dfe0cb9d4 | ||
![]() |
fdb8287951 | ||
![]() |
f4f9b7c754 | ||
![]() |
4bb5ba728a | ||
![]() |
bdb8c43fb9 | ||
![]() |
63e51006ed | ||
![]() |
37b623e48c | ||
![]() |
27019594ca | ||
![]() |
d4ee11b7a5 | ||
![]() |
009314943b | ||
![]() |
826b5f58d8 | ||
![]() |
f6fb80d690 | ||
![]() |
8ed98bc5b4 | ||
![]() |
0cc3775370 | ||
![]() |
7be81f4393 | ||
![]() |
869f696a67 | ||
![]() |
c6d942b350 | ||
![]() |
18275acc80 | ||
![]() |
a85540f8de | ||
![]() |
3c93828d4f | ||
![]() |
8ca629978f | ||
![]() |
d99d416838 | ||
![]() |
b58a69b2ad | ||
![]() |
49d7736e1a | ||
![]() |
04531b6158 | ||
![]() |
b7fb9fb05b | ||
![]() |
4a78bd9e6b | ||
![]() |
4d0007a26b | ||
![]() |
ac7e564857 | ||
![]() |
f804ab747c | ||
![]() |
cfd292ddff | ||
![]() |
d4b0c379e2 | ||
![]() |
60ebd5fd41 | ||
![]() |
19a4398c90 | ||
![]() |
841c2e397f | ||
![]() |
3f42d781ec | ||
![]() |
dd9fcc6cbd | ||
![]() |
70aed1ed63 | ||
![]() |
1c635c814c | ||
![]() |
ff1c8ff056 | ||
![]() |
44c70f4036 | ||
![]() |
28f13f8385 | ||
![]() |
849d481cd6 | ||
![]() |
a0987e33a9 | ||
![]() |
f5dae5caa2 | ||
![]() |
d640ed1f8e | ||
![]() |
0c46c0080e | ||
![]() |
7319a3f9e3 | ||
![]() |
2e6ba557c8 | ||
![]() |
1d24b8ff0e | ||
![]() |
df307be37c | ||
![]() |
5d09963bb5 | ||
![]() |
8ce05d0c41 | ||
![]() |
5e03d80944 | ||
![]() |
65bdc8bb32 | ||
![]() |
558eed95ef | ||
![]() |
a17ed9b14a | ||
![]() |
06c5a97e3b | ||
![]() |
269d7c6bcf | ||
![]() |
fc2a43b8b9 | ||
![]() |
9c14411a3b | ||
![]() |
529e402267 | ||
![]() |
4a8ecaad19 | ||
![]() |
d13013189c | ||
![]() |
b21b412f16 | ||
![]() |
b3ad43768c | ||
![]() |
9ea9a6c616 | ||
![]() |
188129f19b | ||
![]() |
8a83f7345a | ||
![]() |
65cd47b1db | ||
![]() |
7e7cc41603 | ||
![]() |
7318d3cacb | ||
![]() |
ff928d035a | ||
![]() |
9341a98ab7 | ||
![]() |
206558e21e | ||
![]() |
8ecf38befc | ||
![]() |
afb3bbff9d | ||
![]() |
a7f871f954 | ||
![]() |
5d368ecaaa | ||
![]() |
2e40bd6be0 | ||
![]() |
21ae80d491 | ||
![]() |
6292be190e | ||
![]() |
a7c5c613c2 | ||
![]() |
480981d867 | ||
![]() |
abfa80d5a2 | ||
![]() |
08531514d3 | ||
![]() |
d4c321fee4 | ||
![]() |
b125be2e7d | ||
![]() |
f075eb12ee | ||
![]() |
c30dd39ce2 | ||
![]() |
ad7cd18893 | ||
![]() |
cdc3accff3 | ||
![]() |
5916a89979 | ||
![]() |
dbc253cbf2 | ||
![]() |
1fd8989ad3 | ||
![]() |
0a401775ff | ||
![]() |
3534d6daec | ||
![]() |
ada5ac3d5c | ||
![]() |
1630eabff8 | ||
![]() |
4a492d2de5 | ||
![]() |
20a492d9d9 | ||
![]() |
179132964f | ||
![]() |
4768d6791f | ||
![]() |
c8e2d3410c | ||
![]() |
8d53c762d7 | ||
![]() |
22d2e41601 | ||
![]() |
b462c31916 | ||
![]() |
dbb5b4be69 | ||
![]() |
4f288ec5dd | ||
![]() |
8fb47e27af | ||
![]() |
a0d2063738 | ||
![]() |
c17986bb49 | ||
![]() |
bafd522530 | ||
![]() |
930e151365 |
27
.github/release.yml
vendored
Normal file
27
.github/release.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
changelog:
|
||||||
|
exclude:
|
||||||
|
labels:
|
||||||
|
- skip-changelog
|
||||||
|
categories:
|
||||||
|
- title: ❗ Breaking Changes
|
||||||
|
labels:
|
||||||
|
- Semver-Major
|
||||||
|
- breaking-change
|
||||||
|
- title: 🚀 Highlights
|
||||||
|
labels:
|
||||||
|
- release-highlight
|
||||||
|
- title: 🎉 New Features
|
||||||
|
labels:
|
||||||
|
- Semver-Minor
|
||||||
|
- enhancement
|
||||||
|
- title: 🐛 Bug fixes
|
||||||
|
labels:
|
||||||
|
- fix
|
||||||
|
- bugfix
|
||||||
|
- bug
|
||||||
|
- title: 📦 Dependencies
|
||||||
|
labels:
|
||||||
|
- dependencies
|
||||||
|
- title: 🧰 Other Changes
|
||||||
|
labels:
|
||||||
|
- "*"
|
25
README.md
25
README.md
@@ -9,25 +9,28 @@
|
|||||||
<!-- Badges -->
|
<!-- Badges -->
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://gohugo.io" alt="Hugo website">
|
<a href="https://gohugo.io" alt="Hugo website">
|
||||||
<img src="https://img.shields.io/badge/generator-hugo-brightgreen" />
|
<img src="https://img.shields.io/badge/generator-hugo-brightgreen">
|
||||||
|
</a>
|
||||||
|
<a href="https://www.npmjs.com/package/%40gethinode/hinode" alt="npm package">
|
||||||
|
<img src="https://img.shields.io/npm/v/%40gethinode/hinode">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://app.netlify.com/sites/gethinode-demo/deploys" alt="Netlify Status">
|
<a href="https://app.netlify.com/sites/gethinode-demo/deploys" alt="Netlify Status">
|
||||||
<img src="https://img.shields.io/netlify/0ad42e3e-fdfa-4d37-8e26-58badd429a67" />
|
<img src="https://img.shields.io/netlify/0ad42e3e-fdfa-4d37-8e26-58badd429a67">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://stats.uptimerobot.com/xyGVYhLJmV" alt="UptimeRobot Status">
|
<a href="https://stats.uptimerobot.com/xyGVYhLJmV" alt="UptimeRobot Status">
|
||||||
<img src="https://img.shields.io/uptimerobot/status/m791334689-73d9dfc82030f4f955b2d6bb" />
|
<img src="https://img.shields.io/uptimerobot/status/m791334689-73d9dfc82030f4f955b2d6bb">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/gethinode/hinode/commits/main" alt="Last commit">
|
<a href="https://github.com/gethinode/hinode/commits/main" alt="Last commit">
|
||||||
<img src="https://img.shields.io/github/last-commit/gethinode/hinode.svg" />
|
<img src="https://img.shields.io/github/last-commit/gethinode/hinode.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/gethinode/hinode/issues" alt="Issues">
|
<a href="https://github.com/gethinode/hinode/issues" alt="Issues">
|
||||||
<img src="https://img.shields.io/github/issues/gethinode/hinode.svg" />
|
<img src="https://img.shields.io/github/issues/gethinode/hinode.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/gethinode/hinode/pulls" alt="Pulls">
|
<a href="https://github.com/gethinode/hinode/pulls" alt="Pulls">
|
||||||
<img src="https://img.shields.io/github/issues-pr-raw/gethinode/hinode.svg" />
|
<img src="https://img.shields.io/github/issues-pr-raw/gethinode/hinode.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/gethinode/hinode/blob/main/LICENSE" alt="License">
|
<a href="https://github.com/gethinode/hinode/blob/main/LICENSE" alt="License">
|
||||||
<img src="https://img.shields.io/github/license/gethinode/hinode" />
|
<img src="https://img.shields.io/github/license/gethinode/hinode">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -75,10 +78,10 @@ Start a new Hinode project in three steps:
|
|||||||
|
|
||||||
1. Create a new site
|
1. Create a new site
|
||||||
|
|
||||||
Hinode is available as a [child theme][repository_child], and a [main theme][repository]. The child theme uses [npm][npm] to link to the latest available version of Hinode. Unless you plan to customize a lot, it is recommended to use the child theme:
|
Hinode is available as a [template][repository_template], and a [main repository][repository]. The template [npm][npm] to link to the latest available version of Hinode. Unless you plan to customize a lot, it is recommended to use the template:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/gethinode/child.git my-hinode-site && cd my-hinode-site
|
git clone https://github.com/gethinode/template.git my-hinode-site && cd my-hinode-site
|
||||||
```
|
```
|
||||||
|
|
||||||
Use the main theme if you intend to customize the base code:
|
Use the main theme if you intend to customize the base code:
|
||||||
@@ -120,7 +123,7 @@ Hinode is inspired by the following themes:
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
The `hinode` and `child` codebase is released under the [MIT license][license]. The documentation (including the "README" and `docs` codebase) is licensed under the Creative Commons ([CC BY-NC 4.0)][cc-by-nc-4.0] license.
|
The `hinode` and `template` codebase is released under the [MIT license][license]. The documentation (including the "README" and `docs` codebase) is licensed under the Creative Commons [(CC BY-NC 4.0)][cc-by-nc-4.0] license.
|
||||||
|
|
||||||
<!-- MARKDOWN PUBLIC LINKS -->
|
<!-- MARKDOWN PUBLIC LINKS -->
|
||||||
[blist]: https://github.com/apvarun/blist-hugo-theme
|
[blist]: https://github.com/apvarun/blist-hugo-theme
|
||||||
@@ -143,5 +146,5 @@ The `hinode` and `child` codebase is released under the [MIT license][license].
|
|||||||
[demo]: https://demo.gethinode.com/
|
[demo]: https://demo.gethinode.com/
|
||||||
[license]: https://github.com/gethinode/hinode/blob/main/LICENSE
|
[license]: https://github.com/gethinode/hinode/blob/main/LICENSE
|
||||||
[repository]: https://github.com/gethinode/hinode.git
|
[repository]: https://github.com/gethinode/hinode.git
|
||||||
[repository_child]: https://github.com/gethinode/child.git
|
[repository_template]: https://github.com/gethinode/template.git
|
||||||
[website]: https://gethinode.com/
|
[website]: https://gethinode.com/
|
||||||
|
14
assets/js/alert.js
Normal file
14
assets/js/alert.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
const alert = document.getElementById('page-alert')
|
||||||
|
const closeBtn = document.getElementById('page-alert-btn-close')
|
||||||
|
if (alert !== null && closeBtn !== null) {
|
||||||
|
const version = alert.getAttribute('data-page-alert-version') || 'unknown'
|
||||||
|
const hideAlert = sessionStorage.getItem(`page-alert-${version}`) !== null
|
||||||
|
if (hideAlert) {
|
||||||
|
alert.classList.add('d-none')
|
||||||
|
}
|
||||||
|
|
||||||
|
closeBtn.addEventListener('click', () => {
|
||||||
|
sessionStorage.setItem(`page-alert-${version}`, 'seen')
|
||||||
|
alert.classList.add('d-none')
|
||||||
|
})
|
||||||
|
}
|
@@ -14,10 +14,12 @@ const addCopyButtons = (clipboard) => {
|
|||||||
// 2. Create a button that will trigger a copy operation
|
// 2. Create a button that will trigger a copy operation
|
||||||
const button = document.createElement('button')
|
const button = document.createElement('button')
|
||||||
button.className = 'clipboard-button'
|
button.className = 'clipboard-button'
|
||||||
|
button.setAttribute('data-toast-target', 'toast-copied-code-message')
|
||||||
button.type = 'button'
|
button.type = 'button'
|
||||||
button.innerHTML = svgCopy
|
button.innerHTML = svgCopy
|
||||||
button.addEventListener('click', () => {
|
button.addEventListener('click', () => {
|
||||||
clipboard.writeText(codeBlock.innerText).then(
|
const text = codeBlock.innerText.split('\n').filter(Boolean).join('\n')
|
||||||
|
clipboard.writeText(text).then(
|
||||||
() => {
|
() => {
|
||||||
button.blur()
|
button.blur()
|
||||||
button.innerHTML = svgCheck
|
button.innerHTML = svgCheck
|
||||||
|
@@ -1,29 +1,15 @@
|
|||||||
// Script to move all embedded toast messages into a container. The container ensures multiple toast messages are
|
// Script to move all embedded toast messages into a container with id 'toast-container'. The container ensures multiple
|
||||||
// stacked properly. The script targets all elements specified by a 'data-toast-target' and ensures the click event
|
// toast messages are stacked properly. The script targets all elements specified by a 'data-toast-target' and ensures
|
||||||
// of the origin is linked as well.
|
// the click event of the origin is linked as well.
|
||||||
|
|
||||||
// create a HTML fragment
|
|
||||||
function createFragment (htmlStr) {
|
|
||||||
const fragment = document.createDocumentFragment()
|
|
||||||
const temp = document.createElement('div')
|
|
||||||
temp.innerHTML = htmlStr
|
|
||||||
while (temp.firstChild) {
|
|
||||||
fragment.appendChild(temp.firstChild)
|
|
||||||
}
|
|
||||||
return fragment
|
|
||||||
}
|
|
||||||
|
|
||||||
// insert a toast container in the DOM
|
|
||||||
const container = '<div id="toast-container" class="toast-container position-fixed bottom-0 end-0 p-3"></div>'
|
|
||||||
document.body.appendChild(createFragment(container))
|
|
||||||
const parent = document.getElementById('toast-container')
|
|
||||||
|
|
||||||
|
const container = document.getElementById('toast-container')
|
||||||
|
if (container !== null) {
|
||||||
// process all data-toast-target elements
|
// process all data-toast-target elements
|
||||||
document.querySelectorAll('[data-toast-target]').forEach(trigger => {
|
document.querySelectorAll('[data-toast-target]').forEach(trigger => {
|
||||||
const target = document.getElementById(trigger.getAttribute('data-toast-target'))
|
const target = document.getElementById(trigger.getAttribute('data-toast-target'))
|
||||||
if (target !== null) {
|
if (target !== null) {
|
||||||
// move the element to the toast containr
|
// move the element to the toast containr
|
||||||
parent.appendChild(target)
|
container.appendChild(target)
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const toast = bootstrap.Toast.getOrCreateInstance(target)
|
const toast = bootstrap.Toast.getOrCreateInstance(target)
|
||||||
@@ -35,3 +21,4 @@ document.querySelectorAll('[data-toast-target]').forEach(trigger => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
@@ -62,7 +62,9 @@
|
|||||||
// scss-docs-end awesome
|
// scss-docs-end awesome
|
||||||
|
|
||||||
// Import Hinode theme styles
|
// Import Hinode theme styles
|
||||||
|
@import "components/alert.scss";
|
||||||
@import "components/blockquote.scss";
|
@import "components/blockquote.scss";
|
||||||
|
@import "components/breadcrumb.scss";
|
||||||
@import "components/buttons.scss";
|
@import "components/buttons.scss";
|
||||||
@import "components/card.scss";
|
@import "components/card.scss";
|
||||||
@import "components/carousel.scss";
|
@import "components/carousel.scss";
|
||||||
@@ -71,11 +73,13 @@
|
|||||||
@import "components/comments.scss";
|
@import "components/comments.scss";
|
||||||
@import "components/navbar.scss";
|
@import "components/navbar.scss";
|
||||||
@import "components/img.scss";
|
@import "components/img.scss";
|
||||||
|
@import "components/pagination.scss";
|
||||||
@import "components/persona.scss";
|
@import "components/persona.scss";
|
||||||
@import "components/popover.scss";
|
@import "components/popover.scss";
|
||||||
@import "components/search.scss";
|
@import "components/search.scss";
|
||||||
@import "components/sidebar.scss";
|
@import "components/sidebar.scss";
|
||||||
@import "components/syntax.scss";
|
@import "components/syntax.scss";
|
||||||
|
@import "components/timeline.scss";
|
||||||
@import "components/toc.scss";
|
@import "components/toc.scss";
|
||||||
@import "components/vimeo.scss";
|
@import "components/vimeo.scss";
|
||||||
@import "common/animation.scss";
|
@import "common/animation.scss";
|
||||||
|
@@ -23,3 +23,19 @@ $btn-toggle: url("/icons/btn-toggle.svg") !de
|
|||||||
$btn-toggle-dark: url("/icons/btn-toggle-dark.svg") !default;
|
$btn-toggle-dark: url("/icons/btn-toggle-dark.svg") !default;
|
||||||
|
|
||||||
// scss-docs-end icons
|
// scss-docs-end icons
|
||||||
|
|
||||||
|
.fa-wrapper {
|
||||||
|
container: wrapper / inline-size;
|
||||||
|
}
|
||||||
|
|
||||||
|
// define fallback size for browsers not supporting containers
|
||||||
|
.fa-fluid {
|
||||||
|
font-size: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set size based on container width
|
||||||
|
@container (min-width: 0) {
|
||||||
|
.fa-wrapper .fa-fluid {
|
||||||
|
font-size: 60cqi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
3
assets/scss/components/_alert.scss
Normal file
3
assets/scss/components/_alert.scss
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.alert-no-decoration {
|
||||||
|
--bs-alert-border-radius: none;
|
||||||
|
}
|
6
assets/scss/components/_breadcrumb.scss
Normal file
6
assets/scss/components/_breadcrumb.scss
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// scss-docs-start breadcrumb
|
||||||
|
.breadcrumb {
|
||||||
|
padding-top: 0.3 * $navbar-offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
// scss-docs-end breadcrumb
|
11
assets/scss/components/_pagination.scss
Normal file
11
assets/scss/components/_pagination.scss
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
.pagination {
|
||||||
|
--bs-pagination-bg: var(--bs-primary-bg-subtle);
|
||||||
|
--bs-pagination-border-color: none;
|
||||||
|
--bs-pagination-hover-color: var(--bs-pagination-active-color);
|
||||||
|
--bs-pagination-hover-bg: var(--bs-pagination-active-bg);
|
||||||
|
--bs-pagination-hover-border-color: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination .page-item {
|
||||||
|
margin: 0.4rem;
|
||||||
|
}
|
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.preview-background {
|
.preview-background {
|
||||||
background-color: var(--bs-secondary-bg) if($enable-important-utilities, !important, null);
|
background-color: var(--bs-dark-bg-subtle) if($enable-important-utilities, !important, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $enable-dark-mode {
|
@if $enable-dark-mode {
|
||||||
|
165
assets/scss/components/_timeline.scss
Normal file
165
assets/scss/components/_timeline.scss
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
// scss-docs-start timeline
|
||||||
|
$connector-radius: 0.8rem;
|
||||||
|
$semi-circle-radius: 8rem;
|
||||||
|
$semi-circle-border: 0.2rem;
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--timeline-highlight: var(--bs-primary);
|
||||||
|
--timeline-icon-radius: #{$semi-circle-radius};
|
||||||
|
--timeline-offset: 50%;
|
||||||
|
--timeline-connector-bg: var(--bs-body-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $state in map-keys($theme-colors) {
|
||||||
|
.timeline-#{$state} {
|
||||||
|
--timeline-highlight: var(--#{$prefix}#{$state});
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-bg-#{$state} {
|
||||||
|
--timeline-connector-bg: var(--#{$prefix}#{$state}-bg-subtle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// scss-docs-end timeline
|
||||||
|
|
||||||
|
.timeline, .timeline-sm {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-sm {
|
||||||
|
--timeline-icon-radius: calc(#{$semi-circle-radius} / 2);
|
||||||
|
--timeline-offset: 25%
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline::before, .timeline-sm::before {
|
||||||
|
content: "";
|
||||||
|
width: 2 * $semi-circle-border;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: var(--bs-body-color);
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-sm::before {
|
||||||
|
margin: 0 calc(var(--timeline-offset) - #{$semi-circle-border});
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-semi-circle-start, .timeline-semi-circle-end {
|
||||||
|
width: var(--timeline-icon-radius);
|
||||||
|
height: var(--timeline-icon-radius);
|
||||||
|
border-radius: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-semi-circle-start {
|
||||||
|
left: -$semi-circle-border;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-semi-circle-end {
|
||||||
|
left: $semi-circle-border;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-semi-circle-start::before {
|
||||||
|
content: "";
|
||||||
|
width: var(--timeline-icon-radius);
|
||||||
|
height: var(--timeline-icon-radius);
|
||||||
|
border-radius: 100%;
|
||||||
|
border: $semi-circle-border solid;
|
||||||
|
position: absolute;
|
||||||
|
border-color: transparent var(--timeline-highlight) var(--timeline-highlight) var(--timeline-highlight);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-semi-circle-start::after {
|
||||||
|
content: "";
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: var(--timeline-icon-radius);
|
||||||
|
height: var(--timeline-icon-radius);
|
||||||
|
border-radius: 100%;
|
||||||
|
border: $semi-circle-border solid;
|
||||||
|
position: absolute;
|
||||||
|
border-color: var(--timeline-highlight) var(--timeline-highlight) var(--timeline-highlight) transparent;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-semi-circle-end::before {
|
||||||
|
content: "";
|
||||||
|
width: var(--timeline-icon-radius);
|
||||||
|
height: var(--timeline-icon-radius);
|
||||||
|
border-radius: 100%;
|
||||||
|
border: $semi-circle-border solid;
|
||||||
|
position: absolute;
|
||||||
|
border-color: transparent var(--timeline-highlight) var(--timeline-highlight) var(--timeline-highlight);
|
||||||
|
transform: rotate(-225deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-semi-circle-end::after {
|
||||||
|
content: "";
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: var(--timeline-icon-radius);
|
||||||
|
height: var(--timeline-icon-radius);
|
||||||
|
border-radius: 100%;
|
||||||
|
border: $semi-circle-border solid;
|
||||||
|
position: absolute;
|
||||||
|
border-color: var(--timeline-highlight) var(--timeline-highlight) var(--timeline-highlight) transparent;
|
||||||
|
transform: rotate(-180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-description-text-start {
|
||||||
|
border-bottom: $semi-circle-border solid var(--timeline-highlight);
|
||||||
|
margin-right: 2 * $connector-radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-description-text-end {
|
||||||
|
border-bottom: $semi-circle-border solid var(--timeline-highlight);
|
||||||
|
margin-left: 2 * $connector-radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-panel-start, .timeline-panel-end, .timeline-connector-start, .timeline-connector-end {
|
||||||
|
top: calc(var(--timeline-icon-radius) / 2);
|
||||||
|
position: relative;
|
||||||
|
width: calc(var(--timeline-icon-radius) / 2);
|
||||||
|
height: calc($semi-circle-border + var(--timeline-icon-radius) / 2);
|
||||||
|
border: $semi-circle-border solid var(--timeline-highlight);
|
||||||
|
border-bottom: none;
|
||||||
|
border-right: none;
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-panel-start {
|
||||||
|
top: 50%;
|
||||||
|
right: 50%;
|
||||||
|
position: absolute;
|
||||||
|
width: calc(var(--timeline-icon-radius) * 2);
|
||||||
|
width: 2 * $connector-radius;
|
||||||
|
height: 50%;
|
||||||
|
border-top: $semi-circle-border solid var(--timeline-highlight);
|
||||||
|
border-left: $semi-circle-border solid var(--timeline-highlight);
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-panel-end {
|
||||||
|
top: 50%;
|
||||||
|
position: absolute;
|
||||||
|
width: calc(var(--timeline-icon-radius) * 2);
|
||||||
|
width: 2 * $connector-radius;
|
||||||
|
height: 50%;
|
||||||
|
border-top: $semi-circle-border solid var(--timeline-highlight);
|
||||||
|
border-right: $semi-circle-border solid var(--timeline-highlight);
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-dot::after {
|
||||||
|
display: inline-block;
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: var(--timeline-offset);
|
||||||
|
margin: (-$connector-radius) 0 0 (-$connector-radius);
|
||||||
|
width: 2 * $connector-radius;
|
||||||
|
height: 2 * $connector-radius;
|
||||||
|
border-radius: 100%;
|
||||||
|
border: ($semi-circle-border * 1.5) solid var(--timeline-connector-bg);
|
||||||
|
color: var(--timeline-highlight);
|
||||||
|
background: var(--timeline-highlight);
|
||||||
|
}
|
@@ -27,6 +27,20 @@ defaultContentLanguage = "en"
|
|||||||
defaultContentLanguageInSubdir = true
|
defaultContentLanguageInSubdir = true
|
||||||
# toml-docs-end language
|
# toml-docs-end language
|
||||||
|
|
||||||
|
# toml-docs-start redirect
|
||||||
|
[outputFormats.REDIR]
|
||||||
|
mediaType = "text/netlify"
|
||||||
|
baseName = "_redirects"
|
||||||
|
isPlainText = true
|
||||||
|
notAlternative = true
|
||||||
|
|
||||||
|
[mediaTypes."text/netlify"]
|
||||||
|
delimiter = ""
|
||||||
|
|
||||||
|
[outputs]
|
||||||
|
home = ["HTML", "RSS", "REDIR"]
|
||||||
|
# toml-docs-end redirect
|
||||||
|
|
||||||
# toml-docs-start build
|
# toml-docs-start build
|
||||||
[build]
|
[build]
|
||||||
writeStats = true
|
writeStats = true
|
||||||
@@ -71,7 +85,7 @@ defaultContentLanguageInSubdir = true
|
|||||||
[module]
|
[module]
|
||||||
[module.hugoVersion]
|
[module.hugoVersion]
|
||||||
extended = true
|
extended = true
|
||||||
min = "0.81.0"
|
min = "0.110.0"
|
||||||
max = ""
|
max = ""
|
||||||
[[module.mounts]]
|
[[module.mounts]]
|
||||||
source = "assets"
|
source = "assets"
|
||||||
@@ -79,6 +93,9 @@ defaultContentLanguageInSubdir = true
|
|||||||
[[module.mounts]]
|
[[module.mounts]]
|
||||||
source = "static"
|
source = "static"
|
||||||
target = "static"
|
target = "static"
|
||||||
|
[[module.mounts]]
|
||||||
|
source = "static/fonts"
|
||||||
|
target = "static/fonts"
|
||||||
# toml-docs-start javascript
|
# toml-docs-start javascript
|
||||||
[[module.mounts]]
|
[[module.mounts]]
|
||||||
source = "node_modules/bootstrap/dist/js"
|
source = "node_modules/bootstrap/dist/js"
|
||||||
@@ -89,3 +106,6 @@ defaultContentLanguageInSubdir = true
|
|||||||
target = "assets/js/vendor/flexsearch"
|
target = "assets/js/vendor/flexsearch"
|
||||||
includeFiles = "*.bundle.js"
|
includeFiles = "*.bundle.js"
|
||||||
# toml-docs-end javascript
|
# toml-docs-end javascript
|
||||||
|
[[module.mounts]]
|
||||||
|
source = "node_modules/@fortawesome/fontawesome-free/webfonts"
|
||||||
|
target = "static/fonts"
|
@@ -8,10 +8,9 @@
|
|||||||
|
|
||||||
# toml-docs-start docs
|
# toml-docs-start docs
|
||||||
[docs]
|
[docs]
|
||||||
version = "0.8"
|
|
||||||
basePath = ""
|
|
||||||
github = "https://github.com/gethinode/hinode"
|
github = "https://github.com/gethinode/hinode"
|
||||||
release = "https://github.com/gethinode/hinode/releases/tag/"
|
release = "https://github.com/gethinode/hinode/releases/tag/"
|
||||||
|
checkVersion = false
|
||||||
# toml-docs-end docs
|
# toml-docs-end docs
|
||||||
|
|
||||||
# toml-docs-start home
|
# toml-docs-start home
|
||||||
@@ -31,11 +30,16 @@
|
|||||||
fixed = true
|
fixed = true
|
||||||
offset = "3.8em"
|
offset = "3.8em"
|
||||||
search = true
|
search = true
|
||||||
breadcrumb = false
|
breadcrumb = true
|
||||||
toc = true
|
toc = true
|
||||||
sidebar = true
|
sidebar = true
|
||||||
# toml-docs-end navigation
|
# toml-docs-end navigation
|
||||||
|
|
||||||
|
# toml-docs-start messages
|
||||||
|
[messages]
|
||||||
|
placement = "bottom-right"
|
||||||
|
# toml-docs-end messages
|
||||||
|
|
||||||
# toml-docs-start sharing
|
# toml-docs-start sharing
|
||||||
[sharing]
|
[sharing]
|
||||||
enabled = true
|
enabled = true
|
||||||
@@ -92,6 +96,7 @@
|
|||||||
separator = true
|
separator = true
|
||||||
[sections.projects]
|
[sections.projects]
|
||||||
title = "Projects"
|
title = "Projects"
|
||||||
|
layout = "card"
|
||||||
sort = "title"
|
sort = "title"
|
||||||
reverse = false
|
reverse = false
|
||||||
nested = true
|
nested = true
|
||||||
@@ -101,7 +106,7 @@
|
|||||||
padding = "3"
|
padding = "3"
|
||||||
header = "none"
|
header = "none"
|
||||||
footer = "tags"
|
footer = "tags"
|
||||||
orientation = "none"
|
orientation = "horizontal"
|
||||||
style = "border-1 card-emphasize"
|
style = "border-1 card-emphasize"
|
||||||
homepage = 3
|
homepage = 3
|
||||||
separator = false
|
separator = false
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
canonifyURLs = false
|
|
@@ -2,7 +2,7 @@
|
|||||||
title: About
|
title: About
|
||||||
description: Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
|
description: Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
|
||||||
date: 2022-04-11
|
date: 2022-04-11
|
||||||
updated: 2023-02-11
|
updated: 2023-06-26
|
||||||
showComments: false
|
showComments: false
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -35,8 +35,8 @@ Additional features include:
|
|||||||
* Switching between light mode and dark mode
|
* Switching between light mode and dark mode
|
||||||
* Support for multiple languages
|
* Support for multiple languages
|
||||||
* Reusable Bootstrap components through configurable shortcodes and partials
|
* Reusable Bootstrap components through configurable shortcodes and partials
|
||||||
|
* Versioned documentation, including sidebar navigation and version switcher
|
||||||
* Embedded comments through light-weight integration with GitHub via [utteranc.es]({{< param "links.utterances" >}})
|
* Embedded comments through light-weight integration with GitHub via [utteranc.es]({{< param "links.utterances" >}})
|
||||||
* Integrated sidebar navigation for content-heavy sections, such as documentation pages
|
|
||||||
* Reponsive image handling for multiple screen sizes and resolutions
|
* Reponsive image handling for multiple screen sizes and resolutions
|
||||||
* Optimized search results, scoring 100 points for SEO on [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
* Optimized search results, scoring 100 points for SEO on [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
||||||
* Secure by default, scoring A+ on [Mozilla Observatory test]({{< param "links.observatory" >}})
|
* Secure by default, scoring A+ on [Mozilla Observatory test]({{< param "links.observatory" >}})
|
||||||
|
@@ -127,7 +127,7 @@ As an example, the following shortcode displays a button that, when clicked, tri
|
|||||||
Trigger panel
|
Trigger panel
|
||||||
{{</* /button */>}}
|
{{</* /button */>}}
|
||||||
|
|
||||||
{{</* collapse id="collapse-1" class="p-3 border rounded" */>}}
|
{{</* collapse id="collapse-1" class="p-3 border rounded bg-primary-subtle" */>}}
|
||||||
Some placeholder content for the collapse component. This panel is <i>hidden by default</i> but
|
Some placeholder content for the collapse component. This panel is <i>hidden by default</i> but
|
||||||
revealed when the user activates the relevant trigger.
|
revealed when the user activates the relevant trigger.
|
||||||
{{</* /collapse */>}}
|
{{</* /collapse */>}}
|
||||||
@@ -245,6 +245,16 @@ Loading...
|
|||||||
{{< /example>}}
|
{{< /example>}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Timeline
|
||||||
|
|
||||||
|
As an example, the following shortcode displays a timeline with the file `data/timeline-en.yml` as data.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="hugo" >}}
|
||||||
|
{{</* timeline data="timeline-en" background="dark" */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
## Toast
|
## Toast
|
||||||
|
|
||||||
As an example, the following shortcode displays a button that, when clicked, triggers the toast message.
|
As an example, the following shortcode displays a button that, when clicked, triggers the toast message.
|
||||||
|
@@ -4,9 +4,7 @@ title: Another project
|
|||||||
date: 2021-07-15
|
date: 2021-07-15
|
||||||
description: Another project.
|
description: Another project.
|
||||||
tags: ["javascript", "golang"]
|
tags: ["javascript", "golang"]
|
||||||
thumbnail: img/coffee.jpg # https://picsum.photos/id/1060/5598/3732
|
icon: fas rocket
|
||||||
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.
|
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.
|
||||||
|
@@ -4,9 +4,7 @@ title: Sample project
|
|||||||
date: 2021-07-15
|
date: 2021-07-15
|
||||||
description: A sample project.
|
description: A sample project.
|
||||||
tags: ["html", "css"]
|
tags: ["html", "css"]
|
||||||
thumbnail: img/laptop.jpg # https://picsum.photos/id/0/5616/3744
|
icon: fab docker
|
||||||
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.
|
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,6 +3,7 @@ slug: over-mij
|
|||||||
title: Over mij
|
title: Over mij
|
||||||
description: Een blog en documentatie thema voor Hugo gebaseerd op Bootstrap 5.
|
description: Een blog en documentatie thema voor Hugo gebaseerd op Bootstrap 5.
|
||||||
date: 2023-02-17
|
date: 2023-02-17
|
||||||
|
updated: 2023-06-26
|
||||||
showComments: false
|
showComments: false
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -36,8 +37,8 @@ Overige functies:
|
|||||||
* Omschakelen tussen donkere en lichte modus
|
* Omschakelen tussen donkere en lichte modus
|
||||||
* Ondersteuning voor meerdere talen
|
* Ondersteuning voor meerdere talen
|
||||||
* Herbruikbare Bootstrap componenten via shortcodes en partials
|
* Herbruikbare Bootstrap componenten via shortcodes en partials
|
||||||
|
* Versiebeheer van documentatiepagina's, inclusief secundaire navigatie en selectie van versies
|
||||||
* Integreren van commentaar via [utteranc.es]({{< param "links.utterances" >}})
|
* Integreren van commentaar via [utteranc.es]({{< param "links.utterances" >}})
|
||||||
* Secundaire navigatie voor bijvoorbeeld documentatie
|
|
||||||
* Optimalisering van foto's voor meerdere schermafmetingen en resoluties
|
* Optimalisering van foto's voor meerdere schermafmetingen en resoluties
|
||||||
* Optimale zoekresultaten, met 100 punten voor SEO volgens [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
* Optimale zoekresultaten, met 100 punten voor SEO volgens [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
||||||
* Veilige communicatie, met een score van A+ volgens [Mozilla Observatory]({{< param "links.observatory" >}})
|
* Veilige communicatie, met een score van A+ volgens [Mozilla Observatory]({{< param "links.observatory" >}})
|
||||||
|
@@ -246,6 +246,16 @@ Loading...
|
|||||||
{{< /example>}}
|
{{< /example>}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Timeline
|
||||||
|
|
||||||
|
De volgende shortcode toont een tijdslijn met het bestand `data/timeline-nl.yml` als input.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="hugo" >}}
|
||||||
|
{{</* timeline data="timeline-nl" */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
## Toast
|
## Toast
|
||||||
|
|
||||||
De volgende shortcode toont een knop die een bericht laat verschijnen op het scherm.
|
De volgende shortcode toont een knop die een bericht laat verschijnen op het scherm.
|
||||||
|
35
data/timeline-en.yml
Normal file
35
data/timeline-en.yml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# This file holds all menu entries for the docs sidebar
|
||||||
|
|
||||||
|
- title: Product launch
|
||||||
|
icon: fas rocket
|
||||||
|
color: primary
|
||||||
|
date: 2023-07-01
|
||||||
|
url: https://github.com/gethinode/hinode/releases/tag/v0.15.2
|
||||||
|
content:
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate ducimus officiis quod! Aperiam eveniet nam nostrum odit quasi ullam voluptatum.
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate ducimus officiis quod! Aperiam eveniet nam nostrum odit quasi ullam voluptatum.
|
||||||
|
|
||||||
|
- title: I18N support
|
||||||
|
icon: fas globe
|
||||||
|
color: success
|
||||||
|
date: 2023-05-06
|
||||||
|
url: v0.14.0
|
||||||
|
content:
|
||||||
|
Lorem ipsum dolor sit amet.
|
||||||
|
|
||||||
|
- title: New feature
|
||||||
|
icon: fas house
|
||||||
|
color: warning
|
||||||
|
date: 2023-02-04
|
||||||
|
url: v0.8.1
|
||||||
|
content:
|
||||||
|
Cupiditate ducimus officiis quod!
|
||||||
|
|
||||||
|
- title: Beta release
|
||||||
|
icon: fas heart
|
||||||
|
color: info
|
||||||
|
date: 2022-11-30
|
||||||
|
# url: v0.1
|
||||||
|
content:
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate ducimus officiis quod! Aperiam eveniet nam nostrum odit quasi ullam voluptatum.
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate ducimus officiis quod! Aperiam eveniet nam nostrum odit quasi ullam voluptatum.
|
35
data/timeline-nl.yml
Normal file
35
data/timeline-nl.yml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# This file holds all menu entries for the docs sidebar
|
||||||
|
|
||||||
|
- title: Productlancering
|
||||||
|
icon: fas rocket
|
||||||
|
color: primary
|
||||||
|
date: 2023-07-01
|
||||||
|
url: https://github.com/gethinode/hinode/releases/tag/v0.15.2
|
||||||
|
content:
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate ducimus officiis quod! Aperiam eveniet nam nostrum odit quasi ullam voluptatum.
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate ducimus officiis quod! Aperiam eveniet nam nostrum odit quasi ullam voluptatum.
|
||||||
|
|
||||||
|
- title: Internationalisering
|
||||||
|
icon: fas globe
|
||||||
|
color: success
|
||||||
|
date: 2023-05-06
|
||||||
|
url: v0.14.0
|
||||||
|
content:
|
||||||
|
Lorem ipsum dolor sit amet.
|
||||||
|
|
||||||
|
- title: Nieuwe functie
|
||||||
|
icon: fas house
|
||||||
|
color: warning
|
||||||
|
date: 2023-02-04
|
||||||
|
url: v0.8.1
|
||||||
|
content:
|
||||||
|
Cupiditate ducimus officiis quod!
|
||||||
|
|
||||||
|
- title: Beta release
|
||||||
|
icon: fas heart
|
||||||
|
color: info
|
||||||
|
date: 2022-11-30
|
||||||
|
# url: v0.1
|
||||||
|
content:
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate ducimus officiis quod! Aperiam eveniet nam nostrum odit quasi ullam voluptatum.
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate ducimus officiis quod! Aperiam eveniet nam nostrum odit quasi ullam voluptatum.
|
22
i18n/en.yaml
22
i18n/en.yaml
@@ -53,14 +53,16 @@
|
|||||||
translation: "Article"
|
translation: "Article"
|
||||||
- id: articles
|
- id: articles
|
||||||
translation: "Articles"
|
translation: "Articles"
|
||||||
|
- id: paginationNav
|
||||||
|
translation: "Page navigation"
|
||||||
- id: paginationPrevious
|
- id: paginationPrevious
|
||||||
translation: "Previous"
|
translation: "Previous page"
|
||||||
- id: paginationNext
|
- id: paginationNext
|
||||||
translation: "Next"
|
translation: "Next page"
|
||||||
- id: paginationFirst
|
- id: paginationFirst
|
||||||
translation: "First"
|
translation: "First page"
|
||||||
- id: paginationLast
|
- id: paginationLast
|
||||||
translation: "Last"
|
translation: "Last page"
|
||||||
- id: toggleSidebar
|
- id: toggleSidebar
|
||||||
translation: "Toggle sidebar navigation"
|
translation: "Toggle sidebar navigation"
|
||||||
- id: colorMode
|
- id: colorMode
|
||||||
@@ -82,7 +84,17 @@
|
|||||||
- id: shareLink
|
- id: shareLink
|
||||||
translation: "Share via"
|
translation: "Share via"
|
||||||
- id: copiedToClipboard
|
- id: copiedToClipboard
|
||||||
translation: "Copied to clipboard"
|
translation: "copied to clipboard"
|
||||||
|
- id: link
|
||||||
|
translation: "Link"
|
||||||
|
- id: code
|
||||||
|
translation: "Code"
|
||||||
|
- id: latest
|
||||||
|
translation: "latest"
|
||||||
|
- id: allVersions
|
||||||
|
translation: "All versions"
|
||||||
|
- id: newerVersionAlert
|
||||||
|
translation: "There is a newer version of {{ . }}!"
|
||||||
|
|
||||||
# 404 page
|
# 404 page
|
||||||
- id: pageNotFound
|
- id: pageNotFound
|
||||||
|
14
i18n/nl.yaml
14
i18n/nl.yaml
@@ -45,6 +45,8 @@
|
|||||||
translation: "Artikel"
|
translation: "Artikel"
|
||||||
- id: articles
|
- id: articles
|
||||||
translation: "Artikelen"
|
translation: "Artikelen"
|
||||||
|
- id: paginationNav
|
||||||
|
translation: "Pagina navigatie"
|
||||||
- id: paginationPrevious
|
- id: paginationPrevious
|
||||||
translation: "Vorige"
|
translation: "Vorige"
|
||||||
- id: paginationNext
|
- id: paginationNext
|
||||||
@@ -72,7 +74,17 @@
|
|||||||
- id: shareLink
|
- id: shareLink
|
||||||
translation: "Delen via"
|
translation: "Delen via"
|
||||||
- id: copiedToClipboard
|
- id: copiedToClipboard
|
||||||
translation: "Gekopieerd naar clipboard"
|
translation: "gekopieerd naar clipboard"
|
||||||
|
- id: link
|
||||||
|
translation: "Link"
|
||||||
|
- id: code
|
||||||
|
translation: "Code"
|
||||||
|
- id: latest
|
||||||
|
translation: "meest recente"
|
||||||
|
- id: allVersions
|
||||||
|
translation: "Alle versies"
|
||||||
|
- id: newerVersionAlert
|
||||||
|
translation: "Er is een nieuwere versie van {{ . }}!"
|
||||||
|
|
||||||
# 404 page
|
# 404 page
|
||||||
- id: pageNotFound
|
- id: pageNotFound
|
||||||
|
@@ -1,6 +1,16 @@
|
|||||||
{{- $section := .Section }}
|
{{- $section := .Section }}
|
||||||
{{- with partial "utilities/GetMenu" . }}{{ $.Scratch.Set "sidebar" . }}{{ end -}}
|
{{- $version := partial "utilities/GetVersion.html" (dict "page" . "base" true) -}}
|
||||||
{{ $.Scratch.Set "version" (site.Param (printf "%s.version" .Section)) }}
|
{{- $.Scratch.Set "version" $version -}}
|
||||||
|
{{ with partial "utilities/GetMenu" (dict "page" . "version" $version) }}{{ $.Scratch.Set "sidebar" . }}{{ end }}
|
||||||
|
|
||||||
|
{{- if and site.Params.docs.checkVersion $version -}}
|
||||||
|
{{- if ne $version "latest" -}}
|
||||||
|
{{- if partial "utilities/IsOlder" (dict "current" $version) -}}
|
||||||
|
{{- $.Scratch.Set "pageAlertMsg" (T "newerVersionAlert" site.Title) -}}
|
||||||
|
{{- $.Scratch.Set "pageAlertURL" (or site.Params.docs.latestURL site.baseURL) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="{{ .Site.Language.Lang }}" class="no-js">
|
<html lang="{{ .Site.Language.Lang }}" class="no-js">
|
||||||
@@ -68,6 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{- partial "footer/toast-container.html" . -}}
|
||||||
{{- partialCached "footer/scripts.html" (dict "header" false "page" .) }}
|
{{- partialCached "footer/scripts.html" (dict "header" false "page" .) }}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -18,19 +18,23 @@
|
|||||||
{{- if gt (len (.GetTerms "tags")) 0 -}}
|
{{- if gt (len (.GetTerms "tags")) 0 -}}
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<div class="d-none-dark">
|
<div class="d-none-dark">
|
||||||
|
<div class="hstack gap-3">
|
||||||
{{ range (.GetTerms "tags") -}}
|
{{ range (.GetTerms "tags") -}}
|
||||||
<a class="btn btn-light btn-sm" href="{{ (path.Join .Page.RelPermalink) | relLangURL }}" role="button">{{ .LinkTitle }}</a>
|
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
|
||||||
|
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "light" "size" "sm") }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="d-none-light">
|
<div class="d-none-light">
|
||||||
|
<div class="hstack gap-3">
|
||||||
{{ range (.GetTerms "tags") -}}
|
{{ range (.GetTerms "tags") -}}
|
||||||
<a class="btn btn-outline-secondary btn-sm" href="{{ (path.Join .Page.RelPermalink) | relLangURL }}" role="button">{{ .LinkTitle }}</a>
|
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
|
||||||
|
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "secondary" "size" "sm" "outline" "true") }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partial "assets/sharing.html" . }}
|
{{ partial "assets/sharing.html" . }}
|
||||||
<p class="lead mb-5 mt-3">{{ .Description }}</p>
|
<p class="lead mb-5 mt-3">{{ .Description }}</p>
|
||||||
|
10
layouts/index.redir
Normal file
10
layouts/index.redir
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{{- range .Site.Params.docs.releases -}}
|
||||||
|
{{- if .redirect -}}
|
||||||
|
{{ urls.JoinPath .url "/*" }} {{ urls.JoinPath .redirect ":splat" }} 200
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
{{ range $p := .Site.AllPages }}
|
||||||
|
{{- range .Aliases -}}
|
||||||
|
{{ if hasPrefix . "." }}{{ urls.JoinPath $p.RelPermalink . }}{{ else }}{{ . }}{{ end }} {{ $p.RelPermalink }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
@@ -87,6 +87,8 @@
|
|||||||
{{- $footer := .footer -}}
|
{{- $footer := .footer -}}
|
||||||
{{- $orientation := .orientation -}}
|
{{- $orientation := .orientation -}}
|
||||||
|
|
||||||
|
{{- if and (eq $cols 1) (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
|
||||||
|
|
||||||
<div class="container-fluid p-4 px-xxl-0">
|
<div class="container-fluid p-4 px-xxl-0">
|
||||||
{{ $paginator := "" }}
|
{{ $paginator := "" }}
|
||||||
{{ if $paginate }}
|
{{ if $paginate }}
|
||||||
@@ -130,7 +132,7 @@
|
|||||||
|
|
||||||
{{ if $paginate }}
|
{{ if $paginate }}
|
||||||
{{- if gt $paginator.TotalPages 1 -}}
|
{{- if gt $paginator.TotalPages 1 -}}
|
||||||
<div class="pt-3">{{ partial "assets/pagination.html" $page }}</div>
|
<div class="pt-3">{{ partial "assets/pagination.html" (dict "page" $page "format" "terse") }}</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if gt $count $max }}
|
{{ if gt $count $max }}
|
||||||
|
@@ -18,7 +18,8 @@
|
|||||||
"description" Optional description of the card.
|
"description" Optional description of the card.
|
||||||
"thumbnail" Optional thumbnail image url, displayed on top or the left of the card.
|
"thumbnail" Optional thumbnail image url, displayed on top or the left of the card.
|
||||||
"icon" Optional Font Awesome icon, displayed on top or the left of the card.
|
"icon" Optional Font Awesome icon, displayed on top or the left of the card.
|
||||||
"orientation" Optional placecement of the thumbnail, either "stacked" (default), "horizontal", or "none".
|
"orientation" Optional placecement of the thumbnail or icon, either "stacked" (default), "horizontal",
|
||||||
|
"horizontal-sm" or "none".
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Inline partial to render the card's body -->
|
<!-- Inline partial to render the card's body -->
|
||||||
@@ -127,25 +128,25 @@
|
|||||||
|
|
||||||
{{- $orientation := "stacked" -}}
|
{{- $orientation := "stacked" -}}
|
||||||
{{- with .orientation }}{{ $orientation = . }}{{ end -}}
|
{{- with .orientation }}{{ $orientation = . }}{{ end -}}
|
||||||
{{- $supportedOrientations := slice "stacked" "horizontal" "none" -}}
|
{{- $supportedOrientations := slice "stacked" "horizontal" "horizontal-sm" "none" -}}
|
||||||
{{- if not (in $supportedOrientations $orientation) -}}
|
{{- if not (in $supportedOrientations $orientation) -}}
|
||||||
{{- errorf "partial [assets/card.html] - Invalid value for param 'orientation': %s" $orientation -}}
|
{{- errorf "partial [assets/card.html] - Invalid value for param 'orientation': %s" $orientation -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
|
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
|
||||||
|
|
||||||
{{- if eq $orientation "horizontal" -}}
|
{{- if hasPrefix $orientation "horizontal" -}}
|
||||||
<div class="card mb-3 {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}">
|
<div class="card {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}">
|
||||||
<div class="row g-0 row-cols-1">
|
<div class="row g-0 row-cols-1 h-100">
|
||||||
<div class="col-4">
|
<div class="col-4{{ if eq $orientation "horizontal-sm" }} col-md-2{{ end }}">
|
||||||
{{- if $thumbnail -}}
|
{{- if $thumbnail -}}
|
||||||
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "1x1" "outerClass" "h-100 card-img-wrap" "innerClass" "rounded-start card-img-h100" "title" $title) -}}
|
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "1x1" "outerClass" "h-100 card-img-wrap" "innerClass" "rounded-start card-img-h100" "title" $title) -}}
|
||||||
{{- else if $icon -}}
|
{{- else if $icon -}}
|
||||||
<div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}">
|
<div class="p-{{ $padding }} h-100 fa-wrapper d-flex align-items-center justify-content-center">
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-fluid text-secondary fa-fw" $icon)) -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-8{{ if eq $orientation "horizontal-sm" }} col-md-10{{ end }}">
|
||||||
<div class="card-body d-flex p-{{ $padding }} flex-column h-100">
|
<div class="card-body d-flex p-{{ $padding }} flex-column h-100">
|
||||||
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>{{ end }}
|
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>{{ end }}
|
||||||
<div class="h-100">
|
<div class="h-100">
|
||||||
@@ -161,7 +162,7 @@
|
|||||||
{{- if $thumbnail -}}
|
{{- if $thumbnail -}}
|
||||||
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" "card-img-wrap" "innerClass" "card-img-top" "title" $title) -}}
|
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" "card-img-wrap" "innerClass" "card-img-top" "title" $title) -}}
|
||||||
{{- else if $icon -}}
|
{{- else if $icon -}}
|
||||||
<div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}">
|
<div class="p-{{ $padding }}">
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -98,7 +98,7 @@
|
|||||||
{{- $scaled = $img.Fit (printf "%s webp" $dim) -}}
|
{{- $scaled = $img.Fit (printf "%s webp" $dim) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink $clean (printf "-%s.webp" $dim)) -}}
|
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink $clean (printf "-%s.webp" $dim)) -}}
|
||||||
{{- $imgset = printf "%s, %s %sw" $imgset $scaled.RelPermalink (index $widths $index) -}}
|
{{- $imgset = printf "%s, %s %sw" $imgset $scaled.Permalink (index $widths $index) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $imgset = strings.TrimPrefix ", " $imgset -}}
|
{{- $imgset = strings.TrimPrefix ", " $imgset -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
srcset="{{ . }}"
|
srcset="{{ . }}"
|
||||||
sizes="100vw"
|
sizes="100vw"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
src="{{ $fallbackURL }}"
|
src="{{ absURL $fallbackURL }}"
|
||||||
alt="{{ $title }}">
|
alt="{{ $title }}">
|
||||||
</div>
|
</div>
|
||||||
{{- if $caption -}}
|
{{- if $caption -}}
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
{{- $pageURL := $page.RelPermalink | relLangURL -}}
|
{{- $pageURL := $page.RelPermalink | relLangURL -}}
|
||||||
{{- $isActive := hasPrefix $pageURL $menuURL -}}
|
{{- $isActive := hasPrefix $pageURL $menuURL -}}
|
||||||
{{- $isAlias := $menu.Params.alias -}}
|
{{- $isAlias := $menu.Params.alias -}}
|
||||||
|
{{- $isIcon := $menu.Params.icon -}}
|
||||||
|
|
||||||
{{- $url := urls.Parse $menuURL -}}
|
{{- $url := urls.Parse $menuURL -}}
|
||||||
{{- $baseURL := urls.Parse $.Site.Params.Baseurl -}}
|
{{- $baseURL := urls.Parse $.Site.Params.Baseurl -}}
|
||||||
@@ -36,11 +37,12 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{. }}{{ end }}"
|
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{. }}{{ end }}"
|
||||||
|
{{ if $isIcon }}aria-label="{{ $menu.Name }}"{{ end }}
|
||||||
data-nav="main" data-nav-main="{{ $mainNav }}"{{ with $childNav }} data-nav-child="{{ . }}"{{ end }}
|
data-nav="main" data-nav-main="{{ $mainNav }}"{{ with $childNav }} data-nav-child="{{ . }}"{{ end }}
|
||||||
href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }} {{ $button | safeHTMLAttr }}>
|
href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }} {{ $button | safeHTMLAttr }}>
|
||||||
|
|
||||||
{{- with $menu.Pre }}{{ . }}{{ end -}}
|
{{- with $menu.Pre }}{{ . }}{{ end -}}
|
||||||
<span {{ if $isActive }} class="active"{{ end }}>{{ $menu.Name }}</span>
|
<span {{ if $isActive }} class="active"{{ end }}>{{ if not $isIcon }}{{ $menu.Name }}{{ end }}</span>
|
||||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||||
{{- if $isExternal }} {{ partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}{{ end -}}
|
{{- if and $isExternal (not $isIcon)}} {{ partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}{{ end -}}
|
||||||
</a>
|
</a>
|
||||||
|
@@ -48,6 +48,51 @@
|
|||||||
</li>
|
</li>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
<!-- Inline partial to render the version switcher -->
|
||||||
|
{{- define "partials/navbar-versions.html" -}}
|
||||||
|
{{- $size := .size -}}
|
||||||
|
{{- $collapsed := .collapsed -}}
|
||||||
|
{{- $page := .page -}}
|
||||||
|
{{- $list := site.Params.docs.releases -}}
|
||||||
|
{{- $version := partial "utilities/GetVersion.html" (dict "page" $page) -}}
|
||||||
|
|
||||||
|
<li class="nav-item dropdown {{ if $collapsed }}d-{{ $size }}-none{{ else }}d-none d-{{ $size }}-block{{ end }}">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#!" role="button" data-bs-toggle="dropdown" aria-expanded="false" id="navbar-version-switch">
|
||||||
|
{{ if $collapsed }}{{ site.Title }} {{ end }}{{ $version }}
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbar-version-switch">
|
||||||
|
{{- range $index, $item := $list -}}
|
||||||
|
{{- $active := eq $item.label $version -}}
|
||||||
|
{{- $disabled := false -}}
|
||||||
|
{{- if site.IsServer }}
|
||||||
|
{{- $disabled = and $item.redirect (gt (len $item.redirect) 0) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ if $item.url }}
|
||||||
|
<li>
|
||||||
|
{{- $url := (path.Join $item.url) | relLangURL -}}
|
||||||
|
<a class="pe-5 dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}{{ if $active }} active{{ end }}{{ if $disabled }} disabled{{ end }}" href="{{ $url }}">{{ $item.label }}
|
||||||
|
{{ if $item.latest }} ({{ T "latest" }}){{ end }}
|
||||||
|
{{ if $active }}
|
||||||
|
<span class="position-absolute end-0 me-3">{{- partial "assets/icon.html" (dict "icon" "fas check") }}</span>
|
||||||
|
{{ end }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ else }}
|
||||||
|
{{ if gt $index 0}}<li><hr class="dropdown-divider"></li>{{ end }}
|
||||||
|
<li><span class="dropdown-header fs-6">{{ $item.label }}</span></li>
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if site.Params.docs.overview -}}
|
||||||
|
{{ if gt (len $list) 0 }}<li><hr class="dropdown-divider"></li>{{ end }}
|
||||||
|
<li>
|
||||||
|
{{- $url := (path.Join site.Params.docs.overview) | relLangURL -}}
|
||||||
|
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" href="{{ $url }}">{{ T "allVersions" }}</a>
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- $supportedFlags := slice "true" "false" -}}
|
{{- $supportedFlags := slice "true" "false" -}}
|
||||||
|
|
||||||
{{- $id := printf "navbar-collapse-%d" 0 -}}
|
{{- $id := printf "navbar-collapse-%d" 0 -}}
|
||||||
@@ -112,6 +157,12 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $enableVersions := false -}}
|
||||||
|
{{ $list := site.Params.docs.releases }}
|
||||||
|
{{ if $list }}
|
||||||
|
{{- $enableVersions = gt (len $list ) 1 -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{- $enableLanguage := or $page.IsTranslated site.IsMultiLingual -}}
|
{{- $enableLanguage := or $page.IsTranslated site.IsMultiLingual -}}
|
||||||
|
|
||||||
{{- $logo := site.Params.navigation.logo -}}
|
{{- $logo := site.Params.navigation.logo -}}
|
||||||
@@ -130,7 +181,9 @@
|
|||||||
{{- if eq $color "black" }}{{ $theme = "dark" }}{{ end -}}
|
{{- if eq $color "black" }}{{ $theme = "dark" }}{{ end -}}
|
||||||
{{- if eq $color "white" }}{{ $theme = "light" }}{{ end -}}
|
{{- if eq $color "white" }}{{ $theme = "light" }}{{ end -}}
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-{{ $size }} {{ with $color }}bg-{{ . }}{{ end }} {{ if $fixed }}fixed-top{{ end }} p-4"{{ with $theme }} data-bs-theme="{{ . }}"{{ end }}>
|
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0"{{ with $theme }} data-bs-theme="{{ . }}"{{ end }}>
|
||||||
|
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
||||||
|
<nav class="navbar navbar-expand-{{ $size }} {{ with $color }}bg-{{ . }}{{ end }} p-4"{{ with $theme }} data-bs-theme="{{ . }}"{{ end }}>
|
||||||
<div class="container-xxl p-0">
|
<div class="container-xxl p-0">
|
||||||
<!-- Insert sidebar toggler when applicable -->
|
<!-- Insert sidebar toggler when applicable -->
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
@@ -185,7 +238,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Insert divider if applicable -->
|
<!-- Insert divider if applicable -->
|
||||||
{{- if or $enableLanguage $enableDarkMode -}}
|
{{- if or $enableLanguage $enableVersions -}}
|
||||||
<li class="nav-item py-2 py-md-1 col-12 col-md-auto d-none d-{{ $size }}-block">
|
<li class="nav-item py-2 py-md-1 col-12 col-md-auto d-none d-{{ $size }}-block">
|
||||||
<div class="vr d-none d-md-flex h-100 mx-md-2"></div>
|
<div class="vr d-none d-md-flex h-100 mx-md-2"></div>
|
||||||
</li>
|
</li>
|
||||||
@@ -216,8 +269,20 @@
|
|||||||
</li>
|
</li>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
<!-- Insert version switcher -->
|
||||||
|
{{- if $enableVersions -}}
|
||||||
|
{{- partial "partials/navbar-versions.html" (dict "page" $page "size" $size "collapsed" true ) -}}
|
||||||
|
{{- partial "partials/navbar-versions.html" (dict "page" $page "size" $size "collapsed" false) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Insert color mode switcher -->
|
<!-- Insert color mode switcher -->
|
||||||
{{- if $enableDarkMode -}}
|
{{- if $enableDarkMode -}}
|
||||||
|
<!-- Insert divider -->
|
||||||
|
<li class="nav-item py-2 py-md-1 col-12 col-md-auto d-none d-{{ $size }}-block">
|
||||||
|
<div class="vr d-none d-md-flex h-100 mx-md-2"></div>
|
||||||
|
</li>
|
||||||
|
<li><hr class="dropdown-divider-bg"></li>
|
||||||
|
|
||||||
{{- partial "partials/navbar-mode.html" (dict "size" $size "collapsed" true) -}}
|
{{- partial "partials/navbar-mode.html" (dict "size" $size "collapsed" true) -}}
|
||||||
{{- partial "partials/navbar-mode.html" (dict "size" $size "collapsed" false) -}}
|
{{- partial "partials/navbar-mode.html" (dict "size" $size "collapsed" false) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -225,3 +290,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
</div>
|
||||||
|
15
layouts/partials/assets/page-alert.html
Normal file
15
layouts/partials/assets/page-alert.html
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{{- $page := .page -}}
|
||||||
|
{{- if not $page -}}
|
||||||
|
{{- errorf "partial [assets/page-alert.html] - Missing value for param 'page'" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $pageAlertMsg := $page.Scratch.Get "pageAlertMsg" -}}
|
||||||
|
{{- $pageAlertURL := $page.Scratch.Get "pageAlertURL" -}}
|
||||||
|
{{- $version := $page.Scratch.Get "version" -}}
|
||||||
|
|
||||||
|
{{- if $pageAlertMsg -}}
|
||||||
|
<div id="page-alert" class="alert alert-primary alert-no-decoration fade show d-flex align-items-center small m-0 py-1" data-page-alert-version="{{ $version }}">
|
||||||
|
<a href="{{ with $pageAlertURL }}{{ . }}{{ else }}#!{{ end }}" class="text-decoration-none flex-grow-1 text-center">{{ $pageAlertMsg }}</a>
|
||||||
|
<button id="page-alert-btn-close" type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
@@ -22,9 +22,11 @@
|
|||||||
|
|
||||||
{{- if in $validFormats $format }}
|
{{- if in $validFormats $format }}
|
||||||
{{- if gt $page.Paginator.TotalPages 1 }}
|
{{- if gt $page.Paginator.TotalPages 1 }}
|
||||||
|
<nav aria-label="{{ T "paginationNav" }}">
|
||||||
<ul class="pagination pagination-{{ $format }} justify-content-center">
|
<ul class="pagination pagination-{{ $format }} justify-content-center">
|
||||||
{{- partial (printf "partials/inline/pagination/%s" $format) $page }}
|
{{- partial (printf "partials/inline/pagination/%s" $format) $page }}
|
||||||
</ul>
|
</ul>
|
||||||
|
</nav>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- errorf $msg2 (delimit $validFormats ", ") }}
|
{{- errorf $msg2 (delimit $validFormats ", ") }}
|
||||||
@@ -50,11 +52,11 @@
|
|||||||
|
|
||||||
{{- with .Prev }}
|
{{- with .Prev }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationPrevious" }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-left"></i></span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="page-item disabled">
|
<li class="page-item disabled">
|
||||||
<a aria-disabled="true" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ T "paginationPrevious" }}</span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-left"></i></span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -79,11 +81,11 @@
|
|||||||
|
|
||||||
{{- with .Next }}
|
{{- with .Next }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationNext" }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-right"></i></span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="page-item disabled">
|
<li class="page-item disabled">
|
||||||
<a aria-disabled="true" aria-label="{{ T "paginationNext" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ T "paginationNext" }}</span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationNext" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true"><i class="fas fa-angle-right"></i></span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -110,14 +112,14 @@
|
|||||||
{{- with .First }}
|
{{- with .First }}
|
||||||
{{- if ne $currentPageNumber .PageNumber }}
|
{{- if ne $currentPageNumber .PageNumber }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationFirst" }}</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>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Prev }}
|
{{- with .Prev }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationPrevious" }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-left"></i></span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -142,7 +144,7 @@
|
|||||||
|
|
||||||
{{- with .Next }}
|
{{- with .Next }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true">{{ T "paginationNext" }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button"><span aria-hidden="true"><i class="fas fa-angle-right"></i></span></a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
{{- if .Site.Params.sharing.reverse }}{{ $order = "desc" }}{{ else }}{{ $order = "asc" }}{{ end -}}
|
{{- if .Site.Params.sharing.reverse }}{{ $order = "desc" }}{{ else }}{{ $order = "asc" }}{{ end -}}
|
||||||
{{- $sort := .Site.Params.sharing.sort | default "weight" -}}
|
{{- $sort := .Site.Params.sharing.sort | default "weight" -}}
|
||||||
{{- $list = sort $list $sort $order -}}
|
{{- $list = sort $list $sort $order -}}
|
||||||
<div class="py-3 text-body-secondary">
|
<div class="py-3 text-body-secondary hstack gap-2">
|
||||||
{{ T "shareLink" }}
|
{{ T "shareLink" }}
|
||||||
{{- range $index, $item := $list -}}
|
{{- range $index, $item := $list -}}
|
||||||
{{- $url := $item.url -}}
|
{{- $url := $item.url -}}
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
{{- $target = (printf "toast-message-%s-%d" (anchorize $item.name) $index ) -}}
|
{{- $target = (printf "toast-message-%s-%d" (anchorize $item.name) $index ) -}}
|
||||||
{{- $clipboard = $url -}}
|
{{- $clipboard = $url -}}
|
||||||
{{- $url = "#!" -}}
|
{{- $url = "#!" -}}
|
||||||
{{- partial "assets/toast.html" (dict "id" $target "message" (T "copiedToClipboard")) -}}
|
{{- partial "assets/toast.html" (dict "id" $target "message" (printf "%s %s" (T "link") (T "copiedToClipboard"))) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partial "assets/button.html" (dict "toast" $target "clipboard" $clipboard "href" $url "icon" $item.icon "class" "btn-social px-1" )}}
|
{{ partial "assets/button.html" (dict "toast" $target "clipboard" $clipboard "href" $url "icon" (printf "%s fa-fw" $item.icon) "class" "btn-social p-0" )}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -20,9 +20,9 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if not hugo.IsProduction -}}
|
{{- if not hugo.IsProduction -}}
|
||||||
<script src="{{ $js.RelPermalink }}"></script>
|
<script src="{{ $js.Permalink }}"></script>
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
{{ $js = $js | minify | fingerprint -}}
|
{{ $js = $js | minify | fingerprint -}}
|
||||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"></script>
|
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col text-sm-start text-center col-sm-6 col-md-4">
|
<div class="col text-sm-start text-center col-sm-6 col-md-4">
|
||||||
{{ range .Site.Menus.social -}}
|
{{ range .Site.Menus.social -}}
|
||||||
<a href="{{ .URL | relLangURL }}" target="_blank" rel="noopener noreferrer" aria-label="{{ .Name | safeHTML }}" class="text-decoration-none link-secondary d-inline p-2">
|
<a href="{{ .URL }}" target="_blank" rel="noopener noreferrer" aria-label="{{ .Name | safeHTML }}" class="text-decoration-none link-secondary d-inline p-2">
|
||||||
{{ .Pre | safeHTML }}
|
{{ .Pre | safeHTML }}
|
||||||
</a>
|
</a>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
31
layouts/partials/footer/toast-container.html
Normal file
31
layouts/partials/footer/toast-container.html
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<!--
|
||||||
|
Defines a container to stack toast messages. By default, toast messages are displayed in the bottom right of the
|
||||||
|
viewport. Multiple toast messages are stacked vertically. Adjust the configuration by adjusting 'messages' in the
|
||||||
|
site parameters. The following arguments are supported:
|
||||||
|
"placement" Optional position of the toast messages relative to the viewport: "top-left", "top-center",
|
||||||
|
"top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", or
|
||||||
|
"bottom-right" (default).
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- $placement := "bottom-right" -}}
|
||||||
|
{{- $position := "bottom-0 end-0" -}}
|
||||||
|
{{- with site.Params.messages.placement }}{{ $placement = . }}{{ end -}}
|
||||||
|
{{- $supportedPlacements := slice "top-left" "top-center" "top-right" "middle-left" "middle-center" "middle-right" "bottom-left" "bottom-center" "bottom-right" -}}
|
||||||
|
{{- if not (in $supportedPlacements $placement) -}}
|
||||||
|
{{- errorf "partial [footer/toast-container.html] - Invalid value for param 'placement': %s" $placement -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if eq $placement "top-left" }}{{ $position = "top-0 start-0" -}}
|
||||||
|
{{- else if eq $placement "top-center" }}{{ $position = "top-0 start-50 translate-middle-x" -}}
|
||||||
|
{{- else if eq $placement "top-right" }}{{ $position = "top-0 end-0" -}}
|
||||||
|
{{- else if eq $placement "middle-left" }}{{ $position = "top-50 start-0 translate-middle-y" -}}
|
||||||
|
{{- else if eq $placement "middle-center" }}{{ $position = "top-50 start-50 translate-middle" -}}
|
||||||
|
{{- else if eq $placement "middle-right" }}{{ $position = "top-50 end-0 translate-middle-y" -}}
|
||||||
|
{{- else if eq $placement "bottom-left" }}{{ $position = "bottom-0 start-0" -}}
|
||||||
|
{{- else if eq $placement "bottom-center" }}{{ $position = "bottom-0 start-50 translate-middle-x" -}}
|
||||||
|
{{- else if eq $placement "bottom-right" }}{{ $position = "bottom-0 end-0" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<div id="toast-container" class="toast-container position-fixed {{ $position }} p-3">
|
||||||
|
{{- partial "assets/toast.html" (dict "id" "toast-copied-code-message" "message" (printf "%s %s" (T "code") (T "copiedToClipboard"))) -}}
|
||||||
|
</div>
|
@@ -1,6 +1,12 @@
|
|||||||
|
{{- $page := .page -}}
|
||||||
|
{{- $version := .version -}}
|
||||||
|
|
||||||
{{- $menu := "" -}}
|
{{- $menu := "" -}}
|
||||||
{{- if .IsPage -}}
|
{{- if $page.IsPage -}}
|
||||||
{{- $menu = index .Site.Data .Section -}}
|
{{- $menu = index site.Data (printf "%s-%s" $page.Section $version) -}}
|
||||||
|
{{ if not $menu }}
|
||||||
|
{{ $menu = index site.Data $page.Section }}
|
||||||
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- return $menu -}}
|
{{- return $menu -}}
|
38
layouts/partials/utilities/GetVersion.html
Normal file
38
layouts/partials/utilities/GetVersion.html
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<!--
|
||||||
|
Retrieve the docs version label of the current page. The path of the page's file is matched with the url of the
|
||||||
|
defined docs releases in the site's parameters. When no match is found it returns the latest label instead.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{- $page := .page -}}
|
||||||
|
{{- $base := .base -}}
|
||||||
|
{{- $version := "" -}}
|
||||||
|
|
||||||
|
{{- if and site.Params.docs.releases site.Params.docs.contentPath -}}
|
||||||
|
{{- $docsPath := strings.TrimPrefix "/" site.Params.docs.contentPath -}}
|
||||||
|
{{- if and $page.File (strings.HasPrefix $page.File.Dir $docsPath) -}}
|
||||||
|
{{- $currentPath := strings.TrimPrefix $docsPath $page.File.Dir -}}
|
||||||
|
{{- $currentVersion := index (split $currentPath "/") 0 -}}
|
||||||
|
{{- $versionPath := path.Join site.Params.docs.contentPath $currentVersion -}}
|
||||||
|
|
||||||
|
{{- $list := site.Params.docs.releases -}}
|
||||||
|
{{- range $index, $item := $list -}}
|
||||||
|
{{- $url := strings.TrimSuffix "/" $item.url -}}
|
||||||
|
{{- if eq $url $versionPath -}}
|
||||||
|
{{- if $base }}{{ $version = path.Base $item.url }}{{ else }}{{ $version = $item.label }}{{ end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if not $version -}}
|
||||||
|
{{- $list := site.Params.docs.releases -}}
|
||||||
|
{{- range $item := $list -}}
|
||||||
|
{{- if $item.latest -}}
|
||||||
|
{{- if $base }}{{ $version = path.Base $item.url }}{{ else }}{{ $version = $item.label }}{{ end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $version = site.Params.docs.version -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- return $version -}}
|
32
layouts/partials/utilities/IsOlder.html
Normal file
32
layouts/partials/utilities/IsOlder.html
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!--
|
||||||
|
Returns true if the current version is older than the latest version defined in the docs section of the site
|
||||||
|
parameters. The verification supports semver patterns MAJOR.MINOR.PATCH with an optional suffix.
|
||||||
|
|
||||||
|
Original code by solus on https://discourse.gohugo.io/t/sorting-semantic-version-numbers/40838/6.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $current := .current }}
|
||||||
|
{{ $latest := site.Params.docs.latest }}
|
||||||
|
|
||||||
|
{{- define "partials/padZeroPrefix.html" -}}
|
||||||
|
{{- $padSize := 6 }}
|
||||||
|
{{- $paddedString := replaceRE "(\\d+)" (print (strings.Repeat (sub $padSize 1) "0") "$1") . }}
|
||||||
|
{{- $trimmedString := replaceRE (print "0+(\\d{" $padSize "})") "$1" $paddedString }}
|
||||||
|
{{- return $trimmedString }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "partials/trimZeroPrefix.html" -}}
|
||||||
|
{{- return replaceRE "0+(\\d+)" "$1" . }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $isOlder := false -}}
|
||||||
|
|
||||||
|
{{- if and $current $latest }}
|
||||||
|
{{- $versions := slice $current $latest }}
|
||||||
|
{{- $paddedVersions := apply $versions "partial" "padZeroPrefix" "." }}
|
||||||
|
{{- $sortedVersions := (sort $paddedVersions "value" "desc") }}
|
||||||
|
{{- $sortedVersions = apply $sortedVersions "partial" "trimZeroPrefix" "." }}
|
||||||
|
{{ $isOlder = ne (index $sortedVersions 0) $current }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- return $isOlder -}}
|
16
layouts/partials/utilities/URLJoin.html
Normal file
16
layouts/partials/utilities/URLJoin.html
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{{- $base := .base -}}
|
||||||
|
{{- if not $base }}
|
||||||
|
{{- errorf "partial [assets/utilities/URLJoin.html] - Expected param 'base'" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $path := .path -}}
|
||||||
|
{{- if not $path }}
|
||||||
|
{{- errorf "partial [assets/utilities/URLJoin.html] - Expected param 'path'" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $url := $path -}}
|
||||||
|
{{- if not (hasPrefix $path "http") -}}
|
||||||
|
{{- $url = printf "%s/%s" (strings.TrimSuffix "/" $base) $path -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- return $url -}}
|
@@ -58,7 +58,7 @@
|
|||||||
<div class="pb-3">
|
<div class="pb-3">
|
||||||
{{- partial "assets/button.html" (dict
|
{{- partial "assets/button.html" (dict
|
||||||
"title" $title
|
"title" $title
|
||||||
"href" (printf "%s/%s" (strings.TrimSuffix "/" site.Params.docs.release) $version)
|
"href" (partial "partials/utilities/URLJoin.html" (dict "base" site.Params.docs.release "path" $version))
|
||||||
"size" "sm"
|
"size" "sm"
|
||||||
"color" $color
|
"color" $color
|
||||||
"outline" "true"
|
"outline" "true"
|
||||||
|
101
layouts/shortcodes/timeline.html
Normal file
101
layouts/shortcodes/timeline.html
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<!-- Inspired by the timeline snippet from Siddharth Panchal at https://bootsnipp.com/snippets/Q0ppE -->
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
{{- $data := .Get "data" -}}
|
||||||
|
{{ if not $data -}}
|
||||||
|
{{ errorf "Missing param 'data': %s" .Position -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ $entries := index site.Data $data }}
|
||||||
|
{{ if not $entries -}}
|
||||||
|
{{ errorf "Invalid timeline data '%s': %s" $data .Position -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ $background := "" -}}
|
||||||
|
{{ with .Get "background" }}{{ $background = . }}{{ end -}}
|
||||||
|
{{ $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" -}}
|
||||||
|
{{ if and $background (not (in $supportedColors $background)) -}}
|
||||||
|
{{ errorf "Invalid value for param 'background': %s" .Position -}}
|
||||||
|
{{ $error = true -}}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
<!-- Inline partial to render icon -->
|
||||||
|
{{- define "partials/timeline-icon.html" -}}
|
||||||
|
{{- $col := default 6 .col -}}
|
||||||
|
{{- $icon := .icon -}}
|
||||||
|
{{- $direction := .direction -}}
|
||||||
|
<div class="col-{{ $col }} d-flex justify-content-{{ $direction }} align-items-center">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="d-flex timeline-semi-circle-{{ $direction }} fa-wrapper align-items-center justify-content-center">
|
||||||
|
{{ partial "assets/icon.html" (dict "icon" (printf "%s fa-fluid" $icon)) }}
|
||||||
|
</div>
|
||||||
|
<div class="timeline-connector-{{ $direction }} {{ if eq $direction "start" }} order-first{{ end }}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<!-- Inline partial to render icon -->
|
||||||
|
{{- define "partials/timeline-panel.html" -}}
|
||||||
|
{{- $col := default 6 .col -}}
|
||||||
|
{{- $content := .content -}}
|
||||||
|
{{- $color := .color -}}
|
||||||
|
{{- $title := .title -}}
|
||||||
|
{{- $badge := .badge -}}
|
||||||
|
{{- $url := .url -}}
|
||||||
|
{{- $date := .date -}}
|
||||||
|
{{- if and $url (not (hasPrefix $url "http")) -}}
|
||||||
|
{{- $url = partial "partials/utilities/URLJoin.html" (dict "base" site.Params.docs.release "path" $url) }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $direction := .direction -}}
|
||||||
|
|
||||||
|
<div class="col-{{ $col }} d-flex align-items-center">
|
||||||
|
<div class="d-flex h-100 w-100">
|
||||||
|
<div class="timeline-panel-{{ $direction }}"></div>
|
||||||
|
<div class="timeline-description-text-{{ $direction }} p-3 w-100">
|
||||||
|
<div>
|
||||||
|
{{ with $url }}
|
||||||
|
<a class="fs-5 fw-bold text-uppercase link-{{ $color }} text-break align-middle" href="{{ . }}">{{ $title }}</a>
|
||||||
|
<span class="badge rounded-pill text-bg-{{ $color }} ms-1">{{ if $badge }}<a class="link-bg-{{ $color }}" href="{{ . }}">{{ $badge }}</a>{{ end }}</span>
|
||||||
|
{{ else}}
|
||||||
|
<span class="fs-5 fw-bold text-uppercase text-{{ $color }} text-break align-middle">{{ $title }}</span>
|
||||||
|
<span class="badge rounded-pill text-bg-{{ $color }} ms-1">{{ if $badge }}{{ $badge }}{{ end }}</span>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ if $date }}
|
||||||
|
{{ $datestr := (partial "utilities/date.html" (dict "date" $date "format" "long")) -}}
|
||||||
|
<p class="mb-0"><small class="text-body-secondary text-uppercase">{{ $datestr -}}</small></p>
|
||||||
|
{{ end }}
|
||||||
|
<p class="mt-3 mb-0">{{ $content | markdownify }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<!-- Render default timeline -->
|
||||||
|
<div class="container p-0 d-none d-md-block mb-5 {{ with $background }} timeline-bg-{{ . }}{{ end }}">
|
||||||
|
{{ range $index, $item := $entries }}
|
||||||
|
<div class="row timeline timeline-{{ $item.color }} timeline-dot g-0 ">
|
||||||
|
{{ if eq (mod $index 2) 1 }}
|
||||||
|
{{ partial "partials/timeline-panel.html" (dict "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "start") }}
|
||||||
|
{{ partial "partials/timeline-icon.html" (dict "icon" $item.icon "direction" "start") }}
|
||||||
|
{{ else }}
|
||||||
|
{{ partial "partials/timeline-icon.html" (dict "icon" $item.icon "direction" "end") }}
|
||||||
|
{{ partial "partials/timeline-panel.html" (dict "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "end") }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="row timeline g-0 p-3"> </div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Render timeline for smaller devices -->
|
||||||
|
<div class="container p-0 d-block d-md-none {{ with $background }} timeline-bg-{{ . }}{{ end }}">
|
||||||
|
{{ range $index, $item := $entries }}
|
||||||
|
<div class="row timeline-sm timeline-{{ $item.color }} timeline-dot g-0">
|
||||||
|
{{ partial "partials/timeline-icon.html" (dict "icon" $item.icon "direction" "end" "col" 3) }}
|
||||||
|
{{ partial "partials/timeline-panel.html" (dict "content" $item.content "color" $item.color "title" $item.title "badge" $item.badge "date" $item.date "url" $item.url "direction" "end" "col" 9) }}
|
||||||
|
</div>
|
||||||
|
<div class="row timeline-sm g-0 p-3"> </div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
@@ -4,6 +4,7 @@
|
|||||||
"header": Optional header of the toast message. Uses the site title by default.
|
"header": Optional header of the toast message. Uses the site title by default.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
{{- $error := false -}}
|
||||||
{{- $id := printf "toast-message-%d" .Ordinal -}}
|
{{- $id := printf "toast-message-%d" .Ordinal -}}
|
||||||
{{- with .Get "id" }}{{ $id = . }}{{ end -}}
|
{{- with .Get "id" }}{{ $id = . }}{{ end -}}
|
||||||
{{ $header := .Get "header" -}}
|
{{ $header := .Get "header" -}}
|
||||||
@@ -11,6 +12,6 @@
|
|||||||
|
|
||||||
{{ if not $message -}}
|
{{ if not $message -}}
|
||||||
{{ errorf "Missing inner element text: %s" .Position -}}
|
{{ errorf "Missing inner element text: %s" .Position -}}
|
||||||
{{ else }}
|
{{ else if not $error -}}
|
||||||
{{ partial "assets/toast.html" (dict "id" $id "header" $header "message" $message) }}
|
{{ partial "assets/toast.html" (dict "id" $id "header" $header "message" $message) }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
12
netlify.toml
12
netlify.toml
@@ -4,8 +4,8 @@
|
|||||||
functions = "functions"
|
functions = "functions"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
NODE_VERSION = "18.13.0"
|
NODE_VERSION = "18.16.1"
|
||||||
NPM_VERSION = "8.19.3"
|
NPM_VERSION = "9.5.1"
|
||||||
|
|
||||||
[context.production]
|
[context.production]
|
||||||
command = "npm run build"
|
command = "npm run build"
|
||||||
@@ -26,18 +26,18 @@
|
|||||||
default-src 'self'; \
|
default-src 'self'; \
|
||||||
child-src 'self' app.netlify.com; \
|
child-src 'self' app.netlify.com; \
|
||||||
script-src 'self' \
|
script-src 'self' \
|
||||||
app.netlify.com netlify-cdp-loader.netlify.app \
|
https://*.netlify.app app.netlify.com netlify-cdp-loader.netlify.app \
|
||||||
https://utteranc.es/client.js https://*.google-analytics.com https://*.googletagmanager.com; \
|
https://utteranc.es/client.js https://*.google-analytics.com https://*.googletagmanager.com; \
|
||||||
style-src 'self' \
|
style-src 'self' \
|
||||||
netlify.app https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \
|
https://*.netlify.app https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \
|
||||||
object-src 'none'; \
|
object-src 'none'; \
|
||||||
base-uri 'self'; \
|
base-uri 'self'; \
|
||||||
connect-src 'self'
|
connect-src 'self'
|
||||||
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
||||||
font-src 'self' https://fonts.gstatic.com; \
|
font-src 'self' https://*.netlify.app https://fonts.gstatic.com; \
|
||||||
frame-src 'self' https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com \
|
frame-src 'self' https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com \
|
||||||
app.netlify.com; \
|
app.netlify.com; \
|
||||||
img-src 'self' https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com; \
|
img-src 'self' https://*.netlify.app https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
media-src 'self' \
|
media-src 'self' \
|
||||||
"""
|
"""
|
||||||
|
2897
package-lock.json
generated
2897
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.14.3",
|
"version": "0.15.5",
|
||||||
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"hugo",
|
"hugo",
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
"bootstrap",
|
"bootstrap",
|
||||||
"responsive",
|
"responsive",
|
||||||
"front-end",
|
"front-end",
|
||||||
"blog"
|
"blog",
|
||||||
|
"documentation"
|
||||||
],
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -34,7 +35,6 @@
|
|||||||
"env": "hugo env",
|
"env": "hugo env",
|
||||||
"precheck": "npm version",
|
"precheck": "npm version",
|
||||||
"check": "hugo version",
|
"check": "hugo version",
|
||||||
"copy:fonts": "shx cp ./node_modules/@fortawesome/fontawesome-free/webfonts/* ./static/fonts/",
|
|
||||||
"create:syntax-light": "hugo gen chromastyles --style=github > ./assets/scss/components/_syntax-light.scss",
|
"create:syntax-light": "hugo gen chromastyles --style=github > ./assets/scss/components/_syntax-light.scss",
|
||||||
"create:syntax-dark": "hugo gen chromastyles --style=github-dark > ./assets/scss/components/_syntax-dark.scss",
|
"create:syntax-dark": "hugo gen chromastyles --style=github-dark > ./assets/scss/components/_syntax-dark.scss",
|
||||||
"create:syntax": "npm run -s create:syntax-light & npm run -s create:syntax-dark",
|
"create:syntax": "npm run -s create:syntax-light & npm run -s create:syntax-dark",
|
||||||
@@ -54,23 +54,23 @@
|
|||||||
"@fortawesome/fontawesome-free": "^6.4.0",
|
"@fortawesome/fontawesome-free": "^6.4.0",
|
||||||
"@fullhuman/postcss-purgecss": "^5.0.0",
|
"@fullhuman/postcss-purgecss": "^5.0.0",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"bootstrap": "^5.3.0-alpha3",
|
"bootstrap": "^5.3.0",
|
||||||
"cssnano": "^6.0.0",
|
"cssnano": "^6.0.0",
|
||||||
"cssnano-preset-advanced": "^6.0.0",
|
"cssnano-preset-advanced": "^6.0.0",
|
||||||
"eslint": "^8.39.0",
|
"eslint": "^8.39.0",
|
||||||
"eslint-config-standard": "^17.0.0",
|
"eslint-config-standard": "^17.0.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
"eslint-plugin-n": "^15.7.0",
|
"eslint-plugin-n": "^16.0.0",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"flexsearch": "^0.7.31",
|
"flexsearch": "^0.7.31",
|
||||||
"hugo-bin": "^0.103.0",
|
"hugo-bin": "^0.111.0",
|
||||||
"markdownlint-cli2": "^0.7.0",
|
"markdownlint-cli2": "^0.8.1",
|
||||||
"postcss-cli": "^10.1.0",
|
"postcss-cli": "^10.1.0",
|
||||||
"purgecss-whitelister": "^2.4.0",
|
"purgecss-whitelister": "^2.4.0",
|
||||||
"rimraf": "^5.0.0",
|
"rimraf": "^5.0.0",
|
||||||
"shx": "^0.3.4",
|
"shx": "^0.3.4",
|
||||||
"stylelint": "^15.6.0",
|
"stylelint": "^15.6.0",
|
||||||
"stylelint-config-standard-scss": "^9.0.0"
|
"stylelint-config-standard-scss": "^10.0.0"
|
||||||
},
|
},
|
||||||
"hugo-bin": {
|
"hugo-bin": {
|
||||||
"buildTags": "extended"
|
"buildTags": "extended"
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,8 +5,8 @@ description = "A clean documentation and blog theme for your Hugo site based on
|
|||||||
homepage = "https://gethinode.com"
|
homepage = "https://gethinode.com"
|
||||||
demosite = "https://demo.gethinode.com"
|
demosite = "https://demo.gethinode.com"
|
||||||
tags = ["blog", "documentation", "minimal", "modern", "customizable", "search", "bootstrap"]
|
tags = ["blog", "documentation", "minimal", "modern", "customizable", "search", "bootstrap"]
|
||||||
features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts"]
|
features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "versioned documentation"]
|
||||||
min_version = "0.109.0"
|
min_version = "0.110.0"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Mark Dumay"
|
name = "Mark Dumay"
|
||||||
|
Reference in New Issue
Block a user