Compare commits

...

24 Commits

Author SHA1 Message Date
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
github-actions[bot]
291220256a Merge pull request #1476 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.144.9
Bump hugo-bin from 0.144.8 to 0.144.9
2025-06-25 15:13:07 +00:00
Mark Dumay
7bcb87a73e Merge branch 'main' into dependabot/npm_and_yarn/hugo-bin-0.144.9 2025-06-25 17:08:13 +02:00
Mark Dumay
55cebc752e Merge pull request #1478 from gethinode/develop
Fix sharing label
2025-06-25 17:06:43 +02:00
Mark Dumay
14bf59a551 Merge branch 'main' into develop 2025-06-25 17:02:01 +02:00
Mark Dumay
bce0fedd15 Fix sharing label 2025-06-25 17:01:34 +02:00
Mark Dumay
694e7fc7b1 Merge branch 'main' into dependabot/npm_and_yarn/hugo-bin-0.144.9 2025-06-25 16:41:39 +02:00
Mark Dumay
93749cb368 Merge pull request #1477 from gethinode/develop
Fix missing image set widths
2025-06-25 16:41:27 +02:00
Mark Dumay
cf01e22a4d Merge branch 'main' into develop 2025-06-25 16:33:20 +02:00
Mark Dumay
f416f6bb7e Fix missing image set widths 2025-06-25 16:32:55 +02:00
dependabot[bot]
a7b776c0dc Bump hugo-bin from 0.144.8 to 0.144.9
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.144.8 to 0.144.9.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.144.8...v0.144.9)

---
updated-dependencies:
- dependency-name: hugo-bin
  dependency-version: 0.144.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-23 14:48:51 +00:00
29 changed files with 154 additions and 135 deletions

View File

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

View File

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

View File

