Compare commits

...

19 Commits

Author SHA1 Message Date
Mark Dumay
fb63e36c56 Merge pull request #1484 from gethinode/develop
Fix kbd rendering
2025-07-01 11:42:27 +02:00
Mark Dumay
ae1cda1f5a Merge branch 'main' into develop 2025-07-01 11:36:04 +02:00
Mark Dumay
4846d1b016 Bump package release 2025-07-01 11:35:04 +02:00
Mark Dumay
01522dad71 Update build stats 2025-07-01 11:34:38 +02:00
Mark Dumay
0bbef1dad2 FIx kbd rendering 2025-07-01 11:34:29 +02:00
Mark Dumay
5e048d32df Merge pull request #1482 from gethinode/develop
Fix rendering of nav items
2025-06-30 08:42:44 +02:00
Mark Dumay
d1128fa7c3 Merge branch 'main' into develop 2025-06-30 08:00:43 +02:00
Mark Dumay
cf9a39b51f Fix rendering of nav items 2025-06-30 08:00:04 +02:00
Mark Dumay
ae9ec71966 Update dependencies 2025-06-29 13:35:27 +02:00
Mark Dumay
f6c4bbfffb Merge pull request #1481 from gethinode/develop
Enable explicit auto ratio for images
2025-06-29 13:24:07 +02:00
Mark Dumay
7a655315f1 Merge branch 'main' into develop 2025-06-29 13:19:12 +02:00
Mark Dumay
5c27178881 Enable explicit auto ratio for images 2025-06-29 13:18:43 +02:00
Mark Dumay
c829049842 Merge pull request #1480 from gethinode/develop
Fix starter template
2025-06-29 13:14:02 +02:00
Mark Dumay
613da916aa Merge branch 'main' into develop 2025-06-29 13:07:13 +02:00
Mark Dumay
d3d75c9dc6 Fix starter template 2025-06-29 13:05:52 +02:00
Mark Dumay
2f5b49397e Merge pull request #1479 from gethinode/develop
Fix justification of section title
2025-06-29 13:04:54 +02:00
Mark Dumay
632f3d861b Merge branch 'main' into develop 2025-06-29 12:56:11 +02:00
Mark Dumay
004063f02a Refine content blocks page 2025-06-29 12:34:48 +02:00
Mark Dumay
1bd498f816 Fix justification of section title 2025-06-29 12:34:36 +02:00
29 changed files with 153 additions and 118 deletions

View File

