mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 10:04:22 +00:00
Compare commits
109 Commits
v0.22.0-be
...
v0.22.2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ed9373bc7e | ||
![]() |
0d2f5cc553 | ||
![]() |
12f6e9e552 | ||
![]() |
999c7a8fff | ||
![]() |
a5494f4681 | ||
![]() |
404a5500df | ||
![]() |
4442833c1b | ||
![]() |
4cb800d485 | ||
![]() |
f1598c3c4b | ||
![]() |
6b9915a425 | ||
![]() |
59befa908f | ||
![]() |
af68fb24b5 | ||
![]() |
73870663f6 | ||
![]() |
ac48cf6b57 | ||
![]() |
6a5d4a1363 | ||
![]() |
8be3996fb2 | ||
![]() |
bd7d2ffb09 | ||
![]() |
9375248a09 | ||
![]() |
713d1920a3 | ||
![]() |
adc1212cd7 | ||
![]() |
b8803d75fe | ||
![]() |
8006acb8c9 | ||
![]() |
7be7e3b7f0 | ||
![]() |
a6c18c91e5 | ||
![]() |
81c531e2b5 | ||
![]() |
d66910740f | ||
![]() |
3323bf500d | ||
![]() |
3cc34d18e0 | ||
![]() |
aeb050440f | ||
![]() |
a9a6bd0d31 | ||
![]() |
2b921def52 | ||
![]() |
f5a1a97383 | ||
![]() |
c87b96f8f0 | ||
![]() |
1def105bda | ||
![]() |
1d67a30ece | ||
![]() |
1a3d50ca17 | ||
![]() |
ce26722c96 | ||
![]() |
f2aab26b6e | ||
![]() |
10e086594b | ||
![]() |
30ea77182d | ||
![]() |
e899d7d39a | ||
![]() |
3b2e780a20 | ||
![]() |
d443d89616 | ||
![]() |
c981ac45d3 | ||
![]() |
ceabca3a43 | ||
![]() |
99b6fcbc42 | ||
![]() |
dde79bf5d0 | ||
![]() |
ff3e957558 | ||
![]() |
1466c7a927 | ||
![]() |
1a7c18d209 | ||
![]() |
2c8ed7c494 | ||
![]() |
0526b4c5e0 | ||
![]() |
c2f4e6bc48 | ||
![]() |
0cc5fcb33a | ||
![]() |
e461a9564f | ||
![]() |
183879d51c | ||
![]() |
cddae05b53 | ||
![]() |
67d831d898 | ||
![]() |
d726323220 | ||
![]() |
f76fea84cc | ||
![]() |
6ec24e12f7 | ||
![]() |
cf27cce44d | ||
![]() |
6ea22d121f | ||
![]() |
2d7bfaa9dc | ||
![]() |
0e62cc4fec | ||
![]() |
ae0307092f | ||
![]() |
2ebf6fe7fa | ||
![]() |
f9805de74c | ||
![]() |
20b7b6b95c | ||
![]() |
c2beca3504 | ||
![]() |
7414a1badf | ||
![]() |
cd5f7e08c4 | ||
![]() |
fd804fa29a | ||
![]() |
08c310c59e | ||
![]() |
46bde0918f | ||
![]() |
a77c3aa347 | ||
![]() |
d27c04dc64 | ||
![]() |
b0c8326255 | ||
![]() |
99a35a3ffd | ||
![]() |
c5673efea2 | ||
![]() |
c3b48e0033 | ||
![]() |
5aa57dd402 | ||
![]() |
d919d3f068 | ||
![]() |
38ad418005 | ||
![]() |
ba50786118 | ||
![]() |
aee3cb3e03 | ||
![]() |
61430b07e2 | ||
![]() |
5d393598c5 | ||
![]() |
4b0c075b53 | ||
![]() |
2b5b6434da | ||
![]() |
ae0877037a | ||
![]() |
64a12da2e6 | ||
![]() |
6865fa40f7 | ||
![]() |
79632aeed0 | ||
![]() |
6f03f3e5fd | ||
![]() |
df53150972 | ||
![]() |
9282cd630d | ||
![]() |
a3eb2fc7cc | ||
![]() |
4e39d03240 | ||
![]() |
8cadb30179 | ||
![]() |
d2c02ca016 | ||
![]() |
1bbfba32a5 | ||
![]() |
cf59cc3a49 | ||
![]() |
897db61ee2 | ||
![]() |
ac14ac23fb | ||
![]() |
0f1bc34d37 | ||
![]() |
26d318356f | ||
![]() |
9f4a0d35b6 | ||
![]() |
a201be6487 |
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023 Mark Dumay
|
Copyright (c) 2024 Mark Dumay
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@@ -136,7 +136,6 @@ The `hinode`, `docs`, and `template` codebase is released under the [MIT license
|
|||||||
[npm]: https://www.npmjs.com
|
[npm]: https://www.npmjs.com
|
||||||
[observatory]: https://observatory.mozilla.org/analyze/demo.gethinode.com
|
[observatory]: https://observatory.mozilla.org/analyze/demo.gethinode.com
|
||||||
[pagespeed]: https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F
|
[pagespeed]: https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F
|
||||||
[utterances]: https://utteranc.es
|
|
||||||
|
|
||||||
<!-- MARKDOWN MAINTAINED LINKS -->
|
<!-- MARKDOWN MAINTAINED LINKS -->
|
||||||
[contribute]: https://gethinode.com/contribute
|
[contribute]: https://gethinode.com/contribute
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
@import "components/carousel.scss";
|
@import "components/carousel.scss";
|
||||||
@import "components/clipboard.scss";
|
@import "components/clipboard.scss";
|
||||||
@import "components/command.scss";
|
@import "components/command.scss";
|
||||||
@import "components/comments.scss";
|
|
||||||
@import "components/feature.scss";
|
@import "components/feature.scss";
|
||||||
@import "components/footer.scss";
|
@import "components/footer.scss";
|
||||||
@import "components/nav.scss";
|
@import "components/nav.scss";
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
@import "components/carousel.scss";
|
@import "components/carousel.scss";
|
||||||
@import "components/clipboard.scss";
|
@import "components/clipboard.scss";
|
||||||
@import "components/command.scss";
|
@import "components/command.scss";
|
||||||
@import "components/comments.scss";
|
|
||||||
@import "components/feature.scss";
|
@import "components/feature.scss";
|
||||||
@import "components/footer.scss";
|
@import "components/footer.scss";
|
||||||
@import "components/nav.scss";
|
@import "components/nav.scss";
|
||||||
|
@@ -1,20 +0,0 @@
|
|||||||
.utterances {
|
|
||||||
position: relative;
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 760px;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.utterances-frame {
|
|
||||||
color-scheme: light;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 1px;
|
|
||||||
min-width: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
@@ -1,6 +1,6 @@
|
|||||||
# toml-docs-start main
|
# toml-docs-start main
|
||||||
title = "Hinode"
|
title = "Hinode"
|
||||||
copyright = "Copyright © 2023 Mark Dumay."
|
copyright = "Copyright © 2024 Mark Dumay."
|
||||||
paginate = 9
|
paginate = 9
|
||||||
enableGitInfo = true
|
enableGitInfo = true
|
||||||
# toml-docs-end main
|
# toml-docs-end main
|
||||||
@@ -89,6 +89,8 @@ home = ["HTML", "RSS", "REDIR"]
|
|||||||
keepVarNames = true
|
keepVarNames = true
|
||||||
precision = 0
|
precision = 0
|
||||||
version = 2022
|
version = 2022
|
||||||
|
[minify.tdewolff.html]
|
||||||
|
keepWhitespace = true
|
||||||
|
|
||||||
[module]
|
[module]
|
||||||
[module.hugoVersion]
|
[module.hugoVersion]
|
||||||
@@ -132,4 +134,6 @@ home = ["HTML", "RSS", "REDIR"]
|
|||||||
path = "github.com/gethinode/mod-leaflet"
|
path = "github.com/gethinode/mod-leaflet"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "github.com/gethinode/mod-lottie"
|
path = "github.com/gethinode/mod-lottie"
|
||||||
|
[[module.imports]]
|
||||||
|
path = "github.com/gethinode/mod-utils"
|
||||||
# toml-docs-end modules
|
# toml-docs-end modules
|
||||||
|
@@ -189,14 +189,5 @@
|
|||||||
images = ["logo.png"]
|
images = ["logo.png"]
|
||||||
locale = "en_US"
|
locale = "en_US"
|
||||||
|
|
||||||
[comments]
|
|
||||||
enabled = false
|
|
||||||
repo = "" # Replace with your repository.
|
|
||||||
#issueTerm = "pathname" # pathname, url, title, og:title
|
|
||||||
#label = "comment"
|
|
||||||
# By default, light and dark mode correspond to github-light and github-dark, respectively.
|
|
||||||
# Optional values: github-light, github-dark, preferred-color-scheme, github-dark-orange, icy-dark, dark-blue, photon-dark.
|
|
||||||
#theme = ""
|
|
||||||
|
|
||||||
[links]
|
[links]
|
||||||
hinode = "https://gethinode.com"
|
hinode = "https://gethinode.com"
|
||||||
|
@@ -7,15 +7,14 @@ for = '/**'
|
|||||||
X-XSS-Protection = "1; mode=block"
|
X-XSS-Protection = "1; mode=block"
|
||||||
Content-Security-Policy = """\
|
Content-Security-Policy = """\
|
||||||
default-src 'self'; \
|
default-src 'self'; \
|
||||||
script-src 'self' \
|
script-src 'self' https://*.google-analytics.com https://*.googletagmanager.com; \
|
||||||
https://utteranc.es/client.js https://*.google-analytics.com https://*.googletagmanager.com; \
|
style-src 'self' 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; \
|
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://www.youtube-nocookie.com https://www.youtube.com; \
|
||||||
img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
media-src 'self' \
|
media-src 'self' \
|
||||||
|
@@ -1,9 +1,11 @@
|
|||||||
comment: >-
|
comment: >-
|
||||||
Creates an HTML element that shows the long form of an abbrevitation. The abbreviation data is centrally stored in a
|
Creates an HTML element that shows the long form of an abbrevitation. The
|
||||||
data file. By default, the shortcode uses `abbr.yaml` with translation support.
|
abbreviation data is centrally stored in a data file. By default, the
|
||||||
|
shortcode uses `abbr.yaml` with translation support.
|
||||||
|
|
||||||
The data file is expected to store key-value pairs, where `id` is the lower-case abbrevation and `long` its long
|
The data file is expected to store key-value pairs, where `id` is the
|
||||||
form. The following example illustrates this using YML:
|
lower-case abbrevation and `long` its long form. The following example
|
||||||
|
illustrates this using YML:
|
||||||
|
|
||||||
- id: css
|
- id: css
|
||||||
long: `Cascading Style Sheets`
|
long: `Cascading Style Sheets`
|
||||||
|
@@ -6,7 +6,7 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
ID of the accordion, defaults to “accordion-n” with a sequential number n.
|
ID of the accordion, defaults to `accordion-n` with a sequential number n.
|
||||||
always-open:
|
always-open:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
@@ -15,4 +15,4 @@ arguments:
|
|||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the accordion, e.g. “w-50”.
|
comment: Class attribute of the accordion, e.g. `w-50`.
|
||||||
|
@@ -1,22 +1,18 @@
|
|||||||
comment: >-
|
comment: Use the badge shortcode to enrich headings.
|
||||||
Use the badge shortcode to enrich headings.
|
|
||||||
arguments:
|
arguments:
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: false
|
||||||
comment: >-
|
comment: Title of the badge.
|
||||||
Title of the badge.
|
|
||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: Class attribute of the badge element.
|
||||||
Class attribute of the badge element.
|
|
||||||
color:
|
color:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: secondary
|
default: secondary
|
||||||
comment: >-
|
comment: Theme color of the element.
|
||||||
Theme color of the element.
|
|
||||||
options:
|
options:
|
||||||
values:
|
values:
|
||||||
- primary
|
- primary
|
||||||
|
@@ -6,19 +6,16 @@ arguments:
|
|||||||
- string
|
- string
|
||||||
- template.HTML
|
- template.HTML
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: Title of the button, required unless icon is set.
|
||||||
Title of the button, required unless icon is set.
|
|
||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: Class attribute of the button element, e.g. `p-5`.
|
||||||
Class attribute of the button element, e.g. “p-5”.
|
|
||||||
color:
|
color:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: primary
|
default: primary
|
||||||
comment: >-
|
comment: Theme color of the element.
|
||||||
Theme color of the element.
|
|
||||||
options:
|
options:
|
||||||
values:
|
values:
|
||||||
- primary
|
- primary
|
||||||
@@ -48,7 +45,7 @@ arguments:
|
|||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: ID of the button, to be used in the DOM.
|
comment: Identifier of the button, to be used in the DOM.
|
||||||
state:
|
state:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
@@ -61,7 +58,7 @@ arguments:
|
|||||||
- active
|
- active
|
||||||
- inactive
|
- inactive
|
||||||
size:
|
size:
|
||||||
type: string
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: md
|
default: md
|
||||||
comment: Size of the button.
|
comment: Size of the button.
|
||||||
@@ -85,7 +82,12 @@ arguments:
|
|||||||
comment: >-
|
comment: >-
|
||||||
Assistive label for the button or badge. The label is applied
|
Assistive label for the button or badge. The label is applied
|
||||||
to the badge instead of the button when a badge has been defined.
|
to the badge instead of the button when a badge has been defined.
|
||||||
The default value of the button aria-label is its title.
|
The default value of the button's assistive label is its title.
|
||||||
|
aria-label:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Alias for label.
|
||||||
|
group: shortcode
|
||||||
tooltip:
|
tooltip:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
@@ -108,7 +110,7 @@ arguments:
|
|||||||
- link
|
- link
|
||||||
- button
|
- button
|
||||||
placement:
|
placement:
|
||||||
type: string
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: top
|
default: top
|
||||||
comment: Position of the tooltip.
|
comment: Position of the tooltip.
|
||||||
@@ -134,7 +136,7 @@ arguments:
|
|||||||
- first
|
- first
|
||||||
- last
|
- last
|
||||||
justify:
|
justify:
|
||||||
type: string
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: center
|
default: center
|
||||||
comment: Justification of the button title and icon.
|
comment: Justification of the button title and icon.
|
||||||
@@ -149,7 +151,7 @@ arguments:
|
|||||||
toast:
|
toast:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: ID of the toast to display when the button is clicked.
|
comment: Identifier (ID) of the toast to display when the button is clicked.
|
||||||
clipboard:
|
clipboard:
|
||||||
type:
|
type:
|
||||||
- string
|
- string
|
||||||
@@ -174,6 +176,7 @@ arguments:
|
|||||||
comment: >-
|
comment: >-
|
||||||
Dictionary of key-value pairs added as custom attributes to the button
|
Dictionary of key-value pairs added as custom attributes to the button
|
||||||
element ('<a>').
|
element ('<a>').
|
||||||
|
group: partial
|
||||||
spacing:
|
spacing:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -11,11 +11,11 @@ arguments:
|
|||||||
- '*hugolib.pageForShortcode'
|
- '*hugolib.pageForShortcode'
|
||||||
optional: true
|
optional: true
|
||||||
comment: Context of the current page.
|
comment: Context of the current page.
|
||||||
|
group: partial
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: Title of the card group.
|
||||||
Title of the card, replaces the title of the referenced page (if any).
|
|
||||||
gutter:
|
gutter:
|
||||||
type: int
|
type: int
|
||||||
optional: true
|
optional: true
|
||||||
@@ -24,20 +24,24 @@ arguments:
|
|||||||
options:
|
options:
|
||||||
min: 0
|
min: 0
|
||||||
max: 5
|
max: 5
|
||||||
|
release: v0.19.0
|
||||||
list:
|
list:
|
||||||
type:
|
type:
|
||||||
- page.Pages
|
- page.Pages
|
||||||
- resource.Resources
|
- resource.Resources
|
||||||
optional: true
|
optional: true
|
||||||
comment: Array of pages to be rendered as cards.
|
comment: Array of pages to be rendered as cards.
|
||||||
|
group: partial
|
||||||
cards:
|
cards:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: String of rendered cards.
|
comment: String of rendered cards.
|
||||||
|
group: partial
|
||||||
max:
|
max:
|
||||||
type: int
|
type: int
|
||||||
optional: true
|
optional: true
|
||||||
comment: Maximum number of cards to display.
|
comment: Maximum number of cards to display.
|
||||||
|
group: partial
|
||||||
cols:
|
cols:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
@@ -51,23 +55,27 @@ arguments:
|
|||||||
- "4"
|
- "4"
|
||||||
- "5"
|
- "5"
|
||||||
- "auto"
|
- "auto"
|
||||||
|
release: v0.19.0
|
||||||
paginate:
|
paginate:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Flag indicating if pagination should be added to the card group, if the
|
Flag indicating if pagination should be added to the card group, if the
|
||||||
list exceeds the maximum number of cards to display.
|
list exceeds the maximum number of cards to display.
|
||||||
|
group: partial
|
||||||
href:
|
href:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
address for the button or hyperlink. If set, a button is added if the
|
Address for the button or hyperlink. If set, a button is added if the
|
||||||
list exceeds the maximum number of cards to display.
|
list exceeds the maximum number of cards to display.
|
||||||
|
group: partial
|
||||||
hrefTitle:
|
hrefTitle:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Title of the button or hyperlink as companion to href.
|
Title of the button or hyperlink as companion to href.
|
||||||
|
group: partial
|
||||||
separator:
|
separator:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -108,15 +108,14 @@ arguments:
|
|||||||
- string
|
- string
|
||||||
- template.HTML
|
- template.HTML
|
||||||
optional: true
|
optional: true
|
||||||
parent: cascade
|
|
||||||
comment: >-
|
comment: >-
|
||||||
Description of the card.
|
Description of the card.
|
||||||
group: partial
|
group: partial
|
||||||
loading:
|
loading:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: eager
|
|
||||||
parent: cascade
|
parent: cascade
|
||||||
|
default: eager
|
||||||
comment: >-
|
comment: >-
|
||||||
Loading behavior of the image. The loading of lazily loaded images is
|
Loading behavior of the image. The loading of lazily loaded images is
|
||||||
deferred until the image is within scrolling range of the viewport. This
|
deferred until the image is within scrolling range of the viewport. This
|
||||||
@@ -130,7 +129,6 @@ arguments:
|
|||||||
thumbnail:
|
thumbnail:
|
||||||
type: path
|
type: path
|
||||||
optional: true
|
optional: true
|
||||||
parent: cascade
|
|
||||||
comment: >-
|
comment: >-
|
||||||
Thumbnail image url, displayed on top or the left of the card.
|
Thumbnail image url, displayed on top or the left of the card.
|
||||||
ratio:
|
ratio:
|
||||||
@@ -157,7 +155,6 @@ arguments:
|
|||||||
icon:
|
icon:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
parent: cascade
|
|
||||||
comment: >-
|
comment: >-
|
||||||
Font Awesome icon, displayed on top or the left of the card.
|
Font Awesome icon, displayed on top or the left of the card.
|
||||||
orientation:
|
orientation:
|
||||||
|
@@ -24,6 +24,7 @@ arguments:
|
|||||||
- 4x3
|
- 4x3
|
||||||
- 16x9
|
- 16x9
|
||||||
- 21x9
|
- 21x9
|
||||||
|
group: partial
|
||||||
portrait:
|
portrait:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
@@ -32,6 +33,7 @@ arguments:
|
|||||||
Flag to adjust the ratio from landscape to portrait. The image itself
|
Flag to adjust the ratio from landscape to portrait. The image itself
|
||||||
is not rotated, only the crop area is adjusted. Not applicable to vector
|
is not rotated, only the crop area is adjusted. Not applicable to vector
|
||||||
graphics.
|
graphics.
|
||||||
|
group: partial
|
||||||
loading:
|
loading:
|
||||||
type: select
|
type: select
|
||||||
default: eager
|
default: eager
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
comment: >-
|
comment: >-
|
||||||
Displays a carousel of several responsive images (see the image shortcode for
|
Displays a carousel of several responsive images (see the image shortcode for
|
||||||
more details). Add inner <img> elements to define individual image slides.
|
more details). Add inner `img` elements to define individual image slides.
|
||||||
arguments:
|
arguments:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
ID of the carousel, defaults to `carousel-` with a sequential number.
|
ID of the carousel, defaults to `carousel-n` with a sequential number `n`.
|
||||||
ratio:
|
ratio:
|
||||||
type: string
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Ratio of the images. If set, the images are resized and cropped to match the
|
Ratio of the images. If set, the images are resized and cropped to match the
|
||||||
@@ -28,11 +28,12 @@ arguments:
|
|||||||
Flag to adjust the ratio from landscape to portrait. The images themselves
|
Flag to adjust the ratio from landscape to portrait. The images themselves
|
||||||
are not rotated, only the crop area is adjusted. Not applicable to vector
|
are not rotated, only the crop area is adjusted. Not applicable to vector
|
||||||
graphics.
|
graphics.
|
||||||
|
release: v0.18.3
|
||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the carousel element, e.g. “w-75”.
|
comment: Class attribute of the carousel element, e.g. `w-75`.
|
||||||
body:
|
body:
|
||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
comment: Inner <img> elements that define the individual image slides.
|
comment: Inner `img` elements that define the individual image slides.
|
@@ -18,7 +18,7 @@ arguments:
|
|||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: bash
|
default: bash
|
||||||
comment: Type of shell
|
comment: Type of shell.
|
||||||
options:
|
options:
|
||||||
values:
|
values:
|
||||||
- bash
|
- bash
|
||||||
|
@@ -30,11 +30,15 @@ arguments:
|
|||||||
optional: true
|
optional: true
|
||||||
default: true
|
default: true
|
||||||
comment: >-
|
comment: >-
|
||||||
If unset, shows the filename only. By default, the full relative path is
|
If unset, shows the filename only. By default, the entire path (relative
|
||||||
shown.
|
to the base path) is shown.
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
ID of the collapse panel holding the code snippet, defaults to
|
ID of the collapse panel holding the code snippet, defaults to
|
||||||
`docs-collapse-n` with a sequential number `n` starting at `1`.
|
`docs-collapse-n` with a sequential number `n` starting at `1`.
|
||||||
|
class:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Class attribute of the tab control that wraps the docs element.
|
||||||
|
@@ -2,11 +2,17 @@ comment: >-
|
|||||||
Display a code example and render a preview of the same input. The shortcode
|
Display a code example and render a preview of the same input. The shortcode
|
||||||
accepts the languages supported by Hugo's highlight function.
|
accepts the languages supported by Hugo's highlight function.
|
||||||
arguments:
|
arguments:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Identifier of the element’s container.
|
||||||
lang:
|
lang:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
default: markdown
|
default: markdown
|
||||||
comment: Language used to display the code.
|
comment: >-
|
||||||
|
Language used to display the code. Use `hugo` to process Hugo (escaped)
|
||||||
|
shortcodes.
|
||||||
show_markup:
|
show_markup:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -21,19 +21,20 @@ arguments:
|
|||||||
comment: >-
|
comment: >-
|
||||||
If unset, shows the panel with the code in collapsed state. By default,
|
If unset, shows the panel with the code in collapsed state. By default,
|
||||||
the panel is expanded.
|
the panel is expanded.
|
||||||
full:
|
full:
|
||||||
type: string
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
|
default: true
|
||||||
comment: >-
|
comment: >-
|
||||||
If unset, shows the filename only. By default, the full relative path is
|
If unset, shows the filename only. By default, the entire path (relative
|
||||||
shown.
|
to the base path) is shown.
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
ID of the collapse panel, defaults to `file-collapse-n` with a sequential
|
Identifier of the collapse panel, defaults to `file-collapse-n` with a
|
||||||
number `n` starting at 1.
|
sequential number `n` starting at 1.
|
||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class argument of the tab control.
|
comment: Class attribute of the tab control that wraps the file element.
|
||||||
|
@@ -21,7 +21,10 @@ arguments:
|
|||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Path or url of the image, e.g. `img/example.jpg`.
|
comment: >-
|
||||||
|
Path or url of the image, e.g. `img/example.jpg`. Images with multiple
|
||||||
|
color modes are expected to have a basename that ends with either `-dark`
|
||||||
|
or `-light`.
|
||||||
src:
|
src:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
@@ -39,9 +42,12 @@ arguments:
|
|||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
optional: true
|
optional: true
|
||||||
comment: Flag indicating if the image should support color modes.
|
comment: >-
|
||||||
|
Flag indicating if the image should support color modes. If set, the
|
||||||
|
shortcode searches for images that having a matching color-mode suffix
|
||||||
|
such as `-light` or `-dark`.
|
||||||
ratio:
|
ratio:
|
||||||
type: string
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Ratio of the image. If set, the image is resized and cropped to match the
|
Ratio of the image. If set, the image is resized and cropped to match the
|
||||||
@@ -62,6 +68,7 @@ arguments:
|
|||||||
Flag to adjust the ratio from landscape to portrait. The image itself is
|
Flag to adjust the ratio from landscape to portrait. The image itself is
|
||||||
not rotated, only the crop area is adjusted. Not applicable to vector
|
not rotated, only the crop area is adjusted. Not applicable to vector
|
||||||
graphics.
|
graphics.
|
||||||
|
release: v0.18.3
|
||||||
loading:
|
loading:
|
||||||
type: select
|
type: select
|
||||||
default: eager
|
default: eager
|
||||||
@@ -75,6 +82,7 @@ arguments:
|
|||||||
values:
|
values:
|
||||||
- eager
|
- eager
|
||||||
- lazy
|
- lazy
|
||||||
|
release: v0.21.0
|
||||||
priority:
|
priority:
|
||||||
type: select
|
type: select
|
||||||
default: auto
|
default: auto
|
||||||
@@ -102,6 +110,7 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attributes of the wrapper element, e.g. `mx-auto`.
|
comment: Class attributes of the wrapper element, e.g. `mx-auto`.
|
||||||
|
release: v0.18.3
|
||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -25,8 +25,8 @@ arguments:
|
|||||||
position: 0
|
position: 0
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Reference to either an external link (if it starts with http), a named
|
Reference to either an external link (if it starts with `http`), a named
|
||||||
link (if it can be found in params.links), or internal reference.
|
link (if it can be found in `params.links`), or internal reference.
|
||||||
Both external and internal references may include an anchor `#`.
|
Both external and internal references may include an anchor `#`.
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
55
data/structures/list.yml
Normal file
55
data/structures/list.yml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
comment: >-
|
||||||
|
Displays a list of items with a thumbnail alternating between left and right
|
||||||
|
alignment.
|
||||||
|
arguments:
|
||||||
|
page:
|
||||||
|
type:
|
||||||
|
- '*hugolib.pageState'
|
||||||
|
- '*hugolib.pageForShortcode'
|
||||||
|
optional: false
|
||||||
|
comment: Required context of the current page.
|
||||||
|
group: partial
|
||||||
|
list:
|
||||||
|
type:
|
||||||
|
- 'page.Pages'
|
||||||
|
- 'resource.Resources'
|
||||||
|
optional: false
|
||||||
|
comment: Required array of pages.
|
||||||
|
group: partial
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Optional title of the card group.
|
||||||
|
loading:
|
||||||
|
type: select
|
||||||
|
default: eager
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Loading behavior of the image. The loading of lazily loaded images is
|
||||||
|
deferred until the image is within scrolling range of the viewport. This
|
||||||
|
should reduce the initial loading time of the website. It is recommended
|
||||||
|
to lazily load only those images that are below the pagefold.
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- eager
|
||||||
|
- lazy
|
||||||
|
class:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Class attribute of the tab element, e.g. “w-50”.
|
||||||
|
color:
|
||||||
|
type: select
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Theme color of the element.
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- primary
|
||||||
|
- secondary
|
||||||
|
- success
|
||||||
|
- danger
|
||||||
|
- warning
|
||||||
|
- info
|
||||||
|
- light
|
||||||
|
- dark
|
||||||
|
- body
|
@@ -9,7 +9,7 @@ arguments:
|
|||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Theme color of the highlight. By default, the highlight uses the color of
|
Theme color of the highlight. By default, the highlight uses the color of
|
||||||
the HTML mark function.
|
the HTML mark function (usually yellow).
|
||||||
options:
|
options:
|
||||||
values:
|
values:
|
||||||
- primary
|
- primary
|
||||||
|
@@ -1,25 +1,25 @@
|
|||||||
comment: >-
|
comment: >-
|
||||||
Defines an individual nav item.
|
Defines an individual item.
|
||||||
arguments:
|
arguments:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: ID of the nav-item.
|
comment: Identification of the item.
|
||||||
parent: cascade
|
group: partial
|
||||||
parentID:
|
parentID:
|
||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
comment: ID of the parent (e.g. nav control).
|
comment: Identification of the parent (e.g. nav control).
|
||||||
group: partial
|
group: partial
|
||||||
header:
|
header:
|
||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
comment: Header of the nav item.
|
comment: Header of the item.
|
||||||
show:
|
show:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Flag to indicate the nav item should be shown. Only one can be shown at a
|
Flag to indicate if the item should be shown. Only one can be shown at a
|
||||||
time.
|
time.
|
||||||
disabled:
|
disabled:
|
||||||
type: bool
|
type: bool
|
||||||
@@ -33,13 +33,13 @@ arguments:
|
|||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the nav item.
|
comment: Class attribute of the item.
|
||||||
body:
|
body:
|
||||||
type:
|
type:
|
||||||
- string
|
- string
|
||||||
- template.HTML
|
- template.HTML
|
||||||
optional: true
|
optional: true
|
||||||
comment: The body content of the nav-item, supports Markdown and HTML (if enabled).
|
comment: The body content of the item, supports Markdown and HTML (if enabled).
|
||||||
group: partial
|
group: partial
|
||||||
item_type:
|
item_type:
|
||||||
type: select
|
type: select
|
||||||
@@ -50,7 +50,13 @@ arguments:
|
|||||||
- accordion
|
- accordion
|
||||||
- tab-pane
|
- tab-pane
|
||||||
group: partial
|
group: partial
|
||||||
|
illustration:
|
||||||
|
type:
|
||||||
|
- string
|
||||||
|
- template.HTML
|
||||||
|
optional: true
|
||||||
|
group: partial
|
||||||
body:
|
body:
|
||||||
optional: false
|
optional: false
|
||||||
comment: Content of the nav item.
|
comment: Content of the item.
|
||||||
group: shortcode
|
group: shortcode
|
||||||
|
@@ -44,7 +44,7 @@ arguments:
|
|||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the tab group, e.g. “nav-fill”.
|
comment: Class attribute of the tab group, e.g. `nav-fill`.
|
||||||
pane:
|
pane:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
|
34
data/structures/navbar-item.yml
Normal file
34
data/structures/navbar-item.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
comment: >-
|
||||||
|
Defines an individual item of the navigation bar.
|
||||||
|
arguments:
|
||||||
|
page:
|
||||||
|
type:
|
||||||
|
- '*hugolib.pageState'
|
||||||
|
- '*hugolib.pageForShortcode'
|
||||||
|
optional: false
|
||||||
|
comment: Context of the current page.
|
||||||
|
group: partial
|
||||||
|
menu:
|
||||||
|
type: '*navigation.MenuEntry'
|
||||||
|
optional: false
|
||||||
|
comment: Menu data to use for the navbar item.
|
||||||
|
parent:
|
||||||
|
type: '*navigation.MenuEntry'
|
||||||
|
optional: true
|
||||||
|
comment: Parent of the current navbar item.
|
||||||
|
class:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Class attribute of the item.
|
||||||
|
cue:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Flag to indicate if an external link should show a visual cue, defaults
|
||||||
|
to the setting `main.externalLinks.cue` in the site's parameters.
|
||||||
|
tab:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Flag to indicate if an external link should open in a new tab, defaults
|
||||||
|
to setting `main.externalLinks.tab` in the site's parameters.
|
@@ -28,7 +28,12 @@ arguments:
|
|||||||
color:
|
color:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
comment: Background theme color of the navbar.
|
comment: >-
|
||||||
|
Background theme color of the navbar. Set the color to `body` or
|
||||||
|
`body-tertiary` for the navbar to respond to color mode changes (e.g.
|
||||||
|
switching between dark and light). The navigation bar is transparent when
|
||||||
|
no color is set, but is set to the body color when scrolling to enhance
|
||||||
|
the contrast.
|
||||||
options:
|
options:
|
||||||
values:
|
values:
|
||||||
- primary
|
- primary
|
||||||
@@ -47,9 +52,9 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
ID of the navbar, defaults to `navbar-0`. The id is used by several child
|
Identification of the navbar, defaults to `navbar-0`. The id is used by
|
||||||
elements, including a color mode switcher, version switcher, and collapse
|
several child elements, including a color mode switcher, version switcher,
|
||||||
panel.
|
and collapse panel.
|
||||||
menus:
|
menus:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
@@ -76,6 +81,7 @@ arguments:
|
|||||||
values:
|
values:
|
||||||
- light
|
- light
|
||||||
- dark
|
- dark
|
||||||
|
group: partial
|
||||||
mode:
|
mode:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
|
14
data/structures/page-alert.yml
Normal file
14
data/structures/page-alert.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
comment: >-
|
||||||
|
Adds a dismissible alert message to the top of the page, above the main menu.
|
||||||
|
The alert uses the following scratch variables:
|
||||||
|
- pageAlertMsg
|
||||||
|
- pageAlertURL
|
||||||
|
- version
|
||||||
|
arguments:
|
||||||
|
page:
|
||||||
|
type:
|
||||||
|
- '*hugolib.pageState'
|
||||||
|
- '*hugolib.pageForShortcode'
|
||||||
|
optional: false
|
||||||
|
comment: Context of the current page.
|
||||||
|
group: partial
|
21
data/structures/pagination.yml
Normal file
21
data/structures/pagination.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
comment: >-
|
||||||
|
Adds a pagination element to a page. This allows to split long lists across
|
||||||
|
multiple pages to ease navigation. Set 'paginate' in the site configuration to
|
||||||
|
define the maximum amount of items to display on a list page.
|
||||||
|
arguments:
|
||||||
|
page:
|
||||||
|
type:
|
||||||
|
- '*hugolib.pageState'
|
||||||
|
- '*hugolib.pageForShortcode'
|
||||||
|
optional: false
|
||||||
|
comment: Context of the current page.
|
||||||
|
group: partial
|
||||||
|
format:
|
||||||
|
type: select
|
||||||
|
optional: true
|
||||||
|
default: default
|
||||||
|
comment:
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- default
|
||||||
|
- terse
|
@@ -16,7 +16,7 @@ arguments:
|
|||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the card element, e.g. “w-50”.
|
comment: Class attribute of the card element, e.g. `w-50`.
|
||||||
color:
|
color:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -23,7 +23,7 @@ arguments:
|
|||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: md
|
default: md
|
||||||
comment: Size of the button
|
comment: Size of the button.
|
||||||
options:
|
options:
|
||||||
values:
|
values:
|
||||||
- sm
|
- sm
|
||||||
@@ -36,4 +36,5 @@ arguments:
|
|||||||
inline:
|
inline:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
comment: Flag to render the release button inline (defaults to false).
|
default: false
|
||||||
|
comment: Flag to render the release button inline.
|
||||||
|
16
data/structures/section-header.yml
Normal file
16
data/structures/section-header.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
comment: Renders the header of a page section.
|
||||||
|
arguments:
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Title of the section.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Section description.
|
||||||
|
content:
|
||||||
|
type:
|
||||||
|
- string
|
||||||
|
- template.HTML
|
||||||
|
optional: true
|
||||||
|
comment: Section content.
|
9
data/structures/section-menu.yml
Normal file
9
data/structures/section-menu.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
comment: Renders the section menu of a single page.
|
||||||
|
arguments:
|
||||||
|
page:
|
||||||
|
type:
|
||||||
|
- '*hugolib.pageState'
|
||||||
|
- '*hugolib.pageForShortcode'
|
||||||
|
optional: false
|
||||||
|
comment: Context of the current page.
|
||||||
|
group: partial
|
9
data/structures/sharing.yml
Normal file
9
data/structures/sharing.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
comment: Renders the social sharing buttons for a single page.
|
||||||
|
arguments:
|
||||||
|
page:
|
||||||
|
type:
|
||||||
|
- '*hugolib.pageState'
|
||||||
|
- '*hugolib.pageForShortcode'
|
||||||
|
optional: false
|
||||||
|
comment: Context of the current page.
|
||||||
|
group: partial
|
24
data/structures/sidebar.yml
Normal file
24
data/structures/sidebar.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
comment: >-
|
||||||
|
Renders the sidebar navigation of a single page. It is intended to be used as
|
||||||
|
companion to the main navigation and is typically used in content-heavy
|
||||||
|
sections, such as documentation pages. On smaller screens, the sidebar is
|
||||||
|
replaced with an offcanvas element. In this case, the main navigation receives
|
||||||
|
an additional toggler on the left of the screen.
|
||||||
|
arguments:
|
||||||
|
page:
|
||||||
|
type:
|
||||||
|
- '*hugolib.pageState'
|
||||||
|
- '*hugolib.pageForShortcode'
|
||||||
|
optional: false
|
||||||
|
comment: Context of the current page.
|
||||||
|
group: partial
|
||||||
|
menu:
|
||||||
|
type: '[]interface {}'
|
||||||
|
optional: true
|
||||||
|
comment: Path of the sidebar navigation menu.
|
||||||
|
version:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Version of the sidebar navigation, used to define the base URL of
|
||||||
|
generated links, together with the page's section.
|
@@ -6,7 +6,7 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Class attribute of the wrapping element, e.g. “text-center”.
|
Class attribute of the wrapping element, e.g. `text-center`.
|
||||||
color:
|
color:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -5,4 +5,4 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
position: 0
|
position: 0
|
||||||
comment: Text to display in subscript.
|
comment: Text to display in subscript. You can omit the argument name.
|
||||||
|
@@ -5,4 +5,4 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
position: 0
|
position: 0
|
||||||
comment: Text to display in superscript.
|
comment: Text to display in superscript. You can omit the argument name.
|
||||||
|
@@ -23,7 +23,7 @@ arguments:
|
|||||||
class:
|
class:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the table element, e.g. “table-striped-columns w-auto”.
|
comment: Class attribute of the table element, e.g. `table-striped-columns w-auto`.
|
||||||
body:
|
body:
|
||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
|
@@ -5,7 +5,8 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
ID of the toast message, defaults to `toast-message-n` with sequence n.
|
Unique identifier of the toast message, defaults to `toast-message-n`
|
||||||
|
with sequence n.
|
||||||
header:
|
header:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
|
9
data/structures/toc.yml
Normal file
9
data/structures/toc.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
comment: Renders the table of contents of a single page.
|
||||||
|
arguments:
|
||||||
|
page:
|
||||||
|
type:
|
||||||
|
- '*hugolib.pageState'
|
||||||
|
- '*hugolib.pageForShortcode'
|
||||||
|
optional: false
|
||||||
|
comment: Context of the current page.
|
||||||
|
group: partial
|
@@ -18,7 +18,7 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
position: 0
|
position: 0
|
||||||
comment: ID of the video to be embedded.
|
comment: Identifier of the video to be embedded.
|
||||||
autoplay:
|
autoplay:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
resourcedir = '../resources/'
|
resourcedir = '../resources/'
|
||||||
title = "Hinode"
|
title = "Hinode"
|
||||||
copyright = "Copyright © 2023 Mark Dumay."
|
copyright = "Copyright © 2024 Mark Dumay."
|
||||||
paginate = 9
|
paginate = 9
|
||||||
enableGitInfo = true
|
enableGitInfo = true
|
||||||
|
|
||||||
@@ -79,6 +79,8 @@ home = ["HTML", "RSS", "REDIR"]
|
|||||||
keepVarNames = true
|
keepVarNames = true
|
||||||
precision = 0
|
precision = 0
|
||||||
version = 2022
|
version = 2022
|
||||||
|
[minify.tdewolff.html]
|
||||||
|
keepWhitespace = true
|
||||||
|
|
||||||
[module]
|
[module]
|
||||||
replacements = 'github.com/gethinode/hinode -> ../..'
|
replacements = 'github.com/gethinode/hinode -> ../..'
|
||||||
|
@@ -181,15 +181,6 @@
|
|||||||
images = ["logo.png"]
|
images = ["logo.png"]
|
||||||
locale = "en_US"
|
locale = "en_US"
|
||||||
|
|
||||||
[comments]
|
|
||||||
enabled = false
|
|
||||||
repo = "" # Replace with your repository.
|
|
||||||
#issueTerm = "pathname" # pathname, url, title, og:title
|
|
||||||
#label = "comment"
|
|
||||||
# By default, light and dark mode correspond to github-light and github-dark, respectively.
|
|
||||||
# Optional values: github-light, github-dark, preferred-color-scheme, github-dark-orange, icy-dark, dark-blue, photon-dark.
|
|
||||||
#theme = ""
|
|
||||||
|
|
||||||
[links]
|
[links]
|
||||||
bs_badge_heading = "https://getbootstrap.com/docs/5.3/components/badge/#headings"
|
bs_badge_heading = "https://getbootstrap.com/docs/5.3/components/badge/#headings"
|
||||||
hinode_docs = "https://gethinode.com"
|
hinode_docs = "https://gethinode.com"
|
||||||
@@ -197,5 +188,4 @@
|
|||||||
mozilla_image = "https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images"
|
mozilla_image = "https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images"
|
||||||
observatory = "https://observatory.mozilla.org/analyze/demo.gethinode.com"
|
observatory = "https://observatory.mozilla.org/analyze/demo.gethinode.com"
|
||||||
pagespeed = "https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F"
|
pagespeed = "https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F"
|
||||||
utterances = "https://utteranc.es"
|
|
||||||
hinode = "https://gethinode.com"
|
hinode = "https://gethinode.com"
|
||||||
|
@@ -7,15 +7,14 @@ for = '/**'
|
|||||||
X-XSS-Protection = "1; mode=block"
|
X-XSS-Protection = "1; mode=block"
|
||||||
Content-Security-Policy = """\
|
Content-Security-Policy = """\
|
||||||
default-src 'self'; \
|
default-src 'self'; \
|
||||||
script-src 'self' \
|
script-src 'self' https://*.google-analytics.com https://*.googletagmanager.com; \
|
||||||
https://utteranc.es/client.js https://*.google-analytics.com https://*.googletagmanager.com; \
|
style-src 'self' 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; \
|
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://www.youtube-nocookie.com https://www.youtube.com; \
|
||||||
img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
|
||||||
manifest-src 'self'; \
|
manifest-src 'self'; \
|
||||||
media-src 'self' \
|
media-src 'self' \
|
||||||
|
@@ -26,7 +26,6 @@ Additional features include:
|
|||||||
* Support for multiple languages
|
* Support for multiple languages
|
||||||
* Reusable Bootstrap components through configurable shortcodes and partials
|
* Reusable Bootstrap components through configurable shortcodes and partials
|
||||||
* Versioned documentation, including sidebar navigation and version switcher
|
* Versioned documentation, including sidebar navigation and version switcher
|
||||||
* Embedded comments through light-weight integration with GitHub via [utteranc.es]({{< param "links.utterances" >}})
|
|
||||||
* Reponsive image handling for multiple screen sizes and resolutions
|
* Reponsive image handling for multiple screen sizes and resolutions
|
||||||
* Optimized search results, scoring 100 points for SEO on [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
* Optimized search results, scoring 100 points for SEO on [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
||||||
* Secure by default, scoring A+ on [Mozilla Observatory test]({{< param "links.observatory" >}})
|
* Secure by default, scoring A+ on [Mozilla Observatory test]({{< param "links.observatory" >}})
|
||||||
|
@@ -404,6 +404,22 @@ As an example, the following shortcode displays superscript text.
|
|||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Table
|
||||||
|
|
||||||
|
As an example, the following shortcode displays a responsive table.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="markdown" >}}
|
||||||
|
{{</* table */>}}
|
||||||
|
| # | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading |
|
||||||
|
|----|---------|---------|---------|---------|---------|---------|---------|---------|---------|
|
||||||
|
| 1. | cell | cel | cel | cel | cel | cel | cel | cel | cel |
|
||||||
|
| 2. | cell | cel | cel | cel | cel | cel | cel | cel | cel |
|
||||||
|
| 3. | cell | cel | cel | cel | cel | cel | cel | cel | cel |
|
||||||
|
{{</* /table */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
## Timeline
|
## Timeline
|
||||||
|
|
||||||
As an example, the following shortcode displays a timeline with the file `data/timeline.en.yml` as data.
|
As an example, the following shortcode displays a timeline with the file `data/timeline.en.yml` as data.
|
||||||
|
@@ -27,7 +27,6 @@ Les fonctionnalités supplémentaires incluent:
|
|||||||
- Prise en charge de plusieurs langues
|
- Prise en charge de plusieurs langues
|
||||||
- Composants bootstrap réutilisables à travers des codes et partiels configurables
|
- Composants bootstrap réutilisables à travers des codes et partiels configurables
|
||||||
- Documentation versionnée, incluant une navigation latérale et un sélecteur de version.
|
- Documentation versionnée, incluant une navigation latérale et un sélecteur de version.
|
||||||
- Commentaires intégrés via une intégration légère avec GitHub via [utteranc.es]({{< param "links.utterances" >}})
|
|
||||||
- Gestion d'images adaptatives pour plusieurs tailles d'écran et résolutions.
|
- Gestion d'images adaptatives pour plusieurs tailles d'écran et résolutions.
|
||||||
- Résultats de recherche optimisés, obtenant un score de 100 points pour le référencement (SEO) sur [PageSpeed Insights]({{< param "links.pagespeed" >}}).
|
- Résultats de recherche optimisés, obtenant un score de 100 points pour le référencement (SEO) sur [PageSpeed Insights]({{< param "links.pagespeed" >}}).
|
||||||
- Sécurisé par défaut, obtenant un score A+ au test [Mozilla Observatory]({{< param "links.observatory" >}})
|
- Sécurisé par défaut, obtenant un score A+ au test [Mozilla Observatory]({{< param "links.observatory" >}})
|
||||||
|
@@ -28,7 +28,6 @@ Overige functies:
|
|||||||
* Ondersteuning voor meerdere talen
|
* Ondersteuning voor meerdere talen
|
||||||
* Herbruikbare Bootstrap componenten via shortcodes en partials
|
* Herbruikbare Bootstrap componenten via shortcodes en partials
|
||||||
* Versiebeheer van documentatiepagina's, inclusief secundaire navigatie en selectie van versies
|
* Versiebeheer van documentatiepagina's, inclusief secundaire navigatie en selectie van versies
|
||||||
* Integreren van commentaar via [utteranc.es]({{< param "links.utterances" >}})
|
|
||||||
* Optimalisering van foto's voor meerdere schermafmetingen en resoluties
|
* Optimalisering van foto's voor meerdere schermafmetingen en resoluties
|
||||||
* Optimale zoekresultaten, met 100 punten voor SEO volgens [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
* Optimale zoekresultaten, met 100 punten voor SEO volgens [PageSpeed Insights]({{< param "links.pagespeed" >}})
|
||||||
* Veilige communicatie, met een score van A+ volgens [Mozilla Observatory]({{< param "links.observatory" >}})
|
* Veilige communicatie, met een score van A+ volgens [Mozilla Observatory]({{< param "links.observatory" >}})
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
"hr",
|
"hr",
|
||||||
"html",
|
"html",
|
||||||
"i",
|
"i",
|
||||||
"iframe",
|
|
||||||
"img",
|
"img",
|
||||||
"input",
|
"input",
|
||||||
"li",
|
"li",
|
||||||
@@ -40,8 +39,14 @@
|
|||||||
"sub",
|
"sub",
|
||||||
"sup",
|
"sup",
|
||||||
"svg",
|
"svg",
|
||||||
|
"table",
|
||||||
|
"tbody",
|
||||||
|
"td",
|
||||||
|
"th",
|
||||||
|
"thead",
|
||||||
"time",
|
"time",
|
||||||
"title",
|
"title",
|
||||||
|
"tr",
|
||||||
"ul",
|
"ul",
|
||||||
"use"
|
"use"
|
||||||
],
|
],
|
||||||
@@ -374,6 +379,8 @@
|
|||||||
"syntax-highlight",
|
"syntax-highlight",
|
||||||
"tab-content",
|
"tab-content",
|
||||||
"tab-pane",
|
"tab-pane",
|
||||||
|
"table",
|
||||||
|
"table-responsive",
|
||||||
"tag-link",
|
"tag-link",
|
||||||
"text-bg-body",
|
"text-bg-body",
|
||||||
"text-bg-body-tertiary",
|
"text-bg-body-tertiary",
|
||||||
@@ -433,8 +440,7 @@
|
|||||||
"visually-hidden",
|
"visually-hidden",
|
||||||
"vr",
|
"vr",
|
||||||
"w-100",
|
"w-100",
|
||||||
"w-50",
|
"w-50"
|
||||||
"youtube-embedded"
|
|
||||||
],
|
],
|
||||||
"ids": [
|
"ids": [
|
||||||
"-theme",
|
"-theme",
|
||||||
@@ -520,6 +526,7 @@
|
|||||||
"spinner",
|
"spinner",
|
||||||
"sub",
|
"sub",
|
||||||
"sup",
|
"sup",
|
||||||
|
"table",
|
||||||
"timeline",
|
"timeline",
|
||||||
"toast",
|
"toast",
|
||||||
"toast-container",
|
"toast-container",
|
||||||
|
9
go.mod
9
go.mod
@@ -5,11 +5,12 @@ go 1.19
|
|||||||
require (
|
require (
|
||||||
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
|
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
|
||||||
github.com/gethinode/mod-bootstrap v1.2.2 // indirect
|
github.com/gethinode/mod-bootstrap v1.2.2 // indirect
|
||||||
github.com/gethinode/mod-flexsearch v1.7.1 // indirect
|
github.com/gethinode/mod-flexsearch v1.8.0 // indirect
|
||||||
github.com/gethinode/mod-fontawesome v1.7.3 // indirect
|
github.com/gethinode/mod-fontawesome v1.8.0 // indirect
|
||||||
github.com/gethinode/mod-katex v1.0.5 // indirect
|
github.com/gethinode/mod-katex v1.0.5 // indirect
|
||||||
github.com/gethinode/mod-leaflet v0.3.5 // indirect
|
github.com/gethinode/mod-leaflet v0.4.0 // indirect
|
||||||
github.com/gethinode/mod-lottie v1.3.0 // indirect
|
github.com/gethinode/mod-lottie v1.4.0 // indirect
|
||||||
|
github.com/gethinode/mod-utils v1.0.0 // indirect
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 // indirect
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 // indirect
|
||||||
github.com/twbs/bootstrap v5.3.2+incompatible // indirect
|
github.com/twbs/bootstrap v5.3.2+incompatible // indirect
|
||||||
)
|
)
|
||||||
|
10
go.sum
10
go.sum
@@ -40,6 +40,8 @@ github.com/gethinode/mod-flexsearch v1.7.0 h1:VFTf6iUyT9b47jTDAxh8nVHU1eUBrdxlyk
|
|||||||
github.com/gethinode/mod-flexsearch v1.7.0/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
|
github.com/gethinode/mod-flexsearch v1.7.0/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
|
||||||
github.com/gethinode/mod-flexsearch v1.7.1 h1:f4rjKkhleDVzqwUmwP1xZdhjru5VQ9g0MRDz0G6oLyY=
|
github.com/gethinode/mod-flexsearch v1.7.1 h1:f4rjKkhleDVzqwUmwP1xZdhjru5VQ9g0MRDz0G6oLyY=
|
||||||
github.com/gethinode/mod-flexsearch v1.7.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
|
github.com/gethinode/mod-flexsearch v1.7.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
|
||||||
|
github.com/gethinode/mod-flexsearch v1.8.0 h1:rKu9ackmbGAD/CRJYUDUhy/3nDCEj0IgYDiL1bkwzDc=
|
||||||
|
github.com/gethinode/mod-flexsearch v1.8.0/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
|
||||||
github.com/gethinode/mod-fontawesome v1.0.2 h1:ZSK6D20/w4y5GnfYfTBB58uHD0ChIfkpKfRGwioS9rg=
|
github.com/gethinode/mod-fontawesome v1.0.2 h1:ZSK6D20/w4y5GnfYfTBB58uHD0ChIfkpKfRGwioS9rg=
|
||||||
github.com/gethinode/mod-fontawesome v1.0.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
github.com/gethinode/mod-fontawesome v1.0.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
||||||
github.com/gethinode/mod-fontawesome v1.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=
|
github.com/gethinode/mod-fontawesome v1.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=
|
||||||
@@ -72,6 +74,8 @@ github.com/gethinode/mod-fontawesome v1.6.1 h1:iqOgDGdw7Bs4hnzjF/8JsUn10omyKQZTg
|
|||||||
github.com/gethinode/mod-fontawesome v1.6.1/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
github.com/gethinode/mod-fontawesome v1.6.1/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
||||||
github.com/gethinode/mod-fontawesome v1.7.3 h1:YzRCYSasVRIcImVmTJYjqNJ+KmyNWfm/bMgtM0slvzs=
|
github.com/gethinode/mod-fontawesome v1.7.3 h1:YzRCYSasVRIcImVmTJYjqNJ+KmyNWfm/bMgtM0slvzs=
|
||||||
github.com/gethinode/mod-fontawesome v1.7.3/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
github.com/gethinode/mod-fontawesome v1.7.3/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
|
||||||
|
github.com/gethinode/mod-fontawesome v1.8.0 h1:YEuCmvCdzcemF1eFK35Wnp1asKKO3/xbxGArnjq6PRY=
|
||||||
|
github.com/gethinode/mod-fontawesome v1.8.0/go.mod h1:uvuC2YL8mdXNp6NRzFOu4TWsHvtY9AZ8YxJkF23/M/8=
|
||||||
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
|
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
|
||||||
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
|
||||||
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
|
||||||
@@ -94,6 +98,8 @@ github.com/gethinode/mod-leaflet v0.3.4 h1:oY+YQ0JiJuhFQNrk9XgFdg0NMsTUQPXNfnILp
|
|||||||
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=
|
||||||
github.com/gethinode/mod-leaflet v0.3.5/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
|
github.com/gethinode/mod-leaflet v0.3.5/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
|
||||||
|
github.com/gethinode/mod-leaflet v0.4.0 h1:Xc6c1UTf4m1saQLFfFWT5sEpwj25xVGuS8csGC82UUI=
|
||||||
|
github.com/gethinode/mod-leaflet v0.4.0/go.mod h1:yr+bUKAstifdB16mbYh69OayAmgPOlNUubAmVn5eL2M=
|
||||||
github.com/gethinode/mod-lottie v1.0.0 h1:1CUZMcgN5FAyjjyuP3qkaOQ6M5sv6HUAbosW4sIT5VE=
|
github.com/gethinode/mod-lottie v1.0.0 h1:1CUZMcgN5FAyjjyuP3qkaOQ6M5sv6HUAbosW4sIT5VE=
|
||||||
github.com/gethinode/mod-lottie v1.0.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
|
github.com/gethinode/mod-lottie v1.0.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
|
||||||
github.com/gethinode/mod-lottie v1.0.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
|
github.com/gethinode/mod-lottie v1.0.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
|
||||||
@@ -106,6 +112,10 @@ github.com/gethinode/mod-lottie v1.2.0 h1:9S0Y4PlEO66dIvFxayatmDEf8WWxqbLNLi4z56
|
|||||||
github.com/gethinode/mod-lottie v1.2.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
|
github.com/gethinode/mod-lottie v1.2.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
|
||||||
github.com/gethinode/mod-lottie v1.3.0 h1:vQ8CXkjdp2IeFskTzu+ZnKOEio8GtN08urVK+oCH81E=
|
github.com/gethinode/mod-lottie v1.3.0 h1:vQ8CXkjdp2IeFskTzu+ZnKOEio8GtN08urVK+oCH81E=
|
||||||
github.com/gethinode/mod-lottie v1.3.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
|
github.com/gethinode/mod-lottie v1.3.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
|
||||||
|
github.com/gethinode/mod-lottie v1.4.0 h1:0Ls1Q/8p0gQpuX9+dtfNGKcjBNeymjE7gERdnN3lCCE=
|
||||||
|
github.com/gethinode/mod-lottie v1.4.0/go.mod h1:57eu6glS5oxkew2dB1P2zsbhw444aRX0XfuyDe7k/dk=
|
||||||
|
github.com/gethinode/mod-utils v1.0.0 h1:cqHm2xS5uDiJzRm1KfHaNbq6uMVDKLhQa8/BuTZ1nhY=
|
||||||
|
github.com/gethinode/mod-utils v1.0.0/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
||||||
github.com/twbs/bootstrap v5.3.2+incompatible h1:tuiO5acc6xnZUR77Sbi5aKWXxjYxbmsSbJwYrhAKoQQ=
|
github.com/twbs/bootstrap v5.3.2+incompatible h1:tuiO5acc6xnZUR77Sbi5aKWXxjYxbmsSbJwYrhAKoQQ=
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{{ define "main"}}
|
{{ define "main" }}
|
||||||
<div class="d-flex flex-fill">
|
<div class="d-flex flex-fill">
|
||||||
<div class="container-xxl my-auto">
|
<div class="container-xxl my-auto">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
{{ with .Title }}<p id="{{ anchorize . }}" class="display-4 mt-5{{ if and $.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}
|
{{ with .Title }}<p id="{{ anchorize . }}" class="display-4 mt-5{{ if and $.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if (.Params.menu) }}
|
{{ if (.Params.menu) }}
|
||||||
{{- partial "assets/section-menu.html" . -}}
|
{{- partial "assets/section-menu.html" (dict "page" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $loading := "" -}}
|
{{- $loading := "" -}}
|
||||||
{{- if or (eq $layout "featured") .IsHome -}}
|
{{- if or (eq $layout "featured") .IsHome -}}
|
||||||
|
@@ -5,15 +5,11 @@
|
|||||||
{{ .Render "single/header" }}
|
{{ .Render "single/header" }}
|
||||||
|
|
||||||
{{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}}
|
{{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}}
|
||||||
<div class="d-{{ $breakpoint.current }}-none pb-5">{{ partial "assets/toc-dropdown.html" . }}</div>
|
<div class="d-{{ $breakpoint.current }}-none pb-5">{{ partial "assets/toc-dropdown.html" (dict "page" .) }}</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ .Render "single/body" }}
|
{{ .Render "single/body" }}
|
||||||
|
|
||||||
{{ .Render "single/footer" }}
|
{{ .Render "single/footer" }}
|
||||||
{{- if and .Site.Params.comments.enabled .Params.showComments | default true -}}
|
|
||||||
<hr>
|
|
||||||
{{ partial "assets/comments.html" . }}
|
|
||||||
{{ end -}}
|
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ define "main" -}}
|
{{ define "main" -}}
|
||||||
|
@@ -48,5 +48,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partial "assets/sharing.html" . }}
|
{{ partial "assets/sharing.html" (dict "page" .) }}
|
||||||
<p class="lead mb-5 mt-3">{{ .Description }}</p>
|
<p class="lead mb-5 mt-3">{{ .Description }}</p>
|
||||||
|
@@ -37,6 +37,6 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if $toc }}
|
{{ if $toc }}
|
||||||
{{ partial "assets/toc.html" (dict "page" . "download" $download) }}
|
{{ partial "assets/toc.html" (dict "page" .) }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
|
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
|
||||||
{{ partial "assets/sharing.html" . }}
|
{{ partial "assets/sharing.html" (dict "page" .) }}
|
||||||
<p class="lead mb-5">{{ .Description }}</p>
|
<p class="lead mb-5">{{ .Description }}</p>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
|
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
|
||||||
{{ partial "assets/sharing.html" . }}
|
{{ partial "assets/sharing.html" (dict "page" .) }}
|
||||||
<p class="lead mb-5">{{ .Description }}</p>
|
<p class="lead mb-5">{{ .Description }}</p>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
@@ -84,12 +84,12 @@
|
|||||||
{{- $params := (dict
|
{{- $params := (dict
|
||||||
"class" (printf "h-100 %s" $class)
|
"class" (printf "h-100 %s" $class)
|
||||||
"color" $color
|
"color" $color
|
||||||
"padding" $padding
|
|
||||||
"header" $header
|
|
||||||
"footer" $footer
|
"footer" $footer
|
||||||
"orientation" $orientation
|
"header" $header
|
||||||
"ratio" $ratio
|
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
|
"orientation" $orientation
|
||||||
|
"padding" $padding
|
||||||
|
"ratio" $ratio
|
||||||
) -}}
|
) -}}
|
||||||
{{- $params = merge $params $element }}
|
{{- $params = merge $params $element }}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
{{- $params := .Site.Params.comments -}}
|
|
||||||
{{- with $params -}}
|
|
||||||
<h2>{{ T "comments" }}</h2>
|
|
||||||
<script src="https://utteranc.es/client.js"
|
|
||||||
repo="{{ $params.repo }}"
|
|
||||||
issue-term="{{ default "pathname" $params.issueTerm }}"
|
|
||||||
label="{{ default "comment" $params.label }}"
|
|
||||||
theme="{{ default "github-light" $params.theme }}"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
async>
|
|
||||||
</script>
|
|
||||||
{{- end -}}
|
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,17 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Displays a list items with a thumbnail alternating between left and right alignment. The partial supports the
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
following arguments:
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
"page" Required context of the current page.
|
Visit gethinode.com/license for more details.
|
||||||
"list" Required array of pages.
|
|
||||||
"title" Optional title of the card group.
|
|
||||||
"type" Optional type of the tab group, either "tabs", "pills", or "underline".
|
|
||||||
"vertical" Optional flag to show vertical tabs instead of horizontal tabs (default).
|
|
||||||
"class": Optional class attribute of the tab group, e.g. “nav-fill”.
|
|
||||||
|
|
||||||
In addition, the following arguments are passed to the individual tabs.
|
|
||||||
"class" Optional class attribute of the tab element, e.g. “w-50”.
|
|
||||||
"color": Optional theme color of the tab, either "primary", "secondary", "success", "danger",
|
|
||||||
"warning", "info", "light", "dark", or "body". By default, no color is specified.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Inline partial to render the list item's content -->
|
<!-- Inline partial to render the list item's content -->
|
||||||
@@ -33,67 +23,63 @@
|
|||||||
{{- partial "assets/image.html" (dict "url" $thumbnail "title" $title "wrapper" $style "mode" $mode "loading" $loading) -}}
|
{{- partial "assets/image.html" (dict "url" $thumbnail "title" $title "wrapper" $style "mode" $mode "loading" $loading) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "list" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/list.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- if ne (printf "%T" $page) "*hugolib.pageState" -}}
|
{{- $list := .list -}}
|
||||||
{{- errorf "partial [assets/list.html] - Invalid value for param 'page'" -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $supportedTypes := slice "page.Pages" "resource.Resources" -}}
|
|
||||||
{{ $list := .list }}
|
|
||||||
{{- if not (in $supportedTypes (printf "%T" $list)) -}}
|
|
||||||
{{- errorf "partial [assets/list.html] - Invalid value for param 'list'" -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $title := .title -}}
|
{{- $title := .title -}}
|
||||||
{{- $class := .class -}}
|
{{- $class := .class -}}
|
||||||
{{- $color := .color -}}
|
{{- $color := .color -}}
|
||||||
|
{{- $loading := .loading -}}
|
||||||
|
|
||||||
{{ $vertical := false }}
|
{{ $vertical := false }}
|
||||||
{{ $type := "pills" }}
|
{{ $type := "pills" }}
|
||||||
|
|
||||||
{{- $loading := .loading -}}
|
<!-- Main code -->
|
||||||
{{- $validSettings := slice "lazy" "eager" -}}
|
{{ if not $error }}
|
||||||
{{- if $loading -}}
|
<div class="d-none d-md-block p-0">
|
||||||
{{ if not (in $validSettings $loading) -}}
|
{{- range $index, $item := $list -}}
|
||||||
{{- errorf "partial [assets/list.html] - Invalid value for param 'loading': %s" $loading -}}
|
{{- $odd := eq (mod $index 2) 1 -}}
|
||||||
{{ end -}}
|
{{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
|
||||||
{{- end -}}
|
<div class="container ratio-section d-flex flex-column">
|
||||||
|
<div class="row pt-5 pb-5 align-items-center flex-fill row-cols-2">
|
||||||
<div class="d-none d-md-block p-0">
|
<div class="col-6{{ if $odd }} order-last{{ end }}">
|
||||||
{{- range $index, $item := $list -}}
|
{{- $style := "reveal fade-bottom" -}}
|
||||||
{{- $odd := eq (mod $index 2) 1 -}}
|
{{ if $item.Params.tilted }}
|
||||||
{{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
|
{{- $style = "reveal fade-bottom-n5 rotate-n5 ps-3" -}}
|
||||||
<div class="container ratio-section d-flex flex-column">
|
{{- if $odd }}{{ $style = "reveal fade-bottom-5 rotate-5 pe-3" }}{{ end }}
|
||||||
<div class="row pt-5 pb-5 align-items-center flex-fill row-cols-2">
|
{{ end }}
|
||||||
<div class="col-6{{ if $odd }} order-last{{ end }}">
|
{{ partial "partials/list-img.html" (dict "thumbnail" $thumbnail "title" $item.Title "style" $style "mode" $item.Params.colormode "loading" $loading) }}
|
||||||
{{- $style := "reveal fade-bottom" -}}
|
</div>
|
||||||
{{ if $item.Params.tilted }}
|
<div class="col-6{{ if $odd }} order-first{{ end }} psw-lg-5 p-5">
|
||||||
{{- $style = "reveal fade-bottom-n5 rotate-n5 ps-3" -}}
|
{{ partial "partials/list-content.html" (dict "title" $item.Title "content" (or $item.Description $item.Content)) }}
|
||||||
{{- if $odd }}{{ $style = "reveal fade-bottom-5 rotate-5 pe-3" }}{{ end }}
|
</div>
|
||||||
{{ end }}
|
|
||||||
{{ partial "partials/list-img.html" (dict "thumbnail" $thumbnail "title" $item.Title "style" $style "mode" $item.Params.colormode "loading" $loading) }}
|
|
||||||
</div>
|
|
||||||
<div class="col-6{{ if $odd }} order-first{{ end }} psw-lg-5 p-5">
|
|
||||||
{{ partial "partials/list-content.html" (dict "title" $item.Title "content" (or $item.Description $item.Content)) }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{ end -}}
|
||||||
{{ end -}}
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-md-none">
|
<div class="d-md-none">
|
||||||
{{- range $index, $item := $list -}}
|
{{- range $index, $item := $list -}}
|
||||||
{{- $odd := eq (mod $index 2) 1 -}}
|
{{- $odd := eq (mod $index 2) 1 -}}
|
||||||
{{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
|
{{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
|
||||||
<div class="container d-flex flex-column">
|
<div class="container d-flex flex-column">
|
||||||
<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" $thumbnail "title" $item.Title "mode" $item.Params.colormode "loading" $loading) }}
|
{{ partial "partials/list-img.html" (dict "thumbnail" $thumbnail "title" $item.Title "mode" $item.Params.colormode "loading" $loading) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 p-3">
|
<div class="col-12 p-3">
|
||||||
{{ partial "partials/list-content.html" (dict "title" $item.Title "content" (partial "utilities/GetDescription.html" $item)) }}
|
{{ partial "partials/list-content.html" (dict "title" $item.Title "content" (partial "utilities/GetDescription.html" $item)) }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{ end -}}
|
||||||
{{ end -}}
|
</div>
|
||||||
</div>
|
{{ end }}
|
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,22 +1,37 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "navbar-item" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/navbar-item.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{- $page := .page -}}
|
||||||
{{- $menu := .menu -}}
|
{{- $menu := .menu -}}
|
||||||
{{- $parent := .parent -}}
|
{{- $parent := .parent -}}
|
||||||
{{- $page := .page -}}
|
|
||||||
{{- $class := .class -}}
|
{{- $class := .class -}}
|
||||||
{{- $anchorClass := "" -}}
|
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||||
|
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||||
|
|
||||||
{{- $menuURL := (or $menu.PageRef $menu.URL) | relLangURL -}}
|
{{- $menuURL := (or $menu.PageRef $menu.URL) | relLangURL -}}
|
||||||
{{- $pageURL := $page.RelPermalink | relLangURL -}}
|
{{- $pageURL := $page.RelPermalink | relLangURL -}}
|
||||||
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
|
||||||
{{- $isAlias := $menu.Params.alias -}}
|
{{- $isAlias := $menu.Params.alias -}}
|
||||||
{{- $isIcon := $menu.Params.icon -}}
|
{{- $isIcon := $menu.Params.icon -}}
|
||||||
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
|
||||||
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
|
||||||
|
|
||||||
{{- $url := urls.Parse $menuURL -}}
|
{{- $url := urls.Parse $menuURL -}}
|
||||||
{{- $baseURL := urls.Parse $.Site.Params.Baseurl -}}
|
{{- $baseURL := urls.Parse $.Site.Params.Baseurl -}}
|
||||||
{{- $isExternal := ne $url.Host $baseURL.Host -}}
|
{{- $isExternal := ne $url.Host $baseURL.Host -}}
|
||||||
{{- $externalHref := "" }}
|
{{- $externalHref := "" }}
|
||||||
{{- $suffix := "" }}
|
{{- $suffix := "" }}
|
||||||
|
{{- $anchorClass := "" -}}
|
||||||
|
|
||||||
{{- if $isExternal }}
|
{{- if $isExternal }}
|
||||||
{{- if $tab -}}
|
{{- if $tab -}}
|
||||||
@@ -48,18 +63,22 @@
|
|||||||
{{- with $childNav }}{{ $params = printf "%s&child=%s" $params . }}{{ end -}}
|
{{- with $childNav }}{{ $params = printf "%s&child=%s" $params . }}{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{. }}{{ end }}"
|
<!-- Main code -->
|
||||||
{{ if $isIcon }}aria-label="{{ $menu.Name }}"{{ end }}
|
{{ if not $error }}
|
||||||
data-nav="main" data-nav-main="{{ $mainNav }}"{{ with $childNav }} data-nav-child="{{ . }}"{{ end }}
|
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{. }}{{ end }}"
|
||||||
href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }} {{ $button | safeHTMLAttr }}>
|
{{ if $isIcon }}aria-label="{{ $menu.Name }}"{{ end }}
|
||||||
{{- with $menu.Pre }}
|
data-nav="main" data-nav-main="{{ $mainNav }}"{{ with $childNav }} data-nav-child="{{ . }}"{{ end }}
|
||||||
{{ if hasPrefix . "<i" }}
|
href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }} {{ $button | safeHTMLAttr }}>
|
||||||
{{ . | safeHTML }}
|
|
||||||
{{ else }}
|
{{- with $menu.Pre }}
|
||||||
{{ partial "assets/icon.html" (dict "icon" . )}}
|
{{ if hasPrefix . "<i" }}
|
||||||
{{ end }}
|
{{ . | safeHTML }}
|
||||||
{{ end -}}
|
{{ else }}
|
||||||
<span {{ if $isActive }} class="active"{{ end }}>{{ if not $isIcon }}{{ $menu.Name }}{{ end }}</span>
|
{{ partial "assets/icon.html" (dict "icon" (string .) )}}
|
||||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
{{ end }}
|
||||||
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
{{ end -}}
|
||||||
</a>
|
<span {{ if $isActive }} class="active"{{ end }}>{{ if not $isIcon }}{{ $menu.Name }}{{ end }}</span>
|
||||||
|
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||||
|
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
@@ -1,9 +1,11 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- TODO: consider to drop style arg -->
|
||||||
|
|
||||||
{{ $error := false }}
|
{{ $error := false }}
|
||||||
|
|
||||||
<!-- Validate arguments -->
|
<!-- Validate arguments -->
|
||||||
|
@@ -1,13 +1,25 @@
|
|||||||
{{- $page := .page -}}
|
<!--
|
||||||
{{- if not $page -}}
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
{{- errorf "partial [assets/page-alert.html] - Missing value for param 'page'" -}}
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
{{- end -}}
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "page-alert" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/page-alert.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{- $page := .page -}}
|
||||||
{{- $pageAlertMsg := $page.Scratch.Get "pageAlertMsg" -}}
|
{{- $pageAlertMsg := $page.Scratch.Get "pageAlertMsg" -}}
|
||||||
{{- $pageAlertURL := $page.Scratch.Get "pageAlertURL" -}}
|
{{- $pageAlertURL := $page.Scratch.Get "pageAlertURL" -}}
|
||||||
{{- $version := $page.Scratch.Get "version" -}}
|
{{- $version := $page.Scratch.Get "version" -}}
|
||||||
|
|
||||||
{{- if $pageAlertMsg -}}
|
<!-- Main code -->
|
||||||
|
{{- if and (not $error) $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" aria-label="{{ T "close" }}"></button>
|
<button id="page-alert-btn-close" type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ T "close" }}"></button>
|
||||||
|
@@ -1,39 +1,19 @@
|
|||||||
<!-- Source: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/pagination.html -->
|
<!--
|
||||||
<!-- Modifications: centered pagination, replaced previous/next with text -->
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
|
||||||
{{- $validFormats := slice "default" "terse" }}
|
This source code adapts the original partial as maintained by the Hugo repository. It introduces the
|
||||||
|
following modifications:
|
||||||
|
- Centered the pagination element
|
||||||
|
- Standardized validation of partial arguments
|
||||||
|
- Replaced previous / next navigation with text
|
||||||
|
|
||||||
|
The original source code is available on:
|
||||||
|
https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/pagination.html
|
||||||
|
Copyright 2022 The Hugo Authors. Licensed under the Apache License, Version 2.0.
|
||||||
|
-->
|
||||||
|
|
||||||
{{- $msg1 := "When passing a map to the internal pagination template, one of the elements must be named 'page', and it must be set to the context of the current page." }}
|
|
||||||
{{- $msg2 := "The 'format' specified in the map passed to the internal pagination template is invalid. Valid choices are: %s." }}
|
|
||||||
|
|
||||||
{{- $page := . }}
|
|
||||||
{{- $format := "default" }}
|
|
||||||
|
|
||||||
{{- if reflect.IsMap . }}
|
|
||||||
{{- with .page }}
|
|
||||||
{{- $page = . }}
|
|
||||||
{{- else }}
|
|
||||||
{{- errorf $msg1 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .format }}
|
|
||||||
{{- $format = lower . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if in $validFormats $format }}
|
|
||||||
{{- if gt $page.Paginator.TotalPages 1 }}
|
|
||||||
<nav aria-label="{{ T "paginationNav" }}">
|
|
||||||
<ul class="pagination pagination-{{ $format }} justify-content-center">
|
|
||||||
{{- partial (printf "partials/inline/pagination/%s" $format) $page }}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
|
||||||
{{- errorf $msg2 (delimit $validFormats ", ") }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/* Format: default
|
|
||||||
{{/* --------------------------------------------------------------------- */}}
|
|
||||||
{{- define "partials/inline/pagination/default" }}
|
{{- define "partials/inline/pagination/default" }}
|
||||||
{{- with .Paginator }}
|
{{- with .Paginator }}
|
||||||
{{- $currentPageNumber := .PageNumber }}
|
{{- $currentPageNumber := .PageNumber }}
|
||||||
@@ -103,8 +83,6 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/* Format: terse
|
|
||||||
{{/* --------------------------------------------------------------------- */}}
|
|
||||||
{{- define "partials/inline/pagination/terse" }}
|
{{- define "partials/inline/pagination/terse" }}
|
||||||
{{- with .Paginator }}
|
{{- with .Paginator }}
|
||||||
{{- $currentPageNumber := .PageNumber }}
|
{{- $currentPageNumber := .PageNumber }}
|
||||||
@@ -157,3 +135,24 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "pagination" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/pagination.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{- $page := .page }}
|
||||||
|
{{- $format := .format | default "default" }}
|
||||||
|
|
||||||
|
<!-- Main code -->
|
||||||
|
{{- if and (not $error) (gt $page.Paginator.TotalPages 1) }}
|
||||||
|
<nav aria-label="{{ T "paginationNav" }}">
|
||||||
|
<ul class="pagination pagination-{{ $format }} justify-content-center">
|
||||||
|
{{- partial (printf "partials/inline/pagination/%s" $format) $page }}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
{{- end }}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,25 +1,23 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "section-header" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/section-header.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
{{- $title := .title -}}
|
{{- $title := .title -}}
|
||||||
{{- $thumbnail := .thumbnail -}}
|
|
||||||
{{- $icon := .icon -}}
|
|
||||||
{{- $sectionHeader := .sectionHeader -}}
|
|
||||||
{{- $description := .description -}}
|
{{- $description := .description -}}
|
||||||
{{- $content := .content -}}
|
{{- $content := .content -}}
|
||||||
|
|
||||||
{{- define "partials/section-header-img.html" -}}
|
<!-- Main code -->
|
||||||
{{- $title := .title -}}
|
|
||||||
{{- $thumbnail := .thumbnail -}}
|
|
||||||
{{- $icon := .icon -}}
|
|
||||||
{{ $padding := 5 }}
|
|
||||||
|
|
||||||
{{- if $thumbnail -}}
|
|
||||||
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "1x1" "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100" "title" $title) -}}
|
|
||||||
{{- else if $icon -}}
|
|
||||||
<div class="text-secondary fw-bold">
|
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-10x" $icon)) -}}
|
|
||||||
</div>
|
|
||||||
{{- end -}}
|
|
||||||
{{- 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 $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 }}
|
||||||
|
@@ -130,41 +130,19 @@
|
|||||||
{{- $params := (dict
|
{{- $params := (dict
|
||||||
"page" $page
|
"page" $page
|
||||||
"list" $list
|
"list" $list
|
||||||
"title" $title
|
|
||||||
"icon" $icon
|
|
||||||
"thumbnail" $thumbnail
|
|
||||||
"ratio" $ratio
|
|
||||||
"sectionHeader" $sectionHeader
|
|
||||||
"description" $description
|
|
||||||
"content" $content
|
|
||||||
"class" $style
|
"class" $style
|
||||||
"color" $color
|
|
||||||
"loading" $loading
|
|
||||||
)
|
)
|
||||||
-}}
|
-}}
|
||||||
{{- $partial := "" -}}
|
{{- $partial := "" -}}
|
||||||
|
|
||||||
<div class="container-fluid {{ with $background }} bg-{{ . }}{{ end }} p-0">
|
<div class="container-fluid {{ with $background }} bg-{{ . }}{{ end }} p-0">
|
||||||
<div class="container-xxl {{ $wrapper }}">
|
<div class="container-xxl {{ $wrapper }}">
|
||||||
{{- partial "assets/section-header.html" $params -}}
|
{{- partial "assets/section-header.html" (dict "title" $title "description" $description "content" $content) -}}
|
||||||
|
|
||||||
{{ warnf "[%s] vertical: %t" $page.Title $vertical}}
|
|
||||||
|
|
||||||
{{- $params := (dict
|
|
||||||
"page" $page
|
|
||||||
"list" $list
|
|
||||||
"class" $style
|
|
||||||
)
|
|
||||||
-}}
|
|
||||||
|
|
||||||
{{ if eq $layout "card" }}
|
{{ if eq $layout "card" }}
|
||||||
{{- $partial = "assets/card-group.html" -}}
|
{{- $partial = "assets/card-group.html" -}}
|
||||||
{{- $params = merge $params (dict
|
{{- $params = merge $params (dict
|
||||||
"title" $title
|
"title" $title
|
||||||
"icon" $icon
|
|
||||||
"thumbnail" $thumbnail
|
|
||||||
"ratio" $ratio
|
"ratio" $ratio
|
||||||
"description" $description
|
|
||||||
"color" $color
|
"color" $color
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
"max" $max
|
"max" $max
|
||||||
@@ -194,13 +172,8 @@
|
|||||||
{{- $partial = "assets/list.html" -}}
|
{{- $partial = "assets/list.html" -}}
|
||||||
{{- $params = merge $params (dict
|
{{- $params = merge $params (dict
|
||||||
"title" $title
|
"title" $title
|
||||||
"icon" $icon
|
|
||||||
"thumbnail" $thumbnail
|
|
||||||
"ratio" $ratio
|
|
||||||
"description" $description
|
|
||||||
"color" $color
|
"color" $color
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
"layout" $layout
|
|
||||||
)
|
)
|
||||||
-}}
|
-}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -1,10 +1,26 @@
|
|||||||
{{- $page := . -}}
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "section-menu" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/section-menu.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{- $page := .page -}}
|
||||||
{{ $items := $page.Parent.Sections }}
|
{{ $items := $page.Parent.Sections }}
|
||||||
{{ if not $page.Parent.Section }}
|
{{ if not $page.Parent.Section }}
|
||||||
{{ $items = $page.Sections }}
|
{{ $items = $page.Sections }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- if gt (len $items) 0 }}
|
<!-- Main code -->
|
||||||
|
{{- if and (not $error) (gt (len $items) 0) }}
|
||||||
<div class="d-grid gap-2 mx-auto d-md-none">
|
<div class="d-grid gap-2 mx-auto d-md-none">
|
||||||
{{ partial "assets/button.html" (dict
|
{{ partial "assets/button.html" (dict
|
||||||
"title" (T "sectionMenu")
|
"title" (T "sectionMenu")
|
||||||
|
@@ -1,9 +1,27 @@
|
|||||||
{{- if .Site.Params.sharing.enabled -}}
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "sharing" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/sharing.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{ $page := .page }}
|
||||||
|
|
||||||
|
<!-- Main code -->
|
||||||
|
{{- if and (not $error) $page.Site.Params.sharing.enabled -}}
|
||||||
{{- $sharing := true -}}
|
{{- $sharing := true -}}
|
||||||
{{ if isset .Params "sharing" }}
|
{{ if isset $page.Params "sharing" }}
|
||||||
{{ $sharing = .Params.sharing }}
|
{{ $sharing = $page.Params.sharing }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{- with (index site.Params.pages .Type ) -}}
|
{{- with (index $page.Site.Params.pages .Type ) -}}
|
||||||
{{ if isset . "sharing" }}
|
{{ if isset . "sharing" }}
|
||||||
{{ $sharing = (index . "sharing") }}
|
{{ $sharing = (index . "sharing") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -11,16 +29,15 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- if $sharing -}}
|
{{- if $sharing -}}
|
||||||
{{- $page := . -}}
|
|
||||||
{{- $order := "asc" -}}
|
{{- $order := "asc" -}}
|
||||||
{{- $list := .Site.Params.sharing.providers -}}
|
{{- $list := $page.Site.Params.sharing.providers -}}
|
||||||
{{- if .Site.Params.sharing.reverse }}{{ $order = "desc" }}{{ else }}{{ $order = "asc" }}{{ end -}}
|
{{- if $page.Site.Params.sharing.reverse }}{{ $order = "desc" }}{{ else }}{{ $order = "asc" }}{{ end -}}
|
||||||
{{- $sort := .Site.Params.sharing.sort | default "weight" -}}
|
{{- $sort := $page.Site.Params.sharing.sort | default "weight" -}}
|
||||||
{{- $list = sort $list $sort $order -}}
|
{{- $list = sort $list $sort $order -}}
|
||||||
|
|
||||||
{{- $download := .Params.download -}}
|
{{- $download := $page.Params.download -}}
|
||||||
{{- if and $download (not (fileExists (path.Join "static" $download))) -}}
|
{{- if and $download (not (fileExists (path.Join "static" $download))) -}}
|
||||||
{{- errorf "Cannot find download file for page '%s': %s" .File.Path $download -}}
|
{{- errorf "Cannot find download file for page '%s': %s" $page.File.Path $download -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<div class="py-3 text-body-secondary hstack gap-1">
|
<div class="py-3 text-body-secondary hstack gap-1">
|
||||||
@@ -40,7 +57,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partial "assets/button.html" (dict "toast" $target "clipboard" $clipboard "href" $url "icon" (printf "%s fa-fw" $item.icon) "class" "btn-social p-0" "label" (T "shareLink" $item.name) "spacing" false) }}
|
{{ partial "assets/button.html" (dict "toast" $target "clipboard" $clipboard "href" $url "icon" (printf "%s fa-fw" $item.icon) "class" "btn-social p-0" "label" (T "shareLink" $item.name) "spacing" false) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ if .Site.Params.sharing.webshare }}
|
{{ if $page.Site.Params.sharing.webshare }}
|
||||||
{{ $attr := dict "data-sharing-title" .Title "data-sharing-description" .Description "data-sharing-url" .Permalink }}
|
{{ $attr := dict "data-sharing-title" .Title "data-sharing-description" .Description "data-sharing-url" .Permalink }}
|
||||||
{{ partial "assets/button.html" (dict "href" "#!" "icon" "fas share-nodes fa-fw" "id" "btn-webshare" "class" "btn-social p-0" "attributes" $attr "label" (T "shareLink" (T "shareSystem")) "spacing" false) }}
|
{{ partial "assets/button.html" (dict "href" "#!" "icon" "fas share-nodes fa-fw" "id" "btn-webshare" "class" "btn-social p-0" "attributes" $attr "label" (T "shareLink" (T "shareSystem")) "spacing" false) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -1,7 +1,22 @@
|
|||||||
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "sidebar" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/sidebar.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
{{- $page := .page }}
|
{{- $page := .page }}
|
||||||
{{- $section := $page.Section }}
|
|
||||||
{{- $data := .menu -}}
|
{{- $data := .menu -}}
|
||||||
{{- $version := .version -}}
|
{{- $version := .version -}}
|
||||||
|
{{- $section := $page.Section }}
|
||||||
|
|
||||||
{{- define "partials/sidebar/group.html" -}}
|
{{- define "partials/sidebar/group.html" -}}
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
@@ -94,7 +109,8 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ if $data }}
|
<!-- Main code -->
|
||||||
|
{{ if and (not $error) $data }}
|
||||||
<nav class="sidebar flex-shrink-0 ps-1 pt-3" aria-label="{{ (strings.FirstUpper $section) }} navigation">
|
<nav class="sidebar flex-shrink-0 ps-1 pt-3" aria-label="{{ (strings.FirstUpper $section) }} navigation">
|
||||||
{{- $sectionBreak := false -}}
|
{{- $sectionBreak := false -}}
|
||||||
{{- $level := 0 -}}
|
{{- $level := 0 -}}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -1,5 +1,22 @@
|
|||||||
{{ $items := len (findRE "<li.*?>(.|\n)*?</li>" .TableOfContents) -}}
|
<!--
|
||||||
{{ if (gt $items 1) -}}
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "toc" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/toc-dropdown.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{- $page := .page -}}
|
||||||
|
{{ $items := len (findRE "<li.*?>(.|\n)*?</li>" $page.TableOfContents) -}}
|
||||||
|
|
||||||
|
{{ if and (not $error) (gt $items 1) -}}
|
||||||
<div class="d-grid gap-2 mx-auto">
|
<div class="d-grid gap-2 mx-auto">
|
||||||
{{ partial "assets/button.html" (dict
|
{{ partial "assets/button.html" (dict
|
||||||
"title" (T "toc")
|
"title" (T "toc")
|
||||||
@@ -16,7 +33,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<div class="collapse border bg-body-tertiary rounded p-1 navbar-nav-scroll" id="toc-collapse">
|
<div class="collapse border bg-body-tertiary rounded p-1 navbar-nav-scroll" id="toc-collapse">
|
||||||
<div class="toc toc-panel text-body p-2">
|
<div class="toc toc-panel text-body p-2">
|
||||||
<small>{{ .TableOfContents }}</small>
|
<small>{{ $page.TableOfContents }}</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
|
@@ -1,7 +1,23 @@
|
|||||||
{{- $page := .page -}}
|
<!--
|
||||||
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
<!-- Validate arguments -->
|
||||||
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "toc" "args" . "group" "partial") }}
|
||||||
|
{{- errorf "partial [assets/toc.html] - Invalid arguments" -}}
|
||||||
|
{{ $error = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Initialize arguments -->
|
||||||
|
{{- $page := .page -}}
|
||||||
{{ $items := len (findRE "<li.*?>(.|\n)*?</li>" $page.TableOfContents) -}}
|
{{ $items := len (findRE "<li.*?>(.|\n)*?</li>" $page.TableOfContents) -}}
|
||||||
{{ if gt $items 1 -}}
|
|
||||||
|
<!-- Main code -->
|
||||||
|
{{ if and (not $error) (gt $items 1) -}}
|
||||||
<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>
|
||||||
{{ $page.TableOfContents }}
|
{{ $page.TableOfContents }}
|
||||||
{{ end -}}
|
{{ end -}}
|
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
-->
|
-->
|
||||||
|
@@ -4,7 +4,9 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
{{ hugo.Generator}}
|
{{ hugo.Generator}}
|
||||||
{{ partialCached "head/stylesheet-core.html" . -}}
|
{{ partialCached "head/stylesheet-core.html" . -}}
|
||||||
{{- $modules := site.Params.modules.optional | intersect .Page.Params.modules -}}
|
|
||||||
|
{{ $page_modules := slice | append .Page.Params.modules }}
|
||||||
|
{{- $modules := site.Params.modules.optional | intersect $page_modules -}}
|
||||||
{{- range $index, $mod := $modules -}}
|
{{- range $index, $mod := $modules -}}
|
||||||
{{- $source := printf "scss/%s.scss" $mod -}}
|
{{- $source := printf "scss/%s.scss" $mod -}}
|
||||||
{{- $target := printf "css/%s.css" $mod -}}
|
{{- $target := printf "css/%s.css" $mod -}}
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
{{ $input := . }}
|
|
||||||
{{ $output := "" }}
|
|
||||||
|
|
||||||
{{ if eq (printf "%T" $input) "bool" }}
|
|
||||||
{{ $output = $input }}
|
|
||||||
{{ else if eq $input "true" }}
|
|
||||||
{{ $output = true }}
|
|
||||||
{{ else if eq $input "false" }}
|
|
||||||
{{ $output = false }}
|
|
||||||
{{ else }}
|
|
||||||
{{ errorf "Cannot cast '%s' to bool" $input }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ return $output }}
|
|
@@ -1,23 +0,0 @@
|
|||||||
<!--
|
|
||||||
Retrieve the value from a given argument within the shortcode context. If a parent is set and merge is false, the
|
|
||||||
value of the parent's argument is retrieved when the current context is unavailable. If merge is true, the parent's
|
|
||||||
value is merged with the value of the shortcode context, separated by a single space.
|
|
||||||
-->
|
|
||||||
|
|
||||||
{{ $page := .page -}}
|
|
||||||
{{ $arg := .arg -}}
|
|
||||||
{{ $merge := .merge -}}
|
|
||||||
{{ $val := "" }}
|
|
||||||
{{ with $page.Get $arg }}{{ $val = . }}{{ end }}
|
|
||||||
|
|
||||||
{{- with $page.Parent -}}
|
|
||||||
{{ with .Get $arg }}
|
|
||||||
{{ if $merge }}
|
|
||||||
{{ $val = trim (printf "%s %s" . $val) " " }}
|
|
||||||
{{ else if not $val }}
|
|
||||||
{{ $val = . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- return $val -}}
|
|
@@ -1,21 +0,0 @@
|
|||||||
{{- /* Define main breakpoint */ -}}
|
|
||||||
{{ $prev := 0 }}
|
|
||||||
{{ $next := 0 }}
|
|
||||||
{{ $result := dict }}
|
|
||||||
{{- $breakpoints := slice "xs" "sm" "md" "lg" "xl" "xxl" }}
|
|
||||||
{{- $breakpoint := site.Params.main.breakpoint | default "md" -}}
|
|
||||||
{{- if not (in $breakpoints $breakpoint) -}}
|
|
||||||
{{- errorf "layout [_default/baseof.html] - Invalid value for param 'breakpoint': %s" $breakpoint -}}
|
|
||||||
{{ else }}
|
|
||||||
{{ range $index, $item := $breakpoints }}
|
|
||||||
{{ if eq $item $breakpoint }}
|
|
||||||
{{ $prev = sub $index 1 }}
|
|
||||||
{{ $next = add $index 1 }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ if lt $prev 0 }}{{ $prev = 0 }}{{ end }}
|
|
||||||
{{ if ge $next (len $breakpoints) }}{{ $next = sub (len $breakpoints) 1 }}{{ end }}
|
|
||||||
{{ $result = dict "prev" (index $breakpoints $prev) "current" $breakpoint "next" (index $breakpoints $next) }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{ return $result }}
|
|
@@ -1,18 +0,0 @@
|
|||||||
{{- $page := . -}}
|
|
||||||
{{- if ne (printf "%T" $page) "*hugolib.pageState" -}}
|
|
||||||
{{- errorf "partial [utilities/GetDescription.html] - Expected page context" -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $description := "" -}}
|
|
||||||
{{- if not $page.RelPermalink -}}
|
|
||||||
{{- $description = $page.Content -}}
|
|
||||||
{{ else }}
|
|
||||||
{{- $description = $page.Description -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- if not $description -}}
|
|
||||||
{{- $description = $page.Summary -}}
|
|
||||||
{{- if $page.Truncated }}{{ $description = print $description "..." }}{{ end -}}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- return $description -}}
|
|
@@ -1,13 +0,0 @@
|
|||||||
{{ $path := .data }}
|
|
||||||
{{ $page := .page }}
|
|
||||||
|
|
||||||
{{/* Try language-specific file first */}}
|
|
||||||
{{ $i18nPath := path.Join (path.Dir $path) (printf "%s.%s" (path.BaseName $path) $page.Language.Lang) (path.Ext $path) }}
|
|
||||||
{{ $data := index site.Data $i18nPath }}
|
|
||||||
|
|
||||||
{{/* Use exact provided path as backup */}}
|
|
||||||
{{ if not $data -}}
|
|
||||||
{{ $data = index site.Data $path }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ return $data }}
|
|
@@ -1,68 +0,0 @@
|
|||||||
<!--
|
|
||||||
Retrieve a local or remote resource compatible with Hugo's image processing. If the url starts with 'http', the
|
|
||||||
image is retrieved from an external location. Else, the url is matched with a page resource and site asset (in that
|
|
||||||
order). The path of a remote image is rewritten to ensure processed files are stored in the final '/img' folder. The
|
|
||||||
partial returns nil if the resource cannot be found or is incompatibile. The partial supports the following
|
|
||||||
arguments:
|
|
||||||
"url" Required path or url of the image, e.g. "img/example.jpg" or "https://example.com/img.jpg"
|
|
||||||
"page" Optional page context, used to retrieve an image from page resources.
|
|
||||||
-->
|
|
||||||
|
|
||||||
{{ $url := .url -}}
|
|
||||||
{{ $page := .page -}}
|
|
||||||
{{ $mirror := false }}
|
|
||||||
|
|
||||||
{{ $supportedMediaTypes := slice "image/png" "image/jpeg" "image/gif" "image/tiff" "image/bmp" "image/webp" -}}
|
|
||||||
{{ $remote := hasPrefix (lower $url) "http" }}
|
|
||||||
{{- $img := partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
|
|
||||||
|
|
||||||
{{ with $img -}}
|
|
||||||
{{ if in $supportedMediaTypes (string $img.MediaType) -}}
|
|
||||||
<!-- Rewrite the path of remote images to avoid storing processed files in the site's root -->
|
|
||||||
<!-- Add a file extension based on the media type if needed to avoid Hugo processing errors -->
|
|
||||||
{{ if $remote -}}
|
|
||||||
{{ $path := (urls.Parse $url).Path }}
|
|
||||||
{{ $filename := index (last 1 (split (delimit (split $path "/") "," "") ",")) 0 -}}
|
|
||||||
{{ if not (path.Ext $filename) -}}
|
|
||||||
{{ $extension := string $img.MediaType.SubType -}}
|
|
||||||
{{ $filename = printf "%s.%s" $filename $extension -}}
|
|
||||||
{{ end -}}
|
|
||||||
{{ $img = $img.Content | resources.FromString (printf "/img/%s" $filename) -}}
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Rotate the image if needed based on EXIF orientation. EXIF defines the following values:
|
|
||||||
(source: https://sirv.com/help/articles/rotate-photos-to-be-upright/#EXIF_orientation_values)
|
|
||||||
1 = 0 degrees: the correct orientation, no adjustment is required.
|
|
||||||
2 = 0 degrees, mirrored: image has been flipped back-to-front.
|
|
||||||
3 = 180 degrees: image is upside down.
|
|
||||||
4 = 180 degrees, mirrored: image has been flipped back-to-front and is upside down.
|
|
||||||
5 = 90 degrees: image has been flipped back-to-front and is on its side.
|
|
||||||
6 = 90 degrees, mirrored: image is on its side.
|
|
||||||
7 = 270 degrees: image has been flipped back-to-front and is on its far side.
|
|
||||||
8 = 270 degrees, mirrored: image is on its far side.
|
|
||||||
-->
|
|
||||||
{{ with $img.Exif }}
|
|
||||||
{{ $filter := "" }}
|
|
||||||
{{ $orientation := .Tags.Orientation }}
|
|
||||||
{{ if or (eq $orientation 3) (eq $orientation 4) }}
|
|
||||||
{{ $filter = images.Process "r180" }}
|
|
||||||
{{ else if or (eq $orientation 5) (eq $orientation 6) }}
|
|
||||||
{{ $filter = images.Process "r270" }}
|
|
||||||
{{ else if or (eq $orientation 7) (eq $orientation 8) }}
|
|
||||||
{{ $filter = images.Process "r90" }}
|
|
||||||
{{ end }}
|
|
||||||
{{ with $filter }}{{ $img = $img.Filter . }}{{ end }}
|
|
||||||
|
|
||||||
{{- $isMirrored := slice 2 4 5 7 -}}
|
|
||||||
{{- if (in $isMirrored $orientation) }}{{ $mirror = true }}{{ end -}}
|
|
||||||
{{ end }}
|
|
||||||
{{ else -}}
|
|
||||||
{{ warnf "Image type '%s' is not supported: %s" $img.MediaType $url -}}
|
|
||||||
{{ $img = "" -}}
|
|
||||||
{{ end -}}
|
|
||||||
{{ else -}}
|
|
||||||
{{ warnf "Cannot find image resource: %q" $url -}}
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
{{ return (dict "resource" $img "mirror" $mirror) -}}
|
|
@@ -1,17 +0,0 @@
|
|||||||
{{- $page := .page -}}
|
|
||||||
{{- $version := .version -}}
|
|
||||||
{{- $sidebarFilename := "" -}}
|
|
||||||
|
|
||||||
{{- $menu := "" -}}
|
|
||||||
{{- if $page.IsPage -}}
|
|
||||||
{{- $sidebarFilename = printf "%s-%s" $page.Section $version -}}
|
|
||||||
{{- $menu = index site.Data $sidebarFilename -}}
|
|
||||||
{{ if not $menu }}
|
|
||||||
{{- $sidebarFilename = $page.Section -}}
|
|
||||||
{{ $menu = index site.Data $sidebarFilename }}
|
|
||||||
{{ end }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{ if $menu }}{{ with $sidebarFilename }}{{ $page.Scratch.Set "sidebarFilename" (path.Join "data" .) }}{{ end }}{{ end -}}
|
|
||||||
|
|
||||||
{{- return $menu -}}
|
|
@@ -1,33 +0,0 @@
|
|||||||
{{- $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 }}
|
|
@@ -1,40 +0,0 @@
|
|||||||
<!--
|
|
||||||
Retrieve a local or remote resource. If the url starts with 'http', the resource is retrieved from an external
|
|
||||||
location. Else, the url is matched with a page resource and site asset (in that order).
|
|
||||||
|
|
||||||
This partial supports both relative and absolute paths. Hugo has different methods to retrieve page bundle assets
|
|
||||||
and site assets. Absolute paths are converted to a relative path to make them compatible with Hugo's methods. The
|
|
||||||
prefix of an absolute path is truncated if it matches either with the page bundle folder (starting with "/content/")
|
|
||||||
or the assets folder ("/assets/").
|
|
||||||
|
|
||||||
The partial returns nil if the resource cannot be found. The partial supports the following arguments:
|
|
||||||
"url" Required path or url of the resource, e.g. "img/example.jpg" or "https://example.com/img.jpg"
|
|
||||||
"page" Optional page context, used to retrieve a resource from page resources.
|
|
||||||
-->
|
|
||||||
|
|
||||||
{{ $url := .url -}}
|
|
||||||
{{ $page := .page -}}
|
|
||||||
{{ if hasPrefix $url "/" }}
|
|
||||||
{{ $pageContext := (path.Join "/content" $page.File.Dir) -}}
|
|
||||||
{{ if hasPrefix $url $pageContext }}
|
|
||||||
{{ $url = strings.TrimPrefix $pageContext $url -}}
|
|
||||||
{{ else if hasPrefix $url "/assets/" }}
|
|
||||||
{{ $url = strings.TrimPrefix "/assets/" $url -}}
|
|
||||||
{{ end }}
|
|
||||||
{{ $url = strings.TrimPrefix "/" $url -}}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $res := "" }}
|
|
||||||
{{ $remote := hasPrefix (lower $url) "http" }}
|
|
||||||
{{ if $remote }}
|
|
||||||
{{ $res = resources.GetRemote $url -}}
|
|
||||||
{{ else }}
|
|
||||||
{{ if $page }}
|
|
||||||
{{ $res = $page.Resources.Get $url -}}
|
|
||||||
{{ end }}
|
|
||||||
{{ if not $res }}
|
|
||||||
{{ $res = resources.GetMatch $url }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ return $res -}}
|
|
@@ -1,12 +0,0 @@
|
|||||||
<!--
|
|
||||||
Retrieve the value from a key-value pair. The expected format is 'key="value"', including double quotes for the
|
|
||||||
value. Returns -1 when no valid value is found.
|
|
||||||
-->
|
|
||||||
|
|
||||||
{{- $input := (split . "=") -}}
|
|
||||||
{{- $val := -1 -}}
|
|
||||||
{{- if gt (len $input) 1 -}}
|
|
||||||
{{- $val = trim (index $input 1) "\"" -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- return $val -}}
|
|
@@ -1,38 +0,0 @@
|
|||||||
<!--
|
|
||||||
Retrieve the docs version label of the current page. The path of the page's file is matched with the url of the
|
|
||||||
defined docs releases in the site's parameters. When no match is found it returns the latest label instead.
|
|
||||||
-->
|
|
||||||
|
|
||||||
{{- $page := .page -}}
|
|
||||||
{{- $base := .base -}}
|
|
||||||
{{- $version := "" -}}
|
|
||||||
|
|
||||||
{{- if and site.Params.docs.releases site.Params.docs.contentPath -}}
|
|
||||||
{{- $docsPath := strings.TrimPrefix "/" site.Params.docs.contentPath -}}
|
|
||||||
{{- if and $page.File (strings.HasPrefix $page.File.Dir $docsPath) -}}
|
|
||||||
{{- $currentPath := strings.TrimPrefix $docsPath $page.File.Dir -}}
|
|
||||||
{{- $currentVersion := index (split $currentPath "/") 0 -}}
|
|
||||||
{{- $versionPath := path.Join site.Params.docs.contentPath $currentVersion -}}
|
|
||||||
|
|
||||||
{{- $list := site.Params.docs.releases -}}
|
|
||||||
{{- range $index, $item := $list -}}
|
|
||||||
{{- $url := strings.TrimSuffix "/" $item.url -}}
|
|
||||||
{{- if eq $url $versionPath -}}
|
|
||||||
{{- if $base }}{{ $version = path.Base $item.url }}{{ else }}{{ $version = $item.label }}{{ end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- if not $version -}}
|
|
||||||
{{- $list := site.Params.docs.releases -}}
|
|
||||||
{{- range $item := $list -}}
|
|
||||||
{{- if $item.latest -}}
|
|
||||||
{{- if $base }}{{ $version = path.Base $item.url }}{{ else }}{{ $version = $item.label }}{{ end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- $version = site.Params.docs.version -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- return $version -}}
|
|
@@ -1,17 +0,0 @@
|
|||||||
{{ $path := .path }}
|
|
||||||
{{ $height := .height }}
|
|
||||||
{{ $width := "" }}
|
|
||||||
|
|
||||||
{{ if eq (path.Ext $path) ".svg" }}
|
|
||||||
{{ $path := path.Join "static" .path }}
|
|
||||||
{{ if fileExists $path }}
|
|
||||||
{{ with findRE `viewBox="\d*\.?\d+[\s,]\d*\.?\d+[\s,]\d*\.?\d+[\s,]\d*\.?\d+"` (readFile $path) 1 }}
|
|
||||||
{{ $content := split (index (split (index . 0) `"`) 1) " " }}
|
|
||||||
{{ $viewbox_width := float (index $content 2) }}
|
|
||||||
{{ $viewbox_height := float (index $content 3) }}
|
|
||||||
{{ $width = int (math.Round (mul (div $height $viewbox_height) $viewbox_width)) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ return $width }}
|
|
@@ -1,147 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright © 2023 The Hinode Team / Mark Dumay. All rights reserved.
|
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
|
||||||
Visit gethinode.com/license for more details.
|
|
||||||
-->
|
|
||||||
|
|
||||||
{{ $error := false }}
|
|
||||||
|
|
||||||
{{ $aliases := dict "path" "string" "select" "string" "url" "string" }}
|
|
||||||
|
|
||||||
{{ $structure := .structure }}
|
|
||||||
{{ if not $structure }}
|
|
||||||
{{- errorf "partial [utilities/ValidateArgs.html] - Missing value for param 'structure'" -}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $args := .args | default dict }}
|
|
||||||
|
|
||||||
{{ $definitions := (index site.Data.structures $structure).arguments }}
|
|
||||||
{{ if not $definitions }}
|
|
||||||
{{- errorf "partial [utilities/ValidateArgs.html] - Missing definitions: %s" $structure -}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $child := .child }}
|
|
||||||
{{ if $child }}
|
|
||||||
{{ $extra_def := (index site.Data.structures $child).arguments }}
|
|
||||||
{{ if not $extra_def }}
|
|
||||||
{{- errorf "partial [utilities/ValidateArgs.html] - Missing definitions: %s" $child -}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ else }}
|
|
||||||
{{ range $key, $val := $extra_def }}
|
|
||||||
{{ if $val.parent }}{{ $definitions = merge $definitions (dict $key $val) }}{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $group := .group }}
|
|
||||||
{{ $namedArgs := true }}
|
|
||||||
|
|
||||||
{{ if not $error }}
|
|
||||||
{{ range $key, $val := $args }}
|
|
||||||
{{ $def := "" }}
|
|
||||||
{{ if eq (printf "%T" $key) "string" }}
|
|
||||||
{{ $def = index $definitions $key }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $namedArgs = false }}
|
|
||||||
{{ range $d := $definitions }}
|
|
||||||
{{ if eq $d.position $key }}{{ $def = $d }}{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if $def }}
|
|
||||||
{{ $groups := slice | append $def.group }}
|
|
||||||
{{ if and $group $def.group }}
|
|
||||||
{{ if not (in $groups $group )}}{{ $def = "" }}{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if not $def }}
|
|
||||||
{{ if eq (printf "%T" $key) "string" }}
|
|
||||||
{{ warnf "[%s] unsupported argument '%s'" $structure $key }}
|
|
||||||
{{ else if eq (printf "%T" $key) "int" }}
|
|
||||||
{{ warnf "[%s] unsupported argument at index %d (value: '%s')" $structure $key $val }}
|
|
||||||
{{ else }}
|
|
||||||
{{ warnf "[%s] unsupported argument value '%s'" $structure $val }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ else }}
|
|
||||||
{{ if and (not $val) $def.default }}{{ $val = $def.default }}{{ end }}
|
|
||||||
|
|
||||||
{{/* validate type */}}
|
|
||||||
{{ $expected := slice | append $def.type }}
|
|
||||||
{{ $extra := slice }}
|
|
||||||
{{ range $expected }}
|
|
||||||
{{ $alias := index $aliases . }}
|
|
||||||
{{ if $alias }}{{ $extra = $extra | append $alias }}{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ if $extra }}{{ $expected = $expected | append $extra }}{{ end }}
|
|
||||||
{{ $actual := printf "%T" $val }}
|
|
||||||
|
|
||||||
{{/* cast supported types from/to string */}}
|
|
||||||
{{ if and (in $expected "bool") (in (slice "true" "false") $val) }}
|
|
||||||
{{ $actual = "bool" }}
|
|
||||||
{{ else if and (in $expected "int") (findRE `^-?\d+$` $val) }}
|
|
||||||
{{ $actual = "int" }}
|
|
||||||
{{ else if and (in $expected "float") (findRE `^(?:[1-9]\d*|0)?(?:\.\d+)?$` $val) }}
|
|
||||||
{{ $actual = "float" }}
|
|
||||||
{{ else if and (in $expected "string") (in (slice "bool" "int" "int64" "float" "float64") $actual) }}
|
|
||||||
{{ $actual = "string" }}
|
|
||||||
{{ $val = string $val }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if and $val (not (in $expected $actual)) }}
|
|
||||||
{{ warnf "[%s] argument '%s': expected type '%s', got '%s'" $structure (string $key) (delimit $expected ", ") $actual }}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* validate permitted values */}}
|
|
||||||
{{ if and $def.options.values (eq $actual "string") }}
|
|
||||||
{{ if and $val (not (in $def.options.values $val)) }}
|
|
||||||
{{ warnf "[%s] argument '%s': unexpected value '%s'" $structure (string $key) $val }}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
{{ else if and $def.options.min (in (slice "int" "float" "float64") $actual) }}
|
|
||||||
{{ if lt $val $def.options.min }}
|
|
||||||
{{ warnf "[%s] argument '%s': value '%s' out of range [$d, $d]" $structure (string $key) $val $def.options.min $def.options.max}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
{{ else if and $def.options.max (in (slice "int" "float" "float64") $actual) }}
|
|
||||||
{{ if (gt $val $def.options.max) }}
|
|
||||||
{{ warnf "[%s] argument '%s': value '%s' out of range [$d, $d]" $structure (string $key) $val $def.options.min $def.options.max}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* validate required arguments */}}
|
|
||||||
{{ $max := len $args }}
|
|
||||||
{{ $expected := 0 }}
|
|
||||||
{{ range $key, $val := $definitions }}
|
|
||||||
{{ $skip := false }}
|
|
||||||
{{ $groups := slice | append $val.group }}
|
|
||||||
{{ if and $group $val.group }}
|
|
||||||
{{ $skip = not (in $groups $group )}}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if and (not $skip) (not $val.optional) }}
|
|
||||||
{{ if $namedArgs }}
|
|
||||||
{{ if not (isset $args $key) }}
|
|
||||||
{{ warnf "[%s] argument '%s': expected value" $structure $key }}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $expected = add $expected 1 }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if lt $max $expected }}
|
|
||||||
{{ warnf "[%s] expected '%d' args, got '%d'" $structure $expected $max }}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ return $error }}
|
|
@@ -1,32 +0,0 @@
|
|||||||
<!--
|
|
||||||
Returns true if the current version is older than the latest version defined in the docs section of the site
|
|
||||||
parameters. The verification supports semver patterns MAJOR.MINOR.PATCH with an optional suffix.
|
|
||||||
|
|
||||||
Original code by solus on https://discourse.gohugo.io/t/sorting-semantic-version-numbers/40838/6.
|
|
||||||
-->
|
|
||||||
|
|
||||||
{{ $current := .current }}
|
|
||||||
{{ $latest := site.Params.docs.latest }}
|
|
||||||
|
|
||||||
{{- define "partials/padZeroPrefix.html" -}}
|
|
||||||
{{- $padSize := 6 }}
|
|
||||||
{{- $paddedString := replaceRE "(\\d+)" (print (strings.Repeat (sub $padSize 1) "0") "$1") . }}
|
|
||||||
{{- $trimmedString := replaceRE (print "0+(\\d{" $padSize "})") "$1" $paddedString }}
|
|
||||||
{{- return $trimmedString }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- define "partials/trimZeroPrefix.html" -}}
|
|
||||||
{{- return replaceRE "0+(\\d+)" "$1" . }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- $isOlder := false -}}
|
|
||||||
|
|
||||||
{{- if and $current $latest }}
|
|
||||||
{{- $versions := slice $current $latest }}
|
|
||||||
{{- $paddedVersions := apply $versions "partial" "padZeroPrefix" "." }}
|
|
||||||
{{- $sortedVersions := (sort $paddedVersions "value" "desc") }}
|
|
||||||
{{- $sortedVersions = apply $sortedVersions "partial" "trimZeroPrefix" "." }}
|
|
||||||
{{ $isOlder = ne (index $sortedVersions 0) $current }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- return $isOlder -}}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user