Compare commits

..

33 Commits

Author SHA1 Message Date
Mark Dumay
ea8e851e45 Merge pull request #1124 from gethinode/develop
Fix navbar behavior
2024-08-21 10:56:08 +02:00
Mark Dumay
90e6c9869d Merge branch 'main' into develop 2024-08-21 10:42:52 +02:00
Mark Dumay
628eb99f62 Skip navbar theme update when not fixed 2024-08-21 10:41:07 +02:00
Mark Dumay
a0293cc081 Fix navbar item status when pageref is unspecified 2024-08-21 10:40:48 +02:00
Mark Dumay
d37dcdd20c Fix navbar overlay behavior when not fixed 2024-08-21 10:40:36 +02:00
Mark Dumay
f0ff631b0d Merge pull request #1122 from gethinode/develop
Fix schema config
2024-08-21 07:24:48 +02:00
Mark Dumay
b84bd07073 Merge branch 'main' into develop 2024-08-21 07:14:24 +02:00
Mark Dumay
b800906956 Fix schema config 2024-08-21 07:13:53 +02:00
Mark Dumay
049b38d3c1 Merge pull request #1121 from gethinode/develop
Fix sidebar config
2024-08-21 07:13:07 +02:00
Mark Dumay
27c2500c92 Merge branch 'main' into develop 2024-08-21 07:07:15 +02:00
Mark Dumay
a182b2a134 Merge pull request #1119 from d-oit/main
Update de.yaml, fix schema.org exampleSite
2024-08-21 07:06:41 +02:00
Mark Dumay
43abf793b8 Merge branch 'main' into main 2024-08-21 06:50:07 +02:00
Mark Dumay
e11fa8d377 Bump package release 2024-08-21 06:48:06 +02:00
Mark Dumay
fb94544bb0 Update build stats 2024-08-21 06:47:41 +02:00
Mark Dumay
67f687d6b9 Fix sidebar config
See #1120
2024-08-21 06:47:05 +02:00
Dominik Oswald
879efc07e8 ExampleSite: Fix schema.org config
Author is missing: 

https://validator.schema.org/#url=https%3A%2F%2Fdemo.gethinode.com%2Fen%2Fblog%2Fimage%2F

fix:
[author] > schema.author
2024-08-18 17:10:38 +02:00
Mark Dumay
29bcb26d04 Merge pull request #1116 from gethinode/develop
Enable embedded Font Awesome icons
2024-08-17 16:02:43 +02:00
Mark Dumay
e04a8dc0ed Enable embedded Font Awesome icons
Fixes #394
2024-08-17 15:56:55 +02:00
Mark Dumay
c7e70bf933 Merge pull request #1114 from gethinode/download-link
Support links to static files and page resources
2024-08-17 15:44:15 +02:00
Mark Dumay
1700abc7de Merge branch 'main' into download-link 2024-08-17 14:57:41 +02:00
Mark Dumay
3ef857dba9 Fix link error 2024-08-17 08:00:03 +02:00
Mark Dumay
5acc2e8f9e Support links to static files and page resources 2024-08-16 19:05:07 +02:00
Mark Dumay
0caa00a1a1 Merge pull request #1112 from gethinode/develop
Support embedding of vector image assets
2024-08-16 16:23:19 +02:00
Mark Dumay
b27a5ac7cb Merge branch 'main' into develop 2024-08-16 16:14:19 +02:00
Mark Dumay
24261c9193 Support embedding of vector image assets 2024-08-16 16:13:42 +02:00
github-actions[bot]
d1aa9c0f7c Merge pull request #1111 from gethinode/dependabot/npm_and_yarn/stylelint-16.8.2
Bump stylelint from 16.8.1 to 16.8.2
2024-08-16 13:12:21 +00:00
dependabot[bot]
a18d387379 Bump stylelint from 16.8.1 to 16.8.2
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.8.1 to 16.8.2.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.8.1...16.8.2)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 13:07:34 +00:00
Mark Dumay
2d9cbf9195 Merge pull request #1110 from gethinode/develop
Add assistive label to featured icons
2024-08-16 14:21:22 +02:00
Mark Dumay
64abda14ce Merge branch 'main' into develop 2024-08-16 14:15:55 +02:00
Mark Dumay
3625675577 Bump package release 2024-08-16 14:14:55 +02:00
Mark Dumay
e6e115a65d Update build stats 2024-08-16 14:12:34 +02:00
Mark Dumay
9832b566db Add assistive label to featured icons
Fixes #1106
2024-08-16 14:12:21 +02:00
Dominik Oswald
c5edb65550 Update de.yaml 2024-08-15 10:07:42 +02:00
22 changed files with 190 additions and 143 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -315,3 +315,7 @@
} }
} }
.navbar-overlay {
position: absolute;
z-index: $zindex-fixed;
}

