Compare commits

...

55 Commits

Author SHA1 Message Date
Mark Dumay
6ad6eef347 Merge pull request #576 from gethinode/develop
Fix buttons
2023-10-22 15:27:55 +02:00
Mark Dumay
43ed4d411e Merge branch 'main' into develop 2023-10-22 15:20:11 +02:00
mark
7c8d5453cc Update dependencies 2023-10-22 15:19:24 +02:00
mark
f4a40367f6 Fix close button image 2023-10-22 15:19:12 +02:00
mark
e786ef279a Fix close button aria labels 2023-10-22 14:39:24 +02:00
mark
a6684e1bb5 Fix close button aria label 2023-10-22 14:28:51 +02:00
Mark Dumay
4fbe389245 Merge pull request #575 from gethinode/develop
Improve layout
2023-10-22 13:42:32 +02:00
Mark Dumay
04b0af5d58 Merge branch 'main' into develop 2023-10-22 12:55:37 +02:00
mark
7f797af3eb Sort actions by weight 2023-10-22 12:52:33 +02:00
mark
4a3a0fb0bb Fix gap between CTA buttons 2023-10-22 12:39:33 +02:00
mark
f9e9eec611 Fix vertical centering of button icon 2023-10-22 12:38:10 +02:00
mark
cb71742a91 Fix spacing between button rows 2023-10-22 12:32:13 +02:00
mark
638c7054d0 Bump package release 2023-10-22 08:43:14 +02:00
mark
fb21633f8c Fix support of floating numbers 2023-10-22 08:42:45 +02:00
mark
9bb7cf1825 Set dimensions of vector image in light/dark mode 2023-10-22 08:42:18 +02:00
Mark Dumay
e00ad4498b Merge pull request #574 from gethinode/develop
Fix section menu initialization
2023-10-21 15:14:40 +02:00
Mark Dumay
a0f7e62616 Merge branch 'main' into develop 2023-10-21 14:56:17 +02:00
mark
11653015ab Fix section menu initialization 2023-10-21 14:55:38 +02:00
mark
e6a37cab0f Fix typos 2023-10-21 14:53:39 +02:00
Mark Dumay
7fcc6713a4 Merge pull request #573 from gethinode/develop
Fix alignment of 404 message
2023-10-21 08:19:52 +02:00
Mark Dumay
5694938b81 Merge branch 'main' into develop 2023-10-21 07:53:05 +02:00
mark
b6d3c17a87 Bump package release 2023-10-21 07:52:33 +02:00
mark
40ba175409 Fix alignment of 404 message 2023-10-21 07:51:37 +02:00
Mark Dumay
bcc98d507b Merge pull request #571 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2023-10-21 06:16:48 +02:00
Mark Dumay
ce1c32c930 Merge branch 'main' into hugo-mod-dependencies 2023-10-21 05:58:14 +02:00
Mark Dumay
08d462f698 Merge pull request #572 from gethinode/develop
Refine base layout
2023-10-21 05:57:20 +02:00
Mark Dumay
d32e615837 Merge branch 'main' into develop 2023-10-21 05:49:58 +02:00
mark
83368cdf3a Bump package version 2023-10-21 05:49:14 +02:00
mark
45525a6e3c Set explicit default values 2023-10-21 05:48:33 +02:00
mark
75a082c8df Update build stats 2023-10-21 05:48:24 +02:00
mark
d3d4d99fe4 Set explicit default values 2023-10-21 05:48:19 +02:00
mark
f05764d4a8 Update build stats 2023-10-21 05:48:08 +02:00
mark
a7822fcd55 Refine base layout 2023-10-21 05:48:00 +02:00
mark
f0a0d2022a Enable wrapper for button 2023-10-20 14:53:13 +02:00
markdumay
2ccc85926e fix: update Hugo module dependencies 2023-10-20 03:15:48 +00:00
Mark Dumay
b9699ab8bc Merge pull request #570 from gethinode/develop
Support content view templates for single pages
2023-10-18 15:20:09 +02:00
Mark Dumay
02ca7271fc Merge branch 'main' into develop 2023-10-18 15:09:50 +02:00
mark
9dbe4bc8a1 Support content view templates for single pages 2023-10-18 15:09:14 +02:00
Mark Dumay
2ca20096a0 Merge pull request #569 from gethinode/develop
Use redirect for more button when applicable
2023-10-18 13:35:29 +02:00
Mark Dumay
1d7e8e3adb Merge branch 'main' into develop 2023-10-18 13:18:13 +02:00
mark
88c897e09c Use redirect for more button when applicable 2023-10-18 13:17:28 +02:00
Mark Dumay
f1a1ec128f Merge pull request #568 from gethinode/develop
Refactor link partial and shortcode
2023-10-18 13:15:05 +02:00
Mark Dumay
b0bc03f251 Merge branch 'main' into develop 2023-10-18 13:08:35 +02:00
mark
0f57e9ad1d Bump package release 2023-10-18 13:07:39 +02:00
mark
8b27c8986b Refactor link partial and shortcode 2023-10-18 13:06:57 +02:00
mark
1210117922 Standardize padding 2023-10-18 13:00:49 +02:00
Mark Dumay
3a1e310e22 Merge pull request #567 from gethinode/develop
Refine layout
2023-10-18 07:31:09 +02:00
Mark Dumay
918c043f10 Merge branch 'main' into develop 2023-10-18 07:21:43 +02:00
mark
fbfb02d7ca Bump package release 2023-10-18 07:20:41 +02:00
mark
3026837946 Improve icon spacing 2023-10-18 07:20:07 +02:00
mark
f7ccdad1df Update build stats 2023-10-18 06:57:22 +02:00
mark
4b4f70e6e0 Fix abbr element on devices with touch screen 2023-10-18 06:57:03 +02:00
mark
c28e9861ba Enable keyboard focus for abbr element 2023-10-18 06:56:13 +02:00
mark
15c2b5466e Fix background color of TOC button on hover 2023-10-18 06:30:42 +02:00
mark
58bcdff782 Fix gap between tags in dark mode 2023-10-18 06:25:22 +02:00
52 changed files with 426 additions and 311 deletions

View File

@@ -14,10 +14,11 @@
@import "common/variables-dark.scss"; @import "common/variables-dark.scss";
// Import Hinode theme styles // Import Hinode theme styles
@import "components/abbr.scss";
@import "components/alert.scss"; @import "components/alert.scss";
@import "components/blockquote.scss"; @import "components/blockquote.scss";
@import "components/breadcrumb.scss"; @import "components/breadcrumb.scss";
@import "components/buttons.scss"; @import "components/button.scss";
@import "components/card.scss"; @import "components/card.scss";
@import "components/carousel.scss"; @import "components/carousel.scss";
@import "components/clipboard.scss"; @import "components/clipboard.scss";

View File

@@ -12,10 +12,11 @@
@import "common/variables-dark.scss"; @import "common/variables-dark.scss";
// Import Hinode theme styles // Import Hinode theme styles
@import "components/abbr.scss";
@import "components/alert.scss"; @import "components/alert.scss";
@import "components/blockquote.scss"; @import "components/blockquote.scss";
@import "components/breadcrumb.scss"; @import "components/breadcrumb.scss";
@import "components/buttons.scss"; @import "components/button.scss";
@import "components/card.scss"; @import "components/card.scss";
@import "components/carousel.scss"; @import "components/carousel.scss";
@import "components/clipboard.scss"; @import "components/clipboard.scss";

View File

