Compare commits

...

46 Commits

Author SHA1 Message Date
Mark Dumay
191d6e3d94 Change to macos-latest-xl runner 2023-04-27 08:01:43 +02:00
Mark Dumay
580675f8b1 Merge pull request #232 from gethinode/tooltip
Tooltip
2023-04-27 07:55:02 +02:00
Mark Dumay
b2b43d550b Merge branch 'main' into tooltip 2023-04-27 07:47:08 +02:00
Mark Dumay
f79317b317 Merge pull request #231 from gethinode/develop
Google Analytics
2023-04-27 07:46:14 +02:00
mark
3d7bcc4356 Bump release version 2023-04-27 07:45:56 +02:00
mark
a7256ff270 Fix tooltip justification 2023-04-27 07:45:47 +02:00
mark
8ffc6dbd59 Bump release version 2023-04-27 07:28:46 +02:00
mark
5bb0cf07e6 Add Google Analytics support 2023-04-27 07:28:22 +02:00
Mark Dumay
37e9e70c55 Merge pull request #230 from gethinode/main
Sync
2023-04-26 16:04:43 +02:00
Mark Dumay
b4ddc8c58d Merge pull request #229 from gethinode/TOC
TOC
2023-04-26 16:01:32 +02:00
Mark Dumay
a7c4be508d Merge branch 'main' into TOC 2023-04-26 15:55:39 +02:00
mark
0988e07106 Fix linting issues 2023-04-26 15:50:29 +02:00
mark
7dcbfe8373 Add hover color to sidebar TOC 2023-04-26 15:48:59 +02:00
Mark Dumay
fdebbccfa1 Merge branch 'main' into develop 2023-04-26 13:44:28 +02:00
mark
7d1cd93e87 Bump release version 2023-04-26 13:43:04 +02:00
mark
3a056829c5 Improve configurability of button 2023-04-26 13:40:47 +02:00
mark
0ee0febc15 Adjust TOC button shadow 2023-04-26 13:40:22 +02:00
mark
ac081a3084 Add icon support 2023-04-26 12:07:59 +02:00
mark
9d07b5da5a Add TOC drop-down for small screens 2023-04-26 12:02:52 +02:00
Mark Dumay
67f1708691 Merge pull request #227 from gethinode/develop
Release v0.12.0
2023-04-25 16:48:00 +02:00
Mark Dumay
c5e5ec0f21 Merge branch 'main' into develop 2023-04-25 16:42:28 +02:00
mark
d461333738 Bump dependencies 2023-04-25 16:37:28 +02:00
mark
32c422a2a8 Bump release version 2023-04-25 16:36:49 +02:00
github-actions[bot]
b66660b557 Merge pull request #225 from gethinode/dependabot/npm_and_yarn/stylelint-config-standard-scss-9.0.0
Bump stylelint-config-standard-scss from 8.0.0 to 9.0.0
2023-04-25 14:09:00 +00:00
dependabot[bot]
be95c3cd68 Bump stylelint-config-standard-scss from 8.0.0 to 9.0.0
Bumps [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v8.0.0...v9.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-standard-scss
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-25 14:04:29 +00:00
mark
74aa32e595 Move partials to assets folder 2023-04-25 15:58:45 +02:00
mark
4c305b38a5 Improve partial error messages 2023-04-25 15:31:36 +02:00
mark
63c609c1d3 Improve configurability of nav partial 2023-04-25 15:24:23 +02:00
mark
d7424d26eb Update i18n keywords 2023-04-25 13:22:57 +02:00
mark
1f66740c19 Refine minimal layout 2023-04-25 13:15:40 +02:00
github-actions[bot]
cb032b4fb8 Merge pull request #224 from gethinode/dependabot/npm_and_yarn/eslint-8.39.0
Bump eslint from 8.38.0 to 8.39.0
2023-04-24 14:21:22 +00:00
dependabot[bot]
3889382e19 Bump eslint from 8.38.0 to 8.39.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.38.0 to 8.39.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.38.0...v8.39.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 14:17:25 +00:00
github-actions[bot]
86addfd6dd Merge pull request #223 from gethinode/dependabot/npm_and_yarn/stylelint-15.6.0
Bump stylelint from 15.5.0 to 15.6.0
2023-04-24 14:16:22 +00:00
dependabot[bot]
9110fb5ab4 Bump stylelint from 15.5.0 to 15.6.0
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.5.0 to 15.6.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.5.0...15.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 14:12:08 +00:00
Mark Dumay
fad4cdbfd2 Merge pull request #221 from gethinode/develop
Sections
2023-04-24 15:00:20 +02:00
Mark Dumay
c403d422d9 Merge branch 'main' into develop 2023-04-24 14:52:03 +02:00
mark
0ecfa72864 Update section config 2023-04-24 14:51:00 +02:00
mark
62af498414 Refactor card group 2023-04-24 14:50:19 +02:00
mark
ee37599ded Fix card header and footer 2023-04-24 14:43:57 +02:00
mark
9a4c7c7776 Merge snippets and lists into sections 2023-04-24 14:17:37 +02:00
mark
c05eeb015c Bump release version 2023-04-24 14:09:23 +02:00
mark
d9f898a2e1 Add unique id to each nav 2023-04-24 06:54:01 +02:00
mark
36f31a57ae Fix id 2023-04-24 06:52:40 +02:00
mark
17b3bbaf80 Add body as supported color 2023-04-24 06:52:30 +02:00
mark
26bc4ebb00 Prioritize page title over param title 2023-04-24 04:52:17 +02:00
mark
d13d80af2f Adjust build timeout 2023-04-23 16:35:43 +02:00
40 changed files with 687 additions and 475 deletions

View File

@@ -1,3 +1,4 @@
assets/js/analytics.js
assets/js/color.js assets/js/color.js
assets/js/flexsearch.js assets/js/flexsearch.js
assets/js/vendor assets/js/vendor

View File

@@ -11,7 +11,7 @@ jobs:
build: build:
strategy: strategy:
matrix: matrix:
os: [macos-latest, windows-latest, ubuntu-latest] os: [macos-latest-xl, windows-latest, ubuntu-latest]
node-version: [14.x, 16.x, 18.x] node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

69
assets/js/analytics.js Normal file
View File

@@ -0,0 +1,69 @@
// Adapted from https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/google_analytics.html
{{- define "__ga_js_set_doNotTrack" -}}{{/* This is also used in the async version. */}}
{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
{{- if not $pc.RespectDoNotTrack -}}
var doNotTrack = false;
{{- else -}}
var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
var doNotTrack = (dnt == "1" || dnt == "yes");
{{- end -}}
{{- end -}}
{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
{{- if (and (not .Site.IsServer) (not $pc.Disable)) -}}
{{ with .Site.GoogleAnalytics -}}
{{ if hasPrefix . "G-"}}
{{ template "__ga_js_set_doNotTrack" $ }}
if (!doNotTrack) {
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', '{{ . }}', { 'anonymize_ip': {{- $pc.AnonymizeIP -}} });
}
{{ else if hasPrefix . "UA-" }}
{{ template "__ga_js_set_doNotTrack" $ }}
if (!doNotTrack) {
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
{{- if $pc.UseSessionStorage }}
if (window.sessionStorage) {
var GA_SESSION_STORAGE_KEY = 'ga:clientId';
ga('create', '{{ . }}', {
'storage': 'none',
'clientId': sessionStorage.getItem(GA_SESSION_STORAGE_KEY)
});
ga(function(tracker) {
sessionStorage.setItem(GA_SESSION_STORAGE_KEY, tracker.get('clientId'));
});
}
{{ else }}
ga('create', '{{ . }}', 'auto');
{{ end -}}
{{ if $pc.AnonymizeIP }}
ga('set', 'anonymizeIp', true);
{{ end }}
ga('send', 'pageview');
}
{{- end }}
{{ end -}}
{{- end }}

View File

@@ -1,8 +1,8 @@
// //
// Table of contents sidebar // Table of contents sidebar & drop-down panel
// //
// scss-docs-start toc // scss-docs-start toc
.toc { .toc-sidebar {
grid-area: toc; grid-area: toc;
right: 0; right: 0;
z-index: 2; z-index: 2;
@@ -15,6 +15,7 @@
.toc nav { .toc nav {
font-size: 0.875rem; font-size: 0.875rem;
margin-bottom: -0.875rem;
} }
.toc nav ul { .toc nav ul {
@@ -29,12 +30,24 @@
.toc nav li { .toc nav li {
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
&:hover {
color: var(--bs-primary);
}
} }
.toc nav a { .toc nav a {
color: inherit; color: inherit;
} }
.toc-panel nav a {
&.active,
&:hover,
&:focus {
color: var(--bs-primary);
}
}
.toc nav a:not(:hover) { .toc nav a:not(:hover) {
text-decoration: none; text-decoration: none;
} }
@@ -42,3 +55,21 @@
.toc nav a code { .toc nav a code {
font: inherit; font: inherit;
} }
.toc-button {
--bs-btn-hover-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-body-bg);
--bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-body-bg);
--bs-btn-active-border-color: var(--bs-primary);
&.active,
&:hover,
&:focus {
color: var(--bs-primary);
border-color: var(--bs-primary);
box-shadow: 0 0 0 4px var(--bs-primary-border-subtle);
outline: none;
}
}

View File

@@ -17,7 +17,7 @@ enableInlineShortcodes = true
ignoreErrors = ["error-remote-getjson"] ignoreErrors = ["error-remote-getjson"]
# toml-docs-start timeout # toml-docs-start timeout
timeout = "60s" timeout = "180s"
# toml-docs-end timeout # toml-docs-end timeout
# toml-docs-start language # toml-docs-start language

View File

@@ -34,12 +34,12 @@
sidebar = true sidebar = true
# toml-docs-end navigation # toml-docs-end navigation
# toml-docs-start list # toml-docs-start sections
[list] [sections]
[blog] [sections.blog]
title = "Blog" title = "Blog"
sort = "date" sort = "date"
reverse = false reverse = true
cols = 3 cols = 3
color = "" color = ""
padding = "0" padding = "0"
@@ -49,7 +49,7 @@
style = "border-0 card-zoom" style = "border-0 card-zoom"
homepage = 3 homepage = 3
separator = true separator = true
[projects] [sections.projects]
title = "Projects" title = "Projects"
sort = "title" sort = "title"
reverse = false reverse = false
@@ -62,7 +62,7 @@
style = "border-1 card-emphasize" style = "border-1 card-emphasize"
homepage = 3 homepage = 3
separator = false separator = false
# toml-docs-end list # toml-docs-end sections
[favicon] [favicon]
logo = "img/favicon.png" logo = "img/favicon.png"

View File

@@ -8,14 +8,15 @@ for = '/**'
Content-Security-Policy = """\ Content-Security-Policy = """\
default-src 'self'; \ default-src 'self'; \
script-src 'self' \ script-src 'self' \
https://utteranc.es/client.js; \ https://utteranc.es/client.js https://*.google-analytics.com https://*.googletagmanager.com; \
style-src 'self' https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \ style-src 'self' https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \
object-src 'none'; \ object-src 'none'; \
base-uri 'self'; \ base-uri 'self'; \
connect-src 'self'; \ connect-src 'self'
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
font-src 'self' https://fonts.gstatic.com; \ font-src 'self' https://fonts.gstatic.com; \
frame-src 'self' https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com; \ frame-src 'self' https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com; \
img-src 'self' https://i.vimeocdn.com https://i.ytimg.com; \ img-src 'self' https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com; \
manifest-src 'self'; \ manifest-src 'self'; \
media-src 'self' \ media-src 'self' \
""" """

View File

@@ -257,8 +257,6 @@ As an example, the following shortcode displays a tooltip for a colored hyperlin
<!-- markdownlint-disable MD037 --> <!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}} {{< example lang="hugo" >}}
{{</* tooltip color="primary" title="Tooltip" href="#!" */>}} {{</* tooltip color="primary" title="Tooltip" href="#!" */>}}Tooltip{{</* /tooltip */>}} demonstration
Tooltip demonstration
{{</* /tooltip */>}}
{{< /example >}} {{< /example >}}
<!-- markdownlint-enable MD037 --> <!-- markdownlint-enable MD037 -->

View File

@@ -257,8 +257,6 @@ De volgende shortcode toont een uitleg voor een gekleurde link.
<!-- markdownlint-disable MD037 --> <!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}} {{< example lang="hugo" >}}
{{</* tooltip color="primary" title="Tooltip" href="#!" */>}} {{</* tooltip color="primary" title="Tooltip" href="#!" */>}}Tooltip{{</* /tooltip */>}} demonstratie
Tooltip demonstration
{{</* /tooltip */>}}
{{< /example >}} {{< /example >}}
<!-- markdownlint-enable MD037 --> <!-- markdownlint-enable MD037 -->

View File

@@ -27,8 +27,14 @@
translation: "Next Post" translation: "Next Post"
- id: recentProjects - id: recentProjects
translation: "Projects" translation: "Projects"
- id: moreFeatures
translation: "More Features"
- id: moreGuides
translation: "More Guides"
- id: moreProjects - id: moreProjects
translation: "More Projects" translation: "More Projects"
- id: moreUsers
translation: "More Users"
- id: read - id: read
translation: "read" translation: "read"
- id: minutesShort - id: minutesShort
@@ -65,6 +71,8 @@
translation: "Auto" translation: "Auto"
- id: toggleMainNav - id: toggleMainNav
translation: "Toggle main navigation" translation: "Toggle main navigation"
- id: demo
translation: "Demo"
# 404 page # 404 page
- id: pageNotFound - id: pageNotFound

View File

@@ -1,7 +1,8 @@
{{- define "partials/header.html" -}} {{- define "partials/header.html" -}}
{{ if site.Params.navigation.breadcrumb }}{{ partial "breadcrumb.html" . }}{{ end -}} {{ if site.Params.navigation.breadcrumb }}{{ partial "assets/breadcrumb.html" . }}{{ end -}}
{{ if in (slice "docs" "minimal") .Layout }} {{ if in (slice "docs" "minimal") .Layout }}
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }} {{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
<p class="lead mb-5">{{ .Description }}</p>
{{ else }} {{ else }}
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}} {{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}} {{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
@@ -28,30 +29,31 @@
{{ end -}} {{ end -}}
</div> </div>
</div> </div>
<p class="lead mb-5 mt-3">{{ .Description }}</p>
{{ end }} {{ end }}
{{ end -}} {{ end -}}
{{ define "partials/body.html" -}} {{ define "partials/body.html" -}}
{{ if eq .Layout "docs"}} {{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}}
<p class="lead mb-5">{{ .Description }}</p> <div class="d-md-none pb-5">{{ partial "assets/toc-dropdown.html" . }}</div>
{{ .Content }} {{- end -}}
{{ else }}
<p class="lead mb-5 mt-3">{{ .Description }}</p> {{ if not (in (slice "docs" "minimal") .Layout) }}
{{ if .Params.thumbnail -}} {{ if .Params.thumbnail -}}
{{- $credits := "" -}} {{- $credits := "" -}}
{{- if .Params.photoCredits }}{{ if .Params.PhotoSource }}{{ $credits = printf "%s %s %s %s" (T "photoBy") .Params.photoCredits (T "photoOn") .Params.PhotoSource }}{{ end }}{{ end -}} {{- if .Params.photoCredits }}{{ if .Params.PhotoSource }}{{ $credits = printf "%s %s %s %s" (T "photoBy") .Params.photoCredits (T "photoOn") .Params.PhotoSource }}{{ end }}{{ end -}}
{{- partial "image.html" (dict "url" .Params.thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" $credits) -}} {{- partial "assets/image.html" (dict "url" .Params.thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" $credits) -}}
{{ end -}} {{ end -}}
{{ .Content }} {{ end }}
{{ end }} {{ .Content }}
{{ end -}} {{ end -}}
{{ define "partials/footer.html" -}} {{ define "partials/footer.html" -}}
{{ if eq .Layout "docs"}} {{ if eq .Layout "docs" }}
<div class="mt-5 small"> <div class="mt-5 small">
{{ partial "utilities/git.html" . }} {{ partial "utilities/git.html" . }}
</div> </div>
{{ else }} {{ else if ne .Layout "minimal" }}
<div class="row row-cols-2 mt-5 mb-3"> <div class="row row-cols-2 mt-5 mb-3">
<div class="col"> <div class="col">
{{ with .NextInSection -}} {{ with .NextInSection -}}
@@ -82,7 +84,7 @@
{{- $version := .Scratch.Get "version" -}} {{- $version := .Scratch.Get "version" -}}
{{- $sidebar := .Site.Params.navigation.sidebar | default true -}} {{- $sidebar := .Site.Params.navigation.sidebar | default true -}}
{{ if and $menu $sidebar -}} {{ if and $menu $sidebar -}}
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-labelledby="offcanvas-label"> <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-inledby="offcanvas-label">
<div class="offcanvas-header"> <div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvas-label">{{ strings.FirstUpper .Section }}</h5> <h5 class="offcanvas-title" id="offcanvas-label">{{ strings.FirstUpper .Section }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>

View File

@@ -8,8 +8,8 @@
{{- range $index, $section := site.Params.home.sections -}} {{- range $index, $section := site.Params.home.sections -}}
{{- $pages := where site.RegularPages "Type" "in" $section -}} {{- $pages := where site.RegularPages "Type" "in" $section -}}
{{- $sectionURL := "" -}} {{- $sectionURL := "" -}}
{{- range $page := first 1 $pages -}} {{- range $p := first 1 $pages -}}
{{- $sectionURL = $page.Parent.RelPermalink -}} {{- $sectionURL = $p.Parent.RelPermalink -}}
{{- end -}} {{- end -}}
{{- $moreTitle := (T (printf "more%s" (strings.FirstUpper $section))) -}} {{- $moreTitle := (T (printf "more%s" (strings.FirstUpper $section))) -}}
@@ -22,8 +22,4 @@
"sectionURL" $sectionURL) "sectionURL" $sectionURL)
-}} -}}
{{- end -}} {{- end -}}
{{- range $index, $section := site.Params.home.snippets -}}
{{- partial "assets/snippet-list.html" (dict "page" $page "section" $section) -}}
{{- end -}}
{{- end -}} {{- end -}}

