Compare commits

...

42 Commits

Author SHA1 Message Date
Mark Dumay
7216c88e0b Merge pull request #750 from gethinode/develop
Restrict max range
2024-02-04 08:57:20 +01:00
Mark Dumay
fac87c69e2 Merge branch 'main' into develop 2024-02-04 08:15:24 +01:00
Mark Dumay
62d4fdeb32 Merge pull request #749 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2024-02-04 08:00:42 +01:00
Mark Dumay
91da0c7d0d Restrict max range 2024-02-04 07:42:28 +01:00
markdumay
b116c2582f fix: update Hugo module dependencies 2024-02-04 06:39:58 +00:00
Mark Dumay
276307fb5c Merge pull request #748 from gethinode/develop
Refine fixed navbar rendering
2024-02-04 07:06:31 +01:00
Mark Dumay
54ae613298 Merge branch 'main' into develop 2024-02-04 06:57:32 +01:00
Mark Dumay
a22040f4e3 Refine fixed navbar rendering 2024-02-04 06:56:50 +01:00
Mark Dumay
630cc55361 Improve error handling 2024-02-04 06:56:06 +01:00
Mark Dumay
2aacace6ad Merge pull request #747 from gethinode/develop
Fix init of card padding with zero value
2024-02-04 06:04:34 +01:00
Mark Dumay
91714727c3 Merge branch 'main' into develop 2024-02-04 05:52:12 +01:00
Mark Dumay
8e21f36619 Bump package release 2024-02-04 05:51:39 +01:00
Mark Dumay
baa88ca957 Fix init of padding with zero value 2024-02-04 05:50:25 +01:00
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
17 changed files with 105 additions and 73 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;
@@ -16,6 +17,7 @@
.nav-active, .navbar-expanded { .nav-active, .navbar-expanded {
background-color: var(--bs-navbar-expanded-color); background-color: var(--bs-navbar-expanded-color);
border-bottom: 1px solid var(--bs-secondary-bg);
} }
.nav-link { .nav-link {
@@ -32,6 +34,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 +49,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 +60,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 +133,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
@@ -42,6 +43,9 @@ arguments:
optional: true optional: true
comment: Maximum number of cards to display. comment: Maximum number of cards to display.
group: partial group: partial
options:
min: 1
max: 10
cols: cols:
type: select type: select
optional: true optional: true

View File

@@ -159,6 +159,7 @@ arguments:
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: align:
type: select type: select
parent: cascade
optional: true optional: true
default: start default: start
release: v0.23.0-alpha2 release: v0.23.0-alpha2
@@ -170,6 +171,7 @@ arguments:
- center - center
style: style:
type: string type: string
parent: cascade
optional: true optional: true
release: v0.23.0-alpha2 release: v0.23.0-alpha2
comment: Icon style. comment: Icon style.
@@ -187,6 +189,7 @@ arguments:
- none - none
subtle: subtle:
type: bool type: bool
parent: cascade
optional: true optional: true
release: v0.23.0-alpha2 release: v0.23.0-alpha2
comment: Apply subtle background colors. comment: Apply subtle background colors.

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

@@ -126,11 +126,13 @@
"col-3", "col-3",
"col-4", "col-4",
"col-6", "col-6",
"col-8",
"col-9", "col-9",
"col-auto", "col-auto",
"col-lg-2", "col-lg-2",
"col-lg-4", "col-lg-4",
"col-lg-8", "col-lg-8",
"col-md-10",
"col-md-2", "col-md-2",
"col-md-3", "col-md-3",
"col-md-4", "col-md-4",

4
go.mod
View File

@@ -5,12 +5,12 @@ 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
github.com/gethinode/mod-lottie v1.4.1 // indirect github.com/gethinode/mod-lottie v1.4.1 // indirect
github.com/gethinode/mod-utils v1.0.3 // indirect github.com/gethinode/mod-utils v1.0.4 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 // indirect github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 // indirect
github.com/twbs/bootstrap v5.3.2+incompatible // indirect github.com/twbs/bootstrap v5.3.2+incompatible // indirect
) )