@@ -15,6 +15,12 @@ a:active {
min-height: 100vh; min-height: 100vh;
} }
.fullcover {
--navbar-height: #{$navbar-height};
min-height: calc(100vh - var(--navbar-height));
}
.fullscreen { .fullscreen {
--navbar-offset: #{$navbar-offset}; --navbar-offset: #{$navbar-offset};

View File

@@ -18,6 +18,7 @@ strong {
font-weight: 600 if($enable-important-utilities, !important, null); font-weight: 600 if($enable-important-utilities, !important, null);
} }
$navbar-height: h.$navbar-height;
$navbar-offset: h.$navbar-offset; $navbar-offset: h.$navbar-offset;
$primary: h.$primary; $primary: h.$primary;
$secondary: h.$secondary; $secondary: h.$secondary;

View File

@@ -0,0 +1,22 @@
@media (hover: none) {
abbr[title] {
position: relative;
text-decoration: underline dotted;
}
abbr[title]:hover::after,
abbr[title]:focus::after {
content: attr(title);
position: absolute;
left: 0;
bottom: -30px;
width: auto;
white-space: nowrap;
background-color: var(--bs-body-bg);
color: var(--bs-tooltip-color);
border-radius: 3px;
box-shadow: 1px 1px 5px 0 rgba(0,0,0,0.4);
font-size: 14px;
padding: 3px 5px;
}
}

View File

@@ -28,3 +28,16 @@
background-color: transparent; background-color: transparent;
color: var(--bs-primary) if($enable-important-utilities, !important, null); color: var(--bs-primary) if($enable-important-utilities, !important, null);
} }
a.btn {
margin-top: $spacer * .25;
margin-bottom: $spacer * .25;
}
.btn-close {
background-color: transparent if($enable-important-utilities, !important, null);
background-image: var(--#{$prefix}btn-close-bg) if($enable-important-utilities, !important, null);
background-position: center if($enable-important-utilities, !important, null);
background-repeat: no-repeat if($enable-important-utilities, !important, null);
background-size: $btn-close-width if($enable-important-utilities, !important, null);
}

View File

@@ -75,6 +75,10 @@
.toc-button { .toc-button {
--bs-btn-color: var(--bs-body-color); --bs-btn-color: var(--bs-body-color);
--bs-btn-border-color: var(--bs-body-color); --bs-btn-border-color: var(--bs-body-color);
&:hover {
background-color: transparent;
}
} }
#toc-collapse { #toc-collapse {

View File

@@ -6,6 +6,7 @@
modes = ["light", "dark"] modes = ["light", "dark"]
canonifyAssetsURLs = false canonifyAssetsURLs = false
endorse = true endorse = true
footerBelowFold = false
[main.externalLinks] [main.externalLinks]
cue = false cue = false
tab = false tab = false
@@ -59,6 +60,7 @@
anchor = true anchor = true
logo = "/img/logo_icon.svg" logo = "/img/logo_icon.svg"
color = "body" color = "body"
fixed = true
offset = "5.5rem" offset = "5.5rem"
search = true search = true
searchModal = false searchModal = false

View File

@@ -4,6 +4,7 @@
enableDarkMode = true enableDarkMode = true
modes = ["light", "dark"] modes = ["light", "dark"]
canonifyAssetsURLs = false canonifyAssetsURLs = false
footerBelowFold = false
[main.externalLinks] [main.externalLinks]
cue = true cue = true
tab = true tab = true

View File

@@ -294,9 +294,9 @@ As an example, the following shortcodes render links in different formats.
- {{</* link url="projects/another-project" /*/>}} - {{</* link url="projects/another-project" /*/>}}
- {{</* link url="/projects/another-project" /*/>}} - {{</* link url="/projects/another-project" /*/>}}
- {{</* link url="../projects/another-project" case=false /*/>}} - {{</* link url="../projects/another-project" case=false /*/>}}
- {{</* link "/about/" /*/>}} - {{</* link "about" /*/>}}
- {{</* link "/fr/about/" /*/>}} - {{</* link "/fr/a-propos/" /*/>}}
- {{</* link "/fr/about" >}}About (French){{< /link */>}} - {{</* link "/fr/a-propos" >}}About (French){{< /link */>}}
- {{</* link "#image" /*/>}} - {{</* link "#image" /*/>}}
- {{</* link "components/#map" /*/>}} - {{</* link "components/#map" /*/>}}

View File

@@ -295,7 +295,7 @@ Utilisez le shortcode `file` pour afficher et mettre en évidence le contenu com
- {{</* link url="projects/another-project" /*/>}} - {{</* link url="projects/another-project" /*/>}}
- {{</* link url="/projects/another-project" /*/>}} - {{</* link url="/projects/another-project" /*/>}}
- {{</* link url="../projects/another-project" case=false /*/>}} - {{</* link url="../projects/another-project" case=false /*/>}}
- {{</* link "/about/" /*/>}} - {{</* link "about" /*/>}}
- {{</* link "/en/about/" /*/>}} - {{</* link "/en/about/" /*/>}}
- {{</* link "/en/about" >}}About (Anglais){{< /link */>}} - {{</* link "/en/about" >}}About (Anglais){{< /link */>}}
- {{</* link "#image" /*/>}} - {{</* link "#image" /*/>}}
@@ -404,11 +404,11 @@ H{{</* sub 2 */>}}O est un liquide.
<!-- markdownlint-disable MD037 --> <!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}} {{< example lang="hugo" >}}
{{</* button toast="toast-example-1" */>}} {{</* button toast="toast-example-1" */>}}
Affiche la notifiaction #1 Affiche la notification #1
{{</* /button */>}} {{</* /button */>}}
{{</* button toast="toast-example-2" */>}} {{</* button toast="toast-example-2" */>}}
Affiche la notifiaction #1 Affiche la notification #1
{{</* /button */>}} {{</* /button */>}}
{{</* toast id="toast-example-1" header="Premier titre" */>}} {{</* toast id="toast-example-1" header="Premier titre" */>}}

View File

@@ -33,6 +33,8 @@ github.com/gethinode/mod-katex v1.0.2 h1:pIG4n3qLl/IVe7BEiwn+GL8r5lOCtF6FDxlcrPK
github.com/gethinode/mod-katex v1.0.2/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= github.com/gethinode/mod-katex v1.0.2/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.0.3 h1:fvlUWqcUQqv2zRNM2kfmJ6GhXA816Tl1nfVrUkmBStI= github.com/gethinode/mod-katex v1.0.3 h1:fvlUWqcUQqv2zRNM2kfmJ6GhXA816Tl1nfVrUkmBStI=
github.com/gethinode/mod-katex v1.0.3/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= github.com/gethinode/mod-katex v1.0.3/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.0.4 h1:NozgWPFnHhx1W+E9DnwMTRpvxPbdqdANEtwp9N3/mj8=
github.com/gethinode/mod-katex v1.0.4/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-leaflet v0.3.4 h1:oY+YQ0JiJuhFQNrk9XgFdg0NMsTUQPXNfnILp4ia4r4= github.com/gethinode/mod-leaflet v0.3.4 h1:oY+YQ0JiJuhFQNrk9XgFdg0NMsTUQPXNfnILp4ia4r4=
github.com/gethinode/mod-leaflet v0.3.4/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk= github.com/gethinode/mod-leaflet v0.3.4/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
github.com/gethinode/mod-leaflet v0.3.5 h1:69Bv/6zRXhbcTzo7TMr58h3ry47srHRpM1k81LrLbYU= github.com/gethinode/mod-leaflet v0.3.5 h1:69Bv/6zRXhbcTzo7TMr58h3ry47srHRpM1k81LrLbYU=

View File

@@ -54,7 +54,6 @@
"alert", "alert",
"alert-danger", "alert-danger",
"alert-dismissible", "alert-dismissible",
"align-content-center",
"align-items-center", "align-items-center",
"align-items-end", "align-items-end",
"align-items-start", "align-items-start",
@@ -166,6 +165,10 @@
"fa-2xs", "fa-2xs",
"fa-4x", "fa-4x",
"fa-activity", "fa-activity",
"fa-angle-left",
"fa-angle-right",
"fa-angles-left",
"fa-angles-right",
"fa-arrow-left", "fa-arrow-left",
"fa-arrow-right", "fa-arrow-right",
"fa-bootstrap", "fa-bootstrap",
@@ -199,13 +202,11 @@
"fab", "fab",
"fade", "fade",
"fas", "fas",
"feature",
"figure-caption", "figure-caption",
"fixed-top", "fixed-top",
"flex-column", "flex-column",
"flex-fill", "flex-fill",
"flex-grow-1", "flex-grow-1",
"flex-wrap",
"font-monospace", "font-monospace",
"footer", "footer",
"form-control", "form-control",
@@ -219,7 +220,6 @@
"g-4", "g-4",
"gap-1", "gap-1",
"gap-2", "gap-2",
"gap-3",
"gradient", "gradient",
"h-100", "h-100",
"h1", "h1",
@@ -303,6 +303,10 @@
"p-2", "p-2",
"p-3", "p-3",
"p-4", "p-4",
"page-item",
"page-link",
"pagination",
"pagination-terse",
"pb-2", "pb-2",
"pb-3", "pb-3",
"pb-4", "pb-4",
@@ -317,7 +321,7 @@
"ps-1", "ps-1",
"ps-3", "ps-3",
"ps-xl-3", "ps-xl-3",
"pt-4", "pt-3",
"pt-5", "pt-5",
"pt-md-3", "pt-md-3",
"px-4", "px-4",
@@ -325,6 +329,7 @@
"py-1", "py-1",
"py-2", "py-2",
"py-3", "py-3",
"py-5",
"py-md-1", "py-md-1",
"ratio", "ratio",
"ratio-16x9", "ratio-16x9",

4
go.mod
View File

@@ -3,10 +3,10 @@ module github.com/gethinode/hinode
go 1.19 go 1.19
require ( require (
github.com/gethinode/mod-bootstrap v1.2.1 // indirect github.com/gethinode/mod-bootstrap v1.2.2 // indirect
github.com/gethinode/mod-flexsearch v1.5.1 // indirect github.com/gethinode/mod-flexsearch v1.5.1 // indirect
github.com/gethinode/mod-fontawesome v1.5.0 // indirect github.com/gethinode/mod-fontawesome v1.5.0 // indirect
github.com/gethinode/mod-katex v1.0.3 // indirect github.com/gethinode/mod-katex v1.0.4 // indirect
github.com/gethinode/mod-leaflet v0.3.5 // indirect github.com/gethinode/mod-leaflet v0.3.5 // indirect
github.com/gethinode/mod-lottie v1.3.0 // indirect github.com/gethinode/mod-lottie v1.3.0 // indirect
) )