@@ -62,7 +62,7 @@
<!-- Main code -->
{{ 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" }}
{{ $params := dict }}

View File

@@ -35,7 +35,7 @@
{{ end}}
{{ 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
"page" page

View File

@@ -19,7 +19,7 @@
{{ if not $args.err }}
{{ $color := "" }}
{{ 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 := "" }}
{{ $id := printf "faq-%s" (md5 (delimit (slice . now) "-")) }}

View File

@@ -96,7 +96,7 @@
) }}
{{ 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" }}
<div class="col-{{ $breakpoint.current }}-{{ $args.width }} mx-auto pb-{{ $padding.y }}">

View File

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

View File

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

View File

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

View File

@@ -6,18 +6,17 @@ content_blocks:
- _bookshop_name: hero
heading:
title: Content blocks
align: start
breadcrumb: true
- _bookshop_name: articles
heading:
content: >-
Hinode uses [Bookshop](https://github.com/CloudCannon/bookshop) to
support so-called content blocks. Content blocks are reusable page
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
a content block, including its frontmatter configuration.
align: start
width: 8
breadcrumb: true
- _bookshop_name: articles
hide-empty: false
input:
section: blocks

View File

@@ -25,6 +25,7 @@ The `about` content block renders a short message next to an illustration. You c
subtle: true
illustration:
image: /assets/img/nat-9l98kFByiao-unsplash.jpg
ratio: 1x1
link-type: link
links:
- 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 -->
{{< example lang="hugo" >}}
{{</* 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.
The item is shown by adding the value `show` to the `class` argument.
{{</* /nav-item */>}}
{{</* nav-item title="Nav Item #2" */>}}
{{</* nav-item title="Nav Item #2" show="true" */>}}
This is the second item's nav body.
{{</* /nav-item */>}}
{{</* nav-item title="Nav Item #3" */>}}
{{</* nav-item title="Nav Item #3" disabled="true" */>}}
This is the third item's nav body.
{{</* /nav-item */>}}
{{</* /nav */>}}

View File

@@ -207,6 +207,7 @@
"d-sm-block",
"d-sm-none",
"data-table",
"disabled",
"display-1",
"display-4",
"dropdown",
@@ -368,7 +369,6 @@
"multi-docs-collapse-15",
"multi-docs-collapse-16",
"multi-file-collapse-1",
"multi-file-collapse-5",
"mx-auto",
"mx-md-0",
"mx-md-2",
@@ -574,7 +574,6 @@
"body-docs-collapse-15",
"body-docs-collapse-16",
"body-file-collapse-1",
"body-file-collapse-5",
"bouton",
"breadcrumb",
"button",
@@ -616,21 +615,16 @@
"fab-medium",
"fab-whatsapp",
"fab-x-twitter",
"faq-2ab61bd9d625ad933606ccabfaffa9a8",
"faq-2ab61bd9d625ad933606ccabfaffa9a8-heading-faq-2ab61bd9d625ad933606ccabfaffa9a8",
"faq-2ab61bd9d625ad933606ccabfaffa9a8-item-0",
"faq-2ab61bd9d625ad933606ccabfaffa9a8-item-1",
"faq-2ab61bd9d625ad933606ccabfaffa9a8-item-2",
"faq-471c32251ced209d707f5815bdaa693a",
"faq-471c32251ced209d707f5815bdaa693a-heading-faq-471c32251ced209d707f5815bdaa693a",
"faq-471c32251ced209d707f5815bdaa693a-item-0",
"faq-471c32251ced209d707f5815bdaa693a-item-1",
"faq-471c32251ced209d707f5815bdaa693a-item-2",
"faq-67dbd72b681a398b4c77f0f3652e0905",
"faq-67dbd72b681a398b4c77f0f3652e0905-heading-faq-67dbd72b681a398b4c77f0f3652e0905",
"faq-67dbd72b681a398b4c77f0f3652e0905-item-0",
"faq-67dbd72b681a398b4c77f0f3652e0905-item-1",
"faq-67dbd72b681a398b4c77f0f3652e0905-item-2",
"faq-0a7097f76883a213c55ec2c34a30493c",
"faq-0a7097f76883a213c55ec2c34a30493c-heading-faq-0a7097f76883a213c55ec2c34a30493c",
"faq-0a7097f76883a213c55ec2c34a30493c-item-0",
"faq-0a7097f76883a213c55ec2c34a30493c-item-1",
"faq-0a7097f76883a213c55ec2c34a30493c-item-2",
"faq-f7b9efada37955325b04f32aa6566814",
"faq-f7b9efada37955325b04f32aa6566814-heading-faq-f7b9efada37955325b04f32aa6566814",
"faq-f7b9efada37955325b04f32aa6566814-item-0",
"faq-f7b9efada37955325b04f32aa6566814-item-1",
"faq-f7b9efada37955325b04f32aa6566814-item-2",
"fas-1",
"fas-2",
"fas-3",
@@ -667,7 +661,6 @@
"footer-docs-collapse-15",
"footer-docs-collapse-16",
"footer-file-collapse-1",
"footer-file-collapse-5",
"formula-katex",
"formule-katex",
"gantt-diagram",
@@ -711,10 +704,10 @@
"nav-0-0",
"nav-0-1",
"nav-0-2",
"nav-0-btn-0",
"nav-0-btn-1",
"nav-0-btn-2",
"nav-nav-0",
"nav-nav-0-btn-0",
"nav-nav-0-btn-1",
"nav-nav-0-btn-2",
"navbar",
"navbar-0-collapse",
"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/v2 v2.0.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/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.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.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/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=

View File

@@ -79,6 +79,7 @@
"fa-2x",
"fa-angle-left",
"fa-book-open",
"fa-chevron-right",
"fa-ellipsis",
"fa-face-frown",
"fa-fw",
@@ -174,6 +175,7 @@
"section-cover",
"shadow",
"svg-inline--fa",
"text-",
"text-body",
"text-center",
"text-decoration-none",
@@ -197,6 +199,7 @@
"fab-medium",
"fas-angle-left",
"fas-book-open",
"fas-chevron-right",
"fas-ellipsis",
"fas-moon",
"fas-sun",

View File

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

View File

@@ -83,7 +83,7 @@
{{ else }}
{{ warnf "Unsupported media type '%s': %q" (string $res.MediaType) $src -}}
{{ end }}
{{ else if $args.ratio }}
{{ else if and $args.ratio (ne $args.ratio "auto") }}
{{ $transform = "fill" }}
{{ $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 }}
@@ -148,12 +148,13 @@
)}}
{{ if $args.imageset }}
{{- $set = partial "assets/helpers/image-set.html" (dict
"src" $src
"img" $img
"dims" $dims
"anchor" $args.anchor
"transform" $transform
"hook" $hook
"src" $src
"img" $img
"dims" $dims
"anchor" $args.anchor
"transform" $transform
"hook" $hook
"include-width" true
) -}}
{{ end }}
{{ end }}

View File

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

View File

@@ -6,16 +6,16 @@
*/}}
{{/* Initialize arguments */}}
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "nav-item" "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" "nav-item" "args" . "group" "partial") -}}
{{- if or $args.err $args.warnmsg -}}
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
"partial" "assets/nav-item.html"
"warnid" "warn-invalid-arguments"
"msg" "Invalid arguments"
"details" ($args.errmsg | append $args.warnmsg)
"file" page.File
)}}
{{ end }}
) -}}
{{- end -}}
{{/* Initialize local arguments */}}
{{- $parentID := or $args.parentId $args.parentID -}}
@@ -36,16 +36,16 @@
"class" "hero-image"
"image-overlay" $args.imageOverlay
) }}
{{ else }}
{{ $illustration = partial $args.hook (dict "page" $args.page "image" $args.illustration) }}
{{ end }}
{{- else -}}
{{- $illustration = partial $args.hook (dict "page" $args.page "image" $args.illustration) -}}
{{- end -}}
{{/* Main code */}}
{{ if not $args.err }}
{{ if eq $type "accordion" }}
{{- if not $args.err -}}
{{- if eq $type "accordion" -}}
<div class="accordion-item{{ if $args.show }} show{{ end }}{{ with $args.class }} {{ . }}{{ end }}">
{{- 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">
<button
class="accordion-button collapsed {{ if $args.disabled }} text-secondary{{ end }}"
type="button"
@@ -55,14 +55,14 @@
aria-controls="accordion-{{ $parentID }}-item-{{ $args.id }}"
{{ if $args.disabled }} disabled{{ end }}
>
{{ if $illustration }}
{{- if $illustration -}}
<div class="row">
<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>
{{ else }}
{{- else }}
{{ . }}
{{ end }}
{{ end -}}
</button>
</h2>
{{- end -}}
@@ -75,19 +75,16 @@
<div class="accordion-body">{{ $args.body | $args.page.RenderString | safeHTML }}</div>
</div>
</div>
{{ else }}
{{- else -}}
<div
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"
aria-labelledby="{{ $parentID }}-btn-{{ $args.id }}"
tabindex="0"
data-header="{{ $title }}"
{{ if $args.show }}data-show-id="{{ $args.id }}"{{ end }}
data-has-content="{{ gt (len $args.body) 0 }}"
{{ if $args.disabled }} data-disabled-id="{{ $args.id }}"{{ end }}
>
{{ $args.body | $args.page.RenderString | safeHTML }}
</div>
{{ end }}
{{ end }}
{{- end -}}
{{- end -}}

View File

@@ -42,7 +42,7 @@
"class" $args.class
"body" (or $item.Description $item.Content)
"show" false
"disabled" false
"disabled" $item.disabled
"item_type" "accordion"
"illustration" (partial "utilities/GetIllustration.html" (dict "item" $item "size" "col-12"))
)
@@ -64,11 +64,14 @@
{{- range $args.list }}{{ $titles = $titles | append .Title }} {{ end -}}
{{- if reflect.IsSlice $args.navTitles }}{{ $titles = $titles | append $args.navTitles }}{{ end -}}
{{- 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">
<button
class="nav-link {{ if not $wrap }} text-nowrap{{ end }}{{ if $show }} active{{ end }}"
id="nav-{{ $id }}-btn-{{ $index }}"
class="nav-link{{ if not $wrap }} text-nowrap{{ end }}{{ if $show }} active{{ end }}{{ if $disabled }} disabled{{ end }}"
id="{{ $itemID }}"
data-bs-toggle="pill"
data-bs-target="#{{ $id }}-{{ $index }}"
type="button"
@@ -82,7 +85,7 @@
{{ end -}}
</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 -}}
{{- $header := $item.Title -}}
{-{ $body := $item.Content -}}

View File

@@ -26,8 +26,9 @@
{{- $preheading := $args.heading.preheading }}
{{- $title := $args.heading.title }}
{{- $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 }}
{{ $justify := cond (eq $args.justify "start") "" (cond (eq $args.justify "end") "me-0" "mx-auto") }}
{{ if site.Params.main.titleCase }}
{{ $preheading = title $preheading }}
@@ -85,7 +86,7 @@
}}
<!-- 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") }}
<div class="container-fluid">
<div class="row">