View File

@@ -0,0 +1,132 @@
<!--
Displays a button. The shortcode supports the following arguments:
"title" Required title of the button.
"href" Optional address for the button or hyperlink.
"id" Optional id of the button, to be used in the DOM.
"state" Optional state of the button, either "enabled" (default), "disabled", "active", or "inactive".
"size" Optional size of the button, either "sm", "md" (default), or "lg".
"color" Optional theme color of the element, either "primary" (default), "secondary", "success",
"danger", "warning", "info", "light", "dark", "white", or "black".
"outline" Optional flag indicating the button should be outlined, either "false" (default) or "true".
"badge" Optional positioned badge to display on top of the button.
"aria-label" Optional assistive label for the badge.
"tooltip" Optional text to display in a tooltip. Cannot be used together with collapse. Ignored for active/
inactive buttons.
"collapse" Optional panel to collapse. Cannot be used together with tooltip. Ignored for active/inactive buttons.
"type" Optional type of the element, either "link" or "button" (default).
"placement" Optional position of the tooltip: "top" (default), "bottom", "left", or "right".
"class" Optional class attribute of the button element, e.g. “toc-button”.
"icon" Optional Font Awesome icon class attribute, e.g. "fas sort".
"order" Optional order of the icon, either "first" or "last" (default).
"justify" Optional justification of the button title and icon, either "start", "end", "center" (default),
"between", "around", or "evenly".
-->
{{- $title := trim .title " \r\n" -}}
{{- if not $title -}}
{{- errorf "partial [assets/button.html] - Missing element title" -}}
{{- end -}}
{{- $id := .id }}
{{- $state := "enabled" -}}
{{- with .state }}{{ $state = . }}{{ end -}}
{{- $supportedStates := slice "enabled" "disabled" "active" "inactive" -}}
{{- if not (in $supportedStates $state) -}}
{{- errorf "partial [assets/button.html] - Invalid value for param 'state': %s" $state -}}
{{- end -}}
{{- $size := "md" -}}
{{- with .size }}{{ $size = . }}{{ end -}}
{{- $supportedSizes := slice "sm" "md" "lg" -}}
{{- if not (in $supportedSizes $size) -}}
{{- errorf "partial [assets/button.html] - Invalid value for param 'size': %s" $size -}}
{{- end -}}
{{- $color := "primary" -}}
{{- with .color }}{{ $color = . }}{{ end -}}
{{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" -}}
{{- if not (in $supportedColors $color) -}}
{{- errorf "partial [assets/button.html] - Invalid value for param 'color': %s" $color -}}
{{- end -}}
{{- $outline := false -}}
{{- with .outline }}{{ $outline = . }}{{ end -}}
{{- $badge := "" -}}
{{- with .badge }}{{ $badge = . }}{{ end -}}
{{- $label := "" -}}
{{- with .label }}{{ $label = . }}{{ end -}}
{{- $tooltip := "" -}}
{{- if not (strings.HasSuffix $state "active") -}}
{{- with .tooltip }}{{ $tooltip = . }}{{ end -}}
{{- end -}}
{{- $href := .href -}}
{{- $collapse := "" -}}
{{- if not (strings.HasSuffix $state "active") -}}
{{- with .collapse }}{{ $collapse = . }}{{ $href = printf "#%s" . }}{{ end -}}
{{- end -}}
{{- if $tooltip -}}
{{- if $collapse -}}
{{- errorf "partial [assets/button.html] - Cannot use tooltip and collapse at the same time" -}}
{{- end -}}
{{- end -}}
{{- $type := "button" -}}
{{- with .type }}{{ $type = . }}{{ end -}}
{{- $supportedTypes := slice "button" "link" -}}
{{- if not (in $supportedTypes $type) -}}
{{- errorf "partial [assets/button.html] - Invalid value for param 'type': %s" $type -}}
{{- end -}}
{{- $placement := "top" -}}
{{- with .placement }}{{ $placement = . }}{{ end -}}
{{- $supportedPlacements := slice "top" "bottom" "left" "right" -}}
{{- if not (in $supportedPlacements $placement) -}}
{{- errorf "partial [assets/button.html] - Invalid value for param 'placement': %s" $placement -}}
{{- end -}}
{{- $class := .class }}
{{- $icon := .icon }}
{{- $order := "last" -}}
{{- with .order }}{{ $order = . }}{{ end -}}
{{- $supportedOrders := slice "first" "last" -}}
{{- if not (in $supportedOrders $order) -}}
{{- errorf "partial [assets/button.html] - Invalid value for param 'order': %s" $order -}}
{{- end -}}
{{- $justify := "center" -}}
{{- with .justify }}{{ $justify = . }}{{ end -}}
{{- $supportedJustify := slice "start" "end" "center" "between" "around" "evenly" -}}
{{- if not (in $supportedJustify $justify) -}}
{{- errorf "partial [assets/button.html] - Invalid value for param 'justify': %s" $justify -}}
{{- end -}}
<a aria-label="{{ $title }}" {{ if ne $state "disabled" }}{{ with $href }}href="{{ . }}"{{ end }}{{ end -}}
{{- with $id }}id="{{ . }}"{{ end -}}
{{- if eq $type "button" }}class="btn btn-{{ if $outline }}outline-{{ end }}{{ $color }} {{ if ne $size "md"}}btn-{{ $size }}{{ end }} position-relative {{ if in (slice "disabled" "active") $state }}{{ $state }}{{ end }} {{ $class }}" role="button" {{ if eq $state "disabled" }}aria-disabled="true"{{ end -}}
{{- else }}class="link-{{ $color }} position-relative {{ $class }}"{{ end -}}
{{- with $tooltip }}data-bs-toggle="tooltip" data-bs-title="{{ . }}" data-bs-placement="{{ $placement }}"{{ end -}}
{{- with $collapse }}data-bs-toggle="collapse" aria-expanded="false" aria-controls="{{ . }}"{{ end -}}
{{- if eq $state "active" }}data-bs-toggle="button" aria-pressed="true"{{ end -}}
{{- if eq $state "inactive" }}data-bs-toggle="button" aria-pressed="false"{{ end -}}
>
<div class="d-flex justify-content-{{ $justify }}">
<div>{{ $title }}</div>
{{- with $icon }}<div class="align-self-center{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon) }}</div>{{ end }}
</div>
{{- with $badge }}
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
{{ . }}
{{ with $label }}<span class="visually-hidden">{{ . }}</span>{{ end }}
</span>
{{- end -}}
</a>

View File

@@ -31,24 +31,26 @@
{{- $page := .page -}} {{- $page := .page -}}
{{- if ne (printf "%T" $page) "*hugolib.pageState" -}} {{- if ne (printf "%T" $page) "*hugolib.pageState" -}}
{{- errorf "Invalid value for param 'page'" -}} {{- errorf "partial [assets/card-group.html] - Invalid value for param 'page'" -}}
{{- end -}} {{- end -}}
{{- $supportedTypes := slice "page.Pages" "resource.Resources" -}}
{{ $list := .list }} {{ $list := .list }}
{{- if ne (printf "%T" $list) "page.Pages" -}} {{- if not (in $supportedTypes (printf "%T" $list)) -}}
{{- errorf "Invalid value for param 'items'" -}} {{ warnf "Type: %T" $list }}
{{- errorf "partial [assets/card-group.html] - Invalid value for param 'list'" -}}
{{- end -}} {{- end -}}
{{- $count := len $list -}} {{- $count := len $list -}}
{{- $max := .max -}} {{- $max := .max -}}
{{- if ne (printf "%T" $max) "int" -}} {{- if ne (printf "%T" $max) "int" -}}
{{- errorf "Invalid value for param 'max'" -}} {{- errorf "partial [assets/card-group.html] - Invalid value for param 'max'" -}}
{{- end -}} {{- end -}}
{{- $max = math.Min $max $count -}} {{- $max = math.Min $max $count -}}
{{- $cols := .cols -}} {{- $cols := .cols -}}
{{- if or (lt $cols 1) (gt $cols 5) -}} {{- if or (lt $cols 1) (gt $cols 5) -}}
{{- errorf "Invalid value for param 'cols': %d" $cols -}} {{- errorf "partial [assets/card-group.html] - Invalid value for param 'cols': %d" $cols -}}
{{- end -}} {{- end -}}
{{- $colGrid := "row-cols-1" -}} {{- $colGrid := "row-cols-1" -}}
{{- if eq $cols 2 }}{{ $colGrid = "row-cols-1 row-cols-sm-1 row-cols-md-2" -}} {{- if eq $cols 2 }}{{ $colGrid = "row-cols-1 row-cols-sm-1 row-cols-md-2" -}}
@@ -61,7 +63,7 @@
{{- $paginate := false -}} {{- $paginate := false -}}
{{- with .paginate -}} {{- with .paginate -}}
{{- if ne (printf "%T" .) "bool" -}} {{- if ne (printf "%T" .) "bool" -}}
{{- errorf "Invalid value for param 'paginate'" -}} {{- errorf "partial [assets/card-group.html] - Invalid value for param 'paginate'" -}}
{{- end -}} {{- end -}}
{{- $paginate = . -}} {{- $paginate = . -}}
{{- end -}} {{- end -}}
@@ -75,7 +77,7 @@
{{- $separator := false -}} {{- $separator := false -}}
{{- with .separator -}} {{- with .separator -}}
{{- if ne (printf "%T" .) "bool" -}} {{- if ne (printf "%T" .) "bool" -}}
{{- errorf "Invalid value for param 'separator'" -}} {{- errorf "partial [assets/card-group.html] - Invalid value for param 'separator'" -}}
{{- end -}} {{- end -}}
{{- $separator = . -}} {{- $separator = . -}}
{{- end -}} {{- end -}}
@@ -89,54 +91,50 @@
<div class="container-fluid p-4 px-xxl-0"> <div class="container-fluid p-4 px-xxl-0">
{{ with $title }}<p class="display-4 mt-3{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }} {{ with $title }}<p class="display-4 mt-3{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}
{{ $paginator := "" }}
{{ if $paginate }} {{ if $paginate }}
<div class="row {{ $colGrid }}"> {{ $paginator = $page.Paginate $list }}
{{ $paginator := $page.Paginate $list }} {{ $list = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $list) }}
{{ range $index, $element := first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $list) }} {{ end }}
<div class="col pt-3 pb-3">
{{- partial "assets/card.html" (dict <div class="row {{ $colGrid }}">
"path" $element.File.Path {{ range $index, $element := $list }}
"class" (printf "h-100 %s" $class) {{- $params := (dict
"color" $color "class" (printf "h-100 %s" $class)
"padding" $padding "color" $color
"header" $header "padding" $padding
"footer" $footer "header" $header
"orientation" $orientation "footer" $footer
) "orientation" $orientation
-}} ) -}}
{{- if $element.IsPage -}}
{{- $params = merge $params (dict "path" $element.File.Path) -}}
{{- else -}}
{{- $params = merge $params (dict
"title" $element.Title
"href" (or $element.Permalink "#!")
"description" $element.Description
"thumbnail" $element.Params.thumbnail
"icon" $element.Params.icon
) -}}
{{- end -}}
<div class="col pt-3 pb-3">
{{- partial "assets/card.html" $params -}}
</div>
{{- if and (lt $index (sub $max 1)) $separator -}}
<div class="col d-block d-sm-none">
<hr>
</div> </div>
{{- if and (lt $index (sub $max 1)) $separator -}} {{- end -}}
<div class="col d-block d-sm-none"> {{- end -}}
<hr> </div>
</div>
{{- end -}} {{ if $paginate }}
{{ end }}
</div>
{{- if gt $paginator.TotalPages 1 -}} {{- if gt $paginator.TotalPages 1 -}}
{{- partial "assets/pagination.html" $page -}} <div class="pt-3">{{ partial "assets/pagination.html" $page }}</div>
{{- end -}} {{- end -}}
{{ else }} {{ else }}
<div class="row {{ $colGrid }}">
{{ range $index, $element := $list }}
<div class="col pt-3 pb-3">
{{- partial "assets/card.html" (dict
"path" $element.File.Path
"class" (printf "h-100 %s" $class)
"color" $color
"padding" $padding
"header" $header
"footer" $footer
"orientation" $orientation
)
-}}
</div>
{{- if and (lt $index (sub $max 1)) $separator -}}
<div class="col d-block d-sm-none">
<hr>
</div>
{{- end -}}
{{ end }}
</div>
{{ if gt $count $max }} {{ if gt $count $max }}
<a class="btn btn-outline-primary" href="{{ $moreURL| safeURL }}" role="button">{{ $moreTitle }}</a> <a class="btn btn-outline-primary" href="{{ $moreURL| safeURL }}" role="button">{{ $moreTitle }}</a>
{{ end }} {{ end }}

