Compare commits

...

42 Commits

Author SHA1 Message Date
Mark Dumay
6b39b028fb Merge pull request #1276 from gethinode/develop
Fix button label argument
2024-10-26 09:31:04 +02:00
Mark Dumay
9a83550378 Merge branch 'main' into develop 2024-10-26 09:12:48 +02:00
Mark Dumay
792443c4cf Bump package release 2024-10-26 09:12:01 +02:00
Mark Dumay
3d52162925 Fix button label argument 2024-10-26 09:11:26 +02:00
Mark Dumay
80b28f7557 Merge pull request #1275 from gethinode/develop
Shift Hugo highlighting options to Hinode docs
2024-10-26 08:58:40 +02:00
Mark Dumay
43eebdf53f Merge branch 'main' into develop 2024-10-26 07:57:24 +02:00
Mark Dumay
b5062fe687 Merge pull request #1274 from gethinode/develop
Init default card color variable
2024-10-26 07:56:44 +02:00
Mark Dumay
51aa15266b Shift Hugo highlighting options to Hinode docs 2024-10-26 07:40:41 +02:00
Mark Dumay
19f638a129 Merge branch 'main' into develop 2024-10-26 07:30:21 +02:00
Mark Dumay
aa2e5ca6f4 Merge pull request #1273 from d-oit/file-options
feat: File component extend with Hugo highlight options
2024-10-26 07:28:00 +02:00
Mark Dumay
04eea0db71 Bump package release 2024-10-26 07:25:59 +02:00
Mark Dumay
4645f4ee7c Init default card color variable 2024-10-26 07:25:06 +02:00
do
bb6421c70b feat: File component extend with Hugo highlight options 2024-10-25 22:21:25 +02:00
Mark Dumay
622c6ee1c0 Merge pull request #1271 from gethinode/develop
Fix passing of button label argument to card
2024-10-25 18:35:36 +02:00
Mark Dumay
f1befb05cc Merge branch 'main' into develop 2024-10-25 18:28:05 +02:00
Mark Dumay
e146e3a559 Fix passing of button label argument to card 2024-10-25 18:27:39 +02:00
Mark Dumay
068e773ab0 Merge pull request #1270 from gethinode/develop
Improve navbar modal search accessibility
2024-10-25 16:39:04 +02:00
Mark Dumay
3ae91a78a1 Merge branch 'main' into develop 2024-10-25 16:32:31 +02:00
Mark Dumay
6627446961 Bump package release 2024-10-25 16:31:54 +02:00
Mark Dumay
d4fd6ece60 Improve navbar modal search accessibility 2024-10-25 16:31:26 +02:00
Mark Dumay
a746fd147c Merge pull request #1269 from gethinode/develop
Fix link cleaning and navbar menu check
2024-10-25 15:58:02 +02:00
Mark Dumay
d0410af879 Merge branch 'main' into develop 2024-10-25 15:52:30 +02:00
Mark Dumay
314f1a0ca4 Fix navbar menu conditional check 2024-10-25 15:50:50 +02:00
Mark Dumay
066c5ce8eb Fix cleaning of links that include a scheme 2024-10-25 15:32:44 +02:00
Mark Dumay
bba9629f54 Merge pull request #1268 from gethinode/develop
Improve site accessibility and SEO score
2024-10-25 15:32:28 +02:00
Mark Dumay
d2d59ec3ef Merge branch 'main' into develop 2024-10-25 15:20:00 +02:00
Mark Dumay
c080be2872 CLean up params file 2024-10-25 15:17:41 +02:00
Mark Dumay
3c17234b33 Update build stats 2024-10-25 15:17:13 +02:00
Mark Dumay
16884abcba Bump package release 2024-10-25 15:16:59 +02:00
Mark Dumay
2abbe4f6de Update dependencies 2024-10-25 15:16:36 +02:00
Mark Dumay
c6f9de0a64 Integrate vimeo as optional module 2024-10-25 15:16:24 +02:00
Mark Dumay
39f104fa5f Set default alt title for images 2024-10-25 14:03:15 +02:00
Mark Dumay
437ad0dbf7 Improve accessibility of nav control 2024-10-25 09:19:13 +02:00
Mark Dumay
2eb354d941 Improve theme switcher accessibility 2024-10-24 17:56:49 +02:00
github-actions[bot]
5a7f46bca4 Merge pull request #1265 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.133.5
Bump hugo-bin from 0.133.3 to 0.133.5
2024-10-24 13:43:42 +00:00
dependabot[bot]
0bc37ff426 Bump hugo-bin from 0.133.3 to 0.133.5
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.133.3 to 0.133.5.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.133.3...v0.133.5)