View File

@@ -45,7 +45,7 @@
{{- end -}}
<div class="py-3 text-body-secondary hstack gap-1">
{{ T "shareLink" "" }}
{{ T "shareLink" " " }}
{{- range $index, $item := $list -}}
{{- $url := $item.url -}}
{{- $url = replace $url "{url}" $page.Permalink -}}

View File

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

View File

@@ -35,21 +35,23 @@
{{ $blocks = $blocks | append (dict
"_bookshop_name" "hero"
"heading" (dict "title" $pageTitle "align" $page.Site.Params.modules.bookshop.hero.align)
"breadcrumb" $breadcrumb
"background" (dict "backdrop" $page.Site.Params.modules.bookshop.hero.backdrop)
"overlay-mode" $page.Site.Params.modules.bookshop.hero.overlayMode
"heading" (dict "title" $pageTitle "align" $page.Site.Params.modules.bookshop.hero.align)
"breadcrumb" $breadcrumb
"background" (dict "backdrop" $page.Site.Params.modules.bookshop.hero.backdrop)
"overlay-mode" $page.Site.Params.modules.bookshop.hero.overlayMode
"justify" "start"
)}}
{{ if eq $page.Kind "section" }}
{{ $blocks = $blocks | append (dict
"_bookshop_name" "articles"
"hide-empty" false
"input" (dict "section" $page.Section "reverse" true "sort" "date" "nested" true)
"cols" 3
"padding" "0"
"paginate" true
"scroll" false
"hide-empty" false
"input" (dict "section" $page.Section "reverse" true "sort" "date" "nested" true)
"cols" 3
"padding" "0"
"paginate" true
"scroll" false
"justify" "start"
)}}
{{ end }}