@@ -1,14 +1,8 @@
.nav-tabs .nav-tabs { .nav-tabs {
border: none; border: none !important;
} }
.nav-tabs .nav-link.active { .nav-callout, .tab-content {
border-bottom-color: var(--bs-body-bg) !important;
border-bottom-style: solid !important;
z-index: 1;
}
.nav-callout {
--#{$prefix}nav-callout-bg: var(--#{$prefix}light); --#{$prefix}nav-callout-bg: var(--#{$prefix}light);
--#{$prefix}nav-callout-active-bg: var(--bs-primary-bg-subtle); --#{$prefix}nav-callout-active-bg: var(--bs-primary-bg-subtle);
--#{$prefix}nav-callout-gap: #{$nav-underline-gap}; --#{$prefix}nav-callout-gap: #{$nav-underline-gap};
@@ -92,7 +86,7 @@
@if $enable-dark-mode { @if $enable-dark-mode {
@include color-mode(dark) { @include color-mode(dark) {
.nav-callout { .nav-callout, .tab-content {
--#{$prefix}nav-callout-bg: var(--#{$prefix}tertiary-bg); --#{$prefix}nav-callout-bg: var(--#{$prefix}tertiary-bg);
} }

View File

@@ -21,7 +21,7 @@
{{ partial "assets/hero.html" (dict {{ partial "assets/hero.html" (dict
"heading" $args.heading "heading" $args.heading
"background" $args.background "background" $args.background
"illustration" (merge (dict "ratio" "1x1") $args.illustration) "illustration" (merge (dict "ratio" "auto") $args.illustration)
"order" $args.order "order" $args.order
"link-type" $args.linkType "link-type" $args.linkType
"links" $args.links "links" $args.links

View File

@@ -62,7 +62,7 @@
<!-- Main code --> <!-- Main code -->
{{ if not $error }} {{ if not $error }}
{{- partial "assets/section-title.html" (dict "heading" $args.heading) -}} {{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
{{ $partial := "assets/card-group.html" }} {{ $partial := "assets/card-group.html" }}
{{ $params := dict }} {{ $params := dict }}

View File

@@ -35,7 +35,7 @@
{{ end}} {{ end}}
{{ if not $error }} {{ if not $error }}
{{- partial "assets/section-title.html" (dict "heading" $args.heading) -}} {{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
{{- partial "assets/card-group.html" (dict {{- partial "assets/card-group.html" (dict
"page" page "page" page

View File

@@ -19,7 +19,7 @@
{{ if not $args.err }} {{ if not $args.err }}
{{ $color := "" }} {{ $color := "" }}
{{ if $args.contrast }}{{ $color = "white" }}{{ end }} {{ if $args.contrast }}{{ $color = "white" }}{{ end }}
{{- partial "assets/section-title.html" (dict "heading" $args.heading "color" $color) -}} {{- partial "assets/section-title.html" (dict "heading" $args.heading "color" $color "justify" $args.justify) -}}
{{ $class := "" }} {{ $class := "" }}
{{ $id := printf "faq-%s" (md5 (delimit (slice . now) "-")) }} {{ $id := printf "faq-%s" (md5 (delimit (slice . now) "-")) }}

View File

@@ -96,7 +96,7 @@
) }} ) }}
{{ end}} {{ end}}
{{- partial "assets/section-title.html" (dict "heading" $args.heading) -}} {{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
{{ if eq $args.orientation "stacked" }} {{ if eq $args.orientation "stacked" }}
<div class="col-{{ $breakpoint.current }}-{{ $args.width }} mx-auto pb-{{ $padding.y }}"> <div class="col-{{ $breakpoint.current }}-{{ $args.width }} mx-auto pb-{{ $padding.y }}">

View File

@@ -7,7 +7,7 @@ content_blocks:
title: Welcome to Hinode! title: Welcome to Hinode!
content: |- content: |-
A clean documentation and blog theme for your Hugo site based on Bootstrap 5. A clean documentation and blog theme for your Hugo site based on Bootstrap 5.
align: start width: 6
background: background:
color: primary color: primary
subtle: true subtle: true
@@ -15,10 +15,10 @@ content_blocks:
image: /img/sunrise.jpg image: /img/sunrise.jpg
ratio: 16x9 ratio: 16x9
width: 8 width: 8
width: 6
links: links:
- title: Get started - title: About
url: https://gethinode.com/docs url: about
icon: fas book-open icon: fas chevron-right
orientation: horizontal orientation: horizontal
justify: center
--- ---

View File

@@ -7,8 +7,12 @@ arguments:
group: partial group: partial
list: list:
group: partial group: partial
nav-disabled:
release: v1.0.0
nav-items: nav-items:
release: v1.0.0 release: v1.0.0
nav-show:
release: v1.0.0
nav-titles: nav-titles:
release: v1.0.0 release: v1.0.0
tab-type: tab-type:

View File

@@ -9,3 +9,4 @@ arguments:
optional: false optional: false
background: background:
class: class:
justify:

View File

@@ -6,18 +6,17 @@ content_blocks:
- _bookshop_name: hero - _bookshop_name: hero
heading: heading:
title: Content blocks title: Content blocks
align: start
breadcrumb: true
- _bookshop_name: articles
heading:
content: >- content: >-
Hinode uses [Bookshop](https://github.com/CloudCannon/bookshop) to Hinode uses [Bookshop](https://github.com/CloudCannon/bookshop) to
support so-called content blocks. Content blocks are reusable page support so-called content blocks. Content blocks are reusable page
elements, such as a hero, about panel, or an FAQ. Hinode includes elements, such as a hero, about panel, or an FAQ. Hinode includes
several ready-to-use blocks. Click on a card for more details about several ready-to-use blocks. Click on a card for more details about
a content block, including its frontmatter configuration. a content block, including its frontmatter configuration.
align: start
width: 8 width: 8
breadcrumb: true
- _bookshop_name: articles
hide-empty: false hide-empty: false
input: input:
section: blocks section: blocks

View File

@@ -25,6 +25,7 @@ The `about` content block renders a short message next to an illustration. You c
subtle: true subtle: true
illustration: illustration:
image: /assets/img/nat-9l98kFByiao-unsplash.jpg image: /assets/img/nat-9l98kFByiao-unsplash.jpg
ratio: 1x1
link-type: link link-type: link
links: links:
- title: First link - title: First link

View File

@@ -362,14 +362,14 @@ As an example, the following shortcode displays a tab group with vertically alig
<!-- markdownlint-disable MD037 --> <!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}} {{< example lang="hugo" >}}
{{</* nav tab-type="pills" vertical="true" */>}} {{</* nav tab-type="pills" vertical="true" */>}}
{{</* nav-item title="Nav Item #1" show="true" */>}} {{</* nav-item title="Nav Item #1" */>}}
This is the first item's nav body. It supports Markdown content. This is the first item's nav body. It supports Markdown content.
The item is shown by adding the value `show` to the `class` argument. The item is shown by adding the value `show` to the `class` argument.
{{</* /nav-item */>}} {{</* /nav-item */>}}
{{</* nav-item title="Nav Item #2" */>}} {{</* nav-item title="Nav Item #2" show="true" */>}}
This is the second item's nav body. This is the second item's nav body.
{{</* /nav-item */>}} {{</* /nav-item */>}}
{{</* nav-item title="Nav Item #3" */>}} {{</* nav-item title="Nav Item #3" disabled="true" */>}}
This is the third item's nav body. This is the third item's nav body.
{{</* /nav-item */>}} {{</* /nav-item */>}}
{{</* /nav */>}} {{</* /nav */>}}

View File

@@ -207,6 +207,7 @@
"d-sm-block", "d-sm-block",
"d-sm-none", "d-sm-none",
"data-table", "data-table",
"disabled",
"display-1", "display-1",
"display-4", "display-4",
"dropdown", "dropdown",
@@ -614,11 +615,26 @@
"fab-medium", "fab-medium",
"fab-whatsapp", "fab-whatsapp",
"fab-x-twitter", "fab-x-twitter",
"faq-f38add4e4b48c1c030c4b64eb31efe8f", "faq-50c692e264c634586e8c4ecaa233a9fe",
"faq-f38add4e4b48c1c030c4b64eb31efe8f-heading-faq-f38add4e4b48c1c030c4b64eb31efe8f", "faq-50c692e264c634586e8c4ecaa233a9fe-heading-faq-50c692e264c634586e8c4ecaa233a9fe",
"faq-f38add4e4b48c1c030c4b64eb31efe8f-item-0", "faq-50c692e264c634586e8c4ecaa233a9fe-item-0",
"faq-f38add4e4b48c1c030c4b64eb31efe8f-item-1", "faq-50c692e264c634586e8c4ecaa233a9fe-item-1",
"faq-f38add4e4b48c1c030c4b64eb31efe8f-item-2", "faq-50c692e264c634586e8c4ecaa233a9fe-item-2",
"faq-6970cc0aa1c2d2d4c1359a93d3193646",
"faq-6970cc0aa1c2d2d4c1359a93d3193646-heading-faq-6970cc0aa1c2d2d4c1359a93d3193646",
"faq-6970cc0aa1c2d2d4c1359a93d3193646-item-0",
"faq-6970cc0aa1c2d2d4c1359a93d3193646-item-1",
"faq-6970cc0aa1c2d2d4c1359a93d3193646-item-2",
"faq-85f9e7e957de15130b6401c39140dad6",
"faq-85f9e7e957de15130b6401c39140dad6-heading-faq-85f9e7e957de15130b6401c39140dad6",
"faq-85f9e7e957de15130b6401c39140dad6-item-0",
"faq-85f9e7e957de15130b6401c39140dad6-item-1",
"faq-85f9e7e957de15130b6401c39140dad6-item-2",
"faq-d5c6be23853321daeaf421994a4c5937",
"faq-d5c6be23853321daeaf421994a4c5937-heading-faq-d5c6be23853321daeaf421994a4c5937",
"faq-d5c6be23853321daeaf421994a4c5937-item-0",
"faq-d5c6be23853321daeaf421994a4c5937-item-1",
"faq-d5c6be23853321daeaf421994a4c5937-item-2",
"fas-1", "fas-1",
"fas-2", "fas-2",
"fas-3", "fas-3",
@@ -698,10 +714,10 @@
"nav-0-0", "nav-0-0",
"nav-0-1", "nav-0-1",
"nav-0-2", "nav-0-2",
"nav-0-btn-0",
"nav-0-btn-1",
"nav-0-btn-2",
"nav-nav-0", "nav-nav-0",
"nav-nav-0-btn-0",
"nav-nav-0-btn-1",
"nav-nav-0-btn-2",
"navbar", "navbar",
"navbar-0-collapse", "navbar-0-collapse",
"navbar-mode", "navbar-mode",

2
go.mod
View File

@@ -18,7 +18,7 @@ require (
github.com/gethinode/mod-simple-datatables v1.1.7 // indirect github.com/gethinode/mod-simple-datatables v1.1.7 // indirect
github.com/gethinode/mod-simple-datatables/v2 v2.0.1 // indirect github.com/gethinode/mod-simple-datatables/v2 v2.0.1 // indirect
github.com/gethinode/mod-utils/v3 v3.3.1 // indirect github.com/gethinode/mod-utils/v3 v3.3.1 // indirect
github.com/gethinode/mod-utils/v4 v4.8.0 // indirect github.com/gethinode/mod-utils/v4 v4.8.4 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a // indirect github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a // indirect
github.com/twbs/bootstrap v5.3.7+incompatible // indirect github.com/twbs/bootstrap v5.3.7+incompatible // indirect
) )

8
go.sum
View File

@@ -444,6 +444,14 @@ github.com/gethinode/mod-utils/v4 v4.7.0 h1:JaL/+APOwdEzAi6y174ZdwoguCdALyGiGX8q
github.com/gethinode/mod-utils/v4 v4.7.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4= github.com/gethinode/mod-utils/v4 v4.7.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.8.0 h1:/+M3EHqA8IzgBWXX1GLmT/xKbk2FVhUwmUfMnk/goF4= github.com/gethinode/mod-utils/v4 v4.8.0 h1:/+M3EHqA8IzgBWXX1GLmT/xKbk2FVhUwmUfMnk/goF4=
github.com/gethinode/mod-utils/v4 v4.8.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4= github.com/gethinode/mod-utils/v4 v4.8.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.8.1 h1:XJULrx5VWO4wR69EsvfPp9bQoRvx8Y7GwnknpDbrDpg=
github.com/gethinode/mod-utils/v4 v4.8.1/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.8.2 h1:mhPmqdeCar2sOdVwKIyJl5la0RVBPtw4d29ncRKN3ek=
github.com/gethinode/mod-utils/v4 v4.8.2/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.8.3 h1:CSaFR/c1cGrSPpH5ZfrNOoMhAbNb8sw0SCRh9ZxCJTU=
github.com/gethinode/mod-utils/v4 v4.8.3/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.8.4 h1:ExD2zZCGonAmbIxC9wBU2dp+V4ZfvG46NWaz+LaV3iQ=
github.com/gethinode/mod-utils/v4 v4.8.4/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 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-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg= github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=

View File

@@ -33,7 +33,6 @@
"classes": [ "classes": [
"active", "active",
"align-items-center", "align-items-center",
"align-items-start",
"align-self-center", "align-self-center",
"align-self-end", "align-self-end",
"ball", "ball",
@@ -53,8 +52,6 @@
"col-12", "col-12",
"col-6", "col-6",
"col-8", "col-8",
"col-md-1",
"col-md-11",
"col-md-2", "col-md-2",
"col-md-6", "col-md-6",
"col-md-8", "col-md-8",
@@ -78,7 +75,7 @@
"fa-10x", "fa-10x",
"fa-2x", "fa-2x",
"fa-angle-left", "fa-angle-left",
"fa-book-open", "fa-chevron-right",
"fa-ellipsis", "fa-ellipsis",
"fa-face-frown", "fa-face-frown",
"fa-fw", "fa-fw",
@@ -174,10 +171,10 @@
"section-cover", "section-cover",
"shadow", "shadow",
"svg-inline--fa", "svg-inline--fa",
"text-",
"text-body", "text-body",
"text-center", "text-center",
"text-decoration-none", "text-decoration-none",
"text-md-start",
"text-muted", "text-muted",
"text-secondary", "text-secondary",
"text-sm-start", "text-sm-start",
@@ -196,7 +193,7 @@
"fab-linkedin", "fab-linkedin",
"fab-medium", "fab-medium",
"fas-angle-left", "fas-angle-left",
"fas-book-open", "fas-chevron-right",
"fas-ellipsis", "fas-ellipsis",
"fas-moon", "fas-moon",
"fas-sun", "fas-sun",

View File

@@ -179,7 +179,7 @@
{{ if eq (lower (path.Ext $thumbnail)) ".svg" }}{{ $fullHeight = "" }}{{ $rounding = "" }}{{ end }} {{ if eq (lower (path.Ext $thumbnail)) ".svg" }}{{ $fullHeight = "" }}{{ $rounding = "" }}{{ end }}
{{- partial $args.hook (dict {{- partial $args.hook (dict
"src" $thumbnail "src" $thumbnail
"ratio" (or $ratio "1x1") "ratio" (or $ratio "auto")
"portrait" $args.portrait "portrait" $args.portrait
"sizes" $args.sizes "sizes" $args.sizes
"anchor" $anchor "anchor" $anchor

View File

@@ -83,7 +83,7 @@
{{ else }} {{ else }}
{{ warnf "Unsupported media type '%s': %q" (string $res.MediaType) $src -}} {{ warnf "Unsupported media type '%s': %q" (string $res.MediaType) $src -}}
{{ end }} {{ end }}
{{ else if $args.ratio }} {{ else if and $args.ratio (ne $args.ratio "auto") }}
{{ $transform = "fill" }} {{ $transform = "fill" }}
{{ $dims = partial "assets/helpers/GetDimension.html" (dict "ratio" $args.ratio) }} {{ $dims = partial "assets/helpers/GetDimension.html" (dict "ratio" $args.ratio) }}
{{ if not $dims }}{{ errorf "partial [assets/image.html] - Cannot find dimension data: %s" $args.ratio }}{{ end }} {{ if not $dims }}{{ errorf "partial [assets/image.html] - Cannot find dimension data: %s" $args.ratio }}{{ end }}

View File

@@ -101,6 +101,7 @@
"link-type" (or $args.linkType $args.type) "link-type" (or $args.linkType $args.type)
"class" "hero-title" "class" "hero-title"
"arrangement" $arrangement "arrangement" $arrangement
"justify" $args.justify
) }} ) }}
{{ if eq $args.orientation "stacked" }} {{ if eq $args.orientation "stacked" }}

View File

@@ -6,16 +6,16 @@
*/}} */}}
{{/* Initialize arguments */}} {{/* Initialize arguments */}}
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "nav-item" "args" . "group" "partial") }} {{- $args := partial "utilities/InitArgs.html" (dict "structure" "nav-item" "args" . "group" "partial") -}}
{{ if or $args.err $args.warnmsg }} {{- if or $args.err $args.warnmsg -}}
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict {{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
"partial" "assets/nav-item.html" "partial" "assets/nav-item.html"
"warnid" "warn-invalid-arguments" "warnid" "warn-invalid-arguments"
"msg" "Invalid arguments" "msg" "Invalid arguments"
"details" ($args.errmsg | append $args.warnmsg) "details" ($args.errmsg | append $args.warnmsg)
"file" page.File "file" page.File
)}} ) -}}
{{ end }} {{- end -}}
{{/* Initialize local arguments */}} {{/* Initialize local arguments */}}
{{- $parentID := or $args.parentId $args.parentID -}} {{- $parentID := or $args.parentId $args.parentID -}}
@@ -36,13 +36,13 @@
"class" "hero-image" "class" "hero-image"
"image-overlay" $args.imageOverlay "image-overlay" $args.imageOverlay
) }} ) }}
{{ else }} {{- else -}}
{{ $illustration = partial $args.hook (dict "page" $args.page "image" $args.illustration) }} {{- $illustration = partial $args.hook (dict "page" $args.page "image" $args.illustration) -}}
{{ end }} {{- end -}}
{{/* Main code */}} {{/* Main code */}}
{{ if not $args.err }} {{- if not $args.err -}}
{{ if eq $type "accordion" }} {{- if eq $type "accordion" -}}
<div class="accordion-item{{ if $args.show }} show{{ end }}{{ with $args.class }} {{ . }}{{ end }}"> <div class="accordion-item{{ if $args.show }} show{{ end }}{{ with $args.class }} {{ . }}{{ end }}">
{{- with $title -}} {{- with $title -}}
<h2 id="accordion-{{ $parentID }}-heading-{{ $args.id }}" class="accordion-header m-0"> <h2 id="accordion-{{ $parentID }}-heading-{{ $args.id }}" class="accordion-header m-0">
@@ -55,14 +55,14 @@
aria-controls="accordion-{{ $parentID }}-item-{{ $args.id }}" aria-controls="accordion-{{ $parentID }}-item-{{ $args.id }}"
{{ if $args.disabled }} disabled{{ end }} {{ if $args.disabled }} disabled{{ end }}
> >
{{ if $illustration }} {{- if $illustration -}}
<div class="row"> <div class="row">
<div class="col-3 col-sm-2 my-auto">{{ $illustration | safeHTML }}</div> <div class="col-3 col-sm-2 my-auto">{{ $illustration | safeHTML }}</div>
<div class="col-9 col-sm-10 fs-6 fs-sm-5 my-auto">{{ . }}</div> <div class="col-9 col-sm-10 fs-6 fs-sm-5 my-auto">{{ . }}</div>
</div> </div>
{{ else }} {{- else }}
{{ . }} {{ . }}
{{ end }} {{ end -}}
</button> </button>
</h2> </h2>
{{- end -}} {{- end -}}
@@ -75,19 +75,16 @@
<div class="accordion-body">{{ $args.body | $args.page.RenderString | safeHTML }}</div> <div class="accordion-body">{{ $args.body | $args.page.RenderString | safeHTML }}</div>
</div> </div>
</div> </div>
{{ else }} {{- else -}}
<div <div
id="{{ $parentID }}-{{ $args.id }}" id="{{ $parentID }}-{{ $args.id }}"
class="tab-pane{{ if $args.show }} active{{ if $args.fade }} show{{ end }}{{ end }}{{ if $args.fade }} fade{{ end }}{{ with $args.class }} {{ . }}{{ end }}" class="tab-pane{{ if $args.show }} active{{ if $args.fade }} show{{ end }}{{ end }}{{ if $args.fade }} fade{{ end }}{{ with $args.class }} {{ . }}{{ end }}"
role="tabpanel" role="tabpanel"
aria-labelledby="{{ $parentID }}-btn-{{ $args.id }}" aria-labelledby="{{ $parentID }}-btn-{{ $args.id }}"
tabindex="0" tabindex="0"
data-header="{{ $title }}"
{{ if $args.show }}data-show-id="{{ $args.id }}"{{ end }}
data-has-content="{{ gt (len $args.body) 0 }}" data-has-content="{{ gt (len $args.body) 0 }}"
{{ if $args.disabled }} data-disabled-id="{{ $args.id }}"{{ end }}
> >
{{ $args.body | $args.page.RenderString | safeHTML }} {{ $args.body | $args.page.RenderString | safeHTML }}
</div> </div>
{{ end }} {{- end -}}
{{ end }} {{- end -}}

View File

@@ -42,7 +42,7 @@
"class" $args.class "class" $args.class
"body" (or $item.Description $item.Content) "body" (or $item.Description $item.Content)
"show" false "show" false
"disabled" false "disabled" $item.disabled
"item_type" "accordion" "item_type" "accordion"
"illustration" (partial "utilities/GetIllustration.html" (dict "item" $item "size" "col-12")) "illustration" (partial "utilities/GetIllustration.html" (dict "item" $item "size" "col-12"))
) )
@@ -64,11 +64,14 @@
{{- range $args.list }}{{ $titles = $titles | append .Title }} {{ end -}} {{- range $args.list }}{{ $titles = $titles | append .Title }} {{ end -}}
{{- if reflect.IsSlice $args.navTitles }}{{ $titles = $titles | append $args.navTitles }}{{ end -}} {{- if reflect.IsSlice $args.navTitles }}{{ $titles = $titles | append $args.navTitles }}{{ end -}}
{{- range $index, $item := $titles -}} {{- range $index, $item := $titles -}}
{{ $show := eq $index 0}} {{ $itemID := printf "%s-btn-%d" $args.id $index -}}
{{- $show := eq $index 0 -}}
{{- if $args.navShow }}{{ $show = eq $args.navShow $itemID }}{{ end -}}
{{- $disabled := in $args.navDisabled $itemID -}}
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button <button
class="nav-link {{ if not $wrap }} text-nowrap{{ end }}{{ if $show }} active{{ end }}" class="nav-link{{ if not $wrap }} text-nowrap{{ end }}{{ if $show }} active{{ end }}{{ if $disabled }} disabled{{ end }}"
id="nav-{{ $id }}-btn-{{ $index }}" id="{{ $itemID }}"
data-bs-toggle="pill" data-bs-toggle="pill"
data-bs-target="#{{ $id }}-{{ $index }}" data-bs-target="#{{ $id }}-{{ $index }}"
type="button" type="button"
@@ -82,7 +85,7 @@
{{ end -}} {{ end -}}
</ul> </ul>
<div class="tab-content {{ if eq $type "tabs" }}border border-bottom-0 p-3{{ else if $args.vertical }}ms-3{{ else }}mt-3{{ end }}"> <div class="tab-content {{ if eq $type "tabs" }}border p-3{{ else if $args.vertical }}ms-3{{ else }}mt-3{{ end }}">
{{- range $index, $item := $args.list -}} {{- range $index, $item := $args.list -}}
{{- $header := $item.Title -}} {{- $header := $item.Title -}}
{-{ $body := $item.Content -}} {-{ $body := $item.Content -}}

