Skip to content

Commit 4bd20f6

Browse files
authored
Merge pull request #1504 from gethinode/develop
Develop
2 parents 773b365 + 6db9cbe commit 4bd20f6

File tree

8 files changed

+275
-56
lines changed

8 files changed

+275
-56
lines changed

component-library/components/articles/articles.hugo.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
{{ $error = $args.err }}
2020
{{ end }}
2121

22+
{{/* Initialize global arguments */}}
23+
{{- $padding := partial "utilities/GetPadding.html" -}}
24+
25+
{{/* Initialize local variables */}}
2226
{{ $pages := slice }}
2327
{{ $result := partial "assets/live-pages.html" (dict
2428
"page" $args.page
@@ -60,10 +64,14 @@
6064
{{ $paginate = false }}
6165
{{ end }}
6266

63-
<!-- Main code -->
67+
{{/* Main code */}}
6468
{{ if not $error }}
6569
{{ if or (gt (len $pages) 0) (not $args.hideEmpty) }}
66-
{{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
70+
{{- partial "assets/section-title.html" (dict
71+
"heading" $args.heading
72+
"justify" $args.justify
73+
"class" (printf "pb-%d" $padding.y))
74+
-}}
6775

6876
{{ $partial := "assets/card-group.html" }}
6977
{{ $params := dict }}
@@ -107,7 +115,6 @@
107115
{{ if gt (len $pages) 0 }}
108116
{{ partial $partial $params }}
109117
{{ else }}
110-
{{- $padding := partial "utilities/GetPadding.html" -}}
111118
<p class="pt-{{ $padding.y }}">{{- T "emptyList" }}.</p>
112119
{{ end }}
113120
{{ end }}

component-library/components/cards/cards.hugo.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
{{/* Initialize global arguments */}}
2323
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
24+
{{- $padding := partial "utilities/GetPadding.html" -}}
2425

2526
{{/* Initialize local variables */}}
2627
{{ $list := slice }}
@@ -34,13 +35,20 @@
3435
) }}
3536
{{ end}}
3637

38+
{{/* Main code */}}
3739
{{ if not $error }}
38-
{{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
40+
{{- partial "assets/section-title.html" (dict
41+
"heading" $args.heading
42+
"justify" $args.justify
43+
"class" (printf "pb-%d" $padding.y))
44+
-}}
3945

46+
{{/* Layout for small screens */}}
4047
{{- partial "assets/card-group.html" (dict
4148
"page" page
4249
"list" $list
43-
"class" (printf "border-0 card-icon-primary d-%s-none %s" $breakpoint.prev (or $args.class ""))
50+
"class" (printf "border-0 card-icon-primary %s" (or $args.class ""))
51+
"wrapper" (printf "d-%s-none" $breakpoint.prev)
4452
"cols" $args.cols
4553
"gutter" "4"
4654
"padding" $args.padding
@@ -53,10 +61,12 @@
5361
"hook" "assets/live-card.html"
5462
) -}}
5563

64+
{{/* Layout for regular screens */}}
5665
{{- partial "assets/card-group.html" (dict
5766
"page" page
5867
"list" $list
59-
"class" (printf "border-0 card-icon-primary d-none d-%s-block %s" $breakpoint.prev (or $args.class ""))
68+
"class" (printf "border-0 card-icon-primary %s" (or $args.class ""))
69+
"wrapper" (printf "d-none d-%s-block" $breakpoint.prev)
6070
"cols" $args.cols
6171
"gutter" "4"
6272
"padding" $args.padding

component-library/components/faq/faq.hugo.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,18 @@
1616
)}}
1717
{{ end }}
1818

19+
{{/* Initialize global arguments */}}
20+
{{- $padding := partial "utilities/GetPadding.html" -}}
21+
22+
{{/* Main code */}}
1923
{{ if not $args.err }}
2024
{{ $color := "" }}
2125
{{ if $args.contrast }}{{ $color = "white" }}{{ end }}
22-
{{- partial "assets/section-title.html" (dict "heading" $args.heading "color" $color "justify" $args.justify) -}}
26+
{{- partial "assets/section-title.html" (dict
27+
"heading" $args.heading
28+
"justify" $args.justify
29+
"class" (printf "pb-%d" $padding.y))
30+
-}}
2331

2432
{{ $class := "" }}
2533
{{ $id := printf "faq-%s" (md5 (delimit (slice . now) "-")) }}

component-library/components/panels/panels.hugo.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
{{/* Initialize global arguments */}}
2323
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
24+
{{- $padding := partial "utilities/GetPadding.html" -}}
2425

2526
{{/* Initialize local variables */}}
2627
{{ $list := slice }}
@@ -60,8 +61,13 @@
6061
{{ $titles = $titles | append $element.title }}
6162
{{ end}}
6263

64+
{{/* Main code */}}
6365
{{ if not $error }}
64-
{{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
66+
{{- partial "assets/section-title.html" (dict
67+
"heading" $args.heading
68+
"justify" $args.justify
69+
"class" (printf "pb-%d" $padding.y))
70+
-}}
6571

6672
{{- partial "assets/nav.html" (dict
6773
"id" (or $args.id $parentID)

component-library/components/video-message/video-message.hugo.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
)}}
1717
{{ end }}
1818

19+
{{/* Initialize global variables */}}
1920
{{- $breakpoint := partial "utilities/GetBreakpoint.html" -}}
2021
{{- $padding := partial "utilities/GetPadding.html" -}}
2122

@@ -80,6 +81,7 @@
8081
) -}}
8182
{{ end }}
8283

84+
{{/* Main code */}}
8385
{{ if not $args.err }}
8486
{{ $list := slice }}
8587

@@ -98,7 +100,11 @@
98100
) }}
99101
{{ end}}
100102

101-
{{- partial "assets/section-title.html" (dict "heading" $args.heading "justify" $args.justify) -}}
103+
{{- partial "assets/section-title.html" (dict
104+
"heading" $args.heading
105+
"justify" $args.justify
106+
"class" (printf "pb-%d" $padding.y))
107+
-}}
102108

103109
{{ if eq $args.orientation "stacked" }}
104110
<div class="col-{{ $breakpoint.current }}-{{ $args.width }} mx-auto">

0 commit comments

Comments
 (0)