mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 18:14:28 +00:00
Compare commits
386 Commits
v0.24.0-al
...
v0.26.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
56eaa9d90b | ||
![]() |
492dbbec24 | ||
![]() |
d2fc5e3433 | ||
![]() |
b5cc3f6d84 | ||
![]() |
e1e1041c1b | ||
![]() |
e1cac645a7 | ||
![]() |
d23d533575 | ||
![]() |
d447a4a65a | ||
![]() |
3a466277e3 | ||
![]() |
2b09ceef93 | ||
![]() |
ee30409257 | ||
![]() |
70583bdb33 | ||
![]() |
8e1a299a72 | ||
![]() |
e20aba4907 | ||
![]() |
1aedf22923 | ||
![]() |
e77671ffef | ||
![]() |
433f8ef60d | ||
![]() |
acb261ba69 | ||
![]() |
b04b5a136f | ||
![]() |
953f4ba908 | ||
![]() |
90e65b5614 | ||
![]() |
944437ea4c | ||
![]() |
5d0593bf65 | ||
![]() |
4935e627f6 | ||
![]() |
f7d535d025 | ||
![]() |
67280d6ad0 | ||
![]() |
e21332d016 | ||
![]() |
f306bc2b22 | ||
![]() |
475745cc6c | ||
![]() |
90c43c84e5 | ||
![]() |
a81b672731 | ||
![]() |
b86ec388b6 | ||
![]() |
5dd0fce394 | ||
![]() |
a66dc2f91c | ||
![]() |
0072292522 | ||
![]() |
d3f534629d | ||
![]() |
1407e1ba0d | ||
![]() |
b9bce4800c | ||
![]() |
a5a424b6ed | ||
![]() |
9c8b21233c | ||
![]() |
b564696728 | ||
![]() |
c669c82324 | ||
![]() |
8014f4d636 | ||
![]() |
7f80f52294 | ||
![]() |
485db3808f | ||
![]() |
7b10339aea | ||
![]() |
ed5c32a7a4 | ||
![]() |
c42a379ca0 | ||
![]() |
22c17c3123 | ||
![]() |
e4f82c1304 | ||
![]() |
07fa46b9a6 | ||
![]() |
809ce0d4ad | ||
![]() |
deb97e0e29 | ||
![]() |
14a89a2ff9 | ||
![]() |
81b40d145d | ||
![]() |
1dfce3d445 | ||
![]() |
145b2c29d1 | ||
![]() |
77fe046bea | ||
![]() |
63250c6ac9 | ||
![]() |
54e0f720bd | ||
![]() |
423670f95f | ||
![]() |
78560aa07a | ||
![]() |
1c6ff7ac55 | ||
![]() |
eb9b7ea8f0 | ||
![]() |
753b949af2 | ||
![]() |
2322cdcdc0 | ||
![]() |
edc8128395 | ||
![]() |
cc22f73f5c | ||
![]() |
8312de35c8 | ||
![]() |
a3a8d7e08c | ||
![]() |
0513692cf5 | ||
![]() |
bfa6e00c2f | ||
![]() |
c61fa6b4c7 | ||
![]() |
c754451002 | ||
![]() |
8d4cb82863 | ||
![]() |
ae18134218 | ||
![]() |
fb20543d88 | ||
![]() |
14d1489b60 | ||
![]() |
e99ac83fbc | ||
![]() |
d96b103180 | ||
![]() |
7f1dc95402 | ||
![]() |
e3420e357c | ||
![]() |
5ee51ebb18 | ||
![]() |
684ec0f823 | ||
![]() |
5335e3d607 | ||
![]() |
3fc51e6158 | ||
![]() |
4a20e8beef | ||
![]() |
163ac52332 | ||
![]() |
176c5447a8 | ||
![]() |
1a88fa93bb | ||
![]() |
b0d266aedc | ||
![]() |
eba81c236a | ||
![]() |
cdca92ea02 | ||
![]() |
a4743aabf5 | ||
![]() |
cf8465e627 | ||
![]() |
86941f05d0 | ||
![]() |
cbb777f524 | ||
![]() |
d20d00e42f | ||
![]() |
348981a1a0 | ||
![]() |
0942d79e2c | ||
![]() |
0251bd1838 | ||
![]() |
ae5e240cf1 | ||
![]() |
dd127b973a | ||
![]() |
63b186a2e5 | ||
![]() |
bc71ba1d19 | ||
![]() |
9c3bd970a5 | ||
![]() |
9f143786af | ||
![]() |
e8ccada6f3 | ||
![]() |
a40092b1eb | ||
![]() |
00965b5224 | ||
![]() |
92dc97d325 | ||
![]() |
2394f148e5 | ||
![]() |
8d259a3e3a | ||
![]() |
1c8912e92e | ||
![]() |
207c08431f | ||
![]() |
d2703d4885 | ||
![]() |
4728191370 | ||
![]() |
cd40d75962 | ||
![]() |
2d4732d03b | ||
![]() |
e3c256b41f | ||
![]() |
f0a53f252c | ||
![]() |
a1273d99d5 | ||
![]() |
4e62956c82 | ||
![]() |
cf096a7f6a | ||
![]() |
ee790dc6fd | ||
![]() |
df9bc9ed6c | ||
![]() |
69338b4abf | ||
![]() |
c206054dc8 | ||
![]() |
a2bcba5916 | ||
![]() |
788b68f6bc | ||
![]() |
73697f43aa | ||
![]() |
129df382cd | ||
![]() |
c15eb4edc3 | ||
![]() |
12725caa1c | ||
![]() |
6077c33fcc | ||
![]() |
b944d818c8 | ||
![]() |
f25fbb3440 | ||
![]() |
0b9d43f130 | ||
![]() |
884da31fd0 | ||
![]() |
6dbfb0ac64 | ||
![]() |
3bef9579b4 | ||
![]() |
0ea1f92d4c | ||
![]() |
77d44d44c6 | ||
![]() |
e8c1eac2af | ||
![]() |
2f992b82cf | ||
![]() |
fe70b24859 | ||
![]() |
d18f0469fc | ||
![]() |
497c5d0e5e | ||
![]() |
834435db00 | ||
![]() |
3d8195e24b | ||
![]() |
ce31587f22 | ||
![]() |
6342ae1a33 | ||
![]() |
88eb894fde | ||
![]() |
8870668c21 | ||
![]() |
cd379fa8d7 | ||
![]() |
fd029492f7 | ||
![]() |
29b0d6f978 | ||
![]() |
bed2afe44d | ||
![]() |
1922fc825e | ||
![]() |
8c3ea99429 | ||
![]() |
d8929da5ec | ||
![]() |
4a5e8c7311 | ||
![]() |
600b487f43 | ||
![]() |
ed013e9b6f | ||
![]() |
5a299a73dc | ||
![]() |
82f3837db1 | ||
![]() |
69cf1ccf6c | ||
![]() |
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 |
@@ -1,3 +1,4 @@
|
||||
assets/js/critical/languageSelector.js
|
||||
assets/js/critical/color.js
|
||||
assets/js/analytics.js
|
||||
assets/js/flexsearch.js
|
||||
|
2
.github/workflows/lint-build.yml
vendored
2
.github/workflows/lint-build.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
node-version: [18.x, 20.x]
|
||||
node-version: [20.x, 22.x]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
/_vendor
|
||||
_vendor/
|
||||
public/
|
||||
resources/
|
||||
node_modules/
|
||||
|
@@ -9,44 +9,49 @@
|
||||
(() => {
|
||||
'use strict'
|
||||
|
||||
const supportedThemes = ['auto', 'dark', 'light'];
|
||||
|
||||
// retrieves the currently stored theme from local storage (cookie)
|
||||
const storedTheme = localStorage.getItem('theme')
|
||||
|
||||
const getPreferredTheme = () => {
|
||||
if (storedTheme) {
|
||||
return storedTheme
|
||||
}
|
||||
|
||||
// retrieves the theme preferred by the client, defaults to light
|
||||
function getPreferredTheme() {
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
||||
}
|
||||
|
||||
const setTheme = function (theme) {
|
||||
if (theme === 'auto') {
|
||||
document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
|
||||
// retrieves the current theme, either from local storage or client's preferences
|
||||
function getTheme() {
|
||||
if (storedTheme) {
|
||||
return storedTheme
|
||||
} else {
|
||||
document.documentElement.setAttribute('data-bs-theme', theme)
|
||||
const preference = getPreferredTheme()
|
||||
localStorage.setItem('theme', preference)
|
||||
return preference
|
||||
}
|
||||
}
|
||||
|
||||
setTheme(getPreferredTheme())
|
||||
|
||||
const showActiveTheme = theme => {
|
||||
const activeSelectors = document.querySelectorAll('.theme-icon-active')
|
||||
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')
|
||||
}
|
||||
// applies and stores requested theme
|
||||
function setTheme(theme) {
|
||||
if (!supportedThemes.includes(theme)) {
|
||||
theme = 'auto'
|
||||
}
|
||||
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', () => {
|
||||
@@ -56,18 +61,16 @@
|
||||
})
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
showActiveTheme(getPreferredTheme())
|
||||
|
||||
document.querySelectorAll('[data-bs-theme-value]')
|
||||
.forEach(toggle => {
|
||||
toggle.addEventListener('click', () => {
|
||||
const theme = toggle.getAttribute('data-bs-theme-value')
|
||||
localStorage.setItem('theme', theme)
|
||||
setTheme(theme)
|
||||
showActiveTheme(theme)
|
||||
})
|
||||
document.querySelectorAll('.navbar-mode-selector').forEach(chk => {
|
||||
chk.addEventListener('change', function () {
|
||||
document.documentElement.setAttribute('data-bs-theme-animate', 'true')
|
||||
toggleTheme()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
// initialize theme directly when script is invoked
|
||||
setTheme(getTheme())
|
||||
})()
|
||||
|
||||
{{- end -}}
|
65
assets/js/critical/languageSelector.js
Normal file
65
assets/js/critical/languageSelector.js
Normal file
@@ -0,0 +1,65 @@
|
||||
/* eslint-disable */
|
||||
{{- if site.Params.main.enableLanguageSelectionStorage -}}
|
||||
|
||||
(() => {
|
||||
'use strict'
|
||||
|
||||
// Function to get the selected language from localStorage
|
||||
function getLanguage () {
|
||||
return localStorage.getItem('selectedLanguage')
|
||||
}
|
||||
|
||||
// Function to set the selected language in localStorage
|
||||
function setLanguage (language) {
|
||||
localStorage.setItem('selectedLanguage', language)
|
||||
}
|
||||
|
||||
// Function to apply the selected language to the website
|
||||
function applyLanguage (language, href) {
|
||||
if (document.documentElement.lang !== language) {
|
||||
if (href) {
|
||||
if (window.location.pathname !== href) {
|
||||
window.location.href = href
|
||||
}
|
||||
} else {
|
||||
window.location.href = '/' + language + '/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Event listener for language selection
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const storedLanguage = getLanguage()
|
||||
const languageItems = document.querySelectorAll('#language-selector .dropdown-item')
|
||||
|
||||
if (languageItems.length > 0) {
|
||||
// Redirect if the stored language differs from the active language
|
||||
if ((storedLanguage) && (document.documentElement.lang !== storedLanguage)) {
|
||||
languageItems.forEach(item => {
|
||||
if (item.getAttribute('hreflang') === storedLanguage) {
|
||||
applyLanguage(storedLanguage, item.getAttribute('href'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Update the stored language when the user selects a new one
|
||||
languageItems.forEach(item => {
|
||||
item.addEventListener('click', () => {
|
||||
const selectedLanguage = item.getAttribute('hreflang')
|
||||
|
||||
if (selectedLanguage) {
|
||||
setLanguage(selectedLanguage)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
else {
|
||||
// Redirect to the localized homepage
|
||||
const defaultLang = '{{ site.LanguageCode | default site.Language.Lang }}'
|
||||
let language = storedLanguage ? storedLanguage : defaultLang
|
||||
window.location.href = '/' + language + '/'
|
||||
}
|
||||
})
|
||||
})()
|
||||
{{- end -}}
|
||||
/* eslint-enable */
|
@@ -11,7 +11,10 @@ function updateNavbar () {
|
||||
} else {
|
||||
navbar.classList.remove('nav-active')
|
||||
const defaultTheme = navbar.getAttribute('data-bs-overlay')
|
||||
navbar.setAttribute('data-bs-theme', defaultTheme)
|
||||
|
||||
if (defaultTheme) {
|
||||
navbar.setAttribute('data-bs-theme', defaultTheme)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -39,6 +39,8 @@
|
||||
@import "components/toc.scss";
|
||||
@import "components/video.scss";
|
||||
@import "common/animation.scss";
|
||||
@import "common/masonry.scss";
|
||||
@import "common/scrollbar.scss";
|
||||
@import "common/styles.scss";
|
||||
@import "layouts/reboot.scss";
|
||||
@import "layouts/type.scss";
|
||||
|
@@ -37,6 +37,8 @@
|
||||
@import "components/toc.scss";
|
||||
@import "components/video.scss";
|
||||
@import "common/animation.scss";
|
||||
@import "common/masonry.scss";
|
||||
@import "common/scrollbar.scss";
|
||||
@import "common/styles.scss";
|
||||
@import "layouts/reboot.scss";
|
||||
@import "layouts/type.scss";
|
||||
|
@@ -1,25 +1,25 @@
|
||||
// scss-docs-start icons
|
||||
$form-check-input-checked-bg-image: 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-input-indeterminate-bg-image: 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-dark: 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-checked-bg-image: url("/icons/form-switch-checked-bg-image.svg") !default;
|
||||
$form-select-indicator: url("/icons/form-select-indicator.svg") !default;
|
||||
$form-select-indicator-dark: url("/icons/form-select-indicator-dark.svg") !default;
|
||||
$form-feedback-icon-valid: url("/icons/form-feedback-icon-valid.svg") !default;
|
||||
$form-feedback-icon-invalid: url("/icons/form-feedback-icon-invalid.svg") !default;
|
||||
$navbar-light-toggler-icon-bg: url("/icons/navbar-light-toggler-icon-bg.svg") !default;
|
||||
$navbar-dark-toggler-icon-bg: url("/icons/navbar-dark-toggler-icon-bg.svg") !default;
|
||||
$accordion-button-icon: url("/icons/accordion-button-icon.svg") !default;
|
||||
$accordion-button-icon-dark: url("/icons/accordion-button-icon-dark.svg") !default;
|
||||
$accordion-button-active-icon: url("/icons/accordion-button-active-icon.svg") !default;
|
||||
$accordion-button-active-icon-dark: 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-next-icon-bg: url("/icons/carousel-control-next-icon-bg.svg") !default;
|
||||
$btn-close-bg: url("/icons/btn-close-bg.svg") !default;
|
||||
$btn-toggle: url("/icons/btn-toggle.svg") !default;
|
||||
$btn-toggle-dark: url("/icons/btn-toggle-dark.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("#{$base-url}icons/form-check-radio-checked-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("#{$base-url}icons/form-switch-bg-image.svg") !default;
|
||||
$form-switch-bg-image-dark: url("#{$base-url}icons/form-switch-bg-image-dark.svg") !default;
|
||||
$form-switch-focus-bg-image: url("#{$base-url}icons/form-switch-focus-bg-image.svg") !default;
|
||||
$form-switch-checked-bg-image: url("#{$base-url}icons/form-switch-checked-bg-image.svg") !default;
|
||||
$form-select-indicator: url("#{$base-url}icons/form-select-indicator.svg") !default;
|
||||
$form-select-indicator-dark: url("#{$base-url}icons/form-select-indicator-dark.svg") !default;
|
||||
$form-feedback-icon-valid: url("#{$base-url}icons/form-feedback-icon-valid.svg") !default;
|
||||
$form-feedback-icon-invalid: url("#{$base-url}icons/form-feedback-icon-invalid.svg") !default;
|
||||
$navbar-light-toggler-icon-bg: url("#{$base-url}icons/navbar-light-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("#{$base-url}icons/accordion-button-icon.svg") !default;
|
||||
$accordion-button-icon-dark: url("#{$base-url}icons/accordion-button-icon-dark.svg") !default;
|
||||
$accordion-button-active-icon: url("#{$base-url}icons/accordion-button-active-icon.svg") !default;
|
||||
$accordion-button-active-icon-dark: url("#{$base-url}icons/accordion-button-active-icon-dark.svg") !default;
|
||||
$carousel-control-prev-icon-bg: url("#{$base-url}icons/carousel-control-prev-icon-bg.svg") !default;
|
||||
$carousel-control-next-icon-bg: url("#{$base-url}icons/carousel-control-next-icon-bg.svg") !default;
|
||||
$btn-close-bg: url("#{$base-url}icons/btn-close-bg.svg") !default;
|
||||
$btn-toggle: url("#{$base-url}icons/btn-toggle.svg") !default;
|
||||
$btn-toggle-dark: url("#{$base-url}icons/btn-toggle-dark.svg") !default;
|
||||
|
||||
// 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 {
|
||||
[data-bs-theme-animate="true"] body {
|
||||
transition: background-color 0.5s, color 0.5s;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Remove underline from all links
|
||||
//
|
||||
@@ -140,6 +146,24 @@ $utilities: map-merge(
|
||||
}
|
||||
}
|
||||
|
||||
.main-cover {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(xxl) {
|
||||
.main-cover {
|
||||
min-height: calc(min(100vh, 1000px));
|
||||
}
|
||||
}
|
||||
|
||||
/* stylelint-disable media-feature-range-notation */
|
||||
@media (min-height: 1400px) {
|
||||
.main-cover {
|
||||
min-height: calc(min(100vh, 1000px));
|
||||
}
|
||||
}
|
||||
/* stylelint-enable media-feature-range-notation */
|
||||
|
||||
$utilities: map-merge(
|
||||
$utilities,
|
||||
(
|
||||
|
@@ -5,6 +5,8 @@ $enable-important-utilities: true !default;
|
||||
// Remove the border from the focused navigation toggler
|
||||
$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-size-base: h.$font-size-base !default;
|
||||
$headings-font-weight: 600 !default;
|
||||
|
@@ -5,6 +5,8 @@ $enable-important-utilities: true !default;
|
||||
// Remove the border from the focused navigation toggler
|
||||
$navbar-toggler-focus-width: 0 !default;
|
||||
|
||||
$base-url: $base-url;
|
||||
|
||||
// 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-size-base: $font-size-base !default;;
|
||||
|
@@ -1,6 +1,54 @@
|
||||
.blockquote {
|
||||
// background: var(--bs-light);
|
||||
border-left: 0.3rem solid;
|
||||
border-color: $secondary;
|
||||
padding: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
.blockquote-alert {
|
||||
--bs-blockquote-alert-color: $secondary;
|
||||
|
||||
border-left: 0.3rem solid;
|
||||
border-color: var(--bs-blockquote-alert-color);
|
||||
padding: .5rem 1.5rem;
|
||||
}
|
||||
|
||||
.blockquote-alert > p:nth-of-type(2) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.blockquote-alert-heading {
|
||||
font-weight: bold;
|
||||
color: var(--bs-blockquote-alert-color);
|
||||
}
|
||||
|
||||
.blockquote-alert-caution {
|
||||
--bs-blockquote-alert-color: var(--#{$prefix}danger);
|
||||
}
|
||||
|
||||
.blockquote-alert-important {
|
||||
--bs-blockquote-alert-color: var(--#{$prefix}primary);
|
||||
}
|
||||
|
||||
.blockquote-alert-note {
|
||||
--bs-blockquote-alert-color: var(--#{$prefix}info);
|
||||
}
|
||||
|
||||
.blockquote-alert-tip {
|
||||
--bs-blockquote-alert-color: var(--#{$prefix}success);
|
||||
}
|
||||
|
||||
.blockquote-alert-warning {
|
||||
--bs-blockquote-alert-color: var(--#{$prefix}warning);
|
||||
}
|
||||
|
||||
.blockquote-alert a.btn-link {
|
||||
--bs-link-color: var(--bs-blockquote-alert-color);
|
||||
--bs-link-hover-color: color-mix(in srgb, var(--bs-link-color), black 20%);
|
||||
|
||||
color: var(--bs-link-color) !important;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: var(--bs-link-hover-color) !important;
|
||||
}
|
||||
}
|
||||
|
@@ -44,4 +44,7 @@ a.btn {
|
||||
|
||||
.btn-link {
|
||||
--bs-btn-padding-x: 0;
|
||||
--bs-btn-padding-y: 0;
|
||||
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
@@ -68,8 +68,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.card-zoom card-body-link,
|
||||
.card-body-link {
|
||||
.card-zoom .card-body-link {
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: shade-color($primary, $link-shade-percentage) if($enable-important-utilities, !important, null);
|
||||
@@ -78,8 +77,7 @@
|
||||
|
||||
@if $enable-dark-mode {
|
||||
@include color-mode(dark) {
|
||||
.card-zoom card-body-link,
|
||||
.card-body-link {
|
||||
.card-zoom .card-body-link {
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $primary-bg-subtle-dark if($enable-important-utilities, !important, null);
|
||||
@@ -99,3 +97,56 @@
|
||||
.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;
|
||||
}
|
||||
|
@@ -1,13 +1,81 @@
|
||||
// stylelint-disable annotation-no-unknown
|
||||
|
||||
// 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}border-color);
|
||||
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));
|
||||
}
|
||||
|
||||
@if $enable-dark-mode {
|
||||
[data-bs-theme="light"] .mode-switch .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);
|
||||
}
|
||||
|
||||
// Source: https://jsfiddle.net/njhgr40m/
|
||||
|
||||
@if $enable-dark-mode {
|
||||
[data-bs-theme-animate="true"] .navbar {
|
||||
transition: 0.5s ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar {
|
||||
--bs-navbar-expanded-color: var(--bs-body-bg);
|
||||
--bs-navbar-toggler-color: var(--bs-navbar-hover-color);
|
||||
|
||||
transition: 0.5s ease-in-out;
|
||||
background-color: transparent;
|
||||
|
||||
@each $state, $val in $theme-colors {
|
||||
@@ -24,6 +92,15 @@
|
||||
margin: 0 .15rem;
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
text-align: center !important;
|
||||
vertical-align: middle;
|
||||
padding: 0 $spacer;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.navbar-contrast .nav-link.active, .navbar-contrast .nav-link.show, .navbar-contrast .nav-link:hover {
|
||||
border-bottom: solid 1px var(--bs-navbar-hover-color);
|
||||
margin-bottom: -1px;
|
||||
@@ -35,6 +112,16 @@
|
||||
--bs-navbar-disabled-color: white !important;
|
||||
--bs-navbar-active-color: white !important;
|
||||
--bs-navbar-toggler-color: white;
|
||||
|
||||
.navbar-title, .mode-switch {
|
||||
--#{$prefix}border-color: white;
|
||||
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.mode-switch .fa-moon {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-expanded {
|
||||
@@ -114,7 +201,7 @@
|
||||
background-color: var(--bs-navbar-toggler-color);
|
||||
}
|
||||
|
||||
.emphasis, .emphasis-dark, .emphasis-light {
|
||||
.emphasis {
|
||||
background-color: var(--bs-navbar-toggler-color);
|
||||
}
|
||||
|
||||
@@ -135,15 +222,6 @@
|
||||
--navbar-offset: #{$navbar-offset-xs};
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
text-align: center !important;
|
||||
vertical-align: middle;
|
||||
padding: 0 $spacer;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.navbar-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
@@ -236,3 +314,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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 {
|
||||
@include color-mode(dark) {
|
||||
.table-striped, .table-striped-columns {
|
||||
@@ -9,5 +22,13 @@
|
||||
--bs-table-hover-bg: var(--bs-tertiary-bg);
|
||||
--bs-table-striped-color: var(--bs-body-color);
|
||||
}
|
||||
|
||||
.datatable-pagination-list-item {
|
||||
&:hover,
|
||||
&:focus,
|
||||
&.datatable-active {
|
||||
color: var(--bs-body-bg) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -95,7 +95,7 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.120.0"
|
||||
min = "0.132.0"
|
||||
max = ""
|
||||
[[module.mounts]]
|
||||
source = "archetypes"
|
||||
@@ -125,7 +125,7 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-bootstrap"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-flexsearch"
|
||||
path = "github.com/gethinode/mod-flexsearch/v2"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-fontawesome"
|
||||
[[module.imports]]
|
||||
@@ -134,6 +134,8 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
path = "github.com/gethinode/mod-leaflet"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-lottie"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-simple-datatables"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-utils/v2"
|
||||
# toml-docs-end modules
|
||||
|
@@ -24,9 +24,15 @@ defaultMarkdownHandler = "goldmark"
|
||||
table = true
|
||||
taskList = true
|
||||
typographer = true
|
||||
[goldmark.extensions.passthrough]
|
||||
enable = true
|
||||
[goldmark.extensions.passthrough.delimiters]
|
||||
block = [['\[', '\]'], ['$$', '$$']]
|
||||
inline = [['\(', '\)'], ['$', '$']]
|
||||
[goldmark.parser]
|
||||
autoHeadingID = true
|
||||
autoHeadingIDType = 'github'
|
||||
wrapStandAloneImageWithinParagraph = false
|
||||
[goldmark.parser.attribute]
|
||||
block = true
|
||||
[goldmark.renderer]
|
||||
|
@@ -3,6 +3,7 @@
|
||||
separator = "-"
|
||||
description = "Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5."
|
||||
enableDarkMode = true
|
||||
enableLanguageSelectionStorage = false
|
||||
modes = ["light", "dark"]
|
||||
canonifyAssetsURLs = false
|
||||
endorse = true
|
||||
@@ -16,25 +17,15 @@
|
||||
transpiler = "libsass"
|
||||
# toml-docs-end main
|
||||
|
||||
# toml-docs-start modules
|
||||
[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
|
||||
[modules.utils]
|
||||
filter = "[^0-9A-Za-zŽžÀ-ÿ ;.,\\/'’\"]-"
|
||||
raw = false
|
||||
# toml-docs-end modules
|
||||
# toml-docs-start images
|
||||
[images]
|
||||
[images.cloudinary]
|
||||
host = "cloudinary"
|
||||
[images.imagekit]
|
||||
host = "imagekit"
|
||||
[images.imgix]
|
||||
host = "imgix"
|
||||
# toml-docs-end images
|
||||
|
||||
# toml-docs-start debugging
|
||||
[debugging]
|
||||
|
@@ -15,7 +15,7 @@ for = '/**'
|
||||
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
||||
font-src 'self' https://fonts.gstatic.com; \
|
||||
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
|
||||
img-src 'self' data: https://*.cloudinary.com 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'; \
|
||||
media-src 'self' \
|
||||
"""
|
||||
|
@@ -24,9 +24,10 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
|
||||
'./assets/scss/components/_video.scss',
|
||||
'./assets/scss/theme/fonts.scss',
|
||||
'./assets/scss/theme/theme.scss',
|
||||
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
|
||||
'./_vendor/github.com/gethinode/mod-flexsearch/v2/assets/scss/modules/flexsearch/flexsearch.scss',
|
||||
'./_vendor/github.com/gethinode/mod-katex/dist/katex.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/_dropdown.scss',
|
||||
'./_vendor/github.com/twbs/bootstrap/scss/_modal.scss',
|
||||
|
@@ -13,7 +13,7 @@
|
||||
- 992x661
|
||||
- 1200x800
|
||||
- 1400x933
|
||||
- 2800x1866
|
||||
- 2800x1867
|
||||
- ratio: 1x1
|
||||
dimensions:
|
||||
- 576x576
|
||||
@@ -29,7 +29,7 @@
|
||||
- 992x558
|
||||
- 1200x675
|
||||
- 1400x788
|
||||
- 2800x1576
|
||||
- 2800x1575
|
||||
- ratio: 21x9
|
||||
dimensions:
|
||||
- 576x247
|
||||
|
@@ -92,7 +92,8 @@ arguments:
|
||||
type: bool
|
||||
optional: true
|
||||
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:
|
||||
type: string
|
||||
optional: true
|
||||
@@ -102,7 +103,8 @@ arguments:
|
||||
type: bool
|
||||
optional: true
|
||||
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
|
||||
@@ -113,6 +115,20 @@ arguments:
|
||||
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.
|
||||
spacer:
|
||||
type: bool
|
||||
optional: true
|
||||
comment: >-
|
||||
Inserts a spacer before the card.
|
||||
release: v0.24.16
|
||||
group: partial
|
||||
hook:
|
||||
type: string
|
||||
optional: true
|
||||
|
@@ -90,6 +90,18 @@ arguments:
|
||||
- publication
|
||||
- tags
|
||||
- none
|
||||
body:
|
||||
type: select
|
||||
optional: true
|
||||
default: full
|
||||
parent: cascade
|
||||
release: v0.24.16
|
||||
comment: >-
|
||||
Body of the card.
|
||||
options:
|
||||
values:
|
||||
- full
|
||||
- none
|
||||
footer:
|
||||
type: select
|
||||
optional: true
|
||||
@@ -146,6 +158,16 @@ arguments:
|
||||
- 16x9
|
||||
- 21x9
|
||||
group: partial
|
||||
portrait:
|
||||
type: bool
|
||||
parent: cascade
|
||||
optional: true
|
||||
default: false
|
||||
release: v0.24.16
|
||||
comment: >-
|
||||
Flag to adjust the ratio from landscape to portrait. The image itself is
|
||||
not rotated, only the crop area is adjusted. Not applicable to vector
|
||||
graphics.
|
||||
alt:
|
||||
type: string
|
||||
optional: true
|
||||
@@ -157,6 +179,12 @@ arguments:
|
||||
optional: true
|
||||
comment: >-
|
||||
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:
|
||||
type: select
|
||||
parent: cascade
|
||||
@@ -169,6 +197,19 @@ arguments:
|
||||
- start
|
||||
- end
|
||||
- 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:
|
||||
type: string
|
||||
parent: cascade
|
||||
@@ -230,6 +271,25 @@ arguments:
|
||||
One or more strings separated by commas, indicating the source sizes of an
|
||||
image set.
|
||||
group: partial
|
||||
anchor:
|
||||
type: select
|
||||
optional: true
|
||||
comment:
|
||||
Anchor of the thumbnail's crop box, defaults to anchor value set in
|
||||
`imaging` section of the site configuration (usually `Smart`).
|
||||
options:
|
||||
values:
|
||||
- TopLeft
|
||||
- Top
|
||||
- TopRight
|
||||
- Left
|
||||
- Center
|
||||
- Right
|
||||
- BottomLeft
|
||||
- Bottom
|
||||
- BottomRight
|
||||
- Smart
|
||||
release: v0.24.23
|
||||
body:
|
||||
optional: true
|
||||
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'.
|
@@ -60,3 +60,20 @@ arguments:
|
||||
type: int
|
||||
optional: false
|
||||
comment: Width of the image in pixels.
|
||||
anchor:
|
||||
type: select
|
||||
optional: true
|
||||
comment: Anchor of the crop box.
|
||||
options:
|
||||
values:
|
||||
- TopLeft
|
||||
- Top
|
||||
- TopRight
|
||||
- Left
|
||||
- Center
|
||||
- Right
|
||||
- BottomLeft
|
||||
- Bottom
|
||||
- BottomRight
|
||||
- Smart
|
||||
|
||||
|
@@ -19,7 +19,9 @@ comment: >-
|
||||
reference.
|
||||
arguments:
|
||||
url:
|
||||
type: string
|
||||
type:
|
||||
- string
|
||||
- template.URL
|
||||
optional: true
|
||||
comment: >-
|
||||
Path or url of the image, e.g. `img/example.jpg`. Images with multiple
|
||||
@@ -34,6 +36,7 @@ arguments:
|
||||
page:
|
||||
type:
|
||||
- '*hugolib.pageState'
|
||||
- '*hugolib.pageForRenderHooks'
|
||||
- '*hugolib.pageForShortcode'
|
||||
optional: true
|
||||
comment: Page context, used to match page resources.
|
||||
@@ -107,7 +110,9 @@ arguments:
|
||||
image set.
|
||||
group: partial
|
||||
title:
|
||||
type: string
|
||||
type:
|
||||
- string
|
||||
- 'hstring.RenderedString'
|
||||
optional: true
|
||||
comment: Alternate text of the image.
|
||||
caption:
|
||||
@@ -128,3 +133,30 @@ arguments:
|
||||
optional: true
|
||||
comment: Class attribute of the figure caption, e.g. `px-4`.
|
||||
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
|
||||
anchor:
|
||||
type: select
|
||||
optional: true
|
||||
comment:
|
||||
Anchor of the crop box, defaults to anchor value set in `imaging` section
|
||||
of the site configuration (usually `Smart`).
|
||||
options:
|
||||
values:
|
||||
- TopLeft
|
||||
- Top
|
||||
- TopRight
|
||||
- Left
|
||||
- Center
|
||||
- Right
|
||||
- BottomLeft
|
||||
- Bottom
|
||||
- BottomRight
|
||||
- Smart
|
||||
release: v0.24.22
|
||||
|
@@ -10,6 +10,7 @@ arguments:
|
||||
page:
|
||||
type:
|
||||
- '*hugolib.pageState'
|
||||
- '*hugolib.pageForRenderHooks'
|
||||
- '*hugolib.pageForShortcode'
|
||||
optional: false
|
||||
group: partial
|
||||
@@ -70,11 +71,17 @@ arguments:
|
||||
type:
|
||||
- string
|
||||
- template.HTML
|
||||
- hstring.RenderedString
|
||||
optional: true
|
||||
group: partial
|
||||
comment: Link description.
|
||||
title:
|
||||
type: string
|
||||
optional: true
|
||||
comment: Link title.
|
||||
release: v0.26.0
|
||||
body:
|
||||
type: string
|
||||
optional: true
|
||||
group: shortcode
|
||||
comment: Link title.
|
||||
comment: Link description.
|
||||
|
@@ -32,3 +32,8 @@ arguments:
|
||||
comment: >-
|
||||
Flag to indicate if an external link should open in a new tab, defaults
|
||||
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.
|
||||
|
@@ -38,3 +38,12 @@ arguments:
|
||||
optional: true
|
||||
default: false
|
||||
comment: Flag to render the release button inline.
|
||||
type:
|
||||
type: select
|
||||
optional: true
|
||||
default: button
|
||||
comment: Type of the element.
|
||||
options:
|
||||
values:
|
||||
- link
|
||||
- button
|
||||
|
69
data/structures/scripts.yml
Normal file
69
data/structures/scripts.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
comment: >-
|
||||
Bundles a JavaScript file for client-side processing. Scripts can be included
|
||||
as critical, core, or optional file.
|
||||
arguments:
|
||||
page:
|
||||
type:
|
||||
- '*hugolib.pageState'
|
||||
- '*hugolib.pageForShortcode'
|
||||
optional: false
|
||||
comment: Context of the current page.
|
||||
core:
|
||||
type: bool
|
||||
default: false
|
||||
optional: true
|
||||
comment: >-
|
||||
Trigger to include all core files in the script bundle. Core bundles are
|
||||
loaded asynchronously in each page of the site.
|
||||
filename:
|
||||
type: string
|
||||
default: js/main.bundle.js
|
||||
optional: true
|
||||
comment: >-
|
||||
Path of the target bundle file, relative to the site root.
|
||||
match:
|
||||
type: string
|
||||
default: {js/*.js,js/vendor/**.js}
|
||||
optional: true
|
||||
comment: >-
|
||||
Regular expression that defines the pattern of source files to be included
|
||||
in the bundle. The pattern is relative to the project's `asset` folder.
|
||||
header:
|
||||
type: bool
|
||||
default: false
|
||||
comment: >-
|
||||
Trigger to consider the script as loaded in the page header. When enabled,
|
||||
it includes a script to load Google Analytics adjacent to any bundle
|
||||
input.
|
||||
localize:
|
||||
type: bool
|
||||
default: false
|
||||
optional: true
|
||||
comment: >-
|
||||
Triggers the creation of a language-specific bundle file. The language
|
||||
code is appended as suffix to the base name. For example, the English
|
||||
version of `js/main.bundle.js` becomes `js/main.bundle.en.js`.
|
||||
skipTemplate:
|
||||
type: bool
|
||||
default: false
|
||||
optional: true
|
||||
comment: >-
|
||||
Script source input can contain Go Template magic. As such, Hinode
|
||||
processes all input files with `resources.ExecuteAsTemplate`. However,
|
||||
certain input files may be incompatible. Set `skipTemplate` to true to
|
||||
skip template processing.
|
||||
state:
|
||||
type: select
|
||||
optional: true
|
||||
default: async
|
||||
comment: >-
|
||||
Defines the loading behavior of the script bundle. By default, scripts are
|
||||
processed in the background and loaded when ready (`async`). Set the state
|
||||
to `immediate` to load the script immediately (such as critical scripts).
|
||||
Use 'defer' to load the script in relative order when the DOM is fully
|
||||
built.
|
||||
options:
|
||||
values:
|
||||
- async
|
||||
- defer
|
||||
- immediate
|
@@ -1,6 +1,7 @@
|
||||
comment: >-
|
||||
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:
|
||||
breakpoint:
|
||||
type: select
|
||||
@@ -24,6 +25,21 @@ arguments:
|
||||
type: string
|
||||
optional: true
|
||||
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:
|
||||
type: string
|
||||
optional: false
|
||||
|
@@ -23,4 +23,13 @@ arguments:
|
||||
type: bool
|
||||
optional: true
|
||||
default: false
|
||||
comment: Flag indicating the video should start playing immediately when loaded.
|
||||
comment: >-
|
||||
Flag indicating the video should start playing immediately when loaded, if
|
||||
supported by the browser. The audio will be muted.
|
||||
autotitle:
|
||||
type: bool
|
||||
optional: true
|
||||
default: false
|
||||
release: v0.25.2
|
||||
comment: >-
|
||||
Trigger to retrieve the title from the video metadata.
|
||||
|
3
exampleSite/.gitignore
vendored
3
exampleSite/.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
/_vendor
|
||||
_vendor/
|
||||
exampleSite/public/
|
||||
public/
|
||||
resources/
|
||||
|
||||
|
@@ -22,6 +22,8 @@ reference = "More Projects"
|
||||
languageName = "Nederlands"
|
||||
contentDir = "content/nl"
|
||||
weight = 2
|
||||
[nl.params.opengraph]
|
||||
locale = "nl_NL"
|
||||
[nl.params.head]
|
||||
tagline = "Een Hugo Thema"
|
||||
[nl.params.social]
|
||||
@@ -39,6 +41,8 @@ reference = "Meer projecten"
|
||||
languageName = "Français"
|
||||
contentDir = "content/fr"
|
||||
weight = 2
|
||||
[fr.params.opengraph]
|
||||
locale = "fr_FR"
|
||||
[fr.params.head]
|
||||
tagline = "Un thème Hugo"
|
||||
[fr.params.social]
|
||||
|
@@ -24,9 +24,15 @@ defaultMarkdownHandler = "goldmark"
|
||||
table = true
|
||||
taskList = true
|
||||
typographer = true
|
||||
[goldmark.extensions.passthrough]
|
||||
enable = true
|
||||
[goldmark.extensions.passthrough.delimiters]
|
||||
block = [['\[', '\]'], ['$$', '$$']]
|
||||
inline = [['\(', '\)'], ['$', '$']]
|
||||
[goldmark.parser]
|
||||
autoHeadingID = true
|
||||
autoHeadingIDType = 'github'
|
||||
wrapStandAloneImageWithinParagraph = false
|
||||
[goldmark.parser.attribute]
|
||||
block = true
|
||||
[goldmark.renderer]
|
||||
|
@@ -2,6 +2,7 @@
|
||||
separator = "-"
|
||||
description = "Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5."
|
||||
enableDarkMode = true
|
||||
enableLanguageSelectionStorage = true
|
||||
modes = ["light", "dark"]
|
||||
canonifyAssetsURLs = false
|
||||
footerBelowFold = false
|
||||
@@ -13,21 +14,6 @@
|
||||
[main.build]
|
||||
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]
|
||||
showJS = false
|
||||
showSCSS = false
|
||||
@@ -70,6 +56,14 @@
|
||||
[messages]
|
||||
placement = "bottom-right"
|
||||
|
||||
[dam]
|
||||
dimensions = "dimensions.yml"
|
||||
|
||||
[[dam.providers]]
|
||||
name = "Cloudinary"
|
||||
pattern = "cloudinary"
|
||||
adapter = "assets/adapters/cloudinary.html"
|
||||
|
||||
[sharing]
|
||||
enabled = true
|
||||
sort = "weight"
|
||||
|
@@ -15,7 +15,7 @@ for = '/**'
|
||||
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
||||
font-src 'self' https://fonts.gstatic.com; \
|
||||
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
|
||||
img-src 'self' data: https://*.cloudinary.com 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'; \
|
||||
media-src 'self' \
|
||||
"""
|
||||
|
@@ -24,7 +24,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
|
||||
'./_vendor/github.com/gethinode/hinode/assets/scss/components/_video.scss',
|
||||
'./_vendor/github.com/gethinode/hinode/assets/scss/theme/fonts.scss',
|
||||
'./_vendor/github.com/gethinode/hinode/assets/scss/theme/theme.scss',
|
||||
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
|
||||
'./_vendor/github.com/gethinode/mod-flexsearch/v2/assets/scss/modules/flexsearch/flexsearch.scss',
|
||||
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
|
||||
'./_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss',
|
||||
'./_vendor/github.com/twbs/bootstrap/scss/_carousel.scss',
|
||||
|
@@ -27,6 +27,6 @@ Additional features include:
|
||||
* Reusable Bootstrap components through configurable shortcodes and partials
|
||||
* Versioned documentation, including sidebar navigation and version switcher
|
||||
* Responsive image handling for multiple screen sizes and resolutions
|
||||
* Optimized search results, scoring 100 points for SEO on [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
||||
* Secure by default, scoring A+ on [Mozilla Observatory test]({{< param "links.observatory" >}})
|
||||
* Optimized search results, scoring 100 points for SEO on [PageSpeed Insights]({{% param "links.pagespeed" %}})
|
||||
* Secure by default, scoring A+ on [Mozilla Observatory test]({{% param "links.observatory" %}})
|
||||
{.tickmark}
|
||||
|
@@ -12,7 +12,7 @@ thumbnail:
|
||||
originURL: https://unsplash.com/photos/QLPWQvHvmII
|
||||
---
|
||||
|
||||
Hinode provides several shortcodes that wrap common Bootstrap components. Refer to the [official documentation]({{< param "links.hinode_docs" >}}) for more details.
|
||||
Hinode provides several shortcodes that wrap common Bootstrap components. Refer to the [official documentation]({{% param "links.hinode_docs" %}}) for more details.
|
||||
|
||||
## Abbr
|
||||
|
||||
@@ -121,7 +121,7 @@ As an example, the following shortcode displays a group of three buttons.
|
||||
|
||||
## Card
|
||||
|
||||
As an example, the following shortcode displays a stacked card that links to the [about]({{< ref "about" >}}) page. It includes a custom header.
|
||||
As an example, the following shortcode displays a stacked card that links to the [about]({{% ref "about" %}}) page. It includes a custom header.
|
||||
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
{{< example lang="hugo" >}}
|
||||
@@ -136,7 +136,7 @@ As an example, the following shortcode displays a card group of three elements.
|
||||
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
{{< example lang="hugo" >}}
|
||||
{{</* card-group padding="3" gutter="3" button=true buttonType="link" */>}}
|
||||
{{</* card-group padding="3" gutter="3" button=true buttonType="link" cols=2 scroll=true */>}}
|
||||
{{</* card title="Bootstrap framework" icon="fab bootstrap" */>}}
|
||||
Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source
|
||||
Sass files.
|
||||
@@ -255,14 +255,22 @@ As an example, the following shortcodes show a square check, a brand logo, a cir
|
||||
|
||||
## 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 -->
|
||||
{{< 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 >}}
|
||||
<!-- markdownlint-enable MD037 -->
|
||||
|
||||
The same image, but then using Markdown syntax:
|
||||
|
||||
{{< example lang="hugo" >}}
|
||||

|
||||
{class="rounded col-md-6" ratio="4x3" portrait=true wrapper="text-center"}
|
||||
{{< /example >}}
|
||||
|
||||
As an example, the following shortcode displays a regular vector image.
|
||||
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
@@ -465,3 +473,13 @@ As an example, the following shortcode displays a tooltip for a colored hyperlin
|
||||
{{</* tooltip color="primary" title="Tooltip caption" href="#!" */>}}Tooltip{{</* /tooltip */>}} demonstration
|
||||
{{< /example >}}
|
||||
<!-- markdownlint-enable MD037 -->
|
||||
|
||||
## Youtube
|
||||
|
||||
As an example, the following shortcode displays a Hugo quickstart guide.
|
||||
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
{{< example lang="hugo" >}}
|
||||
{{</* youtube id="w7Ft2ymGmfc" autoplay=true autotitle=true */>}}
|
||||
{{< /example >}}
|
||||
<!-- markdownlint-enable MD037 -->
|
||||
|
@@ -10,10 +10,10 @@ thumbnail:
|
||||
authorURL: https://unsplash.com/@ryoji__iwata
|
||||
origin: Unsplash
|
||||
originURL: https://unsplash.com/photos/5siQcvSxCP8
|
||||
modules: ["katex", "leaflet", "lottie"]
|
||||
modules: ["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.
|
||||
|
||||
## Animation
|
||||
|
||||
@@ -25,9 +25,52 @@ As an example, the following shortcode shows an animation that plays on hover.
|
||||
{{< /example >}}
|
||||
<!-- 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)
|
||||
|
||||
As an example, the following markdown renders two formulas using the KaTeX typesetting library.
|
||||
As an example, the following markdown renders two formulas using server-side math rendering using KaTeX.
|
||||
|
||||
{{< example lang="markdown" >}}
|
||||
This is an inline $-b \pm \sqrt{b^2 - 4ac} \over 2a$ formula
|
||||
|
@@ -5,11 +5,7 @@ date: 2024-05-19
|
||||
description: Include responsive images from local sources and selected CDN image providers.
|
||||
tags: ["blog"]
|
||||
thumbnail:
|
||||
url: https://res.cloudinary.com/demo/image/upload/v1689803100/ai/hiker.jpg
|
||||
author: Nathan Dumlao
|
||||
authorURL: https://unsplash.com/@nate_dumlao
|
||||
origin: Unsplash
|
||||
originURL: https://unsplash.com/photos/QLPWQvHvmII
|
||||
url: https://assets.imgix.net/examples/bluehat.jpg
|
||||
---
|
||||
|
||||
## Cloudinary
|
||||
@@ -19,6 +15,28 @@ As an example, the following shortcode displays an image with rounded corners an
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
{{< example lang="hugo" >}}
|
||||
{{</* image src="https://res.cloudinary.com/demo/image/upload/dog.webp"
|
||||
ratio="21x9" caption="Cloudinary image" class="rounded" */>}}
|
||||
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" anchor="Center" */>}}
|
||||
{{< /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" anchor="Top" */>}}
|
||||
{{< /example >}}
|
||||
<!-- markdownlint-enable MD037 -->
|
||||
|
@@ -28,6 +28,6 @@ Les fonctionnalités supplémentaires incluent:
|
||||
- Composants bootstrap réutilisables à travers des codes et partiels configurables
|
||||
- Documentation versionnée, incluant une navigation latérale et un sélecteur de version.
|
||||
- Gestion d'images adaptatives pour plusieurs tailles d'écran et résolutions.
|
||||
- Résultats de recherche optimisés, obtenant un score de 100 points pour le référencement (SEO) sur [PageSpeed Insights]({{< param "links.pagespeed" >}}).
|
||||
- Sécurisé par défaut, obtenant un score A+ au test [Mozilla Observatory]({{< param "links.observatory" >}})
|
||||
- Résultats de recherche optimisés, obtenant un score de 100 points pour le référencement (SEO) sur [PageSpeed Insights]({{% param "links.pagespeed" %}}).
|
||||
- Sécurisé par défaut, obtenant un score A+ au test [Mozilla Observatory]({{% param "links.observatory" %}})
|
||||
{.tickmark}
|
||||
|
@@ -13,7 +13,7 @@ thumbnail:
|
||||
originURL: https://unsplash.com/photos/QLPWQvHvmII
|
||||
---
|
||||
|
||||
Hinode propose plusieurs shortcodes qui enveloppent des composants Bootstrap courants. Consultez la [documentation officielle]({{< param "links.hinode_docs" >}}) pour plus de détails.
|
||||
Hinode propose plusieurs shortcodes qui enveloppent des composants Bootstrap courants. Consultez la [documentation officielle]({{% param "links.hinode_docs" %}}) pour plus de détails.
|
||||
|
||||
## Abbr
|
||||
|
||||
@@ -121,7 +121,7 @@ En-tête 6 {{</* badge title="Nouveau" */>}}
|
||||
|
||||
## Carte
|
||||
|
||||
À titre d'exemple, le shortcode suivant affiche une carte empilée qui renvoie à la page [à propos]({{< ref "about" >}}). Elle inclut un en-tête personnalisé.
|
||||
À titre d'exemple, le shortcode suivant affiche une carte empilée qui renvoie à la page [à propos]({{% ref "about" %}}). Elle inclut un en-tête personnalisé.
|
||||
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
{{< example lang="hugo" >}}
|
||||
|
@@ -14,7 +14,7 @@ thumbnail:
|
||||
modules: ["katex", "leaflet", "lottie"]
|
||||
---
|
||||
|
||||
Hinode propose plusieurs shortcodes en plus des [éléments Bootstrap]({{< relref "bootstrap-elements" >}}) courants. Consultez la [documentation officielle]({{< param "links.hinode_docs" >}}) pour plus de détails.
|
||||
Hinode propose plusieurs shortcodes en plus des [éléments Bootstrap]({{% relref "bootstrap-elements" %}}) courants. Consultez la [documentation officielle]({{% param "links.hinode_docs" %}}) pour plus de détails.
|
||||
|
||||
## Animation
|
||||
|
||||
|
@@ -29,6 +29,6 @@ Overige functies:
|
||||
* Herbruikbare Bootstrap componenten via shortcodes en partials
|
||||
* Versiebeheer van documentatiepagina's, inclusief secundaire navigatie en selectie van versies
|
||||
* Optimalisering van foto's voor meerdere schermafmetingen en resoluties
|
||||
* Optimale zoekresultaten, met 100 punten voor SEO volgens [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
||||
* Veilige communicatie, met een score van A+ volgens [Mozilla Observatory]({{< param "links.observatory" >}})
|
||||
* Optimale zoekresultaten, met 100 punten voor SEO volgens [PageSpeed Insights]({{% param "links.pagespeed" %}})
|
||||
* Veilige communicatie, met een score van A+ volgens [Mozilla Observatory]({{% param "links.observatory" %}})
|
||||
{.tickmark}
|
||||
|
@@ -3,8 +3,8 @@
|
||||
"tags": [
|
||||
"a",
|
||||
"abbr",
|
||||
"annotation",
|
||||
"body",
|
||||
"br",
|
||||
"button",
|
||||
"code",
|
||||
"div",
|
||||
@@ -20,12 +20,24 @@
|
||||
"hr",
|
||||
"html",
|
||||
"i",
|
||||
"iframe",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"link",
|
||||
"mark",
|
||||
"math",
|
||||
"meta",
|
||||
"mfrac",
|
||||
"mi",
|
||||
"mn",
|
||||
"mo",
|
||||
"mrow",
|
||||
"mspace",
|
||||
"msqrt",
|
||||
"msub",
|
||||
"msup",
|
||||
"nav",
|
||||
"noscript",
|
||||
"ol",
|
||||
@@ -33,6 +45,7 @@
|
||||
"path",
|
||||
"pre",
|
||||
"script",
|
||||
"semantics",
|
||||
"small",
|
||||
"span",
|
||||
"strong",
|
||||
@@ -69,6 +82,7 @@
|
||||
"align-self-end",
|
||||
"anchor",
|
||||
"badge",
|
||||
"ball",
|
||||
"bg-body",
|
||||
"bg-body-tertiary",
|
||||
"bg-danger",
|
||||
@@ -101,11 +115,14 @@
|
||||
"btn-sm",
|
||||
"btn-social",
|
||||
"card",
|
||||
"card-block-2",
|
||||
"card-body",
|
||||
"card-body-link",
|
||||
"card-body-margin",
|
||||
"card-button",
|
||||
"card-button-link",
|
||||
"card-container",
|
||||
"card-container-wrapper",
|
||||
"card-emphasize",
|
||||
"card-icon",
|
||||
"card-img-bg",
|
||||
@@ -123,6 +140,7 @@
|
||||
"carousel-indicators",
|
||||
"carousel-inner",
|
||||
"carousel-item",
|
||||
"checkbox",
|
||||
"chroma",
|
||||
"col",
|
||||
"col-10",
|
||||
@@ -131,22 +149,24 @@
|
||||
"col-3",
|
||||
"col-4",
|
||||
"col-6",
|
||||
"col-8",
|
||||
"col-9",
|
||||
"col-auto",
|
||||
"col-lg-2",
|
||||
"col-lg-4",
|
||||
"col-lg-8",
|
||||
"col-md-10",
|
||||
"col-md-2",
|
||||
"col-md-3",
|
||||
"col-md-4",
|
||||
"col-md-6",
|
||||
"col-md-8",
|
||||
"col-md-9",
|
||||
"col-md-auto",
|
||||
"col-sm-12",
|
||||
"col-sm-3",
|
||||
"col-sm-6",
|
||||
"col-sm-9",
|
||||
"col-xl-10",
|
||||
"col-xl-2",
|
||||
"collapse",
|
||||
"collapsed",
|
||||
"container",
|
||||
@@ -167,6 +187,7 @@
|
||||
"d-none-light",
|
||||
"d-sm-block",
|
||||
"d-sm-none",
|
||||
"data-table",
|
||||
"display-1",
|
||||
"display-4",
|
||||
"dropdown",
|
||||
@@ -176,7 +197,6 @@
|
||||
"dropdown-menu-end",
|
||||
"dropdown-toggle",
|
||||
"emphasis",
|
||||
"emphasis-dark",
|
||||
"end-0",
|
||||
"fa",
|
||||
"fa-10x",
|
||||
@@ -188,7 +208,6 @@
|
||||
"fa-arrow-right",
|
||||
"fa-bootstrap",
|
||||
"fa-circle-check",
|
||||
"fa-circle-half-stroke",
|
||||
"fa-code",
|
||||
"fa-docker",
|
||||
"fa-ellipsis",
|
||||
@@ -223,12 +242,15 @@
|
||||
"flex-fill",
|
||||
"flex-grow-1",
|
||||
"flex-md-grow-0",
|
||||
"flex-nowrap",
|
||||
"flex-row",
|
||||
"font-monospace",
|
||||
"footer",
|
||||
"form-control",
|
||||
"fs-3",
|
||||
"fs-5",
|
||||
"fs-6",
|
||||
"fs-lg-5",
|
||||
"fs-md-5",
|
||||
"fw-30",
|
||||
"fw-bold",
|
||||
@@ -257,6 +279,8 @@
|
||||
"justify-content-center",
|
||||
"justify-content-end",
|
||||
"justify-content-start",
|
||||
"katex",
|
||||
"label",
|
||||
"lead",
|
||||
"leaflet-map",
|
||||
"link-bg-body",
|
||||
@@ -278,6 +302,7 @@
|
||||
"me-auto",
|
||||
"middle-bar",
|
||||
"min-vh-100",
|
||||
"mode-switch",
|
||||
"ms-1",
|
||||
"ms-3",
|
||||
"ms-auto",
|
||||
@@ -309,6 +334,7 @@
|
||||
"navbar-contrast",
|
||||
"navbar-expand-md",
|
||||
"navbar-fixed-top",
|
||||
"navbar-mode-selector",
|
||||
"navbar-nav",
|
||||
"navbar-nav-scroll",
|
||||
"navbar-title",
|
||||
@@ -376,6 +402,7 @@
|
||||
"row-cols-md-3",
|
||||
"row-cols-sm-2",
|
||||
"row-cols-sm-3",
|
||||
"scrollbar-horizontal",
|
||||
"search",
|
||||
"search-input",
|
||||
"search-suggestions",
|
||||
@@ -391,7 +418,6 @@
|
||||
"sticky-top",
|
||||
"stretched-link",
|
||||
"svg-inline--fa",
|
||||
"switch-mode-collapsed",
|
||||
"syntax-highlight",
|
||||
"tab-content",
|
||||
"tab-pane",
|
||||
@@ -419,8 +445,6 @@
|
||||
"text-sm-start",
|
||||
"text-start",
|
||||
"text-uppercase",
|
||||
"theme-icon",
|
||||
"theme-icon-active",
|
||||
"tickmark",
|
||||
"timeline",
|
||||
"timeline-bg-dark",
|
||||
@@ -456,11 +480,10 @@
|
||||
"visually-hidden",
|
||||
"vr",
|
||||
"w-100",
|
||||
"w-50"
|
||||
"w-50",
|
||||
"youtube-embedded"
|
||||
],
|
||||
"ids": [
|
||||
"-theme",
|
||||
"-theme-collapsed",
|
||||
"TableOfContents",
|
||||
"abbr",
|
||||
"accordion",
|
||||
@@ -496,6 +519,7 @@
|
||||
"collapse",
|
||||
"collapse-1",
|
||||
"command-prompt",
|
||||
"data-tables",
|
||||
"docs",
|
||||
"documentation",
|
||||
"example",
|
||||
@@ -511,9 +535,12 @@
|
||||
"groupe-de-cartes",
|
||||
"icon",
|
||||
"image",
|
||||
"imagekitio",
|
||||
"imgix",
|
||||
"indicateur-de-chargement",
|
||||
"infobulle",
|
||||
"invite-de-commandes",
|
||||
"language-selector",
|
||||
"leaflet-map-0",
|
||||
"lien",
|
||||
"link",
|
||||
@@ -530,6 +557,8 @@
|
||||
"nav-0-btn-2",
|
||||
"navbar",
|
||||
"navbar-0-collapse",
|
||||
"navbar-mode",
|
||||
"navbar-mode-checkbox",
|
||||
"navbar-sample-collapse",
|
||||
"navigation",
|
||||
"notification",
|
||||
@@ -554,7 +583,8 @@
|
||||
"toast-example-2",
|
||||
"toast-message-email-4",
|
||||
"toc-collapse",
|
||||
"tooltip"
|
||||
"tooltip",
|
||||
"youtube"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
17
go.mod
17
go.mod
@@ -4,13 +4,14 @@ go 1.19
|
||||
|
||||
require (
|
||||
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
|
||||
github.com/gethinode/mod-bootstrap v1.2.8 // indirect
|
||||
github.com/gethinode/mod-flexsearch v1.11.3 // indirect
|
||||
github.com/gethinode/mod-fontawesome v1.8.2 // indirect
|
||||
github.com/gethinode/mod-katex v1.0.9 // indirect
|
||||
github.com/gethinode/mod-leaflet v1.0.1 // indirect
|
||||
github.com/gethinode/mod-lottie v1.4.6 // indirect
|
||||
github.com/gethinode/mod-utils/v2 v2.2.2 // indirect
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 // indirect
|
||||
github.com/gethinode/mod-bootstrap v1.3.1 // indirect
|
||||
github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect
|
||||
github.com/gethinode/mod-fontawesome v1.9.1 // indirect
|
||||
github.com/gethinode/mod-katex v1.1.2 // indirect
|
||||
github.com/gethinode/mod-leaflet v1.1.1 // indirect
|
||||
github.com/gethinode/mod-lottie v1.5.6 // indirect
|
||||
github.com/gethinode/mod-simple-datatables v1.0.7 // indirect
|
||||
github.com/gethinode/mod-utils/v2 v2.3.10 // indirect
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect
|
||||
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
||||
)
|
||||
|
76
go.sum
76
go.sum
@@ -20,6 +20,10 @@ github.com/gethinode/mod-bootstrap v1.2.6 h1:joKKVqWzPgitPbUFlU4oIRj72YXsEHkVun3
|
||||
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-bootstrap v1.3.1 h1:ZUX72St0WZ5tyXpEPBJlayX/dmCH3cGErzsozkUKCok=
|
||||
github.com/gethinode/mod-bootstrap v1.3.1/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
|
||||
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.1.0 h1:7BCMyQDlYlskNXuazt8Jg/jg9WREexu2xVkYqThkAX4=
|
||||
@@ -64,6 +68,12 @@ 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.3 h1:ykxpUg8M4vr1C4QzxJOPGt+1ZmPAD/gOCZoFcZxWoWw=
|
||||
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-flexsearch v1.12.1 h1:clkGUWaNPe9Dt/66Apy7oH9NwVQfnD6OpGSLffeC9sY=
|
||||
github.com/gethinode/mod-flexsearch v1.12.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
|
||||
github.com/gethinode/mod-flexsearch/v2 v2.0.1 h1:5unGUSb1tX1LBtKygnLfdt7CnVJuFKSt6VXiKRxdojc=
|
||||
github.com/gethinode/mod-flexsearch/v2 v2.0.1/go.mod h1:d7MMkVlz0l6cEk76e0mkveEsDxGfu5Sv+HUIhoGguhE=
|
||||
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.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=
|
||||
@@ -102,6 +112,10 @@ github.com/gethinode/mod-fontawesome v1.8.1 h1:iyvULrpaGizQoI5Vl9WjFYcMGWefdyG90
|
||||
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-fontawesome v1.9.1 h1:cQk84vriqffM4fuUUoM9j3SSD+3ppeW2j4ta7AiToMU=
|
||||
github.com/gethinode/mod-fontawesome v1.9.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
||||
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.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
||||
@@ -120,6 +134,12 @@ github.com/gethinode/mod-katex v1.0.8 h1:tFGFz/JIEogCz4wvUsUncrOsOupPxsjP+TwU/3N
|
||||
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-katex v1.1.1 h1:z8+mfVI6UTWcfpQMVPIzxQzt6Lp9BcmXxSOILQ84qFg=
|
||||
github.com/gethinode/mod-katex v1.1.1/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||
github.com/gethinode/mod-katex v1.1.2 h1:TbeVIWeG5TqldlVxpM1upOWj11RljXy4fhpOQIwOnS4=
|
||||
github.com/gethinode/mod-katex v1.1.2/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||
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.3.1 h1:H5MaOa+BB1KuVw7abTqfIn/SNzzRsAyx/WQoSe+2Ykc=
|
||||
@@ -136,6 +156,10 @@ github.com/gethinode/mod-leaflet v1.0.0 h1:HdnWafOGkkK1hYGfqLYF3pp9dAFS/caxlzML9
|
||||
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-leaflet v1.1.1 h1:AIHR4k8SjmeoZxtjLgSS6/N3jKeZNZGdZTgu/7MwP4c=
|
||||
github.com/gethinode/mod-leaflet v1.1.1/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
|
||||
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.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
|
||||
@@ -160,6 +184,34 @@ github.com/gethinode/mod-lottie v1.4.4 h1:Lv7J+lAMx++aK9h0L7vAgsjyOZgrjux4xPz4Tp
|
||||
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-lottie v1.5.6 h1:dxz5nmD0XXEt/DAOc1s5fIPynj5bhzDL32EEwLFCSmk=
|
||||
github.com/gethinode/mod-lottie v1.5.6/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-simple-datatables v1.0.3 h1:JL2nBlEHWMmkE7EZrpfpmzka47dklJUh23/xKJkOQoI=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.3/go.mod h1:mmrcvAJU2i3SMU56VmQ5PW43uDXBcsJKcZwCHrvl3Kc=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.5 h1:2Aa4k1Bd1WEYHbskFQj+1X35BB7abB8RXHE7Uk2N4pg=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.5/go.mod h1:mmrcvAJU2i3SMU56VmQ5PW43uDXBcsJKcZwCHrvl3Kc=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.6 h1:voKiwLAfC7kfD+atv7ah0sOf8OcPRyxEB/Q92gx1d00=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.6/go.mod h1:Y7AzIYAWpzDKLvH96eqBA/Gs3jompWCgxadLuoKZ/rc=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.7 h1:pfxWhgmn/njJcynNIDnUyeOBW0tsy2E4TP21sEYsqRs=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.7/go.mod h1:Y7AzIYAWpzDKLvH96eqBA/Gs3jompWCgxadLuoKZ/rc=
|
||||
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.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
|
||||
@@ -184,12 +236,36 @@ github.com/gethinode/mod-utils/v2 v2.1.1 h1:aLBcS9Zbx+dqnu5oBsTM01AkkN5nwwifgbV4
|
||||
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/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/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 h1:H6xa5YyCHr78M+qqCApM4Kvz/eMA7pfGskYmfkEBRCA=
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 h1:6PNbL0/LxO8Xl8MZSe5uvCidYNpFTz9nlWTqj2qdlzA=
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
||||
github.com/twbs/bootstrap v5.3.2+incompatible h1:tuiO5acc6xnZUR77Sbi5aKWXxjYxbmsSbJwYrhAKoQQ=
|
||||
github.com/twbs/bootstrap v5.3.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
|
||||
github.com/twbs/bootstrap v5.3.3+incompatible h1:goFoqinzdHfkeegpFP7pvhbd0g+A3O2hbU3XCjuNrEQ=
|
||||
|
@@ -2,23 +2,43 @@
|
||||
"htmlElements": {
|
||||
"tags": [
|
||||
"a",
|
||||
"annotation",
|
||||
"body",
|
||||
"button",
|
||||
"div",
|
||||
"footer",
|
||||
"form",
|
||||
"h5",
|
||||
"head",
|
||||
"html",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"link",
|
||||
"math",
|
||||
"meta",
|
||||
"mfrac",
|
||||
"mi",
|
||||
"mn",
|
||||
"mo",
|
||||
"mpadded",
|
||||
"mphantom",
|
||||
"mrow",
|
||||
"mspace",
|
||||
"msqrt",
|
||||
"mstyle",
|
||||
"msub",
|
||||
"msup",
|
||||
"mtext",
|
||||
"munder",
|
||||
"nav",
|
||||
"noscript",
|
||||
"ol",
|
||||
"p",
|
||||
"path",
|
||||
"script",
|
||||
"semantics",
|
||||
"small",
|
||||
"span",
|
||||
"strong",
|
||||
@@ -31,9 +51,11 @@
|
||||
"align-items-center",
|
||||
"align-self-center",
|
||||
"align-self-end",
|
||||
"ball",
|
||||
"bg-body",
|
||||
"bg-opacity-10",
|
||||
"bg-primary",
|
||||
"border-0",
|
||||
"bottom-0",
|
||||
"bottom-bar",
|
||||
"breadcrumb",
|
||||
@@ -41,9 +63,19 @@
|
||||
"btn",
|
||||
"btn-close",
|
||||
"btn-primary",
|
||||
"btn-social",
|
||||
"card",
|
||||
"card-body",
|
||||
"card-body-link",
|
||||
"card-text",
|
||||
"card-title",
|
||||
"card-zoom",
|
||||
"checkbox",
|
||||
"col",
|
||||
"col-12",
|
||||
"col-6",
|
||||
"col-lg-2",
|
||||
"col-lg-8",
|
||||
"col-md-2",
|
||||
"col-md-3",
|
||||
"col-md-4",
|
||||
@@ -56,31 +88,31 @@
|
||||
"container-xxl",
|
||||
"d-flex",
|
||||
"d-inline",
|
||||
"d-lg-block",
|
||||
"d-md-block",
|
||||
"d-md-none",
|
||||
"d-none",
|
||||
"display-1",
|
||||
"display-4",
|
||||
"dropdown",
|
||||
"dropdown-item",
|
||||
"dropdown-menu",
|
||||
"dropdown-menu-end",
|
||||
"dropdown-toggle",
|
||||
"emphasis",
|
||||
"end-0",
|
||||
"fa",
|
||||
"fa-10x",
|
||||
"fa-2x",
|
||||
"fa-book-open",
|
||||
"fa-circle-half-stroke",
|
||||
"fa-ellipsis",
|
||||
"fa-face-frown",
|
||||
"fa-facebook",
|
||||
"fa-fw",
|
||||
"fa-github",
|
||||
"fa-link",
|
||||
"fa-linkedin",
|
||||
"fa-medium",
|
||||
"fa-moon",
|
||||
"fa-share-nodes",
|
||||
"fa-sun",
|
||||
"fa-whatsapp",
|
||||
"fa-x-twitter",
|
||||
"fab",
|
||||
"fas",
|
||||
"fixed-top",
|
||||
@@ -90,8 +122,13 @@
|
||||
"form-control",
|
||||
"fs-3",
|
||||
"fs-5",
|
||||
"fs-6",
|
||||
"fs-lg-5",
|
||||
"fw-30",
|
||||
"fw-bold",
|
||||
"g-4",
|
||||
"gap-1",
|
||||
"h-100",
|
||||
"hstack",
|
||||
"img-fluid",
|
||||
"img-wrap",
|
||||
@@ -100,13 +137,21 @@
|
||||
"justify-content-center",
|
||||
"justify-content-end",
|
||||
"justify-content-start",
|
||||
"katex",
|
||||
"label",
|
||||
"lead",
|
||||
"link-bg-footer",
|
||||
"link-secondary",
|
||||
"main-content",
|
||||
"main-nav-toggler",
|
||||
"mb-3",
|
||||
"mb-4",
|
||||
"mb-5",
|
||||
"mb-lg-5",
|
||||
"me-auto",
|
||||
"middle-bar",
|
||||
"min-vh-100",
|
||||
"mode-switch",
|
||||
"ms-auto",
|
||||
"ms-md-3",
|
||||
"mt-3",
|
||||
@@ -114,6 +159,7 @@
|
||||
"mx-auto",
|
||||
"mx-md-0",
|
||||
"my-auto",
|
||||
"my-md-0",
|
||||
"my-md-auto",
|
||||
"nav-item",
|
||||
"nav-link",
|
||||
@@ -123,9 +169,15 @@
|
||||
"navbar-container",
|
||||
"navbar-expand-md",
|
||||
"navbar-fixed-top",
|
||||
"navbar-mode-selector",
|
||||
"navbar-nav",
|
||||
"navbar-toggler",
|
||||
"no-js",
|
||||
"offcanvas",
|
||||
"offcanvas-body",
|
||||
"offcanvas-header",
|
||||
"offcanvas-start",
|
||||
"offcanvas-title",
|
||||
"order-0",
|
||||
"order-1",
|
||||
"order-md-0",
|
||||
@@ -135,11 +187,11 @@
|
||||
"p-3",
|
||||
"p-4",
|
||||
"pb-4",
|
||||
"pb-5",
|
||||
"pb-md-0",
|
||||
"position-fixed",
|
||||
"position-relative",
|
||||
"ps-1",
|
||||
"pt-4",
|
||||
"pt-5",
|
||||
"pt-md-3",
|
||||
"px-4",
|
||||
@@ -149,35 +201,48 @@
|
||||
"row",
|
||||
"row-cols-1",
|
||||
"row-cols-2",
|
||||
"row-cols-lg-3",
|
||||
"row-cols-md-2",
|
||||
"row-cols-md-3",
|
||||
"row-cols-sm-2",
|
||||
"row-cols-sm-3",
|
||||
"search",
|
||||
"search-input",
|
||||
"search-suggestions",
|
||||
"shadow",
|
||||
"sidebar-overflow",
|
||||
"sticky-top",
|
||||
"stretched-link",
|
||||
"svg-inline--fa",
|
||||
"switch-mode-collapsed",
|
||||
"text-body-secondary",
|
||||
"text-center",
|
||||
"text-decoration-none",
|
||||
"text-end",
|
||||
"text-muted",
|
||||
"text-secondary",
|
||||
"text-sm-start",
|
||||
"text-start",
|
||||
"theme-icon",
|
||||
"theme-icon-active",
|
||||
"text-uppercase",
|
||||
"toast",
|
||||
"toast-body",
|
||||
"toast-container",
|
||||
"toast-header",
|
||||
"toc",
|
||||
"toc-sidebar",
|
||||
"toggler-icon",
|
||||
"top-bar"
|
||||
],
|
||||
"ids": [
|
||||
"-theme",
|
||||
"-theme-collapsed",
|
||||
"blogs",
|
||||
"btn-webshare",
|
||||
"navbar-0-collapse",
|
||||
"navbar-mode",
|
||||
"navbar-mode-checkbox",
|
||||
"offcanvas-label",
|
||||
"offcanvass-sidebar",
|
||||
"toast-container",
|
||||
"toast-copied-code-message"
|
||||
"toast-copied-code-message",
|
||||
"toast-message-email-4"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@
|
||||
- id: shareLink
|
||||
translation: "Diese Seite teilen per {{ . }}"
|
||||
- id: shareSystem
|
||||
translation: "Betriebssystem"
|
||||
translation: "System"
|
||||
- id: copyToClipboard
|
||||
translation: "In die Zwischenablage kopieren"
|
||||
- id: copiedToClipboard
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
# Navigation
|
||||
- id: colorMode
|
||||
translation: "Thema umschalten"
|
||||
translation: "Modus umschalten"
|
||||
- id: colorLight
|
||||
translation: "Light"
|
||||
- id: colorDark
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
# Sidebar
|
||||
- id: toggleSidebar
|
||||
translation: "Menünavigation anzuzeigen oder auszublenden"
|
||||
translation: "Menünavigation anzeigen oder ausblenden"
|
||||
|
||||
# Feature
|
||||
- id: addedFeature
|
||||
|
12
i18n/en.yaml
12
i18n/en.yaml
@@ -149,3 +149,15 @@
|
||||
translation: "Comment"
|
||||
- id: supportedValues
|
||||
translation: "Supported values"
|
||||
|
||||
# Alerts
|
||||
- id: caution
|
||||
translation: Caution
|
||||
- id: important
|
||||
translation: Important
|
||||
- id: note
|
||||
translation: Note
|
||||
- id: tip
|
||||
translation: Tip
|
||||
- id: warning
|
||||
translation: Warning
|
12
i18n/nl.yaml
12
i18n/nl.yaml
@@ -148,3 +148,15 @@
|
||||
translation: "Toelichting"
|
||||
- id: supportedValues
|
||||
translation: "Toegestane waarden"
|
||||
|
||||
# Alerts
|
||||
- id: caution
|
||||
translation: Voorzichtig
|
||||
- id: important
|
||||
translation: Belangrijk
|
||||
- id: note
|
||||
translation: Opmerking
|
||||
- id: tip
|
||||
translation: Tip
|
||||
- id: warning
|
||||
translation: Waarschuwing
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{{ define "main" }}
|
||||
{{ $base := partial "utilities/GetStaticURL" (dict "url" "/") }}
|
||||
<div class="d-flex flex-fill">
|
||||
<div class="container-xxl my-auto">
|
||||
<div class="text-center">
|
||||
@@ -7,7 +8,7 @@
|
||||
<p class="display-1 mt-3 fw-bold">404</p>
|
||||
<p class="fs-3">{{ T "pageNotFoundTitle" }}</p>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
23
layouts/_default/_markup/render-blockquote.html
Normal file
23
layouts/_default/_markup/render-blockquote.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{/* Adapted from https://gohugo.io/render-hooks/blockquotes/#alerts */}}
|
||||
|
||||
{{ $icons := dict
|
||||
"caution" "fa hand"
|
||||
"important" "fas exclamation"
|
||||
"note" "fas circle-info"
|
||||
"tip" "fa lightbulb"
|
||||
"warning" "fas triangle-exclamation"
|
||||
}}
|
||||
|
||||
{{ if eq .Type "alert" }}
|
||||
<blockquote class="blockquote-alert blockquote-alert-{{ .AlertType }}">
|
||||
<p class="blockquote-alert-heading">
|
||||
{{ partial "assets/icon.html" (dict "icon" (printf "%s fa-fw" (index $icons .AlertType))) }}
|
||||
{{ or (i18n .AlertType) (title .AlertType) }}
|
||||
</p>
|
||||
{{ trim .Text "\n\r" | safeHTML }}
|
||||
</blockquote>
|
||||
{{ else }}
|
||||
<blockquote class="blockquote">
|
||||
{{ trim .Text "\n\r" | safeHTML }}
|
||||
</blockquote>
|
||||
{{ end }}
|
11
layouts/_default/_markup/render-codeblock-math.html
Normal file
11
layouts/_default/_markup/render-codeblock-math.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ with transform.ToMath .Inner (dict "displayMode" true) }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
|
||||
{{ else }}
|
||||
{{ if $.Attributes.class }}
|
||||
<div class="{{ $.Attributes.class }}">{{ . }}</div>
|
||||
{{ else }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
15
layouts/_default/_markup/render-image.html
Normal file
15
layouts/_default/_markup/render-image.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ partial "assets/image.html" (dict
|
||||
"url" .Destination
|
||||
"page" .Page
|
||||
"caption" .Title
|
||||
"title" .Text
|
||||
"anchor" .Attributes.anchor
|
||||
"class" .Attributes.class
|
||||
"figclass" .Attributes.figclass
|
||||
"loading" .Attributes.loading
|
||||
"mode" .Attributes.mode
|
||||
"plain" .Attributes.plain
|
||||
"portrait" .Attributes.portrait
|
||||
"ratio" .Attributes.ratio
|
||||
"wrapper" .Attributes.wrapper
|
||||
) }}
|
13
layouts/_default/_markup/render-link.html
Normal file
13
layouts/_default/_markup/render-link.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{ if gt (findRE `^HAHAHUGO` .Destination 1) 0 }}
|
||||
{{ errorf "Invalid markdown link destination, use '%s' syntax when using shortcodes as input. See '%s'"
|
||||
("{{% %}}" | htmlUnescape)
|
||||
.Page.File.Filename
|
||||
}}
|
||||
{{ else }}
|
||||
{{ partial "assets/link.html" (dict
|
||||
"destination" .Destination
|
||||
"page" .Page
|
||||
"text" .Text
|
||||
"title" .Title
|
||||
) }}
|
||||
{{ end }}
|
13
layouts/_default/_markup/render-passthrough.html
Normal file
13
layouts/_default/_markup/render-passthrough.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{ $opts := dict }}
|
||||
|
||||
{{ if eq .Type "block" }}
|
||||
{{ $opts = dict "displayMode" true }}
|
||||
{{ end }}
|
||||
|
||||
{{ with transform.ToMath .Inner $opts }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
|
||||
{{ else }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -13,10 +13,9 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Validate module configuration */ -}}
|
||||
{{- if and .IsPage (not (in .Site.Params.modules.core "bootstrap")) -}}
|
||||
{{- errorf "Bootstrap is a required module, please add it to 'modules.core' in your site parameters" -}}
|
||||
{{- end -}}
|
||||
{{- /* Initialize module configuration */ -}}
|
||||
{{- $modules := partial "utilities/InitModules.html" (dict "page" .) -}}
|
||||
{{- $.Scratch.Set "modules" $modules -}}
|
||||
|
||||
{{- $fullCover := or (or (and .IsHome .Site.Params.home.fullCover) .Page.Params.fullCover) .Site.Params.main.footerBelowFold }}
|
||||
{{- $.Scratch.Set "fullCover" $fullCover -}}
|
||||
@@ -30,14 +29,18 @@
|
||||
{{- /* Define main breakpoint */ -}}
|
||||
{{- $.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>
|
||||
<html lang="{{ .Site.Language.Lang }}" class="no-js">
|
||||
<head>
|
||||
{{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" .) -}}
|
||||
{{ block "head" . }}{{ end -}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" .) -}}
|
||||
<div class="d-flex flex-column min-vh-100">
|
||||
<div class="d-flex flex-column {{ if $fullCover }} fullscreen{{ end }}{{ if .IsHome }} {{ .Site.Params.home.style }}{{ end }}">
|
||||
{{- partial "assets/navbar.html" (dict
|
||||
|
@@ -14,14 +14,16 @@
|
||||
|
||||
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
|
||||
{{ if ne $metadata "none" }}
|
||||
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
|
||||
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
|
||||
<small class="text-body-secondary text-uppercase">
|
||||
{{ $datestr | i18n "postedOnDate" -}}
|
||||
{{ if eq $metadata "full" }}
|
||||
{{ if ne $datestr $lastmodstr -}} ({{ $lastmodstr | i18n "lastModified" }}){{ end }}
|
||||
{{ if .Date }}
|
||||
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
|
||||
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
|
||||
{{ $datestr | i18n "postedOnDate" -}}
|
||||
{{ if eq $metadata "full" }}
|
||||
{{ if ne $datestr $lastmodstr -}} ({{ $lastmodstr | i18n "lastModified" }}){{ end }}
|
||||
{{ end }}
|
||||
•
|
||||
{{ end }}
|
||||
•
|
||||
{{ .ReadingTime | lang.FormatNumber 0 }} {{ i18n "minutesShort" }} {{ i18n "read" }} •
|
||||
{{ .WordCount | lang.FormatNumber 0 }} {{ i18n "words" }}
|
||||
</small>
|
||||
@@ -32,7 +34,7 @@
|
||||
<div class="d-none-dark">
|
||||
<div class="hstack gap-1">
|
||||
{{ 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") }}
|
||||
{{ end -}}
|
||||
</div>
|
||||
@@ -41,7 +43,7 @@
|
||||
<div class="d-none-light">
|
||||
<div class="hstack gap-1">
|
||||
{{ 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") }}
|
||||
{{ end -}}
|
||||
</div>
|
||||
|
@@ -1,11 +1,16 @@
|
||||
{{ $lang := site.LanguageCode | default site.Language.Lang }}
|
||||
<!DOCTYPE html>
|
||||
<html{{ with site.LanguageCode | default site.Language.Lang }} lang="{{ . }}"{{ end }}>
|
||||
<html {{ with $lang }}lang="{{ . }}"{{ end }}>
|
||||
<head>
|
||||
<title>{{ .Permalink }}</title>
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<meta name="robots" content="noindex">
|
||||
<meta charset="utf-8">
|
||||
<noscript><meta http-equiv="refresh" content="0; url={{ .Permalink }}"></noscript>
|
||||
<script src="/js/alias.js"></script>
|
||||
{{ if site.Params.main.enableLanguageSelectionStorage }}
|
||||
{{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" page) -}}
|
||||
{{ else }}
|
||||
<script src='{{ partial "utilities/GetStaticURL" (dict "url" "js/alias.js") }}'></script>
|
||||
{{ end }}
|
||||
</head>
|
||||
</html>
|
@@ -6,6 +6,19 @@
|
||||
|
||||
{{ $error := false }}
|
||||
|
||||
{{ $anchorMap := dict
|
||||
"TopLeft" "north_west"
|
||||
"Top" "north"
|
||||
"TopRight" "north_east"
|
||||
"Left" "west"
|
||||
"Center" "center"
|
||||
"Right" "east"
|
||||
"BottomLeft" "south_west"
|
||||
"Bottom" "south"
|
||||
"BottomRight" "south_east"
|
||||
"Smart" "auto"
|
||||
}}
|
||||
|
||||
<!-- Validate arguments -->
|
||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
||||
{{ errorf "partial [assets/adapter/cloudinary.html] - Invalid arguments" -}}
|
||||
@@ -20,6 +33,8 @@
|
||||
{{ $transform := .transform }}
|
||||
{{ $height := .height }}
|
||||
{{ $width := .width }}
|
||||
{{ $anchor := "" }}
|
||||
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
|
||||
{{ if eq $transform "fill" }}{{ $transform = "c_fill" }}{{ else }}{{ $transform = "c_fit" }}{{ end }}
|
||||
{{ $element := "" }}
|
||||
|
||||
@@ -33,10 +48,13 @@
|
||||
{{ $operation := "" }}
|
||||
{{ if $format }}
|
||||
{{ $operation = printf "%s,h_%d,w_%d" $transform $height $width }}
|
||||
{{ $file = printf "%s.%s" (path.BaseName $file) $format }}
|
||||
{{ $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 }}
|
||||
{{ with $anchor }}
|
||||
{{ $operation = printf "%s,g_%s" $operation . }}
|
||||
{{ end }}
|
||||
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
||||
{{ end }}
|
||||
|
||||
|
@@ -20,6 +20,7 @@
|
||||
{{ $transform := .transform }}
|
||||
{{ $height := .height }}
|
||||
{{ $width := .width }}
|
||||
{{ $anchor := .anchor | default "" }}
|
||||
{{ $element := "" }}
|
||||
{{ $absoluteURL := .absoluteURL }}
|
||||
{{ $url := urls.JoinPath $dir $file }}
|
||||
@@ -27,7 +28,7 @@
|
||||
{{ $url = urls.JoinPath "https://" $host $url }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize image if needed -->
|
||||
<!-- 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) -}}
|
||||
@@ -37,7 +38,6 @@
|
||||
{{ end }}
|
||||
|
||||
{{ if not $img }}
|
||||
{{ errorf "partial [assets/adapter/hugo.html] - Expected 'img' argument" -}}
|
||||
{{ $error = true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -47,13 +47,20 @@
|
||||
{{ if not $error }}
|
||||
{{ $scaled := "" }}
|
||||
{{ if eq $transform "fill" }}
|
||||
{{- $scaled = $img.Fill (printf "%dx%d %s" $width $height $format) -}}
|
||||
{{- $scaled = $img.Fill (printf "%dx%d %s %s" $width $height $anchor $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)) -}}
|
||||
{{ $destination := "" }}
|
||||
{{ if $anchor }}
|
||||
{{ $destination = printf "-%dx%d-%s.%s" $width $height (lower $anchor) $format }}
|
||||
{{ else }}
|
||||
{{ $destination = printf "-%dx%d.%s" $width $height $format }}
|
||||
{{ end }}
|
||||
|
||||
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink $clean $destination) -}}
|
||||
{{- if $absoluteURL -}}
|
||||
{{- $element = $scaled.Permalink -}}
|
||||
{{- else -}}
|
||||
|
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 }}
|
66
layouts/partials/assets/adapters/imagekit.html
Normal file
66
layouts/partials/assets/adapters/imagekit.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!--
|
||||
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 }}
|
||||
|
||||
{{ $anchorMap := dict
|
||||
"TopLeft" "top_left"
|
||||
"Top" "top"
|
||||
"TopRight" "top_right"
|
||||
"Left" "left"
|
||||
"Center" "center"
|
||||
"Right" "right"
|
||||
"BottomLeft" "bottom_left"
|
||||
"Bottom" "bottom"
|
||||
"BottomRight" "bottom_right"
|
||||
"Smart" "auto"
|
||||
}}
|
||||
|
||||
<!-- 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 }}
|
||||
{{ $anchor := "" }}
|
||||
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
|
||||
{{ 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 }}
|
||||
{{ with $anchor }}
|
||||
{{ $operation = printf "%s,fo-%s" $operation . }}
|
||||
{{ end }}
|
||||
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
||||
{{ end }}
|
||||
|
||||
{{ return $element }}
|
61
layouts/partials/assets/adapters/imgix.html
Normal file
61
layouts/partials/assets/adapters/imgix.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!--
|
||||
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 }}
|
||||
|
||||
{{ $anchorMap := dict
|
||||
"TopLeft" "top,left"
|
||||
"Top" "top"
|
||||
"TopRight" "top,right"
|
||||
"Left" "left"
|
||||
"Center" "center"
|
||||
"Right" "right"
|
||||
"BottomLeft" "bottom,left"
|
||||
"Bottom" "bottom"
|
||||
"BottomRight" "bottom,right"
|
||||
"Smart" "faces,edges,center"
|
||||
}}
|
||||
|
||||
<!-- 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 }}
|
||||
{{ $anchor := "" }}
|
||||
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
|
||||
{{ 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 }}
|
||||
{{ with $anchor }}
|
||||
{{ $operation = printf "%s&crop=%s" $operation . }}
|
||||
{{ 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 -}}
|
||||
{{- $title := .LinkTitle -}}
|
||||
{{- if .IsHome }}{{ $title = T "home" }}{{ end -}}
|
||||
{{- $address := or .RelPermalink (.Params.Redirect | relLangURL) -}}
|
||||
{{- $address := or .RelPermalink .Params.Redirect -}}
|
||||
{{ if $address }}
|
||||
<li class="breadcrumb-item"><a href="{{ $address }}">{{ $title }}</a></li>
|
||||
{{ else }}
|
||||
|
@@ -95,10 +95,10 @@
|
||||
{{- end -}}
|
||||
role="button"
|
||||
>
|
||||
<div class="d-flex justify-content-{{ $justify }}">
|
||||
<div class="my-auto">{{ $title | safeHTML }}</div>
|
||||
{{- with $icon }}<div class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon "spacing" false) }}</div>{{ end }}
|
||||
</div>
|
||||
<span class="d-flex justify-content-{{ $justify }}">
|
||||
<span class="my-auto">{{ $title | safeHTML }}</span>
|
||||
{{- with $icon }}<span class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon "spacing" false) }}</span>{{ end }}
|
||||
</span>
|
||||
|
||||
{{- with $badge }}
|
||||
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
|
||||
|
@@ -23,9 +23,11 @@
|
||||
{{- $color := .color -}}
|
||||
{{- $padding := .padding -}}
|
||||
{{- $header := .header -}}
|
||||
{{- $body := .body -}}
|
||||
{{- $footer := .footer -}}
|
||||
{{- $orientation := .orientation -}}
|
||||
{{- $ratio := .ratio -}}
|
||||
{{- $portrait := .portrait | default false -}}
|
||||
{{- $wrapper := .wrapper | default "p-0" -}}
|
||||
{{- $style := .style -}}
|
||||
{{- $align := .align -}}
|
||||
@@ -34,7 +36,11 @@
|
||||
{{- $button := .button -}}
|
||||
{{- $buttonLabel := .buttonLabel -}}
|
||||
{{- $buttonType := .buttonType -}}
|
||||
{{- $iconRounded := .iconRounded }}
|
||||
{{- $scroll := .scroll | default false }}
|
||||
{{- $spacer := .spacer | default false }}
|
||||
{{- $hook := .hook | default "assets/card.html" }}
|
||||
{{- $cols := string .cols | default "3" -}}
|
||||
|
||||
<!-- Override arguments -->
|
||||
{{ $isPages := in (slice "page.Pages" "resource.Resources") (printf "%T" $pages) }}
|
||||
@@ -48,6 +54,13 @@
|
||||
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $cardWrapper := "" }}
|
||||
{{ if $scroll }}
|
||||
{{ $cardWrapper = printf "card-block card-block-%d" (int $cols) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not $spacer }}{{ $class = printf "%s h-100" $class }}{{ end }}
|
||||
|
||||
{{ $list := slice }}
|
||||
{{ if $isPages }}
|
||||
{{ range $index, $element := $pages }}
|
||||
@@ -58,11 +71,13 @@
|
||||
<!-- headless page -->
|
||||
{{- else -}}
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.url) $element.Params.Thumbnail) -}}
|
||||
{{- $anchor := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.anchor) "") -}}
|
||||
{{- $params = merge $params (dict
|
||||
"title" $element.Title
|
||||
"href" $element.RelPermalink
|
||||
"description" (partial "utilities/GetDescription.html" (dict "page" $element "raw" true))
|
||||
"thumbnail" $thumbnail
|
||||
"anchor" $anchor
|
||||
"icon" $element.Params.icon
|
||||
) -}}
|
||||
{{- end -}}
|
||||
@@ -77,41 +92,39 @@
|
||||
{{- $max := $count -}}
|
||||
{{- $max = math.Min (.max | default $count) $count -}}
|
||||
{{- $responsive := .responsive | default true -}}
|
||||
{{- $cols := string .cols | default "3" -}}
|
||||
|
||||
{{- $sizes := "100vw" }}
|
||||
{{- $colGrid := "" -}}
|
||||
{{- if eq $cols "1" }}
|
||||
{{ $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 }}
|
||||
{{ else }}
|
||||
{{ $colGrid = "row-cols-2" }}
|
||||
{{ if not $scroll }}
|
||||
{{ $colGrid = printf "row-cols-%s" $cols }}
|
||||
{{- if eq $cols "1" }}
|
||||
{{ $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 -}}
|
||||
{{ $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 }}
|
||||
{{ else }}
|
||||
{{ $colGrid = "row-cols-3" }}
|
||||
{{ 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 }}
|
||||
{{ else }}
|
||||
{{ $colGrid = "row-cols-4" }}
|
||||
{{ 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 }}
|
||||
{{ else }}
|
||||
{{ $colGrid = "row-cols-5" }}
|
||||
{{ end -}}
|
||||
{{ $sizes = printf "(min-width: %s) 20vw, (min-width: %s) 33.3vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
||||
{{ end -}}
|
||||
{{ else }}
|
||||
{{ if in (slice "2" "3" "4" "5") $cols }}
|
||||
{{ $sizes = replace (printf "%.1fvw" (div 100.0 (int $cols))) ".0" "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- if not $paginate -}}
|
||||
{{- $list = first $max $list -}}
|
||||
@@ -120,29 +133,33 @@
|
||||
{{- if and (eq $cols "1") (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
|
||||
|
||||
<!-- Main code -->
|
||||
<div class="container-fluid {{ $wrapper }}">
|
||||
<div class="row {{ $colGrid }} g-{{ $gutter }}">
|
||||
<div class="container-fluid {{ $wrapper }} {{ if $scroll }}card-container-wrapper{{ end }}">
|
||||
<div class="row g-{{ $gutter }} {{ if $scroll }}d-flex flex-row flex-nowrap card-container scrollbar-horizontal pb-4 w-100 {{ end }} {{ $colGrid }}">
|
||||
{{ range $index, $element := $list }}
|
||||
{{- $params := (dict
|
||||
"class" (printf "h-100 %s" $class)
|
||||
"class" (printf " %s" $class)
|
||||
"color" $color
|
||||
"footer" $footer
|
||||
"body" $body
|
||||
"header" $header
|
||||
"loading" $loading
|
||||
"sizes" $sizes
|
||||
"orientation" $orientation
|
||||
"padding" $padding
|
||||
"ratio" $ratio
|
||||
"portrait" $portrait
|
||||
"subtle" $subtle
|
||||
"style" $style
|
||||
"align" $align
|
||||
"button" $button
|
||||
"buttonLabel" $buttonLabel
|
||||
"buttonType" $buttonType
|
||||
"iconRounded" $iconRounded
|
||||
) -}}
|
||||
{{- $params = merge $params $element }}
|
||||
{{- $params = merge $element $params }}
|
||||
|
||||
<div class="col">
|
||||
<div class="{{ with $cardWrapper }}{{ . }}{{ else }}col{{ end }}">
|
||||
{{ if $spacer }}<div class="spacer"></div>{{ end }}
|
||||
{{- partial $hook $params -}}
|
||||
</div>
|
||||
{{- if and (lt $index (sub $max 1)) $separator -}}
|
||||
@@ -151,7 +168,7 @@
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{if $cards }}{{- print $cards | safeHTML }}{{ end }}
|
||||
{{ if $cards }}{{- print $cards | safeHTML }}{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if $paginator }}
|
||||
|
@@ -11,15 +11,18 @@
|
||||
|
||||
<!-- Initialize arguments and default values -->
|
||||
{{- $alt := .alt -}}
|
||||
{{- $wrapper := .wrapper -}}
|
||||
{{- $class := .class -}}
|
||||
{{- $color := .color -}}
|
||||
{{- $description := .description -}}
|
||||
{{- $body := .body | default "full" -}}
|
||||
{{- $footer := .footer | default "none" -}}
|
||||
{{- $gutter := .gutter | default "0" -}}
|
||||
{{- $header := .header | default "full" -}}
|
||||
{{- $href := .href -}}
|
||||
{{- $icon := .icon -}}
|
||||
{{- $iconStyle := "" -}}
|
||||
{{- $iconRounded := .iconRounded | default false -}}
|
||||
{{- $align := .align | default "start" -}}
|
||||
{{- $style := .style | default "" -}}
|
||||
{{- $sizes := .sizes | default "100vw" -}}
|
||||
@@ -27,7 +30,9 @@
|
||||
{{- $orientation := .orientation | default "stacked" -}}
|
||||
{{- $padding := (string .padding) | default "auto" -}}
|
||||
{{- $ratio := .ratio -}}
|
||||
{{- $portrait := .portrait | default false -}}
|
||||
{{- $thumbnail := .thumbnail -}}
|
||||
{{- $anchor := .anchor | default "" -}}
|
||||
{{- $title := .title -}}
|
||||
{{- $subtle := .subtle -}}
|
||||
{{- $button := .button -}}
|
||||
@@ -55,8 +60,12 @@
|
||||
{{- if not $title }}{{ $title = .Title }}{{ end -}}
|
||||
{{- if not $href }}{{ $href = .RelPermalink }}{{ end -}}
|
||||
{{- if not $description }}{{ $description = partial "utilities/GetDescription.html" (dict "page" .) }}{{ end -}}
|
||||
{{- if not $thumbnail }}{{ $thumbnail = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) }}{{ end -}}
|
||||
{{- if and (not $thumbnail) (not $icon) }}{{ $thumbnail = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) }}{{ end -}}
|
||||
{{ if not $ratio }}
|
||||
{{- if and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.ratio }}{{ $ratio = .Params.Thumbnail.ratio }}{{ end -}}
|
||||
{{ end }}
|
||||
{{- if not $icon }}{{ $icon = .Params.icon }}{{ end -}}
|
||||
{{- if not $anchor }}{{ $anchor = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.anchor) "") }}{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ if (hasPrefix $orientation "horizontal") }}
|
||||
@@ -67,6 +76,7 @@
|
||||
{{ end }}
|
||||
|
||||
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
|
||||
{{- if eq $body "none" }}{{ $description = "" }}{{ end -}}
|
||||
|
||||
<!-- Inline partial to render the card's body -->
|
||||
{{- define "partials/card-body.html" -}}
|
||||
@@ -78,7 +88,7 @@
|
||||
|
||||
{{- if $href -}}
|
||||
<a href="{{ $href }}" class="{{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }} stretched-link">
|
||||
<p class="card-title fs-5 fw-bold">{{ $title }}</p>
|
||||
<p class="card-title fs-lg-5 fs-6 fw-bold">{{ $title }}</p>
|
||||
{{ with $description }}
|
||||
<div class="card-text {{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }}">
|
||||
{{ . | safeHTML }}
|
||||
@@ -87,7 +97,7 @@
|
||||
</a>
|
||||
{{- else -}}
|
||||
<div>
|
||||
{{ with $title }}<p class="card-title fs-5 fw-bold">{{ . }}</p>{{ end -}}
|
||||
{{ with $title }}<p class="card-title fs-lg-5 fs-6 fw-bold">{{ . }}</p>{{ end -}}
|
||||
{{ with $description }}<div class="card-text">{{ . | safeHTML }}</div>{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -106,7 +116,7 @@
|
||||
|
||||
<p class="card-text"><small class="{{ if $color }}text-bg-{{ $color }}{{ else }}text-body-secondary{{ end }} text-uppercase">
|
||||
{{- if in (slice "full" "publication") $keywords -}}
|
||||
{{- partial "utilities/date.html" (dict "date" $page.Date "format" "long") -}} •
|
||||
{{ with $page.Date }}{{ partial "utilities/date.html" (dict "date" . "format" "long") }} •{{ end -}}
|
||||
{{ $page.ReadingTime | lang.FormatNumber 0 }} {{ i18n "minutesShort" }} {{ i18n "read" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -119,28 +129,61 @@
|
||||
|
||||
{{- range $index, $tag := first $maxTags ($page.GetTerms "tags") -}}
|
||||
{{- 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 -}}
|
||||
</small></p>
|
||||
{{- end -}}
|
||||
|
||||
<!-- 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" -}}
|
||||
{{ $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 -->
|
||||
<div class="card {{ $colorStyle }} {{ $class }}">
|
||||
<div class="row g-0 row-cols-1 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 -}}
|
||||
{{- 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 class="card-icon p-{{ $padding }} h-100 fa-wrapper d-flex align-items-{{ $align}} justify-content-center {{ $iconStyle }}">
|
||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
||||
<div class="row g-0 row-cols-2 h-100{{ if $button }} pb-5{{ end }}">
|
||||
{{- if $thumbnail -}}
|
||||
<div class="{{ $col1 }}">
|
||||
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "1x1") "portrait" $portrait "sizes" $sizes "anchor" $anchor "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100 card-img-bg" "title" $title "loading" $loading) -}}
|
||||
</div>
|
||||
{{- else if $icon -}}
|
||||
<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>
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="{{ if eq $orientation "horizontal-sm" }}col-8 col-md-10{{ else }}col-8{{ end }}">
|
||||
</div>
|
||||
{{- end -}}
|
||||
<div class="{{ $col2 }}">
|
||||
<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 }}
|
||||
<div class="flex-fill">
|
||||
@@ -171,10 +214,15 @@
|
||||
<!-- Render stacked / default card -->
|
||||
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
|
||||
{{- if $thumbnail -}}
|
||||
{{- 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) -}}
|
||||
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "16x9") "portrait" $portrait "anchor" $anchor "sizes" $sizes "wrapper" "card-img-wrap" "class" "card-img-top card-img-bg" "title" (or $alt $title) "loading" $loading) -}}
|
||||
{{- else if $icon -}}
|
||||
<div class="card-icon p-{{ $padding }} {{ $iconStyle }} text-{{ $align }}">
|
||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
||||
<div class="card-icon p-{{ $padding }} {{ $iconStyle }} text-{{ $align }} {{ if $iconRounded }}fa-stack {{ $stack }}{{ end }} w-100">
|
||||
{{ 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>
|
||||
{{- end -}}
|
||||
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
||||
@@ -204,4 +252,4 @@
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{ if ne $gutter "0" }}</div>{{ end }}
|
||||
{{ if or (ne $gutter "0") ($wrapper) }}</div>{{ end }}
|
||||
|
@@ -3,11 +3,23 @@
|
||||
-->
|
||||
|
||||
{{ $ratio := .ratio }}
|
||||
|
||||
{{ $dim := "" }}
|
||||
{{ $matches := first 1 (where site.Data.dimensions "ratio" $ratio) }}
|
||||
{{ if eq ($matches | len) 1 }}
|
||||
{{ $dim = (index $matches 0).dimensions }}
|
||||
{{ $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 }}
|
||||
|
@@ -14,76 +14,33 @@
|
||||
{{- $url := .url -}}
|
||||
{{- $mode := .mode -}}
|
||||
{{- $modes := .modes -}}
|
||||
|
||||
{{- $fallbackURL := "" -}}
|
||||
{{- $anchor := "" -}}
|
||||
{{- $imgset := "" -}}
|
||||
{{- $isVector := false -}}
|
||||
|
||||
{{- $plain := .plain | default false }}
|
||||
{{- $anchor := .anchor }}
|
||||
|
||||
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
||||
{{- $fileAnchor := "" -}}
|
||||
{{- $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 -}}
|
||||
{{- $fileAnchor = index $segments 1 -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- TODO: improve CDN detection / handling -->
|
||||
{{ $hook := "hugo" }}
|
||||
{{ if findRE "cloudinary" (urls.Parse $url).Hostname }}
|
||||
{{ $hook = "cloudinary" }}
|
||||
{{- 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)) }}
|
||||
{{ $dims = $dims | append (printf "%sx500" $width) }}
|
||||
{{ 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 }}
|
||||
{{ $transform = "fit" }}
|
||||
{{- $res := partial "utilities/GetImage.html" (dict "url" $url "page" $page) -}}
|
||||
{{ with $res }}
|
||||
{{ $img = $res.resource }}
|
||||
{{ if $res.mirror }}{{ $class = printf "%s mirrorred" $class }}{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $widths := partial "assets/helpers/GetDimension.html" (dict "ratio" "auto") }}
|
||||
{{ range $width := $widths -}}
|
||||
{{- $dims = $dims | append (printf "%dx%d" (int $width) (int (math.Round (mul (div (float $width) $img.Width) $img.Height)))) -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
<!-- Derive image width and height -->
|
||||
{{ $width := "" }}
|
||||
{{ $height := "" }}
|
||||
{{ range $dim := ($dims | last 1) }}
|
||||
{{ $width = (int (index (split $dim "x") 0)) }}
|
||||
{{ $height = (int (index (split $dim "x") 1)) }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Generate image urls -->
|
||||
{{ if hasSuffix $url "svg" }}
|
||||
{{- $fallbackURL = $url -}}
|
||||
{{ else }}
|
||||
{{- $fallbackURL = partial "assets/helpers/image-set.html" (dict "url" $url "img" $img "dims" ($dims | last 1) "transform" $transform "hook" $hook "format" "jpg" "includeWidth" false) -}}
|
||||
{{- $imgset = partial "assets/helpers/image-set.html" (dict "url" $url "img" $img "dims" $dims "transform" $transform "hook" $hook) -}}
|
||||
{{ 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
|
||||
"anchor" $anchor
|
||||
) }}
|
||||
{{ $fallbackURL := index $target "target" }}
|
||||
{{ $imgset := index $target "set" }}
|
||||
{{ $height := index $target "height" }}
|
||||
{{ $width := index $target "width" }}
|
||||
|
||||
<!-- Add color modes -->
|
||||
{{- range $none := $modes -}}
|
||||
@@ -95,24 +52,26 @@
|
||||
<!-- Generate image definition -->
|
||||
{{- if $caption -}}
|
||||
<figure {{ with $wrapper }}class="{{ . }}"{{ end }}>
|
||||
{{ else }}
|
||||
{{ with $wrapper }}<div class="{{ . }}">{{ end }}
|
||||
{{ end }}
|
||||
{{- if not $fileAnchor -}}
|
||||
<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 }}#{{ $fileAnchor }}"></use>
|
||||
</svg>
|
||||
{{ 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>
|
||||
{{ else if $wrapper }}
|
||||
</div>
|
||||
{{- end -}}
|
140
layouts/partials/assets/helpers/image-dimension.html
Normal file
140
layouts/partials/assets/helpers/image-dimension.html
Normal file
@@ -0,0 +1,140 @@
|
||||
<!-- Initialize arguments -->
|
||||
{{- $page := .page -}}
|
||||
{{- $url := .url -}}
|
||||
{{- $ratio := .ratio -}}
|
||||
{{- $portrait := .portrait -}}
|
||||
{{- $height := .height -}}
|
||||
{{- $width := .width -}}
|
||||
{{- $plain := .plain | default false }}
|
||||
{{- $targetURL := "" -}}
|
||||
{{- $set := "" -}}
|
||||
{{- $imageset := .imageset | default false }}
|
||||
{{- $anchor := .anchor | default "" -}}
|
||||
|
||||
<!-- 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)
|
||||
"anchor" $anchor
|
||||
"transform" $transform
|
||||
"hook" $hook
|
||||
"format" "png"
|
||||
"includeWidth" false
|
||||
)}}
|
||||
{{ if $imageset }}
|
||||
{{- $set = partial "assets/helpers/image-set.html" (dict
|
||||
"url" $url
|
||||
"img" $img
|
||||
"dims" $dims
|
||||
"anchor" $anchor
|
||||
"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 }}
|
@@ -7,18 +7,26 @@
|
||||
{{ $transform := .transform }}
|
||||
{{ $format := .format }}
|
||||
{{ $includeWidth := .includeWidth | default true }}
|
||||
{{ $anchor := .anchor | default "" }}
|
||||
|
||||
{{ $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 (printf "assets/adapters/%s.html" $hook) (dict
|
||||
{{- $element := partial $adapter (dict
|
||||
"host" $host
|
||||
"dir" $dir
|
||||
"file" $file
|
||||
@@ -28,6 +36,7 @@
|
||||
"width" $width
|
||||
"height" $height
|
||||
"format" $format
|
||||
"anchor" $anchor
|
||||
)}}
|
||||
{{ if $includeWidth }}
|
||||
{{ $imgset = $imgset | append (printf "%s %dw" $element $width) }}
|
||||
|
@@ -26,6 +26,8 @@
|
||||
{{- $priority := .priority -}}
|
||||
{{- if eq $priority "auto" }}{{ $priority = "" }}{{ end -}}
|
||||
{{- $sizes := .sizes | default "100vw" -}}
|
||||
{{- $plain := .plain | default false -}}
|
||||
{{- $anchor := .anchor | default "" -}}
|
||||
|
||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
||||
{{- $url := .url -}}
|
||||
@@ -47,28 +49,30 @@
|
||||
"priority" $priority
|
||||
"sizes" $sizes
|
||||
"absoluteURL" $absoluteURL
|
||||
"plain" $plain
|
||||
"anchor" $anchor
|
||||
)
|
||||
-}}
|
||||
|
||||
{{- if $mode -}}
|
||||
{{- $ext := path.Ext $url -}}
|
||||
{{- $base := strings.TrimSuffix $ext $url -}}
|
||||
{{- range $suffix := $modes -}}
|
||||
{{- $base = strings.TrimSuffix (printf "-%s" $suffix) $base -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range $suffix := $modes -}}
|
||||
{{- $image := printf "%s-%s%s" $base $suffix $ext -}}
|
||||
{{- $params = merge $params (dict
|
||||
"url" $image
|
||||
"mode" $suffix
|
||||
"modes" $modes)
|
||||
-}}
|
||||
{{- end -}}
|
||||
{{ else }}
|
||||
{{- $params = merge $params (dict "url" $url) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ if not $error }}
|
||||
{{- partial "assets/helpers/image-definition.html" $params -}}
|
||||
{{- if $mode -}}
|
||||
{{- $ext := path.Ext $url -}}
|
||||
{{- $base := strings.TrimSuffix $ext $url -}}
|
||||
{{- range $suffix := $modes -}}
|
||||
{{- $base = strings.TrimSuffix (printf "-%s" $suffix) $base -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range $suffix := $modes -}}
|
||||
{{- $image := printf "%s-%s%s" $base $suffix $ext -}}
|
||||
{{- $params = merge $params (dict
|
||||
"url" $image
|
||||
"mode" $suffix
|
||||
"modes" $modes)
|
||||
-}}
|
||||
{{- partial "assets/helpers/image-definition.html" $params -}}
|
||||
{{- end -}}
|
||||
{{ else }}
|
||||
{{- $params = merge $params (dict "url" $url) -}}
|
||||
{{- partial "assets/helpers/image-definition.html" $params -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
@@ -25,6 +25,7 @@
|
||||
{{- $page := .page -}}
|
||||
{{- $anchor := "" -}}
|
||||
{{- $text := .text -}}
|
||||
{{- $title := .title -}}
|
||||
{{- $class := .class -}}
|
||||
|
||||
<!-- Main code -->
|
||||
@@ -72,5 +73,13 @@
|
||||
{{- end -}}
|
||||
|
||||
{{ if not $error -}}
|
||||
<a {{ with $class }}class="{{ . }}" {{ end }}href="{{ $destination | safeURL }}"{{ with $target }} target="{{ . }}"{{ end }}{{ with $rel }} rel="{{ . }}"{{ end }}>{{ $text }}</a>
|
||||
<a
|
||||
{{- with $destination }} href="{{ . | safeURL }}"{{ end -}}
|
||||
{{- with $class }}class="{{ . }}" {{ end -}}
|
||||
{{- with $target }} target="{{ . }}"{{ end -}}
|
||||
{{- with $rel }} rel="{{ . }}"{{ end -}}
|
||||
{{- with $title }} title="{{ . }}"{{ end -}}
|
||||
>
|
||||
{{- $text -}}
|
||||
</a>
|
||||
{{- end }}
|
@@ -16,12 +16,18 @@
|
||||
{{- $page := .page -}}
|
||||
{{- $menu := .menu -}}
|
||||
{{- $parent := .parent -}}
|
||||
{{- $plain := .plain | default false -}}
|
||||
{{- $class := .class -}}
|
||||
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||
|
||||
{{- $menuURL := (or $menu.PageRef $menu.URL) | relLangURL -}}
|
||||
{{- $pageURL := $page.RelPermalink | relLangURL -}}
|
||||
{{- $baseURL := $page.Scratch.Get "baseURL" | default "/" -}}
|
||||
{{- $menuURL := "" -}}
|
||||
{{ if or (strings.HasPrefix $menu.PageRef "http") (strings.HasPrefix $menu.URL "http") }}
|
||||
{{ $menuURL = or $menu.PageRef $menu.URL }}
|
||||
{{ else if (or $menu.PageRef $menu.URL) }}
|
||||
{{- $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) -}}
|
||||
{{- $isAlias := $menu.Params.alias -}}
|
||||
{{- $isIcon := $menu.Params.icon -}}
|
||||
@@ -41,6 +47,11 @@
|
||||
{{- if $cue -}}
|
||||
{{ $suffix = partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}
|
||||
{{- end -}}
|
||||
{{ else if $menuURL }}
|
||||
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url.Path "page" $page) }}
|
||||
{{- if not $ref -}}
|
||||
{{- warnf "partial [assets/navbar-item.html] - Cannot find page of menu item '%s': %s" $menu.Name $url -}}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- $mainNav := urlize (lower $menu.Name) -}}
|
||||
@@ -51,7 +62,7 @@
|
||||
{{- $mainNav = urlize (lower $parent.Name) -}}
|
||||
{{- $childNav = urlize (lower $menu.Name) -}}
|
||||
{{- $anchorClass = "dropdown-item" -}}
|
||||
{{- else if $menu.HasChildren -}}
|
||||
{{- else if and (not $plain) $menu.HasChildren -}}
|
||||
{{- $anchorClass = "nav-link dropdown-toggle" -}}
|
||||
{{- $button = " role=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\"" -}}
|
||||
{{- else -}}
|
||||
@@ -65,20 +76,29 @@
|
||||
|
||||
<!-- Main code -->
|
||||
{{ if not $error }}
|
||||
<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 }}
|
||||
{{ if hasPrefix . "<i" }}
|
||||
{{ . | safeHTML }}
|
||||
{{ else }}
|
||||
{{ partial "assets/icon.html" (dict "icon" (string .) )}}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
<span {{ if $isActive }} class="active"{{ end }}>{{ if not $isIcon }}{{ $menu.Name }}{{ end }}</span>
|
||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
||||
</a>
|
||||
{{ if $menu.Params.button }}
|
||||
{{ partial "assets/button.html" (dict
|
||||
"title" $menu.Name
|
||||
"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 }}
|
||||
{{ if $menuURL }} href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }}{{ end }} {{ $button | safeHTMLAttr }}>
|
||||
|
||||
{{- with $menu.Pre }}
|
||||
{{ if hasPrefix . "<i" }}
|
||||
{{ . | safeHTML }}
|
||||
{{ else }}
|
||||
{{ partial "assets/icon.html" (dict "icon" (string .) )}}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
<span {{ if $isActive }} class="active"{{ end }}>{{ if or (not $isIcon) $plain }}{{ $menu.Name }}{{ end }}</span>
|
||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -16,36 +16,16 @@
|
||||
|
||||
<!-- Inline partial to render the color mode switcher -->
|
||||
{{- define "partials/navbar-mode.html" -}}
|
||||
{{- $size := .size -}}
|
||||
{{- $collapsed := .collapsed -}}
|
||||
{{- $id := .id -}}
|
||||
{{- $id := .id | default "navbar-mode" -}}
|
||||
|
||||
<li class="nav-item dropdown {{ if $collapsed }}d-{{ $size }}-none{{ else }}d-none d-{{ $size }}-block{{ end }}">
|
||||
<a class="nav-link dropdown-toggle" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "colorMode" }}" aria-expanded="false" id="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}">
|
||||
<span class="theme-icon-active">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw") }}</span>{{ if $collapsed }} {{ T "colorMode" }}{{ end }}
|
||||
<span class="d-md-none"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}">
|
||||
<li>
|
||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" data-bs-theme-value="light" href="#!">
|
||||
<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>
|
||||
<div class="d-flex mode-switch align-items-center" id="{{ $id }}">
|
||||
<input type="checkbox" class="checkbox navbar-mode-selector" id="{{ $id }}-checkbox" />
|
||||
<label class="label" for="{{ $id }}-checkbox">
|
||||
{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw" "spacing" false) }}
|
||||
{{- partial "assets/icon.html" (dict "icon" "fas moon fa-fw" "spacing" false) }}
|
||||
<div class="ball"></div>
|
||||
</label>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
<!-- Inline partial to render the version switcher -->
|
||||
@@ -53,6 +33,7 @@
|
||||
{{- $size := .size -}}
|
||||
{{- $collapsed := .collapsed -}}
|
||||
{{- $page := .page -}}
|
||||
{{- $baseURL := .baseURL -}}
|
||||
{{- $list := site.Params.docs.releases -}}
|
||||
{{- $id := .id -}}
|
||||
{{- $version := partial "utilities/GetVersion.html" (dict "page" $page) -}}
|
||||
@@ -70,7 +51,7 @@
|
||||
{{- end -}}
|
||||
{{ if $item.url }}
|
||||
<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 }}
|
||||
{{ if $item.latest }} ({{ T "latest" }}){{ end }}
|
||||
{{ if $active }}
|
||||
@@ -86,7 +67,7 @@
|
||||
{{- if site.Params.docs.overview -}}
|
||||
{{ if gt (len $list) 0 }}<li><hr class="dropdown-divider"></li>{{ end }}
|
||||
<li>
|
||||
{{- $url := (path.Join site.Params.docs.overview) | relLangURL -}}
|
||||
{{- $url := (urls.JoinPath $baseURL site.Params.docs.overview) | relLangURL -}}
|
||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" href="{{ $url }}">{{ T "allVersions" }}</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
@@ -98,6 +79,7 @@
|
||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
||||
{{- $id := .id | default (printf "navbar-%d" 0) -}}
|
||||
{{- $page := .page -}}
|
||||
{{- $baseURL := $page.Scratch.Get "baseURL" -}}
|
||||
|
||||
{{- $defaultMenu := "main" -}}
|
||||
{{- $menuName := .menus | default $defaultMenu }}
|
||||
@@ -117,6 +99,7 @@
|
||||
{{- $search := .search | default site.Params.navigation.search -}}
|
||||
{{- $searchModal := and $search site.Params.navigation.searchModal -}}
|
||||
{{- $enableDarkMode := .mode | default site.Params.main.enableDarkMode -}}
|
||||
{{- $modes := site.Params.main.modes | default (slice "light" "dark") -}}
|
||||
|
||||
{{- $enableVersions := false -}}
|
||||
{{ $list := site.Params.docs.releases }}
|
||||
@@ -132,8 +115,15 @@
|
||||
{{- $logoDark := "" -}}
|
||||
{{- if $enableDarkMode -}}
|
||||
{{ $ext := path.Ext $logo -}}
|
||||
{{- $logoLight = printf "%s-light%s" (strings.TrimSuffix $ext $logo) $ext -}}
|
||||
{{- $logoDark = printf "%s-dark%s" (strings.TrimSuffix $ext $logo) $ext -}}
|
||||
{{- $ext := path.Ext $logo -}}
|
||||
{{- $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) -}}
|
||||
{{- $dark := fileExists (path.Join "/static" $logoDark) -}}
|
||||
{{- if and $light (not $dark) -}}
|
||||
@@ -152,6 +142,10 @@
|
||||
{{- 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 -}}
|
||||
{{- if .title -}}
|
||||
{{- $title = .title -}}
|
||||
@@ -160,16 +154,16 @@
|
||||
|
||||
{{- $pre := .Pre -}}
|
||||
{{- $post := .Post -}}
|
||||
|
||||
{{- $theme := "light" -}}
|
||||
{{- if in (slice "primary" "secondary" "success" "danger" "black") $color }}{{ $theme = "dark" }}{{ end -}}
|
||||
{{- if in (slice "body" "body-tertiary") $color }}{{ $theme = "" }}{{ end -}}
|
||||
{{- if not $color }}{{ $theme = "" }}{{ end -}}
|
||||
{{- $class := .class -}}
|
||||
|
||||
{{- $contrast := false -}}
|
||||
{{- 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 -->
|
||||
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
||||
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
||||
@@ -180,7 +174,7 @@
|
||||
{{ if $overlay }}
|
||||
data-bs-theme="{{ $overlayMode }}"
|
||||
data-bs-overlay="{{ $overlayMode }}"
|
||||
{{ else }}{{ with $theme }}data-bs-theme="{{ . }}"{{ end }}{{ end }}
|
||||
{{ end }}
|
||||
{{ if $overlay }}data-navbar-color="{{ $color }}"{{ end }}
|
||||
>
|
||||
<div class="container-xxl p-0">
|
||||
@@ -219,9 +213,9 @@
|
||||
<div class="d-flex align-items-center">
|
||||
<button class="navbar-toggler main-nav-toggler collapsed p-0" type="button" data-bs-toggle="collapse" data-bs-target="#{{ $id }}-collapse"
|
||||
aria-controls="{{ $id }}" aria-expanded="false" aria-label="{{ T "toggleMainNav" }}">
|
||||
<span class="toggler-icon top-bar emphasis{{ with $theme }}-{{ . }}{{ end }}"></span>
|
||||
<span class="toggler-icon middle-bar emphasis{{ with $theme }}-{{ . }}{{ end }}"></span>
|
||||
<span class="toggler-icon bottom-bar emphasis{{ with $theme }}-{{ . }}{{ end }}"></span>
|
||||
<span class="toggler-icon top-bar emphasis"></span>
|
||||
<span class="toggler-icon middle-bar emphasis"></span>
|
||||
<span class="toggler-icon bottom-bar emphasis"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -231,23 +225,27 @@
|
||||
{{- if and $search (not $searchModal) }}{{ partial "assets/search-input.html" }}{{ end -}}
|
||||
|
||||
<!-- 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 -}}
|
||||
<li class="nav-item{{ if .HasChildren }} dropdown{{ if $horizontal }} dropdown-horizontal-{{ $size }}{{ end }}{{ end }}">
|
||||
{{- partial "assets/navbar-item.html" (dict "menu" $menu "page" $page) -}}
|
||||
{{- if .HasChildren -}}
|
||||
<ul class="dropdown-menu">
|
||||
{{- range .Children -}}
|
||||
<li>{{- partial "assets/navbar-item.html" (dict "menu" . "parent" $menu "page" $page) -}}</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
</li>
|
||||
{{ if $menu.Params.spacing }}
|
||||
<li class="nav-item flex-grow-1"></li>
|
||||
{{ else }}
|
||||
<li class="nav-item {{ if .HasChildren }} dropdown{{ if $horizontal }} dropdown-horizontal-{{ $size }}{{ end }}{{ end }}">
|
||||
{{- partial "assets/navbar-item.html" (dict "menu" $menu "page" $page) -}}
|
||||
{{- if .HasChildren -}}
|
||||
<ul class="dropdown-menu">
|
||||
{{- range .Children -}}
|
||||
<li>{{- partial "assets/navbar-item.html" (dict "menu" . "parent" $menu "page" $page) -}}</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Insert divider if applicable -->
|
||||
{{- 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>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider-bg"></li>
|
||||
@@ -255,28 +253,28 @@
|
||||
|
||||
<!-- Insert version switcher -->
|
||||
{{- 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" false "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 "baseURL" $baseURL) -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Insert language switcher if applicable -->
|
||||
{{- if $enableLanguage -}}
|
||||
{{- $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">
|
||||
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }} {{ T "languageSwitcherLabel" }}
|
||||
</a>
|
||||
<a class="nav-link dropdown-toggle d-none d-{{ $size }}-block" 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) }}
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end ">
|
||||
<ul class="dropdown-menu dropdown-menu-end " id="language-selector">
|
||||
{{- if $page.IsTranslated -}}
|
||||
{{- range $page.AllTranslations -}}
|
||||
<li><a class="dropdown-item {{ if eq .Language.Lang $currentLang }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
<li><a class="dropdown-item {{ if eq .Language.Lang $currentLang }}active{{ end }}" hreflang="{{.Language.Lang}}" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- 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 }}" hreflang="{{.Lang}}">{{ default .Lang .LanguageName }}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
@@ -286,12 +284,11 @@
|
||||
<!-- Insert color mode switcher -->
|
||||
{{- if $enableDarkMode -}}
|
||||
{{- 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 -}}
|
||||
|
||||
<!-- Insert modal search button -->
|
||||
{{- 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>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider-bg"></li>
|
||||
|
@@ -21,22 +21,30 @@
|
||||
{{- with .First }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<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>
|
||||
{{- else }}
|
||||
<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>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Prev }}
|
||||
<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>
|
||||
{{- else }}
|
||||
<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>
|
||||
{{- end }}
|
||||
|
||||
@@ -61,22 +69,30 @@
|
||||
|
||||
{{- with .Next }}
|
||||
<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>
|
||||
{{- else }}
|
||||
<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>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Last }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<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>
|
||||
{{- else }}
|
||||
<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>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -90,14 +106,18 @@
|
||||
{{- with .First }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<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>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Prev }}
|
||||
<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>
|
||||
{{- end }}
|
||||
|
||||
@@ -122,14 +142,18 @@
|
||||
|
||||
{{- with .Next }}
|
||||
<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>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Last }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<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>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@@ -64,11 +64,11 @@
|
||||
{{- with index . "layout" }}{{ $layout = . }}{{ end -}}
|
||||
{{- with index . "pane" }}{{ $pane = . }}{{ end -}}
|
||||
{{- with index . "type" }}{{ $type = . }}{{ end -}}
|
||||
{{- with index . "vertical" }}{{ $vertical = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||
{{- if (isset . "vertical") }}{{ $vertical = partial "utilities/CastBool.html" (index . "vertical") }}{{ end -}}
|
||||
{{- with index . "width" }}{{ $width = . }}{{ end -}}
|
||||
{{- with index . "kind" }}{{ $kind = . }}{{ end -}}
|
||||
{{- with index . "ratio" }}{{ $ratio = . }}{{ end -}}
|
||||
{{- with index . "wrap" }}{{ $wrap = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||
{{- if (isset . "wrap") }}{{ $wrap = partial "utilities/CastBool.html" (index . "wrap") }}{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ if isset $page.Params "nested" }}
|
||||
|
@@ -26,8 +26,8 @@
|
||||
{{- $group := .group -}}
|
||||
{{- $data := .menu -}}
|
||||
|
||||
{{- $doc_slug := $group.title | urlize -}}
|
||||
{{- $href := or $group.link (printf "%s/" (relLangURL (path.Join $baseURL $doc_slug))) -}}
|
||||
{{- $doc_slug := urls.JoinPath $baseURL ($group.title | urlize) -}}
|
||||
{{- $href := or $group.link $doc_slug -}}
|
||||
{{- $collapsed := strings.HasPrefix $page.RelPermalink $href -}}
|
||||
|
||||
<li class="mb-1">
|
||||
@@ -71,11 +71,18 @@
|
||||
{{- $level := .level -}}
|
||||
{{- $baseURL := .baseURL -}}
|
||||
{{- $title := .title -}}
|
||||
{{- $href := .href -}}
|
||||
{{- $data := .menu -}}
|
||||
{{ $href := "" }}
|
||||
|
||||
{{- $doc_slug := $title | urlize -}}
|
||||
{{- $href := or $href (printf "%s/" (relLangURL (path.Join $baseURL $doc_slug))) -}}
|
||||
{{ with .href }}
|
||||
{{ 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) -}}
|
||||
|
||||
{{ if eq $level 0}}
|
||||
@@ -114,7 +121,8 @@
|
||||
<nav class="sidebar flex-shrink-0 ps-1 pt-3" aria-label="{{ (strings.FirstUpper $section) }} navigation">
|
||||
{{- $sectionBreak := false -}}
|
||||
{{- $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">
|
||||
{{- range $index, $item := $data -}}
|
||||
|
@@ -7,6 +7,9 @@
|
||||
{{ $page := .page }}
|
||||
{{ $input := .input }}
|
||||
{{ $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" -}}
|
||||
{{- $responsive := intersect $args $responsiveVals -}}
|
||||
@@ -18,13 +21,21 @@
|
||||
{{ $responsive = (slice "table-responsive") -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $class := delimit $main " " -}}
|
||||
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
|
||||
{{- $input := $input | $page.RenderString }}
|
||||
{{- $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: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>" -}}
|
||||
{{- $new := printf "<table class=\"table %s\">" $class -}}
|
||||
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
||||
|
||||
{{ $input := replace $input $old $new -}}
|
||||
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
|
||||
{{ $input | safeHTML }}
|
||||
|
@@ -4,22 +4,43 @@
|
||||
{{ else }}
|
||||
{{ $page_modules = $page_modules | append .Params.modules }}
|
||||
{{ 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 -}}
|
||||
{{- $filename := printf "js/%s.bundle.js" $mod -}}
|
||||
{{- $match := printf "js/modules/%s/**.js" $mod -}}
|
||||
{{- $skipTemplate := false -}}
|
||||
{{- if reflect.IsSlice site.Params.modules.disableTemplate -}}
|
||||
{{- if in site.Params.modules.disableTemplate $mod}}
|
||||
{{- if reflect.IsSlice $config.disableTemplate -}}
|
||||
{{- if in $config.disableTemplate $mod}}
|
||||
{{- $skipTemplate = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $state := "" }}
|
||||
{{- with (index site.Params.modules $mod) -}}
|
||||
{{- with (index $config.modules $mod) -}}
|
||||
{{- with index . "state" }}{{ $state = . }}{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "footer/scripts.html" (dict "filename" $filename "match" $match "header" false "skipTemplate" $skipTemplate "state" $state "page" .) }}
|
||||
{{ $localize := false }}
|
||||
{{- if reflect.IsSlice $config.localize -}}
|
||||
{{- if in $config.localize $mod}}
|
||||
{{- $localize = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "footer/scripts.html" (dict
|
||||
"filename" $filename
|
||||
"match" $match
|
||||
"header" false
|
||||
"skipTemplate" $skipTemplate
|
||||
"state" $state
|
||||
"localize" $localize
|
||||
"page" page
|
||||
) }}
|
||||
{{- end -}}
|
||||
|
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
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" "scripts" "args" . "group" "partial") }}
|
||||
{{- errorf "partial [footer/scripts.html] - Invalid arguments" -}}
|
||||
{{ $error = true }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize arguments -->
|
||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
||||
{{- $filename := .filename | default "js/main.bundle.js" -}}
|
||||
{{- $match := .match | default "{js/*.js,js/vendor/**.js}" -}}
|
||||
@@ -5,21 +20,41 @@
|
||||
{{- $header := .header -}}
|
||||
{{- $core := .core | default false -}}
|
||||
{{- $skipTemplate := .skipTemplate | default false -}}
|
||||
{{- $localize := .localize | default false }}
|
||||
|
||||
{{- $state := "async" -}}
|
||||
{{- with .state }}{{ $state = . }}{{ end -}}
|
||||
{{- $state := .state | default "async" -}}
|
||||
{{- if or $header (eq $state "immediate") }}{{ $state = "" }}{{ end -}}
|
||||
{{- $supportedStates := slice "defer" "async" "immediate" -}}
|
||||
{{- if and $state (not (in $supportedStates $state)) -}}
|
||||
{{- errorf "partial [footer/script.html] - Invalid value for param 'processing': %s" $state -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $modules := "" -}}
|
||||
{{ if $core }}
|
||||
{{- $modules = site.Params.modules.core -}}
|
||||
{{ $config := $page.Scratch.Get "modules" }}
|
||||
{{ if not $config }}
|
||||
{{ errorf "partial [footer/scripts.html] - Cannot initialize module configuration" }}
|
||||
{{ end }}
|
||||
|
||||
{{- $modules = $config.core -}}
|
||||
{{- if reflect.IsSlice $config.localize -}}
|
||||
{{- range $index, $mod := $modules -}}
|
||||
{{- if in $config.localize $mod}}
|
||||
{{- $localize = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $bundle := partial "utilities/bundle" (dict "match" $match "filename" $filename "modules" $modules "basepath" "js/modules" "all" true "debugging" site.Params.debugging.showJS) -}}
|
||||
{{ if $localize }}
|
||||
{{ $filename = path.Join (path.Dir $filename) (printf "%s.%s%s" (path.BaseName $filename) $page.Language.Lang (path.Ext $filename)) }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Main code -->
|
||||
{{- $bundle := partial "utilities/bundle" (dict
|
||||
"match" $match
|
||||
"filename" $filename
|
||||
"modules" $modules
|
||||
"basepath" "js/modules"
|
||||
"all" true
|
||||
"debugging" site.Params.debugging.showJS
|
||||
) -}}
|
||||
{{- $js := $bundle -}}
|
||||
{{- if not $skipTemplate -}}
|
||||
{{- $js = $bundle | resources.ExecuteAsTemplate $filename $page -}}
|
||||
|
@@ -7,8 +7,15 @@
|
||||
<meta name="theme" content="{{ printf "Hinode %s" $version }}">
|
||||
{{ 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 }}
|
||||
{{- $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 -}}
|
||||
{{- $source := printf "scss/%s.scss" $mod -}}
|
||||
{{- $target := printf "css/%s.css" $mod -}}
|
||||
@@ -19,7 +26,7 @@
|
||||
<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" }}">
|
||||
{{ 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>
|
||||
{{- end -}}
|
||||
{{ partial "head/seo.html" . }}
|
||||
|
@@ -35,7 +35,9 @@
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ $base := partial "utilities/GetStaticURL" (dict "url" "/") }}
|
||||
{{- range resources.Match "icons/**.svg" -}}
|
||||
{{- $icon := . | resources.ExecuteAsTemplate .RelPermalink $params -}}
|
||||
{{- $target := strings.TrimPrefix $base .RelPermalink -}}
|
||||
{{- $icon := . | resources.ExecuteAsTemplate $target $params -}}
|
||||
{{- $icon.Publish -}}
|
||||
{{- end -}}
|
@@ -14,16 +14,9 @@
|
||||
{{ $.Scratch.Set "description" $description -}}
|
||||
|
||||
{{- $thumbnail := (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) -}}
|
||||
{{ with $thumbnail -}}
|
||||
{{- $res := partial "utilities/GetImage.html" (dict "url" .) -}}
|
||||
{{- $img := "" -}}
|
||||
{{ 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 -}}
|
||||
{{ if $thumbnail -}}
|
||||
{{ $imgURL := index (partial "assets/helpers/image-dimension.html" (dict "url" $thumbnail "width" 1280 "height" 640 "page" .)) "target" }}
|
||||
{{ $.Scratch.Set "thumbnail" ($imgURL | absURL) -}}
|
||||
{{ else -}}
|
||||
{{ with .Site.Params.schema.image.url -}}
|
||||
{{ $.Scratch.Set "thumbnail" (. | absURL) -}}
|
||||
|
@@ -17,6 +17,8 @@
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ $alt := slice .Site.Params.schema.twitter .Site.Params.schema.linkedin .Site.Params.schema.github }}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
@@ -31,17 +33,7 @@
|
||||
{{ end -}}
|
||||
"name": "{{ .Site.Params.schema.name }}",
|
||||
"url": {{ print $baseURL }},
|
||||
"sameAs": [
|
||||
{{ with .Site.Params.schema.twitter -}}
|
||||
{{ . }}
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.schema.linkedin -}}
|
||||
, {{ . }}
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.schema.github -}}
|
||||
, {{ . }}
|
||||
{{ end -}}
|
||||
],
|
||||
"sameAs": {{ $alt | uniq | complement (slice "") }},
|
||||
{{ if eq .Site.Params.schemaType "Organization" -}}
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
@@ -103,8 +95,8 @@
|
||||
"@id": {{ print $baseURL "#/schema/person/1" }}
|
||||
},
|
||||
{{ end -}}
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05CET" }}",
|
||||
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}",
|
||||
{{ with .Date }}"datePublished": "{{ .Format "2006-01-02T15:04:05CET" }}",{{ end -}}
|
||||
{{ with .Lastmod }}"dateModified": "{{ .Format "2006-01-02T15:04:05CET" }}",{{ end -}}
|
||||
"breadcrumb": {
|
||||
"@id": {{ print .Permalink "#/schema/breadcrumb/1" }}
|
||||
},
|
||||
@@ -151,8 +143,8 @@
|
||||
"mainEntityOfPage": {
|
||||
"@id": {{ .Permalink }}
|
||||
},
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05CET" }}",
|
||||
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}",
|
||||
{{ with .Date }}"datePublished": "{{ .Format "2006-01-02T15:04:05CET" }}",{{ end -}}
|
||||
{{ with .Lastmod }}"dateModified": "{{ .Format "2006-01-02T15:04:05CET" }}",{{ end -}}
|
||||
"author": {
|
||||
"@id": {{ print $baseURL "#/schema/person/2" }}
|
||||
},
|
||||
|
@@ -14,11 +14,16 @@
|
||||
{{- $core := .core | default true -}}
|
||||
|
||||
{{- $modules := "" -}}
|
||||
{{ $config := page.Scratch.Get "modules" }}
|
||||
{{ if not $config }}
|
||||
{{ errorf "partial [head/stylesheet.html] - Cannot initialize module configuration" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $core }}
|
||||
{{- if reflect.IsSlice site.Params.modules.excludeSCSS -}}
|
||||
{{- $modules = complement site.Params.modules.excludeSCSS (or site.Params.modules.core slice) -}}
|
||||
{{- if reflect.IsSlice $config.excludeSCSS -}}
|
||||
{{- $modules = complement $config.excludeSCSS (or $config.core slice) -}}
|
||||
{{ else }}
|
||||
{{- $modules = site.Params.modules.core -}}
|
||||
{{- $modules = $config.core -}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -35,6 +40,7 @@
|
||||
{{- $overlayOffset := $navbarOffset -}}
|
||||
{{- if site.Params.navigation.overlay }}{{ $overlayOffset = "0rem" }}{{ end }}
|
||||
{{- $vars := dict
|
||||
"base-url" (page.Scratch.Get "baseURL" | default "/")
|
||||
"theme-font" (default "Inter" site.Params.style.themeFont)
|
||||
"font-size-base" (default "1rem" site.Params.style.fontSizeBase)
|
||||
"primary" (default "#007bff" site.Params.style.primary)
|
||||
|
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 }}
|
64
layouts/partials/utilities/InitModules.html
Normal file
64
layouts/partials/utilities/InitModules.html
Normal file
@@ -0,0 +1,64 @@
|
||||
{{ $page := .page }}
|
||||
|
||||
{{ $core := slice }}
|
||||
{{ $optional := slice }}
|
||||
{{ $excludeSCSS := slice }}
|
||||
{{ $disableTemplate := slice }}
|
||||
{{ $localize := 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 }}
|
||||
|
||||
{{ if eq (index $mod "localize") true }}
|
||||
{{ $localize = $localize | 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
|
||||
"localize" $localize
|
||||
}}
|
||||
|
||||
{{- 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 }}
|
3
layouts/partials/utilities/git.html
Normal file
3
layouts/partials/utilities/git.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ with .GitInfo }}
|
||||
• <a href="{{ site.Params.docs.github | default site.Params.schema.github }}/commit/{{ .Hash }}">{{ .Subject }} ({{ .AbbreviatedHash }})</a>
|
||||
{{ end -}}
|
@@ -49,7 +49,7 @@
|
||||
<!-- Main code -->
|
||||
{{ $show := false -}}
|
||||
{{ if not $error }}
|
||||
{{ with .Get "show" }}{{ $show = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||
{{ if isset .Params "show" }}{{ $show = partial "utilities/CastBool.html" (.Get "show") }}{{ end -}}
|
||||
|
||||
<div class="accordion-item">
|
||||
{{- with $header -}}
|
||||
|
@@ -12,19 +12,25 @@
|
||||
{{ $error = true }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize arguments and default values -->
|
||||
{{- $id := printf "accordion-%d" .Ordinal -}}
|
||||
{{- $class := "" -}}
|
||||
{{- $open := false -}}
|
||||
{{- $body := .Inner -}}
|
||||
|
||||
{{ if .IsNamedParams }}
|
||||
{{ with .Get "id" }}{{ $id = . }}{{ end }}
|
||||
{{ with .Get "class" }}{{ $class = . }}{{ end }}
|
||||
{{ if isset .Params "always-open" }}{{ $open = partial "utilities/CastBool.html" (.Get "always-open") }}{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
{{- if $open -}}
|
||||
{{- $pattern := printf "data-bs-parent=\"#%s\"" $id -}}
|
||||
{{- $body = (replace .Inner $pattern "") }}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Main code -->
|
||||
{{ if not $error }}
|
||||
{{- $id := printf "accordion-%d" .Ordinal -}}
|
||||
{{ with .Get "id" }}{{ $id = . }}{{ end }}
|
||||
{{- $class := .Get "class" | default "" -}}
|
||||
{{- $open := false -}}
|
||||
{{ with .Get "always-open" }}{{ $open = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||
{{- $body := .Inner -}}
|
||||
{{- if $open -}}
|
||||
{{- $pattern := printf "data-bs-parent=\"#%s\"" $id -}}
|
||||
{{- $body = (replace .Inner $pattern "") }}
|
||||
{{- end -}}
|
||||
|
||||
<div id="{{ $id }}" class="accordion mb-3{{ with $class }} {{ . }}{{ end }}">
|
||||
{{- $body | safeHTML -}}
|
||||
</div>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user