View File

@@ -26,8 +26,9 @@
{{- $preheading := $args.heading.preheading }} {{- $preheading := $args.heading.preheading }}
{{- $title := $args.heading.title }} {{- $title := $args.heading.title }}
{{- $width := $args.heading.width | default 12 -}} {{- $width := $args.heading.width | default 12 -}}
{{- $width = cond (lt $width 12) (printf "col-12 col-%s-%d" $breakpoint.current $width) "" }}
{{ if and (not $preheading) $args.useSection }}{{ $preheading = page.CurrentSection.Name }}{{ end }} {{ if and (not $preheading) $args.useSection }}{{ $preheading = page.CurrentSection.Name }}{{ end }}
{{ $justify := cond (eq $args.justify "start") "" (cond (eq $args.justify "end") "me-0" "mx-auto") }}
{{ if site.Params.main.titleCase }} {{ if site.Params.main.titleCase }}
{{ $preheading = title $preheading }} {{ $preheading = title $preheading }}
@@ -85,7 +86,7 @@
}} }}
<!-- Main code --> <!-- Main code -->
<div class="text-{{ $args.heading.align }}{{ with $args.class }} {{ . }}{{ end }}{{ if lt $width 12 }} col-12 col-{{ $breakpoint.current }}-{{ $width }}{{ end }} py-{{ $padding.y }}"> <div class="text-{{ $args.heading.align }}{{ with $justify }} {{ . }}{{ end }}{{ with $args.class }} {{ . }}{{ end }}{{ with $width }} {{ . }}{{ end }} py-{{ $padding.y }}">
{{ if and $preheading (eq $arrangement "first") }} {{ if and $preheading (eq $arrangement "first") }}
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">