4
go.sum
View File

@@ -8,6 +8,8 @@ github.com/gethinode/mod-bootstrap v1.2.0 h1:JkTcImU3qpi25WgKvUxUYiMoiXtrxrG+Wf/
github.com/gethinode/mod-bootstrap v1.2.0/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8= github.com/gethinode/mod-bootstrap v1.2.0/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
github.com/gethinode/mod-bootstrap v1.2.1 h1:z54dgsbhShhlri+X77Z+yLrg0wz/f8C8ojA/wnlhsJc= github.com/gethinode/mod-bootstrap v1.2.1 h1:z54dgsbhShhlri+X77Z+yLrg0wz/f8C8ojA/wnlhsJc=
github.com/gethinode/mod-bootstrap v1.2.1/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8= github.com/gethinode/mod-bootstrap v1.2.1/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
github.com/gethinode/mod-bootstrap v1.2.2 h1:Q8E04OKWr9owk7nhQ/NBukUgSFhsECxZsOLEaf5oeiQ=
github.com/gethinode/mod-bootstrap v1.2.2/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
github.com/gethinode/mod-flexsearch v1.0.1 h1:FJkRsUzSnQTXl3MWCigT4E6vfff870UWTnkGqaDGIhA= github.com/gethinode/mod-flexsearch v1.0.1 h1:FJkRsUzSnQTXl3MWCigT4E6vfff870UWTnkGqaDGIhA=
github.com/gethinode/mod-flexsearch v1.0.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4= github.com/gethinode/mod-flexsearch v1.0.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
github.com/gethinode/mod-flexsearch v1.1.0 h1:7BCMyQDlYlskNXuazt8Jg/jg9WREexu2xVkYqThkAX4= github.com/gethinode/mod-flexsearch v1.1.0 h1:7BCMyQDlYlskNXuazt8Jg/jg9WREexu2xVkYqThkAX4=
@@ -64,6 +66,8 @@ github.com/gethinode/mod-katex v1.0.2 h1:pIG4n3qLl/IVe7BEiwn+GL8r5lOCtF6FDxlcrPK
github.com/gethinode/mod-katex v1.0.2/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= github.com/gethinode/mod-katex v1.0.2/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.0.3 h1:fvlUWqcUQqv2zRNM2kfmJ6GhXA816Tl1nfVrUkmBStI= github.com/gethinode/mod-katex v1.0.3 h1:fvlUWqcUQqv2zRNM2kfmJ6GhXA816Tl1nfVrUkmBStI=
github.com/gethinode/mod-katex v1.0.3/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= github.com/gethinode/mod-katex v1.0.3/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.0.4 h1:NozgWPFnHhx1W+E9DnwMTRpvxPbdqdANEtwp9N3/mj8=
github.com/gethinode/mod-katex v1.0.4/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-leaflet v0.2.3 h1:QQI4h+IH0jZ7fx4q0um2YIEiYBoW3OAfW8qHzbRCDPk= github.com/gethinode/mod-leaflet v0.2.3 h1:QQI4h+IH0jZ7fx4q0um2YIEiYBoW3OAfW8qHzbRCDPk=
github.com/gethinode/mod-leaflet v0.2.3/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk= github.com/gethinode/mod-leaflet v0.2.3/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
github.com/gethinode/mod-leaflet v0.3.1 h1:H5MaOa+BB1KuVw7abTqfIn/SNzzRsAyx/WQoSe+2Ykc= github.com/gethinode/mod-leaflet v0.3.1 h1:H5MaOa+BB1KuVw7abTqfIn/SNzzRsAyx/WQoSe+2Ykc=

View File