View File

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

View File

@@ -19,6 +19,8 @@
{{- $inner := .Scratch.Get "inner" -}}
{{- $innerTitles := .Scratch.Get "inner-title" -}}
{{- $innerDisabled := .Scratch.Get "inner-disabled" -}}
{{- $innerShow := .Scratch.Get "inner-show" -}}
{{- $input := trim .Inner " \r\n" -}}
{{- if $input -}}
{{- $input = replace $input "\n" "\n " -}}
@@ -28,17 +30,19 @@
{{/* Main code */}}
{{- if not $args.err -}}
{{- partial "assets/nav.html" (dict
"id" (or $args.id (printf "nav-%d" .Ordinal))
"page" .Page
"list" $args.list
"nav-items" $inner
"nav-titles" $innerTitles
"tab-type" (or $args.tabType $args.type)
"vertical" $args.vertical
"word-wrap" $args.wordWrap
"class" $args.class
"pane" $args.pane
"width" $args.width
"id" (or $args.id (printf "nav-%d" .Ordinal))
"page" .Page
"list" $args.list
"nav-items" $inner
"nav-titles" $innerTitles
"nav-disabled" $innerDisabled
"nav-show" $innerShow
"tab-type" (or $args.tabType $args.type)
"vertical" $args.vertical
"word-wrap" $args.wordWrap
"class" $args.class
"pane" $args.pane
"width" $args.width
)
-}}
{{- end -}}

44
package-lock.json generated
View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "1.0.0-beta4",
"version": "1.0.0-beta6",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
@@ -73,13 +73,13 @@
"autoprefixer": "^10.4.21",
"cssnano": "^7.0.7",
"cssnano-preset-advanced": "^7.0.7",
"hugo-bin": "0.144.8",
"hugo-bin": "0.144.9",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
"cpy-cli": "^5.0.0",
"eslint": "^9.29.0",
"eslint": "^9.30.0",
"markdownlint-cli2": "^0.18.1",
"neostandard": "^0.12.1",
"netlify-plugin-hugo-cache-resources": "^0.2.1",