View File

@@ -32,6 +32,7 @@
showJS = false showJS = false
showSCSS = false showSCSS = false
purgeHTMLComments = false purgeHTMLComments = false
includeSVGOrigin = true
# toml-docs-end debugging # toml-docs-end debugging
# toml-docs-start docs # toml-docs-start docs
@@ -171,16 +172,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

View File

@@ -18,6 +18,7 @@
showJS = false showJS = false
showSCSS = false showSCSS = false
purgeHTMLComments = true # prevents a Goldmark warning when processing HTML comments (as used by markdownlint) purgeHTMLComments = true # prevents a Goldmark warning when processing HTML comments (as used by markdownlint)
includeSVGOrigin = true
[docs] [docs]
basePath = "/" # TODO: replace basePath = "/" # TODO: replace
@@ -164,16 +165,16 @@
# linkedIn = "" # linkedIn = ""
github = "https://github.com/gethinode/hinode" github = "https://github.com/gethinode/hinode"
section = "blog" section = "blog"
[author] [schema.author]
name = "Mark Dumay" name = "Mark Dumay"
# twitter = "https://twitter.com/markdumay" # twitter = "https://twitter.com/markdumay"
linkedin = "https://www.linkedin.com/in/markdumay/" linkedin = "https://www.linkedin.com/in/markdumay/"
github = "https://github.com/markdumay" github = "https://github.com/markdumay"
[logo] [schema.logo]
url = "img/logo512x512.png" url = "img/logo512x512.png"
width = 512 width = 512
height = 512 height = 512
[image] [schema.image]
url = "img/logo1280x640.png" url = "img/logo1280x640.png"
width = 1280 width = 1280
height = 640 height = 640

View File

@@ -15,7 +15,6 @@
"form", "form",
"h2", "h2",
"h3", "h3",
"h5",
"head", "head",
"hr", "hr",
"html", "html",
@@ -52,6 +51,7 @@
"sub", "sub",
"sup", "sup",
"svg", "svg",
"symbol",
"table", "table",
"tbody", "tbody",
"td", "td",
@@ -237,7 +237,6 @@
"fade", "fade",
"fas", "fas",
"figure-caption", "figure-caption",
"fixed-top",
"flex-column", "flex-column",
"flex-fill", "flex-fill",
"flex-grow-1", "flex-grow-1",
@@ -333,19 +332,14 @@
"navbar-container", "navbar-container",
"navbar-contrast", "navbar-contrast",
"navbar-expand-md", "navbar-expand-md",
"navbar-fixed-top",
"navbar-mode-selector", "navbar-mode-selector",
"navbar-nav", "navbar-nav",
"navbar-nav-scroll", "navbar-nav-scroll",
"navbar-overlay",
"navbar-title", "navbar-title",
"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",
@@ -519,11 +513,42 @@
"collapse", "collapse",
"collapse-1", "collapse-1",
"command-prompt", "command-prompt",
"custom-activity",
"data-tables", "data-tables",
"docs", "docs",
"documentation", "documentation",
"example", "example",
"exemple", "exemple",
"fa-face-frown",
"fa-square-check",
"fab-bootstrap",
"fab-docker",
"fab-facebook",
"fab-github",
"fab-linkedin",
"fab-medium",
"fab-whatsapp",
"fab-x-twitter",
"fas-angle-left",
"fas-angle-right",
"fas-angles-left",
"fas-angles-right",
"fas-arrow-left",
"fas-arrow-right",
"fas-circle-check",
"fas-code",
"fas-ellipsis",
"fas-globe",
"fas-heart",
"fas-house",
"fas-link",
"fas-magnifying-glass",
"fas-moon",
"fas-rocket",
"fas-share-nodes",
"fas-sort",
"fas-sun",
"fas-up-right-from-square",
"fichier", "fichier",
"fil-dariane", "fil-dariane",
"file", "file",
@@ -562,8 +587,6 @@
"navbar-sample-collapse", "navbar-sample-collapse",
"navigation", "navigation",
"notification", "notification",
"offcanvas-label",
"offcanvass-sidebar",
"persona", "persona",
"projecten", "projecten",
"projects", "projects",