@@ -27,7 +27,6 @@
], ],
"classes": [ "classes": [
"active", "active",
"align-content-center",
"align-items-center", "align-items-center",
"align-self-center", "align-self-center",
"bg-body", "bg-body",
@@ -78,11 +77,10 @@
"fa-sun", "fa-sun",
"fab", "fab",
"fas", "fas",
"feature", "fixed-top",
"flex-column", "flex-column",
"flex-fill", "flex-fill",
"flex-grow-1", "flex-grow-1",
"flex-wrap",
"footer", "footer",
"form-control", "form-control",
"fs-3", "fs-3",
@@ -118,6 +116,7 @@
"navbar-brand", "navbar-brand",
"navbar-collapse", "navbar-collapse",
"navbar-expand-md", "navbar-expand-md",
"navbar-fixed-top",
"navbar-nav", "navbar-nav",
"navbar-toggler", "navbar-toggler",
"no-js", "no-js",
@@ -166,8 +165,7 @@
"toast-container", "toast-container",
"toast-header", "toast-header",
"toggler-icon", "toggler-icon",
"top-bar", "top-bar"
"w-100"
], ],
"ids": [ "ids": [
"-theme", "-theme",

View File

@@ -65,6 +65,8 @@
translation: "Startseite" translation: "Startseite"
- id: languageSwitcherLabel - id: languageSwitcherLabel
translation: "Sprache" translation: "Sprache"
- id: close
translation: "Schließen"
# Table of contents # Table of contents
- id: toc - id: toc

View File

@@ -71,6 +71,8 @@
translation: "Home" translation: "Home"
- id: languageSwitcherLabel - id: languageSwitcherLabel
translation: "Language" translation: "Language"
- id: close
translation: "Close"
# Table of contents # Table of contents
- id: toc - id: toc

View File

@@ -67,6 +67,8 @@
translation: "Accueil" translation: "Accueil"
- id: languageSwitcherLabel - id: languageSwitcherLabel
translation: "Langage" translation: "Langage"
- id: close
translation: "Fermer"
# Table of contents # Table of contents
- id: toc - id: toc

View File

@@ -69,6 +69,8 @@
translation: "Home" translation: "Home"
- id: languageSwitcherLabel - id: languageSwitcherLabel
translation: "Taal" translation: "Taal"
- id: close
translation: "Sluiten"
# Table of contents # Table of contents
- id: toc - id: toc

View File

@@ -1,13 +1,15 @@
{{ define "main"}} {{ define "main"}}
<div class="container-xxl flex-fill d-flex align-content-center flex-wrap feature"> <div class="d-flex flex-fill">
<div class="w-100 text-center"> <div class="container-xxl my-auto">
<span class="text-secondary fw-bold"> <div class="text-center">
{{ partial "assets/icon.html" (dict "icon" "fa face-frown fa-10x") }} <span class="text-secondary fw-bold">
<p class="display-1 mt-3 fw-bold">404</p> {{ partial "assets/icon.html" (dict "icon" "fa face-frown fa-10x") }}
<p class="fs-3">{{ T "pageNotFoundTitle" }}</p> <p class="display-1 mt-3 fw-bold">404</p>
</span> <p class="fs-3">{{ T "pageNotFoundTitle" }}</p>
{{- $home := printf "<a href=\"%s\">%s</a>" ("/" | relLangURL) (T "pageNotFoundHome") -}} </span>
<p>{{ T "pageNotFound" $home | safeHTML }}</p> {{- $home := printf "<a href=\"%s\">%s</a>" ("/" | relLangURL) (T "pageNotFoundHome") -}}
<p>{{ T "pageNotFound" $home | safeHTML }}</p>
</div>
</div> </div>
</div> </div>
{{ end }} {{ end }}

View File

@@ -39,7 +39,11 @@
{{- errorf "Bootstrap is a required module, please add it to 'modules.core' in your site parameters" -}} {{- errorf "Bootstrap is a required module, please add it to 'modules.core' in your site parameters" -}}
{{- end -}} {{- end -}}
{{- $section := .Section }} {{- /* Define section headings */ -}}
{{ $sections := partial "utilities/GetSections.html" . }}
{{- $.Scratch.Set "sections" $sections -}}
{{- $fullCover := or (or (and .IsHome .Site.Params.home.fullCover) .Page.Params.fullCover) .Site.Params.main.footerBelowFold }}
<!doctype html> <!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js"> <html lang="{{ .Site.Language.Lang }}" class="no-js">
@@ -49,22 +53,34 @@
<body> <body>
{{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" .) -}} {{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" .) -}}
<div class="d-flex flex-column min-vh-100{{ if .IsHome }}{{ with .Site.Params.home.style }} {{ . }}{{ end }}{{ end }}"> <div class="d-flex flex-column min-vh-100">
{{- partial "assets/navbar.html" (dict <div class="d-flex flex-column {{ if $fullCover }} fullscreen{{ end }}{{ if .IsHome }} {{ .Site.Params.home.style }}{{ end }}">
"page" . {{- partial "assets/navbar.html" (dict
"fixed" (string site.Params.navigation.fixed) "page" .
"color" site.Params.navigation.color "fixed" (string site.Params.navigation.fixed)
"style" (default "light" site.Params.navigation.style) "color" site.Params.navigation.color
"size" (default "md" site.Params.navigation.size)) "style" (default "light" site.Params.navigation.style)
-}} "size" (default "md" site.Params.navigation.size))
-}}
<div class="flex-fill main-content{{ if .Site.Params.main.footerBelowFold }} fullscreen{{ end }} pb-4"> <div class="main-content">
{{ block "main" . }}{{ end -}} {{ block "featured" . }}{{ end -}}
</div>
{{ if .Site.Params.main.footerBelowFold }}
{{ block "main" . }}{{ end -}}
{{ end }}
</div> </div>
{{ if not .Site.Params.main.footerBelowFold }}
{{ block "main" . }}{{ end -}}
{{- partial "footer/social.html" . -}}
{{- partial "footer/footer.html" . -}}
{{ end }}
</div>
{{ if .Site.Params.main.footerBelowFold }}
{{- partial "footer/social.html" . -}} {{- partial "footer/social.html" . -}}
{{- partial "footer/footer.html" . -}} {{- partial "footer/footer.html" . -}}
</div> {{ end }}
{{- partial "footer/toast-container.html" . -}} {{- partial "footer/toast-container.html" . -}}
{{- partialCached "footer/scripts.html" (dict "header" false "page" . "core" true) }} {{- partialCached "footer/scripts.html" (dict "header" false "page" . "core" true) }}

View File

@@ -1,16 +1,18 @@
{{- define "main" -}} {{- define "featured" }}
{{- $sections := $.Scratch.Get "sections" -}}
{{- $headings := slice }}
{{ if .Params.sectionMenu }}
{{ range $sections }}
{{ $headings = $headings | append .title }}
{{ end }}
{{ end }}
{{- $page := . -}} {{- $page := . -}}
{{- $orientation := site.Params.list.feature.orientation | default "horizontal" -}} {{- $orientation := site.Params.list.feature.orientation | default "horizontal" -}}
{{- $width := site.Params.list.feature.width | default 6 -}} {{- $width := site.Params.list.feature.width | default 6 -}}
{{- $justify := site.Params.list.feature.justify | default "center" -}} {{- $justify := site.Params.list.feature.justify | default "center" -}}
{{- $align := site.Params.list.feature.align | default "center" -}} {{- $align := site.Params.list.feature.align | default "center" -}}
{{- $sections := slice -}}
{{- $sections = $sections | append $page.Type -}}
{{ with $page.Params.sections }}
{{ $sections = $sections | append . }}
{{ end }}
{{- $actions := $page.Params.actions -}} {{- $actions := $page.Params.actions -}}
{{- $headings := slice -}}
{{- $layout := $page.Params.layout -}} {{- $layout := $page.Params.layout -}}
{{ if $page.IsHome }} {{ if $page.IsHome }}
@@ -19,64 +21,8 @@
{{- $justify = or site.Params.home.feature.justify $justify -}} {{- $justify = or site.Params.home.feature.justify $justify -}}
{{- $align = or site.Params.home.feature.align $align -}} {{- $align = or site.Params.home.feature.align $align -}}
{{- $actions = (or $actions site.Params.featured.actions) -}} {{- $actions = (or $actions site.Params.featured.actions) -}}
{{- if not $page.Params.sections -}}
{{- with site.Params.home.sections }}
{{ $sections = $sections | append . }}
{{ else }}
{{ range $section := site.Sections }}
{{ $sections = $sections | append $section.Type }}
{{ end }}
{{ end }}
{{- end -}}
{{ else }}
{{ $headings = $headings | append $page.Title }}
{{- range .Fragments.Headings }}
{{- range .Headings }}
{{- $headings = $headings | append .Title -}}
{{- end -}}
{{- end -}}
{{ end }} {{ end }}
{{/* Generate section content first to determine headings */}}
{{ $body := "" }}
{{- range $index, $section := $sections -}}
{{- $sectionPage := site.GetPage "section" $section -}}
{{- $sectionURL := $sectionPage.RelPermalink -}}
{{- $title := or $sectionPage.Title $sectionPage.Type -}}
{{- with (index site.Params.sections $section) -}}
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
{{- end -}}
{{- $thumbnail := (or (and (reflect.IsMap $sectionPage.Params.Thumbnail) $sectionPage.Params.Thumbnail.url) $sectionPage.Params.Thumbnail) -}}
{{- $icon := $sectionPage.Params.Icon -}}
{{- $content := $sectionPage.Content -}}
{{- $sectionTitle := strings.FirstUpper $sectionPage.Type -}}
{{- $moreTitle := "" -}}
{{- with (index site.Params.sections $section) -}}
{{- with index . "reference" }}{{ $moreTitle = . }}{{ end -}}
{{- end -}}
{{- $moreTitle = or $moreTitle (printf (T "more" (pluralize $sectionTitle))) -}}
{{- $sectionContent := trim (partial "assets/section-list.html" (dict
"page" $page
"section" $section
"home" $page.IsHome
"simple" (eq (len $sections) 1)
"nested" (and $page.IsHome (eq $section $page.Section))
"thumbnail" $thumbnail
"icon" $icon
"content" $content
"moreTitle" $moreTitle
"sectionURL" $sectionURL)) " \r\n"
-}}
{{ if $sectionContent }}
{{- if not $page.IsHome }}{{ $headings = $headings | append $title }}{{ end -}}
{{- $body = printf "%s%s" $body $sectionContent }}
{{ end }}
{{- end -}}
{{/* Display featured section */}} {{/* Display featured section */}}
{{- if or (eq $layout "featured") $page.IsHome -}} {{- if or (eq $layout "featured") $page.IsHome -}}
{{- partial "list/featured.html" (dict {{- partial "list/featured.html" (dict
@@ -89,9 +35,14 @@
"align" $align) "align" $align)
-}} -}}
{{- end -}} {{- end -}}
{{ end }}
{{/* Display main content */}} {{- define "main" -}}
<div class="container-xxl px-4 px-xxl-0"> {{- $page := . -}}
{{- $sections := $.Scratch.Get "sections" -}}
{{- $layout := $page.Params.layout -}}
<div class="container-xxl flex-fill px-4 px-xxl-0">
{{- if ne $layout "featured" -}} {{- if ne $layout "featured" -}}
{{ if and (not $page.IsHome) site.Params.navigation.breadcrumb }} {{ if and (not $page.IsHome) site.Params.navigation.breadcrumb }}
<div>{{ partial "assets/breadcrumb.html" $page }}</div> <div>{{ partial "assets/breadcrumb.html" $page }}</div>
@@ -108,7 +59,7 @@
{{- end -}} {{- end -}}
{{- $content := partial "utilities/ProcessContent" (dict "page" $page "raw" $page.RawContent) -}} {{- $content := partial "utilities/ProcessContent" (dict "page" $page "raw" $page.RawContent) -}}
{{ $content | safeHTML }} {{ $content | safeHTML }}
{{ if and (and (and $sections (eq (len $sections) 1)) (not $body)) (not $content) }} {{ if and (and $sections (eq (len $sections) 1)) (not $content) }}
<p class="pt-4">{{- T "emptyList" }}.</p> <p class="pt-4">{{- T "emptyList" }}.</p>
{{ end }} {{ end }}
</div> </div>
@@ -131,5 +82,7 @@
</div> </div>
{{/* Display generated sections */}} {{/* Display generated sections */}}
{{ $body | safeHTML }} {{ range $sections }}
{{ .content | safeHTML }}
{{ end }}
{{- end -}} {{- end -}}

View File

@@ -1,118 +1,15 @@
{{- define "partials/header.html" -}} {{- define "partials/single-main.html" -}}
{{ if site.Params.navigation.breadcrumb }}{{ partial "assets/breadcrumb.html" . }}{{ end -}} {{ if .Site.Params.navigation.breadcrumb }}{{ partial "assets/breadcrumb.html" . }}{{ end -}}
{{ if in (slice "docs" "minimal") .Layout }}
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
{{ partial "assets/sharing.html" . }}
<p class="lead mb-5">{{ .Description }}</p>
{{ else }}
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
<small class="text-body-secondary text-uppercase">
{{ $datestr | i18n "postedOnDate" -}}
{{ if ne $datestr $lastmodstr -}}&nbsp;({{ $lastmodstr | i18n "lastModified" }}){{ end }} &bull;
{{ .ReadingTime | lang.FormatNumber 0 }}&nbsp;{{ i18n "minutesShort" }} {{ i18n "read" }} &bull;
{{ .WordCount | lang.FormatNumber 0 }}&nbsp;{{ i18n "words" }}
</small>
{{- if gt (len (.GetTerms "tags")) 0 -}} {{ .Render "single/header" }}
<div class="mt-3">
<div class="d-none-dark">
<div class="hstack gap-1">
{{ range (.GetTerms "tags") -}}
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "light" "size" "sm") }}
{{ end -}}
</div>
</div>
<div class="d-none-light">
<div class="hstack gap-3">
{{ range (.GetTerms "tags") -}}
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "primary" "size" "sm" "outline" "true") }}
{{ end -}}
</div>
</div>
</div>
{{- end -}}
{{ partial "assets/sharing.html" . }}
<p class="lead mb-5 mt-3">{{ .Description }}</p>
{{ end }}
{{ end -}}
{{ define "partials/body.html" -}}
{{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}} {{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}}
<div class="d-md-none pb-5">{{ partial "assets/toc-dropdown.html" . }}</div> <div class="d-md-none pb-5">{{ partial "assets/toc-dropdown.html" . }}</div>
{{- end -}} {{- end -}}
{{ .Render "single/body" }}
{{ if not (in (slice "docs" "minimal") .Layout) }}
{{- $thumbnail := "" -}}
{{- $credits := "" -}}
{{- if reflect.IsMap .Params.Thumbnail -}}
{{- $thumbnail = .Params.Thumbnail.url -}}
{{- $author := "" -}}
{{- if and .Params.Thumbnail.authorURL "text" .Params.Thumbnail.author }}
{{- $author = partial "utilities/link" (dict "destination" .Params.Thumbnail.authorURL "text" .Params.Thumbnail.author) -}}
{{- else if .Params.Thumbnail.author }}
{{- $author = .Params.Thumbnail.author -}}
{{- end -}}
{{- $origin := "" -}}
{{- if and .Params.Thumbnail.originURL "text" .Params.Thumbnail.origin }}
{{- $origin = partial "utilities/link" (dict "destination" .Params.Thumbnail.originURL "text" .Params.Thumbnail.origin) -}}
{{- else if .Params.Thumbnail.origin }}
{{- $origin = .Params.Thumbnail.origin -}}
{{- end }}
{{- if and $author $origin }}
{{ $credits = printf (T "photoFull") $author $origin }}
{{ else if $author }}
{{ $credits = T "photoShort" $author }}
{{ end }}
{{ else }}
{{- $thumbnail = .Params.Thumbnail -}}
{{ if or .Params.photoCredits .Params.photoSource }}
{{ warnf "DEPRECATED: frontmatter variables `photoCredits` and `photoSource` have been deprecated in release v0.18: %s" .RelPermalink }}
{{ end }}
{{- if and .Params.photoCredits .Params.PhotoSource }}{{ $credits = printf (T "photoFull") .Params.photoCredits .Params.PhotoSource }}{{ end -}}
{{- end -}}
{{ if $thumbnail -}}
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" $credits) -}}
{{ end -}}
{{ end }}
{{ partial "utilities/ProcessContent" (dict "page" .Page "raw" .RawContent) }} {{ partial "utilities/ProcessContent" (dict "page" .Page "raw" .RawContent) }}
{{ end -}}
{{ define "partials/footer.html" -}} {{ .Render "single/footer" }}
{{ if eq .Layout "docs" }}
<div class="mt-5 small">
{{ partial "utilities/git.html" . }}
</div>
{{ else if ne .Layout "minimal" }}
<div class="row row-cols-2 mt-5 mb-3">
<div class="col">
{{ with .NextInSection -}}
{{ $next := . -}}
{{ with .OutputFormats.Get "html" -}}
<a class="next" href="{{ $next.RelPermalink }}">
{{- partial "assets/icon.html" (dict "icon" "fas arrow-left") }}&nbsp;{{ $next.LinkTitle }}</a>
{{- end -}}
{{ end -}}
</div>
<div class="col text-end">
{{ with .PrevInSection -}}
{{ $prev := . -}}
{{ with .OutputFormats.Get "html" -}}
<a class="previous" href="{{ $prev.RelPermalink }}">{{ $prev.LinkTitle }}&nbsp;{{- partial "assets/icon.html" (dict "icon" "fas arrow-right") }}</a>
{{- end -}}
{{ end -}}
</div>
</div>
{{ end }}
{{- if and .Site.Params.comments.enabled .Params.showComments | default true -}} {{- if and .Site.Params.comments.enabled .Params.showComments | default true -}}
<hr> <hr>
{{ partial "assets/comments.html" . }} {{ partial "assets/comments.html" . }}
@@ -127,65 +24,59 @@
{{- $menu := .Scratch.Get "sidebar" -}} {{- $menu := .Scratch.Get "sidebar" -}}
{{- $version := .Scratch.Get "version" -}} {{- $version := .Scratch.Get "version" -}}
{{- $sidebar := .Site.Params.navigation.sidebar | default true -}}
{{ if and $menu $sidebar -}} {{ $sidebar := "" }}
{{- $hasSidebar := .Site.Params.navigation.sidebar | default true -}}
{{ if and $menu $hasSidebar }}{{ $sidebar = partial "assets/sidebar.html" (dict "page" . "menu" $menu "version" $version) }}{{ end }}
{{ $toc := "" }}
{{- $hasTOC := and .Site.Params.navigation.toc .Params.includeToc | default true -}}
{{ if $hasTOC }}{{ $toc = partial "assets/toc.html" (dict "page" . "download" $download) }}{{ end -}}
{{ with $sidebar -}}
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-inledby="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="{{ T "close" }}"></button>
</div> </div>
<div class="offcanvas-body"> <div class="offcanvas-body">
{{ partial "assets/sidebar" (dict "page" . "menu" $menu "version" $version) }} {{ . | safeHTML }}
</div> </div>
</div> </div>
{{ end }}
<div class="container-xxl p-4 px-xxl-0">
<div class="container-xxl flex-fill p-4 px-xxl-0">
{{ if and $menu $hasSidebar -}}
<div class="row row-cols-md-2 row-cols-lg-3"> <div class="row row-cols-md-2 row-cols-lg-3">
<div class="col col-md-3 col-lg-2 d-none pt-5 d-md-block sidebar-overflow sticky-top"> <div class="col col-md-3 col-lg-2 d-none pt-5 d-md-block sidebar-overflow sticky-top">
{{ partial "assets/sidebar" (dict "page" . "menu" $menu "version" $version) }} {{ $sidebar | safeHTML }}
</div> </div>
<div class="col col-md-9 col-lg-8 mb-5 p-4"> <div class="col col-md-9 col-lg-8 mb-5 p-4">
{{ partial "partials/header.html" . }} {{ partial "partials/single-main.html" . }}
{{ partial "partials/body.html" . }}
{{ partial "partials/footer.html" . }}
</div> </div>
<div class="col col-lg-2 d-none d-lg-block pt-5"> <div class="col col-lg-2 d-none d-lg-block pt-5">
{{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}} {{ $toc | safeHTML }}
{{ partial "assets/toc.html" (dict "page" . "download" $download) -}}
{{ end -}}
</div> </div>
</div> </div>
</div> {{ else if $hasSidebar }}
{{ else if $sidebar }}
<div class="container-xxl px-3 px-xxl-0">
<div class="row row-cols-1 row-cols-sm-3"> <div class="row row-cols-1 row-cols-sm-3">
<div class="col col-md-2 d-none d-md-block"></div> <div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-12 col-md-8"> <div class="col col-sm-12 col-md-8">
{{ partial "partials/header.html" . }} {{ partial "partials/single-main.html" . }}
{{ partial "partials/body.html" . }}
{{ partial "partials/footer.html" . }}
</div> </div>
<div class="col col-md-2 d-none d-md-block"> <div class="col col-md-2 d-none d-md-block">
{{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}} {{ $toc | safeHTML }}
{{ partial "assets/toc.html" (dict "page" . "download" $download) -}}
{{ end -}}
</div> </div>
</div> </div>
</div> {{ else }}
{{ else }}
<div class="container-xxl px-3 px-xxl-0">
<div class="row row-cols-1 row-cols-sm-2"> <div class="row row-cols-1 row-cols-sm-2">
<div class="col col-sm-12 col-md-9"> <div class="col col-sm-12 col-md-9">
{{ partial "partials/header.html" . }} {{ partial "partials/single-main.html" . }}
{{ partial "partials/body.html" . }}
{{ partial "partials/footer.html" . }}
</div> </div>
<div class="col col-md-3 d-none d-md-block"> <div class="col col-md-3 d-none d-md-block">
{{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}} {{ $toc | safeHTML }}
{{ partial "assets/toc.html" (dict "page" . "download" $download) -}}
{{ end -}}
</div> </div>
</div> </div>
</div> {{ end -}}
{{ end -}} </div>
{{ end -}} {{ end -}}