View File

@@ -104,6 +104,7 @@
"links" $args.links "links" $args.links
"link-type" (or $args.linkType $args.type) "link-type" (or $args.linkType $args.type)
"arrangement" $arrangement "arrangement" $arrangement
"justify" $args.justify
) }} ) }}
{{ end }} {{ end }}

View File

@@ -39,6 +39,7 @@
"breadcrumb" $breadcrumb "breadcrumb" $breadcrumb
"background" (dict "backdrop" $page.Site.Params.modules.bookshop.hero.backdrop) "background" (dict "backdrop" $page.Site.Params.modules.bookshop.hero.backdrop)
"overlay-mode" $page.Site.Params.modules.bookshop.hero.overlayMode "overlay-mode" $page.Site.Params.modules.bookshop.hero.overlayMode
"justify" "start"
)}} )}}
{{ if eq $page.Kind "section" }} {{ if eq $page.Kind "section" }}
@@ -50,6 +51,7 @@
"padding" "0" "padding" "0"
"paginate" true "paginate" true
"scroll" false "scroll" false
"justify" "start"
)}} )}}
{{ end }} {{ end }}

View File

@@ -21,7 +21,7 @@
{{- end -}} {{- end -}}
{{/* Initialize local arguments */}} {{/* Initialize local arguments */}}
{{- $text := or $args.text $args.title }} {{- $text := trim (or $args.text $args.title) " \n\r" }}
{{- if not $text -}} {{- if not $text -}}
{{- partial "utilities/LogErr.html" (dict {{- partial "utilities/LogErr.html" (dict
"partial" "shortcodes/kbd.html" "partial" "shortcodes/kbd.html"
@@ -36,6 +36,6 @@
{{/* Main code */}} {{/* Main code */}}
{{- if not $error }} {{- if not $error }}
<kbd {{ if or $args.color $args.class }}class="{{ with $args.color }}text-bg-{{ . }} {{ end }}{{ $args.class }}"{{ end }}> <kbd {{ if or $args.color $args.class }}class="{{ with $args.color }}text-bg-{{ . }} {{ end }}{{ $args.class }}"{{ end }}>
{{ $text | plainify }} {{- $text -}}
</kbd> </kbd>
{{ end -}} {{ end -}}

View File

@@ -30,6 +30,8 @@
{{- if isset .Parent.Params "fade" }}{{ $parentFade = partial "utilities/CastBool.html" (.Parent.Get "fade") }}{{ end -}} {{- if isset .Parent.Params "fade" }}{{ $parentFade = partial "utilities/CastBool.html" (.Parent.Get "fade") }}{{ end -}}
{{- $fade = or $fade $parentFade -}} {{- $fade = or $fade $parentFade -}}
{{- $title := or $args.title $args.header -}} {{- $title := or $args.title $args.header -}}
{{- $itemID := printf "%s-btn-%d" $parent $id }}
{{- $disabledID := cond $args.disabled $itemID "" }}
{{- $body := trim .Inner " \r\n" -}} {{- $body := trim .Inner " \r\n" -}}
{{- $current := "" -}} {{- $current := "" -}}
@@ -49,15 +51,19 @@
{{- $current := .Parent.Scratch.Get "inner" -}} {{- $current := .Parent.Scratch.Get "inner" -}}
{{- $titles := .Parent.Scratch.Get "inner-title" -}} {{- $titles := .Parent.Scratch.Get "inner-title" -}}
{{- $disabled := .Parent.Scratch.Get "inner-disabled" -}}
{{- if $args.show }}{{ .Parent.Scratch.Set "inner-show" $itemID }}{{ end -}}
{{- if $current -}} {{- if $current -}}
{{- .Parent.Scratch.Set "inner" (print $current $output) -}} {{- .Parent.Scratch.Set "inner" (print $current $output) -}}
{{- .Parent.Scratch.Set "inner-title" ($titles | append $title) -}} {{- .Parent.Scratch.Set "inner-title" ($titles | append $title) -}}
{{- .Parent.Scratch.Set "inner-disabled" ($disabled | append $disabledID) -}}
{{- else -}} {{- else -}}
{{- .Parent.Scratch.Set "inner" $output -}} {{- .Parent.Scratch.Set "inner" $output -}}
{{- .Parent.Scratch.Set "inner-title" (slice $title) -}} {{- .Parent.Scratch.Set "inner-title" (slice $title) -}}
{{- .Parent.Scratch.Set "inner-disabled" (slice $disabledID) -}}
{{- end }} {{- end }}
{{- $alternative := partial "assets/nav-item" (dict {{- $alternative := partial "assets/nav-item.html" (dict
"page" .Page "page" .Page
"id" $id "id" $id
"parent-id" $parent "parent-id" $parent

View File

@@ -19,6 +19,8 @@
{{- $inner := .Scratch.Get "inner" -}} {{- $inner := .Scratch.Get "inner" -}}
{{- $innerTitles := .Scratch.Get "inner-title" -}} {{- $innerTitles := .Scratch.Get "inner-title" -}}
{{- $innerDisabled := .Scratch.Get "inner-disabled" -}}
{{- $innerShow := .Scratch.Get "inner-show" -}}
{{- $input := trim .Inner " \r\n" -}} {{- $input := trim .Inner " \r\n" -}}
{{- if $input -}} {{- if $input -}}
{{- $input = replace $input "\n" "\n " -}} {{- $input = replace $input "\n" "\n " -}}
@@ -33,6 +35,8 @@
"list" $args.list "list" $args.list
"nav-items" $inner "nav-items" $inner
"nav-titles" $innerTitles "nav-titles" $innerTitles
"nav-disabled" $innerDisabled
"nav-show" $innerShow
"tab-type" (or $args.tabType $args.type) "tab-type" (or $args.tabType $args.type)
"vertical" $args.vertical "vertical" $args.vertical
"word-wrap" $args.wordWrap "word-wrap" $args.wordWrap

36
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "1.0.0-beta5", "version": "1.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "1.0.0-beta5", "version": "1.0.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@fullhuman/postcss-purgecss": "^7.0.2", "@fullhuman/postcss-purgecss": "^7.0.2",
@@ -19,7 +19,7 @@
"devDependencies": { "devDependencies": {
"@gethinode/netlify-plugin-dartsass": "^0.3.0", "@gethinode/netlify-plugin-dartsass": "^0.3.0",
"cpy-cli": "^5.0.0", "cpy-cli": "^5.0.0",
"eslint": "^9.29.0", "eslint": "^9.30.0",
"markdownlint-cli2": "^0.18.1", "markdownlint-cli2": "^0.18.1",
"neostandard": "^0.12.1", "neostandard": "^0.12.1",
"netlify-plugin-hugo-cache-resources": "^0.2.1", "netlify-plugin-hugo-cache-resources": "^0.2.1",
@@ -329,9 +329,9 @@
} }
}, },
"node_modules/@eslint/config-array": { "node_modules/@eslint/config-array": {
"version": "0.20.1", "version": "0.21.0",
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.1.tgz", "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz",
"integrity": "sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==", "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
@@ -344,9 +344,9 @@
} }
}, },
"node_modules/@eslint/config-helpers": { "node_modules/@eslint/config-helpers": {
"version": "0.2.1", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.1.tgz", "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz",
"integrity": "sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==", "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"engines": { "engines": {
@@ -391,9 +391,9 @@
} }
}, },
"node_modules/@eslint/js": { "node_modules/@eslint/js": {
"version": "9.29.0", "version": "9.30.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.0.tgz",
"integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", "integrity": "sha512-Wzw3wQwPvc9sHM+NjakWTcPx11mbZyiYHuwWa/QfZ7cIRX7WK54PSk7bdyXDaoaopUcMatv1zaQvOAAO8hCdww==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -2875,19 +2875,19 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "9.29.0", "version": "9.30.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.29.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.30.0.tgz",
"integrity": "sha512-GsGizj2Y1rCWDu6XoEekL3RLilp0voSePurjZIkxL3wlm5o5EC9VpgaP7lrCvjnkuLvzFBQWB3vWB3K5KQTveQ==", "integrity": "sha512-iN/SiPxmQu6EVkf+m1qpBxzUhE12YqFLOSySuOyVLJLEF9nzTf+h/1AJYc1JWzCnktggeNrjvQGLngDzXirU6g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.12.1", "@eslint-community/regexpp": "^4.12.1",
"@eslint/config-array": "^0.20.1", "@eslint/config-array": "^0.21.0",
"@eslint/config-helpers": "^0.2.1", "@eslint/config-helpers": "^0.3.0",
"@eslint/core": "^0.14.0", "@eslint/core": "^0.14.0",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "9.29.0", "@eslint/js": "9.30.0",
"@eslint/plugin-kit": "^0.3.1", "@eslint/plugin-kit": "^0.3.1",
"@humanfs/node": "^0.16.6", "@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/module-importer": "^1.0.1",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "1.0.0-beta5", "version": "1.0.0",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator", "description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [ "keywords": [
"hugo", "hugo",
@@ -79,7 +79,7 @@
"devDependencies": { "devDependencies": {
"@gethinode/netlify-plugin-dartsass": "^0.3.0", "@gethinode/netlify-plugin-dartsass": "^0.3.0",
"cpy-cli": "^5.0.0", "cpy-cli": "^5.0.0",
"eslint": "^9.29.0", "eslint": "^9.30.0",
"markdownlint-cli2": "^0.18.1", "markdownlint-cli2": "^0.18.1",
"neostandard": "^0.12.1", "neostandard": "^0.12.1",
"netlify-plugin-hugo-cache-resources": "^0.2.1", "netlify-plugin-hugo-cache-resources": "^0.2.1",