mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-15 14:03:19 +00:00
Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6761bedd51 | ||
![]() |
f002cf06e4 | ||
![]() |
9d742f9165 | ||
![]() |
68c2cac3e0 | ||
![]() |
1c0ed71df9 | ||
![]() |
1e8791fdf0 | ||
![]() |
8cfac32280 | ||
![]() |
6e7a1dcdb9 | ||
![]() |
19cda9a986 | ||
![]() |
9ee9ebc960 | ||
![]() |
6f7903a2f2 | ||
![]() |
82d12d693c | ||
![]() |
3ed64f59f1 | ||
![]() |
df8ea923c5 | ||
![]() |
60872ea541 | ||
![]() |
52715cef21 | ||
![]() |
91f79e57ab | ||
![]() |
fdd878241b | ||
![]() |
f32bd92efa | ||
![]() |
c31dca464a | ||
![]() |
cb02c25ac4 | ||
![]() |
39ef3c5372 | ||
![]() |
546003c9d4 | ||
![]() |
6b4a1334bb | ||
![]() |
90ee71a536 | ||
![]() |
0c6b2929dc | ||
![]() |
2cb60efc38 | ||
![]() |
26f1bf3c7f | ||
![]() |
ec8176c1e3 | ||
![]() |
20b1cfb59e | ||
![]() |
09a6125834 | ||
![]() |
f543c012bd |
@@ -174,6 +174,24 @@
|
||||
color: var(--bs-navbar-color);
|
||||
}
|
||||
|
||||
.navbar .nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.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 */
|
||||
.navbar-toggler {
|
||||
border: 0 if($enable-important-utilities, !important, null);
|
||||
|
@@ -3,11 +3,11 @@
|
||||
//
|
||||
// scss-docs-start toc
|
||||
.toc-sidebar {
|
||||
grid-area: toc;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
overflow-y: auto;
|
||||
top: 5rem;
|
||||
max-height: calc(100vh - var(--navbar-offset));
|
||||
}
|
||||
|
||||
// scss-docs-end toc
|
||||
|
@@ -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
|
||||
|
@@ -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
6
go.mod
@@ -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
6
go.sum
@@ -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=
|
||||
|
@@ -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 -}}
|
||||
|
@@ -35,7 +35,7 @@
|
||||
{{- $isActive := or (and (eq $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
||||
{{ if not $menu.PageRef }}{{ $isActive = false }}{{ end }}
|
||||
{{- $isAlias := $menu.Params.alias -}}
|
||||
{{- $isIcon := $menu.Params.icon -}}
|
||||
{{- $isIcon := or $menu.Params.icon $menu.Pre -}}
|
||||
|
||||
{{- $url := urls.Parse $menuURL -}}
|
||||
{{- $baseURL := urls.Parse $.Site.Params.Baseurl -}}
|
||||
@@ -112,15 +112,17 @@
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
<span class="{{ if $isActive }}active{{ end }} {{ with $args.breakpoint }}d-{{ . }}-none {{ end }}">
|
||||
{{ $title }}
|
||||
{{- if $isIcon }} {{ end }}{{ $title }}
|
||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||
{{- with $suffix }} {{ . }}{{ end -}}
|
||||
</span>
|
||||
{{ if not $isIcon }}
|
||||
<span class="{{ if $isActive }}active{{ end }} {{ with $args.breakpoint }}d-none d-{{ . }}-block{{ end }}">
|
||||
{{ $title }}
|
||||
{{- if $isIcon }} {{ end }}{{ $title }}
|
||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||
{{- with $suffix }} {{ . }}{{ end -}}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||
{{- with $suffix }} {{ . }}{{ end -}}
|
||||
{{ cond (ne $menuURL "") "</a>" "</div>" | safeHTML }}
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -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 }}">
|
||||
|
@@ -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 }}">
|
||||
|
@@ -24,14 +24,16 @@
|
||||
{{ $result = $result | append $rendered }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $item.Headings }}
|
||||
{{ $result = $result | append (partial "inline/toc-item.html" (dict
|
||||
"base" $base
|
||||
"item" .
|
||||
"startLevel" $startLevel
|
||||
"endLevel" $endLevel
|
||||
"maxNumHeadings" $maxNumHeadings
|
||||
)) }}
|
||||
{{ if lt $item.Level $endLevel }}
|
||||
{{ range $item.Headings }}
|
||||
{{ $result = $result | append (partial "inline/toc-item.html" (dict
|
||||
"base" $base
|
||||
"item" .
|
||||
"startLevel" $startLevel
|
||||
"endLevel" $endLevel
|
||||
"maxNumHeadings" $maxNumHeadings
|
||||
)) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $result }}
|
||||
|
238
layouts/_partials/utilities/InitArgs.html~~~
Normal file
238
layouts/_partials/utilities/InitArgs.html~~~
Normal 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 }}
|
144
layouts/_partials/utilities/InitTypes.html~
Normal file
144
layouts/_partials/utilities/InitTypes.html~
Normal 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 }}
|
44
package-lock.json
generated
44
package-lock.json
generated
@@ -11,9 +11,9 @@
|
||||
"dependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^7.0.2",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"cssnano": "^7.1.0",
|
||||
"cssnano-preset-advanced": "^7.0.8",
|
||||
"hugo-bin": "0.145.2",
|
||||
"cssnano": "^7.1.1",
|
||||
"cssnano-preset-advanced": "^7.0.9",
|
||||
"hugo-bin": "0.146.0",
|
||||
"purgecss-whitelister": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -4410,12 +4410,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cssnano/-/cssnano-7.1.0.tgz",
|
||||
"integrity": "sha512-Pu3rlKkd0ZtlCUzBrKL1Z4YmhKppjC1H9jo7u1o4qaKqyhvixFgu5qLyNIAOjSTg9DjVPtUqdROq2EfpVMEe+w==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/cssnano/-/cssnano-7.1.1.tgz",
|
||||
"integrity": "sha512-fm4D8ti0dQmFPeF8DXSAA//btEmqCOgAc/9Oa3C1LW94h5usNrJEfrON7b4FkPZgnDEn6OUs5NdxiJZmAtGOpQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cssnano-preset-default": "^7.0.8",
|
||||
"cssnano-preset-default": "^7.0.9",
|
||||
"lilconfig": "^3.1.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -4430,14 +4430,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano-preset-advanced": {
|
||||
"version": "7.0.8",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-7.0.8.tgz",
|
||||
"integrity": "sha512-KYw7gH8xmIzTwHefuM/m3lkMz4jn5EbjxZO2RHVsOGvrXCxSjbc0/f/gELWW9ZIgbQdJMCkijEo76gBYGY4S3Q==",
|
||||
"version": "7.0.9",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-7.0.9.tgz",
|
||||
"integrity": "sha512-nczUlcRbMuupYDIjlYTQ6nqWh2AjV1omdf5OkUEKpOqPuRb8CZp/KgpZjD2eelX/sfFh6V/aybfgu7lVJH7Z/w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"autoprefixer": "^10.4.21",
|
||||
"browserslist": "^4.25.1",
|
||||
"cssnano-preset-default": "^7.0.8",
|
||||
"cssnano-preset-default": "^7.0.9",
|
||||
"postcss-discard-unused": "^7.0.4",
|
||||
"postcss-merge-idents": "^7.0.1",
|
||||
"postcss-reduce-idents": "^7.0.1",
|
||||
@@ -4451,9 +4451,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano-preset-default": {
|
||||
"version": "7.0.8",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.8.tgz",
|
||||
"integrity": "sha512-d+3R2qwrUV3g4LEMOjnndognKirBZISylDZAF/TPeCWVjEwlXS2e4eN4ICkoobRe7pD3H6lltinKVyS1AJhdjQ==",
|
||||
"version": "7.0.9",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.9.tgz",
|
||||
"integrity": "sha512-tCD6AAFgYBOVpMBX41KjbvRh9c2uUjLXRyV7KHSIrwHiq5Z9o0TFfUCoM3TwVrRsRteN3sVXGNvjVNxYzkpTsA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.25.1",
|
||||
@@ -4461,7 +4461,7 @@
|
||||
"cssnano-utils": "^5.0.1",
|
||||
"postcss-calc": "^10.1.1",
|
||||
"postcss-colormin": "^7.0.4",
|
||||
"postcss-convert-values": "^7.0.6",
|
||||
"postcss-convert-values": "^7.0.7",
|
||||
"postcss-discard-comments": "^7.0.4",
|
||||
"postcss-discard-duplicates": "^7.0.2",
|
||||
"postcss-discard-empty": "^7.0.1",
|
||||
@@ -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": {
|
||||
@@ -13284,9 +13284,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-convert-values": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-7.0.6.tgz",
|
||||
"integrity": "sha512-MD/eb39Mr60hvgrqpXsgbiqluawYg/8K4nKsqRsuDX9f+xN1j6awZCUv/5tLH8ak3vYp/EMXwdcnXvfZYiejCQ==",
|
||||
"version": "7.0.7",
|
||||
"resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-7.0.7.tgz",
|
||||
"integrity": "sha512-HR9DZLN04Xbe6xugRH6lS4ZQH2zm/bFh/ZyRkpedZozhvh+awAfbA0P36InO4fZfDhvYfNJeNvlTf1sjwGbw/A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.25.1",
|
||||
|
@@ -73,9 +73,9 @@
|
||||
"dependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^7.0.2",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"cssnano": "^7.1.0",
|
||||
"cssnano-preset-advanced": "^7.0.8",
|
||||
"hugo-bin": "0.145.2",
|
||||
"cssnano": "^7.1.1",
|
||||
"cssnano-preset-advanced": "^7.0.9",
|
||||
"hugo-bin": "0.146.0",
|
||||
"purgecss-whitelister": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
Reference in New Issue
Block a user