2
go.mod
View File

@@ -6,7 +6,7 @@ require (
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
github.com/gethinode/mod-bootstrap v1.3.1 // indirect github.com/gethinode/mod-bootstrap v1.3.1 // indirect
github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect
github.com/gethinode/mod-fontawesome v1.9.1 // indirect github.com/gethinode/mod-fontawesome v1.10.0 // indirect
github.com/gethinode/mod-katex v1.1.2 // indirect github.com/gethinode/mod-katex v1.1.2 // indirect
github.com/gethinode/mod-leaflet v1.1.1 // indirect github.com/gethinode/mod-leaflet v1.1.1 // indirect
github.com/gethinode/mod-lottie v1.5.6 // indirect github.com/gethinode/mod-lottie v1.5.6 // indirect

2
go.sum
View File

@@ -116,6 +116,8 @@ github.com/gethinode/mod-fontawesome v1.9.0 h1:xqUB8AnezMHAt8lye4ksqvmHSVPCOkiHs
github.com/gethinode/mod-fontawesome v1.9.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y= github.com/gethinode/mod-fontawesome v1.9.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
github.com/gethinode/mod-fontawesome v1.9.1 h1:cQk84vriqffM4fuUUoM9j3SSD+3ppeW2j4ta7AiToMU= github.com/gethinode/mod-fontawesome v1.9.1 h1:cQk84vriqffM4fuUUoM9j3SSD+3ppeW2j4ta7AiToMU=
github.com/gethinode/mod-fontawesome v1.9.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y= github.com/gethinode/mod-fontawesome v1.9.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
github.com/gethinode/mod-fontawesome v1.10.0 h1:Izs2AKc+YVBa1TywcH54OKLTNCUMXRoFIqOs+n0FgOo=
github.com/gethinode/mod-fontawesome v1.10.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc= github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs= github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=

View File

@@ -7,7 +7,6 @@
"div", "div",
"footer", "footer",
"form", "form",
"h5",
"head", "head",
"html", "html",
"img", "img",
@@ -17,7 +16,6 @@
"link", "link",
"meta", "meta",
"nav", "nav",
"noscript",
"ol", "ol",
"p", "p",
"path", "path",
@@ -26,8 +24,10 @@
"span", "span",
"strong", "strong",
"svg", "svg",
"symbol",
"title", "title",
"ul" "ul",
"use"
], ],
"classes": [ "classes": [
"active", "active",
@@ -38,7 +38,6 @@
"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",
@@ -46,52 +45,40 @@
"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-md-2",
"col-lg-8",
"col-md-3", "col-md-3",
"col-md-4", "col-md-4",
"col-md-8", "col-md-8",
"col-md-9", "col-md-9",
"col-sm-12",
"collapse", "collapse",
"collapsed", "collapsed",
"container-fluid", "container-fluid",
"container-xxl", "container-xxl",
"d-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-4", "display-4",
"emphasis", "emphasis",
"end-0", "end-0",
"fa",
"fa-10x",
"fa-2x", "fa-2x",
"fa-arrow-left",
"fa-arrow-right",
"fa-book-open", "fa-book-open",
"fa-ellipsis", "fa-ellipsis",
"fa-facebook", "fa-face-frown",
"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",
@@ -101,13 +88,8 @@
"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",
@@ -117,14 +99,10 @@
"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",
@@ -136,7 +114,6 @@
"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",
@@ -149,13 +126,7 @@
"navbar-mode-selector", "navbar-mode-selector",
"navbar-nav", "navbar-nav",
"navbar-toggler", "navbar-toggler",
"next",
"no-js", "no-js",
"offcanvas",
"offcanvas-body",
"offcanvas-header",
"offcanvas-start",
"offcanvas-title",
"order-0", "order-0",
"order-1", "order-1",
"order-md-0", "order-md-0",
@@ -164,14 +135,12 @@
"p-2", "p-2",
"p-3", "p-3",
"p-4", "p-4",
"p-auto",
"pb-4", "pb-4",
"pb-5",
"pb-md-0", "pb-md-0",
"position-fixed", "position-fixed",
"position-relative", "position-relative",
"previous",
"ps-1", "ps-1",
"pt-4",
"pt-5", "pt-5",
"pt-md-3", "pt-md-3",
"px-4", "px-4",
@@ -181,45 +150,40 @@
"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-3",
"row-cols-sm-2",
"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-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": [
"btn-webshare", "fa-face-frown",
"fab-github",
"fab-linkedin",
"fab-medium",
"fas-book-open",
"fas-ellipsis",
"fas-moon",
"fas-sun",
"navbar-0-collapse", "navbar-0-collapse",
"navbar-mode", "navbar-mode",
"navbar-mode-checkbox", "navbar-mode-checkbox",
"offcanvas-label",
"offcanvass-sidebar",
"toast-container", "toast-container",
"toast-copied-code-message", "toast-copied-code-message"
"toast-message-email-4"
] ]
} }
} }

