Compare commits

...

215 Commits

Author SHA1 Message Date
Mark Dumay
9fba521bc5 Merge pull request #1137 from gethinode/develop
Add support for Cloudinary videos
2024-08-26 09:34:52 +02:00
Mark Dumay
60a34aac97 Fix error handling when Cloudinary video thumbnail is not found 2024-08-26 09:25:22 +02:00
Mark Dumay
15daf8c090 Merge branch 'main' into develop 2024-08-26 09:17:19 +02:00
Mark Dumay
7e4459ca8d Add support for Cloudinary videos 2024-08-26 09:16:48 +02:00
Mark Dumay
5ef2aad372 Merge pull request #1131 from gethinode/develop
Adjust padding of video based on aspect ratio
2024-08-25 12:56:35 +02:00
Mark Dumay
4c6f4a9da9 Merge branch 'main' into develop 2024-08-25 09:02:11 +02:00
Mark Dumay
fd7f3692dd Adjust padding of video based on aspect ratio 2024-08-25 09:01:37 +02:00
Mark Dumay
f48b462c51 Merge pull request #1130 from gethinode/develop
Add support for configurable video players
2024-08-24 15:49:26 +02:00
Mark Dumay
287bc7700c Merge branch 'main' into develop 2024-08-24 11:41:49 +02:00
Mark Dumay
ee5e2745e2 Add support for configurable video players
Refactors previous YouTube shortcode into a reusable video partial. The partial includes support for Vimeo. A new shortcode Vimeo is added.

In the future, the code could be refactored to use adapters, similar to the image partial.
2024-08-24 11:41:26 +02:00
github-actions[bot]
31fb07e180 Merge pull request #1129 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.130.0
Bump hugo-bin from 0.129.2 to 0.130.0
2024-08-23 13:28:04 +00:00
dependabot[bot]
aaf8513688 Bump hugo-bin from 0.129.2 to 0.130.0
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.129.2 to 0.130.0.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.129.2...v0.130.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-23 13:23:26 +00:00
Mark Dumay
acd2812218 Merge pull request #1128 from gethinode/develop
Fix search input margin on smaller screens
2024-08-23 11:19:58 +02:00
Mark Dumay
665357e538 Merge branch 'main' into develop 2024-08-23 08:17:00 +02:00
Mark Dumay
f678352b78 Fix search input margin on smaller screens 2024-08-23 08:16:25 +02:00
Mark Dumay
17b39caef7 Merge pull request #1127 from gethinode/develop
Fix border behavior of card zoom animation
2024-08-23 08:07:03 +02:00
Mark Dumay
38ab9f2e43 Merge branch 'main' into develop 2024-08-23 08:00:12 +02:00
Mark Dumay
aa4da56910 Fix border behavior of card zoom animation 2024-08-23 07:58:43 +02:00
Mark Dumay
ea8e851e45 Merge pull request #1124 from gethinode/develop
Fix navbar behavior
2024-08-21 10:56:08 +02:00
Mark Dumay
90e6c9869d Merge branch 'main' into develop 2024-08-21 10:42:52 +02:00
Mark Dumay
628eb99f62 Skip navbar theme update when not fixed 2024-08-21 10:41:07 +02:00
Mark Dumay
a0293cc081 Fix navbar item status when pageref is unspecified 2024-08-21 10:40:48 +02:00
Mark Dumay
d37dcdd20c Fix navbar overlay behavior when not fixed 2024-08-21 10:40:36 +02:00
Mark Dumay
f0ff631b0d Merge pull request #1122 from gethinode/develop
Fix schema config
2024-08-21 07:24:48 +02:00
Mark Dumay
b84bd07073 Merge branch 'main' into develop 2024-08-21 07:14:24 +02:00
Mark Dumay
b800906956 Fix schema config 2024-08-21 07:13:53 +02:00
Mark Dumay
049b38d3c1 Merge pull request #1121 from gethinode/develop
Fix sidebar config
2024-08-21 07:13:07 +02:00
Mark Dumay
27c2500c92 Merge branch 'main' into develop 2024-08-21 07:07:15 +02:00
Mark Dumay
a182b2a134 Merge pull request #1119 from d-oit/main
Update de.yaml, fix schema.org exampleSite
2024-08-21 07:06:41 +02:00
Mark Dumay
43abf793b8 Merge branch 'main' into main 2024-08-21 06:50:07 +02:00
Mark Dumay
e11fa8d377 Bump package release 2024-08-21 06:48:06 +02:00
Mark Dumay
fb94544bb0 Update build stats 2024-08-21 06:47:41 +02:00
Mark Dumay
67f687d6b9 Fix sidebar config
See #1120
2024-08-21 06:47:05 +02:00
Dominik Oswald
879efc07e8 ExampleSite: Fix schema.org config
Author is missing: 

https://validator.schema.org/#url=https%3A%2F%2Fdemo.gethinode.com%2Fen%2Fblog%2Fimage%2F

fix:
[author] > schema.author
2024-08-18 17:10:38 +02:00
Mark Dumay
29bcb26d04 Merge pull request #1116 from gethinode/develop
Enable embedded Font Awesome icons
2024-08-17 16:02:43 +02:00
Mark Dumay
e04a8dc0ed Enable embedded Font Awesome icons
Fixes #394
2024-08-17 15:56:55 +02:00
Mark Dumay
c7e70bf933 Merge pull request #1114 from gethinode/download-link
Support links to static files and page resources
2024-08-17 15:44:15 +02:00
Mark Dumay
1700abc7de Merge branch 'main' into download-link 2024-08-17 14:57:41 +02:00
Mark Dumay
3ef857dba9 Fix link error 2024-08-17 08:00:03 +02:00
Mark Dumay
5acc2e8f9e Support links to static files and page resources 2024-08-16 19:05:07 +02:00
Mark Dumay
0caa00a1a1 Merge pull request #1112 from gethinode/develop
Support embedding of vector image assets
2024-08-16 16:23:19 +02:00
Mark Dumay
b27a5ac7cb Merge branch 'main' into develop 2024-08-16 16:14:19 +02:00
Mark Dumay
24261c9193 Support embedding of vector image assets 2024-08-16 16:13:42 +02:00
github-actions[bot]
d1aa9c0f7c Merge pull request #1111 from gethinode/dependabot/npm_and_yarn/stylelint-16.8.2
Bump stylelint from 16.8.1 to 16.8.2
2024-08-16 13:12:21 +00:00
dependabot[bot]
a18d387379 Bump stylelint from 16.8.1 to 16.8.2
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.8.1 to 16.8.2.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.8.1...16.8.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 13:07:34 +00:00
Mark Dumay
2d9cbf9195 Merge pull request #1110 from gethinode/develop
Add assistive label to featured icons
2024-08-16 14:21:22 +02:00
Mark Dumay
64abda14ce Merge branch 'main' into develop 2024-08-16 14:15:55 +02:00
Mark Dumay
3625675577 Bump package release 2024-08-16 14:14:55 +02:00
Mark Dumay
e6e115a65d Update build stats 2024-08-16 14:12:34 +02:00
Mark Dumay
9832b566db Add assistive label to featured icons
Fixes #1106
2024-08-16 14:12:21 +02:00
Mark Dumay
f3211eabe0 Merge pull request #1109 from gethinode/develop
Fix reference to base URL in links
2024-08-16 13:52:15 +02:00
Mark Dumay
82c1d00af4 Merge branch 'main' into develop 2024-08-16 13:38:17 +02:00
Mark Dumay
70386eaeec Fix reference to base URL in links 2024-08-16 13:37:38 +02:00
Mark Dumay
7413155dea Merge pull request #1108 from gethinode/develop
Fix embedded and anchor links
2024-08-16 11:04:54 +02:00
Mark Dumay
cfd1706f5f Merge branch 'main' into develop 2024-08-16 10:58:37 +02:00
Mark Dumay
5eca63c50d Fix embedded and anchor links 2024-08-16 10:58:05 +02:00
Mark Dumay
d3f471a281 Merge pull request #1107 from gethinode/develop
Use utility function to retrieve the page associated with a card
2024-08-16 10:55:56 +02:00
Mark Dumay
b4acd7aef2 Merge branch 'main' into develop 2024-08-16 10:51:11 +02:00
Mark Dumay
49a3ef3c42 Use utility function to retrieve the page associated with a card 2024-08-16 10:50:36 +02:00
github-actions[bot]
56eaa9d90b Merge pull request #1105 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.129.2
Bump hugo-bin from 0.129.1 to 0.129.2
2024-08-15 13:42:51 +00:00
dependabot[bot]
492dbbec24 Bump hugo-bin from 0.129.1 to 0.129.2
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.129.1 to 0.129.2.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.129.1...v0.129.2)

---
updated-dependencies:
- dependency-name: hugo-bin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-15 13:38:04 +00:00
Mark Dumay
d2fc5e3433 Merge pull request #1104 from gethinode/develop
Support markdown links
2024-08-15 15:15:30 +02:00
Mark Dumay
b5cc3f6d84 Merge branch 'main' into develop 2024-08-15 14:46:54 +02:00
Mark Dumay
e1e1041c1b Support markdown links
Closes #826
2024-08-15 14:46:10 +02:00
Mark Dumay
e1cac645a7 Merge pull request #1103 from gethinode/develop
Support markdown images
2024-08-15 13:14:35 +02:00
Mark Dumay
d23d533575 Merge branch 'main' into develop 2024-08-15 12:48:56 +02:00
Mark Dumay
d447a4a65a Support markdown images 2024-08-15 12:48:26 +02:00
Mark Dumay
3a466277e3 Merge pull request #1102 from gethinode/develop
Support server-side math rendering using KaTeX
2024-08-15 11:44:50 +02:00
Mark Dumay
2b09ceef93 Merge branch 'main' into develop 2024-08-15 10:22:46 +02:00
Mark Dumay
ee30409257 Support server-side math rendering using KaTeX 2024-08-15 10:22:12 +02:00
Dominik Oswald
c5edb65550 Update de.yaml 2024-08-15 10:07:42 +02:00
Mark Dumay
70583bdb33 Merge pull request #1101 from gethinode/develop
Fix rendering of theme toggle button
2024-08-14 16:57:34 +02:00
Mark Dumay
8e1a299a72 Merge branch 'main' into develop 2024-08-14 16:36:52 +02:00
Mark Dumay
e20aba4907 Improve initial state of theme toggle button 2024-08-14 16:33:04 +02:00
Mark Dumay
1aedf22923 Fix toggle button color in high-contrast mode 2024-08-14 14:47:10 +02:00
Mark Dumay
e77671ffef Merge pull request #1100 from gethinode/develop
Bump required Hugo version
2024-08-14 14:20:09 +02:00
Mark Dumay
433f8ef60d Merge branch 'main' into develop 2024-08-14 14:00:50 +02:00
Mark Dumay
acb261ba69 Bump required Hugo version
Hinode v0.25.5 uses the blockquote template and GitHub-style alerts introduced by Hugo v0.132.0
2024-08-14 13:33:41 +02:00
Mark Dumay
b04b5a136f Merge pull request #1099 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2024-08-14 07:04:31 +02:00
markdumay
953f4ba908 fix: update Hugo module dependencies 2024-08-14 03:06:36 +00:00
Mark Dumay
90e65b5614 Merge pull request #1096 from gethinode/develop
Add link type to release shortcode
2024-08-13 17:17:19 +02:00
Mark Dumay
944437ea4c Merge branch 'main' into develop 2024-08-13 17:07:25 +02:00
Mark Dumay
5d0593bf65 Add link type to release shortcode 2024-08-13 17:06:47 +02:00
Mark Dumay
4935e627f6 Merge pull request #1095 from gethinode/develop
Refine rendering of embedded buttons
2024-08-13 17:03:26 +02:00
Mark Dumay
f7d535d025 Merge branch 'main' into develop 2024-08-13 16:16:38 +02:00
Mark Dumay
67280d6ad0 Refine refining of embedded buttons 2024-08-13 16:16:00 +02:00
Mark Dumay
e21332d016 Merge pull request #1094 from gethinode/develop
Fix inline rendering of buttons
2024-08-13 16:11:20 +02:00
Mark Dumay
f306bc2b22 Merge branch 'main' into develop 2024-08-13 16:04:35 +02:00
github-actions[bot]
475745cc6c Merge pull request #1093 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.129.1
Bump hugo-bin from 0.129.0 to 0.129.1
2024-08-13 14:03:22 +00:00
Mark Dumay
90c43c84e5 Bump package release 2024-08-13 16:00:25 +02:00
Mark Dumay
a81b672731 Fix inline rendering of buttons 2024-08-13 15:59:47 +02:00
dependabot[bot]
b86ec388b6 Bump hugo-bin from 0.129.0 to 0.129.1
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.129.0 to 0.129.1.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.129.0...v0.129.1)