View File

@@ -69,7 +69,7 @@
{{- if .path }} {{- if .path }}
{{- $page = site.GetPage .path }} {{- $page = site.GetPage .path }}
{{- if not $page }} {{- if not $page }}
{{- errorf "Cannot find page: %s" .path -}} {{- errorf "partial [assets/card.html] - Cannot find page: %s" .path -}}
{{- end }} {{- end }}
{{- end }} {{- end }}
@@ -84,7 +84,7 @@
{{- if $color -}} {{- if $color -}}
{{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" "body" "body-tertiary" -}} {{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" "body" "body-tertiary" -}}
{{- if not (in $supportedColors $color) -}} {{- if not (in $supportedColors $color) -}}
{{- errorf "Invalid value for param 'color': %s" $color -}} {{- errorf "partial [assets/card.html] - Invalid value for param 'color': %s" $color -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -92,13 +92,13 @@
{{- with .header }}{{ $header = . }}{{ end -}} {{- with .header }}{{ $header = . }}{{ end -}}
{{- $supportedKeywords := slice "full" "publication" "tags" "none" -}} {{- $supportedKeywords := slice "full" "publication" "tags" "none" -}}
{{- if not (in $supportedKeywords $header) -}} {{- if not (in $supportedKeywords $header) -}}
{{- errorf "Invalid value for param 'header': %s" $header -}} {{- errorf "partial [assets/card.html] - Invalid value for param 'header': %s" $header -}}
{{- end -}} {{- end -}}
{{- $footer := "none" -}} {{- $footer := "none" -}}
{{- with .footer }}{{ $footer = . }}{{ end -}} {{- with .footer }}{{ $footer = . }}{{ end -}}
{{- if not (in $supportedKeywords $footer) -}} {{- if not (in $supportedKeywords $footer) -}}
{{- errorf "Invalid value for param 'footer': %s" $footer -}} {{- errorf "partial [assets/card.html] - Invalid value for param 'footer': %s" $footer -}}
{{- end -}} {{- end -}}
{{- with $page -}} {{- with $page -}}
@@ -110,7 +110,7 @@
{{- end -}} {{- end -}}
{{- if not $href -}} {{- if not $href -}}
{{- errorf "Missing value for param 'href'" -}} {{- errorf "partial [assets/card.html] - Missing value for param 'href'" -}}
{{- end -}} {{- end -}}
{{- $class := .class -}} {{- $class := .class -}}
@@ -119,14 +119,14 @@
{{- with .padding }}{{ $padding = . }}{{ end -}} {{- with .padding }}{{ $padding = . }}{{ end -}}
{{- $supportedPaddings := slice "0" "1" "2" "3" "4" "5" "auto" -}} {{- $supportedPaddings := slice "0" "1" "2" "3" "4" "5" "auto" -}}
{{- if not (in $supportedPaddings $padding) -}} {{- if not (in $supportedPaddings $padding) -}}
{{- errorf "Invalid value for param 'padding': %s" $padding -}} {{- errorf "partial [assets/card.html] - Invalid value for param 'padding': %s" $padding -}}
{{- end -}} {{- end -}}
{{- $orientation := "stacked" -}} {{- $orientation := "stacked" -}}
{{- with .orientation }}{{ $orientation = . }}{{ end -}} {{- with .orientation }}{{ $orientation = . }}{{ end -}}
{{- $supportedOrientations := slice "stacked" "horizontal" "none" -}} {{- $supportedOrientations := slice "stacked" "horizontal" "none" -}}
{{- if not (in $supportedOrientations $orientation) -}} {{- if not (in $supportedOrientations $orientation) -}}
{{- errorf "Invalid value for param 'orientation': %s" $orientation -}} {{- errorf "partial [assets/card.html] - Invalid value for param 'orientation': %s" $orientation -}}
{{- end -}} {{- end -}}
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}} {{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
@@ -135,7 +135,7 @@
<div class="row g-0"> <div class="row g-0">
<div class="col-4"> <div class="col-4">
{{- if $thumbnail -}} {{- if $thumbnail -}}
{{- partial "image.html" (dict "url" $thumbnail "ratio" "1x1" "outerClass" "h-100 card-img-wrap" "innerClass" "rounded-start card-img-h100" "title" $title) -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "1x1" "outerClass" "h-100 card-img-wrap" "innerClass" "rounded-start card-img-h100" "title" $title) -}}
{{- else if $icon -}} {{- else if $icon -}}
<div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}"> <div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}">
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}} {{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
@@ -144,11 +144,11 @@
</div> </div>
<div class="col-8"> <div class="col-8">
<div class="card-body d-flex p-{{ $padding }} flex-column h-100"> <div class="card-body d-flex p-{{ $padding }} flex-column h-100">
<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div> {{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>{{ end }}
<div class="h-100"> <div class="h-100">
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}} {{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}}
</div> </div>
<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div> {{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>{{ end }}
</div> </div>
</div> </div>
</div> </div>
@@ -156,16 +156,16 @@
{{- else -}} {{- else -}}
<div class="card {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}"> <div class="card {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}">
{{- if $thumbnail -}} {{- if $thumbnail -}}
{{- partial "image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" "card-img-wrap" "innerClass" "card-img-top" "title" $title) -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" "card-img-wrap" "innerClass" "card-img-top" "title" $title) -}}
{{- else if $icon -}} {{- else if $icon -}}
<div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}"> <div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}">
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}} {{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
</div> </div>
{{- end -}} {{- end -}}
<div class="card-body d-flex flex-column p-{{ $padding }}"> <div class="card-body d-flex flex-column p-{{ $padding }}">
{{- partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) -}} {{ if $page }}{{- partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) -}}{{ end }}
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}} {{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}}
{{- partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) -}} {{ if $page }}{{- partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) -}}{{ end }}
</div> </div>
</div> </div>
{{- end -}} {{- end -}}

