mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 18:14:28 +00:00
Compare commits
124 Commits
v0.26.2
...
v0.27.0-al
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 | ||
![]() |
ea8e851e45 | ||
![]() |
90e6c9869d | ||
![]() |
628eb99f62 | ||
![]() |
a0293cc081 | ||
![]() |
d37dcdd20c | ||
![]() |
f0ff631b0d | ||
![]() |
b84bd07073 | ||
![]() |
b800906956 | ||
![]() |
049b38d3c1 | ||
![]() |
27c2500c92 | ||
![]() |
a182b2a134 | ||
![]() |
43abf793b8 | ||
![]() |
e11fa8d377 | ||
![]() |
fb94544bb0 | ||
![]() |
67f687d6b9 | ||
![]() |
879efc07e8 | ||
![]() |
29bcb26d04 | ||
![]() |
e04a8dc0ed | ||
![]() |
c7e70bf933 | ||
![]() |
1700abc7de | ||
![]() |
3ef857dba9 | ||
![]() |
5acc2e8f9e | ||
![]() |
0caa00a1a1 | ||
![]() |
b27a5ac7cb | ||
![]() |
24261c9193 | ||
![]() |
d1aa9c0f7c | ||
![]() |
a18d387379 | ||
![]() |
2d9cbf9195 | ||
![]() |
64abda14ce | ||
![]() |
3625675577 | ||
![]() |
e6e115a65d | ||
![]() |
9832b566db | ||
![]() |
c5edb65550 |
@@ -1,7 +0,0 @@
|
|||||||
assets/js/critical/languageSelector.js
|
|
||||||
assets/js/critical/color.js
|
|
||||||
assets/js/analytics.js
|
|
||||||
assets/js/flexsearch.js
|
|
||||||
assets/js/sharing.js
|
|
||||||
assets/js/vendor
|
|
||||||
node_modules
|
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
const alert = document.getElementById('page-alert')
|
const alert = document.getElementById('page-alert')
|
||||||
const closeBtn = document.getElementById('page-alert-btn-close')
|
const closeBtn = document.getElementById('page-alert-btn-close')
|
||||||
if (alert !== null && closeBtn !== null) {
|
if (alert !== null && closeBtn !== null) {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
const fixed = {{ site.Params.navigation.fixed }}
|
||||||
const navbar = document.querySelector('.navbar')
|
const navbar = document.querySelector('.navbar')
|
||||||
const togglers = document.querySelectorAll('.main-nav-toggler')
|
const togglers = document.querySelectorAll('.main-nav-toggler')
|
||||||
const modeSelectors = document.querySelectorAll('.switch-mode-collapsed')
|
const modeSelectors = document.querySelectorAll('.switch-mode-collapsed')
|
||||||
@@ -20,7 +21,7 @@ function updateNavbar () {
|
|||||||
|
|
||||||
if ((navbar !== null) && (window.performance.getEntriesByType)) {
|
if ((navbar !== null) && (window.performance.getEntriesByType)) {
|
||||||
if (window.performance.getEntriesByType('navigation')[0].type === 'reload') {
|
if (window.performance.getEntriesByType('navigation')[0].type === 'reload') {
|
||||||
updateNavbar()
|
fixed && updateNavbar()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@ if (navbar !== null && togglers !== null) {
|
|||||||
attributeFilter: ['data-bs-theme']
|
attributeFilter: ['data-bs-theme']
|
||||||
}
|
}
|
||||||
const Observer = new MutationObserver((mutationrecords) => {
|
const Observer = new MutationObserver((mutationrecords) => {
|
||||||
updateNavbar()
|
fixed && updateNavbar()
|
||||||
})
|
})
|
||||||
Observer.observe(html, config)
|
Observer.observe(html, config)
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ if (navbar !== null && togglers !== null) {
|
|||||||
|
|
||||||
// set the navbar background color to opaque when scrolling past a breakpoint
|
// set the navbar background color to opaque when scrolling past a breakpoint
|
||||||
window.onscroll = () => {
|
window.onscroll = () => {
|
||||||
updateNavbar()
|
fixed && updateNavbar()
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the navbar background color to opaque when expanded
|
// set the navbar background color to opaque when expanded
|
||||||
|
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);
|
background-color: var(--#{$prefix}secondary-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-img-wrap {
|
.card .card-img-wrap {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
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 {
|
.card-zoom {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
@@ -315,3 +315,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar-overlay {
|
||||||
|
position: absolute;
|
||||||
|
z-index: $zindex-fixed;
|
||||||
|
}
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
.youtube-embedded {
|
.video-embedded {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-bottom: 56.25%;
|
padding-bottom: 56.25%;
|
||||||
height: 0;
|
height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.youtube-embedded > iframe {
|
.video-embedded > iframe {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
# toml-docs-start main
|
# toml-docs-start main
|
||||||
title = "Hinode"
|
title = "Hinode"
|
||||||
copyright = "Copyright © 2024 Mark Dumay."
|
copyright = "Copyright © 2024 Mark Dumay."
|
||||||
paginate = 9
|
|
||||||
enableGitInfo = true
|
enableGitInfo = true
|
||||||
# toml-docs-end main
|
# toml-docs-end main
|
||||||
|
|
||||||
@@ -49,6 +48,9 @@ home = ["HTML", "RSS", "REDIR"]
|
|||||||
[taxonomies]
|
[taxonomies]
|
||||||
tag = 'tags'
|
tag = 'tags'
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 9
|
||||||
|
|
||||||
[privacy]
|
[privacy]
|
||||||
[privacy.vimeo]
|
[privacy.vimeo]
|
||||||
disabled = false
|
disabled = false
|
||||||
@@ -95,7 +97,7 @@ home = ["HTML", "RSS", "REDIR"]
|
|||||||
[module]
|
[module]
|
||||||
[module.hugoVersion]
|
[module.hugoVersion]
|
||||||
extended = true
|
extended = true
|
||||||
min = "0.132.0"
|
min = "0.134.0"
|
||||||
max = ""
|
max = ""
|
||||||
[[module.mounts]]
|
[[module.mounts]]
|
||||||
source = "archetypes"
|
source = "archetypes"
|
||||||
|
@@ -27,11 +27,24 @@
|
|||||||
host = "imgix"
|
host = "imgix"
|
||||||
# toml-docs-end images
|
# 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
|
# toml-docs-start debugging
|
||||||
[debugging]
|
[debugging]
|
||||||
showJS = false
|
showJS = false
|
||||||
showSCSS = false
|
showSCSS = false
|
||||||
purgeHTMLComments = false
|
purgeHTMLComments = false
|
||||||
|
includeSVGOrigin = true
|
||||||
# toml-docs-end debugging
|
# toml-docs-end debugging
|
||||||
|
|
||||||
# toml-docs-start docs
|
# toml-docs-start docs
|
||||||
@@ -171,16 +184,16 @@
|
|||||||
# linkedIn = ""
|
# linkedIn = ""
|
||||||
github = "https://github.com/gethinode/hinode"
|
github = "https://github.com/gethinode/hinode"
|
||||||
section = "blog"
|
section = "blog"
|
||||||
[author]
|
[schema.author]
|
||||||
name = "Mark Dumay"
|
name = "Mark Dumay"
|
||||||
# twitter = "https://twitter.com/markdumay"
|
# twitter = "https://twitter.com/markdumay"
|
||||||
linkedin = "https://www.linkedin.com/in/markdumay/"
|
linkedin = "https://www.linkedin.com/in/markdumay/"
|
||||||
github = "https://github.com/markdumay"
|
github = "https://github.com/markdumay"
|
||||||
[logo]
|
[schema.logo]
|
||||||
url = "img/logo512x512.png"
|
url = "img/logo512x512.png"
|
||||||
width = 512
|
width = 512
|
||||||
height = 512
|
height = 512
|
||||||
[image]
|
[schema.image]
|
||||||
url = "img/logo1280x640.png"
|
url = "img/logo1280x640.png"
|
||||||
width = 1280
|
width = 1280
|
||||||
height = 640
|
height = 640
|
||||||
|
@@ -14,7 +14,7 @@ for = '/**'
|
|||||||
connect-src 'self'
|
connect-src 'self'
|
||||||
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
||||||
font-src 'self' https://fonts.gstatic.com; \
|
font-src 'self' https://fonts.gstatic.com; \
|
||||||
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
|
frame-src 'self' https://player.cloudinary.com https://player.vimeo.com 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; \
|
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
media-src 'self' \
|
media-src 'self' \
|
||||||
@@ -29,7 +29,6 @@ for = '/**'
|
|||||||
camera=(), \
|
camera=(), \
|
||||||
magnetometer=(), \
|
magnetometer=(), \
|
||||||
gyroscope=(), \
|
gyroscope=(), \
|
||||||
fullscreen=(), \
|
|
||||||
payment=() \
|
payment=() \
|
||||||
"""
|
"""
|
||||||
cache-control = """\
|
cache-control = """\
|
||||||
|
@@ -96,12 +96,14 @@ arguments:
|
|||||||
screens.
|
screens.
|
||||||
wrapper:
|
wrapper:
|
||||||
type: string
|
type: string
|
||||||
|
default: p-0
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Class attributes of the wrapper element, e.g. `p-4 px-xxl-0`.
|
Class attributes of the wrapper element, e.g. `p-4 px-xxl-0`.
|
||||||
responsive:
|
responsive:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
|
default: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Flag indicating if the number of columns should be responsive, defaults to
|
Flag indicating if the number of columns should be responsive, defaults to
|
||||||
`true`.
|
`true`.
|
||||||
@@ -132,5 +134,33 @@ arguments:
|
|||||||
hook:
|
hook:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
|
default: assets/card.html
|
||||||
comment: Render hook for the card partial.
|
comment: Render hook for the card partial.
|
||||||
group: 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:
|
options:
|
||||||
values:
|
values:
|
||||||
- full
|
- full
|
||||||
|
- title
|
||||||
- none
|
- none
|
||||||
footer:
|
footer:
|
||||||
type: select
|
type: select
|
||||||
@@ -227,6 +228,7 @@ arguments:
|
|||||||
- stacked
|
- stacked
|
||||||
- horizontal
|
- horizontal
|
||||||
- horizontal-sm
|
- horizontal-sm
|
||||||
|
- overlay
|
||||||
- none
|
- none
|
||||||
subtle:
|
subtle:
|
||||||
type: bool
|
type: bool
|
||||||
|
@@ -112,7 +112,8 @@ arguments:
|
|||||||
title:
|
title:
|
||||||
type:
|
type:
|
||||||
- string
|
- string
|
||||||
- 'hstring.RenderedString'
|
- hstring.RenderedString
|
||||||
|
- hstring.HTML
|
||||||
optional: true
|
optional: true
|
||||||
comment: Alternate text of the image.
|
comment: Alternate text of the image.
|
||||||
caption:
|
caption:
|
||||||
|
@@ -72,6 +72,7 @@ arguments:
|
|||||||
- string
|
- string
|
||||||
- template.HTML
|
- template.HTML
|
||||||
- hstring.RenderedString
|
- hstring.RenderedString
|
||||||
|
- hstring.HTML
|
||||||
optional: true
|
optional: true
|
||||||
group: partial
|
group: partial
|
||||||
comment: Link description.
|
comment: Link description.
|
||||||
|
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/'
|
resourcedir = '../resources/'
|
||||||
title = "Hinode"
|
title = "Hinode"
|
||||||
copyright = "Copyright © 2024 Mark Dumay."
|
copyright = "Copyright © 2024 Mark Dumay."
|
||||||
paginate = 9
|
|
||||||
enableGitInfo = true
|
enableGitInfo = true
|
||||||
|
|
||||||
# additional settings
|
# additional settings
|
||||||
@@ -39,6 +38,9 @@ home = ["HTML", "RSS", "REDIR"]
|
|||||||
[taxonomies]
|
[taxonomies]
|
||||||
tag = 'tags'
|
tag = 'tags'
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 9
|
||||||
|
|
||||||
[privacy]
|
[privacy]
|
||||||
[privacy.vimeo]
|
[privacy.vimeo]
|
||||||
disabled = false
|
disabled = false
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
showJS = false
|
showJS = false
|
||||||
showSCSS = false
|
showSCSS = false
|
||||||
purgeHTMLComments = true # prevents a Goldmark warning when processing HTML comments (as used by markdownlint)
|
purgeHTMLComments = true # prevents a Goldmark warning when processing HTML comments (as used by markdownlint)
|
||||||
|
includeSVGOrigin = true
|
||||||
|
|
||||||
[docs]
|
[docs]
|
||||||
basePath = "/" # TODO: replace
|
basePath = "/" # TODO: replace
|
||||||
@@ -164,16 +165,16 @@
|
|||||||
# linkedIn = ""
|
# linkedIn = ""
|
||||||
github = "https://github.com/gethinode/hinode"
|
github = "https://github.com/gethinode/hinode"
|
||||||
section = "blog"
|
section = "blog"
|
||||||
[author]
|
[schema.author]
|
||||||
name = "Mark Dumay"
|
name = "Mark Dumay"
|
||||||
# twitter = "https://twitter.com/markdumay"
|
# twitter = "https://twitter.com/markdumay"
|
||||||
linkedin = "https://www.linkedin.com/in/markdumay/"
|
linkedin = "https://www.linkedin.com/in/markdumay/"
|
||||||
github = "https://github.com/markdumay"
|
github = "https://github.com/markdumay"
|
||||||
[logo]
|
[schema.logo]
|
||||||
url = "img/logo512x512.png"
|
url = "img/logo512x512.png"
|
||||||
width = 512
|
width = 512
|
||||||
height = 512
|
height = 512
|
||||||
[image]
|
[schema.image]
|
||||||
url = "img/logo1280x640.png"
|
url = "img/logo1280x640.png"
|
||||||
width = 1280
|
width = 1280
|
||||||
height = 640
|
height = 640
|
||||||
|
@@ -14,7 +14,7 @@ for = '/**'
|
|||||||
connect-src 'self'
|
connect-src 'self'
|
||||||
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
||||||
font-src 'self' https://fonts.gstatic.com; \
|
font-src 'self' https://fonts.gstatic.com; \
|
||||||
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
|
frame-src 'self' https://player.cloudinary.com https://player.vimeo.com 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; \
|
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
media-src 'self' \
|
media-src 'self' \
|
||||||
@@ -29,7 +29,6 @@ for = '/**'
|
|||||||
camera=(), \
|
camera=(), \
|
||||||
magnetometer=(), \
|
magnetometer=(), \
|
||||||
gyroscope=(), \
|
gyroscope=(), \
|
||||||
fullscreen=(), \
|
|
||||||
payment=() \
|
payment=() \
|
||||||
"""
|
"""
|
||||||
cache-control = """\
|
cache-control = """\
|
||||||
|
@@ -418,7 +418,7 @@ As an example, the following shortcode displays superscript text.
|
|||||||
|
|
||||||
As an example, the following shortcode displays a responsive table.
|
As an example, the following shortcode displays a responsive table.
|
||||||
|
|
||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 MD058 -->
|
||||||
{{< example lang="markdown" >}}
|
{{< example lang="markdown" >}}
|
||||||
{{</* table */>}}
|
{{</* table */>}}
|
||||||
| # | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading |
|
| # | 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 |
|
| 3. | cell | cel | cel | cel | cel | cel | cel | cel | cel |
|
||||||
{{</* /table */>}}
|
{{</* /table */>}}
|
||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 MD058 -->
|
||||||
|
|
||||||
## Timeline
|
## Timeline
|
||||||
|
|
||||||
@@ -474,6 +474,26 @@ As an example, the following shortcode displays a tooltip for a colored hyperlin
|
|||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Video
|
||||||
|
|
||||||
|
As an example, the following shortcode displays an Elephants video hosted by Cloudinary.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="hugo" >}}
|
||||||
|
{{</* video host="cloudinary" account="demo" id="elephants" autoplay=true */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Vimeo
|
||||||
|
|
||||||
|
As an example, the following shortcode displays a Vimeo video.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="hugo" >}}
|
||||||
|
{{</* vimeo id="55073825" autoplay=true autotitle=true */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
## Youtube
|
## Youtube
|
||||||
|
|
||||||
As an example, the following shortcode displays a Hugo quickstart guide.
|
As an example, the following shortcode displays a Hugo quickstart guide.
|
||||||
|
@@ -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.
|
As an example, the following shortcode displays a responsive table that uses advanced controls.
|
||||||
|
|
||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 MD058 -->
|
||||||
{{< example lang="markdown" >}}
|
{{< example lang="markdown" >}}
|
||||||
{{</* table sortable="true" paging="true" searchable="true" */>}}
|
{{</* table sortable="true" paging="true" searchable="true" */>}}
|
||||||
| # | Heading |
|
| # | Heading |
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
"form",
|
"form",
|
||||||
"h2",
|
"h2",
|
||||||
"h3",
|
"h3",
|
||||||
"h5",
|
|
||||||
"head",
|
"head",
|
||||||
"hr",
|
"hr",
|
||||||
"html",
|
"html",
|
||||||
@@ -52,6 +51,7 @@
|
|||||||
"sub",
|
"sub",
|
||||||
"sup",
|
"sup",
|
||||||
"svg",
|
"svg",
|
||||||
|
"symbol",
|
||||||
"table",
|
"table",
|
||||||
"tbody",
|
"tbody",
|
||||||
"td",
|
"td",
|
||||||
@@ -312,6 +312,7 @@
|
|||||||
"mt-4",
|
"mt-4",
|
||||||
"mt-5",
|
"mt-5",
|
||||||
"mt-auto",
|
"mt-auto",
|
||||||
|
"mt-md-0",
|
||||||
"multi-docs-collapse-15",
|
"multi-docs-collapse-15",
|
||||||
"multi-file-collapse-1",
|
"multi-file-collapse-1",
|
||||||
"mx-auto",
|
"mx-auto",
|
||||||
@@ -341,11 +342,6 @@
|
|||||||
"navbar-toggler",
|
"navbar-toggler",
|
||||||
"next",
|
"next",
|
||||||
"no-js",
|
"no-js",
|
||||||
"offcanvas",
|
|
||||||
"offcanvas-body",
|
|
||||||
"offcanvas-header",
|
|
||||||
"offcanvas-start",
|
|
||||||
"offcanvas-title",
|
|
||||||
"order-0",
|
"order-0",
|
||||||
"order-1",
|
"order-1",
|
||||||
"order-first",
|
"order-first",
|
||||||
@@ -477,11 +473,11 @@
|
|||||||
"top-bar",
|
"top-bar",
|
||||||
"translate-middle",
|
"translate-middle",
|
||||||
"translate-middle-y",
|
"translate-middle-y",
|
||||||
|
"video-embedded",
|
||||||
"visually-hidden",
|
"visually-hidden",
|
||||||
"vr",
|
"vr",
|
||||||
"w-100",
|
"w-100",
|
||||||
"w-50",
|
"w-50"
|
||||||
"youtube-embedded"
|
|
||||||
],
|
],
|
||||||
"ids": [
|
"ids": [
|
||||||
"TableOfContents",
|
"TableOfContents",
|
||||||
@@ -519,11 +515,42 @@
|
|||||||
"collapse",
|
"collapse",
|
||||||
"collapse-1",
|
"collapse-1",
|
||||||
"command-prompt",
|
"command-prompt",
|
||||||
|
"custom-activity",
|
||||||
"data-tables",
|
"data-tables",
|
||||||
"docs",
|
"docs",
|
||||||
"documentation",
|
"documentation",
|
||||||
"example",
|
"example",
|
||||||
"exemple",
|
"exemple",
|
||||||
|
"fa-face-frown",
|
||||||
|
"fa-square-check",
|
||||||
|
"fab-bootstrap",
|
||||||
|
"fab-docker",
|
||||||
|
"fab-facebook",
|
||||||
|
"fab-github",
|
||||||
|
"fab-linkedin",
|
||||||
|
"fab-medium",
|
||||||
|
"fab-whatsapp",
|
||||||
|
"fab-x-twitter",
|
||||||
|
"fas-angle-left",
|
||||||
|
"fas-angle-right",
|
||||||
|
"fas-angles-left",
|
||||||
|
"fas-angles-right",
|
||||||
|
"fas-arrow-left",
|
||||||
|
"fas-arrow-right",
|
||||||
|
"fas-circle-check",
|
||||||
|
"fas-code",
|
||||||
|
"fas-ellipsis",
|
||||||
|
"fas-globe",
|
||||||
|
"fas-heart",
|
||||||
|
"fas-house",
|
||||||
|
"fas-link",
|
||||||
|
"fas-magnifying-glass",
|
||||||
|
"fas-moon",
|
||||||
|
"fas-rocket",
|
||||||
|
"fas-share-nodes",
|
||||||
|
"fas-sort",
|
||||||
|
"fas-sun",
|
||||||
|
"fas-up-right-from-square",
|
||||||
"fichier",
|
"fichier",
|
||||||
"fil-dariane",
|
"fil-dariane",
|
||||||
"file",
|
"file",
|
||||||
@@ -562,8 +589,6 @@
|
|||||||
"navbar-sample-collapse",
|
"navbar-sample-collapse",
|
||||||
"navigation",
|
"navigation",
|
||||||
"notification",
|
"notification",
|
||||||
"offcanvas-label",
|
|
||||||
"offcanvass-sidebar",
|
|
||||||
"persona",
|
"persona",
|
||||||
"projecten",
|
"projecten",
|
||||||
"projects",
|
"projects",
|
||||||
@@ -584,6 +609,8 @@
|
|||||||
"toast-message-email-4",
|
"toast-message-email-4",
|
||||||
"toc-collapse",
|
"toc-collapse",
|
||||||
"tooltip",
|
"tooltip",
|
||||||
|
"video",
|
||||||
|
"vimeo",
|
||||||
"youtube"
|
"youtube"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
8
go.mod
8
go.mod
@@ -6,12 +6,12 @@ require (
|
|||||||
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
|
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
|
||||||
github.com/gethinode/mod-bootstrap v1.3.1 // indirect
|
github.com/gethinode/mod-bootstrap v1.3.1 // indirect
|
||||||
github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect
|
github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect
|
||||||
github.com/gethinode/mod-fontawesome v1.9.1 // indirect
|
github.com/gethinode/mod-fontawesome v1.10.0 // indirect
|
||||||
github.com/gethinode/mod-katex v1.1.2 // indirect
|
github.com/gethinode/mod-katex v1.1.2 // indirect
|
||||||
github.com/gethinode/mod-leaflet v1.1.1 // indirect
|
github.com/gethinode/mod-leaflet v1.1.1 // indirect
|
||||||
github.com/gethinode/mod-lottie v1.5.6 // indirect
|
github.com/gethinode/mod-lottie v1.5.7 // indirect
|
||||||
github.com/gethinode/mod-simple-datatables v1.0.7 // indirect
|
github.com/gethinode/mod-simple-datatables v1.0.9 // indirect
|
||||||
github.com/gethinode/mod-utils/v2 v2.4.0 // indirect
|
github.com/gethinode/mod-utils/v2 v2.6.0 // indirect
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect
|
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect
|
||||||
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
||||||
)
|
)
|
||||||
|
14
go.sum
14
go.sum
@@ -116,6 +116,8 @@ github.com/gethinode/mod-fontawesome v1.9.0 h1:xqUB8AnezMHAt8lye4ksqvmHSVPCOkiHs
|
|||||||
github.com/gethinode/mod-fontawesome v1.9.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
github.com/gethinode/mod-fontawesome v1.9.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
||||||
github.com/gethinode/mod-fontawesome v1.9.1 h1:cQk84vriqffM4fuUUoM9j3SSD+3ppeW2j4ta7AiToMU=
|
github.com/gethinode/mod-fontawesome v1.9.1 h1:cQk84vriqffM4fuUUoM9j3SSD+3ppeW2j4ta7AiToMU=
|
||||||
github.com/gethinode/mod-fontawesome v1.9.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
|
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-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
|
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
|
||||||
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
||||||
@@ -200,6 +202,8 @@ 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.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 h1:dxz5nmD0XXEt/DAOc1s5fIPynj5bhzDL32EEwLFCSmk=
|
||||||
github.com/gethinode/mod-lottie v1.5.6/go.mod h1:VTvBxD8VokICwnEqM0VUZFZHBYxLf4/grDFQyEh1DL0=
|
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-simple-datatables v1.0.0 h1:Dj4WGw12OkaimwkCpLn5Jhmd49dvNJW9O2P/W9F+HlQ=
|
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.0/go.mod h1:K8T7fIdb8pMOB+OSW4A5lz5IW99+HyzcTgx764fvOGw=
|
||||||
github.com/gethinode/mod-simple-datatables v1.0.2 h1:zhqxHet3iLQWYCBbGROALpOY9zQlptMycFkz1Tto5bA=
|
github.com/gethinode/mod-simple-datatables v1.0.2 h1:zhqxHet3iLQWYCBbGROALpOY9zQlptMycFkz1Tto5bA=
|
||||||
@@ -212,6 +216,10 @@ 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.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 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.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-utils v1.0.0 h1:cqHm2xS5uDiJzRm1KfHaNbq6uMVDKLhQa8/BuTZ1nhY=
|
github.com/gethinode/mod-utils v1.0.0 h1:cqHm2xS5uDiJzRm1KfHaNbq6uMVDKLhQa8/BuTZ1nhY=
|
||||||
github.com/gethinode/mod-utils v1.0.0/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
|
github.com/gethinode/mod-utils v1.0.0/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
|
||||||
github.com/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
|
github.com/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
|
||||||
@@ -260,6 +268,12 @@ 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.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 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.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/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
|
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
|
||||||
|
129
hugo_stats.json
129
hugo_stats.json
@@ -2,12 +2,16 @@
|
|||||||
"htmlElements": {
|
"htmlElements": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"a",
|
"a",
|
||||||
|
"blockquote",
|
||||||
"body",
|
"body",
|
||||||
"button",
|
"button",
|
||||||
|
"code",
|
||||||
"div",
|
"div",
|
||||||
|
"em",
|
||||||
"footer",
|
"footer",
|
||||||
"form",
|
"form",
|
||||||
"h5",
|
"h2",
|
||||||
|
"h3",
|
||||||
"head",
|
"head",
|
||||||
"html",
|
"html",
|
||||||
"img",
|
"img",
|
||||||
@@ -21,30 +25,51 @@
|
|||||||
"ol",
|
"ol",
|
||||||
"p",
|
"p",
|
||||||
"path",
|
"path",
|
||||||
|
"pre",
|
||||||
"script",
|
"script",
|
||||||
"small",
|
"small",
|
||||||
"span",
|
"span",
|
||||||
"strong",
|
"strong",
|
||||||
"svg",
|
"svg",
|
||||||
|
"symbol",
|
||||||
|
"table",
|
||||||
|
"tbody",
|
||||||
|
"td",
|
||||||
|
"th",
|
||||||
|
"thead",
|
||||||
"title",
|
"title",
|
||||||
"ul"
|
"tr",
|
||||||
|
"ul",
|
||||||
|
"use"
|
||||||
],
|
],
|
||||||
"classes": [
|
"classes": [
|
||||||
"active",
|
"active",
|
||||||
"align-items-center",
|
"align-items-center",
|
||||||
"align-self-center",
|
"align-self-center",
|
||||||
"align-self-end",
|
"align-self-end",
|
||||||
|
"anchor",
|
||||||
"ball",
|
"ball",
|
||||||
"bg-body",
|
"bg-body",
|
||||||
|
"bg-body-tertiary",
|
||||||
"bg-opacity-10",
|
"bg-opacity-10",
|
||||||
"bg-primary",
|
"bg-primary",
|
||||||
|
"blockquote-alert",
|
||||||
|
"blockquote-alert-heading",
|
||||||
|
"blockquote-alert-important",
|
||||||
|
"border",
|
||||||
"border-0",
|
"border-0",
|
||||||
|
"border-bottom",
|
||||||
|
"border-none",
|
||||||
|
"border-primary",
|
||||||
|
"border-top",
|
||||||
"bottom-0",
|
"bottom-0",
|
||||||
"bottom-bar",
|
"bottom-bar",
|
||||||
"breadcrumb",
|
"breadcrumb",
|
||||||
"breadcrumb-item",
|
"breadcrumb-item",
|
||||||
"btn",
|
"btn",
|
||||||
"btn-close",
|
"btn-close",
|
||||||
|
"btn-outline-primary",
|
||||||
|
"btn-outline-secondary",
|
||||||
"btn-primary",
|
"btn-primary",
|
||||||
"btn-social",
|
"btn-social",
|
||||||
"card",
|
"card",
|
||||||
@@ -54,33 +79,42 @@
|
|||||||
"card-title",
|
"card-title",
|
||||||
"card-zoom",
|
"card-zoom",
|
||||||
"checkbox",
|
"checkbox",
|
||||||
|
"chroma",
|
||||||
"col",
|
"col",
|
||||||
"col-12",
|
"col-12",
|
||||||
"col-6",
|
"col-6",
|
||||||
"col-lg-2",
|
"col-lg-2",
|
||||||
"col-lg-8",
|
"col-lg-8",
|
||||||
|
"col-md-2",
|
||||||
"col-md-3",
|
"col-md-3",
|
||||||
"col-md-4",
|
"col-md-4",
|
||||||
"col-md-8",
|
"col-md-8",
|
||||||
"col-md-9",
|
"col-md-9",
|
||||||
|
"col-sm-12",
|
||||||
"collapse",
|
"collapse",
|
||||||
"collapsed",
|
"collapsed",
|
||||||
"container-fluid",
|
"container-fluid",
|
||||||
"container-xxl",
|
"container-xxl",
|
||||||
|
"d-block",
|
||||||
"d-flex",
|
"d-flex",
|
||||||
|
"d-grid",
|
||||||
"d-inline",
|
"d-inline",
|
||||||
"d-lg-block",
|
"d-lg-block",
|
||||||
"d-md-block",
|
"d-md-block",
|
||||||
"d-md-none",
|
"d-md-none",
|
||||||
"d-none",
|
"d-none",
|
||||||
|
"data-table",
|
||||||
|
"display-1",
|
||||||
"display-4",
|
"display-4",
|
||||||
"emphasis",
|
"emphasis",
|
||||||
"end-0",
|
"end-0",
|
||||||
|
"fa",
|
||||||
|
"fa-10x",
|
||||||
"fa-2x",
|
"fa-2x",
|
||||||
"fa-arrow-left",
|
|
||||||
"fa-arrow-right",
|
|
||||||
"fa-book-open",
|
"fa-book-open",
|
||||||
"fa-ellipsis",
|
"fa-ellipsis",
|
||||||
|
"fa-exclamation",
|
||||||
|
"fa-face-frown",
|
||||||
"fa-facebook",
|
"fa-facebook",
|
||||||
"fa-fw",
|
"fa-fw",
|
||||||
"fa-github",
|
"fa-github",
|
||||||
@@ -89,6 +123,7 @@
|
|||||||
"fa-medium",
|
"fa-medium",
|
||||||
"fa-moon",
|
"fa-moon",
|
||||||
"fa-share-nodes",
|
"fa-share-nodes",
|
||||||
|
"fa-sort",
|
||||||
"fa-sun",
|
"fa-sun",
|
||||||
"fa-whatsapp",
|
"fa-whatsapp",
|
||||||
"fa-x-twitter",
|
"fa-x-twitter",
|
||||||
@@ -97,6 +132,7 @@
|
|||||||
"fixed-top",
|
"fixed-top",
|
||||||
"flex-column",
|
"flex-column",
|
||||||
"flex-fill",
|
"flex-fill",
|
||||||
|
"font-monospace",
|
||||||
"footer",
|
"footer",
|
||||||
"form-control",
|
"form-control",
|
||||||
"fs-3",
|
"fs-3",
|
||||||
@@ -105,14 +141,20 @@
|
|||||||
"fs-lg-5",
|
"fs-lg-5",
|
||||||
"fw-30",
|
"fw-30",
|
||||||
"fw-bold",
|
"fw-bold",
|
||||||
|
"fw-semibold",
|
||||||
"g-4",
|
"g-4",
|
||||||
"gap-1",
|
"gap-1",
|
||||||
|
"gap-2",
|
||||||
"h-100",
|
"h-100",
|
||||||
|
"h6",
|
||||||
|
"heading",
|
||||||
|
"highlight",
|
||||||
"hstack",
|
"hstack",
|
||||||
"img-fluid",
|
"img-fluid",
|
||||||
"img-wrap",
|
"img-wrap",
|
||||||
"invisible",
|
"invisible",
|
||||||
"is-search",
|
"is-search",
|
||||||
|
"justify-content-between",
|
||||||
"justify-content-center",
|
"justify-content-center",
|
||||||
"justify-content-end",
|
"justify-content-end",
|
||||||
"justify-content-start",
|
"justify-content-start",
|
||||||
@@ -132,9 +174,12 @@
|
|||||||
"ms-auto",
|
"ms-auto",
|
||||||
"ms-md-3",
|
"ms-md-3",
|
||||||
"mt-3",
|
"mt-3",
|
||||||
|
"mt-4",
|
||||||
"mt-5",
|
"mt-5",
|
||||||
|
"mt-md-0",
|
||||||
"mx-auto",
|
"mx-auto",
|
||||||
"mx-md-0",
|
"mx-md-0",
|
||||||
|
"my-2",
|
||||||
"my-auto",
|
"my-auto",
|
||||||
"my-md-0",
|
"my-md-0",
|
||||||
"my-md-auto",
|
"my-md-auto",
|
||||||
@@ -148,36 +193,38 @@
|
|||||||
"navbar-fixed-top",
|
"navbar-fixed-top",
|
||||||
"navbar-mode-selector",
|
"navbar-mode-selector",
|
||||||
"navbar-nav",
|
"navbar-nav",
|
||||||
|
"navbar-nav-scroll",
|
||||||
"navbar-toggler",
|
"navbar-toggler",
|
||||||
"next",
|
|
||||||
"no-js",
|
"no-js",
|
||||||
"offcanvas",
|
|
||||||
"offcanvas-body",
|
|
||||||
"offcanvas-header",
|
|
||||||
"offcanvas-start",
|
|
||||||
"offcanvas-title",
|
|
||||||
"order-0",
|
"order-0",
|
||||||
"order-1",
|
"order-1",
|
||||||
"order-md-0",
|
"order-md-0",
|
||||||
"order-md-1",
|
"order-md-1",
|
||||||
"p-0",
|
"p-0",
|
||||||
|
"p-1",
|
||||||
"p-2",
|
"p-2",
|
||||||
"p-3",
|
"p-3",
|
||||||
"p-4",
|
"p-4",
|
||||||
"p-auto",
|
"pb-2",
|
||||||
|
"pb-3",
|
||||||
"pb-4",
|
"pb-4",
|
||||||
"pb-5",
|
"pb-5",
|
||||||
"pb-md-0",
|
"pb-md-0",
|
||||||
|
"pe-3",
|
||||||
"position-fixed",
|
"position-fixed",
|
||||||
"position-relative",
|
"position-relative",
|
||||||
"previous",
|
|
||||||
"ps-1",
|
"ps-1",
|
||||||
|
"ps-3",
|
||||||
"pt-5",
|
"pt-5",
|
||||||
"pt-md-3",
|
"pt-md-3",
|
||||||
"px-4",
|
"px-4",
|
||||||
"px-xxl-0",
|
"px-xxl-0",
|
||||||
|
"py-1",
|
||||||
"py-3",
|
"py-3",
|
||||||
"rounded",
|
"rounded",
|
||||||
|
"rounded-2",
|
||||||
|
"rounded-bottom",
|
||||||
|
"rounded-top",
|
||||||
"row",
|
"row",
|
||||||
"row-cols-1",
|
"row-cols-1",
|
||||||
"row-cols-2",
|
"row-cols-2",
|
||||||
@@ -185,6 +232,7 @@
|
|||||||
"row-cols-md-2",
|
"row-cols-md-2",
|
||||||
"row-cols-md-3",
|
"row-cols-md-3",
|
||||||
"row-cols-sm-2",
|
"row-cols-sm-2",
|
||||||
|
"row-cols-sm-3",
|
||||||
"search",
|
"search",
|
||||||
"search-input",
|
"search-input",
|
||||||
"search-suggestions",
|
"search-suggestions",
|
||||||
@@ -193,11 +241,28 @@
|
|||||||
"sticky-top",
|
"sticky-top",
|
||||||
"stretched-link",
|
"stretched-link",
|
||||||
"svg-inline--fa",
|
"svg-inline--fa",
|
||||||
|
"syntax-highlight",
|
||||||
|
"table",
|
||||||
|
"table-bordered",
|
||||||
|
"table-borderless",
|
||||||
|
"table-hover",
|
||||||
|
"table-responsive",
|
||||||
|
"table-responsive-lg",
|
||||||
|
"table-responsive-md",
|
||||||
|
"table-responsive-sm",
|
||||||
|
"table-responsive-xl",
|
||||||
|
"table-responsive-xxl",
|
||||||
|
"table-sm",
|
||||||
|
"table-striped",
|
||||||
|
"table-striped-columns",
|
||||||
|
"table-success",
|
||||||
|
"text-body",
|
||||||
"text-body-secondary",
|
"text-body-secondary",
|
||||||
"text-center",
|
"text-center",
|
||||||
"text-decoration-none",
|
"text-decoration-none",
|
||||||
"text-end",
|
"text-end",
|
||||||
"text-muted",
|
"text-muted",
|
||||||
|
"text-secondary",
|
||||||
"text-sm-start",
|
"text-sm-start",
|
||||||
"text-start",
|
"text-start",
|
||||||
"text-uppercase",
|
"text-uppercase",
|
||||||
@@ -206,20 +271,54 @@
|
|||||||
"toast-container",
|
"toast-container",
|
||||||
"toast-header",
|
"toast-header",
|
||||||
"toc",
|
"toc",
|
||||||
|
"toc-button",
|
||||||
|
"toc-panel",
|
||||||
"toc-sidebar",
|
"toc-sidebar",
|
||||||
"toggler-icon",
|
"toggler-icon",
|
||||||
"top-bar"
|
"top-bar"
|
||||||
],
|
],
|
||||||
"ids": [
|
"ids": [
|
||||||
|
"TableOfContents",
|
||||||
|
"accented-tables",
|
||||||
|
"aligned-cells-and-headers",
|
||||||
|
"always-responsive",
|
||||||
|
"basic-tables",
|
||||||
|
"blogs",
|
||||||
|
"bordered-tables",
|
||||||
|
"breakpoint-specific",
|
||||||
"btn-webshare",
|
"btn-webshare",
|
||||||
|
"colored-tables",
|
||||||
|
"data-tables",
|
||||||
|
"default-alignment",
|
||||||
|
"fa-face-frown",
|
||||||
|
"fab-facebook",
|
||||||
|
"fab-github",
|
||||||
|
"fab-linkedin",
|
||||||
|
"fab-medium",
|
||||||
|
"fab-whatsapp",
|
||||||
|
"fab-x-twitter",
|
||||||
|
"fas-book-open",
|
||||||
|
"fas-ellipsis",
|
||||||
|
"fas-exclamation",
|
||||||
|
"fas-link",
|
||||||
|
"fas-moon",
|
||||||
|
"fas-share-nodes",
|
||||||
|
"fas-sort",
|
||||||
|
"fas-sun",
|
||||||
|
"hoverable-rows",
|
||||||
"navbar-0-collapse",
|
"navbar-0-collapse",
|
||||||
"navbar-mode",
|
"navbar-mode",
|
||||||
"navbar-mode-checkbox",
|
"navbar-mode-checkbox",
|
||||||
"offcanvas-label",
|
"responsive-tables",
|
||||||
"offcanvass-sidebar",
|
"small-tables",
|
||||||
|
"striped-columns",
|
||||||
|
"striped-rows",
|
||||||
|
"table-borders",
|
||||||
|
"tables-without-borders",
|
||||||
"toast-container",
|
"toast-container",
|
||||||
"toast-copied-code-message",
|
"toast-copied-code-message",
|
||||||
"toast-message-email-4"
|
"toast-message-email-4",
|
||||||
|
"toc-collapse"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
44
i18n/de.yaml
44
i18n/de.yaml
@@ -23,6 +23,22 @@
|
|||||||
translation: "Artikel"
|
translation: "Artikel"
|
||||||
- id: more
|
- id: more
|
||||||
translation: "Weitere {{ . }}"
|
translation: "Weitere {{ . }}"
|
||||||
|
- id: emptyList
|
||||||
|
translation: "Keine weiteren Artikel gefunden"
|
||||||
|
- id: emptyTags
|
||||||
|
translation: "Keine Schlagworte gefunden"
|
||||||
|
- id: readMore
|
||||||
|
translation: "Weiterlesen"
|
||||||
|
|
||||||
|
# Languages
|
||||||
|
- id: lang_de
|
||||||
|
translation: "Deutsch"
|
||||||
|
- id: lang_en
|
||||||
|
translation: "Englisch"
|
||||||
|
- id: lang_nl
|
||||||
|
translation: "Niederländisch"
|
||||||
|
- id: lang_fr
|
||||||
|
translation: "Französisch"
|
||||||
|
|
||||||
# Sharing
|
# Sharing
|
||||||
- id: shareLink
|
- id: shareLink
|
||||||
@@ -110,6 +126,32 @@
|
|||||||
|
|
||||||
# Comments
|
# Comments
|
||||||
- id: show
|
- id: show
|
||||||
translation: "Zeige"
|
translation: "Anzeigen"
|
||||||
- id: comments
|
- id: comments
|
||||||
translation: "Kommentare"
|
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
|
||||||
|
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>
|
@@ -73,6 +73,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- partial "footer/toast-container.html" . -}}
|
{{- partial "footer/toast-container.html" . -}}
|
||||||
|
{{- partial "assets/symbols.html" . -}}
|
||||||
{{- partialCached "footer/scripts.html" (dict "header" false "page" . "core" true) }}
|
{{- partialCached "footer/scripts.html" (dict "header" false "page" . "core" true) }}
|
||||||
{{- partial "footer/optional-scripts.html" . -}}
|
{{- partial "footer/optional-scripts.html" . -}}
|
||||||
</body>
|
</body>
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
{{ define "main" -}}
|
{{ define "main" -}}
|
||||||
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
|
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
|
||||||
{{ $sidebar := .Render "single/sidebar" }}
|
{{- $hasSidebar := .Site.Params.navigation.sidebar | default true -}}
|
||||||
|
{{ $sidebar := "" }}
|
||||||
|
{{ if $hasSidebar }}{{ $sidebar = .Render "single/sidebar" }}{{ end }}
|
||||||
{{ $toc := .Render "single/panel-toc" }}
|
{{ $toc := .Render "single/panel-toc" }}
|
||||||
|
|
||||||
{{ with $sidebar }}
|
{{ with $sidebar }}
|
||||||
@@ -16,7 +18,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="container-xxl flex-fill p-4 px-xxl-0">
|
<div class="container-xxl flex-fill p-4 px-xxl-0">
|
||||||
{{ if $sidebar -}}
|
{{ if $hasSidebar -}}
|
||||||
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2 row-cols-{{ $breakpoint.next }}-3">
|
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2 row-cols-{{ $breakpoint.next }}-3">
|
||||||
<div class="col col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.next }}-block sidebar-overflow sticky-top pt-5">
|
<div class="col col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.next }}-block sidebar-overflow sticky-top pt-5">
|
||||||
{{ $sidebar | safeHTML }}
|
{{ $sidebar | safeHTML }}
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
{{- $menu := .Scratch.Get "sidebar" -}}
|
{{- $menu := .Scratch.Get "sidebar" -}}
|
||||||
{{- $version := .Scratch.Get "version" -}}
|
{{- $version := .Scratch.Get "version" -}}
|
||||||
{{ $sidebar := "" }}
|
{{ if $menu }}
|
||||||
{{- $hasSidebar := .Site.Params.navigation.sidebar | default true -}}
|
|
||||||
{{ if and $menu $hasSidebar }}
|
|
||||||
{{ partial "assets/sidebar.html" (dict "page" . "menu" $menu "version" $version) }}
|
{{ partial "assets/sidebar.html" (dict "page" . "menu" $menu "version" $version) }}
|
||||||
{{ end }}
|
{{ end -}}
|
||||||
|
@@ -4,66 +4,67 @@
|
|||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Validate arguments -->
|
<!-- Define inline partials -->
|
||||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "card-group" "child" "card" "args" .) }}
|
{{ define "partials/assets/style.html" }}
|
||||||
{{- errorf "partial [assets/card-group.html] - Invalid arguments" -}}
|
{{ $style := "" }}
|
||||||
{{ end }}
|
{{ if gt (len .styles) 0 }}
|
||||||
|
{{ $def := index .styles (mod .index (len .styles)) }}
|
||||||
<!-- Initialize arguments and default values -->
|
{{ $style = index $def .key }}
|
||||||
{{- $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 }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
|
{{ return ($style | default .default ) }}
|
||||||
{{ end }}
|
{{ 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 := "" }}
|
{{ $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)
|
||||||
|
}}
|
||||||
|
|
||||||
|
<!-- 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.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $list) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if not $spacer }}{{ $class = printf "%s h-100" $class }}{{ end }}
|
<!-- Initialize list elements -->
|
||||||
|
{{ $elements := slice }}
|
||||||
{{ $list := slice }}
|
|
||||||
{{ if $isPages }}
|
{{ if $isPages }}
|
||||||
{{ range $index, $element := $pages }}
|
{{ range $index, $element := $list }}
|
||||||
{{ $params := dict }}
|
{{ $params := dict }}
|
||||||
<!-- regular page -->
|
<!-- regular page -->
|
||||||
{{- if and $element.RelPermalink $element.File -}}
|
{{- if and $element.RelPermalink $element.File -}}
|
||||||
@@ -82,102 +83,95 @@
|
|||||||
) -}}
|
) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $list = $list | append $params }}
|
{{- $elements = $elements | append $params }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else if $pages }}
|
{{ else if $list }}
|
||||||
{{ $list = $list | append $pages }}
|
{{ $elements = $elements | append $list }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- $count := len $list -}}
|
<!-- Limit list to max elements -->
|
||||||
|
{{- $count := len $elements -}}
|
||||||
{{- $max := $count -}}
|
{{- $max := $count -}}
|
||||||
{{- $max = math.Min (.max | default $count) $count -}}
|
{{- $max = math.Min ($args.max | default $count) $count -}}
|
||||||
{{- $responsive := .responsive | default true -}}
|
{{- if not $args.paginate -}}
|
||||||
|
{{- $elements = first $max $elements -}}
|
||||||
{{- $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 -}}
|
|
||||||
{{- end -}}
|
{{- 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 }}
|
||||||
|
{{ if $args.responsive }}{{ $sizes = index $sizesMap $args.cols }}{{ end }}
|
||||||
|
{{ 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 -->
|
<!-- Main code -->
|
||||||
<div class="container-fluid {{ $wrapper }} {{ if $scroll }}card-container-wrapper{{ end }}">
|
<div class="{{ $args.wrapper }}">
|
||||||
<div class="row g-{{ $gutter }} {{ if $scroll }}d-flex flex-row flex-nowrap card-container scrollbar-horizontal pb-4 w-100 {{ end }} {{ $colGrid }}">
|
<div class="container-fluid {{ if $args.scroll }}card-container-wrapper{{ end }} p-0">
|
||||||
{{ range $index, $element := $list }}
|
<div class="row g-{{ $args.gutter }} {{ if $args.scroll }}d-flex flex-row flex-nowrap card-container scrollbar-horizontal pb-4 w-100 {{ end }}
|
||||||
{{- $params := (dict
|
{{ if $args.bento }}{{ with $args.valign }}align-items-{{ . }}{{ end }}{{ else }}{{ $colGrid }}{{ end }}">
|
||||||
"class" (printf " %s" $class)
|
{{ range $index, $element := $elements }}
|
||||||
"color" $color
|
{{- $params := (dict
|
||||||
"footer" $footer
|
"class" (printf " %s" $class)
|
||||||
"body" $body
|
"color" $args.color
|
||||||
"header" $header
|
"footer" $args.footer
|
||||||
"loading" $loading
|
"body" $args.body
|
||||||
"sizes" $sizes
|
"header" $args.header
|
||||||
"orientation" $orientation
|
"loading" $args.loading
|
||||||
"padding" $padding
|
"sizes" $sizes
|
||||||
"ratio" $ratio
|
"orientation" (partial "assets/style.html" (dict "styles" $args.styles "index" $index "key" "orientation" "default" $orientation))
|
||||||
"portrait" $portrait
|
"padding" $args.padding
|
||||||
"subtle" $subtle
|
"ratio" (partial "assets/style.html" (dict "styles" $args.styles "index" $index "key" "ratio" "default" $args.ratio))
|
||||||
"style" $style
|
"portrait" (partial "assets/style.html" (dict "styles" $args.styles "index" $index "key" "portrait" "default" $args.portrait))
|
||||||
"align" $align
|
"subtle" $args.subtle
|
||||||
"button" $button
|
"style" $args.style
|
||||||
"buttonLabel" $buttonLabel
|
"align" $args.align
|
||||||
"buttonType" $buttonType
|
"button" $args.button
|
||||||
"iconRounded" $iconRounded
|
"buttonLabel" $args.buttonLabel
|
||||||
) -}}
|
"buttonType" $args.buttonType
|
||||||
{{- $params = merge $element $params }}
|
"iconRounded" $args.iconRounded
|
||||||
|
) -}}
|
||||||
|
{{- $params = merge $element $params }}
|
||||||
|
|
||||||
<div class="{{ with $cardWrapper }}{{ . }}{{ else }}col{{ end }}">
|
{{ if $args.scroll }}
|
||||||
{{ if $spacer }}<div class="spacer"></div>{{ end }}
|
{{ $width := (partial "assets/style.html" (dict "styles" $args.styles "index" $index "key" "width" "default" "3")) }}
|
||||||
{{- partial $hook $params -}}
|
{{ $size := $args.cols }}
|
||||||
</div>
|
{{ if and (gt $args.cols 1) (eq $width "6") }}{{ $size = sub (int $args.cols) 1 }}{{ end }}
|
||||||
{{- if and (lt $index (sub $max 1)) $separator -}}
|
{{ $cardWrapper = printf "card-block card-block-%d" (int $size) }}
|
||||||
<div class="col d-block d-sm-none">
|
{{ end }}
|
||||||
<hr>
|
|
||||||
|
<!--add col-$width -->
|
||||||
|
<div class="{{ with $cardWrapper }}{{ . }}{{ else }}col{{ end }}">
|
||||||
|
{{ if $args.spacer }}<div class="spacer"></div>{{ end }}
|
||||||
|
{{- partial $args.hook $params -}}
|
||||||
</div>
|
</div>
|
||||||
|
{{- if and (lt $index (sub $max 1)) $args.separator -}}
|
||||||
|
<div class="col d-block d-sm-none">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{ if $args.cards }}{{- print $args.cards | safeHTML }}{{ end }}
|
||||||
{{ if $cards }}{{- print $cards | safeHTML }}{{ end }}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if $paginator }}
|
{{ if $paginator }}
|
||||||
{{- if gt $paginator.TotalPages 1 -}}
|
{{- 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 -}}
|
{{- end -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if and (gt $count $max) $moreTitle }}
|
{{ if and (gt $count $max) $args.hrefTitle }}
|
||||||
<a class="btn btn-outline-primary mt-4" href="{{ $moreURL| safeURL }}" role="button">{{ $moreTitle }}</a>
|
<a class="btn btn-outline-primary mt-4" href="{{ $args.href| safeURL }}" role="button">{{ $args.hrefTitle }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
@@ -80,7 +80,8 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ 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 -->
|
<!-- Inline partial to render the card's body -->
|
||||||
{{- define "partials/card-body.html" -}}
|
{{- define "partials/card-body.html" -}}
|
||||||
@@ -194,7 +195,7 @@
|
|||||||
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description "button" $button) -}}
|
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description "button" $button) -}}
|
||||||
</div>
|
</div>
|
||||||
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>{{ end }}
|
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>{{ end }}
|
||||||
{{ if $button }}
|
{{ if and $href $button }}
|
||||||
{{ $label := (or $buttonLabel $title) | default (T "readMore") }}
|
{{ $label := (or $buttonLabel $title) | default (T "readMore") }}
|
||||||
{{ $buttonClass := "card-button mb-n4" }}
|
{{ $buttonClass := "card-button mb-n4" }}
|
||||||
{{ if eq $buttonType "link" }}{{ $buttonClass = "card-button card-button-link mb-n4" }}{{ end }}
|
{{ if eq $buttonType "link" }}{{ $buttonClass = "card-button card-button-link mb-n4" }}{{ end }}
|
||||||
@@ -216,6 +217,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<!-- Render stacked / default card -->
|
<!-- Render stacked / default card -->
|
||||||
|
{{ $overlay := eq $orientation "overlay" }}
|
||||||
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
|
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
|
||||||
{{- if $thumbnail -}}
|
{{- if $thumbnail -}}
|
||||||
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "16x9") "portrait" $portrait "anchor" $anchor "sizes" $sizes "wrapper" "card-img-wrap" "class" "card-img-top card-img-bg" "title" (or $alt $title) "loading" $loading) -}}
|
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "16x9") "portrait" $portrait "anchor" $anchor "sizes" $sizes "wrapper" "card-img-wrap" "class" "card-img-top card-img-bg" "title" (or $alt $title) "loading" $loading) -}}
|
||||||
@@ -229,7 +231,8 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
<div class="card-body d-flex flex-column p-{{ $padding }} {{ 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 }}
|
{{ 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) -}}
|
{{- 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 }}
|
{{ if $page }}{{- partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) -}}{{ end }}
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
{{ $imgset := index $target "set" }}
|
{{ $imgset := index $target "set" }}
|
||||||
{{ $height := index $target "height" }}
|
{{ $height := index $target "height" }}
|
||||||
{{ $width := index $target "width" }}
|
{{ $width := index $target "width" }}
|
||||||
|
{{ $data := index $target "data" }}
|
||||||
|
|
||||||
<!-- Add color modes -->
|
<!-- Add color modes -->
|
||||||
{{- range $none := $modes -}}
|
{{- range $none := $modes -}}
|
||||||
@@ -55,7 +56,14 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{ with $wrapper }}<div class="{{ . }}">{{ end }}
|
{{ with $wrapper }}<div class="{{ . }}">{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- if not $fileAnchor -}}
|
|
||||||
|
{{ if $data }}
|
||||||
|
{{- if site.Params.debugging.includeSVGOrigin }}
|
||||||
|
{{ printf "<!-- <svg src=\"%s\"> -->" $.url | safeHTML }}
|
||||||
|
{{ end -}}
|
||||||
|
{{- $data = replace $data "<svg" (printf "<svg class=\"%s\"" $class) -}}
|
||||||
|
{{- $data | safeHTML -}}
|
||||||
|
{{- else if not $fileAnchor -}}
|
||||||
<img class="img-fluid {{ $class }}"
|
<img class="img-fluid {{ $class }}"
|
||||||
src="{{ $fallbackURL }}"
|
src="{{ $fallbackURL }}"
|
||||||
{{ if $lazy }}loading="lazy"{{ end }}
|
{{ if $lazy }}loading="lazy"{{ end }}
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
{{ $dims := slice }}
|
{{ $dims := slice }}
|
||||||
{{- $res := "" -}}
|
{{- $res := "" -}}
|
||||||
{{- $img := "" -}}
|
{{- $img := "" -}}
|
||||||
|
{{- $data := "" -}}
|
||||||
{{ $transform := "" }}
|
{{ $transform := "" }}
|
||||||
{{- if hasSuffix $url "svg" -}}
|
{{- if hasSuffix $url "svg" -}}
|
||||||
{{- $res = partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
|
{{- $res = partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
|
||||||
@@ -61,6 +62,10 @@
|
|||||||
{{ $dims = $dims | append "500" }}
|
{{ $dims = $dims | append "500" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else if eq (string $res.MediaType) "image/svg+xml" }}
|
||||||
|
{{ $data = $res.Content }}
|
||||||
|
{{ else }}
|
||||||
|
{{ warnf "Unsupported media type '%s': %q" (string $res.MediaType) $url -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else if $ratio }}
|
{{ else if $ratio }}
|
||||||
{{ $transform = "fill" }}
|
{{ $transform = "fill" }}
|
||||||
@@ -137,4 +142,4 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ return (dict "target" $targetURL "set" $set "height" $height "width" $width) }}
|
{{ return (dict "target" $targetURL "set" $set "height" $height "width" $width "data" $data) }}
|
@@ -59,9 +59,22 @@
|
|||||||
{{ if not $isLocal }}
|
{{ if not $isLocal }}
|
||||||
{{ $ref := partial "utilities/GetPage.html" (dict "url" $destination "page" $page) }}
|
{{ $ref := partial "utilities/GetPage.html" (dict "url" $destination "page" $page) }}
|
||||||
{{- if not $ref -}}
|
{{- if not $ref -}}
|
||||||
{{- errorf "partial [assets/link.html] - Cannot find page: %s" $destination -}}
|
{{ $pageContext := "" }}
|
||||||
{{- $error = true -}}
|
{{ with $page.File }}{{ $pageContext = path.Join "/content" .Dir }}{{ end }}
|
||||||
{{- else -}}
|
{{ $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 }}
|
||||||
|
{{ else if $isStatic }}
|
||||||
|
{{ $destination = urls.JoinPath "/" $destination }}
|
||||||
|
{{ end }}
|
||||||
|
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- if and $ref (not $error) -}}
|
||||||
{{- $destination = $ref.RelPermalink -}}
|
{{- $destination = $ref.RelPermalink -}}
|
||||||
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
|
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{- $pageURL := $page.RelPermalink -}}
|
{{- $pageURL := $page.RelPermalink -}}
|
||||||
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
||||||
|
{{ if not $menu.PageRef }}{{ $isActive = false }}{{ end }}
|
||||||
{{- $isAlias := $menu.Params.alias -}}
|
{{- $isAlias := $menu.Params.alias -}}
|
||||||
{{- $isIcon := $menu.Params.icon -}}
|
{{- $isIcon := $menu.Params.icon -}}
|
||||||
|
|
||||||
|
@@ -107,7 +107,7 @@
|
|||||||
{{- $enableVersions = gt (len $list ) 1 -}}
|
{{- $enableVersions = gt (len $list ) 1 -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- $enableLanguage := or $page.IsTranslated site.IsMultiLingual -}}
|
{{- $enableLanguage := or $page.IsTranslated hugo.IsMultilingual -}}
|
||||||
{{- $horizontal := default false site.Params.navigation.horizontal -}}
|
{{- $horizontal := default false site.Params.navigation.horizontal -}}
|
||||||
|
|
||||||
{{- $logo := .logo | default site.Params.navigation.logo -}}
|
{{- $logo := .logo | default site.Params.navigation.logo -}}
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
<div class="container-fluid {{ if $fixed }}fixed-top{{ else if $overlay }}navbar-overlay{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
||||||
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
||||||
<nav class="navbar p-4
|
<nav class="navbar p-4
|
||||||
{{- if not $overlay }}{{ with $color }} bg-{{ . }}{{ end }}{{ end -}}
|
{{- if not $overlay }}{{ with $color }} bg-{{ . }}{{ end }}{{ end -}}
|
||||||
@@ -173,9 +173,9 @@
|
|||||||
{{ if $contrast }} navbar-contrast{{ end }}"
|
{{ if $contrast }} navbar-contrast{{ end }}"
|
||||||
{{ if $overlay }}
|
{{ if $overlay }}
|
||||||
data-bs-theme="{{ $overlayMode }}"
|
data-bs-theme="{{ $overlayMode }}"
|
||||||
data-bs-overlay="{{ $overlayMode }}"
|
{{ if $fixed }}data-bs-overlay="{{ $overlayMode }}"{{ end }}
|
||||||
{{ end }}
|
{{ if $color }}data-navbar-color="{{ $color }}"{{ end }}
|
||||||
{{ if $overlay }}data-navbar-color="{{ $color }}"{{ end }}
|
{{ end }}
|
||||||
>
|
>
|
||||||
<div class="container-xxl p-0">
|
<div class="container-xxl p-0">
|
||||||
<div class="d-flex navbar-container justify-content-center">
|
<div class="d-flex navbar-container justify-content-center">
|
||||||
@@ -222,7 +222,9 @@
|
|||||||
|
|
||||||
<div class="navbar-collapse collapse" id="{{ $id }}-collapse">
|
<div class="navbar-collapse collapse" id="{{ $id }}-collapse">
|
||||||
<!-- Insert search input -->
|
<!-- 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) -->
|
<!-- Render top-menu items (maximum depth of 2) -->
|
||||||
<ul class="navbar-nav {{ if $flex }}d-flex w-100{{ else }}ms-auto{{ end }}">
|
<ul class="navbar-nav {{ if $flex }}d-flex w-100{{ else }}ms-auto{{ end }}">
|
||||||
|
@@ -24,19 +24,17 @@
|
|||||||
{{- $class := delimit $main " " -}}
|
{{- $class := delimit $main " " -}}
|
||||||
{{ 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 := $input | $page.RenderString }}
|
{{- $input := $input | $page.RenderString }}
|
||||||
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
{{ $regex := `<table\s*class="(.+?)"` }}
|
||||||
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
{{ $current := (index (index (findRESubmatch $regex $input) 0) 1) }}
|
||||||
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
{{ $target := delimit (((split $current " ") | append "table" | append $class) | uniq) " " }}
|
||||||
|
|
||||||
{{ $attributes := "" }}
|
{{ $attributes := "" }}
|
||||||
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
||||||
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=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 }}
|
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
|
||||||
|
|
||||||
{{- $old := "<table>" -}}
|
{{- $new := printf `<table class="%s" %s` $target (trim $attributes " ") -}}
|
||||||
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
{{ $input := replaceRE $regex $new $input 1 -}}
|
||||||
|
|
||||||
{{ $input := replace $input $old $new -}}
|
|
||||||
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
|
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
|
||||||
{{ $input | safeHTML }}
|
{{ $input | safeHTML }}
|
||||||
{{- with $responsive }}</div>{{ end -}}
|
{{- 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 -}}
|
@@ -73,7 +73,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{- if site.Params.style.purge -}}
|
{{- if site.Params.style.purge -}}
|
||||||
{{- $post_options := dict "config" "config" "noMap" hugo.IsProduction -}}
|
{{- $post_options := dict "config" "config" "noMap" hugo.IsProduction -}}
|
||||||
{{- $css = $css | resources.PostCSS $post_options -}}
|
{{- $css = $css | css.PostCSS $post_options -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if not hugo.IsProduction -}}
|
{{- if not hugo.IsProduction -}}
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
{{- $actions = sort $actions "weight" "asc" -}}
|
{{- $actions = sort $actions "weight" "asc" -}}
|
||||||
<div class="hstack{{ if gt (len $actions) 1 }} gap-1{{ end }} justify-content-{{ $align}} pt-5 pt-md-3">
|
<div class="hstack{{ if gt (len $actions) 1 }} gap-1{{ end }} justify-content-{{ $align}} pt-5 pt-md-3">
|
||||||
{{ range $actions }}
|
{{ range $actions }}
|
||||||
{{ partial "assets/button.html" (dict "href" .url "icon" .icon "title" .title "outline" .outline "order" "last" "justify" "start") }}
|
{{ partial "assets/button.html" (dict "href" .url "icon" .icon "label" .label "title" .title "outline" .outline "order" "last" "justify" "start") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -80,8 +80,14 @@
|
|||||||
{{- if not $isExternal -}}
|
{{- if not $isExternal -}}
|
||||||
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }}
|
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }}
|
||||||
{{- if not $ref -}}
|
{{- if not $ref -}}
|
||||||
{{- errorf "Cannot find page: '%s' at %s" $url .Position -}}
|
{{ $pageContext := "" }}
|
||||||
{{- $error = true -}}
|
{{ with .Page.File }}{{ $pageContext = path.Join "/content" .Dir }}{{ end }}
|
||||||
|
{{ $isPageRes := fileExists (path.Join $pageContext $url) }}
|
||||||
|
{{ $isStatic := fileExists (path.Join "/static" $url) }}
|
||||||
|
{{ if and (not $isPageRes) (not $isStatic) }}
|
||||||
|
{{- errorf "Cannot find page or asset: '%s' at %s" $url .Position -}}
|
||||||
|
{{- $error = true -}}
|
||||||
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@@ -30,20 +30,21 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- 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 := .Inner | .Page.RenderString }}
|
||||||
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
{{ $regex := `<table\s*class="(.+?)"` }}
|
||||||
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
{{ $current := (index (index (findRESubmatch $regex $input) 0) 1) }}
|
||||||
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
{{ $target := delimit (((split $current " ") | append "table" | append $class) | uniq) " " }}
|
||||||
|
|
||||||
{{ $attributes := "" }}
|
{{ $attributes := "" }}
|
||||||
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
||||||
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=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 }}
|
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
|
||||||
|
|
||||||
{{- $old := "<table>" -}}
|
{{- $new := printf `<table class="%s" %s` $target (trim $attributes " ") -}}
|
||||||
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
{{ $input := replaceRE $regex $new $input 1 -}}
|
||||||
{{ $input := replace $input $old $new -}}
|
|
||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
{{ if eq $breakpoint "none" }}
|
{{ if eq $breakpoint "none" }}
|
||||||
{{ $input | safeHTML }}
|
{{ $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 -}}
|
@@ -2,69 +2,45 @@
|
|||||||
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
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.
|
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.
|
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
|
|
||||||
Copyright 2022 The Hugo Authors. Licensed under the Apache License, Version 2.0.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
{{- $pc := .Page.Site.Config.Privacy.YouTube -}}
|
{{ $error := false }}
|
||||||
{{- if not $pc.Disable -}}
|
|
||||||
{{ $error := false }}
|
|
||||||
|
|
||||||
<!-- Validate arguments -->
|
<!-- Validate arguments -->
|
||||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "youtube" "args" .Params) }}
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "video" "args" .Params "group" "shortcode") }}
|
||||||
{{ errorf "Invalid arguments: %s" .Position -}}
|
{{ errorf "Invalid arguments: %s" .Position -}}
|
||||||
{{ $error = true }}
|
{{ $error = true }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Initialize arguments -->
|
<!-- Initialize arguments -->
|
||||||
{{- $id := "" -}}
|
{{- $host := "youtube" -}}
|
||||||
{{- $class := "" -}}
|
{{- $id := "" -}}
|
||||||
{{- $title := "YouTube Video" }}
|
{{- $class := "" -}}
|
||||||
{{- $autoplay := false }}
|
{{- $title := "YouTube Video" }}
|
||||||
{{- $autotitle := false }}
|
{{- $autoplay := false }}
|
||||||
{{- $host := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
|
{{- $autotitle := false }}
|
||||||
|
|
||||||
{{- if .IsNamedParams }}
|
{{- if .IsNamedParams }}
|
||||||
{{ with .Get "id" }}{{ $id = . }}{{ end }}
|
{{ with .Get "id" }}{{ $id = . }}{{ end }}
|
||||||
{{ with .Get "class" }}{{ $class = . }}{{ end }}
|
{{ with .Get "class" }}{{ $class = . }}{{ end }}
|
||||||
{{ with .Get "title" }}{{ $title = . }}{{ end }}
|
{{ with .Get "title" }}{{ $title = . }}{{ end }}
|
||||||
{{ if isset .Params "autoplay" }}{{ $autoplay = partial "utilities/CastBool.html" (.Get "autoplay") }}{{ 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 -}}
|
{{ if isset .Params "autotitle" }}{{ $autotitle = partial "utilities/CastBool.html" (.Get "autotitle") }}{{ end -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{- $id = .Get 0 -}}
|
{{- $id = .Get 0 -}}
|
||||||
{{- $class = .Get 1 -}}
|
{{- $class = .Get 1 -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $url := printf "https://%s/embed/%s?origin=%s" $host $id .Site.BaseURL }}
|
|
||||||
{{ $api := printf "https://www.youtube.com/oembed?format=json&url=%s" (printf "https://www.youtube.com/watch?v=%s" $id) }}
|
|
||||||
|
|
||||||
{{ if $autotitle }}
|
<!-- Main code -->
|
||||||
{{ with resources.GetRemote $api }}
|
{{ if not $error -}}
|
||||||
{{ with .Err }}
|
{{ partial "assets/video.html" (dict
|
||||||
{{ errorf "Unable to parse video metadata '%q': %s\n %s" $api .Position . }}
|
"page" .Page
|
||||||
{{ else }}
|
"position" .Position
|
||||||
{{ $data := . | transform.Unmarshal }}
|
"host" $host
|
||||||
{{ with $data.title }}{{ $title = . }}{{ end }}
|
"id" $id
|
||||||
{{ end }}
|
"class" $class
|
||||||
{{ else }}
|
"title" $title
|
||||||
{{ errorf "Unable to get video metadata '%q': %s" $api .Position }}
|
"autoplay" $autoplay
|
||||||
{{ end }}
|
"autotitle" $autotitle
|
||||||
{{ end }}
|
) }}
|
||||||
|
{{ end -}}
|
||||||
<!-- Main code -->
|
|
||||||
<div class="youtube-embedded {{ $class }}">
|
|
||||||
<iframe src="{{ $url }}{{ if $autoplay }}&autoplay=1&mute=1{{ end }}"
|
|
||||||
allowfullscreen title="{{ $title }}" {{ if $autoplay }}allow="autoplay"{{ end }}>
|
|
||||||
</iframe>
|
|
||||||
</div>
|
|
||||||
{{ end -}}
|
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
connect-src 'self'
|
connect-src 'self'
|
||||||
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
|
||||||
font-src 'self' https://*.netlify.app https://fonts.gstatic.com; \
|
font-src 'self' https://*.netlify.app https://fonts.gstatic.com; \
|
||||||
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com \
|
frame-src 'self' https://player.cloudinary.com https://player.vimeo.com https://www.youtube-nocookie.com https://www.youtube.com \
|
||||||
app.netlify.com; \
|
app.netlify.com; \
|
||||||
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://*.netlify.app https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://*.netlify.app https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
@@ -47,7 +47,6 @@
|
|||||||
camera=(), \
|
camera=(), \
|
||||||
magnetometer=(), \
|
magnetometer=(), \
|
||||||
gyroscope=(), \
|
gyroscope=(), \
|
||||||
fullscreen=(), \
|
|
||||||
payment=() \
|
payment=() \
|
||||||
"""
|
"""
|
||||||
cache-control = """\
|
cache-control = """\
|
||||||
|
2345
package-lock.json
generated
2345
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.26.2",
|
"version": "0.27.0-alpha2",
|
||||||
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"hugo",
|
"hugo",
|
||||||
@@ -69,26 +69,23 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fullhuman/postcss-purgecss": "^6.0.0",
|
"@fullhuman/postcss-purgecss": "^6.0.0",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"cssnano": "^7.0.5",
|
"cssnano": "^7.0.6",
|
||||||
"cssnano-preset-advanced": "^7.0.5",
|
"cssnano-preset-advanced": "^7.0.6",
|
||||||
"hugo-bin": "0.129.2",
|
"hugo-bin": "0.131.1",
|
||||||
"purgecss-whitelister": "^2.4.0"
|
"purgecss-whitelister": "^2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
|
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^9.9.1",
|
||||||
"eslint-config-standard": "^17.1.0",
|
"markdownlint-cli2": "^0.14.0",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"neostandard": "^0.11.4",
|
||||||
"eslint-plugin-n": "^16.6.2",
|
|
||||||
"eslint-plugin-promise": "^6.6.0",
|
|
||||||
"markdownlint-cli2": "^0.13.0",
|
|
||||||
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"postcss-cli": "^11.0.0",
|
"postcss-cli": "^11.0.0",
|
||||||
"replace-in-files-cli": "^3.0.0",
|
"replace-in-files-cli": "^3.0.0",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"shx": "^0.3.4",
|
"shx": "^0.3.4",
|
||||||
"stylelint": "^16.8.1",
|
"stylelint": "^16.9.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0"
|
"stylelint-config-standard-scss": "^13.1.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
@@ -6,7 +6,7 @@ homepage = "https://gethinode.com"
|
|||||||
demosite = "https://demo.gethinode.com"
|
demosite = "https://demo.gethinode.com"
|
||||||
tags = ["blog", "documentation", "minimal", "modern", "customizable", "search", "bootstrap"]
|
tags = ["blog", "documentation", "minimal", "modern", "customizable", "search", "bootstrap"]
|
||||||
features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "versioned documentation"]
|
features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "versioned documentation"]
|
||||||
min_version = "0.132.0"
|
min_version = "0.134.0"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Mark Dumay"
|
name = "Mark Dumay"
|
||||||
|
Reference in New Issue
Block a user