diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index ce2c01618..40ebe5096 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -154,23 +154,23 @@ home = ["HTML", "RSS", "REDIR", "netlify", "server", "searchindex"] [[module.imports]] path = "github.com/gethinode/mod-csp" [[module.imports]] - path = "github.com/gethinode/mod-flexsearch/v4" + path = "github.com/gethinode/mod-flexsearch/v5" [[module.imports]] - path = "github.com/gethinode/mod-fontawesome/v5" + path = "github.com/gethinode/mod-fontawesome/v6" [[module.imports]] path = "github.com/gethinode/mod-google-analytics/v2" [[module.imports]] path = "github.com/gethinode/mod-katex" [[module.imports]] - path = "github.com/gethinode/mod-leaflet/v2" + path = "github.com/gethinode/mod-leaflet/v3" [[module.imports]] - path = "github.com/gethinode/mod-lottie/v2" + path = "github.com/gethinode/mod-lottie/v3" [[module.imports]] - path = "github.com/gethinode/mod-mermaid/v4" + path = "github.com/gethinode/mod-mermaid/v5" [[module.imports]] - path = "github.com/gethinode/mod-simple-datatables/v3" + path = "github.com/gethinode/mod-simple-datatables/v4" [[module.imports]] - path = "github.com/gethinode/mod-utils/v5" + path = "github.com/gethinode/mod-utils/v6" # toml-docs-end modules # toml-docs-start segments diff --git a/data/structures/table.yml b/data/structures/table.yml index 8a4a60c05..4907a5552 100644 --- a/data/structures/table.yml +++ b/data/structures/table.yml @@ -13,7 +13,7 @@ arguments: comment: Table input in markdown format. group: partial breakpoint: - default: "" + optional: true position: 0 preview: true class: diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml index a32b4ed4a..9e70213ba 100644 --- a/exampleSite/config/_default/hugo.toml +++ b/exampleSite/config/_default/hugo.toml @@ -110,12 +110,12 @@ home = ["HTML", "RSS", "REDIR", "netlify", "server"] [module] workspace = "hinode.work" - # replacements = 'github.com/gethinode/mod-utils/v5 -> /Users/mark/Development/GitHub/gethinode/mod-utils/, github.com/gethinode/mod-blocks -> /Users/mark/Development/GitHub/gethinode/mod-blocks/' - # replacements = 'github.com/gethinode/mod-fontawesome/v5 -> /Users/mark/Development/GitHub/gethinode/mod-fontawesome/, github.com/gethinode/mod-blocks -> /Users/mark/Development/GitHub/gethinode/mod-blocks/, github.com/gethinode/mod-utils/v5 -> /Users/mark/Development/GitHub/gethinode/mod-utils/, github.com/gethinode/mod-bootstrap-icons -> /Users/mark/Development/GitHub/gethinode/mod-bootstrap-icons/' + # replacements = 'github.com/gethinode/mod-utils/v6 -> /Users/mark/Development/GitHub/gethinode/mod-utils/, github.com/gethinode/mod-blocks/v2 -> /Users/mark/Development/GitHub/gethinode/mod-blocks/' + # replacements = 'github.com/gethinode/mod-fontawesome/v6 -> /Users/mark/Development/GitHub/gethinode/mod-fontawesome/, github.com/gethinode/mod-blocks/v2 -> /Users/mark/Development/GitHub/gethinode/mod-blocks/, github.com/gethinode/mod-utils/v6 -> /Users/mark/Development/GitHub/gethinode/mod-utils/, github.com/gethinode/mod-bootstrap-icons/v2 -> /Users/mark/Development/GitHub/gethinode/mod-bootstrap-icons/' [[module.imports]] - path = "github.com/gethinode/mod-bootstrap-icons" + path = "github.com/gethinode/mod-bootstrap-icons/v2" [[module.imports]] - path = "github.com/gethinode/mod-blocks" + path = "github.com/gethinode/mod-blocks/v2" [[module.imports]] path = "github.com/gethinode/mod-docs" [[module.imports.mounts]] @@ -136,4 +136,4 @@ home = ["HTML", "RSS", "REDIR", "netlify", "server"] [[module.imports]] path = "github.com/gethinode/mod-cookieyes/v2" [[module.imports]] - path = "github.com/gethinode/hinode/v2" + path = "github.com/gethinode/hinode/v3" diff --git a/exampleSite/go.mod b/exampleSite/go.mod index 843cbe018..05dbe7286 100644 --- a/exampleSite/go.mod +++ b/exampleSite/go.mod @@ -3,13 +3,12 @@ module github.com/gethinode/hinode-example go 1.19 require ( - github.com/FortAwesome/Font-Awesome v0.0.0-20260210181720-337dd2045d56 // indirect github.com/cloudcannon/bookshop/hugo/v3 v3.18.5 // indirect - github.com/gethinode/mod-blocks v1.23.6 // indirect - github.com/gethinode/mod-bootstrap-icons v1.4.4 // indirect + github.com/gethinode/mod-blocks/v2 v2.0.1 // indirect + github.com/gethinode/mod-bootstrap-icons/v2 v2.0.0 // indirect github.com/gethinode/mod-cookieyes/v2 v2.2.6 // indirect github.com/gethinode/mod-docs v1.14.1 // indirect - github.com/gethinode/mod-fontawesome/v5 v5.1.1 // indirect - github.com/gethinode/mod-utils/v5 v5.23.4 // indirect + github.com/gethinode/mod-fontawesome/v6 v6.0.0 // indirect + github.com/gethinode/mod-utils/v6 v6.3.0 // indirect github.com/twbs/icons v1.13.1 // indirect ) diff --git a/exampleSite/go.sum b/exampleSite/go.sum index 424aa139f..a3bea94ed 100644 --- a/exampleSite/go.sum +++ b/exampleSite/go.sum @@ -1,18 +1,8 @@ -github.com/FortAwesome/Font-Awesome v0.0.0-20260210181720-337dd2045d56 h1:wZEHFCO5SVesIEn1oBuo3ltK7stDYViJsNT2aGRSXN4= -github.com/FortAwesome/Font-Awesome v0.0.0-20260210181720-337dd2045d56/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= github.com/cloudcannon/bookshop/hugo/v3 v3.18.5 h1:AKWzUQpWcBSbJgHQ/5cfPQtGX40bn8vbHBGk4rlHEGE= github.com/cloudcannon/bookshop/hugo/v3 v3.18.5/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8= -github.com/gethinode/mod-blocks v1.23.6 h1:Kg0RAlMhz2j1W60sERvHQyAa8H6UbNfMl9ZJajh/vKU= -github.com/gethinode/mod-blocks v1.23.6/go.mod h1:zSbs/OyzCDt4Kvn/9e1Zi8K1tweJANfibHUr/jcOrt4= -github.com/gethinode/mod-bootstrap-icons v1.4.4 h1:ts9JkWlWYJ8fiPkMO5Ue6ym/2WM5V9Rq1qpAgSGnbxQ= -github.com/gethinode/mod-bootstrap-icons v1.4.4/go.mod h1:ue9SPYxBc0NOoghr2qnWBz4NZF+sxOeb2sx+t9T2KKY= github.com/gethinode/mod-cookieyes/v2 v2.2.6 h1:/DQm8OYpms0On8wuosQER47TplVu/3z7MZHwbBKXCAg= github.com/gethinode/mod-cookieyes/v2 v2.2.6/go.mod h1:tULb7D7CoTycGUyL7ryqHJKaX11XuL2SN+XwP7/DI0Y= github.com/gethinode/mod-docs v1.14.1 h1:+G8IjMi/krhAzvOlB5ODnfQCp6b5ixWyU3D7f/8vdRg= github.com/gethinode/mod-docs v1.14.1/go.mod h1:ru1w0fHqFocjDIMV0dm40OwhBw5k4UncCS8iO/1S5kI= -github.com/gethinode/mod-fontawesome/v5 v5.1.1 h1:zYjqzFMj2JdYyvRrigIAs8+LIspQ0XSRmi9f1orQm0Q= -github.com/gethinode/mod-fontawesome/v5 v5.1.1/go.mod h1:DZi1UIZLFO9Og2pkrsyTRad85PoFEEwSwiPd7kk28IA= -github.com/gethinode/mod-utils/v5 v5.23.4 h1:/lcKi1MJ2srGfNhCPtdnTRpQgdh2FNBRUAS7Ysz1W34= -github.com/gethinode/mod-utils/v5 v5.23.4/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU= github.com/twbs/icons v1.13.1 h1:6bmNXvoeIbvjFWjfbjXg5JGbelLD1haIsMaEIzE9UZI= github.com/twbs/icons v1.13.1/go.mod h1:GnRlymgVWp5iVJCMa0Me5b6tFyGpVc2bSxPMRGIJmyA= diff --git a/exampleSite/hinode.work.sum b/exampleSite/hinode.work.sum index dd97c2408..363b7d27d 100644 --- a/exampleSite/hinode.work.sum +++ b/exampleSite/hinode.work.sum @@ -4,6 +4,12 @@ github.com/cloudcannon/bookshop/hugo/v3 v3.18.2 h1:j3XUvvuCv/7SfGKzd7gzb3WEgs1Du github.com/cloudcannon/bookshop/hugo/v3 v3.18.2/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8= github.com/gethinode/hinode/component-library v0.0.0-20260126151252-24679a2c2a61 h1:ZotbWXLzG4pArTCFaVAme9EW7/it0f2AdYBO2omYiCQ= github.com/gethinode/hinode/component-library v0.0.0-20260126151252-24679a2c2a61/go.mod h1:Y/gFEO2qzmZzvOxa+t5R3mKInVQ0tKHezByPLXiv5sA= +github.com/gethinode/mod-blocks/v2 v2.0.0 h1:J8XLZOSVdondbLpDsQA9AoyLy3pu9wsdZcgaXZzU9fw= +github.com/gethinode/mod-blocks/v2 v2.0.0/go.mod h1:yhZH/AHvPlr1IkYu9GRmhvsLBlyvwpO0T8DvnKUITDw= +github.com/gethinode/mod-blocks/v2 v2.0.1 h1:BoHDy2PqZfSQ5kolAjnem2gWOarxVCRzaJZ6owM0oCs= +github.com/gethinode/mod-blocks/v2 v2.0.1/go.mod h1:yhZH/AHvPlr1IkYu9GRmhvsLBlyvwpO0T8DvnKUITDw= +github.com/gethinode/mod-bootstrap-icons/v2 v2.0.0 h1:ryXa25d/9mXVcPXhOwMtxtAtFkR0M1EPSIuU0xRRDec= +github.com/gethinode/mod-bootstrap-icons/v2 v2.0.0/go.mod h1:0DKJp0goqI0vwOIVa8/yd3tAE0XdUypu1QRoz9K+094= github.com/gethinode/mod-fontawesome/v2 v2.1.2 h1:v1aHhbLLwe/05zRHnx9qGqh6b3toDzcLzuv61rWAoGU= github.com/gethinode/mod-fontawesome/v2 v2.1.2/go.mod h1:zukv88wXqquEvTJJ9mWWk8Ia+9INnA41wYqusf2RcHA= github.com/gethinode/mod-fontawesome/v3 v3.1.3 h1:xlwmdgulIV/IMj5I1/fH4tPM1/AU0OYZ4vepQiJbOYA= diff --git a/exampleSite/hugo_stats.json b/exampleSite/hugo_stats.json index 88559e924..97ae1f2cb 100644 --- a/exampleSite/hugo_stats.json +++ b/exampleSite/hugo_stats.json @@ -7,6 +7,7 @@ "body", "button", "code", + "dialog", "div", "em", "figcaption", @@ -94,6 +95,7 @@ "anchor", "approach", "articles", + "backdrop-container", "background-container", "background-img-fluid", "badge", @@ -263,6 +265,12 @@ "container", "container-fluid", "container-xxl", + "control-btn", + "control-btn-expand", + "control-btn-fullscreen", + "control-btn-lightbox", + "control-btn-zoom-in", + "control-btn-zoom-out", "controls-bottom", "cta", "custom", @@ -286,6 +294,10 @@ "d-sm-block", "d-sm-none", "data-table", + "diagram-container", + "diagram-controls", + "diagram-has-fullscreen", + "diagram-wrapper", "disabled", "display-1", "display-4", @@ -323,6 +335,7 @@ "fa-address-card", "fa-arrow-right", "fa-arrows-rotate", + "fa-arrows-to-dot", "fa-ban", "fa-basketball", "fa-beat", @@ -336,6 +349,7 @@ "fa-circle-check", "fa-circle-info", "fa-code", + "fa-expand", "fa-facebook", "fa-fade", "fa-flag", @@ -354,6 +368,8 @@ "fa-link", "fa-linkedin", "fa-magnifying-glass", + "fa-magnifying-glass-minus", + "fa-magnifying-glass-plus", "fa-md", "fa-medium", "fa-mug-saucer", @@ -388,12 +404,13 @@ "fa-wrapper", "fa-x-twitter", "fa-xl", + "fa-xmark", "fa-xs", "fab", "fade", + "faq", "far", "fas", - "faw", "featured", "figure-caption", "file", @@ -462,6 +479,10 @@ "label", "lead", "leaflet-map", + "lightbox", + "lightbox-close", + "lightbox-content", + "lightbox-demo", "link-bg-black", "link-bg-body", "link-bg-body-tertiary", @@ -493,7 +514,6 @@ "m-col", "m-col-1", "m-col-md-3", - "m-n1", "m-row", "main", "main-nav-toggler", @@ -543,12 +563,10 @@ "multi-file-collapse-9", "mx-auto", "mx-md-2", - "mx-md-n4", "my-4", "my-auto", "my-md-0", "my-md-auto", - "my-md-n4", "nav", "nav-callout", "nav-fill", @@ -1033,10 +1051,10 @@ "dropdown-align-end-1", "dropdown-callout-1", "dropdown-nav-0", - "dropdown-panel-07eb6d1a0de7cd4b034d56e3cd58d35d", - "dropdown-panel-ab337894fb17d25b846354db614c24f6", - "dropdown-panel-be72ff21cba87ca510b4fbba54580b1d", - "dropdown-panel-e5a59b9f3a2ab8a0eede7d3e49f31d85", + "dropdown-panel-5178be13cd530f9f1f9086d9acef7356", + "dropdown-panel-5c9d4605dbeb2fea2579032d44959e20", + "dropdown-panel-61f3177fc7338122b8df60a89e87df83", + "dropdown-panel-a2acf6b223b522b5a52a0131e196c1cd", "dropdown-pills-1", "dropdown-tabs-1", "dropdown-underline-1", @@ -1060,11 +1078,11 @@ "fab-whatsapp", "fab-x-twitter", "faq", - "faq-533fb8f7a0f4d90313dc4ad11889ade7", - "faq-533fb8f7a0f4d90313dc4ad11889ade7-heading-faq-533fb8f7a0f4d90313dc4ad11889ade7", - "faq-533fb8f7a0f4d90313dc4ad11889ade7-item-0", - "faq-533fb8f7a0f4d90313dc4ad11889ade7-item-1", - "faq-533fb8f7a0f4d90313dc4ad11889ade7-item-2", + "faq-cba3bfd808e5bdc89183fe8f16a6dd13", + "faq-cba3bfd808e5bdc89183fe8f16a6dd13-heading-faq-cba3bfd808e5bdc89183fe8f16a6dd13", + "faq-cba3bfd808e5bdc89183fe8f16a6dd13-item-0", + "faq-cba3bfd808e5bdc89183fe8f16a6dd13-item-1", + "faq-cba3bfd808e5bdc89183fe8f16a6dd13-item-2", "far-square", "fas-1", "fas-2", @@ -1074,6 +1092,7 @@ "fas-6", "fas-arrow-right", "fas-arrows-rotate", + "fas-arrows-to-dot", "fas-ban", "fas-basketball", "fas-bell", @@ -1083,11 +1102,14 @@ "fas-circle-check", "fas-circle-info", "fas-code", + "fas-expand", "fas-flag", "fas-globe", "fas-heart", "fas-link", "fas-magnifying-glass", + "fas-magnifying-glass-minus", + "fas-magnifying-glass-plus", "fas-mug-saucer", "fas-person-skating", "fas-person-skiing", @@ -1103,6 +1125,7 @@ "fas-terminal", "fas-triangle-exclamation", "fas-users", + "fas-xmark", "featured", "featured-article", "featured-download", @@ -1194,6 +1217,9 @@ "leaflet-map-0", "leaflet-map-london", "liens-vers-des-tiers-et-utilisation-de-vos-informations", + "lightbox-demo", + "lightbox-demo-body", + "lightbox-demo-fixture", "line-separator", "link", "link-icon", @@ -1229,10 +1255,10 @@ "nav-align-end-1", "nav-callout-1", "nav-nav-0", - "nav-panel-07eb6d1a0de7cd4b034d56e3cd58d35d", - "nav-panel-ab337894fb17d25b846354db614c24f6", - "nav-panel-be72ff21cba87ca510b4fbba54580b1d", - "nav-panel-e5a59b9f3a2ab8a0eede7d3e49f31d85", + "nav-panel-5178be13cd530f9f1f9086d9acef7356", + "nav-panel-5c9d4605dbeb2fea2579032d44959e20", + "nav-panel-61f3177fc7338122b8df60a89e87df83", + "nav-panel-a2acf6b223b522b5a52a0131e196c1cd", "nav-pills-1", "nav-tabs-1", "nav-underline-1", @@ -1270,36 +1296,36 @@ "over-mij", "overview", "page-link", - "panel-07eb6d1a0de7cd4b034d56e3cd58d35d-0", - "panel-07eb6d1a0de7cd4b034d56e3cd58d35d-1", - "panel-07eb6d1a0de7cd4b034d56e3cd58d35d-2", - "panel-07eb6d1a0de7cd4b034d56e3cd58d35d-btn-0", - "panel-07eb6d1a0de7cd4b034d56e3cd58d35d-btn-1", - "panel-07eb6d1a0de7cd4b034d56e3cd58d35d-btn-2", - "panel-ab337894fb17d25b846354db614c24f6-0", - "panel-ab337894fb17d25b846354db614c24f6-1", - "panel-ab337894fb17d25b846354db614c24f6-2", - "panel-ab337894fb17d25b846354db614c24f6-btn-0", - "panel-ab337894fb17d25b846354db614c24f6-btn-1", - "panel-ab337894fb17d25b846354db614c24f6-btn-2", - "panel-be72ff21cba87ca510b4fbba54580b1d-0", - "panel-be72ff21cba87ca510b4fbba54580b1d-1", - "panel-be72ff21cba87ca510b4fbba54580b1d-2", - "panel-be72ff21cba87ca510b4fbba54580b1d-btn-0", - "panel-be72ff21cba87ca510b4fbba54580b1d-btn-1", - "panel-be72ff21cba87ca510b4fbba54580b1d-btn-2", - "panel-d43f03c03a7e76888c392a6d26001062-0", - "panel-d43f03c03a7e76888c392a6d26001062-1", - "panel-d43f03c03a7e76888c392a6d26001062-2", - "panel-d43f03c03a7e76888c392a6d26001062-btn-0", - "panel-d43f03c03a7e76888c392a6d26001062-btn-1", - "panel-d43f03c03a7e76888c392a6d26001062-btn-2", - "panel-e5a59b9f3a2ab8a0eede7d3e49f31d85-0", - "panel-e5a59b9f3a2ab8a0eede7d3e49f31d85-1", - "panel-e5a59b9f3a2ab8a0eede7d3e49f31d85-2", - "panel-e5a59b9f3a2ab8a0eede7d3e49f31d85-btn-0", - "panel-e5a59b9f3a2ab8a0eede7d3e49f31d85-btn-1", - "panel-e5a59b9f3a2ab8a0eede7d3e49f31d85-btn-2", + "panel-5178be13cd530f9f1f9086d9acef7356-0", + "panel-5178be13cd530f9f1f9086d9acef7356-1", + "panel-5178be13cd530f9f1f9086d9acef7356-2", + "panel-5178be13cd530f9f1f9086d9acef7356-btn-0", + "panel-5178be13cd530f9f1f9086d9acef7356-btn-1", + "panel-5178be13cd530f9f1f9086d9acef7356-btn-2", + "panel-5c9d4605dbeb2fea2579032d44959e20-0", + "panel-5c9d4605dbeb2fea2579032d44959e20-1", + "panel-5c9d4605dbeb2fea2579032d44959e20-2", + "panel-5c9d4605dbeb2fea2579032d44959e20-btn-0", + "panel-5c9d4605dbeb2fea2579032d44959e20-btn-1", + "panel-5c9d4605dbeb2fea2579032d44959e20-btn-2", + "panel-61f3177fc7338122b8df60a89e87df83-0", + "panel-61f3177fc7338122b8df60a89e87df83-1", + "panel-61f3177fc7338122b8df60a89e87df83-2", + "panel-61f3177fc7338122b8df60a89e87df83-btn-0", + "panel-61f3177fc7338122b8df60a89e87df83-btn-1", + "panel-61f3177fc7338122b8df60a89e87df83-btn-2", + "panel-a2acf6b223b522b5a52a0131e196c1cd-0", + "panel-a2acf6b223b522b5a52a0131e196c1cd-1", + "panel-a2acf6b223b522b5a52a0131e196c1cd-2", + "panel-a2acf6b223b522b5a52a0131e196c1cd-btn-0", + "panel-a2acf6b223b522b5a52a0131e196c1cd-btn-1", + "panel-a2acf6b223b522b5a52a0131e196c1cd-btn-2", + "panel-ada423c039dbae3b2392ef80eb481921-0", + "panel-ada423c039dbae3b2392ef80eb481921-1", + "panel-ada423c039dbae3b2392ef80eb481921-2", + "panel-ada423c039dbae3b2392ef80eb481921-btn-0", + "panel-ada423c039dbae3b2392ef80eb481921-btn-1", + "panel-ada423c039dbae3b2392ef80eb481921-btn-2", "panels", "persona", "pie-chart", @@ -1322,49 +1348,49 @@ "premier-article", "preview", "preview-1", - "preview-1cdf0e6875c59d305e4e246ff99d921f-desktop", - "preview-1cdf0e6875c59d305e4e246ff99d921f-desktop-tab", - "preview-1cdf0e6875c59d305e4e246ff99d921f-mobile", - "preview-1cdf0e6875c59d305e4e246ff99d921f-mobile-tab", - "preview-1cdf0e6875c59d305e4e246ff99d921f-tablet", - "preview-1cdf0e6875c59d305e4e246ff99d921f-tablet-tab", + "preview-130013c59f7f918dc962918ce553ae4a-desktop", + "preview-130013c59f7f918dc962918ce553ae4a-desktop-tab", + "preview-130013c59f7f918dc962918ce553ae4a-mobile", + "preview-130013c59f7f918dc962918ce553ae4a-mobile-tab", + "preview-130013c59f7f918dc962918ce553ae4a-tablet", + "preview-130013c59f7f918dc962918ce553ae4a-tablet-tab", "preview-2", - "preview-411c5ffe25cf00dcabd6da9d3a15e232-desktop", - "preview-411c5ffe25cf00dcabd6da9d3a15e232-mobile", - "preview-411c5ffe25cf00dcabd6da9d3a15e232-tablet", - "preview-43d8715ffd496b10c79052f7e27312aa-desktop", - "preview-43d8715ffd496b10c79052f7e27312aa-desktop-tab", - "preview-43d8715ffd496b10c79052f7e27312aa-mobile", - "preview-43d8715ffd496b10c79052f7e27312aa-mobile-tab", - "preview-43d8715ffd496b10c79052f7e27312aa-tablet", - "preview-43d8715ffd496b10c79052f7e27312aa-tablet-tab", - "preview-55272f92dc923fd884464d9fe88143c1-desktop", - "preview-55272f92dc923fd884464d9fe88143c1-mobile", - "preview-55272f92dc923fd884464d9fe88143c1-tablet", - "preview-5a7a28d97cc4ee696a8c96aef8dced69-desktop", - "preview-5a7a28d97cc4ee696a8c96aef8dced69-desktop-tab", - "preview-5a7a28d97cc4ee696a8c96aef8dced69-mobile", - "preview-5a7a28d97cc4ee696a8c96aef8dced69-mobile-tab", - "preview-5a7a28d97cc4ee696a8c96aef8dced69-tablet", - "preview-5a7a28d97cc4ee696a8c96aef8dced69-tablet-tab", - "preview-9bbfb1cb365916d5cbf14165ba8128aa-desktop", - "preview-9bbfb1cb365916d5cbf14165ba8128aa-desktop-tab", - "preview-9bbfb1cb365916d5cbf14165ba8128aa-mobile", - "preview-9bbfb1cb365916d5cbf14165ba8128aa-mobile-tab", - "preview-9bbfb1cb365916d5cbf14165ba8128aa-tablet", - "preview-9bbfb1cb365916d5cbf14165ba8128aa-tablet-tab", - "preview-b36c22608612779fd90342241bf82ec5-desktop", - "preview-b36c22608612779fd90342241bf82ec5-desktop-tab", - "preview-b36c22608612779fd90342241bf82ec5-mobile", - "preview-b36c22608612779fd90342241bf82ec5-mobile-tab", - "preview-b36c22608612779fd90342241bf82ec5-tablet", - "preview-b36c22608612779fd90342241bf82ec5-tablet-tab", - "preview-d3960298c5145def3f21c2b816ff3353-desktop", - "preview-d3960298c5145def3f21c2b816ff3353-desktop-tab", - "preview-d3960298c5145def3f21c2b816ff3353-mobile", - "preview-d3960298c5145def3f21c2b816ff3353-mobile-tab", - "preview-d3960298c5145def3f21c2b816ff3353-tablet", - "preview-d3960298c5145def3f21c2b816ff3353-tablet-tab", + "preview-8e68ec09a183c54386bd66ecbe7b54a5-desktop", + "preview-8e68ec09a183c54386bd66ecbe7b54a5-desktop-tab", + "preview-8e68ec09a183c54386bd66ecbe7b54a5-mobile", + "preview-8e68ec09a183c54386bd66ecbe7b54a5-mobile-tab", + "preview-8e68ec09a183c54386bd66ecbe7b54a5-tablet", + "preview-8e68ec09a183c54386bd66ecbe7b54a5-tablet-tab", + "preview-9721edb7917486337c2b9828c7f62f11-desktop", + "preview-9721edb7917486337c2b9828c7f62f11-desktop-tab", + "preview-9721edb7917486337c2b9828c7f62f11-mobile", + "preview-9721edb7917486337c2b9828c7f62f11-mobile-tab", + "preview-9721edb7917486337c2b9828c7f62f11-tablet", + "preview-9721edb7917486337c2b9828c7f62f11-tablet-tab", + "preview-b6f07e4c42cd8d92634ebd7cb05bf631-desktop", + "preview-b6f07e4c42cd8d92634ebd7cb05bf631-mobile", + "preview-b6f07e4c42cd8d92634ebd7cb05bf631-tablet", + "preview-cfe3984774d613d99e17b0de90b95e4e-desktop", + "preview-cfe3984774d613d99e17b0de90b95e4e-desktop-tab", + "preview-cfe3984774d613d99e17b0de90b95e4e-mobile", + "preview-cfe3984774d613d99e17b0de90b95e4e-mobile-tab", + "preview-cfe3984774d613d99e17b0de90b95e4e-tablet", + "preview-cfe3984774d613d99e17b0de90b95e4e-tablet-tab", + "preview-de05d555d84c694472fdcce82f0961bd-desktop", + "preview-de05d555d84c694472fdcce82f0961bd-desktop-tab", + "preview-de05d555d84c694472fdcce82f0961bd-mobile", + "preview-de05d555d84c694472fdcce82f0961bd-mobile-tab", + "preview-de05d555d84c694472fdcce82f0961bd-tablet", + "preview-de05d555d84c694472fdcce82f0961bd-tablet-tab", + "preview-e5b7c5ec521d148e8c6f2af1e087ec5c-desktop", + "preview-e5b7c5ec521d148e8c6f2af1e087ec5c-mobile", + "preview-e5b7c5ec521d148e8c6f2af1e087ec5c-tablet", + "preview-fe38261e9b0762866dad83c65bd8c4ec-desktop", + "preview-fe38261e9b0762866dad83c65bd8c4ec-desktop-tab", + "preview-fe38261e9b0762866dad83c65bd8c4ec-mobile", + "preview-fe38261e9b0762866dad83c65bd8c4ec-mobile-tab", + "preview-fe38261e9b0762866dad83c65bd8c4ec-tablet", + "preview-fe38261e9b0762866dad83c65bd8c4ec-tablet-tab", "preview-unavailable", "preview-unavailable-alert-only", "preview-with-specific-device", @@ -1435,7 +1461,7 @@ "tabs-1-btn-2", "team", "testimonial", - "testimonial-carousel-066e2fe00395103e582e09753a275276", + "testimonial-carousel-27328ac6a928aaf7828686daace56b95", "testimonial-with-avatar", "testimonial-with-case-study", "testimonial-with-icon", diff --git a/exampleSite/layouts/_partials/templates/script.html b/exampleSite/layouts/_partials/templates/script.html index b724f2116..b3f89df13 100644 --- a/exampleSite/layouts/_partials/templates/script.html +++ b/exampleSite/layouts/_partials/templates/script.html @@ -27,5 +27,5 @@ {{- with $args.scriptType }}{{ printf ` type="%s"` . | safeHTMLAttr }}{{ end -}} {{- with $category }} data-category="{{ . }}"{{ end -}} {{- with $args.integrity }} integrity="{{ . }}" crossorigin="anonymous"{{ end }} - {{- with $args.state }} {{ . | safeHTMLAttr }}{{ end -}}> + {{- if and $args.state (ne $args.state "immediate") }} {{ $args.state | safeHTMLAttr }}{{ end -}}> {{- end -}} \ No newline at end of file diff --git a/go.mod b/go.mod index accfcefae..1f1135164 100644 --- a/go.mod +++ b/go.mod @@ -1,21 +1,21 @@ -module github.com/gethinode/hinode/v2 +module github.com/gethinode/hinode/v3 go 1.19 require ( - github.com/FortAwesome/Font-Awesome v0.0.0-20260210181720-337dd2045d56 // indirect + github.com/FortAwesome/Font-Awesome v0.0.0-20260625220317-70fb2dd154b6 // indirect github.com/airbnb/lottie-web v5.13.0+incompatible // indirect github.com/gethinode/mod-bootstrap v1.3.7 // indirect github.com/gethinode/mod-csp v1.0.11 // indirect - github.com/gethinode/mod-flexsearch/v4 v4.3.3 // indirect - github.com/gethinode/mod-fontawesome/v5 v5.1.1 // indirect + github.com/gethinode/mod-flexsearch/v5 v5.0.0 // indirect + github.com/gethinode/mod-fontawesome/v6 v6.0.0 // indirect github.com/gethinode/mod-google-analytics/v2 v2.0.3 // indirect github.com/gethinode/mod-katex v1.1.5 // indirect - github.com/gethinode/mod-leaflet/v2 v2.1.1 // indirect - github.com/gethinode/mod-lottie/v2 v2.1.2 // indirect - github.com/gethinode/mod-mermaid/v4 v4.10.1 // indirect - github.com/gethinode/mod-simple-datatables/v3 v3.1.2 // indirect - github.com/gethinode/mod-utils/v5 v5.24.0 // indirect + github.com/gethinode/mod-leaflet/v3 v3.0.0 // indirect + github.com/gethinode/mod-lottie/v3 v3.0.0 // indirect + github.com/gethinode/mod-mermaid/v5 v5.0.0 // indirect + github.com/gethinode/mod-simple-datatables/v4 v4.0.0 // indirect + github.com/gethinode/mod-utils/v6 v6.3.0 // indirect github.com/nextapps-de/flexsearch v0.0.0-20260529083235-f7ed963096a0 // indirect github.com/twbs/bootstrap v5.3.8+incompatible // indirect ) diff --git a/go.sum b/go.sum index 643b49a54..3c302242c 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/FortAwesome/Font-Awesome v0.0.0-20260210181720-337dd2045d56 h1:wZEHFCO5SVesIEn1oBuo3ltK7stDYViJsNT2aGRSXN4= github.com/FortAwesome/Font-Awesome v0.0.0-20260210181720-337dd2045d56/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/FortAwesome/Font-Awesome v0.0.0-20260625220317-70fb2dd154b6 h1:slcJCZg0UQMHqw5JCoVmE8/IJfoNUprTmP2T3lDG9VY= +github.com/FortAwesome/Font-Awesome v0.0.0-20260625220317-70fb2dd154b6/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= 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/gethinode/mod-bootstrap v1.3.5 h1:bewgYpQex+dBABK0u5PUvW6IoUXLHhi1Yv9hcPzwGVc= @@ -38,6 +40,8 @@ github.com/gethinode/mod-flexsearch/v4 v4.3.2 h1:opF6duHVkIHNtBlAxXS0ifYyK2O/PWb github.com/gethinode/mod-flexsearch/v4 v4.3.2/go.mod h1:EhxL9eZChNp9RAA522W6cxifTP0TMVQH8//NjoryQgE= github.com/gethinode/mod-flexsearch/v4 v4.3.3 h1:/h900BK1zmfI3NQ/xp6srFNnPABiJhVaAg+xhiN+v1U= github.com/gethinode/mod-flexsearch/v4 v4.3.3/go.mod h1:+aa5mmNfFHnqb30AoAWVRx/SQJMjEN98OleVMcmGLjA= +github.com/gethinode/mod-flexsearch/v5 v5.0.0 h1:JsrsKejSRxirUyfCZheLFkQVAJKdtRDr/d0lRKjrLYw= +github.com/gethinode/mod-flexsearch/v5 v5.0.0/go.mod h1:FGj0l97PX7OnDjvFtdFrq3g3BJPeal7FiSgrtd6Yxdo= github.com/gethinode/mod-fontawesome/v4 v4.0.3 h1:ml+V7YPkxsK5sPJz0OlheBlGdEZrry4aH/7M/ytz3zk= github.com/gethinode/mod-fontawesome/v4 v4.0.3/go.mod h1:EqAF4dW3gyUr/CsNND5lEPJcNRlLJ+GfPIUaGTaVRic= github.com/gethinode/mod-fontawesome/v4 v4.1.1 h1:nC2tTBHTeUBwVqZCz6kEzDvuBrbMgWeOxcAXbCBwCOs= @@ -62,6 +66,8 @@ github.com/gethinode/mod-fontawesome/v5 v5.1.0 h1:u3ntQMe1fGntcrljxrbZXA9Q0z2WHl github.com/gethinode/mod-fontawesome/v5 v5.1.0/go.mod h1:b9nG1pel6LIWiNyb0kZAmyhLo2rrx4dvG2xyoD8tDlk= github.com/gethinode/mod-fontawesome/v5 v5.1.1 h1:zYjqzFMj2JdYyvRrigIAs8+LIspQ0XSRmi9f1orQm0Q= github.com/gethinode/mod-fontawesome/v5 v5.1.1/go.mod h1:DZi1UIZLFO9Og2pkrsyTRad85PoFEEwSwiPd7kk28IA= +github.com/gethinode/mod-fontawesome/v6 v6.0.0 h1:PrfiMfVEAM5Lpnkp+sXOtOdRSOe3l56z+ngrPcACzlA= +github.com/gethinode/mod-fontawesome/v6 v6.0.0/go.mod h1:ayMslv2xpC5cjxUVTkIlFBbOd1LM5ezIr0OSOr6q8Gk= github.com/gethinode/mod-google-analytics/v2 v2.0.0 h1:Vor4j56qtpjtKY9r5QLeN5CBxuf8YKP3+XvQKEkayrM= github.com/gethinode/mod-google-analytics/v2 v2.0.0/go.mod h1:y4ZlacA8FSXjmvn9P8cZshOrBB5Wc+3p0DKSehkk+8E= github.com/gethinode/mod-google-analytics/v2 v2.0.1 h1:WNI8e06Bl1pLYrt1Adwuk4KtU9uVrJmO+KZxggIcI0M= @@ -80,6 +86,8 @@ github.com/gethinode/mod-leaflet/v2 v2.1.0 h1:UNatsksPPPU3jtB1DD0o59o2B2iGfkdgWO github.com/gethinode/mod-leaflet/v2 v2.1.0/go.mod h1:A9Inp9uwSDD6vW8uYVVGl6eXGMe+j3ESOxV4T53HOaM= github.com/gethinode/mod-leaflet/v2 v2.1.1 h1:8g0T9hN036LsCaXFkehDlzFbEpAlSYrzxSpbhSLrRr8= github.com/gethinode/mod-leaflet/v2 v2.1.1/go.mod h1:A9Inp9uwSDD6vW8uYVVGl6eXGMe+j3ESOxV4T53HOaM= +github.com/gethinode/mod-leaflet/v3 v3.0.0 h1:rNjdruvS08bxqsLFEWNt9aU2KCbHiRlEKpKIutqWVOw= +github.com/gethinode/mod-leaflet/v3 v3.0.0/go.mod h1:FsoyVRb3DRZBb2jWPV4yJNqbmOKmCwaJgom2hbWZXnA= github.com/gethinode/mod-lottie/v2 v2.0.1 h1:jIY5oGHtkXXvJoxNAE2AueoqxqNNlTYHF4+igQmkIAU= github.com/gethinode/mod-lottie/v2 v2.0.1/go.mod h1:/YzhRcG9H8MyODt8qaOQP0nqoux7EFHW2S7ugiiFf0o= github.com/gethinode/mod-lottie/v2 v2.1.0 h1:d0ViSsZr8idst7/zWTjCHp93jdX9fPHeGaAHEhi7lO4= @@ -88,6 +96,8 @@ github.com/gethinode/mod-lottie/v2 v2.1.1 h1:JgXJU46FXwnjH70jaC2dB8vR8LsqN0mix8U github.com/gethinode/mod-lottie/v2 v2.1.1/go.mod h1:PpqzaW3LD8B91BF154cMJsm36g0+ZJbZFiqSfNaAlgM= github.com/gethinode/mod-lottie/v2 v2.1.2 h1:6ckLvZ/zCugdFtXSLeLviz38sTwAwYa1EuGqErcjyq0= github.com/gethinode/mod-lottie/v2 v2.1.2/go.mod h1:9+IlgdD7WEmmrPM4OY8Uy66o86tv9MLR1lImDEiCcrw= +github.com/gethinode/mod-lottie/v3 v3.0.0 h1:gTSuMNmaN72YWeeGYkIVukZDmJnu2ROF+yYQmTN4Rk4= +github.com/gethinode/mod-lottie/v3 v3.0.0/go.mod h1:t1aH0lLklNCchd398reXJtI0kAHkf3SXjo3tqi355wg= github.com/gethinode/mod-mermaid/v3 v3.0.1 h1:h4v3QvGpSln9PDbWccSktULq9FbRZ57JN4Lp+gVjvVI= github.com/gethinode/mod-mermaid/v3 v3.0.1/go.mod h1:rbI8IKFfKVGqTY/eJnuNJwzB5kSjaEUNX0NRHc4rBfA= github.com/gethinode/mod-mermaid/v4 v4.3.0 h1:R3J0wvWaEw6WSdhBRIUjdQj3FMBGrchOmH7MPbcr1tM= @@ -102,6 +112,8 @@ github.com/gethinode/mod-mermaid/v4 v4.10.0 h1:burQHpo9KAKqEpNwAtg8D+yeTsi65uVzR github.com/gethinode/mod-mermaid/v4 v4.10.0/go.mod h1:cfx52e/H2+Dd9YJvq1EY15oc/rH0GzwEm7saj1Er1ko= github.com/gethinode/mod-mermaid/v4 v4.10.1 h1:wXAvq48rMp7p4HXg03rI18cxPfmov4LWuUkcAM03sEA= github.com/gethinode/mod-mermaid/v4 v4.10.1/go.mod h1:oZoG4GfNy3pjj7dvevrjXYjeJe86RHFaNN74z86e3V0= +github.com/gethinode/mod-mermaid/v5 v5.0.0 h1:ZKVZ5a4znJdBvzHmQdZv9dGcI3TNUdA1szB6GleBqxs= +github.com/gethinode/mod-mermaid/v5 v5.0.0/go.mod h1:UzpYEHz1txw9sDI+l7EZexHccOdPnvwP1PInT9JKdoo= github.com/gethinode/mod-simple-datatables/v3 v3.0.0 h1:E2owLogo5oY2jR0N5/7zLB+ZXGEOGtbCAUry1FNRV88= github.com/gethinode/mod-simple-datatables/v3 v3.0.0/go.mod h1:s/RUJ5mltgAiSPyg8odNLEU5TR0YzkfwwcOpRP0+3Bc= github.com/gethinode/mod-simple-datatables/v3 v3.1.0 h1:Or6tEL6X4uzFrc6QaoJtH8ox2KubQyS9nvnoL6vgIKY= @@ -110,6 +122,8 @@ github.com/gethinode/mod-simple-datatables/v3 v3.1.1 h1:hl1orzKbirGKp1b24hUUC5DU github.com/gethinode/mod-simple-datatables/v3 v3.1.1/go.mod h1:JZXXKL/NqjBb54T3xTbp0hWFAby4/nfl9kgpo0aXrJs= github.com/gethinode/mod-simple-datatables/v3 v3.1.2 h1:EiZFezmLDKBsbUkhrZqTJlFWJ6vFV+HfdWNM8h/uY6s= github.com/gethinode/mod-simple-datatables/v3 v3.1.2/go.mod h1:pUU1gcVUmNXgivo1SOFpcB3KYJhljQyfSnArROeIaZo= +github.com/gethinode/mod-simple-datatables/v4 v4.0.0 h1:Qv+i8Oz2slrAjKlngnIal02wMrSQVDh4r5fh8dkDXa8= +github.com/gethinode/mod-simple-datatables/v4 v4.0.0/go.mod h1:s/g95xKr/GUqJ90EXydgXS8YpyBxH6URj9HyMIq0VVk= github.com/gethinode/mod-utils/v5 v5.8.0 h1:HVvFX9iyV3NR3j9uQ6+F96rXr+TsKjMqzwY06XYwZE8= github.com/gethinode/mod-utils/v5 v5.8.0/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU= github.com/gethinode/mod-utils/v5 v5.9.0 h1:mceeUGOqlmybuH/Z/9UT5QEjcgWJ4SAYl5vVmM1l/0Q= @@ -158,6 +172,12 @@ github.com/gethinode/mod-utils/v5 v5.23.4 h1:/lcKi1MJ2srGfNhCPtdnTRpQgdh2FNBRUAS github.com/gethinode/mod-utils/v5 v5.23.4/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU= github.com/gethinode/mod-utils/v5 v5.24.0 h1:dqqRn6qaEehEHZjo74pxbzvVdCn++XuZk18jxeUvwwA= github.com/gethinode/mod-utils/v5 v5.24.0/go.mod h1:PwQN4oOjA6k/vet11JueJ9asZMgL0DBa3jyS9tPkBWU= +github.com/gethinode/mod-utils/v6 v6.0.1 h1:EnmMHjqnI/xyHPXFj1SdRLfVxNunJcKLGVtSAAFTQ8w= +github.com/gethinode/mod-utils/v6 v6.0.1/go.mod h1:E5tO9w3VKaidJpu1nI8zAKmh0bddFHOIIQnudAaXQTs= +github.com/gethinode/mod-utils/v6 v6.2.0 h1:fhLsznuzwwtIpEu6VFixeyj6YfnO3Tk6b5r4RGSuuNc= +github.com/gethinode/mod-utils/v6 v6.2.0/go.mod h1:E5tO9w3VKaidJpu1nI8zAKmh0bddFHOIIQnudAaXQTs= +github.com/gethinode/mod-utils/v6 v6.3.0 h1:tFF7wp58vRzM3iAjV8znNZfURSc7HAVRu45vKLV/VXY= +github.com/gethinode/mod-utils/v6 v6.3.0/go.mod h1:E5tO9w3VKaidJpu1nI8zAKmh0bddFHOIIQnudAaXQTs= github.com/nextapps-de/flexsearch v0.0.0-20250907103239-defb38b083f0 h1:55phPhe6fDjfjG0jX4+br3nLORKgjgx8abZUdI0YJRA= github.com/nextapps-de/flexsearch v0.0.0-20250907103239-defb38b083f0/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU= github.com/nextapps-de/flexsearch v0.0.0-20260529083235-f7ed963096a0 h1:QDKcU3q39lFGzdVwM6kgCGnW3ibbMfYIi0Rwl62iJpo= diff --git a/layouts/_partials/assets/card-group.html b/layouts/_partials/assets/card-group.html index ce57dbaa3..c4dfc6d45 100644 --- a/layouts/_partials/assets/card-group.html +++ b/layouts/_partials/assets/card-group.html @@ -103,7 +103,7 @@ "description" (partial "utilities/GetDescription.html" (dict "page" $element "raw" true)) "thumbnail" $thumbnail "mode" $mode - "anchor" $anchor + "anchor" (partial "utilities/OmitEmpty.html" $anchor) "icon" $element.Params.icon ) -}} {{- end -}} diff --git a/layouts/_partials/assets/card.html b/layouts/_partials/assets/card.html index 918d29e93..0b0c842eb 100644 --- a/layouts/_partials/assets/card.html +++ b/layouts/_partials/assets/card.html @@ -158,7 +158,7 @@ {{- if and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.ratio }}{{ $ratio = .Params.Thumbnail.ratio }}{{ end -}} {{ end }} {{- if not $args.icon }}{{ $icon = .Params.icon }}{{ end -}} - {{- if not $args.anchor }}{{ $anchor = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.anchor) "") }}{{ end -}} + {{- if not $args.anchor }}{{ $anchor = partial "utilities/OmitEmpty.html" (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.anchor) }}{{ end -}} {{- if not $args.mode }}{{ $mode = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.mode) false) }}{{ end -}} {{- end -}} diff --git a/layouts/_partials/assets/helpers/image-definition.html b/layouts/_partials/assets/helpers/image-definition.html index 090b5f601..2d4c0ebcf 100644 --- a/layouts/_partials/assets/helpers/image-definition.html +++ b/layouts/_partials/assets/helpers/image-definition.html @@ -86,7 +86,7 @@ + {{- if and $args.state (ne $args.state "immediate") }} {{ $args.state | safeHTMLAttr }}{{ end -}}> {{- end -}} \ No newline at end of file diff --git a/layouts/_partials/utilities/OmitEmpty.html b/layouts/_partials/utilities/OmitEmpty.html new file mode 100644 index 000000000..9815b554d --- /dev/null +++ b/layouts/_partials/utilities/OmitEmpty.html @@ -0,0 +1,27 @@ +{{/* + Copyright © 2026 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. +*/}} + +{{/* + Returns the given value unchanged when truthy, or a literal nil when falsy (empty string, + zero, false, empty slice/map). Use when forwarding a raw, unvalidated value (e.g. from + utilities/GetArgParent.html or a shortcode's own .Get) into a nested partial's + InitArgs/Args-validated dict: an unset raw value is otherwise an explicit "" (or a + zero-value), which the v6 argument engine treats as a real provided value and rejects for + select/bool/int-typed arguments, instead of as "absent" (which lets the nested partial's own + schema default apply). + + Do NOT apply this to a value already sourced from InitArgs.html/Args.html output ($args.*): + that envelope already distinguishes an explicit false/0/"" from a genuinely absent argument, + and wrapping it here would silently discard the explicit value (the exact bug class this + generation's migration removes elsewhere). +*/}} + +{{ $value := . }} +{{ if not $value }} + {{ $none := dict }} + {{ $value = $none.missing }} +{{ end }} +{{ return $value }} diff --git a/layouts/_partials/utilities/ToStringSlice.html b/layouts/_partials/utilities/ToStringSlice.html new file mode 100644 index 000000000..d64581595 --- /dev/null +++ b/layouts/_partials/utilities/ToStringSlice.html @@ -0,0 +1,25 @@ +{{/* + Copyright © 2026 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. +*/}} + +{{/* + Coerces the given slice into a genuine Go []string (round-tripping through delimit/split), + returning nil when the input is empty. Use when forwarding a Hugo-built list (e.g. from + append/complement/intersect, which yield []interface{} even when every element is a string) + into a nested partial's Args-validated dict that declares its argument with the raw reflect + type "[]string": the v6 engine matches that declaration against printf "%T" verbatim, so a + same-content-but-different-Go-type []interface{} value fails validation even though every + element is a valid string. +*/}} + +{{ $value := . }} +{{ $result := $value }} +{{ if gt (len $value) 0 }} + {{ $result = split (delimit $value ",") "," }} +{{ else }} + {{ $none := dict }} + {{ $result = $none.missing }} +{{ end }} +{{ return $result }} diff --git a/layouts/_shortcodes/card-group.html b/layouts/_shortcodes/card-group.html index 9d603b6d7..eb504d746 100644 --- a/layouts/_shortcodes/card-group.html +++ b/layouts/_shortcodes/card-group.html @@ -20,35 +20,21 @@ {{ $error = $args.err }} {{ end }} -{{/* Initialize arguments and default values */}} -{{- $cols := .Get "cols" | default "3" -}} -{{- $gutter := .Get "gutter" | default "4" -}} -{{- $title := .Get "title" | default "" -}} -{{- $separator := .Get "separator" | default "" -}} -{{- $wrapper := .Get "wrapper" | default "" -}} -{{- $responsive := .Get "responsive" | default true -}} +{{/* Arguments passed to the group and to individual cards are already validated, defaulted, and + type-cast by InitArgs.html above ($args); read them directly instead of re-deriving raw, + unvalidated locals via .Get, which cannot represent "absent" and would forward an explicit + "" to the nested partial's own validation. -{{/* Initialize arguments passed to individual cards */}} -{{- $class := .Get "class" | default "" -}} -{{- $color := .Get "color" | default "" -}} -{{- $padding := .Get "padding" | default 3 -}} -{{- $header := .Get "header-style" | default "" -}} -{{- $body := .Get "body-style" | default "" -}} -{{- $footer := .Get "footer-style" | default "" -}} -{{- $orientation := .Get "orientation" | default "" -}} -{{- $align := .Get "align" | default "start" -}} -{{- $style := .Get "icon-style" | default "" -}} -{{- $subtle := .Get "subtle" | default false -}} -{{- $button := .Get "button" | default false -}} -{{- $linkIcon := .Get "link-icon" | default false -}} -{{- $buttonType := .Get "link-type" | default "" -}} -{{- $iconRounded := .Get "icon-rounded" | default false -}} -{{- with .Get "header" }}{{- $header = . -}}{{- end -}} -{{- with .Get "footer" }}{{- $footer = . -}}{{- end -}} -{{- with .Get "style" }}{{- $style = . -}}{{- end -}} -{{- with .Get "buttonType" }}{{- $buttonType = . -}}{{- end -}} -{{- with .Get "iconRounded" }}{{- $iconRounded = . -}}{{- end -}} -{{- $scroll := .Get "scroll" | default false -}} + A handful of deprecated arguments were renamed (not just re-cased) to their canonical + counterpart (e.g. "header" -> "header-style"), so they camelize to a DIFFERENT key and + InitArgs' same-key collision resolution does not apply between them; combine them here, + canonical value first. "icon-rounded"/"iconRounded" is a same-key (re-cased) twin, already + resolved by InitArgs, so $args.iconRounded is used directly below. */}} +{{ $headerStyle := or $args.headerStyle $args.header }} +{{ $bodyStyle := or $args.bodyStyle $args.body }} +{{ $footerStyle := or $args.footerStyle $args.footer }} +{{ $iconStyle := or $args.iconStyle $args.style }} +{{ $linkType := or $args.linkType $args.buttonType }} {{ $inner := .Scratch.Get "inner" }} {{ $input := trim .Inner " \r\n" }} @@ -58,33 +44,33 @@ {{ end }} {{/* Main code */}} -{{- partial "assets/card-group.html" (dict +{{- partial "assets/card-group.html" (dict "page" .Page "cards" $inner - "cols" $cols - "gutter" $gutter - "title" $title - "separator" $separator - "wrapper" $wrapper - "responsive" $responsive - "class" $class - "color" $color - "padding" $padding - "header-style" $header - "body-style" $body - "footer-style" $footer - "orientation" $orientation - "align" $align - "icon-style" $style - "subtle" $subtle - "button" $button - "link-icon" $linkIcon - "link-type" $buttonType - "icon-rounded" $iconRounded - "scroll" $scroll + "cols" $args.cols + "gutter" $args.gutter + "title" $args.title + "separator" $args.separator + "wrapper" $args.wrapper + "responsive" $args.responsive + "class" $args.class + "color" $args.color + "padding" $args.padding + "header-style" $headerStyle + "body-style" $bodyStyle + "footer-style" $footerStyle + "orientation" $args.orientation + "align" $args.align + "icon-style" $iconStyle + "subtle" $args.subtle + "button" $args.button + "link-icon" $args.linkIcon + "link-type" $linkType + "icon-rounded" $args.iconRounded + "scroll" $args.scroll "bento" $args.bento "valign" $args.valign "loading" $args.loading "_default" $args.default - ) + ) -}} diff --git a/layouts/_shortcodes/card.html b/layouts/_shortcodes/card.html index e14e48ff6..90b3dbe76 100644 --- a/layouts/_shortcodes/card.html +++ b/layouts/_shortcodes/card.html @@ -72,37 +72,37 @@ {{/* Main code */}} {{ if not $error -}} {{/* Render card */}} - {{- $output := partial "assets/card.html" (dict + {{- $output := partial "assets/card.html" (dict "path" $path "href" $args.href "title" $title "exact" $args.exact "class" $class - "gutter" $gutter - "color" $color + "gutter" (partial "utilities/OmitEmpty.html" $gutter) + "color" (partial "utilities/OmitEmpty.html" $color) "padding" $padding - "header-style" $header - "body-style" $body - "footer-style" $footer - "orientation" $orientation + "header-style" (partial "utilities/OmitEmpty.html" $header) + "body-style" (partial "utilities/OmitEmpty.html" $body) + "footer-style" (partial "utilities/OmitEmpty.html" $footer) + "orientation" (partial "utilities/OmitEmpty.html" $orientation) "description" $description - "ratio" $ratio - "portrait" $portrait + "ratio" (partial "utilities/OmitEmpty.html" $ratio) + "portrait" (partial "utilities/OmitEmpty.html" $portrait) "icon" $icon - "icon-rounded" $iconRounded + "icon-rounded" (partial "utilities/OmitEmpty.html" $iconRounded) "align" $align "icon-style" $style - "subtle" $subtle - "scroll" $scroll + "subtle" (partial "utilities/OmitEmpty.html" $subtle) + "scroll" (partial "utilities/OmitEmpty.html" $scroll) "wrapper" $wrapper "thumbnail" $thumbnail - "loading" $loading - "anchor" $anchor + "loading" (partial "utilities/OmitEmpty.html" $loading) + "anchor" (partial "utilities/OmitEmpty.html" $anchor) "alt" $alt - "button" $button + "button" (partial "utilities/OmitEmpty.html" $button) "button-label" $args.buttonLabel - "link-icon" $linkIcon - "link-type" $linkType + "link-icon" (partial "utilities/OmitEmpty.html" $linkIcon) + "link-type" (partial "utilities/OmitEmpty.html" $linkType) "_default" $args.default ) -}} diff --git a/layouts/_shortcodes/img.html b/layouts/_shortcodes/img.html index e5ef8ef02..843dcece4 100644 --- a/layouts/_shortcodes/img.html +++ b/layouts/_shortcodes/img.html @@ -30,8 +30,8 @@ "active" (or $args.active (eq .Ordinal 0)) "src" $args.src "caption" $args.caption - "ratio" $ratio - "portrait" $portrait + "ratio" (partial "utilities/OmitEmpty.html" $ratio) + "portrait" $portrait "loading" $args.loading ) }} diff --git a/layouts/docs/all.html b/layouts/docs/all.html index 6929af14a..7da6565b9 100644 --- a/layouts/docs/all.html +++ b/layouts/docs/all.html @@ -7,7 +7,7 @@ {{/* Auto-generated sidebar for docs */}} {{- $menu := .Scratch.Get "sidebar" -}} - {{- if not (reflect.IsSlice $menu) }}{{ $menu = "" }}{{ end }} + {{- if not (reflect.IsSlice $menu) }}{{ $none := dict }}{{ $menu = $none.missing }}{{ end }} {{- $version := .Scratch.Get "version" -}} {{- $sidebar := partial "assets/sidebar.html" (dict "page" . "menu" $menu "version" $version "auto-generate" true) -}}