Compare commits

...

11 Commits

Author SHA1 Message Date
Mark Dumay
883d753c62 Merge pull request #1586 from gethinode/develop
feat: enhance more button configuration
2025-09-17 13:52:46 +02:00
Mark Dumay
221edc3d9c fix: update type definition 2025-09-17 13:43:50 +02:00
Mark Dumay
2fa27a699b Merge branch 'main' into develop 2025-09-17 13:15:12 +02:00
Mark Dumay
17c2c76ed9 feat: enhance more button configuration 2025-09-17 13:14:05 +02:00
Mark Dumay
fe05770e89 Merge pull request #1585 from gethinode/develop
fix: remove redundant markup template
2025-09-17 05:35:25 +02:00
Mark Dumay
856c264544 fix: remove redundant markup template 2025-09-17 05:29:08 +02:00
Mark Dumay
816455676a Merge pull request #1584 from hawkeye116477/main
Allow to set class for markdown header
2025-09-17 05:24:28 +02:00
hawkeye116477
7fde6a2d8e Allow to set class for markdown header
gethinode/hinode#1508
2025-09-16 21:05:11 +02:00
Mark Dumay
97caba0ace Merge pull request #1582 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2025-09-16 10:34:30 +02:00
Mark Dumay
89df0b1b2a Merge branch 'main' into hugo-mod-dependencies 2025-09-16 10:28:30 +02:00
markdumay
b2adbab04b fix: update Hugo module dependencies 2025-09-16 03:16:00 +00:00
8 changed files with 53 additions and 34 deletions

View File

@@ -27,6 +27,8 @@ blueprint:
more: more:
title: title:
link: link:
link-type:
icon:
icon-rounded: icon-rounded:
icon-style: icon-style:
cols: cols:

View File

@@ -49,9 +49,13 @@
{{ $moreButton := site.Params.modules.bookshop.articles.moreButton | default false }} {{ $moreButton := site.Params.modules.bookshop.articles.moreButton | default false }}
{{ $moreTitle := T "more" (pluralize $args.input.section) }} {{ $moreTitle := T "more" (pluralize $args.input.section) }}
{{ $moreLink := $args.input.section }} {{ $moreLink := $args.input.section }}
{{ $moreType := "button" }}
{{ $moreIcon := "" }}
{{ with $args.more }} {{ with $args.more }}
{{ if .title }}{{ $moreTitle = .title }}{{ end }} {{ if .title }}{{ $moreTitle = .title }}{{ end }}
{{ if .link }}{{ $moreLink = .link }}{{ end }} {{ if .link }}{{ $moreLink = .link }}{{ end }}
{{ if index . "link-type" }}{{ $moreType = index . "link-type" }}{{ end }}
{{ if .icon }}{{ $moreIcon = .icon }}{{ end }}
{{ end }} {{ end }}
{{ $paginate := $args.paginate }} {{ $paginate := $args.paginate }}
@@ -85,6 +89,8 @@
"href" (cond $moreButton $moreLink "") "href" (cond $moreButton $moreLink "")
"href-title" (cond $moreButton $moreTitle "") "href-title" (cond $moreButton $moreTitle "")
"href-force" (gt $result.total (len $result.pages)) "href-force" (gt $result.total (len $result.pages))
"more-link-type" $moreType
"more-link-icon" $moreIcon
)}} )}}
{{ if $args.scroll }} {{ if $args.scroll }}

View File

@@ -69,6 +69,24 @@ arguments:
release: v0.27.0 release: v0.27.0
button-label: button-label:
release: v1.0.0 release: v1.0.0
more-link-type:
type: select
optional: true
default: button
comment: Style of the more button or link.
options:
values:
- button
- link
release: v1.16.0
more-link-icon:
type: string
optional: true
comment: >-
Icon to include. You can use shorthand notation such as `fas sort` to
include a Font Awesome icon. The argument also supports files with an
`.svg` or `.json` extension.
release: v1.16.0
# deprecated arguments # deprecated arguments
header: header:

4
go.mod
View File

@@ -4,7 +4,7 @@ go 1.19
require ( require (
github.com/airbnb/lottie-web v5.13.0+incompatible // indirect github.com/airbnb/lottie-web v5.13.0+incompatible // indirect
github.com/cloudcannon/bookshop/hugo/v3 v3.16.4 // indirect github.com/cloudcannon/bookshop/hugo/v3 v3.16.5 // indirect
github.com/gethinode/mod-bootstrap v1.3.4 // indirect github.com/gethinode/mod-bootstrap v1.3.4 // indirect
github.com/gethinode/mod-csp v1.0.8 // indirect github.com/gethinode/mod-csp v1.0.8 // indirect
github.com/gethinode/mod-flexsearch/v3 v3.0.0 // indirect github.com/gethinode/mod-flexsearch/v3 v3.0.0 // indirect
@@ -15,7 +15,7 @@ require (
github.com/gethinode/mod-lottie v1.6.1 // indirect github.com/gethinode/mod-lottie v1.6.1 // indirect
github.com/gethinode/mod-mermaid/v3 v3.0.1 // indirect github.com/gethinode/mod-mermaid/v3 v3.0.1 // indirect
github.com/gethinode/mod-simple-datatables/v2 v2.0.2 // indirect github.com/gethinode/mod-simple-datatables/v2 v2.0.2 // indirect
github.com/gethinode/mod-utils/v4 v4.16.1 // indirect github.com/gethinode/mod-utils/v4 v4.17.0 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20250907103239-defb38b083f0 // indirect github.com/nextapps-de/flexsearch v0.0.0-20250907103239-defb38b083f0 // indirect
github.com/twbs/bootstrap v5.3.8+incompatible // indirect github.com/twbs/bootstrap v5.3.8+incompatible // indirect
) )

4
go.sum
View File

@@ -12,6 +12,8 @@ github.com/cloudcannon/bookshop/hugo/v3 v3.16.3 h1:/Z66xKILl1SNGQePHZCnxo6vFgED7
github.com/cloudcannon/bookshop/hugo/v3 v3.16.3/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8= github.com/cloudcannon/bookshop/hugo/v3 v3.16.3/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8=
github.com/cloudcannon/bookshop/hugo/v3 v3.16.4 h1:k233xdD3ydE6iN8QB+c37//rSsFVtLIo5OUNRN4E3bc= github.com/cloudcannon/bookshop/hugo/v3 v3.16.4 h1:k233xdD3ydE6iN8QB+c37//rSsFVtLIo5OUNRN4E3bc=
github.com/cloudcannon/bookshop/hugo/v3 v3.16.4/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8= github.com/cloudcannon/bookshop/hugo/v3 v3.16.4/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8=
github.com/cloudcannon/bookshop/hugo/v3 v3.16.5 h1:RmqeSUQMPyi31YC6SaFNE2ubfFy13qVj5/lo+MCT+u8=
github.com/cloudcannon/bookshop/hugo/v3 v3.16.5/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8=
github.com/gethinode/mod-bootstrap v1.0.1 h1:NDZar+UEL42YHCvzzO+jVgqkZU5INA12BpjX3y6U4I4= github.com/gethinode/mod-bootstrap v1.0.1 h1:NDZar+UEL42YHCvzzO+jVgqkZU5INA12BpjX3y6U4I4=
github.com/gethinode/mod-bootstrap v1.0.1/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8= github.com/gethinode/mod-bootstrap v1.0.1/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
github.com/gethinode/mod-bootstrap v1.1.0 h1:BbalsW8kmFhv+J+dcc41TGcjIlM/p69AB0h0oGhAXIU= github.com/gethinode/mod-bootstrap v1.1.0 h1:BbalsW8kmFhv+J+dcc41TGcjIlM/p69AB0h0oGhAXIU=
@@ -514,6 +516,8 @@ github.com/gethinode/mod-utils/v4 v4.16.0 h1:yroLCeQyE/xU46YIKS81ZtFsOONTmVudrv2
github.com/gethinode/mod-utils/v4 v4.16.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4= github.com/gethinode/mod-utils/v4 v4.16.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.16.1 h1:HjV6TONU7ZbXC2xZIPRupjKOUORddtQH8bb4dnULY1U= github.com/gethinode/mod-utils/v4 v4.16.1 h1:HjV6TONU7ZbXC2xZIPRupjKOUORddtQH8bb4dnULY1U=
github.com/gethinode/mod-utils/v4 v4.16.1/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4= github.com/gethinode/mod-utils/v4 v4.16.1/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.17.0 h1:nDyXpZ0mCtf3ZML8G6bjeYJsI7Ne/Ze8rEWEa9zh6CI=
github.com/gethinode/mod-utils/v4 v4.17.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo= github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 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

@@ -1,17 +0,0 @@
{{ $text := chomp .Text }}
{{ if site.Params.main.titleCase }}{{ $text = title $text }}{{ end }}
{{ if eq page.RelPermalink "/en/privacy/" }}
{{ warnf "title: %s" (.Text | safeHTML) }}
{{ end }}
{{ if and site.Params.navigation.anchor $text }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading">
{{- $text | safeHTML -}}
<a href="#{{ .Anchor | safeURL }}" aria-labelledby="{{ .Anchor | safeURL }}">
{{- partial "assets/icon.html" (dict "icon" "fas link anchor") }}
</a>
</h{{ .Level }}>
{{ else }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ $text | safeHTML }}</h{{ .Level }}>
{{ end }}

View File

@@ -1,13 +1,14 @@
{{ $class := .Attributes.class }}
{{ $text := chomp .Text }} {{ $text := chomp .Text }}
{{ if site.Params.main.titleCase }}{{ $text = (title ($text | htmlUnescape)) | htmlEscape }}{{ end }} {{ if site.Params.main.titleCase }}{{ $text = (title ($text | htmlUnescape)) | htmlEscape }}{{ end }}
{{ if and site.Params.navigation.anchor $text }} {{ if and site.Params.navigation.anchor $text }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading"> <h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading {{ with $class }}{{ . }}{{ end }}">
{{- $text | safeHTML -}} {{- $text | safeHTML -}}
<a href="#{{ .Anchor | safeURL }}" aria-labelledby="{{ .Anchor | safeURL }}"> <a href="#{{ .Anchor | safeURL }}" aria-labelledby="{{ .Anchor | safeURL }}">
{{- partial "assets/icon.html" (dict "icon" "fas link anchor") }} {{- partial "assets/icon.html" (dict "icon" "fas link anchor") }}
</a> </a>
</h{{ .Level }}> </h{{ .Level }}>
{{ else }} {{ else }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ $text | safeHTML }}</h{{ .Level }}> <h{{ .Level }} id="{{ .Anchor | safeURL }}" {{ with $class }} class="{{ . }}"{{ end }}>{{ $text | safeHTML }}</h{{ .Level }}>
{{ end }} {{ end }}

View File

@@ -197,9 +197,14 @@
{{- $href = printf "%s/" $href -}} {{- $href = printf "%s/" $href -}}
{{- end -}} {{- end -}}
<div class="mt-{{ $padding.y }} w-100"> <div class="mt-{{ $padding.y }} w-100">
<a class="btn btn-outline-primary" href="{{ $href | safeURL }}" role="button"> {{ partial "assets/button.html" (dict
{{ $args.hrefTitle }} "href" $href
</a> "title" $args.hrefTitle
"color" "primary"
"outline" true
"link-type" $args.moreLinkType
"icon" $args.moreLinkIcon
) }}
</div> </div>
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}