View File

@@ -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

View File

@@ -73,6 +73,7 @@
{{ end }} {{ end }}
{{- partial "footer/toast-container.html" . -}} {{- partial "footer/toast-container.html" . -}}
{{- partial "assets/symbols.html" . -}}
{{- partialCached "footer/scripts.html" (dict "header" false "page" . "core" true) }} {{- partialCached "footer/scripts.html" (dict "header" false "page" . "core" true) }}
{{- partial "footer/optional-scripts.html" . -}} {{- partial "footer/optional-scripts.html" . -}}
</body> </body>

View File

@@ -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 }}

View File

@@ -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 -}}

View File

@@ -41,6 +41,7 @@
{{ $imgset := index $target "set" }} {{ $imgset := index $target "set" }}
{{ $height := index $target "height" }} {{ $height := index $target "height" }}
{{ $width := index $target "width" }} {{ $width := index $target "width" }}
{{ $data := index $target "data" }}
<!-- Add color modes --> <!-- Add color modes -->
{{- range $none := $modes -}} {{- range $none := $modes -}}
@@ -55,7 +56,14 @@
{{ else }} {{ else }}
{{ with $wrapper }}<div class="{{ . }}">{{ end }} {{ with $wrapper }}<div class="{{ . }}">{{ end }}
{{ end }} {{ end }}
{{- if not $fileAnchor -}}
{{ if $data }}
{{- if site.Params.debugging.includeSVGOrigin }}
{{ printf "<!-- <svg src=\"%s\"> -->" $.url | safeHTML }}
{{ end -}}
{{- $data = replace $data "<svg" (printf "<svg class=\"%s\"" $class) -}}
{{- $data | safeHTML -}}
{{- else if not $fileAnchor -}}
<img class="img-fluid {{ $class }}" <img class="img-fluid {{ $class }}"
src="{{ $fallbackURL }}" src="{{ $fallbackURL }}"
{{ if $lazy }}loading="lazy"{{ end }} {{ if $lazy }}loading="lazy"{{ end }}

View File

@@ -47,6 +47,7 @@
{{ $dims := slice }} {{ $dims := slice }}
{{- $res := "" -}} {{- $res := "" -}}
{{- $img := "" -}} {{- $img := "" -}}
{{- $data := "" -}}
{{ $transform := "" }} {{ $transform := "" }}
{{- if hasSuffix $url "svg" -}} {{- if hasSuffix $url "svg" -}}
{{- $res = partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}} {{- $res = partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
@@ -61,6 +62,10 @@
{{ $dims = $dims | append "500" }} {{ $dims = $dims | append "500" }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ else if eq (string $res.MediaType) "image/svg+xml" }}
{{ $data = $res.Content }}
{{ else }}
{{ warnf "Unsupported media type '%s': %q" (string $res.MediaType) $url -}}
{{ end }} {{ end }}
{{ else if $ratio }} {{ else if $ratio }}
{{ $transform = "fill" }} {{ $transform = "fill" }}
@@ -137,4 +142,4 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ return (dict "target" $targetURL "set" $set "height" $height "width" $width) }} {{ return (dict "target" $targetURL "set" $set "height" $height "width" $width "data" $data) }}

View File

@@ -59,9 +59,22 @@
{{ if not $isLocal }} {{ if not $isLocal }}
{{ $ref := partial "utilities/GetPage.html" (dict "url" $destination "page" $page) }} {{ $ref := partial "utilities/GetPage.html" (dict "url" $destination "page" $page) }}
{{- if not $ref -}} {{- if not $ref -}}
{{- errorf "partial [assets/link.html] - Cannot find page: %s" $destination -}} {{ $pageContext := "" }}
{{- $error = true -}} {{ with $page.File }}{{ $pageContext = path.Join "/content" .Dir }}{{ end }}
{{- else -}} {{ $isPageRes := fileExists (path.Join $pageContext $destination) }}
{{ $isStatic := fileExists (path.Join "static" $destination) }}
{{ if and (not $isPageRes) (not $isStatic) }}
{{- errorf "partial [assets/link.html] - Cannot find page or asset: '%s' at '%s'" $destination $page.File.Path -}}
{{- $error = true -}}
{{ else if $isPageRes }}
{{ $destination = urls.JoinPath "/" (strings.TrimPrefix "/content" $pageContext) $destination }}
{{ else if $isStatic }}
{{ $destination = urls.JoinPath "/" $destination }}
{{ end }}
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
{{ end }}
{{- if and $ref (not $error) -}}
{{- $destination = $ref.RelPermalink -}} {{- $destination = $ref.RelPermalink -}}
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}} {{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
{{- end -}} {{- end -}}

View File

@@ -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 -}}

View File

@@ -165,7 +165,7 @@
{{ end }} {{ end }}
<!-- Main code --> <!-- Main code -->
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0{{ with $class }} {{ . }}{{ end }}"> <div class="container-fluid {{ if $fixed }}fixed-top{{ else if $overlay }}navbar-overlay{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
{{- partial "assets/page-alert.html" (dict "page" $page) -}} {{- partial "assets/page-alert.html" (dict "page" $page) -}}
<nav class="navbar p-4 <nav class="navbar p-4
{{- if not $overlay }}{{ with $color }} bg-{{ . }}{{ end }}{{ end -}} {{- if not $overlay }}{{ with $color }} bg-{{ . }}{{ end }}{{ end -}}
@@ -173,9 +173,9 @@
{{ if $contrast }} navbar-contrast{{ end }}" {{ if $contrast }} navbar-contrast{{ end }}"
{{ if $overlay }} {{ if $overlay }}
data-bs-theme="{{ $overlayMode }}" data-bs-theme="{{ $overlayMode }}"
data-bs-overlay="{{ $overlayMode }}" {{ if $fixed }}data-bs-overlay="{{ $overlayMode }}"{{ end }}
{{ end }} {{ if $color }}data-navbar-color="{{ $color }}"{{ end }}
{{ if $overlay }}data-navbar-color="{{ $color }}"{{ end }} {{ end }}
> >
<div class="container-xxl p-0"> <div class="container-xxl p-0">
<div class="d-flex navbar-container justify-content-center"> <div class="d-flex navbar-container justify-content-center">

View File

@@ -40,7 +40,7 @@
{{- $actions = sort $actions "weight" "asc" -}} {{- $actions = sort $actions "weight" "asc" -}}
<div class="hstack{{ if gt (len $actions) 1 }} gap-1{{ end }} justify-content-{{ $align}} pt-5 pt-md-3"> <div class="hstack{{ if gt (len $actions) 1 }} gap-1{{ end }} justify-content-{{ $align}} pt-5 pt-md-3">
{{ range $actions }} {{ range $actions }}
{{ partial "assets/button.html" (dict "href" .url "icon" .icon "title" .title "outline" .outline "order" "last" "justify" "start") }} {{ partial "assets/button.html" (dict "href" .url "icon" .icon "label" .label "title" .title "outline" .outline "order" "last" "justify" "start") }}
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}

View File

@@ -80,8 +80,14 @@
{{- if not $isExternal -}} {{- if not $isExternal -}}
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }} {{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }}
{{- if not $ref -}} {{- if not $ref -}}
{{- errorf "Cannot find page: '%s' at %s" $url .Position -}} {{ $pageContext := "" }}
{{- $error = true -}} {{ with .Page.File }}{{ $pageContext = path.Join "/content" .Dir }}{{ end }}
{{ $isPageRes := fileExists (path.Join $pageContext $url) }}
{{ $isStatic := fileExists (path.Join "/static" $url) }}
{{ if and (not $isPageRes) (not $isStatic) }}
{{- errorf "Cannot find page or asset: '%s' at %s" $url .Position -}}
{{- $error = true -}}
{{ end }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}

92
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.26.2", "version": "0.26.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.26.2", "version": "0.26.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@fullhuman/postcss-purgecss": "^6.0.0", "@fullhuman/postcss-purgecss": "^6.0.0",
@@ -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.1", "stylelint": "^16.8.2",
"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": "2.7.1", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.1.tgz", "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.0.tgz",
"integrity": "sha512-2SJS42gxmACHgikc1WGesXLIT8d/q2l0UFM7TaEeIzdFCE/FPMtTiizcPGGJtlPo2xuQzY09OhrLTzRxqJqwGw==", "integrity": "sha512-20hEErXV9GEx15qRbsJVzB91ryayx1F2duHPBrfZXQAHz/dJG0u/611URpr28+sFjm3EI7U17Pj9SVA9NSAGJA==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -242,16 +242,16 @@
} }
], ],
"engines": { "engines": {
"node": "^14 || ^16 || >=18" "node": ">=18"
}, },
"peerDependencies": { "peerDependencies": {
"@csstools/css-tokenizer": "^2.4.1" "@csstools/css-tokenizer": "^3.0.0"
} }
}, },
"node_modules/@csstools/css-tokenizer": { "node_modules/@csstools/css-tokenizer": {
"version": "2.4.1", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.4.1.tgz", "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.0.tgz",
"integrity": "sha512-eQ9DIktFJBhGjioABJRtUucoWR2mwllurfnM8LuNGAqX3ViZXaUchqk+1s7jjtkFiT9ySdACsFEA3etErkALUg==", "integrity": "sha512-efZvfJyYrqH9hPCKtOBywlTsCXnEzAI9sLHFzUsDpBb+1bQ+bxJnwL9V2bRKv9w4cpIp75yxGeZRaVKoMQnsEg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -264,13 +264,13 @@
} }
], ],
"engines": { "engines": {
"node": "^14 || ^16 || >=18" "node": ">=18"
} }
}, },
"node_modules/@csstools/media-query-list-parser": { "node_modules/@csstools/media-query-list-parser": {
"version": "2.1.13", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.13.tgz", "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.0.tgz",
"integrity": "sha512-XaHr+16KRU9Gf8XLi3q8kDlI18d5vzKSKCY510Vrtc9iNR0NJzbY9hhTmwhzYZj/ZwGL4VmB3TA9hJW0Um2qFA==", "integrity": "sha512-W0JlkUFwXjo703wt06AcaWuUcS+6x6IEDyxV6W65Sw+vLCYp+uPsrps+PXTiIfN0V1Pqj5snPzN7EYLmbz1zjg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -283,17 +283,17 @@
} }
], ],
"engines": { "engines": {
"node": "^14 || ^16 || >=18" "node": ">=18"
}, },
"peerDependencies": { "peerDependencies": {
"@csstools/css-parser-algorithms": "^2.7.1", "@csstools/css-parser-algorithms": "^3.0.0",
"@csstools/css-tokenizer": "^2.4.1" "@csstools/css-tokenizer": "^3.0.0"
} }
}, },
"node_modules/@csstools/selector-specificity": { "node_modules/@csstools/selector-specificity": {
"version": "3.1.1", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz",
"integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", "integrity": "sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -306,10 +306,10 @@
} }
], ],
"engines": { "engines": {
"node": "^14 || ^16 || >=18" "node": ">=18"
}, },
"peerDependencies": { "peerDependencies": {
"postcss-selector-parser": "^6.0.13" "postcss-selector-parser": "^6.1.0"
} }
}, },
"node_modules/@dual-bundle/import-meta-resolve": { "node_modules/@dual-bundle/import-meta-resolve": {
@@ -3362,9 +3362,9 @@
] ]
}, },
"node_modules/ignore": { "node_modules/ignore": {
"version": "5.3.1", "version": "5.3.2",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
"integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">= 4" "node": ">= 4"
@@ -4852,9 +4852,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.4.40", "version": "8.4.41",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz",
"integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==", "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@@ -5379,9 +5379,9 @@
} }
}, },
"node_modules/postcss-resolve-nested-selector": { "node_modules/postcss-resolve-nested-selector": {
"version": "0.1.4", "version": "0.1.6",
"resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.4.tgz", "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz",
"integrity": "sha512-R6vHqZWgVnTAPq0C+xjyHfEZqfIYboCBVSy24MjxEDm+tIh1BU4O6o7DP7AA7kHzf136d+Qc5duI4tlpHjixDw==", "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==",
"dev": true "dev": true
}, },
"node_modules/postcss-safe-parser": { "node_modules/postcss-safe-parser": {
@@ -5437,9 +5437,9 @@
} }
}, },
"node_modules/postcss-selector-parser": { "node_modules/postcss-selector-parser": {
"version": "6.1.1", "version": "6.1.2",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.1.tgz", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
"integrity": "sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg==", "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
"dependencies": { "dependencies": {
"cssesc": "^3.0.0", "cssesc": "^3.0.0",
"util-deprecate": "^1.0.2" "util-deprecate": "^1.0.2"
@@ -6556,9 +6556,9 @@
} }
}, },
"node_modules/stylelint": { "node_modules/stylelint": {
"version": "16.8.1", "version": "16.8.2",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.8.1.tgz", "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.8.2.tgz",
"integrity": "sha512-O8aDyfdODSDNz/B3gW2HQ+8kv8pfhSu7ZR7xskQ93+vI6FhKKGUJMQ03Ydu+w3OvXXE0/u4hWU4hCPNOyld+OA==", "integrity": "sha512-fInKATippQhcSm7AB+T32GpI+626yohrg33GkFT/5jzliUw5qhlwZq2UQQwgl3HsHrf09oeARi0ZwgY/UWEv9A==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -6571,10 +6571,10 @@
} }
], ],
"dependencies": { "dependencies": {
"@csstools/css-parser-algorithms": "^2.7.1", "@csstools/css-parser-algorithms": "^3.0.0",
"@csstools/css-tokenizer": "^2.4.1", "@csstools/css-tokenizer": "^3.0.0",
"@csstools/media-query-list-parser": "^2.1.13", "@csstools/media-query-list-parser": "^3.0.0",
"@csstools/selector-specificity": "^3.1.1", "@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",
"colord": "^2.9.3", "colord": "^2.9.3",
@@ -6589,7 +6589,7 @@
"globby": "^11.1.0", "globby": "^11.1.0",
"globjoin": "^0.1.4", "globjoin": "^0.1.4",
"html-tags": "^3.3.1", "html-tags": "^3.3.1",
"ignore": "^5.3.1", "ignore": "^5.3.2",
"imurmurhash": "^0.1.4", "imurmurhash": "^0.1.4",
"is-plain-object": "^5.0.0", "is-plain-object": "^5.0.0",
"known-css-properties": "^0.34.0", "known-css-properties": "^0.34.0",
@@ -6598,10 +6598,10 @@
"micromatch": "^4.0.7", "micromatch": "^4.0.7",
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
"picocolors": "^1.0.1", "picocolors": "^1.0.1",
"postcss": "^8.4.40", "postcss": "^8.4.41",
"postcss-resolve-nested-selector": "^0.1.4", "postcss-resolve-nested-selector": "^0.1.6",
"postcss-safe-parser": "^7.0.0", "postcss-safe-parser": "^7.0.0",
"postcss-selector-parser": "^6.1.1", "postcss-selector-parser": "^6.1.2",
"postcss-value-parser": "^4.2.0", "postcss-value-parser": "^4.2.0",
"resolve-from": "^5.0.0", "resolve-from": "^5.0.0",
"string-width": "^4.2.3", "string-width": "^4.2.3",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.26.2", "version": "0.26.4",
"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",
@@ -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.1", "stylelint": "^16.8.2",
"stylelint-config-standard-scss": "^13.1.0" "stylelint-config-standard-scss": "^13.1.0"
}, },
"optionalDependencies": { "optionalDependencies": {