4
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=
@@ -126,6 +128,8 @@ github.com/gethinode/mod-utils v1.0.2 h1:0b3i+/bBHY1Td9N6khDbL1nf3d5HGc4QzI4BbEW
github.com/gethinode/mod-utils v1.0.2/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE= github.com/gethinode/mod-utils v1.0.2/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
github.com/gethinode/mod-utils v1.0.3 h1:FF6lnam0Bcdj7G1E5P+qi5ByPrl1npL+3uS5YoPx1C0= github.com/gethinode/mod-utils v1.0.3 h1:FF6lnam0Bcdj7G1E5P+qi5ByPrl1npL+3uS5YoPx1C0=
github.com/gethinode/mod-utils v1.0.3/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE= github.com/gethinode/mod-utils v1.0.3/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
github.com/gethinode/mod-utils v1.0.4 h1:Lr7hAVaWHv0O5TJXhRHGhvlOvWwIATJm9mpLQhCsopM=
github.com/gethinode/mod-utils v1.0.4/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
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

@@ -16,18 +16,20 @@
{{ $page := .page }} {{ $page := .page }}
<!-- Main code --> <!-- Main code -->
<nav aria-label="breadcrumb"> {{ if not $error }}
<ol class="breadcrumb"> <nav aria-label="breadcrumb">
{{- range $index, $item := $page.Ancestors.Reverse -}} <ol class="breadcrumb">
{{- $title := .LinkTitle -}} {{- range $index, $item := $page.Ancestors.Reverse -}}
{{- if .IsHome }}{{ $title = T "home" }}{{ end -}} {{- $title := .LinkTitle -}}
{{- $address := or .RelPermalink (.Params.Redirect | relLangURL) -}} {{- if .IsHome }}{{ $title = T "home" }}{{ end -}}
{{ if $address }} {{- $address := or .RelPermalink (.Params.Redirect | relLangURL) -}}
<li class="breadcrumb-item"><a href="{{ $address }}">{{ $title }}</a></li> {{ if $address }}
{{ else }} <li class="breadcrumb-item"><a href="{{ $address }}">{{ $title }}</a></li>
<li class="breadcrumb-item">{{ $title }}</li> {{ else }}
{{ end }} <li class="breadcrumb-item">{{ $title }}</li>
{{- end -}} {{ end }}
<li class="breadcrumb-item active" aria-current="page">{{ $page.LinkTitle }}</li> {{- end -}}
</ol> <li class="breadcrumb-item active" aria-current="page">{{ $page.LinkTitle }}</li>
</nav> </ol>
</nav>
{{ end }}

View File

@@ -33,31 +33,36 @@
{{- $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 -}}

View File

@@ -24,7 +24,7 @@
{{- $style := .style | default "" -}} {{- $style := .style | default "" -}}
{{- $loading := .loading -}} {{- $loading := .loading -}}
{{- $orientation := .orientation | default "stacked" -}} {{- $orientation := .orientation | default "stacked" -}}
{{- $padding := .padding | default "auto" -}} {{- $padding := (string .padding) | default "auto" -}}
{{- $ratio := .ratio -}} {{- $ratio := .ratio -}}
{{- $thumbnail := .thumbnail -}} {{- $thumbnail := .thumbnail -}}
{{- $title := .title -}} {{- $title := .title -}}
@@ -121,7 +121,7 @@
<!-- Render horizontal card --> <!-- Render horizontal card -->
<div class="card {{ $colorStyle }} {{ $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="{{ if eq $orientation "horizontal-sm" }}col-2{{ else }}col-4{{ 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 -}}
@@ -130,7 +130,7 @@
</div> </div>
{{- end -}} {{- end -}}
</div> </div>
<div class="{{ if eq $orientation "horizontal-sm" }}col-10{{ else }}col-8{{ 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">

22
package-lock.json generated
View File

@@ -1,17 +1,17 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.23.0-alpha2", "version": "0.23.0-alpha6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.23.0-alpha2", "version": "0.23.0-alpha6",
"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-alpha2", "version": "0.23.0-alpha6",
"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",