View File

@@ -1,6 +1,6 @@
{{- $icon := .icon -}} {{- $icon := .icon -}}
{{- if not $icon -}} {{- if not $icon -}}
{{- errorf "Expected value for param 'icon'" -}} {{- errorf "partial [assets/icon.html] - Expected value for param 'icon'" -}}
{{- end -}} {{- end -}}
{{- $icon_class := split $icon " " -}} {{- $icon_class := split $icon " " -}}
@@ -12,5 +12,5 @@
{{- else if eq (index $icon_class 0) "fa" -}} {{- else if eq (index $icon_class 0) "fa" -}}
<i class="fa-regular fa-{{ $attr }}"></i> <i class="fa-regular fa-{{ $attr }}"></i>
{{- else -}} {{- else -}}
{{- errorf "Unrecognized icon class: %s" $icon_class -}} {{- errorf "partial [assets/icon.html] - Unrecognized icon class: %s" $icon_class -}}
{{- end -}} {{- end -}}

View File

@@ -26,7 +26,7 @@
{{- $title := .title -}} {{- $title := .title -}}
{{- $caption := .caption -}} {{- $caption := .caption -}}
{{- if ne (printf "%T" $mode) "bool" -}} {{- if ne (printf "%T" $mode) "bool" -}}
{{- errorf "Invalid value for param 'mode'" -}} {{- errorf "partial [assets/image.html] - Invalid value for param 'mode'" -}}
{{- end -}} {{- end -}}
{{- $modes := site.Params.main.modes | default (slice "light" "dark") -}} {{- $modes := site.Params.main.modes | default (slice "light" "dark") -}}

View File

@@ -27,18 +27,19 @@
{{- define "partials/list-img.html" -}} {{- define "partials/list-img.html" -}}
{{- $thumbnail := .thumbnail -}} {{- $thumbnail := .thumbnail -}}
{{- $style := .style -}} {{- $style := .style -}}
{{- $mode := .mode -}}
{{- partial "image.html" (dict "url" $thumbnail "outerClass" $style "mode" true) -}} {{- partial "assets/image.html" (dict "url" $thumbnail "outerClass" $style "mode" $mode) -}}
{{- end -}} {{- end -}}
{{- $page := .page -}} {{- $page := .page -}}
{{- if ne (printf "%T" $page) "*hugolib.pageState" -}} {{- if ne (printf "%T" $page) "*hugolib.pageState" -}}
{{- errorf "Invalid value for param 'page'" -}} {{- errorf "partial [assets/list.html] - Invalid value for param 'page'" -}}
{{- end -}} {{- end -}}
{{- $supportedTypes := slice "page.Pages" "resource.Resources" -}}
{{ $list := .list }} {{ $list := .list }}
{{- if ne (printf "%T" $list) "resource.Resources" -}} {{- if not (in $supportedTypes (printf "%T" $list)) -}}
{{- errorf "Invalid value for param 'items'" -}} {{- errorf "partial [assets/list.html] - Invalid value for param 'list'" -}}
{{- end -}} {{- end -}}
{{- $title := .title -}} {{- $title := .title -}}
@@ -47,7 +48,6 @@
{{ $vertical := false }} {{ $vertical := false }}
{{ $type := "pills" }} {{ $type := "pills" }}
{{- $id := .Ordinal -}}
<div class="d-none d-md-block p-0"> <div class="d-none d-md-block p-0">
{{- range $index, $item := $list -}} {{- range $index, $item := $list -}}
@@ -64,10 +64,10 @@
{{- $style = "reveal fade-bottom-n5 rotate-n5 ps-3" -}} {{- $style = "reveal fade-bottom-n5 rotate-n5 ps-3" -}}
{{- if $odd }}{{ $style = "reveal fade-bottom-5 rotate-5 pe-3" }}{{ end }} {{- if $odd }}{{ $style = "reveal fade-bottom-5 rotate-5 pe-3" }}{{ end }}
{{ end }} {{ end }}
{{ partial "partials/list-img.html" (dict "thumbnail" $item.Params.Thumbnail "style" $style) }} {{ partial "partials/list-img.html" (dict "thumbnail" $item.Params.Thumbnail "style" $style "mode" $item.Params.colormode) }}
</div> </div>
<div class="col-6{{ if $odd }} order-first{{ end }} psw-lg-5 p-5"> <div class="col-6{{ if $odd }} order-first{{ end }} psw-lg-5 p-5">
{{ partial "partials/list-content.html" (dict "title" $item.Title "content" $item.Content )}} {{ partial "partials/list-content.html" (dict "title" $item.Title "content" (or $item.Description $item.Content)) }}
</div> </div>
</div> </div>
</div> </div>
@@ -83,10 +83,10 @@
{{ end }} {{ end }}
<div class="row pt-5 pb-5 align-items-center flex-fill row-cols-2"> <div class="row pt-5 pb-5 align-items-center flex-fill row-cols-2">
<div class="col-12 text-center"> <div class="col-12 text-center">
{{ partial "partials/list-img.html" (dict "thumbnail" $item.Params.Thumbnail)}} {{ partial "partials/list-img.html" (dict "thumbnail" $item.Params.Thumbnail "mode" $item.Params.colormode) }}
</div> </div>
<div class="col-12 p-3"> <div class="col-12 p-3">
{{ partial "partials/list-content.html" (dict "title" $item.Title "content" $item.Content )}} {{ partial "partials/list-content.html" (dict "title" $item.Title "content" (or $item.Description $item.Content)) }}
</div> </div>
</div> </div>
</div> </div>

View File

@@ -3,10 +3,12 @@
supports the following arguments: supports the following arguments:
"page" Required context of the current page. "page" Required context of the current page.
"list" Required array of pages. "list" Required array of pages.
"title" Optional title of the card group. "title" Optional title of the tab group.
"type" Optional type of the tab group, either "tabs", "pills", or "underline". "type" Optional type of the tab group, either "tabs", "pills" (default), or "underline".
"vertical" Optional flag to show vertical tabs instead of horizontal tabs (default). "vertical" Optional flag to show vertical tabs instead of horizontal tabs (default).
"class": Optional class attribute of the tab group, e.g. “nav-fill”. "class" Optional class attribute of the tab group, e.g. “nav-fill”.
"pane" Optional style of the panes, either "none" (default) or "persona".
"width" Optional responsive width of the tab group, either "50" or "100" (default).
In addition, the following arguments are passed to the individual tabs. In addition, the following arguments are passed to the individual tabs.
"class" Optional class attribute of the tab element, e.g. “w-50”. "class" Optional class attribute of the tab element, e.g. “w-50”.
@@ -16,47 +18,96 @@
{{- $page := .page -}} {{- $page := .page -}}
{{- if ne (printf "%T" $page) "*hugolib.pageState" -}} {{- if ne (printf "%T" $page) "*hugolib.pageState" -}}
{{- errorf "Invalid value for param 'page'" -}} {{- errorf "partial [assets/nav.html] - Invalid value for param 'page'" -}}
{{- end -}} {{- end -}}
{{- $id := "0" -}}
{{- with .id -}}
{{ $id = . }}
{{ end }}
{{- $supportedTypes := slice "page.Pages" "resource.Resources" -}}
{{ $list := .list }} {{ $list := .list }}
{{- if ne (printf "%T" $list) "resource.Resources" -}} {{- if not (in $supportedTypes (printf "%T" $list)) -}}
{{- errorf "Invalid value for param 'items'" -}} {{- errorf "partial [assets/nav.html] - Invalid value for param 'list'" -}}
{{- end -}} {{- end -}}
{{ $pane := "none" }}
{{ with .pane }}
{{- $supportedPanes := slice "none" "persona" -}}
{{- $pane = . }}
{{- if not (in $supportedPanes $pane) -}}
{{- errorf "partial [assets/nav.html] - Invalid value for param 'pane'" -}}
{{- end -}}
{{ end }}
{{ $supportedWidths := slice 50 100 -}}
{{ $widthParam := 100 -}}
{{ $width := 100 }}
{{ with .width }}{{ $widthParam = . }}{{ end -}}
{{ if in $supportedWidths $widthParam -}}
{{ $width = int $widthParam }}
{{ else -}}
{{ errorf "partial [assets/nav.html] - Invalid value for param 'width': %s" $widthParam -}}
{{ end -}}
{{- $title := .title -}} {{- $title := .title -}}
{{- $class := .class -}} {{- $class := .class -}}
{{- $color := .color -}} {{- $color := .color -}}
{{ $supportedFlags := slice "true" "false" -}}
{{ $verticalParam := "false" -}}
{{ $vertical := false }} {{ $vertical := false }}
{{ with .vertical }}{{ $verticalParam = . }}{{ end -}}
{{ if in $supportedFlags $verticalParam -}}
{{ if eq $verticalParam "true" }}{{ $vertical = true }}{{ else }}{{ $vertical = false }}{{ end -}}
{{ else -}}
{{ errorf "partial [assets/nav.html] - Invalid value for param 'vertical': %s" $verticalParam -}}
{{ end -}}
{{ $type := "pills" }} {{ $type := "pills" }}
{{- $id := .Ordinal -}} {{ with .type }}
{{ $type = . -}}
{{ if $vertical }}<div class="d-flex align-items-start">{{ end }} {{ $supportedNavTypes := slice "tabs" "pills" "underline" -}}
<div class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}> {{ if $type }}
{{- range $index, $item := $list -}} {{ if not (in $supportedNavTypes $type) -}}
{{ $show := eq $index 0}} {{ errorf "partial [assets/nav.html] - Invalid value for param 'type': %s" $type -}}
<button class="nav-link text-nowrap{{ if $show }} active{{ end }}" id="nav-{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#nav-{{ $id }}-{{ $index }}" {{ end -}}
type="button" role="tab" aria-controls="nav-{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
{{ $item.Title }}
</button>
{{ end -}} {{ end -}}
</div> {{ end -}}
<div class="tab-content {{ if eq $type "tabs" }}border border-top-0 p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}"> {{ with $title }}<p class="display-4 pt-5{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}
{{ range $index, $item := $list }} <div class="{{ if eq $width 50 }}col-sm-12 col-md-10 col-lg-8 col-xl-6{{ else }}col-12{{ end }} mx-auto pt-5 pb-5">
{{ $header := $item.Title }} {{ if $vertical }}<div class="d-flex align-items-start">{{ end }}
{{ $body := $item.Content }} <div class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
{{ $show := eq $index 0}} {{- range $index, $item := $list -}}
<div class="tab-pane{{ if $show }} active{{ end }}" id="nav-{{ $id }}-{{ $index }}" role="tabpanel" aria-labelledby="{{ $id }}-btn-{{ $index }}" tabindex="0"> {{ $show := eq $index 0}}
{{- partial "assets/persona.html" (dict <button class="nav-link text-nowrap{{ if $show }} active{{ end }}" id="nav-{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#nav-{{ $id }}-{{ $index }}"
"title" $item.Title type="button" role="tab" aria-controls="nav-{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
"class" $class {{ $item.Title }}
"color" $color </button>
"content" $item.Content {{ end -}}
"thumbnail" $item.Params.Thumbnail </div>
) -}}
</div> <div class="tab-content {{ if eq $type "tabs" }}border border-top-0 p-3{{ else if $vertical }}ms-3{{ else }}mt-3{{ end }}">
{{ end }} {{ range $index, $item := $list }}
</div> {{ $header := $item.Title }}
{{ if $vertical }}</div>{{ end }} {{ $body := $item.Content }}
{{ $show := eq $index 0}}
<div class="tab-pane{{ if $show }} active{{ end }}" id="nav-{{ $id }}-{{ $index }}" role="tabpanel" aria-labelledby="{{ $id }}-btn-{{ $index }}" tabindex="0">
{{- if eq $pane "persona" -}}
{{- partial "assets/persona.html" (dict
"title" $item.Title
"class" $class
"color" $color
"content" (or $item.Description $item.Content)
"thumbnail" $item.Params.Thumbnail
) -}}
{{- else -}}
{{- (or $item.Description $item.Content) -}}
{{- end -}}
</div>
{{ end }}
</div>
{{ if $vertical }}</div>{{ end }}
</div>