---
updated-dependencies:
- dependency-name: hugo-bin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-24 13:36:19 +00:00
Mark Dumay
0d24f85e13 Merge pull request #1262 from d-oit/patch-1
Fix attribute aria-inledby -> aria-labelledby
2024-10-24 06:58:56 +02:00
Mark Dumay
d067171ba2 Merge branch 'main' into patch-1 2024-10-24 06:51:59 +02:00
Mark Dumay
09e649d432 Merge pull request #1263 from gethinode/develop
Improve SEO score of navbar item without url
2024-10-24 06:51:13 +02:00
Mark Dumay
87c7bd4238 Merge branch 'main' into develop 2024-10-24 06:37:45 +02:00
Mark Dumay
19734f6a1f Improve SEO score of navbar item without url 2024-10-24 06:37:11 +02:00
Dominik Oswald
12a5ebad9f Fix attribute aria-inledby -> aria-labelledby 2024-10-23 19:55:36 +02:00
30 changed files with 155 additions and 300 deletions

View File

@@ -25,6 +25,8 @@ strong {
$black: #000 !default;
$btn-toggle-color: $black !default;
$card-color: var(--bs-body-color);
$carousel-dark-indicator-active-bg: #fff !default;
$carousel-dark-caption-color: #fff !default;
$carousel-dark-control-icon-filter: invert(0) grayscale(100) !default;

View File

@@ -1,4 +1,8 @@
.nav-tabs > .nav-link.active {
.nav-tabs .nav-tabs {
border: none;
}
.nav-tabs .nav-link.active {
border-bottom-color: var(--bs-body-bg) !important;
border-bottom-style: solid !important;
z-index: 1;
@@ -12,13 +16,13 @@
column-gap: var(--#{$prefix}nav-callout-gap) !important;
}
.nav-callout > .tab-content {
.nav-callout + .tab-content {
background-color: var(--#{$prefix}nav-callout-bg);
padding: 2 * $spacer;
margin-top: 0 !important;
}
.nav-callout > .nav-link {
.nav-callout .nav-link {
display: flex;
text-align: start;
vertical-align: text-top;
@@ -27,7 +31,7 @@
border-bottom: none;
}
.nav-callout > .nav-link.active {
.nav-callout .nav-link.active {
background-image: linear-gradient(to top right, var(--#{$prefix}nav-callout-bg) 50%, transparent 0);
background-size: 50% (3 * $spacer);
background-repeat: no-repeat;
@@ -53,7 +57,7 @@
}
}
.nav-callout > .accordion-item {
.nav-callout .accordion-item {
margin-top: 2 * $spacer;
margin-bottom: 2 * $spacer;
border: none;

View File

@@ -219,7 +219,6 @@
font-src = ["fonts.gstatic.com"]
frame-src = [
"player.cloudinary.com",
"player.vimeo.com",
"www.youtube-nocookie.com",
"www.youtube.com"
]
@@ -228,7 +227,17 @@
"*.imgix.net",
"*.imagekit.io",
"*.cloudinary.com",
"i.vimeocdn.com",
"i.ytimg.com"
]
# toml-docs-end csp
[modules.vimeo]
local = true
integration = "optional"
state = "async"
url = "https://player.vimeo.com/api/player.js"
[modules.vimeo.csp]
frame-src = ["player.vimeo.com"]
img-src = ["i.vimeocdn.com"]
script-src = ["player.vimeo.com"]

View File

@@ -11,12 +11,12 @@
default-src 'none'; \
font-src 'self' fonts.gstatic.com; \
form-action 'self'; \
frame-src player.cloudinary.com player.vimeo.com www.youtube-nocookie.com www.youtube.com; \
img-src 'self' *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.vimeocdn.com i.ytimg.com tile.openstreetmap.org; \
frame-src player.cloudinary.com www.youtube-nocookie.com www.youtube.com player.vimeo.com; \
img-src 'self' *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.ytimg.com tile.openstreetmap.org i.vimeocdn.com; \
manifest-src 'self'; \
media-src 'self'; \
object-src 'none'; \
script-src 'self' *.google-analytics.com *.googletagmanager.com; \
script-src 'self' *.google-analytics.com *.googletagmanager.com player.vimeo.com; \
style-src 'self' www.youtube.com; \
"""
Permissions-Policy = 'geolocation=(), midi=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), fullscreen=(), payment=() '

View File

@@ -38,3 +38,8 @@ arguments:
type: string
optional: true
comment: Class attribute of the tab control that wraps the file element.
options:
type: string
optional: true
comment: Hugo highlighting options.
release: v0.27.6

View File

@@ -195,5 +195,4 @@
hinode = "https://gethinode.com"
[modules.cookieyes]
# local = true
url = "https://cdn-cookieyes.com/client_data/a54b5553f349dd13bd225f8e/script.js"

View File

@@ -11,12 +11,12 @@
default-src 'none'; \
font-src 'self' fonts.gstatic.com; \
form-action 'self'; \
frame-src player.cloudinary.com player.vimeo.com www.youtube-nocookie.com www.youtube.com; \
img-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.vimeocdn.com i.ytimg.com tile.openstreetmap.org; \
frame-src player.cloudinary.com www.youtube-nocookie.com www.youtube.com player.vimeo.com; \
img-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.ytimg.com tile.openstreetmap.org i.vimeocdn.com; \
manifest-src 'self'; \
media-src 'self'; \
object-src 'none'; \
script-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com; \
script-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com player.vimeo.com; \
style-src 'self' 'unsafe-inline' www.youtube.com; \
"""
Permissions-Policy = 'geolocation=(), midi=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), fullscreen=(), payment=() '

View File

@@ -483,23 +483,3 @@ As an example, the following shortcode displays an Elephants video hosted by Clo
{{</* 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
As an example, the following shortcode displays a Hugo quickstart guide.
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* youtube id="w7Ft2ymGmfc" autoplay=true autotitle=true */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

View File

@@ -292,6 +292,8 @@
"link-secondary",
"link-success",
"link-warning",
"lntable",
"lntd",
"lottie-animation",
"m-0",
"main-content",
@@ -316,7 +318,9 @@
"mt-auto",
"mt-md-0",
"multi-docs-collapse-15",
"multi-file-collapse-0",
"multi-file-collapse-1",
"multi-file-collapse-2",
"mx-auto",
"mx-md-0",
"mx-md-2",
@@ -500,7 +504,9 @@
"barre-de-navigation",
"blog",
"body-docs-collapse-15",
"body-file-collapse-0",
"body-file-collapse-1",
"body-file-collapse-2",
"bouton",
"breadcrumb",
"button",
@@ -517,8 +523,10 @@
"collapse-1",
"command-prompt",
"cookies-etc",
"current-page-as-markdown-file",
"custom-activity",
"data-tables",
"default-configuration",
"docs",
"documentation",
"example",
@@ -556,8 +564,11 @@
"fichier",
"fil-dariane",
"file",
"file-shortcode",
"footer-docs-collapse-15",
"footer-file-collapse-0",
"footer-file-collapse-1",
"footer-file-collapse-2",
"formula-katex",
"formule-katex",
"groupe-de-boutons",
@@ -580,13 +591,13 @@
"map",
"mark",
"nav",
"nav-0",
"nav-0-0",
"nav-0-1",
"nav-0-2",
"nav-0-btn-0",
"nav-0-btn-1",
"nav-0-btn-2",
"nav-nav-0",
"navbar",
"navbar-0-collapse",
"navbar-mode",
@@ -618,10 +629,8 @@
"tooltip",
"types-of-cookies-we-use",
"video",
"vimeo",
"what-are-cookies",
"your-rights",
"youtube"
"your-rights"
]
}
}

2
go.mod
View File

@@ -6,7 +6,7 @@ require (
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
github.com/gethinode/mod-bootstrap v1.3.1 // indirect
github.com/gethinode/mod-csp v1.0.3 // indirect
github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect
github.com/gethinode/mod-flexsearch/v2 v2.0.2 // indirect
github.com/gethinode/mod-fontawesome v1.10.0 // indirect
github.com/gethinode/mod-google-analytics v1.1.3 // indirect
github.com/gethinode/mod-katex v1.1.2 // indirect

2
go.sum
View File

@@ -82,6 +82,8 @@ github.com/gethinode/mod-flexsearch v1.12.1 h1:clkGUWaNPe9Dt/66Apy7oH9NwVQfnD6Op
github.com/gethinode/mod-flexsearch v1.12.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
github.com/gethinode/mod-flexsearch/v2 v2.0.1 h1:5unGUSb1tX1LBtKygnLfdt7CnVJuFKSt6VXiKRxdojc=
github.com/gethinode/mod-flexsearch/v2 v2.0.1/go.mod h1:d7MMkVlz0l6cEk76e0mkveEsDxGfu5Sv+HUIhoGguhE=
github.com/gethinode/mod-flexsearch/v2 v2.0.2 h1:5FkLbjORwKvK544H/yaAltyIB7eptRPxxh5VcfDDeqM=
github.com/gethinode/mod-flexsearch/v2 v2.0.2/go.mod h1:d7MMkVlz0l6cEk76e0mkveEsDxGfu5Sv+HUIhoGguhE=
github.com/gethinode/mod-fontawesome v1.0.2 h1:ZSK6D20/w4y5GnfYfTBB58uHD0ChIfkpKfRGwioS9rg=
github.com/gethinode/mod-fontawesome v1.0.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
github.com/gethinode/mod-fontawesome v1.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=

View File

@@ -1,191 +1,7 @@
{
"htmlElements": {
"tags": [
"a",
"body",
"button",
"div",
"footer",
"form",
"head",
"html",
"img",
"input",
"label",
"li",
"link",
"meta",
"nav",
"ol",
"p",
"path",
"script",
"small",
"span",
"strong",
"svg",
"symbol",
"title",
"ul",
"use"
],
"classes": [
"active",
"align-items-center",
"align-self-center",
"align-self-end",
"ball",
"bg-body",
"bg-opacity-10",
"bg-primary",
"bottom-0",
"bottom-bar",
"breadcrumb",
"breadcrumb-item",
"btn",
"btn-close",
"btn-primary",
"checkbox",
"col",
"col-12",
"col-6",
"col-md-2",
"col-md-3",
"col-md-4",
"col-md-8",
"col-md-9",
"col-sm-12",
"collapse",
"collapsed",
"container-fluid",
"container-xxl",
"d-flex",
"d-inline",
"d-md-block",
"d-none",
"display-1",
"display-4",
"emphasis",
"end-0",
"fa",
"fa-10x",
"fa-2x",
"fa-book-open",
"fa-ellipsis",
"fa-face-frown",
"fa-fw",
"fa-github",
"fa-linkedin",
"fa-medium",
"fa-moon",
"fa-sun",
"fab",
"fas",
"fixed-top",
"flex-column",
"flex-fill",
"footer",
"form-control",
"fs-3",
"fs-5",
"fw-30",
"fw-bold",
"hstack",
"img-fluid",
"img-wrap",
"invisible",
"is-search",
"justify-content-center",
"justify-content-end",
"justify-content-start",
"label",
"link-bg-footer",
"link-secondary",
"main-content",
"main-nav-toggler",
"me-auto",
"middle-bar",
"min-vh-100",
"mode-switch",
"ms-auto",
"ms-md-3",
"mt-3",
"mt-4",
"mt-5",
"mt-md-0",
"mx-auto",
"mx-md-0",
"my-auto",
"my-md-auto",
"nav-item",
"nav-link",
"navbar",
"navbar-brand",
"navbar-collapse",
"navbar-container",
"navbar-expand-md",
"navbar-fixed-top",
"navbar-mode-selector",
"navbar-nav",
"navbar-toggler",
"no-js",
"order-0",
"order-1",
"order-md-0",
"order-md-1",
"p-0",
"p-2",
"p-3",
"p-4",
"pb-4",
"pb-md-0",
"position-fixed",
"position-relative",
"ps-1",
"pt-4",
"pt-5",
"pt-md-3",
"px-4",
"px-xxl-0",
"py-3",
"rounded",
"row",
"row-cols-1",
"row-cols-2",
"row-cols-md-2",
"row-cols-sm-3",
"search",
"search-input",
"search-suggestions",
"shadow",
"svg-inline--fa",
"text-center",
"text-decoration-none",
"text-muted",
"text-secondary",
"text-sm-start",
"text-start",
"toast",
"toast-body",
"toast-container",
"toast-header",
"toggler-icon",
"top-bar"
],
"ids": [
"fa-face-frown",
"fab-github",
"fab-linkedin",
"fab-medium",
"fas-book-open",
"fas-ellipsis",
"fas-moon",
"fas-sun",
"navbar-0-collapse",
"navbar-mode",
"navbar-mode-checkbox",
"toast-container",
"toast-copied-code-message"
]
"tags": null,
"classes": null,
"ids": null
}
}

View File

@@ -155,3 +155,7 @@
translation: Tipp
- id: warning
translation: Warnung
# Image
- id: image
translation: Bild

View File

@@ -161,3 +161,7 @@
translation: Tip
- id: warning
translation: Warning
# Image
- id: image
translation: image

View File

@@ -149,3 +149,7 @@
translation: "Commentaire"
- id: supportedValues
translation: "Valeurs supportées"
# Image
- id: image
translation: image

View File

@@ -160,3 +160,7 @@
translation: Tip
- id: warning
translation: Waarschuwing
# Image
- id: image
translation: Bild

View File

@@ -6,7 +6,7 @@
{{ $toc := .Render "single/panel-toc" }}
{{ with $sidebar }}
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-inledby="offcanvas-label">
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-labelledby="offcanvas-label">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvas-label">{{ strings.FirstUpper $.Section }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="{{ T "close" }}"></button>

View File

@@ -143,7 +143,7 @@
"style" $args.style
"align" $args.align
"button" $args.button
"buttonLabel" $args.buttonLabel
"buttonLabel" $element.buttonLabel
"buttonType" $args.buttonType
"iconRounded" $args.iconRounded
) -}}

View File

@@ -20,10 +20,11 @@
{{- $ratio := .ratio -}}
{{- $portrait := .portrait -}}
{{- $loading := .loading | default "eager" -}}
{{- $title := .caption | default (T "image") -}}
<!-- Main code -->
<div class="carousel-item{{ if $active }} active{{ end }}" {{ if not $active }} fetchpriority="low"{{ end }}>
{{ partial "assets/image.html" (dict "url" $src "ratio" $ratio "page" $page "class" "d-block w-100" "portrait" $portrait "loading" $loading) }}
{{ partial "assets/image.html" (dict "url" $src "ratio" $ratio "page" $page "class" "d-block w-100" "portrait" $portrait "loading" $loading "title" $title) }}
<div class="carousel-caption gradient"></div>
{{ with $caption }}
<div class="carousel-caption d-none d-md-block">

View File

@@ -16,6 +16,7 @@
{{- $modes := .modes -}}
{{- $plain := .plain | default false }}
{{- $anchor := .anchor }}
{{- $alt := or $title $caption (T "image") }}
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
{{- $fileAnchor := "" -}}
@@ -71,7 +72,7 @@
{{ with $imgset -}}srcset="{{ . }}" sizes="{{ $sizes }}"{{- end }}
{{ with $height }}height="{{ . }}"{{ end }}
{{ with $width }}width="{{ . }}"{{ end }}
{{ with (or $title $caption) }}alt="{{ . }}"{{ end }}>
{{ with $alt }}alt="{{ . }}"{{ end }}>
{{- else }}
<svg class="{{ $class }}">
<use href="{{ $fallbackURL }}#{{ $fileAnchor }}"></use>

View File

@@ -18,10 +18,10 @@
{{ if not $u.Scheme }}
{{ $b := urls.Parse site.BaseURL }}
{{ $destination = strings.TrimPrefix $b.Path $destination }}
{{ $destination = path.Clean $destination }}
{{ else }}
{{ $destination = (strings.TrimPrefix (strings.TrimSuffix "/" site.BaseURL) $destination) }}
{{ end }}
{{ $destination = path.Clean $destination }}
{{ if not $destination }}{{ $destination = "/" }}{{ end }}
{{- $target := "" -}}

View File

@@ -52,14 +52,17 @@
<div class="d-none d-lg-block">
{{ end }}
<div class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
<ul class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
{{- range $index, $item := $list -}}
{{ $show := eq $index 0}}
<li class="nav-item" role="presentation">
<button class="nav-link {{ if not $wrap }} text-nowrap{{ end }}{{ if $show }} active{{ end }}" id="nav-{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#nav-{{ $id }}-{{ $index }}"
type="button" role="tab" aria-controls="nav-{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
{{ $item.Title }}
</button>
</li>
{{ end -}}
</ul>
<div class="tab-content {{ if eq $type "tabs" }}border border-bottom-0 p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}">
{{ range $index, $item := $list }}
@@ -92,7 +95,6 @@
</div>
{{ end }}
</div>
</div>
{{ if eq $type "callout" }}</div>{{ end }}
{{ if $vertical }}</div>{{ end }}

View File

@@ -85,10 +85,10 @@
"size" "sm"
)}}
{{ else }}
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{ . }}{{ end }}"
{{ cond (ne $menuURL "") "<a" "<div" | safeHTML }} class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{ . }}{{ end }}"
{{ if $isIcon }}aria-label="{{ $menu.Name }}"{{ end }}
data-nav="main" data-nav-main="{{ $mainNav }}"{{ with $childNav }} data-nav-child="{{ . }}"{{ end }}
{{ if $menuURL }} href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }}{{ end }} {{ $button | safeHTMLAttr }}>
{{ if $menuURL }} href="{{ $menuURL }}{{ $params | safeHTML }}"{{ with $externalHref }} {{ . | safeHTML }}{{ end }}{{ end }} {{ $button | safeHTML }}>
{{- with $menu.Pre }}
{{ if hasPrefix . "<i" }}
@@ -100,6 +100,6 @@
<span {{ if $isActive }} class="active"{{ end }}>{{ if or (not $isIcon) $plain }}{{ $menu.Name }}{{ end }}</span>
{{- with $menu.Post }}{{ . }}{{ end -}}
{{- if not $isIcon }}&nbsp;{{ $suffix }}{{ end -}}
</a>
{{ cond (ne $menuURL "") "</a>" "</div>" | safeHTML }}
{{ end }}
{{ end }}