View File

@@ -0,0 +1 @@
{{- partial "single/thumbnail.html" . -}}

View File

@@ -0,0 +1,20 @@
<div class="row row-cols-2 mt-5 mb-3">
<div class="col">
{{ with .NextInSection -}}
{{ if .OutputFormats.Get "html" -}}
<a class="next" href="{{ .RelPermalink }}">
{{- partial "assets/icon.html" (dict "icon" "fas arrow-left" "spacing" false) }}&nbsp;{{ .LinkTitle }}
</a>
{{- end -}}
{{ end -}}
</div>
<div class="col text-end">
{{ with .PrevInSection -}}
{{ if .OutputFormats.Get "html" -}}
<a class="previous" href="{{ .RelPermalink }}">
{{ .LinkTitle }}&nbsp;{{- partial "assets/icon.html" (dict "icon" "fas arrow-right" "spacing" false) }}
</a>
{{- end -}}
{{ end -}}
</div>
</div>

View File

@@ -0,0 +1,33 @@
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
<small class="text-body-secondary text-uppercase">
{{ $datestr | i18n "postedOnDate" -}}
{{ if ne $datestr $lastmodstr -}}&nbsp;({{ $lastmodstr | i18n "lastModified" }}){{ end }} &bull;
{{ .ReadingTime | lang.FormatNumber 0 }}&nbsp;{{ i18n "minutesShort" }} {{ i18n "read" }} &bull;
{{ .WordCount | lang.FormatNumber 0 }}&nbsp;{{ i18n "words" }}
</small>
{{- if gt (len (.GetTerms "tags")) 0 -}}
<div class="mt-3">
<div class="d-none-dark">
<div class="hstack gap-1">
{{ range (.GetTerms "tags") -}}
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "light" "size" "sm") }}
{{ end -}}
</div>
</div>
<div class="d-none-light">
<div class="hstack gap-1">
{{ range (.GetTerms "tags") -}}
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "primary" "size" "sm" "outline" "true") }}
{{ end -}}
</div>
</div>
</div>
{{- end -}}
{{ partial "assets/sharing.html" . }}
<p class="lead mb-5 mt-3">{{ .Description }}</p>

View File

@@ -0,0 +1 @@
{{/* Intentionally left blank to suppress thumbnail */}}

View File

@@ -0,0 +1,3 @@
<div class="mt-5 small">
{{ partial "utilities/git.html" . }}
</div>

View File

@@ -0,0 +1,3 @@
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
{{ partial "assets/sharing.html" . }}
<p class="lead mb-5">{{ .Description }}</p>

View File

@@ -0,0 +1 @@
{{/* Intentionally left blank to suppress thumbnail */}}

View File

@@ -0,0 +1 @@
{{/* Intentionally left blank to suppress page navigation */}}

View File

@@ -0,0 +1,3 @@
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
{{ partial "assets/sharing.html" . }}
<p class="lead mb-5">{{ .Description }}</p>

View File

@@ -161,7 +161,7 @@
> >
<div class="d-flex justify-content-{{ $justify }}"> <div class="d-flex justify-content-{{ $justify }}">
<div class="my-auto">{{ $title | safeHTML }}</div> <div class="my-auto">{{ $title | safeHTML }}</div>
{{- with $icon }}<div class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon) }}</div>{{ end }} {{- with $icon }}<div class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon "spacing" false) }}</div>{{ end }}
</div> </div>
{{- with $badge }} {{- with $badge }}

View File

@@ -25,7 +25,7 @@
<li class="nav-item dropdown {{ if $collapsed }}d-{{ $size }}-none{{ else }}d-none d-{{ $size }}-block{{ end }}"> <li class="nav-item dropdown {{ if $collapsed }}d-{{ $size }}-none{{ else }}d-none d-{{ $size }}-block{{ end }}">
<a class="nav-link dropdown-toggle" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "colorMode" }}" aria-expanded="false" id="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}"> <a class="nav-link dropdown-toggle" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "colorMode" }}" aria-expanded="false" id="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}">
<span class="theme-icon-active">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw") }}</span>{{ if $collapsed }} {{ T "colorMode" }} {{ end }} <span class="theme-icon-active">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw") }}</span>{{ if $collapsed }}&nbsp;{{ T "colorMode" }} {{ end }}
<span class="d-md-none"></span> <span class="d-md-none"></span>
</a> </a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}"> <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}">
@@ -242,8 +242,9 @@
<!-- Insert the brand logo or name --> <!-- Insert the brand logo or name -->
<a class="navbar-brand mx-auto" href="{{ site.Home.RelPermalink }}"> <a class="navbar-brand mx-auto" href="{{ site.Home.RelPermalink }}">
{{- if (and $logoLight $logoDark) -}} {{- if (and $logoLight $logoDark) -}}
<img src="{{if $absoluteURL }}{{ absURL $logoLight }}{{ else }}{{ $logoLight }}{{ end }}" class="d-none-dark" alt="{{ $title }} logo" height="30"> {{ $width := partial "utilities/GetWidth.html" (dict "path" $logoLight "height" 30) }}
<img src="{{if $absoluteURL }}{{ absURL $logoDark }}{{ else }}{{ $logoDark }}{{ end }}" class="d-none-light" alt="{{ $title }} logo" height="30"> <img src="{{if $absoluteURL }}{{ absURL $logoLight }}{{ else }}{{ $logoLight }}{{ end }}" class="d-none-dark" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
<img src="{{if $absoluteURL }}{{ absURL $logoDark }}{{ else }}{{ $logoDark }}{{ end }}" class="d-none-light" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
{{- else if $logo -}} {{- else if $logo -}}
{{ $width := partial "utilities/GetWidth.html" (dict "path" $logo "height" 30) }} {{ $width := partial "utilities/GetWidth.html" (dict "path" $logo "height" 30) }}
<img src="{{if $absoluteURL }}{{ absURL $logo }}{{ else }}{{ $logo }}{{ end }}" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}> <img src="{{if $absoluteURL }}{{ absURL $logo }}{{ else }}{{ $logo }}{{ end }}" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
@@ -300,10 +301,10 @@
{{- $currentLang := $page.Language.Lang -}} {{- $currentLang := $page.Language.Lang -}}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false"> <a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }} {{ T "languageSwitcherLabel" }} {{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }}&nbsp;{{ T "languageSwitcherLabel" }}&nbsp;
</a> </a>
<a class="nav-link dropdown-toggle d-none d-{{ $size }}-block" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false"> <a class="nav-link dropdown-toggle d-none d-{{ $size }}-block" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }} {{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" true) }}
</a> </a>
<ul class="dropdown-menu dropdown-menu-end "> <ul class="dropdown-menu dropdown-menu-end ">
{{- if $page.IsTranslated -}} {{- if $page.IsTranslated -}}
@@ -356,7 +357,7 @@
<input id="search-input-modal" class="search-input form-control is-search" tabindex="1" type="search" placeholder="{{ T "ui_search" }}..." aria-label="{{ T "ui_search" }}" autocomplete="off"> <input id="search-input-modal" class="search-input form-control is-search" tabindex="1" type="search" placeholder="{{ T "ui_search" }}..." aria-label="{{ T "ui_search" }}" autocomplete="off">
</form> </form>
</div> </div>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ T "close" }}"></button>
</div> </div>
<div class="modal-body p-2"> <div class="modal-body p-2">
<div class="search-suggestions bg-body" data-no-results="{{ T "ui_no_results" }}"></div> <div class="search-suggestions bg-body" data-no-results="{{ T "ui_no_results" }}"></div>

View File

@@ -10,6 +10,6 @@
{{- if $pageAlertMsg -}} {{- if $pageAlertMsg -}}
<div id="page-alert" class="alert alert-primary alert-no-decoration fade show d-flex align-items-center small m-0 py-1" data-page-alert-version="{{ $version }}"> <div id="page-alert" class="alert alert-primary alert-no-decoration fade show d-flex align-items-center small m-0 py-1" data-page-alert-version="{{ $version }}">
<a href="{{ with $pageAlertURL }}{{ . }}{{ else }}#!{{ end }}" class="text-decoration-none flex-grow-1 text-center">{{ $pageAlertMsg }}</a> <a href="{{ with $pageAlertURL }}{{ . }}{{ else }}#!{{ end }}" class="text-decoration-none flex-grow-1 text-center">{{ $pageAlertMsg }}</a>
<button id="page-alert-btn-close" type="button" class="btn-close" data-bs-dismiss="alert"></button> <button id="page-alert-btn-close" type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ T "close" }}"></button>
</div> </div>
{{- end -}} {{- end -}}

View File

@@ -20,6 +20,6 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{ with $title }}<p id="{{ anchorize . }}" class="display-4 pt-4{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }} {{ with $title }}<p id="{{ anchorize . }}" class="display-4 py-5{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}
{{ with $description }} <p class="lead mb-5">{{ . }}</p>{{ end }} {{ with $description }} <p class="lead mb-5">{{ . }}</p>{{ end }}
{{ $content }} {{ $content }}

View File

@@ -25,7 +25,7 @@
<div id="{{ $id }}" class="toast{{ with $class }} {{ . }}{{ end }}" role="alert" aria-live="assertive" aria-atomic="true"> <div id="{{ $id }}" class="toast{{ with $class }} {{ . }}{{ end }}" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header"> <div class="toast-header">
{{ with $header }}<strong class="me-auto">{{ . }}</strong>{{ end }} {{ with $header }}<strong class="me-auto">{{ . }}</strong>{{ end }}
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="{{ T "close" }}"></button>
</div> </div>
<div class="toast-body">{{ $message }}</div> <div class="toast-body">{{ $message }}</div>
</div> </div>

View File

@@ -39,6 +39,7 @@
"danger" (default "#dc3545" site.Params.style.danger) "danger" (default "#dc3545" site.Params.style.danger)
"light" (default "#f8f9fa" site.Params.style.light) "light" (default "#f8f9fa" site.Params.style.light)
"dark" (default "#212529" site.Params.style.dark) "dark" (default "#212529" site.Params.style.dark)
"navbar-height" (site.Params.navigation.offset | default "4em")
"navbar-offset" $navbarOffset "navbar-offset" $navbarOffset
"enable-dark-mode" (printf "%t" ((default true site.Params.main.enableDarkMode))) "enable-dark-mode" (printf "%t" ((default true site.Params.main.enableDarkMode)))
"import-fonts" (printf "%t" (not (hasPrefix (lower site.Params.style.themeFontPath) "http"))) "import-fonts" (printf "%t" (not (hasPrefix (lower site.Params.style.themeFontPath) "http")))

View File

@@ -31,7 +31,8 @@
<span class="fs-5 text-muted">{{ $page.Description }}</span> <span class="fs-5 text-muted">{{ $page.Description }}</span>
{{ if $actions }} {{ if $actions }}
<div class="hstack{{ if gt (len $actions) 1 }} gap-3{{ end }} justify-content-{{ $align}} pt-5 pt-md-3"> {{- $actions = sort $actions "weight" "asc" -}}
<div class="hstack{{ if gt (len $actions) 1 }} gap-1{{ end }} justify-content-{{ $align}} pt-5 pt-md-3">
{{ range $actions }} {{ range $actions }}
{{ partial "assets/button.html" (dict "href" .url "icon" .icon "title" .title "outline" .outline "order" "last" "justify" "start") }} {{ partial "assets/button.html" (dict "href" .url "icon" .icon "title" .title "outline" .outline "order" "last" "justify" "start") }}
{{ end }} {{ end }}
@@ -61,7 +62,7 @@
{{- end -}} {{- end -}}
<div class="container-fluid p-0 {{ with site.Params.home.feature.color }} bg-{{ . }} bg-opacity-{{ site.Params.style.themeOpacity | default "25" | safeHTML }}{{ end }}"> <div class="container-fluid p-0 {{ with site.Params.home.feature.color }} bg-{{ . }} bg-opacity-{{ site.Params.style.themeOpacity | default "25" | safeHTML }}{{ end }}">
<div class="container-xxl {{ if $breadcrumb }} pb-4 px-4 {{ else }} p-4 {{ end }} px-xxl-0 {{ if site.Params.home.fullCover }} fullscreen{{ end }} d-flex flex-column"> <div class="container-xxl {{ if $breadcrumb }} pb-4 px-4 {{ else }} p-4 {{ end }} px-xxl-0 {{ if site.Params.home.fullCover }} fullcover{{ end }} d-flex flex-column">
{{ if $breadcrumb }} {{ if $breadcrumb }}
<div>{{ partial "assets/breadcrumb.html" $page }}</div> <div>{{ partial "assets/breadcrumb.html" $page }}</div>
{{ end -}} {{ end -}}
@@ -74,7 +75,7 @@
</div> </div>
</div> </div>
{{ else }} {{ else }}
<div class="flex-fill row row-cols-1 row-cols-md-2 justify-content-{{ $justify }}"> <div class="row row-cols-1 row-cols-md-2 justify-content-{{ $justify }} flex-fill">
<div class="col col-12 col-md-{{ $width }} order-1 order-md-0 my-md-auto"> <div class="col col-12 col-md-{{ $width }} order-1 order-md-0 my-md-auto">
{{ partial "partials/list/featured-body.html" (dict "page" $page "headings" $headings "orientation" $orientation "actions" $actions "align" $align) }} {{ partial "partials/list/featured-body.html" (dict "page" $page "headings" $headings "orientation" $orientation "actions" $actions "align" $align) }}
</div> </div>

View File

@@ -0,0 +1,35 @@
{{- $thumbnail := "" -}}
{{- $credits := "" -}}
{{- if reflect.IsMap .Params.Thumbnail -}}
{{- $thumbnail = .Params.Thumbnail.url -}}
{{- $author := "" -}}
{{- if and .Params.Thumbnail.authorURL "text" .Params.Thumbnail.author }}
{{- $author = partial "utilities/link" (dict "destination" .Params.Thumbnail.authorURL "text" .Params.Thumbnail.author) -}}
{{- else if .Params.Thumbnail.author }}
{{- $author = .Params.Thumbnail.author -}}
{{- end -}}
{{- $origin := "" -}}
{{- if and .Params.Thumbnail.originURL "text" .Params.Thumbnail.origin }}
{{- $origin = partial "utilities/link" (dict "destination" .Params.Thumbnail.originURL "text" .Params.Thumbnail.origin) -}}
{{- else if .Params.Thumbnail.origin }}
{{- $origin = .Params.Thumbnail.origin -}}
{{- end }}
{{- if and $author $origin }}
{{ $credits = printf (T "photoFull") $author $origin }}
{{ else if $author }}
{{ $credits = T "photoShort" $author }}
{{ end }}
{{ else }}
{{- $thumbnail = .Params.Thumbnail -}}
{{ if or .Params.photoCredits .Params.photoSource }}
{{ warnf "DEPRECATED: frontmatter variables `photoCredits` and `photoSource` have been deprecated in release v0.18: %s" .RelPermalink }}
{{ end }}
{{- if and .Params.photoCredits .Params.PhotoSource }}{{ $credits = printf (T "photoFull") .Params.photoCredits .Params.PhotoSource }}{{ end -}}
{{- end -}}
{{ if $thumbnail -}}
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" $credits) -}}
{{ end -}}

View File

@@ -0,0 +1,33 @@
{{- $ref := "" -}}
{{- $anchor := "" -}}
{{ $url := .url }}
{{ if not $url }}
{{- errorf "partial [utilities/GetPage.html] - Expected param 'url'" -}}
{{ end }}
{{ $page := .page }}
{{ if not $page }}
{{- errorf "partial [utilities/GetPage.html] - Expected param 'page'" -}}
{{ end }}
{{- $isExternal := ne (urls.Parse (absURL $url)).Host (urls.Parse site.BaseURL).Host -}}
{{- if not $isExternal -}}
{{- $ref = $page.GetPage $url -}}
{{ if not $ref }}
{{ $ref = (index (where $page.Site.AllPages "RelPermalink" (printf "%s/" (strings.TrimSuffix "/" $url))) 0)}}
{{ end }}
{{- if not $ref }}
{{- $segments := split $url "/" -}}
{{- if and (hasPrefix $url "/") (gt (len $segments) 1) -}}
{{- $prefix := index $segments 1 -}}
{{ with index (where site.Sites "Language.Lang" $prefix) 0 }}
{{- $path := printf "/%s" (strings.TrimPrefix (printf "/%s/" $prefix) $url) }}
{{- $ref = .GetPage $path -}}
{{ end }}
{{- end -}}
{{- end -}}
{{- end -}}
{{ return $ref }}

View File

