mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 10:04:22 +00:00
Compare commits
342 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
068e773ab0 | ||
![]() |
3ae91a78a1 | ||
![]() |
6627446961 | ||
![]() |
d4fd6ece60 | ||
![]() |
a746fd147c | ||
![]() |
d0410af879 | ||
![]() |
314f1a0ca4 | ||
![]() |
066c5ce8eb | ||
![]() |
bba9629f54 | ||
![]() |
d2d59ec3ef | ||
![]() |
c080be2872 | ||
![]() |
3c17234b33 | ||
![]() |
16884abcba | ||
![]() |
2abbe4f6de | ||
![]() |
c6f9de0a64 | ||
![]() |
39f104fa5f | ||
![]() |
437ad0dbf7 | ||
![]() |
2eb354d941 | ||
![]() |
5a7f46bca4 | ||
![]() |
0bc37ff426 | ||
![]() |
0d24f85e13 | ||
![]() |
d067171ba2 | ||
![]() |
09e649d432 | ||
![]() |
87c7bd4238 | ||
![]() |
19734f6a1f | ||
![]() |
12a5ebad9f | ||
![]() |
1b964777a4 | ||
![]() |
f910d1bbbb | ||
![]() |
86461c9739 | ||
![]() |
a730255eb6 | ||
![]() |
e940cc9931 | ||
![]() |
3a70d25f2e | ||
![]() |
9e72e5fe73 | ||
![]() |
561bdcac28 | ||
![]() |
11cd2bb167 | ||
![]() |
45a71fc1d1 | ||
![]() |
3f5c10319b | ||
![]() |
e4331c8ce7 | ||
![]() |
6166615629 | ||
![]() |
27c15b4e36 | ||
![]() |
c99e8c83d1 | ||
![]() |
a0cbdd0cbb | ||
![]() |
1ed825d7ca | ||
![]() |
09099eba58 | ||
![]() |
58b2eebea5 | ||
![]() |
46a2a6c994 | ||
![]() |
0dcec12256 | ||
![]() |
50a188e807 | ||
![]() |
400f27dcc9 | ||
![]() |
90bcc744ff | ||
![]() |
cf0fae6dc1 | ||
![]() |
1b39d23ddf | ||
![]() |
c94249408c | ||
![]() |
f4f207fa25 | ||
![]() |
307067629e | ||
![]() |
f9174e4505 | ||
![]() |
320d44c78d | ||
![]() |
091526a17b | ||
![]() |
9ec61d645d | ||
![]() |
0630043210 | ||
![]() |
2933d1d3bb | ||
![]() |
aa5118cdf6 | ||
![]() |
ec1c87070b | ||
![]() |
e806dc07a4 | ||
![]() |
9e7478f4c4 | ||
![]() |
686dd1c946 | ||
![]() |
548a2fa835 | ||
![]() |
1338df7b8a | ||
![]() |
150e438c59 | ||
![]() |
285f262a01 | ||
![]() |
7989dd17d4 | ||
![]() |
5f4070b481 | ||
![]() |
00160137e8 | ||
![]() |
51510ae047 | ||
![]() |
4fc95db0e9 | ||
![]() |
a1f899c1de | ||
![]() |
e358e737be | ||
![]() |
0e35d26f20 | ||
![]() |
ede04405d1 | ||
![]() |
30aa2df2d2 | ||
![]() |
47d582f855 | ||
![]() |
fa1fcc3dd0 | ||
![]() |
04bc95720b | ||
![]() |
5c539ec003 | ||
![]() |
b19201e561 | ||
![]() |
7e21c93e22 | ||
![]() |
c81efe61d0 | ||
![]() |
6fe8e12509 | ||
![]() |
44b243489b | ||
![]() |
548dca2bb1 | ||
![]() |
b3e47b85f3 | ||
![]() |
087d3666b8 | ||
![]() |
77f4354499 | ||
![]() |
362bf368ce | ||
![]() |
fc17256fd2 | ||
![]() |
887aff5c5b | ||
![]() |
6ec26f1216 | ||
![]() |
357c74e3e0 | ||
![]() |
4b419810ea | ||
![]() |
0a313172bd | ||
![]() |
93eec0ff5a | ||
![]() |
f9fc8d9a6a | ||
![]() |
c537b9cfe4 | ||
![]() |
c37fe75f0d | ||
![]() |
4034289a7f | ||
![]() |
9b5c572ab9 | ||
![]() |
10c6344493 | ||
![]() |
fc386fcad9 | ||
![]() |
a680a61825 | ||
![]() |
a075ca5f7b | ||
![]() |
a816d2be25 | ||
![]() |
52ff0fb71e | ||
![]() |
95fd919a6f | ||
![]() |
85778dd374 | ||
![]() |
3b65b2c87f | ||
![]() |
ee3a0ee8c4 | ||
![]() |
3b721690f1 | ||
![]() |
96b2ed2f4c | ||
![]() |
d6d39ad946 | ||
![]() |
f8db72ebad | ||
![]() |
9a8ee943a9 | ||
![]() |
520c5ba43b | ||
![]() |
4205c07993 | ||
![]() |
7cd1dc3c27 | ||
![]() |
d96ef8af35 | ||
![]() |
2defd83f0f | ||
![]() |
ba10e2115a | ||
![]() |
1d4a5d960f | ||
![]() |
ec492c005f | ||
![]() |
624d57c374 | ||
![]() |
e7dda56408 | ||
![]() |
c3e135de9e | ||
![]() |
b84fc502b5 | ||
![]() |
b18b662cef | ||
![]() |
3070e4abac | ||
![]() |
052033fe42 | ||
![]() |
c37bb67c09 | ||
![]() |
0728a148b8 | ||
![]() |
6bf687dbf8 | ||
![]() |
e656ec9f33 | ||
![]() |
d522fb07d5 | ||
![]() |
39d98b2b6c | ||
![]() |
6dfab4aa5f | ||
![]() |
c5bdae6466 | ||
![]() |
f79267a39e | ||
![]() |
ea05749f0e | ||
![]() |
2dd027028c | ||
![]() |
3a4b1c8670 | ||
![]() |
e2b92c9519 | ||
![]() |
1defbd32f9 | ||
![]() |
edd303bab1 | ||
![]() |
43041f42fc | ||
![]() |
250bfc33e6 | ||
![]() |
b7d4af7c0a | ||
![]() |
631d952923 | ||
![]() |
744dd361f0 | ||
![]() |
719b5893d7 | ||
![]() |
228f6f29dc | ||
![]() |
3ea24f7e7f | ||
![]() |
418069773f | ||
![]() |
0791000f10 | ||
![]() |
cee94a9664 | ||
![]() |
d42a6c4150 | ||
![]() |
73160b0cfe | ||
![]() |
2d5225e205 | ||
![]() |
d7e9f05588 | ||
![]() |
f936bdd117 | ||
![]() |
fc05a338c7 | ||
![]() |
367e2f78d3 | ||
![]() |
6af1df3862 | ||
![]() |
a1c124cb38 | ||
![]() |
07b1a0d0ce | ||
![]() |
a3f215c211 | ||
![]() |
c31fdae5e4 | ||
![]() |
c208bc8946 | ||
![]() |
6c285b203d | ||
![]() |
a867458f4b | ||
![]() |
973fbf6637 | ||
![]() |
367f209c73 | ||
![]() |
06f384a206 | ||
![]() |
2ce4001fa8 | ||
![]() |
fe2e3ba5f4 | ||
![]() |
0830e0da77 | ||
![]() |
195f0b192f | ||
![]() |
f98d2000e3 | ||
![]() |
54f49944cc | ||
![]() |
7525ecddc2 | ||
![]() |
09ab64c361 | ||
![]() |
2b3f87b885 | ||
![]() |
213bb31133 | ||
![]() |
b0130d9f7d | ||
![]() |
07a3be644c | ||
![]() |
262bc47260 | ||
![]() |
51553a05f0 | ||
![]() |
bd06ee211b | ||
![]() |
cc8e889825 | ||
![]() |
a6144122b2 | ||
![]() |
853e0c818f | ||
![]() |
1c5fb55d89 | ||
![]() |
d48fb1a300 | ||
![]() |
f2aa9d2661 | ||
![]() |
d721e1cfc2 | ||
![]() |
7f7bf2152c | ||
![]() |
a9543de1e7 | ||
![]() |
39e4073837 | ||
![]() |
d2782349d5 | ||
![]() |
fe97815460 | ||
![]() |
7bcaa69d5b | ||
![]() |
30ae3f6b3c | ||
![]() |
6540e11fa9 | ||
![]() |
14f2145239 | ||
![]() |
856a0aed08 | ||
![]() |
5c6b91f1ce | ||
![]() |
152b8ca060 | ||
![]() |
0f8870fed0 | ||
![]() |
742ae6784b | ||
![]() |
ce4c8c0a7c | ||
![]() |
40de449fed | ||
![]() |
4c27864248 | ||
![]() |
3efb2b7451 | ||
![]() |
721e222849 | ||
![]() |
77b9d62d76 | ||
![]() |
efe3c947c2 | ||
![]() |
beee2e40e0 | ||
![]() |
895d606175 | ||
![]() |
9a17df96f3 | ||
![]() |
d2e1a1678a | ||
![]() |
d8451e2699 | ||
![]() |
f98ab74905 | ||
![]() |
6e453ea2ab | ||
![]() |
d6ca890c80 | ||
![]() |
46aecfe65a | ||
![]() |
496c07ff7e | ||
![]() |
3a63f4fad7 | ||
![]() |
bbf99507d6 | ||
![]() |
2a92cfd155 | ||
![]() |
31a5377cf4 | ||
![]() |
633a33796c | ||
![]() |
9b224317bb | ||
![]() |
a410fcaa19 | ||
![]() |
a6b2ddd2f9 | ||
![]() |
2e4a3660cc | ||
![]() |
2b0620b2d9 | ||
![]() |
98fc43cf7d | ||
![]() |
de1101c7ec | ||
![]() |
c42f3bb27b | ||
![]() |
267007b7e8 | ||
![]() |
77288da0de | ||
![]() |
1764ccd9f4 | ||
![]() |
14f8c27eca | ||
![]() |
884b7b323d | ||
![]() |
a0795b35db | ||
![]() |
0db4e4c32a | ||
![]() |
71a084943c | ||
![]() |
6bad597805 | ||
![]() |
b11aefd592 | ||
![]() |
f280f6402b | ||
![]() |
157b3da43e | ||
![]() |
5de693297f | ||
![]() |
65633ca62c | ||
![]() |
81589efb00 | ||
![]() |
1d50bb5ed2 | ||
![]() |
b5a19fa7d6 | ||
![]() |
fc76bac8b0 | ||
![]() |
f671c31130 | ||
![]() |
cdb84e8f21 | ||
![]() |
121625515a | ||
![]() |
60b6e1c960 | ||
![]() |
6628e9f879 | ||
![]() |
a3178e06af | ||
![]() |
fc86946cff | ||
![]() |
e440386999 | ||
![]() |
01c864bd64 | ||
![]() |
16cc468cf1 | ||
![]() |
1147c8fff6 | ||
![]() |
6b0fd9e244 | ||
![]() |
05bb9417b0 | ||
![]() |
03fc50852a | ||
![]() |
4de91bb7f2 | ||
![]() |
96b9a3b38d | ||
![]() |
da52d6e596 | ||
![]() |
b369e34f32 | ||
![]() |
e456061d19 | ||
![]() |
a87de9c37c | ||
![]() |
6283970443 | ||
![]() |
200ca109b1 | ||
![]() |
acded37e83 | ||
![]() |
782a40e1e8 | ||
![]() |
7b2bb803b3 | ||
![]() |
0e0561b081 | ||
![]() |
e3cf2e1337 | ||
![]() |
c18316250b | ||
![]() |
29a8666d7d | ||
![]() |
431125e46c | ||
![]() |
dae6541185 | ||
![]() |
41d0edb6c1 | ||
![]() |
5d9d11c388 | ||
![]() |
3b26c04bdd | ||
![]() |
01d41ae38e | ||
![]() |
22d5859432 | ||
![]() |
551b185dd9 | ||
![]() |
2edf12fb8b | ||
![]() |
fbdf79e05e | ||
![]() |
92e37ef847 | ||
![]() |
62084600a5 | ||
![]() |
8867ab1cbe | ||
![]() |
c3e09c341f | ||
![]() |
6cf4deceb7 | ||
![]() |
0dd790cf7a | ||
![]() |
6353b68c3e | ||
![]() |
fadd5b2fb5 | ||
![]() |
1d4add88ec | ||
![]() |
0b779d5f3a | ||
![]() |
2898745383 | ||
![]() |
892546886b | ||
![]() |
b09f039929 | ||
![]() |
86bcfa21fa | ||
![]() |
f97eeff745 | ||
![]() |
205e10d86b | ||
![]() |
3eb0794f08 | ||
![]() |
a1abc5970f | ||
![]() |
7b0839ad92 | ||
![]() |
3f20ddcd65 | ||
![]() |
24e0282eb7 | ||
![]() |
9fba521bc5 | ||
![]() |
60a34aac97 | ||
![]() |
15daf8c090 | ||
![]() |
7e4459ca8d | ||
![]() |
5ef2aad372 | ||
![]() |
4c6f4a9da9 | ||
![]() |
fd7f3692dd | ||
![]() |
f48b462c51 | ||
![]() |
287bc7700c | ||
![]() |
ee5e2745e2 | ||
![]() |
31fb07e180 | ||
![]() |
aaf8513688 | ||
![]() |
acd2812218 | ||
![]() |
665357e538 | ||
![]() |
f678352b78 | ||
![]() |
17b39caef7 | ||
![]() |
38ab9f2e43 | ||
![]() |
aa4da56910 |
@@ -1,8 +0,0 @@
|
||||
assets/js/critical/languageSelector.js
|
||||
assets/js/critical/color.js
|
||||
assets/js/analytics.js
|
||||
assets/js/flexsearch.js
|
||||
assets/js/navbar.js
|
||||
assets/js/sharing.js
|
||||
assets/js/vendor
|
||||
node_modules
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
_vendor/
|
||||
prebuild/
|
||||
public/
|
||||
resources/
|
||||
node_modules/
|
||||
|
@@ -123,7 +123,7 @@ Hinode is inspired by the following themes:
|
||||
## Donate
|
||||
|
||||
<!-- markdownlint-disable MD033 -->
|
||||
<a href="https://www.buymeacoffee.com/markdumay" target="_blank" rel="noopener noreferrer"><img src="https://cdn.buymeacoffee.com/buttons/lato-orange.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;"></a>
|
||||
<a href="https://www.buymeacoffee.com/markdumay" target="_blank" rel="noopener noreferrer nofollow"><img src="https://cdn.buymeacoffee.com/buttons/lato-orange.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;"></a>
|
||||
<!-- markdownlint-enable MD033 -->
|
||||
|
||||
## License
|
||||
|
@@ -1,14 +1,15 @@
|
||||
/* eslint-disable no-undef */
|
||||
const alert = document.getElementById('page-alert')
|
||||
const closeBtn = document.getElementById('page-alert-btn-close')
|
||||
if (alert !== null && closeBtn !== null) {
|
||||
const version = alert.getAttribute('data-page-alert-version') || 'unknown'
|
||||
const hideAlert = sessionStorage.getItem(`page-alert-${version}`) !== null
|
||||
const hideAlert = getSessionStorage(`page-alert-${version}`, null, 'functional') !== null
|
||||
if (hideAlert) {
|
||||
alert.classList.add('d-none')
|
||||
}
|
||||
|
||||
closeBtn.addEventListener('click', () => {
|
||||
sessionStorage.setItem(`page-alert-${version}`, 'seen')
|
||||
setSessionStorage(`page-alert-${version}`, 'seen', 'functional')
|
||||
alert.classList.add('d-none')
|
||||
})
|
||||
}
|
||||
|
@@ -1,21 +0,0 @@
|
||||
// Adapted from https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/google_analytics.html
|
||||
|
||||
{{ if and (not hugo.IsServer) (not site.Config.Privacy.GoogleAnalytics.Disable) }}
|
||||
{{ with site.Config.Services.GoogleAnalytics.ID }}
|
||||
{{ if strings.HasPrefix (lower .) "ua-" }}
|
||||
{{ warnf "Google Analytics 4 (GA4) replaced Google Universal Analytics (UA) effective 1 July 2023. See https://support.google.com/analytics/answer/11583528. Create a GA4 property and data stream, then replace the Google Analytics ID in your site configuration with the new value." }}
|
||||
{{ else }}
|
||||
var doNotTrack = false;
|
||||
if ({{ site.Config.Privacy.GoogleAnalytics.RespectDoNotTrack }}) {
|
||||
var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
|
||||
var doNotTrack = (dnt == "1" || dnt == "yes");
|
||||
}
|
||||
if (!doNotTrack) {
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ . }}');
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
33
assets/js/critical/_cookie.js
Normal file
33
assets/js/critical/_cookie.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/* eslint-disable no-undef, no-unused-vars */
|
||||
function hasConsent (category) {
|
||||
// TODO: placeholder function
|
||||
return true
|
||||
}
|
||||
|
||||
function getLocalStorage (key, def, category) {
|
||||
if (hasConsent(category)) {
|
||||
return localStorage.getItem(key)
|
||||
} else {
|
||||
return def
|
||||
}
|
||||
}
|
||||
|
||||
function setLocalStorage (key, val, category) {
|
||||
if (hasConsent(category)) {
|
||||
localStorage.setItem(key, val)
|
||||
}
|
||||
}
|
||||
|
||||
function getSessionStorage (key, def, category) {
|
||||
if (hasConsent(category)) {
|
||||
return sessionStorage.getItem(key)
|
||||
} else {
|
||||
return def
|
||||
}
|
||||
}
|
||||
|
||||
function setSessionStorage (key, val, category) {
|
||||
if (hasConsent(category)) {
|
||||
sessionStorage.setItem(key, val)
|
||||
}
|
||||
}
|
@@ -11,8 +11,8 @@
|
||||
|
||||
const supportedThemes = ['auto', 'dark', 'light'];
|
||||
|
||||
// retrieves the currently stored theme from local storage (cookie)
|
||||
const storedTheme = localStorage.getItem('theme')
|
||||
// retrieves the currently stored theme from local storage
|
||||
const storedTheme = getLocalStorage('theme', 'auto', 'functional')
|
||||
|
||||
// retrieves the theme preferred by the client, defaults to light
|
||||
function getPreferredTheme() {
|
||||
@@ -25,7 +25,7 @@
|
||||
return storedTheme
|
||||
} else {
|
||||
const preference = getPreferredTheme()
|
||||
localStorage.setItem('theme', preference)
|
||||
setLocalStorage('theme', preference, 'functional')
|
||||
return preference
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
if (!supportedThemes.includes(theme)) {
|
||||
theme = 'auto'
|
||||
}
|
||||
localStorage.setItem('theme', theme)
|
||||
setLocalStorage('theme', theme, 'functional')
|
||||
|
||||
if (theme === 'auto') {
|
||||
document.documentElement.setAttribute('data-bs-theme', (getPreferredTheme()))
|
||||
|
@@ -1,17 +1,20 @@
|
||||
/* eslint-disable */
|
||||
{{- if site.Params.main.enableLanguageSelectionStorage -}}
|
||||
{{- if site.Params.main.enableLanguageSelectionStorage -}}
|
||||
{{- $folder := (urls.Parse site.BaseURL).Path | default "/" -}}
|
||||
|
||||
(() => {
|
||||
'use strict'
|
||||
|
||||
// Function to get the selected language from localStorage
|
||||
const folder = '{{ $folder }}'
|
||||
|
||||
// Function to get the selected language from local storage
|
||||
function getLanguage () {
|
||||
return localStorage.getItem('selectedLanguage')
|
||||
return getLocalStorage('selectedLanguage', document.documentElement.lang, 'functional')
|
||||
}
|
||||
|
||||
// Function to set the selected language in localStorage
|
||||
// Function to set the selected language in local storage
|
||||
function setLanguage (language) {
|
||||
localStorage.setItem('selectedLanguage', language)
|
||||
setLocalStorage('selectedLanguage', language, 'functional')
|
||||
}
|
||||
|
||||
// Function to apply the selected language to the website
|
||||
@@ -22,7 +25,7 @@
|
||||
window.location.href = href
|
||||
}
|
||||
} else {
|
||||
window.location.href = '/' + language + '/'
|
||||
window.location.href = folder + language + '/'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,7 +60,7 @@
|
||||
// Redirect to the localized homepage
|
||||
const defaultLang = '{{ site.LanguageCode | default site.Language.Lang }}'
|
||||
let language = storedLanguage ? storedLanguage : defaultLang
|
||||
window.location.href = '/' + language + '/'
|
||||
window.location.href = folder + language + '/'
|
||||
}
|
||||
})
|
||||
})()
|
||||
|
@@ -5,15 +5,22 @@ const modeSelectors = document.querySelectorAll('.switch-mode-collapsed')
|
||||
const colorsBG = ['body', 'secondary', 'tertiary']
|
||||
|
||||
function updateNavbar () {
|
||||
let storedTheme
|
||||
if (typeof getLocalStorage === "function") {
|
||||
storedTheme = getLocalStorage('theme', null, 'functional')
|
||||
}
|
||||
|
||||
if (window.scrollY > 75) {
|
||||
navbar.classList.add('nav-active')
|
||||
const storedTheme = localStorage.getItem('theme')
|
||||
navbar.setAttribute('data-bs-theme', storedTheme)
|
||||
if (storedTheme) {
|
||||
navbar.setAttribute('data-bs-theme', storedTheme)
|
||||
}
|
||||
} else {
|
||||
navbar.classList.remove('nav-active')
|
||||
const defaultTheme = navbar.getAttribute('data-bs-overlay')
|
||||
|
||||
if (defaultTheme) {
|
||||
const targetTheme = defaultTheme ? defaultTheme : storedTheme
|
||||
if (targetTheme) {
|
||||
navbar.setAttribute('data-bs-theme', defaultTheme)
|
||||
}
|
||||
}
|
||||
|
@@ -14,23 +14,22 @@ function webShareAPI (title, description, link) {
|
||||
.catch((error) => console.log('Error sharing', error))
|
||||
}
|
||||
|
||||
const shareBtn = document.getElementById('btn-webshare')
|
||||
|
||||
if (shareBtn !== null) {
|
||||
const shareButtons = document.querySelectorAll('[data-sharing-url]')
|
||||
shareButtons.forEach(btn => {
|
||||
if (navigator.share) {
|
||||
const title = shareBtn.getAttribute('data-sharing-title')
|
||||
const description = shareBtn.getAttribute('data-sharing-description')
|
||||
const url = shareBtn.getAttribute('data-sharing-url')
|
||||
const title = btn.getAttribute('data-sharing-title')
|
||||
const description = btn.getAttribute('data-sharing-description')
|
||||
const url = btn.getAttribute('data-sharing-url')
|
||||
|
||||
// show button if it supports webShareAPI
|
||||
shareBtn.style.display = 'block'
|
||||
shareBtn.addEventListener('click', () =>
|
||||
btn.style.display = 'block'
|
||||
btn.addEventListener('click', () =>
|
||||
webShareAPI(title, description, url)
|
||||
)
|
||||
} else {
|
||||
// hide button if host does not support Web Share API
|
||||
shareBtn.style.display = 'none'
|
||||
btn.style.display = 'none'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
{{- end -}}
|
3
assets/js/video.js
Normal file
3
assets/js/video.js
Normal file
@@ -0,0 +1,3 @@
|
||||
document.querySelectorAll('[data-video-padding]').forEach(element => {
|
||||
element.style.paddingBottom = element.getAttribute('data-video-padding')
|
||||
})
|
@@ -5,11 +5,21 @@
|
||||
background-color: var(--#{$prefix}secondary-bg);
|
||||
}
|
||||
|
||||
.card-img-wrap {
|
||||
.card .card-img-wrap {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card .card-img-wrap:has(.card-img-top) {
|
||||
border-top-left-radius: var(--#{$prefix}card-inner-border-radius);
|
||||
border-top-right-radius: var(--#{$prefix}card-inner-border-radius);
|
||||
}
|
||||
|
||||
.card .card-img-wrap:has(.card-img-bottom) {
|
||||
border-bottom-right-radius: var(--#{$prefix}card-inner-border-radius);
|
||||
border-bottom-left-radius: var(--#{$prefix}card-inner-border-radius);
|
||||
}
|
||||
|
||||
.card-zoom {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@@ -1,4 +1,8 @@
|
||||
.nav-tabs > .nav-link.active {
|
||||
.nav-tabs .nav-tabs {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link.active {
|
||||
border-bottom-color: var(--bs-body-bg) !important;
|
||||
border-bottom-style: solid !important;
|
||||
z-index: 1;
|
||||
@@ -12,13 +16,13 @@
|
||||
column-gap: var(--#{$prefix}nav-callout-gap) !important;
|
||||
}
|
||||
|
||||
.nav-callout > .tab-content {
|
||||
.nav-callout + .tab-content {
|
||||
background-color: var(--#{$prefix}nav-callout-bg);
|
||||
padding: 2 * $spacer;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.nav-callout > .nav-link {
|
||||
.nav-callout .nav-link {
|
||||
display: flex;
|
||||
text-align: start;
|
||||
vertical-align: text-top;
|
||||
@@ -27,7 +31,7 @@
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.nav-callout > .nav-link.active {
|
||||
.nav-callout .nav-link.active {
|
||||
background-image: linear-gradient(to top right, var(--#{$prefix}nav-callout-bg) 50%, transparent 0);
|
||||
background-size: 50% (3 * $spacer);
|
||||
background-repeat: no-repeat;
|
||||
@@ -53,7 +57,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.nav-callout > .accordion-item {
|
||||
.nav-callout .accordion-item {
|
||||
margin-top: 2 * $spacer;
|
||||
margin-bottom: 2 * $spacer;
|
||||
border: none;
|
||||
|
@@ -1,11 +1,11 @@
|
||||
.youtube-embedded {
|
||||
.video-embedded {
|
||||
position: relative;
|
||||
padding-bottom: 56.25%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.youtube-embedded > iframe {
|
||||
.video-embedded > iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
@@ -1,7 +1,6 @@
|
||||
# toml-docs-start main
|
||||
title = "Hinode"
|
||||
copyright = "Copyright © 2024 Mark Dumay."
|
||||
paginate = 9
|
||||
enableGitInfo = true
|
||||
# toml-docs-end main
|
||||
|
||||
@@ -27,20 +26,48 @@ defaultContentLanguage = "en"
|
||||
defaultContentLanguageInSubdir = false
|
||||
# toml-docs-end language
|
||||
|
||||
# toml-docs-start headers
|
||||
[outputFormats]
|
||||
[outputFormats.server]
|
||||
mediaType = "application/toml"
|
||||
baseName = "server"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
permalinkable = true
|
||||
root = true
|
||||
[outputFormats.netlify]
|
||||
mediaType = "application/toml"
|
||||
baseName = "netlify"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
permalinkable = true
|
||||
root = true
|
||||
# toml-docs-end headers
|
||||
|
||||
[outputFormats.XML]
|
||||
isPlainText = false
|
||||
mediaType = "application/xml"
|
||||
isHtml = false
|
||||
noUgly = true
|
||||
permalinkable = false
|
||||
name = "xml"
|
||||
|
||||
# toml-docs-start redirect
|
||||
[outputFormats.REDIR]
|
||||
mediaType = "text/netlify"
|
||||
baseName = "_redirects"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
[outputFormats.REDIR]
|
||||
mediaType = "text/netlify"
|
||||
baseName = "_redirects"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
|
||||
[mediaTypes."text/netlify"]
|
||||
delimiter = ""
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "REDIR"]
|
||||
# toml-docs-end redirect
|
||||
|
||||
# toml-docs-start outputs
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "REDIR", "netlify", "server"]
|
||||
# toml-docs-end outputs
|
||||
|
||||
# toml-docs-start build
|
||||
[build]
|
||||
writeStats = true
|
||||
@@ -49,6 +76,9 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[taxonomies]
|
||||
tag = 'tags'
|
||||
|
||||
[pagination]
|
||||
pagerSize = 9
|
||||
|
||||
[privacy]
|
||||
[privacy.vimeo]
|
||||
disabled = false
|
||||
@@ -75,15 +105,6 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[services.googleAnalytics]
|
||||
# ID = "G-xxxxxxxxxx"
|
||||
|
||||
[outputFormats]
|
||||
[outputFormats.XML]
|
||||
isPlainText = false
|
||||
mediaType = "application/xml"
|
||||
isHtml = false
|
||||
noUgly = true
|
||||
permalinkable = false
|
||||
name = "xml"
|
||||
|
||||
[minify]
|
||||
[minify.tdewolff.js]
|
||||
keepVarNames = true
|
||||
@@ -95,7 +116,7 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.132.0"
|
||||
min = "0.134.0"
|
||||
max = ""
|
||||
[[module.mounts]]
|
||||
source = "archetypes"
|
||||
@@ -124,10 +145,14 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
# toml-docs-start modules
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-bootstrap"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-csp"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-flexsearch/v2"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-fontawesome"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-google-analytics"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-katex"
|
||||
[[module.imports]]
|
||||
@@ -139,3 +164,11 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-utils/v2"
|
||||
# toml-docs-end modules
|
||||
|
||||
# toml-docs-start segments
|
||||
[segments]
|
||||
[segments.headers]
|
||||
[[segments.headers.includes]]
|
||||
kind = '{home}'
|
||||
output = '{netlify,server}'
|
||||
# toml-docs-end segments
|
||||
|
@@ -11,5 +11,5 @@
|
||||
title = "Follow me"
|
||||
caption = "I work on everything coding and tweet developer memes"
|
||||
[en.params.footer]
|
||||
# license = "Licensed under Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank' rel='noopener noreferrer'>CC BY-NC-SA 4.0</a>)."
|
||||
# license = "Licensed under Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank' rel='noopener noreferrer nofollow'>CC BY-NC-SA 4.0</a>)."
|
||||
# toml-docs-end lang-param
|
||||
|
@@ -10,6 +10,8 @@
|
||||
footerBelowFold = false
|
||||
loading = "lazy"
|
||||
breakpoint = "md"
|
||||
[main.internalLinks]
|
||||
validate = true
|
||||
[main.externalLinks]
|
||||
cue = false
|
||||
tab = false
|
||||
@@ -27,6 +29,18 @@
|
||||
host = "imgix"
|
||||
# toml-docs-end images
|
||||
|
||||
# toml-docs-start videos
|
||||
[videos]
|
||||
[videos.cloudinary]
|
||||
host = "cloudinary"
|
||||
account = "demo"
|
||||
[videos.vimeo]
|
||||
host = "vimeo"
|
||||
[videos.youtube]
|
||||
host = "youtube"
|
||||
# toml-docs-end videos
|
||||
|
||||
|
||||
# toml-docs-start debugging
|
||||
[debugging]
|
||||
showJS = false
|
||||
@@ -192,3 +206,38 @@
|
||||
|
||||
[links]
|
||||
hinode = "https://gethinode.com"
|
||||
|
||||
# toml-docs-start headers
|
||||
[headers]
|
||||
[headers.netlify]
|
||||
source = "netlify.toml"
|
||||
# toml-docs-end headers
|
||||
|
||||
# toml-docs-start csp
|
||||
[modules.hinode.csp]
|
||||
style-src = ["www.youtube.com"]
|
||||
font-src = ["fonts.gstatic.com"]
|
||||
frame-src = [
|
||||
"player.cloudinary.com",
|
||||
"www.youtube-nocookie.com",
|
||||
"www.youtube.com"
|
||||
]
|
||||
img-src = [
|
||||
"data:",
|
||||
"*.imgix.net",
|
||||
"*.imagekit.io",
|
||||
"*.cloudinary.com",
|
||||
"i.ytimg.com"
|
||||
]
|
||||
# toml-docs-end csp
|
||||
|
||||
[modules.vimeo]
|
||||
local = true
|
||||
integration = "optional"
|
||||
state = "async"
|
||||
url = "https://player.vimeo.com/api/player.js"
|
||||
|
||||
[modules.vimeo.csp]
|
||||
frame-src = ["player.vimeo.com"]
|
||||
img-src = ["i.vimeocdn.com"]
|
||||
script-src = ["player.vimeo.com"]
|
||||
|
@@ -1,42 +1,29 @@
|
||||
# toml-docs-start server-config
|
||||
# Auto-generated file - do not modify
|
||||
|
||||
[[headers]]
|
||||
for = '/**'
|
||||
[headers.values]
|
||||
Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
|
||||
X-Content-Type-Options = "nosniff"
|
||||
X-XSS-Protection = "1; mode=block"
|
||||
Content-Security-Policy = """\
|
||||
default-src 'self'; \
|
||||
script-src 'self' https://*.google-analytics.com https://*.googletagmanager.com; \
|
||||
style-src 'self' https://fonts.googleapis.com https://www.youtube.com; \
|
||||
object-src 'none'; \
|
||||
for = '/**'
|
||||
|
||||
[headers.values]
|
||||
Access-Control-Allow-Origin = '*'
|
||||
Content-Security-Policy = """
|
||||
base-uri 'self'; \
|
||||
connect-src 'self'
|
||||
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://*.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; \
|
||||
connect-src 'self' *.google-analytics.com *.analytics.google.com *.googletagmanager.com; \
|
||||
default-src 'none'; \
|
||||
font-src 'self' fonts.gstatic.com; \
|
||||
form-action 'self'; \
|
||||
frame-src player.cloudinary.com www.youtube-nocookie.com www.youtube.com player.vimeo.com; \
|
||||
img-src 'self' *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.ytimg.com tile.openstreetmap.org i.vimeocdn.com; \
|
||||
manifest-src 'self'; \
|
||||
media-src 'self' \
|
||||
media-src 'self'; \
|
||||
object-src 'none'; \
|
||||
script-src 'self' *.google-analytics.com *.googletagmanager.com player.vimeo.com; \
|
||||
style-src 'self' www.youtube.com; \
|
||||
"""
|
||||
X-Frame-Options = "SAMEORIGIN"
|
||||
Referrer-Policy = "strict-origin"
|
||||
Permissions-Policy = """\
|
||||
geolocation=(), \
|
||||
midi=(), \
|
||||
sync-xhr=(), \
|
||||
microphone=(), \
|
||||
camera=(), \
|
||||
magnetometer=(), \
|
||||
gyroscope=(), \
|
||||
fullscreen=(), \
|
||||
payment=() \
|
||||
"""
|
||||
cache-control = """\
|
||||
max-age=0, \
|
||||
no-cache, \
|
||||
no-store, \
|
||||
must-revalidate \
|
||||
"""
|
||||
Access-Control-Allow-Origin = "*"
|
||||
# toml-docs-end server-config
|
||||
Permissions-Policy = 'geolocation=(), midi=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), fullscreen=(), payment=() '
|
||||
Referrer-Policy = 'strict-origin'
|
||||
Strict-Transport-Security = 'max-age=31536000; includeSubDomains; preload'
|
||||
X-Content-Type-Options = 'nosniff'
|
||||
X-Frame-Options = 'SAMEORIGIN'
|
||||
X-XSS-Protection = '1; mode=block'
|
||||
cache-control = 'max-age=0, no-cache, no-store, must-revalidate '
|
||||
|
||||
|
@@ -10,7 +10,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
|
||||
return [...(els.tags || []), ...(els.classes || []), ...(els.ids || [])]
|
||||
},
|
||||
dynamicAttributes: ['data-bs-theme'],
|
||||
safelist: [
|
||||
safelist: ['was-validated',
|
||||
...whitelister([
|
||||
'./assets/scss/components/_clipboard.scss',
|
||||
'./assets/scss/components/_command.scss',
|
||||
@@ -24,6 +24,7 @@ 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-cookieyes/v2/assets/scss/cookieyes.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',
|
||||
|
35
data/netlify.toml
Normal file
35
data/netlify.toml
Normal file
@@ -0,0 +1,35 @@
|
||||
# toml-docs-start netlify
|
||||
[build]
|
||||
publish = "exampleSite/public"
|
||||
command = "npm run build:example"
|
||||
|
||||
[build.environment]
|
||||
DART_SASS_VERSION = "1.78.0"
|
||||
HUGO_VERSION = "0.134.1"
|
||||
HUGO_ENV = "production"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
NODE_VERSION = "20.17.0"
|
||||
NPM_VERSION = "10.8.2"
|
||||
# toml-docs-end netlify
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "npm run build:example -- -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "npm run build:example -- -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[dev]
|
||||
framework = "#custom"
|
||||
command = "npm run start:example"
|
||||
targetPort = 1313
|
||||
port = 8888
|
||||
publish = "public"
|
||||
autoLaunch = false
|
||||
|
||||
# toml-docs-start plugins
|
||||
[[plugins]]
|
||||
package = "@gethinode/netlify-plugin-dartsass"
|
||||
|
||||
[[plugins]]
|
||||
package = "netlify-plugin-hugo-cache-resources"
|
||||
# toml-docs-end plugins
|
41
data/server.toml
Normal file
41
data/server.toml
Normal file
@@ -0,0 +1,41 @@
|
||||
# toml-docs-start server-config
|
||||
[[headers]]
|
||||
for = "/**"
|
||||
[headers.values]
|
||||
Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
|
||||
X-Content-Type-Options = "nosniff"
|
||||
X-XSS-Protection = "1; mode=block"
|
||||
X-Frame-Options = "SAMEORIGIN"
|
||||
Referrer-Policy = "strict-origin"
|
||||
Permissions-Policy = """\
|
||||
geolocation=(), \
|
||||
midi=(), \
|
||||
sync-xhr=(), \
|
||||
microphone=(), \
|
||||
camera=(), \
|
||||
magnetometer=(), \
|
||||
gyroscope=(), \
|
||||
fullscreen=(), \
|
||||
payment=() \
|
||||
"""
|
||||
cache-control = """\
|
||||
max-age=0, \
|
||||
no-cache, \
|
||||
no-store, \
|
||||
must-revalidate \
|
||||
"""
|
||||
Access-Control-Allow-Origin = "*"
|
||||
Content-Security-Policy = """\
|
||||
default-src 'none'; \
|
||||
script-src 'self'; \
|
||||
font-src 'self'; \
|
||||
connect-src 'self'; \
|
||||
img-src 'self'; \
|
||||
style-src 'self'; \
|
||||
base-uri 'self'; \
|
||||
object-src 'none'; \
|
||||
form-action 'self'; \
|
||||
manifest-src 'self'; \
|
||||
media-src 'self' \
|
||||
"""
|
||||
# toml-docs-end server-config
|
@@ -96,12 +96,14 @@ arguments:
|
||||
screens.
|
||||
wrapper:
|
||||
type: string
|
||||
default: p-0
|
||||
optional: true
|
||||
comment: >-
|
||||
Class attributes of the wrapper element, e.g. `p-4 px-xxl-0`.
|
||||
responsive:
|
||||
type: bool
|
||||
optional: true
|
||||
default: true
|
||||
comment: >-
|
||||
Flag indicating if the number of columns should be responsive, defaults to
|
||||
`true`.
|
||||
@@ -132,5 +134,33 @@ arguments:
|
||||
hook:
|
||||
type: string
|
||||
optional: true
|
||||
default: assets/card.html
|
||||
comment: Render hook for the card partial.
|
||||
group: partial
|
||||
bento:
|
||||
type: bool
|
||||
optional: true
|
||||
default: false
|
||||
comment: >-
|
||||
Trigger to use a bento-style layout instead of default grid layout.
|
||||
release: v0.27.0
|
||||
valign:
|
||||
type: select
|
||||
optional: true
|
||||
comment: >-
|
||||
Defines the vertical card alignment, only applicable in bento layout.
|
||||
release: v0.27.0
|
||||
options:
|
||||
values:
|
||||
- start
|
||||
- center
|
||||
- end
|
||||
styles:
|
||||
type:
|
||||
- '[]map[string]interface {}'
|
||||
optional: true
|
||||
comment: >-
|
||||
Styles to apply to the individual cards. Supported elements are `ratio`,
|
||||
`orientation`, `portrait`, and `width`. The styles are rotated when the
|
||||
amount of cards exceeds the available amount of styles.
|
||||
release: v0.27.0
|
||||
|
@@ -101,6 +101,7 @@ arguments:
|
||||
options:
|
||||
values:
|
||||
- full
|
||||
- title
|
||||
- none
|
||||
footer:
|
||||
type: select
|
||||
@@ -227,6 +228,7 @@ arguments:
|
||||
- stacked
|
||||
- horizontal
|
||||
- horizontal-sm
|
||||
- overlay
|
||||
- none
|
||||
subtle:
|
||||
type: bool
|
||||
|
@@ -112,7 +112,8 @@ arguments:
|
||||
title:
|
||||
type:
|
||||
- string
|
||||
- 'hstring.RenderedString'
|
||||
- hstring.RenderedString
|
||||
- hstring.HTML
|
||||
optional: true
|
||||
comment: Alternate text of the image.
|
||||
caption:
|
||||
|
@@ -72,6 +72,7 @@ arguments:
|
||||
- string
|
||||
- template.HTML
|
||||
- hstring.RenderedString
|
||||
- hstring.HTML
|
||||
optional: true
|
||||
group: partial
|
||||
comment: Link description.
|
||||
|
46
data/structures/script.yml
Normal file
46
data/structures/script.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
comment: >-
|
||||
Includes a reference to a local or external JavaScript file. Hinode uses the
|
||||
template defined in `layouts/partials/templates/script.html` to generate the
|
||||
link to a (bundled) JavaScript file. It includes context such as the state,
|
||||
category, and integrity. For example, you can adapt this template to implement
|
||||
cookie consent management.
|
||||
arguments:
|
||||
link:
|
||||
type: string
|
||||
optional: false
|
||||
comment: >-
|
||||
Location of the script source, either an URL for an external script or a
|
||||
(relative) path for a local script.
|
||||
state:
|
||||
type: select
|
||||
optional: true
|
||||
comment: >-
|
||||
Defines the loading behavior of the script bundle. By default, scripts are
|
||||
loaded immediately. Use `async` to process the script in the background.
|
||||
Use `defer` to load the script in relative order when the DOM is fully
|
||||
built.
|
||||
options:
|
||||
values:
|
||||
- async
|
||||
- defer
|
||||
- immediate
|
||||
category:
|
||||
type: select
|
||||
optional: true
|
||||
default: other
|
||||
comment: >-
|
||||
Assigns the script to a category that can be used for cookie consent
|
||||
management.
|
||||
options:
|
||||
values:
|
||||
- necessary
|
||||
- functional
|
||||
- analytics
|
||||
- performance
|
||||
- advertisement
|
||||
- other
|
||||
integrity:
|
||||
type: string
|
||||
optional: true
|
||||
comment: >-
|
||||
Cryptographic hash of the script to enable Subresource Integrity (SRI).
|
@@ -8,62 +8,17 @@ arguments:
|
||||
- '*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:
|
||||
type: select
|
||||
default: core
|
||||
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
|
||||
Type of script bundle. Critical scripts are included in the page header
|
||||
and are loaded immediately. Core scripts are bundled by category and are
|
||||
loaded asynchronously. Optional scripts are loaded individually on the
|
||||
pages that require them. They use the synchronization method as defined
|
||||
in their containing module.
|
||||
values:
|
||||
- critical
|
||||
- core
|
||||
- optional
|
90
data/structures/video.yml
Normal file
90
data/structures/video.yml
Normal file
@@ -0,0 +1,90 @@
|
||||
comment: >-
|
||||
Embeds a responsive video player for supported video providers. The video is
|
||||
embedded in a responsive frame.
|
||||
arguments:
|
||||
page:
|
||||
type:
|
||||
- '*hugolib.pageState'
|
||||
- '*hugolib.pageForShortcode'
|
||||
optional: false
|
||||
group: partial
|
||||
release: v0.26.5
|
||||
comment: Context of the current page.
|
||||
position:
|
||||
type:
|
||||
- 'text.Position'
|
||||
optional: true
|
||||
group: partial
|
||||
release: v0.26.5
|
||||
comment: Filename and position from which the shortcode was called.
|
||||
host:
|
||||
type: string
|
||||
optional: true
|
||||
default: youtube
|
||||
release: v0.26.5
|
||||
comment: >-
|
||||
Host name of the video provider. It should match one of the registered
|
||||
providers in the site's parameters under `videos`.
|
||||
title:
|
||||
type: string
|
||||
optional: true
|
||||
comment: >-
|
||||
Title of the video. You can also set `autotitle` to retrieve the title
|
||||
programmatically at build time, if supported by the provider.
|
||||
class:
|
||||
type: string
|
||||
optional: true
|
||||
position: 1
|
||||
comment: >-
|
||||
Class attribute of the video wrapper element.
|
||||
id:
|
||||
type: string
|
||||
optional: false
|
||||
position: 0
|
||||
comment: Public ID of the video to be embedded.
|
||||
account:
|
||||
type: string
|
||||
optional: true
|
||||
comment: >-
|
||||
Account name of the video asset, required by some digital asset managers.
|
||||
You can also set the default account name in the site's parameters.
|
||||
release: v0.26.5
|
||||
autoplay:
|
||||
type: bool
|
||||
optional: true
|
||||
default: false
|
||||
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, if supported by the
|
||||
provider.
|
||||
ratio:
|
||||
type: select
|
||||
optional: true
|
||||
comment: >-
|
||||
Ratio of the video. If set, determines the padding of the embedded video
|
||||
frame. When not specified, the video dimensions used to calculate the
|
||||
padding are retrieved programmatically.
|
||||
options:
|
||||
values:
|
||||
- 1x1
|
||||
- 3x2
|
||||
- 4x3
|
||||
- 16x9
|
||||
- 21x9
|
||||
release: v0.26.5
|
||||
portrait:
|
||||
type: bool
|
||||
optional: true
|
||||
default: false
|
||||
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.
|
||||
release: v0.26.5
|
@@ -1,35 +0,0 @@
|
||||
comment: >-
|
||||
Embeds a responsive video player for YouTube videos. Only the ID of the video
|
||||
is required. In privacy-enhanced mode, YouTube will not store information
|
||||
about visitors on your website unless the user plays the embedded video.
|
||||
arguments:
|
||||
title:
|
||||
type: string
|
||||
optional: true
|
||||
comment: >-
|
||||
Title of the video.
|
||||
class:
|
||||
type: string
|
||||
optional: true
|
||||
position: 1
|
||||
comment: >-
|
||||
Class attribute of the video wrapper element.
|
||||
id:
|
||||
type: string
|
||||
optional: false
|
||||
position: 0
|
||||
comment: Identifier of the video to be embedded.
|
||||
autoplay:
|
||||
type: bool
|
||||
optional: true
|
||||
default: false
|
||||
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.
|
14
eslint.config.js
Normal file
14
eslint.config.js
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = require('neostandard')({
|
||||
ignores: [
|
||||
'assets/js/critical/languageSelector.js',
|
||||
'assets/js/critical/color.js',
|
||||
'assets/js/analytics.js',
|
||||
'assets/js/flexsearch.js',
|
||||
'assets/js/navbar.js',
|
||||
'assets/js/sharing.js',
|
||||
'assets/js/vendor',
|
||||
'node_modules',
|
||||
]
|
||||
})
|
@@ -1,7 +1,6 @@
|
||||
resourcedir = '../resources/'
|
||||
title = "Hinode"
|
||||
copyright = "Copyright © 2024 Mark Dumay."
|
||||
paginate = 9
|
||||
enableGitInfo = true
|
||||
|
||||
# additional settings
|
||||
@@ -21,17 +20,39 @@ languageCode = "en-us"
|
||||
defaultContentLanguage = "en"
|
||||
defaultContentLanguageInSubdir = true
|
||||
|
||||
[outputFormats.REDIR]
|
||||
mediaType = "text/netlify"
|
||||
baseName = "_redirects"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
[outputFormats]
|
||||
[outputFormats.netlify]
|
||||
mediaType = "application/toml"
|
||||
baseName = "netlify"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
permalinkable = true
|
||||
root = true
|
||||
[outputFormats.server]
|
||||
mediaType = "application/toml"
|
||||
baseName = "server"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
permalinkable = true
|
||||
root = true
|
||||
[outputFormats.XML]
|
||||
isPlainText = false
|
||||
mediaType = "application/xml"
|
||||
isHtml = false
|
||||
noUgly = true
|
||||
permalinkable = false
|
||||
name = "xml"
|
||||
[outputFormats.REDIR]
|
||||
mediaType = "text/netlify"
|
||||
baseName = "_redirects"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
|
||||
[mediaTypes."text/netlify"]
|
||||
delimiter = ""
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "REDIR"]
|
||||
home = ["HTML", "RSS", "REDIR", "netlify", "server"]
|
||||
|
||||
[build]
|
||||
writeStats = true
|
||||
@@ -39,6 +60,9 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[taxonomies]
|
||||
tag = 'tags'
|
||||
|
||||
[pagination]
|
||||
pagerSize = 9
|
||||
|
||||
[privacy]
|
||||
[privacy.vimeo]
|
||||
disabled = false
|
||||
@@ -65,15 +89,6 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[services.googleAnalytics]
|
||||
ID = "G-T85PPZ36GN"
|
||||
|
||||
[outputFormats]
|
||||
[outputFormats.XML]
|
||||
isPlainText = false
|
||||
mediaType = "application/xml"
|
||||
isHtml = false
|
||||
noUgly = true
|
||||
permalinkable = false
|
||||
name = "xml"
|
||||
|
||||
[minify]
|
||||
[minify.tdewolff.js]
|
||||
keepVarNames = true
|
||||
@@ -82,8 +97,36 @@ home = ["HTML", "RSS", "REDIR"]
|
||||
[minify.tdewolff.html]
|
||||
keepWhitespace = true
|
||||
|
||||
[segments]
|
||||
[segments.headers]
|
||||
[[segments.headers.includes]]
|
||||
kind = '{home}'
|
||||
output = '{netlify,server}'
|
||||
|
||||
[module]
|
||||
# Build and serve using local hinode clone declared in the named Hugo workspace:
|
||||
workspace = "hinode.work"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-cookieyes/v2"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/hinode"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-bootstrap"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-csp"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-flexsearch/v2"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-fontawesome"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-google-analytics"
|
||||
[[module.imports]]
|
||||
path = "github.com/gethinode/mod-katex"
|
||||
[[module.imports]]
|
||||
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"
|
||||
|
@@ -11,7 +11,7 @@ tagline = "A Hugo Theme"
|
||||
title = "Follow me"
|
||||
caption = "I work on everything coding and tweet developer memes"
|
||||
[en.params.footer]
|
||||
# license = "Licensed under Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank' rel='noopener noreferrer'>CC BY-NC-SA 4.0</a>)."
|
||||
# license = "Licensed under Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank' rel='noopener noreferrer nofollow'>CC BY-NC-SA 4.0</a>)."
|
||||
# toml-docs-end lang-param
|
||||
[en.params.sections.blog]
|
||||
reference = "More Posts"
|
||||
@@ -30,7 +30,7 @@ tagline = "Een Hugo Thema"
|
||||
title = "Volg mij"
|
||||
caption = "Ik doe aan programmeren en tweet memes"
|
||||
[nl.params.footer]
|
||||
# license = "Gelicenseerd onder Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank' rel='noopener noreferrer'>CC BY-NC-SA 4.0</a>)."
|
||||
# license = "Gelicenseerd onder Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank' rel='noopener noreferrer nofollow'>CC BY-NC-SA 4.0</a>)."
|
||||
[nl.params.sections.blog]
|
||||
reference = "Meer artikelen"
|
||||
[nl.params.sections.projects]
|
||||
@@ -49,7 +49,7 @@ tagline = "Un thème Hugo"
|
||||
title = "Suivez-moi"
|
||||
caption = "Je code et je tweet des mèmes de développeurs."
|
||||
[fr.params.footer]
|
||||
# license = "Gelicenseerd onder Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank' rel='noopener noreferrer'>CC BY-NC-SA 4.0</a>)."
|
||||
# license = "Gelicenseerd onder Creative Commons (<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/' class='link-secondary' target='_blank' rel='noopener noreferrer nofollow'>CC BY-NC-SA 4.0</a>)."
|
||||
[fr.params.sections.blog]
|
||||
reference = "Plus d'articles"
|
||||
[fr.params.sections.projects]
|
||||
|
19
exampleSite/config/_default/netlify.toml
Normal file
19
exampleSite/config/_default/netlify.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[[redirects]]
|
||||
from = '/fr/*'
|
||||
to = '/fr/404.html'
|
||||
status = 404
|
||||
|
||||
[[redirects]]
|
||||
from = '/nl/*'
|
||||
to = '/nl/404.html'
|
||||
status = 404
|
||||
|
||||
[[redirects]]
|
||||
from = '/en/*'
|
||||
to = '/en/404.html'
|
||||
status = 404
|
||||
|
||||
[[redirects]] # Default language should be last.
|
||||
from = '/*'
|
||||
to = '/en/404.html'
|
||||
status = 404
|
@@ -8,6 +8,8 @@
|
||||
footerBelowFold = false
|
||||
loading = "lazy"
|
||||
breakpoint = "md"
|
||||
[main.internalLinks]
|
||||
validate = true
|
||||
[main.externalLinks]
|
||||
cue = true
|
||||
tab = true
|
||||
@@ -191,3 +193,6 @@
|
||||
observatory = "https://observatory.mozilla.org/analyze/demo.gethinode.com"
|
||||
pagespeed = "https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F"
|
||||
hinode = "https://gethinode.com"
|
||||
|
||||
[modules.cookieyes]
|
||||
url = "https://cdn-cookieyes.com/client_data/a54b5553f349dd13bd225f8e/script.js"
|
||||
|
@@ -1,42 +1,49 @@
|
||||
# toml-docs-start server-config
|
||||
# Auto-generated file - do not modify
|
||||
|
||||
[[headers]]
|
||||
for = '/**'
|
||||
[headers.values]
|
||||
Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
|
||||
X-Content-Type-Options = "nosniff"
|
||||
X-XSS-Protection = "1; mode=block"
|
||||
Content-Security-Policy = """\
|
||||
default-src 'self'; \
|
||||
script-src 'self' https://*.google-analytics.com https://*.googletagmanager.com; \
|
||||
style-src 'self' https://fonts.googleapis.com https://www.youtube.com; \
|
||||
object-src 'none'; \
|
||||
for = '/**'
|
||||
|
||||
[headers.values]
|
||||
Access-Control-Allow-Origin = '*'
|
||||
Content-Security-Policy = """
|
||||
base-uri 'self'; \
|
||||
connect-src 'self'
|
||||
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://*.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; \
|
||||
connect-src 'self' *.cookieyes.com cdn-cookieyes.com *.google-analytics.com *.analytics.google.com *.googletagmanager.com; \
|
||||
default-src 'none'; \
|
||||
font-src 'self' fonts.gstatic.com; \
|
||||
form-action 'self'; \
|
||||
frame-src player.cloudinary.com www.youtube-nocookie.com www.youtube.com player.vimeo.com; \
|
||||
img-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.ytimg.com tile.openstreetmap.org i.vimeocdn.com; \
|
||||
manifest-src 'self'; \
|
||||
media-src 'self' \
|
||||
media-src 'self'; \
|
||||
object-src 'none'; \
|
||||
script-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com player.vimeo.com; \
|
||||
style-src 'self' 'unsafe-inline' www.youtube.com; \
|
||||
"""
|
||||
X-Frame-Options = "SAMEORIGIN"
|
||||
Referrer-Policy = "strict-origin"
|
||||
Permissions-Policy = """\
|
||||
geolocation=(), \
|
||||
midi=(), \
|
||||
sync-xhr=(), \
|
||||
microphone=(), \
|
||||
camera=(), \
|
||||
magnetometer=(), \
|
||||
gyroscope=(), \
|
||||
fullscreen=(), \
|
||||
payment=() \
|
||||
"""
|
||||
cache-control = """\
|
||||
max-age=0, \
|
||||
no-cache, \
|
||||
no-store, \
|
||||
must-revalidate \
|
||||
"""
|
||||
Access-Control-Allow-Origin = "*"
|
||||
# toml-docs-end server-config
|
||||
Permissions-Policy = 'geolocation=(), midi=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), fullscreen=(), payment=() '
|
||||
Referrer-Policy = 'strict-origin'
|
||||
Strict-Transport-Security = 'max-age=31536000; includeSubDomains; preload'
|
||||
X-Content-Type-Options = 'nosniff'
|
||||
X-Frame-Options = 'SAMEORIGIN'
|
||||
X-XSS-Protection = '1; mode=block'
|
||||
cache-control = 'max-age=0, no-cache, no-store, must-revalidate '
|
||||
|
||||
[[redirects]]
|
||||
from = '/fr/*'
|
||||
status = 404
|
||||
to = '/fr/404.html'
|
||||
|
||||
[[redirects]]
|
||||
from = '/nl/*'
|
||||
status = 404
|
||||
to = '/nl/404.html'
|
||||
|
||||
[[redirects]]
|
||||
from = '/en/*'
|
||||
status = 404
|
||||
to = '/en/404.html'
|
||||
|
||||
[[redirects]]
|
||||
from = '/*'
|
||||
status = 404
|
||||
to = '/en/404.html'
|
||||
|
||||
|
@@ -10,7 +10,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
|
||||
return [...(els.tags || []), ...(els.classes || []), ...(els.ids || [])]
|
||||
},
|
||||
dynamicAttributes: ['data-bs-theme'],
|
||||
safelist: [
|
||||
safelist: ['was-validated',
|
||||
...whitelister([
|
||||
'./_vendor/github.com/gethinode/hinode/assets/scss/components/_clipboard.scss',
|
||||
'./_vendor/github.com/gethinode/hinode/assets/scss/components/_command.scss',
|
||||
@@ -24,6 +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',
|
||||
'./exampleSite/_vendor/github.com/gethinode/mod-cookieyes/v2/assets/scss/cookieyes.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',
|
||||
|
@@ -418,7 +418,7 @@ As an example, the following shortcode displays superscript text.
|
||||
|
||||
As an example, the following shortcode displays a responsive table.
|
||||
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
<!-- markdownlint-disable MD037 MD058 -->
|
||||
{{< example lang="markdown" >}}
|
||||
{{</* table */>}}
|
||||
| # | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading |
|
||||
@@ -428,7 +428,7 @@ As an example, the following shortcode displays a responsive table.
|
||||
| 3. | cell | cel | cel | cel | cel | cel | cel | cel | cel |
|
||||
{{</* /table */>}}
|
||||
{{< /example >}}
|
||||
<!-- markdownlint-enable MD037 -->
|
||||
<!-- markdownlint-enable MD037 MD058 -->
|
||||
|
||||
## Timeline
|
||||
|
||||
@@ -474,12 +474,12 @@ As an example, the following shortcode displays a tooltip for a colored hyperlin
|
||||
{{< /example >}}
|
||||
<!-- markdownlint-enable MD037 -->
|
||||
|
||||
## Youtube
|
||||
## Video
|
||||
|
||||
As an example, the following shortcode displays a Hugo quickstart guide.
|
||||
As an example, the following shortcode displays an Elephants video hosted by Cloudinary.
|
||||
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
{{< example lang="hugo" >}}
|
||||
{{</* youtube id="w7Ft2ymGmfc" autoplay=true autotitle=true */>}}
|
||||
{{</* video host="cloudinary" account="demo" id="elephants" autoplay=true */>}}
|
||||
{{< /example >}}
|
||||
<!-- markdownlint-enable MD037 -->
|
||||
|
@@ -29,7 +29,7 @@ As an example, the following shortcode shows an animation that plays on hover.
|
||||
|
||||
As an example, the following shortcode displays a responsive table that uses advanced controls.
|
||||
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
<!-- markdownlint-disable MD037 MD058 -->
|
||||
{{< example lang="markdown" >}}
|
||||
{{</* table sortable="true" paging="true" searchable="true" */>}}
|
||||
| # | Heading |
|
||||
|
@@ -14,7 +14,7 @@ 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"
|
||||
{{</* image src="https://res.cloudinary.com/demo/dog.webp"
|
||||
ratio="21x9" caption="Cloudinary image" class="rounded" plain=true */>}}
|
||||
{{< /example >}}
|
||||
<!-- markdownlint-enable MD037 -->
|
||||
|
44
exampleSite/content/en/cookies.md
Normal file
44
exampleSite/content/en/cookies.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Cookie Policy
|
||||
description: Cookie policy of gethinode.com
|
||||
date: 2024-09-19
|
||||
layout: docs
|
||||
---
|
||||
<!-- markdownlint-disable MD036 -->
|
||||
*Effective Date 19-Sep-2024*
|
||||
|
||||
## What are cookies?
|
||||
|
||||
This Cookie Policy explains what cookies are and how we use them, the types of cookies we use i.e, the information we collect using cookies and how that information is used, and how to manage the cookie settings.
|
||||
|
||||
Cookies are small text files that are used to store small pieces of information. They are stored on your device when the website is loaded on your browser. These cookies help us make the website function properly, make it more secure, provide better user experience, and understand how the website performs and to analyze what works and where it needs improvement.
|
||||
|
||||
## How do we use cookies?
|
||||
|
||||
As most of the online services, our website uses first-party and third-party cookies for several purposes. First-party cookies are mostly necessary for the website to function the right way, and they do not collect any of your personally identifiable data.
|
||||
|
||||
The third-party cookies used on our website are mainly for understanding how the website performs, how you interact with our website, keeping our services secure, providing advertisements that are relevant to you, and all in all providing you with a better and improved user experience and help speed up your future interactions with our website.
|
||||
|
||||
## Types of Cookies we use
|
||||
|
||||
{{< cky-audit >}}
|
||||
|
||||
## Manage cookie preferences
|
||||
|
||||
{{< cky-banner >}}
|
||||
|
||||
You can change your cookie preferences any time by clicking the above button. This will let you revisit the cookie consent banner and change your preferences or withdraw your consent right away.
|
||||
|
||||
In addition to this, different browsers provide different methods to block and delete cookies used by websites. You can change the settings of your browser to block/delete the cookies. Listed below are the links to the support documents on how to manage and delete cookies from the major web browsers.
|
||||
|
||||
Chrome: https://support.google.com/accounts/answer/32050
|
||||
|
||||
Safari: https://support.apple.com/en-in/guide/safari/sfri11471/mac
|
||||
|
||||
Firefox: https://support.mozilla.org/en-US/kb/clear-cookies-and-site-data-firefox?redirectslug=delete-cookies-remove-info-websites-stored&redirectlocale=en-US
|
||||
|
||||
Internet Explorer: https://support.microsoft.com/en-us/topic/how-to-delete-cookie-files-in-internet-explorer-bca9446f-d873-78de-77ba-d42645fa52fc
|
||||
|
||||
If you are using any other web browser, please visit your browser’s official support documents.
|
||||
|
||||
*Cookie Policy generated by {{< link "https://www.cookieyes.com" >}}CookieYes - Cookie Policy Generator{{< /link >}}.*
|
47
exampleSite/content/en/privacy.md
Normal file
47
exampleSite/content/en/privacy.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Privacy Policy
|
||||
description: Privacy policy of gethinode.com
|
||||
date: 2024-09-19
|
||||
layout: docs
|
||||
---
|
||||
<!-- markdownlint-disable MD036 -->
|
||||
*Effective Date 19-Sep-2024*
|
||||
|
||||
This Privacy Policy describes the policies of gethinode.com on the collection, use and disclosure of your information that we collect when you use our website (https://gethinode.com, referred to as the “Service”). By accessing or using the Service, you are consenting to the collection, use and disclosure of your information in accordance with this Privacy Policy. If you do not consent to the same, please do not access or use the Service.
|
||||
|
||||
We may modify this Privacy Policy at any time without any prior notice to you and will post the revised Privacy Policy on the Service. The revised Policy will be effective 180 days from when the revised Policy is posted in the Service and your continued access or use of the Service after such time will constitute your acceptance of the revised Privacy Policy. We therefore recommend that you periodically review this page.
|
||||
|
||||
## How we share your information
|
||||
|
||||
We will not transfer your personal information to any third party without seeking your consent, except in limited circumstances as described
|
||||
below:
|
||||
|
||||
- Analytics
|
||||
|
||||
We require such third party’s to use the personal information we transfer to them only for the purpose for which it was transferred and not to retain it for longer than is required for fulfilling the said purpose.
|
||||
|
||||
We may also disclose your personal information for the following: (1) to comply with applicable law, regulation, court order or other legal process; (2) to enforce your agreements with us, including this Privacy Policy; or (3) to respond to claims that your use of the Service violates any third-party rights. If the Service or our company is merged or acquired with another company, your information will be one of the assets that is transferred to the new owner.
|
||||
|
||||
## Your rights
|
||||
|
||||
Depending on the law that applies, you may have a right to access and rectify or erase your personal data or receive a copy of your personal data, restrict or object to the active processing of your data, ask us to share (port) your personal information to another entity,withdraw any consent you provided to us to process your data, a right to lodge a complaint with a statutory authority and such other rights as may be relevant under applicable laws. <!-- To exercise these rights, you can write to us at privacy@gethinode.com. We will respond to your request in accordance with applicable law. -->
|
||||
|
||||
Do note that if you do not allow us to collect or process the required personal information or withdraw the consent to process the same for the required purposes, you may not be able to access or use the services for which your information was sought.
|
||||
|
||||
## Cookies etc.
|
||||
|
||||
To learn more about how we use these and your choices in relation to these tracking technologies, please refer to our {{< link "cookies" >}}Cookie Policy/Settings{{< /link >}}.
|
||||
|
||||
## Security
|
||||
|
||||
The security of your information is important to us and we will use reasonable security measures to prevent the loss, misuse or unauthorized alteration of your information under our control. However, given the inherent risks, we cannot guarantee absolute security and consequently, we cannot ensure or warrant the security of any information you transmit to us and you do so at your own risk.
|
||||
|
||||
## Third party links & use of your information
|
||||
|
||||
Our Service may contain links to other websites that are not operated by us. This Privacy Policy does not address the privacy policy and other practices of any third parties, including any third party operating any website or service that may be accessible via a link on the Service. We strongly advise you to review the privacy policy of every site you visit. We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.
|
||||
|
||||
<!-- ## Grievance / Data Protection Officer
|
||||
|
||||
If you have any queries or concerns about the processing of your information that is available with us, you may email us at privacy@gethinode.com. We will address your concerns in accordance with applicable law. -->
|
||||
|
||||
*Privacy Policy generated with {{< link "https://www.cookieyes.com" >}}CookieYes{{< /link >}}.*
|
63
exampleSite/data/server.toml
Normal file
63
exampleSite/data/server.toml
Normal file
@@ -0,0 +1,63 @@
|
||||
# toml-docs-start server-config
|
||||
[[headers]]
|
||||
for = "/**"
|
||||
[headers.values]
|
||||
Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
|
||||
X-Content-Type-Options = "nosniff"
|
||||
X-XSS-Protection = "1; mode=block"
|
||||
X-Frame-Options = "SAMEORIGIN"
|
||||
Referrer-Policy = "strict-origin"
|
||||
Permissions-Policy = """\
|
||||
geolocation=(), \
|
||||
midi=(), \
|
||||
sync-xhr=(), \
|
||||
microphone=(), \
|
||||
camera=(), \
|
||||
magnetometer=(), \
|
||||
gyroscope=(), \
|
||||
fullscreen=(), \
|
||||
payment=() \
|
||||
"""
|
||||
cache-control = """\
|
||||
max-age=0, \
|
||||
no-cache, \
|
||||
no-store, \
|
||||
must-revalidate \
|
||||
"""
|
||||
Access-Control-Allow-Origin = "*"
|
||||
Content-Security-Policy = """\
|
||||
default-src 'none'; \
|
||||
script-src 'self'; \
|
||||
font-src 'self'; \
|
||||
connect-src 'self'; \
|
||||
img-src 'self'; \
|
||||
style-src 'self'; \
|
||||
base-uri 'self'; \
|
||||
object-src 'none'; \
|
||||
form-action 'self'; \
|
||||
manifest-src 'self'; \
|
||||
media-src 'self' \
|
||||
"""
|
||||
# toml-docs-end server-config
|
||||
|
||||
# toml-docs-start server-custom-404
|
||||
[[redirects]]
|
||||
from = '/fr/*'
|
||||
to = '/fr/404.html'
|
||||
status = 404
|
||||
|
||||
[[redirects]]
|
||||
from = '/nl/*'
|
||||
to = '/nl/404.html'
|
||||
status = 404
|
||||
|
||||
[[redirects]]
|
||||
from = '/en/*'
|
||||
to = '/en/404.html'
|
||||
status = 404
|
||||
|
||||
[[redirects]] # Default language should be last.
|
||||
from = '/*'
|
||||
to = '/en/404.html'
|
||||
status = 404
|
||||
# toml-docs-end server-custom-404
|
@@ -2,3 +2,6 @@ module github.com/gethinode/hinode/exampleSite
|
||||
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/gethinode/mod-cookieyes/v2 v2.2.2 // indirect
|
||||
)
|
||||
|
@@ -1,14 +1,2 @@
|
||||
github.com/gethinode/hinode v0.22.5 h1:zpjSDgWQVbq4BjPduxwexQB18gawFeinzPkaRRTs2Tg=
|
||||
github.com/gethinode/hinode v0.22.5/go.mod h1:hsskrlBRnTbpCjrDtGbK8C1VYGML7ezHtCDGDiYL2mQ=
|
||||
github.com/gethinode/mod-bootstrap v1.2.2 h1:Q8E04OKWr9owk7nhQ/NBukUgSFhsECxZsOLEaf5oeiQ=
|
||||
github.com/gethinode/mod-bootstrap v1.2.2/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
|
||||
github.com/gethinode/mod-flexsearch v1.9.0 h1:AE+w7QeZTxh36JNTG+CASDLxaqlCZKn+EUD6ulnPGak=
|
||||
github.com/gethinode/mod-flexsearch v1.9.0/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
|
||||
github.com/gethinode/mod-fontawesome v1.8.1 h1:iyvULrpaGizQoI5Vl9WjFYcMGWefdyG90NGK2UKax+k=
|
||||
github.com/gethinode/mod-fontawesome v1.8.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
||||
github.com/gethinode/mod-katex v1.0.5 h1:AVhcTINYory0ygChQERf8PcyJkbT1oqhmLRF6ESnWOY=
|
||||
github.com/gethinode/mod-katex v1.0.5/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||
github.com/gethinode/mod-leaflet v1.0.0 h1:HdnWafOGkkK1hYGfqLYF3pp9dAFS/caxlzML9sO1rCc=
|
||||
github.com/gethinode/mod-leaflet v1.0.0/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
|
||||
github.com/gethinode/mod-lottie v1.4.3 h1:IKZO8a4yQyPKUwZ6POsZRIH/B++yEzXDe5HxrFF79KA=
|
||||
github.com/gethinode/mod-lottie v1.4.3/go.mod h1:nt4wLnDFIhjBGRMuQJJ2bH80VREpbcsBUsdO6uWXjLs=
|
||||
github.com/gethinode/mod-cookieyes/v2 v2.2.2 h1:VNIdbZnzXw/0Jito/IcDNqQ9yRYLCGrDwyrMqtSJgE4=
|
||||
github.com/gethinode/mod-cookieyes/v2 v2.2.2/go.mod h1:tULb7D7CoTycGUyL7ryqHJKaX11XuL2SN+XwP7/DI0Y=
|
||||
|
@@ -1,18 +1,9 @@
|
||||
github.com/airbnb/lottie-web v5.12.2+incompatible h1:Ldogtlhiucf7mMsgisyxSBY0qunV44+lpa9Icy2KoQc=
|
||||
github.com/airbnb/lottie-web v5.12.2+incompatible/go.mod h1:nTss557UK9FGnp8QYlCMO29tjUHwbdAHG/DprbGfHGE=
|
||||
github.com/gethinode/hinode v0.22.5 h1:zpjSDgWQVbq4BjPduxwexQB18gawFeinzPkaRRTs2Tg=
|
||||
github.com/gethinode/hinode v0.22.5/go.mod h1:hsskrlBRnTbpCjrDtGbK8C1VYGML7ezHtCDGDiYL2mQ=
|
||||
github.com/gethinode/mod-flexsearch v1.8.1 h1:xwPvmmxd8Tdyxp8/rnd9KRGqIDtZs/YwAQJ1i9oQMiM=
|
||||
github.com/gethinode/mod-flexsearch v1.8.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
|
||||
github.com/gethinode/mod-fontawesome v1.8.0 h1:YEuCmvCdzcemF1eFK35Wnp1asKKO3/xbxGArnjq6PRY=
|
||||
github.com/gethinode/mod-fontawesome v1.8.0/go.mod h1:uvuC2YL8mdXNp6NRzFOu4TWsHvtY9AZ8YxJkF23/M/8=
|
||||
github.com/gethinode/mod-leaflet v0.4.0 h1:Xc6c1UTf4m1saQLFfFWT5sEpwj25xVGuS8csGC82UUI=
|
||||
github.com/gethinode/mod-leaflet v0.4.0/go.mod h1:yr+bUKAstifdB16mbYh69OayAmgPOlNUubAmVn5eL2M=
|
||||
github.com/gethinode/mod-lottie v1.4.1 h1:RzCjYsxFPqyBsYAcdPeUP0rvF+hD9eEl7NrxuaRiKQQ=
|
||||
github.com/gethinode/mod-lottie v1.4.1/go.mod h1:QjKlEmYbekrNGwa9EdFlPcXxwWWcraJUQ6xIL+syA60=
|
||||
github.com/gethinode/mod-utils v1.0.2 h1:0b3i+/bBHY1Td9N6khDbL1nf3d5HGc4QzI4BbEWHoU4=
|
||||
github.com/gethinode/mod-utils v1.0.2/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
|
||||
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/twbs/bootstrap v5.3.2+incompatible h1:tuiO5acc6xnZUR77Sbi5aKWXxjYxbmsSbJwYrhAKoQQ=
|
||||
github.com/twbs/bootstrap v5.3.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
|
||||
github.com/gethinode/mod-cookieyes v1.0.2 h1:WL9sjpYKjkV+jRKIrm6H82UpthQjFksvKGptW6HD/QU=
|
||||
github.com/gethinode/mod-cookieyes v1.0.2/go.mod h1:VrBUKm5apop6KIb+R8eRqvlf3AAPnv5aMajL0RorIjY=
|
||||
github.com/gethinode/mod-cookieyes/v2 v2.0.3 h1:o5PAAOjx8baRcSkhTAQuZ+hX9cK8oWjeC3sYxt1DT2c=
|
||||
github.com/gethinode/mod-cookieyes/v2 v2.0.4 h1:QgYSD3S23351e7xEeQb+Mon+e+I6RbnnrTyvpxBST1A=
|
||||
github.com/gethinode/mod-cookieyes/v2 v2.0.4/go.mod h1:tULb7D7CoTycGUyL7ryqHJKaX11XuL2SN+XwP7/DI0Y=
|
||||
github.com/gethinode/mod-cookieyes/v2 v2.1.2 h1:hzGCbRbpNAVkLr+jFWpAQaXHG0lgK+KgIpaZYsI1J+U=
|
||||
github.com/gethinode/mod-cookieyes/v2 v2.1.2/go.mod h1:tULb7D7CoTycGUyL7ryqHJKaX11XuL2SN+XwP7/DI0Y=
|
||||
|
@@ -142,6 +142,8 @@
|
||||
"carousel-item",
|
||||
"checkbox",
|
||||
"chroma",
|
||||
"cky-audit-table-element",
|
||||
"cky-banner-element",
|
||||
"col",
|
||||
"col-10",
|
||||
"col-12",
|
||||
@@ -237,6 +239,7 @@
|
||||
"fade",
|
||||
"fas",
|
||||
"figure-caption",
|
||||
"fixed-top",
|
||||
"flex-column",
|
||||
"flex-fill",
|
||||
"flex-grow-1",
|
||||
@@ -311,6 +314,7 @@
|
||||
"mt-4",
|
||||
"mt-5",
|
||||
"mt-auto",
|
||||
"mt-md-0",
|
||||
"multi-docs-collapse-15",
|
||||
"multi-file-collapse-1",
|
||||
"mx-auto",
|
||||
@@ -332,10 +336,10 @@
|
||||
"navbar-container",
|
||||
"navbar-contrast",
|
||||
"navbar-expand-md",
|
||||
"navbar-fixed-top",
|
||||
"navbar-mode-selector",
|
||||
"navbar-nav",
|
||||
"navbar-nav-scroll",
|
||||
"navbar-overlay",
|
||||
"navbar-title",
|
||||
"navbar-toggler",
|
||||
"next",
|
||||
@@ -471,11 +475,11 @@
|
||||
"top-bar",
|
||||
"translate-middle",
|
||||
"translate-middle-y",
|
||||
"video-embedded",
|
||||
"visually-hidden",
|
||||
"vr",
|
||||
"w-100",
|
||||
"w-50",
|
||||
"youtube-embedded"
|
||||
"w-50"
|
||||
],
|
||||
"ids": [
|
||||
"TableOfContents",
|
||||
@@ -499,7 +503,6 @@
|
||||
"body-file-collapse-1",
|
||||
"bouton",
|
||||
"breadcrumb",
|
||||
"btn-webshare",
|
||||
"button",
|
||||
"button-group",
|
||||
"card",
|
||||
@@ -513,6 +516,7 @@
|
||||
"collapse",
|
||||
"collapse-1",
|
||||
"command-prompt",
|
||||
"cookies-etc",
|
||||
"custom-activity",
|
||||
"data-tables",
|
||||
"docs",
|
||||
@@ -558,6 +562,8 @@
|
||||
"formule-katex",
|
||||
"groupe-de-boutons",
|
||||
"groupe-de-cartes",
|
||||
"how-do-we-use-cookies",
|
||||
"how-we-share-your-information",
|
||||
"icon",
|
||||
"image",
|
||||
"imagekitio",
|
||||
@@ -570,16 +576,17 @@
|
||||
"lien",
|
||||
"link",
|
||||
"lottie-animation-0",
|
||||
"manage-cookie-preferences",
|
||||
"map",
|
||||
"mark",
|
||||
"nav",
|
||||
"nav-0",
|
||||
"nav-0-0",
|
||||
"nav-0-1",
|
||||
"nav-0-2",
|
||||
"nav-0-btn-0",
|
||||
"nav-0-btn-1",
|
||||
"nav-0-btn-2",
|
||||
"nav-nav-0",
|
||||
"navbar",
|
||||
"navbar-0-collapse",
|
||||
"navbar-mode",
|
||||
@@ -594,10 +601,12 @@
|
||||
"publication",
|
||||
"release",
|
||||
"réduire",
|
||||
"security",
|
||||
"spinner",
|
||||
"sub",
|
||||
"sup",
|
||||
"table",
|
||||
"third-party-links--use-of-your-information",
|
||||
"timeline",
|
||||
"toast",
|
||||
"toast-container",
|
||||
@@ -607,7 +616,10 @@
|
||||
"toast-message-email-4",
|
||||
"toc-collapse",
|
||||
"tooltip",
|
||||
"youtube"
|
||||
"types-of-cookies-we-use",
|
||||
"video",
|
||||
"what-are-cookies",
|
||||
"your-rights"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
80
exampleSite/layouts/_default/baseof.html
Normal file
80
exampleSite/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,80 @@
|
||||
{{- /* Set version-aware sidebar menu */ -}}
|
||||
{{- $version := partial "utilities/GetVersion.html" (dict "page" . "base" true) -}}
|
||||
{{- $.Scratch.Set "version" $version -}}
|
||||
{{ with partial "utilities/GetMenu" (dict "page" . "version" $version) }}{{ $.Scratch.Set "sidebar" . }}{{ end }}
|
||||
|
||||
{{- /* Validate if current version is latest */ -}}
|
||||
{{- if and site.Params.docs.checkVersion $version -}}
|
||||
{{- if ne $version "latest" -}}
|
||||
{{- if partial "utilities/IsOlder" (dict "current" $version) -}}
|
||||
{{- $.Scratch.Set "pageAlertMsg" (T "newerVersionAlert" site.Title) -}}
|
||||
{{- $.Scratch.Set "pageAlertURL" (or site.Params.docs.latestURL site.baseURL) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Initialize module configuration */ -}}
|
||||
{{- $modules := partialCached "utilities/InitModules.html" . -}}
|
||||
{{- $.Scratch.Set "modules" $modules -}}
|
||||
|
||||
{{- $fullCover := or (or (and .IsHome .Site.Params.home.fullCover) .Page.Params.fullCover) .Site.Params.main.footerBelowFold }}
|
||||
{{- $.Scratch.Set "fullCover" $fullCover -}}
|
||||
|
||||
{{- /* Define section headings */ -}}
|
||||
{{- $loading := "" -}}
|
||||
{{- if $fullCover }}{{ $loading = .Site.Params.main.loading }}{{ end -}}
|
||||
{{ $sections := partial "utilities/GetSections.html" (dict "page" . "loading" $loading) }}
|
||||
{{- $.Scratch.Set "sections" $sections -}}
|
||||
|
||||
{{- /* Define main breakpoint */ -}}
|
||||
{{- $.Scratch.Set "breakpoint" (partialCached "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 "page" . "type" "critical") -}}
|
||||
{{ block "head" . }}{{ end -}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<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
|
||||
"page" .
|
||||
"fixed" site.Params.navigation.fixed
|
||||
"overlay" site.Params.navigation.overlay
|
||||
"overlayMode" site.Params.navigation.overlayMode
|
||||
"color" site.Params.navigation.color
|
||||
"style" (default "light" site.Params.navigation.style)
|
||||
"size" (default "md" site.Params.navigation.size))
|
||||
-}}
|
||||
<div class="main-content">
|
||||
{{ block "featured" . }}{{ end -}}
|
||||
</div>
|
||||
{{ if .Site.Params.main.footerBelowFold }}
|
||||
{{ block "main" . }}{{ end -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if not .Site.Params.main.footerBelowFold }}
|
||||
{{ block "main" . }}{{ end -}}
|
||||
{{- partial "footer/social.html" . -}}
|
||||
{{- partial "footer/footer.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Site.Params.main.footerBelowFold }}
|
||||
{{- partial "footer/social.html" . -}}
|
||||
{{- partial "footer/footer.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{- partial "footer/toast-container.html" . -}}
|
||||
{{- partial "assets/symbols.html" . -}}
|
||||
{{- partialCached "footer/scripts.html" (dict "page" .) -}}
|
||||
{{- partial "footer/scripts.html" (dict "page" . "type" "optional") -}}
|
||||
</body>
|
||||
</html>
|
15
exampleSite/layouts/partials/footer/footer.html
Normal file
15
exampleSite/layouts/partials/footer/footer.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<footer class="container-fluid footer text-center p-3">
|
||||
<div class="container-xxl text-center">
|
||||
<small>
|
||||
{{- $copyright := printf "%s © %s %s %s." (T "copyright") (dateFormat "2006" now) .Site.Title (T "rights") }}
|
||||
{{ cond (gt (len .Site.Copyright) 0) .Site.Copyright $copyright }}
|
||||
{{ .Site.Params.footer.license | safeHTML }} |
|
||||
{{ partial "assets/link.html" (dict "destination" "/en/privacy" "text" (T "privacy") "class" "link-bg-footer" "page" .Page) }} |
|
||||
{{ partial "assets/link.html" (dict "destination" "/en/cookies" "text" (T "cookies") "class" "link-bg-footer" "page" .Page) }} |
|
||||
{{ if .Site.Params.main.endorse }}
|
||||
{{ $link := partial "assets/link.html" (dict "destination" (index site.Params.links "hinode") "text" "Hinode" "class" "link-bg-footer" "page" .Page) }}
|
||||
{{ T "poweredBy" $link | safeHTML }}
|
||||
{{ end }}
|
||||
</small>
|
||||
</div>
|
||||
</footer>
|
12
go.mod
12
go.mod
@@ -5,13 +5,15 @@ go 1.19
|
||||
require (
|
||||
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
|
||||
github.com/gethinode/mod-bootstrap v1.3.1 // indirect
|
||||
github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect
|
||||
github.com/gethinode/mod-csp v1.0.3 // indirect
|
||||
github.com/gethinode/mod-flexsearch/v2 v2.0.2 // indirect
|
||||
github.com/gethinode/mod-fontawesome v1.10.0 // indirect
|
||||
github.com/gethinode/mod-google-analytics v1.1.3 // 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.4.0 // indirect
|
||||
github.com/gethinode/mod-leaflet v1.2.0 // indirect
|
||||
github.com/gethinode/mod-lottie v1.5.11 // indirect
|
||||
github.com/gethinode/mod-simple-datatables v1.0.14 // indirect
|
||||
github.com/gethinode/mod-utils/v2 v2.8.3 // indirect
|
||||
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect
|
||||
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
||||
)
|
||||
|
64
go.sum
64
go.sum
@@ -24,6 +24,14 @@ github.com/gethinode/mod-bootstrap v1.3.0 h1:UxNmXgXo7gA8C8z1ar47+tSccmKYpaYBBN+
|
||||
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-csp v1.0.0 h1:Obp0MVMBjIPZbKDh6Ejl5pImDG7yERMLf2or9UVnwPA=
|
||||
github.com/gethinode/mod-csp v1.0.0/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg=
|
||||
github.com/gethinode/mod-csp v1.0.1 h1:IUUwPc41UNw7DAFuJ75nNPzhkPExenxXU7susdLaxdQ=
|
||||
github.com/gethinode/mod-csp v1.0.1/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg=
|
||||
github.com/gethinode/mod-csp v1.0.2 h1:KX8EeoCGbHhGSo5r0YIa9BmPZ6S6v7L9CChTejREkK4=
|
||||
github.com/gethinode/mod-csp v1.0.2/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg=
|
||||
github.com/gethinode/mod-csp v1.0.3 h1:tRmnuVZ3UpCc9HR8qsAwbU0OJ/UsNVSbse0SZuwGcCg=
|
||||
github.com/gethinode/mod-csp v1.0.3/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg=
|
||||
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=
|
||||
@@ -74,6 +82,8 @@ github.com/gethinode/mod-flexsearch v1.12.1 h1:clkGUWaNPe9Dt/66Apy7oH9NwVQfnD6Op
|
||||
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-flexsearch/v2 v2.0.2 h1:5FkLbjORwKvK544H/yaAltyIB7eptRPxxh5VcfDDeqM=
|
||||
github.com/gethinode/mod-flexsearch/v2 v2.0.2/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=
|
||||
@@ -118,6 +128,20 @@ github.com/gethinode/mod-fontawesome v1.9.1 h1:cQk84vriqffM4fuUUoM9j3SSD+3ppeW2j
|
||||
github.com/gethinode/mod-fontawesome v1.9.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
||||
github.com/gethinode/mod-fontawesome v1.10.0 h1:Izs2AKc+YVBa1TywcH54OKLTNCUMXRoFIqOs+n0FgOo=
|
||||
github.com/gethinode/mod-fontawesome v1.10.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
||||
github.com/gethinode/mod-google-analytics v1.0.0 h1:fly42RQ69bdyJe8WFefsBIo7WMIXkd3wZn32kyAr4h4=
|
||||
github.com/gethinode/mod-google-analytics v1.0.0/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
|
||||
github.com/gethinode/mod-google-analytics v1.0.1 h1:zbmOdnAhhFCA7qWw7fnR46biWhqW2r06sIaTWyhB5R0=
|
||||
github.com/gethinode/mod-google-analytics v1.0.1/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
|
||||
github.com/gethinode/mod-google-analytics v1.0.2 h1:ljrAYdAPqiQg6rdnL6Je8zLK6mhlXoTGJ/vGtIUpX+w=
|
||||
github.com/gethinode/mod-google-analytics v1.0.2/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
|
||||
github.com/gethinode/mod-google-analytics v1.0.3 h1:QUm4AeBR6D9cLx26F6Cy5qQvQe/19c2wTJAqxmCfAq4=
|
||||
github.com/gethinode/mod-google-analytics v1.0.3/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
|
||||
github.com/gethinode/mod-google-analytics v1.1.1 h1:XzMXd6nBDl5Lj1Q5pd8MWtE87FI/vRCsUAkAvfuXDxE=
|
||||
github.com/gethinode/mod-google-analytics v1.1.1/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
|
||||
github.com/gethinode/mod-google-analytics v1.1.2 h1:mcoqaRRorut+PxYxJnOEMfKIlVIIOd6vxKhuEYTwFzw=
|
||||
github.com/gethinode/mod-google-analytics v1.1.2/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
|
||||
github.com/gethinode/mod-google-analytics v1.1.3 h1:24qxV5vKIex3zSdow+5r0o8rox1lrO31oGi0/XusBy4=
|
||||
github.com/gethinode/mod-google-analytics v1.1.3/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
|
||||
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=
|
||||
@@ -162,6 +186,8 @@ github.com/gethinode/mod-leaflet v1.1.0 h1:FXzPCic5XmUluxQ6e7LYUhhLnxuQOBwry8qjG
|
||||
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-leaflet v1.2.0 h1:5q5LHmGNi9N4cdRDCsl/6oI8vY3oQ2ogNUjP3NCnk4Y=
|
||||
github.com/gethinode/mod-leaflet v1.2.0/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=
|
||||
@@ -202,6 +228,16 @@ github.com/gethinode/mod-lottie v1.5.5 h1:uEJKsz+ovsZtbGkMhPONcIhtG6M3RjYiK+iVoS
|
||||
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-lottie v1.5.7 h1:hcf04kmKv7xrI2byxtgHwkScYIHfP9aquInHNZP+qbk=
|
||||
github.com/gethinode/mod-lottie v1.5.7/go.mod h1:rhWg+MSSnWmqHKNEViE/9/78RjQD6uWWFASgjvFjgyo=
|
||||
github.com/gethinode/mod-lottie v1.5.8 h1:glg5HcjOBkFt5MoF7p24NN+RzctExPQUDXvdhPx9u6I=
|
||||
github.com/gethinode/mod-lottie v1.5.8/go.mod h1:Z/FlAcCJWYI1Z9tQnL0yRN4lqhyZl9CqYpfJUPVDaGc=
|
||||
github.com/gethinode/mod-lottie v1.5.9 h1:1MFsq8pO7s4RXu1sA0z75xdp63FPdJ6ar9OhEieDSj8=
|
||||
github.com/gethinode/mod-lottie v1.5.9/go.mod h1:TA1rPRwSilT5mXUakNSVlXNrgTpE87mUOB/fdunAdA0=
|
||||
github.com/gethinode/mod-lottie v1.5.10 h1:tYFgk74T9zWy2FRkfkRI+8QVQy6lnuABnTeWQ8nUX5w=
|
||||
github.com/gethinode/mod-lottie v1.5.10/go.mod h1:L7NpvCAm04R59GSAAm/UFoDCs/6UtrIC5zQEjgQSr4k=
|
||||
github.com/gethinode/mod-lottie v1.5.11 h1:xhxBPDS0iyUY+C1ANaD5EeQV7fO1FG0wMoCjgrCMi/0=
|
||||
github.com/gethinode/mod-lottie v1.5.11/go.mod h1:6FKqk8c+Jkbk2udCxUKVLF1K1wrGwthPsOvRzeoPXRQ=
|
||||
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=
|
||||
@@ -214,6 +250,18 @@ github.com/gethinode/mod-simple-datatables v1.0.6 h1:voKiwLAfC7kfD+atv7ah0sOf8Oc
|
||||
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-simple-datatables v1.0.8 h1:J8hA+SXdTLaRNZwN70ZEyADn+VgNoAaxVDMXsMPTZBg=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.8/go.mod h1:RsTHWAt1J9/m7kzhYNSJB7CDyk+8DrG+46/aFrP6KJw=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.9 h1:8OnpY/axFkgxJ598DHW4nDtxsCYmgTakAG4ZC2wRS3A=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.9/go.mod h1:rgQWdDZ6lTR9+08dGY1zBDLZI/UneKPufakAK20+lmI=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.10 h1:/nYy4oCgooUJhTBgLdQzMnJEjolkD+dp2nkfLNT9Klg=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.10/go.mod h1:rgQWdDZ6lTR9+08dGY1zBDLZI/UneKPufakAK20+lmI=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.12 h1:myyVp1ctQA6j+5UTWcDwQmy8ipXdjs8T+qpTpRPBPII=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.12/go.mod h1:QuH7wz1igohzCgL76xI1960mFxPPrqgvGtLwR/0cFyQ=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.13 h1:3GTn46Zh56SFzCUP7CUSrmp/ZoiaVG19q4xdObSx6Pc=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.13/go.mod h1:a2qIdYegX5gBubGbspuHv/2UA/8O89oUG/U5hd7jLK8=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.14 h1:332WtbaQtTm7VP0b7zYfpogTBcOEetkJrNd01K4d/JE=
|
||||
github.com/gethinode/mod-simple-datatables v1.0.14/go.mod h1:mP3yjAdVE1G6JHfv8VVsRmvaPlPwddXknI675AuVs2I=
|
||||
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=
|
||||
@@ -262,6 +310,22 @@ github.com/gethinode/mod-utils/v2 v2.3.10 h1:+coUXdgAbLEE8Tvb3Rfk/1Nr6oDVreXI2si
|
||||
github.com/gethinode/mod-utils/v2 v2.3.10/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.4.0 h1:mmG4hWaeA4krAg933pibH+TrjFmPHkAi/DUbe3SM38I=
|
||||
github.com/gethinode/mod-utils/v2 v2.4.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.5.0 h1:9QboNU9KTpmJDS9JBjxavbknLVBJilocqo5KhC2FdME=
|
||||
github.com/gethinode/mod-utils/v2 v2.5.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.5.2 h1:URGTpJo0dN4/oF2yL6o2d2pkcSlG1F0hgIF9UqpIs/E=
|
||||
github.com/gethinode/mod-utils/v2 v2.5.2/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.6.0 h1:r7l/E6fbPZHnjFyJY4T/xzekd7Xp3czNVCMgKoKR8wc=
|
||||
github.com/gethinode/mod-utils/v2 v2.6.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.7.0 h1:5CKygjsc7X4dFtb90ihWyDVvUp2iqoJE8C7M+jeWYus=
|
||||
github.com/gethinode/mod-utils/v2 v2.7.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.8.0 h1:BdB+onItuO29g5ZLEz/HEwq9c4xBEM4GGqQc3kQ++js=
|
||||
github.com/gethinode/mod-utils/v2 v2.8.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.8.1 h1:u7sFbgJ5sBEMYC/GwcMRyjRAd5NxTjBnbld5b0V5n98=
|
||||
github.com/gethinode/mod-utils/v2 v2.8.1/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.8.2 h1:rKndAMmRBSO5Cgoa/2CvF5XchDSvLvd4TYAbfbbQVhE=
|
||||
github.com/gethinode/mod-utils/v2 v2.8.2/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||
github.com/gethinode/mod-utils/v2 v2.8.3 h1:t1MJcIdFhYi0gCkm8f0DYZwyfq7pRdRc0eNpqZa11ic=
|
||||
github.com/gethinode/mod-utils/v2 v2.8.3/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=
|
||||
|
188
hugo_stats.json
188
hugo_stats.json
@@ -1,189 +1,7 @@
|
||||
{
|
||||
"htmlElements": {
|
||||
"tags": [
|
||||
"a",
|
||||
"body",
|
||||
"button",
|
||||
"div",
|
||||
"footer",
|
||||
"form",
|
||||
"head",
|
||||
"html",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"link",
|
||||
"meta",
|
||||
"nav",
|
||||
"ol",
|
||||
"p",
|
||||
"path",
|
||||
"script",
|
||||
"small",
|
||||
"span",
|
||||
"strong",
|
||||
"svg",
|
||||
"symbol",
|
||||
"title",
|
||||
"ul",
|
||||
"use"
|
||||
],
|
||||
"classes": [
|
||||
"active",
|
||||
"align-items-center",
|
||||
"align-self-center",
|
||||
"align-self-end",
|
||||
"ball",
|
||||
"bg-body",
|
||||
"bg-opacity-10",
|
||||
"bg-primary",
|
||||
"bottom-0",
|
||||
"bottom-bar",
|
||||
"breadcrumb",
|
||||
"breadcrumb-item",
|
||||
"btn",
|
||||
"btn-close",
|
||||
"btn-primary",
|
||||
"checkbox",
|
||||
"col",
|
||||
"col-12",
|
||||
"col-6",
|
||||
"col-md-2",
|
||||
"col-md-3",
|
||||
"col-md-4",
|
||||
"col-md-8",
|
||||
"col-md-9",
|
||||
"col-sm-12",
|
||||
"collapse",
|
||||
"collapsed",
|
||||
"container-fluid",
|
||||
"container-xxl",
|
||||
"d-flex",
|
||||
"d-inline",
|
||||
"d-md-block",
|
||||
"d-none",
|
||||
"display-1",
|
||||
"display-4",
|
||||
"emphasis",
|
||||
"end-0",
|
||||
"fa",
|
||||
"fa-10x",
|
||||
"fa-2x",
|
||||
"fa-book-open",
|
||||
"fa-ellipsis",
|
||||
"fa-face-frown",
|
||||
"fa-fw",
|
||||
"fa-github",
|
||||
"fa-linkedin",
|
||||
"fa-medium",
|
||||
"fa-moon",
|
||||
"fa-sun",
|
||||
"fab",
|
||||
"fas",
|
||||
"fixed-top",
|
||||
"flex-column",
|
||||
"flex-fill",
|
||||
"footer",
|
||||
"form-control",
|
||||
"fs-3",
|
||||
"fs-5",
|
||||
"fw-30",
|
||||
"fw-bold",
|
||||
"hstack",
|
||||
"img-fluid",
|
||||
"img-wrap",
|
||||
"invisible",
|
||||
"is-search",
|
||||
"justify-content-center",
|
||||
"justify-content-end",
|
||||
"justify-content-start",
|
||||
"label",
|
||||
"link-bg-footer",
|
||||
"link-secondary",
|
||||
"main-content",
|
||||
"main-nav-toggler",
|
||||
"me-auto",
|
||||
"middle-bar",
|
||||
"min-vh-100",
|
||||
"mode-switch",
|
||||
"ms-auto",
|
||||
"ms-md-3",
|
||||
"mt-3",
|
||||
"mt-5",
|
||||
"mx-auto",
|
||||
"mx-md-0",
|
||||
"my-auto",
|
||||
"my-md-auto",
|
||||
"nav-item",
|
||||
"nav-link",
|
||||
"navbar",
|
||||
"navbar-brand",
|
||||
"navbar-collapse",
|
||||
"navbar-container",
|
||||
"navbar-expand-md",
|
||||
"navbar-fixed-top",
|
||||
"navbar-mode-selector",
|
||||
"navbar-nav",
|
||||
"navbar-toggler",
|
||||
"no-js",
|
||||
"order-0",
|
||||
"order-1",
|
||||
"order-md-0",
|
||||
"order-md-1",
|
||||
"p-0",
|
||||
"p-2",
|
||||
"p-3",
|
||||
"p-4",
|
||||
"pb-4",
|
||||
"pb-md-0",
|
||||
"position-fixed",
|
||||
"position-relative",
|
||||
"ps-1",
|
||||
"pt-4",
|
||||
"pt-5",
|
||||
"pt-md-3",
|
||||
"px-4",
|
||||
"px-xxl-0",
|
||||
"py-3",
|
||||
"rounded",
|
||||
"row",
|
||||
"row-cols-1",
|
||||
"row-cols-2",
|
||||
"row-cols-md-2",
|
||||
"row-cols-sm-3",
|
||||
"search",
|
||||
"search-input",
|
||||
"search-suggestions",
|
||||
"shadow",
|
||||
"svg-inline--fa",
|
||||
"text-center",
|
||||
"text-decoration-none",
|
||||
"text-muted",
|
||||
"text-secondary",
|
||||
"text-sm-start",
|
||||
"text-start",
|
||||
"toast",
|
||||
"toast-body",
|
||||
"toast-container",
|
||||
"toast-header",
|
||||
"toggler-icon",
|
||||
"top-bar"
|
||||
],
|
||||
"ids": [
|
||||
"fa-face-frown",
|
||||
"fab-github",
|
||||
"fab-linkedin",
|
||||
"fab-medium",
|
||||
"fas-book-open",
|
||||
"fas-ellipsis",
|
||||
"fas-moon",
|
||||
"fas-sun",
|
||||
"navbar-0-collapse",
|
||||
"navbar-mode",
|
||||
"navbar-mode-checkbox",
|
||||
"toast-container",
|
||||
"toast-copied-code-message"
|
||||
]
|
||||
"tags": null,
|
||||
"classes": null,
|
||||
"ids": null
|
||||
}
|
||||
}
|
||||
|
32
i18n/de.yaml
32
i18n/de.yaml
@@ -126,6 +126,36 @@
|
||||
|
||||
# Comments
|
||||
- id: show
|
||||
translation: "Zeige"
|
||||
translation: "Anzeigen"
|
||||
- id: comments
|
||||
translation: "Kommentare"
|
||||
|
||||
# Arguments
|
||||
- id: name
|
||||
translation: "Name"
|
||||
- id: type
|
||||
translation: "Typ"
|
||||
- id: required
|
||||
translation: "Erforderlich"
|
||||
- id: default
|
||||
translation: "Standard"
|
||||
- id: comment
|
||||
translation: "Kommentar"
|
||||
- id: supportedValues
|
||||
translation: "Unterstützte Werte"
|
||||
|
||||
# Alerts
|
||||
- id: caution
|
||||
translation: Vorsicht
|
||||
- id: important
|
||||
translation: Wichtig
|
||||
- id: note
|
||||
translation: Hinweis
|
||||
- id: tip
|
||||
translation: Tipp
|
||||
- id: warning
|
||||
translation: Warnung
|
||||
|
||||
# Image
|
||||
- id: image
|
||||
translation: Bild
|
@@ -160,4 +160,8 @@
|
||||
- id: tip
|
||||
translation: Tip
|
||||
- id: warning
|
||||
translation: Warning
|
||||
translation: Warning
|
||||
|
||||
# Image
|
||||
- id: image
|
||||
translation: image
|
@@ -149,3 +149,7 @@
|
||||
translation: "Commentaire"
|
||||
- id: supportedValues
|
||||
translation: "Valeurs supportées"
|
||||
|
||||
# Image
|
||||
- id: image
|
||||
translation: image
|
@@ -160,3 +160,7 @@
|
||||
translation: Tip
|
||||
- id: warning
|
||||
translation: Waarschuwing
|
||||
|
||||
# Image
|
||||
- id: image
|
||||
translation: Bild
|
||||
|
@@ -9,10 +9,18 @@
|
||||
}}
|
||||
|
||||
{{ if eq .Type "alert" }}
|
||||
<blockquote class="blockquote-alert blockquote-alert-{{ .AlertType }}">
|
||||
{{ $alert := .AlertType }}
|
||||
{{ $icon := (index $icons $alert) }}
|
||||
|
||||
<blockquote class="blockquote-alert blockquote-alert-{{ $alert }}">
|
||||
<p class="blockquote-alert-heading">
|
||||
{{ partial "assets/icon.html" (dict "icon" (printf "%s fa-fw" (index $icons .AlertType))) }}
|
||||
{{ or (i18n .AlertType) (title .AlertType) }}
|
||||
{{ with $icon }}
|
||||
{{ partial "assets/icon.html" (dict "icon" (printf "%s fa-fw" .)) }}
|
||||
{{ or (i18n $alert) (title $alert) }}
|
||||
{{ else }}
|
||||
{{ title $alert }}
|
||||
{{ warnf "Unsupported alert type: '%s'. See %s" $alert $.Position }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ trim .Text "\n\r" | safeHTML }}
|
||||
</blockquote>
|
||||
|
@@ -1,5 +1,12 @@
|
||||
{{ if site.Params.navigation.anchor }}
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" aria-labelledby="{{ .Anchor | safeURL }}">{{- partial "assets/icon.html" (dict "icon" "fas link anchor") }}</a></h{{ .Level }}>
|
||||
{{ $text := trim .Text " \n\r" }}
|
||||
|
||||
{{ if and site.Params.navigation.anchor $text }}
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading">
|
||||
{{- .Text | safeHTML -}}
|
||||
<a href="#{{ .Anchor | safeURL }}" aria-labelledby="{{ .Anchor | safeURL }}">
|
||||
{{- partial "assets/icon.html" (dict "icon" "fas link anchor") }}
|
||||
</a>
|
||||
</h{{ .Level }}>
|
||||
{{ else }}
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</h{{ .Level }}>
|
||||
{{ end }}
|
40
layouts/_default/_markup/render-table.html
Normal file
40
layouts/_default/_markup/render-table.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{{/* Adapted from https://gohugo.io/render-hooks/tables/ */}}
|
||||
|
||||
<!-- Ensure presence of `.table` class attribute to trigger Bootstrap styling -->
|
||||
{{ $attr := .Attributes }}
|
||||
{{ $class := split $attr.class " " }}
|
||||
{{ if not (in $class "table") }}
|
||||
{{ $attr = merge $attr (dict "class" (trim (delimit ($class | append "table") " ") " ")) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $align := dict "left" "start" "center" "center" "right" "end" }}
|
||||
|
||||
<table
|
||||
{{- range $k, $v := $attr }}
|
||||
{{- if $v }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- end }}>
|
||||
<thead>
|
||||
{{- range .THead }}
|
||||
<tr>
|
||||
{{- range . }}
|
||||
<th {{ with .Alignment }}class="text-{{ index $align . }}"{{ end }}>
|
||||
{{- .Text -}}
|
||||
</th>
|
||||
{{- end }}
|
||||
</tr>
|
||||
{{- end }}
|
||||
</thead>
|
||||
<tbody>
|
||||
{{- range .TBody }}
|
||||
<tr>
|
||||
{{- range . }}
|
||||
<td {{ with .Alignment }}class="text-{{ index $align . }}"{{ end }}>
|
||||
{{- .Text -}}
|
||||
</td>
|
||||
{{- end }}
|
||||
</tr>
|
||||
{{- end }}
|
||||
</tbody>
|
||||
</table>
|
@@ -14,7 +14,7 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Initialize module configuration */ -}}
|
||||
{{- $modules := partial "utilities/InitModules.html" (dict "page" .) -}}
|
||||
{{- $modules := partialCached "utilities/InitModules.html" . -}}
|
||||
{{- $.Scratch.Set "modules" $modules -}}
|
||||
|
||||
{{- $fullCover := or (or (and .IsHome .Site.Params.home.fullCover) .Page.Params.fullCover) .Site.Params.main.footerBelowFold }}
|
||||
@@ -27,7 +27,7 @@
|
||||
{{- $.Scratch.Set "sections" $sections -}}
|
||||
|
||||
{{- /* Define main breakpoint */ -}}
|
||||
{{- $.Scratch.Set "breakpoint" (partial "utilities/GetBreakpoint.html") }}
|
||||
{{- $.Scratch.Set "breakpoint" (partialCached "utilities/GetBreakpoint.html" .) }}
|
||||
|
||||
{{- /* Define base URL */ -}}
|
||||
{{ $lang := site.LanguageCode | default site.Language.Lang }}
|
||||
@@ -36,7 +36,8 @@
|
||||
<!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" .) -}}
|
||||
{{- partial "footer/scripts.html" (dict "page" . "type" "critical") -}}
|
||||
{{- partial "footer/scripts.html" (dict "page" . "type" "functional") -}}
|
||||
{{ block "head" . }}{{ end -}}
|
||||
</head>
|
||||
|
||||
@@ -74,7 +75,7 @@
|
||||
|
||||
{{- partial "footer/toast-container.html" . -}}
|
||||
{{- partial "assets/symbols.html" . -}}
|
||||
{{- partialCached "footer/scripts.html" (dict "header" false "page" . "core" true) }}
|
||||
{{- partial "footer/optional-scripts.html" . -}}
|
||||
{{- partialCached "footer/scripts.html" (dict "page" .) -}}
|
||||
{{- partial "footer/scripts.html" (dict "page" . "type" "optional") -}}
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
{{ $toc := .Render "single/panel-toc" }}
|
||||
|
||||
{{ with $sidebar }}
|
||||
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-inledby="offcanvas-label">
|
||||
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-labelledby="offcanvas-label">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="offcanvas-label">{{ strings.FirstUpper $.Section }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="{{ T "close" }}"></button>
|
||||
@@ -41,4 +41,4 @@
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
@@ -8,7 +8,8 @@
|
||||
<meta charset="utf-8">
|
||||
<noscript><meta http-equiv="refresh" content="0; url={{ .Permalink }}"></noscript>
|
||||
{{ if site.Params.main.enableLanguageSelectionStorage }}
|
||||
{{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" page) -}}
|
||||
{{- partial "footer/scripts.html" (dict "page" page "type" "critical") -}}
|
||||
{{- partial "footer/scripts.html" (dict "page" page "type" "functional") -}}
|
||||
{{ else }}
|
||||
<script src='{{ partial "utilities/GetStaticURL" (dict "url" "js/alias.js") }}'></script>
|
||||
{{ end }}
|
||||
|
@@ -39,13 +39,22 @@
|
||||
{{ $element := "" }}
|
||||
|
||||
<!-- Split path between upload dir and sub dir -->
|
||||
{{ $newdir := urls.JoinPath (index (split $dir "upload") 0) "upload" }}
|
||||
{{ $file = urls.JoinPath (index (split $dir "upload") 1) $file }}
|
||||
{{ $dir = $newdir }}
|
||||
{{ $dir = path.Clean (trim .dir "/") }}
|
||||
{{ $api := "image/upload" }}
|
||||
|
||||
<!-- Define the account, optional API segment, and directory -->
|
||||
{{ $elements := split $dir "/" }}
|
||||
{{ $account := index $elements 0 }}
|
||||
{{ $operation := "" }}
|
||||
{{ if and (in (slice "image" "video") (index $elements 1)) (eq (index $elements 2) "upload") }}
|
||||
{{ $api = delimit (slice | append (index $elements 1) | append (index $elements 2)) "/" }}
|
||||
{{ $dir = delimit (after 3 $elements) "/" }}
|
||||
{{ else }}
|
||||
{{ $dir = delimit (after 1 $elements) "/" }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Generate image URL -->
|
||||
{{ if not $error }}
|
||||
{{ $operation := "" }}
|
||||
{{ if $format }}
|
||||
{{ $operation = printf "%s,h_%d,w_%d" $transform $height $width }}
|
||||
{{ $file = printf "%s.%s" (strings.TrimSuffix (path.Ext $file) $file) $format }}
|
||||
@@ -55,7 +64,7 @@
|
||||
{{ with $anchor }}
|
||||
{{ $operation = printf "%s,g_%s" $operation . }}
|
||||
{{ end }}
|
||||
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
||||
{{- $element = partial "utilities/URLJoin.html" (dict "elements" (slice "https://" $host $account $api $operation $dir $file)) -}}
|
||||
{{ end }}
|
||||
|
||||
{{ return $element }}
|
||||
|
@@ -23,9 +23,9 @@
|
||||
{{ $anchor := .anchor | default "" }}
|
||||
{{ $element := "" }}
|
||||
{{ $absoluteURL := .absoluteURL }}
|
||||
{{ $url := urls.JoinPath $dir $file }}
|
||||
{{ $url := partial "utilities/URLJoin.html" (dict "elements" (slice $dir $file)) }}
|
||||
{{ if $host }}
|
||||
{{ $url = urls.JoinPath "https://" $host $url }}
|
||||
{{ $url = partial "utilities/URLJoin.html" (dict "elements" (slice "https://" $host $url)) }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize image if needed, do not raise additional warnings -->
|
||||
|
@@ -22,9 +22,9 @@
|
||||
{{ 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) }}
|
||||
{{ $element = partial "utilities/URLJoin.html" (dict "elements" (slice "https://ik.imagekit.io" $account $dir $file)) }}
|
||||
{{ else }}
|
||||
{{ $element = urls.JoinPath (slice "https://" $host $dir $file) }}
|
||||
{{ $element = partial "utilities/URLJoin.html" (dict "elements" (slice "https://" $host $dir $file)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $element }}
|
||||
|
@@ -46,7 +46,7 @@
|
||||
|
||||
<!-- Split path between end point and image path -->
|
||||
{{ $newdir := printf "/%s" (index (split $dir "/") 1) }}
|
||||
{{ $file = urls.JoinPath (strings.TrimPrefix $newdir $dir) $file }}
|
||||
{{ $file = partial "utilities/URLJoin.html" (dict "elements" (slice (strings.TrimPrefix $newdir $dir) $file)) }}
|
||||
{{ $dir = $newdir }}
|
||||
|
||||
<!-- Generate image URL -->
|
||||
@@ -60,7 +60,7 @@
|
||||
{{ with $anchor }}
|
||||
{{ $operation = printf "%s,fo-%s" $operation . }}
|
||||
{{ end }}
|
||||
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
||||
{{- $element = partial "utilities/URLJoin.html" (dict "elements" (slice "https://" $host $dir $operation $file)) -}}
|
||||
{{ end }}
|
||||
|
||||
{{ return $element }}
|
||||
|
@@ -55,7 +55,7 @@
|
||||
{{ with $anchor }}
|
||||
{{ $operation = printf "%s&crop=%s" $operation . }}
|
||||
{{ end }}
|
||||
{{- $element = printf "%s?%s" (urls.JoinPath (slice "https://" $host $dir $file)) $operation -}}
|
||||
{{- $element = printf "%s?%s" (partial "utilities/URLJoin.html" (dict "elements" (slice "https://" $host $dir $file))) $operation -}}
|
||||
{{ end }}
|
||||
|
||||
{{ return $element }}
|
||||
|
@@ -64,7 +64,7 @@
|
||||
{{- if $isExternal -}}
|
||||
{{- if $tab -}}
|
||||
{{- $target = "_blank" -}}
|
||||
{{- $rel = "noopener noreferrer" -}}
|
||||
{{- $rel = "noopener noreferrer nofollow" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and $title $cue -}}
|
||||
|
@@ -4,73 +4,80 @@
|
||||
Visit gethinode.com/license for more details.
|
||||
-->
|
||||
|
||||
<!-- Validate arguments -->
|
||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "card-group" "child" "card" "args" .) }}
|
||||
{{- errorf "partial [assets/card-group.html] - Invalid arguments" -}}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize arguments and default values -->
|
||||
{{- $page := .page -}}
|
||||
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
|
||||
{{ $pages := .list }}
|
||||
{{ $cards := .cards }}
|
||||
{{- $paginate := .paginate | default false -}}
|
||||
{{- $moreURL := .href -}}
|
||||
{{- $moreTitle := .hrefTitle -}}
|
||||
{{- $gutter := .gutter | default 4 -}}
|
||||
{{- $separator := .separator | default false -}}
|
||||
{{- $class := .class -}}
|
||||
{{- $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 -}}
|
||||
{{- $subtle := .subtle }}
|
||||
{{- $loading := .loading -}}
|
||||
{{- $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) }}
|
||||
{{ $paginator := "" }}
|
||||
{{ if and $isPages $paginate }}
|
||||
{{ with .pagination }}
|
||||
{{ $paginator = $page.Paginate $pages . }}
|
||||
{{ else }}
|
||||
{{ $paginator = $page.Paginate $pages }}
|
||||
<!-- Define inline partials -->
|
||||
{{ define "partials/assets/style.html" }}
|
||||
{{ $style := "" }}
|
||||
{{ if gt (len .styles) 0 }}
|
||||
{{ $def := index .styles (mod .index (len .styles)) }}
|
||||
{{ $style = index $def .key }}
|
||||
{{ end }}
|
||||
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
|
||||
{{ return ($style | default .default ) }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize arguments -->
|
||||
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "card-group" "child" "card" "args" .) }}
|
||||
{{ if $args.err }}
|
||||
{{ partial "utilities/LogErr.html" (dict
|
||||
"partial" "assets/card-group.html"
|
||||
"msg" "Invalid arguments"
|
||||
"details" $args.errmsg
|
||||
"file" page.File
|
||||
)}}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize local variables -->
|
||||
{{ $list := $args.list }}
|
||||
{{- $class := $args.class -}}
|
||||
{{- $orientation := $args.orientation -}}
|
||||
{{ $cardWrapper := "" }}
|
||||
{{ if $scroll }}
|
||||
{{ $cardWrapper = printf "card-block card-block-%d" (int $cols) }}
|
||||
|
||||
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
|
||||
{{ $colsMap := dict
|
||||
"auto" ""
|
||||
"1" "row-cols-1"
|
||||
"2" (printf "row-cols-1 row-cols-%s-1 row-cols-%s-2" $breakpoint.prev $breakpoint.current)
|
||||
"3" (printf "row-cols-1 row-cols-%s-2 row-cols-%s-3" $breakpoint.prev $breakpoint.current)
|
||||
"4" (printf "row-cols-1 row-cols-%s-2 row-cols-%s-4" $breakpoint.prev $breakpoint.current)
|
||||
"5" (printf "row-cols-1 row-cols-%s-3 row-cols-%s-5" $breakpoint.prev $breakpoint.current)
|
||||
}}
|
||||
{{ $sizesMap := dict
|
||||
"auto" "100vw"
|
||||
"1" "100vw"
|
||||
"2" (printf "(min-width: %s) 50vw, 100vw" $breakpoint.currentSize)
|
||||
"3" (printf "(min-width: %s) 33.3vw, (min-width: %s) 50vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize)
|
||||
"4" (printf "(min-width: %s) 25vw, (min-width: %s) 50vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize)
|
||||
"5" (printf "(min-width: %s) 20vw, (min-width: %s) 33.3vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize)
|
||||
}}
|
||||
|
||||
{{ if not $args.responsive }}
|
||||
{{ $colsMap = dict "auto" "" "1" "row-cols-1" "2" "row-cols-2" "3" "row-cols-3" "4" "row-cols-4" "5" "row-cols-5" }}
|
||||
{{ $sizesMap = dict "auto" "100vw" "1" "100vw" "2" "50vw" "3" "33.3vw" "4" "25vw" "5" "20vw" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not $spacer }}{{ $class = printf "%s h-100" $class }}{{ end }}
|
||||
<!-- Apply optional pagination -->
|
||||
{{ $isPages := in (slice "page.Pages" "resource.Resources") (printf "%T" $list) }}
|
||||
{{ $paginator := "" }}
|
||||
{{ if and $isPages $args.paginate }}
|
||||
{{ with $args.pagination }}
|
||||
{{ $paginator = $args.page.Paginate $list . }}
|
||||
{{ else }}
|
||||
{{ $paginator = $args.page.Paginate $list }}
|
||||
{{ end }}
|
||||
{{ $list = first $paginator.PagerSize (after (mul (sub $paginator.PageNumber 1) $paginator.PagerSize) $list) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $list := slice }}
|
||||
<!-- Initialize list elements -->
|
||||
{{ $elements := slice }}
|
||||
{{ if $isPages }}
|
||||
{{ range $index, $element := $pages }}
|
||||
{{ range $index, $element := $list }}
|
||||
{{ $params := dict }}
|
||||
<!-- regular page -->
|
||||
{{- if and $element.RelPermalink $element.File -}}
|
||||
{{- $params = merge $params (dict "path" $element.File.Path) -}}
|
||||
<!-- headless page -->
|
||||
{{- else -}}
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.url) $element.Params.Thumbnail) -}}
|
||||
{{- $thumbnail := "" -}}
|
||||
{{ if reflect.IsMap $element.Params.Thumbnail }}{{ $thumbnail = $element.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $element.Params.Thumbnail }}{{ end }}
|
||||
{{- $anchor := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.anchor) "") -}}
|
||||
{{- $params = merge $params (dict
|
||||
"title" $element.Title
|
||||
@@ -82,102 +89,95 @@
|
||||
) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $list = $list | append $params }}
|
||||
{{- $elements = $elements | append $params }}
|
||||
{{ end }}
|
||||
{{ else if $pages }}
|
||||
{{ $list = $list | append $pages }}
|
||||
{{ else if $list }}
|
||||
{{ $elements = $elements | append $list }}
|
||||
{{ end }}
|
||||
|
||||
{{- $count := len $list -}}
|
||||
<!-- Limit list to max elements -->
|
||||
{{- $count := len $elements -}}
|
||||
{{- $max := $count -}}
|
||||
{{- $max = math.Min (.max | default $count) $count -}}
|
||||
{{- $responsive := .responsive | default true -}}
|
||||
|
||||
{{- $sizes := "100vw" }}
|
||||
{{- $colGrid := "" -}}
|
||||
{{ 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 -}}
|
||||
{{ 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 -}}
|
||||
{{- $max = math.Min ($args.max | default $count) $count -}}
|
||||
{{- if not $args.paginate -}}
|
||||
{{- $elements = first $max $elements -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and (eq $cols "1") (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
|
||||
{{/* Initialize grid and layout */}}
|
||||
{{- $sizes := "100vw" }}
|
||||
{{- $colGrid := "" -}}
|
||||
{{ if not $args.scroll }}
|
||||
{{ $colGrid = index $colsMap $args.cols }}
|
||||
{{ $sizes = index $sizesMap $args.cols }}
|
||||
{{ else }}
|
||||
{{ if in (slice "2" "3" "4" "5") $args.cols }}
|
||||
{{ $sizes = replace (printf "%.1fvw" (div 100.0 (int $args.cols))) ".0" "" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- if and (eq $args.cols "1") (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
|
||||
|
||||
{{ if not $args.spacer }}
|
||||
{{ $class = printf "%s h-100" $class }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Main code -->
|
||||
<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 " %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 $element $params }}
|
||||
<div class="{{ $args.wrapper }}">
|
||||
<div class="container-fluid {{ if $args.scroll }}card-container-wrapper{{ end }} p-0">
|
||||
<div class="row g-{{ $args.gutter }} {{ if $args.scroll }}d-flex flex-row flex-nowrap card-container scrollbar-horizontal pb-4 w-100 {{ end }}
|
||||
{{ if $args.bento }}{{ with $args.valign }}align-items-{{ . }}{{ end }}{{ else }}{{ $colGrid }}{{ end }}">
|
||||
{{ range $index, $element := $elements }}
|
||||
{{- $params := (dict
|
||||
"class" (printf " %s" $class)
|
||||
"color" $args.color
|
||||
"footer" $args.footer
|
||||
"body" $args.body
|
||||
"header" $args.header
|
||||
"loading" $args.loading
|
||||
"sizes" $sizes
|
||||
"orientation" (partial "assets/style.html" (dict "styles" $args.styles "index" $index "key" "orientation" "default" $orientation))
|
||||
"padding" $args.padding
|
||||
"ratio" (partial "assets/style.html" (dict "styles" $args.styles "index" $index "key" "ratio" "default" $args.ratio))
|
||||
"portrait" (partial "assets/style.html" (dict "styles" $args.styles "index" $index "key" "portrait" "default" $args.portrait))
|
||||
"subtle" $args.subtle
|
||||
"style" $args.style
|
||||
"align" $args.align
|
||||
"button" $args.button
|
||||
"buttonLabel" $args.buttonLabel
|
||||
"buttonType" $args.buttonType
|
||||
"iconRounded" $args.iconRounded
|
||||
) -}}
|
||||
{{- $params = merge $element $params }}
|
||||
|
||||
<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 -}}
|
||||
<div class="col d-block d-sm-none">
|
||||
<hr>
|
||||
{{ if $args.scroll }}
|
||||
{{ $width := (partial "assets/style.html" (dict "styles" $args.styles "index" $index "key" "width" "default" "3")) }}
|
||||
{{ $size := $args.cols }}
|
||||
{{ if and (gt $args.cols 1) (eq $width "6") }}{{ $size = sub (int $args.cols) 1 }}{{ end }}
|
||||
{{ $cardWrapper = printf "card-block card-block-%d" (int $size) }}
|
||||
{{ end }}
|
||||
|
||||
<!--add col-$width -->
|
||||
<div class="{{ with $cardWrapper }}{{ . }}{{ else }}col{{ end }}">
|
||||
{{ if $args.spacer }}<div class="spacer"></div>{{ end }}
|
||||
{{- partial $args.hook $params -}}
|
||||
</div>
|
||||
{{- if and (lt $index (sub $max 1)) $args.separator -}}
|
||||
<div class="col d-block d-sm-none">
|
||||
<hr>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ if $cards }}{{- print $cards | safeHTML }}{{ end }}
|
||||
{{ if $args.cards }}{{- print $args.cards | safeHTML }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ if $paginator }}
|
||||
{{- if gt $paginator.TotalPages 1 -}}
|
||||
<div class="pt-3">{{ partial "assets/pagination.html" (dict "page" $page "format" "terse") }}</div>
|
||||
<div class="pt-3">{{ partial "assets/pagination.html" (dict "page" $args.page "format" "terse") }}</div>
|
||||
{{- end -}}
|
||||
{{ else }}
|
||||
{{ if and (gt $count $max) $moreTitle }}
|
||||
<a class="btn btn-outline-primary mt-4" href="{{ $moreURL| safeURL }}" role="button">{{ $moreTitle }}</a>
|
||||
{{ if and (gt $count $max) $args.hrefTitle }}
|
||||
<a class="btn btn-outline-primary mt-4" href="{{ $args.href| safeURL }}" role="button">{{ $args.hrefTitle }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
@@ -52,11 +52,12 @@
|
||||
{{- $page := "" }}
|
||||
{{- if .path }}
|
||||
{{ $page = partial "utilities/GetPage.html" (dict "url" .path "page" page) }}
|
||||
{{- if not $page }}
|
||||
{{ $validate := site.Params.main.internalLinks.validate | default true }}
|
||||
{{- if and $validate (not $page) }}
|
||||
{{ if page.File }}
|
||||
{{- errorf "partial [assets/card.html] - Cannot find target page '%s', see '%s'" .path page.File.Path -}}
|
||||
{{- warnf "partial [assets/card.html] - Cannot find target page '%s', see '%s'" .path page.File.Path -}}
|
||||
{{ else }}
|
||||
{{- errorf "partial [assets/card.html] - Cannot find target page '%s'" .path -}}
|
||||
{{- warnf "partial [assets/card.html] - Cannot find target page '%s'" .path -}}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -64,7 +65,9 @@
|
||||
{{- if not $title }}{{ $title = .Title }}{{ end -}}
|
||||
{{- if not $href }}{{ $href = .RelPermalink }}{{ end -}}
|
||||
{{- if not $description }}{{ $description = partial "utilities/GetDescription.html" (dict "page" .) }}{{ end -}}
|
||||
{{- if and (not $thumbnail) (not $icon) }}{{ $thumbnail = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) }}{{ end -}}
|
||||
{{- if and (not $thumbnail) (not $icon) }}
|
||||
{{ if reflect.IsMap .Params.Thumbnail }}{{ $thumbnail = .Params.Thumbnail.url }}{{ else }}{{ $thumbnail = .Params.Thumbnail }}{{ end }}
|
||||
{{ end -}}
|
||||
{{ if not $ratio }}
|
||||
{{- if and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.ratio }}{{ $ratio = .Params.Thumbnail.ratio }}{{ end -}}
|
||||
{{ end }}
|
||||
@@ -80,7 +83,8 @@
|
||||
{{ end }}
|
||||
|
||||
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
|
||||
{{- if eq $body "none" }}{{ $description = "" }}{{ end -}}
|
||||
{{- if eq $body "title" }}{{ $description = "" }}{{ end -}}
|
||||
{{- if eq $body "none" }}{{ $title = "" }}{{ $description = "" }}{{ end -}}
|
||||
|
||||
<!-- Inline partial to render the card's body -->
|
||||
{{- define "partials/card-body.html" -}}
|
||||
@@ -92,7 +96,7 @@
|
||||
|
||||
{{- if $href -}}
|
||||
<a href="{{ $href }}" class="{{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }} stretched-link">
|
||||
<p class="card-title fs-lg-5 fs-6 fw-bold">{{ $title }}</p>
|
||||
<p class="card-title fs-lg-5 fs-6">{{ $title }}</p>
|
||||
{{ with $description }}
|
||||
<div class="card-text {{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }}">
|
||||
{{ . | safeHTML }}
|
||||
@@ -101,7 +105,7 @@
|
||||
</a>
|
||||
{{- else -}}
|
||||
<div>
|
||||
{{ with $title }}<p class="card-title fs-lg-5 fs-6 fw-bold">{{ . }}</p>{{ end -}}
|
||||
{{ with $title }}<p class="card-title fs-lg-5 fs-6">{{ . }}</p>{{ end -}}
|
||||
{{ with $description }}<div class="card-text">{{ . | safeHTML }}</div>{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -194,7 +198,7 @@
|
||||
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description "button" $button) -}}
|
||||
</div>
|
||||
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>{{ end }}
|
||||
{{ if $button }}
|
||||
{{ if and $href $button }}
|
||||
{{ $label := (or $buttonLabel $title) | default (T "readMore") }}
|
||||
{{ $buttonClass := "card-button mb-n4" }}
|
||||
{{ if eq $buttonType "link" }}{{ $buttonClass = "card-button card-button-link mb-n4" }}{{ end }}
|
||||
@@ -216,6 +220,7 @@
|
||||
</div>
|
||||
{{- else -}}
|
||||
<!-- Render stacked / default card -->
|
||||
{{ $overlay := eq $orientation "overlay" }}
|
||||
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
|
||||
{{- if $thumbnail -}}
|
||||
{{- 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) -}}
|
||||
@@ -229,7 +234,8 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
||||
<div class="card-body d-flex flex-column p-{{ $padding }} {{ if $overlay }}card-img-overlay card-overlay-gradient p-4{{ end }}" {{ if $overlay }}data-bs-theme="dark"{{ end }}>
|
||||
{{ if $overlay }}<div class="flex-grow-1"></div>{{ end }}
|
||||
{{ if $page }}{{- partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) -}}{{ end }}
|
||||
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}}
|
||||
{{ if $page }}{{- partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) -}}{{ end }}
|
||||
|
@@ -20,10 +20,11 @@
|
||||
{{- $ratio := .ratio -}}
|
||||
{{- $portrait := .portrait -}}
|
||||
{{- $loading := .loading | default "eager" -}}
|
||||
{{- $title := .caption | default (T "image") -}}
|
||||
|
||||
<!-- Main code -->
|
||||
<div class="carousel-item{{ if $active }} active{{ end }}" {{ if not $active }} fetchpriority="low"{{ end }}>
|
||||
{{ partial "assets/image.html" (dict "url" $src "ratio" $ratio "page" $page "class" "d-block w-100" "portrait" $portrait "loading" $loading) }}
|
||||
{{ partial "assets/image.html" (dict "url" $src "ratio" $ratio "page" $page "class" "d-block w-100" "portrait" $portrait "loading" $loading "title" $title) }}
|
||||
<div class="carousel-caption gradient"></div>
|
||||
{{ with $caption }}
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
|
@@ -16,6 +16,7 @@
|
||||
{{- $modes := .modes -}}
|
||||
{{- $plain := .plain | default false }}
|
||||
{{- $anchor := .anchor }}
|
||||
{{- $alt := or $title $caption (T "image") }}
|
||||
|
||||
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
||||
{{- $fileAnchor := "" -}}
|
||||
@@ -71,7 +72,7 @@
|
||||
{{ with $imgset -}}srcset="{{ . }}" sizes="{{ $sizes }}"{{- end }}
|
||||
{{ with $height }}height="{{ . }}"{{ end }}
|
||||
{{ with $width }}width="{{ . }}"{{ end }}
|
||||
{{ with (or $title $caption) }}alt="{{ . }}"{{ end }}>
|
||||
{{ with $alt }}alt="{{ . }}"{{ end }}>
|
||||
{{- else }}
|
||||
<svg class="{{ $class }}">
|
||||
<use href="{{ $fallbackURL }}#{{ $fileAnchor }}"></use>
|
||||
|
@@ -13,7 +13,15 @@
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize arguments -->
|
||||
{{ $destination := strings.TrimPrefix (strings.TrimSuffix "/" site.BaseURL) .destination }}
|
||||
{{ $destination := .destination }}
|
||||
{{ $u := urls.Parse $destination }}
|
||||
{{ if not $u.Scheme }}
|
||||
{{ $b := urls.Parse site.BaseURL }}
|
||||
{{ $destination = strings.TrimPrefix $b.Path $destination }}
|
||||
{{ $destination = path.Clean $destination }}
|
||||
{{ else }}
|
||||
{{ $destination = (strings.TrimPrefix (strings.TrimSuffix "/" site.BaseURL) $destination) }}
|
||||
{{ end }}
|
||||
{{ if not $destination }}{{ $destination = "/" }}{{ end }}
|
||||
|
||||
{{- $target := "" -}}
|
||||
@@ -38,7 +46,7 @@
|
||||
|
||||
{{- if $tab -}}
|
||||
{{- $target = "_blank" -}}
|
||||
{{- $rel = "noopener noreferrer" -}}
|
||||
{{- $rel = "noopener noreferrer nofollow" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $cue -}}
|
||||
@@ -60,16 +68,18 @@
|
||||
{{ $ref := partial "utilities/GetPage.html" (dict "url" $destination "page" $page) }}
|
||||
{{- if not $ref -}}
|
||||
{{ $pageContext := "" }}
|
||||
{{ with $page.File }}{{ $pageContext = path.Join "/content" .Dir }}{{ end }}
|
||||
{{ with $page.File }}
|
||||
{{ $pageContext = path.Dir (strings.TrimPrefix hugo.WorkingDir .Filename) }}
|
||||
{{ end }}
|
||||
{{ $isPageRes := fileExists (path.Join $pageContext $destination) }}
|
||||
{{ $isStatic := fileExists (path.Join "static" $destination) }}
|
||||
{{ if and (not $isPageRes) (not $isStatic) }}
|
||||
{{- errorf "partial [assets/link.html] - Cannot find page or asset: '%s' at '%s'" $destination $page.File.Path -}}
|
||||
{{- $error = true -}}
|
||||
{{ else if $isPageRes }}
|
||||
{{ $destination = urls.JoinPath "/" (strings.TrimPrefix "/content" $pageContext) $destination }}
|
||||
{{ $destination = partial "utilities/URLJoin.html" (dict "elements" (slice "/" (strings.TrimPrefix "/content" $pageContext) $destination)) }}
|
||||
{{ else if $isStatic }}
|
||||
{{ $destination = urls.JoinPath "/" $destination }}
|
||||
{{ $destination = partial "utilities/URLJoin.html" (dict "base" "/" "path" $destination) }}
|
||||
{{ end }}
|
||||
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
|
||||
{{ end }}
|
||||
|
@@ -47,7 +47,8 @@
|
||||
<div class="d-none d-md-block p-0">
|
||||
{{- range $index, $item := $list -}}
|
||||
{{- $odd := eq (mod $index 2) 1 -}}
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
|
||||
{{- $thumbnail := "" -}}
|
||||
{{ if reflect.IsMap $item.Params.Thumbnail }}{{ $thumbnail = $item.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $item.Params.Thumbnail }}{{ end }}
|
||||
<div class="container ratio-section d-flex flex-column">
|
||||
<div class="row pt-5 pb-5 align-items-center flex-fill row-cols-2">
|
||||
<div class="col-6{{ if $odd }} order-last{{ end }}">
|
||||
@@ -69,7 +70,8 @@
|
||||
<div class="d-md-none">
|
||||
{{- range $index, $item := $list -}}
|
||||
{{- $odd := eq (mod $index 2) 1 -}}
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
|
||||
{{- $thumbnail := "" -}}
|
||||
{{ if reflect.IsMap $item.Params.Thumbnail }}{{ $thumbnail = $item.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $item.Params.Thumbnail }}{{ end }}
|
||||
<div class="container d-flex flex-column">
|
||||
<div class="row pt-5 pb-5 align-items-center flex-fill row-cols-2">
|
||||
<div class="col-12 text-center">
|
||||
|
@@ -52,46 +52,50 @@
|
||||
<div class="d-none d-lg-block">
|
||||
{{ end }}
|
||||
|
||||
<div class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
|
||||
<ul class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
|
||||
{{- range $index, $item := $list -}}
|
||||
{{ $show := eq $index 0}}
|
||||
<button class="nav-link {{ if not $wrap }} text-nowrap{{ end }}{{ if $show }} active{{ end }}" id="nav-{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#nav-{{ $id }}-{{ $index }}"
|
||||
type="button" role="tab" aria-controls="nav-{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
|
||||
{{ $item.Title }}
|
||||
</button>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link {{ if not $wrap }} text-nowrap{{ end }}{{ if $show }} active{{ end }}" id="nav-{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#nav-{{ $id }}-{{ $index }}"
|
||||
type="button" role="tab" aria-controls="nav-{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
|
||||
{{ $item.Title }}
|
||||
</button>
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content {{ if eq $type "tabs" }}border border-bottom-0 p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}">
|
||||
{{ range $index, $item := $list }}
|
||||
{{ $header := $item.Title }}
|
||||
{{ $body := $item.Content }}
|
||||
{{ $show := eq $index 0}}
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
|
||||
<div class="tab-pane{{ if $show }} active{{ end }}" id="nav-{{ $id }}-{{ $index }}" role="tabpanel" aria-labelledby="{{ $id }}-btn-{{ $index }}" tabindex="0">
|
||||
{{- if eq $pane "persona" -}}
|
||||
{{- partial "assets/persona.html" (dict
|
||||
"title" $item.Title
|
||||
"class" $class
|
||||
"color" $color
|
||||
"content" (partial "utilities/GetDescription.html" (dict "page" $item))
|
||||
"thumbnail" $thumbnail
|
||||
) -}}
|
||||
{{- else -}}
|
||||
{{ $illustration := (partial "utilities/GetIllustration.html" (dict "item" $item)) }}
|
||||
{{ if $illustration }}
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-10 order-1 order-lg-0">{{- (or $item.Description $item.Content) -}}</div>
|
||||
<div class="col-12 col-lg-2 order-0 order-lg-1">{{ $illustration | safeHTML }}</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{- (or $item.Description $item.Content) -}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="tab-content {{ if eq $type "tabs" }}border border-bottom-0 p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}">
|
||||
{{ range $index, $item := $list }}
|
||||
{{ $header := $item.Title }}
|
||||
{{ $body := $item.Content }}
|
||||
{{ $show := eq $index 0}}
|
||||
{{- $thumbnail := "" -}}
|
||||
{{ if reflect.IsMap $item.Params.Thumbnail }}{{ $thumbnail = $item.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $item.Params.Thumbnail }}{{ end }}
|
||||
<div class="tab-pane{{ if $show }} active{{ end }}" id="nav-{{ $id }}-{{ $index }}" role="tabpanel" aria-labelledby="{{ $id }}-btn-{{ $index }}" tabindex="0">
|
||||
{{- if eq $pane "persona" -}}
|
||||
{{- partial "assets/persona.html" (dict
|
||||
"title" $item.Title
|
||||
"class" $class
|
||||
"color" $color
|
||||
"href" $item.Params.href
|
||||
"content" (partial "utilities/GetDescription.html" (dict "page" $item))
|
||||
"thumbnail" $thumbnail
|
||||
) -}}
|
||||
{{- else -}}
|
||||
{{ $illustration := (partial "utilities/GetIllustration.html" (dict "item" $item)) }}
|
||||
{{ if $illustration }}
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-10 order-1 order-lg-0">{{- (or $item.Description $item.Content) -}}</div>
|
||||
<div class="col-12 col-lg-2 order-0 order-lg-1">{{ $illustration | safeHTML }}</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{- (or $item.Description $item.Content) -}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if eq $type "callout" }}</div>{{ end }}
|
||||
{{ if $vertical }}</div>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -25,7 +25,7 @@
|
||||
{{ 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) -}}
|
||||
{{- $menuURL = partial "utilities/URLJoin.html" (dict "base" $baseURL "path" ((or $menu.PageRef $menu.URL) | relLangURL)) -}}
|
||||
{{ end }}
|
||||
{{- $pageURL := $page.RelPermalink -}}
|
||||
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
{{- if $isExternal }}
|
||||
{{- if $tab -}}
|
||||
{{ $externalHref = "target=\"_blank\" rel=\"noopener noreferrer\"" }}
|
||||
{{ $externalHref = "target=\"_blank\" rel=\"noopener noreferrer nofollow\"" }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $cue -}}
|
||||
@@ -85,10 +85,10 @@
|
||||
"size" "sm"
|
||||
)}}
|
||||
{{ else }}
|
||||
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{ . }}{{ end }}"
|
||||
{{ cond (ne $menuURL "") "<a" "<div" | safeHTML }} 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 }}>
|
||||
{{ if $menuURL }} href="{{ $menuURL }}{{ $params | safeHTML }}"{{ with $externalHref }} {{ . | safeHTML }}{{ end }}{{ end }} {{ $button | safeHTML }}>
|
||||
|
||||
{{- with $menu.Pre }}
|
||||
{{ if hasPrefix . "<i" }}
|
||||
@@ -100,6 +100,6 @@
|
||||
<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>
|
||||
{{ cond (ne $menuURL "") "</a>" "</div>" | safeHTML }}
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -18,14 +18,14 @@
|
||||
{{- define "partials/navbar-mode.html" -}}
|
||||
{{- $id := .id | default "navbar-mode" -}}
|
||||
|
||||
<div class="d-flex mode-switch align-items-center" id="{{ $id }}">
|
||||
<input type="checkbox" class="checkbox navbar-mode-selector" id="{{ $id }}-checkbox" />
|
||||
<li class="d-flex mode-switch align-items-center" id="{{ $id }}">
|
||||
<input type="checkbox" class="checkbox navbar-mode-selector" id="{{ $id }}-checkbox" aria-label="{{ T "colorMode" }}" />
|
||||
<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>
|
||||
</li>
|
||||
{{- end -}}
|
||||
|
||||
<!-- Inline partial to render the version switcher -->
|
||||
@@ -51,7 +51,7 @@
|
||||
{{- end -}}
|
||||
{{ if $item.url }}
|
||||
<li>
|
||||
{{- $url := (urls.JoinPath $baseURL $item.url) | relLangURL -}}
|
||||
{{- $url := partial "utilities/URLJoin.html" (dict "base" $baseURL "path" $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 }}
|
||||
@@ -67,7 +67,7 @@
|
||||
{{- if site.Params.docs.overview -}}
|
||||
{{ if gt (len $list) 0 }}<li><hr class="dropdown-divider"></li>{{ end }}
|
||||
<li>
|
||||
{{- $url := (urls.JoinPath $baseURL site.Params.docs.overview) | relLangURL -}}
|
||||
{{- $url := partial "utilities/URLJoin.html" (dict "base" $baseURL "path" site.Params.docs.overview) | relLangURL -}}
|
||||
<a class="dropdown-item{{ if $collapsed }} switch-mode-collapsed{{ end }}" href="{{ $url }}">{{ T "allVersions" }}</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
@@ -107,7 +107,7 @@
|
||||
{{- $enableVersions = gt (len $list ) 1 -}}
|
||||
{{ end }}
|
||||
|
||||
{{- $enableLanguage := or $page.IsTranslated site.IsMultiLingual -}}
|
||||
{{- $enableLanguage := or $page.IsTranslated hugo.IsMultilingual -}}
|
||||
{{- $horizontal := default false site.Params.navigation.horizontal -}}
|
||||
|
||||
{{- $logo := .logo | default site.Params.navigation.logo -}}
|
||||
@@ -142,9 +142,9 @@
|
||||
{{- 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 }}
|
||||
{{ if $logo }}{{ $logo = partial "utilities/URLJoin.html" (dict "base" $baseURL "path" $logo) }}{{ end }}
|
||||
{{ if $logoLight }}{{ $logoLight = partial "utilities/URLJoin.html" (dict "base" $baseURL "path" $logoLight) }}{{ end }}
|
||||
{{ if $logoDark }}{{ $logoDark = partial "utilities/URLJoin.html" (dict "base" $baseURL "path" $logoDark) }}{{ end }}
|
||||
|
||||
{{- $title := site.Title -}}
|
||||
{{- if .title -}}
|
||||
@@ -222,7 +222,9 @@
|
||||
|
||||
<div class="navbar-collapse collapse" id="{{ $id }}-collapse">
|
||||
<!-- Insert search input -->
|
||||
{{- if and $search (not $searchModal) }}{{ partial "assets/search-input.html" }}{{ end -}}
|
||||
{{- if and $search (not $searchModal) }}
|
||||
{{ partial "assets/search-input.html" (dict "class" (printf "mt-4 mt-%s-0" $size)) }}
|
||||
{{ end -}}
|
||||
|
||||
<!-- Render top-menu items (maximum depth of 2) -->
|
||||
<ul class="navbar-nav {{ if $flex }}d-flex w-100{{ else }}ms-auto{{ end }}">
|
||||
@@ -274,7 +276,7 @@
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- range site.Languages -}}
|
||||
<li><a class="dropdown-item" href="{{ urls.JoinPath $baseURL .Lang }}" hreflang="{{.Lang}}">{{ default .Lang .LanguageName }}</a></li>
|
||||
<li><a class="dropdown-item" href="{{ partial "utilities/URLJoin.html" (dict "base" $baseURL "path" .Lang) }}" hreflang="{{.Lang}}">{{ default .Lang .LanguageName }}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
@@ -293,12 +295,16 @@
|
||||
</li>
|
||||
<li><hr class="dropdown-divider-bg"></li>
|
||||
|
||||
<a class="nav-link d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="modal" data-bs-target="#search-modal" aria-label="{{ T "ui_search" }}" aria-expanded="false">
|
||||
<li class="d-{{ $size }}-none">
|
||||
<a class="nav-link" href="#!" role="button" data-bs-toggle="modal" data-bs-target="#search-modal" aria-label="{{ T "ui_search" }}" aria-expanded="false">
|
||||
{{ partial "assets/icon.html" (dict "icon" "fas magnifying-glass fa-fw") }} {{ T "ui_search" }}
|
||||
</a>
|
||||
<a class="nav-link d-none d-{{ $size }}-block" href="#!" role="button" data-bs-toggle="modal" data-bs-target="#search-modal" aria-label="{{ T "ui_search" }}" aria-expanded="false">
|
||||
</a>
|
||||
</li>
|
||||
<li class="d-none d-{{ $size }}-block">
|
||||
<a class="nav-link" href="#!" role="button" data-bs-toggle="modal" data-bs-target="#search-modal" aria-label="{{ T "ui_search" }}" aria-expanded="false">
|
||||
{{ partial "assets/icon.html" (dict "icon" "fas magnifying-glass fa-fw") }}
|
||||
</a>
|
||||
</a>
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</div>
|
||||
|
@@ -32,7 +32,9 @@
|
||||
{{- if not $title }}{{ $title = .Title }}{{ end -}}
|
||||
{{- if not $href }}{{ $href = .RelPermalink }}{{ end -}}
|
||||
{{- if not $content }}{{ $content = .Content }}{{ end -}}
|
||||
{{- if not $thumbnail }}{{ $thumbnail = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) }}{{ end -}}
|
||||
{{- if not $thumbnail }}
|
||||
{{ if reflect.IsMap .Params.Thumbnail }}{{ $thumbnail = .Params.Thumbnail.url }}{{ else }}{{ $thumbnail = .Params.Thumbnail }}{{ end }}
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $class := .class -}}
|
||||
@@ -43,7 +45,7 @@
|
||||
{{- $rel := "" -}}
|
||||
{{- if and $isExternal $tab -}}
|
||||
{{- $target = "_blank" -}}
|
||||
{{- $rel = "noopener noreferrer" -}}
|
||||
{{- $rel = "noopener noreferrer nofollow" -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Inline partial to render the card's body -->
|
||||
|
@@ -143,7 +143,7 @@
|
||||
|
||||
<div class="container-fluid {{ with $background }} bg-{{ . }}{{ end }} p-0">
|
||||
<div class="container-xxl {{ $wrapper }}">
|
||||
{{- partial "assets/section-header.html" (dict "title" $title "description" $description "content" $content) -}}
|
||||
{{- partial "assets/section-header.html" (dict "title" $title "description" $description "content" $content) -}}
|
||||
{{ if eq $layout "card" }}
|
||||
{{- $partial = "assets/card-group.html" -}}
|
||||
{{- $params = merge $params (dict
|
||||
|
@@ -58,8 +58,8 @@
|
||||
{{ partial "assets/button.html" (dict "toast" $target "clipboard" $clipboard "href" $url "icon" (printf "%s fa-fw" $item.icon) "class" "btn-social p-0" "label" (T "shareLink" $item.name) "spacing" false) }}
|
||||
{{- end -}}
|
||||
{{ if $page.Site.Params.sharing.webshare }}
|
||||
{{ $attr := dict "data-sharing-title" .Title "data-sharing-description" .Description "data-sharing-url" .Permalink }}
|
||||
{{ partial "assets/button.html" (dict "href" "#!" "icon" "fas share-nodes fa-fw" "id" "btn-webshare" "class" "btn-social p-0" "attributes" $attr "label" (T "shareLink" (T "shareSystem")) "spacing" false) }}
|
||||
{{ $attr := dict "data-sharing-title" $page.Title "data-sharing-description" $page.Description "data-sharing-url" $page.Permalink }}
|
||||
{{ partial "assets/button.html" (dict "href" "#!" "icon" "fas share-nodes fa-fw" "class" "btn-social p-0" "attributes" $attr "label" (T "shareLink" (T "shareSystem")) "spacing" false) }}
|
||||
{{- end -}}
|
||||
{{ with $download }}
|
||||
{{ $label := (T "download" ) }}
|
||||
|
@@ -26,7 +26,7 @@
|
||||
{{- $group := .group -}}
|
||||
{{- $data := .menu -}}
|
||||
|
||||
{{- $doc_slug := urls.JoinPath $baseURL ($group.title | urlize) -}}
|
||||
{{- $doc_slug := partial "utilities/URLJoin.html" (dict "base" $baseURL "path" ($group.title | urlize)) -}}
|
||||
{{- $href := or $group.link $doc_slug -}}
|
||||
{{- $collapsed := strings.HasPrefix $page.RelPermalink $href -}}
|
||||
|
||||
@@ -78,10 +78,10 @@
|
||||
{{ if hasPrefix . "http" }}
|
||||
{{ $href = . }}
|
||||
{{ else }}
|
||||
{{- $href = urls.JoinPath $baseURL . -}}
|
||||
{{- $href = partial "utilities/URLJoin.html" (dict "base" $baseURL "path" .) -}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{- $href = urls.JoinPath $baseURL ($title | urlize) -}}
|
||||
{{- $href = partial "utilities/URLJoin.html" (dict "base" $baseURL "path" ($title | urlize)) -}}
|
||||
{{ end }}
|
||||
{{- $active := eq (strings.TrimSuffix "/" $page.RelPermalink) (strings.TrimSuffix "/" $href) -}}
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
{{- $sectionBreak := false -}}
|
||||
{{- $level := 0 -}}
|
||||
{{ $baseURL := $page.Scratch.Get "baseURL" | default "/" -}}
|
||||
{{ $baseURL = urls.JoinPath "/" (strings.TrimPrefix $baseURL (urls.JoinPath $section $version | relLangURL)) }}
|
||||
{{ $baseURL = partial "utilities/URLJoin.html" (dict "elements" (slice "/" (strings.TrimPrefix $baseURL (urls.JoinPath $section $version | relLangURL)))) }}
|
||||
|
||||
<ul class="list-unstyled ps-0">
|
||||
{{- range $index, $item := $data -}}
|
||||
|
@@ -24,19 +24,17 @@
|
||||
{{- $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\"" -}}
|
||||
{{ $regex := `<table\s*class="(.+?)"` }}
|
||||
{{ $current := (index (index (findRESubmatch $regex $input) 0) 1) }}
|
||||
{{ $target := delimit (((split $current " ") | append "table" | append $class) | uniq) " " }}
|
||||
|
||||
{{ $attributes := "" }}
|
||||
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
||||
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=true" $attributes }}{{ end }}
|
||||
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
|
||||
|
||||
{{- $old := "<table>" -}}
|
||||
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
||||
|
||||
{{ $input := replace $input $old $new -}}
|
||||
{{- $new := printf `<table class="%s" %s` $target (trim $attributes " ") -}}
|
||||
{{ $input := replaceRE $regex $new $input 1 -}}
|
||||
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
|
||||
{{ $input | safeHTML }}
|
||||
{{- with $responsive }}</div>{{ end -}}
|
148
layouts/partials/assets/video.html
Normal file
148
layouts/partials/assets/video.html
Normal file
@@ -0,0 +1,148 @@
|
||||
<!--
|
||||
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.
|
||||
|
||||
This source code adapts the original embedded shortcode as maintained by the Hugo repository. It introduces the
|
||||
following modifications:
|
||||
- Isolated the styles to comply with the Content Security Policy
|
||||
- Added validation of shortcode arguments
|
||||
- Added support to retrieve the title from the video metadata
|
||||
- Adjusted autoplay configuration
|
||||
- Modified the layout
|
||||
|
||||
The original source code is available on:
|
||||
https://github.com/gohugoio/hugo/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
|
||||
https://github.com/gohugoio/hugo/tpl/tplimpl/embedded/templates/shortcodes/vimeo.html
|
||||
Copyright 2022 The Hugo Authors. Licensed under the Apache License, Version 2.0.
|
||||
-->
|
||||
|
||||
{{ $error := false }}
|
||||
|
||||
<!-- Validate arguments -->
|
||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "video" "args" . "group" "partial") }}
|
||||
{{- errorf "partial [assets/video.html] - Invalid arguments" -}}
|
||||
{{ $error = true }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize arguments -->
|
||||
{{- $page := .page -}}
|
||||
{{- $position := .position -}}
|
||||
{{- $host := .host -}}
|
||||
{{- $title := .title -}}
|
||||
{{- $class := .class -}}
|
||||
{{- $account := .account -}}
|
||||
{{- $id := .id -}}
|
||||
{{- $autoplay := .autoplay -}}
|
||||
{{- $autotitle := .autotitle -}}
|
||||
{{- $ratio := .ratio -}}
|
||||
{{- $pc := "" -}}
|
||||
{{- if eq $host "youtube" }}
|
||||
{{- $pc = $page.Site.Config.Privacy.YouTube -}}
|
||||
{{- else if eq $host "vimeo" }}
|
||||
{{- $pc = $page.Site.Config.Privacy.Vimeo -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ if and (eq $host "youtube") ($pc.Disable) }}
|
||||
{{- errorf "partial [assets/video.html] - YouTube video disabled in site's privacy settings" -}}
|
||||
{{ $error = true }}
|
||||
{{ else if and (eq $host "vimeo") ($pc.Disable) }}
|
||||
{{- errorf "partial [assets/video.html] - Vimeo video disabled in site's privacy settings" -}}
|
||||
{{ $error = true }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not $account }}
|
||||
{{ with index $page.Site.Params.videos $host }}
|
||||
{{ with index . "account" }}{{ $account = . }}{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $origin := $position }}
|
||||
{{ if not $origin }}{{ with $page.File }}{{ $origin = .Path }}{{ end }}{{ end }}
|
||||
|
||||
<!-- Main code -->
|
||||
{{ if not $error -}}
|
||||
{{ if eq $host "youtube" }}
|
||||
{{- $host := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
|
||||
{{ $url := printf "https://%s/embed/%s?origin=%s" $host $id $page.Site.BaseURL }}
|
||||
{{ $api := printf "https://www.youtube.com/oembed?format=json&url=%s" (printf "https://www.youtube.com/watch?v=%s" $id) }}
|
||||
{{ $padding := "56.25%" }}
|
||||
|
||||
{{ with resources.GetRemote $api }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "Unable to parse video metadata '%q': %s\n %s" $api $origin . }}
|
||||
{{ else }}
|
||||
{{ $data := . | transform.Unmarshal }}
|
||||
{{ if $autotitle }}{{ with $data.title }}{{ $title = . }}{{ end }}{{ end }}
|
||||
{{ $padding = printf "%.2f%%" (mul (div $data.height $data.width) 100) }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Unable to get video metadata '%q': %s" $api $origin }}
|
||||
{{ end }}
|
||||
|
||||
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
|
||||
<iframe src="{{ $url }}{{ if $autoplay }}&autoplay=1&mute=1{{ end }}"
|
||||
allowfullscreen title="{{ $title }}" {{ if $autoplay }}allow="autoplay"{{ end }}>
|
||||
</iframe>
|
||||
</div>
|
||||
{{ else if eq $host "vimeo" }}
|
||||
{{ $url := printf "https://player.vimeo.com/video/%s" $id }}
|
||||
{{ $params := "" }}
|
||||
{{ if $autoplay }}{{ $params = print $params "&autoplay=1&muted=1" }}{{ end }}
|
||||
{{ if $pc.EnableDNT }}{{ $params = print $params "&dnt=1" }}{{ end }}
|
||||
{{ $params = strings.TrimPrefix "&" $params }}
|
||||
{{ with $params }}{{ $url = printf "%s?%s" $url . }}{{ end }}
|
||||
{{ $padding := "56.25%" }}
|
||||
|
||||
{{- $dnt := cond $pc.EnableDNT 1 0 -}}
|
||||
{{- $query := querify "url" $url "dnt" $dnt -}}
|
||||
{{- $api := printf "https://vimeo.com/api/oembed.json?%s" $query -}}
|
||||
{{- with resources.GetRemote $api -}}
|
||||
{{ with .Err }}
|
||||
{{ errorf "Unable to parse video metadata '%q': %s\n %s" $api $origin . }}
|
||||
{{ else }}
|
||||
{{ $data := . | transform.Unmarshal }}
|
||||
{{ if $autotitle }}{{ with $data.title }}{{ $title = . }}{{ end }}{{ end }}
|
||||
{{ $padding = printf "%.2f%%" (mul (div $data.height $data.width) 100) }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
|
||||
<iframe src="{{ $url | safeHTMLAttr }}" title="{{ $title }}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
|
||||
</iframe>
|
||||
</div>
|
||||
{{ else if eq $host "cloudinary" }}
|
||||
{{ if not $account }}
|
||||
{{ errorf "Missing account name for Cloudinary video '%s': %s" $id $origin }}
|
||||
{{ end }}
|
||||
|
||||
{{ $url := printf "https://player.cloudinary.com/embed/?cloud_name=%s&public_id=%s" $account $id }}
|
||||
{{ $params := "&controls=true" }}
|
||||
{{ if $autoplay }}{{ $params = print $params "&autoplay=true&muted=true" }}{{ end }}
|
||||
{{ with $params }}{{ $url = print $url . }}{{ end }}
|
||||
{{ $padding := "56.25%" }}
|
||||
|
||||
{{ $thumbnail := partial "utilities/URLJoin.html" (dict "base" (path.Dir $id) "path" (printf "%s.jpg" (path.BaseName $id))) }}
|
||||
{{ $metadata := partial "assets/helpers/image-dimension.html" (dict
|
||||
"page" $page
|
||||
"url" (printf "https://res.cloudinary.com/%s/video/upload/%s" $account (path.Clean $thumbnail))
|
||||
"ratio" $ratio
|
||||
"imageset" false
|
||||
) }}
|
||||
{{ $height := index $metadata "height" }}
|
||||
{{ $width := index $metadata "width" }}
|
||||
{{ if and $height $width }}
|
||||
{{ $padding := printf "%.2f%%" (mul (div (float $height) $width) 100) }}
|
||||
{{ if not $title }}{{ $title = printf "Cloudinary video '%s'" (path.BaseName $id) }}{{ end }}
|
||||
|
||||
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
|
||||
<iframe src="{{ $url | safeHTMLAttr }}" title="{{ $title }}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
|
||||
</iframe>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ errorf "Cannot retrieve metadata of Cloudinary video '%s' with account '%s': %s" $id $account $origin }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ warnf "partial [assets/video.html] - Unsupported video provider: %s" $host }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
@@ -3,7 +3,7 @@
|
||||
<small>
|
||||
{{- $copyright := printf "%s © %s %s %s." (T "copyright") (dateFormat "2006" now) .Site.Title (T "rights") }}
|
||||
{{ cond (gt (len .Site.Copyright) 0) .Site.Copyright $copyright }}
|
||||
{{ .Site.Params.footer.license | safeHTML }}
|
||||
{{ .Site.Params.footer.license | safeHTML }} |
|
||||
{{ if .Site.Params.main.endorse }}
|
||||
{{ $link := partial "assets/link.html" (dict "destination" (index site.Params.links "hinode") "text" "Hinode" "class" "link-bg-footer" "page" .Page) }}
|
||||
{{ T "poweredBy" $link | safeHTML }}
|
||||
|
@@ -1,46 +0,0 @@
|
||||
{{ $page_modules := slice }}
|
||||
{{ if reflect.IsMap .Params.modules }}
|
||||
{{ $page_modules = .Params.modules }}
|
||||
{{ else }}
|
||||
{{ $page_modules = $page_modules | append .Params.modules }}
|
||||
{{ end }}
|
||||
{{ with .Scratch.Get "dependencies" }}{{ $page_modules = append $page_modules . | uniq }}{{ end }}
|
||||
|
||||
{{ $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 $config.disableTemplate -}}
|
||||
{{- if in $config.disableTemplate $mod}}
|
||||
{{- $skipTemplate = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $state := "" }}
|
||||
{{- with (index $config.modules $mod) -}}
|
||||
{{- with index . "state" }}{{ $state = . }}{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $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 -}}
|
@@ -6,72 +6,170 @@
|
||||
|
||||
{{ $error := false }}
|
||||
|
||||
<!-- Validate arguments -->
|
||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "scripts" "args" . "group" "partial") }}
|
||||
{{- errorf "partial [footer/scripts.html] - Invalid arguments" -}}
|
||||
{{ $error = true }}
|
||||
<!-- Define inline partials -->
|
||||
{{ define "partials/match.html" }}
|
||||
{{ $result := "" }}
|
||||
{{ $matches := slice }}
|
||||
{{ if gt (len .modules) 0 }}
|
||||
{{ range .modules }}
|
||||
{{ $matches = $matches | append (printf "js/modules/%s/**.js" .) }}
|
||||
{{ end }}
|
||||
{{ $result = printf "{%s}" (delimit $matches ",") }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $result }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/bundle-script.html" }}
|
||||
{{ $page := .page }}
|
||||
{{ $match := .match }}
|
||||
{{ $destination := .destination }}
|
||||
{{ $cat := .cat }}
|
||||
{{ $localize := .localize }}
|
||||
{{ $modules := .modules }}
|
||||
{{ $skipTemplate := .skipTemplate }}
|
||||
{{ $absoluteURL := .absoluteURL }}
|
||||
{{ $state := cond (ne .state "immediate") .state "" }}
|
||||
|
||||
{{ if and $cat (ne $cat "other") }}
|
||||
{{ $destination = path.Join (path.Dir $destination) (printf "%s-%s%s" (path.BaseName $destination) $cat (path.Ext $destination)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $localize }}
|
||||
{{ $destination = path.Join (path.Dir $destination) (printf "%s.%s%s" (path.BaseName $destination) $page.Language.Lang (path.Ext $destination)) }}
|
||||
{{ end }}
|
||||
|
||||
{{- $bundle := partial "utilities/bundle.html" (dict
|
||||
"match" $match
|
||||
"filename" $destination
|
||||
"modules" $modules
|
||||
"basepath" "js/modules"
|
||||
"all" true
|
||||
"debugging" site.Params.debugging.showJS
|
||||
) -}}
|
||||
{{- $js := $bundle -}}
|
||||
{{- if not $skipTemplate -}}
|
||||
{{- $js = $bundle | resources.ExecuteAsTemplate $destination $page -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if gt (len $js.Content) 0 -}}
|
||||
{{ $integrity := "" }}
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{ $js = $js | minify | fingerprint -}}
|
||||
{{ $integrity = $js.Data.Integrity }}
|
||||
{{ end -}}
|
||||
{{ partial "templates/script.html" (dict "link" (cond $absoluteURL $js.Permalink $js.RelPermalink) "category" $cat "state" $state "integrity" $integrity) }}
|
||||
{{ end -}}
|
||||
{{ 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}" -}}
|
||||
{{- $page := .page -}}
|
||||
{{- $header := .header -}}
|
||||
{{- $core := .core | default false -}}
|
||||
{{- $skipTemplate := .skipTemplate | default false -}}
|
||||
{{- $localize := .localize | default false }}
|
||||
|
||||
{{- $state := .state | default "async" -}}
|
||||
{{- if or $header (eq $state "immediate") }}{{ $state = "" }}{{ end -}}
|
||||
|
||||
{{- $modules := "" -}}
|
||||
{{ if $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 -}}
|
||||
|
||||
{{ if $localize }}
|
||||
{{ $filename = path.Join (path.Dir $filename) (printf "%s.%s%s" (path.BaseName $filename) $page.Language.Lang (path.Ext $filename)) }}
|
||||
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "scripts" "args" .) }}
|
||||
{{ if $args.err }}
|
||||
{{ partial "utilities/LogErr.html" (dict
|
||||
"partial" "footer/scripts.html"
|
||||
"msg" "Invalid arguments"
|
||||
"details" $args.errmsg
|
||||
"file" page.File
|
||||
)}}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize local arguments -->
|
||||
{{ $patterns := dict
|
||||
"other" "js/critical/*.js"
|
||||
"functional" "js/critical/functional/**.js"
|
||||
"analytics" "js/critical/analytics/**.js"
|
||||
"performance" "js/critical/performance/**.js"
|
||||
"advertisement" "js/critical/advertisement/**.js"
|
||||
"core" "{js/*.js,js/vendor/**.js}"
|
||||
}}
|
||||
|
||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
||||
{{ $state := "immediate" }}
|
||||
{{ $config := $args.page.Scratch.Get "modules" }}
|
||||
|
||||
{{ $page_modules := slice }}
|
||||
{{ if reflect.IsMap $args.page.Params.modules }}
|
||||
{{ $page_modules = $args.page.Params.modules }}
|
||||
{{ else }}
|
||||
{{ $page_modules = $page_modules | append $args.page.Params.modules }}
|
||||
{{ end }}
|
||||
{{ with $args.page.Scratch.Get "dependencies" }}{{ $page_modules = append $page_modules . | uniq }}{{ end }}
|
||||
|
||||
{{- $categories := dict "other" slice -}}
|
||||
|
||||
{{ $modules := slice }}
|
||||
{{ if eq $args.type "critical" }}
|
||||
{{- $modules = $config.critical -}}
|
||||
{{ $categories = merge $categories (dict "functional" slice "analytics" slice "performance" slice "advertisement" slice) }}
|
||||
{{ else if eq $args.type "core" }}
|
||||
{{- $modules = $config.core -}}
|
||||
{{ else if eq $args.type "optional" }}
|
||||
{{- $modules = $config.optional | intersect $page_modules -}}
|
||||
{{ end }}
|
||||
|
||||
{{ range $cat, $val := $config.categories }}
|
||||
{{ $categories = merge $categories (dict $cat (intersect $val $modules)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $localize := false }}
|
||||
{{ if gt (intersect (or $config.localize slice) $modules | len) 0 }}{{ $localize = true }}{{ end }}
|
||||
|
||||
{{ $skipTemplate := false }}
|
||||
{{ if gt (intersect (or $config.skipTemplate slice) $modules | len) 0 }}{{ $skipTemplate = true }}{{ 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 -}}
|
||||
{{- end -}}
|
||||
{{ if not $error }}
|
||||
<!-- include external scripts first -->
|
||||
{{ range $mod, $cfg := $config.modules }}
|
||||
{{ if in $modules $mod }}
|
||||
{{ if or (index $cfg "local") (not hugo.IsServer) }}
|
||||
{{ with index $cfg "url" }}
|
||||
{{ partial "templates/script.html" (dict "link" . "category" (index $cfg "category") "state" (index $cfg "state")) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- if and (not hugo.IsServer) $header -}}
|
||||
{{- $pc := site.Config.Privacy.GoogleAnalytics -}}
|
||||
{{- if and (not $pc.Disable) (hasPrefix site.Config.Services.GoogleAnalytics.ID "G-") }}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.Config.Services.GoogleAnalytics.ID }}"></script>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
<!-- Bundle the critical and core scripts by category -->
|
||||
{{ if ne $args.type "optional" }}
|
||||
{{ range $cat, $val := $categories }}
|
||||
{{ if or (gt ($val | len) 0) (eq $args.type "critical") }}
|
||||
{{ $match := "" }}
|
||||
{{ if eq $args.type "critical" }}
|
||||
{{ $match = index $patterns $cat }}
|
||||
{{ else if eq $cat "other" }}
|
||||
{{ $match = index $patterns $args.type }}
|
||||
{{ end }}
|
||||
|
||||
{{- if gt (len $js.Content) 0 -}}
|
||||
{{- if not hugo.IsProduction -}}
|
||||
<script src="{{ if $absoluteURL }}{{ $js.Permalink }}{{ else }}{{ $js.RelPermalink }}{{ end }}"{{ with $state }} {{ . | safeHTMLAttr }}{{ end }}></script>
|
||||
{{ else -}}
|
||||
{{ $js = $js | minify | fingerprint -}}
|
||||
<script src="{{ if $absoluteURL }}{{ $js.Permalink }}{{ else }}{{ $js.RelPermalink }}{{ end }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"{{ with $state}} {{ . | safeHTMLAttr }}{{ end }}></script>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ partial "partials/bundle-script.html" (dict
|
||||
"page" $args.page
|
||||
"match" $match
|
||||
"destination" (printf "js/%s.bundle.js" $args.type)
|
||||
"cat" $cat
|
||||
"modules" $val
|
||||
"localize" $localize
|
||||
"skipTemplate" $skipTemplate
|
||||
"absoluteURL" $absoluteURL
|
||||
"state" (cond (eq $args.type "critical") "immediate" "async")
|
||||
)}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<!-- Bundle the optional scripts by module name and category -->
|
||||
{{ range $cat, $val := $categories }}
|
||||
{{ range $val }}
|
||||
{{ $modconfig := index $config.modules . }}
|
||||
{{ partial "partials/bundle-script.html" (dict
|
||||
"page" $args.page
|
||||
"destination" (printf "js/%s.js" .)
|
||||
"cat" $cat
|
||||
"modules" (slice .)
|
||||
"localize" $modconfig.localize
|
||||
"skipTemplate" $modconfig.disabletemplate
|
||||
"absoluteURL" $absoluteURL
|
||||
"state" $modconfig.state
|
||||
)}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="col col-6 text-sm-start">
|
||||
{{ range .Site.Menus.social -}}
|
||||
<a href="{{ .URL }}" {{ if $tab }} target="_blank" rel="noopener noreferrer"{{ end }} aria-label="{{ .Name | safeHTML }}" class="text-decoration-none link-secondary d-inline p-2">
|
||||
<a href="{{ .URL }}" {{ if $tab }} target="_blank" rel="noopener noreferrer nofollow"{{ end }} aria-label="{{ .Name | safeHTML }}" class="text-decoration-none link-secondary d-inline p-2">
|
||||
{{ if hasPrefix .Pre "<i" }}
|
||||
{{ .Pre | safeHTML }}
|
||||
{{ else }}
|
||||
|
@@ -1,19 +1,25 @@
|
||||
<!-- TODO: replace scratch with dict -->
|
||||
|
||||
<!-- Adapted from doks -->
|
||||
{{ with .Title -}}
|
||||
{{ with .Params.meta.title }}
|
||||
{{ $.Scratch.Set "title" . -}}
|
||||
{{ else -}}
|
||||
{{ $.Scratch.Set "title" .Site.Title -}}
|
||||
{{ end -}}
|
||||
{{ else }}
|
||||
{{ with .Title -}}
|
||||
{{ $.Scratch.Set "title" . -}}
|
||||
{{ else -}}
|
||||
{{ $.Scratch.Set "title" .Site.Title -}}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ $description := or (partial "utilities/GetDescription.html" (dict "page" .)) .Site.Params.main.description }}
|
||||
{{ $description := or (partial "utilities/GetDescription.html" (dict "page" . "meta" true)) .Site.Params.main.description }}
|
||||
{{ if gt (strings.RuneCount $description) 150 }}
|
||||
{{ $description = print (substr $description 0 150) "..." }}
|
||||
{{ end }}
|
||||
{{ $.Scratch.Set "description" $description -}}
|
||||
|
||||
{{- $thumbnail := (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) -}}
|
||||
{{- $thumbnail := "" -}}
|
||||
{{ if reflect.IsMap .Params.Thumbnail }}{{ $thumbnail = .Params.Thumbnail.url }}{{ else }}{{ $thumbnail = .Params.Thumbnail }}{{ 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) -}}
|
||||
@@ -40,7 +46,7 @@
|
||||
{{ if eq .Kind "404" -}}
|
||||
<meta name="robots" content="noindex, follow">
|
||||
{{ else }}
|
||||
{{ with .Params.robots -}}
|
||||
{{ with or .Params.robots .Params.meta.robots -}}
|
||||
<meta name="robots" content="{{ . }}">
|
||||
{{ else -}}
|
||||
<meta name="robots" content="index, follow">
|
||||
|
@@ -21,9 +21,9 @@
|
||||
|
||||
{{ if $core }}
|
||||
{{- if reflect.IsSlice $config.excludeSCSS -}}
|
||||
{{- $modules = complement $config.excludeSCSS (or $config.core slice) -}}
|
||||
{{- $modules = complement $config.excludeSCSS (append $config.core $config.critical) -}}
|
||||
{{ else }}
|
||||
{{- $modules = $config.core -}}
|
||||
{{- $modules = append $config.core $config.critical -}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
-}}
|
||||
|
||||
{{- $options := (dict "transpiler" $transpiler "targetPath" $target "enableSourceMap" (not hugo.IsProduction) "vars" $vars) -}}
|
||||
{{- $bundle := partial "utilities/bundle" (dict "match" $source "filename" (printf "scss/bundle-%d.scss" now.UnixNano) "modules" $modules "basepath" "scss" "debugging" site.Params.debugging.showSCSS) -}}
|
||||
{{- $bundle := partial "utilities/bundle.html" (dict "match" $source "filename" (printf "scss/bundle-%d.scss" now.UnixNano) "modules" $modules "basepath" "scss" "debugging" site.Params.debugging.showSCSS) -}}
|
||||
|
||||
{{- if gt ($bundle.Content | len) 0 }}
|
||||
{{- $css := $bundle | resources.ExecuteAsTemplate $target . | toCSS $options -}}
|
||||
@@ -73,7 +73,7 @@
|
||||
{{ end }}
|
||||
{{- if site.Params.style.purge -}}
|
||||
{{- $post_options := dict "config" "config" "noMap" hugo.IsProduction -}}
|
||||
{{- $css = $css | resources.PostCSS $post_options -}}
|
||||
{{- $css = $css | css.PostCSS $post_options -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not hugo.IsProduction -}}
|
||||
|
@@ -61,7 +61,8 @@
|
||||
{{ partial "assets/icon.html" (dict "icon" "mode" $mode $icon "wrapper" "col-6 mx-auto text-center")}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $page.Params.Thumbnail) $page.Params.Thumbnail.url) $page.Params.Thumbnail) -}}
|
||||
{{- $thumbnail := "" -}}
|
||||
{{ if reflect.IsMap $page.Params.Thumbnail }}{{ $thumbnail = $page.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $page.Params.Thumbnail }}{{ end }}
|
||||
{{- if $thumbnail }}
|
||||
{{ partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "sizes" $sizes "wrapper" $style "class" "rounded" "title" $page.Site.Title "priority" "high") }}
|
||||
{{ end }}
|
||||
|
26
layouts/partials/templates/script.html
Normal file
26
layouts/partials/templates/script.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<!-- Initialize arguments -->
|
||||
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "script" "args" .) }}
|
||||
{{ if $args.err }}
|
||||
{{ partial "utilities/LogErr.html" (dict
|
||||
"partial" "templates/script.html"
|
||||
"msg" "Invalid arguments"
|
||||
"details" $args.errmsg
|
||||
"file" page.File
|
||||
)}}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize local arguments -->
|
||||
{{ $category := cond (ne $args.category "other") $args.category "" }}
|
||||
|
||||
<!-- Main code -->
|
||||
<script src="{{ $args.link }}"
|
||||
{{- with $category }} data-category="{{ . }}"{{ end -}}
|
||||
{{- with $args.integrity }}integrity="{{ . }}" crossorigin="anonymous"{{ end }}
|
||||
{{- with $args.state }} {{ . | safeHTMLAttr }}{{ end -}}>
|
||||
</script>
|
@@ -1,7 +1,7 @@
|
||||
{{ with .module }}
|
||||
{{- $dependencies := page.Scratch.Get "dependencies" -}}
|
||||
{{- if reflect.IsSlice $dependencies -}}
|
||||
{{- $dependencies = complement $dependencies . -}}
|
||||
{{- $dependencies = complement $dependencies (slice .) -}}
|
||||
{{ else }}
|
||||
{{- $dependencies = slice . -}}
|
||||
{{ end }}
|
||||
|
@@ -12,7 +12,8 @@
|
||||
{{ $illustration = partial "assets/icon.html" (dict "icon" "mode" $mode $icon "wrapper" "mx-auto text-center")}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
|
||||
{{- $thumbnail := "" -}}
|
||||
{{ if reflect.IsMap $item.Params.Thumbnail }}{{ $thumbnail = $item.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $item.Params.Thumbnail }}{{ end }}
|
||||
{{- if $thumbnail }}
|
||||
{{ $illustration = partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "wrapper" $style "inner" "rounded" "title" $item.Site.Title) }}
|
||||
{{ end }}
|
||||
|
@@ -46,7 +46,8 @@
|
||||
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $sectionPage.Params.Thumbnail) $sectionPage.Params.Thumbnail.url) $sectionPage.Params.Thumbnail) -}}
|
||||
{{- $thumbnail := "" -}}
|
||||
{{ if reflect.IsMap $sectionPage.Params.Thumbnail }}{{ $thumbnail = $sectionPage.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $sectionPage.Params.Thumbnail }}{{ end }}
|
||||
{{- $icon := $sectionPage.Params.Icon -}}
|
||||
{{- $content := "" -}}
|
||||
{{ if not $sectionPage.IsSection }}{{ $content = $sectionPage.Content }}{{ end -}}
|
||||
|
@@ -1,28 +1,18 @@
|
||||
{{ $page := .page }}
|
||||
|
||||
{{ $critical := slice }}
|
||||
{{ $core := slice }}
|
||||
{{ $optional := slice }}
|
||||
{{ $excludeSCSS := slice }}
|
||||
{{ $disableTemplate := slice }}
|
||||
{{ $localize := slice }}
|
||||
{{ $category := dict }}
|
||||
{{ $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 }}
|
||||
{{ range $key, $mod := .Site.Params.modules }}
|
||||
{{ if reflect.IsMap $mod }}
|
||||
{{ $integration := index $mod "integration" }}
|
||||
{{ if eq $integration "core" }}
|
||||
{{ if eq $integration "critical" }}
|
||||
{{ $critical = $critical | append $key }}
|
||||
{{ else if eq $integration "core" }}
|
||||
{{ $core = $core | append $key }}
|
||||
{{ else if eq $integration "optional" }}
|
||||
{{ $optional = $optional | append $key }}
|
||||
@@ -42,6 +32,12 @@
|
||||
{{ $localize = $localize | append $key }}
|
||||
{{ end }}
|
||||
|
||||
{{ $categoryKey := "other" }}
|
||||
{{ with (index $mod "category") }}{{ $categoryKey = . }}{{ end }}
|
||||
{{ $cat := index $category $categoryKey | default slice }}
|
||||
{{ $cat = $cat | append $key}}
|
||||
{{ $category = merge $category (dict $categoryKey $cat) }}
|
||||
|
||||
{{ $modules = merge $modules (dict $key $mod) }}
|
||||
{{ else }}
|
||||
{{ warnf "Unsupported module parameter: %s" $key }}
|
||||
@@ -50,14 +46,16 @@
|
||||
|
||||
{{ $modules := dict
|
||||
"modules" $modules
|
||||
"critical" $critical
|
||||
"core" $core
|
||||
"optional" $optional
|
||||
"excludeSCSS" $excludeSCSS
|
||||
"disableTemplate" $disableTemplate
|
||||
"localize" $localize
|
||||
"categories" $category
|
||||
}}
|
||||
|
||||
{{- if and $page.IsPage (not (in $core "bootstrap")) -}}
|
||||
{{- if and .IsPage (not (in $core "bootstrap")) -}}
|
||||
{{- errorf "Bootstrap is a required module, please add it to 'modules.core' in your site parameters" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@@ -39,6 +39,11 @@
|
||||
{{ if isset .Params "full" }}{{ $full = partial "utilities/CastBool.html" (.Get "full") }}{{ end -}}
|
||||
{{- $class := .Get "class" | default "" -}}
|
||||
|
||||
{{ if not (fileExists $file) }}
|
||||
{{ warnf "Cannot find file: '%q'. See %s" $file $.Position }}
|
||||
{{ $error = true }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Main code -->
|
||||
{{- if not $error -}}
|
||||
{{- /* Force-check if the file exists */ -}}
|
||||
|
@@ -81,7 +81,9 @@
|
||||
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }}
|
||||
{{- if not $ref -}}
|
||||
{{ $pageContext := "" }}
|
||||
{{ with .Page.File }}{{ $pageContext = path.Join "/content" .Dir }}{{ end }}
|
||||
{{ with .Page.File }}
|
||||
{{ $pageContext = path.Dir (strings.TrimPrefix hugo.WorkingDir .Filename) }}
|
||||
{{ end }}
|
||||
{{ $isPageRes := fileExists (path.Join $pageContext $url) }}
|
||||
{{ $isStatic := fileExists (path.Join "/static" $url) }}
|
||||
{{ if and (not $isPageRes) (not $isStatic) }}
|
||||
|
@@ -60,19 +60,23 @@
|
||||
{{ end }}
|
||||
|
||||
<!-- Main code -->
|
||||
<div class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
|
||||
<div class="{{ with $type }} nav-{{ . }}{{ end }}">
|
||||
{{ if $vertical }}<div class="row"><div class="col-auto">{{ end }}
|
||||
<ul class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
|
||||
{{- range $index, $item := $items -}}
|
||||
{{- $header := partial "utilities/GetVal.html" $item -}}
|
||||
{{- $itemDisabled := in $disabled $index -}}
|
||||
<button class="nav-link{{ if not $wrap }} text-nowrap{{ end }}{{ if eq $index $showID }} active{{ end }}{{ if $itemDisabled}} disabled {{end }}" id="{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#{{ $id }}-{{ $index }}"
|
||||
type="button" role="tab" aria-controls="{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
|
||||
{{ $header }}
|
||||
</button>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link{{ if not $wrap }} text-nowrap{{ end }}{{ if eq $index $showID }} active{{ end }}{{ if $itemDisabled}} disabled {{end }}" id="{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#{{ $id }}-{{ $index }}"
|
||||
type="button" role="tab" {{ if $hasContent }}aria-controls="{{ $id }}-{{ $index }}"{{ end }} aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
|
||||
{{ $header }}
|
||||
</button>
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
{{ if $vertical }}</div><div class="col">{{ end }}
|
||||
{{- if $hasContent -}}
|
||||
<div class="tab-content w-100 {{ if not $vertical }} {{ end }}{{ if eq $type "tabs" }}border border-bottom-0 p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}">
|
||||
<div class="tab-content w-100 {{ if eq $type "tabs" }}border p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}">
|
||||
{{- $inner | safeHTML -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
@@ -30,20 +30,21 @@
|
||||
{{ end }}
|
||||
|
||||
<!-- Main code -->
|
||||
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
|
||||
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
|
||||
|
||||
{{- $input := .Inner | .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\"" -}}
|
||||
{{ $regex := `<table\s*class="(.+?)"` }}
|
||||
{{ $current := (index (index (findRESubmatch $regex $input) 0) 1) }}
|
||||
{{ $target := delimit (((split $current " ") | append "table" | append $class) | uniq) " " }}
|
||||
|
||||
{{ $attributes := "" }}
|
||||
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
||||
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=true" $attributes }}{{ end }}
|
||||
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
|
||||
|
||||
{{- $old := "<table>" -}}
|
||||
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
||||
{{ $input := replace $input $old $new -}}
|
||||
{{- $new := printf `<table class="%s" %s` $target (trim $attributes " ") -}}
|
||||
{{ $input := replaceRE $regex $new $input 1 -}}
|
||||
|
||||
{{ if not $error }}
|
||||
{{ if eq $breakpoint "none" }}
|
||||
{{ $input | safeHTML }}
|
||||
|
50
layouts/shortcodes/video.html
Normal file
50
layouts/shortcodes/video.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
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" "video" "args" .Params "group" "shortcode") }}
|
||||
{{ errorf "Invalid arguments: %s" .Position -}}
|
||||
{{ $error = true }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize arguments -->
|
||||
{{- $host := "youtube" -}}
|
||||
{{- $account := "" -}}
|
||||
{{- $id := "" -}}
|
||||
{{- $class := "" -}}
|
||||
{{- $title := "" }}
|
||||
{{- $autoplay := false }}
|
||||
{{- $autotitle := false }}
|
||||
|
||||
{{- if .IsNamedParams }}
|
||||
{{ with .Get "host" }}{{ $host = . }}{{ end }}
|
||||
{{ with .Get "account" }}{{ $account = . }}{{ end }}
|
||||
{{ with .Get "id" }}{{ $id = . }}{{ end }}
|
||||
{{ with .Get "class" }}{{ $class = . }}{{ end }}
|
||||
{{ with .Get "title" }}{{ $title = . }}{{ end }}
|
||||
{{ if isset .Params "autoplay" }}{{ $autoplay = partial "utilities/CastBool.html" (.Get "autoplay") }}{{ end -}}
|
||||
{{ if isset .Params "autotitle" }}{{ $autotitle = partial "utilities/CastBool.html" (.Get "autotitle") }}{{ end -}}
|
||||
{{ else }}
|
||||
{{- $id = .Get 0 -}}
|
||||
{{- $class = .Get 1 -}}
|
||||
{{ end }}
|
||||
|
||||
<!-- Main code -->
|
||||
{{ if not $error -}}
|
||||
{{ partial "assets/video.html" (dict
|
||||
"page" .Page
|
||||
"position" .Position
|
||||
"account" $account
|
||||
"host" $host
|
||||
"id" $id
|
||||
"class" $class
|
||||
"title" $title
|
||||
"autoplay" $autoplay
|
||||
"autotitle" $autotitle
|
||||
) }}
|
||||
{{ end -}}
|
46
layouts/shortcodes/vimeo.html
Normal file
46
layouts/shortcodes/vimeo.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!--
|
||||
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" "video" "args" .Params "group" "shortcode") }}
|
||||
{{ errorf "Invalid arguments: %s" .Position -}}
|
||||
{{ $error = true }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Initialize arguments -->
|
||||
{{- $host := "vimeo" -}}
|
||||
{{- $id := "" -}}
|
||||
{{- $class := "" -}}
|
||||
{{- $title := "Vimeo Video" }}
|
||||
{{- $autoplay := false }}
|
||||
{{- $autotitle := false }}
|
||||
|
||||
{{- if .IsNamedParams }}
|
||||
{{ with .Get "id" }}{{ $id = . }}{{ end }}
|
||||
{{ with .Get "class" }}{{ $class = . }}{{ end }}
|
||||
{{ with .Get "title" }}{{ $title = . }}{{ end }}
|
||||
{{ if isset .Params "autoplay" }}{{ $autoplay = partial "utilities/CastBool.html" (.Get "autoplay") }}{{ end -}}
|
||||
{{ if isset .Params "autotitle" }}{{ $autotitle = partial "utilities/CastBool.html" (.Get "autotitle") }}{{ end -}}
|
||||
{{ else }}
|
||||
{{- $id = .Get 0 -}}
|
||||
{{- $class = .Get 1 -}}
|
||||
{{ end }}
|
||||
|
||||
<!-- Main code -->
|
||||
{{ if not $error -}}
|
||||
{{ partial "assets/video.html" (dict
|
||||
"page" .Page
|
||||
"position" .Position
|
||||
"host" $host
|
||||
"id" $id
|
||||
"class" $class
|
||||
"title" $title
|
||||
"autoplay" $autoplay
|
||||
"autotitle" $autotitle
|
||||
) }}
|
||||
{{ end -}}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user