View File

@@ -55,21 +55,21 @@
{{- $page := .page -}} {{- $page := .page -}}
{{- if not $page -}} {{- if not $page -}}
{{- errorf "Missing value for param 'page'" -}} {{- errorf "partial [assets/navbar.html] - Missing value for param 'page'" -}}
{{- end -}} {{- end -}}
{{- $menuName := "main" }} {{- $menuName := "main" }}
{{- with .menus }}{{ $menuName = .}}{{ end -}} {{- with .menus }}{{ $menuName = .}}{{ end -}}
{{- $menus := index site.Menus $menuName -}} {{- $menus := index site.Menus $menuName -}}
{{- if or (ne (printf "%T" $menus) "navigation.Menu") (ne (index $menus 0).Menu $menuName) -}} {{- if or (ne (printf "%T" $menus) "navigation.Menu") (ne (index $menus 0).Menu $menuName) -}}
{{- errorf "Invalid value for param 'menus': %s" $menuName -}} {{- errorf "partial [assets/navbar.html] - Invalid value for param 'menus': %s" $menuName -}}
{{- end -}} {{- end -}}
{{- $size := "md" -}} {{- $size := "md" -}}
{{- with .size }}{{ $size = . }}{{ end -}} {{- with .size }}{{ $size = . }}{{ end -}}
{{- $supportedSizes := slice "xs" "sm" "md" "lg" "xl" -}} {{- $supportedSizes := slice "xs" "sm" "md" "lg" "xl" -}}
{{- if not (in $supportedSizes $size) -}} {{- if not (in $supportedSizes $size) -}}
{{- errorf "Invalid value for param 'size': %s" $size -}} {{- errorf "partial [assets/navbar.html] - Invalid value for param 'size': %s" $size -}}
{{- end -}} {{- end -}}
{{- $fixedParam := "false" -}} {{- $fixedParam := "false" -}}
@@ -78,7 +78,7 @@
{{- if in $supportedFlags $fixedParam -}} {{- if in $supportedFlags $fixedParam -}}
{{- if eq $fixedParam "true" }}{{ $fixed = true }}{{ else }}{{ $fixed = false }}{{ end -}} {{- if eq $fixedParam "true" }}{{ $fixed = true }}{{ else }}{{ $fixed = false }}{{ end -}}
{{- else -}} {{- else -}}
{{- errorf "Invalid value for param 'fixed': %s" $fixedParam -}} {{- errorf "partial [assets/navbar.html] - Invalid value for param 'fixed': %s" $fixedParam -}}
{{- end -}} {{- end -}}
{{- $color := "" -}} {{- $color := "" -}}
@@ -86,7 +86,7 @@
{{- $color = . -}} {{- $color = . -}}
{{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" "body" "body-tertiary" -}} {{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" "body" "body-tertiary" -}}
{{- if not (in $supportedColors $color) -}} {{- if not (in $supportedColors $color) -}}
{{- errorf "Invalid value for param 'color': %s" $color -}} {{- errorf "partial [assets/navbar.html] - Invalid value for param 'color': %s" $color -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -96,7 +96,7 @@
{{- if in $supportedFlags $searchParam -}} {{- if in $supportedFlags $searchParam -}}
{{- if eq $searchParam "true" }}{{ $search = true }}{{ else }}{{ $search = false }}{{ end -}} {{- if eq $searchParam "true" }}{{ $search = true }}{{ else }}{{ $search = false }}{{ end -}}
{{- else -}} {{- else -}}
{{- errorf "Invalid value for param 'search': %s" $searchParam -}} {{- errorf "partial [assets/navbar.html] - Invalid value for param 'search': %s" $searchParam -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -106,7 +106,7 @@
{{- if in $supportedFlags $darkModeParam -}} {{- if in $supportedFlags $darkModeParam -}}
{{- if eq $darkModeParam "true" }}{{ $enableDarkMode = site.Params.main.enableDarkMode }}{{ else }}{{ $enableDarkMode = false }}{{ end -}} {{- if eq $darkModeParam "true" }}{{ $enableDarkMode = site.Params.main.enableDarkMode }}{{ else }}{{ $enableDarkMode = false }}{{ end -}}
{{- else -}} {{- else -}}
{{- errorf "Invalid value for param 'darkMode': %s" $darkModeParam -}} {{- errorf "partial [assets/navbar.html] - Invalid value for param 'darkMode': %s" $darkModeParam -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}

View File

@@ -29,7 +29,7 @@
{{- if .path }} {{- if .path }}
{{- $page = site.GetPage .path }} {{- $page = site.GetPage .path }}
{{- if not $page }} {{- if not $page }}
{{- errorf "Cannot find page: %s" .path -}} {{- errorf "partial [assets/persona.html] - Cannot find page: %s" .path -}}
{{- end }} {{- end }}
{{- end }} {{- end }}
@@ -43,7 +43,7 @@
{{- if $color -}} {{- if $color -}}
{{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" "body" "body-tertiary" -}} {{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" "body" "body-tertiary" -}}
{{- if not (in $supportedColors $color) -}} {{- if not (in $supportedColors $color) -}}
{{- errorf "Invalid value for param 'color': %s" $color -}} {{- errorf "partial [assets/persona.html] - Invalid value for param 'color': %s" $color -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -61,7 +61,7 @@
<div class="col-2"> <div class="col-2">
<div class="position-absolute top-50 start-0 translate-middle-y col-4 ps-3"> <div class="position-absolute top-50 start-0 translate-middle-y col-4 ps-3">
{{- if $thumbnail -}} {{- if $thumbnail -}}
{{- partial "image.html" (dict "url" $thumbnail "ratio" "1x1" "innerClass" "rounded-5") -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "1x1" "innerClass" "rounded-5") -}}
{{ end }} {{ end }}
</div> </div>
</div> </div>
@@ -81,7 +81,7 @@
<div class="col-12"> <div class="col-12">
<div class="position-absolute top-25 start-50 translate-middle col-6"> <div class="position-absolute top-25 start-50 translate-middle col-6">
{{- if $thumbnail -}} {{- if $thumbnail -}}
{{- partial "image.html" (dict "url" $thumbnail "ratio" "1x1" "innerClass" "rounded-5") -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "1x1" "innerClass" "rounded-5") -}}
{{ end }} {{ end }}
</div> </div>
</div> </div>

View File

@@ -1,9 +1,9 @@
{{- $page := .page }} {{- $page := .page }}
{{- $section := .section }} {{- $section := .section }}
{{- if not $section }}{{ errorf "Missing value for param 'section'" }}{{ end -}} {{- if not $section }}{{ errorf "partial [assets/section-list.html] - Missing value for param 'section'" }}{{ end -}}
{{- $home := .home }} {{- $home := .home }}
{{ if ne (printf "%T" $home) "bool" }} {{ if ne (printf "%T" $home) "bool" }}
{{ errorf "Invalid value for param 'home'"}} {{ errorf "partial [assets/section-list.html] - Invalid value for param 'home'"}}
{{ end }} {{ end }}
{{- $title := .title -}} {{- $title := .title -}}
{{- $moreTitle := .moreTitle -}} {{- $moreTitle := .moreTitle -}}
@@ -11,7 +11,7 @@
{{- $paginate := true -}} {{- $paginate := true -}}
{{- $sort := "date" -}} {{- $sort := "date" -}}
{{- $reverse := true -}} {{- $order := "desc" -}}
{{- $separator := false -}} {{- $separator := false -}}
{{- $orientation := "stacked" -}} {{- $orientation := "stacked" -}}
{{- $cols := 3 -}} {{- $cols := 3 -}}
@@ -22,11 +22,16 @@
{{- $style := "" -}} {{- $style := "" -}}
{{- $homepage := 3 -}} {{- $homepage := 3 -}}
{{- $background := "" -}} {{- $background := "" -}}
{{- $layout := "card" -}}
{{- $pane := "none" -}}
{{- $type := "pills" -}}
{{- $vertical := "false" -}}
{{- $width := 100 -}}
{{- with (index site.Params $section) -}} {{- with (index site.Params.sections $section) -}}
{{- with index . "title" }}{{ $title = . }}{{ end -}} {{- with index . "title" }}{{ $title = or $.title . }}{{ end -}}
{{- with index . "sort" }}{{ $sort = . }}{{ end -}} {{- with index . "sort" }}{{ $sort = . }}{{ end -}}
{{- if (index . "reverse") }}{{ $reverse = true }}{{ else }}{{ $reverse = false }}{{ end -}} {{- if (index . "reverse") }}{{ $order = "desc" }}{{ else }}{{ $order = "asc" }}{{ end -}}
{{- if (index . "separator") }}{{ $separator = true }}{{ else }}{{ $separator = false }}{{ end -}} {{- if (index . "separator") }}{{ $separator = true }}{{ else }}{{ $separator = false }}{{ end -}}
{{- with index . "orientation" }}{{ $orientation = . }}{{ end -}} {{- with index . "orientation" }}{{ $orientation = . }}{{ end -}}
{{- with index . "cols" }}{{ $cols = . }}{{ end -}} {{- with index . "cols" }}{{ $cols = . }}{{ end -}}
@@ -37,53 +42,80 @@
{{- with index . "style" }}{{ $style = . }}{{ end -}} {{- with index . "style" }}{{ $style = . }}{{ end -}}
{{- with index . "homepage" }}{{ $homepage = . }}{{ end -}} {{- with index . "homepage" }}{{ $homepage = . }}{{ end -}}
{{- with index . "background" }}{{ $background = . }}{{ end -}} {{- with index . "background" }}{{ $background = . }}{{ end -}}
{{- with index . "layout" }}{{ $layout = . }}{{ end -}}
{{- with index . "pane" }}{{ $pane = . }}{{ end -}}
{{- with index . "type" }}{{ $type = . }}{{ end -}}
{{- with index . "vertical" }}{{ $vertical = . }}{{ end -}}
{{- with index . "width" }}{{ $width = . }}{{ end -}}
{{- end -}} {{- end -}}
{{- $list := where site.RegularPages "Type" "in" $section -}} {{ $list := where site.RegularPages "Type" "in" $section }}
{{- $max := (len $list) -}} {{ $max := (len $list) -}}
{{- if $home -}} {{ if eq $max 0 }}
{{- $paginate = false -}} {{- $bundle := site.GetPage $section -}}
{{- $max = int (math.Min $homepage $max) -}} {{- $list = $bundle.Resources.Match "*" -}}
{{ end -}} {{- $max = len $list -}}
{{ end }}
{{- $list = sort $list (printf "Params.%s" $sort) $order -}}
{{- $cols = int (math.Min $cols $max) -}} {{- $supportedLayouts := slice "card" "list" "nav" -}}
{{- if not (in $supportedLayouts $layout) -}}
{{- if eq $sort "weight" -}} {{- errorf "partial [assets/section-list.html] - Invalid value for param 'layout': %s" $layout -}}
{{- $list = $list.ByWeight -}}
{{- else if eq $sort "publication" -}}
{{- $list = $list.ByPublishDate -}}
{{- else if eq $sort "expiration" -}}
{{- $list = $list.ByExpiryDate -}}
{{- else if eq $sort "lastmod" -}}
{{- $list = $list.ByLastmod -}}
{{- else if eq $sort "length" -}}
{{- $list = $list.ByLength -}}
{{- else if eq $sort "title" -}}
{{- $list = $list.ByTitle -}}
{{- else if eq $sort "linktitle" -}}
{{- $list = $list.ByLinkTitle -}}
{{- else if ne $sort "date" -}}
{{- $list = $list.ByParam $sort -}}
{{- end -}} {{- end -}}
{{- if $reverse -}}{{- $list = $list.Reverse -}}{{ end -}}
<div class="container-xxl flex-fill p-0{{ with $background }} bg-{{ . }}{{ end }}"> {{ if gt $max 0 }}
{{- partial "assets/card-group.html" (dict {{- if $home -}}
{{- $paginate = false -}}
{{- $max = int (math.Min $homepage $max) -}}
{{ end -}}
{{- $cols = int (math.Min $cols $max) -}}
{{- $params := (dict
"page" $page "page" $page
"list" $list "list" $list
"max" $max
"cols" $cols
"title" $title "title" $title
"href" $sectionURL
"hrefTitle" $moreTitle
"separator" $separator
"paginate" $paginate
"class" $style "class" $style
"orientation" $orientation
"color" $color "color" $color
"padding" $padding )
"header" $header
"footer" $footer
)
-}} -}}
</div> {{- $partial := "" -}}
<div class="container-fluid {{ with $background }} bg-{{ . }}{{ end }}">
<div class="container-xxl flex-fill p-0">
{{ if eq $layout "card" }}
{{- $partial = "assets/card-group.html" -}}
{{- $params = merge $params (dict
"max" $max
"cols" $cols
"href" $sectionURL
"hrefTitle" $moreTitle
"separator" $separator
"paginate" $paginate
"orientation" $orientation
"padding" $padding
"header" $header
"footer" $footer
)
-}}
{{ else if eq $layout "nav" }}
{{- $partial = "assets/nav.html" -}}
{{- $params = merge $params (dict
"layout" $layout
"id" $section
"pane" $pane
"type" $type
"vertical" $vertical
"width" $width
)
-}}
{{- else -}}
{{- $partial = "assets/list.html" -}}
{{- $params = merge $params (dict
"layout" $layout
)
-}}
{{- end -}}
{{- partial $partial $params -}}
</div>
</div>
{{- end -}}

View File

@@ -1,58 +0,0 @@
{{- $page := .page }}
{{- $section := .section }}
{{- if not $section }}{{ errorf "Missing value for param 'section'" }}{{ end -}}
{{- $bundle := site.GetPage $section -}}
{{- $title := $bundle.Title -}}
{{- $sort := "date" -}}
{{- $order := "desc" -}}
{{- $style := "" -}}
{{- $background := "" -}}
{{- $color := "" -}}
{{- $layout := "tabs" -}}
{{- with (index site.Params $section) -}}
{{- with index . "title" }}{{ $title = . }}{{ end -}}
{{- with index . "sort" }}{{ $sort = . }}{{ end -}}
{{- if (index . "reverse") }}{{ $order = "desc" }}{{ else }}{{ $order = "asc" }}{{ end -}}
{{- with index . "style" }}{{ $style = . }}{{ end -}}
{{- with index . "background" }}{{ $background = . }}{{ end -}}
{{- with index . "color" }}{{ $color = . }}{{ end -}}
{{- with index . "layout" }}{{ $layout = . }}{{ end -}}
{{- end -}}
{{- $list := $bundle.Resources.Match "*" -}}
{{- $list = sort $list (printf "Params.%s" $sort) $order -}}
<div class="container-fluid {{ with $background }} bg-{{ . }}{{ end }}">
<div class="container-xxl flex-fill p-0">
{{ if eq $layout "tabs" }}
<div class="p-0">
{{ with $title }}<p class="display-4 pt-5{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}
<div class="col-sm-12 col-md-10 col-lg-8 col-xl-6 mx-auto pt-5 pb-5">
{{- partial "assets/nav.html" (dict
"page" $page
"list" $list
"title" $title
"class" $style
"color" $color
"layout" $layout
)
-}}
</div>
</div>
{{- else -}}
<div class="p-0">
{{- partial "assets/list.html" (dict
"page" $page
"list" $list
"title" $title
"class" $style
"color" $color
"layout" $layout
)
-}}
</div>
{{- end -}}
</div>
</div>

View File

@@ -0,0 +1,23 @@
{{ $items := len (findRE "<li.*?>(.|\n)*?</li>" .TableOfContents) -}}
{{ if (gt $items 1) -}}
<div class="d-grid gap-2 mx-auto">
{{ partial "assets/button.html" (dict
"title" (T "toc")
"color" "secondary"
"outline" "true"
"class" "toc-button"
"icon" "fas sort"
"justify" "between"
"collapse" "toc-collapse"
"order" "last")
-}}
</div>
<p>
<div class="collapse border bg-body-tertiary rounded p-1 navbar-nav-scroll" id="toc-collapse">
<div class="toc toc-panel text-body-secondary p-2">
<small>{{ .TableOfContents }}</small>
</div>
</div>
</p>
{{ end -}}

View File

@@ -1,6 +1,6 @@
{{ $items := len (findRE "<li.*?>(.|\n)*?</li>" .TableOfContents) -}} {{ $items := len (findRE "<li.*?>(.|\n)*?</li>" .TableOfContents) -}}
{{ if (gt $items 1) -}} {{ if (gt $items 1) -}}
<div class="toc mb-5 my-md-0 ps-xl-3 mb-lg-5 p-3 text-body-secondary sticky-top"> <div class="toc toc-sidebar mb-5 my-md-0 ps-xl-3 mb-lg-5 p-3 text-body-secondary sticky-top">
<strong class="d-block h6 my-2 pb-2 border-bottom">{{ T "toc" }}</strong> <strong class="d-block h6 my-2 pb-2 border-bottom">{{ T "toc" }}</strong>
{{ .TableOfContents }} {{ .TableOfContents }}
</div> </div>

View File

@@ -1,105 +0,0 @@
<!--
Displays a button. The shortcode supports the following arguments:
"title" Required title of the button.
"href" Optional address for the button or hyperlink.
"id" Optional id of the button, to be used in the DOM.
"state" Optional state of the button, either "enabled" (default), "disabled", "active", or "inactive".
"size" Optional size of the button, either "sm", "md" (default), or "lg".
"color" Optional theme color of the element, either "primary" (default), "secondary", "success",
"danger", "warning", "info", "light", "dark", "white", or "black".
"outline" Optional flag indicating the button should be outlined, either "false" (default) or "true".
"badge" Optional positioned badge to display on top of the button.
"aria-label" Optional assistive label for the badge.
"tooltip" Optional text to display in a tooltip. Cannot be used together with collapse. Ignored for active/
inactive buttons.
"collapse" Optional panel to collapse. Cannot be used together with tooltip. Ignored for active/inactive buttons.
"type" Optional type of the element, either "link" or "button" (default).
"placement" Optional position of the tooltip: "top" (default), "bottom", "left", or "right".
-->
{{ $title := trim .title " \r\n" -}}
{{ if not $title -}}
{{ errorf "Missing element title" -}}
{{ end -}}
{{ $id := .id }}
{{ $state := "enabled" -}}
{{ with .state }}{{ $state = . }}{{ end -}}
{{ $supportedStates := slice "enabled" "disabled" "active" "inactive" -}}
{{ if not (in $supportedStates $state) -}}
{{ errorf "Invalid value for param 'state': %s" $state -}}
{{ end -}}
{{ $size := "md" -}}
{{ with .size }}{{ $size = . }}{{ end -}}
{{ $supportedSizes := slice "sm" "md" "lg" -}}
{{ if not (in $supportedSizes $size) -}}
{{ errorf "Invalid value for param 'size': %s" $size -}}
{{ end -}}
{{ $color := "primary" -}}
{{ with .color }}{{ $color = . }}{{ end -}}
{{ $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" -}}
{{ if not (in $supportedColors $color) -}}
{{ errorf "Invalid value for param 'color': %s" $color -}}
{{ end -}}
{{ $outline := false -}}
{{ with .outline }}{{ $outline = . }}{{ end -}}
{{ $badge := "" -}}
{{ with .badge }}{{ $badge = . }}{{ end -}}
{{ $label := "" -}}
{{ with .label }}{{ $label = . }}{{ end -}}
{{ $tooltip := "" -}}
{{ if not (strings.HasSuffix $state "active") -}}
{{ with .tooltip }}{{ $tooltip = . }}{{ end -}}
{{ end -}}
{{ $href := .href -}}
{{ $collapse := "" -}}
{{ if not (strings.HasSuffix $state "active") -}}
{{ with .collapse }}{{ $collapse = . }}{{ $href = printf "#%s" . }}{{ end -}}
{{ end -}}
{{ if $tooltip -}}
{{ if $collapse -}}
{{ errorf "Cannot use tooltip and collapse at the same time" -}}
{{ end -}}
{{ end -}}
{{ $type := "button" -}}
{{ with .type }}{{ $type = . }}{{ end -}}
{{ $supportedTypes := slice "button" "link" -}}
{{ if not (in $supportedTypes $type) -}}
{{ errorf "Invalid value for param 'type': %s" $type -}}
{{ end -}}
{{ $placement := "top" -}}
{{ with .placement }}{{ $placement = . }}{{ end -}}
{{ $supportedPlacements := slice "top" "bottom" "left" "right" -}}
{{ if not (in $supportedPlacements $placement) -}}
{{ errorf "Invalid value for param 'placement': %s" $placement -}}
{{ end -}}
<a {{ if ne $state "disabled" }}{{ with $href }}href="{{ . }}"{{ end }}{{ end }}
{{ with $id }}id="{{ . }}"{{ end }}
{{ if eq $type "button" }}class="btn btn-{{ if $outline }}outline-{{ end }}{{ $color }} {{ if ne $size "md"}}btn-{{ $size }}{{ end }} position-relative {{ if in (slice "disabled" "active") $state }}{{ $state }}{{ end }}" role="button" {{ if eq $state "disabled" }}aria-disabled="true"{{ end }}
{{ else }}class="link-{{ $color }} position-relative"{{ end }}
{{ with $tooltip }}data-bs-toggle="tooltip" data-bs-title="{{ . }}" data-bs-placement="{{ $placement }}"{{ end }}
{{ with $collapse }}data-bs-toggle="collapse" aria-expanded="false" aria-controls="{{ . }}"{{ end }}
{{ if eq $state "active" }}data-bs-toggle="button" aria-pressed="true"{{ end }}
{{ if eq $state "inactive" }}data-bs-toggle="button" aria-pressed="false"{{ end }}
>
{{ $title -}}
{{ with $badge }}
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
{{ . }}
{{ with $label }}<span class="visually-hidden">{{ . }}</span>{{ end }}
</span>
{{ end }}
</a>

View File

@@ -11,6 +11,13 @@
{{ $bundle := $files | resources.Concat $filename -}} {{ $bundle := $files | resources.Concat $filename -}}
{{ $js := $bundle | resources.ExecuteAsTemplate $filename $page -}} {{ $js := $bundle | resources.ExecuteAsTemplate $filename $page -}}
{{- if (not .Site.IsServer) -}}
{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
{{- if and (not $pc.Disable) (hasPrefix site.GoogleAnalytics "G-") }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.GoogleAnalytics }}"></script>
{{- end }}
{{- end -}}
{{- if not hugo.IsProduction -}} {{- if not hugo.IsProduction -}}
<script src="{{ $js.RelPermalink }}"></script> <script src="{{ $js.RelPermalink }}"></script>
{{ else -}} {{ else -}}

View File

@@ -11,7 +11,7 @@
</div> </div>
<div class="col col-sm-6 col-md-4"> <div class="col col-sm-6 col-md-4">
{{ if .Site.Params.home.featurePhoto }} {{ if .Site.Params.home.featurePhoto }}
{{- partial "image.html" (dict "url" .Site.Params.home.featurePhoto "ratio" "4x3" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Site.Title) -}} {{- partial "assets/image.html" (dict "url" .Site.Params.home.featurePhoto "ratio" "4x3" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Site.Title) -}}
{{ end }} {{ end }}
</div> </div>
<div class="col col-md-2 d-none d-md-block"></div> <div class="col col-md-2 d-none d-md-block"></div>

View File

@@ -11,7 +11,7 @@
{{ if .Parent }} {{ if .Parent }}
{{ errorf "Missing value for param 'header': %s" .Parent.Position -}} {{ errorf "Missing value for param 'header': %s" .Parent.Position -}}
{{ else }} {{ else }}
{{ errorf "Missing value for param 'header': %s" .Position -}} {{ errorf "Missing value for param 'header': %s" .Position -}}
{{ end }} {{ end }}
{{ end -}} {{ end -}}

View File

@@ -15,5 +15,5 @@
{{- end -}} {{- end -}}
{{- if not $error -}} {{- if not $error -}}
{{- partial "breadcrumb.html" $page -}} {{- partial "assets/breadcrumb.html" $page -}}
{{- end -}} {{- end -}}

View File

@@ -78,5 +78,19 @@
{{ end -}} {{ end -}}
{{ if not $error }} {{ if not $error }}
{{- partial "button.html" (dict "type" $type "title" $title "size" $size "color" $color "outline" $outline "badge" $badge "label" $label "tooltip" $tooltip "collapse" $collapse "href" $href "id" $id "state" $state "placement" $placement) -}} {{- partial "assets/button.html" (dict
"type" $type
"title" $title
"size" $size
"color" $color
"outline" $outline
"badge" $badge
"label" $label
"tooltip" $tooltip
"collapse" $collapse
"href" $href
"id" $id
"state" $state
"placement" $placement)
-}}
{{ end }} {{ end }}

View File

@@ -35,7 +35,7 @@
{{ errorf "Invalid value for param 'mode': %s" $modeParam -}} {{ errorf "Invalid value for param 'mode': %s" $modeParam -}}
{{ end -}} {{ end -}}
{{- partial "image.html" (dict {{- partial "assets/image.html" (dict
"url" $url "url" $url
"ratio" $ratio "ratio" $ratio
"innerClass" $class "innerClass" $class

View File

@@ -18,7 +18,7 @@
{{- if $src -}} {{- if $src -}}
<div class="carousel-item {{ if eq .Ordinal 0 }}active{{ end }}"> <div class="carousel-item {{ if eq .Ordinal 0 }}active{{ end }}">
{{ partial "image.html" (dict "url" $src "ratio" $ratio "innerClass" "d-block w-100") }} {{ partial "assets/image.html" (dict "url" $src "ratio" $ratio "innerClass" "d-block w-100") }}
<div class="carousel-caption gradient"></div> <div class="carousel-caption gradient"></div>
{{ with $caption }} {{ with $caption }}
<div class="carousel-caption d-none d-md-block"> <div class="carousel-caption d-none d-md-block">

View File

@@ -3,8 +3,8 @@
"path" Required path of the page. "path" Required path of the page.
"class" Optional class attribute of the card element, e.g. “w-50”. "class" Optional class attribute of the card element, e.g. “w-50”.
"color": Optional theme color of the card, either "primary", "secondary", "success", "danger", "color": Optional theme color of the card, either "primary", "secondary", "success", "danger",
"warning", "info", "light", "dark", "white", "black", or "body-tertiary". By default, no color "warning", "info", "light", "dark", "white", "black", "body", or "body-tertiary". By default, no
is specified. color is specified.
--> -->
{{- $error := false -}} {{- $error := false -}}
@@ -21,7 +21,7 @@
{{- $color := "" -}} {{- $color := "" -}}
{{- with .Get "color" }}{{ $color = . }}{{ end -}} {{- with .Get "color" }}{{ $color = . }}{{ end -}}
{{- if $color -}} {{- if $color -}}
{{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" "body-tertiary" -}} {{- $supportedColors := slice "primary" "secondary" "success" "danger" "warning" "info" "light" "dark" "white" "black" "body" "body-tertiary" -}}
{{- if not (in $supportedColors $color) -}} {{- if not (in $supportedColors $color) -}}
{{- errorf "Invalid value for param 'color': %s" .Position -}} {{- errorf "Invalid value for param 'color': %s" .Position -}}
{{- $error = true -}} {{- $error = true -}}

View File

@@ -41,5 +41,5 @@
{{ end -}} {{ end -}}
{{ if not $error }} {{ if not $error }}
{{- partial "button.html" (dict "type" $type "title" $title "color" $color "tooltip" $tooltip "href" $href "placement" $placement) -}} <div class="d-inline-flex">{{- partial "assets/button.html" (dict "type" $type "title" $title "color" $color "tooltip" $tooltip "href" $href "placement" $placement) -}}</div>
{{ end }} {{ end }}

View File

@@ -25,14 +25,15 @@
Content-Security-Policy = """\ Content-Security-Policy = """\
default-src 'self'; \ default-src 'self'; \
script-src 'self' \ script-src 'self' \
https://utteranc.es/client.js; \ https://utteranc.es/client.js https://*.google-analytics.com https://*.googletagmanager.com; \
style-src 'self' https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \ style-src 'self' https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \
object-src 'none'; \ object-src 'none'; \
base-uri 'self'; \ base-uri 'self'; \
connect-src 'self'; \ connect-src 'self'
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
font-src 'self' https://fonts.gstatic.com; \ font-src 'self' https://fonts.gstatic.com; \
frame-src 'self' https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com; \ frame-src 'self' https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com; \
img-src 'self' https://i.vimeocdn.com https://i.ytimg.com; \ img-src 'self' https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com; \
manifest-src 'self'; \ manifest-src 'self'; \
media-src 'self' \ media-src 'self' \
""" """

195
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.12.0-alpha4", "version": "0.12.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.12.0-alpha4", "version": "0.12.3",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@fortawesome/fontawesome-free": "^6.4.0", "@fortawesome/fontawesome-free": "^6.4.0",
@@ -15,7 +15,7 @@
"bootstrap": "^5.3.0-alpha3", "bootstrap": "^5.3.0-alpha3",
"cssnano": "^6.0.0", "cssnano": "^6.0.0",
"cssnano-preset-advanced": "^6.0.0", "cssnano-preset-advanced": "^6.0.0",
"eslint": "^8.37.0", "eslint": "^8.39.0",
"eslint-config-standard": "^17.0.0", "eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5", "eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.7.0", "eslint-plugin-n": "^15.7.0",
@@ -27,8 +27,8 @@
"purgecss-whitelister": "^2.4.0", "purgecss-whitelister": "^2.4.0",
"rimraf": "^5.0.0", "rimraf": "^5.0.0",
"shx": "^0.3.4", "shx": "^0.3.4",
"stylelint": "^15.4.0", "stylelint": "^15.6.0",
"stylelint-config-standard-scss": "^8.0.0" "stylelint-config-standard-scss": "^9.0.0"
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
@@ -247,9 +247,9 @@
} }
}, },
"node_modules/@eslint/js": { "node_modules/@eslint/js": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz",
"integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2100,15 +2100,15 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz",
"integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.4.0", "@eslint-community/regexpp": "^4.4.0",
"@eslint/eslintrc": "^2.0.2", "@eslint/eslintrc": "^2.0.2",
"@eslint/js": "8.38.0", "@eslint/js": "8.39.0",
"@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8", "@nodelib/fs.walk": "^1.2.8",
@@ -2118,7 +2118,7 @@
"debug": "^4.3.2", "debug": "^4.3.2",
"doctrine": "^3.0.0", "doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0", "escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.1.1", "eslint-scope": "^7.2.0",
"eslint-visitor-keys": "^3.4.0", "eslint-visitor-keys": "^3.4.0",
"espree": "^9.5.1", "espree": "^9.5.1",
"esquery": "^1.4.2", "esquery": "^1.4.2",
@@ -2368,9 +2368,9 @@
} }
}, },
"node_modules/eslint-scope": { "node_modules/eslint-scope": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz",
"integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"esrecurse": "^4.3.0", "esrecurse": "^4.3.0",
@@ -2378,6 +2378,9 @@
}, },
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
} }
}, },
"node_modules/eslint-utils": { "node_modules/eslint-utils": {
@@ -4307,10 +4310,16 @@
"dev": true "dev": true
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.4", "version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"dev": true, "dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"bin": { "bin": {
"nanoid": "bin/nanoid.cjs" "nanoid": "bin/nanoid.cjs"
}, },
@@ -4848,9 +4857,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.4.21", "version": "8.4.23",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
"integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -4860,10 +4869,14 @@
{ {
"type": "tidelift", "type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss" "url": "https://tidelift.com/funding/github/npm/postcss"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
} }
], ],
"dependencies": { "dependencies": {
"nanoid": "^3.3.4", "nanoid": "^3.3.6",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"source-map-js": "^1.0.2" "source-map-js": "^1.0.2"
}, },
@@ -6445,14 +6458,14 @@
} }
}, },
"node_modules/stylelint": { "node_modules/stylelint": {
"version": "15.5.0", "version": "15.6.0",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.5.0.tgz", "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.6.0.tgz",
"integrity": "sha512-jyMO3R1QtE5mUS4v40+Gg+sIQBqe7CF1xPslxycDzNVkIBCUD4O+5F1vLPq16VmunUTv4qG9o2rUKLnU5KkVeQ==", "integrity": "sha512-Cqzpc8tvJm77KaM8qUbhpJ/UYK55Ia0whQXj4b9IId9dlPICO7J8Lyo15SZWiHxKjlvy3p5FQor/3n6i8ignXg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@csstools/css-parser-algorithms": "^2.1.0", "@csstools/css-parser-algorithms": "^2.1.1",
"@csstools/css-tokenizer": "^2.1.0", "@csstools/css-tokenizer": "^2.1.1",
"@csstools/media-query-list-parser": "^2.0.2", "@csstools/media-query-list-parser": "^2.0.4",
"@csstools/selector-specificity": "^2.2.0", "@csstools/selector-specificity": "^2.2.0",
"balanced-match": "^2.0.0", "balanced-match": "^2.0.0",
"colord": "^2.9.3", "colord": "^2.9.3",
@@ -6477,7 +6490,7 @@
"micromatch": "^4.0.5", "micromatch": "^4.0.5",
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"postcss": "^8.4.21", "postcss": "^8.4.22",
"postcss-media-query-parser": "^0.2.3", "postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1", "postcss-resolve-nested-selector": "^0.1.1",
"postcss-safe-parser": "^6.0.0", "postcss-safe-parser": "^6.0.0",
@@ -6505,27 +6518,27 @@
} }
}, },
"node_modules/stylelint-config-recommended": { "node_modules/stylelint-config-recommended": {
"version": "11.0.0", "version": "12.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-11.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz",
"integrity": "sha512-SoGIHNI748OCZn6BxFYT83ytWoYETCINVHV3LKScVAWQQauWdvmdDqJC5YXWjpBbxg2E761Tg5aUGKLFOVhEkA==", "integrity": "sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ==",
"dev": true, "dev": true,
"peerDependencies": { "peerDependencies": {
"stylelint": "^15.3.0" "stylelint": "^15.5.0"
} }
}, },
"node_modules/stylelint-config-recommended-scss": { "node_modules/stylelint-config-recommended-scss": {
"version": "10.0.0", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-10.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-11.0.0.tgz",
"integrity": "sha512-+YvPgUHi0W5mCJCKdupBCIsWPYNbWuJcRmFtSYujwNg+41ljFknhO9bpY6C+oahv659zW7W1AT7i6DQvJYYr1A==", "integrity": "sha512-EDghTDU7aOv2LTsRZvcT1w8mcjUaMhuy+t38iV5I/0Qiu6ixdkRwhLEMul3K/fnB2v9Nwqvb3xpvJfPH+HduDw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"postcss-scss": "^4.0.6", "postcss-scss": "^4.0.6",
"stylelint-config-recommended": "^11.0.0", "stylelint-config-recommended": "^12.0.0",
"stylelint-scss": "^4.6.0" "stylelint-scss": "^4.6.0"
}, },
"peerDependencies": { "peerDependencies": {
"postcss": "^8.3.3", "postcss": "^8.3.3",
"stylelint": "^15.3.0" "stylelint": "^15.5.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"postcss": { "postcss": {
@@ -6534,29 +6547,29 @@
} }
}, },
"node_modules/stylelint-config-standard": { "node_modules/stylelint-config-standard": {
"version": "32.0.0", "version": "33.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-32.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz",
"integrity": "sha512-UnGJxYDyYFrIE9CjDMZRkrNh2o4lOtO+MVZ9qG5b8yARfsWho0GMx4YvhHfsv8zKKgHeWX2wfeyxmuoqcaYZ4w==", "integrity": "sha512-eyxnLWoXImUn77+ODIuW9qXBDNM+ALN68L3wT1lN2oNspZ7D9NVGlNHb2QCUn4xDug6VZLsh0tF8NyoYzkgTzg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"stylelint-config-recommended": "^11.0.0" "stylelint-config-recommended": "^12.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"stylelint": "^15.4.0" "stylelint": "^15.5.0"
} }
}, },
"node_modules/stylelint-config-standard-scss": { "node_modules/stylelint-config-standard-scss": {
"version": "8.0.0", "version": "9.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-8.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-9.0.0.tgz",
"integrity": "sha512-TDT/gJD/0LUDoUgkjF1uoI/4DfczXHxg7gJVcWT4/JbE6k5hszVuI14reNX+tEwSyMNhcK2BA7izrK+uVAz7XA==", "integrity": "sha512-yPKpJsrZn4ybuQZx/DkEHuCjw7pJginErE/47dFhCnrvD48IJ4UYec8tSiCuJWMA3HRjbIa3nh5ZeSauDGuVAg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"stylelint-config-recommended-scss": "^10.0.0", "stylelint-config-recommended-scss": "^11.0.0",
"stylelint-config-standard": "^32.0.0" "stylelint-config-standard": "^33.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"postcss": "^8.3.3", "postcss": "^8.3.3",
"stylelint": "^15.4.0" "stylelint": "^15.5.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"postcss": { "postcss": {
@@ -7277,9 +7290,9 @@
} }
}, },
"@eslint/js": { "@eslint/js": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz",
"integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==",
"dev": true "dev": true
}, },
"@fortawesome/fontawesome-free": { "@fortawesome/fontawesome-free": {
@@ -8602,15 +8615,15 @@
"dev": true "dev": true
}, },
"eslint": { "eslint": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz",
"integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==",
"dev": true, "dev": true,
"requires": { "requires": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.4.0", "@eslint-community/regexpp": "^4.4.0",
"@eslint/eslintrc": "^2.0.2", "@eslint/eslintrc": "^2.0.2",
"@eslint/js": "8.38.0", "@eslint/js": "8.39.0",
"@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8", "@nodelib/fs.walk": "^1.2.8",
@@ -8620,7 +8633,7 @@
"debug": "^4.3.2", "debug": "^4.3.2",
"doctrine": "^3.0.0", "doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0", "escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.1.1", "eslint-scope": "^7.2.0",
"eslint-visitor-keys": "^3.4.0", "eslint-visitor-keys": "^3.4.0",
"espree": "^9.5.1", "espree": "^9.5.1",
"esquery": "^1.4.2", "esquery": "^1.4.2",
@@ -8798,9 +8811,9 @@
"requires": {} "requires": {}
}, },
"eslint-scope": { "eslint-scope": {
"version": "7.1.1", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz",
"integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==",
"dev": true, "dev": true,
"requires": { "requires": {
"esrecurse": "^4.3.0", "esrecurse": "^4.3.0",
@@ -10226,9 +10239,9 @@
"dev": true "dev": true
}, },
"nanoid": { "nanoid": {
"version": "3.3.4", "version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"dev": true "dev": true
}, },
"natural-compare": { "natural-compare": {
@@ -10596,12 +10609,12 @@
} }
}, },
"postcss": { "postcss": {
"version": "8.4.21", "version": "8.4.23",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
"integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
"dev": true, "dev": true,
"requires": { "requires": {
"nanoid": "^3.3.4", "nanoid": "^3.3.6",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"source-map-js": "^1.0.2" "source-map-js": "^1.0.2"
} }
@@ -11677,14 +11690,14 @@
} }
}, },
"stylelint": { "stylelint": {
"version": "15.5.0", "version": "15.6.0",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.5.0.tgz", "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.6.0.tgz",
"integrity": "sha512-jyMO3R1QtE5mUS4v40+Gg+sIQBqe7CF1xPslxycDzNVkIBCUD4O+5F1vLPq16VmunUTv4qG9o2rUKLnU5KkVeQ==", "integrity": "sha512-Cqzpc8tvJm77KaM8qUbhpJ/UYK55Ia0whQXj4b9IId9dlPICO7J8Lyo15SZWiHxKjlvy3p5FQor/3n6i8ignXg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@csstools/css-parser-algorithms": "^2.1.0", "@csstools/css-parser-algorithms": "^2.1.1",
"@csstools/css-tokenizer": "^2.1.0", "@csstools/css-tokenizer": "^2.1.1",
"@csstools/media-query-list-parser": "^2.0.2", "@csstools/media-query-list-parser": "^2.0.4",
"@csstools/selector-specificity": "^2.2.0", "@csstools/selector-specificity": "^2.2.0",
"balanced-match": "^2.0.0", "balanced-match": "^2.0.0",
"colord": "^2.9.3", "colord": "^2.9.3",
@@ -11709,7 +11722,7 @@
"micromatch": "^4.0.5", "micromatch": "^4.0.5",
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"postcss": "^8.4.21", "postcss": "^8.4.22",
"postcss-media-query-parser": "^0.2.3", "postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1", "postcss-resolve-nested-selector": "^0.1.1",
"postcss-safe-parser": "^6.0.0", "postcss-safe-parser": "^6.0.0",
@@ -11761,40 +11774,40 @@
} }
}, },
"stylelint-config-recommended": { "stylelint-config-recommended": {
"version": "11.0.0", "version": "12.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-11.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz",
"integrity": "sha512-SoGIHNI748OCZn6BxFYT83ytWoYETCINVHV3LKScVAWQQauWdvmdDqJC5YXWjpBbxg2E761Tg5aUGKLFOVhEkA==", "integrity": "sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ==",
"dev": true, "dev": true,
"requires": {} "requires": {}
}, },
"stylelint-config-recommended-scss": { "stylelint-config-recommended-scss": {
"version": "10.0.0", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-10.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-11.0.0.tgz",
"integrity": "sha512-+YvPgUHi0W5mCJCKdupBCIsWPYNbWuJcRmFtSYujwNg+41ljFknhO9bpY6C+oahv659zW7W1AT7i6DQvJYYr1A==", "integrity": "sha512-EDghTDU7aOv2LTsRZvcT1w8mcjUaMhuy+t38iV5I/0Qiu6ixdkRwhLEMul3K/fnB2v9Nwqvb3xpvJfPH+HduDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"postcss-scss": "^4.0.6", "postcss-scss": "^4.0.6",
"stylelint-config-recommended": "^11.0.0", "stylelint-config-recommended": "^12.0.0",
"stylelint-scss": "^4.6.0" "stylelint-scss": "^4.6.0"
} }
}, },
"stylelint-config-standard": { "stylelint-config-standard": {
"version": "32.0.0", "version": "33.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-32.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz",
"integrity": "sha512-UnGJxYDyYFrIE9CjDMZRkrNh2o4lOtO+MVZ9qG5b8yARfsWho0GMx4YvhHfsv8zKKgHeWX2wfeyxmuoqcaYZ4w==", "integrity": "sha512-eyxnLWoXImUn77+ODIuW9qXBDNM+ALN68L3wT1lN2oNspZ7D9NVGlNHb2QCUn4xDug6VZLsh0tF8NyoYzkgTzg==",
"dev": true, "dev": true,
"requires": { "requires": {
"stylelint-config-recommended": "^11.0.0" "stylelint-config-recommended": "^12.0.0"
} }
}, },
"stylelint-config-standard-scss": { "stylelint-config-standard-scss": {
"version": "8.0.0", "version": "9.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-8.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-9.0.0.tgz",
"integrity": "sha512-TDT/gJD/0LUDoUgkjF1uoI/4DfczXHxg7gJVcWT4/JbE6k5hszVuI14reNX+tEwSyMNhcK2BA7izrK+uVAz7XA==", "integrity": "sha512-yPKpJsrZn4ybuQZx/DkEHuCjw7pJginErE/47dFhCnrvD48IJ4UYec8tSiCuJWMA3HRjbIa3nh5ZeSauDGuVAg==",
"dev": true, "dev": true,
"requires": { "requires": {
"stylelint-config-recommended-scss": "^10.0.0", "stylelint-config-recommended-scss": "^11.0.0",
"stylelint-config-standard": "^32.0.0" "stylelint-config-standard": "^33.0.0"
} }
}, },
"stylelint-scss": { "stylelint-scss": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.12.0-alpha4", "version": "0.12.3",
"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",
@@ -57,7 +57,7 @@
"bootstrap": "^5.3.0-alpha3", "bootstrap": "^5.3.0-alpha3",
"cssnano": "^6.0.0", "cssnano": "^6.0.0",
"cssnano-preset-advanced": "^6.0.0", "cssnano-preset-advanced": "^6.0.0",
"eslint": "^8.37.0", "eslint": "^8.39.0",
"eslint-config-standard": "^17.0.0", "eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5", "eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.7.0", "eslint-plugin-n": "^15.7.0",
@@ -69,8 +69,8 @@
"purgecss-whitelister": "^2.4.0", "purgecss-whitelister": "^2.4.0",
"rimraf": "^5.0.0", "rimraf": "^5.0.0",
"shx": "^0.3.4", "shx": "^0.3.4",
"stylelint": "^15.4.0", "stylelint": "^15.6.0",
"stylelint-config-standard-scss": "^8.0.0" "stylelint-config-standard-scss": "^9.0.0"
}, },
"hugo-bin": { "hugo-bin": {
"buildTags": "extended" "buildTags": "extended"