File tree Expand file tree Collapse file tree 4 files changed +35
-7
lines changed Expand file tree Collapse file tree 4 files changed +35
-7
lines changed Original file line number Diff line number Diff line change @@ -1214,7 +1214,8 @@ h6:has(a):hover {
12141214
12151215 /* Hide all the cards past 3 if it is a featured card section */
12161216 & .featured-section {
1217- .card-section-content .card-grid > * : nth-child (n + 4) {
1217+ .card-section-content .card-grid
1218+ > * : nth-child (n + 4 of div .card-container ) {
12181219 display : none;
12191220 }
12201221 }
@@ -1244,7 +1245,7 @@ h6:has(a):hover {
12441245 }
12451246
12461247 /* If there is no featured card, last card that is the 3rd one should be full width */
1247- & : not (: has (.featured-card )) . card-container : nth-child (3n) : last-child {
1248+ & : not (: has (.featured-card )) * : nth-child (n + 3 of div . card-container ) {
12481249 grid-column : 1 / -1 ;
12491250 }
12501251}
Original file line number Diff line number Diff line change @@ -13,6 +13,31 @@ <h1 class="bd-title">
1313 {{ partial "banner" .}}
1414 {{ $hasCustomContent := index .Params "nd-landing-page" | default false }}
1515 {{ 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 >
1641 {{ .Content }}
1742 {{ else }}
1843 < section data-mf ="false ">
Original file line number Diff line number Diff line change 1717{{- $class := "card-grid" -}}
1818{{- /* Validate that the parent is card-layout */ -}}
1919{{ 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; " >
2121 {{- if $title -}}
2222 < strong class ="card-section-title "> {{- $title -}}</ strong >
2323 < div class ="card-section-content{{ if eq $showAsCards "true " }} {{ $class }} {{ end }}"> {{- .Inner -}}</ div >
2828 < div class ="row " data-mf ="false ">
2929 {{- if $title -}}
3030 < 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 >
3234 {{ end }}
3335 </ div >
3436{{ else }}
Original file line number Diff line number Diff line change 1313{{- .Page.Scratch.Set "cards" ($current | append $newCard) -}}
1414{{- /* Validate that the parent is card-section and under 3 cards */ -}}
1515{{- 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; " >
1717 {{- if $title -}}
1818 < div class ="card-header ">
1919 {{- if $brandIcon -}}
@@ -37,8 +37,8 @@ <h2 class="card-title">{{- $title -}}</h2>
3737 < div class ="col-md-5 card " data-mf ="false ">
3838 < div class ="card-body ">
3939 < 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 "/>
4242 {{- end -}}
4343 {{- if ($title) -}}
4444 < a href ="{{- $titleUrl -}} "> {{- $title -}}</ a >
You can’t perform that action at this time.
0 commit comments