View File

@@ -18,14 +18,14 @@
{{- define "partials/navbar-mode.html" -}}
{{- $id := .id | default "navbar-mode" -}}
<div class="d-flex mode-switch align-items-center" id="{{ $id }}">
<input type="checkbox" class="checkbox navbar-mode-selector" id="{{ $id }}-checkbox" />
<li class="d-flex mode-switch align-items-center" id="{{ $id }}">
<input type="checkbox" class="checkbox navbar-mode-selector" id="{{ $id }}-checkbox" aria-label="{{ T "colorMode" }}" />
<label class="label" for="{{ $id }}-checkbox">
{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw" "spacing" false) }}
{{- partial "assets/icon.html" (dict "icon" "fas moon fa-fw" "spacing" false) }}
<div class="ball"></div>
</label>
</div>
</li>
{{- end -}}
<!-- Inline partial to render the version switcher -->
@@ -295,12 +295,16 @@
</li>
<li><hr class="dropdown-divider-bg"></li>
<a class="nav-link d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="modal" data-bs-target="#search-modal" aria-label="{{ T "ui_search" }}" aria-expanded="false">
<li class="d-{{ $size }}-none">
<a class="nav-link" href="#!" role="button" data-bs-toggle="modal" data-bs-target="#search-modal" aria-label="{{ T "ui_search" }}" aria-expanded="false">
{{ partial "assets/icon.html" (dict "icon" "fas magnifying-glass fa-fw") }}&nbsp;{{ T "ui_search" }}
</a>
<a class="nav-link d-none d-{{ $size }}-block" href="#!" role="button" data-bs-toggle="modal" data-bs-target="#search-modal" aria-label="{{ T "ui_search" }}" aria-expanded="false">
</li>
<li class="d-none d-{{ $size }}-block">
<a class="nav-link" href="#!" role="button" data-bs-toggle="modal" data-bs-target="#search-modal" aria-label="{{ T "ui_search" }}" aria-expanded="false">
{{ partial "assets/icon.html" (dict "icon" "fas magnifying-glass fa-fw") }}
</a>
</li>
{{ end -}}
</ul>
</div>

View File

@@ -121,7 +121,7 @@
{{ if not $error }}
<!-- include external scripts first -->
{{ range $mod, $cfg := $config.modules }}
{{ if eq (index $cfg "integration") $args.type }}
{{ if in $modules $mod }}
{{ if or (index $cfg "local") (not hugo.IsServer) }}
{{ with index $cfg "url" }}
{{ partial "templates/script.html" (dict "link" . "category" (index $cfg "category") "state" (index $cfg "state")) }}

View File

@@ -38,6 +38,7 @@
{{- $full := true -}}
{{ if isset .Params "full" }}{{ $full = partial "utilities/CastBool.html" (.Get "full") }}{{ end -}}
{{- $class := .Get "class" | default "" -}}
{{- $options := .Get "options" -}}
{{ if not (fileExists $file) }}
{{ warnf "Cannot find file: '%q'. See %s" $file $.Position }}
@@ -65,7 +66,7 @@
</ul>
<div class="border-start border-end border-bottom mb-3">
<div class="collapse multi-{{ $id }}{{ if $show }} show{{ end }} syntax-highlight" id="body-{{ $id }}">
{{- highlight (trim $content "\r\n") $lang "" -}}
{{- highlight (trim $content "\r\n") $lang $options -}}
</div>
<div class="collapse multi-{{ $id }}{{ if not $show }} show{{ end }} p-3" id="footer-{{ $id }}"><i>...</i></div>
</div>

View File

@@ -60,19 +60,23 @@
{{ end }}
<!-- Main code -->
<div class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
<div class="{{ with $type }} nav-{{ . }}{{ end }}">
{{ if $vertical }}<div class="row"><div class="col-auto">{{ end }}
<ul class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
{{- range $index, $item := $items -}}
{{- $header := partial "utilities/GetVal.html" $item -}}
{{- $itemDisabled := in $disabled $index -}}
<li class="nav-item" role="presentation">
<button class="nav-link{{ if not $wrap }} text-nowrap{{ end }}{{ if eq $index $showID }} active{{ end }}{{ if $itemDisabled}} disabled {{end }}" id="{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#{{ $id }}-{{ $index }}"
type="button" role="tab" aria-controls="{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
type="button" role="tab" {{ if $hasContent }}aria-controls="{{ $id }}-{{ $index }}"{{ end }} aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
{{ $header }}
</button>
</li>
{{ end -}}
</ul>
{{ if $vertical }}</div><div class="col">{{ end }}
{{- if $hasContent -}}
<div class="tab-content w-100 {{ if not $vertical }} {{ end }}{{ if eq $type "tabs" }}border border-bottom-0 p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}">
<div class="tab-content w-100 {{ if eq $type "tabs" }}border p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}">
{{- $inner | safeHTML -}}
</div>
{{- end -}}

View File

@@ -43,12 +43,12 @@
default-src 'none'; \
font-src 'self' fonts.gstatic.com; \
form-action 'self'; \
frame-src player.cloudinary.com player.vimeo.com www.youtube-nocookie.com www.youtube.com; \
img-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.vimeocdn.com i.ytimg.com tile.openstreetmap.org; \
frame-src player.cloudinary.com www.youtube-nocookie.com www.youtube.com player.vimeo.com; \
img-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.ytimg.com tile.openstreetmap.org i.vimeocdn.com; \
manifest-src 'self'; \
media-src 'self'; \
object-src 'none'; \
script-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com; \
script-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com player.vimeo.com; \
style-src 'self' 'unsafe-inline' www.youtube.com; \
"""
Permissions-Policy = 'geolocation=(), midi=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), fullscreen=(), payment=() '

12
package-lock.json generated
View File

@@ -1,19 +1,19 @@
{
"name": "@gethinode/hinode",
"version": "0.27.1",
"version": "0.27.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@gethinode/hinode",
"version": "0.27.1",
"version": "0.27.7",
"license": "MIT",
"dependencies": {
"@fullhuman/postcss-purgecss": "^6.0.0",
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"cssnano-preset-advanced": "^7.0.6",
"hugo-bin": "0.133.3",
"hugo-bin": "0.133.5",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
@@ -3855,9 +3855,9 @@
}
},
"node_modules/hugo-bin": {
"version": "0.133.3",
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.133.3.tgz",
"integrity": "sha512-5Jd52s5FWQRSlj4xQh73claNnIMQWcILqO7bzruVV/wRdbLItZN3dXVP/TZ510wg0ebL0rBGt0/P4clbLlClvg==",
"version": "0.133.5",
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.133.5.tgz",
"integrity": "sha512-6LpV7smMEaE0wFgzo0B3QHjcJYoH9I76edNI6xPZroDysxv1UV12nzb0Zw5YEr5TwL9PDQjg1aYzJrQjaXbLWQ==",
"funding": [
{
"type": "github",

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.27.1",
"version": "0.27.7",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
@@ -73,7 +73,7 @@
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"cssnano-preset-advanced": "^7.0.6",
"hugo-bin": "0.133.3",
"hugo-bin": "0.133.5",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {