Compare commits

...

17 Commits

Author SHA1 Message Date
Mark Dumay
6761bedd51 refactor: support recursive argument init
work in progress
2025-09-02 07:18:23 +02:00
Mark Dumay
f002cf06e4 Merge pull request #1560 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2025-09-02 07:04:27 +02:00
markdumay
9d742f9165 fix: update Hugo module dependencies 2025-09-02 03:22:58 +00:00
Mark Dumay
68c2cac3e0 Merge pull request #1559 from gethinode/develop
fix: correct layout of stacked video message
2025-09-01 16:12:30 +02:00
Mark Dumay
1c0ed71df9 Merge branch 'main' into develop 2025-09-01 16:07:04 +02:00
Mark Dumay
1e8791fdf0 fix: correct layout of stacked video message 2025-09-01 16:06:36 +02:00
Mark Dumay
8cfac32280 Merge pull request #1558 from gethinode/develop
feat: support generic site default values for partial/shortode arguments
2025-09-01 10:10:57 +02:00
Mark Dumay
6e7a1dcdb9 feat: support generic site default values for partial/shortode arguments 2025-09-01 08:59:37 +02:00
Mark Dumay
19cda9a986 Merge pull request #1556 from gethinode/develop
Develop
2025-08-30 16:05:16 +02:00
Mark Dumay
9ee9ebc960 fix: adjust width of dropdown items in collapsed navbar 2025-08-30 15:54:03 +02:00
Mark Dumay
6f7903a2f2 Merge branch 'main' into develop 2025-08-30 14:41:50 +02:00
Mark Dumay
82d12d693c fix: adjust button size when navbar is expanded on small screens 2025-08-30 14:41:10 +02:00
Mark Dumay
3ed64f59f1 fix: refine nav item layout 2025-08-30 14:40:33 +02:00
Mark Dumay
df8ea923c5 fix: add margin between search input and nav items 2025-08-30 14:37:17 +02:00
Mark Dumay
60872ea541 Merge pull request #1555 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.146.0
build(deps): bump hugo-bin from 0.145.2 to 0.146.0
2025-08-29 19:00:46 +02:00
dependabot[bot]
52715cef21 build(deps): bump hugo-bin from 0.145.2 to 0.146.0
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.145.2 to 0.146.0.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.145.2...v0.146.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-28 14:01:38 +00:00
Mark Dumay
91f79e57ab refactor: reduce whitespace in featured illustration asset 2025-08-28 10:25:13 +02:00
12 changed files with 529 additions and 85 deletions

View File

@@ -174,10 +174,22 @@
color: var(--bs-navbar-color);
}
.nav-item > div, .nav-item > a {
.navbar .nav-item {
display: flex;
align-items: center;
height: 100%;
}
.navbar-collapse .dropdown {
display: inline;
align-items: normal;
}
.navbar-expanded .btn {
font-size: 1em;
}
.navbar-expanded .search-input {
margin-bottom: 1rem;
}
/* Remove border from toggler */

View File

@@ -122,7 +122,7 @@
) -}}
{{ end }}
</div>
<div class="mt-{{ $padding.y }}">
<div class="mt-{{ $padding.y }} w-100">
{{- partial "inline/messages.html" (dict
"list" $list
"cols" $args.cols

View File

@@ -330,10 +330,8 @@
"g-4",
"gap-1",
"gap-2",
"gap-4",
"gap-5",
"gradient",
"grid",
"h-100",
"h1",
"h2",
@@ -383,6 +381,7 @@
"me-1",
"me-3",
"me-auto",
"me-md-3",
"mermaid",
"middle-bar",
"mode-item",
@@ -658,11 +657,16 @@
"docs",
"documentation",
"dropdown-nav-0",
"dropdown-panel-1cf9fa6c1b8db897289f1e58eca1ed2b",
"dropdown-panel-2112fcf4fa7219518b7b70498969a79b",
"dropdown-panel-2c61c8fd2a96d840748e5d5aa5e6ab20",
"dropdown-panel-94a8f41d03ff238aa65acebc1b274df7",
"dropdown-panel-dd79f20dce01073bc4b064a98deaff96",
"dropdown-panel-0692e7e68c57d91164039f0f77cce9d8",
"dropdown-panel-0a5cb51ed9eea57f673dc25545175b8b",
"dropdown-panel-41fccc8aa490d4ea9d475a6d2d44be42",
"dropdown-panel-7aa9804adc5998a7a66cd8faf656c6f9",
"dropdown-panel-99dcbfb73d35cee704ca4ee9fb6a5e3c",
"dropdown-panel-b06517abb515d4c22a03ca07d577f3de",
"dropdown-panel-b434a05f655e7811ee71b4177747a1c0",
"dropdown-panel-ba696faaa3c3f34bebc3f1da67a7c8ad",
"dropdown-panel-d80f75f98e8a44fe4164fa76a6afd600",
"dropdown-panel-d8bdd6a5f6d88907f9d6e8b57d921196",
"elements-type",
"entity-relationship-diagram",
"example",
@@ -680,11 +684,16 @@
"fab-medium",
"fab-whatsapp",
"fab-x-twitter",
"faq-40baa94f9dbf495433e3d6b5106aad41",
"faq-40baa94f9dbf495433e3d6b5106aad41-heading-faq-40baa94f9dbf495433e3d6b5106aad41",
"faq-40baa94f9dbf495433e3d6b5106aad41-item-0",
"faq-40baa94f9dbf495433e3d6b5106aad41-item-1",
"faq-40baa94f9dbf495433e3d6b5106aad41-item-2",
"faq-1b8aefa895c57fc4fd5452748485b590",
"faq-1b8aefa895c57fc4fd5452748485b590-heading-faq-1b8aefa895c57fc4fd5452748485b590",
"faq-1b8aefa895c57fc4fd5452748485b590-item-0",
"faq-1b8aefa895c57fc4fd5452748485b590-item-1",
"faq-1b8aefa895c57fc4fd5452748485b590-item-2",
"faq-f18dc8d82722290aea32dc7f4423dea5",
"faq-f18dc8d82722290aea32dc7f4423dea5-heading-faq-f18dc8d82722290aea32dc7f4423dea5",
"faq-f18dc8d82722290aea32dc7f4423dea5-item-0",
"faq-f18dc8d82722290aea32dc7f4423dea5-item-1",
"faq-f18dc8d82722290aea32dc7f4423dea5-item-2",
"fas-1",
"fas-2",
"fas-3",
@@ -779,11 +788,16 @@
"nav-0-btn-1",
"nav-0-btn-2",
"nav-nav-0",
"nav-panel-1cf9fa6c1b8db897289f1e58eca1ed2b",
"nav-panel-2112fcf4fa7219518b7b70498969a79b",
"nav-panel-2c61c8fd2a96d840748e5d5aa5e6ab20",
"nav-panel-94a8f41d03ff238aa65acebc1b274df7",
"nav-panel-dd79f20dce01073bc4b064a98deaff96",
"nav-panel-0692e7e68c57d91164039f0f77cce9d8",
"nav-panel-0a5cb51ed9eea57f673dc25545175b8b",
"nav-panel-41fccc8aa490d4ea9d475a6d2d44be42",
"nav-panel-7aa9804adc5998a7a66cd8faf656c6f9",
"nav-panel-99dcbfb73d35cee704ca4ee9fb6a5e3c",
"nav-panel-b06517abb515d4c22a03ca07d577f3de",
"nav-panel-b434a05f655e7811ee71b4177747a1c0",
"nav-panel-ba696faaa3c3f34bebc3f1da67a7c8ad",
"nav-panel-d80f75f98e8a44fe4164fa76a6afd600",
"nav-panel-d8bdd6a5f6d88907f9d6e8b57d921196",
"navbar",
"navbar-0-collapse",
"navbar-mode",
@@ -792,36 +806,66 @@
"navigation",
"notification",
"overview",
"panel-1cf9fa6c1b8db897289f1e58eca1ed2b-0",
"panel-1cf9fa6c1b8db897289f1e58eca1ed2b-1",
"panel-1cf9fa6c1b8db897289f1e58eca1ed2b-2",
"panel-1cf9fa6c1b8db897289f1e58eca1ed2b-btn-0",
"panel-1cf9fa6c1b8db897289f1e58eca1ed2b-btn-1",
"panel-1cf9fa6c1b8db897289f1e58eca1ed2b-btn-2",
"panel-2112fcf4fa7219518b7b70498969a79b-0",
"panel-2112fcf4fa7219518b7b70498969a79b-1",
"panel-2112fcf4fa7219518b7b70498969a79b-2",
"panel-2112fcf4fa7219518b7b70498969a79b-btn-0",
"panel-2112fcf4fa7219518b7b70498969a79b-btn-1",
"panel-2112fcf4fa7219518b7b70498969a79b-btn-2",
"panel-2c61c8fd2a96d840748e5d5aa5e6ab20-0",
"panel-2c61c8fd2a96d840748e5d5aa5e6ab20-1",
"panel-2c61c8fd2a96d840748e5d5aa5e6ab20-2",
"panel-2c61c8fd2a96d840748e5d5aa5e6ab20-btn-0",
"panel-2c61c8fd2a96d840748e5d5aa5e6ab20-btn-1",
"panel-2c61c8fd2a96d840748e5d5aa5e6ab20-btn-2",
"panel-94a8f41d03ff238aa65acebc1b274df7-0",
"panel-94a8f41d03ff238aa65acebc1b274df7-1",
"panel-94a8f41d03ff238aa65acebc1b274df7-2",
"panel-94a8f41d03ff238aa65acebc1b274df7-btn-0",
"panel-94a8f41d03ff238aa65acebc1b274df7-btn-1",
"panel-94a8f41d03ff238aa65acebc1b274df7-btn-2",
"panel-dd79f20dce01073bc4b064a98deaff96-0",
"panel-dd79f20dce01073bc4b064a98deaff96-1",
"panel-dd79f20dce01073bc4b064a98deaff96-2",
"panel-dd79f20dce01073bc4b064a98deaff96-btn-0",
"panel-dd79f20dce01073bc4b064a98deaff96-btn-1",
"panel-dd79f20dce01073bc4b064a98deaff96-btn-2",
"panel-0692e7e68c57d91164039f0f77cce9d8-0",
"panel-0692e7e68c57d91164039f0f77cce9d8-1",
"panel-0692e7e68c57d91164039f0f77cce9d8-2",
"panel-0692e7e68c57d91164039f0f77cce9d8-btn-0",
"panel-0692e7e68c57d91164039f0f77cce9d8-btn-1",
"panel-0692e7e68c57d91164039f0f77cce9d8-btn-2",
"panel-0a5cb51ed9eea57f673dc25545175b8b-0",
"panel-0a5cb51ed9eea57f673dc25545175b8b-1",
"panel-0a5cb51ed9eea57f673dc25545175b8b-2",
"panel-0a5cb51ed9eea57f673dc25545175b8b-btn-0",
"panel-0a5cb51ed9eea57f673dc25545175b8b-btn-1",
"panel-0a5cb51ed9eea57f673dc25545175b8b-btn-2",
"panel-41fccc8aa490d4ea9d475a6d2d44be42-0",
"panel-41fccc8aa490d4ea9d475a6d2d44be42-1",
"panel-41fccc8aa490d4ea9d475a6d2d44be42-2",
"panel-41fccc8aa490d4ea9d475a6d2d44be42-btn-0",
"panel-41fccc8aa490d4ea9d475a6d2d44be42-btn-1",
"panel-41fccc8aa490d4ea9d475a6d2d44be42-btn-2",
"panel-7aa9804adc5998a7a66cd8faf656c6f9-0",
"panel-7aa9804adc5998a7a66cd8faf656c6f9-1",
"panel-7aa9804adc5998a7a66cd8faf656c6f9-2",
"panel-7aa9804adc5998a7a66cd8faf656c6f9-btn-0",
"panel-7aa9804adc5998a7a66cd8faf656c6f9-btn-1",
"panel-7aa9804adc5998a7a66cd8faf656c6f9-btn-2",
"panel-99dcbfb73d35cee704ca4ee9fb6a5e3c-0",
"panel-99dcbfb73d35cee704ca4ee9fb6a5e3c-1",
"panel-99dcbfb73d35cee704ca4ee9fb6a5e3c-2",
"panel-99dcbfb73d35cee704ca4ee9fb6a5e3c-btn-0",
"panel-99dcbfb73d35cee704ca4ee9fb6a5e3c-btn-1",
"panel-99dcbfb73d35cee704ca4ee9fb6a5e3c-btn-2",
"panel-b06517abb515d4c22a03ca07d577f3de-0",
"panel-b06517abb515d4c22a03ca07d577f3de-1",
"panel-b06517abb515d4c22a03ca07d577f3de-2",
"panel-b06517abb515d4c22a03ca07d577f3de-btn-0",
"panel-b06517abb515d4c22a03ca07d577f3de-btn-1",
"panel-b06517abb515d4c22a03ca07d577f3de-btn-2",
"panel-b434a05f655e7811ee71b4177747a1c0-0",
"panel-b434a05f655e7811ee71b4177747a1c0-1",
"panel-b434a05f655e7811ee71b4177747a1c0-2",
"panel-b434a05f655e7811ee71b4177747a1c0-btn-0",
"panel-b434a05f655e7811ee71b4177747a1c0-btn-1",
"panel-b434a05f655e7811ee71b4177747a1c0-btn-2",
"panel-ba696faaa3c3f34bebc3f1da67a7c8ad-0",
"panel-ba696faaa3c3f34bebc3f1da67a7c8ad-1",
"panel-ba696faaa3c3f34bebc3f1da67a7c8ad-2",
"panel-ba696faaa3c3f34bebc3f1da67a7c8ad-btn-0",
"panel-ba696faaa3c3f34bebc3f1da67a7c8ad-btn-1",
"panel-ba696faaa3c3f34bebc3f1da67a7c8ad-btn-2",
"panel-d80f75f98e8a44fe4164fa76a6afd600-0",
"panel-d80f75f98e8a44fe4164fa76a6afd600-1",
"panel-d80f75f98e8a44fe4164fa76a6afd600-2",
"panel-d80f75f98e8a44fe4164fa76a6afd600-btn-0",
"panel-d80f75f98e8a44fe4164fa76a6afd600-btn-1",
"panel-d80f75f98e8a44fe4164fa76a6afd600-btn-2",
"panel-d8bdd6a5f6d88907f9d6e8b57d921196-0",
"panel-d8bdd6a5f6d88907f9d6e8b57d921196-1",
"panel-d8bdd6a5f6d88907f9d6e8b57d921196-2",
"panel-d8bdd6a5f6d88907f9d6e8b57d921196-btn-0",
"panel-d8bdd6a5f6d88907f9d6e8b57d921196-btn-1",
"panel-d8bdd6a5f6d88907f9d6e8b57d921196-btn-2",
"persona",
"pie-chart",
"pills",

6
go.mod
View File

@@ -3,7 +3,7 @@ module github.com/gethinode/hinode
go 1.19
require (
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
github.com/airbnb/lottie-web v5.13.0+incompatible // indirect
github.com/cloudcannon/bookshop/hugo/v3 v3.16.4 // indirect
github.com/gethinode/mod-bootstrap v1.3.4 // indirect
github.com/gethinode/mod-csp v1.0.8 // indirect
@@ -15,7 +15,7 @@ require (
github.com/gethinode/mod-lottie v1.6.1 // indirect
github.com/gethinode/mod-mermaid/v3 v3.0.1 // indirect
github.com/gethinode/mod-simple-datatables/v2 v2.0.2 // indirect
github.com/gethinode/mod-utils/v4 v4.13.0 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a // indirect
github.com/gethinode/mod-utils/v4 v4.14.0 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20250901122457-99cddafcdc64 // indirect
github.com/twbs/bootstrap v5.3.8+incompatible // indirect
)

6
go.sum
View File

@@ -1,5 +1,7 @@
github.com/airbnb/lottie-web v5.12.2+incompatible h1:Ldogtlhiucf7mMsgisyxSBY0qunV44+lpa9Icy2KoQc=
github.com/airbnb/lottie-web v5.12.2+incompatible/go.mod h1:nTss557UK9FGnp8QYlCMO29tjUHwbdAHG/DprbGfHGE=
github.com/airbnb/lottie-web v5.13.0+incompatible h1:plBV5Uq/F1kK0EC61Hr0cBGReI9OgUfd/pp0baoDX8o=
github.com/airbnb/lottie-web v5.13.0+incompatible/go.mod h1:nTss557UK9FGnp8QYlCMO29tjUHwbdAHG/DprbGfHGE=
github.com/cloudcannon/bookshop/hugo/v3 v3.14.0 h1:QNLtpTINvXkxAG/RQVpdXzxtFjG6YAmnBr7qbOD5GF8=
github.com/cloudcannon/bookshop/hugo/v3 v3.14.0/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8=
github.com/cloudcannon/bookshop/hugo/v3 v3.16.0 h1:Fb76ABHqTyPl9Z2QqYJCwiMBKPyShOe1EnZxXzW3RVo=
@@ -502,6 +504,8 @@ github.com/gethinode/mod-utils/v4 v4.12.0 h1:5sSfYIxZCeQbXLoZdS//rl6thwLwtXuvM0u
github.com/gethinode/mod-utils/v4 v4.12.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.13.0 h1:VKAA+wKy4saayXfgJuVBRfhNVWQWmxOjO8LSpQCvLfw=
github.com/gethinode/mod-utils/v4 v4.13.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.14.0 h1:CF5dy+HWg22L306bWVhClWK9b1NVinEqtb4Qr2vcl9A=
github.com/gethinode/mod-utils/v4 v4.14.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
@@ -524,6 +528,8 @@ github.com/nextapps-de/flexsearch v0.0.0-20250523180618-1f75f5f9d9b6 h1:vUlZHDX+
github.com/nextapps-de/flexsearch v0.0.0-20250523180618-1f75f5f9d9b6/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a h1:CF/f62ufhBzNvAgoC6JhuqQxtqz0yDj3IIXYKl+A650=
github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20250901122457-99cddafcdc64 h1:8gn/7ZfERwknYk63DskhEfkwwpoXubGrzLv5LuSq6hc=
github.com/nextapps-de/flexsearch v0.0.0-20250901122457-99cddafcdc64/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/twbs/bootstrap v5.3.2+incompatible h1:tuiO5acc6xnZUR77Sbi5aKWXxjYxbmsSbJwYrhAKoQQ=
github.com/twbs/bootstrap v5.3.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.3.3+incompatible h1:goFoqinzdHfkeegpFP7pvhbd0g+A3O2hbU3XCjuNrEQ=

View File

@@ -7,45 +7,45 @@
{{ $error := false }}
{{/* Initialize arguments */}}
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "featured-illustration" "args" . "group" "partial") }}
{{ if or $args.err $args.warnmsg }}
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
{{- $args := partial "utilities/InitArgs.html" (dict "structure" "featured-illustration" "args" . "group" "partial") -}}
{{- if or $args.err $args.warnmsg -}}
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
"partial" "assets/featured-illustration.html"
"warnid" "warn-invalid-arguments"
"msg" "Invalid arguments"
"details" ($args.errmsg | append $args.warnmsg)
"file" page.File
)}}
{{ $error = $args.err }}
{{ end }}
) -}}
{{- $error = $args.err -}}
{{- end -}}
{{/* Initialize local arguments */}}
{{ $icon := partial "utilities/GetTargetPath.html" (dict "path" $args.icon "page" $args.page) }}
{{ $image := partial "utilities/GetTargetPath.html" (dict "path" $args.image "page" $args.page) }}
{{- $icon := partial "utilities/GetTargetPath.html" (dict "path" $args.icon "page" $args.page) -}}
{{- $image := partial "utilities/GetTargetPath.html" (dict "path" $args.image "page" $args.page) -}}
{{- $wrapper := $args.wrapper -}}
{{ if $image }}{{ $wrapper = print "img-wrap " (or $wrapper "mx-auto") }}{{ end -}}
{{- if $image }}{{ $wrapper = printf "img-wrap %s" (or $wrapper "mx-auto") }}{{ end -}}
{{- $class := $args.class -}}
{{ if $icon }}
{{ if eq (lower (path.Ext $icon)) ".json" }}
{{ if site.Params.env_bookshop_live }}
{{- if $icon -}}
{{- if eq (lower (path.Ext $icon)) ".json" -}}
{{- if site.Params.env_bookshop_live }}
<i>Animation preview not supported</i>
{{ else }}
{{ partial "assets/animation.html" (dict
{{- else }}
{{- partial "assets/animation.html" (dict
"data" $icon
"mode" $args.mode
"loop" false
"hover" true
"class" "col-6 mx-auto text-center"
) }}
{{ end }}
{{ else }}
{{ partial "assets/icon.html" (dict "icon" $icon "wrapper" $wrapper) }}
{{ end }}
{{ else if $image }}
{{ if not (hasSuffix $image "svg") }}{{ $class = printf "%s rounded" $class }}{{ end }}
{{ partial "assets/live-image.html" (dict
) -}}
{{- end -}}
{{- else }}
{{ partial "assets/icon.html" (dict "icon" $icon "wrapper" $wrapper) -}}
{{- end -}}
{{- else if $image -}}
{{- if not (hasSuffix $image "svg") }}{{ $class = printf "%s rounded" $class }}{{ end -}}
{{- partial "assets/live-image.html" (dict
"src" $image
"anchor" $args.anchor
"ratio" $args.ratio
@@ -55,5 +55,5 @@
"sizes" $args.sizes
"priority" "high"
"mode" $args.mode
) }}
{{ end }}
) -}}
{{- end -}}

View File

@@ -11,7 +11,7 @@
{{ if $menu.Params.spacing }}
<li class="nav-item flex-grow-1"></li>
{{ else }}
<li class="nav-item {{ if .HasChildren }} dropdown{{ if $horizontal }} dropdown-horizontal-{{ $breakpoint }}{{ end }}{{ end }}">
<li class="nav-item {{ if .HasChildren }} dropdown me-auto{{ if $horizontal }} dropdown-horizontal-{{ $breakpoint }}{{ end }}{{ end }}">
{{- partial "assets/helpers/navbar-item.html" (dict "menu" $menu "page" $page) -}}
{{- if .HasChildren -}}
<ul class="dropdown-menu{{ if $control }} dropdown-menu-end{{ end }}">

View File

@@ -145,7 +145,7 @@
<div class="navbar-collapse collapse" id="{{ $id }}-collapse">
{{/* Insert search input */}}
{{- if and $search.enabled (not $search.modal) }}
{{ partial "assets/search-input.html" (dict "class" (printf "mt-4 mt-%s-0" $args.breakpoint)) }}
{{ partial "assets/search-input.html" (dict "class" (printf "mt-4 mt-%s-0 me-%s-3" $args.breakpoint $args.breakpoint)) }}
{{ end -}}
<ul class="navbar-nav navbar-nav-scroll {{ if $flex }}d-flex w-100{{ else }}ms-auto{{ end }}">

View File

@@ -0,0 +1,238 @@
<!--
Copyright © 2024 - 2025 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.
-->
{{ define "_partials/inline/default.html" }}
{{ $config := split .config "." }}
{{ $default := .default }}
{{ return or (index site.Params $config) $default }}
{{ end }}
{{ define "_partials/inline/alias-type.html" }}
{{ $type := .type }}
{{ $custom := .types }}
{{ $references := .references }}
{{ $aliases := dict "path" "string" "select" "string" "url" "string" "dict" "[]map[string]interface {}" "slice" "[]interface {}" }}
{{ $reserved := slice "bool" "int" "int64" "float" "float64" "string" "dict" "slice" }}
{{ $input := slice }}
{{ if not $type }}
{{ errorf "expected type argument: %s" page.File }}
{{ else }}
{{ $input = slice | append $type }}
{{ end }}
{{ $extra := slice }}
{{ range $element := $input }}
{{ $alias := index $aliases $element }}
{{ if $alias }}{{ $extra = $extra | append slice $alias }}{{ end }}
{{ if not (in $reserved $element) }}
{{ $def := index $references $element }}
{{ if $def }}
{{ $extra = $extra | append slice $def._reflect }}
{{ end }}
{{ end }}
{{ if $extra }}{{ $input = $input | append $extra }}{{ end }}
{{ end }}
{{ return $input }}
{{ end }}
{{/* Initialize arguments */}}
{{ $structure := .structure }}
{{ $bookshop := .bookshop }}
{{ $child := .child }}
{{ $named := .named | default true }}
{{ $args := .args | default dict }}
{{ $group := .group }}
{{/* Initialize local variables */}}
{{ $error := false }}
{{ $errmsg := slice }}
{{ $warnmsg := slice }}
{{ $params := dict }}
{{ $types := dict }}
{{ $default := slice }}
{{/* Validate partial arguments */}}
{{ if and (not $structure) (not $bookshop) }}
{{- $errmsg = $errmsg | append (printf "partial [utilities/InitArgs.html] - Missing value for param 'structure' or 'bookshop'") -}}
{{ $error = true }}
{{ end }}
{{/* Initialize type structure */}}
{{ if hasPrefix $structure "bookshop-" }}{{ $bookshop = strings.TrimPrefix "bookshop-" $structure }}{{ $structure = "" }}{{ end }}
{{ if not $error }}
{{ $types = partial "utilities/InitTypes.html" (dict "structure" $structure "bookshop" $bookshop "child" $child ) }}
{{ if $types.errmsg }}{{ $errmsg = $errmsg | append $types.errmsg }}{{ $error = $types.err }}{{ end }}
{{ if $types.warnmsg }}{{ $warnmsg = $warnmsg | append $types.warnmsg }}{{ end }}
{{ end }}
{{ $namedargs := dict }}
{{ if not $named }}
{{ range $index, $val := $args }}
{{ $found := false }}
{{ range $k, $v := $types.types }}
{{ if eq $index $v.position }}
{{ $namedargs = merge $namedargs (dict $k $val) }}
{{ $found = true }}
{{ break }}
{{ end }}
{{ end }}
{{ if not $found }}
{{ $errmsg = $errmsg | append (printf "[%s] unsupported argument at index %d (value: '%s')" (or $structure $bookshop) $index $val) }}
{{ end }}
{{ end }}
{{ else }}
{{ $namedargs = $args }}
{{ end }}
{{/* Validate passed arguments and initialize their default value when applicable */}}
{{ if not $error }}
{{ range $key, $val := $namedargs }}
{{ $def := index $types.types $key }}
{{ if not $def }}
{{ if eq (printf "%T" $key) "string" }}
{{ $errmsg = $errmsg | append (printf "[%s] unsupported argument '%s'" (or $structure $bookshop) $key) }}
{{ else if eq (printf "%T" $key) "int" }}
{{ $errmsg = $errmsg | append (printf "[%s] unsupported argument at index %d (value: '%s')" (or $structure $bookshop) $key $val) }}
{{ else }}
{{ $errmsg = $errmsg | append (printf "[%s] unsupported argument value '%v'" (or $structure $bookshop) $val) }}
{{ end }}
{{ $error = true }}
{{ break }}
{{ else }}
{{/* initialize default value */}}
{{ if and (eq $val nil) (or $def.config $def.default) }}
{{ $val = (partial "inline/default.html" (dict "config" $def.config "default" $def.default)) }}
{{ $default = $default | append $key }}
{{ end }}
{{/* validate type */}}
{{ $expected := partial "inline/alias-type.html" (dict "type" $def.type "types" $types.types "references" $types.udt) }}
{{ $actual := printf "%T" $val }}
{{/* cast supported types from/to string */}}
{{ if and (in $expected "bool") (in (slice "true" "false") $val) }}
{{ $actual = "bool" }}
{{ $val = cond (eq $val "true") true false }}
{{ else if and (in $expected "int") (findRE `^-?\d+$` $val) }}
{{ $actual = "int" }}
{{ $val = int $val }}
{{ else if and (in $expected "float") (findRE `^(?:[1-9]\d*|0)?(?:\.\d+)?$` $val) }}
{{ $actual = "float" }}
{{ $val = float $val }}
{{ else if and (in $expected "string") (in (slice "bool" "int" "int64" "float" "float64") $actual) }}
{{ $actual = "string" }}
{{ $val = string $val }}
{{ end }}
{{ if and $val (not (in $expected $actual)) }}
{{ $errmsg = $errmsg | append (printf "[%s] argument '%s': expected type '%s', got '%s' with value '%v'" (or $structure $bookshop) (string $key) (delimit $expected ", ") $actual $val) }}
{{ $error = true }}
{{ break }}
{{ end }}
{{/* validate permitted values */}}
{{ if and (reflect.IsMap $def.options) $def.options.values (eq $actual "string") }}
{{ if and $val (not (in $def.options.values $val)) }}
{{ $errmsg = $errmsg | append (printf "[%s] argument '%s': unexpected value '%s'" (or $structure $bookshop) (string $key) $val) }}
{{ $error = true }}
{{ break }}
{{ end }}
{{ else if and (reflect.IsMap $def.options) (or $def.options.min $def.options.max) (in (slice "int" "float" "float64") $actual) }}
{{ if or
(and $def.options.min (lt $val $def.options.min))
(and $def.options.max (gt $val $def.options.max))
}}
{{ $min := (string (or $def.options.min "-")) }}
{{ $max := (string (or $def.options.max "-")) }}
{{ $errmsg = $errmsg | append (printf "[%s] argument '%s': value '%s' out of range [%s, %s]" (or $structure $bookshop) (string $key) (string $val) $min $max) }}
{{ $error = true }}
{{ break }}
{{ end }}
{{ end }}
{{/* validate if argument is deprecated */}}
{{ with $def.deprecated }}
{{ $warn := printf "[%s] argument '%s': deprecated in v%s" (or $structure $bookshop) $key (strings.TrimPrefix "v" .) }}
{{ with $def.alternative }}
{{ $warn = printf "%s, use '%s' instead" $warn . }}
{{ end }}
{{ $warnmsg = $warnmsg | append $warn }}
{{ end }}
{{ end }}
{{/* append the argument to the return set */}}
{{ if not $error }}
{{ $params = merge $params (dict $key $val) }}
{{ end }}
{{ end }}
{{ end }}
{{ if not $error }}
{{/* validate required arguments */}}
{{ $max := len $namedargs }}
{{ $expected := 0 }}
{{ range $key, $val := $types.types }}
{{ $skip := false }}
{{ $groups := slice | append $val.group }}
{{ if and $group $val.group }}
{{ $skip = not (in $groups $group )}}
{{ end }}
{{ if and (not $skip) (not $val.optional) }}
{{ if not (isset $namedargs $key) }}
{{ $errmsg = $errmsg | append (printf "[%s] argument '%s': expected value" (or $structure $bookshop) $key) }}
{{ $error = true }}
{{ end }}
{{ end }}
{{ end }}
{{ if lt $max $expected }}
{{ $errmsg = $errmsg | append (printf "[%s] expected '%d' args, got '%d'" (or $structure $bookshop) $expected $max) }}
{{ $error = true }}
{{ end }}
{{/* add missing keys with default values (nested one level deep) or empty slice */}}
{{ range $key, $val := $types.types }}
{{ if (not (isset $params $key)) }}
{{ $udt := index $types.udt $key }}
{{ if or (isset $val "config") (isset $val "default") }}
{{ $params = merge $params (dict
$key (partial "inline/default.html" (dict "config" $val.config "default" $val.default))
) }}
{{ $default = $default | append $key }}
{{ else if $udt }}
{{ if eq $udt._reflect "[]interface {}" }}
{{ $params = merge $params (dict $key slice) }}
{{ else }}
{{ $nested := dict }}
{{ range $k, $v := $udt }}
{{ if and (reflect.IsMap $v) (or $v.config $v.default) }}
{{ $nested = merge $nested (dict
$k (partial "inline/default.html" (dict "config" $val.config "default" $val.default))
)}}
{{ end }}
{{ end }}
{{ $params = merge $params (dict $key $nested) }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{/* add the key-value pair using camel case to support chaining of the identifier */}}
{{/* see https://gohugo.io/configuration/params/#article */}}
{{ range $key, $val := $params }}
{{ if strings.Contains $key "-" }}
{{ $camelKey := partial "utilities/camelize.html" $key }}
{{ $params = merge $params (dict $camelKey $val) }}
{{ end }}
{{ end }}
{{ end }}
{{ $params = merge $params (dict "err" $error "errmsg" $errmsg "warnmsg" $warnmsg "default" $default) }}
{{ return $params }}

View File

@@ -0,0 +1,144 @@
<!--
Copyright © 2025 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.
-->
{{/* Inline partial to retrieve the type definition of the provided key (without recursion) */}}
{{ define "_partials/inline/type-definition.html" }}
{{ $key := .key }}
{{ $val := .val }}
{{ $arguments := .arguments }}
{{ $types := .types }}
{{ $def := index $arguments $key }}
{{ $udt := "" }}
{{ $reflect := "" }}
{{ $reserved := slice "bool" "int" "int64" "float" "float64" "string" "dict" "slice" }}
{{ $errorMsg := slice }}
{{ if and $def $def.type }}
{{ $aliases := slice | append $def.type }}
{{ range $alias := $aliases }}
{{ with index $types $alias }}
<!-- Reduce child elements to slice of argument names -->
{{ $args := slice }}
{{ $reflect = printf "%T" . }}
{{ if reflect.IsMap . }}
{{ range $k, $_ := . }}
{{ $args = $args | append $k }}
{{ end }}
{{ else if reflect.IsSlice . }}
{{ with index . 0 }}
{{ range $k, $_ := . }}
{{ $args = $args | append $k }}
{{ end }}
{{ end }}
{{ end }}
<!-- Retrieve type definition for each argument -->
{{ $definitions := dict }}
{{ $definitions := merge $definitions (dict "_reflect" $reflect) }}
{{ range $args }}
{{ $type := partial "inline/type-definition.html" (dict "key" . "arguments" $arguments "types" $types) }}
{{ if and $type $type.definition }}
{{ $definitions = merge $definitions (dict . $type.definition) }}
{{ else }}
{{- $errorMsg = $errorMsg | append (printf "partial [utilities/InitTypes.html] - Missing type for '%s.%s'" $key . ) -}}
{{ end }}
{{ end }}
{{ $udt = dict $alias $definitions }}
{{ end }}
{{ end }}
{{ end }}
{{ $merged := or $def dict }}
{{ if reflect.IsMap $val }}{{ $merged = merge $merged $val }}{{ end }}
{{ if not $merged.type }}
{{- $errorMsg = $errorMsg | append (printf "partial [utilities/InitTypes.html] - Missing type for '%s'" $key ) -}}
{{ end }}
{{ return (dict "definition" $merged "udt" $udt "errmsg" $errorMsg) }}
{{ end }}
{{/* Initalize arguments and local variables */}}
{{ $error := false }}
{{ $errmsg := slice }}
{{ $warnmsg := slice }}
{{ $params := dict }}
{{ $definitions := dict }}
{{ $udt := dict }}
{{ $structure := .structure }}
{{ $bookshop := .bookshop }}
{{ $group := .group }}
{{ $child := .child }}
{{ $level := .level | default 0 }}
{{ if gt $level 5 }}
{{ errorf "recursion detected: %s / %s" $structure $bookshop }}
{{ return }}
{{ end }}
{{ if and (not $structure) (not $bookshop) }}
{{- $errmsg = $errmsg | append (printf "partial [utilities/InitTypes.html] - Missing value for param 'structure' or 'bookshop'") -}}
{{ $error = true }}
{{ end }}
{{/* Initalize the type structure */}}
{{ if not $error }}
{{ $args := dict }}
{{ $arguments := index (index site.Data.structures "_arguments") "arguments" }}
{{ $types := index (index site.Data.structures "_types") "types" }}
{{/* Initalize the regular or bookshop argument structure */}}
{{ if $structure }}
{{ if index site.Data.structures $structure}}
{{ $args = (index site.Data.structures $structure).arguments | default dict }}
{{ else }}
{{ $args = (index $types $structure) | default dict }}
{{ end }}
{{ else }}
{{ $args = index (index (index site.Data.structures.components $bookshop) (printf "%s.bookshop" $bookshop)) "blueprint" | default dict }}
{{ $args = merge $args (dict "_bookshop_name" nil "_ordinal" nil "id" nil) }}
{{ end }}
{{/* Merge any child arguments */}}
{{ if $child }}
{{ $extra_def := (index site.Data.structures $child).arguments }}
{{ if not $extra_def }}
{{- $errmsg = $errmsg | append (printf "partial [utilities/InitTypes.html] - Missing definitions: %s" $child) -}}
{{ $error = true }}
{{ else }}
{{ range $key, $val := $extra_def }}
{{ if and $val $val.parent }}
{{ $newval := dict }}
{{ range $k, $v := $val }}
{{ if ne $k "default" }}{{ $newval = merge $newval (dict $k $v) }}{{ end }}
{{ end}}
{{ $args = merge $args (dict $key $newval) }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{/* Initialize the arguments and their type definitions recursively */}}
{{ range $key, $v := $args }}
{{ $type := partial "inline/type-definition.html" (dict "key" $key "val" $v "args" $args "arguments" $arguments "types" $types "structure" $structure) }}
{{ $errmsg = $errmsg | append $type.errmsg }}
{{ if and $type $type.definition $type.definition.type }}
{{ $definitions = merge $definitions (dict $key $type.definition) }}
{{ with $type.udt }}
{{ $udt = merge $udt . }}
{{ end }}
{{ else }}
{{- $errmsg = $errmsg | append (printf "partial [utilities/InitTypes.html] - Missing type for '%s' in '%s'" $key (or $structure $bookshop) ) -}}
{{ $error = true }}
{{ end }}
{{ end }}
{{ end }}
{{ $params = merge $params (dict "types" $definitions "udt" $udt "err" $error "errmsg" $errmsg "warnmsg" $warnmsg) }}
{{ return $params }}