@@ -0,0 +1,76 @@
{{- $page := . -}}
{{/* Add title for current page */}}
{{- $items := slice -}}
{{ $items = $items | append (dict "title" .Title "content" "" )}}
{{/* Identify page sections */}}
{{- $sections := slice -}}
{{- $sections = $sections | append $page.Type -}}
{{ with $page.Params.sections }}
{{ $sections = $sections | append . }}
{{ end }}
{{ if $page.IsHome }}
{{- if not $page.Params.sections -}}
{{- with site.Params.home.sections }}
{{ $sections = $sections | append . }}
{{ else }}
{{ range $section := site.Sections }}
{{ $sections = $sections | append $section.Type }}
{{ end }}
{{ end }}
{{- end -}}
{{ end }}
{{/* Generate title and content for each section */}}
{{- range $index, $section := $sections -}}
{{- $sectionPage := site.GetPage "section" $section -}}
{{- $sectionURL := $sectionPage.RelPermalink -}}
{{ with $sectionPage.Params.redirect}}
{{ $target := partial "utilities/GetPage.html" (dict "url" . "page" $page) }}
{{- if not $target -}}
{{ if eq (printf "%T" $page.File) "*hugolib.fileInfo"}}
{{- errorf "Cannot find redirect target on page '%s': %s" $page.File . -}}
{{ else }}
{{- errorf "Cannot find redirect target: %s" . -}}
{{ end }}
{{ else }}
{{- $sectionURL = $target.RelPermalink -}}
{{ end }}
{{ end }}
{{- $title := or $sectionPage.Title $sectionPage.Type -}}
{{- with (index site.Params.sections $section) -}}
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
{{- end -}}
{{- $thumbnail := (or (and (reflect.IsMap $sectionPage.Params.Thumbnail) $sectionPage.Params.Thumbnail.url) $sectionPage.Params.Thumbnail) -}}
{{- $icon := $sectionPage.Params.Icon -}}
{{- $content := $sectionPage.Content -}}
{{- $sectionTitle := strings.FirstUpper $sectionPage.Type -}}
{{- $moreTitle := "" -}}
{{- with (index site.Params.sections $section) -}}
{{- with index . "reference" }}{{ $moreTitle = . }}{{ end -}}
{{- end -}}
{{- $moreTitle = or $moreTitle (printf (T "more" (pluralize $sectionTitle))) -}}
{{- $sectionContent := trim (partial "assets/section-list.html" (dict
"page" $page
"section" $section
"home" $page.IsHome
"simple" (eq (len $sections) 1)
"nested" (and $page.IsHome (eq $section $page.Section))
"thumbnail" $thumbnail
"icon" $icon
"content" $content
"moreTitle" $moreTitle
"sectionURL" $sectionURL)) " \r\n"
-}}
{{ if $sectionContent }}
{{ $items = $items | append (dict "title" $title "content" $sectionContent)}}
{{ end }}
{{- end -}}
{{ return $items }}

View File

@@ -5,7 +5,7 @@
{{ if eq (path.Ext $path) ".svg" }} {{ if eq (path.Ext $path) ".svg" }}
{{ $path := path.Join "static" .path }} {{ $path := path.Join "static" .path }}
{{ if fileExists $path }} {{ if fileExists $path }}
{{ with findRE `viewBox="\d+[\s,]\d+[\s,]\d+[\s,]\d+"` (readFile $path) 1 }} {{ with findRE `viewBox="\d*\.?\d+[\s,]\d*\.?\d+[\s,]\d*\.?\d+[\s,]\d*\.?\d+"` (readFile $path) 1 }}
{{ $content := split (index (split (index . 0) `"`) 1) " " }} {{ $content := split (index (split (index . 0) `"`) 1) " " }}
{{ $viewbox_width := float (index $content 2) }} {{ $viewbox_width := float (index $content 2) }}
{{ $viewbox_height := float (index $content 3) }} {{ $viewbox_height := float (index $content 3) }}

View File

@@ -35,25 +35,12 @@
{{- if ne (len $segments) 2 }} {{- if ne (len $segments) 2 }}
{{- errorf "partial [utilities/link.html] - Malformed path, expected one anchor '#' only: %s" $destination -}} {{- errorf "partial [utilities/link.html] - Malformed path, expected one anchor '#' only: %s" $destination -}}
{{ else }} {{ else }}
{{- $destination = index $segments 0 -}} {{- $destination = index $segments 0 -}}
{{- $anchor = index $segments 1 -}} {{- $anchor = index $segments 1 -}}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{- $destination = strings.TrimSuffix "/" $destination -}}
{{- $ref := $page.GetPage $destination -}}
{{- if not $ref }}
{{- $segments := split $destination "/" -}}
{{- if and (hasPrefix $destination "/") (gt (len $segments) 1) -}}
{{- $prefix := index $segments 1 -}}
{{- $page := .Page -}}
{{ with index (where site.Sites "Language.Lang" $prefix) 0 }}
{{- $path := printf "/%s" (strings.TrimPrefix (printf "/%s/" $prefix) $destination) }}
{{- $ref = .GetPage $path -}}
{{ end }}
{{- end -}}
{{- end -}}
{{ $ref := partial "utilities/GetPage.html" (dict "url" $destination "page" $page) }}
{{- if not $ref -}} {{- if not $ref -}}
{{- errorf "partial [utilities/link.html] - Cannot find page: %s" $destination -}} {{- errorf "partial [utilities/link.html] - Cannot find page: %s" $destination -}}
{{- $error = true -}} {{- $error = true -}}

View File

@@ -63,6 +63,6 @@
{{ end }} {{ end }}
{{ if not $error }} {{ if not $error }}
<abbr {{ with $class }}class="{{ . }}"{{ end }} title="{{ $title }}">{{ $key }}</abbr> <abbr {{ with $class }}class="{{ . }}"{{ end }} title="{{ $title }}" tabindex="0">{{ $key }}</abbr>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@@ -56,7 +56,7 @@
{{ with $icon }}<div class="pt-1 pe-2">{{ . }}</div>{{ end }} {{ with $icon }}<div class="pt-1 pe-2">{{ . }}</div>{{ end }}
<div class="flex-grow-1 my-auto"> <div class="flex-grow-1 my-auto">
{{ trim .Inner " \r\n" | .Page.RenderString | safeHTML -}} {{ trim .Inner " \r\n" | .Page.RenderString | safeHTML -}}
{{ if $dismissible }}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>{{ end }} {{ if $dismissible }}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ T "close" }}"></button>{{ end }}
</div> </div>
</div> </div>
{{- end -}} {{- end -}}

View File

@@ -27,6 +27,7 @@
"tab" Optional flag to indicate if an external link should open in a new tab, defaults to setting "tab" Optional flag to indicate if an external link should open in a new tab, defaults to setting
"main.externalLinks.tab" in the site's parameters. "main.externalLinks.tab" in the site's parameters.
"spacing" Optional flag to add spacing to the inline button, defaults to "true". "spacing" Optional flag to add spacing to the inline button, defaults to "true".
"wrapper" Optional element to wrap the button.
--> -->
{{ $error := false }} {{ $error := false }}
@@ -140,6 +141,10 @@
"spacing" $spacing) "spacing" $spacing)
-}} -}}
{{ with .Get "wrapper" }}
{{ $output = printf `<div class="%s">%s</div>` . $output }}
{{ end }}
{{- if .Parent -}} {{- if .Parent -}}
{{ $current := .Parent.Scratch.Get "inner" }} {{ $current := .Parent.Scratch.Get "inner" }}
{{ if $current }} {{ if $current }}

View File

@@ -73,27 +73,9 @@
{{- $isExternal := ne (urls.Parse (absURL $url)).Host (urls.Parse site.BaseURL).Host -}} {{- $isExternal := ne (urls.Parse (absURL $url)).Host (urls.Parse site.BaseURL).Host -}}
{{- if not $isExternal -}} {{- if not $isExternal -}}
{{- $url = strings.TrimSuffix "/" $url -}} {{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }}
{{- $ref := "" -}}
{{- if not $ref -}} {{- if not $ref -}}
{{- $ref = .Page.GetPage $url -}} {{- errorf "Cannot find page: '%s' at %s" $url .Position -}}
{{- end -}}
{{- if not $ref }}
{{- $segments := split $url "/" -}}
{{- if and (hasPrefix $url "/") (gt (len $segments) 1) -}}
{{- $prefix := index $segments 1 -}}
{{- $page := .Page -}}
{{ with index (where site.Sites "Language.Lang" $prefix) 0 }}
{{- $path := printf "/%s" (strings.TrimPrefix (printf "/%s/" $prefix) $url) }}
{{- $ref = .GetPage $path -}}
{{ end }}
{{- end -}}
{{- end -}}
{{- if not $ref -}}
{{- errorf "Cannot find page: '%s' at %s" $href .Position -}}
{{- $error = true -}} {{- $error = true -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -101,9 +83,7 @@
{{ with $anchor }} {{ with $anchor }}
{{ $url = printf "%s#%s" $url .}} {{ $url = printf "%s#%s" $url .}}
{{ end }} {{ end }}
{{- if not $error -}} {{- if not $error -}}
{{ partial "utilities/link.html" (dict "destination" $url "text" $text "cue" $cue "tab" $tab "case" $case "class" $class "page" .Page) }} {{ partial "utilities/link.html" (dict "destination" $url "text" $text "cue" $cue "tab" $tab "case" $case "class" $class "page" .Page) }}
{{- end -}} {{- end -}}

View File

@@ -1,5 +1,5 @@
{{ define "main" }} {{ define "main" }}
<div class="container-xxl px-4 px-xxl-0"> <div class="container-xxl flex-fill px-4 px-xxl-0">
<div class="row row-cols-1 row-cols-sm-3"> <div class="row row-cols-1 row-cols-sm-3">
<div class="col col-md-2 d-none d-md-block"></div> <div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-12 col-md-8"> <div class="col col-sm-12 col-md-8">

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.21.0-alpha4", "version": "0.21.0-beta5",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.21.0-alpha4", "version": "0.21.0-beta5",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@fullhuman/postcss-purgecss": "^5.0.0", "@fullhuman/postcss-purgecss": "^5.0.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@gethinode/hinode", "name": "@gethinode/hinode",
"version": "0.21.0-alpha4", "version": "0.21.0-beta5",
"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",