mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 10:04:22 +00:00
Compare commits
305 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8c3ea99429 | ||
![]() |
d8929da5ec | ||
![]() |
4a5e8c7311 | ||
![]() |
600b487f43 | ||
![]() |
ed013e9b6f | ||
![]() |
5a299a73dc | ||
![]() |
bf76ee7108 | ||
![]() |
7a1c3970ea | ||
![]() |
a679b1c7e0 | ||
![]() |
bb448f3194 | ||
![]() |
b017a0a785 | ||
![]() |
00d141a4da | ||
![]() |
88dfc50c50 | ||
![]() |
61ad1106c5 | ||
![]() |
f47d738577 | ||
![]() |
323f36a514 | ||
![]() |
151b1d2230 | ||
![]() |
f58f8f1a0a | ||
![]() |
7c786048cc | ||
![]() |
2c0a34c0e1 | ||
![]() |
b6320787e7 | ||
![]() |
c695e0a1f5 | ||
![]() |
8acd6538a5 | ||
![]() |
e18bb8f1b2 | ||
![]() |
d74f9565e4 | ||
![]() |
3016267a7b | ||
![]() |
d1b347b46f | ||
![]() |
777440ef22 | ||
![]() |
f104ff1519 | ||
![]() |
a7a0d26b27 | ||
![]() |
058cebb0b4 | ||
![]() |
af146e3989 | ||
![]() |
69c306bb69 | ||
![]() |
1cfe6190b6 | ||
![]() |
4b40e66534 | ||
![]() |
96af9412b3 | ||
![]() |
1ec9568997 | ||
![]() |
9a0f907bd4 | ||
![]() |
1d59a914b8 | ||
![]() |
91090aa87e | ||
![]() |
e1a3109a95 | ||
![]() |
c53d653751 | ||
![]() |
e95b99a742 | ||
![]() |
548f1f7107 | ||
![]() |
0a59f1ea2b | ||
![]() |
4b96b405ec | ||
![]() |
aaa6ced022 | ||
![]() |
0582716f19 | ||
![]() |
71df26f256 | ||
![]() |
8db0f6585e | ||
![]() |
0d703ac531 | ||
![]() |
55d73b3fbd | ||
![]() |
741bff8a8a | ||
![]() |
f8dcebb14d | ||
![]() |
d054c3e07f | ||
![]() |
c962f93dda | ||
![]() |
2bea049d20 | ||
![]() |
407a7b3703 | ||
![]() |
e57e8d32cb | ||
![]() |
417475643c | ||
![]() |
99801eb90a | ||
![]() |
28a061e4ee | ||
![]() |
be776f10a8 | ||
![]() |
57bfea7b71 | ||
![]() |
9126df161a | ||
![]() |
6ced4573b0 | ||
![]() |
be38c8eab7 | ||
![]() |
cab8e0e9f1 | ||
![]() |
e1378b9f92 | ||
![]() |
23d051e6bc | ||
![]() |
c3c1b4b246 | ||
![]() |
caa3a2a7c7 | ||
![]() |
f235eb42b6 | ||
![]() |
7aae640999 | ||
![]() |
7c606ef48c | ||
![]() |
cca70f538c | ||
![]() |
ac8f0c3e95 | ||
![]() |
7c1a19f6a1 | ||
![]() |
41e02bf064 | ||
![]() |
d8fcae856b | ||
![]() |
c4c7f55334 | ||
![]() |
76c10271f3 | ||
![]() |
88a271cf9d | ||
![]() |
fb74835018 | ||
![]() |
c801ff0241 | ||
![]() |
dfc3cd706a | ||
![]() |
95a1a3b860 | ||
![]() |
f5462ca5ba | ||
![]() |
f42722c526 | ||
![]() |
4d02900162 | ||
![]() |
3ca8bdd0a5 | ||
![]() |
371b054302 | ||
![]() |
055614e6ee | ||
![]() |
7d712b13fe | ||
![]() |
5ee8383868 | ||
![]() |
54f012f5be | ||
![]() |
d28a642283 | ||
![]() |
91becdeeb5 | ||
![]() |
b7c5b8a47e | ||
![]() |
776aad8427 | ||
![]() |
bcf9b8aa7c | ||
![]() |
15d0161240 | ||
![]() |
998db85994 | ||
![]() |
e6586b52cd | ||
![]() |
937964a02b | ||
![]() |
9b4afdfb35 | ||
![]() |
2121e663a0 | ||
![]() |
46699664dc | ||
![]() |
98ec788fb3 | ||
![]() |
e248862905 | ||
![]() |
8ba8acf675 | ||
![]() |
a7cf1ad918 | ||
![]() |
492ce3e38b | ||
![]() |
eaa5c217db | ||
![]() |
410d681d23 | ||
![]() |
deaf9f0fec | ||
![]() |
7ed3313c55 | ||
![]() |
1477ff7bb2 | ||
![]() |
7e2f6606bf | ||
![]() |
2acc8fc737 | ||
![]() |
96fe90ce9d | ||
![]() |
acf25e5375 | ||
![]() |
aa35e03692 | ||
![]() |
31cf9eb577 | ||
![]() |
9a8ebd3558 | ||
![]() |
148c587283 | ||
![]() |
7c9c4cbabb | ||
![]() |
20f14934c2 | ||
![]() |
840e67d12d | ||
![]() |
8ef57a265e | ||
![]() |
8677357450 | ||
![]() |
79ac2dae4f | ||
![]() |
20cad07a0b | ||
![]() |
2c97af2fef | ||
![]() |
95ded6296c | ||
![]() |
3b46095821 | ||
![]() |
1bf4e74e56 | ||
![]() |
9b75b46c49 | ||
![]() |
107077f5ec | ||
![]() |
528b70bfa2 | ||
![]() |
75ab4625b1 | ||
![]() |
bac3054ec2 | ||
![]() |
d63fd5f212 | ||
![]() |
c8b9df7ae5 | ||
![]() |
12daa88f39 | ||
![]() |
c5d895388b | ||
![]() |
5678d2cab5 | ||
![]() |
99d939a3a0 | ||
![]() |
c9a87e8514 | ||
![]() |
af08829f7d | ||
![]() |
28a59a4eac | ||
![]() |
727387931c | ||
![]() |
13a085099c | ||
![]() |
473f390ee6 | ||
![]() |
65cfc0933a | ||
![]() |
321e7f6df5 | ||
![]() |
dda623f040 | ||
![]() |
80d1147d08 | ||
![]() |
b28abcd6f2 | ||
![]() |
93885492d7 | ||
![]() |
ed5daa780d | ||
![]() |
00501edadd | ||
![]() |
fdb1472f9e | ||
![]() |
b176fbd365 | ||
![]() |
f2b0e49aa9 | ||
![]() |
5b8df68db5 | ||
![]() |
fce4b7dde9 | ||
![]() |
ba43672bf6 | ||
![]() |
1b93485064 | ||
![]() |
8d9f12d676 | ||
![]() |
1a89aa39c2 | ||
![]() |
6b60188702 | ||
![]() |
5e410040cc | ||
![]() |
b00f39f850 | ||
![]() |
7e396c5a4d | ||
![]() |
4d43f0bb9b | ||
![]() |
3512bb9dfe | ||
![]() |
7dde897e41 | ||
![]() |
f2cad0fe88 | ||
![]() |
eed2d8f68d | ||
![]() |
d1aebe2fbe | ||
![]() |
013614b149 | ||
![]() |
d55446d5cc | ||
![]() |
80a225e814 | ||
![]() |
c7e63308c5 | ||
![]() |
7bc712b5f3 | ||
![]() |
cf95a84f2a | ||
![]() |
b1e35836f9 | ||
![]() |
a794ab5c52 | ||
![]() |
8fd7d9cde9 | ||
![]() |
93f2f04bae | ||
![]() |
b2a8d78c73 | ||
![]() |
025afc37d4 | ||
![]() |
be5ca21019 | ||
![]() |
69584215b8 | ||
![]() |
e6cef96a03 | ||
![]() |
a6d4a71500 | ||
![]() |
388d8a7e27 | ||
![]() |
9df1b1b981 | ||
![]() |
82d426c14b | ||
![]() |
a2c5073a3d | ||
![]() |
11077b9178 | ||
![]() |
6e8011f111 | ||
![]() |
c6e23b58c5 | ||
![]() |
3267f1165e | ||
![]() |
e46d4764fd | ||
![]() |
2fb4829f68 | ||
![]() |
6009c45e5a | ||
![]() |
69505a1dca | ||
![]() |
c195d903c7 | ||
![]() |
07c1422bbb | ||
![]() |
6be688515d | ||
![]() |
5d83f12b35 | ||
![]() |
008c6a099a | ||
![]() |
125b72177c | ||
![]() |
75054731f4 | ||
![]() |
d36ce74eae | ||
![]() |
2433fa8a66 | ||
![]() |
adbff26d18 | ||
![]() |
bdcdeb9b55 | ||
![]() |
0636708dac | ||
![]() |
eb65b94ef4 | ||
![]() |
01b51f6ef1 | ||
![]() |
89b81cf1b8 | ||
![]() |
54396f4dc0 | ||
![]() |
0660a4c6e9 | ||
![]() |
cba7768e39 | ||
![]() |
a040ab42c3 | ||
![]() |
fa6c01a380 | ||
![]() |
ed6c415bb2 | ||
![]() |
59c71d9bb2 | ||
![]() |
7dde1b3bb7 | ||
![]() |
1d994fa1fe | ||
![]() |
5a9191fea5 | ||
![]() |
790b3ac3d2 | ||
![]() |
f298dd2979 | ||
![]() |
df7a7e2d3d | ||
![]() |
e28ca112de | ||
![]() |
a34dc0f4a0 | ||
![]() |
3eb682b0d9 | ||
![]() |
d824ab39dd | ||
![]() |
5d27d602d2 | ||
![]() |
66f3fd227b | ||
![]() |
e8f38fc73c | ||
![]() |
6f5756f3bf | ||
![]() |
a56b1d6614 | ||
![]() |
967492de76 | ||
![]() |
2b876fbb2e | ||
![]() |
8a0b0df3ff | ||
![]() |
20f4e959d6 | ||
![]() |
a46317f1d2 | ||
![]() |
d264c9154e | ||
![]() |
96dacd5838 | ||
![]() |
5a6f58a96d | ||
![]() |
05e57ff255 | ||
![]() |
cd32208639 | ||
![]() |
ecfd56f2f8 | ||
![]() |
4bfba0c633 | ||
![]() |
02251b0b03 | ||
![]() |
cf486aa9c7 | ||
![]() |
1dafc6a881 | ||
![]() |
4c70245e4f | ||
![]() |
b2a79c2732 | ||
![]() |
8ad9f92752 | ||
![]() |
3cf45385db | ||
![]() |
83c697a7ae | ||
![]() |
6b62c2c701 | ||
![]() |
428e10bc5a | ||
![]() |
6deeeaf9d9 | ||
![]() |
2c191482ab | ||
![]() |
cc934652cc | ||
![]() |
7641184189 | ||
![]() |
fae0dff78b | ||
![]() |
d0b7922ebb | ||
![]() |
6433ba14aa | ||
![]() |
bf8cbee305 | ||
![]() |
af24d3ed3d | ||
![]() |
942323218c | ||
![]() |
d1baf26c08 | ||
![]() |
8aa288d9aa | ||
![]() |
9c71856e49 | ||
![]() |
9300a794b1 | ||
![]() |
6d57058d9e | ||
![]() |
b6e5b24514 | ||
![]() |
f1d99aa191 | ||
![]() |
5597ad8c7d | ||
![]() |
cce1a68c0b | ||
![]() |
b3116d0c86 | ||
![]() |
0540f4f0ae | ||
![]() |
172fbcfbfb | ||
![]() |
2cfb171f9e | ||
![]() |
d1e589f60c | ||
![]() |
e866263fd0 | ||
![]() |
f749f7311c | ||
![]() |
29f0caf070 | ||
![]() |
b3a16435f8 | ||
![]() |
2a17b0faa1 | ||
![]() |
b29206df52 | ||
![]() |
88210f6f0f | ||
![]() |
571353a1f0 | ||
![]() |
22a2b3e308 | ||
![]() |
c91642cbb8 | ||
![]() |
12f334292a | ||
![]() |
9394ae46e8 | ||
![]() |
aa82875644 |
@@ -69,7 +69,7 @@ Hinode is a [Hugo theme that uses modules][hugo_modules] to install and maintain
|
|||||||
The installation instructions in this readme install Hinode as a regular Hugo theme. Hinode requires the following software to be installed on your local machine.
|
The installation instructions in this readme install Hinode as a regular Hugo theme. Hinode requires the following software to be installed on your local machine.
|
||||||
|
|
||||||
- [Go binary][golang_download]
|
- [Go binary][golang_download]
|
||||||
- [Hugo][nodejs] (extended version)
|
- [Hugo][hugo_download] (extended version)
|
||||||
|
|
||||||
[Git][git_download] is recommended, but is not a strict requirement.
|
[Git][git_download] is recommended, but is not a strict requirement.
|
||||||
|
|
||||||
|
@@ -9,44 +9,49 @@
|
|||||||
(() => {
|
(() => {
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const supportedThemes = ['auto', 'dark', 'light'];
|
||||||
|
|
||||||
|
// retrieves the currently stored theme from local storage (cookie)
|
||||||
const storedTheme = localStorage.getItem('theme')
|
const storedTheme = localStorage.getItem('theme')
|
||||||
|
|
||||||
const getPreferredTheme = () => {
|
// retrieves the theme preferred by the client, defaults to light
|
||||||
if (storedTheme) {
|
function getPreferredTheme() {
|
||||||
return storedTheme
|
|
||||||
}
|
|
||||||
|
|
||||||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
||||||
}
|
}
|
||||||
|
|
||||||
const setTheme = function (theme) {
|
// retrieves the current theme, either from local storage or client's preferences
|
||||||
if (theme === 'auto') {
|
function getTheme() {
|
||||||
document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
|
if (storedTheme) {
|
||||||
|
return storedTheme
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.setAttribute('data-bs-theme', theme)
|
const preference = getPreferredTheme()
|
||||||
|
localStorage.setItem('theme', preference)
|
||||||
|
return preference
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setTheme(getPreferredTheme())
|
// applies and stores requested theme
|
||||||
|
function setTheme(theme) {
|
||||||
const showActiveTheme = theme => {
|
if (!supportedThemes.includes(theme)) {
|
||||||
const activeSelectors = document.querySelectorAll('.theme-icon-active')
|
theme = 'auto'
|
||||||
const activeButtons = document.querySelectorAll(`[data-bs-theme-value="${theme}"]`)
|
|
||||||
if (activeButtons.length > 0) {
|
|
||||||
const activeIcon = activeButtons[0].querySelector('span')
|
|
||||||
|
|
||||||
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
|
|
||||||
element.classList.remove('active')
|
|
||||||
})
|
|
||||||
|
|
||||||
for (let i = 0; i < activeSelectors.length; ++i) {
|
|
||||||
activeSelectors[i].innerHTML = activeIcon.innerHTML
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < activeButtons.length; ++i) {
|
|
||||||
activeButtons[i].classList.add('active')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
localStorage.setItem('theme', theme)
|
||||||
|
|
||||||
|
if (theme === 'auto') {
|
||||||
|
document.documentElement.setAttribute('data-bs-theme', (getPreferredTheme()))
|
||||||
|
} else {
|
||||||
|
document.documentElement.setAttribute('data-bs-theme', theme)
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelectorAll('.navbar-mode-selector').forEach(chk => {
|
||||||
|
chk.checked = (document.documentElement.getAttribute('data-bs-theme') === 'light')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// alternates the currently active theme
|
||||||
|
function toggleTheme() {
|
||||||
|
const target = document.documentElement.getAttribute('data-bs-theme') === 'dark' ? 'light' : 'dark'
|
||||||
|
setTheme(target)
|
||||||
}
|
}
|
||||||
|
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
||||||
@@ -56,18 +61,32 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
showActiveTheme(getPreferredTheme())
|
setTheme(getTheme())
|
||||||
|
const light = (document.documentElement.getAttribute('data-bs-theme') === 'light')
|
||||||
|
|
||||||
document.querySelectorAll('[data-bs-theme-value]')
|
document.querySelectorAll('.ball').forEach(ball => {
|
||||||
.forEach(toggle => {
|
ball.classList.add('notransition');
|
||||||
toggle.addEventListener('click', () => {
|
})
|
||||||
const theme = toggle.getAttribute('data-bs-theme-value')
|
|
||||||
localStorage.setItem('theme', theme)
|
document.querySelectorAll('.navbar-mode-selector').forEach(chk => {
|
||||||
setTheme(theme)
|
chk.checked = light
|
||||||
showActiveTheme(theme)
|
chk.addEventListener('change', function () {
|
||||||
})
|
toggleTheme()
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
document.querySelectorAll('.ball').forEach(ball => {
|
||||||
|
ball.offsetHeight; // flush css changes
|
||||||
|
ball.classList.remove('notransition');
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
window.addEventListener('load', () => {
|
||||||
|
const light = (document.documentElement.getAttribute('data-bs-theme') === 'light')
|
||||||
|
document.querySelectorAll('.navbar-mode-selector').forEach(chk => {
|
||||||
|
chk.checked = light
|
||||||
|
})
|
||||||
|
});
|
||||||
})()
|
})()
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
@@ -39,6 +39,8 @@
|
|||||||
@import "components/toc.scss";
|
@import "components/toc.scss";
|
||||||
@import "components/video.scss";
|
@import "components/video.scss";
|
||||||
@import "common/animation.scss";
|
@import "common/animation.scss";
|
||||||
|
@import "common/masonry.scss";
|
||||||
|
@import "common/scrollbar.scss";
|
||||||
@import "common/styles.scss";
|
@import "common/styles.scss";
|
||||||
@import "layouts/reboot.scss";
|
@import "layouts/reboot.scss";
|
||||||
@import "layouts/type.scss";
|
@import "layouts/type.scss";
|
||||||
|
@@ -37,6 +37,8 @@
|
|||||||
@import "components/toc.scss";
|
@import "components/toc.scss";
|
||||||
@import "components/video.scss";
|
@import "components/video.scss";
|
||||||
@import "common/animation.scss";
|
@import "common/animation.scss";
|
||||||
|
@import "common/masonry.scss";
|
||||||
|
@import "common/scrollbar.scss";
|
||||||
@import "common/styles.scss";
|
@import "common/styles.scss";
|
||||||
@import "layouts/reboot.scss";
|
@import "layouts/reboot.scss";
|
||||||
@import "layouts/type.scss";
|
@import "layouts/type.scss";
|
||||||
|
@@ -1,25 +1,25 @@
|
|||||||
// scss-docs-start icons
|
// scss-docs-start icons
|
||||||
$form-check-input-checked-bg-image: url("/icons/form-check-input-checked-bg-image.svg") !default;
|
$form-check-input-checked-bg-image: url("#{$base-url}icons/form-check-input-checked-bg-image.svg") !default;
|
||||||
$form-check-radio-checked-bg-image: url("/icons/form-check-radio-checked-bg-image.svg") !default;
|
$form-check-radio-checked-bg-image: url("#{$base-url}icons/form-check-radio-checked-bg-image.svg") !default;
|
||||||
$form-check-input-indeterminate-bg-image: url("/icons/form-check-input-indeterminate-bg-image.svg") !default;
|
$form-check-input-indeterminate-bg-image: url("#{$base-url}icons/form-check-input-indeterminate-bg-image.svg") !default;
|
||||||
$form-switch-bg-image: url("/icons/form-switch-bg-image.svg") !default;
|
$form-switch-bg-image: url("#{$base-url}icons/form-switch-bg-image.svg") !default;
|
||||||
$form-switch-bg-image-dark: url("/icons/form-switch-bg-image-dark.svg") !default;
|
$form-switch-bg-image-dark: url("#{$base-url}icons/form-switch-bg-image-dark.svg") !default;
|
||||||
$form-switch-focus-bg-image: url("/icons/form-switch-focus-bg-image.svg") !default;
|
$form-switch-focus-bg-image: url("#{$base-url}icons/form-switch-focus-bg-image.svg") !default;
|
||||||
$form-switch-checked-bg-image: url("/icons/form-switch-checked-bg-image.svg") !default;
|
$form-switch-checked-bg-image: url("#{$base-url}icons/form-switch-checked-bg-image.svg") !default;
|
||||||
$form-select-indicator: url("/icons/form-select-indicator.svg") !default;
|
$form-select-indicator: url("#{$base-url}icons/form-select-indicator.svg") !default;
|
||||||
$form-select-indicator-dark: url("/icons/form-select-indicator-dark.svg") !default;
|
$form-select-indicator-dark: url("#{$base-url}icons/form-select-indicator-dark.svg") !default;
|
||||||
$form-feedback-icon-valid: url("/icons/form-feedback-icon-valid.svg") !default;
|
$form-feedback-icon-valid: url("#{$base-url}icons/form-feedback-icon-valid.svg") !default;
|
||||||
$form-feedback-icon-invalid: url("/icons/form-feedback-icon-invalid.svg") !default;
|
$form-feedback-icon-invalid: url("#{$base-url}icons/form-feedback-icon-invalid.svg") !default;
|
||||||
$navbar-light-toggler-icon-bg: url("/icons/navbar-light-toggler-icon-bg.svg") !default;
|
$navbar-light-toggler-icon-bg: url("#{$base-url}icons/navbar-light-toggler-icon-bg.svg") !default;
|
||||||
$navbar-dark-toggler-icon-bg: url("/icons/navbar-dark-toggler-icon-bg.svg") !default;
|
$navbar-dark-toggler-icon-bg: url("#{$base-url}icons/navbar-dark-toggler-icon-bg.svg") !default;
|
||||||
$accordion-button-icon: url("/icons/accordion-button-icon.svg") !default;
|
$accordion-button-icon: url("#{$base-url}icons/accordion-button-icon.svg") !default;
|
||||||
$accordion-button-icon-dark: url("/icons/accordion-button-icon-dark.svg") !default;
|
$accordion-button-icon-dark: url("#{$base-url}icons/accordion-button-icon-dark.svg") !default;
|
||||||
$accordion-button-active-icon: url("/icons/accordion-button-active-icon.svg") !default;
|
$accordion-button-active-icon: url("#{$base-url}icons/accordion-button-active-icon.svg") !default;
|
||||||
$accordion-button-active-icon-dark: url("/icons/accordion-button-active-icon-dark.svg") !default;
|
$accordion-button-active-icon-dark: url("#{$base-url}icons/accordion-button-active-icon-dark.svg") !default;
|
||||||
$carousel-control-prev-icon-bg: url("/icons/carousel-control-prev-icon-bg.svg") !default;
|
$carousel-control-prev-icon-bg: url("#{$base-url}icons/carousel-control-prev-icon-bg.svg") !default;
|
||||||
$carousel-control-next-icon-bg: url("/icons/carousel-control-next-icon-bg.svg") !default;
|
$carousel-control-next-icon-bg: url("#{$base-url}icons/carousel-control-next-icon-bg.svg") !default;
|
||||||
$btn-close-bg: url("/icons/btn-close-bg.svg") !default;
|
$btn-close-bg: url("#{$base-url}icons/btn-close-bg.svg") !default;
|
||||||
$btn-toggle: url("/icons/btn-toggle.svg") !default;
|
$btn-toggle: url("#{$base-url}icons/btn-toggle.svg") !default;
|
||||||
$btn-toggle-dark: url("/icons/btn-toggle-dark.svg") !default;
|
$btn-toggle-dark: url("#{$base-url}icons/btn-toggle-dark.svg") !default;
|
||||||
|
|
||||||
// scss-docs-end icons
|
// scss-docs-end icons
|
||||||
|
38
assets/scss/common/_masonry.scss
Normal file
38
assets/scss/common/_masonry.scss
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
.masonry {
|
||||||
|
--masonry-padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0 var(--masonry-padding);
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-col {
|
||||||
|
flex: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 0 var(--masonry-padding);
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-col div {
|
||||||
|
margin-top: calc(2 * var(--masonry-padding));
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
$utilities: map-merge(
|
||||||
|
$utilities,
|
||||||
|
(
|
||||||
|
"m-col": (
|
||||||
|
property: max-width,
|
||||||
|
responsive: true,
|
||||||
|
class: m-col,
|
||||||
|
values: (
|
||||||
|
1: 100%,
|
||||||
|
2: 50%,
|
||||||
|
3: 33.3%,
|
||||||
|
4: 25%,
|
||||||
|
5: 20%,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
34
assets/scss/common/_scrollbar.scss
Normal file
34
assets/scss/common/_scrollbar.scss
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
@mixin scrollbar(
|
||||||
|
$foreground-color: var(--bs-primary),
|
||||||
|
$background-color: var(--bs-tertiary-bg),
|
||||||
|
$size: 10px
|
||||||
|
) {
|
||||||
|
// For Safari and Chrome (to force appearance in Chrome)
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: $size;
|
||||||
|
height: $size;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: calc($size / 2);
|
||||||
|
background: $foreground-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
border-radius: calc($size / 2);
|
||||||
|
background: $background-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Standard version (Firefox, only appears on scroll)
|
||||||
|
@supports (-moz-appearance:none) {
|
||||||
|
scrollbar-color: $foreground-color $background-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollbar-horizontal
|
||||||
|
{
|
||||||
|
@include scrollbar;
|
||||||
|
|
||||||
|
overflow-x: scroll;
|
||||||
|
margin: auto;
|
||||||
|
}
|
@@ -1,3 +1,9 @@
|
|||||||
|
@if $enable-dark-mode {
|
||||||
|
body {
|
||||||
|
transition: background-color 0.5s, color 0.5s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Remove underline from all links
|
// Remove underline from all links
|
||||||
//
|
//
|
||||||
|
@@ -5,6 +5,8 @@ $enable-important-utilities: true !default;
|
|||||||
// Remove the border from the focused navigation toggler
|
// Remove the border from the focused navigation toggler
|
||||||
$navbar-toggler-focus-width: 0 !default;
|
$navbar-toggler-focus-width: 0 !default;
|
||||||
|
|
||||||
|
$base-url: h.$base-url;
|
||||||
|
|
||||||
$font-family-sans-serif: h.$theme-font, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
|
$font-family-sans-serif: h.$theme-font, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
|
||||||
$font-size-base: h.$font-size-base !default;
|
$font-size-base: h.$font-size-base !default;
|
||||||
$headings-font-weight: 600 !default;
|
$headings-font-weight: 600 !default;
|
||||||
|
@@ -5,6 +5,8 @@ $enable-important-utilities: true !default;
|
|||||||
// Remove the border from the focused navigation toggler
|
// Remove the border from the focused navigation toggler
|
||||||
$navbar-toggler-focus-width: 0 !default;
|
$navbar-toggler-focus-width: 0 !default;
|
||||||
|
|
||||||
|
$base-url: $base-url;
|
||||||
|
|
||||||
// scss-docs-start font
|
// scss-docs-start font
|
||||||
$font-family-sans-serif: $theme-font, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
|
$font-family-sans-serif: $theme-font, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
|
||||||
$font-size-base: $font-size-base !default;;
|
$font-size-base: $font-size-base !default;;
|
||||||
|
@@ -41,3 +41,7 @@ a.btn {
|
|||||||
background-repeat: no-repeat if($enable-important-utilities, !important, null);
|
background-repeat: no-repeat if($enable-important-utilities, !important, null);
|
||||||
background-size: $btn-close-width if($enable-important-utilities, !important, null);
|
background-size: $btn-close-width if($enable-important-utilities, !important, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-link {
|
||||||
|
--bs-btn-padding-x: 0;
|
||||||
|
}
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
// add zoom animation with opacity change on card img hover
|
// add zoom animation with opacity change on card img hover
|
||||||
// source: https://stackoverflow.com/a/43816376
|
// source: https://stackoverflow.com/a/43816376
|
||||||
|
|
||||||
|
.card-img-bg {
|
||||||
|
background-color: var(--#{$prefix}secondary-bg);
|
||||||
|
}
|
||||||
|
|
||||||
.card-img-wrap {
|
.card-img-wrap {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -64,8 +68,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-zoom card-body-link,
|
.card-zoom .card-body-link {
|
||||||
.card-body-link {
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: shade-color($primary, $link-shade-percentage) if($enable-important-utilities, !important, null);
|
color: shade-color($primary, $link-shade-percentage) if($enable-important-utilities, !important, null);
|
||||||
@@ -74,8 +77,7 @@
|
|||||||
|
|
||||||
@if $enable-dark-mode {
|
@if $enable-dark-mode {
|
||||||
@include color-mode(dark) {
|
@include color-mode(dark) {
|
||||||
.card-zoom card-body-link,
|
.card-zoom .card-body-link {
|
||||||
.card-body-link {
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: $primary-bg-subtle-dark if($enable-important-utilities, !important, null);
|
color: $primary-bg-subtle-dark if($enable-important-utilities, !important, null);
|
||||||
@@ -91,3 +93,60 @@
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-button-link {
|
||||||
|
text-decoration: underline if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// support horizontally scrollable card groups
|
||||||
|
.card-container-wrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.card-container-wrapper::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
height: calc(100% - 2rem);
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bs-body-bg) 0%,
|
||||||
|
transparent 1.5rem,
|
||||||
|
transparent calc(100% - 1.5rem),
|
||||||
|
var(--bs-body-bg) 100%
|
||||||
|
);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-container {
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
padding-right: 1.5rem;
|
||||||
|
gap: 1.5rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
scroll-snap-type: x proximity;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-1 {
|
||||||
|
width: 80%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-2 {
|
||||||
|
width: 40%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-3 {
|
||||||
|
width: 27%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-4 {
|
||||||
|
width: 20%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-5 {
|
||||||
|
width: 16%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
text-align: start;
|
text-align: start;
|
||||||
vertical-align: text-top;
|
vertical-align: text-top;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: 0 0 (4 * $spacer) 0;
|
padding: 0 0 (4 * $spacer);
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
// stylelint-disable annotation-no-unknown
|
// stylelint-disable annotation-no-unknown
|
||||||
|
|
||||||
// Source: https://jsfiddle.net/njhgr40m/
|
// Source: https://jsfiddle.net/njhgr40m/
|
||||||
|
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
--bs-navbar-expanded-color: var(--bs-body-bg);
|
--bs-navbar-expanded-color: var(--bs-body-bg);
|
||||||
--bs-navbar-toggler-color: var(--bs-navbar-hover-color);
|
--bs-navbar-toggler-color: var(--bs-navbar-hover-color);
|
||||||
@@ -140,7 +138,7 @@
|
|||||||
white-space: normal;
|
white-space: normal;
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 0 $spacer 0 $spacer;
|
padding: 0 $spacer;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,3 +234,61 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// adapted from https://www.codeply.com/p/UsTEwDkzNp#
|
||||||
|
.checkbox {
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch {
|
||||||
|
--#{$prefix}mode-switch-width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch .label {
|
||||||
|
border-color: var(--#{$prefix}border-color);
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
border-radius: var(--#{$prefix}mode-switch-width);
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 5px;
|
||||||
|
position: relative;
|
||||||
|
height: calc(1px + var(--#{$prefix}mode-switch-width) / 2);
|
||||||
|
width: var(--#{$prefix}mode-switch-width);
|
||||||
|
transform: scale(0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.notransition {
|
||||||
|
-webkit-transition: none !important;
|
||||||
|
-moz-transition: none !important;
|
||||||
|
-o-transition: none !important;
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch .label .ball {
|
||||||
|
background-color: var(--#{$prefix}secondary-bg);
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
left: 2px;
|
||||||
|
height: calc((var(--#{$prefix}mode-switch-width) / 2) - 5px);
|
||||||
|
width: calc((var(--#{$prefix}mode-switch-width) / 2) - 5px);
|
||||||
|
transition: transform 0.2s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch .checkbox:checked + .label .ball {
|
||||||
|
transform: translateX(calc((var(--#{$prefix}mode-switch-width) / 2) - 1px));
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch .fa-moon {
|
||||||
|
color: $yellow;
|
||||||
|
transform: scale(0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch .fa-sun {
|
||||||
|
color: var(--#{$prefix}bs-body-color);
|
||||||
|
transform: scale(0.8);
|
||||||
|
}
|
||||||
|
@@ -1,3 +1,16 @@
|
|||||||
|
.datatable-container {
|
||||||
|
border-bottom: none if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
.datatable-bottom {
|
||||||
|
padding-top: 0 if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
.datatable-sorter {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
@if $enable-dark-mode {
|
@if $enable-dark-mode {
|
||||||
@include color-mode(dark) {
|
@include color-mode(dark) {
|
||||||
.table-striped, .table-striped-columns {
|
.table-striped, .table-striped-columns {
|
||||||
@@ -9,5 +22,13 @@
|
|||||||
--bs-table-hover-bg: var(--bs-tertiary-bg);
|
--bs-table-hover-bg: var(--bs-tertiary-bg);
|
||||||
--bs-table-striped-color: var(--bs-body-color);
|
--bs-table-striped-color: var(--bs-body-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.datatable-pagination-list-item {
|
||||||
|
&:hover,
|
||||||
|
&:focus,
|
||||||
|
&.datatable-active {
|
||||||
|
color: var(--bs-body-bg) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
// stylelint-disable annotation-no-unknown
|
// stylelint-disable annotation-no-unknown
|
||||||
|
|
||||||
// scss-docs-start display-color
|
// scss-docs-start display-color
|
||||||
.d-none-light {
|
.d-none-light, .d-none-inline-light {
|
||||||
display: none if($enable-important-utilities, !important, null);
|
display: none if($enable-important-utilities, !important, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13,13 +13,21 @@
|
|||||||
display: block if($enable-important-utilities, !important, null);
|
display: block if($enable-important-utilities, !important, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.d-none-inline-dark {
|
||||||
|
display: inline if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
|
||||||
@if $enable-dark-mode {
|
@if $enable-dark-mode {
|
||||||
@include color-mode(dark) {
|
@include color-mode(dark) {
|
||||||
.d-none-light {
|
.d-none-light {
|
||||||
display: block if($enable-important-utilities, !important, null);
|
display: block if($enable-important-utilities, !important, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-none-dark {
|
.d-none-inline-light {
|
||||||
|
display: inline if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
.d-none-dark, .d-none-inline-dark {
|
||||||
display: none if($enable-important-utilities, !important, null);
|
display: none if($enable-important-utilities, !important, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -134,6 +134,8 @@ home = ["HTML", "RSS", "REDIR"]
|
|||||||
path = "github.com/gethinode/mod-leaflet"
|
path = "github.com/gethinode/mod-leaflet"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "github.com/gethinode/mod-lottie"
|
path = "github.com/gethinode/mod-lottie"
|
||||||
|
[[module.imports]]
|
||||||
|
path = "github.com/gethinode/mod-simple-datatables"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "github.com/gethinode/mod-utils/v2"
|
path = "github.com/gethinode/mod-utils/v2"
|
||||||
# toml-docs-end modules
|
# toml-docs-end modules
|
||||||
|
@@ -16,25 +16,15 @@
|
|||||||
transpiler = "libsass"
|
transpiler = "libsass"
|
||||||
# toml-docs-end main
|
# toml-docs-end main
|
||||||
|
|
||||||
# toml-docs-start modules
|
# toml-docs-start images
|
||||||
[modules]
|
[images]
|
||||||
core = ["bootstrap", "flexsearch", "fontawesome"]
|
[images.cloudinary]
|
||||||
optional = ["leaflet", "katex", "lottie"]
|
host = "cloudinary"
|
||||||
excludeSCSS = ["bootstrap"]
|
[images.imagekit]
|
||||||
disableTemplate = ["katex"]
|
host = "imagekit"
|
||||||
[modules.katex]
|
[images.imgix]
|
||||||
state = "defer"
|
host = "imgix"
|
||||||
[modules.flexsearch]
|
# toml-docs-end images
|
||||||
frontmatter = false
|
|
||||||
filter = ""
|
|
||||||
[modules.fontawesome]
|
|
||||||
inline = true
|
|
||||||
debug = true
|
|
||||||
skipMissing = false
|
|
||||||
[modules.utils]
|
|
||||||
filter = "[^0-9A-Za-zŽžÀ-ÿ ;.,\\/'’\"]-"
|
|
||||||
raw = false
|
|
||||||
# toml-docs-end modules
|
|
||||||
|
|
||||||
# toml-docs-start debugging
|
# toml-docs-start debugging
|
||||||
[debugging]
|
[debugging]
|
||||||
|
@@ -15,7 +15,7 @@ for = '/**'
|
|||||||
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://fonts.gstatic.com; \
|
||||||
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
|
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
|
||||||
img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
media-src 'self' \
|
media-src 'self' \
|
||||||
"""
|
"""
|
||||||
|
@@ -27,6 +27,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
|
|||||||
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
|
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
|
||||||
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
|
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
|
||||||
'./_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss',
|
'./_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss',
|
||||||
|
'./_vendor/github.com/gethinode/mod-simple-datatables/dist/simple-datatables.scss',
|
||||||
'./_vendor/github.com/twbs/bootstrap/scss/_carousel.scss',
|
'./_vendor/github.com/twbs/bootstrap/scss/_carousel.scss',
|
||||||
'./_vendor/github.com/twbs/bootstrap/scss/_dropdown.scss',
|
'./_vendor/github.com/twbs/bootstrap/scss/_dropdown.scss',
|
||||||
'./_vendor/github.com/twbs/bootstrap/scss/_modal.scss',
|
'./_vendor/github.com/twbs/bootstrap/scss/_modal.scss',
|
||||||
|
48
data/dimensions.yml
Normal file
48
data/dimensions.yml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
- ratio: 4x3
|
||||||
|
dimensions:
|
||||||
|
- 576x432
|
||||||
|
- 768x576
|
||||||
|
- 992x744
|
||||||
|
- 1200x900
|
||||||
|
- 1400x1050
|
||||||
|
- 2800x2100
|
||||||
|
- ratio: 3x2
|
||||||
|
dimensions:
|
||||||
|
- 576x384
|
||||||
|
- 768x512
|
||||||
|
- 992x661
|
||||||
|
- 1200x800
|
||||||
|
- 1400x933
|
||||||
|
- 2800x1867
|
||||||
|
- ratio: 1x1
|
||||||
|
dimensions:
|
||||||
|
- 576x576
|
||||||
|
- 768x768
|
||||||
|
- 992x992
|
||||||
|
- 1200x1200
|
||||||
|
- 1400x1400
|
||||||
|
- 2800x2800
|
||||||
|
- ratio: 16x9
|
||||||
|
dimensions:
|
||||||
|
- 576x324
|
||||||
|
- 768x432
|
||||||
|
- 992x558
|
||||||
|
- 1200x675
|
||||||
|
- 1400x788
|
||||||
|
- 2800x1575
|
||||||
|
- ratio: 21x9
|
||||||
|
dimensions:
|
||||||
|
- 576x247
|
||||||
|
- 768x329
|
||||||
|
- 992x425
|
||||||
|
- 1200x514
|
||||||
|
- 1400x600
|
||||||
|
- 2800x1200
|
||||||
|
- ratio: auto
|
||||||
|
dimensions:
|
||||||
|
- 576
|
||||||
|
- 768
|
||||||
|
- 992
|
||||||
|
- 1200
|
||||||
|
- 1400
|
||||||
|
- 2800
|
@@ -66,6 +66,15 @@ arguments:
|
|||||||
Flag indicating if pagination should be added to the card group, if the
|
Flag indicating if pagination should be added to the card group, if the
|
||||||
list exceeds the maximum number of cards to display.
|
list exceeds the maximum number of cards to display.
|
||||||
group: partial
|
group: partial
|
||||||
|
pagination:
|
||||||
|
type: int
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Number of elements per page in pagination, overrides site settings.
|
||||||
|
group: partial
|
||||||
|
options:
|
||||||
|
min: 1
|
||||||
|
release: v0.23.12
|
||||||
href:
|
href:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
@@ -83,7 +92,8 @@ arguments:
|
|||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Flag to indicate a horizontal line should be added between items on small screens.
|
Flag to indicate a horizontal line should be added between items on small
|
||||||
|
screens.
|
||||||
wrapper:
|
wrapper:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
@@ -93,7 +103,25 @@ arguments:
|
|||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Flag indicating if the number of columns should be responsive, defaults to `true`.
|
Flag indicating if the number of columns should be responsive, defaults to
|
||||||
|
`true`.
|
||||||
|
buttonType:
|
||||||
|
type: select
|
||||||
|
optional: true
|
||||||
|
default: button
|
||||||
|
release: v0.23.18
|
||||||
|
comment: Type of the button elements.
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- link
|
||||||
|
- button
|
||||||
|
scroll:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Enables horizontal scrolling of the cards. By default, the card group
|
||||||
|
wraps any cards beyond the amount of defined columns to a new line. When
|
||||||
|
`scroll` is set to true, a horizontal scroll bar is added instead.
|
||||||
hook:
|
hook:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -157,6 +157,12 @@ arguments:
|
|||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Font Awesome icon, displayed on top or the left of the card.
|
Font Awesome icon, displayed on top or the left of the card.
|
||||||
|
iconRounded:
|
||||||
|
type: bool
|
||||||
|
parent: cascade
|
||||||
|
optional: true
|
||||||
|
release: v0.24.8
|
||||||
|
comment: Stack the icon in a round container.
|
||||||
align:
|
align:
|
||||||
type: select
|
type: select
|
||||||
parent: cascade
|
parent: cascade
|
||||||
@@ -169,6 +175,19 @@ arguments:
|
|||||||
- start
|
- start
|
||||||
- end
|
- end
|
||||||
- center
|
- center
|
||||||
|
scroll:
|
||||||
|
type: bool
|
||||||
|
parent: cascade
|
||||||
|
optional: true
|
||||||
|
group: partial
|
||||||
|
comment: >-
|
||||||
|
Enables horizontal scrolling of the cards. By default, the card group
|
||||||
|
wraps any cards beyond the amount of defined columns to a new line. When
|
||||||
|
`scroll` is set to true, a horizontal scroll bar is added instead.
|
||||||
|
wrapper:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Element class of the card wrapper.
|
||||||
style:
|
style:
|
||||||
type: string
|
type: string
|
||||||
parent: cascade
|
parent: cascade
|
||||||
@@ -206,11 +225,30 @@ arguments:
|
|||||||
release: v0.23.2
|
release: v0.23.2
|
||||||
comment: >-
|
comment: >-
|
||||||
Label of the link button, defaults to the card title.
|
Label of the link button, defaults to the card title.
|
||||||
|
buttonType:
|
||||||
|
type: select
|
||||||
|
parent: cascade
|
||||||
|
optional: true
|
||||||
|
default: button
|
||||||
|
comment: Type of the button element.
|
||||||
|
release: v0.23.18
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- link
|
||||||
|
- button
|
||||||
hook:
|
hook:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Render hook for the image partial.
|
comment: Render hook for the image partial.
|
||||||
group: partial
|
group: partial
|
||||||
|
sizes:
|
||||||
|
type: string
|
||||||
|
default: 100vw
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
One or more strings separated by commas, indicating the source sizes of an
|
||||||
|
image set.
|
||||||
|
group: partial
|
||||||
body:
|
body:
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
|
29
data/structures/image-adapter-rewrite.yml
Normal file
29
data/structures/image-adapter-rewrite.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
comment: >-
|
||||||
|
Rewrites an origin URL to a target URL as supported by a CDN image adapter.
|
||||||
|
arguments:
|
||||||
|
account:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Account name of the origin server.
|
||||||
|
container:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Container name of the origin server.
|
||||||
|
host:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Host of an URL. For example, the host of the URL
|
||||||
|
'https://example.com/first/second/third.webp' equals 'example.com'.
|
||||||
|
dir:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
All but the last element of an URL extension. For example, the dir of the
|
||||||
|
URL 'https://example.com/first/second/third.webp' equals '/first/second/'.
|
||||||
|
file:
|
||||||
|
type: string
|
||||||
|
optional: false
|
||||||
|
comment: >-
|
||||||
|
The last element of an URL extension. For example, the file of the
|
||||||
|
URL 'https://example.com/first/second/third.webp' equals 'third.webp'.
|
62
data/structures/image-adapter.yml
Normal file
62
data/structures/image-adapter.yml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
comment: >-
|
||||||
|
Defines the interface to be implemented by a CDN image adapter.
|
||||||
|
arguments:
|
||||||
|
host:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Host of an URL. For example, the host of the URL
|
||||||
|
'https://example.com/first/second/third.webp' equals 'example.com'.
|
||||||
|
dir:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
All but the last element of an URL extension. For example, the dir of the
|
||||||
|
URL 'https://example.com/first/second/third.webp' equals '/first/second/'.
|
||||||
|
file:
|
||||||
|
type: string
|
||||||
|
optional: false
|
||||||
|
comment: >-
|
||||||
|
The last element of an URL extension. For example, the file of the
|
||||||
|
URL 'https://example.com/first/second/third.webp' equals 'third.webp'.
|
||||||
|
absoluteURL:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
default: false
|
||||||
|
comment: >-
|
||||||
|
Defines if a local image should use absolute instead of relative paths.
|
||||||
|
img:
|
||||||
|
type: "*resources.resourceAdapter"
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Image resource to process. Must be set when handling local images.
|
||||||
|
format:
|
||||||
|
type: select
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Image format; leave empty for an auto format (if supported) or default
|
||||||
|
format (usually jpg).
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- png
|
||||||
|
- jpg
|
||||||
|
- gif
|
||||||
|
- tiff
|
||||||
|
- bmp
|
||||||
|
- webp
|
||||||
|
transform:
|
||||||
|
type: select
|
||||||
|
optional: false
|
||||||
|
comment: Image transformation.
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- fill
|
||||||
|
- fit
|
||||||
|
height:
|
||||||
|
type: int
|
||||||
|
optional: false
|
||||||
|
comment: Height of the image in pixels.
|
||||||
|
width:
|
||||||
|
type: int
|
||||||
|
optional: false
|
||||||
|
comment: Width of the image in pixels.
|
@@ -19,7 +19,9 @@ comment: >-
|
|||||||
reference.
|
reference.
|
||||||
arguments:
|
arguments:
|
||||||
url:
|
url:
|
||||||
type: string
|
type:
|
||||||
|
- string
|
||||||
|
- template.URL
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Path or url of the image, e.g. `img/example.jpg`. Images with multiple
|
Path or url of the image, e.g. `img/example.jpg`. Images with multiple
|
||||||
@@ -98,6 +100,14 @@ arguments:
|
|||||||
- low
|
- low
|
||||||
- auto
|
- auto
|
||||||
group: partial
|
group: partial
|
||||||
|
sizes:
|
||||||
|
type: string
|
||||||
|
default: 100vw
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
One or more strings separated by commas, indicating the source sizes of an
|
||||||
|
image set.
|
||||||
|
group: partial
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
@@ -120,3 +130,11 @@ arguments:
|
|||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the figure caption, e.g. `px-4`.
|
comment: Class attribute of the figure caption, e.g. `px-4`.
|
||||||
release: v0.23.0
|
release: v0.23.0
|
||||||
|
plain:
|
||||||
|
type: bool
|
||||||
|
default: false
|
||||||
|
optional: true
|
||||||
|
comment:
|
||||||
|
Flag to indicate if the image should render a plain image instead of an
|
||||||
|
image set. When set, no transformations are applied to the image.
|
||||||
|
release: v0.24.0
|
||||||
|
@@ -56,6 +56,12 @@ arguments:
|
|||||||
Flag to indicate if the retrieved title (e.g. no inner text is provided)
|
Flag to indicate if the retrieved title (e.g. no inner text is provided)
|
||||||
of an internal link should use its original case. If false, the title is
|
of an internal link should use its original case. If false, the title is
|
||||||
set to lower case.
|
set to lower case.
|
||||||
|
external:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
default: false
|
||||||
|
comment: >-
|
||||||
|
Flag to indicate if a link that contains baseURL host should be forced as external.
|
||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -32,3 +32,8 @@ arguments:
|
|||||||
comment: >-
|
comment: >-
|
||||||
Flag to indicate if an external link should open in a new tab, defaults
|
Flag to indicate if an external link should open in a new tab, defaults
|
||||||
to setting `main.externalLinks.tab` in the site's parameters.
|
to setting `main.externalLinks.tab` in the site's parameters.
|
||||||
|
plain:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Renders the navigation item as plain item, ignoring any children.
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
comment: >-
|
comment: >-
|
||||||
Makes a markdown table responsive. Responsive tables scroll horizontally to
|
Makes a markdown table responsive. Responsive tables scroll horizontally to
|
||||||
improve their layout on smaller screens.
|
improve their layout on smaller screens. To features `sortable`, `paging`,
|
||||||
|
and `searchable` require the module `simple-datatables`.
|
||||||
arguments:
|
arguments:
|
||||||
breakpoint:
|
breakpoint:
|
||||||
type: select
|
type: select
|
||||||
@@ -24,6 +25,21 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the table element, e.g. `table-striped-columns w-auto`.
|
comment: Class attribute of the table element, e.g. `table-striped-columns w-auto`.
|
||||||
|
sortable:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: Toggle the ability to sort the columns.
|
||||||
|
release: v0.24.13
|
||||||
|
paging:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: Whether paging is enabled for the table.
|
||||||
|
release: v0.24.13
|
||||||
|
searchable:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: Toggle the ability to search the dataset.
|
||||||
|
release: v0.24.13
|
||||||
body:
|
body:
|
||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
|
@@ -13,21 +13,6 @@
|
|||||||
[main.build]
|
[main.build]
|
||||||
transpiler = "dartsass"
|
transpiler = "dartsass"
|
||||||
|
|
||||||
[modules]
|
|
||||||
core = ["bootstrap", "flexsearch", "fontawesome"]
|
|
||||||
optional = ["leaflet", "katex", "lottie"]
|
|
||||||
excludeSCSS = ["bootstrap"]
|
|
||||||
disableTemplate = ["katex"]
|
|
||||||
[modules.katex]
|
|
||||||
state = "defer"
|
|
||||||
[modules.flexsearch]
|
|
||||||
frontmatter = false
|
|
||||||
filter = ""
|
|
||||||
[modules.fontawesome]
|
|
||||||
inline = true
|
|
||||||
debug = true
|
|
||||||
skipMissing = false
|
|
||||||
|
|
||||||
[debugging]
|
[debugging]
|
||||||
showJS = false
|
showJS = false
|
||||||
showSCSS = false
|
showSCSS = false
|
||||||
@@ -70,6 +55,14 @@
|
|||||||
[messages]
|
[messages]
|
||||||
placement = "bottom-right"
|
placement = "bottom-right"
|
||||||
|
|
||||||
|
[dam]
|
||||||
|
dimensions = "dimensions.yml"
|
||||||
|
|
||||||
|
[[dam.providers]]
|
||||||
|
name = "Cloudinary"
|
||||||
|
pattern = "cloudinary"
|
||||||
|
adapter = "assets/adapters/cloudinary.html"
|
||||||
|
|
||||||
[sharing]
|
[sharing]
|
||||||
enabled = true
|
enabled = true
|
||||||
sort = "weight"
|
sort = "weight"
|
||||||
|
@@ -15,7 +15,7 @@ for = '/**'
|
|||||||
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://fonts.gstatic.com; \
|
||||||
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
|
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
|
||||||
img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
media-src 'self' \
|
media-src 'self' \
|
||||||
"""
|
"""
|
||||||
|
@@ -136,7 +136,7 @@ As an example, the following shortcode displays a card group of three elements.
|
|||||||
|
|
||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 -->
|
||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* card-group padding="3" gutter="3" */>}}
|
{{</* card-group padding="3" gutter="3" button=true buttonType="link" cols=2 scroll=true */>}}
|
||||||
{{</* card title="Bootstrap framework" icon="fab bootstrap" */>}}
|
{{</* card title="Bootstrap framework" icon="fab bootstrap" */>}}
|
||||||
Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source
|
Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source
|
||||||
Sass files.
|
Sass files.
|
||||||
@@ -255,11 +255,12 @@ As an example, the following shortcodes show a square check, a brand logo, a cir
|
|||||||
|
|
||||||
## Image
|
## Image
|
||||||
|
|
||||||
As an example, the following shortcode displays an image with rounded corners and a 21x9 aspect ratio.
|
As an example, the following shortcode displays an image with rounded corners and a 4x3 aspect ratio in portrait mode.
|
||||||
|
|
||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 -->
|
||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* image src="img/flowers.jpg" ratio="21x9" caption="Figure caption" class="rounded" */>}}
|
{{</* image src="img/flowers.jpg" ratio="4x3" caption="Figure caption" class="rounded col-md-6"
|
||||||
|
portrait=true wrapper="text-center" */>}}
|
||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
@@ -291,6 +292,7 @@ As an example, the following shortcodes render links in different formats.
|
|||||||
- {{</* link name=hinode cue=true tab=true >}}Named link opening in new tab with icon{{< /link */>}}
|
- {{</* link name=hinode cue=true tab=true >}}Named link opening in new tab with icon{{< /link */>}}
|
||||||
- {{</* link hinode /*/>}}
|
- {{</* link hinode /*/>}}
|
||||||
- {{</* link href="https://developer.mozilla.org" >}}External link{{< /link */>}}
|
- {{</* link href="https://developer.mozilla.org" >}}External link{{< /link */>}}
|
||||||
|
- {{</* link href="https://demo.gethinode.com/en/about/" >}}Surrogate external link{{< /link */>}}
|
||||||
- {{</* link "./projects/another-project" >}}Internal link with title{{< /link */>}}
|
- {{</* link "./projects/another-project" >}}Internal link with title{{< /link */>}}
|
||||||
- {{</* link url="projects/another-project" /*/>}}
|
- {{</* link url="projects/another-project" /*/>}}
|
||||||
- {{</* link url="/projects/another-project" /*/>}}
|
- {{</* link url="/projects/another-project" /*/>}}
|
||||||
|
@@ -10,7 +10,7 @@ thumbnail:
|
|||||||
authorURL: https://unsplash.com/@ryoji__iwata
|
authorURL: https://unsplash.com/@ryoji__iwata
|
||||||
origin: Unsplash
|
origin: Unsplash
|
||||||
originURL: https://unsplash.com/photos/5siQcvSxCP8
|
originURL: https://unsplash.com/photos/5siQcvSxCP8
|
||||||
modules: ["katex", "leaflet", "lottie"]
|
modules: ["katex", "leaflet", "lottie", "simple-datatables"]
|
||||||
---
|
---
|
||||||
|
|
||||||
Hinode provides several shortcodes on top of the common [Bootstrap elements]({{< relref "bootstrap-elements" >}}). Refer to the [official documentation]({{< param "links.hinode_docs" >}}) for more details.
|
Hinode provides several shortcodes on top of the common [Bootstrap elements]({{< relref "bootstrap-elements" >}}). Refer to the [official documentation]({{< param "links.hinode_docs" >}}) for more details.
|
||||||
@@ -25,6 +25,49 @@ As an example, the following shortcode shows an animation that plays on hover.
|
|||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Data tables
|
||||||
|
|
||||||
|
As an example, the following shortcode displays a responsive table that uses advanced controls.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="markdown" >}}
|
||||||
|
{{</* table sortable="true" paging="true" searchable="true" */>}}
|
||||||
|
| # | Heading |
|
||||||
|
|-----|---------|
|
||||||
|
| 1. | Item 1 |
|
||||||
|
| 2. | Item 2 |
|
||||||
|
| 3. | Item 3 |
|
||||||
|
| 4. | Item 4 |
|
||||||
|
| 5. | Item 5 |
|
||||||
|
| 6. | Item 6 |
|
||||||
|
| 7. | Item 7 |
|
||||||
|
| 8. | Item 8 |
|
||||||
|
| 9. | Item 9 |
|
||||||
|
| 10. | Item 10 |
|
||||||
|
| 11. | Item 11 |
|
||||||
|
| 12. | Item 12 |
|
||||||
|
| 13. | Item 13 |
|
||||||
|
| 14. | Item 14 |
|
||||||
|
| 15. | Item 15 |
|
||||||
|
| 16. | Item 16 |
|
||||||
|
| 17. | Item 17 |
|
||||||
|
| 18. | Item 18 |
|
||||||
|
| 19. | Item 19 |
|
||||||
|
| 20. | Item 20 |
|
||||||
|
| 21. | Item 21 |
|
||||||
|
| 22. | Item 22 |
|
||||||
|
| 23. | Item 23 |
|
||||||
|
| 24. | Item 24 |
|
||||||
|
| 25. | Item 25 |
|
||||||
|
| 26. | Item 26 |
|
||||||
|
| 27. | Item 27 |
|
||||||
|
| 28. | Item 28 |
|
||||||
|
| 29. | Item 29 |
|
||||||
|
| 30. | Item 30 |
|
||||||
|
{{</* /table */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
## Formula (KaTeX)
|
## Formula (KaTeX)
|
||||||
|
|
||||||
As an example, the following markdown renders two formulas using the KaTeX typesetting library.
|
As an example, the following markdown renders two formulas using the KaTeX typesetting library.
|
||||||
|
42
exampleSite/content/en/blog/image.md
Normal file
42
exampleSite/content/en/blog/image.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
author: Mark Dumay
|
||||||
|
title: Local and remote images
|
||||||
|
date: 2024-05-19
|
||||||
|
description: Include responsive images from local sources and selected CDN image providers.
|
||||||
|
tags: ["blog"]
|
||||||
|
thumbnail:
|
||||||
|
url: https://assets.imgix.net/examples/bluehat.jpg
|
||||||
|
---
|
||||||
|
|
||||||
|
## Cloudinary
|
||||||
|
|
||||||
|
As an example, the following shortcode displays an image with rounded corners and a 21x9 aspect ratio.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="hugo" >}}
|
||||||
|
{{</* image src="https://res.cloudinary.com/demo/image/upload/dog.webp"
|
||||||
|
ratio="21x9" caption="Cloudinary image" class="rounded" plain=true */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## ImageKit.io
|
||||||
|
|
||||||
|
As an example, the following shortcode displays an image with rounded corners and a 21x9 aspect ratio.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="hugo" >}}
|
||||||
|
{{</* image src="https://ik.imagekit.io/demo/default-image.jpg"
|
||||||
|
ratio="21x9" caption="ImageKit.io image" class="rounded" */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Imgix
|
||||||
|
|
||||||
|
As an example, the following shortcode displays an image with rounded corners and a 21x9 aspect ratio.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="hugo" >}}
|
||||||
|
{{</* image src="https://assets.imgix.net/examples/bluehat.jpg"
|
||||||
|
ratio="21x9" caption="imgix image" class="rounded" */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
@@ -22,6 +22,7 @@
|
|||||||
"i",
|
"i",
|
||||||
"img",
|
"img",
|
||||||
"input",
|
"input",
|
||||||
|
"label",
|
||||||
"li",
|
"li",
|
||||||
"link",
|
"link",
|
||||||
"mark",
|
"mark",
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
"align-self-end",
|
"align-self-end",
|
||||||
"anchor",
|
"anchor",
|
||||||
"badge",
|
"badge",
|
||||||
|
"ball",
|
||||||
"bg-body",
|
"bg-body",
|
||||||
"bg-body-tertiary",
|
"bg-body-tertiary",
|
||||||
"bg-danger",
|
"bg-danger",
|
||||||
@@ -93,6 +95,7 @@
|
|||||||
"btn-close",
|
"btn-close",
|
||||||
"btn-group",
|
"btn-group",
|
||||||
"btn-light",
|
"btn-light",
|
||||||
|
"btn-link",
|
||||||
"btn-outline-primary",
|
"btn-outline-primary",
|
||||||
"btn-outline-secondary",
|
"btn-outline-secondary",
|
||||||
"btn-primary",
|
"btn-primary",
|
||||||
@@ -100,12 +103,17 @@
|
|||||||
"btn-sm",
|
"btn-sm",
|
||||||
"btn-social",
|
"btn-social",
|
||||||
"card",
|
"card",
|
||||||
|
"card-block-2",
|
||||||
"card-body",
|
"card-body",
|
||||||
"card-body-link",
|
"card-body-link",
|
||||||
"card-body-margin",
|
"card-body-margin",
|
||||||
"card-button",
|
"card-button",
|
||||||
|
"card-button-link",
|
||||||
|
"card-container",
|
||||||
|
"card-container-wrapper",
|
||||||
"card-emphasize",
|
"card-emphasize",
|
||||||
"card-icon",
|
"card-icon",
|
||||||
|
"card-img-bg",
|
||||||
"card-img-top",
|
"card-img-top",
|
||||||
"card-img-wrap",
|
"card-img-wrap",
|
||||||
"card-text",
|
"card-text",
|
||||||
@@ -120,6 +128,7 @@
|
|||||||
"carousel-indicators",
|
"carousel-indicators",
|
||||||
"carousel-inner",
|
"carousel-inner",
|
||||||
"carousel-item",
|
"carousel-item",
|
||||||
|
"checkbox",
|
||||||
"chroma",
|
"chroma",
|
||||||
"col",
|
"col",
|
||||||
"col-10",
|
"col-10",
|
||||||
@@ -128,22 +137,24 @@
|
|||||||
"col-3",
|
"col-3",
|
||||||
"col-4",
|
"col-4",
|
||||||
"col-6",
|
"col-6",
|
||||||
"col-8",
|
|
||||||
"col-9",
|
"col-9",
|
||||||
"col-auto",
|
"col-auto",
|
||||||
"col-lg-2",
|
"col-lg-2",
|
||||||
"col-lg-4",
|
"col-lg-4",
|
||||||
"col-lg-8",
|
"col-lg-8",
|
||||||
"col-md-10",
|
|
||||||
"col-md-2",
|
"col-md-2",
|
||||||
"col-md-3",
|
"col-md-3",
|
||||||
"col-md-4",
|
"col-md-4",
|
||||||
|
"col-md-6",
|
||||||
"col-md-8",
|
"col-md-8",
|
||||||
"col-md-9",
|
"col-md-9",
|
||||||
"col-md-auto",
|
"col-md-auto",
|
||||||
"col-sm-12",
|
"col-sm-12",
|
||||||
"col-sm-3",
|
"col-sm-3",
|
||||||
"col-sm-6",
|
"col-sm-6",
|
||||||
|
"col-sm-9",
|
||||||
|
"col-xl-10",
|
||||||
|
"col-xl-2",
|
||||||
"collapse",
|
"collapse",
|
||||||
"collapsed",
|
"collapsed",
|
||||||
"container",
|
"container",
|
||||||
@@ -164,6 +175,7 @@
|
|||||||
"d-none-light",
|
"d-none-light",
|
||||||
"d-sm-block",
|
"d-sm-block",
|
||||||
"d-sm-none",
|
"d-sm-none",
|
||||||
|
"data-table",
|
||||||
"display-1",
|
"display-1",
|
||||||
"display-4",
|
"display-4",
|
||||||
"dropdown",
|
"dropdown",
|
||||||
@@ -185,7 +197,6 @@
|
|||||||
"fa-arrow-right",
|
"fa-arrow-right",
|
||||||
"fa-bootstrap",
|
"fa-bootstrap",
|
||||||
"fa-circle-check",
|
"fa-circle-check",
|
||||||
"fa-circle-half-stroke",
|
|
||||||
"fa-code",
|
"fa-code",
|
||||||
"fa-docker",
|
"fa-docker",
|
||||||
"fa-ellipsis",
|
"fa-ellipsis",
|
||||||
@@ -219,6 +230,9 @@
|
|||||||
"flex-column",
|
"flex-column",
|
||||||
"flex-fill",
|
"flex-fill",
|
||||||
"flex-grow-1",
|
"flex-grow-1",
|
||||||
|
"flex-md-grow-0",
|
||||||
|
"flex-nowrap",
|
||||||
|
"flex-row",
|
||||||
"font-monospace",
|
"font-monospace",
|
||||||
"footer",
|
"footer",
|
||||||
"form-control",
|
"form-control",
|
||||||
@@ -253,6 +267,7 @@
|
|||||||
"justify-content-center",
|
"justify-content-center",
|
||||||
"justify-content-end",
|
"justify-content-end",
|
||||||
"justify-content-start",
|
"justify-content-start",
|
||||||
|
"label",
|
||||||
"lead",
|
"lead",
|
||||||
"leaflet-map",
|
"leaflet-map",
|
||||||
"link-bg-body",
|
"link-bg-body",
|
||||||
@@ -274,6 +289,7 @@
|
|||||||
"me-auto",
|
"me-auto",
|
||||||
"middle-bar",
|
"middle-bar",
|
||||||
"min-vh-100",
|
"min-vh-100",
|
||||||
|
"mode-switch",
|
||||||
"ms-1",
|
"ms-1",
|
||||||
"ms-3",
|
"ms-3",
|
||||||
"ms-auto",
|
"ms-auto",
|
||||||
@@ -301,11 +317,14 @@
|
|||||||
"navbar",
|
"navbar",
|
||||||
"navbar-brand",
|
"navbar-brand",
|
||||||
"navbar-collapse",
|
"navbar-collapse",
|
||||||
|
"navbar-container",
|
||||||
"navbar-contrast",
|
"navbar-contrast",
|
||||||
"navbar-expand-md",
|
"navbar-expand-md",
|
||||||
"navbar-fixed-top",
|
"navbar-fixed-top",
|
||||||
|
"navbar-mode-selector",
|
||||||
"navbar-nav",
|
"navbar-nav",
|
||||||
"navbar-nav-scroll",
|
"navbar-nav-scroll",
|
||||||
|
"navbar-title",
|
||||||
"navbar-toggler",
|
"navbar-toggler",
|
||||||
"next",
|
"next",
|
||||||
"no-js",
|
"no-js",
|
||||||
@@ -370,6 +389,7 @@
|
|||||||
"row-cols-md-3",
|
"row-cols-md-3",
|
||||||
"row-cols-sm-2",
|
"row-cols-sm-2",
|
||||||
"row-cols-sm-3",
|
"row-cols-sm-3",
|
||||||
|
"scrollbar-horizontal",
|
||||||
"search",
|
"search",
|
||||||
"search-input",
|
"search-input",
|
||||||
"search-suggestions",
|
"search-suggestions",
|
||||||
@@ -385,7 +405,6 @@
|
|||||||
"sticky-top",
|
"sticky-top",
|
||||||
"stretched-link",
|
"stretched-link",
|
||||||
"svg-inline--fa",
|
"svg-inline--fa",
|
||||||
"switch-mode-collapsed",
|
|
||||||
"syntax-highlight",
|
"syntax-highlight",
|
||||||
"tab-content",
|
"tab-content",
|
||||||
"tab-pane",
|
"tab-pane",
|
||||||
@@ -413,8 +432,6 @@
|
|||||||
"text-sm-start",
|
"text-sm-start",
|
||||||
"text-start",
|
"text-start",
|
||||||
"text-uppercase",
|
"text-uppercase",
|
||||||
"theme-icon",
|
|
||||||
"theme-icon-active",
|
|
||||||
"tickmark",
|
"tickmark",
|
||||||
"timeline",
|
"timeline",
|
||||||
"timeline-bg-dark",
|
"timeline-bg-dark",
|
||||||
@@ -453,8 +470,6 @@
|
|||||||
"w-50"
|
"w-50"
|
||||||
],
|
],
|
||||||
"ids": [
|
"ids": [
|
||||||
"-theme",
|
|
||||||
"-theme-collapsed",
|
|
||||||
"TableOfContents",
|
"TableOfContents",
|
||||||
"abbr",
|
"abbr",
|
||||||
"accordion",
|
"accordion",
|
||||||
@@ -486,9 +501,11 @@
|
|||||||
"carrousel",
|
"carrousel",
|
||||||
"carte",
|
"carte",
|
||||||
"chronologie",
|
"chronologie",
|
||||||
|
"cloudinary",
|
||||||
"collapse",
|
"collapse",
|
||||||
"collapse-1",
|
"collapse-1",
|
||||||
"command-prompt",
|
"command-prompt",
|
||||||
|
"data-tables",
|
||||||
"docs",
|
"docs",
|
||||||
"documentation",
|
"documentation",
|
||||||
"example",
|
"example",
|
||||||
@@ -504,6 +521,8 @@
|
|||||||
"groupe-de-cartes",
|
"groupe-de-cartes",
|
||||||
"icon",
|
"icon",
|
||||||
"image",
|
"image",
|
||||||
|
"imagekitio",
|
||||||
|
"imgix",
|
||||||
"indicateur-de-chargement",
|
"indicateur-de-chargement",
|
||||||
"infobulle",
|
"infobulle",
|
||||||
"invite-de-commandes",
|
"invite-de-commandes",
|
||||||
@@ -523,6 +542,8 @@
|
|||||||
"nav-0-btn-2",
|
"nav-0-btn-2",
|
||||||
"navbar",
|
"navbar",
|
||||||
"navbar-0-collapse",
|
"navbar-0-collapse",
|
||||||
|
"navbar-mode",
|
||||||
|
"navbar-mode-checkbox",
|
||||||
"navbar-sample-collapse",
|
"navbar-sample-collapse",
|
||||||
"navigation",
|
"navigation",
|
||||||
"notification",
|
"notification",
|
||||||
|
15
go.mod
15
go.mod
@@ -4,13 +4,14 @@ go 1.19
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
|
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
|
||||||
github.com/gethinode/mod-bootstrap v1.2.5 // indirect
|
github.com/gethinode/mod-bootstrap v1.3.0 // indirect
|
||||||
github.com/gethinode/mod-flexsearch v1.11.3 // indirect
|
github.com/gethinode/mod-flexsearch v1.12.0 // indirect
|
||||||
github.com/gethinode/mod-fontawesome v1.8.1 // indirect
|
github.com/gethinode/mod-fontawesome v1.9.0 // indirect
|
||||||
github.com/gethinode/mod-katex v1.0.7 // indirect
|
github.com/gethinode/mod-katex v1.1.0 // indirect
|
||||||
github.com/gethinode/mod-leaflet v1.0.0 // indirect
|
github.com/gethinode/mod-leaflet v1.1.0 // indirect
|
||||||
github.com/gethinode/mod-lottie v1.4.4 // indirect
|
github.com/gethinode/mod-lottie v1.5.5 // indirect
|
||||||
github.com/gethinode/mod-utils/v2 v2.1.1 // indirect
|
github.com/gethinode/mod-simple-datatables v1.0.2 // indirect
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.10 // indirect
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 // indirect
|
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 // indirect
|
||||||
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
||||||
)
|
)
|
||||||
|
66
go.sum
66
go.sum
@@ -16,6 +16,12 @@ github.com/gethinode/mod-bootstrap v1.2.4 h1:4CFNpwpRKiZlMVWg9u5+ijSb924j4yM3G1p
|
|||||||
github.com/gethinode/mod-bootstrap v1.2.4/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
|
github.com/gethinode/mod-bootstrap v1.2.4/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
|
||||||
github.com/gethinode/mod-bootstrap v1.2.5 h1:h6yAlkMZA34wJU3pLFpLxp1ynEBte/YTY4kGEQtMGPE=
|
github.com/gethinode/mod-bootstrap v1.2.5 h1:h6yAlkMZA34wJU3pLFpLxp1ynEBte/YTY4kGEQtMGPE=
|
||||||
github.com/gethinode/mod-bootstrap v1.2.5/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
|
github.com/gethinode/mod-bootstrap v1.2.5/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
|
||||||
|
github.com/gethinode/mod-bootstrap v1.2.6 h1:joKKVqWzPgitPbUFlU4oIRj72YXsEHkVun3TPf4ZZ2Q=
|
||||||
|
github.com/gethinode/mod-bootstrap v1.2.6/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
|
||||||
|
github.com/gethinode/mod-bootstrap v1.2.8 h1:kIKSO6qqE8xA0KQC5s6kkEv5UDc8oT17HalGIwB+dSc=
|
||||||
|
github.com/gethinode/mod-bootstrap v1.2.8/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
|
||||||
|
github.com/gethinode/mod-bootstrap v1.3.0 h1:UxNmXgXo7gA8C8z1ar47+tSccmKYpaYBBN+txB0pwBk=
|
||||||
|
github.com/gethinode/mod-bootstrap v1.3.0/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
|
||||||
github.com/gethinode/mod-flexsearch v1.0.1 h1:FJkRsUzSnQTXl3MWCigT4E6vfff870UWTnkGqaDGIhA=
|
github.com/gethinode/mod-flexsearch v1.0.1 h1:FJkRsUzSnQTXl3MWCigT4E6vfff870UWTnkGqaDGIhA=
|
||||||
github.com/gethinode/mod-flexsearch v1.0.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
|
github.com/gethinode/mod-flexsearch v1.0.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
|
||||||
github.com/gethinode/mod-flexsearch v1.1.0 h1:7BCMyQDlYlskNXuazt8Jg/jg9WREexu2xVkYqThkAX4=
|
github.com/gethinode/mod-flexsearch v1.1.0 h1:7BCMyQDlYlskNXuazt8Jg/jg9WREexu2xVkYqThkAX4=
|
||||||
@@ -60,6 +66,8 @@ github.com/gethinode/mod-flexsearch v1.11.1 h1:TtaE6Dv0lH4x73SHDaZpQJLjk52lRu/Vo
|
|||||||
github.com/gethinode/mod-flexsearch v1.11.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
|
github.com/gethinode/mod-flexsearch v1.11.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
|
||||||
github.com/gethinode/mod-flexsearch v1.11.3 h1:ykxpUg8M4vr1C4QzxJOPGt+1ZmPAD/gOCZoFcZxWoWw=
|
github.com/gethinode/mod-flexsearch v1.11.3 h1:ykxpUg8M4vr1C4QzxJOPGt+1ZmPAD/gOCZoFcZxWoWw=
|
||||||
github.com/gethinode/mod-flexsearch v1.11.3/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
|
github.com/gethinode/mod-flexsearch v1.11.3/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
|
||||||
|
github.com/gethinode/mod-flexsearch v1.12.0 h1:zg1IHvc8VO9WEtQuQnuG6HeWFNByvyqC9JYWDtpsP6s=
|
||||||
|
github.com/gethinode/mod-flexsearch v1.12.0/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
|
||||||
github.com/gethinode/mod-fontawesome v1.0.2 h1:ZSK6D20/w4y5GnfYfTBB58uHD0ChIfkpKfRGwioS9rg=
|
github.com/gethinode/mod-fontawesome v1.0.2 h1:ZSK6D20/w4y5GnfYfTBB58uHD0ChIfkpKfRGwioS9rg=
|
||||||
github.com/gethinode/mod-fontawesome v1.0.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
github.com/gethinode/mod-fontawesome v1.0.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
||||||
github.com/gethinode/mod-fontawesome v1.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=
|
github.com/gethinode/mod-fontawesome v1.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=
|
||||||
@@ -96,6 +104,10 @@ github.com/gethinode/mod-fontawesome v1.8.0 h1:YEuCmvCdzcemF1eFK35Wnp1asKKO3/xbx
|
|||||||
github.com/gethinode/mod-fontawesome v1.8.0/go.mod h1:uvuC2YL8mdXNp6NRzFOu4TWsHvtY9AZ8YxJkF23/M/8=
|
github.com/gethinode/mod-fontawesome v1.8.0/go.mod h1:uvuC2YL8mdXNp6NRzFOu4TWsHvtY9AZ8YxJkF23/M/8=
|
||||||
github.com/gethinode/mod-fontawesome v1.8.1 h1:iyvULrpaGizQoI5Vl9WjFYcMGWefdyG90NGK2UKax+k=
|
github.com/gethinode/mod-fontawesome v1.8.1 h1:iyvULrpaGizQoI5Vl9WjFYcMGWefdyG90NGK2UKax+k=
|
||||||
github.com/gethinode/mod-fontawesome v1.8.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
github.com/gethinode/mod-fontawesome v1.8.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
||||||
|
github.com/gethinode/mod-fontawesome v1.8.2 h1:LAzLytyh9c9gLzBWMju6Gtp3uEojhBQEYw0o38EUKZY=
|
||||||
|
github.com/gethinode/mod-fontawesome v1.8.2/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
||||||
|
github.com/gethinode/mod-fontawesome v1.9.0 h1:xqUB8AnezMHAt8lye4ksqvmHSVPCOkiHsHGUbqNoeP0=
|
||||||
|
github.com/gethinode/mod-fontawesome v1.9.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
||||||
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
|
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
|
||||||
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
||||||
@@ -110,6 +122,12 @@ github.com/gethinode/mod-katex v1.0.5 h1:AVhcTINYory0ygChQERf8PcyJkbT1oqhmLRF6ES
|
|||||||
github.com/gethinode/mod-katex v1.0.5/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
github.com/gethinode/mod-katex v1.0.5/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
github.com/gethinode/mod-katex v1.0.7 h1:FTEhvi3r+O5lPeOxB7OsanFZuAB14yC5fIk3DqhkNyY=
|
github.com/gethinode/mod-katex v1.0.7 h1:FTEhvi3r+O5lPeOxB7OsanFZuAB14yC5fIk3DqhkNyY=
|
||||||
github.com/gethinode/mod-katex v1.0.7/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
github.com/gethinode/mod-katex v1.0.7/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
|
github.com/gethinode/mod-katex v1.0.8 h1:tFGFz/JIEogCz4wvUsUncrOsOupPxsjP+TwU/3NxIjY=
|
||||||
|
github.com/gethinode/mod-katex v1.0.8/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
|
github.com/gethinode/mod-katex v1.0.9 h1:cCJoR28tZwkDvXps17o9Jwfe3aQQAZ3Rxk0jCNRQdbU=
|
||||||
|
github.com/gethinode/mod-katex v1.0.9/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
|
github.com/gethinode/mod-katex v1.1.0 h1:PxST3HPUt6F2X/xKakTVeTkwWqCtEr53K1vYEOyQu3I=
|
||||||
|
github.com/gethinode/mod-katex v1.1.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
github.com/gethinode/mod-leaflet v0.2.3 h1:QQI4h+IH0jZ7fx4q0um2YIEiYBoW3OAfW8qHzbRCDPk=
|
github.com/gethinode/mod-leaflet v0.2.3 h1:QQI4h+IH0jZ7fx4q0um2YIEiYBoW3OAfW8qHzbRCDPk=
|
||||||
github.com/gethinode/mod-leaflet v0.2.3/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
|
github.com/gethinode/mod-leaflet v0.2.3/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
|
||||||
github.com/gethinode/mod-leaflet v0.3.1 h1:H5MaOa+BB1KuVw7abTqfIn/SNzzRsAyx/WQoSe+2Ykc=
|
github.com/gethinode/mod-leaflet v0.3.1 h1:H5MaOa+BB1KuVw7abTqfIn/SNzzRsAyx/WQoSe+2Ykc=
|
||||||
@@ -124,6 +142,10 @@ github.com/gethinode/mod-leaflet v0.4.0 h1:Xc6c1UTf4m1saQLFfFWT5sEpwj25xVGuS8csG
|
|||||||
github.com/gethinode/mod-leaflet v0.4.0/go.mod h1:yr+bUKAstifdB16mbYh69OayAmgPOlNUubAmVn5eL2M=
|
github.com/gethinode/mod-leaflet v0.4.0/go.mod h1:yr+bUKAstifdB16mbYh69OayAmgPOlNUubAmVn5eL2M=
|
||||||
github.com/gethinode/mod-leaflet v1.0.0 h1:HdnWafOGkkK1hYGfqLYF3pp9dAFS/caxlzML9sO1rCc=
|
github.com/gethinode/mod-leaflet v1.0.0 h1:HdnWafOGkkK1hYGfqLYF3pp9dAFS/caxlzML9sO1rCc=
|
||||||
github.com/gethinode/mod-leaflet v1.0.0/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
|
github.com/gethinode/mod-leaflet v1.0.0/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
|
||||||
|
github.com/gethinode/mod-leaflet v1.0.1 h1:L4Coe6HTD9O0Txs1S8AtVg+6/TEneSF9i6fJK8jdWUw=
|
||||||
|
github.com/gethinode/mod-leaflet v1.0.1/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
|
||||||
|
github.com/gethinode/mod-leaflet v1.1.0 h1:FXzPCic5XmUluxQ6e7LYUhhLnxuQOBwry8qjG9k30UY=
|
||||||
|
github.com/gethinode/mod-leaflet v1.1.0/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
|
||||||
github.com/gethinode/mod-lottie v1.0.0 h1:1CUZMcgN5FAyjjyuP3qkaOQ6M5sv6HUAbosW4sIT5VE=
|
github.com/gethinode/mod-lottie v1.0.0 h1:1CUZMcgN5FAyjjyuP3qkaOQ6M5sv6HUAbosW4sIT5VE=
|
||||||
github.com/gethinode/mod-lottie v1.0.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
|
github.com/gethinode/mod-lottie v1.0.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
|
||||||
github.com/gethinode/mod-lottie v1.0.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
|
github.com/gethinode/mod-lottie v1.0.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
|
||||||
@@ -146,6 +168,26 @@ github.com/gethinode/mod-lottie v1.4.3 h1:IKZO8a4yQyPKUwZ6POsZRIH/B++yEzXDe5HxrF
|
|||||||
github.com/gethinode/mod-lottie v1.4.3/go.mod h1:nt4wLnDFIhjBGRMuQJJ2bH80VREpbcsBUsdO6uWXjLs=
|
github.com/gethinode/mod-lottie v1.4.3/go.mod h1:nt4wLnDFIhjBGRMuQJJ2bH80VREpbcsBUsdO6uWXjLs=
|
||||||
github.com/gethinode/mod-lottie v1.4.4 h1:Lv7J+lAMx++aK9h0L7vAgsjyOZgrjux4xPz4Tpza8n4=
|
github.com/gethinode/mod-lottie v1.4.4 h1:Lv7J+lAMx++aK9h0L7vAgsjyOZgrjux4xPz4Tpza8n4=
|
||||||
github.com/gethinode/mod-lottie v1.4.4/go.mod h1:7tsZjlFgMlj2iWBIS9uOtHHsCrfx9W7S8OsBrZeSVGU=
|
github.com/gethinode/mod-lottie v1.4.4/go.mod h1:7tsZjlFgMlj2iWBIS9uOtHHsCrfx9W7S8OsBrZeSVGU=
|
||||||
|
github.com/gethinode/mod-lottie v1.4.6 h1:L6zvfbq+FQUWTG3X/wWFCvb91WOxJuIkJUlZOd+QJ1Q=
|
||||||
|
github.com/gethinode/mod-lottie v1.4.6/go.mod h1:1/+7U/Q5IuaqkzTrvXK1CnPE7ANnTRsG5k+KaXQUQwE=
|
||||||
|
github.com/gethinode/mod-lottie v1.4.7 h1:5Hes0xY/l8ygzJ8YQIzdqCmvGrDQs8D8qZ/vR1fQh/Q=
|
||||||
|
github.com/gethinode/mod-lottie v1.4.7/go.mod h1:FvcG3NjXOBOnwou0QvXYNPHpybxwT6yxmSh4N+nBD9s=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.0 h1:LwEEY+p+sPrN01yz7GyVOsF5lZ4qMln69+gAxJs1DDA=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.0/go.mod h1:FvcG3NjXOBOnwou0QvXYNPHpybxwT6yxmSh4N+nBD9s=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.1 h1:84ZmOTKJH75wsd/YjPaaBRkTeLnmRROv9iFlQVMC+jA=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.1/go.mod h1:z0Q6EADM7pN7gmhCzDx2VR4uG5mxn9qbsphtxjIkssY=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.2 h1:UvrNAQeD/97Q5fbv3uKIY48fY3IWJeLy/v206Gb0F6Y=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.2/go.mod h1:HM1pA85EiPO7RtNysw/a2ZzRqktO2WvB/KyWLOuynzg=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.3 h1:fvCjCoZoCEhY2aou30oEsEo6N4tVSI0ijFyXS3wNib0=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.3/go.mod h1:XHVMuPsuJIm9/Eb2ql4jsT49/BQqMlBiirQoty4uHAo=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.4 h1:+xbamSsjcnP2tyzGl0CA1enma7gkAp67wenmuP0XELY=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.4/go.mod h1:gALqz48aYpoDLxJOI3LzIpdy0Eq/lOBNtlcOxABa9tg=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.5 h1:uEJKsz+ovsZtbGkMhPONcIhtG6M3RjYiK+iVoScLOVo=
|
||||||
|
github.com/gethinode/mod-lottie v1.5.5/go.mod h1:VTvBxD8VokICwnEqM0VUZFZHBYxLf4/grDFQyEh1DL0=
|
||||||
|
github.com/gethinode/mod-simple-datatables v1.0.0 h1:Dj4WGw12OkaimwkCpLn5Jhmd49dvNJW9O2P/W9F+HlQ=
|
||||||
|
github.com/gethinode/mod-simple-datatables v1.0.0/go.mod h1:K8T7fIdb8pMOB+OSW4A5lz5IW99+HyzcTgx764fvOGw=
|
||||||
|
github.com/gethinode/mod-simple-datatables v1.0.2 h1:zhqxHet3iLQWYCBbGROALpOY9zQlptMycFkz1Tto5bA=
|
||||||
|
github.com/gethinode/mod-simple-datatables v1.0.2/go.mod h1:mmrcvAJU2i3SMU56VmQ5PW43uDXBcsJKcZwCHrvl3Kc=
|
||||||
github.com/gethinode/mod-utils v1.0.0 h1:cqHm2xS5uDiJzRm1KfHaNbq6uMVDKLhQa8/BuTZ1nhY=
|
github.com/gethinode/mod-utils v1.0.0 h1:cqHm2xS5uDiJzRm1KfHaNbq6uMVDKLhQa8/BuTZ1nhY=
|
||||||
github.com/gethinode/mod-utils v1.0.0/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
|
github.com/gethinode/mod-utils v1.0.0/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
|
||||||
github.com/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
|
github.com/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
|
||||||
@@ -168,6 +210,30 @@ github.com/gethinode/mod-utils/v2 v2.1.0 h1:5I0IN/AX5qPFYx7tjWXk59GBevTJzixxZUGj
|
|||||||
github.com/gethinode/mod-utils/v2 v2.1.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
github.com/gethinode/mod-utils/v2 v2.1.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
github.com/gethinode/mod-utils/v2 v2.1.1 h1:aLBcS9Zbx+dqnu5oBsTM01AkkN5nwwifgbV4D0qiHnM=
|
github.com/gethinode/mod-utils/v2 v2.1.1 h1:aLBcS9Zbx+dqnu5oBsTM01AkkN5nwwifgbV4D0qiHnM=
|
||||||
github.com/gethinode/mod-utils/v2 v2.1.1/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
github.com/gethinode/mod-utils/v2 v2.1.1/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.2.2 h1:ZRxWIJKmZIDYsoMS3WhxxC+BWJrkd1dcZ8rz/cLZExc=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.2.2/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.0 h1:e3uhlAGasvXe+cgvcmzRe05Zo4UEx86uk0TbnxtyB6U=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.1 h1:blqynoRJ+H2SPfSU28iYheYWPH39MKNtK5HKJPghL3M=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.1/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.2 h1:QxYtHqeiLfAg+38ULFr3qYwNuypcnV1KzsmmNUjbX+U=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.2/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.3 h1:dewgQgAyPJJ1lA2WhowHaFqVaeLjUNYgxDO4mE3v0F0=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.3/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.4 h1:4OmUsLW7FyQL7vJhg/Iy9E7nFXWL955qCtsj6yWU51M=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.4/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.5 h1:r8V330xQkHTjzAFNCde1Kpz6fgidzmMRW82eIonUnOo=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.5/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.6 h1:Ta+WKc83sK9ZROKmUwS4pA32Qm0bQqoMmWHEOzDvZ5Y=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.6/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.7 h1:FFsUPO7NBp9Bhjovf0Ki5hnDGfeMKV/3RNz1Qpv7+oQ=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.7/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.8 h1:zAiDRCb3SsP9z6PUkCaiRLHOpqFhVf0xVhVOoTZNmAI=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.8/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.9 h1:Z9uAr6S0wunlkfKHa2D/U83fBV6Ivtf+7sjBAcrddrg=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.9/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.10 h1:+coUXdgAbLEE8Tvb3Rfk/1Nr6oDVreXI2sil0pa/n2Q=
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.10/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
|
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
"html",
|
"html",
|
||||||
"img",
|
"img",
|
||||||
"input",
|
"input",
|
||||||
|
"label",
|
||||||
"li",
|
"li",
|
||||||
"link",
|
"link",
|
||||||
"meta",
|
"meta",
|
||||||
@@ -31,6 +32,7 @@
|
|||||||
"align-items-center",
|
"align-items-center",
|
||||||
"align-self-center",
|
"align-self-center",
|
||||||
"align-self-end",
|
"align-self-end",
|
||||||
|
"ball",
|
||||||
"bg-body",
|
"bg-body",
|
||||||
"bg-opacity-10",
|
"bg-opacity-10",
|
||||||
"bg-primary",
|
"bg-primary",
|
||||||
@@ -41,6 +43,7 @@
|
|||||||
"btn",
|
"btn",
|
||||||
"btn-close",
|
"btn-close",
|
||||||
"btn-primary",
|
"btn-primary",
|
||||||
|
"checkbox",
|
||||||
"col",
|
"col",
|
||||||
"col-12",
|
"col-12",
|
||||||
"col-6",
|
"col-6",
|
||||||
@@ -57,22 +60,15 @@
|
|||||||
"d-flex",
|
"d-flex",
|
||||||
"d-inline",
|
"d-inline",
|
||||||
"d-md-block",
|
"d-md-block",
|
||||||
"d-md-none",
|
|
||||||
"d-none",
|
"d-none",
|
||||||
"display-1",
|
"display-1",
|
||||||
"display-4",
|
"display-4",
|
||||||
"dropdown",
|
|
||||||
"dropdown-item",
|
|
||||||
"dropdown-menu",
|
|
||||||
"dropdown-menu-end",
|
|
||||||
"dropdown-toggle",
|
|
||||||
"emphasis",
|
"emphasis",
|
||||||
"end-0",
|
"end-0",
|
||||||
"fa",
|
"fa",
|
||||||
"fa-10x",
|
"fa-10x",
|
||||||
"fa-2x",
|
"fa-2x",
|
||||||
"fa-book-open",
|
"fa-book-open",
|
||||||
"fa-circle-half-stroke",
|
|
||||||
"fa-ellipsis",
|
"fa-ellipsis",
|
||||||
"fa-face-frown",
|
"fa-face-frown",
|
||||||
"fa-fw",
|
"fa-fw",
|
||||||
@@ -86,11 +82,11 @@
|
|||||||
"fixed-top",
|
"fixed-top",
|
||||||
"flex-column",
|
"flex-column",
|
||||||
"flex-fill",
|
"flex-fill",
|
||||||
"flex-grow-1",
|
|
||||||
"footer",
|
"footer",
|
||||||
"form-control",
|
"form-control",
|
||||||
"fs-3",
|
"fs-3",
|
||||||
"fs-5",
|
"fs-5",
|
||||||
|
"fw-30",
|
||||||
"fw-bold",
|
"fw-bold",
|
||||||
"hstack",
|
"hstack",
|
||||||
"img-fluid",
|
"img-fluid",
|
||||||
@@ -100,6 +96,7 @@
|
|||||||
"justify-content-center",
|
"justify-content-center",
|
||||||
"justify-content-end",
|
"justify-content-end",
|
||||||
"justify-content-start",
|
"justify-content-start",
|
||||||
|
"label",
|
||||||
"link-bg-footer",
|
"link-bg-footer",
|
||||||
"link-secondary",
|
"link-secondary",
|
||||||
"main-content",
|
"main-content",
|
||||||
@@ -107,6 +104,7 @@
|
|||||||
"me-auto",
|
"me-auto",
|
||||||
"middle-bar",
|
"middle-bar",
|
||||||
"min-vh-100",
|
"min-vh-100",
|
||||||
|
"mode-switch",
|
||||||
"ms-auto",
|
"ms-auto",
|
||||||
"ms-md-3",
|
"ms-md-3",
|
||||||
"mt-3",
|
"mt-3",
|
||||||
@@ -120,8 +118,10 @@
|
|||||||
"navbar",
|
"navbar",
|
||||||
"navbar-brand",
|
"navbar-brand",
|
||||||
"navbar-collapse",
|
"navbar-collapse",
|
||||||
|
"navbar-container",
|
||||||
"navbar-expand-md",
|
"navbar-expand-md",
|
||||||
"navbar-fixed-top",
|
"navbar-fixed-top",
|
||||||
|
"navbar-mode-selector",
|
||||||
"navbar-nav",
|
"navbar-nav",
|
||||||
"navbar-toggler",
|
"navbar-toggler",
|
||||||
"no-js",
|
"no-js",
|
||||||
@@ -155,15 +155,12 @@
|
|||||||
"search-suggestions",
|
"search-suggestions",
|
||||||
"shadow",
|
"shadow",
|
||||||
"svg-inline--fa",
|
"svg-inline--fa",
|
||||||
"switch-mode-collapsed",
|
|
||||||
"text-center",
|
"text-center",
|
||||||
"text-decoration-none",
|
"text-decoration-none",
|
||||||
"text-muted",
|
"text-muted",
|
||||||
"text-secondary",
|
"text-secondary",
|
||||||
"text-sm-start",
|
"text-sm-start",
|
||||||
"text-start",
|
"text-start",
|
||||||
"theme-icon",
|
|
||||||
"theme-icon-active",
|
|
||||||
"toast",
|
"toast",
|
||||||
"toast-body",
|
"toast-body",
|
||||||
"toast-container",
|
"toast-container",
|
||||||
@@ -172,9 +169,9 @@
|
|||||||
"top-bar"
|
"top-bar"
|
||||||
],
|
],
|
||||||
"ids": [
|
"ids": [
|
||||||
"-theme",
|
|
||||||
"-theme-collapsed",
|
|
||||||
"navbar-0-collapse",
|
"navbar-0-collapse",
|
||||||
|
"navbar-mode",
|
||||||
|
"navbar-mode-checkbox",
|
||||||
"toast-container",
|
"toast-container",
|
||||||
"toast-copied-code-message"
|
"toast-copied-code-message"
|
||||||
]
|
]
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
- id: shareLink
|
- id: shareLink
|
||||||
translation: "Diese Seite teilen per {{ . }}"
|
translation: "Diese Seite teilen per {{ . }}"
|
||||||
- id: shareSystem
|
- id: shareSystem
|
||||||
translation: "Betriebssystem"
|
translation: "System"
|
||||||
- id: copyToClipboard
|
- id: copyToClipboard
|
||||||
translation: "In die Zwischenablage kopieren"
|
translation: "In die Zwischenablage kopieren"
|
||||||
- id: copiedToClipboard
|
- id: copiedToClipboard
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
# Navigation
|
# Navigation
|
||||||
- id: colorMode
|
- id: colorMode
|
||||||
translation: "Thema umschalten"
|
translation: "Modus umschalten"
|
||||||
- id: colorLight
|
- id: colorLight
|
||||||
translation: "Light"
|
translation: "Light"
|
||||||
- id: colorDark
|
- id: colorDark
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
# Sidebar
|
# Sidebar
|
||||||
- id: toggleSidebar
|
- id: toggleSidebar
|
||||||
translation: "Menünavigation anzuzeigen oder auszublenden"
|
translation: "Menünavigation anzeigen oder ausblenden"
|
||||||
|
|
||||||
# Feature
|
# Feature
|
||||||
- id: addedFeature
|
- id: addedFeature
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
{{ $base := partial "utilities/GetStaticURL" (dict "url" "/") }}
|
||||||
<div class="d-flex flex-fill">
|
<div class="d-flex flex-fill">
|
||||||
<div class="container-xxl my-auto">
|
<div class="container-xxl my-auto">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@@ -7,7 +8,7 @@
|
|||||||
<p class="display-1 mt-3 fw-bold">404</p>
|
<p class="display-1 mt-3 fw-bold">404</p>
|
||||||
<p class="fs-3">{{ T "pageNotFoundTitle" }}</p>
|
<p class="fs-3">{{ T "pageNotFoundTitle" }}</p>
|
||||||
</span>
|
</span>
|
||||||
{{- $home := printf "<a href=\"%s\">%s</a>" ("/" | relLangURL) (T "pageNotFoundHome") -}}
|
{{- $home := printf "<a href=\"%s\">%s</a>" $base (T "pageNotFoundHome") -}}
|
||||||
<p>{{ T "pageNotFound" $home | safeHTML }}</p>
|
<p>{{ T "pageNotFound" $home | safeHTML }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -13,10 +13,9 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Validate module configuration */ -}}
|
{{- /* Initialize module configuration */ -}}
|
||||||
{{- if and .IsPage (not (in .Site.Params.modules.core "bootstrap")) -}}
|
{{- $modules := partial "utilities/InitModules.html" (dict "page" .) -}}
|
||||||
{{- errorf "Bootstrap is a required module, please add it to 'modules.core' in your site parameters" -}}
|
{{- $.Scratch.Set "modules" $modules -}}
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $fullCover := or (or (and .IsHome .Site.Params.home.fullCover) .Page.Params.fullCover) .Site.Params.main.footerBelowFold }}
|
{{- $fullCover := or (or (and .IsHome .Site.Params.home.fullCover) .Page.Params.fullCover) .Site.Params.main.footerBelowFold }}
|
||||||
{{- $.Scratch.Set "fullCover" $fullCover -}}
|
{{- $.Scratch.Set "fullCover" $fullCover -}}
|
||||||
@@ -30,6 +29,10 @@
|
|||||||
{{- /* Define main breakpoint */ -}}
|
{{- /* Define main breakpoint */ -}}
|
||||||
{{- $.Scratch.Set "breakpoint" (partial "utilities/GetBreakpoint.html") }}
|
{{- $.Scratch.Set "breakpoint" (partial "utilities/GetBreakpoint.html") }}
|
||||||
|
|
||||||
|
{{- /* Define base URL */ -}}
|
||||||
|
{{ $lang := site.LanguageCode | default site.Language.Lang }}
|
||||||
|
{{ $.Scratch.Set "baseURL" (strings.TrimSuffix (printf "%s/" $lang) site.Home.RelPermalink) }}
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="{{ .Site.Language.Lang }}" class="no-js">
|
<html lang="{{ .Site.Language.Lang }}" class="no-js">
|
||||||
<head>
|
<head>
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
<div class="d-none-dark">
|
<div class="d-none-dark">
|
||||||
<div class="hstack gap-1">
|
<div class="hstack gap-1">
|
||||||
{{ range (.GetTerms "tags") -}}
|
{{ range (.GetTerms "tags") -}}
|
||||||
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
|
{{- $url := .Page.RelPermalink -}}
|
||||||
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "light" "size" "sm") }}
|
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "light" "size" "sm") }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<div class="d-none-light">
|
<div class="d-none-light">
|
||||||
<div class="hstack gap-1">
|
<div class="hstack gap-1">
|
||||||
{{ range (.GetTerms "tags") -}}
|
{{ range (.GetTerms "tags") -}}
|
||||||
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
|
{{- $url := .Page.RelPermalink -}}
|
||||||
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "primary" "size" "sm" "outline" "true") }}
|
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "primary" "size" "sm" "outline" "true") }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,11 +1,12 @@
|
|||||||
|
{{ $lang := site.LanguageCode | default site.Language.Lang }}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html{{ with site.LanguageCode | default site.Language.Lang }} lang="{{ . }}"{{ end }}>
|
<html {{ with $lang }}lang="{{ . }}"{{ end }}>
|
||||||
<head>
|
<head>
|
||||||
<title>{{ .Permalink }}</title>
|
<title>{{ .Permalink }}</title>
|
||||||
<link rel="canonical" href="{{ .Permalink }}">
|
<link rel="canonical" href="{{ .Permalink }}">
|
||||||
<meta name="robots" content="noindex">
|
<meta name="robots" content="noindex">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<noscript><meta http-equiv="refresh" content="0; url={{ .Permalink }}"></noscript>
|
<noscript><meta http-equiv="refresh" content="0; url={{ .Permalink }}"></noscript>
|
||||||
<script src="/js/alias.js"></script>
|
<script src='{{ partial "utilities/GetStaticURL" (dict "url" "js/alias.js") }}'></script>
|
||||||
</head>
|
</head>
|
||||||
</html>
|
</html>
|
43
layouts/partials/assets/adapters/cloudinary.html
Normal file
43
layouts/partials/assets/adapters/cloudinary.html
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
||||||
|
{{ errorf "partial [assets/adapter/cloudinary.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{ $host := .host }}
|
||||||
|
{{ $dir := .dir }}
|
||||||
|
{{ $file := .file }}
|
||||||
|
{{ $format := .format }}
|
||||||
|
{{ $transform := .transform }}
|
||||||
|
{{ $height := .height }}
|
||||||
|
{{ $width := .width }}
|
||||||
|
{{ if eq $transform "fill" }}{{ $transform = "c_fill" }}{{ else }}{{ $transform = "c_fit" }}{{ end }}
|
||||||
|
{{ $element := "" }}
|
||||||
|
|
||||||
|
<!-- Split path between upload dir and sub dir -->
|
||||||
|
{{ $newdir := urls.JoinPath (index (split $dir "upload") 0) "upload" }}
|
||||||
|
{{ $file = urls.JoinPath (index (split $dir "upload") 1) $file }}
|
||||||
|
{{ $dir = $newdir }}
|
||||||
|
|
||||||
|
<!-- Generate image URL -->
|
||||||
|
{{ if not $error }}
|
||||||
|
{{ $operation := "" }}
|
||||||
|
{{ if $format }}
|
||||||
|
{{ $operation = printf "%s,h_%d,w_%d" $transform $height $width }}
|
||||||
|
{{ $file = printf "%s.%s" (strings.TrimSuffix (path.Ext $file) $file) $format }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $operation = printf "f_auto,%s,h_%d,w_%d" $transform $height $width }}
|
||||||
|
{{ end }}
|
||||||
|
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return $element }}
|
63
layouts/partials/assets/adapters/hugo.html
Normal file
63
layouts/partials/assets/adapters/hugo.html
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
||||||
|
{{ errorf "partial [assets/adapter/hugo.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{ $host := .host }}
|
||||||
|
{{ $dir := .dir }}
|
||||||
|
{{ $file := .file }}
|
||||||
|
{{ $img := .img }}
|
||||||
|
{{ $transform := .transform }}
|
||||||
|
{{ $height := .height }}
|
||||||
|
{{ $width := .width }}
|
||||||
|
{{ $element := "" }}
|
||||||
|
{{ $absoluteURL := .absoluteURL }}
|
||||||
|
{{ $url := urls.JoinPath $dir $file }}
|
||||||
|
{{ if $host }}
|
||||||
|
{{ $url = urls.JoinPath "https://" $host $url }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize image if needed, do not raise additional warnings -->
|
||||||
|
{{ $format := .format | default "webp" }}
|
||||||
|
{{ if and (not $img) (ne $format "svg") }}
|
||||||
|
{{- $res := partial "utilities/GetImage.html" (dict "url" $url "page" page) -}}
|
||||||
|
{{ if $res }}
|
||||||
|
{{ $img = $res.resource }}
|
||||||
|
<!-- TODO: $res.mirror -->
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if not $img }}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Process image and generate image URL -->
|
||||||
|
{{ if not $error }}
|
||||||
|
{{ $scaled := "" }}
|
||||||
|
{{ if eq $transform "fill" }}
|
||||||
|
{{- $scaled = $img.Fill (printf "%dx%d %s" $width $height $format) -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- $scaled = $img.Fit (printf "%dx%d %s" $width $height $format) -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- $clean := path.Ext $img.RelPermalink -}}
|
||||||
|
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink $clean (printf "-%dx%d.%s" $width $height $format)) -}}
|
||||||
|
{{- if $absoluteURL -}}
|
||||||
|
{{- $element = $scaled.Permalink -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $element = $scaled.RelPermalink -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return $element }}
|
30
layouts/partials/assets/adapters/imagekit-rewrite.html
Normal file
30
layouts/partials/assets/adapters/imagekit-rewrite.html
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter-rewrite" "args" . "group" "partial") }}
|
||||||
|
{{ errorf "partial [assets/adapter/imagekit-rewrite.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{ $account := .account }}
|
||||||
|
{{ $container := trim .container "/" }}
|
||||||
|
{{ $host := .host }}
|
||||||
|
{{ $dir := .dir }}
|
||||||
|
{{ $file := .file }}
|
||||||
|
{{ $element := "" }}
|
||||||
|
{{ with $container }}{{ $dir = strings.TrimPrefix (printf "/%s" .) $dir }}{{ end }}
|
||||||
|
|
||||||
|
{{ if ne $host "ik.imagekit.io" }}
|
||||||
|
{{ $element = urls.JoinPath (slice "https://ik.imagekit.io" $account $dir $file) }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $element = urls.JoinPath (slice "https://" $host $dir $file) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return $element }}
|
48
layouts/partials/assets/adapters/imagekit.html
Normal file
48
layouts/partials/assets/adapters/imagekit.html
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
||||||
|
{{ errorf "partial [assets/adapter/imagekit.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{ $host := .host }}
|
||||||
|
{{ $dir := .dir }}
|
||||||
|
{{ $file := .file }}
|
||||||
|
{{ $format := .format }}
|
||||||
|
{{ $transform := .transform }}
|
||||||
|
{{ $height := .height }}
|
||||||
|
{{ $width := .width }}
|
||||||
|
{{ if eq $transform "fill" }}{{ $transform = "c-maintain_ratio" }}{{ else }}{{ $transform = "c-at_max" }}{{ end }}
|
||||||
|
{{ $element := "" }}
|
||||||
|
|
||||||
|
<!-- Validate image format is supported -->
|
||||||
|
{{ if and $format (not (in (slice "jpg" "jpeg" "webp" "avif" "png") $format)) }}
|
||||||
|
{{ warnf "Image format not supported by ImageKit.io: %s.%s" (path.BaseName $file) $format }}
|
||||||
|
{{ $format = "jpg" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Split path between end point and image path -->
|
||||||
|
{{ $newdir := printf "/%s" (index (split $dir "/") 1) }}
|
||||||
|
{{ $file = urls.JoinPath (strings.TrimPrefix $newdir $dir) $file }}
|
||||||
|
{{ $dir = $newdir }}
|
||||||
|
|
||||||
|
<!-- Generate image URL -->
|
||||||
|
{{ if not $error }}
|
||||||
|
{{ $operation := "" }}
|
||||||
|
{{ if $format }}
|
||||||
|
{{ $operation = printf "tr:f-%s,%s,h-%d,w-%d" $format $transform $height $width }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $operation = printf "tr:f-auto,%s,h-%d,w-%d" $transform $height $width }}
|
||||||
|
{{ end }}
|
||||||
|
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return $element }}
|
43
layouts/partials/assets/adapters/imgix.html
Normal file
43
layouts/partials/assets/adapters/imgix.html
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
||||||
|
{{ errorf "partial [assets/adapter/imgix.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{ $host := .host }}
|
||||||
|
{{ $dir := .dir }}
|
||||||
|
{{ $file := .file }}
|
||||||
|
{{ $format := .format }}
|
||||||
|
{{ $transform := .transform }}
|
||||||
|
{{ $height := .height }}
|
||||||
|
{{ $width := .width }}
|
||||||
|
{{ if eq $transform "fill" }}{{ $transform = "crop" }}{{ else }}{{ $transform = "max" }}{{ end }}
|
||||||
|
{{ $element := "" }}
|
||||||
|
|
||||||
|
<!-- Validate image format is supported -->
|
||||||
|
{{ if and $format (not (in (slice "avif" "gif" "jp2" "jpg" "json" "jxr" "pjpg" "mp4" "png" "png8" "png32" "webm" "webp" "blurhash") $format)) }}
|
||||||
|
{{ warnf "Image format not supported by imgix: %s.%s" (path.BaseName $file) $format }}
|
||||||
|
{{ $format = "jpg" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Generate image URL -->
|
||||||
|
{{ if not $error }}
|
||||||
|
{{ $operation := "" }}
|
||||||
|
{{ if $format }}
|
||||||
|
{{ $operation = printf "fm=%s&fit=%s&h=%d&w=%d" $format $transform $height $width }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $operation = printf "f_auto&fit=%s&h=%d&w=%d" $transform $height $width }}
|
||||||
|
{{ end }}
|
||||||
|
{{- $element = printf "%s?%s" (urls.JoinPath (slice "https://" $host $dir $file)) $operation -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return $element }}
|
@@ -22,7 +22,7 @@
|
|||||||
{{- range $index, $item := $page.Ancestors.Reverse -}}
|
{{- range $index, $item := $page.Ancestors.Reverse -}}
|
||||||
{{- $title := .LinkTitle -}}
|
{{- $title := .LinkTitle -}}
|
||||||
{{- if .IsHome }}{{ $title = T "home" }}{{ end -}}
|
{{- if .IsHome }}{{ $title = T "home" }}{{ end -}}
|
||||||
{{- $address := or .RelPermalink (.Params.Redirect | relLangURL) -}}
|
{{- $address := or .RelPermalink .Params.Redirect -}}
|
||||||
{{ if $address }}
|
{{ if $address }}
|
||||||
<li class="breadcrumb-item"><a href="{{ $address }}">{{ $title }}</a></li>
|
<li class="breadcrumb-item"><a href="{{ $address }}">{{ $title }}</a></li>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@@ -53,7 +53,10 @@
|
|||||||
{{- $clipboard := .clipboard -}}
|
{{- $clipboard := .clipboard -}}
|
||||||
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||||
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||||
{{- $isExternal := ne (urls.Parse (absURL $href)).Host (urls.Parse site.BaseURL).Host -}}
|
{{- $isExternal := false }}
|
||||||
|
{{ if in (slice "http" "https") ((urls.Parse (absURL $href)).Scheme) }}
|
||||||
|
{{ $isExternal = ne (urls.Parse (absURL $href)).Host (urls.Parse site.BaseURL).Host -}}
|
||||||
|
{{ end }}
|
||||||
{{- $target := "" -}}
|
{{- $target := "" -}}
|
||||||
{{- $rel := "" -}}
|
{{- $rel := "" -}}
|
||||||
{{- $spacing := .spacing | default true -}}
|
{{- $spacing := .spacing | default true -}}
|
||||||
@@ -81,8 +84,8 @@
|
|||||||
{{- with $toast }} data-toast-target="{{ $toast }}"{{ end -}}
|
{{- with $toast }} data-toast-target="{{ $toast }}"{{ end -}}
|
||||||
{{- with $clipboard }} data-clipboard="{{ $clipboard }}"{{ end -}}
|
{{- with $clipboard }} data-clipboard="{{ $clipboard }}"{{ end -}}
|
||||||
{{- if eq $type "button" }} class="btn btn-{{ if $outline }}outline-{{ end }}{{ $color }} {{ if ne $size "md"}}btn-{{ $size }}{{ end }} position-relative {{ if in (slice "disabled" "active") $state }}{{ $state }}{{ end }} {{ $class -}}"
|
{{- if eq $type "button" }} class="btn btn-{{ if $outline }}outline-{{ end }}{{ $color }} {{ if ne $size "md"}}btn-{{ $size }}{{ end }} position-relative {{ if in (slice "disabled" "active") $state }}{{ $state }}{{ end }} {{ $class -}}"
|
||||||
role="button" {{ if eq $state "disabled" }}aria-disabled="true"{{ end -}}
|
{{ if eq $state "disabled" }}aria-disabled="true"{{ end -}}
|
||||||
{{- else }} class="link-{{ $color }} position-relative {{ $class }}"{{ end -}}
|
{{- else }} class="btn btn-link link-{{ $color }} position-relative {{ $class }}"{{ end -}}
|
||||||
{{- with $tooltip }} data-bs-toggle="tooltip" data-bs-title="{{ . }}" data-bs-placement="{{ $placement }}"{{ end -}}
|
{{- with $tooltip }} data-bs-toggle="tooltip" data-bs-title="{{ . }}" data-bs-placement="{{ $placement }}"{{ end -}}
|
||||||
{{- with $collapse }} data-bs-toggle="collapse" aria-expanded="false" aria-controls="{{ . }}"{{ end -}}
|
{{- with $collapse }} data-bs-toggle="collapse" aria-expanded="false" aria-controls="{{ . }}"{{ end -}}
|
||||||
{{- if eq $state "active" }} data-bs-toggle="button" aria-pressed="true"{{ end -}}
|
{{- if eq $state "active" }} data-bs-toggle="button" aria-pressed="true"{{ end -}}
|
||||||
@@ -90,6 +93,7 @@
|
|||||||
{{- range $key, $val := $attributes -}}
|
{{- range $key, $val := $attributes -}}
|
||||||
{{ printf " %s=\"%s\"" $key $val | safeHTMLAttr }}
|
{{ printf " %s=\"%s\"" $key $val | safeHTMLAttr }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
role="button"
|
||||||
>
|
>
|
||||||
<div class="d-flex justify-content-{{ $justify }}">
|
<div class="d-flex justify-content-{{ $justify }}">
|
||||||
<div class="my-auto">{{ $title | safeHTML }}</div>
|
<div class="my-auto">{{ $title | safeHTML }}</div>
|
||||||
|
@@ -33,13 +33,20 @@
|
|||||||
{{- $loading := .loading -}}
|
{{- $loading := .loading -}}
|
||||||
{{- $button := .button -}}
|
{{- $button := .button -}}
|
||||||
{{- $buttonLabel := .buttonLabel -}}
|
{{- $buttonLabel := .buttonLabel -}}
|
||||||
|
{{- $buttonType := .buttonType -}}
|
||||||
|
{{- $iconRounded := .iconRounded }}
|
||||||
|
{{- $scroll := .scroll | default false }}
|
||||||
{{- $hook := .hook | default "assets/card.html" }}
|
{{- $hook := .hook | default "assets/card.html" }}
|
||||||
|
|
||||||
<!-- Override arguments -->
|
<!-- Override arguments -->
|
||||||
{{ $isPages := in (slice "page.Pages" "resource.Resources") (printf "%T" $pages) }}
|
{{ $isPages := in (slice "page.Pages" "resource.Resources") (printf "%T" $pages) }}
|
||||||
{{ $paginator := "" }}
|
{{ $paginator := "" }}
|
||||||
{{ if and $isPages $paginate }}
|
{{ if and $isPages $paginate }}
|
||||||
{{ $paginator = $page.Paginate $pages .max }}
|
{{ with .pagination }}
|
||||||
|
{{ $paginator = $page.Paginate $pages . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $paginator = $page.Paginate $pages }}
|
||||||
|
{{ end }}
|
||||||
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
|
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@@ -74,13 +81,36 @@
|
|||||||
{{- $responsive := .responsive | default true -}}
|
{{- $responsive := .responsive | default true -}}
|
||||||
{{- $cols := string .cols | default "3" -}}
|
{{- $cols := string .cols | default "3" -}}
|
||||||
|
|
||||||
|
{{- $sizes := "100vw" }}
|
||||||
{{- $colGrid := "" -}}
|
{{- $colGrid := "" -}}
|
||||||
{{- if eq $cols "1" }}{{ $colGrid = "row-cols-1" -}}
|
{{ if $scroll }}
|
||||||
{{- else if eq $cols "2" }}{{ if $responsive }}{{ $colGrid = printf "row-cols-1 row-cols-%s-1 row-cols-%s-2" $breakpoint.prev $breakpoint.current }}{{ else }}{{ $colGrid = "row-cols-2" }}{{ end -}}
|
{{- $colGrid = (printf "card-block-%d" $cols) -}}
|
||||||
{{- else if eq $cols "3" }}{{ if $responsive }}{{ $colGrid = printf "row-cols-1 row-cols-%s-2 row-cols-%s-3" $breakpoint.prev $breakpoint.current }}{{ else }}{{ $colGrid = "row-cols-3" }}{{ end -}}
|
{{ else }}
|
||||||
{{- else if eq $cols "4" }}{{ if $responsive }}{{ $colGrid = printf "row-cols-1 row-cols-%s-2 row-cols-%s-4" $breakpoint.prev $breakpoint.current }}{{ else }}{{ $colGrid = "row-cols-4" }}{{ end -}}
|
{{ $colGrid = printf "row-cols-%s" $cols }}
|
||||||
{{- else if eq $cols "5" }}{{ if $responsive }}{{ $colGrid = printf "row-cols-1 row-cols-%s-3 row-cols-%s-5" $breakpoint.prev $breakpoint.current }}{{ else }}{{ $colGrid = "row-cols-5" }}{{ end -}}
|
{{- if eq $cols "1" }}
|
||||||
{{ end -}}
|
{{ $colGrid = "row-cols-1" -}}
|
||||||
|
{{- else if eq $cols "2" }}
|
||||||
|
{{ if $responsive }}
|
||||||
|
{{ $colGrid = printf "row-cols-1 row-cols-%s-1 row-cols-%s-2" $breakpoint.prev $breakpoint.current }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ $sizes = printf "(min-width: %s) 50vw, 100vw" $breakpoint.currentSize }}
|
||||||
|
{{- else if eq $cols "3" }}
|
||||||
|
{{ if $responsive }}
|
||||||
|
{{ $colGrid = printf "row-cols-1 row-cols-%s-2 row-cols-%s-3" $breakpoint.prev $breakpoint.current }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ $sizes = printf "(min-width: %s) 33.3vw, (min-width: %s) 50vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
||||||
|
{{- else if eq $cols "4" }}
|
||||||
|
{{ if $responsive }}
|
||||||
|
{{ $colGrid = printf "row-cols-1 row-cols-%s-2 row-cols-%s-4" $breakpoint.prev $breakpoint.current }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ $sizes = printf "(min-width: %s) 25vw, (min-width: %s) 50vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
||||||
|
{{- else if eq $cols "5" }}
|
||||||
|
{{ if $responsive }}
|
||||||
|
{{ $colGrid = printf "row-cols-1 row-cols-%s-3 row-cols-%s-5" $breakpoint.prev $breakpoint.current }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ $sizes = printf "(min-width: %s) 20vw, (min-width: %s) 33.3vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{- if not $paginate -}}
|
{{- if not $paginate -}}
|
||||||
{{- $list = first $max $list -}}
|
{{- $list = first $max $list -}}
|
||||||
@@ -89,8 +119,8 @@
|
|||||||
{{- if and (eq $cols "1") (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
|
{{- if and (eq $cols "1") (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
<div class="container-fluid {{ $wrapper }}">
|
<div class="container {{ $wrapper }} {{ if $scroll }}card-container-wrapper{{ end }}">
|
||||||
<div class="row {{ $colGrid }} g-{{ $gutter }}">
|
<div class="row g-{{ $gutter }} {{ if $scroll }}d-flex flex-row flex-nowrap card-container scrollbar-horizontal pb-4 w-100{{ else }}{{ $colGrid }}{{ end }}">
|
||||||
{{ range $index, $element := $list }}
|
{{ range $index, $element := $list }}
|
||||||
{{- $params := (dict
|
{{- $params := (dict
|
||||||
"class" (printf "h-100 %s" $class)
|
"class" (printf "h-100 %s" $class)
|
||||||
@@ -98,6 +128,7 @@
|
|||||||
"footer" $footer
|
"footer" $footer
|
||||||
"header" $header
|
"header" $header
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
|
"sizes" $sizes
|
||||||
"orientation" $orientation
|
"orientation" $orientation
|
||||||
"padding" $padding
|
"padding" $padding
|
||||||
"ratio" $ratio
|
"ratio" $ratio
|
||||||
@@ -106,8 +137,10 @@
|
|||||||
"align" $align
|
"align" $align
|
||||||
"button" $button
|
"button" $button
|
||||||
"buttonLabel" $buttonLabel
|
"buttonLabel" $buttonLabel
|
||||||
|
"buttonType" $buttonType
|
||||||
|
"iconRounded" $iconRounded
|
||||||
) -}}
|
) -}}
|
||||||
{{- $params = merge $params $element }}
|
{{- $params = merge $element $params }}
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{{- partial $hook $params -}}
|
{{- partial $hook $params -}}
|
||||||
@@ -118,7 +151,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{if $cards }}{{- print $cards | safeHTML }}{{ end }}
|
{{ if $cards }}{{- print $cards | safeHTML }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if $paginator }}
|
{{ if $paginator }}
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<!-- Initialize arguments and default values -->
|
<!-- Initialize arguments and default values -->
|
||||||
{{- $alt := .alt -}}
|
{{- $alt := .alt -}}
|
||||||
|
{{- $wrapper := .wrapper -}}
|
||||||
{{- $class := .class -}}
|
{{- $class := .class -}}
|
||||||
{{- $color := .color -}}
|
{{- $color := .color -}}
|
||||||
{{- $description := .description -}}
|
{{- $description := .description -}}
|
||||||
@@ -20,8 +21,10 @@
|
|||||||
{{- $href := .href -}}
|
{{- $href := .href -}}
|
||||||
{{- $icon := .icon -}}
|
{{- $icon := .icon -}}
|
||||||
{{- $iconStyle := "" -}}
|
{{- $iconStyle := "" -}}
|
||||||
|
{{- $iconRounded := .iconRounded | default false -}}
|
||||||
{{- $align := .align | default "start" -}}
|
{{- $align := .align | default "start" -}}
|
||||||
{{- $style := .style | default "" -}}
|
{{- $style := .style | default "" -}}
|
||||||
|
{{- $sizes := .sizes | default "100vw" -}}
|
||||||
{{- $loading := .loading -}}
|
{{- $loading := .loading -}}
|
||||||
{{- $orientation := .orientation | default "stacked" -}}
|
{{- $orientation := .orientation | default "stacked" -}}
|
||||||
{{- $padding := (string .padding) | default "auto" -}}
|
{{- $padding := (string .padding) | default "auto" -}}
|
||||||
@@ -31,6 +34,7 @@
|
|||||||
{{- $subtle := .subtle -}}
|
{{- $subtle := .subtle -}}
|
||||||
{{- $button := .button -}}
|
{{- $button := .button -}}
|
||||||
{{- $buttonLabel := .buttonLabel -}}
|
{{- $buttonLabel := .buttonLabel -}}
|
||||||
|
{{- $buttonType := .buttonType -}}
|
||||||
{{- $colorStyle := "" -}}
|
{{- $colorStyle := "" -}}
|
||||||
{{ if $color }}
|
{{ if $color }}
|
||||||
{{ if $subtle }}
|
{{ if $subtle }}
|
||||||
@@ -117,28 +121,61 @@
|
|||||||
|
|
||||||
{{- range $index, $tag := first $maxTags ($page.GetTerms "tags") -}}
|
{{- range $index, $tag := first $maxTags ($page.GetTerms "tags") -}}
|
||||||
{{- if gt $index 0 }} • {{ end -}}
|
{{- if gt $index 0 }} • {{ end -}}
|
||||||
<a href="{{ (path.Join $tag.Page.RelPermalink) | relLangURL }}" class="{{ $link }} tag-link" aria-label="tag: {{ $tag.LinkTitle }}">{{ $tag.LinkTitle }}</a>
|
<a href="{{ $tag.Page.RelPermalink }}" class="{{ $link }} tag-link" aria-label="tag: {{ $tag.LinkTitle }}">{{ $tag.LinkTitle }}</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</small></p>
|
</small></p>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{ if ne $gutter "0" }}<div class="g-{{ $gutter }}">{{ end }}
|
{{ if or (ne $gutter "0") ($wrapper) }}<div class="g-{{ $gutter }} {{ $wrapper }}">{{ end }}
|
||||||
|
|
||||||
|
{{ $stack := "fa-2x" }}
|
||||||
|
|
||||||
{{- if hasPrefix $orientation "horizontal" -}}
|
{{- if hasPrefix $orientation "horizontal" -}}
|
||||||
|
{{ $col1 := "" }}
|
||||||
|
{{ $col2 := "" }}
|
||||||
|
|
||||||
|
{{ if $thumbnail }}
|
||||||
|
{{ if eq $orientation "horizontal-sm" }}
|
||||||
|
{{ $stack = "fa-1x" }}
|
||||||
|
{{ $col1 = "col-4 col-md-2" }}
|
||||||
|
{{ $col2 = "col-8 col-md-10" }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $col1 = "col-4" }}
|
||||||
|
{{ $col2 = "col-8" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else if $icon }}
|
||||||
|
{{ if eq $orientation "horizontal-sm" }}
|
||||||
|
{{ $stack = "fa-1x" }}
|
||||||
|
{{ $col1 = "col-2 col-sm-3 col-md-4 col-xl-2" }}
|
||||||
|
{{ $col2 = "col-10 col-sm-9 col-md-8 col-xl-10" }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $col1 = "col-4" }}
|
||||||
|
{{ $col2 = "col-8" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<!-- Render horizontal card -->
|
<!-- Render horizontal card -->
|
||||||
<div class="card {{ $colorStyle }} {{ $class }}">
|
<div class="card {{ $colorStyle }} {{ $class }}">
|
||||||
<div class="row g-0 row-cols-1 h-100{{ if $button }} pb-5{{ end }}">
|
<div class="row g-0 row-cols-2 h-100{{ if $button }} pb-5{{ end }}">
|
||||||
<div class="{{ if eq $orientation "horizontal-sm" }}col-4 col-md-2{{ else }}col-4{{ end }}">
|
{{- if $thumbnail -}}
|
||||||
{{- if $thumbnail -}}
|
<div class="{{ $col1 }}">
|
||||||
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "1x1") "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100" "title" $title "loading" $loading) -}}
|
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "1x1") "sizes" $sizes "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100 card-img-bg" "title" $title "loading" $loading) -}}
|
||||||
{{- else if $icon -}}
|
</div>
|
||||||
<div class="card-icon p-{{ $padding }} h-100 fa-wrapper d-flex align-items-{{ $align}} justify-content-center {{ $iconStyle }}">
|
{{- else if $icon -}}
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
<div class="{{ $col1 }} p-{{ $padding }}">
|
||||||
|
<div class="card-icon {{ if $iconRounded }}fa-stack {{ $stack }} mx-auto{{ else }}fa-wrapper h-100 {{ end }} d-flex align-items-{{ $align}} justify-content-center {{ $iconStyle }}">
|
||||||
|
{{ if $iconRounded }}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" "fas circle fa-stack-2x") -}}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-stack-1x fa-inverse" $icon)) -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
</div>
|
||||||
</div>
|
{{- end -}}
|
||||||
<div class="{{ if eq $orientation "horizontal-sm" }}col-8 col-md-10{{ else }}col-8{{ end }}">
|
<div class="{{ $col2 }}">
|
||||||
<div class="card-body d-flex p-{{ $padding }} flex-column h-100 flex-fill">
|
<div class="card-body d-flex p-{{ $padding }} flex-column h-100 flex-fill">
|
||||||
{{ 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="flex-fill">
|
<div class="flex-fill">
|
||||||
@@ -147,7 +184,19 @@
|
|||||||
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>{{ end }}
|
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>{{ end }}
|
||||||
{{ if $button }}
|
{{ if $button }}
|
||||||
{{ $label := (or $buttonLabel $title) | default (T "readMore") }}
|
{{ $label := (or $buttonLabel $title) | default (T "readMore") }}
|
||||||
<div class="d-flex align-items-end">{{ partial "assets/button.html" (dict "title" $label "icon" "fas chevron-right" "href" $href "outline" true "size" "sm" "class" "card-button mb-n4") }}</div>
|
{{ $buttonClass := "card-button mb-n4" }}
|
||||||
|
{{ if eq $buttonType "link" }}{{ $buttonClass = "card-button card-button-link mb-n4" }}{{ end }}
|
||||||
|
<div class="d-flex align-items-end">
|
||||||
|
{{ partial "assets/button.html" (dict
|
||||||
|
"title" $label
|
||||||
|
"icon" "fas chevron-right"
|
||||||
|
"href" $href
|
||||||
|
"outline" true
|
||||||
|
"size" "sm"
|
||||||
|
"class" $buttonClass
|
||||||
|
"type" $buttonType
|
||||||
|
)}}
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -157,10 +206,15 @@
|
|||||||
<!-- Render stacked / default card -->
|
<!-- Render stacked / default card -->
|
||||||
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
|
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
|
||||||
{{- if $thumbnail -}}
|
{{- if $thumbnail -}}
|
||||||
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "16x9") "wrapper" "card-img-wrap" "class" "card-img-top" "title" (or $alt $title) "loading" $loading) -}}
|
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "16x9") "sizes" $sizes "wrapper" "card-img-wrap" "class" "card-img-top card-img-bg" "title" (or $alt $title) "loading" $loading) -}}
|
||||||
{{- else if $icon -}}
|
{{- else if $icon -}}
|
||||||
<div class="card-icon p-{{ $padding }} {{ $iconStyle }} text-{{ $align }}">
|
<div class="card-icon p-{{ $padding }} {{ $iconStyle }} text-{{ $align }} {{ if $iconRounded }}fa-stack {{ $stack }}{{ end }} w-100">
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
{{ if $iconRounded }}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "fas circle fa-stack-2x %s")) -}}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-stack-1x fa-inverse" $icon)) -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
||||||
@@ -173,11 +227,21 @@
|
|||||||
<div class="row p-{{ $padding }}" >
|
<div class="row p-{{ $padding }}" >
|
||||||
<div class="{{ if eq $orientation "horizontal-sm" }}col-4 col-md-2{{ else if eq $orientation "horizontal" }}col-4{{ end }}"></div>
|
<div class="{{ if eq $orientation "horizontal-sm" }}col-4 col-md-2{{ else if eq $orientation "horizontal" }}col-4{{ end }}"></div>
|
||||||
<div class="col d-flex align-items-end {{ if eq $orientation "horizontal-sm" }}px-2{{ else if eq $orientation "horizontal"}}px-1 {{ else }}px-2 pt-1{{ end }}">
|
<div class="col d-flex align-items-end {{ if eq $orientation "horizontal-sm" }}px-2{{ else if eq $orientation "horizontal"}}px-1 {{ else }}px-2 pt-1{{ end }}">
|
||||||
{{ partial "assets/button.html" (dict "title" $label "href" $href "outline" true "size" "sm" "class" "card-button") }}
|
{{ $buttonClass := "card-button" }}
|
||||||
|
{{ if eq $buttonType "link" }}{{ $buttonClass = "card-button card-button-link" }}{{ end }}
|
||||||
|
{{ partial "assets/button.html" (dict
|
||||||
|
"title" $label
|
||||||
|
"href" $href
|
||||||
|
"outline" true
|
||||||
|
"size" "sm"
|
||||||
|
"class" "card-button"
|
||||||
|
"class" $buttonClass
|
||||||
|
"type" $buttonType
|
||||||
|
)}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ if ne $gutter "0" }}</div>{{ end }}
|
{{ if or (ne $gutter "0") ($wrapper) }}</div>{{ end }}
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
{{- $download := partial "utilities/GetTargetPath.html" (dict "path" .download "page" page) -}}
|
{{- $download := partial "utilities/GetTargetPath.html" (dict "path" .download "page" page) -}}
|
||||||
{{- $title := .title }}
|
{{- $title := .title }}
|
||||||
{{- $color := .color | default "primary" -}}
|
{{- $color := .color | default "primary" -}}
|
||||||
|
25
layouts/partials/assets/helpers/GetDimension.html
Normal file
25
layouts/partials/assets/helpers/GetDimension.html
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $ratio := .ratio }}
|
||||||
|
{{ $dim := "" }}
|
||||||
|
{{ $default := dict "4x3" "1400x1050" "3x2" "1400x933" "1x1" "1400x1400" "16x9" "1400x788" "21x9" "1400x600" "auto" "1400" }}
|
||||||
|
|
||||||
|
<!-- Initialize dimensions data - stripping unsupported file extension -->
|
||||||
|
{{ $config := "dimensions" }}
|
||||||
|
{{ with index site.Params "dam" }}{{ with index . "dimensions" }}{{ $config = . }}{{ end }}{{ end }}
|
||||||
|
{{ $config = path.Join (path.Dir $config) (path.BaseName $config) }}
|
||||||
|
|
||||||
|
{{ with index site.Data $config }}
|
||||||
|
{{ $matches := first 1 (where . "ratio" $ratio) }}
|
||||||
|
{{ if eq ($matches | len) 1 }}
|
||||||
|
{{ $dim = (index $matches 0).dimensions }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if not $dim }}
|
||||||
|
{{ $dim = slice (index $default $ratio) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return $dim }}
|
23
layouts/partials/assets/helpers/SetPortrait.html
Normal file
23
layouts/partials/assets/helpers/SetPortrait.html
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{{- $dim := .dim -}}
|
||||||
|
|
||||||
|
{{- $dimensions := slice }}
|
||||||
|
{{- $dimensions = $dimensions | append $dim -}}
|
||||||
|
{{- $portraits := slice }}
|
||||||
|
{{- range $d := $dimensions -}}
|
||||||
|
{{- $p := split $d "x" }}
|
||||||
|
{{ if ne (len $p) 2 }}
|
||||||
|
{{- warnf "partial [assets/image.html] - Invalid dimension: %s" $d -}}
|
||||||
|
{{- $portraits = $portraits | append $d -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $portraits = $portraits | append (printf "%sx%s" (index $p 1) (index $p 0)) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $ret := "" }}
|
||||||
|
{{- if reflect.IsSlice $dim -}}
|
||||||
|
{{ $ret = $portraits -}}
|
||||||
|
{{- else if gt (len $portraits) 0 -}}
|
||||||
|
{{- $ret = index $portraits 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- return $ret -}}
|
73
layouts/partials/assets/helpers/image-definition.html
Normal file
73
layouts/partials/assets/helpers/image-definition.html
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{- $page := .page -}}
|
||||||
|
{{- $ratio := .ratio -}}
|
||||||
|
{{- $portrait := .portrait -}}
|
||||||
|
{{- $wrapper := .wrapper -}}
|
||||||
|
{{- $class := .class -}}
|
||||||
|
{{- $title := .title -}}
|
||||||
|
{{- $caption := .caption -}}
|
||||||
|
{{- $figclass := .figclass -}}
|
||||||
|
{{- $lazy := .lazy -}}
|
||||||
|
{{- $priority := .priority -}}
|
||||||
|
{{- $sizes := .sizes -}}
|
||||||
|
{{- $absoluteURL := .absoluteURL -}}
|
||||||
|
{{- $url := .url -}}
|
||||||
|
{{- $mode := .mode -}}
|
||||||
|
{{- $modes := .modes -}}
|
||||||
|
{{- $plain := .plain | default false }}
|
||||||
|
|
||||||
|
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
||||||
|
{{- $anchor := "" -}}
|
||||||
|
{{- $segments := split $url "#" -}}
|
||||||
|
{{- if gt (len $segments) 2 -}}
|
||||||
|
{{- errorf "Invalid path or url: %q" $url -}}
|
||||||
|
{{- else if eq (len $segments) 2 }}
|
||||||
|
{{- $url = index $segments 0 -}}
|
||||||
|
{{- $anchor = index $segments 1 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<!-- Obtain fallback URL and imageset definition -->
|
||||||
|
{{ $target := partial "assets/helpers/image-dimension.html" (dict
|
||||||
|
"page" $page
|
||||||
|
"url" .url
|
||||||
|
"ratio" $ratio
|
||||||
|
"portrait" $portrait
|
||||||
|
"plain" $plain
|
||||||
|
"imageset" true
|
||||||
|
) }}
|
||||||
|
{{ $fallbackURL := index $target "target" }}
|
||||||
|
{{ $imgset := index $target "set" }}
|
||||||
|
{{ $height := index $target "height" }}
|
||||||
|
{{ $width := index $target "width" }}
|
||||||
|
|
||||||
|
<!-- Add color modes -->
|
||||||
|
{{- range $none := $modes -}}
|
||||||
|
{{- if ne $none $mode -}}
|
||||||
|
{{- $wrapper = printf "%s d-none-%s" (or $wrapper "") $none -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<!-- Generate image definition -->
|
||||||
|
{{- if $caption -}}
|
||||||
|
<figure {{ with $wrapper }}class="{{ . }}"{{ end }}>
|
||||||
|
{{ end }}
|
||||||
|
<div class="{{ if not $caption }}{{ $wrapper }}{{ end }}">
|
||||||
|
{{- if not $anchor -}}
|
||||||
|
<img class="img-fluid {{ $class }}"
|
||||||
|
src="{{ $fallbackURL }}"
|
||||||
|
{{ if $lazy }}loading="lazy"{{ end }}
|
||||||
|
{{ with $priority }}fetchpriority="{{ . }}"{{ end }}
|
||||||
|
{{ with $imgset -}}srcset="{{ . }}" sizes="{{ $sizes }}"{{- end }}
|
||||||
|
{{ with $height }}height="{{ . }}"{{ end }}
|
||||||
|
{{ with $width }}width="{{ . }}"{{ end }}
|
||||||
|
{{ with (or $title $caption) }}alt="{{ . }}"{{ end }}>
|
||||||
|
{{- else }}
|
||||||
|
<svg class="{{ $class }}">
|
||||||
|
<use href="{{ $fallbackURL }}#{{ $anchor }}"></use>
|
||||||
|
</svg>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{- if $caption -}}
|
||||||
|
<figcaption class="figure-caption{{ with $figclass }} {{ . }}{{ end }}">{{ $caption | safeHTML }}</figcaption>
|
||||||
|
</figure>
|
||||||
|
{{- end -}}
|
131
layouts/partials/assets/helpers/image-dimension.html
Normal file
131
layouts/partials/assets/helpers/image-dimension.html
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{- $page := .page -}}
|
||||||
|
{{- $url := .url -}}
|
||||||
|
{{- $ratio := .ratio -}}
|
||||||
|
{{- $portrait := .portrait -}}
|
||||||
|
{{- $height := .height -}}
|
||||||
|
{{- $width := .width -}}
|
||||||
|
{{- $plain := .plain | default false }}
|
||||||
|
{{- $targetURL := "" -}}
|
||||||
|
{{- $set := "" -}}
|
||||||
|
{{- $imageset := .imageset | default false }}
|
||||||
|
|
||||||
|
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
||||||
|
{{- $segments := split $url "#" -}}
|
||||||
|
{{- if gt (len $segments) 2 -}}
|
||||||
|
{{- errorf "Invalid path or url: %q" $url -}}
|
||||||
|
{{- else if eq (len $segments) 2 }}
|
||||||
|
{{- $url = index $segments 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<!-- Identify image provider -->
|
||||||
|
{{ $hook := "" }}
|
||||||
|
{{ $account := "" }}
|
||||||
|
{{ $container := "" }}
|
||||||
|
{{ $rewrite := false }}
|
||||||
|
{{ range $provider, $val := site.Params.images }}
|
||||||
|
{{ if not $hook }}
|
||||||
|
{{ with index $val "host" }}
|
||||||
|
{{ if (findRE . (urls.Parse $url).Hostname) }}
|
||||||
|
{{ $hook = $provider }}
|
||||||
|
{{ with index $val "account" }}{{ $account = . }}{{ end }}
|
||||||
|
{{ with index $val "rewrite" }}{{ $rewrite = . }}{{ end }}
|
||||||
|
{{ with index $val "container" }}{{ $container = . }}{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if not $hook }}{{ $hook = "hugo" }}{{ end }}
|
||||||
|
|
||||||
|
<!-- Rewrite the origin URL if applicable -->
|
||||||
|
{{ if $rewrite }}
|
||||||
|
{{ $url = partial "assets/helpers/image-rewrite.html" (dict "url" $url "account" $account "container" $container "hook" $hook) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Define image dimensions -->
|
||||||
|
{{ $dims := slice }}
|
||||||
|
{{- $res := "" -}}
|
||||||
|
{{- $img := "" -}}
|
||||||
|
{{ $transform := "" }}
|
||||||
|
{{- if hasSuffix $url "svg" -}}
|
||||||
|
{{- $res = partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
|
||||||
|
{{ if not $res }}
|
||||||
|
{{- if not (fileExists (path.Join "/static" $url)) -}}
|
||||||
|
{{ warnf "Cannot find vector image resource: %q" $url -}}
|
||||||
|
{{ else }}
|
||||||
|
{{ $width := string (partial "utilities/GetWidth.html" (dict "path" $url "height" 500)) }}
|
||||||
|
{{ if $width }}
|
||||||
|
{{ $dims = $dims | append (printf "%sx500" $width) }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $dims = $dims | append "500" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else if $ratio }}
|
||||||
|
{{ $transform = "fill" }}
|
||||||
|
{{ $dims = partial "assets/helpers/GetDimension.html" (dict "ratio" $ratio) }}
|
||||||
|
{{ if not $dims }}{{ errorf "partial [assets/image.html] - Cannot find dimension data: %s" $ratio }}{{ end }}
|
||||||
|
{{ else if (and $height $width) }}
|
||||||
|
{{ $transform = "fill" }}
|
||||||
|
{{ $dims = slice (printf "%dx%d" $width $height) }}
|
||||||
|
{{ else if not $plain }}
|
||||||
|
{{ $transform = "fit" }}
|
||||||
|
{{- $res := partial "utilities/GetImage.html" (dict "url" $url "page" $page) -}}
|
||||||
|
{{ if and $res $res.resource }}
|
||||||
|
{{ $img = $res.resource }}
|
||||||
|
{{ if $res.mirror }}{{ $class = printf "%s mirrorred" $class }}{{ end }}
|
||||||
|
|
||||||
|
{{ $widths := partial "assets/helpers/GetDimension.html" (dict "ratio" "auto") }}
|
||||||
|
{{ range $w := $widths -}}
|
||||||
|
{{ $height = int (math.Round (mul (div (float $w) $img.Width) $img.Height)) }}
|
||||||
|
{{- $dims = $dims | append (printf "%dx%d" (int $w) $height ) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Derive image width and height -->
|
||||||
|
{{ if not $plain }}
|
||||||
|
{{ if $portrait }}
|
||||||
|
{{ with $dims }}
|
||||||
|
{{ $newDims := slice }}
|
||||||
|
{{ range $dim := . }}
|
||||||
|
{{ $width = (int (index (split $dim "x") 1)) }}
|
||||||
|
{{ $height = (int (index (split $dim "x") 0)) }}
|
||||||
|
{{- $newDims = $newDims | append (printf "%dx%d" (int $width) $height ) -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ $dims = $newDims }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $newWidth := $height }}
|
||||||
|
{{ $newHeight := $width }}
|
||||||
|
{{ $width = $newWidth }}
|
||||||
|
{{ $height = $newHeight }}
|
||||||
|
{{ else }}
|
||||||
|
{{ with $dims }}
|
||||||
|
{{ range $dim := (. | last 1) }}
|
||||||
|
{{ $width = (int (index (split $dim "x") 0)) }}
|
||||||
|
{{ $height = (int (index (split $dim "x") 1)) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Generate image url -->
|
||||||
|
{{ if or (hasSuffix $url "svg") $plain }}
|
||||||
|
{{- $targetURL = partial "utilities/GetStaticURL" (dict "url" $url) -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- $targetURL = partial "assets/helpers/image-set.html" (dict
|
||||||
|
"url" $url
|
||||||
|
"img" $img
|
||||||
|
"dims" ($dims | last 1)
|
||||||
|
"transform" $transform
|
||||||
|
"hook" $hook
|
||||||
|
"format" "jpg"
|
||||||
|
"includeWidth" false
|
||||||
|
)}}
|
||||||
|
{{ if $imageset }}
|
||||||
|
{{- $set = partial "assets/helpers/image-set.html" (dict "url" $url "img" $img "dims" $dims "transform" $transform "hook" $hook) -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return (dict "target" $targetURL "set" $set "height" $height "width" $width) }}
|
29
layouts/partials/assets/helpers/image-rewrite.html
Normal file
29
layouts/partials/assets/helpers/image-rewrite.html
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{{- $url := .url -}}
|
||||||
|
{{- $account := .account -}}
|
||||||
|
{{- $container := .container -}}
|
||||||
|
{{ $hook := .hook }}
|
||||||
|
|
||||||
|
{{ $host := (urls.Parse $url).Hostname }}
|
||||||
|
{{ $dir := (urls.Parse $url).Path }}
|
||||||
|
{{ $file := index ((split $dir "/") | collections.Reverse) 0 }}
|
||||||
|
{{ $dir = strings.TrimSuffix $file $dir }}
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
{{ $adapter := (printf "assets/adapters/%s-rewrite.html" $hook) }}
|
||||||
|
{{ if not (fileExists (path.Join "/layouts/partials" $adapter)) }}
|
||||||
|
{{ warnf "Cannot find adapter: %s" (path.Join "/layouts/partials" $adapter) }}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $result := $url }}
|
||||||
|
{{ if not $error }}
|
||||||
|
{{ $result = partial $adapter (dict
|
||||||
|
"account" $account
|
||||||
|
"container" $container
|
||||||
|
"host" $host
|
||||||
|
"dir" $dir
|
||||||
|
"file" $file
|
||||||
|
)}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return $result }}
|
46
layouts/partials/assets/helpers/image-set.html
Normal file
46
layouts/partials/assets/helpers/image-set.html
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{{- $url := .url -}}
|
||||||
|
{{ $img := .img }}
|
||||||
|
{{ $absoluteURL := .absoluteURL }}
|
||||||
|
{{ $dims := .dims }}
|
||||||
|
{{- $ratio := .ratio -}}
|
||||||
|
{{ $hook := .hook }}
|
||||||
|
{{ $transform := .transform }}
|
||||||
|
{{ $format := .format }}
|
||||||
|
{{ $includeWidth := .includeWidth | default true }}
|
||||||
|
|
||||||
|
{{ $host := (urls.Parse $url).Hostname }}
|
||||||
|
{{ $dir := (urls.Parse $url).Path }}
|
||||||
|
{{ $file := index ((split $dir "/") | collections.Reverse) 0 }}
|
||||||
|
{{ $dir = strings.TrimSuffix $file $dir }}
|
||||||
|
|
||||||
|
{{ $adapter := (printf "assets/adapters/%s.html" $hook) }}
|
||||||
|
{{ if not (fileExists (path.Join "/layouts/partials" $adapter)) }}
|
||||||
|
{{ warnf "Cannot find adapter: %s" (path.Join "/layouts/partials" $adapter) }}
|
||||||
|
{{ $hook = "hugo" }}
|
||||||
|
{{ $adapter = "assets/adapters/hugo.html" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $imgset := slice }}
|
||||||
|
{{- range $index, $dim := $dims -}}
|
||||||
|
{{ $width := (int (index (split $dim "x") 0)) }}
|
||||||
|
{{ $height := (int (index (split $dim "x") 1)) }}
|
||||||
|
|
||||||
|
{{- $element := partial $adapter (dict
|
||||||
|
"host" $host
|
||||||
|
"dir" $dir
|
||||||
|
"file" $file
|
||||||
|
"img" $img
|
||||||
|
"absoluteURL" $absoluteURL
|
||||||
|
"transform" $transform
|
||||||
|
"width" $width
|
||||||
|
"height" $height
|
||||||
|
"format" $format
|
||||||
|
)}}
|
||||||
|
{{ if $includeWidth }}
|
||||||
|
{{ $imgset = $imgset | append (printf "%s %dw" $element $width) }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $imgset = $imgset | append $element }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ return (delimit $imgset ", ") }}
|
@@ -13,247 +13,30 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Initialize arguments -->
|
<!-- Initialize arguments -->
|
||||||
{{ $destination := .destination }}
|
{{- $page := .page -}}
|
||||||
|
|
||||||
<!-- Initialize arguments -->
|
|
||||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
|
||||||
{{- $ratio := .ratio -}}
|
{{- $ratio := .ratio -}}
|
||||||
{{- $portrait := .portrait -}}
|
{{- $portrait := .portrait -}}
|
||||||
{{- $url := .url -}}
|
|
||||||
|
|
||||||
{{- $mode := .mode -}}
|
|
||||||
{{- $modes := site.Params.main.modes | default (slice "light" "dark") -}}
|
|
||||||
{{- $wrapper := .wrapper -}}
|
{{- $wrapper := .wrapper -}}
|
||||||
{{- $class := .class -}}
|
{{- $class := .class -}}
|
||||||
{{- $title := .title -}}
|
{{- $title := .title -}}
|
||||||
{{- $caption := .caption -}}
|
{{- $caption := .caption -}}
|
||||||
{{- $figclass := .figclass -}}
|
{{- $figclass := .figclass -}}
|
||||||
|
|
||||||
{{- $page := .page -}}
|
|
||||||
|
|
||||||
{{- $loading := .loading -}}
|
{{- $loading := .loading -}}
|
||||||
{{- $lazy := eq $loading "lazy" -}}
|
{{- $lazy := eq $loading "lazy" -}}
|
||||||
{{- $priority := .priority -}}
|
{{- $priority := .priority -}}
|
||||||
{{- if eq $priority "auto" }}{{ $priority = "" }}{{ end -}}
|
{{- if eq $priority "auto" }}{{ $priority = "" }}{{ end -}}
|
||||||
|
{{- $sizes := .sizes | default "100vw" -}}
|
||||||
|
{{- $plain := .plain | default false -}}
|
||||||
|
|
||||||
{{- define "partials/image-portrait.html" -}}
|
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
||||||
{{- $dimensions := slice }}
|
{{- $url := .url -}}
|
||||||
{{- $dim := .dim -}}
|
{{- $mode := .mode -}}
|
||||||
{{- $dimensions = $dimensions | append $dim -}}
|
{{- $modes := site.Params.main.modes | default (slice "light" "dark") -}}
|
||||||
{{- $portraits := slice }}
|
|
||||||
{{- range $d := $dimensions -}}
|
|
||||||
{{- $p := split $d "x" }}
|
|
||||||
{{ if ne (len $p) 2 }}
|
|
||||||
{{- warnf "partial [assets/image.html] - Invalid dimension: %s" $d -}}
|
|
||||||
{{- $portraits = $portraits | append $d -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $portraits = $portraits | append (printf "%sx%s" (index $p 1) (index $p 0)) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $ret := "" }}
|
<!-- Main code -->
|
||||||
{{- if reflect.IsSlice $dim -}}
|
|
||||||
{{ $ret = $portraits -}}
|
|
||||||
{{- else if gt (len $portraits) 0 -}}
|
|
||||||
{{- $ret = index $portraits 0 -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- return $ret -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
<!-- Generate a fallback image of type jpg -->
|
|
||||||
{{- define "partials/image-default.html" -}}
|
|
||||||
{{- $img := .img -}}
|
|
||||||
{{- $ratio := .ratio -}}
|
|
||||||
{{- $portrait := and .portrait .ratio -}}
|
|
||||||
{{- $width := "1400" -}}
|
|
||||||
{{- $dim := "" -}}
|
|
||||||
{{- $fallback := "" -}}
|
|
||||||
|
|
||||||
{{- with $img -}}
|
|
||||||
{{- if eq $ratio "4x3" -}}{{- $dim = "1400x1050" }}
|
|
||||||
{{- else if eq $ratio "3x2" -}}{{- $dim = "1400x933" }}
|
|
||||||
{{- else if eq $ratio "1x1" -}}{{- $dim = "1400x1400" }}
|
|
||||||
{{- else if eq $ratio "16x9" -}}{{- $dim = "1400x788" -}}
|
|
||||||
{{- else if eq $ratio "21x9" -}}{{- $dim = "1400x600" -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $dim = printf "%sx%d" $width (int (math.Round (mul (div (float $width) $img.Width) $img.Height))) -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- if $portrait -}}{{- $dim = partial "partials/image-portrait.html" (dict "dim" $dim) -}}{{- end -}}
|
|
||||||
|
|
||||||
{{- if $ratio -}}
|
|
||||||
{{- $fallback = ($img.Fill (printf "%s jpg" $dim)) -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $fallback = ($img.Fit (printf "%s jpg" $dim)) -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $clean := path.Ext $img.RelPermalink -}}
|
|
||||||
{{- $ext := path.Ext $img.RelPermalink -}}
|
|
||||||
{{- $fallback = $fallback | resources.Copy (replace $img.RelPermalink $clean (printf "-%s%s" $dim $ext)) -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- return $fallback -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
<!-- Generate a image set of type webp -->
|
|
||||||
{{- define "partials/image-scaled.html " -}}
|
|
||||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
|
||||||
{{- $img := .img -}}
|
|
||||||
{{- $ratio := .ratio -}}
|
|
||||||
{{- $portrait := and .portrait .ratio -}}
|
|
||||||
{{- $imgset := "" -}}
|
|
||||||
|
|
||||||
{{- $widths := slice "576" "768" "992" "1200" "1400" -}}
|
|
||||||
{{- $dims := slice -}}
|
|
||||||
{{- with $img -}}
|
|
||||||
{{- if eq $ratio "4x3" -}}
|
|
||||||
{{- $dims = slice "576x432" "768x576" "992x744" "1200x900" "1400x1050" -}}
|
|
||||||
{{- else if eq $ratio "3x2" -}}
|
|
||||||
{{- $dims = slice "576x384" "768x512" "992x661" "1200x800" "1400x933" -}}
|
|
||||||
{{- else if eq $ratio "1x1" -}}
|
|
||||||
{{- $dims = slice "576x576" "768x768" "992x992" "1200x1200" "1400x1400" -}}
|
|
||||||
{{- else if eq $ratio "16x9" -}}
|
|
||||||
{{- $dims = slice "576x324" "768x432" "992x558" "1200x675" "1400x788" -}}
|
|
||||||
{{- else if eq $ratio "21x9" -}}
|
|
||||||
{{- $dims = slice "576x247" "768x329" "992x425" "1200x514" "1400x600" -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- range $width := $widths -}}
|
|
||||||
{{- $dims = $dims | append (printf "%sx%d" $width (int (math.Round (mul (div (float $width) $img.Width) $img.Height)))) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- if $portrait -}}
|
|
||||||
{{- $dims = partial "partials/image-portrait.html" (dict "dim" $dims) -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $scaled := "" -}}
|
|
||||||
{{- range $index, $dim := $dims -}}
|
|
||||||
{{- $clean := path.Ext $img.RelPermalink -}}
|
|
||||||
{{- if $ratio -}}
|
|
||||||
{{- $scaled = $img.Fill (printf "%s webp" $dim) -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $scaled = $img.Fit (printf "%s webp" $dim) -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink $clean (printf "-%s.webp" $dim)) -}}
|
|
||||||
{{- if $absoluteURL -}}
|
|
||||||
{{- $imgset = printf "%s, %s %sw" $imgset $scaled.Permalink (index $widths $index) -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $imgset = printf "%s, %s %sw" $imgset $scaled.RelPermalink (index $widths $index) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $imgset = strings.TrimPrefix ", " $imgset -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- return $imgset -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
<!-- Define the img with optional caption -->
|
|
||||||
{{- define "partials/image-definition.html" -}}
|
|
||||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
|
||||||
{{- $ratio := .ratio -}}
|
|
||||||
{{- $portrait := .portrait -}}
|
|
||||||
{{- $url := .url -}}
|
|
||||||
{{- $wrapper := .wrapper -}}
|
|
||||||
{{- $class := .class -}}
|
|
||||||
{{- $title := .title -}}
|
|
||||||
{{- $caption := .caption -}}
|
|
||||||
{{- $figclass := .figclass -}}
|
|
||||||
{{- $fallbackURL := "" -}}
|
|
||||||
{{- $anchor := "" -}}
|
|
||||||
{{- $imgset := "" -}}
|
|
||||||
{{- $mode := .mode -}}
|
|
||||||
{{- $modes := .modes -}}
|
|
||||||
{{- $lazy := .lazy -}}
|
|
||||||
{{- $page := .page -}}
|
|
||||||
{{- $priority := .priority -}}
|
|
||||||
{{- $isVector := false -}}
|
|
||||||
|
|
||||||
{{- $segments := split $url "#" -}}
|
|
||||||
{{- if gt (len $segments) 2 -}}
|
|
||||||
{{- errorf "Invalid path or url: %q" $url -}}
|
|
||||||
{{- else if eq (len $segments) 2 }}
|
|
||||||
{{- $url = index $segments 0 -}}
|
|
||||||
{{- $anchor = index $segments 1 -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- if hasSuffix $url "svg" -}}
|
|
||||||
{{- $fallbackURL = $url -}}
|
|
||||||
{{- $isVector = true -}}
|
|
||||||
{{- $res := partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
|
|
||||||
{{ if not $res }}
|
|
||||||
{{- if not (fileExists (path.Join "/static" $url)) -}}
|
|
||||||
{{ warnf "Cannot find vector image resource: %q" $url -}}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $res := partial "utilities/GetImage.html" (dict "url" $url "page" $page) -}}
|
|
||||||
{{- $img := "" -}}
|
|
||||||
{{ with $res }}
|
|
||||||
{{ $img = $res.resource }}
|
|
||||||
{{ if $res.mirror }}{{ $class = printf "%s mirrorred" $class }}{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{- if $img -}}
|
|
||||||
{{- $fallback := partial "partials/image-default.html" (dict "img" $img "ratio" $ratio "portrait" $portrait) -}}
|
|
||||||
{{- if $absoluteURL -}}
|
|
||||||
{{- $fallbackURL = $fallback.Permalink -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $fallbackURL = $fallback.RelPermalink -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- $imgset = partial "partials/image-scaled.html " (dict "img" $img "ratio" $ratio "portrait" $portrait) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- range $none := $modes -}}
|
|
||||||
{{- if ne $none $mode -}}
|
|
||||||
{{- $wrapper = printf "%s d-none-%s" (or $wrapper "") $none -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $width := "" -}}
|
|
||||||
{{- $height := "" -}}
|
|
||||||
{{- $input := (split (path.BaseName $fallbackURL) "-") | collections.Reverse -}}
|
|
||||||
{{ if $isVector }}
|
|
||||||
{{- $height = "500" -}}
|
|
||||||
{{ $width = string (partial "utilities/GetWidth.html" (dict "path" $fallbackURL "height" 500)) }}
|
|
||||||
{{- else if gt ($input | len) 1 -}}
|
|
||||||
{{- $dim := (split (index $input 0) "x") -}}
|
|
||||||
{{- if eq ($dim | len) 2 -}}
|
|
||||||
{{- $width = index $dim 0 -}}
|
|
||||||
{{- $height = index $dim 1 -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if $caption -}}
|
|
||||||
<figure {{ with $wrapper }}class="{{ . }}"{{ end }}>
|
|
||||||
{{ end }}
|
|
||||||
<div class="{{ if not $caption }}{{ $wrapper }}{{ end }}">
|
|
||||||
{{- if not $anchor -}}
|
|
||||||
<img class="img-fluid {{ $class }}"
|
|
||||||
src="{{ $fallbackURL }}"
|
|
||||||
{{ if $lazy }}loading="lazy"{{ end }}
|
|
||||||
{{ with $priority }}fetchpriority="{{ . }}"{{ end }}
|
|
||||||
{{ with $imgset -}}srcset="{{ . }}" sizes="100vw"{{- end }}
|
|
||||||
{{ with $height }}height="{{ . }}"{{ end }}
|
|
||||||
{{ with $width }}width="{{ . }}"{{ end }}
|
|
||||||
{{ with $title }}alt="{{ . }}"{{ end }}>
|
|
||||||
{{- else }}
|
|
||||||
<svg class="{{ $class }}">
|
|
||||||
<use href="{{ $fallbackURL }}#{{ $anchor }}"></use>
|
|
||||||
</svg>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{- if $caption -}}
|
|
||||||
<figcaption class="figure-caption{{ with $figclass }} {{ . }}{{ end }}">{{ $caption | safeHTML }}</figcaption>
|
|
||||||
</figure>
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
<!-- Initiate the regular or color-mode image -->
|
|
||||||
{{ $params := dict }}
|
{{ $params := dict }}
|
||||||
{{- $params = merge $params (dict
|
{{- $params = merge $params (dict
|
||||||
|
"page" $page
|
||||||
"ratio" $ratio
|
"ratio" $ratio
|
||||||
"portrait" $portrait
|
"portrait" $portrait
|
||||||
"wrapper" $wrapper
|
"wrapper" $wrapper
|
||||||
@@ -263,26 +46,31 @@
|
|||||||
"figclass" $figclass
|
"figclass" $figclass
|
||||||
"lazy" $lazy
|
"lazy" $lazy
|
||||||
"priority" $priority
|
"priority" $priority
|
||||||
"page" $page)
|
"sizes" $sizes
|
||||||
|
"absoluteURL" $absoluteURL
|
||||||
|
"plain" $plain
|
||||||
|
)
|
||||||
-}}
|
-}}
|
||||||
|
|
||||||
{{- if $mode -}}
|
{{ if not $error }}
|
||||||
{{- $ext := path.Ext $url -}}
|
{{- if $mode -}}
|
||||||
{{- $base := strings.TrimSuffix $ext $url -}}
|
{{- $ext := path.Ext $url -}}
|
||||||
{{- range $suffix := $modes -}}
|
{{- $base := strings.TrimSuffix $ext $url -}}
|
||||||
{{- $base = strings.TrimSuffix (printf "-%s" $suffix) $base -}}
|
{{- range $suffix := $modes -}}
|
||||||
{{- end -}}
|
{{- $base = strings.TrimSuffix (printf "-%s" $suffix) $base -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- range $suffix := $modes -}}
|
{{- range $suffix := $modes -}}
|
||||||
{{- $image := printf "%s-%s%s" $base $suffix $ext -}}
|
{{- $image := printf "%s-%s%s" $base $suffix $ext -}}
|
||||||
{{- $params = merge $params (dict
|
{{- $params = merge $params (dict
|
||||||
"url" $image
|
"url" $image
|
||||||
"mode" $suffix
|
"mode" $suffix
|
||||||
"modes" $modes)
|
"modes" $modes)
|
||||||
-}}
|
-}}
|
||||||
{{- partial "partials/image-definition.html" $params -}}
|
{{- partial "assets/helpers/image-definition.html" $params -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- $params = merge $params (dict "url" $url) -}}
|
||||||
|
{{- partial "assets/helpers/image-definition.html" $params -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ else }}
|
{{ end }}
|
||||||
{{- $params = merge $params (dict "url" $url) -}}
|
|
||||||
{{- partial "partials/image-definition.html" $params -}}
|
|
||||||
{{- end -}}
|
|
@@ -13,14 +13,15 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Initialize arguments -->
|
<!-- Initialize arguments -->
|
||||||
{{ $destination := .destination }}
|
{{ $destination := strings.TrimPrefix (strings.TrimSuffix "/" site.BaseURL) .destination }}
|
||||||
|
|
||||||
{{- $target := "" -}}
|
{{- $target := "" -}}
|
||||||
{{- $rel := "" -}}
|
{{- $rel := "" -}}
|
||||||
{{- $case := .case | default true }}
|
{{- $case := .case | default true }}
|
||||||
|
{{- $external := .external | default false }}
|
||||||
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||||
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||||
{{- $isExternal := ne (urls.Parse (absURL $destination)).Host (urls.Parse site.BaseURL).Host -}}
|
{{- $isExternal := or (ne (urls.Parse (absURL $destination)).Host (urls.Parse site.BaseURL).Host) $external -}}
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $anchor := "" -}}
|
{{- $anchor := "" -}}
|
||||||
{{- $text := .text -}}
|
{{- $text := .text -}}
|
||||||
|
@@ -16,12 +16,18 @@
|
|||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $menu := .menu -}}
|
{{- $menu := .menu -}}
|
||||||
{{- $parent := .parent -}}
|
{{- $parent := .parent -}}
|
||||||
|
{{- $plain := .plain | default false -}}
|
||||||
{{- $class := .class -}}
|
{{- $class := .class -}}
|
||||||
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||||
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||||
|
{{- $baseURL := $page.Scratch.Get "baseURL" | default "/" -}}
|
||||||
{{- $menuURL := (or $menu.PageRef $menu.URL) | relLangURL -}}
|
{{- $menuURL := "" -}}
|
||||||
{{- $pageURL := $page.RelPermalink | relLangURL -}}
|
{{ if or (strings.HasPrefix $menu.PageRef "http") (strings.HasPrefix $menu.URL "http") }}
|
||||||
|
{{ $menuURL = or $menu.PageRef $menu.URL }}
|
||||||
|
{{ else }}
|
||||||
|
{{- $menuURL = urls.JoinPath $baseURL ((or $menu.PageRef $menu.URL) | relLangURL) -}}
|
||||||
|
{{ end }}
|
||||||
|
{{- $pageURL := $page.RelPermalink -}}
|
||||||
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
||||||
{{- $isAlias := $menu.Params.alias -}}
|
{{- $isAlias := $menu.Params.alias -}}
|
||||||
{{- $isIcon := $menu.Params.icon -}}
|
{{- $isIcon := $menu.Params.icon -}}
|
||||||
@@ -51,7 +57,7 @@
|
|||||||
{{- $mainNav = urlize (lower $parent.Name) -}}
|
{{- $mainNav = urlize (lower $parent.Name) -}}
|
||||||
{{- $childNav = urlize (lower $menu.Name) -}}
|
{{- $childNav = urlize (lower $menu.Name) -}}
|
||||||
{{- $anchorClass = "dropdown-item" -}}
|
{{- $anchorClass = "dropdown-item" -}}
|
||||||
{{- else if $menu.HasChildren -}}
|
{{- else if and (not $plain) $menu.HasChildren -}}
|
||||||
{{- $anchorClass = "nav-link dropdown-toggle" -}}
|
{{- $anchorClass = "nav-link dropdown-toggle" -}}
|
||||||
{{- $button = " role=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\"" -}}
|
{{- $button = " role=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\"" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
@@ -65,20 +71,29 @@
|
|||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{. }}{{ end }}"
|
{{ if $menu.Params.button }}
|
||||||
{{ if $isIcon }}aria-label="{{ $menu.Name }}"{{ end }}
|
{{ partial "assets/button.html" (dict
|
||||||
data-nav="main" data-nav-main="{{ $mainNav }}"{{ with $childNav }} data-nav-child="{{ . }}"{{ end }}
|
"title" $menu.Name
|
||||||
href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }} {{ $button | safeHTMLAttr }}>
|
"icon" $menu.Pre
|
||||||
|
"href" $menuURL
|
||||||
|
"size" "sm"
|
||||||
|
)}}
|
||||||
|
{{ else }}
|
||||||
|
<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 }}
|
||||||
|
href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }} {{ $button | safeHTMLAttr }}>
|
||||||
|
|
||||||
{{- with $menu.Pre }}
|
{{- with $menu.Pre }}
|
||||||
{{ if hasPrefix . "<i" }}
|
{{ if hasPrefix . "<i" }}
|
||||||
{{ . | safeHTML }}
|
{{ . | safeHTML }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "assets/icon.html" (dict "icon" (string .) )}}
|
{{ partial "assets/icon.html" (dict "icon" (string .) )}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
<span {{ if $isActive }} class="active"{{ end }}>{{ if not $isIcon }}{{ $menu.Name }}{{ end }}</span>
|
<span {{ if $isActive }} class="active"{{ end }}>{{ if or (not $isIcon) $plain }}{{ $menu.Name }}{{ end }}</span>
|
||||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||||
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
||||||
</a>
|
</a>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
@@ -16,36 +16,16 @@
|
|||||||
|
|
||||||
<!-- Inline partial to render the color mode switcher -->
|
<!-- Inline partial to render the color mode switcher -->
|
||||||
{{- define "partials/navbar-mode.html" -}}
|
{{- define "partials/navbar-mode.html" -}}
|
||||||
{{- $size := .size -}}
|
{{- $id := .id | default "navbar-mode" -}}
|
||||||
{{- $collapsed := .collapsed -}}
|
|
||||||
{{- $id := .id -}}
|
|
||||||
|
|
||||||
<li class="nav-item dropdown {{ if $collapsed }}d-{{ $size }}-none{{ else }}d-none d-{{ $size }}-block{{ end }}">
|
<div class="d-flex mode-switch align-items-center" id="{{ $id }}">
|
||||||
<a class="nav-link dropdown-toggle" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "colorMode" }}" aria-expanded="false" id="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}">
|
<input type="checkbox" class="checkbox navbar-mode-selector" id="{{ $id }}-checkbox" />
|
||||||
<span class="theme-icon-active">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw") }}</span>{{ if $collapsed }} {{ T "colorMode" }}{{ end }}
|
<label class="label" for="{{ $id }}-checkbox">
|
||||||
<span class="d-md-none"></span>
|
{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw" "spacing" false) }}
|
||||||
</a>
|
{{- partial "assets/icon.html" (dict "icon" "fas moon fa-fw" "spacing" false) }}
|
||||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}">
|
<div class="ball"></div>
|
||||||
<li>
|
</label>
|
||||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="light" href="#!">
|
</div>
|
||||||
<span class="theme-icon">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw" "spacing" false) }}</span>
|
|
||||||
{{- T "colorLight" }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="dark" href="#!">
|
|
||||||
<span class="theme-icon">{{- partial "assets/icon.html" (dict "icon" "fas moon fa-fw" "spacing" false) }}</span>
|
|
||||||
{{- T "colorDark" }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="auto" href="#!">
|
|
||||||
<span class="theme-icon">{{- partial "assets/icon.html" (dict "icon" "fas circle-half-stroke fa-fw" "spacing" false) }}</span>
|
|
||||||
{{- T "colorAuto" }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Inline partial to render the version switcher -->
|
<!-- Inline partial to render the version switcher -->
|
||||||
@@ -53,6 +33,7 @@
|
|||||||
{{- $size := .size -}}
|
{{- $size := .size -}}
|
||||||
{{- $collapsed := .collapsed -}}
|
{{- $collapsed := .collapsed -}}
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
|
{{- $baseURL := .baseURL -}}
|
||||||
{{- $list := site.Params.docs.releases -}}
|
{{- $list := site.Params.docs.releases -}}
|
||||||
{{- $id := .id -}}
|
{{- $id := .id -}}
|
||||||
{{- $version := partial "utilities/GetVersion.html" (dict "page" $page) -}}
|
{{- $version := partial "utilities/GetVersion.html" (dict "page" $page) -}}
|
||||||
@@ -70,7 +51,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ if $item.url }}
|
{{ if $item.url }}
|
||||||
<li>
|
<li>
|
||||||
{{- $url := (path.Join $item.url) | relLangURL -}}
|
{{- $url := (urls.JoinPath $baseURL $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 }}
|
<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 $item.latest }} ({{ T "latest" }}){{ end }}
|
||||||
{{ if $active }}
|
{{ if $active }}
|
||||||
@@ -86,7 +67,7 @@
|
|||||||
{{- if site.Params.docs.overview -}}
|
{{- if site.Params.docs.overview -}}
|
||||||
{{ if gt (len $list) 0 }}<li><hr class="dropdown-divider"></li>{{ end }}
|
{{ if gt (len $list) 0 }}<li><hr class="dropdown-divider"></li>{{ end }}
|
||||||
<li>
|
<li>
|
||||||
{{- $url := (path.Join site.Params.docs.overview) | relLangURL -}}
|
{{- $url := (urls.JoinPath $baseURL site.Params.docs.overview) | relLangURL -}}
|
||||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" href="{{ $url }}">{{ T "allVersions" }}</a>
|
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" href="{{ $url }}">{{ T "allVersions" }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -98,6 +79,7 @@
|
|||||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
||||||
{{- $id := .id | default (printf "navbar-%d" 0) -}}
|
{{- $id := .id | default (printf "navbar-%d" 0) -}}
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
|
{{- $baseURL := $page.Scratch.Get "baseURL" -}}
|
||||||
|
|
||||||
{{- $defaultMenu := "main" -}}
|
{{- $defaultMenu := "main" -}}
|
||||||
{{- $menuName := .menus | default $defaultMenu }}
|
{{- $menuName := .menus | default $defaultMenu }}
|
||||||
@@ -117,6 +99,7 @@
|
|||||||
{{- $search := .search | default site.Params.navigation.search -}}
|
{{- $search := .search | default site.Params.navigation.search -}}
|
||||||
{{- $searchModal := and $search site.Params.navigation.searchModal -}}
|
{{- $searchModal := and $search site.Params.navigation.searchModal -}}
|
||||||
{{- $enableDarkMode := .mode | default site.Params.main.enableDarkMode -}}
|
{{- $enableDarkMode := .mode | default site.Params.main.enableDarkMode -}}
|
||||||
|
{{- $modes := site.Params.main.modes | default (slice "light" "dark") -}}
|
||||||
|
|
||||||
{{- $enableVersions := false -}}
|
{{- $enableVersions := false -}}
|
||||||
{{ $list := site.Params.docs.releases }}
|
{{ $list := site.Params.docs.releases }}
|
||||||
@@ -132,8 +115,15 @@
|
|||||||
{{- $logoDark := "" -}}
|
{{- $logoDark := "" -}}
|
||||||
{{- if $enableDarkMode -}}
|
{{- if $enableDarkMode -}}
|
||||||
{{ $ext := path.Ext $logo -}}
|
{{ $ext := path.Ext $logo -}}
|
||||||
{{- $logoLight = printf "%s-light%s" (strings.TrimSuffix $ext $logo) $ext -}}
|
{{- $ext := path.Ext $logo -}}
|
||||||
{{- $logoDark = printf "%s-dark%s" (strings.TrimSuffix $ext $logo) $ext -}}
|
{{- $base := strings.TrimSuffix $ext $logo -}}
|
||||||
|
{{- range $suffix := $modes -}}
|
||||||
|
{{- $base = strings.TrimSuffix (printf "-%s" $suffix) $base -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $logoLight = printf "%s-light%s" $base $ext -}}
|
||||||
|
{{- $logoDark = printf "%s-dark%s" $base $ext -}}
|
||||||
|
|
||||||
{{- $light := fileExists (path.Join "/static" $logoLight) -}}
|
{{- $light := fileExists (path.Join "/static" $logoLight) -}}
|
||||||
{{- $dark := fileExists (path.Join "/static" $logoDark) -}}
|
{{- $dark := fileExists (path.Join "/static" $logoDark) -}}
|
||||||
{{- if and $light (not $dark) -}}
|
{{- if and $light (not $dark) -}}
|
||||||
@@ -152,6 +142,10 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ if $logo }}{{ $logo = urls.JoinPath $baseURL $logo }}{{ end }}
|
||||||
|
{{ if $logoLight }}{{ $logoLight = urls.JoinPath $baseURL $logoLight }}{{ end }}
|
||||||
|
{{ if $logoDark }}{{ $logoDark = urls.JoinPath $baseURL $logoDark }}{{ end }}
|
||||||
|
|
||||||
{{- $title := site.Title -}}
|
{{- $title := site.Title -}}
|
||||||
{{- if .title -}}
|
{{- if .title -}}
|
||||||
{{- $title = .title -}}
|
{{- $title = .title -}}
|
||||||
@@ -170,6 +164,11 @@
|
|||||||
{{- $contrast := false -}}
|
{{- $contrast := false -}}
|
||||||
{{- if in (slice "primary" "secondary" "success" "danger") $color }}{{ $contrast = true }}{{ end -}}
|
{{- if in (slice "primary" "secondary" "success" "danger") $color }}{{ $contrast = true }}{{ end -}}
|
||||||
|
|
||||||
|
{{- $flex := false }}
|
||||||
|
{{ if gt (where $menus "Params.spacing" true | len) 0 }}
|
||||||
|
{{ $flex = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
||||||
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
||||||
@@ -204,8 +203,8 @@
|
|||||||
<a class="navbar-brand" href="{{ site.Home.RelPermalink }}" aria-label="{{ T "home" }}">
|
<a class="navbar-brand" href="{{ site.Home.RelPermalink }}" aria-label="{{ T "home" }}">
|
||||||
{{- if (and $logoLight $logoDark) -}}
|
{{- if (and $logoLight $logoDark) -}}
|
||||||
{{ $width := partial "utilities/GetWidth.html" (dict "path" $logoLight "height" 30) }}
|
{{ $width := partial "utilities/GetWidth.html" (dict "path" $logoLight "height" 30) }}
|
||||||
<img src="{{if $absoluteURL }}{{ absURL $logoLight }}{{ else }}{{ $logoLight }}{{ end }}" class="d-none-dark" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
<img src="{{if $absoluteURL }}{{ absURL $logoLight }}{{ else }}{{ $logoLight }}{{ end }}" class="d-none-inline-dark" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
||||||
<img src="{{if $absoluteURL }}{{ absURL $logoDark }}{{ else }}{{ $logoDark }}{{ end }}" class="d-none-light" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
<img src="{{if $absoluteURL }}{{ absURL $logoDark }}{{ else }}{{ $logoDark }}{{ end }}" class="d-none-inline-light" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
||||||
{{- else if $logo -}}
|
{{- else if $logo -}}
|
||||||
{{ $width := partial "utilities/GetWidth.html" (dict "path" $logo "height" 30) }}
|
{{ $width := partial "utilities/GetWidth.html" (dict "path" $logo "height" 30) }}
|
||||||
<img src="{{if $absoluteURL }}{{ absURL $logo }}{{ else }}{{ $logo }}{{ end }}" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
<img src="{{if $absoluteURL }}{{ absURL $logo }}{{ else }}{{ $logo }}{{ end }}" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
||||||
@@ -231,23 +230,27 @@
|
|||||||
{{- if and $search (not $searchModal) }}{{ partial "assets/search-input.html" }}{{ end -}}
|
{{- if and $search (not $searchModal) }}{{ partial "assets/search-input.html" }}{{ end -}}
|
||||||
|
|
||||||
<!-- Render top-menu items (maximum depth of 2) -->
|
<!-- Render top-menu items (maximum depth of 2) -->
|
||||||
<ul class="navbar-nav ms-auto">
|
<ul class="navbar-nav {{ if $flex }}d-flex w-100{{ else }}ms-auto{{ end }}">
|
||||||
{{- range $menu := $menus -}}
|
{{- range $menu := $menus -}}
|
||||||
<li class="nav-item{{ if .HasChildren }} dropdown{{ if $horizontal }} dropdown-horizontal-{{ $size }}{{ end }}{{ end }}">
|
{{ if $menu.Params.spacing }}
|
||||||
{{- partial "assets/navbar-item.html" (dict "menu" $menu "page" $page) -}}
|
<li class="nav-item flex-grow-1"></li>
|
||||||
{{- if .HasChildren -}}
|
{{ else }}
|
||||||
<ul class="dropdown-menu">
|
<li class="nav-item {{ if .HasChildren }} dropdown{{ if $horizontal }} dropdown-horizontal-{{ $size }}{{ end }}{{ end }}">
|
||||||
{{- range .Children -}}
|
{{- partial "assets/navbar-item.html" (dict "menu" $menu "page" $page) -}}
|
||||||
<li>{{- partial "assets/navbar-item.html" (dict "menu" . "parent" $menu "page" $page) -}}</li>
|
{{- if .HasChildren -}}
|
||||||
{{- end -}}
|
<ul class="dropdown-menu">
|
||||||
</ul>
|
{{- range .Children -}}
|
||||||
{{- end -}}
|
<li>{{- partial "assets/navbar-item.html" (dict "menu" . "parent" $menu "page" $page) -}}</li>
|
||||||
</li>
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
{{- end -}}
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Insert divider if applicable -->
|
<!-- Insert divider if applicable -->
|
||||||
{{- if and $menus (or $enableLanguage $enableVersions) -}}
|
{{- if and $menus (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 me-auto">
|
||||||
<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>
|
||||||
<li><hr class="dropdown-divider-bg"></li>
|
<li><hr class="dropdown-divider-bg"></li>
|
||||||
@@ -255,14 +258,14 @@
|
|||||||
|
|
||||||
<!-- Insert version switcher -->
|
<!-- Insert version switcher -->
|
||||||
{{- if $enableVersions -}}
|
{{- if $enableVersions -}}
|
||||||
{{- partial "partials/navbar-versions.html" (dict "page" $page "size" $size "collapsed" true "id" .id) -}}
|
{{- partial "partials/navbar-versions.html" (dict "page" $page "size" $size "collapsed" true "id" .id "baseURL" $baseURL) -}}
|
||||||
{{- partial "partials/navbar-versions.html" (dict "page" $page "size" $size "collapsed" false "id" .id) -}}
|
{{- partial "partials/navbar-versions.html" (dict "page" $page "size" $size "collapsed" false "id" .id "baseURL" $baseURL) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Insert language switcher if applicable -->
|
<!-- Insert language switcher if applicable -->
|
||||||
{{- if $enableLanguage -}}
|
{{- if $enableLanguage -}}
|
||||||
{{- $currentLang := $page.Language.Lang -}}
|
{{- $currentLang := $page.Language.Lang -}}
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown me-auto">
|
||||||
<a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
|
<a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }} {{ T "languageSwitcherLabel" }}
|
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }} {{ T "languageSwitcherLabel" }}
|
||||||
</a>
|
</a>
|
||||||
@@ -276,7 +279,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- range site.Languages -}}
|
{{- range site.Languages -}}
|
||||||
<li><a class="dropdown-item" href="/{{ .Lang }}">{{ default .Lang .LanguageName }}</a></li>
|
<li><a class="dropdown-item" href="{{ urls.JoinPath $baseURL .Lang }}">{{ default .Lang .LanguageName }}</a></li>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -286,12 +289,11 @@
|
|||||||
<!-- Insert color mode switcher -->
|
<!-- Insert color mode switcher -->
|
||||||
{{- if $enableDarkMode -}}
|
{{- if $enableDarkMode -}}
|
||||||
{{- partial "partials/navbar-mode.html" (dict "size" $size "collapsed" true "id" .id) -}}
|
{{- partial "partials/navbar-mode.html" (dict "size" $size "collapsed" true "id" .id) -}}
|
||||||
{{- partial "partials/navbar-mode.html" (dict "size" $size "collapsed" false "id" .id) -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Insert modal search button -->
|
<!-- Insert modal search button -->
|
||||||
{{- if $searchModal }}
|
{{- if $searchModal }}
|
||||||
<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 me-auto">
|
||||||
<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>
|
||||||
<li><hr class="dropdown-divider-bg"></li>
|
<li><hr class="dropdown-divider-bg"></li>
|
||||||
|
@@ -21,22 +21,30 @@
|
|||||||
{{- 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">{{ partial "assets/icon.html" (dict "icon" "fas angles-left") }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-left" "spacing" false) }}</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="page-item disabled">
|
<li class="page-item disabled">
|
||||||
<a aria-disabled="true" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-left") }}</span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button" tabindex="-1">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-left" "spacing" false) }}</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">{{ partial "assets/icon.html" (dict "icon" "fas angle-left") }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-left" "spacing" false) }}</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">{{ partial "assets/icon.html" (dict "icon" "fas angle-left") }}</span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button" tabindex="-1">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-left" "spacing" false) }}</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -61,22 +69,30 @@
|
|||||||
|
|
||||||
{{- 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">{{ partial "assets/icon.html" (dict "icon" "fas angle-right") }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-right" "spacing" false) }}</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">{{ partial "assets/icon.html" (dict "icon" "fas angle-right") }}</span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationNext" }}" class="page-link" role="button" tabindex="-1">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-right" "spacing" false) }}</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Last }}
|
{{- with .Last }}
|
||||||
{{- if ne $currentPageNumber .PageNumber }}
|
{{- if ne $currentPageNumber .PageNumber }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right") }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right" "spacing" false) }}</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="page-item disabled">
|
<li class="page-item disabled">
|
||||||
<a aria-disabled="true" aria-label="{{ T "paginationLast" }}" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right") }}</span></a>
|
<a aria-disabled="true" aria-label="{{ T "paginationLast" }}" class="page-link" role="button" tabindex="-1">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right" "spacing" false) }}</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -90,14 +106,18 @@
|
|||||||
{{- 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">{{ partial "assets/icon.html" (dict "icon" "fas angles-left") }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationFirst" }}" class="page-link" role="button">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-left" "spacing" false) }}</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">{{ partial "assets/icon.html" (dict "icon" "fas angle-left") }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationPrevious" }}" class="page-link" role="button">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-left" "spacing" false) }}</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@@ -122,14 +142,18 @@
|
|||||||
|
|
||||||
{{- 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">{{ partial "assets/icon.html" (dict "icon" "fas angle-right") }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationNext" }}" class="page-link" role="button">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angle-right" "spacing" false) }}</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Last }}
|
{{- with .Last }}
|
||||||
{{- if ne $currentPageNumber .PageNumber }}
|
{{- if ne $currentPageNumber .PageNumber }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button"><span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right") }}</span></a>
|
<a href="{{ .URL }}" aria-label="{{ T "paginationLast" }}" class="page-link" role="button">
|
||||||
|
<span aria-hidden="true">{{ partial "assets/icon.html" (dict "icon" "fas angles-right" "spacing" false) }}</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
{{- $page := .page }}
|
{{- $page := .page }}
|
||||||
{{- $section := .section }}
|
{{- $section := .section }}
|
||||||
{{- if not $section }}{{ errorf "partial [assets/section-list.html] - Missing value for param 'section'" }}{{ end -}}
|
{{- if not $section }}{{ errorf "partial [assets/section-list.html] - Missing value for param 'section'" }}{{ end -}}
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
<!-- Initialize arguments -->
|
<!-- Initialize arguments -->
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
|
{{- $breakpoint := .page.Scratch.Get "breakpoint" -}}
|
||||||
{{ $items := $page.Parent.Sections }}
|
{{ $items := $page.Parent.Sections }}
|
||||||
{{ if not $page.Parent.Section }}
|
{{ if not $page.Parent.Section }}
|
||||||
{{ $items = $page.Sections }}
|
{{ $items = $page.Sections }}
|
||||||
@@ -21,7 +22,7 @@
|
|||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{- if and (not $error) (gt (len $items) 0) }}
|
{{- if and (not $error) (gt (len $items) 0) }}
|
||||||
<div class="d-grid gap-2 mx-auto d-md-none">
|
<div class="d-grid gap-2 mx-auto d-{{ $breakpoint.prev }}-none">
|
||||||
{{ partial "assets/button.html" (dict
|
{{ partial "assets/button.html" (dict
|
||||||
"title" (T "sectionMenu")
|
"title" (T "sectionMenu")
|
||||||
"color" "secondary"
|
"color" "secondary"
|
||||||
@@ -36,7 +37,7 @@
|
|||||||
-}}
|
-}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse border bg-body-tertiary rounded p-1 navbar-nav-scroll" id="toc-collapse">
|
<div class="collapse border bg-body-tertiary rounded p-1 navbar-nav-scroll d-{{ $breakpoint.prev }}-none" id="toc-collapse">
|
||||||
<div class="toc toc-panel section-menu text-body p-2 fs-6">
|
<div class="toc toc-panel section-menu text-body p-2 fs-6">
|
||||||
{{- range $items }}
|
{{- range $items }}
|
||||||
{{ $active := eq $page.RelPermalink .RelPermalink }}
|
{{ $active := eq $page.RelPermalink .RelPermalink }}
|
||||||
@@ -45,7 +46,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav class="navbar navbar-expand navbar-services p-0 fs-5 d-none d-md-block">
|
<div class="d-{{ $breakpoint.prev }}-none mb-5"></div>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand navbar-services p-0 fs-5 d-none d-{{ $breakpoint.prev }}-block mb-5">
|
||||||
<div class="container-fluid p-0 pb-3">
|
<div class="container-fluid p-0 pb-3">
|
||||||
<div class="collapse navbar-collapse" id="navbarNav">
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
<ul class="navbar-nav">
|
<ul class="navbar-nav">
|
||||||
|
@@ -26,8 +26,8 @@
|
|||||||
{{- $group := .group -}}
|
{{- $group := .group -}}
|
||||||
{{- $data := .menu -}}
|
{{- $data := .menu -}}
|
||||||
|
|
||||||
{{- $doc_slug := $group.title | urlize -}}
|
{{- $doc_slug := urls.JoinPath $baseURL ($group.title | urlize) -}}
|
||||||
{{- $href := or $group.link (printf "%s/" (relLangURL (path.Join $baseURL $doc_slug))) -}}
|
{{- $href := or $group.link $doc_slug -}}
|
||||||
{{- $collapsed := strings.HasPrefix $page.RelPermalink $href -}}
|
{{- $collapsed := strings.HasPrefix $page.RelPermalink $href -}}
|
||||||
|
|
||||||
<li class="mb-1">
|
<li class="mb-1">
|
||||||
@@ -71,11 +71,18 @@
|
|||||||
{{- $level := .level -}}
|
{{- $level := .level -}}
|
||||||
{{- $baseURL := .baseURL -}}
|
{{- $baseURL := .baseURL -}}
|
||||||
{{- $title := .title -}}
|
{{- $title := .title -}}
|
||||||
{{- $href := .href -}}
|
|
||||||
{{- $data := .menu -}}
|
{{- $data := .menu -}}
|
||||||
|
{{ $href := "" }}
|
||||||
|
|
||||||
{{- $doc_slug := $title | urlize -}}
|
{{ with .href }}
|
||||||
{{- $href := or $href (printf "%s/" (relLangURL (path.Join $baseURL $doc_slug))) -}}
|
{{ if hasPrefix . "http" }}
|
||||||
|
{{ $href = . }}
|
||||||
|
{{ else }}
|
||||||
|
{{- $href = urls.JoinPath $baseURL . -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{- $href = urls.JoinPath $baseURL ($title | urlize) -}}
|
||||||
|
{{ end }}
|
||||||
{{- $active := eq (strings.TrimSuffix "/" $page.RelPermalink) (strings.TrimSuffix "/" $href) -}}
|
{{- $active := eq (strings.TrimSuffix "/" $page.RelPermalink) (strings.TrimSuffix "/" $href) -}}
|
||||||
|
|
||||||
{{ if eq $level 0}}
|
{{ if eq $level 0}}
|
||||||
@@ -114,7 +121,8 @@
|
|||||||
<nav class="sidebar flex-shrink-0 ps-1 pt-3" aria-label="{{ (strings.FirstUpper $section) }} navigation">
|
<nav class="sidebar flex-shrink-0 ps-1 pt-3" aria-label="{{ (strings.FirstUpper $section) }} navigation">
|
||||||
{{- $sectionBreak := false -}}
|
{{- $sectionBreak := false -}}
|
||||||
{{- $level := 0 -}}
|
{{- $level := 0 -}}
|
||||||
{{- $baseURL := relLangURL (path.Join $section $version) }}
|
{{ $baseURL := $page.Scratch.Get "baseURL" | default "/" -}}
|
||||||
|
{{ $baseURL = urls.JoinPath "/" (strings.TrimPrefix $baseURL (urls.JoinPath $section $version | relLangURL)) }}
|
||||||
|
|
||||||
<ul class="list-unstyled ps-0">
|
<ul class="list-unstyled ps-0">
|
||||||
{{- range $index, $item := $data -}}
|
{{- range $index, $item := $data -}}
|
||||||
|
@@ -1,6 +1,15 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
{{ $page := .page }}
|
{{ $page := .page }}
|
||||||
{{ $input := .input }}
|
{{ $input := .input }}
|
||||||
{{ $args := .args }}
|
{{ $args := .args }}
|
||||||
|
{{ $sortable := .sortable | default false }}
|
||||||
|
{{ $paging := .paging | default false }}
|
||||||
|
{{ $searchable := .searchable | default false }}
|
||||||
|
|
||||||
{{- $responsiveVals := slice "table-responsive" "table-responsive-none" "table-responsive-sm" "table-responsive-md" "table-responsive-lg" "table-responsive-xl" "table-responsive-xxl" -}}
|
{{- $responsiveVals := slice "table-responsive" "table-responsive-none" "table-responsive-sm" "table-responsive-md" "table-responsive-lg" "table-responsive-xl" "table-responsive-xxl" -}}
|
||||||
{{- $responsive := intersect $args $responsiveVals -}}
|
{{- $responsive := intersect $args $responsiveVals -}}
|
||||||
@@ -12,13 +21,21 @@
|
|||||||
{{ $responsive = (slice "table-responsive") -}}
|
{{ $responsive = (slice "table-responsive") -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $class := delimit $main " " -}}
|
||||||
|
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
|
||||||
{{- $input := $input | $page.RenderString }}
|
{{- $input := $input | $page.RenderString }}
|
||||||
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
||||||
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
||||||
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
||||||
{{- $class := delimit $main " " -}}
|
|
||||||
|
{{ $attributes := "" }}
|
||||||
|
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
||||||
|
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=true" $attributes }}{{ end }}
|
||||||
|
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
|
||||||
|
|
||||||
{{- $old := "<table>" -}}
|
{{- $old := "<table>" -}}
|
||||||
{{- $new := printf "<table class=\"table %s\">" $class -}}
|
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
||||||
|
|
||||||
{{ $input := replace $input $old $new -}}
|
{{ $input := replace $input $old $new -}}
|
||||||
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
|
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
|
||||||
{{ $input | safeHTML }}
|
{{ $input | safeHTML }}
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
{{ $headings := .headings | default slice }}
|
{{ $headings := .headings | default slice }}
|
||||||
{{- range .Fragments.Headings }}
|
{{- range .Fragments.Headings }}
|
||||||
{{- range .Headings }}
|
{{- range .Headings }}
|
||||||
|
@@ -4,20 +4,26 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $page_modules = $page_modules | append .Params.modules }}
|
{{ $page_modules = $page_modules | append .Params.modules }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with .Scratch.Get "dependencies" }}{{ $page_modules = append $page_modules . | uniq }}{{ end }}
|
||||||
|
|
||||||
{{- $modules := site.Params.modules.optional | intersect $page_modules -}}
|
{{ $config := page.Scratch.Get "modules" }}
|
||||||
|
{{ if not $config }}
|
||||||
|
{{ errorf "partial [footer/optional-scripts.html] - Cannot initialize module configuration" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- $modules := $config.optional | intersect $page_modules -}}
|
||||||
{{- range $index, $mod := $modules -}}
|
{{- range $index, $mod := $modules -}}
|
||||||
{{- $filename := printf "js/%s.bundle.js" $mod -}}
|
{{- $filename := printf "js/%s.bundle.js" $mod -}}
|
||||||
{{- $match := printf "js/modules/%s/**.js" $mod -}}
|
{{- $match := printf "js/modules/%s/**.js" $mod -}}
|
||||||
{{- $skipTemplate := false -}}
|
{{- $skipTemplate := false -}}
|
||||||
{{- if reflect.IsSlice site.Params.modules.disableTemplate -}}
|
{{- if reflect.IsSlice $config.disableTemplate -}}
|
||||||
{{- if in site.Params.modules.disableTemplate $mod}}
|
{{- if in $config.disableTemplate $mod}}
|
||||||
{{- $skipTemplate = true -}}
|
{{- $skipTemplate = true -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ $state := "" }}
|
{{ $state := "" }}
|
||||||
{{- with (index site.Params.modules $mod) -}}
|
{{- with (index $config.modules $mod) -}}
|
||||||
{{- with index . "state" }}{{ $state = . }}{{ end -}}
|
{{- with index . "state" }}{{ $state = . }}{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@@ -14,9 +14,14 @@
|
|||||||
{{- errorf "partial [footer/script.html] - Invalid value for param 'processing': %s" $state -}}
|
{{- errorf "partial [footer/script.html] - Invalid value for param 'processing': %s" $state -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ $config := page.Scratch.Get "modules" }}
|
||||||
|
{{ if not $config }}
|
||||||
|
{{ errorf "partial [footer/scripts.html] - Cannot initialize module configuration" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{- $modules := "" -}}
|
{{- $modules := "" -}}
|
||||||
{{ if $core }}
|
{{ if $core }}
|
||||||
{{- $modules = site.Params.modules.core -}}
|
{{- $modules = $config.core -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $bundle := partial "utilities/bundle" (dict "match" $match "filename" $filename "modules" $modules "basepath" "js/modules" "all" true "debugging" site.Params.debugging.showJS) -}}
|
{{- $bundle := partial "utilities/bundle" (dict "match" $match "filename" $filename "modules" $modules "basepath" "js/modules" "all" true "debugging" site.Params.debugging.showJS) -}}
|
||||||
|
@@ -7,8 +7,15 @@
|
|||||||
<meta name="theme" content="{{ printf "Hinode %s" $version }}">
|
<meta name="theme" content="{{ printf "Hinode %s" $version }}">
|
||||||
{{ partialCached "head/stylesheet-core.html" . -}}
|
{{ partialCached "head/stylesheet-core.html" . -}}
|
||||||
|
|
||||||
|
|
||||||
|
{{ $config := page.Scratch.Get "modules" }}
|
||||||
|
{{ if not $config }}
|
||||||
|
{{ errorf "partial [head/head.html] - Cannot initialize module configuration" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ $page_modules := slice | append .Page.Params.modules }}
|
{{ $page_modules := slice | append .Page.Params.modules }}
|
||||||
{{- $modules := site.Params.modules.optional | intersect $page_modules -}}
|
{{ with .Scratch.Get "dependencies" }}{{ $page_modules = append $page_modules . | uniq }}{{ end }}
|
||||||
|
{{- $modules := $config.optional | intersect $page_modules -}}
|
||||||
{{- range $index, $mod := $modules -}}
|
{{- range $index, $mod := $modules -}}
|
||||||
{{- $source := printf "scss/%s.scss" $mod -}}
|
{{- $source := printf "scss/%s.scss" $mod -}}
|
||||||
{{- $target := printf "css/%s.css" $mod -}}
|
{{- $target := printf "css/%s.css" $mod -}}
|
||||||
@@ -19,7 +26,7 @@
|
|||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link rel="stylesheet" href="{{ .Site.Params.style.themeFontPath | default "https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap" }}">
|
<link rel="stylesheet" href="{{ .Site.Params.style.themeFontPath | default "https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap" }}">
|
||||||
{{ else if .Site.Params.style.themeFontPreload }}
|
{{ else if .Site.Params.style.themeFontPreload }}
|
||||||
{{ $font := .Site.Params.style.themeFontPreload }}
|
{{ $font := partial "utilities/GetStaticURL" (dict "url" .Site.Params.style.themeFontPreload) }}
|
||||||
<link rel="preload" href="{{ $font }}" as="font" type="font/{{ strings.TrimPrefix "." (path.Ext $font) }}" crossorigin>
|
<link rel="preload" href="{{ $font }}" as="font" type="font/{{ strings.TrimPrefix "." (path.Ext $font) }}" crossorigin>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partial "head/seo.html" . }}
|
{{ partial "head/seo.html" . }}
|
||||||
|
@@ -35,7 +35,9 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ $base := partial "utilities/GetStaticURL" (dict "url" "/") }}
|
||||||
{{- range resources.Match "icons/**.svg" -}}
|
{{- range resources.Match "icons/**.svg" -}}
|
||||||
{{- $icon := . | resources.ExecuteAsTemplate .RelPermalink $params -}}
|
{{- $target := strings.TrimPrefix $base .RelPermalink -}}
|
||||||
|
{{- $icon := . | resources.ExecuteAsTemplate $target $params -}}
|
||||||
{{- $icon.Publish -}}
|
{{- $icon.Publish -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
@@ -14,16 +14,9 @@
|
|||||||
{{ $.Scratch.Set "description" $description -}}
|
{{ $.Scratch.Set "description" $description -}}
|
||||||
|
|
||||||
{{- $thumbnail := (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) -}}
|
{{- $thumbnail := (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) -}}
|
||||||
{{ with $thumbnail -}}
|
{{ if $thumbnail -}}
|
||||||
{{- $res := partial "utilities/GetImage.html" (dict "url" .) -}}
|
{{ $imgURL := index (partial "assets/helpers/image-dimension.html" (dict "url" $thumbnail "width" 1280 "height" 640 "page" .)) "target" }}
|
||||||
{{- $img := "" -}}
|
{{ $.Scratch.Set "thumbnail" ($imgURL | absURL) -}}
|
||||||
{{ with $res }}{{ $img = $res.resource }}{{ end }}
|
|
||||||
{{ with $img -}}
|
|
||||||
{{ $dim := "1280x640" -}}
|
|
||||||
{{ $scaled := (.Fill (printf "%s jpg" $dim)) -}}
|
|
||||||
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink ".jpg" (printf "-%s.jpg" $dim)) -}}
|
|
||||||
{{ $.Scratch.Set "thumbnail" ($scaled.Permalink | absURL) -}}
|
|
||||||
{{ end -}}
|
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
{{ with .Site.Params.schema.image.url -}}
|
{{ with .Site.Params.schema.image.url -}}
|
||||||
{{ $.Scratch.Set "thumbnail" (. | absURL) -}}
|
{{ $.Scratch.Set "thumbnail" (. | absURL) -}}
|
||||||
|
@@ -14,11 +14,16 @@
|
|||||||
{{- $core := .core | default true -}}
|
{{- $core := .core | default true -}}
|
||||||
|
|
||||||
{{- $modules := "" -}}
|
{{- $modules := "" -}}
|
||||||
|
{{ $config := page.Scratch.Get "modules" }}
|
||||||
|
{{ if not $config }}
|
||||||
|
{{ errorf "partial [head/stylesheet.html] - Cannot initialize module configuration" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if $core }}
|
{{ if $core }}
|
||||||
{{- if reflect.IsSlice site.Params.modules.excludeSCSS -}}
|
{{- if reflect.IsSlice $config.excludeSCSS -}}
|
||||||
{{- $modules = complement site.Params.modules.excludeSCSS (or site.Params.modules.core slice) -}}
|
{{- $modules = complement $config.excludeSCSS (or $config.core slice) -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{- $modules = site.Params.modules.core -}}
|
{{- $modules = $config.core -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@@ -35,6 +40,7 @@
|
|||||||
{{- $overlayOffset := $navbarOffset -}}
|
{{- $overlayOffset := $navbarOffset -}}
|
||||||
{{- if site.Params.navigation.overlay }}{{ $overlayOffset = "0rem" }}{{ end }}
|
{{- if site.Params.navigation.overlay }}{{ $overlayOffset = "0rem" }}{{ end }}
|
||||||
{{- $vars := dict
|
{{- $vars := dict
|
||||||
|
"base-url" (page.Scratch.Get "baseURL" | default "/")
|
||||||
"theme-font" (default "Inter" site.Params.style.themeFont)
|
"theme-font" (default "Inter" site.Params.style.themeFont)
|
||||||
"font-size-base" (default "1rem" site.Params.style.fontSizeBase)
|
"font-size-base" (default "1rem" site.Params.style.fontSizeBase)
|
||||||
"primary" (default "#007bff" site.Params.style.primary)
|
"primary" (default "#007bff" site.Params.style.primary)
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
{{- $orientation := .orientation | default "stacked" -}}
|
{{- $orientation := .orientation | default "stacked" -}}
|
||||||
{{- $actions := .actions -}}
|
{{- $actions := .actions -}}
|
||||||
{{- $width := .width | default 6 }}
|
{{- $width := .width | default 6 }}
|
||||||
|
{{ $sizes := "100vw" }}
|
||||||
{{- if or (lt $width 1) (gt $width 12) -}}
|
{{- if or (lt $width 1) (gt $width 12) -}}
|
||||||
{{- $width = 6 -}}
|
{{- $width = 6 -}}
|
||||||
{{- warnf "partial [list/featured.html] - Invalid column width: %d" $width -}}
|
{{- warnf "partial [list/featured.html] - Invalid column width: %d" $width -}}
|
||||||
@@ -19,6 +20,11 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $breadcrumb := and (not $page.IsHome) site.Params.navigation.breadcrumb -}}
|
{{- $breadcrumb := and (not $page.IsHome) site.Params.navigation.breadcrumb -}}
|
||||||
|
|
||||||
|
{{- define "partials/list/featured-sizes.html" }}
|
||||||
|
{{ $sizes := printf "(min-width: 768px) %dvw, 50vw" (int (math.Round (div (mul .width 100) 12))) }}
|
||||||
|
{{ return $sizes }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{- define "partials/list/featured-body.html" }}
|
{{- define "partials/list/featured-body.html" }}
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $headings := .headings -}}
|
{{- $headings := .headings -}}
|
||||||
@@ -44,6 +50,7 @@
|
|||||||
{{- define "partials/list/featured-illustration.html" }}
|
{{- define "partials/list/featured-illustration.html" }}
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $style := printf "img-wrap mx-auto mx-md-0 %s" .style -}}
|
{{- $style := printf "img-wrap mx-auto mx-md-0 %s" .style -}}
|
||||||
|
{{ $sizes := .sizes }}
|
||||||
|
|
||||||
{{ if $page.Params.icon }}
|
{{ if $page.Params.icon }}
|
||||||
{{- $icon := (or (and (reflect.IsMap $page.Params.Icon) $page.Params.Icon.url) $page.Params.Icon) -}}
|
{{- $icon := (or (and (reflect.IsMap $page.Params.Icon) $page.Params.Icon.url) $page.Params.Icon) -}}
|
||||||
@@ -56,7 +63,7 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{- $thumbnail := (or (and (reflect.IsMap $page.Params.Thumbnail) $page.Params.Thumbnail.url) $page.Params.Thumbnail) -}}
|
{{- $thumbnail := (or (and (reflect.IsMap $page.Params.Thumbnail) $page.Params.Thumbnail.url) $page.Params.Thumbnail) -}}
|
||||||
{{- if $thumbnail }}
|
{{- if $thumbnail }}
|
||||||
{{ partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "wrapper" $style "class" "rounded" "title" $page.Site.Title "priority" "high") }}
|
{{ partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "sizes" $sizes "wrapper" $style "class" "rounded" "title" $page.Site.Title "priority" "high") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -70,7 +77,8 @@
|
|||||||
{{ if eq $orientation "stacked" }}
|
{{ if eq $orientation "stacked" }}
|
||||||
<div class="row justify-content-center flex-fill">
|
<div class="row justify-content-center flex-fill">
|
||||||
<div class="col-12 col-md-{{ $width }} m-auto text-center">
|
<div class="col-12 col-md-{{ $width }} m-auto text-center">
|
||||||
{{ partial "partials/list/featured-illustration.html" (dict "page" $page "style" "pb-4") }}
|
{{ $sizes = partial "partials/list/featured-sizes.html" (dict "width" $width) }}
|
||||||
|
{{ partial "partials/list/featured-illustration.html" (dict "page" $page "sizes" $sizes "style" "pb-4") }}
|
||||||
{{ partial "partials/list/featured-body.html" (dict "page" $page "headings" $headings "orientation" $orientation "actions" $actions) }}
|
{{ partial "partials/list/featured-body.html" (dict "page" $page "headings" $headings "orientation" $orientation "actions" $actions) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -79,8 +87,11 @@
|
|||||||
<div class="col col-12 col-md-{{ $width }} order-1 order-md-0 my-md-auto">
|
<div class="col col-12 col-md-{{ $width }} order-1 order-md-0 my-md-auto">
|
||||||
{{ partial "partials/list/featured-body.html" (dict "page" $page "headings" $headings "orientation" $orientation "actions" $actions "align" $align) }}
|
{{ partial "partials/list/featured-body.html" (dict "page" $page "headings" $headings "orientation" $orientation "actions" $actions "align" $align) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-12 col-md-{{ if gt $width 6 }}{{ sub 12 $width }}{{ else }}{{ $width }}{{ end }} order-0 order-md-1 text-center my-md-auto align-self-end">
|
{{ $newWidth := $width }}
|
||||||
{{ partial "partials/list/featured-illustration.html" (dict "page" $page "style" "pb-4 pb-md-0") }}
|
{{ if gt $width 6 }}{{ $newWidth = sub 12 $width }}{{ end }}
|
||||||
|
{{ $sizes = partial "partials/list/featured-sizes.html" (dict "width" $newWidth) }}
|
||||||
|
<div class="col col-12 col-md-{{ $newWidth }} order-0 order-md-1 text-center my-md-auto align-self-end">
|
||||||
|
{{ partial "partials/list/featured-illustration.html" (dict "page" $page "sizes" $sizes "style" "pb-4 pb-md-0") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
9
layouts/partials/utilities/AddModule.html
Normal file
9
layouts/partials/utilities/AddModule.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{{ with .module }}
|
||||||
|
{{- $dependencies := page.Scratch.Get "dependencies" -}}
|
||||||
|
{{- if reflect.IsSlice $dependencies -}}
|
||||||
|
{{- $dependencies = complement $dependencies . -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- $dependencies = slice . -}}
|
||||||
|
{{ end }}
|
||||||
|
{{- page.Scratch.Set "dependencies" $dependencies -}}
|
||||||
|
{{ end }}
|
52
layouts/partials/utilities/InitModules.html
Normal file
52
layouts/partials/utilities/InitModules.html
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{{ $page := .page }}
|
||||||
|
|
||||||
|
{{ $core := slice }}
|
||||||
|
{{ $optional := slice }}
|
||||||
|
{{ $excludeSCSS := slice }}
|
||||||
|
{{ $disableTemplate := slice }}
|
||||||
|
{{ $modules := dict }}
|
||||||
|
|
||||||
|
{{ range $key, $mod := $page.Site.Params.modules }}
|
||||||
|
{{ if eq $key "core" }}
|
||||||
|
{{ warnf "DEPRECATED: module parameter `core` has been deprecated in release v0.24.0" }}
|
||||||
|
{{ $core = $core | append $mod }}
|
||||||
|
{{ else if eq $key "optional" }}
|
||||||
|
{{ warnf "DEPRECATED: module parameter `optional` has been deprecated in release v0.24.0" }}
|
||||||
|
{{ $optional = $optional | append $mod }}
|
||||||
|
{{ else if eq $key "excludescss" }}
|
||||||
|
{{ warnf "DEPRECATED: module parameter `excludeSCSS` has been deprecated in release v0.24.0" }}
|
||||||
|
{{ $excludeSCSS = $excludeSCSS | append $mod }}
|
||||||
|
{{ else if eq $key "disabletemplate" }}
|
||||||
|
{{ warnf "DEPRECATED: module parameter `disableTemplate` has been deprecated in release v0.24.0" }}
|
||||||
|
{{ $disableTemplate = $disableTemplate | append $mod }}
|
||||||
|
{{ else if reflect.IsMap $mod }}
|
||||||
|
{{ $integration := index $mod "integration" }}
|
||||||
|
{{ if eq $integration "core" }}
|
||||||
|
{{ $core = $core | append $key }}
|
||||||
|
{{ else if eq $integration "optional" }}
|
||||||
|
{{ $optional = $optional | append $key }}
|
||||||
|
{{ else if $integration }}
|
||||||
|
{{ warnf "Unrecognized module integration setting: %s" $integration }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if eq (index $mod "excludeSCSS") true }}
|
||||||
|
{{ $excludeSCSS = $excludeSCSS | append $key }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if eq (index $mod "disableTemplate") true }}
|
||||||
|
{{ $disableTemplate = $disableTemplate | append $key }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $modules = merge $modules (dict $key $mod) }}
|
||||||
|
{{ else }}
|
||||||
|
{{ warnf "Unsupported module parameter: %s" $key }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $modules := dict "modules" $modules "core" $core "optional" $optional "excludeSCSS" $excludeSCSS "disableTemplate" $disableTemplate }}
|
||||||
|
|
||||||
|
{{- if and $page.IsPage (not (in $core "bootstrap")) -}}
|
||||||
|
{{- errorf "Bootstrap is a required module, please add it to 'modules.core' in your site parameters" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ return $modules }}
|
5
layouts/partials/utilities/git.html
Normal file
5
layouts/partials/utilities/git.html
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
|
||||||
|
{{ $lastmodstr | i18n "lastModified" -}}
|
||||||
|
{{ with .GitInfo }}
|
||||||
|
• <a href="{{ site.Params.docs.github | default site.Params.schema.github }}/commit/{{ .Hash }}">{{ .Subject }} ({{ .AbbreviatedHash }})</a>
|
||||||
|
{{ end -}}
|
@@ -28,6 +28,9 @@
|
|||||||
{{- $style := .Get "style" | default "" -}}
|
{{- $style := .Get "style" | default "" -}}
|
||||||
{{- $subtle := .Get "subtle" | default false -}}
|
{{- $subtle := .Get "subtle" | default false -}}
|
||||||
{{- $button := .Get "button" | default false -}}
|
{{- $button := .Get "button" | default false -}}
|
||||||
|
{{- $buttonType := .Get "buttonType" | default "" -}}
|
||||||
|
{{- $iconRounded := .Get "iconRounded" | default false -}}
|
||||||
|
{{- $scroll := .Get "scroll" | default false -}}
|
||||||
|
|
||||||
{{ $inner := .Scratch.Get "inner" }}
|
{{ $inner := .Scratch.Get "inner" }}
|
||||||
{{ $input := trim .Inner " \r\n" }}
|
{{ $input := trim .Inner " \r\n" }}
|
||||||
@@ -56,5 +59,8 @@
|
|||||||
"style" $style
|
"style" $style
|
||||||
"subtle" $subtle
|
"subtle" $subtle
|
||||||
"button" $button
|
"button" $button
|
||||||
|
"buttonType" $buttonType
|
||||||
|
"iconRounded" $iconRounded
|
||||||
|
"scroll" $scroll
|
||||||
)
|
)
|
||||||
-}}
|
-}}
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
{{- $gutter := partial "utilities/GetArgParent" (dict "page" . "arg" "gutter") | default "0" -}}
|
{{- $gutter := partial "utilities/GetArgParent" (dict "page" . "arg" "gutter") | default "0" -}}
|
||||||
{{- $header := partial "utilities/GetArgParent" (dict "page" . "arg" "header") | default "full" -}}
|
{{- $header := partial "utilities/GetArgParent" (dict "page" . "arg" "header") | default "full" -}}
|
||||||
{{- $icon := .Get "icon" -}}
|
{{- $icon := .Get "icon" -}}
|
||||||
|
{{- $iconRounded := partial "utilities/GetArgParent" (dict "page" . "arg" "iconRounded") | default false -}}
|
||||||
{{- $align := partial "utilities/GetArgParent" (dict "page" . "arg" "align") | default "start" -}}
|
{{- $align := partial "utilities/GetArgParent" (dict "page" . "arg" "align") | default "start" -}}
|
||||||
{{- $style := partial "utilities/GetArgParent" (dict "page" . "arg" "style") | default "" -}}
|
{{- $style := partial "utilities/GetArgParent" (dict "page" . "arg" "style") | default "" -}}
|
||||||
{{- $subtle := partial "utilities/GetArgParent" (dict "page" . "arg" "subtle") | default false -}}
|
{{- $subtle := partial "utilities/GetArgParent" (dict "page" . "arg" "subtle") | default false -}}
|
||||||
@@ -33,6 +34,10 @@
|
|||||||
{{- $thumbnail := .Get "thumbnail" -}}
|
{{- $thumbnail := .Get "thumbnail" -}}
|
||||||
{{- $title := .Get "title" -}}
|
{{- $title := .Get "title" -}}
|
||||||
{{- $button := partial "utilities/GetArgParent" (dict "page" . "arg" "button") | default false -}}
|
{{- $button := partial "utilities/GetArgParent" (dict "page" . "arg" "button") | default false -}}
|
||||||
|
{{- $buttonType := partial "utilities/GetArgParent" (dict "page" . "arg" "buttonType") | default "" -}}
|
||||||
|
{{- $cols := partial "utilities/GetArgParent" (dict "page" . "arg" "cols") | default 3 -}}
|
||||||
|
{{- $scroll := partial "utilities/GetArgParent" (dict "page" . "arg" "scroll") | default false -}}
|
||||||
|
{{- $wrapper := "" -}}
|
||||||
|
|
||||||
<!-- Override arguments -->
|
<!-- Override arguments -->
|
||||||
{{ if $path }}
|
{{ if $path }}
|
||||||
@@ -47,6 +52,11 @@
|
|||||||
{{ $class = (printf "h-100 %s" $class) }}
|
{{ $class = (printf "h-100 %s" $class) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $scroll }}
|
||||||
|
{{ $wrapper = printf "card-block-%d p-0" $cols }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{ if not $error -}}
|
{{ if not $error -}}
|
||||||
<!-- Render card -->
|
<!-- Render card -->
|
||||||
@@ -63,13 +73,17 @@
|
|||||||
"description" $description
|
"description" $description
|
||||||
"ratio" $ratio
|
"ratio" $ratio
|
||||||
"icon" $icon
|
"icon" $icon
|
||||||
|
"iconRounded" $iconRounded
|
||||||
"align" $align
|
"align" $align
|
||||||
"style" $style
|
"style" $style
|
||||||
"subtle" $subtle
|
"subtle" $subtle
|
||||||
|
"scroll" $scroll
|
||||||
|
"wrapper" $wrapper
|
||||||
"thumbnail" $thumbnail
|
"thumbnail" $thumbnail
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
"alt" $alt
|
"alt" $alt
|
||||||
"button" $button
|
"button" $button
|
||||||
|
"buttonType" $buttonType
|
||||||
) -}}
|
) -}}
|
||||||
|
|
||||||
<!-- Pass output to parent or current stream -->
|
<!-- Pass output to parent or current stream -->
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
{{- $portrait := false -}}
|
{{- $portrait := false -}}
|
||||||
{{- $loading := "" -}}
|
{{- $loading := "" -}}
|
||||||
{{- $error := false -}}
|
{{- $error := false -}}
|
||||||
|
{{- $plain := false -}}
|
||||||
|
|
||||||
{{- if .IsNamedParams -}}
|
{{- if .IsNamedParams -}}
|
||||||
{{ $url = .Get "src" | default "" -}}
|
{{ $url = .Get "src" | default "" -}}
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
{{ $figclass = .Get "figclass" | default "" -}}
|
{{ $figclass = .Get "figclass" | default "" -}}
|
||||||
{{ with .Get "mode" }}{{ $mode = partial "utilities/CastBool.html" . }}{{ end -}}
|
{{ with .Get "mode" }}{{ $mode = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||||
{{ with .Get "portrait" }}{{ $portrait = partial "utilities/CastBool.html" . }}{{ end -}}
|
{{ with .Get "portrait" }}{{ $portrait = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||||
|
{{ with .Get "plain" }}{{ $plain = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
{{ $url = .Get 0 }}
|
{{ $url = .Get 0 }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
@@ -58,6 +60,7 @@
|
|||||||
"figclass" $figclass
|
"figclass" $figclass
|
||||||
"mode" $mode
|
"mode" $mode
|
||||||
"portrait" $portrait
|
"portrait" $portrait
|
||||||
|
"plain" $plain
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
"page" .Page)
|
"page" .Page)
|
||||||
-}}
|
-}}
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
{{ $url := "" }}
|
{{ $url := "" }}
|
||||||
{{ $class := "" }}
|
{{ $class := "" }}
|
||||||
{{ $case := true }}
|
{{ $case := true }}
|
||||||
|
{{ $external := false }}
|
||||||
{{ $cue := site.Params.main.externalLinks.cue }}
|
{{ $cue := site.Params.main.externalLinks.cue }}
|
||||||
{{ $tab := site.Params.main.externalLinks.tab }}
|
{{ $tab := site.Params.main.externalLinks.tab }}
|
||||||
{{ $text := trim .Inner " \r\n" | .Page.RenderString | safeHTML }}
|
{{ $text := trim .Inner " \r\n" | .Page.RenderString | safeHTML }}
|
||||||
@@ -30,6 +31,7 @@
|
|||||||
{{- $cue = .Get "cue" | default site.Params.main.externalLinks.cue -}}
|
{{- $cue = .Get "cue" | default site.Params.main.externalLinks.cue -}}
|
||||||
{{- $tab = .Get "tab" | default site.Params.main.externalLinks.tab -}}
|
{{- $tab = .Get "tab" | default site.Params.main.externalLinks.tab -}}
|
||||||
{{- $case = .Get "case" | default true -}}
|
{{- $case = .Get "case" | default true -}}
|
||||||
|
{{- $external = .Get "external" | default false -}}
|
||||||
{{- $class = .Get "class" | default "" -}}
|
{{- $class = .Get "class" | default "" -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $href = .Get 0 }}
|
{{ $href = .Get 0 }}
|
||||||
@@ -42,7 +44,11 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- if hasPrefix $href "http" -}}
|
{{- if hasPrefix $href "http" -}}
|
||||||
{{ $url = $href }}
|
{{- if $external -}}
|
||||||
|
{{ $url = $href }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ $url = strings.TrimPrefix (strings.TrimSuffix "/" site.BaseURL) $href }}
|
||||||
|
{{- end -}}
|
||||||
{{- else if not (strings.Contains $href "/") -}}
|
{{- else if not (strings.Contains $href "/") -}}
|
||||||
{{ $url = index site.Params.links $href }}
|
{{ $url = index site.Params.links $href }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -65,7 +71,12 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- $isExternal := ne (urls.Parse (absURL $url)).Host (urls.Parse site.BaseURL).Host -}}
|
{{ if and $external (not (hasPrefix $url "http")) }}
|
||||||
|
{{ errorf "External link must start with 'http': %s" .Position -}}
|
||||||
|
{{ $error = true -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- $isExternal := or (ne (urls.Parse (absURL $url)).Host (urls.Parse site.BaseURL).Host) $external -}}
|
||||||
{{- if not $isExternal -}}
|
{{- if not $isExternal -}}
|
||||||
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }}
|
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }}
|
||||||
{{- if not $ref -}}
|
{{- if not $ref -}}
|
||||||
@@ -80,5 +91,5 @@
|
|||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{- if not $error -}}
|
{{- if not $error -}}
|
||||||
{{ partial "assets/link.html" (dict "destination" $url "text" $text "cue" $cue "tab" $tab "case" $case "class" $class "page" .Page) }}
|
{{ partial "assets/link.html" (dict "destination" $url "text" $text "cue" $cue "tab" $tab "case" $case "external" $external "class" $class "page" .Page) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -15,22 +15,35 @@
|
|||||||
<!-- Initialize arguments -->
|
<!-- Initialize arguments -->
|
||||||
{{ $breakpoint := "" }}
|
{{ $breakpoint := "" }}
|
||||||
{{ $class := "" }}
|
{{ $class := "" }}
|
||||||
|
{{ $sortable := false }}
|
||||||
|
{{ $paging := false }}
|
||||||
|
{{ $searchable := false }}
|
||||||
|
|
||||||
{{- if .IsNamedParams -}}
|
{{- if .IsNamedParams -}}
|
||||||
{{ $breakpoint = .Get "breakpoint" }}
|
{{ $breakpoint = .Get "breakpoint" }}
|
||||||
{{ $class = .Get "class" | default "" }}
|
{{ $class = .Get "class" | default "" }}
|
||||||
|
{{ with (.Get "sortable")}} {{ $sortable = partial "utilities/CastBool.html" . }}{{ end }}
|
||||||
|
{{ with (.Get "paging")}} {{ $paging = partial "utilities/CastBool.html" . }}{{ end }}
|
||||||
|
{{ with (.Get "searchable")}} {{ $searchable = partial "utilities/CastBool.html" . }}{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $breakpoint = .Get 0 }}
|
{{ $breakpoint = .Get 0 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
|
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
|
||||||
{{- $input := .Inner | .Page.RenderString }}
|
{{- $input := .Inner | .Page.RenderString }}
|
||||||
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
||||||
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
||||||
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
||||||
{{- $old := "<table>" -}}
|
|
||||||
{{- $new := printf "<table class=\"table %s\">" $class -}}
|
|
||||||
{{ $input := replace $input $old $new -}}
|
|
||||||
|
|
||||||
|
{{ $attributes := "" }}
|
||||||
|
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
||||||
|
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=true" $attributes }}{{ end }}
|
||||||
|
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
|
||||||
|
|
||||||
|
{{- $old := "<table>" -}}
|
||||||
|
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
||||||
|
{{ $input := replace $input $old $new -}}
|
||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
{{ if eq $breakpoint "none" }}
|
{{ if eq $breakpoint "none" }}
|
||||||
{{ $input | safeHTML }}
|
{{ $input | safeHTML }}
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
{{ .Count }} {{ if gt .Count 1 }} {{ T "articles" }} {{ else }} {{ T "article" }} {{ end }}
|
{{ .Count }} {{ if gt .Count 1 }} {{ T "articles" }} {{ else }} {{ T "article" }} {{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
<a href="{{ (path.Join .Page.RelPermalink) | relLangURL }}">{{ .Page.Title | .Page.RenderString }}</a>
|
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title | .Page.RenderString }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<p class="text-body-secondary mt-5">{{ $year }}</p>
|
<p class="text-body-secondary mt-5">{{ $year }}</p>
|
||||||
{{ $.Scratch.Set "lastYear" $year }}
|
{{ $.Scratch.Set "lastYear" $year }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href="{{ (path.Join .Page.RelPermalink) | relLangURL }}">{{ if .Draft }}{{ T "draft" | upper }}: {{ end }}{{ .Title | .Page.RenderString }}</a>
|
<a href="{{ .Page.RelPermalink }}">{{ if .Draft }}{{ T "draft" | upper }}: {{ end }}{{ .Title | .Page.RenderString }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
14
netlify.toml
14
netlify.toml
@@ -4,12 +4,12 @@
|
|||||||
command = "npm run build:example"
|
command = "npm run build:example"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
DART_SASS_VERSION = "1.72.0"
|
DART_SASS_VERSION = "1.77.0"
|
||||||
HUGO_VERSION = "0.124.0"
|
HUGO_VERSION = "0.125.7"
|
||||||
HUGO_ENV = "production"
|
HUGO_ENV = "production"
|
||||||
HUGO_ENABLEGITINFO = "true"
|
HUGO_ENABLEGITINFO = "true"
|
||||||
NODE_VERSION = "18.19.1"
|
NODE_VERSION = "18.20.2"
|
||||||
NPM_VERSION = "10.2.4"
|
NPM_VERSION = "10.5.0"
|
||||||
# toml-docs-end netlify
|
# toml-docs-end netlify
|
||||||
|
|
||||||
[[headers]]
|
[[headers]]
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
font-src 'self' https://*.netlify.app https://fonts.gstatic.com; \
|
font-src 'self' https://*.netlify.app https://fonts.gstatic.com; \
|
||||||
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com \
|
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com \
|
||||||
app.netlify.com; \
|
app.netlify.com; \
|
||||||
img-src 'self' data: https://*.netlify.app https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://*.netlify.app https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
media-src 'self' \
|
media-src 'self' \
|
||||||
"""
|
"""
|
||||||
@@ -82,8 +82,8 @@
|
|||||||
# Redirected in exampleSite/config/_default/hugo.toml
|
# Redirected in exampleSite/config/_default/hugo.toml
|
||||||
# srcdir = ""
|
# srcdir = ""
|
||||||
|
|
||||||
[[plugins]]
|
# [[plugins]]
|
||||||
package = "@netlify/plugin-lighthouse"
|
# package = "@netlify/plugin-lighthouse"
|
||||||
# [plugins.inputs]
|
# [plugins.inputs]
|
||||||
# output_path = "reports/lighthouse.html"
|
# output_path = "reports/lighthouse.html"
|
||||||
# toml-docs-end plugins
|
# toml-docs-end plugins
|
||||||
|
3637
package-lock.json
generated
3637
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.23.10",
|
"version": "0.24.15",
|
||||||
"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",
|
||||||
@@ -66,33 +66,33 @@
|
|||||||
"url": "https://github.com/gethinode/hinode/issues"
|
"url": "https://github.com/gethinode/hinode/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://gethinode.com",
|
"homepage": "https://gethinode.com",
|
||||||
"devDependencies": {
|
"dependencies": {
|
||||||
"@fullhuman/postcss-purgecss": "^6.0.0",
|
"@fullhuman/postcss-purgecss": "^6.0.0",
|
||||||
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
|
|
||||||
"@netlify/plugin-lighthouse": "^6.0.0",
|
|
||||||
"autoprefixer": "^10.4.19",
|
"autoprefixer": "^10.4.19",
|
||||||
"cssnano": "^7.0.0",
|
"cssnano": "^7.0.4",
|
||||||
"cssnano-preset-advanced": "^7.0.0",
|
"cssnano-preset-advanced": "^7.0.4",
|
||||||
|
"hugo-bin": "0.125.2",
|
||||||
|
"purgecss-whitelister": "^2.4.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-standard": "^17.1.0",
|
"eslint-config-standard": "^17.1.0",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.29.1",
|
||||||
"eslint-plugin-n": "^16.6.2",
|
"eslint-plugin-n": "^16.6.2",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.4.0",
|
||||||
"hugo-bin": "0.122.4",
|
|
||||||
"markdownlint-cli2": "^0.13.0",
|
"markdownlint-cli2": "^0.13.0",
|
||||||
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"postcss-cli": "^11.0.0",
|
"postcss-cli": "^11.0.0",
|
||||||
"purgecss-whitelister": "^2.4.0",
|
"replace-in-files-cli": "^3.0.0",
|
||||||
"replace-in-files-cli": "^2.2.0",
|
"rimraf": "^6.0.1",
|
||||||
"rimraf": "^5.0.5",
|
|
||||||
"shx": "^0.3.4",
|
"shx": "^0.3.4",
|
||||||
"stylelint": "^16.4.0",
|
"stylelint": "^16.7.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0"
|
"stylelint-config-standard-scss": "^13.1.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
|
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
|
||||||
"@netlify/plugin-lighthouse": "*",
|
|
||||||
"fsevents": "*",
|
"fsevents": "*",
|
||||||
"netlify-plugin-hugo-cache-resources": "^0.2.1"
|
"netlify-plugin-hugo-cache-resources": "^0.2.1"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user