mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 18:14:28 +00:00
Compare commits
40 Commits
v1.0.0-alp
...
v1.0.0-alp
Author | SHA1 | Date | |
---|---|---|---|
![]() |
805350c7b7 | ||
![]() |
9900dce30d | ||
![]() |
d40927f97a | ||
![]() |
8c5e032514 | ||
![]() |
47a410f333 | ||
![]() |
fe0d3553fb | ||
![]() |
05af8f72a3 | ||
![]() |
977c82b10d | ||
![]() |
be92798dec | ||
![]() |
db9b96797a | ||
![]() |
d41d58cf5d | ||
![]() |
d3fe893287 | ||
![]() |
e64a08c339 | ||
![]() |
900fce4169 | ||
![]() |
c82f9a41d4 | ||
![]() |
ea83db2eeb | ||
![]() |
d37c2f6517 | ||
![]() |
68a4859638 | ||
![]() |
81494cb1ed | ||
![]() |
8307e2ab57 | ||
![]() |
4e6aad33d6 | ||
![]() |
8c3989e4f1 | ||
![]() |
42a81bab5f | ||
![]() |
559f7be37f | ||
![]() |
a51e0c81c0 | ||
![]() |
463a6b229c | ||
![]() |
60302a7d36 | ||
![]() |
31395afee3 | ||
![]() |
40d16ebab9 | ||
![]() |
5aa08d45f2 | ||
![]() |
2a05087eab | ||
![]() |
24ae3d3ca1 | ||
![]() |
6b250b8d4c | ||
![]() |
90f8f91e61 | ||
![]() |
cc0d83189d | ||
![]() |
4d4db9e870 | ||
![]() |
58cfcc9131 | ||
![]() |
362aae875e | ||
![]() |
3f3a7c21e3 | ||
![]() |
dddb881628 |
@@ -1,6 +1,7 @@
|
|||||||
@import "modules/bookshop/shared/styles/global";
|
@import "modules/bookshop/shared/styles/global";
|
||||||
@import "modules/bookshop/components/about/about";
|
@import "modules/bookshop/components/about/about";
|
||||||
@import "modules/bookshop/components/articles/articles";
|
@import "modules/bookshop/components/articles/articles";
|
||||||
|
@import "modules/bookshop/components/cards/cards";
|
||||||
@import "modules/bookshop/components/faq/faq";
|
@import "modules/bookshop/components/faq/faq";
|
||||||
@import "modules/bookshop/components/hero/hero";
|
@import "modules/bookshop/components/hero/hero";
|
||||||
@import "modules/bookshop/components/releases/releases";
|
@import "modules/bookshop/components/releases/releases";
|
||||||
|
@@ -30,6 +30,7 @@ blueprint:
|
|||||||
mode:
|
mode:
|
||||||
order:
|
order:
|
||||||
width:
|
width:
|
||||||
|
justify:
|
||||||
link-type:
|
link-type:
|
||||||
links:
|
links:
|
||||||
-
|
-
|
||||||
|
@@ -9,7 +9,8 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "component-library/components/about/about.hugo.html"
|
"partial" "component-library/components/about/about.hugo.html"
|
||||||
"msg" " Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
"link-type" $args.linkType
|
"link-type" $args.linkType
|
||||||
"links" $args.links
|
"links" $args.links
|
||||||
"orientation" "horizontal"
|
"orientation" "horizontal"
|
||||||
"width" (or .width 8)
|
"width" (or $args.width 8)
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -43,3 +43,5 @@ blueprint:
|
|||||||
footer-style:
|
footer-style:
|
||||||
orientation:
|
orientation:
|
||||||
class:
|
class:
|
||||||
|
width:
|
||||||
|
justify:
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "component-library/components/articles/articles.hugo.html"
|
"partial" "component-library/components/articles/articles.hugo.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
@@ -61,48 +62,46 @@
|
|||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
<div class="container-xxl p-4 px-xxl-0">
|
{{- partial "assets/section-title.html" (dict "heading" $args.heading) -}}
|
||||||
{{- partial "assets/section-title.html" (dict "heading" $args.heading "class" "py-5") -}}
|
|
||||||
|
|
||||||
{{ $partial := "assets/card-group.html" }}
|
{{ $partial := "assets/card-group.html" }}
|
||||||
{{ $params := dict }}
|
{{ $params := dict }}
|
||||||
{{- $params = merge $params (dict
|
{{- $params = merge $params (dict
|
||||||
"page" page
|
"page" page
|
||||||
"list" $pages
|
"list" $pages
|
||||||
"max" $args.max
|
"max" $args.max
|
||||||
"cols" $args.cols
|
"cols" $args.cols
|
||||||
"icon-rounded" $args.iconRounded
|
"icon-rounded" $args.iconRounded
|
||||||
"href" (cond $moreButton $moreLink "")
|
"href" (cond $moreButton $moreLink "")
|
||||||
"href-title" (cond $moreButton $moreTitle "")
|
"href-title" (cond $moreButton $moreTitle "")
|
||||||
"href-force" (gt $result.total (len $result.pages))
|
"href-force" (gt $result.total (len $result.pages))
|
||||||
)}}
|
)}}
|
||||||
|
|
||||||
{{ if $args.scroll }}
|
{{ if $args.scroll }}
|
||||||
{{ $partial := "assets/stack.html" }}
|
{{ $partial := "assets/stack.html" }}
|
||||||
{{ $params = merge $params (dict
|
{{ $params = merge $params (dict
|
||||||
"header-style" "none"
|
"header-style" "none"
|
||||||
"body-style" "title"
|
"body-style" "title"
|
||||||
"footer-style" "none"
|
"footer-style" "none"
|
||||||
"gutter" 1
|
"gutter" 1
|
||||||
"padding" 3
|
"padding" 3
|
||||||
"ratio" "1x1"
|
"ratio" "1x1"
|
||||||
"orientation" "horizontal-sm"
|
"orientation" "horizontal-sm"
|
||||||
"styles" (cond $args.bento $styles "")
|
"styles" (cond $args.bento $styles "")
|
||||||
) -}}
|
) -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $params = merge $params (dict
|
{{ $params = merge $params (dict
|
||||||
"header-style" $args.headerStyle
|
"header-style" $args.headerStyle
|
||||||
"footer-style" $args.footerStyle
|
"footer-style" $args.footerStyle
|
||||||
"padding" $args.padding
|
"padding" $args.padding
|
||||||
"class" (or $args.class "border-0")
|
"class" (or $args.class "border-0")
|
||||||
"icon-style" "fa-2x"
|
"icon-style" "fa-2x"
|
||||||
"align" "start"
|
"align" "start"
|
||||||
"orientation" $args.orientation
|
"orientation" $args.orientation
|
||||||
"hook" "assets/live-card.html"
|
"hook" "assets/live-card.html"
|
||||||
"pagination" $args.pagination
|
"pagination" $args.pagination
|
||||||
"paginate" $paginate
|
"paginate" $paginate
|
||||||
) -}}
|
) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial $partial $params }}
|
{{ partial $partial $params }}
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
34
component-library/components/cards/cards.bookshop.yml
Normal file
34
component-library/components/cards/cards.bookshop.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Metadata about this component, to be used in the CMS
|
||||||
|
spec:
|
||||||
|
structures:
|
||||||
|
- content_blocks
|
||||||
|
label: Benefits
|
||||||
|
description: Introduction section
|
||||||
|
icon: check
|
||||||
|
tags: []
|
||||||
|
|
||||||
|
# Defines the structure of this component, as well as the default values
|
||||||
|
blueprint:
|
||||||
|
heading:
|
||||||
|
preheading:
|
||||||
|
heading:
|
||||||
|
content:
|
||||||
|
align:
|
||||||
|
width:
|
||||||
|
cols:
|
||||||
|
icon-rounded:
|
||||||
|
padding:
|
||||||
|
background:
|
||||||
|
backdrop:
|
||||||
|
color:
|
||||||
|
subtle:
|
||||||
|
elements:
|
||||||
|
- title:
|
||||||
|
icon:
|
||||||
|
image:
|
||||||
|
mode:
|
||||||
|
content:
|
||||||
|
orientation:
|
||||||
|
class:
|
||||||
|
width:
|
||||||
|
justify:
|
72
component-library/components/cards/cards.hugo.html
Normal file
72
component-library/components/cards/cards.hugo.html
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright © 2025 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
{{/* Initialize arguments */}}
|
||||||
|
{{ $args := partial "utilities/InitArgs.html" (dict "bookshop" "cards" "args" .)}}
|
||||||
|
{{ if or $args.err $args.warnmsg }}
|
||||||
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
|
"partial" "component-library/components/cards/cards.hugo.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
|
"file" page.File
|
||||||
|
)}}
|
||||||
|
{{ $error = $args.err }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* Initialize global arguments */}}
|
||||||
|
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
|
||||||
|
|
||||||
|
{{/* Initialize local variables */}}
|
||||||
|
{{ $list := slice }}
|
||||||
|
{{ range $args.elements }}
|
||||||
|
<!-- TODO: check mode -->
|
||||||
|
{{ $list = $list | append (dict
|
||||||
|
"title" .title
|
||||||
|
"description" (.content | page.RenderString)
|
||||||
|
"icon" .icon
|
||||||
|
"thumbnail" .image
|
||||||
|
) }}
|
||||||
|
{{ end}}
|
||||||
|
|
||||||
|
{{ if not $error }}
|
||||||
|
{{- partial "assets/section-title.html" (dict "heading" $args.heading) -}}
|
||||||
|
|
||||||
|
{{- partial "assets/card-group.html" (dict
|
||||||
|
"page" page
|
||||||
|
"list" $list
|
||||||
|
"class" (printf "border-0 card-icon-primary d-%s-none %s" $breakpoint.prev $args.class)
|
||||||
|
"cols" $args.cols
|
||||||
|
"gutter" "4"
|
||||||
|
"padding" $args.padding
|
||||||
|
"header-style" "none"
|
||||||
|
"footer-style" "none"
|
||||||
|
"icon-rounded" $args.iconRounded
|
||||||
|
"icon-style" "fa-2x"
|
||||||
|
"align" "start"
|
||||||
|
"orientation" ($args.orientation | default "horizontal-sm")
|
||||||
|
"hook" "assets/live-card.html"
|
||||||
|
) -}}
|
||||||
|
|
||||||
|
{{- partial "assets/card-group.html" (dict
|
||||||
|
"page" page
|
||||||
|
"list" $list
|
||||||
|
"class" (printf "border-0 card-icon-primary d-none d-%s-block %s" $breakpoint.prev $args.class)
|
||||||
|
"cols" $args.cols
|
||||||
|
"gutter" "4"
|
||||||
|
"padding" $args.padding
|
||||||
|
"header-style" "none"
|
||||||
|
"footer-style" "none"
|
||||||
|
"icon-rounded" $args.iconRounded
|
||||||
|
"icon-style" "fa-2x"
|
||||||
|
"align" "start"
|
||||||
|
"orientation" ($args.orientation | default "stacked")
|
||||||
|
"hook" "assets/live-card.html"
|
||||||
|
) -}}
|
||||||
|
{{ end }}
|
||||||
|
|
0
component-library/components/cards/cards.scss
Normal file
0
component-library/components/cards/cards.scss
Normal file
@@ -17,6 +17,8 @@ blueprint:
|
|||||||
width:
|
width:
|
||||||
size:
|
size:
|
||||||
contrast:
|
contrast:
|
||||||
|
width:
|
||||||
|
justify:
|
||||||
background:
|
background:
|
||||||
backdrop:
|
backdrop:
|
||||||
color:
|
color:
|
||||||
|
@@ -9,50 +9,45 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "component-library/components/faq/faq.hugo.html"
|
"partial" "component-library/components/faq/faq.hugo.html"
|
||||||
"msg" "Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if not $args.err }}
|
{{ if not $args.err }}
|
||||||
<div class="container-xxl p-4 px-xxl-0">
|
{{ $color := "" }}
|
||||||
{{ $color := "" }}
|
{{ if $args.contrast }}{{ $color = "white" }}{{ end }}
|
||||||
{{ if $args.contrast }}{{ $color = "white" }}{{ end }}
|
{{- partial "assets/section-title.html" (dict "heading" $args.heading "color" $color) -}}
|
||||||
{{- partial "assets/section-title.html" (dict
|
|
||||||
"heading" $args.heading
|
|
||||||
"color" $color
|
|
||||||
"class" "py-5"
|
|
||||||
) -}}
|
|
||||||
|
|
||||||
{{ $class := "" }}
|
{{ $class := "" }}
|
||||||
{{ $id := printf "faq-%s" (md5 (delimit (slice . now) "-")) }}
|
{{ $id := printf "faq-%s" (md5 (delimit (slice . now) "-")) }}
|
||||||
|
|
||||||
<div id="{{ $id }}" class="accordion accordion-faq {{ if $args.contrast }}accordion-faq-contrast text-white {{ end }}accordion-flush mb-3{{ with $class }} {{ . }}{{ end }} col-12 col-md-6 mx-auto">
|
<div id="{{ $id }}" class="accordion accordion-faq {{ if $args.contrast }}accordion-faq-contrast text-white {{ end }}accordion-flush mb-3{{ with $class }} {{ . }}{{ end }} col-12 col-md-6 mx-auto">
|
||||||
{{ range $index, $item := $args.items }}
|
{{ range $index, $item := $args.items }}
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
{{- with $item.title -}}
|
{{- with $item.title -}}
|
||||||
<div class="accordion-header m-0" id="{{ $id }}-heading-{{ $id }}">
|
<div class="accordion-header m-0" id="{{ $id }}-heading-{{ $id }}">
|
||||||
<button class="accordion-button collapsed"
|
<button class="accordion-button collapsed"
|
||||||
type="button"
|
type="button"
|
||||||
data-bs-toggle="collapse"
|
data-bs-toggle="collapse"
|
||||||
data-bs-target="#{{ $id }}-item-{{ $index }}"
|
data-bs-target="#{{ $id }}-item-{{ $index }}"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-controls="{{ $id }}-item-{{ $index }}"
|
aria-controls="{{ $id }}-item-{{ $index }}"
|
||||||
>
|
>
|
||||||
{{ if $args.color }}<div class="text-{{ $args.color }}">{{ . }}</div>{{ else }}{{ . }}{{ end }}
|
{{ if $args.color }}<div class="text-{{ $args.color }}">{{ . }}</div>{{ else }}{{ . }}{{ end }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
{{- end -}}
|
|
||||||
<div id="{{ $id }}-item-{{ $index }}"
|
|
||||||
class="accordion-collapse collapse"
|
|
||||||
aria-labelledby="{{ $id }}-heading-{{ $index }}"
|
|
||||||
data-bs-parent="#{{ $id }}"
|
|
||||||
>
|
|
||||||
<div class="accordion-body">{{ $item.description | page.RenderString | safeHTML }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
<div id="{{ $id }}-item-{{ $index }}"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
aria-labelledby="{{ $id }}-heading-{{ $index }}"
|
||||||
|
data-bs-parent="#{{ $id }}"
|
||||||
|
>
|
||||||
|
<div class="accordion-body">{{ $item.description | page.RenderString | safeHTML }}</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
</div>
|
||||||
</div>
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
@@ -38,3 +38,4 @@ blueprint:
|
|||||||
cover:
|
cover:
|
||||||
orientation:
|
orientation:
|
||||||
width:
|
width:
|
||||||
|
justify:
|
||||||
|
@@ -9,7 +9,8 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "component-library/components/hero/hero.hugo.html"
|
"partial" "component-library/components/hero/hero.hugo.html"
|
||||||
"msg" " Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
"links" $args.links
|
"links" $args.links
|
||||||
"orientation" $args.orientation
|
"orientation" $args.orientation
|
||||||
"width" $args.width
|
"width" $args.width
|
||||||
|
"justify" $args.justify
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
{{ end }}
|
{{ end }}
|
@@ -21,4 +21,6 @@ blueprint:
|
|||||||
backdrop:
|
backdrop:
|
||||||
color:
|
color:
|
||||||
subtle:
|
subtle:
|
||||||
|
width:
|
||||||
|
justify:
|
||||||
data:
|
data:
|
@@ -9,7 +9,8 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "component-library/components/releases/releases.hugo.html"
|
"partial" "component-library/components/releases/releases.hugo.html"
|
||||||
"msg" " Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
|
@@ -8,12 +8,13 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "component-library/components/separator/separator.hugo.html"
|
"partial" "component-library/components/separator/separator.hugo.html"
|
||||||
"msg" " Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if not $args.err }}
|
{{ if not $args.err }}
|
||||||
<div class="container-xxl p-0"{{ with $args.theme }} data-bs-theme="{{ . }}"{{ end }}><hr></div>
|
<hr class="w-100">
|
||||||
{{ end }}
|
{{ end }}
|
@@ -39,6 +39,7 @@ blueprint:
|
|||||||
label:
|
label:
|
||||||
border:
|
border:
|
||||||
width:
|
width:
|
||||||
|
justify:
|
||||||
|
|
||||||
_structures:
|
_structures:
|
||||||
messages:
|
messages:
|
||||||
|
@@ -9,13 +9,15 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "component-library/components/video-message/video-message.hugo.html"
|
"partial" "component-library/components/video-message/video-message.hugo.html"
|
||||||
"msg" " Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
|
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
|
||||||
|
{{- $padding := partial "utilities/GetPadding.html" -}}
|
||||||
|
|
||||||
{{- define "_partials/inline/video.html" -}}
|
{{- define "_partials/inline/video.html" -}}
|
||||||
{{ $provider := .provider }}
|
{{ $provider := .provider }}
|
||||||
@@ -24,10 +26,14 @@
|
|||||||
{{ $autoplay := .autoplay }}
|
{{ $autoplay := .autoplay }}
|
||||||
{{ $queryArgs := .queryArgs }}
|
{{ $queryArgs := .queryArgs }}
|
||||||
{{ $border := .border }}
|
{{ $border := .border }}
|
||||||
|
{{ $padding := .padding }}
|
||||||
|
|
||||||
{{ if site.Params.env_bookshop_live }}
|
{{ if site.Params.env_bookshop_live }}
|
||||||
{{/* Define dummy content as we cannot retrieve video data in live mode */}}
|
{{/* Define dummy content as we cannot retrieve video data in live mode */}}
|
||||||
{{- partial "assets/live-image.html" (dict "src" "/img/placeholder-video.svg" "ratio" "21x9" "wrapper" "text-center mb-4") -}}
|
{{- partial "assets/live-image.html" (dict
|
||||||
|
"src" "/img/placeholder-video.svg"
|
||||||
|
"ratio" "21x9"
|
||||||
|
"wrapper" (printf "text-center mb-%d" $padding.y)) -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="video-container{{ if $border }} video-container-border{{ end}}">
|
<div class="video-container{{ if $border }} video-container-border{{ end}}">
|
||||||
{{ partial "assets/video.html" (dict
|
{{ partial "assets/video.html" (dict
|
||||||
@@ -72,7 +78,7 @@
|
|||||||
) -}}
|
) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="container-xxl p-4 px-xxl-0">
|
{{ if not $args.err }}
|
||||||
{{ $list := slice }}
|
{{ $list := slice }}
|
||||||
|
|
||||||
{{ range $args.messages }}
|
{{ range $args.messages }}
|
||||||
@@ -90,13 +96,10 @@
|
|||||||
) }}
|
) }}
|
||||||
{{ end}}
|
{{ end}}
|
||||||
|
|
||||||
{{- partial "assets/section-title.html" (dict
|
{{- partial "assets/section-title.html" (dict "heading" $args.heading) -}}
|
||||||
"heading" $args.heading
|
|
||||||
"class" "py-5"
|
|
||||||
) -}}
|
|
||||||
|
|
||||||
{{ if eq $args.orientation "stacked" }}
|
{{ if eq $args.orientation "stacked" }}
|
||||||
<div class="col-{{ $breakpoint.current }}-{{ $args.width }} mx-auto">
|
<div class="col-{{ $breakpoint.current }}-{{ $args.width }} mx-auto pb-{{ $padding.y }}">
|
||||||
{{ with $args.video }}
|
{{ with $args.video }}
|
||||||
{{- partial "inline/video.html" (dict
|
{{- partial "inline/video.html" (dict
|
||||||
"provider" .provider
|
"provider" .provider
|
||||||
@@ -105,14 +108,15 @@
|
|||||||
"autoplay" .autoplay
|
"autoplay" .autoplay
|
||||||
"query-args" .queryArgs
|
"query-args" .queryArgs
|
||||||
"border" $.border
|
"border" $.border
|
||||||
|
"padding" $padding
|
||||||
) -}}
|
) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-{{ $padding.y }} pb-{{ $padding.y }}">
|
||||||
{{- partial "inline/messages.html" (dict "list" $list "cols" $args.cols "type" $args.type "iconRounded" $args.iconRounded) -}}
|
{{- partial "inline/messages.html" (dict "list" $list "cols" $args.cols "type" $args.type "iconRounded" $args.iconRounded) -}}
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="container grid gap-4">
|
<div class="container grid gap-4 pb-{{ $padding.y }}">
|
||||||
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2">
|
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2">
|
||||||
<div class="col col-{{ $breakpoint.current }}-{{ $args.width }} p-0">
|
<div class="col col-{{ $breakpoint.current }}-{{ $args.width }} p-0">
|
||||||
{{ with $args.video }}
|
{{ with $args.video }}
|
||||||
@@ -123,13 +127,14 @@
|
|||||||
"autoplay" .autoplay
|
"autoplay" .autoplay
|
||||||
"query-args" .queryArgs
|
"query-args" .queryArgs
|
||||||
"border" $.border
|
"border" $.border
|
||||||
|
"padding" $padding
|
||||||
) -}}
|
) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-{{ $breakpoint.current }}-{{ sub 12 $args.width }} mt-4 mt-{{ $breakpoint.current }}-0">
|
<div class="col col-{{ $breakpoint.current }}-{{ sub 12 $args.width }} mt-{{ $padding.y }} mt-{{ $breakpoint.current }}-0">
|
||||||
{{- partial "inline/messages.html" (dict "list" $list "cols" 1 "type" $args.type "iconRounded" $args.iconRounded) -}}
|
{{- partial "inline/messages.html" (dict "list" $list "cols" 1 "type" $args.type "iconRounded" $args.iconRounded) -}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
{{ end }}
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
{{- $component_props := index . 1 -}}
|
{{- $component_props := index . 1 -}}
|
||||||
{{- $class := index . 2 | default "p-0" -}}
|
{{- $class := index . 2 | default "p-0" -}}
|
||||||
{{- $bgclass := index . 3 | default "" -}}
|
{{- $bgclass := index . 3 | default "" -}}
|
||||||
|
{{- $padding := partial "utilities/GetPadding.html" -}}
|
||||||
{{- $component_path := partial "_bookshop/helpers/component_key" $component_name -}}
|
{{- $component_path := partial "_bookshop/helpers/component_key" $component_name -}}
|
||||||
{{- $flat_component_path := partial "_bookshop/helpers/flat_component_key" $component_name -}}
|
{{- $flat_component_path := partial "_bookshop/helpers/flat_component_key" $component_name -}}
|
||||||
|
|
||||||
@@ -32,6 +32,9 @@
|
|||||||
{{- $background := index $component_props "background" -}}
|
{{- $background := index $component_props "background" -}}
|
||||||
{{- $backdrop := "" -}}
|
{{- $backdrop := "" -}}
|
||||||
{{- $style := index $component_props "wrapper" -}}
|
{{- $style := index $component_props "wrapper" -}}
|
||||||
|
{{- $width := index $component_props "width" -}}
|
||||||
|
{{- $justify := index $component_props "justify" | default "start" -}}
|
||||||
|
{{- $padding := cond (ne $component_name "separator") (printf "px-%d px-xxl-0 py-%d" $padding.x $padding.y) "" -}}
|
||||||
{{- $wrapper := $style }}
|
{{- $wrapper := $style }}
|
||||||
{{ with $background }}
|
{{ with $background }}
|
||||||
{{ $wrapper = partial "utilities/GetBackgroundStyle.html" (dict "background" . "class" $style) }}
|
{{ $wrapper = partial "utilities/GetBackgroundStyle.html" (dict "background" . "class" $style) }}
|
||||||
@@ -59,7 +62,16 @@
|
|||||||
{{- if $backdrop -}}
|
{{- if $backdrop -}}
|
||||||
{{ partial "assets/live-image.html" (dict "src" $backdrop "class" (printf "background-img-fluid %s" $bgclass) "title" (T "backgroundImage")) }}
|
{{ partial "assets/live-image.html" (dict "src" $backdrop "class" (printf "background-img-fluid %s" $bgclass) "title" (T "backgroundImage")) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partial $resolved_component $component_props }}
|
|
||||||
|
{{ $col := cond (and $width (lt $width 12)) (printf "col-12 col-md-%d" $width) "" }}
|
||||||
|
|
||||||
|
<div class="container-xxl {{ $padding }} d-flex flex-column align-items-{{ $justify }}">
|
||||||
|
{{ with $col }}
|
||||||
|
<div class="{{ . }}">{{ partial $resolved_component $component_props }}</div>
|
||||||
|
{{ else }}
|
||||||
|
{{ partial $resolved_component $component_props }}
|
||||||
|
{{ end}}
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{ "<!--bookshop-live end-->" | safeHTML }}
|
{{ "<!--bookshop-live end-->" | safeHTML }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
@@ -10,6 +10,9 @@
|
|||||||
footerBelowFold = false
|
footerBelowFold = false
|
||||||
loading = "lazy"
|
loading = "lazy"
|
||||||
breakpoint = "md"
|
breakpoint = "md"
|
||||||
|
[main.padding]
|
||||||
|
x = 4
|
||||||
|
y = 4
|
||||||
titleCase = false
|
titleCase = false
|
||||||
[main.internalLinks]
|
[main.internalLinks]
|
||||||
validate = true
|
validate = true
|
||||||
|
@@ -151,13 +151,6 @@ arguments:
|
|||||||
- full
|
- full
|
||||||
- title
|
- title
|
||||||
- none
|
- none
|
||||||
# # TODO: rename bodyStyle
|
|
||||||
# bodyStyle:
|
|
||||||
# type: string
|
|
||||||
# optional: true
|
|
||||||
# default: lead text-muted
|
|
||||||
# comment: >-
|
|
||||||
# Style of the body text, if any..
|
|
||||||
border:
|
border:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
@@ -355,6 +348,12 @@ arguments:
|
|||||||
- template.HTML
|
- template.HTML
|
||||||
optional: true
|
optional: true
|
||||||
comment: Section content displayed below the title.
|
comment: Section content displayed below the title.
|
||||||
|
content-style:
|
||||||
|
type: string
|
||||||
|
optional: true
|
||||||
|
default: lead text-muted
|
||||||
|
comment: >-
|
||||||
|
Style of the section content, if any.
|
||||||
contrast:
|
contrast:
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
@@ -430,6 +429,11 @@ arguments:
|
|||||||
comment: Path to the download file, relative to the site's static folder.
|
comment: Path to the download file, relative to the site's static folder.
|
||||||
|
|
||||||
# e
|
# e
|
||||||
|
elements:
|
||||||
|
type: elements
|
||||||
|
optional: false
|
||||||
|
comment: >-
|
||||||
|
Elements to include in the card group. Each element is rendered as a card.
|
||||||
external:
|
external:
|
||||||
type: bool
|
type: bool
|
||||||
optional: true
|
optional: true
|
||||||
@@ -567,17 +571,16 @@ arguments:
|
|||||||
optional: true
|
optional: true
|
||||||
comment: >-
|
comment: >-
|
||||||
Heading of the content block, including a preheading and content element.
|
Heading of the content block, including a preheading and content element.
|
||||||
# # TODO: rename headingStyle
|
heading-style:
|
||||||
# headingStyle:
|
type: select
|
||||||
# type: select
|
optional: true
|
||||||
# optional: true
|
default: display
|
||||||
# default: display
|
options:
|
||||||
# options:
|
values:
|
||||||
# values:
|
- display
|
||||||
# - display
|
- fs
|
||||||
# - fs
|
comment: >-
|
||||||
# comment: >-
|
Style of the heading, either display style or regular style (fs).
|
||||||
# Style of the heading, either display or fs (regular).
|
|
||||||
# headline:
|
# headline:
|
||||||
# type: string
|
# type: string
|
||||||
# optional: true
|
# optional: true
|
||||||
@@ -713,7 +716,7 @@ arguments:
|
|||||||
type: select
|
type: select
|
||||||
optional: true
|
optional: true
|
||||||
default: center
|
default: center
|
||||||
comment: Justification of the link title and icon.
|
comment: Justification of the child elements.
|
||||||
options:
|
options:
|
||||||
values:
|
values:
|
||||||
- start
|
- start
|
||||||
|
@@ -32,6 +32,12 @@ types:
|
|||||||
items:
|
items:
|
||||||
- title:
|
- title:
|
||||||
description:
|
description:
|
||||||
|
elements:
|
||||||
|
- title:
|
||||||
|
icon:
|
||||||
|
image:
|
||||||
|
mode:
|
||||||
|
content:
|
||||||
links:
|
links:
|
||||||
- title:
|
- title:
|
||||||
url:
|
url:
|
||||||
|
@@ -2,6 +2,9 @@ comment: >-
|
|||||||
Generates a markdown table of structured arguments. The argument definitions are
|
Generates a markdown table of structured arguments. The argument definitions are
|
||||||
expected to be defined in a data file identified by a provided structure name.
|
expected to be defined in a data file identified by a provided structure name.
|
||||||
arguments:
|
arguments:
|
||||||
|
page:
|
||||||
|
optional: false
|
||||||
|
group: partial
|
||||||
structure:
|
structure:
|
||||||
type: string
|
type: string
|
||||||
position: 0
|
position: 0
|
||||||
@@ -26,3 +29,28 @@ arguments:
|
|||||||
comment: >-
|
comment: >-
|
||||||
Flag to filter only arguments that have a parent attribute (either
|
Flag to filter only arguments that have a parent attribute (either
|
||||||
`cascade` or `merge`).
|
`cascade` or `merge`).
|
||||||
|
render-type:
|
||||||
|
type: select
|
||||||
|
position: 3
|
||||||
|
default: both
|
||||||
|
optional: true
|
||||||
|
comment: >-
|
||||||
|
Option whether to render arguments, user-defined types, or both. Please
|
||||||
|
note that the arguments will render a link to a user-defined type in any
|
||||||
|
case.
|
||||||
|
options:
|
||||||
|
values:
|
||||||
|
- arguments
|
||||||
|
- types
|
||||||
|
- both
|
||||||
|
release: v1.0.0
|
||||||
|
header-level:
|
||||||
|
type: int
|
||||||
|
default: 3
|
||||||
|
optional: true
|
||||||
|
options:
|
||||||
|
min: 1
|
||||||
|
max: 6
|
||||||
|
comment: >-
|
||||||
|
The header level to use for the user-defined type headers.
|
||||||
|
release: v1.0.0
|
||||||
|
@@ -65,6 +65,7 @@ arguments:
|
|||||||
release: v1.0.0
|
release: v1.0.0
|
||||||
link-type:
|
link-type:
|
||||||
hook:
|
hook:
|
||||||
|
default: assets/image.html
|
||||||
group: partial
|
group: partial
|
||||||
sizes:
|
sizes:
|
||||||
group: partial
|
group: partial
|
||||||
|
@@ -11,3 +11,4 @@ arguments:
|
|||||||
wrapper:
|
wrapper:
|
||||||
class:
|
class:
|
||||||
image-overlay:
|
image-overlay:
|
||||||
|
justify:
|
||||||
|
@@ -15,6 +15,7 @@ arguments:
|
|||||||
cover:
|
cover:
|
||||||
orientation:
|
orientation:
|
||||||
width:
|
width:
|
||||||
|
justify:
|
||||||
use-section:
|
use-section:
|
||||||
use-title:
|
use-title:
|
||||||
class:
|
class:
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
comment: Adds a keyboard input element.
|
comment: Adds a keyboard input element.
|
||||||
arguments:
|
arguments:
|
||||||
text:
|
text:
|
||||||
|
optional: true
|
||||||
position: 0
|
position: 0
|
||||||
release: v1.0.0
|
release: v1.0.0
|
||||||
class:
|
class:
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
comment: >-
|
comment: >-
|
||||||
Defines an individual item.
|
Defines an individual item.
|
||||||
arguments:
|
arguments:
|
||||||
|
page:
|
||||||
|
group: partial
|
||||||
id:
|
id:
|
||||||
group: partial
|
group: partial
|
||||||
parent-id:
|
parent-id:
|
||||||
|
@@ -3,124 +3,13 @@ arguments:
|
|||||||
heading:
|
heading:
|
||||||
links:
|
links:
|
||||||
color:
|
color:
|
||||||
type: select
|
|
||||||
comment: Text color of the section.
|
|
||||||
default: body
|
default: body
|
||||||
optional: true
|
|
||||||
options:
|
|
||||||
values:
|
|
||||||
- body
|
|
||||||
- primary
|
|
||||||
- secondary
|
|
||||||
- black
|
|
||||||
- white
|
|
||||||
class:
|
class:
|
||||||
type: string
|
|
||||||
optional: true
|
|
||||||
comment: Class attribute of the section title.
|
|
||||||
size:
|
size:
|
||||||
type: int
|
|
||||||
optional: true
|
|
||||||
comment: Display size of the title.
|
|
||||||
options:
|
|
||||||
min: 1
|
|
||||||
max: 6
|
|
||||||
use-title:
|
use-title:
|
||||||
type: bool
|
|
||||||
optional: true
|
|
||||||
default: false
|
|
||||||
comment: Sets the title to an HTML header instead of a div.
|
|
||||||
justify:
|
justify:
|
||||||
type: select
|
link-type:
|
||||||
comment: Justification of the link titles and icons.
|
use-section:
|
||||||
optional: true
|
|
||||||
default: center
|
|
||||||
options:
|
|
||||||
values:
|
|
||||||
- start
|
|
||||||
- end
|
|
||||||
- center
|
|
||||||
- between
|
|
||||||
- around
|
|
||||||
- evenly
|
|
||||||
type:
|
|
||||||
type: select
|
|
||||||
optional: true
|
|
||||||
default: button
|
|
||||||
comment: Link type
|
|
||||||
options:
|
|
||||||
values:
|
|
||||||
- button
|
|
||||||
- link
|
|
||||||
section:
|
|
||||||
type: bool
|
|
||||||
optional: true
|
|
||||||
default: false
|
|
||||||
comment: >-
|
|
||||||
Trigger to use the current section as preheading, applies to single pages
|
|
||||||
only. Any preheading values takes precedence.
|
|
||||||
arrangement:
|
arrangement:
|
||||||
headingStyle:
|
heading-style:
|
||||||
type: select
|
content-style:
|
||||||
optional: true
|
|
||||||
default: display
|
|
||||||
options:
|
|
||||||
values:
|
|
||||||
- display
|
|
||||||
- fs
|
|
||||||
comment: >-
|
|
||||||
Style of the heading, either display or fs (regular).
|
|
||||||
bodyStyle:
|
|
||||||
type: string
|
|
||||||
optional: true
|
|
||||||
default: lead text-muted
|
|
||||||
comment: >-
|
|
||||||
Style of the body text, if any..
|
|
||||||
# class:
|
|
||||||
# type: string
|
|
||||||
# optional: true
|
|
||||||
# comment: Class attribute of the illustration, e.g. "col-6".
|
|
||||||
# image:
|
|
||||||
# type: string
|
|
||||||
# optional: true
|
|
||||||
# comment: Image displayed on top of or adjacent to the headline.
|
|
||||||
# imageOverlay:
|
|
||||||
# type: bool
|
|
||||||
# optional: true
|
|
||||||
# default: false
|
|
||||||
# comment: Trigger to include an image overlay placeholder.
|
|
||||||
# ratio:
|
|
||||||
# type: select
|
|
||||||
# optional: true
|
|
||||||
# default: 16x9
|
|
||||||
# comment: >-
|
|
||||||
# Ratio of the illustration, uses original aspect ratio by default.
|
|
||||||
# options:
|
|
||||||
# values:
|
|
||||||
# - 1x1
|
|
||||||
# - 3x2
|
|
||||||
# - 4x3
|
|
||||||
# - 16x9
|
|
||||||
# - 21x9
|
|
||||||
# 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
|
|
||||||
# icon:
|
|
||||||
# type: string
|
|
||||||
# optional: true
|
|
||||||
# comment: Icon or animation displayed on top of or adjacent to the headline.
|
|
||||||
|
@@ -8,6 +8,9 @@
|
|||||||
footerBelowFold = false
|
footerBelowFold = false
|
||||||
loading = "lazy"
|
loading = "lazy"
|
||||||
breakpoint = "md"
|
breakpoint = "md"
|
||||||
|
[main.padding]
|
||||||
|
x = 4
|
||||||
|
y = 4
|
||||||
titleCase = true
|
titleCase = true
|
||||||
[main.internalLinks]
|
[main.internalLinks]
|
||||||
validate = true
|
validate = true
|
||||||
|
@@ -8,20 +8,20 @@ content_blocks:
|
|||||||
title: Welcome to Hinode!
|
title: Welcome to Hinode!
|
||||||
content: |-
|
content: |-
|
||||||
A clean documentation and blog theme for your Hugo site based on Bootstrap 5.
|
A clean documentation and blog theme for your Hugo site based on Bootstrap 5.
|
||||||
align: start
|
width: 6
|
||||||
background:
|
background:
|
||||||
color: primary
|
color: primary
|
||||||
subtle: true
|
subtle: true
|
||||||
illustration:
|
illustration:
|
||||||
image: /img/sunrise.jpg
|
image: /img/sunrise.jpg
|
||||||
ratio: 16x9
|
ratio: 16x9
|
||||||
width: 8
|
width: 8
|
||||||
width: 6
|
|
||||||
links:
|
links:
|
||||||
- title: About
|
- title: About
|
||||||
url: about
|
url: about
|
||||||
icon: fas chevron-right
|
icon: fas chevron-right
|
||||||
orientation: horizontal
|
orientation: horizontal
|
||||||
|
justify: center
|
||||||
|
|
||||||
- _bookshop_name: articles
|
- _bookshop_name: articles
|
||||||
heading:
|
heading:
|
||||||
@@ -33,6 +33,7 @@ content_blocks:
|
|||||||
sort: date
|
sort: date
|
||||||
keywords: featured
|
keywords: featured
|
||||||
hide-empty: false
|
hide-empty: false
|
||||||
|
header-style: none
|
||||||
more:
|
more:
|
||||||
title: More Posts
|
title: More Posts
|
||||||
padding: 0
|
padding: 0
|
||||||
|
44
exampleSite/content/en/blocks/articles.md
Normal file
44
exampleSite/content/en/blocks/articles.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
_schema: default
|
||||||
|
title: Articles
|
||||||
|
description: Use the articles content block to show a group of article cards.
|
||||||
|
icon: fas grip
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The `articles` content block renders a group of article cards.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example-bookshop lang="bookshop" >}}
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- _bookshop_name: articles
|
||||||
|
heading:
|
||||||
|
title: Blog
|
||||||
|
align: start
|
||||||
|
input:
|
||||||
|
section: blog
|
||||||
|
reverse: false
|
||||||
|
sort: title
|
||||||
|
hide-empty: false
|
||||||
|
header-style: none
|
||||||
|
more:
|
||||||
|
title: More Blogs
|
||||||
|
padding: 0
|
||||||
|
max: 3
|
||||||
|
background:
|
||||||
|
color: primary
|
||||||
|
subtle: true
|
||||||
|
class: border-0 card-zoom card-body-margin
|
||||||
|
justify: center
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /example-bookshop >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Arguments
|
||||||
|
|
||||||
|
The content block supports the following arguments:
|
||||||
|
|
||||||
|
{{< args bookshop-articles >}}
|
44
exampleSite/content/en/blocks/cards.md
Normal file
44
exampleSite/content/en/blocks/cards.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
_schema: default
|
||||||
|
title: Cards
|
||||||
|
description: Use the cards content block to show a card group of messages.
|
||||||
|
icon: fa address-card
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The `cards` content block renders a group of content cards.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD037 -->
|
||||||
|
{{< example-bookshop lang="bookshop" >}}
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- _bookshop_name: cards
|
||||||
|
heading:
|
||||||
|
preheading: Preheading
|
||||||
|
title: Heading
|
||||||
|
content: Cards content. It supports multiple lines.
|
||||||
|
align: start
|
||||||
|
background:
|
||||||
|
color: primary
|
||||||
|
subtle: true
|
||||||
|
orientation: stacked
|
||||||
|
icon-rounded: true
|
||||||
|
class: text-center
|
||||||
|
elements:
|
||||||
|
- title: First Card
|
||||||
|
icon: fas 1
|
||||||
|
- title: Second Card
|
||||||
|
icon: fas 2
|
||||||
|
- title: Third Card
|
||||||
|
icon: fas 3
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /example-bookshop >}}
|
||||||
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
|
## Arguments
|
||||||
|
|
||||||
|
The content block supports the following arguments:
|
||||||
|
|
||||||
|
{{< args bookshop-cards >}}
|
@@ -21,7 +21,7 @@ As an example, the following shortcode displays the full text of an abbreviation
|
|||||||
|
|
||||||
<!-- markdownlint-disable MD037 -->
|
<!-- markdownlint-disable MD037 -->
|
||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* abbr key="CI/CD" */>}}
|
{{</* abbr "CI/CD" */>}}
|
||||||
{{< /example >}}
|
{{< /example >}}
|
||||||
<!-- markdownlint-enable MD037 -->
|
<!-- markdownlint-enable MD037 -->
|
||||||
|
|
||||||
@@ -33,8 +33,9 @@ As an example, the following shortcode displays an accordion with three elements
|
|||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* accordion */>}}
|
{{</* accordion */>}}
|
||||||
{{</* accordion-item title="Accordion Item #1" show="true" */>}}
|
{{</* accordion-item title="Accordion Item #1" show="true" */>}}
|
||||||
This is the first item's accordion body. It supports HTML content, if enabled in the goldmark
|
This is the first item's accordion body.
|
||||||
renderer. The item is shown by adding the value `show` to the `class` argument.
|
It supports Markdown content. The item
|
||||||
|
is shown by adding the value `show` to the `class` argument.
|
||||||
{{</* /accordion-item */>}}
|
{{</* /accordion-item */>}}
|
||||||
{{</* accordion-item title="Accordion Item #2" */>}}
|
{{</* accordion-item title="Accordion Item #2" */>}}
|
||||||
This is the second item's accordion body.
|
This is the second item's accordion body.
|
||||||
@@ -352,8 +353,8 @@ As an example, the following shortcode displays a tab group with vertically alig
|
|||||||
{{< example lang="hugo" >}}
|
{{< example lang="hugo" >}}
|
||||||
{{</* nav tab-type="pills" vertical="true" */>}}
|
{{</* nav tab-type="pills" vertical="true" */>}}
|
||||||
{{</* nav-item title="Nav Item #1" show="true" */>}}
|
{{</* nav-item title="Nav Item #1" show="true" */>}}
|
||||||
This is the first item's nav body. It supports HTML content, if enabled in the goldmark
|
This is the first item's nav body. It supports Markdown content.
|
||||||
renderer. The item is shown by adding the value `show` to the `class` argument.
|
The item is shown by adding the value `show` to the `class` argument.
|
||||||
{{</* /nav-item */>}}
|
{{</* /nav-item */>}}
|
||||||
{{</* nav-item title="Nav Item #2" */>}}
|
{{</* nav-item title="Nav Item #2" */>}}
|
||||||
This is the second item's nav body.
|
This is the second item's nav body.
|
||||||
|
@@ -69,6 +69,7 @@
|
|||||||
],
|
],
|
||||||
"classes": [
|
"classes": [
|
||||||
"%!s(<nil>)",
|
"%!s(<nil>)",
|
||||||
|
"%!s(MISSING)",
|
||||||
"about",
|
"about",
|
||||||
"accordion",
|
"accordion",
|
||||||
"accordion-body",
|
"accordion-body",
|
||||||
@@ -137,6 +138,7 @@
|
|||||||
"card-container-wrapper",
|
"card-container-wrapper",
|
||||||
"card-emphasize",
|
"card-emphasize",
|
||||||
"card-icon",
|
"card-icon",
|
||||||
|
"card-icon-primary",
|
||||||
"card-icon-secondary",
|
"card-icon-secondary",
|
||||||
"card-img-bg",
|
"card-img-bg",
|
||||||
"card-img-top",
|
"card-img-top",
|
||||||
@@ -144,6 +146,7 @@
|
|||||||
"card-text",
|
"card-text",
|
||||||
"card-title",
|
"card-title",
|
||||||
"card-zoom",
|
"card-zoom",
|
||||||
|
"cards",
|
||||||
"carousel",
|
"carousel",
|
||||||
"carousel-caption",
|
"carousel-caption",
|
||||||
"carousel-control-next",
|
"carousel-control-next",
|
||||||
@@ -169,7 +172,7 @@
|
|||||||
"col-lg-2",
|
"col-lg-2",
|
||||||
"col-lg-4",
|
"col-lg-4",
|
||||||
"col-lg-8",
|
"col-lg-8",
|
||||||
"col-md-",
|
"col-md-10",
|
||||||
"col-md-12",
|
"col-md-12",
|
||||||
"col-md-2",
|
"col-md-2",
|
||||||
"col-md-3",
|
"col-md-3",
|
||||||
@@ -181,9 +184,6 @@
|
|||||||
"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",
|
||||||
@@ -224,38 +224,52 @@
|
|||||||
"fa-3",
|
"fa-3",
|
||||||
"fa-4x",
|
"fa-4x",
|
||||||
"fa-activity",
|
"fa-activity",
|
||||||
|
"fa-address-card",
|
||||||
"fa-angle-left",
|
"fa-angle-left",
|
||||||
"fa-arrow-left",
|
"fa-arrow-left",
|
||||||
"fa-arrow-right",
|
"fa-arrow-right",
|
||||||
|
"fa-book-open",
|
||||||
"fa-bootstrap",
|
"fa-bootstrap",
|
||||||
|
"fa-check",
|
||||||
"fa-chevron-right",
|
"fa-chevron-right",
|
||||||
|
"fa-circle",
|
||||||
"fa-circle-check",
|
"fa-circle-check",
|
||||||
"fa-circle-play",
|
"fa-circle-play",
|
||||||
"fa-circle-question",
|
"fa-circle-question",
|
||||||
"fa-code",
|
"fa-code",
|
||||||
|
"fa-display",
|
||||||
"fa-divide",
|
"fa-divide",
|
||||||
"fa-docker",
|
"fa-docker",
|
||||||
"fa-ellipsis",
|
"fa-ellipsis",
|
||||||
"fa-face-frown",
|
"fa-face-frown",
|
||||||
"fa-facebook",
|
"fa-facebook",
|
||||||
"fa-fluid",
|
"fa-fluid",
|
||||||
|
"fa-font-awesome",
|
||||||
"fa-fw",
|
"fa-fw",
|
||||||
"fa-github",
|
"fa-github",
|
||||||
"fa-globe",
|
"fa-globe",
|
||||||
|
"fa-grip",
|
||||||
"fa-h",
|
"fa-h",
|
||||||
"fa-heart",
|
"fa-heart",
|
||||||
"fa-house",
|
"fa-house",
|
||||||
"fa-info",
|
"fa-info",
|
||||||
|
"fa-inverse",
|
||||||
"fa-link",
|
"fa-link",
|
||||||
"fa-linkedin",
|
"fa-linkedin",
|
||||||
"fa-magnifying-glass",
|
"fa-magnifying-glass",
|
||||||
|
"fa-markdown",
|
||||||
"fa-medium",
|
"fa-medium",
|
||||||
"fa-moon",
|
"fa-moon",
|
||||||
|
"fa-robot",
|
||||||
"fa-rocket",
|
"fa-rocket",
|
||||||
"fa-rotate-90",
|
"fa-rotate-90",
|
||||||
"fa-share-nodes",
|
"fa-share-nodes",
|
||||||
|
"fa-sitemap",
|
||||||
"fa-sort",
|
"fa-sort",
|
||||||
"fa-square-check",
|
"fa-square-check",
|
||||||
|
"fa-stack",
|
||||||
|
"fa-stack-1x",
|
||||||
|
"fa-stack-2x",
|
||||||
"fa-sun",
|
"fa-sun",
|
||||||
"fa-timeline",
|
"fa-timeline",
|
||||||
"fa-up-right-from-square",
|
"fa-up-right-from-square",
|
||||||
@@ -319,6 +333,7 @@
|
|||||||
"justify-content-between",
|
"justify-content-between",
|
||||||
"justify-content-center",
|
"justify-content-center",
|
||||||
"justify-content-end",
|
"justify-content-end",
|
||||||
|
"justify-content-md-start",
|
||||||
"justify-content-start",
|
"justify-content-start",
|
||||||
"katex",
|
"katex",
|
||||||
"label",
|
"label",
|
||||||
@@ -332,6 +347,7 @@
|
|||||||
"link-warning",
|
"link-warning",
|
||||||
"lottie-animation",
|
"lottie-animation",
|
||||||
"m-0",
|
"m-0",
|
||||||
|
"m-auto",
|
||||||
"m-md-n4",
|
"m-md-n4",
|
||||||
"m-n1",
|
"m-n1",
|
||||||
"main-content",
|
"main-content",
|
||||||
@@ -399,6 +415,7 @@
|
|||||||
"pb-3",
|
"pb-3",
|
||||||
"pb-4",
|
"pb-4",
|
||||||
"pb-5",
|
"pb-5",
|
||||||
|
"pe-0",
|
||||||
"pe-1",
|
"pe-1",
|
||||||
"pe-3",
|
"pe-3",
|
||||||
"pe-5",
|
"pe-5",
|
||||||
@@ -415,7 +432,6 @@
|
|||||||
"pt-4",
|
"pt-4",
|
||||||
"pt-5",
|
"pt-5",
|
||||||
"pt-md-0",
|
"pt-md-0",
|
||||||
"pt-md-3",
|
|
||||||
"ptw-3",
|
"ptw-3",
|
||||||
"ptw-5",
|
"ptw-5",
|
||||||
"ptw-lg-5",
|
"ptw-lg-5",
|
||||||
@@ -427,9 +443,7 @@
|
|||||||
"py-2",
|
"py-2",
|
||||||
"py-3",
|
"py-3",
|
||||||
"py-4",
|
"py-4",
|
||||||
"py-5",
|
|
||||||
"py-md-1",
|
"py-md-1",
|
||||||
"py-md-5",
|
|
||||||
"ratio",
|
"ratio",
|
||||||
"ratio-16x9",
|
"ratio-16x9",
|
||||||
"releases",
|
"releases",
|
||||||
@@ -557,6 +571,7 @@
|
|||||||
"animatie",
|
"animatie",
|
||||||
"animation",
|
"animation",
|
||||||
"arguments",
|
"arguments",
|
||||||
|
"background-type",
|
||||||
"badge",
|
"badge",
|
||||||
"barre-de-navigation",
|
"barre-de-navigation",
|
||||||
"block-diagram",
|
"block-diagram",
|
||||||
@@ -565,6 +580,7 @@
|
|||||||
"body-file-collapse-1",
|
"body-file-collapse-1",
|
||||||
"bouton",
|
"bouton",
|
||||||
"breadcrumb",
|
"breadcrumb",
|
||||||
|
"build-a-static-website-fast-and-flexible",
|
||||||
"button",
|
"button",
|
||||||
"button-group",
|
"button-group",
|
||||||
"c4-diagram",
|
"c4-diagram",
|
||||||
@@ -587,40 +603,160 @@
|
|||||||
"cookies-etc",
|
"cookies-etc",
|
||||||
"custom-activity",
|
"custom-activity",
|
||||||
"data-tables",
|
"data-tables",
|
||||||
|
"developer-friendly-and-secure",
|
||||||
"docs",
|
"docs",
|
||||||
"documentation",
|
"documentation",
|
||||||
|
"elements-type",
|
||||||
"entity-relationship-diagram",
|
"entity-relationship-diagram",
|
||||||
"example",
|
"example",
|
||||||
"exemple",
|
"exemple",
|
||||||
|
"fa-address-card",
|
||||||
"fa-face-frown",
|
"fa-face-frown",
|
||||||
|
"fa-font-awesome",
|
||||||
"fa-square-check",
|
"fa-square-check",
|
||||||
"fab-bootstrap",
|
"fab-bootstrap",
|
||||||
"fab-docker",
|
"fab-docker",
|
||||||
"fab-facebook",
|
"fab-facebook",
|
||||||
"fab-github",
|
"fab-github",
|
||||||
"fab-linkedin",
|
"fab-linkedin",
|
||||||
|
"fab-markdown",
|
||||||
"fab-medium",
|
"fab-medium",
|
||||||
"fab-whatsapp",
|
"fab-whatsapp",
|
||||||
"fab-x-twitter",
|
"fab-x-twitter",
|
||||||
"faq-b391d4dc8cc89100e59d51a84ec8b658",
|
"faq-0d9a663ea13795e571a591d17c829742",
|
||||||
"faq-b391d4dc8cc89100e59d51a84ec8b658-heading-faq-b391d4dc8cc89100e59d51a84ec8b658",
|
"faq-0d9a663ea13795e571a591d17c829742-heading-faq-0d9a663ea13795e571a591d17c829742",
|
||||||
"faq-b391d4dc8cc89100e59d51a84ec8b658-item-0",
|
"faq-0d9a663ea13795e571a591d17c829742-item-0",
|
||||||
"faq-b391d4dc8cc89100e59d51a84ec8b658-item-1",
|
"faq-0d9a663ea13795e571a591d17c829742-item-1",
|
||||||
"faq-b391d4dc8cc89100e59d51a84ec8b658-item-2",
|
"faq-0d9a663ea13795e571a591d17c829742-item-2",
|
||||||
|
"faq-1a91b395d4e278d5ad50026e5543d315",
|
||||||
|
"faq-1a91b395d4e278d5ad50026e5543d315-heading-faq-1a91b395d4e278d5ad50026e5543d315",
|
||||||
|
"faq-1a91b395d4e278d5ad50026e5543d315-item-0",
|
||||||
|
"faq-1a91b395d4e278d5ad50026e5543d315-item-1",
|
||||||
|
"faq-1a91b395d4e278d5ad50026e5543d315-item-2",
|
||||||
|
"faq-260a338c938b84539f6f323923f8e613",
|
||||||
|
"faq-260a338c938b84539f6f323923f8e613-heading-faq-260a338c938b84539f6f323923f8e613",
|
||||||
|
"faq-260a338c938b84539f6f323923f8e613-item-0",
|
||||||
|
"faq-260a338c938b84539f6f323923f8e613-item-1",
|
||||||
|
"faq-260a338c938b84539f6f323923f8e613-item-2",
|
||||||
|
"faq-27223f6d2ae1171f2cf24b1a28156a35",
|
||||||
|
"faq-27223f6d2ae1171f2cf24b1a28156a35-heading-faq-27223f6d2ae1171f2cf24b1a28156a35",
|
||||||
|
"faq-27223f6d2ae1171f2cf24b1a28156a35-item-0",
|
||||||
|
"faq-27223f6d2ae1171f2cf24b1a28156a35-item-1",
|
||||||
|
"faq-27223f6d2ae1171f2cf24b1a28156a35-item-2",
|
||||||
|
"faq-2d786b12873224179f3ed158e5a7d744",
|
||||||
|
"faq-2d786b12873224179f3ed158e5a7d744-heading-faq-2d786b12873224179f3ed158e5a7d744",
|
||||||
|
"faq-2d786b12873224179f3ed158e5a7d744-item-0",
|
||||||
|
"faq-2d786b12873224179f3ed158e5a7d744-item-1",
|
||||||
|
"faq-2d786b12873224179f3ed158e5a7d744-item-2",
|
||||||
|
"faq-3c297f2bc52c8df8d94d5eef851ab26d",
|
||||||
|
"faq-3c297f2bc52c8df8d94d5eef851ab26d-heading-faq-3c297f2bc52c8df8d94d5eef851ab26d",
|
||||||
|
"faq-3c297f2bc52c8df8d94d5eef851ab26d-item-0",
|
||||||
|
"faq-3c297f2bc52c8df8d94d5eef851ab26d-item-1",
|
||||||
|
"faq-3c297f2bc52c8df8d94d5eef851ab26d-item-2",
|
||||||
|
"faq-7021d3f3246f1cad44eb45aab9c051af",
|
||||||
|
"faq-7021d3f3246f1cad44eb45aab9c051af-heading-faq-7021d3f3246f1cad44eb45aab9c051af",
|
||||||
|
"faq-7021d3f3246f1cad44eb45aab9c051af-item-0",
|
||||||
|
"faq-7021d3f3246f1cad44eb45aab9c051af-item-1",
|
||||||
|
"faq-7021d3f3246f1cad44eb45aab9c051af-item-2",
|
||||||
|
"faq-79c40a4b7e8130c6d59d7d5ec68a806c",
|
||||||
|
"faq-79c40a4b7e8130c6d59d7d5ec68a806c-heading-faq-79c40a4b7e8130c6d59d7d5ec68a806c",
|
||||||
|
"faq-79c40a4b7e8130c6d59d7d5ec68a806c-item-0",
|
||||||
|
"faq-79c40a4b7e8130c6d59d7d5ec68a806c-item-1",
|
||||||
|
"faq-79c40a4b7e8130c6d59d7d5ec68a806c-item-2",
|
||||||
|
"faq-7a94a6ed05dee266e8fca51d4b03c44a",
|
||||||
|
"faq-7a94a6ed05dee266e8fca51d4b03c44a-heading-faq-7a94a6ed05dee266e8fca51d4b03c44a",
|
||||||
|
"faq-7a94a6ed05dee266e8fca51d4b03c44a-item-0",
|
||||||
|
"faq-7a94a6ed05dee266e8fca51d4b03c44a-item-1",
|
||||||
|
"faq-7a94a6ed05dee266e8fca51d4b03c44a-item-2",
|
||||||
|
"faq-87875e6a383425f97b473c2f294dc32b",
|
||||||
|
"faq-87875e6a383425f97b473c2f294dc32b-heading-faq-87875e6a383425f97b473c2f294dc32b",
|
||||||
|
"faq-87875e6a383425f97b473c2f294dc32b-item-0",
|
||||||
|
"faq-87875e6a383425f97b473c2f294dc32b-item-1",
|
||||||
|
"faq-87875e6a383425f97b473c2f294dc32b-item-2",
|
||||||
|
"faq-8cbeda0cbf69e9b1f730419797381724",
|
||||||
|
"faq-8cbeda0cbf69e9b1f730419797381724-heading-faq-8cbeda0cbf69e9b1f730419797381724",
|
||||||
|
"faq-8cbeda0cbf69e9b1f730419797381724-item-0",
|
||||||
|
"faq-8cbeda0cbf69e9b1f730419797381724-item-1",
|
||||||
|
"faq-8cbeda0cbf69e9b1f730419797381724-item-2",
|
||||||
|
"faq-a283ecb983d43eca6d74b09b4cfe0113",
|
||||||
|
"faq-a283ecb983d43eca6d74b09b4cfe0113-heading-faq-a283ecb983d43eca6d74b09b4cfe0113",
|
||||||
|
"faq-a283ecb983d43eca6d74b09b4cfe0113-item-0",
|
||||||
|
"faq-a283ecb983d43eca6d74b09b4cfe0113-item-1",
|
||||||
|
"faq-a283ecb983d43eca6d74b09b4cfe0113-item-2",
|
||||||
|
"faq-bf296c068826c3f70cda629523eaeee2",
|
||||||
|
"faq-bf296c068826c3f70cda629523eaeee2-heading-faq-bf296c068826c3f70cda629523eaeee2",
|
||||||
|
"faq-bf296c068826c3f70cda629523eaeee2-item-0",
|
||||||
|
"faq-bf296c068826c3f70cda629523eaeee2-item-1",
|
||||||
|
"faq-bf296c068826c3f70cda629523eaeee2-item-2",
|
||||||
|
"faq-ca8ce46ac820ed775e7a69120344616d",
|
||||||
|
"faq-ca8ce46ac820ed775e7a69120344616d-heading-faq-ca8ce46ac820ed775e7a69120344616d",
|
||||||
|
"faq-ca8ce46ac820ed775e7a69120344616d-item-0",
|
||||||
|
"faq-ca8ce46ac820ed775e7a69120344616d-item-1",
|
||||||
|
"faq-ca8ce46ac820ed775e7a69120344616d-item-2",
|
||||||
|
"faq-cbbd7ca0faf0b753868403f958cf8744",
|
||||||
|
"faq-cbbd7ca0faf0b753868403f958cf8744-heading-faq-cbbd7ca0faf0b753868403f958cf8744",
|
||||||
|
"faq-cbbd7ca0faf0b753868403f958cf8744-item-0",
|
||||||
|
"faq-cbbd7ca0faf0b753868403f958cf8744-item-1",
|
||||||
|
"faq-cbbd7ca0faf0b753868403f958cf8744-item-2",
|
||||||
|
"faq-cfb71a1e6c505922609807a314e54eed",
|
||||||
|
"faq-cfb71a1e6c505922609807a314e54eed-heading-faq-cfb71a1e6c505922609807a314e54eed",
|
||||||
|
"faq-cfb71a1e6c505922609807a314e54eed-item-0",
|
||||||
|
"faq-cfb71a1e6c505922609807a314e54eed-item-1",
|
||||||
|
"faq-cfb71a1e6c505922609807a314e54eed-item-2",
|
||||||
|
"faq-dce7a0223de22fc974afefb5fb73500c",
|
||||||
|
"faq-dce7a0223de22fc974afefb5fb73500c-heading-faq-dce7a0223de22fc974afefb5fb73500c",
|
||||||
|
"faq-dce7a0223de22fc974afefb5fb73500c-item-0",
|
||||||
|
"faq-dce7a0223de22fc974afefb5fb73500c-item-1",
|
||||||
|
"faq-dce7a0223de22fc974afefb5fb73500c-item-2",
|
||||||
|
"faq-de87d81175f84d4b473aedbb904dca29",
|
||||||
|
"faq-de87d81175f84d4b473aedbb904dca29-heading-faq-de87d81175f84d4b473aedbb904dca29",
|
||||||
|
"faq-de87d81175f84d4b473aedbb904dca29-item-0",
|
||||||
|
"faq-de87d81175f84d4b473aedbb904dca29-item-1",
|
||||||
|
"faq-de87d81175f84d4b473aedbb904dca29-item-2",
|
||||||
|
"faq-de9ce1500782d5d44b4de7a31ac22036",
|
||||||
|
"faq-de9ce1500782d5d44b4de7a31ac22036-heading-faq-de9ce1500782d5d44b4de7a31ac22036",
|
||||||
|
"faq-de9ce1500782d5d44b4de7a31ac22036-item-0",
|
||||||
|
"faq-de9ce1500782d5d44b4de7a31ac22036-item-1",
|
||||||
|
"faq-de9ce1500782d5d44b4de7a31ac22036-item-2",
|
||||||
|
"faq-e40f4cdf1d5fd2b6aa8c07326e2ba943",
|
||||||
|
"faq-e40f4cdf1d5fd2b6aa8c07326e2ba943-heading-faq-e40f4cdf1d5fd2b6aa8c07326e2ba943",
|
||||||
|
"faq-e40f4cdf1d5fd2b6aa8c07326e2ba943-item-0",
|
||||||
|
"faq-e40f4cdf1d5fd2b6aa8c07326e2ba943-item-1",
|
||||||
|
"faq-e40f4cdf1d5fd2b6aa8c07326e2ba943-item-2",
|
||||||
|
"faq-ec1d24cb71b18507b09f080761d59750",
|
||||||
|
"faq-ec1d24cb71b18507b09f080761d59750-heading-faq-ec1d24cb71b18507b09f080761d59750",
|
||||||
|
"faq-ec1d24cb71b18507b09f080761d59750-item-0",
|
||||||
|
"faq-ec1d24cb71b18507b09f080761d59750-item-1",
|
||||||
|
"faq-ec1d24cb71b18507b09f080761d59750-item-2",
|
||||||
|
"faq-f760b3a9afdbc65e4a1dea126792034b",
|
||||||
|
"faq-f760b3a9afdbc65e4a1dea126792034b-heading-faq-f760b3a9afdbc65e4a1dea126792034b",
|
||||||
|
"faq-f760b3a9afdbc65e4a1dea126792034b-item-0",
|
||||||
|
"faq-f760b3a9afdbc65e4a1dea126792034b-item-1",
|
||||||
|
"faq-f760b3a9afdbc65e4a1dea126792034b-item-2",
|
||||||
|
"faq-f965312ce85935dd57bb6ac2a5ae85fb",
|
||||||
|
"faq-f965312ce85935dd57bb6ac2a5ae85fb-heading-faq-f965312ce85935dd57bb6ac2a5ae85fb",
|
||||||
|
"faq-f965312ce85935dd57bb6ac2a5ae85fb-item-0",
|
||||||
|
"faq-f965312ce85935dd57bb6ac2a5ae85fb-item-1",
|
||||||
|
"faq-f965312ce85935dd57bb6ac2a5ae85fb-item-2",
|
||||||
"fas-1",
|
"fas-1",
|
||||||
"fas-2",
|
"fas-2",
|
||||||
"fas-3",
|
"fas-3",
|
||||||
"fas-angle-left",
|
"fas-angle-left",
|
||||||
"fas-arrow-left",
|
"fas-arrow-left",
|
||||||
"fas-arrow-right",
|
"fas-arrow-right",
|
||||||
|
"fas-book-open",
|
||||||
|
"fas-check",
|
||||||
"fas-chevron-right",
|
"fas-chevron-right",
|
||||||
|
"fas-circle",
|
||||||
"fas-circle-check",
|
"fas-circle-check",
|
||||||
"fas-circle-play",
|
"fas-circle-play",
|
||||||
"fas-circle-question",
|
"fas-circle-question",
|
||||||
"fas-code",
|
"fas-code",
|
||||||
|
"fas-display",
|
||||||
"fas-divide",
|
"fas-divide",
|
||||||
"fas-ellipsis",
|
"fas-ellipsis",
|
||||||
"fas-globe",
|
"fas-globe",
|
||||||
|
"fas-grip",
|
||||||
"fas-h",
|
"fas-h",
|
||||||
"fas-heart",
|
"fas-heart",
|
||||||
"fas-house",
|
"fas-house",
|
||||||
@@ -628,8 +764,10 @@
|
|||||||
"fas-link",
|
"fas-link",
|
||||||
"fas-magnifying-glass",
|
"fas-magnifying-glass",
|
||||||
"fas-moon",
|
"fas-moon",
|
||||||
|
"fas-robot",
|
||||||
"fas-rocket",
|
"fas-rocket",
|
||||||
"fas-share-nodes",
|
"fas-share-nodes",
|
||||||
|
"fas-sitemap",
|
||||||
"fas-sort",
|
"fas-sort",
|
||||||
"fas-sun",
|
"fas-sun",
|
||||||
"fas-timeline",
|
"fas-timeline",
|
||||||
@@ -637,6 +775,7 @@
|
|||||||
"fichier",
|
"fichier",
|
||||||
"fil-dariane",
|
"fil-dariane",
|
||||||
"file",
|
"file",
|
||||||
|
"flexible--ready-to-use",
|
||||||
"flowchart",
|
"flowchart",
|
||||||
"footer-docs-collapse-15",
|
"footer-docs-collapse-15",
|
||||||
"footer-file-collapse-1",
|
"footer-file-collapse-1",
|
||||||
@@ -659,6 +798,7 @@
|
|||||||
"imgix",
|
"imgix",
|
||||||
"indicateur-de-chargement",
|
"indicateur-de-chargement",
|
||||||
"infobulle",
|
"infobulle",
|
||||||
|
"input-type",
|
||||||
"ins",
|
"ins",
|
||||||
"invite-de-commandes",
|
"invite-de-commandes",
|
||||||
"items-type",
|
"items-type",
|
||||||
@@ -677,6 +817,7 @@
|
|||||||
"mermaid-diagrams",
|
"mermaid-diagrams",
|
||||||
"messages-type",
|
"messages-type",
|
||||||
"mindmap",
|
"mindmap",
|
||||||
|
"more-type",
|
||||||
"nav",
|
"nav",
|
||||||
"nav-0-0",
|
"nav-0-0",
|
||||||
"nav-0-1",
|
"nav-0-1",
|
||||||
@@ -697,6 +838,7 @@
|
|||||||
"overview",
|
"overview",
|
||||||
"persona",
|
"persona",
|
||||||
"pie-chart",
|
"pie-chart",
|
||||||
|
"powered-by-open-source",
|
||||||
"projecten",
|
"projecten",
|
||||||
"projects",
|
"projects",
|
||||||
"projets",
|
"projets",
|
||||||
|
2
go.mod
2
go.mod
@@ -15,7 +15,7 @@ require (
|
|||||||
github.com/gethinode/mod-lottie v1.5.14 // indirect
|
github.com/gethinode/mod-lottie v1.5.14 // indirect
|
||||||
github.com/gethinode/mod-mermaid v1.1.23 // indirect
|
github.com/gethinode/mod-mermaid v1.1.23 // indirect
|
||||||
github.com/gethinode/mod-simple-datatables v1.1.7 // indirect
|
github.com/gethinode/mod-simple-datatables v1.1.7 // indirect
|
||||||
github.com/gethinode/mod-utils/v3 v3.1.2 // indirect
|
github.com/gethinode/mod-utils/v3 v3.3.1 // indirect
|
||||||
github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a // indirect
|
github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a // indirect
|
||||||
github.com/twbs/bootstrap v5.3.6+incompatible // indirect
|
github.com/twbs/bootstrap v5.3.6+incompatible // indirect
|
||||||
)
|
)
|
||||||
|
8
go.sum
8
go.sum
@@ -412,6 +412,14 @@ github.com/gethinode/mod-utils/v3 v3.1.1 h1:hjC/vnq7NF2Kf18qkpeTHiS14bVrNa55avy0
|
|||||||
github.com/gethinode/mod-utils/v3 v3.1.1/go.mod h1:9iHYWiDpDlcyrGAOHniubK/kziJYhTsw7UpGM+u4MOM=
|
github.com/gethinode/mod-utils/v3 v3.1.1/go.mod h1:9iHYWiDpDlcyrGAOHniubK/kziJYhTsw7UpGM+u4MOM=
|
||||||
github.com/gethinode/mod-utils/v3 v3.1.2 h1:nE1tUkeSTOPxaLRoSiQlODbJhekOJsHrKXte5A2jujg=
|
github.com/gethinode/mod-utils/v3 v3.1.2 h1:nE1tUkeSTOPxaLRoSiQlODbJhekOJsHrKXte5A2jujg=
|
||||||
github.com/gethinode/mod-utils/v3 v3.1.2/go.mod h1:9iHYWiDpDlcyrGAOHniubK/kziJYhTsw7UpGM+u4MOM=
|
github.com/gethinode/mod-utils/v3 v3.1.2/go.mod h1:9iHYWiDpDlcyrGAOHniubK/kziJYhTsw7UpGM+u4MOM=
|
||||||
|
github.com/gethinode/mod-utils/v3 v3.1.3 h1:oIpbIUCpVrWb7Axo1TZODWJ2iA6uYZp4rpx8fC7GIXk=
|
||||||
|
github.com/gethinode/mod-utils/v3 v3.1.3/go.mod h1:9iHYWiDpDlcyrGAOHniubK/kziJYhTsw7UpGM+u4MOM=
|
||||||
|
github.com/gethinode/mod-utils/v3 v3.2.0 h1:FmRCMAqNvKeQSY+rTy+9lZ65JKkuDA9MTw/HW/HWzSM=
|
||||||
|
github.com/gethinode/mod-utils/v3 v3.2.0/go.mod h1:9iHYWiDpDlcyrGAOHniubK/kziJYhTsw7UpGM+u4MOM=
|
||||||
|
github.com/gethinode/mod-utils/v3 v3.3.0 h1:qxuIavgL9LIyMhfCv8El+KL41rcNmQ8GaExn142QmLw=
|
||||||
|
github.com/gethinode/mod-utils/v3 v3.3.0/go.mod h1:9iHYWiDpDlcyrGAOHniubK/kziJYhTsw7UpGM+u4MOM=
|
||||||
|
github.com/gethinode/mod-utils/v3 v3.3.1 h1:0mHrUyIwSkbiQIUuXpnptYDIizkI7Ak39RTgoRMbJfY=
|
||||||
|
github.com/gethinode/mod-utils/v3 v3.3.1/go.mod h1:9iHYWiDpDlcyrGAOHniubK/kziJYhTsw7UpGM+u4MOM=
|
||||||
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=
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/adapter/cloudinary.html"
|
"partial" "assets/adapter/cloudinary.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/adapter/hugo.html"
|
"partial" "assets/adapter/hugo.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/adapter/imagekit-rewrite.html"
|
"partial" "assets/adapter/imagekit-rewrite.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/adapter/imagekit.html"
|
"partial" "assets/adapter/imagekit.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/adapter/imgix.html"
|
"partial" "assets/adapter/imgix.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
132
layouts/_partials/assets/args.html
Normal file
132
layouts/_partials/assets/args.html
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright © 2022 - 2025 The Hinode Team / Mark Dumay. All rights reserved.
|
||||||
|
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
||||||
|
Visit gethinode.com/license for more details.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{ $error := false }}
|
||||||
|
|
||||||
|
{{ define "_partials/inline/args-table.html"}}
|
||||||
|
{{ $args := .args }}
|
||||||
|
{{ $types := .types }}
|
||||||
|
{{ $page := .page }}
|
||||||
|
{{ $group := .group | default "" }}
|
||||||
|
{{ $parent := .parent }}
|
||||||
|
{{ $reflect := "" }}
|
||||||
|
|
||||||
|
{{ $table := printf "| %s | %s | %s | %s | %s |\n| --- | --- | --- | --- | --- |"
|
||||||
|
(T "name") (T "type") (T "required") (T "default") (T "comment")
|
||||||
|
}}
|
||||||
|
|
||||||
|
{{ range $key, $val := $args }}
|
||||||
|
{{ if eq $key "_reflect" }}
|
||||||
|
{{ $reflect = $val }}
|
||||||
|
{{ continue }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $skip := false }}
|
||||||
|
{{ $groups := slice }}
|
||||||
|
{{ if $val }} {{ $groups = $groups | append $val.group }}{{ end }}
|
||||||
|
{{ if and $group $val.group }}
|
||||||
|
{{ $skip = not (in $groups $group )}}
|
||||||
|
{{ end }}
|
||||||
|
{{ if $parent }}{{ $skip = not (in (slice "cascade" "merge") $val.parent) }}{{ end }}
|
||||||
|
|
||||||
|
{{ if not $skip }}
|
||||||
|
{{ $type := $val.type }}
|
||||||
|
{{ $udt := false }}
|
||||||
|
{{ $slice := false }}
|
||||||
|
{{ if reflect.IsSlice $val.type }}{{ $type = delimit $val.type ", " }}{{ end }}
|
||||||
|
{{ with index $types $val.type }}
|
||||||
|
{{ $udt = true }}
|
||||||
|
{{ $slice = eq ._reflect "[]interface {}" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $required := "" }}
|
||||||
|
{{ if not $val.optional }}{{ $required = "yes" }}{{ end }}
|
||||||
|
|
||||||
|
{{ $comment := $val.comment }}
|
||||||
|
{{ if $val.deprecated }}
|
||||||
|
{{ $btn := printf `{{< release version="%s" short="true" button-size="sm" inline="true" release-state="deprecated" >}}` $val.deprecated }}
|
||||||
|
{{ with $val.alternative }}
|
||||||
|
{{ $comment = printf "%s **%s**. %s" $btn (T "alternativeFeature" .) $comment }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $comment = printf "%s %s" $btn $comment }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if $val.release }}
|
||||||
|
{{ $comment = printf `{{< release version="%s" short="true" button-size="sm" inline="true" >}} %s` $val.release $comment }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $min := "" }}
|
||||||
|
{{ $max := "" }}
|
||||||
|
{{ if and $val.options.values (eq $type "select") }}
|
||||||
|
{{ $comment = printf "%s %s: [`%s`]." $comment (T "supportedValues") (delimit $val.options.values "`, `") }}
|
||||||
|
{{ else if in (slice "int" "float" "float64") $type }}
|
||||||
|
{{ if eq (printf "%T" $val.options.min) "int" }}{{ $min = int $val.options.min }}{{ end }}
|
||||||
|
{{ if eq (printf "%T" $val.options.max) "int" }}{{ $max = int $val.options.max }}{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if and (eq (printf "%T" $min) "int") (eq (printf "%T" $max) "int") }}
|
||||||
|
{{ $comment = printf "%s %s: [`%d - %d`]." $comment (T "supportedValues") $min $max }}
|
||||||
|
{{ else if (eq (printf "%T" $min) "int") }}
|
||||||
|
{{ $comment = printf "%s %s: `>=%d`." $comment (T "supportedValues") $min }}
|
||||||
|
{{ else if (eq (printf "%T" $max) "int") }}
|
||||||
|
{{ $comment = printf "%s %s: `<=%d`." $comment (T "supportedValues") $max }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $default := "" }}
|
||||||
|
{{ with $val.default }}{{ $default = printf "`%v`" . }}{{ end }}
|
||||||
|
{{ if $udt }}{{ $type = printf "[%s](#%s)" $type (anchorize (printf "%s %s" $type (T "type"))) }}{{ end }}
|
||||||
|
{{ if $slice }}{{ $type = printf "[]%s" $type }}{{ end }}
|
||||||
|
{{ $table = printf "%s\n| %s | %s | %s | %s | %s |" $table $key $type $required $default $comment }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ return partial "assets/table.html" (dict "page" $page "input" $table "wrap" true) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* Initialize arguments */}}
|
||||||
|
{{- $args := partial "utilities/InitArgs.html" (dict "structure" "args" "args" . "group" "partial") -}}
|
||||||
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
|
"partial" "assets/args.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
|
"file" page.File
|
||||||
|
) -}}
|
||||||
|
{{- $error = $args.err -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/* Initialize type structure */}}
|
||||||
|
{{ $structure := $args.structure }}
|
||||||
|
{{ $bookshop := "" }}
|
||||||
|
{{ if hasPrefix $structure "bookshop-" }}{{ $bookshop = strings.TrimPrefix "bookshop-" $structure }}{{ $structure = "" }}{{ end }}
|
||||||
|
{{ $types := dict }}
|
||||||
|
{{ if not $error }}
|
||||||
|
{{ $types = partial "utilities/InitTypes.html" (dict "structure" $structure "bookshop" $bookshop) }}
|
||||||
|
{{ if or $types.err $types.warnmsg }}
|
||||||
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
|
"partial" "assets/args.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
|
"details" ($types.errmsg | append $types.warnmsg)
|
||||||
|
"file" page.File
|
||||||
|
)}}
|
||||||
|
{{ $error = $args.err }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* Main code */}}
|
||||||
|
{{ if not $error }}
|
||||||
|
{{ $params := dict "types" $types.udt "page" $args.page "group" $args.group "parent" $args.parent }}
|
||||||
|
{{ if in (slice "arguments" "both") $args.renderType }}
|
||||||
|
{{ partial "inline/args-table.html" (merge $params (dict "args" $types.types)) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if in (slice "types" "both") $args.renderType }}
|
||||||
|
{{ $prefix := strings.Repeat $args.headerLevel "#" }}
|
||||||
|
{{ range $k, $v := $types.udt }}
|
||||||
|
{{ printf "%s %s %s" $prefix $k (T "type") | $args.page.RenderString }}
|
||||||
|
{{ partial "inline/args-table.html" (merge $params (dict "args" $v)) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
@@ -21,6 +21,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/breadcrumb.html"
|
"partial" "assets/breadcrumb.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,9 +11,10 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/button.html"
|
"partial" "assets/button.html"
|
||||||
"msg" "Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ $error = $args.err }}
|
{{ $error = $args.err }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -21,14 +21,17 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/card-group.html"
|
"partial" "assets/card-group.html"
|
||||||
"msg" "Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{- $error = $args.err -}}
|
{{- $error = $args.err -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/* Initialize global variables */}}
|
{{/* Initialize global variables */}}
|
||||||
|
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
|
||||||
|
{{- $padding := partial "utilities/GetPadding.html" -}}
|
||||||
{{- $pretty := site.Params.main.internalLinks.pretty | default false -}}
|
{{- $pretty := site.Params.main.internalLinks.pretty | default false -}}
|
||||||
|
|
||||||
{{/* Initialize local variables */}}
|
{{/* Initialize local variables */}}
|
||||||
@@ -135,8 +138,7 @@
|
|||||||
|
|
||||||
{{/* Main code */}}
|
{{/* Main code */}}
|
||||||
{{- if and (not $error) (or (gt (len $elements) 0) $args.cards) -}}
|
{{- if and (not $error) (or (gt (len $elements) 0) $args.cards) -}}
|
||||||
<div class="{{- $args.wrapper -}}">
|
<div class="container-fluid {{ if $args.scroll }}card-container-wrapper{{ end }} p-0 {{ $args.wrapper }}">
|
||||||
<div class="container-fluid {{ if $args.scroll }}card-container-wrapper{{ end }} p-0">
|
|
||||||
<div class="row g-{{ $args.gutter -}}
|
<div class="row g-{{ $args.gutter -}}
|
||||||
{{- if $args.scroll }} d-flex flex-row flex-nowrap card-container scrollbar-horizontal pb-4 w-100 {{ end -}}
|
{{- if $args.scroll }} d-flex flex-row flex-nowrap card-container scrollbar-horizontal pb-4 w-100 {{ end -}}
|
||||||
{{- if $args.bento }}{{ with $args.valign }} align-items-{{ . }}{{ end }}{{ else }} {{ $colGrid }}{{ end }}">
|
{{- if $args.bento }}{{ with $args.valign }} align-items-{{ . }}{{ end }}{{ else }} {{ $colGrid }}{{ end }}">
|
||||||
@@ -186,7 +188,7 @@
|
|||||||
|
|
||||||
{{- if $paginator -}}
|
{{- if $paginator -}}
|
||||||
{{- if gt $paginator.TotalPages 1 -}}
|
{{- if gt $paginator.TotalPages 1 -}}
|
||||||
<div class="pt-3">{{- partial "assets/pagination.html" (dict "page" $args.page "format" "terse") -}}</div>
|
<div class="pt-{{ $padding.y }}">{{- partial "assets/pagination.html" (dict "page" $args.page "format" "terse") -}}</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- if or (and (gt $count $max) $args.hrefTitle) (and $args.hrefForce $args.hrefTitle) -}}
|
{{- if or (and (gt $count $max) $args.hrefTitle) (and $args.hrefForce $args.hrefTitle) -}}
|
||||||
@@ -194,8 +196,11 @@
|
|||||||
{{- if and $pretty (not (hasSuffix $href "/" )) (not (strings.Contains $href "#")) -}}
|
{{- if and $pretty (not (hasSuffix $href "/" )) (not (strings.Contains $href "#")) -}}
|
||||||
{{- $href = printf "%s/" $href -}}
|
{{- $href = printf "%s/" $href -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<a class="btn btn-outline-primary mt-4" href="{{ $href | safeURL }}" role="button">{{ $args.hrefTitle }}</a>
|
<div class="mt-{{ $padding.y }} w-100">
|
||||||
|
<a class="btn btn-outline-primary" href="{{ $href | safeURL }}" role="button">
|
||||||
|
{{ $args.hrefTitle }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
|
||||||
{{- end -}}
|
{{- end -}}
|
@@ -62,14 +62,18 @@
|
|||||||
</small></p>
|
</small></p>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/* Initialize arguments */}}
|
{{/* Initialize global variables */}}
|
||||||
|
{{- $padding := partial "utilities/GetPadding.html" -}}
|
||||||
|
|
||||||
|
{{/* Initialize local arguments */}}
|
||||||
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "card" "args" . "group" "partial") }}
|
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "card" "args" . "group" "partial") }}
|
||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/card.html"
|
"partial" "assets/card.html"
|
||||||
"msg" "Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ $error = $args.err }}
|
{{ $error = $args.err }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -147,19 +151,19 @@
|
|||||||
{{ if $thumbnail }}
|
{{ if $thumbnail }}
|
||||||
{{ if eq $args.orientation "horizontal-sm" }}
|
{{ if eq $args.orientation "horizontal-sm" }}
|
||||||
{{ $stack = "fa-1x" }}
|
{{ $stack = "fa-1x" }}
|
||||||
{{ $col1 = "col-4 col-md-2" }}
|
{{ $col1 = "col-4 col-md-2 pe-0" }}
|
||||||
{{ $col2 = "col-8 col-md-10" }}
|
{{ $col2 = "col-8 col-md-10" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $col1 = "col-4" }}
|
{{ $col1 = "col-4 pe-0" }}
|
||||||
{{ $col2 = "col-8" }}
|
{{ $col2 = "col-8" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else if $icon }}
|
{{ else if $icon }}
|
||||||
{{ if eq $args.orientation "horizontal-sm" }}
|
{{ if eq $args.orientation "horizontal-sm" }}
|
||||||
{{ $stack = "fa-1x" }}
|
{{ $stack = "fa-1x" }}
|
||||||
{{ $col1 = "col-2 col-sm-3 col-md-4 col-xl-2" }}
|
{{ $col1 = "col-4 col-md-2 pe-0" }}
|
||||||
{{ $col2 = "col-10 col-sm-9 col-md-8 col-xl-10" }}
|
{{ $col2 = "col-8 col-md-10" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $col1 = "col-4" }}
|
{{ $col1 = "col-4 pe-0" }}
|
||||||
{{ $col2 = "col-8" }}
|
{{ $col2 = "col-8" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@@ -167,7 +171,7 @@
|
|||||||
|
|
||||||
{{/* Render horizontal card */}}
|
{{/* Render horizontal card */}}
|
||||||
<div class="card {{ $colorStyle }}{{ $args.class }}">
|
<div class="card {{ $colorStyle }}{{ $args.class }}">
|
||||||
<div class="row g-0 row-cols-2 h-100{{ if $args.button }} pb-5{{ end }}">
|
<div class="row g-0 row-cols-2 h-100{{ if $args.button }} pb-{{ $padding.y }}{{ end }}">
|
||||||
{{- if $thumbnail -}}
|
{{- if $thumbnail -}}
|
||||||
<div class="{{ $col1 }}">
|
<div class="{{ $col1 }}">
|
||||||
{{ $fullHeight := "card-img-h100" }}
|
{{ $fullHeight := "card-img-h100" }}
|
||||||
|
@@ -9,9 +9,10 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/carousel-item.html"
|
"partial" "assets/carousel-item.html"
|
||||||
"msg" "Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/download.html"
|
"partial" "assets/download.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/featured-illustration.html"
|
"partial" "assets/featured-illustration.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/helpers/get-dimension.html"
|
"partial" "assets/helpers/get-dimension.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/helpers/image-definition.html"
|
"partial" "assets/helpers/image-definition.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/helpers/image-dimension.html"
|
"partial" "assets/helpers/image-dimension.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/helpers/image-rewrite.html"
|
"partial" "assets/helpers/image-rewrite.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/helpers/image-set.html"
|
"partial" "assets/helpers/image-set.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,14 +9,15 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/hero-image.html"
|
"partial" "assets/hero-image.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if not $args.err }}
|
{{ if and (not $args.err) (or $args.image $args.icon) }}
|
||||||
<div class="hero-image-container">
|
<div class="hero-image-container {{ with $args.justify }}d-flex justify-content-center justify-content-md-{{ . }}{{ end }}">
|
||||||
{{ partial "assets/featured-illustration.html" (dict
|
{{ partial "assets/featured-illustration.html" (dict
|
||||||
"page" $args.page
|
"page" $args.page
|
||||||
"icon" $args.icon
|
"icon" $args.icon
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/hero.html"
|
"partial" "assets/hero.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
@@ -21,22 +22,21 @@
|
|||||||
{{/* Initialize global variables */}}
|
{{/* Initialize global variables */}}
|
||||||
{{ $arrangement := site.Params.modules.bookshop.title.arrangement }}
|
{{ $arrangement := site.Params.modules.bookshop.title.arrangement }}
|
||||||
{{ if eq $args.order "first" }}{{ $arrangement = "above" }}{{ end }}
|
{{ if eq $args.order "first" }}{{ $arrangement = "above" }}{{ end }}
|
||||||
|
{{- $padding := partial "utilities/GetPadding.html" -}}
|
||||||
|
|
||||||
{{/* Initialize local variables */}}
|
{{/* Initialize local variables */}}
|
||||||
{{ $align := $args.align }}
|
{{ $align := $args.align }}
|
||||||
{{ if and (not $align) (eq $args.orientation "stacked") }}{{ $align = "center" }}{{ end }}
|
{{ $class := $args.class | default "" }}
|
||||||
{{ $class := $args.class }}
|
|
||||||
{{ $scale := $args.illustration.width }}
|
{{ $scale := $args.illustration.width }}
|
||||||
|
|
||||||
{{ if $scale }}
|
{{ if $scale }}
|
||||||
{{ $class = trim (printf "%s col-%d " $class $scale) " " }}
|
{{ $class = trim (printf "%s col-%d text-center text-md-%s" $class $scale $align) " " }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $class = trim (printf "%s col-8 col-md-12" $class) " " }}
|
|
||||||
{{ $scale = 12 }}
|
{{ $scale = 12 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $iconWrapper := "col-6" }}
|
{{ $iconWrapper := "col-6" }}
|
||||||
{{ if $args.center }}{{ $iconWrapper = "col-6 mx-auto text-center" }}{{ end }}
|
{{ $heading := cond (eq $args.orientation "horizontal") (merge $args.heading (dict "width" 12)) $args.heading }}
|
||||||
|
|
||||||
{{ $sizes := "100vw" }}
|
{{ $sizes := "100vw" }}
|
||||||
{{ if or (lt $args.width 12) (lt $scale 12) }}
|
{{ if or (lt $args.width 12) (lt $scale 12) }}
|
||||||
@@ -57,79 +57,76 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if not $error }}
|
{{ if not $error }}
|
||||||
<div class="container-xxl {{ $args.padding }} d-flex flex-column">
|
{{ if and $args.breadcrumb (not page.IsHome) }}
|
||||||
{{ if and $args.breadcrumb (not page.IsHome) }}
|
<div class="d-flex flex-column align-items-{{ $align}} mb-{{ $padding.y }} pe-3">
|
||||||
<div class="d-flex flex-column align-items-{{ $align}} mb-4 pe-3">
|
{{ if site.Params.env_bookshop_live }}
|
||||||
{{ if site.Params.env_bookshop_live }}
|
<i class="text-white">Breadcrumb preview not supported</i>
|
||||||
<i class="text-white">Breadcrumb preview not supported</i>
|
{{ else }}
|
||||||
{{ else }}
|
{{ partial "assets/breadcrumb.html" (dict "page" page) }}
|
||||||
{{ partial "assets/breadcrumb.html" (dict "page" page) }}
|
{{ end }}
|
||||||
{{ end }}
|
</div>
|
||||||
</div>
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $imageWrapper := printf "mx-auto mx-md-0 %s" $class }}
|
{{ $imageWrapper := printf "mx-md-0 text-%s %s" $align $class }}
|
||||||
{{ if eq $args.orientation "stacked" }}
|
{{ $imageJustify := "" }}
|
||||||
{{ $imageWrapper = printf "pt-5 %s" $class }}
|
{{ if eq $args.orientation "stacked" }}
|
||||||
{{ if $args.center }}{{ $imageWrapper = printf "%s mx-auto" $imageWrapper }}{{ end }}
|
{{ $imageWrapper = printf "pt-%d text-center %s" $padding.y $class }}
|
||||||
{{ if $args.icon }}{{ $imageWrapper = $iconWrapper }}{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $sectionClass := cond (eq $args.orientation "stacked") "pt-5" "py-md-5" }}
|
|
||||||
{{ if $args.icon }}{{ $imageWrapper = $iconWrapper }}{{ end }}
|
{{ if $args.icon }}{{ $imageWrapper = $iconWrapper }}{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $imageJustify = $align }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ $illustration := partial $args.hook (dict
|
{{ if $args.icon }}{{ $imageWrapper = $iconWrapper }}{{ end }}
|
||||||
"page" $args.page
|
|
||||||
"image" $args.illustration.image
|
|
||||||
"icon" $args.illustration.icon
|
|
||||||
"anchor" $args.illustration.anchor
|
|
||||||
"mode" $args.illustration.mode
|
|
||||||
"ratio" $args.illustration.ratio
|
|
||||||
"sizes" $sizes
|
|
||||||
"title" (T "heroImage")
|
|
||||||
"wrapper" $imageWrapper
|
|
||||||
"class" "hero-image"
|
|
||||||
"image-overlay" $args.imageOverlay
|
|
||||||
) }}
|
|
||||||
|
|
||||||
{{ $title := partial "assets/section-title.html" (dict
|
{{ $illustration := partial $args.hook (dict
|
||||||
"heading" $args.heading
|
"page" $args.page
|
||||||
"use-title" $args.useTitle
|
"image" $args.illustration.image
|
||||||
"size" $args.size
|
"icon" $args.illustration.icon
|
||||||
"links" $args.links
|
"anchor" $args.illustration.anchor
|
||||||
"type" (or $args.linkType $args.type)
|
"mode" $args.illustration.mode
|
||||||
"class" (printf "hero-title %s" $sectionClass)
|
"ratio" $args.illustration.ratio
|
||||||
"arrangement" $arrangement
|
"sizes" $sizes
|
||||||
) }}
|
"title" (T "heroImage")
|
||||||
|
"wrapper" $imageWrapper
|
||||||
|
"class" "hero-image"
|
||||||
|
"image-overlay" $args.imageOverlay
|
||||||
|
"justify" $imageJustify
|
||||||
|
) }}
|
||||||
|
|
||||||
{{ if eq $args.orientation "stacked" }}
|
{{ $title := partial "assets/section-title.html" (dict
|
||||||
{{/* Render stacked component */}}
|
"heading" $heading
|
||||||
<div class="row flex-fill">
|
"use-title" $args.useTitle
|
||||||
<div class="col col-12 col-md-{{ $args.width }}{{ if $args.center }} m-auto{{ end }}">
|
"size" $args.size
|
||||||
{{ $illustration | safeHTML }}
|
"links" $args.links
|
||||||
{{ $title | safeHTML }}
|
"link-type" (or $args.linkType $args.type)
|
||||||
</div>
|
"class" "hero-title"
|
||||||
|
"arrangement" $arrangement
|
||||||
|
) }}
|
||||||
|
|
||||||
|
{{ if eq $args.orientation "stacked" }}
|
||||||
|
{{/* Render stacked component */}}
|
||||||
|
|
||||||
|
{{ $illustration | safeHTML }}
|
||||||
|
{{ $title | safeHTML }}
|
||||||
|
{{ else }}
|
||||||
|
{{/* Render horizontal component */}}
|
||||||
|
<div class="row row-cols-1 {{ if eq $args.orientation "stacked" }}row-cols-md-2 {{ end }} w-100">
|
||||||
|
{{ $order1 := "order-1 order-md-0" }}
|
||||||
|
{{ $order2 := "order-0 order-md-1" }}
|
||||||
|
{{ if eq $args.order "first" }}
|
||||||
|
{{ $order1 = "order-1" }}
|
||||||
|
{{ $order2 = "order-0" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $imgWidth := sub 12 (or $args.heading.width 12) }}
|
||||||
|
{{ if lt $imgWidth 1 }}{{ $imgWidth = 1 }}{{ end }}
|
||||||
|
|
||||||
|
<div class="col col-12 col-md-{{sub 12 $imgWidth }} {{ $order1 }} my-md-auto pt-{{ $padding.y }} pt-md-0 hero-content">
|
||||||
|
{{ $title | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
<div class="col col-8 col-md-{{ $imgWidth }} {{ $order2 }} m-auto my-md-auto align-self-end">
|
||||||
{{/* Render horizontal component */}}
|
{{ $illustration | safeHTML }}
|
||||||
<div class="row row-cols-1 row-cols-md-2 flex-fill">
|
|
||||||
{{ $order1 := "order-1 order-md-0 " }}
|
|
||||||
{{ $order2 := "order-0 order-md-1" }}
|
|
||||||
{{ if eq $args.order "first" }}
|
|
||||||
{{ $order1 = "order-1" }}
|
|
||||||
{{ $order2 = "order-0" }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="col col-12 col-md-{{ $args.width }} {{ $order1 }} my-md-auto pt-5 pt-md-0 hero-content">
|
|
||||||
{{ $title | safeHTML }}
|
|
||||||
</div>
|
|
||||||
<div class="col col-10 col-md-{{ sub 12 $args.width }}
|
|
||||||
{{ $order2 }}{{ if $args.center }} text-center{{ end }} my-md-auto align-self-end">
|
|
||||||
<div>
|
|
||||||
{{ $illustration | safeHTML }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
</div>
|
||||||
</div>
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
@@ -11,6 +11,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/image.html"
|
"partial" "assets/image.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
@@ -61,7 +62,10 @@
|
|||||||
|
|
||||||
{{- range $suffix := $modes -}}
|
{{- range $suffix := $modes -}}
|
||||||
{{- $image := printf "%s-%s%s" $base $suffix $ext -}}
|
{{- $image := printf "%s-%s%s" $base $suffix $ext -}}
|
||||||
{{- $params = merge $params (dict "src" $image "color-mode" $suffix "modes" $modes) -}}
|
{{- $params = merge $params (dict
|
||||||
|
"src" $image
|
||||||
|
"class" (printf "%s d-none-%s" $args.class (cond (eq $suffix "dark") "light" "dark"))
|
||||||
|
) -}}
|
||||||
{{- partial "assets/helpers/image-definition.html" $params -}}
|
{{- partial "assets/helpers/image-definition.html" $params -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/link.html"
|
"partial" "assets/link.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/links.html"
|
"partial" "assets/links.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
|
|
||||||
{{/* Initialize global arguments */}}
|
{{/* Initialize global arguments */}}
|
||||||
{{- $breakpoint := page.Scratch.Get "breakpoint" -}}
|
{{- $breakpoint := page.Scratch.Get "breakpoint" -}}
|
||||||
|
{{- $padding := partial "utilities/GetPadding.html" -}}
|
||||||
|
|
||||||
{{- define "_partials/links-content.html" -}}
|
{{- define "_partials/links-content.html" -}}
|
||||||
{{ $links := .links }}
|
{{ $links := .links }}
|
||||||
@@ -92,7 +94,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="hstack d-none d-{{ $breakpoint.current }}-block {{ if gt (len $args.links) 1 }} gap-5{{ end }} justify-content-{{ $args.align }} pt-5 pt-md-3">
|
<div class="hstack d-none d-{{ $breakpoint.current }}-block {{ if gt (len $args.links) 1 }} gap-5{{ end }} justify-content-{{ $args.align }} pt-{{ $padding.y }}">
|
||||||
{{ partial "links-content.html" (dict "links" $args.links "justify" $args.justify "type" $args.linkType "li" false) }}
|
{{ partial "links-content.html" (dict "links" $args.links "justify" $args.justify "type" $args.linkType "li" false) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/live-image.html"
|
"partial" "assets/live-image.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/live-pages.html"
|
"partial" "assets/live-pages.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/nav-item.html"
|
"partial" "assets/nav-item.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
aria-labelledby="{{ $parentID }}-heading-{{ $args.id }}"
|
aria-labelledby="{{ $parentID }}-heading-{{ $args.id }}"
|
||||||
data-bs-parent="#accordion-{{ $parentID }}"
|
data-bs-parent="#accordion-{{ $parentID }}"
|
||||||
>
|
>
|
||||||
<div class="accordion-body">{{- $args.body | safeHTML -}}</div>
|
<div class="accordion-body">{{ $args.body | $args.page.RenderString | safeHTML }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
@@ -86,7 +87,7 @@
|
|||||||
data-has-content="{{ gt (len $args.body) 0 }}"
|
data-has-content="{{ gt (len $args.body) 0 }}"
|
||||||
{{ if $args.disabled }} data-disabled-id="{{ $args.id }}"{{ end }}
|
{{ if $args.disabled }} data-disabled-id="{{ $args.id }}"{{ end }}
|
||||||
>
|
>
|
||||||
{{ $args.body }}
|
{{ $args.body | $args.page.RenderString | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
@@ -11,6 +11,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/nav.html"
|
"partial" "assets/nav.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
<div id="accordion-{{ $id }}" class="accordion mb-3{{ with $args.class }} {{ . }}{{ end }} nav-callout">
|
<div id="accordion-{{ $id }}" class="accordion mb-3{{ with $args.class }} {{ . }}{{ end }} nav-callout">
|
||||||
{{- range $index, $item := $args.list -}}
|
{{- range $index, $item := $args.list -}}
|
||||||
{{ partial "assets/nav-item.html" (dict
|
{{ partial "assets/nav-item.html" (dict
|
||||||
|
"page" $args.page
|
||||||
"id" $index
|
"id" $index
|
||||||
"parentID" $id
|
"parentID" $id
|
||||||
"fade" false
|
"fade" false
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/navbar-item.html"
|
"partial" "assets/navbar-item.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -72,12 +72,16 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/navbar.html"
|
"partial" "assets/navbar.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* Initialize global variables */}}
|
||||||
|
{{- $padding := partial "utilities/GetPadding.html" -}}
|
||||||
|
|
||||||
{{/* Initialize local arguments */}}
|
{{/* Initialize local arguments */}}
|
||||||
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
{{- $absoluteURL := site.Params.main.canonifyAssetsURLs | default false -}}
|
||||||
{{- $pretty := site.Params.main.internalLinks.pretty | default false }}
|
{{- $pretty := site.Params.main.internalLinks.pretty | default false }}
|
||||||
@@ -170,7 +174,7 @@
|
|||||||
{{/* Main code */}}
|
{{/* Main code */}}
|
||||||
<div class="container-fluid {{ if $args.fixed }}fixed-top{{ else if $overlay }}navbar-overlay{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
<div class="container-fluid {{ if $args.fixed }}fixed-top{{ else if $overlay }}navbar-overlay{{ end }} p-0{{ with $class }} {{ . }}{{ end }}">
|
||||||
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
{{- partial "assets/page-alert.html" (dict "page" $page) -}}
|
||||||
<nav class="navbar p-4
|
<nav class="navbar px-{{ $padding.x }} py-{{ $padding.y }}
|
||||||
{{- if not $overlay }}{{ with $color }} bg-{{ . }}{{ end }}{{ end -}}
|
{{- if not $overlay }}{{ with $color }} bg-{{ . }}{{ end }}{{ end -}}
|
||||||
{{ if $args.fixed }} navbar-fixed-top{{ end }} navbar-expand-{{ $args.breakpoint -}}
|
{{ if $args.fixed }} navbar-fixed-top{{ end }} navbar-expand-{{ $args.breakpoint -}}
|
||||||
{{ if $contrast }} navbar-contrast{{ end }}"
|
{{ if $contrast }} navbar-contrast{{ end }}"
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/page-alert.html"
|
"partial" "assets/page-alert.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -165,6 +165,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/pagination.html"
|
"partial" "assets/pagination.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/persona.html"
|
"partial" "assets/persona.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -7,68 +7,105 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/section-title.html"
|
"partial" "assets/section-title.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* Initialize global arguments */}}
|
||||||
|
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
|
||||||
|
{{- $padding := partial "utilities/GetPadding.html" -}}
|
||||||
|
|
||||||
{{/* Initialize local arguments */}}
|
{{/* Initialize local arguments */}}
|
||||||
{{- $size := (or .size site.Params.modules.bookshop.title.size) | default 4 -}}
|
{{- $size := (or $args.size site.Params.modules.bookshop.title.size) | default 4 -}}
|
||||||
{{- $arrangement := (or .arrangement site.Params.modules.bookshop.title.arrangement) | default "above" -}}
|
{{- $arrangement := (or $args.arrangement site.Params.modules.bookshop.title.arrangement) | default "above" -}}
|
||||||
{{- $headingStyle := (or .headingStyle site.Params.modules.bookshop.title.headingStyle) | default "display" -}}
|
{{- $headingStyle := (or $args.headingStyle site.Params.modules.bookshop.title.headingStyle) | default "display" -}}
|
||||||
{{- $bodyStyle := (or .bodyStyle site.Params.modules.bookshop.title.bodyStyle) | default "lead text-muted" -}}
|
{{- $contentStyle := (or $args.contentStyle site.Params.modules.bookshop.title.contentStyle) | default "lead text-muted" -}}
|
||||||
{{- $preheading := $args.heading.preheading }}
|
{{- $preheading := $args.heading.preheading }}
|
||||||
{{- $title := $args.heading.title }}
|
{{- $title := $args.heading.title }}
|
||||||
|
{{- $width := $args.heading.width | default 12 -}}
|
||||||
|
|
||||||
{{ if and (not $preheading) $args.section }}
|
{{ if and (not $preheading) $args.useSection }}{{ $preheading = page.CurrentSection.Name }}{{ end }}
|
||||||
{{ $preheading = page.CurrentSection.Name }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if site.Params.main.titleCase }}
|
{{ if site.Params.main.titleCase }}
|
||||||
{{ $preheading = title $preheading }}
|
{{ $preheading = title $preheading }}
|
||||||
{{ $title = title $title }}
|
{{ $title = title $title }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- $breakpoint := page.Scratch.Get "breakpoint" -}}
|
|
||||||
|
|
||||||
{{ define "_partials/assets/section-title-header.html" }}
|
{{ define "_partials/assets/section-title-header.html" }}
|
||||||
{{ $headingStyle := .headingStyle }}
|
{{ $headingStyle := .headingStyle }}
|
||||||
|
|
||||||
{{ if (index . "use-title") }}
|
{{ if (index . "use-title") }}
|
||||||
{{ $title := .title | page.RenderString }}
|
{{ $title := .title | page.RenderString }}
|
||||||
{{ $label := trim (replaceRE "\r\n?|\n" " " ($title | plainify)) " " }}
|
{{ $label := trim (replaceRE "\r\n?|\n" " " ($title | plainify)) " " }}
|
||||||
<h1 id="{{ anchorize .title }}" {{ if ne $title $label }}aria-label="{{ $label }}"{{ end -}}
|
<h1 id="{{ anchorize .title }}" {{ if ne $title $label }}aria-label="{{ $label }}"{{ end -}}
|
||||||
class="{{ $headingStyle }}-{{ .size }}{{ with .color }} text-{{ . }}{{ end }} pt-1">{{ .title | page.RenderString | safeHTML }}</h1>
|
class="{{ $headingStyle }}-{{ .size }}{{ with .color }} text-{{ . }}{{ end }} pt-1">
|
||||||
|
{{ .title | page.RenderString | safeHTML }}
|
||||||
|
</h1>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div id="{{ anchorize .title }}" class="{{ $headingStyle }}-{{ .size }}{{ with .color }} text-{{ . }}{{ end }} pt-1">{{ .title | page.RenderString | safeHTML }}</div>
|
<div id="{{ anchorize .title }}" class="{{ $headingStyle }}-{{ .size }}{{ with .color }} text-{{ . }}{{ end }} pt-1">
|
||||||
|
{{ .title | page.RenderString | safeHTML }}
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $header := "" }}
|
||||||
|
{{ if $title }}
|
||||||
|
{{ $header = partial "assets/section-title-header.html" (dict
|
||||||
|
"use-title" $args.useTitle
|
||||||
|
"title" $title
|
||||||
|
"headingStyle" $headingStyle
|
||||||
|
"color" $args.color
|
||||||
|
"size" $size
|
||||||
|
) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $links := "" }}
|
||||||
|
{{ if $args.links }}
|
||||||
|
{{ $links = partial "assets/links.html" (dict
|
||||||
|
"page" $args.page
|
||||||
|
"links" $args.links
|
||||||
|
"align" $args.heading.align
|
||||||
|
"justify" $args.justify
|
||||||
|
"link-type" $args.linkType
|
||||||
|
) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $imgArgs := dict
|
||||||
|
"page" page
|
||||||
|
"icon" $args.icon
|
||||||
|
"image" $args.image
|
||||||
|
"anchor" $args.anchor
|
||||||
|
"mode" true
|
||||||
|
"sizes" "20vw"
|
||||||
|
"title" (T "heroImage")
|
||||||
|
"mode" $args.mode
|
||||||
|
}}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
<div class="text-{{ $args.heading.align }}{{ with $args.class }} {{ . }}{{ end }} col col-12 col-md-{{ $args.heading.width }}">
|
<div class="text-{{ $args.heading.align }}{{ with $args.class }} {{ . }}{{ end }}{{ if lt $width 12 }} col-12 col-{{ $breakpoint.current }}-{{ $width }}{{ end }} py-{{ $padding.y }}">
|
||||||
{{ if and $preheading (eq $arrangement "first") }}
|
{{ if and $preheading (eq $arrangement "first") }}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-{{ $breakpoint.prev }}-12 col-{{ $breakpoint.next }}-2 p-0">
|
<div class="col-12 col-{{ $breakpoint.prev }}-12 col-{{ $breakpoint.next }}-2 p-0">
|
||||||
{{ with $preheading }}<p class="preheading {{ if ne $args.color "body" }}text-{{ $args.color }}{{ else }}text-primary{{ end }}">{{ . | page.RenderString | safeHTML }}</p>{{ end }}
|
{{ with $preheading }}
|
||||||
|
<p class="preheading {{ if ne $args.color "body" }}text-{{ $args.color }}{{ else }}text-primary{{ end }}">
|
||||||
|
{{ . | page.RenderString | safeHTML }}
|
||||||
|
</p>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-{{ $breakpoint.prev }}-8 col-{{ $breakpoint.current }}-9 col-{{ $breakpoint.next }}-8 p-0">
|
<div class="col-12 col-{{ $breakpoint.prev }}-8 col-{{ $breakpoint.current }}-9 col-{{ $breakpoint.next }}-8 p-0">
|
||||||
{{ with $title }}{{ partial "assets/section-title-header.html" (dict "use-title" $args.useTitle "title" . "headingStyle" $headingStyle "color" $args.color "size" $size) }}{{ end }}
|
{{ $header }}
|
||||||
{{ with $args.heading.content }}<div class="{{ $bodyStyle }} pt-4">{{ . | page.RenderString | safeHTML }}</div>{{ end }}
|
{{ with $args.heading.content }}
|
||||||
{{ if .links }}{{ partial "assets/links.html" (dict "page" $args.page "links" $args.links "align" $args.heading.align "justify" $args.justify "link-type" $args.type) }}{{ end }}
|
<div class="{{ $contentStyle }} pt-{{ $padding.y }}">{{ . | page.RenderString | safeHTML }}</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ $links }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-{{ $breakpoint.prev }}-4 col-{{ $breakpoint.current }}-3 col-{{ $breakpoint.next }}-2 p-0 ps-{{ $breakpoint.prev }}-4">
|
<div class="col-12 col-{{ $breakpoint.prev }}-4 col-{{ $breakpoint.current }}-3 col-{{ $breakpoint.next }}-2 p-0 ps-{{ $breakpoint.prev }}-4">
|
||||||
{{ partial "assets/featured-illustration.html" (dict
|
{{ $wrapper := (printf "col-4 col-%s-12 mx-auto pt-%d pt-%s-0" $breakpoint.prev $padding.y $breakpoint.prev) }}
|
||||||
"page" page
|
{{ partial "assets/featured-illustration.html" (merge $imgArgs (dict "wrapper" $wrapper)) }}
|
||||||
"icon" $args.icon
|
|
||||||
"image" $args.image
|
|
||||||
"anchor" $args.anchor
|
|
||||||
"mode" true
|
|
||||||
"sizes" "20vw"
|
|
||||||
"wrapper" (printf "col-4 col-%s-12 mx-auto pt-4 pt-%s-0" $breakpoint.prev $breakpoint.prev)
|
|
||||||
"title" (T "heroImage")
|
|
||||||
"mode" $args.mode
|
|
||||||
) }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,31 +115,29 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row p-0">
|
<div class="row p-0">
|
||||||
<div class="col-12 col-{{ $breakpoint.current }}-10 p-0">
|
<div class="col-12 col-{{ $breakpoint.current }}-10 p-0">
|
||||||
{{ with $preheading }}<p class="preheading {{ if ne $args.color "body" }}text-{{ $args.color }}{{ else }}text-primary{{ end }}">{{ . | page.RenderString | safeHTML }}</p>{{ end }}
|
{{ with $preheading }}
|
||||||
{{ with $title }}{{ partial "assets/section-title-header.html" (dict "use-title" $args.useTitle "title" . "headingStyle" $headingStyle "color" $args.color "size" $size) }}{{ end }}
|
<p class="preheading {{ if ne $args.color "body" }}text-{{ $args.color }}{{ else }}text-primary{{ end }}">
|
||||||
{{ with $args.heading.content }}<div class="{{ $bodyStyle }} pt-4">{{ . | page.RenderString | safeHTML }}</div>{{ end }}
|
{{ . | page.RenderString | safeHTML }}
|
||||||
{{ if .links }}{{ partial "assets/links.html" (dict "page" $args.page "links" $args.links "align" $args.heading.align "justify" $args.justify "link-type" $args.type) }}{{ end }}
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
{{ $header }}
|
||||||
|
{{ with $args.heading.content }}<div class="{{ $contentStyle }} pt-{{ $padding.y }}">{{ . | page.RenderString | safeHTML }}</div>{{ end }}
|
||||||
|
{{ $links }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-{{ $breakpoint.current }}-2 p-0 pt-2 text-center">
|
<div class="col-12 col-{{ $breakpoint.current }}-2 p-0 pt-2 text-center">
|
||||||
{{ partial "assets/featured-illustration.html" (dict
|
{{ $wrapper := (printf "col-4 col-%s-12 mx-auto pt-%d pt-%s-0" $breakpoint.prev $padding.y $breakpoint.prev) }}
|
||||||
"page" page
|
{{ partial "assets/featured-illustration.html" (merge $imgArgs (dict "ratio" $args.ratio "wrapper" "mx-auto")) }}
|
||||||
"icon" $args.icon
|
|
||||||
"image" $args.image
|
|
||||||
"anchor" $args.anchor
|
|
||||||
"mode" true
|
|
||||||
"ratio" $args.ratio
|
|
||||||
"sizes" "20vw"
|
|
||||||
"wrapper" "mx-auto"
|
|
||||||
"title" (T "heroImage")
|
|
||||||
"mode" $args.mode
|
|
||||||
) }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ with $preheading }}<p class="preheading {{ if ne $args.color "body" }}text-{{ $args.color }}{{ else }}text-primary{{ end }}">{{ . | page.RenderString | safeHTML }}</p>{{ end }}
|
{{ with $preheading }}
|
||||||
{{ with $title }}{{ partial "assets/section-title-header.html" (dict "use-title" $args.useTitle "title" . "headingStyle" $headingStyle "color" $args.color "size" $size) }}{{ end }}
|
<p class="preheading {{ if ne $args.color "body" }}text-{{ $args.color }}{{ else }}text-primary{{ end }}">
|
||||||
{{ with $args.heading.content }}<div class="{{ $bodyStyle }} pt-4">{{ . | page.RenderString | safeHTML }}</div>{{ end }}
|
{{ . | page.RenderString | safeHTML }}
|
||||||
{{ if $args.links }}{{ partial "assets/links.html" (dict "page" $args.page "links" $args.links "align" $args.heading.align "justify" $args.justify "link-type" $args.type) }}{{ end }}
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
{{ $header }}
|
||||||
|
{{ with $args.heading.content }}<div class="{{ $contentStyle }} pt-{{ $padding.y }}">{{ . | page.RenderString | safeHTML }}</div>{{ end }}
|
||||||
|
{{ $links }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/sharing.html"
|
"partial" "assets/sharing.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/sidebar.html"
|
"partial" "assets/sidebar.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/stack.html"
|
"partial" "assets/stack.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/table.html"
|
"partial" "assets/table.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -27,7 +27,12 @@
|
|||||||
{{- $page := $args.page -}}
|
{{- $page := $args.page -}}
|
||||||
{{- $data := partial "utilities/GetI18nData.html" (dict "page" $page "data" $args.data) }}
|
{{- $data := partial "utilities/GetI18nData.html" (dict "page" $page "data" $args.data) }}
|
||||||
{{ if not $data -}}
|
{{ if not $data -}}
|
||||||
{{ errorf "Invalid timeline data '%s': %s" $page.File -}}
|
{{ partial "utilities/LogErr.html" (dict
|
||||||
|
"partial" "assets/timeline.html"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
|
"details" (slice (printf "Invalid timeline data '%s'" $args.data))
|
||||||
|
"file" page.File
|
||||||
|
)}}
|
||||||
{{ $error = true }}
|
{{ $error = true }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ $background := partial "utilities/GetBackgroundStyle.html" (dict "background" $args.background) }}
|
{{ $background := partial "utilities/GetBackgroundStyle.html" (dict "background" $args.background) }}
|
||||||
@@ -79,7 +84,10 @@
|
|||||||
{{ $datestr := (partial "utilities/date.html" (dict "date" $date "format" "long")) -}}
|
{{ $datestr := (partial "utilities/date.html" (dict "date" $date "format" "long")) -}}
|
||||||
<p class="mb-0"><small class="text-body-secondary text-uppercase">{{ $datestr -}}</small></p>
|
<p class="mb-0"><small class="text-body-secondary text-uppercase">{{ $datestr -}}</small></p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="mt-3 mb-0">{{ $content | $page.RenderString }}</p>
|
<p class="mt-3 mb-0">
|
||||||
|
<!-- TODO: $page.RenderString causes an out of bounds error -->
|
||||||
|
{{ $content | markdownify }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -94,8 +102,7 @@
|
|||||||
"use-title" $args.useTitle
|
"use-title" $args.useTitle
|
||||||
"size" $args.size
|
"size" $args.size
|
||||||
"links" $args.links
|
"links" $args.links
|
||||||
"type" (or $args.linkType $args.type)
|
"link-type" (or $args.linkType $args.type)
|
||||||
"class" "pb-4"
|
|
||||||
"arrangement" $arrangement
|
"arrangement" $arrangement
|
||||||
) }}
|
) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/toast.html"
|
"partial" "assets/toast.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/toc.html"
|
"partial" "assets/toc.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/toc.html"
|
"partial" "assets/toc.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "assets/video.html"
|
"partial" "assets/video.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
@@ -32,7 +33,8 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* Initialize local arguments */}}
|
{{/* Initialize local arguments */}}
|
||||||
{{- $provider := or $args.provider $args.host }}
|
{{- $title := $args.title -}}
|
||||||
|
{{- $provider := or $args.host $args.provider }}
|
||||||
{{- $account := $args.account }}
|
{{- $account := $args.account }}
|
||||||
{{ if not $account }}
|
{{ if not $account }}
|
||||||
{{ with index $args.page.Site.Params.videos $provider }}
|
{{ with index $args.page.Site.Params.videos $provider }}
|
||||||
@@ -148,7 +150,6 @@
|
|||||||
{{ $width := index $metadata "width" }}
|
{{ $width := index $metadata "width" }}
|
||||||
{{ if and $height $width }}
|
{{ if and $height $width }}
|
||||||
{{ $padding := printf "%.2f%%" (mul (div (float $height) $width) 100) }}
|
{{ $padding := printf "%.2f%%" (mul (div (float $height) $width) 100) }}
|
||||||
{{ $title := $args.title }}
|
|
||||||
{{ if not $title }}{{ $title = printf "Cloudinary video '%s'" (path.BaseName $id) }}{{ end }}
|
{{ if not $title }}{{ $title = printf "Cloudinary video '%s'" (path.BaseName $id) }}{{ end }}
|
||||||
|
|
||||||
<div class="video-embedded {{ $args.class }}" data-video-padding="{{ $padding }}">
|
<div class="video-embedded {{ $args.class }}" data-video-padding="{{ $padding }}">
|
||||||
|
@@ -5,22 +5,26 @@
|
|||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{/* Initialize arguments */}}
|
{{/* Initialize arguments */}}
|
||||||
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "script" "args" .) }}
|
{{- $args := partial "utilities/InitArgs.html" (dict "structure" "script" "args" .) -}}
|
||||||
{{ if $args.err }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial "utilities/LogErr.html" (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "templates/script.html"
|
"partial" "templates/script.html"
|
||||||
"msg" "Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
"details" $args.errmsg
|
"msg" "Invalid arguments"
|
||||||
"file" page.File
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
)}}
|
"file" page.File
|
||||||
{{ end }}
|
) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
{{/* Initialize local arguments */}}
|
{{/* Initialize local arguments */}}
|
||||||
{{ $category := cond (ne $args.category "other") $args.category "" }}
|
{{- $category := cond (ne $args.category "other") $args.category "" -}}
|
||||||
|
|
||||||
{{/* Main code */}}
|
{{/* Main code */}}
|
||||||
<script src="{{ $args.link }}"
|
{{- if not $args.err -}}
|
||||||
{{- with $category }} data-category="{{ . }}"{{ end -}}
|
<script src="{{ $args.link }}"
|
||||||
{{- with $args.integrity }}integrity="{{ . }}" crossorigin="anonymous"{{ end }}
|
{{- with $category }} data-category="{{ . }}"{{ end -}}
|
||||||
{{- with $args.state }} {{ . | safeHTMLAttr }}{{ end -}}>
|
{{- with $args.integrity }}integrity="{{ . }}" crossorigin="anonymous"{{ end }}
|
||||||
</script>
|
{{- with $args.state }} {{ . | safeHTMLAttr }}{{ end -}}>
|
||||||
|
</script>
|
||||||
|
{{- end -}}
|
@@ -7,6 +7,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "utilities/GetBackgroundStyle.html"
|
"partial" "utilities/GetBackgroundStyle.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -12,9 +12,10 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "utilities/GetLink.html"
|
"partial" "utilities/GetLink.html"
|
||||||
"msg" "Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
)}}
|
)}}
|
||||||
{{ $error = $args.err }}
|
{{ $error = $args.err }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
20
layouts/_partials/utilities/GetPadding.html
Normal file
20
layouts/_partials/utilities/GetPadding.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{{- /* Define main padding size */ -}}
|
||||||
|
{{- $defaultY := 5 -}}
|
||||||
|
{{- $defaultX := 5 -}}
|
||||||
|
{{- $permitted := slice 0 1 2 3 4 5 }}
|
||||||
|
{{- $paddingX := $defaultX -}}
|
||||||
|
{{- if isset site.Params.main.padding "x" }}{{ $paddingX = site.Params.main.padding.x }}{{ end -}}
|
||||||
|
{{- $paddingY := $defaultY -}}
|
||||||
|
{{- if isset site.Params.main.padding "y" }}{{ $paddingY = site.Params.main.padding.y }}{{ end -}}
|
||||||
|
|
||||||
|
{{- if not (in $permitted $paddingX) -}}
|
||||||
|
{{- warnf "layout [_default/baseof.html] - Invalid value for param 'padding.x': %d" $paddingX -}}
|
||||||
|
{{- $paddingX = $defaultX -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if not (in $permitted $paddingY) -}}
|
||||||
|
{{- warnf "layout [_default/baseof.html] - Invalid value for param 'padding.y': %d" $paddingY -}}
|
||||||
|
{{- $paddingY = $defaultY -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- return (dict "x" $paddingX "y" $paddingY) -}}
|
@@ -1,114 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright © 2025 The Hinode Team / Mark Dumay. All rights reserved.
|
|
||||||
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
|
|
||||||
Visit gethinode.com/license for more details.
|
|
||||||
-->
|
|
||||||
|
|
||||||
{{/* Inline partial to retrieve the type definition of the provided key (without recursion) */}}
|
|
||||||
{{ define "_partials/inline/type-definition.html" }}
|
|
||||||
{{ $key := .key }}
|
|
||||||
{{ $references := .references }}
|
|
||||||
{{ $types := .types }}
|
|
||||||
|
|
||||||
{{ $def := index $references $key }}
|
|
||||||
{{ $udt := "" }}
|
|
||||||
{{ $reflect := "" }}
|
|
||||||
{{ $reserved := slice "bool" "int" "int64" "float" "float64" "string" "dict" "slice" }}
|
|
||||||
{{ if and $def (not (reflect.IsSlice $def.type)) (not (in $reserved $def.type)) }}
|
|
||||||
{{ with index $types $def.type }}
|
|
||||||
<!-- Reduce child elements to slice of argument names -->
|
|
||||||
{{ $args := slice }}
|
|
||||||
{{ $reflect = printf "%T" . }}
|
|
||||||
{{ if reflect.IsMap . }}
|
|
||||||
{{ range $k, $_ := . }}
|
|
||||||
{{ $args = $args | append $k }}
|
|
||||||
{{ end }}
|
|
||||||
{{ else if reflect.IsSlice . }}
|
|
||||||
{{ with index . 0 }}
|
|
||||||
{{ range $k, $_ := . }}
|
|
||||||
{{ $args = $args | append $k }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<!-- Retrieve type definition for each argument -->
|
|
||||||
{{ $definitions := dict }}
|
|
||||||
{{ $definitions := merge $definitions (dict "_reflect" $reflect) }}
|
|
||||||
{{ range $args }}
|
|
||||||
{{ $type := partial "inline/type-definition.html" (dict "key" . "references" $references "types" $types) }}
|
|
||||||
{{ if and $type $type.definition }}
|
|
||||||
{{ $definitions = merge $definitions (dict . $type.definition) }}
|
|
||||||
{{ else }}
|
|
||||||
{{- $errorMsg = $errorMsg | append (printf "partial [utilities/InitArgs.html] - Missing type for '%s.%s' in '%s'" $key . ) -}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $udt = dict $def.type $definitions }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ return (dict "definition" $def "udt" $udt) }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* Initalize arguments and local variables */}}
|
|
||||||
{{ $error := false }}
|
|
||||||
{{ $errorMsg := slice }}
|
|
||||||
{{ $warnMsg := slice }}
|
|
||||||
{{ $params := dict }}
|
|
||||||
{{ $definitions := dict }}
|
|
||||||
{{ $udt := dict }}
|
|
||||||
|
|
||||||
{{ $structure := .structure }}
|
|
||||||
{{ $bookshop := .bookshop }}
|
|
||||||
{{ $group := .group }}
|
|
||||||
{{ $child := .child }}
|
|
||||||
|
|
||||||
{{ if and (not $structure) (not $bookshop) }}
|
|
||||||
{{- $errorMsg = $errorMsg | append (printf "partial [utilities/InitTypes.html] - Missing value for param 'structure' or 'bookshop'") -}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if not $error }}
|
|
||||||
{{ $args := dict }}
|
|
||||||
{{ $references := index (index site.Data.structures "_arguments") "arguments" }}
|
|
||||||
{{ $types := index (index site.Data.structures "_types") "types" }}
|
|
||||||
|
|
||||||
{{/* Initalize the regular or bookshop argument structure */}}
|
|
||||||
{{ if $structure }}
|
|
||||||
{{ $args = (index site.Data.structures $structure).arguments | default dict }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $args = index (index (index site.Data.structures.components $bookshop) (printf "%s.bookshop" $bookshop)) "blueprint" | default dict }}
|
|
||||||
{{ $args = merge $args (dict "_bookshop_name" nil) }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* Merge any child arguments */}}
|
|
||||||
{{ if $child }}
|
|
||||||
{{ $extra_def := (index site.Data.structures $child).arguments }}
|
|
||||||
{{ if not $extra_def }}
|
|
||||||
{{- $errorMsg = $errorMsg | append (printf "partial [utilities/InitTypes.html] - Missing definitions: %s" $child) -}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ else }}
|
|
||||||
{{ range $key, $val := $extra_def }}
|
|
||||||
{{ if and $val $val.parent }}{{ $args = merge (dict $key $val) $args }}{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* Initialize the arguments and their type definitions recursively */}}
|
|
||||||
{{ range $key, $v := $args }}
|
|
||||||
{{ $type := partial "inline/type-definition.html" (dict "key" $key "args" $args "references" $references "types" $types) }}
|
|
||||||
{{ if and $type $type.definition }}
|
|
||||||
{{ $definitions = merge $definitions (dict $key $type.definition) }}
|
|
||||||
{{ with $type.udt }}
|
|
||||||
{{ $udt = merge $udt . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{- $errorMsg = $errorMsg | append (printf "partial [utilities/InitArgs.html] - Missing type for '%s' in '%s'" $key (or $structure $bookshop) ) -}}
|
|
||||||
{{ $error = true }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $params = merge $params (dict "types" $definitions "udt" $udt "err" $error "errmsg" $errorMsg "warnmsg" $warnMsg) }}
|
|
||||||
{{ return $params }}
|
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/abbr.html"
|
"partial" "shortcodes/abbr.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/accordion-item.html"
|
"partial" "shortcodes/accordion-item.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/accordion.html"
|
"partial" "shortcodes/accordion.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/alert.html"
|
"partial" "shortcodes/alert.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -4,124 +4,30 @@
|
|||||||
Visit gethinode.com/license for more details.
|
Visit gethinode.com/license for more details.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{ $error := false }}
|
{{- $error := false -}}
|
||||||
|
|
||||||
{{ define "_partials/inline/args-table.html"}}
|
|
||||||
{{ $args := .args }}
|
|
||||||
{{ $types := .types }}
|
|
||||||
{{ $page := .page }}
|
|
||||||
{{ $group := .group | default "" }}
|
|
||||||
{{ $parent := .parent }}
|
|
||||||
{{ $reflect := "" }}
|
|
||||||
|
|
||||||
{{ $table := printf "| %s | %s | %s | %s | %s |\n| --- | --- | --- | --- | --- |"
|
|
||||||
(T "name") (T "type") (T "required") (T "default") (T "comment")
|
|
||||||
}}
|
|
||||||
|
|
||||||
{{ range $key, $val := $args }}
|
|
||||||
{{ if eq $key "_reflect" }}
|
|
||||||
{{ $reflect = $val }}
|
|
||||||
{{ continue }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $skip := false }}
|
|
||||||
{{ $groups := slice }}
|
|
||||||
{{ if $val }} {{ $groups = $groups | append $val.group }}{{ end }}
|
|
||||||
{{ if and $group $val.group }}
|
|
||||||
{{ $skip = not (in $groups $group )}}
|
|
||||||
{{ end }}
|
|
||||||
{{ if $parent }}{{ $skip = not (in (slice "cascade" "merge") $val.parent) }}{{ end }}
|
|
||||||
|
|
||||||
{{ if not $skip }}
|
|
||||||
{{ $type := $val.type }}
|
|
||||||
{{ $udt := false }}
|
|
||||||
{{ $slice := false }}
|
|
||||||
{{ if reflect.IsSlice $val.type }}{{ $type = delimit $val.type ", " }}{{ end }}
|
|
||||||
{{ with index $types $val.type }}
|
|
||||||
{{ $udt = true }}
|
|
||||||
{{ $slice = eq ._reflect "[]interface {}" }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $required := "" }}
|
|
||||||
{{ if not $val.optional }}{{ $required = "yes" }}{{ end }}
|
|
||||||
|
|
||||||
{{ $comment := $val.comment }}
|
|
||||||
{{ if $val.deprecated }}
|
|
||||||
{{ $btn := printf `{{< release version="%s" short="true" button-size="sm" inline="true" release-state="deprecated" >}}` $val.deprecated }}
|
|
||||||
{{ with $val.alternative }}
|
|
||||||
{{ $comment = printf "%s **%s**. %s" $btn (T "alternativeFeature" .) $comment }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $comment = printf "%s %s" $btn $comment }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ if $val.release }}
|
|
||||||
{{ $comment = printf `{{< release version="%s" short="true" button-size="sm" inline="true" >}} %s` $val.release $comment }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $min := "" }}
|
|
||||||
{{ $max := "" }}
|
|
||||||
{{ if and $val.options.values (eq $type "select") }}
|
|
||||||
{{ $comment = printf "%s %s: [`%s`]." $comment (T "supportedValues") (delimit $val.options.values "`, `") }}
|
|
||||||
{{ else if in (slice "int" "float" "float64") $type }}
|
|
||||||
{{ if eq (printf "%T" $val.options.min) "int" }}{{ $min = int $val.options.min }}{{ end }}
|
|
||||||
{{ if eq (printf "%T" $val.options.max) "int" }}{{ $max = int $val.options.max }}{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ if and (eq (printf "%T" $min) "int") (eq (printf "%T" $max) "int") }}
|
|
||||||
{{ $comment = printf "%s %s: [`%d - %d`]." $comment (T "supportedValues") $min $max }}
|
|
||||||
{{ else if (eq (printf "%T" $min) "int") }}
|
|
||||||
{{ $comment = printf "%s %s: `>=%d`." $comment (T "supportedValues") $min }}
|
|
||||||
{{ else if (eq (printf "%T" $max) "int") }}
|
|
||||||
{{ $comment = printf "%s %s: `<=%d`." $comment (T "supportedValues") $max }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $default := "" }}
|
|
||||||
{{ with $val.default }}{{ $default = printf "`%v`" . }}{{ end }}
|
|
||||||
{{ if $udt }}{{ $type = printf "[%s](#%s)" $type (anchorize (printf "%s %s" $type (T "type"))) }}{{ end }}
|
|
||||||
{{ if $slice }}{{ $type = printf "[]%s" $type }}{{ end }}
|
|
||||||
{{ $table = printf "%s\n| %s | %s | %s | %s | %s |" $table $key $type $required $default $comment }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ return partial "assets/table.html" (dict "page" $page "input" $table "wrap" true) }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* Validate and initialize arguments */}}
|
{{/* Validate and initialize arguments */}}
|
||||||
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "args" "args" .Params "named" .IsNamedParams "group" "shortcode") }}
|
{{- $args := partial "utilities/InitArgs.html" (dict "structure" "args" "args" .Params "named" .IsNamedParams "group" "shortcode") -}}
|
||||||
{{ if or $args.err $args.warnmsg }}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/args.html"
|
"partial" "shortcodes/args.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
"position" .Position
|
"position" .Position
|
||||||
)}}
|
) -}}
|
||||||
{{ $error = $args.err }}
|
{{- $error = $args.err -}}
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
|
|
||||||
{{/* Initialize type structure */}}
|
|
||||||
{{ $structure := $args.structure }}
|
|
||||||
{{ $bookshop := "" }}
|
|
||||||
{{ if hasPrefix $structure "bookshop-" }}{{ $bookshop = strings.TrimPrefix "bookshop-" $structure }}{{ $structure = "" }}{{ end }}
|
|
||||||
{{ $types := dict }}
|
|
||||||
{{ if not $error }}
|
|
||||||
{{ $types = partial "utilities/InitTypes.html" (dict "structure" $structure "bookshop" $bookshop) }}
|
|
||||||
{{ if or $types.err $types.warnmsg }}
|
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
|
||||||
"partial" "shortcodes/args.html"
|
|
||||||
"msg" "Invalid arguments"
|
|
||||||
"details" ($types.errmsg | append $types.warnmsg)
|
|
||||||
"file" page.File
|
|
||||||
"position" .Position
|
|
||||||
)}}
|
|
||||||
{{ $error = $args.err }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* Main code */}}
|
{{/* Main code */}}
|
||||||
{{ if not $error }}
|
{{- if not $args.err -}}
|
||||||
{{ $params := dict "types" $types.udt "page" .Page "group" $args.group "parent" $args.parent }}
|
{{- partial "assets/args.html" (dict
|
||||||
{{ partial "inline/args-table.html" (merge $params (dict "args" $types.types)) }}
|
"page" .Page
|
||||||
|
"structure" $args.structure
|
||||||
{{ range $k, $v := $types.udt }}
|
"group" $args.group
|
||||||
{{ printf "## %s %s" $k (T "type") | $.Page.RenderString }}
|
"parent" $args.parent
|
||||||
{{ partial "inline/args-table.html" (merge $params (dict "args" $v)) }}
|
"render-type" $args.renderType
|
||||||
{{ end }}
|
"header-level" $args.headerLevel
|
||||||
{{ end }}
|
) -}}
|
||||||
|
{{- end -}}
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/badge.html"
|
"partial" "shortcodes/badge.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/breadcrumb.html"
|
"partial" "shortcodes/breadcrumb.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/button-group.html"
|
"partial" "shortcodes/button-group.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/button.html"
|
"partial" "shortcodes/button.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -10,10 +10,11 @@
|
|||||||
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "card-group" "child" "card" "args" .Params "named" .IsNamedParams) }}
|
{{ $args := partial "utilities/InitArgs.html" (dict "structure" "card-group" "child" "card" "args" .Params "named" .IsNamedParams) }}
|
||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/card-group.html"
|
"partial" "shortcodes/card-group.html"
|
||||||
"msg" "Invalid arguments"
|
"warnid" "warn-invalid-arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"msg" "Invalid arguments"
|
||||||
"file" page.File
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
|
"file" page.File
|
||||||
"position" .Position
|
"position" .Position
|
||||||
)}}
|
)}}
|
||||||
{{ $error = $args.err }}
|
{{ $error = $args.err }}
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{ if or $args.err $args.warnmsg }}
|
{{ if or $args.err $args.warnmsg }}
|
||||||
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/card.html"
|
"partial" "shortcodes/card.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/carousel.html"
|
"partial" "shortcodes/carousel.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/collapse.html"
|
"partial" "shortcodes/collapse.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/command.html"
|
"partial" "shortcodes/command.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/docs.html"
|
"partial" "shortcodes/docs.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/example-bookshop.html"
|
"partial" "shortcodes/example-bookshop.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
@@ -43,9 +44,9 @@
|
|||||||
{{- if eq $lang "bookshop" }}
|
{{- if eq $lang "bookshop" }}
|
||||||
{{ $type = "bookshop" }}
|
{{ $type = "bookshop" }}
|
||||||
{{ $frontmatter := slice "yml" "yaml" "toml" "json" }}
|
{{ $frontmatter := slice "yml" "yaml" "toml" "json" }}
|
||||||
{{ $inputRE := findRESubmatch `\x60\x60\x60(?:yml|yaml|json|toml)(\r\n|\r|\n)([\s\S]*?)\x60\x60\x60` $content 1}}
|
{{ $inputRE := findRESubmatch `\x60\x60\x60(?:yml|yaml|json|toml)(\r\n|\r|\n)([\s\S]*?)\x60\x60\x60` $content 1 }}
|
||||||
{{ if and $inputRE (eq (len (index $inputRE 0)) 3) }}
|
{{ if and $inputRE (eq (len (index $inputRE 0)) 3) }}
|
||||||
{{ $lang = trim (index (split $content "\n") 1) "\x60" }}
|
{{ $lang = (trim (index (split $content "\n") 2) "\x60") | default "yml" }}
|
||||||
{{ $content = index (index $inputRE 0) 2 }}
|
{{ $content = index (index $inputRE 0) 2 }}
|
||||||
{{ $data = index (unmarshal $content) 0 }}
|
{{ $data = index (unmarshal $content) 0 }}
|
||||||
{{ $component_name := (index $data "_bookshop_name") }}
|
{{ $component_name := (index $data "_bookshop_name") }}
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
{{- if or $args.err $args.warnmsg -}}
|
{{- if or $args.err $args.warnmsg -}}
|
||||||
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
{{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict
|
||||||
"partial" "shortcodes/example.html"
|
"partial" "shortcodes/example.html"
|
||||||
|
"warnid" "warn-invalid-arguments"
|
||||||
"msg" "Invalid arguments"
|
"msg" "Invalid arguments"
|
||||||
"details" ($args.errmsg | append $args.warnmsg)
|
"details" ($args.errmsg | append $args.warnmsg)
|
||||||
"file" page.File
|
"file" page.File
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user