File tree Expand file tree Collapse file tree 3 files changed +32
-5
lines changed Expand file tree Collapse file tree 3 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,31 @@ <h1 class="bd-title">
13
13
{{ partial "banner" .}}
14
14
{{ $hasCustomContent := index .Params "nd-landing-page" | default false }}
15
15
{{ if $hasCustomContent }}
16
+ {{ $cards := .Page.Scratch.Get "cards" }}
17
+ < section data-mf ="false ">
18
+ < div class ="row ">
19
+ < div class ="card-deck ">
20
+ {{ range .Pages.GroupBy "Section" }}
21
+ {{ range .Pages.ByWeight }}
22
+ {{ $title := .Title }}
23
+ < div class ="col-md-5 card ">
24
+ < div class ="card-body ">
25
+ < h3 class ="card-title " style ="display: flex; align-items: center; gap: 5px; ">
26
+ < i class ="fas fa-{{if eq .Kind "page "}}file-alt{{else}}book{{end}} fa-lg card-img-top"> </ i >
27
+ < a href ="{{ if .Params.url}}{{ .Params.url}}{{else}}{{ .Permalink }}{{end}} "> {{ .Title }}</ a >
28
+ </ h3 >
29
+ {{ range $cards }}
30
+ {{ if eq .title $title }}
31
+ < p > {{ .content }}</ p >
32
+ {{ end }}
33
+ {{ end }}
34
+ </ div >
35
+ </ div >
36
+ {{ end }}
37
+ {{ end }}
38
+ </ div >
39
+ </ div >
40
+ </ section >
16
41
{{ .Content }}
17
42
{{ else }}
18
43
< section data-mf ="false ">
Original file line number Diff line number Diff line change 17
17
{{- $class := "card-grid" -}}
18
18
{{- /* Validate that the parent is card-layout */ -}}
19
19
{{ if eq .Parent.Name "card-layout"}}
20
- < div class ="card-section {{if eq $isFeaturedSection "true "}}featured-section{{ end }}">
20
+ < div class ="card-section {{if eq $isFeaturedSection "true "}}featured-section{{ end }}" data-mf=" true " style =" display: none; " >
21
21
{{- if $title -}}
22
22
< strong class ="card-section-title "> {{- $title -}}</ strong >
23
23
< div class ="card-section-content{{ if eq $showAsCards "true " }} {{ $class }} {{ end }}"> {{- .Inner -}}</ div >
28
28
< div class ="row " data-mf ="false ">
29
29
{{- if $title -}}
30
30
< strong class ="card-section-title "> {{- $title -}}</ strong >
31
- < div class ="card-section-content{{ if eq $showAsCards "true " }} {{ $class }} {{ end }} card-deck"> {{- .Inner -}}</ div >
31
+ < div class ="card-section-content{{ if eq $showAsCards "true " }} {{ $class }} {{ end }} card-deck"> {{- .Inner -}}</ div >
32
+ {{- else -}}
33
+ < div class ="card-section-content{{ if eq $showAsCards "true " }} {{ $class }} {{ end }} card-deck"> {{- .Inner -}}</ div >
32
34
{{ end }}
33
35
</ div >
34
36
{{ else }}
Original file line number Diff line number Diff line change 13
13
{{- .Page.Scratch.Set "cards" ($current | append $newCard) -}}
14
14
{{- /* Validate that the parent is card-section and under 3 cards */ -}}
15
15
{{- if (eq .Parent.Name "card-section") -}}
16
- < div class ="card-container {{ if eq $isFeatured "true " }}featured-card{{ end }}">
16
+ < div class ="card-container {{ if eq $isFeatured "true " }}featured-card{{ end }}" data-mf=" true " style =" display: none; " >
17
17
{{- if $title -}}
18
18
< div class ="card-header ">
19
19
{{- if $brandIcon -}}
@@ -37,8 +37,8 @@ <h2 class="card-title">{{- $title -}}</h2>
37
37
< div class ="col-md-5 card " data-mf ="false ">
38
38
< div class ="card-body ">
39
39
< h3 class ="card-title " style ="display: flex; align-items: center; gap: 5px; ">
40
- {{- if $icon -}}
41
- < img class ="card-img-top " src ="{{ .Site.BaseURL }}/images/icons/{{ $icon }}.png "/>
40
+ {{- if $brandIcon -}}
41
+ < img class ="card-img-top " src ="{{ .Site.BaseURL }}/images/icons/{{ $brandIcon }}.png "/>
42
42
{{- end -}}
43
43
{{- if ($title) -}}
44
44
< a href ="{{- $titleUrl -}} "> {{- $title -}}</ a >
You can’t perform that action at this time.
0 commit comments