mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 18:14:28 +00:00
Compare commits
125 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
92dc97d325 | ||
![]() |
2394f148e5 | ||
![]() |
8d259a3e3a | ||
![]() |
1c8912e92e | ||
![]() |
207c08431f | ||
![]() |
d2703d4885 | ||
![]() |
4728191370 | ||
![]() |
cd40d75962 | ||
![]() |
2d4732d03b | ||
![]() |
e3c256b41f | ||
![]() |
f0a53f252c | ||
![]() |
a1273d99d5 | ||
![]() |
4e62956c82 | ||
![]() |
cf096a7f6a | ||
![]() |
ee790dc6fd | ||
![]() |
df9bc9ed6c | ||
![]() |
69338b4abf | ||
![]() |
c206054dc8 | ||
![]() |
a2bcba5916 | ||
![]() |
788b68f6bc | ||
![]() |
73697f43aa | ||
![]() |
129df382cd | ||
![]() |
c15eb4edc3 | ||
![]() |
12725caa1c | ||
![]() |
6077c33fcc | ||
![]() |
b944d818c8 | ||
![]() |
f25fbb3440 | ||
![]() |
0b9d43f130 | ||
![]() |
884da31fd0 | ||
![]() |
6dbfb0ac64 | ||
![]() |
3bef9579b4 | ||
![]() |
0ea1f92d4c | ||
![]() |
77d44d44c6 | ||
![]() |
e8c1eac2af | ||
![]() |
2f992b82cf | ||
![]() |
fe70b24859 | ||
![]() |
d18f0469fc | ||
![]() |
497c5d0e5e | ||
![]() |
834435db00 | ||
![]() |
3d8195e24b | ||
![]() |
ce31587f22 | ||
![]() |
6342ae1a33 | ||
![]() |
88eb894fde | ||
![]() |
8870668c21 | ||
![]() |
cd379fa8d7 | ||
![]() |
fd029492f7 | ||
![]() |
29b0d6f978 | ||
![]() |
bed2afe44d | ||
![]() |
8c3ea99429 | ||
![]() |
d8929da5ec | ||
![]() |
4a5e8c7311 | ||
![]() |
600b487f43 | ||
![]() |
ed013e9b6f | ||
![]() |
5a299a73dc | ||
![]() |
bf76ee7108 | ||
![]() |
7a1c3970ea | ||
![]() |
a679b1c7e0 | ||
![]() |
bb448f3194 | ||
![]() |
b017a0a785 | ||
![]() |
00d141a4da | ||
![]() |
88dfc50c50 | ||
![]() |
61ad1106c5 | ||
![]() |
f47d738577 | ||
![]() |
323f36a514 | ||
![]() |
151b1d2230 | ||
![]() |
f58f8f1a0a | ||
![]() |
7c786048cc | ||
![]() |
2c0a34c0e1 | ||
![]() |
b6320787e7 | ||
![]() |
c695e0a1f5 | ||
![]() |
8acd6538a5 | ||
![]() |
e18bb8f1b2 | ||
![]() |
d74f9565e4 | ||
![]() |
3016267a7b | ||
![]() |
d1b347b46f | ||
![]() |
777440ef22 | ||
![]() |
f104ff1519 | ||
![]() |
a7a0d26b27 | ||
![]() |
058cebb0b4 | ||
![]() |
af146e3989 | ||
![]() |
69c306bb69 | ||
![]() |
1cfe6190b6 | ||
![]() |
4b40e66534 | ||
![]() |
96af9412b3 | ||
![]() |
1ec9568997 | ||
![]() |
9a0f907bd4 | ||
![]() |
1d59a914b8 | ||
![]() |
91090aa87e | ||
![]() |
e1a3109a95 | ||
![]() |
c53d653751 | ||
![]() |
e95b99a742 | ||
![]() |
548f1f7107 | ||
![]() |
0a59f1ea2b | ||
![]() |
4b96b405ec | ||
![]() |
aaa6ced022 | ||
![]() |
0582716f19 | ||
![]() |
71df26f256 | ||
![]() |
8db0f6585e | ||
![]() |
0d703ac531 | ||
![]() |
55d73b3fbd | ||
![]() |
741bff8a8a | ||
![]() |
f8dcebb14d | ||
![]() |
d054c3e07f | ||
![]() |
c962f93dda | ||
![]() |
2bea049d20 | ||
![]() |
407a7b3703 | ||
![]() |
e57e8d32cb | ||
![]() |
417475643c | ||
![]() |
99801eb90a | ||
![]() |
28a061e4ee | ||
![]() |
be776f10a8 | ||
![]() |
57bfea7b71 | ||
![]() |
9126df161a | ||
![]() |
6ced4573b0 | ||
![]() |
be38c8eab7 | ||
![]() |
cab8e0e9f1 | ||
![]() |
e1378b9f92 | ||
![]() |
23d051e6bc | ||
![]() |
c3c1b4b246 | ||
![]() |
caa3a2a7c7 | ||
![]() |
f235eb42b6 | ||
![]() |
7aae640999 | ||
![]() |
7c606ef48c | ||
![]() |
cca70f538c | ||
![]() |
ac8f0c3e95 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
|||||||
/_vendor
|
_vendor/
|
||||||
public/
|
public/
|
||||||
resources/
|
resources/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
@@ -39,6 +39,8 @@
|
|||||||
@import "components/toc.scss";
|
@import "components/toc.scss";
|
||||||
@import "components/video.scss";
|
@import "components/video.scss";
|
||||||
@import "common/animation.scss";
|
@import "common/animation.scss";
|
||||||
|
@import "common/masonry.scss";
|
||||||
|
@import "common/scrollbar.scss";
|
||||||
@import "common/styles.scss";
|
@import "common/styles.scss";
|
||||||
@import "layouts/reboot.scss";
|
@import "layouts/reboot.scss";
|
||||||
@import "layouts/type.scss";
|
@import "layouts/type.scss";
|
||||||
|
@@ -37,6 +37,8 @@
|
|||||||
@import "components/toc.scss";
|
@import "components/toc.scss";
|
||||||
@import "components/video.scss";
|
@import "components/video.scss";
|
||||||
@import "common/animation.scss";
|
@import "common/animation.scss";
|
||||||
|
@import "common/masonry.scss";
|
||||||
|
@import "common/scrollbar.scss";
|
||||||
@import "common/styles.scss";
|
@import "common/styles.scss";
|
||||||
@import "layouts/reboot.scss";
|
@import "layouts/reboot.scss";
|
||||||
@import "layouts/type.scss";
|
@import "layouts/type.scss";
|
||||||
|
38
assets/scss/common/_masonry.scss
Normal file
38
assets/scss/common/_masonry.scss
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
.masonry {
|
||||||
|
--masonry-padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0 var(--masonry-padding);
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-col {
|
||||||
|
flex: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 0 var(--masonry-padding);
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-col div {
|
||||||
|
margin-top: calc(2 * var(--masonry-padding));
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
$utilities: map-merge(
|
||||||
|
$utilities,
|
||||||
|
(
|
||||||
|
"m-col": (
|
||||||
|
property: max-width,
|
||||||
|
responsive: true,
|
||||||
|
class: m-col,
|
||||||
|
values: (
|
||||||
|
1: 100%,
|
||||||
|
2: 50%,
|
||||||
|
3: 33.3%,
|
||||||
|
4: 25%,
|
||||||
|
5: 20%,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
34
assets/scss/common/_scrollbar.scss
Normal file
34
assets/scss/common/_scrollbar.scss
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
@mixin scrollbar(
|
||||||
|
$foreground-color: var(--bs-primary),
|
||||||
|
$background-color: var(--bs-tertiary-bg),
|
||||||
|
$size: 10px
|
||||||
|
) {
|
||||||
|
// For Safari and Chrome (to force appearance in Chrome)
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: $size;
|
||||||
|
height: $size;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: calc($size / 2);
|
||||||
|
background: $foreground-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
border-radius: calc($size / 2);
|
||||||
|
background: $background-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Standard version (Firefox, only appears on scroll)
|
||||||
|
@supports (-moz-appearance:none) {
|
||||||
|
scrollbar-color: $foreground-color $background-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollbar-horizontal
|
||||||
|
{
|
||||||
|
@include scrollbar;
|
||||||
|
|
||||||
|
overflow-x: scroll;
|
||||||
|
margin: auto;
|
||||||
|
}
|
@@ -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: map-merge(
|
||||||
$utilities,
|
$utilities,
|
||||||
(
|
(
|
||||||
|
@@ -97,3 +97,56 @@
|
|||||||
.card-button-link {
|
.card-button-link {
|
||||||
text-decoration: underline if($enable-important-utilities, !important, null);
|
text-decoration: underline if($enable-important-utilities, !important, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// support horizontally scrollable card groups
|
||||||
|
.card-container-wrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.card-container-wrapper::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
height: calc(100% - 2rem);
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bs-body-bg) 0%,
|
||||||
|
transparent 1.5rem,
|
||||||
|
transparent calc(100% - 1.5rem),
|
||||||
|
var(--bs-body-bg) 100%
|
||||||
|
);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-container {
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
padding-right: 1.5rem;
|
||||||
|
gap: 1.5rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
scroll-snap-type: x proximity;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-1 {
|
||||||
|
width: 80%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-2 {
|
||||||
|
width: 40%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-3 {
|
||||||
|
width: 27%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-4 {
|
||||||
|
width: 20%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-block-5 {
|
||||||
|
width: 16%;
|
||||||
|
scroll-snap-align: center;
|
||||||
|
}
|
||||||
|
@@ -1,3 +1,16 @@
|
|||||||
|
.datatable-container {
|
||||||
|
border-bottom: none if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
.datatable-bottom {
|
||||||
|
padding-top: 0 if($enable-important-utilities, !important, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
.datatable-sorter {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
@if $enable-dark-mode {
|
@if $enable-dark-mode {
|
||||||
@include color-mode(dark) {
|
@include color-mode(dark) {
|
||||||
.table-striped, .table-striped-columns {
|
.table-striped, .table-striped-columns {
|
||||||
@@ -9,5 +22,13 @@
|
|||||||
--bs-table-hover-bg: var(--bs-tertiary-bg);
|
--bs-table-hover-bg: var(--bs-tertiary-bg);
|
||||||
--bs-table-striped-color: var(--bs-body-color);
|
--bs-table-striped-color: var(--bs-body-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.datatable-pagination-list-item {
|
||||||
|
&:hover,
|
||||||
|
&:focus,
|
||||||
|
&.datatable-active {
|
||||||
|
color: var(--bs-body-bg) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -134,6 +134,8 @@ home = ["HTML", "RSS", "REDIR"]
|
|||||||
path = "github.com/gethinode/mod-leaflet"
|
path = "github.com/gethinode/mod-leaflet"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "github.com/gethinode/mod-lottie"
|
path = "github.com/gethinode/mod-lottie"
|
||||||
|
[[module.imports]]
|
||||||
|
path = "github.com/gethinode/mod-simple-datatables"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "github.com/gethinode/mod-utils/v2"
|
path = "github.com/gethinode/mod-utils/v2"
|
||||||
# toml-docs-end modules
|
# toml-docs-end modules
|
||||||
|
@@ -27,6 +27,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
|
|||||||
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
|
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
|
||||||
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
|
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
|
||||||
'./_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss',
|
'./_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss',
|
||||||
|
'./_vendor/github.com/gethinode/mod-simple-datatables/dist/simple-datatables.scss',
|
||||||
'./_vendor/github.com/twbs/bootstrap/scss/_carousel.scss',
|
'./_vendor/github.com/twbs/bootstrap/scss/_carousel.scss',
|
||||||
'./_vendor/github.com/twbs/bootstrap/scss/_dropdown.scss',
|
'./_vendor/github.com/twbs/bootstrap/scss/_dropdown.scss',
|
||||||
'./_vendor/github.com/twbs/bootstrap/scss/_modal.scss',
|
'./_vendor/github.com/twbs/bootstrap/scss/_modal.scss',
|
||||||
|
@@ -92,7 +92,8 @@ arguments:
|
|||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Flag to indicate a horizontal line should be added between items on small screens.
|
Flag to indicate a horizontal line should be added between items on small
|
||||||
|
screens.
|
||||||
wrapper:
|
wrapper:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
@@ -102,7 +103,8 @@ arguments:
|
|||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Flag indicating if the number of columns should be responsive, defaults to `true`.
|
Flag indicating if the number of columns should be responsive, defaults to
|
||||||
|
`true`.
|
||||||
buttonType:
|
buttonType:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
@@ -113,6 +115,20 @@ arguments:
|
|||||||
values:
|
values:
|
||||||
- link
|
- link
|
||||||
- button
|
- button
|
||||||
|
scroll:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Enables horizontal scrolling of the cards. By default, the card group
|
||||||
|
wraps any cards beyond the amount of defined columns to a new line. When
|
||||||
|
`scroll` is set to true, a horizontal scroll bar is added instead.
|
||||||
|
spacer:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Inserts a spacer before the card.
|
||||||
|
release: v0.24.16
|
||||||
|
group: partial
|
||||||
hook:
|
hook:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -90,6 +90,18 @@ arguments:
|
|||||||
- publication
|
- publication
|
||||||
- tags
|
- tags
|
||||||
- none
|
- none
|
||||||
|
body:
|
||||||
|
type: select
|
||||||
|
optional: true
|
||||||
|
default: full
|
||||||
|
parent: cascade
|
||||||
|
release: v0.24.16
|
||||||
|
comment: >-
|
||||||
|
Body of the card.
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- full
|
||||||
|
- none
|
||||||
footer:
|
footer:
|
||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
@@ -146,6 +158,16 @@ arguments:
|
|||||||
- 16x9
|
- 16x9
|
||||||
- 21x9
|
- 21x9
|
||||||
group: partial
|
group: partial
|
||||||
|
portrait:
|
||||||
|
type: bool
|
||||||
|
parent: cascade
|
||||||
|
optional: true
|
||||||
|
default: false
|
||||||
|
release: v0.24.16
|
||||||
|
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.
|
||||||
alt:
|
alt:
|
||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
@@ -157,6 +179,12 @@ arguments:
|
|||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Font Awesome icon, displayed on top or the left of the card.
|
Font Awesome icon, displayed on top or the left of the card.
|
||||||
|
iconRounded:
|
||||||
|
type: bool
|
||||||
|
parent: cascade
|
||||||
|
optional: true
|
||||||
|
release: v0.24.8
|
||||||
|
comment: Stack the icon in a round container.
|
||||||
align:
|
align:
|
||||||
type: select
|
type: select
|
||||||
parent: cascade
|
parent: cascade
|
||||||
@@ -169,6 +197,19 @@ arguments:
|
|||||||
- start
|
- start
|
||||||
- end
|
- end
|
||||||
- center
|
- center
|
||||||
|
scroll:
|
||||||
|
type: bool
|
||||||
|
parent: cascade
|
||||||
|
optional: true
|
||||||
|
group: partial
|
||||||
|
comment: >-
|
||||||
|
Enables horizontal scrolling of the cards. By default, the card group
|
||||||
|
wraps any cards beyond the amount of defined columns to a new line. When
|
||||||
|
`scroll` is set to true, a horizontal scroll bar is added instead.
|
||||||
|
wrapper:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
comment: Element class of the card wrapper.
|
||||||
style:
|
style:
|
||||||
type: string
|
type: string
|
||||||
parent: cascade
|
parent: cascade
|
||||||
@@ -230,6 +271,25 @@ arguments:
|
|||||||
One or more strings separated by commas, indicating the source sizes of an
|
One or more strings separated by commas, indicating the source sizes of an
|
||||||
image set.
|
image set.
|
||||||
group: partial
|
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:
|
body:
|
||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
|
@@ -60,3 +60,20 @@ arguments:
|
|||||||
type: int
|
type: int
|
||||||
optional: false
|
optional: false
|
||||||
comment: Width of the image in pixels.
|
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
|
||||||
|
|
||||||
|
@@ -138,3 +138,22 @@ arguments:
|
|||||||
Flag to indicate if the image should render a plain image instead of an
|
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.
|
image set. When set, no transformations are applied to the image.
|
||||||
release: v0.24.0
|
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
|
||||||
|
@@ -32,3 +32,8 @@ arguments:
|
|||||||
comment: >-
|
comment: >-
|
||||||
Flag to indicate if an external link should open in a new tab, defaults
|
Flag to indicate if an external link should open in a new tab, defaults
|
||||||
to setting `main.externalLinks.tab` in the site's parameters.
|
to setting `main.externalLinks.tab` in the site's parameters.
|
||||||
|
plain:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Renders the navigation item as plain item, ignoring any children.
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
comment: >-
|
comment: >-
|
||||||
Makes a markdown table responsive. Responsive tables scroll horizontally to
|
Makes a markdown table responsive. Responsive tables scroll horizontally to
|
||||||
improve their layout on smaller screens.
|
improve their layout on smaller screens. To features `sortable`, `paging`,
|
||||||
|
and `searchable` require the module `simple-datatables`.
|
||||||
arguments:
|
arguments:
|
||||||
breakpoint:
|
breakpoint:
|
||||||
type: select
|
type: select
|
||||||
@@ -24,6 +25,21 @@ arguments:
|
|||||||
type: string
|
type: string
|
||||||
optional: true
|
optional: true
|
||||||
comment: Class attribute of the table element, e.g. `table-striped-columns w-auto`.
|
comment: Class attribute of the table element, e.g. `table-striped-columns w-auto`.
|
||||||
|
sortable:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: Toggle the ability to sort the columns.
|
||||||
|
release: v0.24.13
|
||||||
|
paging:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: Whether paging is enabled for the table.
|
||||||
|
release: v0.24.13
|
||||||
|
searchable:
|
||||||
|
type: bool
|
||||||
|
optional: true
|
||||||
|
comment: Toggle the ability to search the dataset.
|
||||||
|
release: v0.24.13
|
||||||
body:
|
body:
|
||||||
type: string
|
type: string
|
||||||
optional: false
|
optional: false
|
||||||
|
@@ -22,6 +22,8 @@ reference = "More Projects"
|
|||||||
languageName = "Nederlands"
|
languageName = "Nederlands"
|
||||||
contentDir = "content/nl"
|
contentDir = "content/nl"
|
||||||
weight = 2
|
weight = 2
|
||||||
|
[nl.params.opengraph]
|
||||||
|
locale = "nl_NL"
|
||||||
[nl.params.head]
|
[nl.params.head]
|
||||||
tagline = "Een Hugo Thema"
|
tagline = "Een Hugo Thema"
|
||||||
[nl.params.social]
|
[nl.params.social]
|
||||||
@@ -39,6 +41,8 @@ reference = "Meer projecten"
|
|||||||
languageName = "Français"
|
languageName = "Français"
|
||||||
contentDir = "content/fr"
|
contentDir = "content/fr"
|
||||||
weight = 2
|
weight = 2
|
||||||
|
[fr.params.opengraph]
|
||||||
|
locale = "fr_FR"
|
||||||
[fr.params.head]
|
[fr.params.head]
|
||||||
tagline = "Un thème Hugo"
|
tagline = "Un thème Hugo"
|
||||||
[fr.params.social]
|
[fr.params.social]
|
||||||
|
@@ -136,7 +136,7 @@ As an example, the following shortcode displays a card group of three elements.
|
|||||||
|
|
||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 -->
|
||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* card-group padding="3" gutter="3" button=true buttonType="link" */>}}
|
{{</* card-group padding="3" gutter="3" button=true buttonType="link" cols=2 scroll=true */>}}
|
||||||
{{</* card title="Bootstrap framework" icon="fab bootstrap" */>}}
|
{{</* card title="Bootstrap framework" icon="fab bootstrap" */>}}
|
||||||
Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source
|
Build fast, responsive sites with Bootstrap 5. Easily customize your site with the source
|
||||||
Sass files.
|
Sass files.
|
||||||
@@ -255,11 +255,12 @@ As an example, the following shortcodes show a square check, a brand logo, a cir
|
|||||||
|
|
||||||
## Image
|
## Image
|
||||||
|
|
||||||
As an example, the following shortcode displays an image with rounded corners and a 21x9 aspect ratio.
|
As an example, the following shortcode displays an image with rounded corners and a 4x3 aspect ratio in portrait mode.
|
||||||
|
|
||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 -->
|
||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* image src="img/flowers.jpg" ratio="21x9" caption="Figure caption" class="rounded" */>}}
|
{{</* image src="img/flowers.jpg" ratio="4x3" caption="Figure caption" class="rounded col-md-6"
|
||||||
|
portrait=true wrapper="text-center" */>}}
|
||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ thumbnail:
|
|||||||
authorURL: https://unsplash.com/@ryoji__iwata
|
authorURL: https://unsplash.com/@ryoji__iwata
|
||||||
origin: Unsplash
|
origin: Unsplash
|
||||||
originURL: https://unsplash.com/photos/5siQcvSxCP8
|
originURL: https://unsplash.com/photos/5siQcvSxCP8
|
||||||
modules: ["katex", "leaflet", "lottie"]
|
modules: ["katex", "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.
|
||||||
@@ -25,6 +25,49 @@ As an example, the following shortcode shows an animation that plays on hover.
|
|||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Data tables
|
||||||
|
|
||||||
|
As an example, the following shortcode displays a responsive table that uses advanced controls.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example lang="markdown" >}}
|
||||||
|
{{</* table sortable="true" paging="true" searchable="true" */>}}
|
||||||
|
| # | Heading |
|
||||||
|
|-----|---------|
|
||||||
|
| 1. | Item 1 |
|
||||||
|
| 2. | Item 2 |
|
||||||
|
| 3. | Item 3 |
|
||||||
|
| 4. | Item 4 |
|
||||||
|
| 5. | Item 5 |
|
||||||
|
| 6. | Item 6 |
|
||||||
|
| 7. | Item 7 |
|
||||||
|
| 8. | Item 8 |
|
||||||
|
| 9. | Item 9 |
|
||||||
|
| 10. | Item 10 |
|
||||||
|
| 11. | Item 11 |
|
||||||
|
| 12. | Item 12 |
|
||||||
|
| 13. | Item 13 |
|
||||||
|
| 14. | Item 14 |
|
||||||
|
| 15. | Item 15 |
|
||||||
|
| 16. | Item 16 |
|
||||||
|
| 17. | Item 17 |
|
||||||
|
| 18. | Item 18 |
|
||||||
|
| 19. | Item 19 |
|
||||||
|
| 20. | Item 20 |
|
||||||
|
| 21. | Item 21 |
|
||||||
|
| 22. | Item 22 |
|
||||||
|
| 23. | Item 23 |
|
||||||
|
| 24. | Item 24 |
|
||||||
|
| 25. | Item 25 |
|
||||||
|
| 26. | Item 26 |
|
||||||
|
| 27. | Item 27 |
|
||||||
|
| 28. | Item 28 |
|
||||||
|
| 29. | Item 29 |
|
||||||
|
| 30. | Item 30 |
|
||||||
|
{{</* /table */>}}
|
||||||
|
{{< /example >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
## Formula (KaTeX)
|
## 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 the KaTeX typesetting library.
|
||||||
|
@@ -26,7 +26,7 @@ As an example, the following shortcode displays an image with rounded corners an
|
|||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 -->
|
||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* image src="https://ik.imagekit.io/demo/default-image.jpg"
|
{{</* 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 >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
@@ -37,6 +37,6 @@ As an example, the following shortcode displays an image with rounded corners an
|
|||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 -->
|
||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* image src="https://assets.imgix.net/examples/bluehat.jpg"
|
{{</* 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 >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
@@ -103,11 +103,14 @@
|
|||||||
"btn-sm",
|
"btn-sm",
|
||||||
"btn-social",
|
"btn-social",
|
||||||
"card",
|
"card",
|
||||||
|
"card-block-2",
|
||||||
"card-body",
|
"card-body",
|
||||||
"card-body-link",
|
"card-body-link",
|
||||||
"card-body-margin",
|
"card-body-margin",
|
||||||
"card-button",
|
"card-button",
|
||||||
"card-button-link",
|
"card-button-link",
|
||||||
|
"card-container",
|
||||||
|
"card-container-wrapper",
|
||||||
"card-emphasize",
|
"card-emphasize",
|
||||||
"card-icon",
|
"card-icon",
|
||||||
"card-img-bg",
|
"card-img-bg",
|
||||||
@@ -134,22 +137,24 @@
|
|||||||
"col-3",
|
"col-3",
|
||||||
"col-4",
|
"col-4",
|
||||||
"col-6",
|
"col-6",
|
||||||
"col-8",
|
|
||||||
"col-9",
|
"col-9",
|
||||||
"col-auto",
|
"col-auto",
|
||||||
"col-lg-2",
|
"col-lg-2",
|
||||||
"col-lg-4",
|
"col-lg-4",
|
||||||
"col-lg-8",
|
"col-lg-8",
|
||||||
"col-md-10",
|
|
||||||
"col-md-2",
|
"col-md-2",
|
||||||
"col-md-3",
|
"col-md-3",
|
||||||
"col-md-4",
|
"col-md-4",
|
||||||
|
"col-md-6",
|
||||||
"col-md-8",
|
"col-md-8",
|
||||||
"col-md-9",
|
"col-md-9",
|
||||||
"col-md-auto",
|
"col-md-auto",
|
||||||
"col-sm-12",
|
"col-sm-12",
|
||||||
"col-sm-3",
|
"col-sm-3",
|
||||||
"col-sm-6",
|
"col-sm-6",
|
||||||
|
"col-sm-9",
|
||||||
|
"col-xl-10",
|
||||||
|
"col-xl-2",
|
||||||
"collapse",
|
"collapse",
|
||||||
"collapsed",
|
"collapsed",
|
||||||
"container",
|
"container",
|
||||||
@@ -170,6 +175,7 @@
|
|||||||
"d-none-light",
|
"d-none-light",
|
||||||
"d-sm-block",
|
"d-sm-block",
|
||||||
"d-sm-none",
|
"d-sm-none",
|
||||||
|
"data-table",
|
||||||
"display-1",
|
"display-1",
|
||||||
"display-4",
|
"display-4",
|
||||||
"dropdown",
|
"dropdown",
|
||||||
@@ -225,12 +231,15 @@
|
|||||||
"flex-fill",
|
"flex-fill",
|
||||||
"flex-grow-1",
|
"flex-grow-1",
|
||||||
"flex-md-grow-0",
|
"flex-md-grow-0",
|
||||||
|
"flex-nowrap",
|
||||||
|
"flex-row",
|
||||||
"font-monospace",
|
"font-monospace",
|
||||||
"footer",
|
"footer",
|
||||||
"form-control",
|
"form-control",
|
||||||
"fs-3",
|
"fs-3",
|
||||||
"fs-5",
|
"fs-5",
|
||||||
"fs-6",
|
"fs-6",
|
||||||
|
"fs-lg-5",
|
||||||
"fs-md-5",
|
"fs-md-5",
|
||||||
"fw-30",
|
"fw-30",
|
||||||
"fw-bold",
|
"fw-bold",
|
||||||
@@ -381,6 +390,7 @@
|
|||||||
"row-cols-md-3",
|
"row-cols-md-3",
|
||||||
"row-cols-sm-2",
|
"row-cols-sm-2",
|
||||||
"row-cols-sm-3",
|
"row-cols-sm-3",
|
||||||
|
"scrollbar-horizontal",
|
||||||
"search",
|
"search",
|
||||||
"search-input",
|
"search-input",
|
||||||
"search-suggestions",
|
"search-suggestions",
|
||||||
@@ -496,6 +506,7 @@
|
|||||||
"collapse",
|
"collapse",
|
||||||
"collapse-1",
|
"collapse-1",
|
||||||
"command-prompt",
|
"command-prompt",
|
||||||
|
"data-tables",
|
||||||
"docs",
|
"docs",
|
||||||
"documentation",
|
"documentation",
|
||||||
"example",
|
"example",
|
||||||
|
5
go.mod
5
go.mod
@@ -9,8 +9,9 @@ require (
|
|||||||
github.com/gethinode/mod-fontawesome v1.9.0 // indirect
|
github.com/gethinode/mod-fontawesome v1.9.0 // indirect
|
||||||
github.com/gethinode/mod-katex v1.1.0 // indirect
|
github.com/gethinode/mod-katex v1.1.0 // indirect
|
||||||
github.com/gethinode/mod-leaflet v1.1.0 // indirect
|
github.com/gethinode/mod-leaflet v1.1.0 // indirect
|
||||||
github.com/gethinode/mod-lottie v1.5.4 // indirect
|
github.com/gethinode/mod-lottie v1.5.5 // indirect
|
||||||
github.com/gethinode/mod-utils/v2 v2.3.9 // indirect
|
github.com/gethinode/mod-simple-datatables v1.0.3 // indirect
|
||||||
|
github.com/gethinode/mod-utils/v2 v2.3.10 // indirect
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 // indirect
|
github.com/nextapps-de/flexsearch v0.0.0-20240110101704-4c3966709f85 // indirect
|
||||||
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
|
||||||
)
|
)
|
||||||
|
10
go.sum
10
go.sum
@@ -182,6 +182,14 @@ github.com/gethinode/mod-lottie v1.5.3 h1:fvCjCoZoCEhY2aou30oEsEo6N4tVSI0ijFyXS3
|
|||||||
github.com/gethinode/mod-lottie v1.5.3/go.mod h1:XHVMuPsuJIm9/Eb2ql4jsT49/BQqMlBiirQoty4uHAo=
|
github.com/gethinode/mod-lottie v1.5.3/go.mod h1:XHVMuPsuJIm9/Eb2ql4jsT49/BQqMlBiirQoty4uHAo=
|
||||||
github.com/gethinode/mod-lottie v1.5.4 h1:+xbamSsjcnP2tyzGl0CA1enma7gkAp67wenmuP0XELY=
|
github.com/gethinode/mod-lottie v1.5.4 h1:+xbamSsjcnP2tyzGl0CA1enma7gkAp67wenmuP0XELY=
|
||||||
github.com/gethinode/mod-lottie v1.5.4/go.mod h1:gALqz48aYpoDLxJOI3LzIpdy0Eq/lOBNtlcOxABa9tg=
|
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-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-utils v1.0.0 h1:cqHm2xS5uDiJzRm1KfHaNbq6uMVDKLhQa8/BuTZ1nhY=
|
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.0/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
|
||||||
github.com/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
|
github.com/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
|
||||||
@@ -226,6 +234,8 @@ github.com/gethinode/mod-utils/v2 v2.3.8 h1:zAiDRCb3SsP9z6PUkCaiRLHOpqFhVf0xVhVO
|
|||||||
github.com/gethinode/mod-utils/v2 v2.3.8/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
github.com/gethinode/mod-utils/v2 v2.3.8/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
||||||
github.com/gethinode/mod-utils/v2 v2.3.9 h1:Z9uAr6S0wunlkfKHa2D/U83fBV6Ivtf+7sjBAcrddrg=
|
github.com/gethinode/mod-utils/v2 v2.3.9 h1:Z9uAr6S0wunlkfKHa2D/U83fBV6Ivtf+7sjBAcrddrg=
|
||||||
github.com/gethinode/mod-utils/v2 v2.3.9/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
|
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/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU=
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
|
github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg=
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
- id: shareLink
|
- id: shareLink
|
||||||
translation: "Diese Seite teilen per {{ . }}"
|
translation: "Diese Seite teilen per {{ . }}"
|
||||||
- id: shareSystem
|
- id: shareSystem
|
||||||
translation: "Betriebssystem"
|
translation: "System"
|
||||||
- id: copyToClipboard
|
- id: copyToClipboard
|
||||||
translation: "In die Zwischenablage kopieren"
|
translation: "In die Zwischenablage kopieren"
|
||||||
- id: copiedToClipboard
|
- id: copiedToClipboard
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
# Navigation
|
# Navigation
|
||||||
- id: colorMode
|
- id: colorMode
|
||||||
translation: "Thema umschalten"
|
translation: "Modus umschalten"
|
||||||
- id: colorLight
|
- id: colorLight
|
||||||
translation: "Light"
|
translation: "Light"
|
||||||
- id: colorDark
|
- id: colorDark
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
# Sidebar
|
# Sidebar
|
||||||
- id: toggleSidebar
|
- id: toggleSidebar
|
||||||
translation: "Menünavigation anzuzeigen oder auszublenden"
|
translation: "Menünavigation anzeigen oder ausblenden"
|
||||||
|
|
||||||
# Feature
|
# Feature
|
||||||
- id: addedFeature
|
- id: addedFeature
|
||||||
|
@@ -6,6 +6,19 @@
|
|||||||
|
|
||||||
{{ $error := false }}
|
{{ $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 -->
|
<!-- Validate arguments -->
|
||||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
||||||
{{ errorf "partial [assets/adapter/cloudinary.html] - Invalid arguments" -}}
|
{{ errorf "partial [assets/adapter/cloudinary.html] - Invalid arguments" -}}
|
||||||
@@ -20,6 +33,8 @@
|
|||||||
{{ $transform := .transform }}
|
{{ $transform := .transform }}
|
||||||
{{ $height := .height }}
|
{{ $height := .height }}
|
||||||
{{ $width := .width }}
|
{{ $width := .width }}
|
||||||
|
{{ $anchor := "" }}
|
||||||
|
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
|
||||||
{{ if eq $transform "fill" }}{{ $transform = "c_fill" }}{{ else }}{{ $transform = "c_fit" }}{{ end }}
|
{{ if eq $transform "fill" }}{{ $transform = "c_fill" }}{{ else }}{{ $transform = "c_fit" }}{{ end }}
|
||||||
{{ $element := "" }}
|
{{ $element := "" }}
|
||||||
|
|
||||||
@@ -37,6 +52,9 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $operation = printf "f_auto,%s,h_%d,w_%d" $transform $height $width }}
|
{{ $operation = printf "f_auto,%s,h_%d,w_%d" $transform $height $width }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with $anchor }}
|
||||||
|
{{ $operation = printf "%s,g_%s" $operation . }}
|
||||||
|
{{ end }}
|
||||||
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
{{ $transform := .transform }}
|
{{ $transform := .transform }}
|
||||||
{{ $height := .height }}
|
{{ $height := .height }}
|
||||||
{{ $width := .width }}
|
{{ $width := .width }}
|
||||||
|
{{ $anchor := .anchor | default "" }}
|
||||||
{{ $element := "" }}
|
{{ $element := "" }}
|
||||||
{{ $absoluteURL := .absoluteURL }}
|
{{ $absoluteURL := .absoluteURL }}
|
||||||
{{ $url := urls.JoinPath $dir $file }}
|
{{ $url := urls.JoinPath $dir $file }}
|
||||||
@@ -46,13 +47,20 @@
|
|||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
{{ $scaled := "" }}
|
{{ $scaled := "" }}
|
||||||
{{ if eq $transform "fill" }}
|
{{ 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 }}
|
{{ else }}
|
||||||
{{- $scaled = $img.Fit (printf "%dx%d %s" $width $height $format) -}}
|
{{- $scaled = $img.Fit (printf "%dx%d %s" $width $height $format) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- $clean := path.Ext $img.RelPermalink -}}
|
{{- $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 -}}
|
{{- if $absoluteURL -}}
|
||||||
{{- $element = $scaled.Permalink -}}
|
{{- $element = $scaled.Permalink -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
@@ -6,6 +6,19 @@
|
|||||||
|
|
||||||
{{ $error := false }}
|
{{ $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 -->
|
<!-- Validate arguments -->
|
||||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
||||||
{{ errorf "partial [assets/adapter/imagekit.html] - Invalid arguments" -}}
|
{{ errorf "partial [assets/adapter/imagekit.html] - Invalid arguments" -}}
|
||||||
@@ -20,6 +33,8 @@
|
|||||||
{{ $transform := .transform }}
|
{{ $transform := .transform }}
|
||||||
{{ $height := .height }}
|
{{ $height := .height }}
|
||||||
{{ $width := .width }}
|
{{ $width := .width }}
|
||||||
|
{{ $anchor := "" }}
|
||||||
|
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
|
||||||
{{ if eq $transform "fill" }}{{ $transform = "c-maintain_ratio" }}{{ else }}{{ $transform = "c-at_max" }}{{ end }}
|
{{ if eq $transform "fill" }}{{ $transform = "c-maintain_ratio" }}{{ else }}{{ $transform = "c-at_max" }}{{ end }}
|
||||||
{{ $element := "" }}
|
{{ $element := "" }}
|
||||||
|
|
||||||
@@ -42,6 +57,9 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $operation = printf "tr:f-auto,%s,h-%d,w-%d" $transform $height $width }}
|
{{ $operation = printf "tr:f-auto,%s,h-%d,w-%d" $transform $height $width }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with $anchor }}
|
||||||
|
{{ $operation = printf "%s,fo-%s" $operation . }}
|
||||||
|
{{ end }}
|
||||||
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
{{- $element = urls.JoinPath (slice "https://" $host $dir $operation $file) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@@ -6,6 +6,19 @@
|
|||||||
|
|
||||||
{{ $error := false }}
|
{{ $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 -->
|
<!-- Validate arguments -->
|
||||||
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "image-adapter" "args" . "group" "partial") }}
|
||||||
{{ errorf "partial [assets/adapter/imgix.html] - Invalid arguments" -}}
|
{{ errorf "partial [assets/adapter/imgix.html] - Invalid arguments" -}}
|
||||||
@@ -20,6 +33,8 @@
|
|||||||
{{ $transform := .transform }}
|
{{ $transform := .transform }}
|
||||||
{{ $height := .height }}
|
{{ $height := .height }}
|
||||||
{{ $width := .width }}
|
{{ $width := .width }}
|
||||||
|
{{ $anchor := "" }}
|
||||||
|
{{ with .anchor }}{{ $anchor = index $anchorMap . }}{{ end }}
|
||||||
{{ if eq $transform "fill" }}{{ $transform = "crop" }}{{ else }}{{ $transform = "max" }}{{ end }}
|
{{ if eq $transform "fill" }}{{ $transform = "crop" }}{{ else }}{{ $transform = "max" }}{{ end }}
|
||||||
{{ $element := "" }}
|
{{ $element := "" }}
|
||||||
|
|
||||||
@@ -37,6 +52,9 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $operation = printf "f_auto&fit=%s&h=%d&w=%d" $transform $height $width }}
|
{{ $operation = printf "f_auto&fit=%s&h=%d&w=%d" $transform $height $width }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with $anchor }}
|
||||||
|
{{ $operation = printf "%s&crop=%s" $operation . }}
|
||||||
|
{{ end }}
|
||||||
{{- $element = printf "%s?%s" (urls.JoinPath (slice "https://" $host $dir $file)) $operation -}}
|
{{- $element = printf "%s?%s" (urls.JoinPath (slice "https://" $host $dir $file)) $operation -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@@ -23,9 +23,11 @@
|
|||||||
{{- $color := .color -}}
|
{{- $color := .color -}}
|
||||||
{{- $padding := .padding -}}
|
{{- $padding := .padding -}}
|
||||||
{{- $header := .header -}}
|
{{- $header := .header -}}
|
||||||
|
{{- $body := .body -}}
|
||||||
{{- $footer := .footer -}}
|
{{- $footer := .footer -}}
|
||||||
{{- $orientation := .orientation -}}
|
{{- $orientation := .orientation -}}
|
||||||
{{- $ratio := .ratio -}}
|
{{- $ratio := .ratio -}}
|
||||||
|
{{- $portrait := .portrait | default false -}}
|
||||||
{{- $wrapper := .wrapper | default "p-0" -}}
|
{{- $wrapper := .wrapper | default "p-0" -}}
|
||||||
{{- $style := .style -}}
|
{{- $style := .style -}}
|
||||||
{{- $align := .align -}}
|
{{- $align := .align -}}
|
||||||
@@ -34,7 +36,11 @@
|
|||||||
{{- $button := .button -}}
|
{{- $button := .button -}}
|
||||||
{{- $buttonLabel := .buttonLabel -}}
|
{{- $buttonLabel := .buttonLabel -}}
|
||||||
{{- $buttonType := .buttonType -}}
|
{{- $buttonType := .buttonType -}}
|
||||||
|
{{- $iconRounded := .iconRounded }}
|
||||||
|
{{- $scroll := .scroll | default false }}
|
||||||
|
{{- $spacer := .spacer | default false }}
|
||||||
{{- $hook := .hook | default "assets/card.html" }}
|
{{- $hook := .hook | default "assets/card.html" }}
|
||||||
|
{{- $cols := string .cols | default "3" -}}
|
||||||
|
|
||||||
<!-- Override arguments -->
|
<!-- Override arguments -->
|
||||||
{{ $isPages := in (slice "page.Pages" "resource.Resources") (printf "%T" $pages) }}
|
{{ $isPages := in (slice "page.Pages" "resource.Resources") (printf "%T" $pages) }}
|
||||||
@@ -48,6 +54,13 @@
|
|||||||
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
|
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $cardWrapper := "" }}
|
||||||
|
{{ if $scroll }}
|
||||||
|
{{ $cardWrapper = printf "card-block card-block-%d" (int $cols) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if not $spacer }}{{ $class = printf "%s h-100" $class }}{{ end }}
|
||||||
|
|
||||||
{{ $list := slice }}
|
{{ $list := slice }}
|
||||||
{{ if $isPages }}
|
{{ if $isPages }}
|
||||||
{{ range $index, $element := $pages }}
|
{{ range $index, $element := $pages }}
|
||||||
@@ -58,11 +71,13 @@
|
|||||||
<!-- headless page -->
|
<!-- headless page -->
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $thumbnail := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.url) $element.Params.Thumbnail) -}}
|
{{- $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
|
{{- $params = merge $params (dict
|
||||||
"title" $element.Title
|
"title" $element.Title
|
||||||
"href" $element.RelPermalink
|
"href" $element.RelPermalink
|
||||||
"description" (partial "utilities/GetDescription.html" (dict "page" $element "raw" true))
|
"description" (partial "utilities/GetDescription.html" (dict "page" $element "raw" true))
|
||||||
"thumbnail" $thumbnail
|
"thumbnail" $thumbnail
|
||||||
|
"anchor" $anchor
|
||||||
"icon" $element.Params.icon
|
"icon" $element.Params.icon
|
||||||
) -}}
|
) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -77,41 +92,35 @@
|
|||||||
{{- $max := $count -}}
|
{{- $max := $count -}}
|
||||||
{{- $max = math.Min (.max | default $count) $count -}}
|
{{- $max = math.Min (.max | default $count) $count -}}
|
||||||
{{- $responsive := .responsive | default true -}}
|
{{- $responsive := .responsive | default true -}}
|
||||||
{{- $cols := string .cols | default "3" -}}
|
|
||||||
|
|
||||||
{{- $sizes := "100vw" }}
|
{{- $sizes := "100vw" }}
|
||||||
{{- $colGrid := "" -}}
|
{{- $colGrid := "" -}}
|
||||||
{{- if eq $cols "1" }}
|
{{ if not $scroll }}
|
||||||
{{ $colGrid = "row-cols-1" -}}
|
{{ $colGrid = printf "row-cols-%s" $cols }}
|
||||||
{{- else if eq $cols "2" }}
|
{{- if eq $cols "1" }}
|
||||||
{{ if $responsive }}
|
{{ $colGrid = "row-cols-1" -}}
|
||||||
{{ $colGrid = printf "row-cols-1 row-cols-%s-1 row-cols-%s-2" $breakpoint.prev $breakpoint.current }}
|
{{- else if eq $cols "2" }}
|
||||||
{{ else }}
|
{{ if $responsive }}
|
||||||
{{ $colGrid = "row-cols-2" }}
|
{{ $colGrid = printf "row-cols-1 row-cols-%s-1 row-cols-%s-2" $breakpoint.prev $breakpoint.current }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ $sizes = printf "(min-width: %s) 50vw, 100vw" $breakpoint.currentSize }}
|
||||||
|
{{- else if eq $cols "3" }}
|
||||||
|
{{ if $responsive }}
|
||||||
|
{{ $colGrid = printf "row-cols-1 row-cols-%s-2 row-cols-%s-3" $breakpoint.prev $breakpoint.current }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ $sizes = printf "(min-width: %s) 33.3vw, (min-width: %s) 50vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
||||||
|
{{- else if eq $cols "4" }}
|
||||||
|
{{ if $responsive }}
|
||||||
|
{{ $colGrid = printf "row-cols-1 row-cols-%s-2 row-cols-%s-4" $breakpoint.prev $breakpoint.current }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ $sizes = printf "(min-width: %s) 25vw, (min-width: %s) 50vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
||||||
|
{{- else if eq $cols "5" }}
|
||||||
|
{{ if $responsive }}
|
||||||
|
{{ $colGrid = printf "row-cols-1 row-cols-%s-3 row-cols-%s-5" $breakpoint.prev $breakpoint.current }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ $sizes = printf "(min-width: %s) 20vw, (min-width: %s) 33.3vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ $sizes = printf "(min-width: %s) 50vw, 100vw" $breakpoint.currentSize }}
|
{{ end }}
|
||||||
{{- else if eq $cols "3" }}
|
|
||||||
{{ if $responsive }}
|
|
||||||
{{ $colGrid = printf "row-cols-1 row-cols-%s-2 row-cols-%s-3" $breakpoint.prev $breakpoint.current }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $colGrid = "row-cols-3" }}
|
|
||||||
{{ end -}}
|
|
||||||
{{ $sizes = printf "(min-width: %s) 33.3vw, (min-width: %s) 50vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
|
||||||
{{- else if eq $cols "4" }}
|
|
||||||
{{ if $responsive }}
|
|
||||||
{{ $colGrid = printf "row-cols-1 row-cols-%s-2 row-cols-%s-4" $breakpoint.prev $breakpoint.current }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $colGrid = "row-cols-4" }}
|
|
||||||
{{ end -}}
|
|
||||||
{{ $sizes = printf "(min-width: %s) 25vw, (min-width: %s) 50vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
|
||||||
{{- else if eq $cols "5" }}
|
|
||||||
{{ if $responsive }}
|
|
||||||
{{ $colGrid = printf "row-cols-1 row-cols-%s-3 row-cols-%s-5" $breakpoint.prev $breakpoint.current }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $colGrid = "row-cols-5" }}
|
|
||||||
{{ end -}}
|
|
||||||
{{ $sizes = printf "(min-width: %s) 20vw, (min-width: %s) 33.3vw, 100vw" $breakpoint.currentSize $breakpoint.prevSize }}
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
{{- if not $paginate -}}
|
{{- if not $paginate -}}
|
||||||
{{- $list = first $max $list -}}
|
{{- $list = first $max $list -}}
|
||||||
@@ -120,29 +129,33 @@
|
|||||||
{{- if and (eq $cols "1") (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
|
{{- if and (eq $cols "1") (eq $orientation "horizontal") }}{{ $orientation = "horizontal-sm" }}{{ end -}}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
<div class="container-fluid {{ $wrapper }}">
|
<div class="container-fluid {{ $wrapper }} {{ if $scroll }}card-container-wrapper{{ end }}">
|
||||||
<div class="row {{ $colGrid }} g-{{ $gutter }}">
|
<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 }}
|
{{ range $index, $element := $list }}
|
||||||
{{- $params := (dict
|
{{- $params := (dict
|
||||||
"class" (printf "h-100 %s" $class)
|
"class" (printf " %s" $class)
|
||||||
"color" $color
|
"color" $color
|
||||||
"footer" $footer
|
"footer" $footer
|
||||||
|
"body" $body
|
||||||
"header" $header
|
"header" $header
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
"sizes" $sizes
|
"sizes" $sizes
|
||||||
"orientation" $orientation
|
"orientation" $orientation
|
||||||
"padding" $padding
|
"padding" $padding
|
||||||
"ratio" $ratio
|
"ratio" $ratio
|
||||||
|
"portrait" $portrait
|
||||||
"subtle" $subtle
|
"subtle" $subtle
|
||||||
"style" $style
|
"style" $style
|
||||||
"align" $align
|
"align" $align
|
||||||
"button" $button
|
"button" $button
|
||||||
"buttonLabel" $buttonLabel
|
"buttonLabel" $buttonLabel
|
||||||
"buttonType" $buttonType
|
"buttonType" $buttonType
|
||||||
|
"iconRounded" $iconRounded
|
||||||
) -}}
|
) -}}
|
||||||
{{- $params = merge $params $element }}
|
{{- $params = merge $element $params }}
|
||||||
|
|
||||||
<div class="col">
|
<div class="{{ with $cardWrapper }}{{ . }}{{ else }}col{{ end }}">
|
||||||
|
{{ if $spacer }}<div class="spacer"></div>{{ end }}
|
||||||
{{- partial $hook $params -}}
|
{{- partial $hook $params -}}
|
||||||
</div>
|
</div>
|
||||||
{{- if and (lt $index (sub $max 1)) $separator -}}
|
{{- if and (lt $index (sub $max 1)) $separator -}}
|
||||||
@@ -151,7 +164,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{if $cards }}{{- print $cards | safeHTML }}{{ end }}
|
{{ if $cards }}{{- print $cards | safeHTML }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if $paginator }}
|
{{ if $paginator }}
|
||||||
|
@@ -11,15 +11,18 @@
|
|||||||
|
|
||||||
<!-- Initialize arguments and default values -->
|
<!-- Initialize arguments and default values -->
|
||||||
{{- $alt := .alt -}}
|
{{- $alt := .alt -}}
|
||||||
|
{{- $wrapper := .wrapper -}}
|
||||||
{{- $class := .class -}}
|
{{- $class := .class -}}
|
||||||
{{- $color := .color -}}
|
{{- $color := .color -}}
|
||||||
{{- $description := .description -}}
|
{{- $description := .description -}}
|
||||||
|
{{- $body := .body | default "full" -}}
|
||||||
{{- $footer := .footer | default "none" -}}
|
{{- $footer := .footer | default "none" -}}
|
||||||
{{- $gutter := .gutter | default "0" -}}
|
{{- $gutter := .gutter | default "0" -}}
|
||||||
{{- $header := .header | default "full" -}}
|
{{- $header := .header | default "full" -}}
|
||||||
{{- $href := .href -}}
|
{{- $href := .href -}}
|
||||||
{{- $icon := .icon -}}
|
{{- $icon := .icon -}}
|
||||||
{{- $iconStyle := "" -}}
|
{{- $iconStyle := "" -}}
|
||||||
|
{{- $iconRounded := .iconRounded | default false -}}
|
||||||
{{- $align := .align | default "start" -}}
|
{{- $align := .align | default "start" -}}
|
||||||
{{- $style := .style | default "" -}}
|
{{- $style := .style | default "" -}}
|
||||||
{{- $sizes := .sizes | default "100vw" -}}
|
{{- $sizes := .sizes | default "100vw" -}}
|
||||||
@@ -27,7 +30,9 @@
|
|||||||
{{- $orientation := .orientation | default "stacked" -}}
|
{{- $orientation := .orientation | default "stacked" -}}
|
||||||
{{- $padding := (string .padding) | default "auto" -}}
|
{{- $padding := (string .padding) | default "auto" -}}
|
||||||
{{- $ratio := .ratio -}}
|
{{- $ratio := .ratio -}}
|
||||||
|
{{- $portrait := .portrait | default false -}}
|
||||||
{{- $thumbnail := .thumbnail -}}
|
{{- $thumbnail := .thumbnail -}}
|
||||||
|
{{- $anchor := .anchor | default "" -}}
|
||||||
{{- $title := .title -}}
|
{{- $title := .title -}}
|
||||||
{{- $subtle := .subtle -}}
|
{{- $subtle := .subtle -}}
|
||||||
{{- $button := .button -}}
|
{{- $button := .button -}}
|
||||||
@@ -55,8 +60,12 @@
|
|||||||
{{- if not $title }}{{ $title = .Title }}{{ end -}}
|
{{- if not $title }}{{ $title = .Title }}{{ end -}}
|
||||||
{{- if not $href }}{{ $href = .RelPermalink }}{{ end -}}
|
{{- if not $href }}{{ $href = .RelPermalink }}{{ end -}}
|
||||||
{{- if not $description }}{{ $description = partial "utilities/GetDescription.html" (dict "page" .) }}{{ 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 $icon }}{{ $icon = .Params.icon }}{{ end -}}
|
||||||
|
{{- if not $anchor }}{{ $anchor = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.anchor) "") }}{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ if (hasPrefix $orientation "horizontal") }}
|
{{ if (hasPrefix $orientation "horizontal") }}
|
||||||
@@ -67,6 +76,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
|
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
|
||||||
|
{{- if eq $body "none" }}{{ $description = "" }}{{ end -}}
|
||||||
|
|
||||||
<!-- Inline partial to render the card's body -->
|
<!-- Inline partial to render the card's body -->
|
||||||
{{- define "partials/card-body.html" -}}
|
{{- define "partials/card-body.html" -}}
|
||||||
@@ -78,7 +88,7 @@
|
|||||||
|
|
||||||
{{- if $href -}}
|
{{- if $href -}}
|
||||||
<a href="{{ $href }}" class="{{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }} stretched-link">
|
<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 }}
|
{{ with $description }}
|
||||||
<div class="card-text {{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }}">
|
<div class="card-text {{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }}">
|
||||||
{{ . | safeHTML }}
|
{{ . | safeHTML }}
|
||||||
@@ -87,7 +97,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<div>
|
<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 -}}
|
{{ with $description }}<div class="card-text">{{ . | safeHTML }}</div>{{ end -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -125,22 +135,55 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{ if ne $gutter "0" }}<div class="g-{{ $gutter }}">{{ end }}
|
{{ if or (ne $gutter "0") ($wrapper) }}<div class="g-{{ $gutter }} {{ $wrapper }}">{{ end }}
|
||||||
|
|
||||||
|
{{ $stack := "fa-2x" }}
|
||||||
|
|
||||||
{{- if hasPrefix $orientation "horizontal" -}}
|
{{- if hasPrefix $orientation "horizontal" -}}
|
||||||
|
{{ $col1 := "" }}
|
||||||
|
{{ $col2 := "" }}
|
||||||
|
|
||||||
|
{{ if $thumbnail }}
|
||||||
|
{{ if eq $orientation "horizontal-sm" }}
|
||||||
|
{{ $stack = "fa-1x" }}
|
||||||
|
{{ $col1 = "col-4 col-md-2" }}
|
||||||
|
{{ $col2 = "col-8 col-md-10" }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $col1 = "col-4" }}
|
||||||
|
{{ $col2 = "col-8" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else if $icon }}
|
||||||
|
{{ if eq $orientation "horizontal-sm" }}
|
||||||
|
{{ $stack = "fa-1x" }}
|
||||||
|
{{ $col1 = "col-2 col-sm-3 col-md-4 col-xl-2" }}
|
||||||
|
{{ $col2 = "col-10 col-sm-9 col-md-8 col-xl-10" }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $col1 = "col-4" }}
|
||||||
|
{{ $col2 = "col-8" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<!-- Render horizontal card -->
|
<!-- Render horizontal card -->
|
||||||
<div class="card {{ $colorStyle }} {{ $class }}">
|
<div class="card {{ $colorStyle }} {{ $class }}">
|
||||||
<div class="row g-0 row-cols-1 h-100{{ if $button }} pb-5{{ end }}">
|
<div class="row g-0 row-cols-2 h-100{{ if $button }} pb-5{{ end }}">
|
||||||
<div class="{{ if eq $orientation "horizontal-sm" }}col-4 col-md-2{{ else }}col-4{{ end }}">
|
{{- if $thumbnail -}}
|
||||||
{{- if $thumbnail -}}
|
<div class="{{ $col1 }}">
|
||||||
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "1x1") "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) -}}
|
||||||
{{- else if $icon -}}
|
</div>
|
||||||
<div class="card-icon p-{{ $padding }} h-100 fa-wrapper d-flex align-items-{{ $align}} justify-content-center {{ $iconStyle }}">
|
{{- else if $icon -}}
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
<div class="{{ $col1 }} p-{{ $padding }}">
|
||||||
|
<div class="card-icon {{ if $iconRounded }}fa-stack {{ $stack }} mx-auto{{ else }}fa-wrapper h-100 {{ end }} d-flex align-items-{{ $align}} justify-content-center {{ $iconStyle }}">
|
||||||
|
{{ if $iconRounded }}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" "fas circle fa-stack-2x") -}}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-stack-1x fa-inverse" $icon)) -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
</div>
|
||||||
</div>
|
{{- end -}}
|
||||||
<div class="{{ if eq $orientation "horizontal-sm" }}col-8 col-md-10{{ else }}col-8{{ end }}">
|
<div class="{{ $col2 }}">
|
||||||
<div class="card-body d-flex p-{{ $padding }} flex-column h-100 flex-fill">
|
<div class="card-body d-flex p-{{ $padding }} flex-column h-100 flex-fill">
|
||||||
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>{{ end }}
|
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>{{ end }}
|
||||||
<div class="flex-fill">
|
<div class="flex-fill">
|
||||||
@@ -171,10 +214,15 @@
|
|||||||
<!-- Render stacked / default card -->
|
<!-- Render stacked / default card -->
|
||||||
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
|
<div class="card {{ $colorStyle }} {{ $class }} text-{{ $align }}">
|
||||||
{{- if $thumbnail -}}
|
{{- if $thumbnail -}}
|
||||||
{{- partial $hook (dict "url" $thumbnail "ratio" (or $ratio "16x9") "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 -}}
|
{{- else if $icon -}}
|
||||||
<div class="card-icon p-{{ $padding }} {{ $iconStyle }} text-{{ $align }}">
|
<div class="card-icon p-{{ $padding }} {{ $iconStyle }} text-{{ $align }} {{ if $iconRounded }}fa-stack {{ $stack }}{{ end }} w-100">
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
{{ if $iconRounded }}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "fas circle fa-stack-2x %s")) -}}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-stack-1x fa-inverse" $icon)) -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s %s" $icon $style)) -}}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
||||||
@@ -204,4 +252,4 @@
|
|||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ if ne $gutter "0" }}</div>{{ end }}
|
{{ if or (ne $gutter "0") ($wrapper) }}</div>{{ end }}
|
||||||
|
@@ -15,15 +15,16 @@
|
|||||||
{{- $mode := .mode -}}
|
{{- $mode := .mode -}}
|
||||||
{{- $modes := .modes -}}
|
{{- $modes := .modes -}}
|
||||||
{{- $plain := .plain | default false }}
|
{{- $plain := .plain | default false }}
|
||||||
|
{{- $anchor := .anchor }}
|
||||||
|
|
||||||
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
||||||
{{- $anchor := "" -}}
|
{{- $fileAnchor := "" -}}
|
||||||
{{- $segments := split $url "#" -}}
|
{{- $segments := split $url "#" -}}
|
||||||
{{- if gt (len $segments) 2 -}}
|
{{- if gt (len $segments) 2 -}}
|
||||||
{{- errorf "Invalid path or url: %q" $url -}}
|
{{- errorf "Invalid path or url: %q" $url -}}
|
||||||
{{- else if eq (len $segments) 2 }}
|
{{- else if eq (len $segments) 2 }}
|
||||||
{{- $url = index $segments 0 -}}
|
{{- $url = index $segments 0 -}}
|
||||||
{{- $anchor = index $segments 1 -}}
|
{{- $fileAnchor = index $segments 1 -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Obtain fallback URL and imageset definition -->
|
<!-- Obtain fallback URL and imageset definition -->
|
||||||
@@ -31,8 +32,10 @@
|
|||||||
"page" $page
|
"page" $page
|
||||||
"url" .url
|
"url" .url
|
||||||
"ratio" $ratio
|
"ratio" $ratio
|
||||||
|
"portrait" $portrait
|
||||||
"plain" $plain
|
"plain" $plain
|
||||||
"imageset" true
|
"imageset" true
|
||||||
|
"anchor" $anchor
|
||||||
) }}
|
) }}
|
||||||
{{ $fallbackURL := index $target "target" }}
|
{{ $fallbackURL := index $target "target" }}
|
||||||
{{ $imgset := index $target "set" }}
|
{{ $imgset := index $target "set" }}
|
||||||
@@ -49,24 +52,26 @@
|
|||||||
<!-- Generate image definition -->
|
<!-- Generate image definition -->
|
||||||
{{- if $caption -}}
|
{{- if $caption -}}
|
||||||
<figure {{ with $wrapper }}class="{{ . }}"{{ end }}>
|
<figure {{ with $wrapper }}class="{{ . }}"{{ end }}>
|
||||||
|
{{ else }}
|
||||||
|
{{ with $wrapper }}<div class="{{ . }}">{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{- 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 }}
|
{{ 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 -}}
|
{{- if $caption -}}
|
||||||
<figcaption class="figure-caption{{ with $figclass }} {{ . }}{{ end }}">{{ $caption | safeHTML }}</figcaption>
|
<figcaption class="figure-caption{{ with $figclass }} {{ . }}{{ end }}">{{ $caption | safeHTML }}</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
{{ else if $wrapper }}
|
||||||
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
@@ -2,12 +2,14 @@
|
|||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $url := .url -}}
|
{{- $url := .url -}}
|
||||||
{{- $ratio := .ratio -}}
|
{{- $ratio := .ratio -}}
|
||||||
|
{{- $portrait := .portrait -}}
|
||||||
{{- $height := .height -}}
|
{{- $height := .height -}}
|
||||||
{{- $width := .width -}}
|
{{- $width := .width -}}
|
||||||
{{- $plain := .plain | default false }}
|
{{- $plain := .plain | default false }}
|
||||||
{{- $targetURL := "" -}}
|
{{- $targetURL := "" -}}
|
||||||
{{- $set := "" -}}
|
{{- $set := "" -}}
|
||||||
{{- $imageset := .imageset | default false }}
|
{{- $imageset := .imageset | default false }}
|
||||||
|
{{- $anchor := .anchor | default "" -}}
|
||||||
|
|
||||||
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
<!-- Split url into base and anchor when applicable (only relevant for vector images) -->
|
||||||
{{- $segments := split $url "#" -}}
|
{{- $segments := split $url "#" -}}
|
||||||
@@ -53,7 +55,11 @@
|
|||||||
{{ warnf "Cannot find vector image resource: %q" $url -}}
|
{{ warnf "Cannot find vector image resource: %q" $url -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $width := string (partial "utilities/GetWidth.html" (dict "path" $url "height" 500)) }}
|
{{ $width := string (partial "utilities/GetWidth.html" (dict "path" $url "height" 500)) }}
|
||||||
{{ $dims = $dims | append (printf "%sx500" $width) }}
|
{{ if $width }}
|
||||||
|
{{ $dims = $dims | append (printf "%sx500" $width) }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $dims = $dims | append "500" }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else if $ratio }}
|
{{ else if $ratio }}
|
||||||
@@ -80,10 +86,27 @@
|
|||||||
|
|
||||||
<!-- Derive image width and height -->
|
<!-- Derive image width and height -->
|
||||||
{{ if not $plain }}
|
{{ if not $plain }}
|
||||||
{{ with $dims }}
|
{{ if $portrait }}
|
||||||
{{ range $dim := (. | last 1) }}
|
{{ with $dims }}
|
||||||
{{ $width = (int (index (split $dim "x") 0)) }}
|
{{ $newDims := slice }}
|
||||||
{{ $height = (int (index (split $dim "x") 1)) }}
|
{{ range $dim := . }}
|
||||||
|
{{ $width = (int (index (split $dim "x") 1)) }}
|
||||||
|
{{ $height = (int (index (split $dim "x") 0)) }}
|
||||||
|
{{- $newDims = $newDims | append (printf "%dx%d" (int $width) $height ) -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ $dims = $newDims }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $newWidth := $height }}
|
||||||
|
{{ $newHeight := $width }}
|
||||||
|
{{ $width = $newWidth }}
|
||||||
|
{{ $height = $newHeight }}
|
||||||
|
{{ else }}
|
||||||
|
{{ with $dims }}
|
||||||
|
{{ range $dim := (. | last 1) }}
|
||||||
|
{{ $width = (int (index (split $dim "x") 0)) }}
|
||||||
|
{{ $height = (int (index (split $dim "x") 1)) }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -96,13 +119,21 @@
|
|||||||
"url" $url
|
"url" $url
|
||||||
"img" $img
|
"img" $img
|
||||||
"dims" ($dims | last 1)
|
"dims" ($dims | last 1)
|
||||||
|
"anchor" $anchor
|
||||||
"transform" $transform
|
"transform" $transform
|
||||||
"hook" $hook
|
"hook" $hook
|
||||||
"format" "jpg"
|
"format" "png"
|
||||||
"includeWidth" false
|
"includeWidth" false
|
||||||
)}}
|
)}}
|
||||||
{{ if $imageset }}
|
{{ 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 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
{{ $transform := .transform }}
|
{{ $transform := .transform }}
|
||||||
{{ $format := .format }}
|
{{ $format := .format }}
|
||||||
{{ $includeWidth := .includeWidth | default true }}
|
{{ $includeWidth := .includeWidth | default true }}
|
||||||
|
{{ $anchor := .anchor | default "" }}
|
||||||
|
|
||||||
{{ $host := (urls.Parse $url).Hostname }}
|
{{ $host := (urls.Parse $url).Hostname }}
|
||||||
{{ $dir := (urls.Parse $url).Path }}
|
{{ $dir := (urls.Parse $url).Path }}
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
"width" $width
|
"width" $width
|
||||||
"height" $height
|
"height" $height
|
||||||
"format" $format
|
"format" $format
|
||||||
|
"anchor" $anchor
|
||||||
)}}
|
)}}
|
||||||
{{ if $includeWidth }}
|
{{ if $includeWidth }}
|
||||||
{{ $imgset = $imgset | append (printf "%s %dw" $element $width) }}
|
{{ $imgset = $imgset | append (printf "%s %dw" $element $width) }}
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
{{- if eq $priority "auto" }}{{ $priority = "" }}{{ end -}}
|
{{- if eq $priority "auto" }}{{ $priority = "" }}{{ end -}}
|
||||||
{{- $sizes := .sizes | default "100vw" -}}
|
{{- $sizes := .sizes | default "100vw" -}}
|
||||||
{{- $plain := .plain | default false -}}
|
{{- $plain := .plain | default false -}}
|
||||||
|
{{- $anchor := .anchor | default "" -}}
|
||||||
|
|
||||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
||||||
{{- $url := .url -}}
|
{{- $url := .url -}}
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
"sizes" $sizes
|
"sizes" $sizes
|
||||||
"absoluteURL" $absoluteURL
|
"absoluteURL" $absoluteURL
|
||||||
"plain" $plain
|
"plain" $plain
|
||||||
|
"anchor" $anchor
|
||||||
)
|
)
|
||||||
-}}
|
-}}
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $menu := .menu -}}
|
{{- $menu := .menu -}}
|
||||||
{{- $parent := .parent -}}
|
{{- $parent := .parent -}}
|
||||||
|
{{- $plain := .plain | default false -}}
|
||||||
{{- $class := .class -}}
|
{{- $class := .class -}}
|
||||||
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
{{- $cue := .cue | default site.Params.main.externalLinks.cue -}}
|
||||||
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
{{- $tab := .tab | default site.Params.main.externalLinks.tab -}}
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
{{- $menuURL := "" -}}
|
{{- $menuURL := "" -}}
|
||||||
{{ if or (strings.HasPrefix $menu.PageRef "http") (strings.HasPrefix $menu.URL "http") }}
|
{{ if or (strings.HasPrefix $menu.PageRef "http") (strings.HasPrefix $menu.URL "http") }}
|
||||||
{{ $menuURL = or $menu.PageRef $menu.URL }}
|
{{ $menuURL = or $menu.PageRef $menu.URL }}
|
||||||
{{ else }}
|
{{ else if (or $menu.PageRef $menu.URL) }}
|
||||||
{{- $menuURL = urls.JoinPath $baseURL ((or $menu.PageRef $menu.URL) | relLangURL) -}}
|
{{- $menuURL = urls.JoinPath $baseURL ((or $menu.PageRef $menu.URL) | relLangURL) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- $pageURL := $page.RelPermalink -}}
|
{{- $pageURL := $page.RelPermalink -}}
|
||||||
@@ -46,6 +47,11 @@
|
|||||||
{{- if $cue -}}
|
{{- if $cue -}}
|
||||||
{{ $suffix = partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}
|
{{ $suffix = partial "assets/icon.html" (dict "icon" "fas up-right-from-square fa-2xs") }}
|
||||||
{{- end -}}
|
{{- 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 -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{- $mainNav := urlize (lower $menu.Name) -}}
|
{{- $mainNav := urlize (lower $menu.Name) -}}
|
||||||
@@ -56,7 +62,7 @@
|
|||||||
{{- $mainNav = urlize (lower $parent.Name) -}}
|
{{- $mainNav = urlize (lower $parent.Name) -}}
|
||||||
{{- $childNav = urlize (lower $menu.Name) -}}
|
{{- $childNav = urlize (lower $menu.Name) -}}
|
||||||
{{- $anchorClass = "dropdown-item" -}}
|
{{- $anchorClass = "dropdown-item" -}}
|
||||||
{{- else if $menu.HasChildren -}}
|
{{- else if and (not $plain) $menu.HasChildren -}}
|
||||||
{{- $anchorClass = "nav-link dropdown-toggle" -}}
|
{{- $anchorClass = "nav-link dropdown-toggle" -}}
|
||||||
{{- $button = " role=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\"" -}}
|
{{- $button = " role=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\"" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
@@ -70,20 +76,29 @@
|
|||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
<a class="{{ $anchorClass }}{{ if $isActive }} active{{ end }}{{ with $class }} {{. }}{{ end }}"
|
{{ if $menu.Params.button }}
|
||||||
{{ if $isIcon }}aria-label="{{ $menu.Name }}"{{ end }}
|
{{ partial "assets/button.html" (dict
|
||||||
data-nav="main" data-nav-main="{{ $mainNav }}"{{ with $childNav }} data-nav-child="{{ . }}"{{ end }}
|
"title" $menu.Name
|
||||||
href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }} {{ $button | safeHTMLAttr }}>
|
"icon" $menu.Pre
|
||||||
|
"href" $menuURL
|
||||||
|
"size" "sm"
|
||||||
|
)}}
|
||||||
|
{{ else }}
|
||||||
|
<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 }}
|
||||||
|
{{ if $menuURL }} href="{{ $menuURL }}{{ $params | safeHTMLAttr }}"{{ with $externalHref }} {{ . | safeHTMLAttr }}{{ end }}{{ end }} {{ $button | safeHTMLAttr }}>
|
||||||
|
|
||||||
{{- with $menu.Pre }}
|
{{- with $menu.Pre }}
|
||||||
{{ if hasPrefix . "<i" }}
|
{{ if hasPrefix . "<i" }}
|
||||||
{{ . | safeHTML }}
|
{{ . | safeHTML }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "assets/icon.html" (dict "icon" (string .) )}}
|
{{ partial "assets/icon.html" (dict "icon" (string .) )}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
<span {{ if $isActive }} class="active"{{ end }}>{{ if not $isIcon }}{{ $menu.Name }}{{ end }}</span>
|
<span {{ if $isActive }} class="active"{{ end }}>{{ if or (not $isIcon) $plain }}{{ $menu.Name }}{{ end }}</span>
|
||||||
{{- with $menu.Post }}{{ . }}{{ end -}}
|
{{- with $menu.Post }}{{ . }}{{ end -}}
|
||||||
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
{{- if not $isIcon }} {{ $suffix }}{{ end -}}
|
||||||
</a>
|
</a>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
@@ -164,6 +164,11 @@
|
|||||||
{{- $contrast := false -}}
|
{{- $contrast := false -}}
|
||||||
{{- if in (slice "primary" "secondary" "success" "danger") $color }}{{ $contrast = true }}{{ end -}}
|
{{- if in (slice "primary" "secondary" "success" "danger") $color }}{{ $contrast = true }}{{ end -}}
|
||||||
|
|
||||||
|
{{- $flex := false }}
|
||||||
|
{{ if gt (where $menus "Params.spacing" true | len) 0 }}
|
||||||
|
{{ $flex = true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
<div class="container-fluid {{ if $fixed }}fixed-top{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
||||||
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
||||||
@@ -225,23 +230,27 @@
|
|||||||
{{- if and $search (not $searchModal) }}{{ partial "assets/search-input.html" }}{{ end -}}
|
{{- if and $search (not $searchModal) }}{{ partial "assets/search-input.html" }}{{ end -}}
|
||||||
|
|
||||||
<!-- Render top-menu items (maximum depth of 2) -->
|
<!-- Render top-menu items (maximum depth of 2) -->
|
||||||
<ul class="navbar-nav ms-auto">
|
<ul class="navbar-nav {{ if $flex }}d-flex w-100{{ else }}ms-auto{{ end }}">
|
||||||
{{- range $menu := $menus -}}
|
{{- range $menu := $menus -}}
|
||||||
<li class="nav-item{{ if .HasChildren }} dropdown{{ if $horizontal }} dropdown-horizontal-{{ $size }}{{ end }}{{ end }}">
|
{{ if $menu.Params.spacing }}
|
||||||
{{- partial "assets/navbar-item.html" (dict "menu" $menu "page" $page) -}}
|
<li class="nav-item flex-grow-1"></li>
|
||||||
{{- if .HasChildren -}}
|
{{ else }}
|
||||||
<ul class="dropdown-menu">
|
<li class="nav-item {{ if .HasChildren }} dropdown{{ if $horizontal }} dropdown-horizontal-{{ $size }}{{ end }}{{ end }}">
|
||||||
{{- range .Children -}}
|
{{- partial "assets/navbar-item.html" (dict "menu" $menu "page" $page) -}}
|
||||||
<li>{{- partial "assets/navbar-item.html" (dict "menu" . "parent" $menu "page" $page) -}}</li>
|
{{- if .HasChildren -}}
|
||||||
{{- end -}}
|
<ul class="dropdown-menu">
|
||||||
</ul>
|
{{- range .Children -}}
|
||||||
{{- end -}}
|
<li>{{- partial "assets/navbar-item.html" (dict "menu" . "parent" $menu "page" $page) -}}</li>
|
||||||
</li>
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
{{- end -}}
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Insert divider if applicable -->
|
<!-- Insert divider if applicable -->
|
||||||
{{- if and $menus (or $enableLanguage $enableVersions) -}}
|
{{- if and $menus (or $enableLanguage $enableVersions) -}}
|
||||||
<li class="nav-item py-2 py-md-1 col-12 col-md-auto d-none d-{{ $size }}-block">
|
<li class="nav-item py-2 py-md-1 col-12 col-md-auto d-none d-{{ $size }}-block me-auto">
|
||||||
<div class="vr d-none d-md-flex h-100 mx-md-2"></div>
|
<div class="vr d-none d-md-flex h-100 mx-md-2"></div>
|
||||||
</li>
|
</li>
|
||||||
<li><hr class="dropdown-divider-bg"></li>
|
<li><hr class="dropdown-divider-bg"></li>
|
||||||
@@ -256,7 +265,7 @@
|
|||||||
<!-- Insert language switcher if applicable -->
|
<!-- Insert language switcher if applicable -->
|
||||||
{{- if $enableLanguage -}}
|
{{- if $enableLanguage -}}
|
||||||
{{- $currentLang := $page.Language.Lang -}}
|
{{- $currentLang := $page.Language.Lang -}}
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown me-auto">
|
||||||
<a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
|
<a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
|
||||||
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }} {{ T "languageSwitcherLabel" }}
|
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }} {{ T "languageSwitcherLabel" }}
|
||||||
</a>
|
</a>
|
||||||
@@ -284,7 +293,7 @@
|
|||||||
|
|
||||||
<!-- Insert modal search button -->
|
<!-- Insert modal search button -->
|
||||||
{{- if $searchModal }}
|
{{- if $searchModal }}
|
||||||
<li class="nav-item py-2 py-md-1 col-12 col-md-auto d-none d-{{ $size }}-block">
|
<li class="nav-item py-2 py-md-1 col-12 col-md-auto d-none d-{{ $size }}-block me-auto">
|
||||||
<div class="vr d-none d-md-flex h-100 mx-md-2"></div>
|
<div class="vr d-none d-md-flex h-100 mx-md-2"></div>
|
||||||
</li>
|
</li>
|
||||||
<li><hr class="dropdown-divider-bg"></li>
|
<li><hr class="dropdown-divider-bg"></li>
|
||||||
|
@@ -7,6 +7,9 @@
|
|||||||
{{ $page := .page }}
|
{{ $page := .page }}
|
||||||
{{ $input := .input }}
|
{{ $input := .input }}
|
||||||
{{ $args := .args }}
|
{{ $args := .args }}
|
||||||
|
{{ $sortable := .sortable | default false }}
|
||||||
|
{{ $paging := .paging | default false }}
|
||||||
|
{{ $searchable := .searchable | default false }}
|
||||||
|
|
||||||
{{- $responsiveVals := slice "table-responsive" "table-responsive-none" "table-responsive-sm" "table-responsive-md" "table-responsive-lg" "table-responsive-xl" "table-responsive-xxl" -}}
|
{{- $responsiveVals := slice "table-responsive" "table-responsive-none" "table-responsive-sm" "table-responsive-md" "table-responsive-lg" "table-responsive-xl" "table-responsive-xxl" -}}
|
||||||
{{- $responsive := intersect $args $responsiveVals -}}
|
{{- $responsive := intersect $args $responsiveVals -}}
|
||||||
@@ -18,13 +21,21 @@
|
|||||||
{{ $responsive = (slice "table-responsive") -}}
|
{{ $responsive = (slice "table-responsive") -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $class := delimit $main " " -}}
|
||||||
|
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
|
||||||
{{- $input := $input | $page.RenderString }}
|
{{- $input := $input | $page.RenderString }}
|
||||||
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
||||||
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
||||||
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
||||||
{{- $class := delimit $main " " -}}
|
|
||||||
|
{{ $attributes := "" }}
|
||||||
|
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
||||||
|
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=true" $attributes }}{{ end }}
|
||||||
|
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
|
||||||
|
|
||||||
{{- $old := "<table>" -}}
|
{{- $old := "<table>" -}}
|
||||||
{{- $new := printf "<table class=\"table %s\">" $class -}}
|
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
||||||
|
|
||||||
{{ $input := replace $input $old $new -}}
|
{{ $input := replace $input $old $new -}}
|
||||||
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
|
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
|
||||||
{{ $input | safeHTML }}
|
{{ $input | safeHTML }}
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $page_modules = $page_modules | append .Params.modules }}
|
{{ $page_modules = $page_modules | append .Params.modules }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with .Scratch.Get "dependencies" }}{{ $page_modules = append $page_modules . | uniq }}{{ end }}
|
||||||
|
|
||||||
{{ $config := page.Scratch.Get "modules" }}
|
{{ $config := page.Scratch.Get "modules" }}
|
||||||
{{ if not $config }}
|
{{ if not $config }}
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $page_modules := slice | append .Page.Params.modules }}
|
{{ $page_modules := slice | append .Page.Params.modules }}
|
||||||
|
{{ with .Scratch.Get "dependencies" }}{{ $page_modules = append $page_modules . | uniq }}{{ end }}
|
||||||
{{- $modules := $config.optional | intersect $page_modules -}}
|
{{- $modules := $config.optional | intersect $page_modules -}}
|
||||||
{{- range $index, $mod := $modules -}}
|
{{- range $index, $mod := $modules -}}
|
||||||
{{- $source := printf "scss/%s.scss" $mod -}}
|
{{- $source := printf "scss/%s.scss" $mod -}}
|
||||||
|
9
layouts/partials/utilities/AddModule.html
Normal file
9
layouts/partials/utilities/AddModule.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{{ with .module }}
|
||||||
|
{{- $dependencies := page.Scratch.Get "dependencies" -}}
|
||||||
|
{{- if reflect.IsSlice $dependencies -}}
|
||||||
|
{{- $dependencies = complement $dependencies . -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- $dependencies = slice . -}}
|
||||||
|
{{ end }}
|
||||||
|
{{- page.Scratch.Set "dependencies" $dependencies -}}
|
||||||
|
{{ end }}
|
@@ -29,6 +29,8 @@
|
|||||||
{{- $subtle := .Get "subtle" | default false -}}
|
{{- $subtle := .Get "subtle" | default false -}}
|
||||||
{{- $button := .Get "button" | default false -}}
|
{{- $button := .Get "button" | default false -}}
|
||||||
{{- $buttonType := .Get "buttonType" | default "" -}}
|
{{- $buttonType := .Get "buttonType" | default "" -}}
|
||||||
|
{{- $iconRounded := .Get "iconRounded" | default false -}}
|
||||||
|
{{- $scroll := .Get "scroll" | default false -}}
|
||||||
|
|
||||||
{{ $inner := .Scratch.Get "inner" }}
|
{{ $inner := .Scratch.Get "inner" }}
|
||||||
{{ $input := trim .Inner " \r\n" }}
|
{{ $input := trim .Inner " \r\n" }}
|
||||||
@@ -58,5 +60,7 @@
|
|||||||
"subtle" $subtle
|
"subtle" $subtle
|
||||||
"button" $button
|
"button" $button
|
||||||
"buttonType" $buttonType
|
"buttonType" $buttonType
|
||||||
|
"iconRounded" $iconRounded
|
||||||
|
"scroll" $scroll
|
||||||
)
|
)
|
||||||
-}}
|
-}}
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
{{- $gutter := partial "utilities/GetArgParent" (dict "page" . "arg" "gutter") | default "0" -}}
|
{{- $gutter := partial "utilities/GetArgParent" (dict "page" . "arg" "gutter") | default "0" -}}
|
||||||
{{- $header := partial "utilities/GetArgParent" (dict "page" . "arg" "header") | default "full" -}}
|
{{- $header := partial "utilities/GetArgParent" (dict "page" . "arg" "header") | default "full" -}}
|
||||||
{{- $icon := .Get "icon" -}}
|
{{- $icon := .Get "icon" -}}
|
||||||
|
{{- $iconRounded := partial "utilities/GetArgParent" (dict "page" . "arg" "iconRounded") | default false -}}
|
||||||
{{- $align := partial "utilities/GetArgParent" (dict "page" . "arg" "align") | default "start" -}}
|
{{- $align := partial "utilities/GetArgParent" (dict "page" . "arg" "align") | default "start" -}}
|
||||||
{{- $style := partial "utilities/GetArgParent" (dict "page" . "arg" "style") | default "" -}}
|
{{- $style := partial "utilities/GetArgParent" (dict "page" . "arg" "style") | default "" -}}
|
||||||
{{- $subtle := partial "utilities/GetArgParent" (dict "page" . "arg" "subtle") | default false -}}
|
{{- $subtle := partial "utilities/GetArgParent" (dict "page" . "arg" "subtle") | default false -}}
|
||||||
@@ -31,9 +32,13 @@
|
|||||||
{{- $page := .Page -}}
|
{{- $page := .Page -}}
|
||||||
{{- $path := .Get "path" -}}
|
{{- $path := .Get "path" -}}
|
||||||
{{- $thumbnail := .Get "thumbnail" -}}
|
{{- $thumbnail := .Get "thumbnail" -}}
|
||||||
|
{{- $anchor := .Get "anchor" -}}
|
||||||
{{- $title := .Get "title" -}}
|
{{- $title := .Get "title" -}}
|
||||||
{{- $button := partial "utilities/GetArgParent" (dict "page" . "arg" "button") | default false -}}
|
{{- $button := partial "utilities/GetArgParent" (dict "page" . "arg" "button") | default false -}}
|
||||||
{{- $buttonType := partial "utilities/GetArgParent" (dict "page" . "arg" "buttonType") | default "" -}}
|
{{- $buttonType := partial "utilities/GetArgParent" (dict "page" . "arg" "buttonType") | default "" -}}
|
||||||
|
{{- $cols := partial "utilities/GetArgParent" (dict "page" . "arg" "cols") | default 3 -}}
|
||||||
|
{{- $scroll := partial "utilities/GetArgParent" (dict "page" . "arg" "scroll") | default false -}}
|
||||||
|
{{- $wrapper := "" -}}
|
||||||
|
|
||||||
<!-- Override arguments -->
|
<!-- Override arguments -->
|
||||||
{{ if $path }}
|
{{ if $path }}
|
||||||
@@ -48,6 +53,11 @@
|
|||||||
{{ $class = (printf "h-100 %s" $class) }}
|
{{ $class = (printf "h-100 %s" $class) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $scroll }}
|
||||||
|
{{ $wrapper = printf "card-block-%d p-0" $cols }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{ if not $error -}}
|
{{ if not $error -}}
|
||||||
<!-- Render card -->
|
<!-- Render card -->
|
||||||
@@ -64,11 +74,15 @@
|
|||||||
"description" $description
|
"description" $description
|
||||||
"ratio" $ratio
|
"ratio" $ratio
|
||||||
"icon" $icon
|
"icon" $icon
|
||||||
|
"iconRounded" $iconRounded
|
||||||
"align" $align
|
"align" $align
|
||||||
"style" $style
|
"style" $style
|
||||||
"subtle" $subtle
|
"subtle" $subtle
|
||||||
|
"scroll" $scroll
|
||||||
|
"wrapper" $wrapper
|
||||||
"thumbnail" $thumbnail
|
"thumbnail" $thumbnail
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
|
"anchor" $anchor
|
||||||
"alt" $alt
|
"alt" $alt
|
||||||
"button" $button
|
"button" $button
|
||||||
"buttonType" $buttonType
|
"buttonType" $buttonType
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
{{- $loading := "" -}}
|
{{- $loading := "" -}}
|
||||||
{{- $error := false -}}
|
{{- $error := false -}}
|
||||||
{{- $plain := false -}}
|
{{- $plain := false -}}
|
||||||
|
{{- $anchor := "" -}}
|
||||||
|
|
||||||
{{- if .IsNamedParams -}}
|
{{- if .IsNamedParams -}}
|
||||||
{{ $url = .Get "src" | default "" -}}
|
{{ $url = .Get "src" | default "" -}}
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
{{ with .Get "mode" }}{{ $mode = partial "utilities/CastBool.html" . }}{{ end -}}
|
{{ with .Get "mode" }}{{ $mode = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||||
{{ with .Get "portrait" }}{{ $portrait = partial "utilities/CastBool.html" . }}{{ end -}}
|
{{ with .Get "portrait" }}{{ $portrait = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||||
{{ with .Get "plain" }}{{ $plain = partial "utilities/CastBool.html" . }}{{ end -}}
|
{{ with .Get "plain" }}{{ $plain = partial "utilities/CastBool.html" . }}{{ end -}}
|
||||||
|
{{ $anchor = .Get "anchor" | default "" -}}
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
{{ $url = .Get 0 }}
|
{{ $url = .Get 0 }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
@@ -61,6 +63,7 @@
|
|||||||
"mode" $mode
|
"mode" $mode
|
||||||
"portrait" $portrait
|
"portrait" $portrait
|
||||||
"plain" $plain
|
"plain" $plain
|
||||||
|
"anchor" $anchor
|
||||||
"loading" $loading
|
"loading" $loading
|
||||||
"page" .Page)
|
"page" .Page)
|
||||||
-}}
|
-}}
|
||||||
|
@@ -15,22 +15,35 @@
|
|||||||
<!-- Initialize arguments -->
|
<!-- Initialize arguments -->
|
||||||
{{ $breakpoint := "" }}
|
{{ $breakpoint := "" }}
|
||||||
{{ $class := "" }}
|
{{ $class := "" }}
|
||||||
|
{{ $sortable := false }}
|
||||||
|
{{ $paging := false }}
|
||||||
|
{{ $searchable := false }}
|
||||||
|
|
||||||
{{- if .IsNamedParams -}}
|
{{- if .IsNamedParams -}}
|
||||||
{{ $breakpoint = .Get "breakpoint" }}
|
{{ $breakpoint = .Get "breakpoint" }}
|
||||||
{{ $class = .Get "class" | default "" }}
|
{{ $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 }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $breakpoint = .Get 0 }}
|
{{ $breakpoint = .Get 0 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
|
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
|
||||||
{{- $input := .Inner | .Page.RenderString }}
|
{{- $input := .Inner | .Page.RenderString }}
|
||||||
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
|
||||||
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
|
||||||
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
|
||||||
{{- $old := "<table>" -}}
|
|
||||||
{{- $new := printf "<table class=\"table %s\">" $class -}}
|
|
||||||
{{ $input := replace $input $old $new -}}
|
|
||||||
|
|
||||||
|
{{ $attributes := "" }}
|
||||||
|
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
|
||||||
|
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=true" $attributes }}{{ end }}
|
||||||
|
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
|
||||||
|
|
||||||
|
{{- $old := "<table>" -}}
|
||||||
|
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
|
||||||
|
{{ $input := replace $input $old $new -}}
|
||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
{{ if eq $breakpoint "none" }}
|
{{ if eq $breakpoint "none" }}
|
||||||
{{ $input | safeHTML }}
|
{{ $input | safeHTML }}
|
||||||
|
825
package-lock.json
generated
825
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.24.7",
|
"version": "0.24.23",
|
||||||
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"hugo",
|
"hugo",
|
||||||
@@ -69,9 +69,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fullhuman/postcss-purgecss": "^6.0.0",
|
"@fullhuman/postcss-purgecss": "^6.0.0",
|
||||||
"autoprefixer": "^10.4.19",
|
"autoprefixer": "^10.4.19",
|
||||||
"cssnano": "^7.0.3",
|
"cssnano": "^7.0.4",
|
||||||
"cssnano-preset-advanced": "^7.0.3",
|
"cssnano-preset-advanced": "^7.0.4",
|
||||||
"hugo-bin": "0.124.0",
|
"hugo-bin": "0.126.0",
|
||||||
"purgecss-whitelister": "^2.4.0"
|
"purgecss-whitelister": "^2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -80,15 +80,15 @@
|
|||||||
"eslint-config-standard": "^17.1.0",
|
"eslint-config-standard": "^17.1.0",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.29.1",
|
||||||
"eslint-plugin-n": "^16.6.2",
|
"eslint-plugin-n": "^16.6.2",
|
||||||
"eslint-plugin-promise": "^6.2.0",
|
"eslint-plugin-promise": "^6.6.0",
|
||||||
"markdownlint-cli2": "^0.13.0",
|
"markdownlint-cli2": "^0.13.0",
|
||||||
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"postcss-cli": "^11.0.0",
|
"postcss-cli": "^11.0.0",
|
||||||
"replace-in-files-cli": "^2.2.0",
|
"replace-in-files-cli": "^3.0.0",
|
||||||
"rimraf": "^5.0.7",
|
"rimraf": "^6.0.1",
|
||||||
"shx": "^0.3.4",
|
"shx": "^0.3.4",
|
||||||
"stylelint": "^16.6.1",
|
"stylelint": "^16.7.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0"
|
"stylelint-config-standard-scss": "^13.1.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
Reference in New Issue
Block a user