---
updated-dependencies:
- dependency-name: hugo-bin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-13 13:58:21 +00:00
Mark Dumay
5dd0fce394 Merge pull request #1091 from d-oit/main
Save and load the selected language on domain level
2024-08-13 13:48:55 +02:00
Mark Dumay
a66dc2f91c Disable language selection storage in default setup 2024-08-13 13:41:40 +02:00
Mark Dumay
0072292522 Refine layout 2024-08-13 13:39:39 +02:00
Mark Dumay
d3f534629d Restore scheduled updates 2024-08-13 13:35:18 +02:00
Mark Dumay
1407e1ba0d Merge branch 'main' into main 2024-08-13 11:43:29 +02:00
Mark Dumay
b9bce4800c Merge pull request #1092 from gethinode/develop
Support GitHub-style alerts
2024-08-13 11:35:28 +02:00
Mark Dumay
a5a424b6ed Merge branch 'main' into develop 2024-08-13 11:27:50 +02:00
Mark Dumay
9c8b21233c Support GitHub-style alerts
Fixes #1070
2024-08-13 11:27:05 +02:00
Mark Dumay
b564696728 Merge pull request #1090 from gethinode/develop
Bump hugo bin dependency
2024-08-13 10:19:46 +02:00
Mark Dumay
c669c82324 Merge branch 'main' into develop 2024-08-13 10:13:09 +02:00
Mark Dumay
8014f4d636 Bump hugo bin dependency 2024-08-13 10:12:39 +02:00
Mark Dumay
7f80f52294 Merge pull request #1089 from gethinode/develop
Fix color mode behavior of navbar
2024-08-13 10:09:40 +02:00
Mark Dumay
485db3808f Fix linting issue 2024-08-13 10:01:16 +02:00
Mark Dumay
7b10339aea Fix navbar title color in high-contrast mode 2024-08-13 09:43:04 +02:00
Mark Dumay
ed5c32a7a4 Merge branch 'main' into develop 2024-08-13 09:22:08 +02:00
Mark Dumay
c42a379ca0 Fix color mode behavior of navbar
Fixes #1083
2024-08-13 09:21:03 +02:00
Mark Dumay
22c17c3123 Merge pull request #1088 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2024-08-13 07:17:40 +02:00
markdumay
e4f82c1304 fix: update Hugo module dependencies 2024-08-13 03:06:04 +00:00
do
07fa46b9a6 prevent loading twice 2024-08-12 18:39:38 +02:00
github-actions[bot]
809ce0d4ad Merge pull request #1086 from gethinode/dependabot/npm_and_yarn/cssnano-preset-advanced-7.0.5
Bump cssnano-preset-advanced from 7.0.4 to 7.0.5
2024-08-12 13:45:04 +00:00
dependabot[bot]
deb97e0e29 Bump cssnano-preset-advanced from 7.0.4 to 7.0.5
Bumps [cssnano-preset-advanced](https://github.com/cssnano/cssnano) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano-preset-advanced@7.0.4...cssnano-preset-advanced@7.0.5)

---
updated-dependencies:
- dependency-name: cssnano-preset-advanced
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 13:39:15 +00:00
github-actions[bot]
14a89a2ff9 Merge pull request #1087 from gethinode/dependabot/npm_and_yarn/cssnano-7.0.5
Bump cssnano from 7.0.4 to 7.0.5
2024-08-12 13:38:09 +00:00
dependabot[bot]
81b40d145d Bump cssnano from 7.0.4 to 7.0.5
Bumps [cssnano](https://github.com/cssnano/cssnano) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano@7.0.4...cssnano@7.0.5)

---
updated-dependencies:
- dependency-name: cssnano
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 13:33:05 +00:00
Mark Dumay
1dfce3d445 Merge pull request #1085 from gethinode/develop
Reduce screen flickering when using color mode
2024-08-12 15:00:47 +02:00
Mark Dumay
145b2c29d1 Merge branch 'main' into develop 2024-08-12 14:49:36 +02:00
Mark Dumay
77fe046bea Bump package release 2024-08-12 14:48:47 +02:00
Mark Dumay
63250c6ac9 Reduce screen flickering when using color mode 2024-08-12 14:48:21 +02:00
Mark Dumay
54e0f720bd Merge pull request #1082 from gethinode/develop
Fix argument handling
2024-08-11 16:40:44 +02:00
Mark Dumay
423670f95f Merge branch 'main' into develop 2024-08-11 16:34:17 +02:00
Mark Dumay
78560aa07a Bump package release 2024-08-11 16:33:42 +02:00
Mark Dumay
1c6ff7ac55 Fix argument handling 2024-08-11 16:32:56 +02:00
Mark Dumay
eb9b7ea8f0 Include autotitle release 2024-08-11 16:32:29 +02:00
Mark Dumay
753b949af2 Merge pull request #1081 from gethinode/develop
Simplify blockquote specification
2024-08-11 16:06:46 +02:00
Mark Dumay
2322cdcdc0 Merge branch 'main' into develop 2024-08-11 16:00:22 +02:00
Mark Dumay
edc8128395 Simplify blockquote specification 2024-08-11 15:59:39 +02:00
Mark Dumay
cc22f73f5c Merge pull request #1080 from gethinode/develop
Improve handling of unspecified post date
2024-08-11 15:36:16 +02:00
Mark Dumay
8312de35c8 Merge branch 'main' into develop 2024-08-11 15:24:34 +02:00
Mark Dumay
a3a8d7e08c Improve handling of unspecified post date 2024-08-11 15:23:50 +02:00
Mark Dumay
0513692cf5 Merge pull request #1079 from gethinode/develop
Bump Netlify build environment
2024-08-11 13:38:19 +02:00
Mark Dumay
bfa6e00c2f Adjust Dart Sass version 2024-08-11 13:07:17 +02:00
Mark Dumay
c61fa6b4c7 Merge branch 'main' into develop 2024-08-11 12:55:20 +02:00
Mark Dumay
c754451002 Bump Netlify build environment 2024-08-11 12:54:06 +02:00
Mark Dumay
8d4cb82863 Merge pull request #1078 from gethinode/develop
Refactor YouTube shortcode
2024-08-11 12:45:47 +02:00
Mark Dumay
ae18134218 Merge branch 'main' into develop 2024-08-11 12:06:21 +02:00
Mark Dumay
fb20543d88 Refactor YouTube shortcode
Includes the following changes:
 - Add support to retrieve the YouTube title from the video metadata
 - Adjusts autoplay configuration
 - Improve argument handling
2024-08-11 12:05:48 +02:00
Mark Dumay
14d1489b60 Merge pull request #1077 from gethinode/develop
Update node test strategy
2024-08-11 12:05:38 +02:00
Mark Dumay
e99ac83fbc Merge branch 'main' into develop 2024-08-11 11:57:59 +02:00
Mark Dumay
d96b103180 Update node test strategy 2024-08-11 11:57:06 +02:00
Mark Dumay
7f1dc95402 Merge pull request #1076 from gethinode/develop
Fix handling of bool shortcode arguments
2024-08-11 11:55:24 +02:00
Mark Dumay
e3420e357c Merge branch 'main' into develop 2024-08-11 11:49:29 +02:00
Mark Dumay
5ee51ebb18 Fix handling of bool shortcode arguments 2024-08-11 11:38:31 +02:00
Mark Dumay
684ec0f823 Merge pull request #1072 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2024-08-11 07:17:25 +02:00
Dominik Oswald
5335e3d607 Update remove-selected-language.md 2024-08-09 19:46:09 +02:00
Dominik Oswald
3fc51e6158 Update remove-selected-language.md 2024-08-09 19:42:07 +02:00
Dominik Oswald
4a20e8beef fix lint erros 2024-08-09 17:21:44 +02:00
Dominik Oswald
163ac52332 Store and load the selected language 2024-08-09 16:27:07 +02:00
Dominik Oswald
176c5447a8 Merge branch 'gethinode:main' into main 2024-08-09 15:18:33 +02:00
markdumay
1a88fa93bb fix: update Hugo module dependencies 2024-08-08 03:05:46 +00:00
github-actions[bot]
b0d266aedc Merge pull request #1068 from gethinode/dependabot/npm_and_yarn/autoprefixer-10.4.20
Bump autoprefixer from 10.4.19 to 10.4.20
2024-08-05 13:48:58 +00:00
dependabot[bot]
eba81c236a Bump autoprefixer from 10.4.19 to 10.4.20
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.19 to 10.4.20.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.19...10.4.20)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 13:43:39 +00:00
github-actions[bot]
cdca92ea02 Merge pull request #1067 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.128.0
Bump hugo-bin from 0.127.0 to 0.128.0
2024-08-05 13:42:28 +00:00
dependabot[bot]
a4743aabf5 Bump hugo-bin from 0.127.0 to 0.128.0
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.127.0 to 0.128.0.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.127.0...v0.128.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 13:37:01 +00:00
Mark Dumay
cf8465e627 Merge pull request #1066 from gethinode/develop
Fix FlexSearch purge settings
2024-08-02 10:40:15 +02:00
Mark Dumay
86941f05d0 Merge branch 'main' into develop 2024-08-02 10:35:11 +02:00
Mark Dumay
cbb777f524 Fix FlexSearch purge settings 2024-08-02 10:32:38 +02:00
Mark Dumay
d20d00e42f Merge pull request #1065 from gethinode/develop
Support localization of script bundles
2024-08-02 09:55:56 +02:00
Mark Dumay
348981a1a0 Support localization of script bundles 2024-08-02 09:49:10 +02:00
Mark Dumay
0942d79e2c Merge pull request #1062 from gethinode/develop
Bump package release
2024-07-31 14:16:48 +02:00
Mark Dumay
0251bd1838 Merge branch 'main' into develop 2024-07-31 14:10:24 +02:00
Mark Dumay
ae5e240cf1 Bump package release 2024-07-31 14:09:58 +02:00
Mark Dumay
dd127b973a Merge pull request #1061 from gethinode/develop
Optimize image size of scrollable card group
2024-07-31 07:43:59 +02:00
Mark Dumay
63b186a2e5 Merge branch 'main' into develop 2024-07-31 07:13:44 +02:00
github-actions[bot]
bc71ba1d19 Merge pull request #1059 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.127.0
Bump hugo-bin from 0.126.0 to 0.127.0
2024-07-31 04:59:09 +00:00
Mark Dumay
9c3bd970a5 Merge branch 'main' into dependabot/npm_and_yarn/hugo-bin-0.127.0 2024-07-31 06:52:24 +02:00
Mark Dumay
9f143786af Optimize image size of scrollable card group 2024-07-31 06:51:52 +02:00
github-actions[bot]
e8ccada6f3 Merge pull request #1058 from gethinode/dependabot/npm_and_yarn/stylelint-16.8.1
Bump stylelint from 16.7.0 to 16.8.1
2024-07-30 14:07:33 +00:00
dependabot[bot]
a40092b1eb Bump hugo-bin from 0.126.0 to 0.127.0
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.126.0 to 0.127.0.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.126.0...v0.127.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 14:01:31 +00:00
dependabot[bot]
00965b5224 Bump stylelint from 16.7.0 to 16.8.1
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.7.0 to 16.8.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.7.0...16.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 14:01:24 +00:00
Mark Dumay
92dc97d325 Merge pull request #1056 from gethinode/develop
Add anchor support to cards
2024-07-29 17:33:12 +02:00
Mark Dumay
2394f148e5 Merge branch 'main' into develop 2024-07-29 17:11:42 +02:00
Mark Dumay
8d259a3e3a Add anchor support to cards 2024-07-29 17:10:32 +02:00
Mark Dumay
1c8912e92e Merge pull request #1055 from gethinode/develop
Support image crop box placement
2024-07-29 11:05:05 +02:00
Mark Dumay
207c08431f Merge branch 'main' into develop 2024-07-29 08:33:16 +02:00
Mark Dumay
d2703d4885 Support image crop box placement 2024-07-29 08:32:37 +02:00
Mark Dumay
4728191370 Merge pull request #1054 from gethinode/develop
Adjust card title size on small screens
2024-07-28 08:16:23 +02:00
Mark Dumay
cd40d75962 Merge branch 'main' into develop 2024-07-28 08:10:15 +02:00
Mark Dumay
2d4732d03b Adjust card title size on small screens 2024-07-28 08:09:35 +02:00
Mark Dumay
e3c256b41f Merge pull request #1053 from gethinode/develop
Fix priority of card's thumbnail and icon args
2024-07-28 08:07:35 +02:00
Mark Dumay
f0a53f252c Merge branch 'main' into develop 2024-07-27 14:35:48 +02:00
Mark Dumay
a1273d99d5 Fix priority of card's thumbnail and icon args 2024-07-27 14:35:17 +02:00
Mark Dumay
4e62956c82 Merge pull request #1052 from gethinode/develop
Fix layout of scrollable card group
2024-07-27 14:32:52 +02:00
Mark Dumay
cf096a7f6a Merge branch 'main' into develop 2024-07-27 14:13:47 +02:00
Mark Dumay
ee790dc6fd Fix layout of scrollable card group 2024-07-27 14:13:20 +02:00
Mark Dumay
df9bc9ed6c Merge pull request #1050 from gethinode/develop
Adjust main cover style
2024-07-25 07:23:58 +02:00
Mark Dumay
69338b4abf Merge branch 'main' into develop 2024-07-25 07:16:28 +02:00
Mark Dumay
c206054dc8 Adjust main cover style 2024-07-25 07:15:57 +02:00
Mark Dumay
a2bcba5916 Merge pull request #1043 from d-oit/patch-3
Add missing params.opengraph locale for fr_FR, nl_NL
2024-07-25 07:11:26 +02:00
d.o.it
788b68f6bc add missing config for the meta tag og:locale nl + fr 2024-07-24 21:22:43 +02:00
Dominik Oswald
73697f43aa Merge branch 'gethinode:main' into patch-3 2024-07-24 20:27:53 +02:00
Mark Dumay
129df382cd Merge pull request #1048 from gethinode/develop
Add maximized cover style
2024-07-24 16:32:36 +02:00
Mark Dumay
c15eb4edc3 Make style compatible with libsass 2024-07-24 16:27:00 +02:00
Mark Dumay
12725caa1c Merge branch 'main' into develop 2024-07-24 13:39:26 +02:00
Mark Dumay
6077c33fcc Add maximized cover style 2024-07-24 13:38:10 +02:00
Mark Dumay
b944d818c8 Merge pull request #1047 from gethinode/develop
Suppress undefined navbar links
2024-07-23 12:16:34 +02:00
Mark Dumay
f25fbb3440 Merge branch 'main' into develop 2024-07-23 11:55:18 +02:00
Mark Dumay
0b9d43f130 Suppress undefined navbar links 2024-07-23 11:54:47 +02:00
github-actions[bot]
884da31fd0 Merge pull request #1046 from gethinode/dependabot/npm_and_yarn/eslint-plugin-promise-6.6.0
Bump eslint-plugin-promise from 6.4.0 to 6.6.0
2024-07-22 14:03:48 +00:00
dependabot[bot]
6dbfb0ac64 Bump eslint-plugin-promise from 6.4.0 to 6.6.0
Bumps [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise) from 6.4.0 to 6.6.0.
- [Release notes](https://github.com/eslint-community/eslint-plugin-promise/releases)
- [Changelog](https://github.com/eslint-community/eslint-plugin-promise/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-community/eslint-plugin-promise/compare/v6.4.0...v6.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 13:57:31 +00:00
Mark Dumay
3bef9579b4 Merge branch 'main' into patch-3 2024-07-22 11:01:37 +02:00
Mark Dumay
0ea1f92d4c Merge pull request #1039 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2024-07-22 11:01:22 +02:00
Mark Dumay
77d44d44c6 Merge branch 'main' into hugo-mod-dependencies 2024-07-22 10:50:04 +02:00
Mark Dumay
e8c1eac2af Merge pull request #1045 from gethinode/develop
Suppress image container when wrapper class is empty
2024-07-22 10:49:51 +02:00
Mark Dumay
2f992b82cf Merge branch 'main' into develop 2024-07-22 10:44:15 +02:00
Mark Dumay
fe70b24859 Suppress image container when wrapper class is empty 2024-07-22 10:41:52 +02:00
Dominik Oswald
d18f0469fc Add missing params.opengraph locale for fr_FR, nl_NL
Add missing "params.opengraph" > "locale" for fr_FR, nl_NL instead of the default en_US:
<meta property="og:locale" content="en_US" /
2024-07-21 10:05:46 +02:00
markdumay
497c5d0e5e fix: update Hugo module dependencies 2024-07-21 03:05:30 +00:00
Mark Dumay
834435db00 Adjust warning for invalid local url 2024-07-20 07:01:13 +02:00
Mark Dumay
3d8195e24b Merge pull request #1042 from gethinode/develop
Validate local url of menu entries
2024-07-20 06:59:18 +02:00
Mark Dumay
ce31587f22 Merge branch 'main' into develop 2024-07-20 06:52:50 +02:00
Mark Dumay
6342ae1a33 Validate local url of menu entries 2024-07-20 06:51:49 +02:00
Dominik Oswald
1922fc825e Update mod-update.yml 2024-07-17 09:53:24 +02:00
Dominik Oswald
82f3837db1 Delete .github/workflows/hugo.yml 2024-07-13 20:23:42 +02:00
Dominik Oswald
69cf1ccf6c Create hugo.yml 2024-07-13 20:19:42 +02:00
103 changed files with 1735 additions and 571 deletions

View File

@@ -1,6 +1,8 @@
assets/js/critical/languageSelector.js
assets/js/critical/color.js
assets/js/analytics.js
assets/js/flexsearch.js
assets/js/navbar.js
assets/js/sharing.js
assets/js/vendor
node_modules

View File

@@ -43,7 +43,7 @@ jobs:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [18.x, 20.x]
node-version: [20.x, 22.x]
runs-on: ${{ matrix.os }}

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
/_vendor
_vendor/
public/
resources/
node_modules/

View File

@@ -61,32 +61,16 @@
})
window.addEventListener('DOMContentLoaded', () => {
setTheme(getTheme())
const light = (document.documentElement.getAttribute('data-bs-theme') === 'light')
document.querySelectorAll('.ball').forEach(ball => {
ball.classList.add('notransition');
})
document.querySelectorAll('.navbar-mode-selector').forEach(chk => {
chk.checked = light
chk.addEventListener('change', function () {
document.documentElement.setAttribute('data-bs-theme-animate', 'true')
toggleTheme()
})
})
document.querySelectorAll('.ball').forEach(ball => {
ball.offsetHeight; // flush css changes
ball.classList.remove('notransition');
})
})
window.addEventListener('load', () => {
const light = (document.documentElement.getAttribute('data-bs-theme') === 'light')
document.querySelectorAll('.navbar-mode-selector').forEach(chk => {
chk.checked = light
})
});
// initialize theme directly when script is invoked
setTheme(getTheme())
})()
{{- end -}}

View File

@@ -0,0 +1,65 @@
/* eslint-disable */
{{- if site.Params.main.enableLanguageSelectionStorage -}}
(() => {
'use strict'
// Function to get the selected language from localStorage
function getLanguage () {
return localStorage.getItem('selectedLanguage')
}
// Function to set the selected language in localStorage
function setLanguage (language) {
localStorage.setItem('selectedLanguage', language)
}
// Function to apply the selected language to the website
function applyLanguage (language, href) {
if (document.documentElement.lang !== language) {
if (href) {
if (window.location.pathname !== href) {
window.location.href = href
}
} else {
window.location.href = '/' + language + '/'
}
}
}
// Event listener for language selection
document.addEventListener('DOMContentLoaded', () => {
const storedLanguage = getLanguage()
const languageItems = document.querySelectorAll('#language-selector .dropdown-item')
if (languageItems.length > 0) {
// Redirect if the stored language differs from the active language
if ((storedLanguage) && (document.documentElement.lang !== storedLanguage)) {
languageItems.forEach(item => {
if (item.getAttribute('hreflang') === storedLanguage) {
applyLanguage(storedLanguage, item.getAttribute('href'))
}
})
}
// Update the stored language when the user selects a new one
languageItems.forEach(item => {
item.addEventListener('click', () => {
const selectedLanguage = item.getAttribute('hreflang')
if (selectedLanguage) {
setLanguage(selectedLanguage)
}
})
})
}
else {
// Redirect to the localized homepage
const defaultLang = '{{ site.LanguageCode | default site.Language.Lang }}'
let language = storedLanguage ? storedLanguage : defaultLang
window.location.href = '/' + language + '/'
}
})
})()
{{- end -}}
/* eslint-enable */

View File

@@ -1,3 +1,4 @@
const fixed = {{ site.Params.navigation.fixed }}
const navbar = document.querySelector('.navbar')
const togglers = document.querySelectorAll('.main-nav-toggler')
const modeSelectors = document.querySelectorAll('.switch-mode-collapsed')
@@ -11,13 +12,16 @@ function updateNavbar () {
} else {
navbar.classList.remove('nav-active')
const defaultTheme = navbar.getAttribute('data-bs-overlay')
navbar.setAttribute('data-bs-theme', defaultTheme)
if (defaultTheme) {
navbar.setAttribute('data-bs-theme', defaultTheme)
}
}
}
if ((navbar !== null) && (window.performance.getEntriesByType)) {
if (window.performance.getEntriesByType('navigation')[0].type === 'reload') {
updateNavbar()
fixed && updateNavbar()
}
}
@@ -29,7 +33,7 @@ if (navbar !== null && togglers !== null) {
attributeFilter: ['data-bs-theme']
}
const Observer = new MutationObserver((mutationrecords) => {
updateNavbar()
fixed && updateNavbar()
})
Observer.observe(html, config)
@@ -40,7 +44,7 @@ if (navbar !== null && togglers !== null) {
// set the navbar background color to opaque when scrolling past a breakpoint
window.onscroll = () => {
updateNavbar()
fixed && updateNavbar()
}
// set the navbar background color to opaque when expanded

3
assets/js/video.js Normal file
View File

@@ -0,0 +1,3 @@
document.querySelectorAll('[data-video-padding]').forEach(element => {
element.style.paddingBottom = element.getAttribute('data-video-padding')
})

View File

@@ -1,5 +1,5 @@
@if $enable-dark-mode {
body {
[data-bs-theme-animate="true"] body {
transition: background-color 0.5s, color 0.5s;
}
}
@@ -146,6 +146,24 @@ $utilities: map-merge(
}
}
.main-cover {
min-height: 100vh;
}
@include media-breakpoint-up(xxl) {
.main-cover {
min-height: calc(min(100vh, 1000px));
}
}
/* stylelint-disable media-feature-range-notation */
@media (min-height: 1400px) {
.main-cover {
min-height: calc(min(100vh, 1000px));
}
}
/* stylelint-enable media-feature-range-notation */
$utilities: map-merge(
$utilities,
(

View File

@@ -1,6 +1,54 @@
.blockquote {
// background: var(--bs-light);
border-left: 0.3rem solid;
border-color: $secondary;
padding: 1rem 1.5rem;
}
.blockquote-alert {
--bs-blockquote-alert-color: $secondary;
border-left: 0.3rem solid;
border-color: var(--bs-blockquote-alert-color);
padding: .5rem 1.5rem;
}
.blockquote-alert > p:nth-of-type(2) {
margin-bottom: 0;
}
.blockquote-alert-heading {
font-weight: bold;
color: var(--bs-blockquote-alert-color);
}
.blockquote-alert-caution {
--bs-blockquote-alert-color: var(--#{$prefix}danger);
}
.blockquote-alert-important {
--bs-blockquote-alert-color: var(--#{$prefix}primary);
}
.blockquote-alert-note {
--bs-blockquote-alert-color: var(--#{$prefix}info);
}
.blockquote-alert-tip {
--bs-blockquote-alert-color: var(--#{$prefix}success);
}
.blockquote-alert-warning {
--bs-blockquote-alert-color: var(--#{$prefix}warning);
}
.blockquote-alert a.btn-link {
--bs-link-color: var(--bs-blockquote-alert-color);
--bs-link-hover-color: color-mix(in srgb, var(--bs-link-color), black 20%);
color: var(--bs-link-color) !important;
&:hover,
&:focus {
color: var(--bs-link-hover-color) !important;
}
}

View File

@@ -44,4 +44,7 @@ a.btn {
.btn-link {
--bs-btn-padding-x: 0;
--bs-btn-padding-y: 0;
margin: 0 !important;
}

View File

@@ -5,11 +5,21 @@
background-color: var(--#{$prefix}secondary-bg);
}
.card-img-wrap {
.card .card-img-wrap {
overflow: hidden;
position: relative;
}
.card .card-img-wrap:has(.card-img-top) {
border-top-left-radius: var(--#{$prefix}card-inner-border-radius);
border-top-right-radius: var(--#{$prefix}card-inner-border-radius);
}
.card .card-img-wrap:has(.card-img-bottom) {
border-bottom-right-radius: var(--#{$prefix}card-inner-border-radius);
border-bottom-left-radius: var(--#{$prefix}card-inner-border-radius);
}
.card-zoom {
cursor: pointer;
}

View File

@@ -1,11 +1,81 @@
// stylelint-disable annotation-no-unknown
// adapted from https://www.codeply.com/p/UsTEwDkzNp#
.checkbox {
opacity: 0;
position: absolute;
}
.mode-switch {
--#{$prefix}mode-switch-width: 50px;
}
.mode-switch .label {
border-color: var(--#{$prefix}border-color);
border-style: solid;
border-width: 1px;
border-radius: var(--#{$prefix}mode-switch-width);
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
padding: 5px;
position: relative;
height: calc(1px + var(--#{$prefix}mode-switch-width) / 2);
width: var(--#{$prefix}mode-switch-width);
transform: scale(0.9);
}
.notransition {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
transition: none !important;
}
.mode-switch .label .ball {
background-color: var(--#{$prefix}border-color);
border-radius: 50%;
position: absolute;
top: 2px;
left: 2px;
height: calc((var(--#{$prefix}mode-switch-width) / 2) - 5px);
width: calc((var(--#{$prefix}mode-switch-width) / 2) - 5px);
transition: transform 0.2s linear;
}
.mode-switch .checkbox:checked + .label .ball {
transform: translateX(calc((var(--#{$prefix}mode-switch-width) / 2) - 1px));
}
@if $enable-dark-mode {
[data-bs-theme="light"] .mode-switch .ball {
transform: translateX(calc((var(--#{$prefix}mode-switch-width) / 2) - 1px));
}
}
.mode-switch .fa-moon {
color: $yellow;
transform: scale(0.8);
}
.mode-switch .fa-sun {
color: var(--#{$prefix}bs-body-color);
transform: scale(0.8);
}
// Source: https://jsfiddle.net/njhgr40m/
@if $enable-dark-mode {
[data-bs-theme-animate="true"] .navbar {
transition: 0.5s ease-in-out;
}
}
.navbar {
--bs-navbar-expanded-color: var(--bs-body-bg);
--bs-navbar-toggler-color: var(--bs-navbar-hover-color);
transition: 0.5s ease-in-out;
background-color: transparent;
@each $state, $val in $theme-colors {
@@ -22,6 +92,15 @@
margin: 0 .15rem;
}
.navbar-title {
display: inline-block;
white-space: normal;
text-align: center !important;
vertical-align: middle;
padding: 0 $spacer;
width: 100% !important;
}
.navbar-contrast .nav-link.active, .navbar-contrast .nav-link.show, .navbar-contrast .nav-link:hover {
border-bottom: solid 1px var(--bs-navbar-hover-color);
margin-bottom: -1px;
@@ -33,6 +112,16 @@
--bs-navbar-disabled-color: white !important;
--bs-navbar-active-color: white !important;
--bs-navbar-toggler-color: white;
.navbar-title, .mode-switch {
--#{$prefix}border-color: white;
color: white !important;
}
.mode-switch .fa-moon {
color: $white;
}
}
.navbar-expanded {
@@ -112,7 +201,7 @@
background-color: var(--bs-navbar-toggler-color);
}
.emphasis, .emphasis-dark, .emphasis-light {
.emphasis {
background-color: var(--bs-navbar-toggler-color);
}
@@ -133,15 +222,6 @@
--navbar-offset: #{$navbar-offset-xs};
}
.navbar-title {
display: inline-block;
white-space: normal;
text-align: center !important;
vertical-align: middle;
padding: 0 $spacer;
width: 100% !important;
}
.navbar-container {
width: 100% !important;
}
@@ -235,60 +315,7 @@
}
}
// adapted from https://www.codeply.com/p/UsTEwDkzNp#
.checkbox {
opacity: 0;
position: absolute;
}
.mode-switch {
--#{$prefix}mode-switch-width: 50px;
}
.mode-switch .label {
border-color: var(--#{$prefix}border-color);
border-style: solid;
border-width: 1px;
border-radius: var(--#{$prefix}mode-switch-width);
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
padding: 5px;
position: relative;
height: calc(1px + var(--#{$prefix}mode-switch-width) / 2);
width: var(--#{$prefix}mode-switch-width);
transform: scale(0.9);
}
.notransition {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
transition: none !important;
}
.mode-switch .label .ball {
background-color: var(--#{$prefix}secondary-bg);
border-radius: 50%;
position: absolute;
top: 2px;
left: 2px;
height: calc((var(--#{$prefix}mode-switch-width) / 2) - 5px);
width: calc((var(--#{$prefix}mode-switch-width) / 2) - 5px);
transition: transform 0.2s linear;
}
.mode-switch .checkbox:checked + .label .ball {
transform: translateX(calc((var(--#{$prefix}mode-switch-width) / 2) - 1px));
}
.mode-switch .fa-moon {
color: $yellow;
transform: scale(0.8);
}
.mode-switch .fa-sun {
color: var(--#{$prefix}bs-body-color);
transform: scale(0.8);
.navbar-overlay {
position: absolute;
z-index: $zindex-fixed;
}

View File

@@ -1,11 +1,11 @@
.youtube-embedded {
.video-embedded {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
}
.youtube-embedded > iframe {
.video-embedded > iframe {
position: absolute;
top: 0;
left: 0;

View File

@@ -95,7 +95,7 @@ home = ["HTML", "RSS", "REDIR"]
[module]
[module.hugoVersion]
extended = true
min = "0.120.0"
min = "0.132.0"
max = ""
[[module.mounts]]
source = "archetypes"
@@ -125,7 +125,7 @@ home = ["HTML", "RSS", "REDIR"]
[[module.imports]]
path = "github.com/gethinode/mod-bootstrap"
[[module.imports]]
path = "github.com/gethinode/mod-flexsearch"
path = "github.com/gethinode/mod-flexsearch/v2"
[[module.imports]]
path = "github.com/gethinode/mod-fontawesome"
[[module.imports]]

View File

@@ -24,9 +24,15 @@ defaultMarkdownHandler = "goldmark"
table = true
taskList = true
typographer = true
[goldmark.extensions.passthrough]
enable = true
[goldmark.extensions.passthrough.delimiters]
block = [['\[', '\]'], ['$$', '$$']]
inline = [['\(', '\)'], ['$', '$']]
[goldmark.parser]
autoHeadingID = true
autoHeadingIDType = 'github'
wrapStandAloneImageWithinParagraph = false
[goldmark.parser.attribute]
block = true
[goldmark.renderer]

View File

@@ -3,6 +3,7 @@
separator = "-"
description = "Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5."
enableDarkMode = true
enableLanguageSelectionStorage = false
modes = ["light", "dark"]
canonifyAssetsURLs = false
endorse = true
@@ -26,11 +27,24 @@
host = "imgix"
# toml-docs-end images
# toml-docs-start videos
[videos]
[videos.cloudinary]
host = "cloudinary"
account = "demo"
[videos.vimeo]
host = "vimeo"
[videos.youtube]
host = "youtube"
# toml-docs-end videos
# toml-docs-start debugging
[debugging]
showJS = false
showSCSS = false
purgeHTMLComments = false
includeSVGOrigin = true
# toml-docs-end debugging
# toml-docs-start docs
@@ -170,16 +184,16 @@
# linkedIn = ""
github = "https://github.com/gethinode/hinode"
section = "blog"
[author]
[schema.author]
name = "Mark Dumay"
# twitter = "https://twitter.com/markdumay"
linkedin = "https://www.linkedin.com/in/markdumay/"
github = "https://github.com/markdumay"
[logo]
[schema.logo]
url = "img/logo512x512.png"
width = 512
height = 512
[image]
[schema.image]
url = "img/logo1280x640.png"
width = 1280
height = 640

View File

@@ -14,7 +14,7 @@ for = '/**'
connect-src 'self'
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
font-src 'self' https://fonts.gstatic.com; \
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
frame-src 'self' https://player.cloudinary.com https://player.vimeo.com https://www.youtube-nocookie.com https://www.youtube.com; \
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
manifest-src 'self'; \
media-src 'self' \
@@ -29,7 +29,6 @@ for = '/**'
camera=(), \
magnetometer=(), \
gyroscope=(), \
fullscreen=(), \
payment=() \
"""
cache-control = """\

View File

@@ -24,7 +24,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
'./assets/scss/components/_video.scss',
'./assets/scss/theme/fonts.scss',
'./assets/scss/theme/theme.scss',
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
'./_vendor/github.com/gethinode/mod-flexsearch/v2/assets/scss/modules/flexsearch/flexsearch.scss',
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
'./_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss',
'./_vendor/github.com/gethinode/mod-simple-datatables/dist/simple-datatables.scss',

View File

@@ -271,6 +271,25 @@ arguments:
One or more strings separated by commas, indicating the source sizes of an
image set.
group: partial
anchor:
type: select
optional: true
comment:
Anchor of the thumbnail's crop box, defaults to anchor value set in
`imaging` section of the site configuration (usually `Smart`).
options:
values:
- TopLeft
- Top
- TopRight
- Left
- Center
- Right
- BottomLeft
- Bottom
- BottomRight
- Smart
release: v0.24.23
body:
optional: true
comment: >-

View File

@@ -60,3 +60,20 @@ arguments:
type: int
optional: false
comment: Width of the image in pixels.
anchor:
type: select
optional: true
comment: Anchor of the crop box.
options:
values:
- TopLeft
- Top
- TopRight
- Left
- Center
- Right
- BottomLeft
- Bottom
- BottomRight
- Smart

View File

@@ -36,6 +36,7 @@ arguments:
page:
type:
- '*hugolib.pageState'
- '*hugolib.pageForRenderHooks'
- '*hugolib.pageForShortcode'
optional: true
comment: Page context, used to match page resources.
@@ -109,7 +110,9 @@ arguments:
image set.
group: partial
title:
type: string
type:
- string
- 'hstring.RenderedString'
optional: true
comment: Alternate text of the image.
caption:
@@ -138,3 +141,22 @@ arguments:
Flag to indicate if the image should render a plain image instead of an
image set. When set, no transformations are applied to the image.
release: v0.24.0
anchor:
type: select
optional: true
comment:
Anchor of the crop box, defaults to anchor value set in `imaging` section
of the site configuration (usually `Smart`).
options:
values:
- TopLeft
- Top
- TopRight
- Left
- Center
- Right
- BottomLeft
- Bottom
- BottomRight
- Smart
release: v0.24.22

View File

@@ -10,6 +10,7 @@ arguments:
page:
type:
- '*hugolib.pageState'
- '*hugolib.pageForRenderHooks'
- '*hugolib.pageForShortcode'
optional: false
group: partial
@@ -70,11 +71,17 @@ arguments:
type:
- string
- template.HTML
- hstring.RenderedString
optional: true
group: partial
comment: Link description.
title:
type: string
optional: true
comment: Link title.
release: v0.26.0
body:
type: string
optional: true
group: shortcode
comment: Link title.
comment: Link description.

View File

@@ -38,3 +38,12 @@ arguments:
optional: true
default: false
comment: Flag to render the release button inline.
type:
type: select
optional: true
default: button
comment: Type of the element.
options:
values:
- link
- button

View File

@@ -0,0 +1,69 @@
comment: >-
Bundles a JavaScript file for client-side processing. Scripts can be included
as critical, core, or optional file.
arguments:
page:
type:
- '*hugolib.pageState'
- '*hugolib.pageForShortcode'
optional: false
comment: Context of the current page.
core:
type: bool
default: false
optional: true
comment: >-
Trigger to include all core files in the script bundle. Core bundles are
loaded asynchronously in each page of the site.
filename:
type: string
default: js/main.bundle.js
optional: true
comment: >-
Path of the target bundle file, relative to the site root.
match:
type: string
default: {js/*.js,js/vendor/**.js}
optional: true
comment: >-
Regular expression that defines the pattern of source files to be included
in the bundle. The pattern is relative to the project's `asset` folder.
header:
type: bool
default: false
comment: >-
Trigger to consider the script as loaded in the page header. When enabled,
it includes a script to load Google Analytics adjacent to any bundle
input.
localize:
type: bool
default: false
optional: true
comment: >-
Triggers the creation of a language-specific bundle file. The language
code is appended as suffix to the base name. For example, the English
version of `js/main.bundle.js` becomes `js/main.bundle.en.js`.
skipTemplate:
type: bool
default: false
optional: true
comment: >-
Script source input can contain Go Template magic. As such, Hinode
processes all input files with `resources.ExecuteAsTemplate`. However,
certain input files may be incompatible. Set `skipTemplate` to true to
skip template processing.
state:
type: select
optional: true
default: async
comment: >-
Defines the loading behavior of the script bundle. By default, scripts are
processed in the background and loaded when ready (`async`). Set the state
to `immediate` to load the script immediately (such as critical scripts).
Use 'defer' to load the script in relative order when the DOM is fully
built.
options:
values:
- async
- defer
- immediate

95
data/structures/video.yml Normal file
View File

@@ -0,0 +1,95 @@
comment: >-
Embeds a responsive video player for supported video providers. The video is
embedded in a responsive frame.
arguments:
page:
type:
- '*hugolib.pageState'
- '*hugolib.pageForShortcode'
optional: false
group: partial
release: v0.26.5
comment: Context of the current page.
position:
type:
- 'text.Position'
optional: true
group: partial
release: v0.26.5
comment: Filename and position from which the shortcode was called.
host:
type: string
optional: true
default: youtube
release: v0.26.5
comment: >-
Host name of the video provider. It should match one of the registered
providers in the site's parameters under `videos`.
title:
type: string
optional: true
comment: >-
Title of the video.
class:
type: string
optional: true
position: 1
comment: >-
Class attribute of the video wrapper element.
id:
type: string
optional: false
position: 0
comment: Public identifier of the video to be embedded.
account:
type: string
optional: true
comment: >-
Account name of the video asset, required by some digital asset managers.
You can also set the default account name in the site's parameters. For
example, the following configuration sets the default account name for
videos hosted by Cloudinary:
```toml
[videos.cloudinary]
account = "demo"
```
release: v0.26.5
autoplay:
type: bool
optional: true
default: false
comment: >-
Flag indicating the video should start playing immediately when loaded, if
supported by the browser. The audio will be muted.
autotitle:
type: bool
optional: true
default: false
release: v0.25.2
comment: >-
Trigger to retrieve the title from the video metadata, if supported by the
provider.
ratio:
type: select
optional: true
comment: >-
Ratio of the video. If set, determines the padding of the embedded video
frame. When not specified, the video dimensions used to calculate the
padding are retrieved programmatically.
options:
values:
- 1x1
- 3x2
- 4x3
- 16x9
- 21x9
release: v0.26.5
portrait:
type: bool
optional: true
default: false
comment: >-
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
graphics.
release: v0.26.5

View File

@@ -1,26 +0,0 @@
comment: >-
Embeds a responsive video player for YouTube videos. Only the ID of the video
is required. In privacy-enhanced mode, YouTube will not store information
about visitors on your website unless the user plays the embedded video.
arguments:
title:
type: string
optional: true
comment: >-
Title of the video.
class:
type: string
optional: true
position: 1
comment: >-
Class attribute of the video wrapper element.
id:
type: string
optional: false
position: 0
comment: Identifier of the video to be embedded.
autoplay:
type: bool
optional: true
default: false
comment: Flag indicating the video should start playing immediately when loaded.

View File

@@ -1,4 +1,5 @@
/_vendor
_vendor/
exampleSite/public/
public/
resources/

View File

@@ -22,6 +22,8 @@ reference = "More Projects"
languageName = "Nederlands"
contentDir = "content/nl"
weight = 2
[nl.params.opengraph]
locale = "nl_NL"
[nl.params.head]
tagline = "Een Hugo Thema"
[nl.params.social]
@@ -39,6 +41,8 @@ reference = "Meer projecten"
languageName = "Français"
contentDir = "content/fr"
weight = 2
[fr.params.opengraph]
locale = "fr_FR"
[fr.params.head]
tagline = "Un thème Hugo"
[fr.params.social]

View File

@@ -24,9 +24,15 @@ defaultMarkdownHandler = "goldmark"
table = true
taskList = true
typographer = true
[goldmark.extensions.passthrough]
enable = true
[goldmark.extensions.passthrough.delimiters]
block = [['\[', '\]'], ['$$', '$$']]
inline = [['\(', '\)'], ['$', '$']]
[goldmark.parser]
autoHeadingID = true
autoHeadingIDType = 'github'
wrapStandAloneImageWithinParagraph = false
[goldmark.parser.attribute]
block = true
[goldmark.renderer]

View File

@@ -2,6 +2,7 @@
separator = "-"
description = "Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5."
enableDarkMode = true
enableLanguageSelectionStorage = true
modes = ["light", "dark"]
canonifyAssetsURLs = false
footerBelowFold = false
@@ -17,6 +18,7 @@
showJS = false
showSCSS = false
purgeHTMLComments = true # prevents a Goldmark warning when processing HTML comments (as used by markdownlint)
includeSVGOrigin = true
[docs]
basePath = "/" # TODO: replace
@@ -163,16 +165,16 @@
# linkedIn = ""
github = "https://github.com/gethinode/hinode"
section = "blog"
[author]
[schema.author]
name = "Mark Dumay"
# twitter = "https://twitter.com/markdumay"
linkedin = "https://www.linkedin.com/in/markdumay/"
github = "https://github.com/markdumay"
[logo]
[schema.logo]
url = "img/logo512x512.png"
width = 512
height = 512
[image]
[schema.image]
url = "img/logo1280x640.png"
width = 1280
height = 640

View File

@@ -14,7 +14,7 @@ for = '/**'
connect-src 'self'
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
font-src 'self' https://fonts.gstatic.com; \
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \
frame-src 'self' https://player.cloudinary.com https://player.vimeo.com https://www.youtube-nocookie.com https://www.youtube.com; \
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
manifest-src 'self'; \
media-src 'self' \
@@ -29,7 +29,6 @@ for = '/**'
camera=(), \
magnetometer=(), \
gyroscope=(), \
fullscreen=(), \
payment=() \
"""
cache-control = """\

View File

@@ -24,7 +24,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
'./_vendor/github.com/gethinode/hinode/assets/scss/components/_video.scss',
'./_vendor/github.com/gethinode/hinode/assets/scss/theme/fonts.scss',
'./_vendor/github.com/gethinode/hinode/assets/scss/theme/theme.scss',
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
'./_vendor/github.com/gethinode/mod-flexsearch/v2/assets/scss/modules/flexsearch/flexsearch.scss',
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
'./_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss',
'./_vendor/github.com/twbs/bootstrap/scss/_carousel.scss',

View File

@@ -27,6 +27,6 @@ Additional features include:
* Reusable Bootstrap components through configurable shortcodes and partials
* Versioned documentation, including sidebar navigation and version switcher
* Responsive image handling for multiple screen sizes and resolutions
* 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" >}})
* 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" %}})
{.tickmark}

View File

@@ -12,7 +12,7 @@ thumbnail:
originURL: https://unsplash.com/photos/QLPWQvHvmII
---
Hinode provides several shortcodes that wrap common Bootstrap components. Refer to the [official documentation]({{< param "links.hinode_docs" >}}) for more details.
Hinode provides several shortcodes that wrap common Bootstrap components. Refer to the [official documentation]({{% param "links.hinode_docs" %}}) for more details.
## Abbr
@@ -121,7 +121,7 @@ As an example, the following shortcode displays a group of three buttons.
## Card
As an example, the following shortcode displays a stacked card that links to the [about]({{< ref "about" >}}) page. It includes a custom header.
As an example, the following shortcode displays a stacked card that links to the [about]({{% ref "about" %}}) page. It includes a custom header.
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
@@ -264,6 +264,13 @@ As an example, the following shortcode displays an image with rounded corners an
{{< /example >}}
<!-- markdownlint-enable MD037 -->
The same image, but then using Markdown syntax:
{{< example lang="hugo" >}}
![Flowers](/img/flowers.jpg "Figure caption")
{class="rounded col-md-6" ratio="4x3" portrait=true wrapper="text-center"}
{{< /example >}}
As an example, the following shortcode displays a regular vector image.
<!-- markdownlint-disable MD037 -->
@@ -466,3 +473,33 @@ As an example, the following shortcode displays a tooltip for a colored hyperlin
{{</* tooltip color="primary" title="Tooltip caption" href="#!" */>}}Tooltip{{</* /tooltip */>}} demonstration
{{< /example >}}
<!-- markdownlint-enable MD037 -->
## Video
As an example, the following shortcode displays an Elephants video hosted by Cloudinary.
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* video host="cloudinary" account="demo" id="elephants" autoplay=true */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->
## Vimeo
As an example, the following shortcode displays a Vimeo video.
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* vimeo id="55073825" autoplay=true autotitle=true */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->
## Youtube
As an example, the following shortcode displays a Hugo quickstart guide.
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* youtube id="w7Ft2ymGmfc" autoplay=true autotitle=true */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

View File

@@ -10,10 +10,10 @@ thumbnail:
authorURL: https://unsplash.com/@ryoji__iwata
origin: Unsplash
originURL: https://unsplash.com/photos/5siQcvSxCP8
modules: ["katex", "leaflet", "lottie", "simple-datatables"]
modules: ["leaflet", "lottie", "simple-datatables"]
---
Hinode provides several shortcodes on top of the common [Bootstrap elements]({{< relref "bootstrap-elements" >}}). Refer to the [official documentation]({{< param "links.hinode_docs" >}}) for more details.
Hinode provides several shortcodes on top of the common [Bootstrap elements]({{% relref "bootstrap-elements" %}}). Refer to the [official documentation]({{% param "links.hinode_docs" %}}) for more details.
## Animation
@@ -70,7 +70,7 @@ As an example, the following shortcode displays a responsive table that uses adv
## Formula (KaTeX)
As an example, the following markdown renders two formulas using the KaTeX typesetting library.
As an example, the following markdown renders two formulas using server-side math rendering using KaTeX.
{{< example lang="markdown" >}}
This is an inline $-b \pm \sqrt{b^2 - 4ac} \over 2a$ formula

View File

@@ -26,7 +26,7 @@ As an example, the following shortcode displays an image with rounded corners an
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* image src="https://ik.imagekit.io/demo/default-image.jpg"
ratio="21x9" caption="ImageKit.io image" class="rounded" */>}}
ratio="21x9" caption="ImageKit.io image" class="rounded" anchor="Center" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->
@@ -37,6 +37,6 @@ As an example, the following shortcode displays an image with rounded corners an
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* image src="https://assets.imgix.net/examples/bluehat.jpg"
ratio="21x9" caption="imgix image" class="rounded" */>}}
ratio="21x9" caption="imgix image" class="rounded" anchor="Top" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

View File

@@ -28,6 +28,6 @@ Les fonctionnalités supplémentaires incluent:
- Composants bootstrap réutilisables à travers des codes et partiels configurables
- Documentation versionnée, incluant une navigation latérale et un sélecteur de version.
- 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" >}}).
- Sécurisé par défaut, obtenant un score A+ au test [Mozilla Observatory]({{< param "links.observatory" >}})
- 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" %}})
{.tickmark}

View File

@@ -13,7 +13,7 @@ thumbnail:
originURL: https://unsplash.com/photos/QLPWQvHvmII
---
Hinode propose plusieurs shortcodes qui enveloppent des composants Bootstrap courants. Consultez la [documentation officielle]({{< param "links.hinode_docs" >}}) pour plus de détails.
Hinode propose plusieurs shortcodes qui enveloppent des composants Bootstrap courants. Consultez la [documentation officielle]({{% param "links.hinode_docs" %}}) pour plus de détails.
## Abbr
@@ -121,7 +121,7 @@ En-tête 6 {{</* badge title="Nouveau" */>}}
## Carte
À titre d'exemple, le shortcode suivant affiche une carte empilée qui renvoie à la page [à propos]({{< ref "about" >}}). Elle inclut un en-tête personnalisé.
À titre d'exemple, le shortcode suivant affiche une carte empilée qui renvoie à la page [à propos]({{% ref "about" %}}). Elle inclut un en-tête personnalisé.
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}

View File

@@ -14,7 +14,7 @@ thumbnail:
modules: ["katex", "leaflet", "lottie"]
---
Hinode propose plusieurs shortcodes en plus des [éléments Bootstrap]({{< relref "bootstrap-elements" >}}) courants. Consultez la [documentation officielle]({{< param "links.hinode_docs" >}}) pour plus de détails.
Hinode propose plusieurs shortcodes en plus des [éléments Bootstrap]({{% relref "bootstrap-elements" %}}) courants. Consultez la [documentation officielle]({{% param "links.hinode_docs" %}}) pour plus de détails.
## Animation

View File

@@ -29,6 +29,6 @@ Overige functies:
* Herbruikbare Bootstrap componenten via shortcodes en partials
* Versiebeheer van documentatiepagina's, inclusief secundaire navigatie en selectie van versies
* Optimalisering van foto's voor meerdere schermafmetingen en resoluties
* 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" >}})
* 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" %}})
{.tickmark}

View File

@@ -3,8 +3,8 @@
"tags": [
"a",
"abbr",
"annotation",
"body",
"br",
"button",
"code",
"div",
@@ -15,18 +15,28 @@
"form",
"h2",
"h3",
"h5",
"head",
"hr",
"html",
"i",
"iframe",
"img",
"input",
"label",
"li",
"link",
"mark",
"math",
"meta",
"mfrac",
"mi",
"mn",
"mo",
"mrow",
"mspace",
"msqrt",
"msub",
"msup",
"nav",
"noscript",
"ol",
@@ -34,12 +44,14 @@
"path",
"pre",
"script",
"semantics",
"small",
"span",
"strong",
"sub",
"sup",
"svg",
"symbol",
"table",
"tbody",
"td",
@@ -185,7 +197,6 @@
"dropdown-menu-end",
"dropdown-toggle",
"emphasis",
"emphasis-dark",
"end-0",
"fa",
"fa-10x",
@@ -239,6 +250,7 @@
"fs-3",
"fs-5",
"fs-6",
"fs-lg-5",
"fs-md-5",
"fw-30",
"fw-bold",
@@ -267,6 +279,7 @@
"justify-content-center",
"justify-content-end",
"justify-content-start",
"katex",
"label",
"lead",
"leaflet-map",
@@ -299,6 +312,7 @@
"mt-4",
"mt-5",
"mt-auto",
"mt-md-0",
"multi-docs-collapse-15",
"multi-file-collapse-1",
"mx-auto",
@@ -328,11 +342,6 @@
"navbar-toggler",
"next",
"no-js",
"offcanvas",
"offcanvas-body",
"offcanvas-header",
"offcanvas-start",
"offcanvas-title",
"order-0",
"order-1",
"order-first",
@@ -464,6 +473,7 @@
"top-bar",
"translate-middle",
"translate-middle-y",
"video-embedded",
"visually-hidden",
"vr",
"w-100",
@@ -505,11 +515,42 @@
"collapse",
"collapse-1",
"command-prompt",
"custom-activity",
"data-tables",
"docs",
"documentation",
"example",
"exemple",
"fa-face-frown",
"fa-square-check",
"fab-bootstrap",
"fab-docker",
"fab-facebook",
"fab-github",
"fab-linkedin",
"fab-medium",
"fab-whatsapp",
"fab-x-twitter",
"fas-angle-left",
"fas-angle-right",
"fas-angles-left",
"fas-angles-right",
"fas-arrow-left",
"fas-arrow-right",
"fas-circle-check",
"fas-code",
"fas-ellipsis",
"fas-globe",
"fas-heart",
"fas-house",
"fas-link",
"fas-magnifying-glass",
"fas-moon",
"fas-rocket",
"fas-share-nodes",
"fas-sort",
"fas-sun",
"fas-up-right-from-square",
"fichier",
"fil-dariane",
"file",
@@ -526,6 +567,7 @@
"indicateur-de-chargement",
"infobulle",
"invite-de-commandes",
"language-selector",
"leaflet-map-0",
"lien",
"link",
@@ -547,8 +589,6 @@
"navbar-sample-collapse",
"navigation",
"notification",
"offcanvas-label",
"offcanvass-sidebar",
"persona",
"projecten",
"projects",
@@ -568,7 +608,10 @@
"toast-example-2",
"toast-message-email-4",
"toc-collapse",
"tooltip"
"tooltip",
"video",
"vimeo",
"youtube"
]
}
}

18
go.mod
View File

@@ -4,14 +4,14 @@ go 1.19
require (
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
github.com/gethinode/mod-bootstrap v1.3.0 // indirect
github.com/gethinode/mod-flexsearch v1.12.0 // indirect
github.com/gethinode/mod-fontawesome v1.9.0 // indirect
github.com/gethinode/mod-katex v1.1.0 // indirect
github.com/gethinode/mod-leaflet v1.1.0 // indirect
github.com/gethinode/mod-lottie v1.5.5 // indirect
github.com/gethinode/mod-simple-datatables v1.0.2 // indirect
github.com/gethinode/mod-utils/v2 v2.3.10 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 // indirect
github.com/gethinode/mod-bootstrap v1.3.1 // indirect
github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect
github.com/gethinode/mod-fontawesome v1.10.0 // indirect
github.com/gethinode/mod-katex v1.1.2 // indirect
github.com/gethinode/mod-leaflet v1.1.1 // indirect
github.com/gethinode/mod-lottie v1.5.6 // indirect
github.com/gethinode/mod-simple-datatables v1.0.7 // indirect
github.com/gethinode/mod-utils/v2 v2.4.0 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
)

30
go.sum
View File

@@ -22,6 +22,8 @@ github.com/gethinode/mod-bootstrap v1.2.8 h1:kIKSO6qqE8xA0KQC5s6kkEv5UDc8oT17Hal
github.com/gethinode/mod-bootstrap v1.2.8/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
github.com/gethinode/mod-bootstrap v1.3.0 h1:UxNmXgXo7gA8C8z1ar47+tSccmKYpaYBBN+txB0pwBk=
github.com/gethinode/mod-bootstrap v1.3.0/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
github.com/gethinode/mod-bootstrap v1.3.1 h1:ZUX72St0WZ5tyXpEPBJlayX/dmCH3cGErzsozkUKCok=
github.com/gethinode/mod-bootstrap v1.3.1/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
github.com/gethinode/mod-flexsearch v1.0.1 h1:FJkRsUzSnQTXl3MWCigT4E6vfff870UWTnkGqaDGIhA=
github.com/gethinode/mod-flexsearch v1.0.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
github.com/gethinode/mod-flexsearch v1.1.0 h1:7BCMyQDlYlskNXuazt8Jg/jg9WREexu2xVkYqThkAX4=
@@ -68,6 +70,10 @@ github.com/gethinode/mod-flexsearch v1.11.3 h1:ykxpUg8M4vr1C4QzxJOPGt+1ZmPAD/gOC
github.com/gethinode/mod-flexsearch v1.11.3/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
github.com/gethinode/mod-flexsearch v1.12.0 h1:zg1IHvc8VO9WEtQuQnuG6HeWFNByvyqC9JYWDtpsP6s=
github.com/gethinode/mod-flexsearch v1.12.0/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
github.com/gethinode/mod-flexsearch v1.12.1 h1:clkGUWaNPe9Dt/66Apy7oH9NwVQfnD6OpGSLffeC9sY=
github.com/gethinode/mod-flexsearch v1.12.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ=
github.com/gethinode/mod-flexsearch/v2 v2.0.1 h1:5unGUSb1tX1LBtKygnLfdt7CnVJuFKSt6VXiKRxdojc=
github.com/gethinode/mod-flexsearch/v2 v2.0.1/go.mod h1:d7MMkVlz0l6cEk76e0mkveEsDxGfu5Sv+HUIhoGguhE=
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.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=
@@ -108,6 +114,10 @@ github.com/gethinode/mod-fontawesome v1.8.2 h1:LAzLytyh9c9gLzBWMju6Gtp3uEojhBQEY
github.com/gethinode/mod-fontawesome v1.8.2/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
github.com/gethinode/mod-fontawesome v1.9.0 h1:xqUB8AnezMHAt8lye4ksqvmHSVPCOkiHsHGUbqNoeP0=
github.com/gethinode/mod-fontawesome v1.9.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
github.com/gethinode/mod-fontawesome v1.9.1 h1:cQk84vriqffM4fuUUoM9j3SSD+3ppeW2j4ta7AiToMU=
github.com/gethinode/mod-fontawesome v1.9.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
github.com/gethinode/mod-fontawesome v1.10.0 h1:Izs2AKc+YVBa1TywcH54OKLTNCUMXRoFIqOs+n0FgOo=
github.com/gethinode/mod-fontawesome v1.10.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y=
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.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
@@ -128,6 +138,10 @@ github.com/gethinode/mod-katex v1.0.9 h1:cCJoR28tZwkDvXps17o9Jwfe3aQQAZ3Rxk0jCNR
github.com/gethinode/mod-katex v1.0.9/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.1.0 h1:PxST3HPUt6F2X/xKakTVeTkwWqCtEr53K1vYEOyQu3I=
github.com/gethinode/mod-katex v1.1.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.1.1 h1:z8+mfVI6UTWcfpQMVPIzxQzt6Lp9BcmXxSOILQ84qFg=
github.com/gethinode/mod-katex v1.1.1/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.1.2 h1:TbeVIWeG5TqldlVxpM1upOWj11RljXy4fhpOQIwOnS4=
github.com/gethinode/mod-katex v1.1.2/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-leaflet v0.2.3 h1:QQI4h+IH0jZ7fx4q0um2YIEiYBoW3OAfW8qHzbRCDPk=
github.com/gethinode/mod-leaflet v0.2.3/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
github.com/gethinode/mod-leaflet v0.3.1 h1:H5MaOa+BB1KuVw7abTqfIn/SNzzRsAyx/WQoSe+2Ykc=
@@ -146,6 +160,8 @@ github.com/gethinode/mod-leaflet v1.0.1 h1:L4Coe6HTD9O0Txs1S8AtVg+6/TEneSF9i6fJK
github.com/gethinode/mod-leaflet v1.0.1/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
github.com/gethinode/mod-leaflet v1.1.0 h1:FXzPCic5XmUluxQ6e7LYUhhLnxuQOBwry8qjG9k30UY=
github.com/gethinode/mod-leaflet v1.1.0/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
github.com/gethinode/mod-leaflet v1.1.1 h1:AIHR4k8SjmeoZxtjLgSS6/N3jKeZNZGdZTgu/7MwP4c=
github.com/gethinode/mod-leaflet v1.1.1/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE=
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.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
@@ -184,10 +200,20 @@ github.com/gethinode/mod-lottie v1.5.4 h1:+xbamSsjcnP2tyzGl0CA1enma7gkAp67wenmuP
github.com/gethinode/mod-lottie v1.5.4/go.mod h1:gALqz48aYpoDLxJOI3LzIpdy0Eq/lOBNtlcOxABa9tg=
github.com/gethinode/mod-lottie v1.5.5 h1:uEJKsz+ovsZtbGkMhPONcIhtG6M3RjYiK+iVoScLOVo=
github.com/gethinode/mod-lottie v1.5.5/go.mod h1:VTvBxD8VokICwnEqM0VUZFZHBYxLf4/grDFQyEh1DL0=
github.com/gethinode/mod-lottie v1.5.6 h1:dxz5nmD0XXEt/DAOc1s5fIPynj5bhzDL32EEwLFCSmk=
github.com/gethinode/mod-lottie v1.5.6/go.mod h1:VTvBxD8VokICwnEqM0VUZFZHBYxLf4/grDFQyEh1DL0=
github.com/gethinode/mod-simple-datatables v1.0.0 h1:Dj4WGw12OkaimwkCpLn5Jhmd49dvNJW9O2P/W9F+HlQ=
github.com/gethinode/mod-simple-datatables v1.0.0/go.mod h1:K8T7fIdb8pMOB+OSW4A5lz5IW99+HyzcTgx764fvOGw=
github.com/gethinode/mod-simple-datatables v1.0.2 h1:zhqxHet3iLQWYCBbGROALpOY9zQlptMycFkz1Tto5bA=
github.com/gethinode/mod-simple-datatables v1.0.2/go.mod h1:mmrcvAJU2i3SMU56VmQ5PW43uDXBcsJKcZwCHrvl3Kc=
github.com/gethinode/mod-simple-datatables v1.0.3 h1:JL2nBlEHWMmkE7EZrpfpmzka47dklJUh23/xKJkOQoI=
github.com/gethinode/mod-simple-datatables v1.0.3/go.mod h1:mmrcvAJU2i3SMU56VmQ5PW43uDXBcsJKcZwCHrvl3Kc=
github.com/gethinode/mod-simple-datatables v1.0.5 h1:2Aa4k1Bd1WEYHbskFQj+1X35BB7abB8RXHE7Uk2N4pg=
github.com/gethinode/mod-simple-datatables v1.0.5/go.mod h1:mmrcvAJU2i3SMU56VmQ5PW43uDXBcsJKcZwCHrvl3Kc=
github.com/gethinode/mod-simple-datatables v1.0.6 h1:voKiwLAfC7kfD+atv7ah0sOf8OcPRyxEB/Q92gx1d00=
github.com/gethinode/mod-simple-datatables v1.0.6/go.mod h1:Y7AzIYAWpzDKLvH96eqBA/Gs3jompWCgxadLuoKZ/rc=
github.com/gethinode/mod-simple-datatables v1.0.7 h1:pfxWhgmn/njJcynNIDnUyeOBW0tsy2E4TP21sEYsqRs=
github.com/gethinode/mod-simple-datatables v1.0.7/go.mod h1:Y7AzIYAWpzDKLvH96eqBA/Gs3jompWCgxadLuoKZ/rc=
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/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
@@ -234,12 +260,16 @@ github.com/gethinode/mod-utils/v2 v2.3.9 h1:Z9uAr6S0wunlkfKHa2D/U83fBV6Ivtf+7sjB
github.com/gethinode/mod-utils/v2 v2.3.9/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
github.com/gethinode/mod-utils/v2 v2.3.10 h1:+coUXdgAbLEE8Tvb3Rfk/1Nr6oDVreXI2sil0pa/n2Q=
github.com/gethinode/mod-utils/v2 v2.3.10/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
github.com/gethinode/mod-utils/v2 v2.4.0 h1:mmG4hWaeA4krAg933pibH+TrjFmPHkAi/DUbe3SM38I=
github.com/gethinode/mod-utils/v2 v2.4.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
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-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 h1:H6xa5YyCHr78M+qqCApM4Kvz/eMA7pfGskYmfkEBRCA=
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 h1:6PNbL0/LxO8Xl8MZSe5uvCidYNpFTz9nlWTqj2qdlzA=
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
github.com/twbs/bootstrap v5.3.2+incompatible h1:tuiO5acc6xnZUR77Sbi5aKWXxjYxbmsSbJwYrhAKoQQ=
github.com/twbs/bootstrap v5.3.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.3.3+incompatible h1:goFoqinzdHfkeegpFP7pvhbd0g+A3O2hbU3XCjuNrEQ=

View File

@@ -16,6 +16,7 @@
"link",
"meta",
"nav",
"noscript",
"ol",
"p",
"path",
@@ -24,8 +25,10 @@
"span",
"strong",
"svg",
"symbol",
"title",
"ul"
"ul",
"use"
],
"classes": [
"active",
@@ -36,6 +39,7 @@
"bg-body",
"bg-opacity-10",
"bg-primary",
"border-0",
"bottom-0",
"bottom-bar",
"breadcrumb",
@@ -43,10 +47,19 @@
"btn",
"btn-close",
"btn-primary",
"btn-social",
"card",
"card-body",
"card-body-link",
"card-text",
"card-title",
"card-zoom",
"checkbox",
"col",
"col-12",
"col-6",
"col-lg-2",
"col-lg-8",
"col-md-2",
"col-md-3",
"col-md-4",
@@ -59,7 +72,9 @@
"container-xxl",
"d-flex",
"d-inline",
"d-lg-block",
"d-md-block",
"d-md-none",
"d-none",
"display-1",
"display-4",
@@ -71,12 +86,17 @@
"fa-book-open",
"fa-ellipsis",
"fa-face-frown",
"fa-facebook",
"fa-fw",
"fa-github",
"fa-link",
"fa-linkedin",
"fa-medium",
"fa-moon",
"fa-share-nodes",
"fa-sun",
"fa-whatsapp",
"fa-x-twitter",
"fab",
"fas",
"fixed-top",
@@ -86,8 +106,13 @@
"form-control",
"fs-3",
"fs-5",
"fs-6",
"fs-lg-5",
"fw-30",
"fw-bold",
"g-4",
"gap-1",
"h-100",
"hstack",
"img-fluid",
"img-wrap",
@@ -97,10 +122,14 @@
"justify-content-end",
"justify-content-start",
"label",
"lead",
"link-bg-footer",
"link-secondary",
"main-content",
"main-nav-toggler",
"mb-3",
"mb-5",
"mb-lg-5",
"me-auto",
"middle-bar",
"min-vh-100",
@@ -112,6 +141,7 @@
"mx-auto",
"mx-md-0",
"my-auto",
"my-md-0",
"my-md-auto",
"nav-item",
"nav-link",
@@ -134,6 +164,7 @@
"p-3",
"p-4",
"pb-4",
"pb-5",
"pb-md-0",
"position-fixed",
"position-relative",
@@ -148,32 +179,59 @@
"row",
"row-cols-1",
"row-cols-2",
"row-cols-lg-3",
"row-cols-md-2",
"row-cols-md-3",
"row-cols-sm-2",
"row-cols-sm-3",
"search",
"search-input",
"search-suggestions",
"shadow",
"sidebar-overflow",
"sticky-top",
"stretched-link",
"svg-inline--fa",
"text-body-secondary",
"text-center",
"text-decoration-none",
"text-end",
"text-muted",
"text-secondary",
"text-sm-start",
"text-start",
"text-uppercase",
"toast",
"toast-body",
"toast-container",
"toast-header",
"toc",
"toc-sidebar",
"toggler-icon",
"top-bar"
],
"ids": [
"blogs",
"btn-webshare",
"fa-face-frown",
"fab-facebook",
"fab-github",
"fab-linkedin",
"fab-medium",
"fab-whatsapp",
"fab-x-twitter",
"fas-book-open",
"fas-ellipsis",
"fas-link",
"fas-moon",
"fas-share-nodes",
"fas-sun",
"navbar-0-collapse",
"navbar-mode",
"navbar-mode-checkbox",
"toast-container",
"toast-copied-code-message"
"toast-copied-code-message",
"toast-message-email-4"
]
}
}

View File

@@ -23,6 +23,22 @@
translation: "Artikel"
- id: more
translation: "Weitere {{ . }}"
- id: emptyList
translation: "Keine weiteren Artikel gefunden"
- id: emptyTags
translation: "Keine Schlagworte gefunden"
- id: readMore
translation: "Weiterlesen"
# Languages
- id: lang_de
translation: "Deutsch"
- id: lang_en
translation: "Englisch"
- id: lang_nl
translation: "Niederländisch"
- id: lang_fr
translation: "Französisch"
# Sharing
- id: shareLink

View File

@@ -149,3 +149,15 @@
translation: "Comment"
- id: supportedValues
translation: "Supported values"
# Alerts
- id: caution
translation: Caution
- id: important
translation: Important
- id: note
translation: Note
- id: tip
translation: Tip
- id: warning
translation: Warning

View File

@@ -148,3 +148,15 @@
translation: "Toelichting"
- id: supportedValues
translation: "Toegestane waarden"
# Alerts
- id: caution
translation: Voorzichtig
- id: important
translation: Belangrijk
- id: note
translation: Opmerking
- id: tip
translation: Tip
- id: warning
translation: Waarschuwing

View File

@@ -0,0 +1,23 @@
{{/* Adapted from https://gohugo.io/render-hooks/blockquotes/#alerts */}}
{{ $icons := dict
"caution" "fa hand"
"important" "fas exclamation"
"note" "fas circle-info"
"tip" "fa lightbulb"
"warning" "fas triangle-exclamation"
}}
{{ if eq .Type "alert" }}
<blockquote class="blockquote-alert blockquote-alert-{{ .AlertType }}">
<p class="blockquote-alert-heading">
{{ partial "assets/icon.html" (dict "icon" (printf "%s fa-fw" (index $icons .AlertType))) }}
{{ or (i18n .AlertType) (title .AlertType) }}
</p>
{{ trim .Text "\n\r" | safeHTML }}
</blockquote>
{{ else }}
<blockquote class="blockquote">
{{ trim .Text "\n\r" | safeHTML }}
</blockquote>
{{ end }}

View File

@@ -0,0 +1,11 @@
{{ with transform.ToMath .Inner (dict "displayMode" true) }}
{{ with .Err }}
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
{{ else }}
{{ if $.Attributes.class }}
<div class="{{ $.Attributes.class }}">{{ . }}</div>
{{ else }}
{{ . }}
{{ end }}
{{ end }}
{{ end }}

View File

@@ -0,0 +1,15 @@
{{ partial "assets/image.html" (dict
"url" .Destination
"page" .Page
"caption" .Title
"title" .Text
"anchor" .Attributes.anchor
"class" .Attributes.class
"figclass" .Attributes.figclass
"loading" .Attributes.loading
"mode" .Attributes.mode
"plain" .Attributes.plain
"portrait" .Attributes.portrait
"ratio" .Attributes.ratio
"wrapper" .Attributes.wrapper
) }}

View File

@@ -0,0 +1,15 @@
{{ if gt (findRE `^HAHAHUGO` .Destination 1) 0 }}
{{ errorf "Invalid markdown link destination, use '%s' syntax when using shortcodes as input. See '%s'"
("&#123;&#123;% %&#125;&#125;" | htmlUnescape)
.Page.File.Path
}}
{{ else if not .Destination }}
{{ errorf "Missing markdown link destination, see '%s'" .Page.File.Path }}
{{ else }}
{{ partial "assets/link.html" (dict
"destination" .Destination
"page" .Page
"text" .Text
"title" .Title
) }}
{{- end }}

View File

@@ -0,0 +1,13 @@
{{ $opts := dict }}
{{ if eq .Type "block" }}
{{ $opts = dict "displayMode" true }}
{{ end }}
{{ with transform.ToMath .Inner $opts }}
{{ with .Err }}
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
{{ else }}
{{ . }}
{{ end }}
{{ end }}

View File

@@ -36,11 +36,11 @@
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js">
<head>
{{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" .) -}}
{{ block "head" . }}{{ end -}}
</head>
<body>
{{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" .) -}}
<div class="d-flex flex-column min-vh-100">
<div class="d-flex flex-column {{ if $fullCover }} fullscreen{{ end }}{{ if .IsHome }} {{ .Site.Params.home.style }}{{ end }}">
{{- partial "assets/navbar.html" (dict
@@ -73,6 +73,7 @@
{{ end }}
{{- partial "footer/toast-container.html" . -}}
{{- partial "assets/symbols.html" . -}}
{{- partialCached "footer/scripts.html" (dict "header" false "page" . "core" true) }}
{{- partial "footer/optional-scripts.html" . -}}
</body>

View File

@@ -1,6 +1,8 @@
{{ define "main" -}}
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
{{ $sidebar := .Render "single/sidebar" }}
{{- $hasSidebar := .Site.Params.navigation.sidebar | default true -}}
{{ $sidebar := "" }}
{{ if $hasSidebar }}{{ $sidebar = .Render "single/sidebar" }}{{ end }}
{{ $toc := .Render "single/panel-toc" }}
{{ with $sidebar }}
@@ -16,7 +18,7 @@
{{ end }}
<div class="container-xxl flex-fill p-4 px-xxl-0">
{{ if $sidebar -}}
{{ if $hasSidebar -}}
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2 row-cols-{{ $breakpoint.next }}-3">
<div class="col col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.next }}-block sidebar-overflow sticky-top pt-5">
{{ $sidebar | safeHTML }}

View File

@@ -14,14 +14,16 @@
{{ with .Title }}<p class="display-4 mt-5">{{ . }}</p>{{ end }}
{{ if ne $metadata "none" }}
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
<small class="text-body-secondary text-uppercase">
{{ $datestr | i18n "postedOnDate" -}}
{{ if eq $metadata "full" }}
{{ if ne $datestr $lastmodstr -}}&nbsp;({{ $lastmodstr | i18n "lastModified" }}){{ end }}
{{ if .Date }}
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
{{ $datestr | i18n "postedOnDate" -}}
{{ if eq $metadata "full" }}
{{ if ne $datestr $lastmodstr -}}&nbsp;({{ $lastmodstr | i18n "lastModified" }}){{ end }}
{{ end }}
&bull;
{{ end }}
&bull;
{{ .ReadingTime | lang.FormatNumber 0 }}&nbsp;{{ i18n "minutesShort" }} {{ i18n "read" }} &bull;
{{ .WordCount | lang.FormatNumber 0 }}&nbsp;{{ i18n "words" }}
</small>

View File

@@ -1,7 +1,5 @@
{{- $menu := .Scratch.Get "sidebar" -}}
{{- $version := .Scratch.Get "version" -}}
{{ $sidebar := "" }}
{{- $hasSidebar := .Site.Params.navigation.sidebar | default true -}}
{{ if and $menu $hasSidebar }}
{{ if $menu }}
{{ partial "assets/sidebar.html" (dict "page" . "menu" $menu "version" $version) }}
{{ end }}
{{ end -}}

View File

@@ -7,6 +7,10 @@
<meta name="robots" content="noindex">
<meta charset="utf-8">
<noscript><meta http-equiv="refresh" content="0; url={{ .Permalink }}"></noscript>
<script src='{{ partial "utilities/GetStaticURL" (dict "url" "js/alias.js") }}'></script>
{{ if site.Params.main.enableLanguageSelectionStorage }}
{{- partial "footer/scripts.html" (dict "filename" "js/critical.bundle.js" "match" "js/critical/**.js" "header" true "page" page) -}}
{{ else }}
<script src='{{ partial "utilities/GetStaticURL" (dict "url" "js/alias.js") }}'></script>
{{ end }}
</head>
</html>

View File

@@ -6,6 +6,19 @@
{{ $error := false }}
{{ $anchorMap := dict
"TopLeft" "north_west"
"Top" "north"
"TopRight" "north_east"
"Left" "west"
"Center" "center"
"Right" "east"
"BottomLeft" "south_west"
"Bottom" "south"
"BottomRight" "south_east"
"Smart" "auto"
}}
<!-- Validate arguments -->
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
{{ errorf "partial [assets/adapter/cloudinary.html] - Invalid arguments" -}}
@@ -20,6 +33,8 @@
{{ $transform := .transform }}
{{ $height := .height }}
{{ $width := .width }}
{{ $anchor := "" }}
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
{{ if eq $transform "fill" }}{{ $transform = "c_fill" }}{{ else }}{{ $transform = "c_fit" }}{{ end }}
{{ $element := "" }}
@@ -37,6 +52,9 @@
{{ else }}
{{ $operation = printf "f_auto,%s,h_%d,w_%d" $transform $height $width }}
{{ end }}
{{ with $anchor }}
{{ $operation = printf "%s,g_%s" $operation . }}
{{ end }}
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
{{ end }}

View File

@@ -20,6 +20,7 @@
{{ $transform := .transform }}
{{ $height := .height }}
{{ $width := .width }}
{{ $anchor := .anchor | default "" }}
{{ $element := "" }}
{{ $absoluteURL := .absoluteURL }}
{{ $url := urls.JoinPath $dir $file }}
@@ -46,13 +47,20 @@
{{ if not $error }}
{{ $scaled := "" }}
{{ if eq $transform "fill" }}
{{- $scaled = $img.Fill (printf "%dx%d %s" $width $height $format) -}}
{{- $scaled = $img.Fill (printf "%dx%d %s %s" $width $height $anchor $format) -}}
{{ else }}
{{- $scaled = $img.Fit (printf "%dx%d %s" $width $height $format) -}}
{{ end }}
{{- $clean := path.Ext $img.RelPermalink -}}
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink $clean (printf "-%dx%d.%s" $width $height $format)) -}}
{{ $destination := "" }}
{{ if $anchor }}
{{ $destination = printf "-%dx%d-%s.%s" $width $height (lower $anchor) $format }}
{{ else }}
{{ $destination = printf "-%dx%d.%s" $width $height $format }}
{{ end }}
{{- $scaled = $scaled | resources.Copy (replace $img.RelPermalink $clean $destination) -}}
{{- if $absoluteURL -}}
{{- $element = $scaled.Permalink -}}
{{- else -}}

View File

@@ -6,6 +6,19 @@
{{ $error := false }}
{{ $anchorMap := dict
"TopLeft" "top_left"
"Top" "top"
"TopRight" "top_right"
"Left" "left"
"Center" "center"
"Right" "right"
"BottomLeft" "bottom_left"
"Bottom" "bottom"
"BottomRight" "bottom_right"
"Smart" "auto"
}}
<!-- Validate arguments -->
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
{{ errorf "partial [assets/adapter/imagekit.html] - Invalid arguments" -}}
@@ -20,6 +33,8 @@
{{ $transform := .transform }}
{{ $height := .height }}
{{ $width := .width }}
{{ $anchor := "" }}
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
{{ if eq $transform "fill" }}{{ $transform = "c-maintain_ratio" }}{{ else }}{{ $transform = "c-at_max" }}{{ end }}
{{ $element := "" }}
@@ -42,6 +57,9 @@
{{ else }}
{{ $operation = printf "tr:f-auto,%s,h-%d,w-%d" $transform $height $width }}
{{ end }}
{{ with $anchor }}
{{ $operation = printf "%s,fo-%s" $operation . }}
{{ end }}
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
{{ end }}

View File

@@ -6,6 +6,19 @@
{{ $error := false }}
{{ $anchorMap := dict
"TopLeft" "top,left"
"Top" "top"
"TopRight" "top,right"
"Left" "left"
"Center" "center"
"Right" "right"
"BottomLeft" "bottom,left"
"Bottom" "bottom"
"BottomRight" "bottom,right"
"Smart" "faces,edges,center"
}}
<!-- Validate arguments -->
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
{{ errorf "partial [assets/adapter/imgix.html] - Invalid arguments" -}}
@@ -20,6 +33,8 @@
{{ $transform := .transform }}
{{ $height := .height }}
{{ $width := .width }}
{{ $anchor := "" }}
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
{{ if eq $transform "fill" }}{{ $transform = "crop" }}{{ else }}{{ $transform = "max" }}{{ end }}
{{ $element := "" }}
@@ -37,6 +52,9 @@
{{ else }}
{{ $operation = printf "f_auto&fit=%s&h=%d&w=%d" $transform $height $width }}
{{ end }}
{{ with $anchor }}
{{ $operation = printf "%s&crop=%s" $operation . }}
{{ end }}
{{- $element = printf "%s?%s" (urls.JoinPath (slice "https://" $host $dir $file)) $operation -}}
{{ end }}

View File

@@ -95,10 +95,10 @@
{{- end -}}
role="button"
>
<div class="d-flex justify-content-{{ $justify }}">
<div class="my-auto">{{ $title | safeHTML }}</div>
{{- with $icon }}<div class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon "spacing" false) }}</div>{{ end }}
</div>
<span class="d-flex justify-content-{{ $justify }}">
<span class="my-auto">{{ $title | safeHTML }}</span>
{{- with $icon }}<span class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon "spacing" false) }}</span>{{ end }}
</span>
{{- with $badge }}
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">

View File

@@ -71,11 +71,13 @@
<!-- headless page -->
{{- else -}}
{{- $thumbnail := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.url) $element.Params.Thumbnail) -}}
{{- $anchor := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.anchor) "") -}}
{{- $params = merge $params (dict
"title" $element.Title
"href" $element.RelPermalink
"description" (partial "utilities/GetDescription.html" (dict "page" $element "raw" true))
"thumbnail" $thumbnail
"anchor" $anchor
"icon" $element.Params.icon
) -}}
{{- end -}}
@@ -118,6 +120,10 @@
{{ end -}}
{{ $sizes = printf "(min-width: %s) 20vw, (min-width: %s) 33.3vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
{{ end -}}
{{ else }}
{{ if in (slice "2" "3" "4" "5") $cols }}
{{ $sizes = replace (printf "%.1fvw" (div 100.0 (int $cols))) ".0" "" }}
{{ end }}
{{ end }}
{{- if not $paginate -}}
@@ -127,7 +133,7 @@
{{- if and (eq $cols "1") (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
<!-- Main code -->
<div class="container {{ $wrapper }} {{ if $scroll }}card-container-wrapper{{ end }}">
<div class="container-fluid {{ $wrapper }} {{ if $scroll }}card-container-wrapper{{ end }}">
<div class="row g-{{ $gutter }} {{ if $scroll }}d-flex flex-row flex-nowrap card-container scrollbar-horizontal pb-4 w-100 {{ end }} {{ $colGrid }}">
{{ range $index, $element := $list }}
{{- $params := (dict

View File

@@ -32,6 +32,7 @@
{{- $ratio := .ratio -}}
{{- $portrait := .portrait | default false -}}
{{- $thumbnail := .thumbnail -}}
{{- $anchor := .anchor | default "" -}}
{{- $title := .title -}}
{{- $subtle := .subtle -}}
{{- $button := .button -}}
@@ -50,20 +51,25 @@
<!-- Override arguments -->
{{- $page := "" }}
{{- if .path }}
{{- $page = site.GetPage .path }}
{{ $page = partial "utilities/GetPage.html" (dict "url" .path "page" page) }}
{{- if not $page }}
{{- errorf "partial [assets/card.html] - Cannot find page: %s" .path -}}
{{ if page.File }}
{{- errorf "partial [assets/card.html] - Cannot find target page '%s', see '%s'" .path page.File.Path -}}
{{ else }}
{{- errorf "partial [assets/card.html] - Cannot find target page '%s'" .path -}}
{{ end }}
{{- end }}
{{- end }}
{{- with $page -}}
{{- if not $title }}{{ $title = .Title }}{{ end -}}
{{- if not $href }}{{ $href = .RelPermalink }}{{ end -}}
{{- if not $description }}{{ $description = partial "utilities/GetDescription.html" (dict "page" .) }}{{ end -}}
{{- if not $thumbnail }}{{ $thumbnail = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) }}{{ end -}}
{{- if and (not $thumbnail) (not $icon) }}{{ $thumbnail = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) }}{{ end -}}
{{ if not $ratio }}
{{- if and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.ratio }}{{ $ratio = .Params.Thumbnail.ratio }}{{ end -}}
{{ end }}
{{- if not $icon }}{{ $icon = .Params.icon }}{{ end -}}
{{- if not $anchor }}{{ $anchor = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.anchor) "") }}{{ end -}}
{{- end -}}
{{ if (hasPrefix $orientation "horizontal") }}
@@ -86,7 +92,7 @@
{{- if $href -}}
<a href="{{ $href }}" class="{{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }} stretched-link">
<p class="card-title fs-5 fw-bold">{{ $title }}</p>
<p class="card-title fs-lg-5 fs-6 fw-bold">{{ $title }}</p>
{{ with $description }}
<div class="card-text {{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }}">
{{ . | safeHTML }}
@@ -95,7 +101,7 @@
</a>
{{- else -}}
<div>
{{ with $title }}<p class="card-title fs-5 fw-bold">{{ . }}</p>{{ end -}}
{{ with $title }}<p class="card-title fs-lg-5 fs-6 fw-bold">{{ . }}</p>{{ end -}}
{{ with $description }}<div class="card-text">{{ . | safeHTML }}</div>{{ end -}}
</div>
{{- end -}}
@@ -114,7 +120,7 @@
<p class="card-text"><small class="{{ if $color }}text-bg-{{ $color }}{{ else }}text-body-secondary{{ end }} text-uppercase">
{{- if in (slice "full" "publication") $keywords -}}
{{- partial "utilities/date.html" (dict "date" $page.Date "format" "long") -}}&nbsp;&bull;
{{ with $page.Date }}{{ partial "utilities/date.html" (dict "date" . "format" "long") }}&nbsp;&bull;{{ end -}}
{{ $page.ReadingTime | lang.FormatNumber 0 }} {{ i18n "minutesShort" }} {{ i18n "read" -}}
{{- end -}}
@@ -167,7 +173,7 @@
<div class="row g-0 row-cols-2 h-100{{ if $button }} pb-5{{ end }}">
{{- if $thumbnail -}}
<div class="{{ $col1 }}">
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "1x1") "portrait" $portrait "sizes" $sizes "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100 card-img-bg" "title" $title "loading" $loading) -}}
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "1x1") "portrait" $portrait "sizes" $sizes "anchor" $anchor "wrapper" "h-100 card-img-wrap" "class" "rounded-start card-img-h100 card-img-bg" "title" $title "loading" $loading) -}}
</div>
{{- else if $icon -}}
<div class="{{ $col1 }} p-{{ $padding }}">
@@ -212,7 +218,7 @@
<!-- Render stacked / default card -->
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
{{- if $thumbnail -}}
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "16x9") "portrait" $portrait "sizes" $sizes "wrapper" "card-img-wrap" "class" "card-img-top card-img-bg" "title" (or $alt $title) "loading" $loading) -}}
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "16x9") "portrait" $portrait "anchor" $anchor "sizes" $sizes "wrapper" "card-img-wrap" "class" "card-img-top card-img-bg" "title" (or $alt $title) "loading" $loading) -}}
{{- else if $icon -}}
<div class="card-icon p-{{ $padding }} {{ $iconStyle }} text-{{ $align }} {{ if $iconRounded }}fa-stack {{ $stack }}{{ end }} w-100">
{{ if $iconRounded }}

View File

@@ -15,15 +15,16 @@
{{- $mode := .mode -}}
{{- $modes := .modes -}}
{{- $plain := .plain | default false }}
{{- $anchor := .anchor }}
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
{{- $anchor := "" -}}
{{- $fileAnchor := "" -}}
{{- $segments := split $url "#" -}}
{{- if gt (len $segments) 2 -}}
{{- errorf "Invalid path or url: %q" $url -}}
{{- else if eq (len $segments) 2 }}
{{- $url = index $segments 0 -}}
{{- $anchor = index $segments 1 -}}
{{- $fileAnchor = index $segments 1 -}}
{{- end -}}
<!-- Obtain fallback URL and imageset definition -->
@@ -34,11 +35,13 @@
"portrait" $portrait
"plain" $plain
"imageset" true
"anchor" $anchor
) }}
{{ $fallbackURL := index $target "target" }}
{{ $imgset := index $target "set" }}
{{ $height := index $target "height" }}
{{ $width := index $target "width" }}
{{ $data := index $target "data" }}
<!-- Add color modes -->
{{- range $none := $modes -}}
@@ -50,24 +53,33 @@
<!-- Generate image definition -->
{{- if $caption -}}
<figure {{ with $wrapper }}class="{{ . }}"{{ end }}>
{{ else }}
{{ with $wrapper }}<div class="{{ . }}">{{ end }}
{{ end }}
{{ if $data }}
{{- if site.Params.debugging.includeSVGOrigin }}
{{ printf "<!-- <svg src=\"%s\"> -->" $.url | safeHTML }}
{{ end -}}
{{- $data = replace $data "<svg" (printf "<svg class=\"%s\"" $class) -}}
{{- $data | safeHTML -}}
{{- else if not $fileAnchor -}}
<img class="img-fluid {{ $class }}"
src="{{ $fallbackURL }}"
{{ if $lazy }}loading="lazy"{{ end }}
{{ with $priority }}fetchpriority="{{ . }}"{{ end }}
{{ with $imgset -}}srcset="{{ . }}" sizes="{{ $sizes }}"{{- end }}
{{ with $height }}height="{{ . }}"{{ end }}
{{ with $width }}width="{{ . }}"{{ end }}
{{ with (or $title $caption) }}alt="{{ . }}"{{ end }}>
{{- else }}
<svg class="{{ $class }}">
<use href="{{ $fallbackURL }}#{{ $fileAnchor }}"></use>
</svg>
{{ end }}
<div class="{{ if not $caption }}{{ $wrapper }}{{ end }}">
{{- if not $anchor -}}
<img class="img-fluid {{ $class }}"
src="{{ $fallbackURL }}"
{{ if $lazy }}loading="lazy"{{ end }}
{{ with $priority }}fetchpriority="{{ . }}"{{ end }}
{{ with $imgset -}}srcset="{{ . }}" sizes="{{ $sizes }}"{{- end }}
{{ with $height }}height="{{ . }}"{{ end }}
{{ with $width }}width="{{ . }}"{{ end }}
{{ with (or $title $caption) }}alt="{{ . }}"{{ end }}>
{{- else }}
<svg class="{{ $class }}">
<use href="{{ $fallbackURL }}#{{ $anchor }}"></use>
</svg>
{{ end }}
</div>
{{- if $caption -}}
<figcaption class="figure-caption{{ with $figclass }} {{ . }}{{ end }}">{{ $caption | safeHTML }}</figcaption>
</figure>
{{ else if $wrapper }}
</div>
{{- end -}}

View File

@@ -9,6 +9,7 @@
{{- $targetURL := "" -}}
{{- $set := "" -}}
{{- $imageset := .imageset | default false }}
{{- $anchor := .anchor | default "" -}}
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
{{- $segments := split $url "#" -}}
@@ -46,6 +47,7 @@
{{ $dims := slice }}
{{- $res := "" -}}
{{- $img := "" -}}
{{- $data := "" -}}
{{ $transform := "" }}
{{- if hasSuffix $url "svg" -}}
{{- $res = partial "utilities/GetResource.html" (dict "url" $url "page" $page) -}}
@@ -60,6 +62,10 @@
{{ $dims = $dims | append "500" }}
{{ end }}
{{ end }}
{{ else if eq (string $res.MediaType) "image/svg+xml" }}
{{ $data = $res.Content }}
{{ else }}
{{ warnf "Unsupported media type '%s': %q" (string $res.MediaType) $url -}}
{{ end }}
{{ else if $ratio }}
{{ $transform = "fill" }}
@@ -118,14 +124,22 @@
"url" $url
"img" $img
"dims" ($dims | last 1)
"anchor" $anchor
"transform" $transform
"hook" $hook
"format" "jpg"
"format" "png"
"includeWidth" false
)}}
{{ if $imageset }}
{{- $set = partial "assets/helpers/image-set.html" (dict "url" $url "img" $img "dims" $dims "transform" $transform "hook" $hook) -}}
{{- $set = partial "assets/helpers/image-set.html" (dict
"url" $url
"img" $img
"dims" $dims
"anchor" $anchor
"transform" $transform
"hook" $hook
) -}}
{{ end }}
{{ end }}
{{ return (dict "target" $targetURL "set" $set "height" $height "width" $width) }}
{{ return (dict "target" $targetURL "set" $set "height" $height "width" $width "data" $data) }}

View File

@@ -7,6 +7,7 @@
{{ $transform := .transform }}
{{ $format := .format }}
{{ $includeWidth := .includeWidth | default true }}
{{ $anchor := .anchor | default "" }}
{{ $host := (urls.Parse $url).Hostname }}
{{ $dir := (urls.Parse $url).Path }}
@@ -35,6 +36,7 @@
"width" $width
"height" $height
"format" $format
"anchor" $anchor
)}}
{{ if $includeWidth }}
{{ $imgset = $imgset | append (printf "%s %dw" $element $width) }}

View File

@@ -27,6 +27,7 @@
{{- if eq $priority "auto" }}{{ $priority = "" }}{{ end -}}
{{- $sizes := .sizes | default "100vw" -}}
{{- $plain := .plain | default false -}}
{{- $anchor := .anchor | default "" -}}
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
{{- $url := .url -}}
@@ -49,6 +50,7 @@
"sizes" $sizes
"absoluteURL" $absoluteURL
"plain" $plain
"anchor" $anchor
)
-}}

View File

@@ -14,6 +14,7 @@
<!-- Initialize arguments -->
{{ $destination := strings.TrimPrefix (strings.TrimSuffix "/" site.BaseURL) .destination }}
{{ if not $destination }}{{ $destination = "/" }}{{ end }}
{{- $target := "" -}}
{{- $rel := "" -}}
@@ -22,9 +23,11 @@
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
{{- $isExternal := or (ne (urls.Parse (absURL $destination)).Host (urls.Parse site.BaseURL).Host) $external -}}
{{- $isLocal := hasPrefix $destination "#" -}}
{{- $page := .page -}}
{{- $anchor := "" -}}
{{- $text := .text -}}
{{- $title := .title -}}
{{- $class := .class -}}
<!-- Main code -->
@@ -53,24 +56,50 @@
{{ end }}
{{ end }}
{{ $ref := partial "utilities/GetPage.html" (dict "url" $destination "page" $page) }}
{{- if not $ref -}}
{{- errorf "partial [assets/link.html] - Cannot find page: %s" $destination -}}
{{- $error = true -}}
{{- else -}}
{{- $destination = $ref.RelPermalink -}}
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
{{ if not $isLocal }}
{{ $ref := partial "utilities/GetPage.html" (dict "url" $destination "page" $page) }}
{{- if not $ref -}}
{{ $pageContext := "" }}
{{ with $page.File }}{{ $pageContext = path.Join "/content" .Dir }}{{ end }}
{{ $isPageRes := fileExists (path.Join $pageContext $destination) }}
{{ $isStatic := fileExists (path.Join "static" $destination) }}
{{ if and (not $isPageRes) (not $isStatic) }}
{{- errorf "partial [assets/link.html] - Cannot find page or asset: '%s' at '%s'" $destination $page.File.Path -}}
{{- $error = true -}}
{{ else if $isPageRes }}
{{ $destination = urls.JoinPath "/" (strings.TrimPrefix "/content" $pageContext) $destination }}
{{ else if $isStatic }}
{{ $destination = urls.JoinPath "/" $destination }}
{{ end }}
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
{{ end }}
{{- if and $ref (not $error) -}}
{{- $destination = $ref.RelPermalink -}}
{{- with $anchor }}{{ $destination = printf "%s#%s" (strings.TrimSuffix "/" $destination) . -}}{{ end -}}
{{- end -}}
{{- if not $text -}}
{{- if $anchor -}}
{{- $text = $anchor -}}
{{- else -}}
{{- $text = $ref.LinkTitle -}}
{{- end -}}
{{ if $anchor }}{{ $text = $anchor }}{{ else }}{{ $text = $ref.LinkTitle }}{{ end }}
{{ end -}}
{{- if not $case }}{{ $text = lower $text }}{{ end -}}
{{- end -}}
{{ else }}
{{ with $anchor }}
{{ $destination = printf "#%s" . }}
{{ if not $text }}{{ $text = . }}{{ end }}
{{ end }}
{{ end }}
{{- if not $case }}{{ $text = lower $text }}{{ end -}}
{{- end -}}
{{ if not $error -}}
<a {{ with $class }}class="{{ . }}" {{ end }}href="{{ $destination | safeURL }}"{{ with $target }} target="{{ . }}"{{ end }}{{ with $rel }} rel="{{ . }}"{{ end }}>{{ $text }}</a>
{{- end }}
<a
{{- with $destination }} href="{{ . | safeURL }}"{{ end -}}
{{ with $class }} class="{{ . }}" {{ end -}}
{{ with $target }} target="{{ . }}"{{ end -}}
{{ with $rel }} rel="{{ . }}"{{ end -}}
{{ with $title }} title="{{ . }}"{{ end -}}
>
{{- $text | safeHTML -}}
</a>
{{- end -}}

View File

@@ -24,11 +24,12 @@
{{- $menuURL := "" -}}
{{ if or (strings.HasPrefix $menu.PageRef "http") (strings.HasPrefix $menu.URL "http") }}
{{ $menuURL = or $menu.PageRef $menu.URL }}
{{ else }}
{{ else if (or $menu.PageRef $menu.URL) }}
{{- $menuURL = urls.JoinPath $baseURL ((or $menu.PageRef $menu.URL) | relLangURL) -}}
{{ end }}
{{- $pageURL := $page.RelPermalink -}}
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
{{ if not $menu.PageRef }}{{ $isActive = false }}{{ end }}
{{- $isAlias := $menu.Params.alias -}}
{{- $isIcon := $menu.Params.icon -}}
@@ -47,6 +48,11 @@
{{- if $cue -}}
{{ $suffix = partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}
{{- end -}}
{{ else if $menuURL }}
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url.Path "page" $page) }}
{{- if not $ref -}}
{{- warnf "partial [assets/navbar-item.html] - Cannot find page of menu item '%s': %s" $menu.Name $url -}}
{{ end }}
{{ end -}}
{{- $mainNav := urlize (lower $menu.Name) -}}
@@ -82,7 +88,7 @@
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{ . }}{{ end }}"
{{ if $isIcon }}aria-label="{{ $menu.Name }}"{{ end }}
data-nav="main" data-nav-main="{{ $mainNav }}"{{ with $childNav }} data-nav-child="{{ . }}"{{ end }}
href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }} {{ $button | safeHTMLAttr }}>
{{ if $menuURL }} href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }}{{ end }} {{ $button | safeHTMLAttr }}>
{{- with $menu.Pre }}
{{ if hasPrefix . "<i" }}

View File

@@ -154,11 +154,6 @@
{{- $pre := .Pre -}}
{{- $post := .Post -}}
{{- $theme := "light" -}}
{{- if in (slice "primary" "secondary" "success" "danger" "black") $color }}{{ $theme = "dark" }}{{ end -}}
{{- if in (slice "body" "body-tertiary") $color }}{{ $theme = "" }}{{ end -}}
{{- if not $color }}{{ $theme = "" }}{{ end -}}
{{- $class := .class -}}
{{- $contrast := false -}}
@@ -170,7 +165,7 @@
{{ end }}
<!-- Main code -->
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
<div class="container-fluid {{ if $fixed }}fixed-top{{ else if $overlay }}navbar-overlay{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
<nav class="navbar p-4
{{- if not $overlay }}{{ with $color }} bg-{{ . }}{{ end }}{{ end -}}
@@ -178,9 +173,9 @@
{{ if $contrast }} navbar-contrast{{ end }}"
{{ if $overlay }}
data-bs-theme="{{ $overlayMode }}"
data-bs-overlay="{{ $overlayMode }}"
{{ else }}{{ with $theme }}data-bs-theme="{{ . }}"{{ end }}{{ end }}
{{ if $overlay }}data-navbar-color="{{ $color }}"{{ end }}
{{ if $fixed }}data-bs-overlay="{{ $overlayMode }}"{{ end }}
{{ if $color }}data-navbar-color="{{ $color }}"{{ end }}
{{ end }}
>
<div class="container-xxl p-0">
<div class="d-flex navbar-container justify-content-center">
@@ -218,16 +213,18 @@
<div class="d-flex align-items-center">
<button class="navbar-toggler main-nav-toggler collapsed p-0" type="button" data-bs-toggle="collapse" data-bs-target="#{{ $id }}-collapse"
aria-controls="{{ $id }}" aria-expanded="false" aria-label="{{ T "toggleMainNav" }}">
<span class="toggler-icon top-bar emphasis{{ with $theme }}-{{ . }}{{ end }}"></span>
<span class="toggler-icon middle-bar emphasis{{ with $theme }}-{{ . }}{{ end }}"></span>
<span class="toggler-icon bottom-bar emphasis{{ with $theme }}-{{ . }}{{ end }}"></span>
<span class="toggler-icon top-bar emphasis"></span>
<span class="toggler-icon middle-bar emphasis"></span>
<span class="toggler-icon bottom-bar emphasis"></span>
</button>
</div>
</div>
<div class="navbar-collapse collapse" id="{{ $id }}-collapse">
<!-- Insert search input -->
{{- if and $search (not $searchModal) }}{{ partial "assets/search-input.html" }}{{ end -}}
{{- if and $search (not $searchModal) }}
{{ partial "assets/search-input.html" (dict "class" (printf "mt-4 mt-%s-0" $size)) }}
{{ end -}}
<!-- Render top-menu items (maximum depth of 2) -->
<ul class="navbar-nav {{ if $flex }}d-flex w-100{{ else }}ms-auto{{ end }}">
@@ -272,14 +269,14 @@
<a class="nav-link dropdown-toggle d-none d-{{ $size }}-block" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }}
</a>
<ul class="dropdown-menu dropdown-menu-end ">
<ul class="dropdown-menu dropdown-menu-end " id="language-selector">
{{- if $page.IsTranslated -}}
{{- range $page.AllTranslations -}}
<li><a class="dropdown-item {{ if eq .Language.Lang $currentLang }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
<li><a class="dropdown-item {{ if eq .Language.Lang $currentLang }}active{{ end }}" hreflang="{{.Language.Lang}}" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
{{- end -}}
{{- else -}}
{{- range site.Languages -}}
<li><a class="dropdown-item" href="{{ urls.JoinPath $baseURL .Lang }}">{{ default .Lang .LanguageName }}</a></li>
<li><a class="dropdown-item" href="{{ urls.JoinPath $baseURL .Lang }}" hreflang="{{.Lang}}">{{ default .Lang .LanguageName }}</a></li>
{{- end -}}
{{- end -}}
</ul>

View File

@@ -64,11 +64,11 @@
{{- with index . "layout" }}{{ $layout = . }}{{ end -}}
{{- with index . "pane" }}{{ $pane = . }}{{ end -}}
{{- with index . "type" }}{{ $type = . }}{{ end -}}
{{- with index . "vertical" }}{{ $vertical = partial "utilities/CastBool.html" . }}{{ end -}}
{{- if (isset . "vertical") }}{{ $vertical = partial "utilities/CastBool.html" (index . "vertical") }}{{ end -}}
{{- with index . "width" }}{{ $width = . }}{{ end -}}
{{- with index . "kind" }}{{ $kind = . }}{{ end -}}
{{- with index . "ratio" }}{{ $ratio = . }}{{ end -}}
{{- with index . "wrap" }}{{ $wrap = partial "utilities/CastBool.html" . }}{{ end -}}
{{- if (isset . "wrap") }}{{ $wrap = partial "utilities/CastBool.html" (index . "wrap") }}{{ end -}}
{{- end -}}
{{ if isset $page.Params "nested" }}

View File

@@ -0,0 +1,146 @@
<!--
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.
This source code adapts the original embedded shortcode as maintained by the Hugo repository. It introduces the
following modifications:
- Isolated the styles to comply with the Content Security Policy
- Added validation of shortcode arguments
- Added support to retrieve the title from the video metadata
- Adjusted autoplay configuration
- Modified the layout
The original source code is available on:
https://github.com/gohugoio/hugo/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
https://github.com/gohugoio/hugo/tpl/tplimpl/embedded/templates/shortcodes/vimeo.html
Copyright 2022 The Hugo Authors. Licensed under the Apache License, Version 2.0.
-->
{{ $error := false }}
<!-- Validate arguments -->
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "video" "args" . "group" "partial") }}
{{- errorf "partial [assets/video.html] - Invalid arguments" -}}
{{ $error = true }}
{{ end }}
<!-- Initialize arguments -->
{{- $page := .page -}}
{{- $position := .position -}}
{{- $host := .host -}}
{{- $title := .title -}}
{{- $class := .class -}}
{{- $account := .account -}}
{{- $id := .id -}}
{{- $autoplay := .autoplay -}}
{{- $autotitle := .autotitle -}}
{{- $ratio := .ratio -}}
{{- $pc := "" -}}
{{- if eq $host "youtube" }}
{{- $pc = $page.Site.Config.Privacy.YouTube -}}
{{- else if eq $host "vimeo" }}
{{- $pc = $page.Site.Config.Privacy.Vimeo -}}
{{- end -}}
{{ if and (eq $host "youtube") ($pc.Disable) }}
{{- errorf "partial [assets/video.html] - YouTube video disabled in site's privacy settings" -}}
{{ $error = true }}
{{ else if and (eq $host "vimeo") ($pc.Disable) }}
{{- errorf "partial [assets/video.html] - Vimeo video disabled in site's privacy settings" -}}
{{ $error = true }}
{{ end }}
{{ if not $account }}
{{ with index $page.Site.Params.videos $host }}
{{ with index . "account" }}{{ $account = . }}{{ end }}
{{ end }}
{{ end }}
<!-- Main code -->
{{ if not $error -}}
{{ if eq $host "youtube" }}
{{- $host := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
{{ $url := printf "https://%s/embed/%s?origin=%s" $host $id $page.Site.BaseURL }}
{{ $api := printf "https://www.youtube.com/oembed?format=json&url=%s" (printf "https://www.youtube.com/watch?v=%s" $id) }}
{{ $padding := "56.25%" }}
{{ with resources.GetRemote $api }}
{{ with .Err }}
{{ errorf "Unable to parse video metadata '%q': %s\n %s" $api $position . }}
{{ else }}
{{ $data := . | transform.Unmarshal }}
{{ if $autotitle }}{{ with $data.title }}{{ $title = . }}{{ end }}{{ end }}
{{ $padding = printf "%.2f%%" (mul (div $data.height $data.width) 100) }}
{{ end }}
{{ else }}
{{ errorf "Unable to get video metadata '%q': %s" $api $position }}
{{ end }}
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
<iframe src="{{ $url }}{{ if $autoplay }}&autoplay=1&mute=1{{ end }}"
allowfullscreen title="{{ $title }}" {{ if $autoplay }}allow="autoplay"{{ end }}>
</iframe>
</div>
{{ else if eq $host "vimeo" }}
{{ $url := printf "https://player.vimeo.com/video/%s" $id }}
{{ $params := "" }}
{{ if $autoplay }}{{ $params = print $params "&autoplay=1&muted=1" }}{{ end }}
{{ if $pc.EnableDNT }}{{ $params = print $params "&dnt=1" }}{{ end }}
{{ $params = strings.TrimPrefix "&" $params }}
{{ with $params }}{{ $url = printf "%s?%s" $url . }}{{ end }}
{{ $padding := "56.25%" }}
{{- $dnt := cond $pc.EnableDNT 1 0 -}}
{{- $source := urls.JoinPath "https://vimeo.com" $id -}}
{{- $query := querify "url" $url "dnt" $dnt -}}
{{- $api := printf "https://vimeo.com/api/oembed.json?%s" $query -}}
{{- with resources.GetRemote $api -}}
{{ with .Err }}
{{ errorf "Unable to parse video metadata '%q': %s\n %s" $api $position . }}
{{ else }}
{{ $data := . | transform.Unmarshal }}
{{ if $autotitle }}{{ with $data.title }}{{ $title = . }}{{ end }}{{ end }}
{{ $padding = printf "%.2f%%" (mul (div $data.height $data.width) 100) }}
{{ end }}
{{- end -}}
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
<iframe src="{{ $url | safeHTMLAttr }}" title="{{ $title }}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
</iframe>
</div>
{{ else if eq $host "cloudinary" }}
{{ if not $account }}
{{ errorf "Missing account name for Cloudinary video '%s': %s" $id $position }}
{{ end }}
{{ $url := printf "https://player.cloudinary.com/embed/?cloud_name=%s&public_id=%s" $account $id }}
{{ $params := "&controls=true" }}
{{ if $autoplay }}{{ $params = print $params "&autoplay=true&muted=true" }}{{ end }}
{{ with $params }}{{ $url = print $url . }}{{ end }}
{{ $padding := "56.25%" }}
{{ $thumbnail := urls.JoinPath (path.Dir $id) (printf "%s.jpg" (path.BaseName $id)) }}
{{ $metadata := partial "assets/helpers/image-dimension.html" (dict
"page" $page
"url" (printf "https://res.cloudinary.com/%s/video/upload/%s" $account $thumbnail)
"ratio" $ratio
"imageset" false
) }}
{{ $height := index $metadata "height" }}
{{ $width := index $metadata "width" }}
{{ if and $height $width }}
{{ $padding := printf "%.2f%%" (mul (div (float $height) $width) 100) }}
{{ if not $title }}{{ $title = printf "Cloudinary video '%s'" (path.BaseName $id) }}{{ end }}
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
<iframe src="{{ $url | safeHTMLAttr }}" title="{{ $title }}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
</iframe>
</div>
{{ else }}
{{ errorf "Cannot retrieve metadata of Cloudinary video '%s' with account '%s': %s" $id $account $position }}
{{ end }}
{{ else }}
{{ warnf "partial [assets/video.html] - Unsupported video provider: %s" $host }}
{{ end }}
{{ end -}}

View File

@@ -27,5 +27,20 @@
{{- with index . "state" }}{{ $state = . }}{{ end -}}
{{- end -}}
{{- partial "footer/scripts.html" (dict "filename" $filename "match" $match "header" false "skipTemplate" $skipTemplate "state" $state "page" .) }}
{{ $localize := false }}
{{- if reflect.IsSlice $config.localize -}}
{{- if in $config.localize $mod}}
{{- $localize = true -}}
{{- end -}}
{{- end -}}
{{- partial "footer/scripts.html" (dict
"filename" $filename
"match" $match
"header" false
"skipTemplate" $skipTemplate
"state" $state
"localize" $localize
"page" page
) }}
{{- end -}}

View File

@@ -1,3 +1,18 @@
<!--
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" "scripts" "args" . "group" "partial") }}
{{- errorf "partial [footer/scripts.html] - Invalid arguments" -}}
{{ $error = true }}
{{ end }}
<!-- Initialize arguments -->
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
{{- $filename := .filename | default "js/main.bundle.js" -}}
{{- $match := .match | default "{js/*.js,js/vendor/**.js}" -}}
@@ -5,26 +20,41 @@
{{- $header := .header -}}
{{- $core := .core | default false -}}
{{- $skipTemplate := .skipTemplate | default false -}}
{{- $localize := .localize | default false }}
{{- $state := "async" -}}
{{- with .state }}{{ $state = . }}{{ end -}}
{{- $state := .state | default "async" -}}
{{- if or $header (eq $state "immediate") }}{{ $state = "" }}{{ end -}}
{{- $supportedStates := slice "defer" "async" "immediate" -}}
{{- if and $state (not (in $supportedStates $state)) -}}
{{- errorf "partial [footer/script.html] - Invalid value for param 'processing': %s" $state -}}
{{- end -}}
{{ $config := page.Scratch.Get "modules" }}
{{ if not $config }}
{{ errorf "partial [footer/scripts.html] - Cannot initialize module configuration" }}
{{ end }}
{{- $modules := "" -}}
{{ if $core }}
{{ $config := $page.Scratch.Get "modules" }}
{{ if not $config }}
{{ errorf "partial [footer/scripts.html] - Cannot initialize module configuration" }}
{{ end }}
{{- $modules = $config.core -}}
{{- if reflect.IsSlice $config.localize -}}
{{- range $index, $mod := $modules -}}
{{- if in $config.localize $mod}}
{{- $localize = true -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- $bundle := partial "utilities/bundle" (dict "match" $match "filename" $filename "modules" $modules "basepath" "js/modules" "all" true "debugging" site.Params.debugging.showJS) -}}
{{ if $localize }}
{{ $filename = path.Join (path.Dir $filename) (printf "%s.%s%s" (path.BaseName $filename) $page.Language.Lang (path.Ext $filename)) }}
{{ end }}
<!-- Main code -->
{{- $bundle := partial "utilities/bundle" (dict
"match" $match
"filename" $filename
"modules" $modules
"basepath" "js/modules"
"all" true
"debugging" site.Params.debugging.showJS
) -}}
{{- $js := $bundle -}}
{{- if not $skipTemplate -}}
{{- $js = $bundle | resources.ExecuteAsTemplate $filename $page -}}

View File

@@ -17,6 +17,8 @@
{{ end -}}
{{ end -}}
{{ $alt := slice .Site.Params.schema.twitter .Site.Params.schema.linkedin .Site.Params.schema.github }}
<script type="application/ld+json">
{
"@context": "https://schema.org",
@@ -31,17 +33,7 @@
{{ end -}}
"name": "{{ .Site.Params.schema.name }}",
"url": {{ print $baseURL }},
"sameAs": [
{{ with .Site.Params.schema.twitter -}}
{{ . }}
{{ end -}}
{{ with .Site.Params.schema.linkedin -}}
, {{ . }}
{{ end -}}
{{ with .Site.Params.schema.github -}}
, {{ . }}
{{ end -}}
],
"sameAs": {{ $alt | uniq | complement (slice "") }},
{{ if eq .Site.Params.schemaType "Organization" -}}
"logo": {
"@type": "ImageObject",
@@ -103,8 +95,8 @@
"@id": {{ print $baseURL "#/schema/person/1" }}
},
{{ end -}}
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05CET" }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}",
{{ with .Date }}"datePublished": "{{ .Format "2006-01-02T15:04:05CET" }}",{{ end -}}
{{ with .Lastmod }}"dateModified": "{{ .Format "2006-01-02T15:04:05CET" }}",{{ end -}}
"breadcrumb": {
"@id": {{ print .Permalink "#/schema/breadcrumb/1" }}
},
@@ -151,8 +143,8 @@
"mainEntityOfPage": {
"@id": {{ .Permalink }}
},
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05CET" }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}",
{{ with .Date }}"datePublished": "{{ .Format "2006-01-02T15:04:05CET" }}",{{ end -}}
{{ with .Lastmod }}"dateModified": "{{ .Format "2006-01-02T15:04:05CET" }}",{{ end -}}
"author": {
"@id": {{ print $baseURL "#/schema/person/2" }}
},

View File

@@ -40,7 +40,7 @@
{{- $actions = sort $actions "weight" "asc" -}}
<div class="hstack{{ if gt (len $actions) 1 }} gap-1{{ end }} justify-content-{{ $align}} pt-5 pt-md-3">
{{ range $actions }}
{{ partial "assets/button.html" (dict "href" .url "icon" .icon "title" .title "outline" .outline "order" "last" "justify" "start") }}
{{ partial "assets/button.html" (dict "href" .url "icon" .icon "label" .label "title" .title "outline" .outline "order" "last" "justify" "start") }}
{{ end }}
</div>
{{ end }}

View File

@@ -4,6 +4,7 @@
{{ $optional := slice }}
{{ $excludeSCSS := slice }}
{{ $disableTemplate := slice }}
{{ $localize := slice }}
{{ $modules := dict }}
{{ range $key, $mod := $page.Site.Params.modules }}
@@ -37,13 +38,24 @@
{{ $disableTemplate = $disableTemplate | append $key }}
{{ end }}
{{ if eq (index $mod "localize") true }}
{{ $localize = $localize | append $key }}
{{ end }}
{{ $modules = merge $modules (dict $key $mod) }}
{{ else }}
{{ warnf "Unsupported module parameter: %s" $key }}
{{ end }}
{{ end }}
{{ $modules := dict "modules" $modules "core" $core "optional" $optional "excludeSCSS" $excludeSCSS "disableTemplate" $disableTemplate }}
{{ $modules := dict
"modules" $modules
"core" $core
"optional" $optional
"excludeSCSS" $excludeSCSS
"disableTemplate" $disableTemplate
"localize" $localize
}}
{{- if and $page.IsPage (not (in $core "bootstrap")) -}}
{{- errorf "Bootstrap is a required module, please add it to 'modules.core' in your site parameters" -}}

View File

@@ -1,5 +1,3 @@
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
{{ $lastmodstr | i18n "lastModified" -}}
{{ with .GitInfo }}
&bull;&nbsp;<a href="{{ site.Params.docs.github | default site.Params.schema.github }}/commit/{{ .Hash }}">{{ .Subject }} ({{ .AbbreviatedHash }})</a>
{{ end -}}

View File

@@ -49,7 +49,7 @@
<!-- Main code -->
{{ $show := false -}}
{{ if not $error }}
{{ with .Get "show" }}{{ $show = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "show" }}{{ $show = partial "utilities/CastBool.html" (.Get "show") }}{{ end -}}
<div class="accordion-item">
{{- with $header -}}

View File

@@ -12,19 +12,25 @@
{{ $error = true }}
{{ end }}
<!-- Initialize arguments and default values -->
{{- $id := printf "accordion-%d" .Ordinal -}}
{{- $class := "" -}}
{{- $open := false -}}
{{- $body := .Inner -}}
{{ if .IsNamedParams }}
{{ with .Get "id" }}{{ $id = . }}{{ end }}
{{ with .Get "class" }}{{ $class = . }}{{ end }}
{{ if isset .Params "always-open" }}{{ $open = partial "utilities/CastBool.html" (.Get "always-open") }}{{ end -}}
{{ end }}
{{- if $open -}}
{{- $pattern := printf "data-bs-parent=\"#%s\"" $id -}}
{{- $body = (replace .Inner $pattern "") }}
{{- end -}}
<!-- Main code -->
{{ if not $error }}
{{- $id := printf "accordion-%d" .Ordinal -}}
{{ with .Get "id" }}{{ $id = . }}{{ end }}
{{- $class := .Get "class" | default "" -}}
{{- $open := false -}}
{{ with .Get "always-open" }}{{ $open = partial "utilities/CastBool.html" . }}{{ end -}}
{{- $body := .Inner -}}
{{- if $open -}}
{{- $pattern := printf "data-bs-parent=\"#%s\"" $id -}}
{{- $body = (replace .Inner $pattern "") }}
{{- end -}}
<div id="{{ $id }}" class="accordion mb-3{{ with $class }} {{ . }}{{ end }}">
{{- $body | safeHTML -}}
</div>

View File

@@ -27,7 +27,9 @@
{{ $icon = partial "assets/icon.html" (dict "icon" (printf "%s fa-2x fa-fw" .)) }}
{{ end }}
{{ $dismissible := false -}}
{{ with .Get "dismissible" }}{{ $dismissible = partial "utilities/CastBool.html" . }}{{ end -}}
{{- if and .IsNamedParams (isset .Params "dismissible") }}
{{ $dismissible = partial "utilities/CastBool.html" (.Get "dismissible") }}
{{ end }}
{{- $class := .Get "class" | default "" -}}
{{ $body := trim .Inner " \r\n" -}}

View File

@@ -28,7 +28,9 @@
{{ end }}
{{ $parent := false -}}
{{ with .Get "parent" }}{{ $parent = partial "utilities/CastBool.html" . }}{{ end -}}
{{- if .IsNamedParams }}
{{ if isset .Params "parent" }}{{ $parent = partial "utilities/CastBool.html" (.Get "parent") }}{{ end -}}
{{ end }}
<!-- Main code -->
{{ if not $error }}

View File

@@ -26,7 +26,7 @@
{{ $size := .Get "size" | default "md" -}}
{{ $color := .Get "color" | default "primary" -}}
{{ $outline := false -}}
{{ with .Get "outline" }}{{ $outline = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "outline" }}{{ $outline = partial "utilities/CastBool.html" (.Get "outline") }}{{ end -}}
{{ $badge := .Get "badge" | default "" -}}
{{ $label := or (.Get "label") (.Get "aria-label") | default "" -}}
{{ $tooltip := .Get "tooltip" | default "" -}}
@@ -43,11 +43,11 @@
{{- $order := .Get "order" | default "last" -}}
{{- $justify := .Get "justify" | default "center" -}}
{{- $cue := site.Params.main.externalLinks.cue -}}
{{ with .Get "cue" }}{{ $show = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "cue" }}{{ $cue = partial "utilities/CastBool.html" (.Get "cue") }}{{ end -}}
{{- $tab := default site.Params.main.externalLinks.tab -}}
{{ with .Get "tab" }}{{ $show = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "tab" }}{{ $tab = partial "utilities/CastBool.html" (.Get "tab") }}{{ end -}}
{{- $spacing := default (not .Parent) -}}
{{ with .Get "spacing" }}{{ $show = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "spacing" }}{{ $spacing = partial "utilities/CastBool.html" (.Get "spacing") }}{{ end -}}
<!-- Main code -->
{{ if not $error }}

View File

@@ -32,6 +32,7 @@
{{- $page := .Page -}}
{{- $path := .Get "path" -}}
{{- $thumbnail := .Get "thumbnail" -}}
{{- $anchor := .Get "anchor" -}}
{{- $title := .Get "title" -}}
{{- $button := partial "utilities/GetArgParent" (dict "page" . "arg" "button") | default false -}}
{{- $buttonType := partial "utilities/GetArgParent" (dict "page" . "arg" "buttonType") | default "" -}}
@@ -81,6 +82,7 @@
"wrapper" $wrapper
"thumbnail" $thumbnail
"loading" $loading
"anchor" $anchor
"alt" $alt
"button" $button
"buttonType" $buttonType

View File

@@ -49,8 +49,10 @@
{{- errorf "File format not supported (line %s): %s" .Position $file -}}
{{- end -}}
{{ $show := .Get "show" | default true -}}
{{ $full := .Get "full" | default true -}}
{{- $show := true -}}
{{ if isset .Params "show" }}{{ $show = partial "utilities/CastBool.html" (.Get "show") }}{{ end -}}
{{- $full := true -}}
{{ if isset .Params "full" }}{{ $full = partial "utilities/CastBool.html" (.Get "full") }}{{ end -}}
{{- $class := .Get "class" | default "" -}}
<!-- Main code -->

View File

@@ -33,8 +33,10 @@
{{- $extension := strings.TrimLeft "." (path.Ext $file) }}
{{- $lang := .Get "lang" | default $extension -}}
{{- $id := .Get "id" | default (printf "file-collapse-%d" .Ordinal) -}}
{{ $show := .Get "show" | default true -}}
{{ $full := .Get "full" | default true -}}
{{- $show := true -}}
{{ if isset .Params "show" }}{{ $show = partial "utilities/CastBool.html" (.Get "show") }}{{ end -}}
{{- $full := true -}}
{{ if isset .Params "full" }}{{ $full = partial "utilities/CastBool.html" (.Get "full") }}{{ end -}}
{{- $class := .Get "class" | default "" -}}
<!-- Main code -->

View File

@@ -25,6 +25,7 @@
{{- $loading := "" -}}
{{- $error := false -}}
{{- $plain := false -}}
{{- $anchor := "" -}}
{{- if .IsNamedParams -}}
{{ $url = .Get "src" | default "" -}}
@@ -36,9 +37,10 @@
{{ $title = .Get "title" | default "" -}}
{{ $caption = .Get "caption" | default "" -}}
{{ $figclass = .Get "figclass" | default "" -}}
{{ with .Get "mode" }}{{ $mode = partial "utilities/CastBool.html" . }}{{ end -}}
{{ with .Get "portrait" }}{{ $portrait = partial "utilities/CastBool.html" . }}{{ end -}}
{{ with .Get "plain" }}{{ $plain = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "mode" }}{{ $mode = partial "utilities/CastBool.html" (.Get "mode") }}{{ end -}}
{{ if isset .Params "portrait" }}{{ $portrait = partial "utilities/CastBool.html" (.Get "portrait") }}{{ end -}}
{{ if isset .Params "plain" }}{{ $plain = partial "utilities/CastBool.html" (.Get "plain") }}{{ end -}}
{{ $anchor = .Get "anchor" | default "" -}}
{{ else -}}
{{ $url = .Get 0 }}
{{ end -}}
@@ -61,6 +63,7 @@
"mode" $mode
"portrait" $portrait
"plain" $plain
"anchor" $anchor
"loading" $loading
"page" .Page)
-}}

View File

@@ -80,8 +80,14 @@
{{- if not $isExternal -}}
{{ $ref := partial "utilities/GetPage.html" (dict "url" $url "page" .Page) }}
{{- if not $ref -}}
{{- errorf "Cannot find page: '%s' at %s" $url .Position -}}
{{- $error = true -}}
{{ $pageContext := "" }}
{{ with .Page.File }}{{ $pageContext = path.Join "/content" .Dir }}{{ end }}
{{ $isPageRes := fileExists (path.Join $pageContext $url) }}
{{ $isStatic := fileExists (path.Join "/static" $url) }}
{{ if and (not $isPageRes) (not $isStatic) }}
{{- errorf "Cannot find page or asset: '%s' at %s" $url .Position -}}
{{- $error = true -}}
{{ end }}
{{- end -}}
{{- end -}}

View File

@@ -24,9 +24,9 @@
{{- end -}}
{{- $fade := false -}}
{{ with .Get "fade" }}{{ $fade = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "fade" }}{{ $fade = partial "utilities/CastBool.html" (.Get "fade") }}{{ end -}}
{{- $parentFade := false }}
{{ with .Parent.Get "fade" }}{{ $parentFade = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Parent.Params "fade" }}{{ $parentFade = partial "utilities/CastBool.html" (.Parent.Get "fade") }}{{ end -}}
{{ $fade = or $fade $parentFade }}
{{- $header := .Get "header" | default "" -}}
{{- $class := .Get "class" | default "" -}}

View File

@@ -19,9 +19,9 @@
{{ $supportedNavTypes := slice "tabs" "pills" "underline" "callout" -}}
{{ $vertical := false -}}
{{ with .Get "vertical" }}{{ $vertical = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "vertical" }}{{ $vertical = partial "utilities/CastBool.html" (.Get "vertical") }}{{ end -}}
{{ $wrap := false -}}
{{ with .Get "wrap" }}{{ $wrap = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "wrap" }}{{ $wrap = partial "utilities/CastBool.html" (.Get "wrap") }}{{ end -}}
{{- if and (eq $type "tabs") $vertical -}}
{{- errorf "Tabs do not support vertical layout" -}}

View File

@@ -29,9 +29,9 @@
{{ if eq $style "light" }}{{ $inverseStyle = "dark" }}{{ end -}}
{{ $color := .Get "color" | default "" -}}
{{ $searchParam := true -}}
{{ with .Get "search" }}{{ $searchParam = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "search" }}{{ $searchParam = partial "utilities/CastBool.html" (.Get "search") }}{{ end -}}
{{ $modeParam := true -}}
{{ with .Get "mode" }}{{ $modeParam = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "mode" }}{{ $modeParam = partial "utilities/CastBool.html" (.Get "mode") }}{{ end -}}
{{ $logo := .Get "logo" | default "" -}}
{{ $title := .Get "title" | default "" -}}
{{- $class := .Get "class" | default "" -}}

View File

@@ -16,9 +16,9 @@
{{- $version := .Get "version" | default "" -}}
{{- $state := .Get "state" | default "new" -}}
{{- $short := false -}}
{{ with .Get "short" }}{{ $short = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "short" }}{{ $short = partial "utilities/CastBool.html" (.Get "short") }}{{ end -}}
{{- $inline := false -}}
{{ with .Get "inline" }}{{ $inline = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "inline" }}{{ $inline = partial "utilities/CastBool.html" (.Get "inline") }}{{ end -}}
{{- $title := $version -}}
{{- $color := "primary" -}}
{{- if eq $state "deprecated" -}}
@@ -26,6 +26,7 @@
{{- end -}}
{{- $size := .Get "size" | default "md" -}}
{{- $class := .Get "class" | default "" -}}
{{- $type := .Get "type" | default "button" -}}
{{- $icon := "" -}}
{{- $tooltip := "" -}}
@@ -55,19 +56,24 @@
<!-- Main code -->
{{- if not $error -}}
{{- if not $inline }}<div class="pb-3">{{ end -}}
{{- partial "assets/button.html" (dict
"title" $title
"href" (partial "partials/utilities/URLJoin.html" (dict "base" site.Params.docs.release "path" $version))
"size" "sm"
"color" $color
"outline" "true"
"size" $size
"icon" $icon
"tooltip" $tooltip
"order" "first"
"class" (trim (printf "rounded-2 fw-semibold %s" $class) " ")
"spacing" $inline)
-}}
{{- if not $inline }}</div>{{ end -}}
{{ $href := partial "partials/utilities/URLJoin.html" (dict "base" site.Params.docs.release "path" $version) }}
{{ if eq $type "link" }}
{{ partial "assets/link.html" (dict "destination" $href "text" $title "page" .Page) }}
{{ else }}
{{- if not $inline }}<div class="pb-3">{{ end -}}
{{- partial "assets/button.html" (dict
"title" $title
"href" $href
"size" "sm"
"color" $color
"outline" "true"
"size" $size
"icon" $icon
"tooltip" $tooltip
"order" "first"
"class" (trim (printf "rounded-2 fw-semibold %s" $class) " ")
"spacing" $inline)
-}}
{{- if not $inline }}</div>{{ end -}}
{{ end }}
{{- end -}}

View File

@@ -15,7 +15,7 @@
<!-- Initialize arguments -->
{{ $color := .Get "color" | default "primary" -}}
{{ $grow := false -}}
{{ with .Get "grow" }}{{ $grow = partial "utilities/CastBool.html" . }}{{ end -}}
{{ if isset .Params "grow" }}{{ $grow = partial "utilities/CastBool.html" (.Get "grow") }}{{ end -}}
{{ $class := .Get "class" | default "" -}}
<!-- Main code -->

View File

@@ -22,9 +22,9 @@
{{- if .IsNamedParams -}}
{{ $breakpoint = .Get "breakpoint" }}
{{ $class = .Get "class" | default "" }}
{{ with (.Get "sortable")}} {{ $sortable = partial "utilities/CastBool.html" . }}{{ end }}
{{ with (.Get "paging")}} {{ $paging = partial "utilities/CastBool.html" . }}{{ end }}
{{ with (.Get "searchable")}} {{ $searchable = partial "utilities/CastBool.html" . }}{{ end }}
{{ if isset .Params "sortable" }}{{ $sortable = partial "utilities/CastBool.html" (.Get "sortable") }}{{ end }}
{{ if isset .Params "paging" }}{{ $paging = partial "utilities/CastBool.html" (.Get "paging") }}{{ end }}
{{ if isset .Params "searchable" }}{{ $searchable = partial "utilities/CastBool.html" (.Get "searchable") }}{{ end }}
{{ else }}
{{ $breakpoint = .Get 0 }}
{{ end }}

View File

@@ -0,0 +1,50 @@
<!--
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" "video" "args" .Params "group" "shortcode") }}
{{ errorf "Invalid arguments: %s" .Position -}}
{{ $error = true }}
{{ end }}
<!-- Initialize arguments -->
{{- $host := "youtube" -}}
{{- $account := "" -}}
{{- $id := "" -}}
{{- $class := "" -}}
{{- $title := "" }}
{{- $autoplay := false }}
{{- $autotitle := false }}
{{- if .IsNamedParams }}
{{ with .Get "host" }}{{ $host = . }}{{ end }}
{{ with .Get "account" }}{{ $account = . }}{{ end }}
{{ with .Get "id" }}{{ $id = . }}{{ end }}
{{ with .Get "class" }}{{ $class = . }}{{ end }}
{{ with .Get "title" }}{{ $title = . }}{{ end }}
{{ if isset .Params "autoplay" }}{{ $autoplay = partial "utilities/CastBool.html" (.Get "autoplay") }}{{ end -}}
{{ if isset .Params "autotitle" }}{{ $autotitle = partial "utilities/CastBool.html" (.Get "autotitle") }}{{ end -}}
{{ else }}
{{- $id = .Get 0 -}}
{{- $class = .Get 1 -}}
{{ end }}
<!-- Main code -->
{{ if not $error -}}
{{ partial "assets/video.html" (dict
"page" .Page
"position" .Position
"account" $account
"host" $host
"id" $id
"class" $class
"title" $title
"autoplay" $autoplay
"autotitle" $autotitle
) }}
{{ end -}}

View File

@@ -0,0 +1,46 @@
<!--
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" "video" "args" .Params "group" "shortcode") }}
{{ errorf "Invalid arguments: %s" .Position -}}
{{ $error = true }}
{{ end }}
<!-- Initialize arguments -->
{{- $host := "vimeo" -}}
{{- $id := "" -}}
{{- $class := "" -}}
{{- $title := "Vimeo Video" }}
{{- $autoplay := false }}
{{- $autotitle := false }}
{{- if .IsNamedParams }}
{{ with .Get "id" }}{{ $id = . }}{{ end }}
{{ with .Get "class" }}{{ $class = . }}{{ end }}
{{ with .Get "title" }}{{ $title = . }}{{ end }}
{{ if isset .Params "autoplay" }}{{ $autoplay = partial "utilities/CastBool.html" (.Get "autoplay") }}{{ end -}}
{{ if isset .Params "autotitle" }}{{ $autotitle = partial "utilities/CastBool.html" (.Get "autotitle") }}{{ end -}}
{{ else }}
{{- $id = .Get 0 -}}
{{- $class = .Get 1 -}}
{{ end }}
<!-- Main code -->
{{ if not $error -}}
{{ partial "assets/video.html" (dict
"page" .Page
"position" .Position
"host" $host
"id" $id
"class" $class
"title" $title
"autoplay" $autoplay
"autotitle" $autotitle
) }}
{{ end -}}

View File

@@ -2,40 +2,45 @@
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.
This source code adapts the original embedded shortcode as maintained by the Hugo repository. It introduces the
following modifications:
- Isolated the styles to comply with the Content Security Policy
- Added validation of shortcode arguments
- Modified the layout
The original source code is available on:
https://github.com/gohugoio/hugo/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
Copyright 2022 The Hugo Authors. Licensed under the Apache License, Version 2.0.
-->
{{- $pc := .Page.Site.Config.Privacy.YouTube -}}
{{- if not $pc.Disable -}}
{{ $error := false }}
{{ $error := false }}
<!-- Validate arguments -->
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "youtube" "args" .Params) }}
{{ errorf "Invalid arguments: %s" .Position -}}
{{ $error = true }}
{{ end }}
<!-- Initialize arguments -->
{{- $id := .Get "id" | default (.Get 0) -}}
{{- $class := .Get "class" | default (.Get 1) -}}
{{- $title := .Get "title" | default "YouTube Video" }}
{{- $autoplay := false }}
{{ with .Get "autoplay" }}{{ $autoplay = partial "utilities/CastBool.html" . }}{{ end -}}
{{- $host := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
<!-- Main code -->
<div class="youtube-embedded {{ $class }}">
<iframe src="https://{{ $host }}/embed/{{ $id }}?origin={{ .Site.BaseURL }}{{ if $autoplay }}&autoplay=1{{ end }}"
allowfullscreen title="{{ $title }}">
</iframe>
</div>
{{ end -}}
<!-- Validate arguments -->
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "video" "args" .Params "group" "shortcode") }}
{{ errorf "Invalid arguments: %s" .Position -}}
{{ $error = true }}
{{ end }}
<!-- Initialize arguments -->
{{- $host := "youtube" -}}
{{- $id := "" -}}
{{- $class := "" -}}
{{- $title := "YouTube Video" }}
{{- $autoplay := false }}
{{- $autotitle := false }}
{{- if .IsNamedParams }}
{{ with .Get "id" }}{{ $id = . }}{{ end }}
{{ with .Get "class" }}{{ $class = . }}{{ end }}
{{ with .Get "title" }}{{ $title = . }}{{ end }}
{{ if isset .Params "autoplay" }}{{ $autoplay = partial "utilities/CastBool.html" (.Get "autoplay") }}{{ end -}}
{{ if isset .Params "autotitle" }}{{ $autotitle = partial "utilities/CastBool.html" (.Get "autotitle") }}{{ end -}}
{{ else }}
{{- $id = .Get 0 -}}
{{- $class = .Get 1 -}}
{{ end }}
<!-- Main code -->
{{ if not $error -}}
{{ partial "assets/video.html" (dict
"page" .Page
"position" .Position
"host" $host
"id" $id
"class" $class
"title" $title
"autoplay" $autoplay
"autotitle" $autotitle
) }}
{{ end -}}

View File

@@ -39,9 +39,13 @@
{{ $lastYear := $.Scratch.Get "lastYear"}}
<div class="row mt-2">
<div class="d-none d-{{ $breakpoint.prev }}-block col-{{ $breakpoint.prev }}-3 mt-auto text-right">
<time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ (partial "utilities/date.html" (dict "date" .Date "format" "medium")) }}
</time>
{{ with .Date }}
<time class="post-date" datetime="{{ .Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ (partial "utilities/date.html" (dict "date" . "format" "medium")) }}
</time>
{{ else }}
-
{{ end }}
</div>
<div class="col">
{{ if ne $year $lastYear }}

View File

@@ -4,12 +4,12 @@
command = "npm run build:example"
[build.environment]
DART_SASS_VERSION = "1.77.0"
HUGO_VERSION = "0.125.7"
DART_SASS_VERSION = "1.77.5"
HUGO_VERSION = "0.131.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
NODE_VERSION = "18.20.2"
NPM_VERSION = "10.5.0"
NODE_VERSION = "20.16.0"
NPM_VERSION = "10.8.1"
# toml-docs-end netlify
[[headers]]
@@ -31,7 +31,7 @@
connect-src 'self'
https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \
font-src 'self' https://*.netlify.app https://fonts.gstatic.com; \
frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com \
frame-src 'self' https://player.cloudinary.com https://player.vimeo.com https://www.youtube-nocookie.com https://www.youtube.com \
app.netlify.com; \
img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://*.netlify.app https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \
manifest-src 'self'; \
@@ -47,7 +47,6 @@
camera=(), \
magnetometer=(), \
gyroscope=(), \
fullscreen=(), \
payment=() \
"""
cache-control = """\

Some files were not shown because too many files have changed in this diff Show More