mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-08 18:44:24 +00:00
Compare commits
58 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 | ||
![]() |
c5edb65550 |
@@ -2,6 +2,7 @@ assets/js/critical/languageSelector.js
|
|||||||
assets/js/critical/color.js
|
assets/js/critical/color.js
|
||||||
assets/js/analytics.js
|
assets/js/analytics.js
|
||||||
assets/js/flexsearch.js
|
assets/js/flexsearch.js
|
||||||
|
assets/js/navbar.js
|
||||||
assets/js/sharing.js
|
assets/js/sharing.js
|
||||||
assets/js/vendor
|
assets/js/vendor
|
||||||
node_modules
|
node_modules
|
||||||
|
@@ -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;
|
||||||
|
@@ -27,6 +27,18 @@
|
|||||||
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
|
||||||
@@ -172,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 = """\
|
||||||
|
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.
|
|
@@ -165,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 = """\
|
||||||
|
@@ -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.
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
"form",
|
"form",
|
||||||
"h2",
|
"h2",
|
||||||
"h3",
|
"h3",
|
||||||
"h5",
|
|
||||||
"head",
|
"head",
|
||||||
"hr",
|
"hr",
|
||||||
"html",
|
"html",
|
||||||
@@ -313,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",
|
||||||
@@ -342,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",
|
||||||
@@ -478,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",
|
||||||
@@ -594,8 +589,6 @@
|
|||||||
"navbar-sample-collapse",
|
"navbar-sample-collapse",
|
||||||
"navigation",
|
"navigation",
|
||||||
"notification",
|
"notification",
|
||||||
"offcanvas-label",
|
|
||||||
"offcanvass-sidebar",
|
|
||||||
"persona",
|
"persona",
|
||||||
"projecten",
|
"projecten",
|
||||||
"projects",
|
"projects",
|
||||||
@@ -616,6 +609,8 @@
|
|||||||
"toast-message-email-4",
|
"toast-message-email-4",
|
||||||
"toc-collapse",
|
"toc-collapse",
|
||||||
"tooltip",
|
"tooltip",
|
||||||
|
"video",
|
||||||
|
"vimeo",
|
||||||
"youtube"
|
"youtube"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
6
go.mod
6
go.mod
@@ -9,9 +9,9 @@ require (
|
|||||||
github.com/gethinode/mod-fontawesome v1.10.0 // 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.8 // indirect
|
||||||
github.com/gethinode/mod-utils/v2 v2.4.0 // indirect
|
github.com/gethinode/mod-utils/v2 v2.5.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
|
||||||
)
|
)
|
||||||
|
6
go.sum
6
go.sum
@@ -202,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=
|
||||||
@@ -214,6 +216,8 @@ 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-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=
|
||||||
@@ -262,6 +266,8 @@ 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/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=
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
"link",
|
"link",
|
||||||
"meta",
|
"meta",
|
||||||
"nav",
|
"nav",
|
||||||
|
"noscript",
|
||||||
"ol",
|
"ol",
|
||||||
"p",
|
"p",
|
||||||
"path",
|
"path",
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
"bg-body",
|
"bg-body",
|
||||||
"bg-opacity-10",
|
"bg-opacity-10",
|
||||||
"bg-primary",
|
"bg-primary",
|
||||||
|
"border-0",
|
||||||
"bottom-0",
|
"bottom-0",
|
||||||
"bottom-bar",
|
"bottom-bar",
|
||||||
"breadcrumb",
|
"breadcrumb",
|
||||||
@@ -45,10 +47,19 @@
|
|||||||
"btn",
|
"btn",
|
||||||
"btn-close",
|
"btn-close",
|
||||||
"btn-primary",
|
"btn-primary",
|
||||||
|
"btn-social",
|
||||||
|
"card",
|
||||||
|
"card-body",
|
||||||
|
"card-body-link",
|
||||||
|
"card-text",
|
||||||
|
"card-title",
|
||||||
|
"card-zoom",
|
||||||
"checkbox",
|
"checkbox",
|
||||||
"col",
|
"col",
|
||||||
"col-12",
|
"col-12",
|
||||||
"col-6",
|
"col-6",
|
||||||
|
"col-lg-2",
|
||||||
|
"col-lg-8",
|
||||||
"col-md-2",
|
"col-md-2",
|
||||||
"col-md-3",
|
"col-md-3",
|
||||||
"col-md-4",
|
"col-md-4",
|
||||||
@@ -61,7 +72,9 @@
|
|||||||
"container-xxl",
|
"container-xxl",
|
||||||
"d-flex",
|
"d-flex",
|
||||||
"d-inline",
|
"d-inline",
|
||||||
|
"d-lg-block",
|
||||||
"d-md-block",
|
"d-md-block",
|
||||||
|
"d-md-none",
|
||||||
"d-none",
|
"d-none",
|
||||||
"display-1",
|
"display-1",
|
||||||
"display-4",
|
"display-4",
|
||||||
@@ -73,12 +86,17 @@
|
|||||||
"fa-book-open",
|
"fa-book-open",
|
||||||
"fa-ellipsis",
|
"fa-ellipsis",
|
||||||
"fa-face-frown",
|
"fa-face-frown",
|
||||||
|
"fa-facebook",
|
||||||
"fa-fw",
|
"fa-fw",
|
||||||
"fa-github",
|
"fa-github",
|
||||||
|
"fa-link",
|
||||||
"fa-linkedin",
|
"fa-linkedin",
|
||||||
"fa-medium",
|
"fa-medium",
|
||||||
"fa-moon",
|
"fa-moon",
|
||||||
|
"fa-share-nodes",
|
||||||
"fa-sun",
|
"fa-sun",
|
||||||
|
"fa-whatsapp",
|
||||||
|
"fa-x-twitter",
|
||||||
"fab",
|
"fab",
|
||||||
"fas",
|
"fas",
|
||||||
"fixed-top",
|
"fixed-top",
|
||||||
@@ -88,8 +106,13 @@
|
|||||||
"form-control",
|
"form-control",
|
||||||
"fs-3",
|
"fs-3",
|
||||||
"fs-5",
|
"fs-5",
|
||||||
|
"fs-6",
|
||||||
|
"fs-lg-5",
|
||||||
"fw-30",
|
"fw-30",
|
||||||
"fw-bold",
|
"fw-bold",
|
||||||
|
"g-4",
|
||||||
|
"gap-1",
|
||||||
|
"h-100",
|
||||||
"hstack",
|
"hstack",
|
||||||
"img-fluid",
|
"img-fluid",
|
||||||
"img-wrap",
|
"img-wrap",
|
||||||
@@ -99,10 +122,14 @@
|
|||||||
"justify-content-end",
|
"justify-content-end",
|
||||||
"justify-content-start",
|
"justify-content-start",
|
||||||
"label",
|
"label",
|
||||||
|
"lead",
|
||||||
"link-bg-footer",
|
"link-bg-footer",
|
||||||
"link-secondary",
|
"link-secondary",
|
||||||
"main-content",
|
"main-content",
|
||||||
"main-nav-toggler",
|
"main-nav-toggler",
|
||||||
|
"mb-3",
|
||||||
|
"mb-5",
|
||||||
|
"mb-lg-5",
|
||||||
"me-auto",
|
"me-auto",
|
||||||
"middle-bar",
|
"middle-bar",
|
||||||
"min-vh-100",
|
"min-vh-100",
|
||||||
@@ -114,6 +141,7 @@
|
|||||||
"mx-auto",
|
"mx-auto",
|
||||||
"mx-md-0",
|
"mx-md-0",
|
||||||
"my-auto",
|
"my-auto",
|
||||||
|
"my-md-0",
|
||||||
"my-md-auto",
|
"my-md-auto",
|
||||||
"nav-item",
|
"nav-item",
|
||||||
"nav-link",
|
"nav-link",
|
||||||
@@ -136,6 +164,7 @@
|
|||||||
"p-3",
|
"p-3",
|
||||||
"p-4",
|
"p-4",
|
||||||
"pb-4",
|
"pb-4",
|
||||||
|
"pb-5",
|
||||||
"pb-md-0",
|
"pb-md-0",
|
||||||
"position-fixed",
|
"position-fixed",
|
||||||
"position-relative",
|
"position-relative",
|
||||||
@@ -150,40 +179,59 @@
|
|||||||
"row",
|
"row",
|
||||||
"row-cols-1",
|
"row-cols-1",
|
||||||
"row-cols-2",
|
"row-cols-2",
|
||||||
|
"row-cols-lg-3",
|
||||||
"row-cols-md-2",
|
"row-cols-md-2",
|
||||||
|
"row-cols-md-3",
|
||||||
|
"row-cols-sm-2",
|
||||||
"row-cols-sm-3",
|
"row-cols-sm-3",
|
||||||
"search",
|
"search",
|
||||||
"search-input",
|
"search-input",
|
||||||
"search-suggestions",
|
"search-suggestions",
|
||||||
"shadow",
|
"shadow",
|
||||||
|
"sidebar-overflow",
|
||||||
|
"sticky-top",
|
||||||
|
"stretched-link",
|
||||||
"svg-inline--fa",
|
"svg-inline--fa",
|
||||||
|
"text-body-secondary",
|
||||||
"text-center",
|
"text-center",
|
||||||
"text-decoration-none",
|
"text-decoration-none",
|
||||||
|
"text-end",
|
||||||
"text-muted",
|
"text-muted",
|
||||||
"text-secondary",
|
"text-secondary",
|
||||||
"text-sm-start",
|
"text-sm-start",
|
||||||
"text-start",
|
"text-start",
|
||||||
|
"text-uppercase",
|
||||||
"toast",
|
"toast",
|
||||||
"toast-body",
|
"toast-body",
|
||||||
"toast-container",
|
"toast-container",
|
||||||
"toast-header",
|
"toast-header",
|
||||||
|
"toc",
|
||||||
|
"toc-sidebar",
|
||||||
"toggler-icon",
|
"toggler-icon",
|
||||||
"top-bar"
|
"top-bar"
|
||||||
],
|
],
|
||||||
"ids": [
|
"ids": [
|
||||||
|
"blogs",
|
||||||
|
"btn-webshare",
|
||||||
"fa-face-frown",
|
"fa-face-frown",
|
||||||
|
"fab-facebook",
|
||||||
"fab-github",
|
"fab-github",
|
||||||
"fab-linkedin",
|
"fab-linkedin",
|
||||||
"fab-medium",
|
"fab-medium",
|
||||||
|
"fab-whatsapp",
|
||||||
|
"fab-x-twitter",
|
||||||
"fas-book-open",
|
"fas-book-open",
|
||||||
"fas-ellipsis",
|
"fas-ellipsis",
|
||||||
|
"fas-link",
|
||||||
"fas-moon",
|
"fas-moon",
|
||||||
|
"fas-share-nodes",
|
||||||
"fas-sun",
|
"fas-sun",
|
||||||
"navbar-0-collapse",
|
"navbar-0-collapse",
|
||||||
"navbar-mode",
|
"navbar-mode",
|
||||||
"navbar-mode-checkbox",
|
"navbar-mode-checkbox",
|
||||||
"toast-container",
|
"toast-container",
|
||||||
"toast-copied-code-message"
|
"toast-copied-code-message",
|
||||||
|
"toast-message-email-4"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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
|
||||||
|
@@ -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 -}}
|
||||||
|
@@ -194,7 +194,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 }}
|
||||||
|
@@ -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 }}
|
||||||
|
{{ if $color }}data-navbar-color="{{ $color }}"{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $overlay }}data-navbar-color="{{ $color }}"{{ 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 }}">
|
||||||
|
149
layouts/partials/assets/video.html
Normal file
149
layouts/partials/assets/video.html
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
<!--
|
||||||
|
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 -}}
|
||||||
|
{{- $source := urls.JoinPath "https://vimeo.com" $id -}}
|
||||||
|
{{- $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 := urls.JoinPath (path.Dir $id) (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 $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 -}}
|
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 }}
|
<!-- Main code -->
|
||||||
{{ $api := printf "https://www.youtube.com/oembed?format=json&url=%s" (printf "https://www.youtube.com/watch?v=%s" $id) }}
|
{{ if not $error -}}
|
||||||
|
{{ partial "assets/video.html" (dict
|
||||||
{{ if $autotitle }}
|
"page" .Page
|
||||||
{{ with resources.GetRemote $api }}
|
"position" .Position
|
||||||
{{ with .Err }}
|
"host" $host
|
||||||
{{ errorf "Unable to parse video metadata '%q': %s\n %s" $api .Position . }}
|
"id" $id
|
||||||
{{ else }}
|
"class" $class
|
||||||
{{ $data := . | transform.Unmarshal }}
|
"title" $title
|
||||||
{{ with $data.title }}{{ $title = . }}{{ end }}
|
"autoplay" $autoplay
|
||||||
{{ end }}
|
"autotitle" $autotitle
|
||||||
{{ else }}
|
) }}
|
||||||
{{ errorf "Unable to get video metadata '%q': %s" $api .Position }}
|
|
||||||
{{ 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 -}}
|
{{ 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 = """\
|
||||||
|
69
package-lock.json
generated
69
package-lock.json
generated
@@ -1,19 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.26.3",
|
"version": "0.26.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.26.3",
|
"version": "0.26.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"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.5",
|
||||||
"cssnano-preset-advanced": "^7.0.5",
|
"cssnano-preset-advanced": "^7.0.5",
|
||||||
"hugo-bin": "0.129.2",
|
"hugo-bin": "0.130.1",
|
||||||
"purgecss-whitelister": "^2.4.0"
|
"purgecss-whitelister": "^2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"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.2",
|
"stylelint": "^16.9.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0"
|
"stylelint-config-standard-scss": "^13.1.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
@@ -227,9 +227,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@csstools/css-parser-algorithms": {
|
"node_modules/@csstools/css-parser-algorithms": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.1.tgz",
|
||||||
"integrity": "sha512-20hEErXV9GEx15qRbsJVzB91ryayx1F2duHPBrfZXQAHz/dJG0u/611URpr28+sFjm3EI7U17Pj9SVA9NSAGJA==",
|
"integrity": "sha512-lSquqZCHxDfuTg/Sk2hiS0mcSFCEBuj49JfzPHJogDBT0mGCyY5A1AQzBWngitrp7i1/HAZpIgzF/VjhOEIJIg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -245,13 +245,13 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@csstools/css-tokenizer": "^3.0.0"
|
"@csstools/css-tokenizer": "^3.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@csstools/css-tokenizer": {
|
"node_modules/@csstools/css-tokenizer": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.1.tgz",
|
||||||
"integrity": "sha512-efZvfJyYrqH9hPCKtOBywlTsCXnEzAI9sLHFzUsDpBb+1bQ+bxJnwL9V2bRKv9w4cpIp75yxGeZRaVKoMQnsEg==",
|
"integrity": "sha512-UBqaiu7kU0lfvaP982/o3khfXccVlHPWp0/vwwiIgDF0GmqqqxoiXC/6FCjlS9u92f7CoEz6nXKQnrn1kIAkOw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -268,9 +268,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@csstools/media-query-list-parser": {
|
"node_modules/@csstools/media-query-list-parser": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz",
|
||||||
"integrity": "sha512-W0JlkUFwXjo703wt06AcaWuUcS+6x6IEDyxV6W65Sw+vLCYp+uPsrps+PXTiIfN0V1Pqj5snPzN7EYLmbz1zjg==",
|
"integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -286,8 +286,8 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@csstools/css-parser-algorithms": "^3.0.0",
|
"@csstools/css-parser-algorithms": "^3.0.1",
|
||||||
"@csstools/css-tokenizer": "^3.0.0"
|
"@csstools/css-tokenizer": "^3.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@csstools/selector-specificity": {
|
"node_modules/@csstools/selector-specificity": {
|
||||||
@@ -3313,9 +3313,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hugo-bin": {
|
"node_modules/hugo-bin": {
|
||||||
"version": "0.129.2",
|
"version": "0.130.1",
|
||||||
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.129.2.tgz",
|
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.130.1.tgz",
|
||||||
"integrity": "sha512-OpfKbO8nkopEt8MBYPWQOgcL6IcotiskI+U1YRprAtw+ySUJHIDHfxMIcWeNmo66N/Reqm4RbDxFMDgKPUXGeQ==",
|
"integrity": "sha512-0+GwMlYkTdmH2INIWPeoKf+Rx/+RbTCZNPhcdPwm4a+WJeuvGjOLOmK3grAk5vC2u4OwxfOhgD3zRU7wHVYxlw==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -6556,9 +6556,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/stylelint": {
|
"node_modules/stylelint": {
|
||||||
"version": "16.8.2",
|
"version": "16.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.9.0.tgz",
|
||||||
"integrity": "sha512-fInKATippQhcSm7AB+T32GpI+626yohrg33GkFT/5jzliUw5qhlwZq2UQQwgl3HsHrf09oeARi0ZwgY/UWEv9A==",
|
"integrity": "sha512-31Nm3WjxGOBGpQqF43o3wO9L5AC36TPIe6030Lnm13H3vDMTcS21DrLh69bMX+DBilKqMMVLian4iG6ybBoNRQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -6571,9 +6571,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@csstools/css-parser-algorithms": "^3.0.0",
|
"@csstools/css-parser-algorithms": "^3.0.1",
|
||||||
"@csstools/css-tokenizer": "^3.0.0",
|
"@csstools/css-tokenizer": "^3.0.1",
|
||||||
"@csstools/media-query-list-parser": "^3.0.0",
|
"@csstools/media-query-list-parser": "^3.0.1",
|
||||||
"@csstools/selector-specificity": "^4.0.0",
|
"@csstools/selector-specificity": "^4.0.0",
|
||||||
"@dual-bundle/import-meta-resolve": "^4.1.0",
|
"@dual-bundle/import-meta-resolve": "^4.1.0",
|
||||||
"balanced-match": "^2.0.0",
|
"balanced-match": "^2.0.0",
|
||||||
@@ -6595,7 +6595,7 @@
|
|||||||
"known-css-properties": "^0.34.0",
|
"known-css-properties": "^0.34.0",
|
||||||
"mathml-tag-names": "^2.1.3",
|
"mathml-tag-names": "^2.1.3",
|
||||||
"meow": "^13.2.0",
|
"meow": "^13.2.0",
|
||||||
"micromatch": "^4.0.7",
|
"micromatch": "^4.0.8",
|
||||||
"normalize-path": "^3.0.0",
|
"normalize-path": "^3.0.0",
|
||||||
"picocolors": "^1.0.1",
|
"picocolors": "^1.0.1",
|
||||||
"postcss": "^8.4.41",
|
"postcss": "^8.4.41",
|
||||||
@@ -6606,7 +6606,7 @@
|
|||||||
"resolve-from": "^5.0.0",
|
"resolve-from": "^5.0.0",
|
||||||
"string-width": "^4.2.3",
|
"string-width": "^4.2.3",
|
||||||
"strip-ansi": "^7.1.0",
|
"strip-ansi": "^7.1.0",
|
||||||
"supports-hyperlinks": "^3.0.0",
|
"supports-hyperlinks": "^3.1.0",
|
||||||
"svg-tags": "^1.0.0",
|
"svg-tags": "^1.0.0",
|
||||||
"table": "^6.8.2",
|
"table": "^6.8.2",
|
||||||
"write-file-atomic": "^5.0.1"
|
"write-file-atomic": "^5.0.1"
|
||||||
@@ -6788,9 +6788,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/stylelint/node_modules/micromatch": {
|
"node_modules/stylelint/node_modules/micromatch": {
|
||||||
"version": "4.0.7",
|
"version": "4.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||||
"integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
|
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"braces": "^3.0.3",
|
"braces": "^3.0.3",
|
||||||
@@ -6846,9 +6846,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/supports-hyperlinks": {
|
"node_modules/supports-hyperlinks": {
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz",
|
||||||
"integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==",
|
"integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"has-flag": "^4.0.0",
|
"has-flag": "^4.0.0",
|
||||||
@@ -6856,6 +6856,9 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.18"
|
"node": ">=14.18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/supports-preserve-symlinks-flag": {
|
"node_modules/supports-preserve-symlinks-flag": {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.26.3",
|
"version": "0.26.6",
|
||||||
"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",
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"cssnano": "^7.0.5",
|
"cssnano": "^7.0.5",
|
||||||
"cssnano-preset-advanced": "^7.0.5",
|
"cssnano-preset-advanced": "^7.0.5",
|
||||||
"hugo-bin": "0.129.2",
|
"hugo-bin": "0.130.1",
|
||||||
"purgecss-whitelister": "^2.4.0"
|
"purgecss-whitelister": "^2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
"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.2",
|
"stylelint": "^16.9.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0"
|
"stylelint-config-standard-scss": "^13.1.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
Reference in New Issue
Block a user