Skip to content

Commit 589c5ee

Browse files
authored
Merge pull request #1695 from gethinode/templatev2
Templatev2
2 parents 8f03223 + ecb4ea9 commit 589c5ee

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

component-library/components/about/about.bookshop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ blueprint:
2828
class:
2929
anchor:
3030
mode:
31+
width:
3132
order:
3233
width:
3334
justify:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/gethinode/mod-bootstrap v1.3.5 // indirect
99
github.com/gethinode/mod-csp v1.0.8 // indirect
1010
github.com/gethinode/mod-flexsearch/v3 v3.2.0 // indirect
11-
github.com/gethinode/mod-fontawesome/v3 v3.0.0 // indirect
11+
github.com/gethinode/mod-fontawesome/v3 v3.0.1 // indirect
1212
github.com/gethinode/mod-google-analytics/v2 v2.0.0 // indirect
1313
github.com/gethinode/mod-katex v1.1.4 // indirect
1414
github.com/gethinode/mod-leaflet/v2 v2.0.0 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ github.com/gethinode/mod-fontawesome/v2 v2.1.3 h1:G2LyPQVhrXxBSJ/q+mBMXpNClobkQP
2626
github.com/gethinode/mod-fontawesome/v2 v2.1.3/go.mod h1:zukv88wXqquEvTJJ9mWWk8Ia+9INnA41wYqusf2RcHA=
2727
github.com/gethinode/mod-fontawesome/v3 v3.0.0 h1:mNV8ZveQ5aXEU+jmKrWaoIbq5xB2p4OYDnHSyKGDD6c=
2828
github.com/gethinode/mod-fontawesome/v3 v3.0.0/go.mod h1:KX8eLJCH7L27KCUCr4S5k1NOQC6O41D4G6DWOzNmeJ8=
29+
github.com/gethinode/mod-fontawesome/v3 v3.0.1 h1:omQww1vN879e408UyhZDazlSbVec2vbPGtUCPJfkC14=
30+
github.com/gethinode/mod-fontawesome/v3 v3.0.1/go.mod h1:a905KAk3fRZKh7iO11D5ocAzKr0GQcaR6v17bYTRpX8=
2931
github.com/gethinode/mod-google-analytics v1.3.3 h1:iX2FtXajykfHWJf7MXCQmpezqXgQUADNTeglU81QKpw=
3032
github.com/gethinode/mod-google-analytics v1.3.3/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
3133
github.com/gethinode/mod-google-analytics/v2 v2.0.0 h1:Vor4j56qtpjtKY9r5QLeN5CBxuf8YKP3+XvQKEkayrM=

layouts/_partials/assets/card.html

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
{{- $color := .color -}}
3030
{{- $description := .description -}}
3131
{{- $links := .links -}}
32+
{{- $class := .class }}
3233

3334
{{- if $href -}}
34-
<a href="{{ $href }}" class="{{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }} stretched-link">
35+
<a href="{{ $href }}" class="{{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }} stretched-link {{ $class }}">
3536
{{ if or $title $links }}
3637
<p class="card-title fs-lg-5 fs-6">
3738
{{- with $title }}{{ . | page.RenderString }}{{ end }}
@@ -45,7 +46,7 @@
4546
{{ end -}}
4647
</a>
4748
{{- else -}}
48-
<div>
49+
<div{{ with $class }} class="{{ . }}"{{ end }}>
4950
{{ if or $title $links }}
5051
<p class="card-title fs-lg-5 fs-6">
5152
{{- with $title }}{{ . | page.RenderString }}{{ end }}
@@ -208,7 +209,8 @@
208209
</div>
209210
{{- end -}}
210211
<div class="{{ $col2 }}">
211-
<div class="card-body p-{{ $args.padding }} h-100 hstack">
212+
{{ $padding := printf "p-%d%s" $args.padding (cond (and (eq $args.padding 0) (or $icon $thumbnail)) " ps-3" "") }}
213+
<div class="card-body {{ $padding }} h-100 hstack">
212214
{{ if $icon }}
213215
{{- partial "assets/card-icon.html" (dict
214216
"icon" $icon
@@ -219,7 +221,7 @@
219221
)}}
220222
{{ end }}
221223
<div>
222-
{{ if $page }}
224+
{{ if and $page (ne $args.headerStyle "none") }}
223225
<div>{{ partial "inline/card-caption.html" (dict
224226
"page" $page
225227
"keywords" $args.headerStyle
@@ -234,7 +236,14 @@
234236
"description" $description
235237
"links" $args.links
236238
) -}}
237-
{{ if $page }}<div>{{ partial "inline/card-caption.html" (dict "page" $page "keywords" $args.footerStyle "color" $args.color) }}</div>{{ end }}
239+
{{ if and $page (ne $args.footerStyle "none") }}
240+
<div>{{ partial "inline/card-caption.html" (dict
241+
"page" $page
242+
"keywords" $args.footerStyle
243+
"color" $args.color)
244+
}}
245+
</div>
246+
{{ end }}
238247
{{ if and $href $args.button }}
239248
{{ $label := (or $args.buttonLabel $title) | default (T "readMore") }}
240249
{{ $buttonClass := "card-button mb-n4" }}
@@ -284,6 +293,7 @@
284293
"color" $args.color
285294
"description" $description
286295
"links" $args.links
296+
"class" (cond (and $thumbnail (eq $args.headerStyle "none")) "pt-3" "")
287297
) -}}
288298
{{ if $page }}{{- partial "inline/card-caption.html" (dict "page" $page "keywords" $args.footerStyle "color" $args.color) -}}{{ end }}
289299
</div>

layouts/_partials/assets/featured-illustration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
) -}}
4242
{{- end -}}
4343
{{- else }}
44-
{{ partial "assets/icon.html" (dict "icon" $icon "wrapper" $wrapper) -}}
44+
{{ partial "assets/icon.html" (dict "icon" $icon "wrapper" $class "spacing" false) -}}
4545
{{- end -}}
4646
{{- else if $image -}}
4747
{{- if not (hasSuffix $image "svg") }}{{ $class = strings.TrimSpace (printf "%s rounded" (or $class "")) }}{{ end -}}

0 commit comments

Comments
 (0)