10
package-lock.json generated
View File

@@ -13,7 +13,7 @@
"autoprefixer": "^10.4.21",
"cssnano": "^7.1.1",
"cssnano-preset-advanced": "^7.0.9",
"hugo-bin": "0.145.2",
"hugo-bin": "0.146.0",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
@@ -7237,9 +7237,9 @@
}
},
"node_modules/hugo-bin": {
"version": "0.145.2",
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.145.2.tgz",
"integrity": "sha512-iI4HutM+45/xdNU8XW/mhV0QWwzuuzVzKQ0fhGZIh1e5QkqWvRGhRjE0UARUSU8pygGgkJalVJgNVIGL/lkZ9g==",
"version": "0.146.0",
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.146.0.tgz",
"integrity": "sha512-R7c7SEhxNekWIny2HF5uU5Xk0Veg8BsahuyLURojvascGLCjyOAUDmghKnWB8DDVXSUmeDQYW8XdypNvbEC/Vg==",
"funding": [
{
"type": "github",
@@ -7249,7 +7249,7 @@
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@xhmikosr/bin-wrapper": "^13.1.0",
"@xhmikosr/bin-wrapper": "^13.2.0",
"package-config": "^5.0.0"
},
"bin": {

View File

@@ -75,7 +75,7 @@
"autoprefixer": "^10.4.21",
"cssnano": "^7.1.1",
"cssnano-preset-advanced": "^7.0.9",
"hugo-bin": "0.145.2",
"hugo-bin": "0.146.0",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {