Compare commits

...

35 Commits

Author SHA1 Message Date
Mark Dumay
1874fc9b47 Merge pull request #746 from gethinode/develop
Improve flex search index
2024-02-03 10:29:18 +01:00
Mark Dumay
6c9543d05a Merge branch 'main' into develop 2024-02-03 10:20:50 +01:00
Mark Dumay
a614c35f05 Merge pull request #745 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2024-02-03 10:20:08 +01:00
Mark Dumay
0d7bc8e7d8 Bump package release 2024-02-03 10:13:00 +01:00
Mark Dumay
39b3d500d0 Add default flexsearch configuration 2024-02-03 10:12:19 +01:00
Mark Dumay
03200f3828 Update build stats 2024-02-03 10:12:02 +01:00
markdumay
044a5eadcd fix: update Hugo module dependencies 2024-02-03 09:09:42 +00:00
Mark Dumay
e924bd96ec Merge pull request #743 from gethinode/develop
Refine responsive icon size on cards
2024-02-03 05:29:15 +01:00
Mark Dumay
e234240e74 Merge branch 'main' into develop 2024-02-03 05:14:42 +01:00
Mark Dumay
33473b0db1 Refine responsive icon size on cards 2024-02-03 05:13:45 +01:00
github-actions[bot]
cfad29f9d4 Merge pull request #741 from gethinode/dependabot/npm_and_yarn/netlify/plugin-lighthouse-6.0.0
Bump @netlify/plugin-lighthouse from 5.0.0 to 6.0.0
2024-01-31 13:45:11 +00:00
dependabot[bot]
7ffdbea3ec Bump @netlify/plugin-lighthouse from 5.0.0 to 6.0.0
Bumps [@netlify/plugin-lighthouse](https://github.com/netlify/netlify-plugin-lighthouse) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/netlify/netlify-plugin-lighthouse/releases)
- [Changelog](https://github.com/netlify/netlify-plugin-lighthouse/blob/main/CHANGELOG.md)
- [Commits](https://github.com/netlify/netlify-plugin-lighthouse/compare/v5.0.0...v6.0.0)

---
updated-dependencies:
- dependency-name: "@netlify/plugin-lighthouse"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 13:39:13 +00:00
github-actions[bot]
2c2fb4d305 Merge pull request #740 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.119.0
Bump hugo-bin from 0.118.1 to 0.119.0
2024-01-29 13:44:24 +00:00
dependabot[bot]
709172c506 Bump hugo-bin from 0.118.1 to 0.119.0
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.118.1 to 0.119.0.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.118.1...v0.119.0)

---
updated-dependencies:
- dependency-name: hugo-bin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 13:37:22 +00:00
Mark Dumay
8727ee50ee Merge pull request #739 from gethinode/develop
Update installation instructions for Windows
2024-01-29 11:21:28 +01:00
mark
04d4d20ba6 Fix linting issue 2024-01-29 11:11:47 +01:00
Mark Dumay
e77ea9358e Merge branch 'main' into develop 2024-01-29 10:50:44 +01:00
Mark Dumay
6263dc0649 Update installation instructions for Windows 2024-01-29 10:50:12 +01:00
Mark Dumay
52eccfc384 Merge pull request #737 from gethinode/develop
Fix navbar toggler color in overlay mode
2024-01-28 08:28:47 +01:00
Mark Dumay
13085416e2 Merge branch 'main' into develop 2024-01-28 07:15:32 +01:00
Mark Dumay
f7efa99fc3 Bump package release 2024-01-28 07:15:09 +01:00
Mark Dumay
32d6b8844a Fix navbar toggler color in overlay mode 2024-01-28 07:14:27 +01:00
Mark Dumay
1c4287a3ed Merge pull request #735 from gethinode/develop
Add support for card group data
2024-01-27 12:26:50 +01:00
Mark Dumay
354fa85f38 Fix alignment of features 2024-01-27 11:40:42 +01:00
Mark Dumay
78fb0760f3 Merge branch 'main' into develop 2024-01-27 11:33:14 +01:00
Mark Dumay
dfdda4d27f Bump package release 2024-01-27 11:32:34 +01:00
Mark Dumay
6d8f90bdce Add support for card group data 2024-01-27 11:32:24 +01:00
Mark Dumay
3e531da29c Add support for card group data 2024-01-27 11:31:53 +01:00
Mark Dumay
6065ebb6b4 Fix card-group args 2024-01-27 10:11:15 +01:00
Mark Dumay
75373935f1 Merge pull request #734 from gethinode/develop
Extend card style configuration
2024-01-27 09:59:27 +01:00
Mark Dumay
1d5784a4d1 Merge branch 'main' into develop 2024-01-27 07:28:33 +01:00
Mark Dumay
5df94ffe33 Extend card-group args 2024-01-27 07:26:17 +01:00
Mark Dumay
6aeaa8812a Bump package release 2024-01-27 07:15:19 +01:00
Mark Dumay
b1f8044e02 Update build stats 2024-01-27 07:15:09 +01:00
Mark Dumay
09fc0991bd Extend card args 2024-01-27 07:15:00 +01:00
18 changed files with 142 additions and 66 deletions

View File

@@ -75,6 +75,14 @@ The installation instructions in this readme install Hinode as a regular Hugo th
## Installation ## Installation
<!-- markdownlint-disable MD033 -->
<details>
<summary>Installation notes for Windows</summary>
The installation for Windows requires PowerShell v7. Download it from the Microsoft Store as needed. Check your current version with the command `$PSVersionTable`.
</details>
<!-- markdownlint-enable MD033 -->
Start a new Hinode project in three steps: Start a new Hinode project in three steps:
1. **Create a new site** 1. **Create a new site**
@@ -83,14 +91,15 @@ Start a new Hinode project in three steps:
hugo new site my-hinode-site && cd my-hinode-site hugo new site my-hinode-site && cd my-hinode-site
``` ```
1. **Initialize the module system** 2. **Initialize the module system**
```bash ```bash
hugo mod init example.com/my-hinode-site hugo mod init example.com/my-hinode-site
echo "[[module.imports]]\npath = 'github.com/gethinode/hinode'" >> hugo.toml echo "[[module.imports]]" >> hugo.toml
echo "path = 'github.com/gethinode/hinode'" >> hugo.toml
``` ```
1. **Start a development server** 3. **Start a development server**
```bash ```bash
hugo server hugo server

View File

@@ -5,6 +5,7 @@
.navbar { .navbar {
--bs-navbar-expanded-color: var(--bs-body-bg); --bs-navbar-expanded-color: var(--bs-body-bg);
--bs-navbar-toggler-color: var(--bs-navbar-hover-color);
transition: 0.5s ease-in-out; transition: 0.5s ease-in-out;
background-color: transparent; background-color: transparent;
@@ -32,6 +33,7 @@
--bs-navbar-hover-color: white !important; --bs-navbar-hover-color: white !important;
--bs-navbar-disabled-color: white !important; --bs-navbar-disabled-color: white !important;
--bs-navbar-active-color: white !important; --bs-navbar-active-color: white !important;
--bs-navbar-toggler-color: white;
} }
.navbar-expanded { .navbar-expanded {
@@ -46,6 +48,7 @@
--bs-navbar-brand-color: #{$navbar-dark-brand-color}; --bs-navbar-brand-color: #{$navbar-dark-brand-color};
--bs-navbar-brand-hover-color: #{$navbar-dark-brand-hover-color}; --bs-navbar-brand-hover-color: #{$navbar-dark-brand-hover-color};
--bs-navbar-toggler-border-color: #{$navbar-dark-toggler-border-color}; --bs-navbar-toggler-border-color: #{$navbar-dark-toggler-border-color};
--bs-navbar-toggler-color: white;
} }
.navbar-overlay-light, .navbar-overlay-dark.nav-active, .navbar-overlay-dark.navbar-expanded { .navbar-overlay-light, .navbar-overlay-dark.nav-active, .navbar-overlay-dark.navbar-expanded {
@@ -56,6 +59,7 @@
--bs-navbar-brand-color: #{$navbar-light-brand-color}; --bs-navbar-brand-color: #{$navbar-light-brand-color};
--bs-navbar-brand-hover-color: #{$navbar-light-brand-hover-color}; --bs-navbar-brand-hover-color: #{$navbar-light-brand-hover-color};
--bs-navbar-toggler-border-color: #{$navbar-light-toggler-border-color}; --bs-navbar-toggler-border-color: #{$navbar-light-toggler-border-color};
--bs-navbar-toggler-color: black;
} }
.nav-item .vr { .nav-item .vr {
@@ -128,19 +132,11 @@
/* Color of Toggler when collapsed */ /* Color of Toggler when collapsed */
.navbar-toggler.collapsed .toggler-icon { .navbar-toggler.collapsed .toggler-icon {
background-color: #777; background-color: var(--bs-navbar-toggler-color);
} }
.emphasis-light { .emphasis, .emphasis-dark, .emphasis-light {
background-color: $black if($enable-important-utilities, !important, null); background-color: var(--bs-navbar-toggler-color);
}
.emphasis-dark {
background-color: $white if($enable-important-utilities, !important, null);
}
.emphasis {
background-color: $black if($enable-important-utilities, !important, null);
} }
@include color-mode(dark) { @include color-mode(dark) {

View File

@@ -24,6 +24,9 @@
disableTemplate = ["katex"] disableTemplate = ["katex"]
[modules.katex] [modules.katex]
state = "defer" state = "defer"
[modules.flexsearch]
frontmatter = false
filter = ""
[modules.fontawesome] [modules.fontawesome]
inline = true inline = true
debug = true debug = true

View File

@@ -27,10 +27,11 @@ arguments:
release: v0.19.0 release: v0.19.0
list: list:
type: type:
- page.Pages - 'page.Pages'
- resource.Resources - 'resource.Resources'
- '[]map[string]interface {}'
optional: true optional: true
comment: Array of pages to be rendered as cards. comment: Array of pages or structured content to be rendered as cards.
group: partial group: partial
cards: cards:
type: string type: string

View File

@@ -157,19 +157,42 @@ arguments:
optional: true optional: true
comment: >- comment: >-
Font Awesome icon, displayed on top or the left of the card. Font Awesome icon, displayed on top or the left of the card.
align:
type: select
parent: cascade
optional: true
default: start
release: v0.23.0-alpha2
comment: Icon alignment.
options:
values:
- start
- end
- center
style:
type: string
parent: cascade
optional: true
release: v0.23.0-alpha2
comment: Icon style.
orientation: orientation:
type: select type: select
optional: true optional: true
default: stacked default: stacked
parent: cascade parent: cascade
comment: >- comment: Placement of the thumbnail or icon.
Placement of the thumbnail or icon.
options: options:
values: values:
- stacked - stacked
- horizontal - horizontal
- horizontal-sm - horizontal-sm
- none - none
subtle:
type: bool
parent: cascade
optional: true
release: v0.23.0-alpha2
comment: Apply subtle background colors.
body: body:
optional: true optional: true
comment: >- comment: >-

View File

@@ -20,6 +20,9 @@
disableTemplate = ["katex"] disableTemplate = ["katex"]
[modules.katex] [modules.katex]
state = "defer" state = "defer"
[modules.flexsearch]
frontmatter = false
filter = ""
[modules.fontawesome] [modules.fontawesome]
inline = true inline = true
debug = true debug = true
@@ -129,7 +132,7 @@
padding = "3" padding = "3"
header = "none" header = "none"
footer = "tags" footer = "tags"
orientation = "horizontal-sm" orientation = "horizontal"
style = "border-1 card-emphasize" style = "border-1 card-emphasize"
homepage = 3 homepage = 3
separator = false separator = false

View File

@@ -8,7 +8,7 @@ showComments: false
{{< image src="/img/logo_var.svg#logo" class="img-fluid w-50" wrapper="text-center" >}} {{< image src="/img/logo_var.svg#logo" class="img-fluid w-50" wrapper="text-center" >}}
{{< card-group class="text-center border-0" padding="3" >}} {{< card-group align="center" class="border-0" padding="3" >}}
{{< card title="Bootstrap framework" icon="fab bootstrap" >}} {{< card title="Bootstrap framework" icon="fab bootstrap" >}}
Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source Sass files. Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source Sass files.
{{< /card >}} {{< /card >}}

View File

@@ -9,7 +9,7 @@ showComments: false
{{< image src="/img/logo_var.svg#logo" class="img-fluid w-50" wrapper="text-center" >}} {{< image src="/img/logo_var.svg#logo" class="img-fluid w-50" wrapper="text-center" >}}
{{< card-group class="text-center border-0" padding="3" >}} {{< card-group align="center" class="border-0" padding="3" >}}
{{< card title="Framework Bootstrap" icon="fab bootstrap" >}} {{< card title="Framework Bootstrap" icon="fab bootstrap" >}}
Créez des sites rapides et réactifs avec Bootstrap 5. Personnalisez facilement votre site avec les fichiers source Sass. Créez des sites rapides et réactifs avec Bootstrap 5. Personnalisez facilement votre site avec les fichiers source Sass.
{{< /card >}} {{< /card >}}

View File

@@ -10,7 +10,7 @@ showComments: false
{{< image src="/img/logo_var.svg#logo" class="img-fluid w-50" wrapper="text-center" >}} {{< image src="/img/logo_var.svg#logo" class="img-fluid w-50" wrapper="text-center" >}}
{{< card-group class="text-center border-0" padding="3" >}} {{< card-group align="center" class="border-0" padding="3" >}}
{{< card title="Bootstrap raamwerk" icon="fab bootstrap" >}} {{< card title="Bootstrap raamwerk" icon="fab bootstrap" >}}
Bouw snelle websites geschikt voor mobiele en desktop schermen met Bootstrap 5. Pas de site eenvoudig aan met bronbestanden in Sass. Bouw snelle websites geschikt voor mobiele en desktop schermen met Bootstrap 5. Pas de site eenvoudig aan met bronbestanden in Sass.
{{< /card >}} {{< /card >}}

View File

@@ -26,7 +26,6 @@
"mark", "mark",
"meta", "meta",
"nav", "nav",
"nil",
"noscript", "noscript",
"ol", "ol",
"p", "p",
@@ -63,6 +62,7 @@
"alert-dismissible", "alert-dismissible",
"align-items-center", "align-items-center",
"align-items-end", "align-items-end",
"align-items-start",
"align-middle", "align-middle",
"align-self-center", "align-self-center",
"align-self-end", "align-self-end",

2
go.mod
View File

@@ -5,7 +5,7 @@ go 1.19
require ( require (
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
github.com/gethinode/mod-bootstrap v1.2.2 // indirect github.com/gethinode/mod-bootstrap v1.2.2 // indirect
github.com/gethinode/mod-flexsearch v1.8.1 // indirect github.com/gethinode/mod-flexsearch v1.9.0 // indirect
github.com/gethinode/mod-fontawesome v1.8.0 // indirect github.com/gethinode/mod-fontawesome v1.8.0 // indirect
github.com/gethinode/mod-katex v1.0.5 // indirect github.com/gethinode/mod-katex v1.0.5 // indirect
github.com/gethinode/mod-leaflet v0.4.0 // indirect github.com/gethinode/mod-leaflet v0.4.0 // indirect

2
go.sum
View File

@@ -44,6 +44,8 @@ github.com/gethinode/mod-flexsearch v1.8.0 h1:rKu9ackmbGAD/CRJYUDUhy/3nDCEj0IgYD
github.com/gethinode/mod-flexsearch v1.8.0/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4= github.com/gethinode/mod-flexsearch v1.8.0/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
github.com/gethinode/mod-flexsearch v1.8.1 h1:xwPvmmxd8Tdyxp8/rnd9KRGqIDtZs/YwAQJ1i9oQMiM= github.com/gethinode/mod-flexsearch v1.8.1 h1:xwPvmmxd8Tdyxp8/rnd9KRGqIDtZs/YwAQJ1i9oQMiM=
github.com/gethinode/mod-flexsearch v1.8.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ= github.com/gethinode/mod-flexsearch v1.8.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
github.com/gethinode/mod-flexsearch v1.9.0 h1:AE+w7QeZTxh36JNTG+CASDLxaqlCZKn+EUD6ulnPGak=
github.com/gethinode/mod-flexsearch v1.9.0/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
github.com/gethinode/mod-fontawesome v1.0.2 h1:ZSK6D20/w4y5GnfYfTBB58uHD0ChIfkpKfRGwioS9rg= github.com/gethinode/mod-fontawesome v1.0.2 h1:ZSK6D20/w4y5GnfYfTBB58uHD0ChIfkpKfRGwioS9rg=
github.com/gethinode/mod-fontawesome v1.0.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI= github.com/gethinode/mod-fontawesome v1.0.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
github.com/gethinode/mod-fontawesome v1.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk= github.com/gethinode/mod-fontawesome v1.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=

View File

@@ -27,34 +27,42 @@
{{- $orientation := .orientation -}} {{- $orientation := .orientation -}}
{{- $ratio := .ratio -}} {{- $ratio := .ratio -}}
{{- $wrapper := .wrapper | default "p-0" -}} {{- $wrapper := .wrapper | default "p-0" -}}
{{- $style := .style -}}
{{- $align := .align -}}
{{- $subtle := .subtle }}
{{- $loading := .loading -}} {{- $loading := .loading -}}
<!-- Override arguments --> <!-- Override arguments -->
{{ $isPages := in (slice "page.Pages" "resource.Resources") (printf "%T" $pages) }}
{{ $paginator := "" }} {{ $paginator := "" }}
{{ if $paginate }} {{ if and $isPages $paginate }}
{{ $paginator = $page.Paginate $pages }} {{ $paginator = $page.Paginate $pages }}
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }} {{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
{{ end }} {{ end }}
{{ $list := slice }} {{ $list := slice }}
{{ range $index, $element := $pages }} {{ if $isPages }}
{{ $params := dict }} {{ range $index, $element := $pages }}
<!-- regular page --> {{ $params := dict }}
{{- if and $element.RelPermalink $element.File -}} <!-- regular page -->
{{- $params = merge $params (dict "path" $element.File.Path) -}} {{- if and $element.RelPermalink $element.File -}}
<!-- headless page --> {{- $params = merge $params (dict "path" $element.File.Path) -}}
{{- else -}} <!-- headless page -->
{{- $thumbnail := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.url) $element.Params.Thumbnail) -}} {{- else -}}
{{- $params = merge $params (dict {{- $thumbnail := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.url) $element.Params.Thumbnail) -}}
"title" $element.Title {{- $params = merge $params (dict
"href" $element.RelPermalink "title" $element.Title
"description" (partial "utilities/GetDescription.html" $element) "href" $element.RelPermalink
"thumbnail" $thumbnail "description" (partial "utilities/GetDescription.html" $element)
"icon" $element.Params.icon "thumbnail" $thumbnail
) -}} "icon" $element.Params.icon
{{- end -}} ) -}}
{{- end -}}
{{- $list = $list | append $params }} {{- $list = $list | append $params }}
{{ end }}
{{ else if $pages }}
{{ $list = $list | append $pages }}
{{ end }} {{ end }}
{{- $count := len $list -}} {{- $count := len $list -}}
@@ -90,6 +98,9 @@
"orientation" $orientation "orientation" $orientation
"padding" $padding "padding" $padding
"ratio" $ratio "ratio" $ratio
"subtle" $subtle
"style" $style
"align" $align
) -}} ) -}}
{{- $params = merge $params $element }} {{- $params = merge $params $element }}
@@ -102,7 +113,7 @@
</div> </div>
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- print $cards | safeHTML }} {{if $cards }}{{- print $cards | safeHTML }}{{ end }}
</div> </div>
{{ if $paginate }} {{ if $paginate }}

View File

@@ -19,12 +19,24 @@
{{- $header := .header | default "full" -}} {{- $header := .header | default "full" -}}
{{- $href := .href -}} {{- $href := .href -}}
{{- $icon := .icon -}} {{- $icon := .icon -}}
{{- $iconStyle := "" -}}
{{- $align := .align | default "start" -}}
{{- $style := .style | default "" -}}
{{- $loading := .loading -}} {{- $loading := .loading -}}
{{- $orientation := .orientation | default "stacked" -}} {{- $orientation := .orientation | default "stacked" -}}
{{- $padding := .padding | default "auto" -}} {{- $padding := .padding | default "auto" -}}
{{- $ratio := .ratio -}} {{- $ratio := .ratio -}}
{{- $thumbnail := .thumbnail -}} {{- $thumbnail := .thumbnail -}}
{{- $title := .title -}} {{- $title := .title -}}
{{- $subtle := .subtle -}}
{{- $colorStyle := "" -}}
{{ if $color }}
{{ if $subtle }}
{{- $colorStyle = printf "bg-%s-subtle text-%s-emphasis" $color $color -}}
{{ else }}
{{- $colorStyle = printf "bg-%s text-bg-%s" $color $color -}}
{{ end }}
{{ end }}
<!-- Override arguments --> <!-- Override arguments -->
{{- $page := "" }} {{- $page := "" }}
@@ -42,6 +54,13 @@
{{- if not $icon }}{{ $icon = .Params.icon }}{{ end -}} {{- if not $icon }}{{ $icon = .Params.icon }}{{ end -}}
{{- end -}} {{- end -}}
{{ if (hasPrefix $orientation "horizontal") }}
{{ if not $style }}{{ $style = "fa-fluid fa-fw" }}{{ end }}
{{ else }}
{{ if not $style }}{{ $style = "fa-4x" }}{{ end }}
{{- $iconStyle = "pb-3" -}}
{{ end }}
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}} {{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
<!-- Inline partial to render the card's body --> <!-- Inline partial to render the card's body -->
@@ -100,18 +119,18 @@
{{- if hasPrefix $orientation "horizontal" -}} {{- if hasPrefix $orientation "horizontal" -}}
<!-- Render horizontal card --> <!-- Render horizontal card -->
<div class="card {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}"> <div class="card {{ $colorStyle }} {{ $class }}">
<div class="row g-0 row-cols-1 h-100"> <div class="row g-0 row-cols-1 h-100">
<div class="col-4{{ if eq $orientation "horizontal-sm" }} col-md-2{{ end }}"> <div class="{{ if eq $orientation "horizontal-sm" }}col-4 col-md-2{{ else }}col-4{{ end }}">
{{- if $thumbnail -}} {{- if $thumbnail -}}
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" (or $ratio "1x1") "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100" "title" $title "loading" $loading) -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" (or $ratio "1x1") "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100" "title" $title "loading" $loading) -}}
{{- else if $icon -}} {{- else if $icon -}}
<div class="card-icon p-{{ $padding }} h-100 fa-wrapper d-flex align-items-center justify-content-center"> <div class="card-icon p-{{ $padding }} h-100 fa-wrapper d-flex align-items-{{ $align}} justify-content-center {{ $iconStyle }}">
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-fluid fa-fw" $icon)) -}} {{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
</div> </div>
{{- end -}} {{- end -}}
</div> </div>
<div class="col-8{{ if eq $orientation "horizontal-sm" }} col-md-10{{ end }}"> <div class="{{ if eq $orientation "horizontal-sm" }}col-8 col-md-10{{ else }}col-8{{ end }}">
<div class="card-body d-flex p-{{ $padding }} flex-column h-100"> <div class="card-body d-flex p-{{ $padding }} flex-column h-100">
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>{{ end }} {{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>{{ end }}
<div class="h-100"> <div class="h-100">
@@ -124,12 +143,12 @@
</div> </div>
{{- else -}} {{- else -}}
<!-- Render stacked / default card --> <!-- Render stacked / default card -->
<div class="card {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}"> <div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
{{- if $thumbnail -}} {{- if $thumbnail -}}
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" (or $ratio "16x9") "wrapper" "card-img-wrap" "class" "card-img-top" "title" (or $alt $title) "loading" $loading) -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" (or $ratio "16x9") "wrapper" "card-img-wrap" "class" "card-img-top" "title" (or $alt $title) "loading" $loading) -}}
{{- else if $icon -}} {{- else if $icon -}}
<div class="card-icon p-{{ $padding }}"> <div class="card-icon p-{{ $padding }} {{ $iconStyle }} text-{{ $align }}">
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x" $icon)) -}} {{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
</div> </div>
{{- end -}} {{- end -}}
<div class="card-body d-flex flex-column p-{{ $padding }}"> <div class="card-body d-flex flex-column p-{{ $padding }}">

View File

@@ -24,6 +24,9 @@
{{- $header := .Get "header" | default "" -}} {{- $header := .Get "header" | default "" -}}
{{- $footer := .Get "footer" | default "" -}} {{- $footer := .Get "footer" | default "" -}}
{{- $orientation := .Get "orientation" | default "" -}} {{- $orientation := .Get "orientation" | default "" -}}
{{- $align := .Get "align" | default "start" -}}
{{- $style := .Get "style" | default "" -}}
{{- $subtle := .Get "subtle" | default false -}}
{{ $inner := .Scratch.Get "inner" }} {{ $inner := .Scratch.Get "inner" }}
{{ $input := trim .Inner " \r\n" }} {{ $input := trim .Inner " \r\n" }}

View File

@@ -21,6 +21,9 @@
{{- $gutter := partial "utilities/GetArgParent" (dict "page" . "arg" "gutter") | default "0" -}} {{- $gutter := partial "utilities/GetArgParent" (dict "page" . "arg" "gutter") | default "0" -}}
{{- $header := partial "utilities/GetArgParent" (dict "page" . "arg" "header") | default "full" -}} {{- $header := partial "utilities/GetArgParent" (dict "page" . "arg" "header") | default "full" -}}
{{- $icon := .Get "icon" -}} {{- $icon := .Get "icon" -}}
{{- $align := partial "utilities/GetArgParent" (dict "page" . "arg" "align") | default "start" -}}
{{- $style := partial "utilities/GetArgParent" (dict "page" . "arg" "style") | default "" -}}
{{- $subtle := partial "utilities/GetArgParent" (dict "page" . "arg" "subtle") | default false -}}
{{- $loading := .Get "loading" -}} {{- $loading := .Get "loading" -}}
{{- $orientation := partial "utilities/GetArgParent" (dict "page" . "arg" "orientation") | default "stacked" -}} {{- $orientation := partial "utilities/GetArgParent" (dict "page" . "arg" "orientation") | default "stacked" -}}
{{- $padding := partial "utilities/GetArgParent" (dict "page" . "arg" "padding") | default "auto" -}} {{- $padding := partial "utilities/GetArgParent" (dict "page" . "arg" "padding") | default "auto" -}}
@@ -59,6 +62,9 @@
"description" $description "description" $description
"ratio" $ratio "ratio" $ratio
"icon" $icon "icon" $icon
"align" $align
"style" $style
"subtle" $subtle
"thumbnail" $thumbnail "thumbnail" $thumbnail
"loading" $loading "loading" $loading
"alt" $alt "alt" $alt

22
package-lock.json generated
View File

@@ -1,17 +1,17 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.23.0-alpha", "version": "0.23.0-alpha5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.23.0-alpha", "version": "0.23.0-alpha5",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@fullhuman/postcss-purgecss": "^5.0.0", "@fullhuman/postcss-purgecss": "^5.0.0",
"@gethinode/netlify-plugin-dartsass": "^0.2.0", "@gethinode/netlify-plugin-dartsass": "^0.2.0",
"@netlify/plugin-lighthouse": "^5.0.0", "@netlify/plugin-lighthouse": "^6.0.0",
"autoprefixer": "^10.4.17", "autoprefixer": "^10.4.17",
"cssnano": "^6.0.3", "cssnano": "^6.0.3",
"cssnano-preset-advanced": "^6.0.3", "cssnano-preset-advanced": "^6.0.3",
@@ -20,7 +20,7 @@
"eslint-plugin-import": "^2.29.1", "eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2", "eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1", "eslint-plugin-promise": "^6.1.1",
"hugo-bin": "^0.118.1", "hugo-bin": "^0.119.0",
"markdownlint-cli2": "^0.12.1", "markdownlint-cli2": "^0.12.1",
"netlify-plugin-hugo-cache-resources": "^0.2.1", "netlify-plugin-hugo-cache-resources": "^0.2.1",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
@@ -562,9 +562,9 @@
} }
}, },
"node_modules/@netlify/plugin-lighthouse": { "node_modules/@netlify/plugin-lighthouse": {
"version": "5.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/@netlify/plugin-lighthouse/-/plugin-lighthouse-5.0.0.tgz", "resolved": "https://registry.npmjs.org/@netlify/plugin-lighthouse/-/plugin-lighthouse-6.0.0.tgz",
"integrity": "sha512-tCaoVYxCU3OB592vChtFkANzUL4kDUNaIk9VCGp3qBecBnH+yFrILUlcqy2d08Is4ecstjTacyHqV+ixKbNYGQ==", "integrity": "sha512-Uqqy9A7huuDT+1RIBWDoWhp+ntlLE1ibp1jXFpiizWy8QProWkLm8E7PFLu0Bf+aAwgjV2eJPj6ocIbk+jBANQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"chalk": "^4.1.0", "chalk": "^4.1.0",
@@ -577,7 +577,7 @@
"puppeteer": "^18.0.0" "puppeteer": "^18.0.0"
}, },
"engines": { "engines": {
"node": ">=14.15 <20" "node": ">=18.14.0"
} }
}, },
"node_modules/@nodelib/fs.scandir": { "node_modules/@nodelib/fs.scandir": {
@@ -4365,9 +4365,9 @@
"dev": true "dev": true
}, },
"node_modules/hugo-bin": { "node_modules/hugo-bin": {
"version": "0.118.1", "version": "0.119.0",
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.118.1.tgz", "resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.119.0.tgz",
"integrity": "sha512-WIS4kLNySb5u2+iwk//N7ClLUCksmyjvqdkGQTFc5v7Bqjpn1yLcIIBWwxU3R4SBc2Lr772/auxlzzsRffGbVA==", "integrity": "sha512-RnjlxHKdOjo7i7yRX/001t53142tC9NTa5JVrnPCTpX2kNQQCz5XdI/WWX7emf0dNkxipj55Z58EsA2ft9W16g==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.23.0-alpha", "version": "0.23.0-alpha5",
"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",
@@ -69,7 +69,7 @@
"devDependencies": { "devDependencies": {
"@fullhuman/postcss-purgecss": "^5.0.0", "@fullhuman/postcss-purgecss": "^5.0.0",
"@gethinode/netlify-plugin-dartsass": "^0.2.0", "@gethinode/netlify-plugin-dartsass": "^0.2.0",
"@netlify/plugin-lighthouse": "^5.0.0", "@netlify/plugin-lighthouse": "^6.0.0",
"autoprefixer": "^10.4.17", "autoprefixer": "^10.4.17",
"cssnano": "^6.0.3", "cssnano": "^6.0.3",
"cssnano-preset-advanced": "^6.0.3", "cssnano-preset-advanced": "^6.0.3",
@@ -78,7 +78,7 @@
"eslint-plugin-import": "^2.29.1", "eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2", "eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1", "eslint-plugin-promise": "^6.1.1",
"hugo-bin": "^0.118.1", "hugo-bin": "^0.119.0",
"markdownlint-cli2": "^0.12.1", "markdownlint-cli2": "^0.12.1",
"netlify-plugin-hugo-cache-resources": "^0.2.1", "netlify-plugin-hugo-cache-resources": "^0.2.1",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",