diff --git a/assets/css/v2/style.css b/assets/css/v2/style.css index 7d3875c..fdf42d1 100644 --- a/assets/css/v2/style.css +++ b/assets/css/v2/style.css @@ -1214,7 +1214,8 @@ h6:has(a):hover { /* Hide all the cards past 3 if it is a featured card section */ &.featured-section { - .card-section-content.card-grid > *:nth-child(n + 4) { + .card-section-content.card-grid + > *:nth-child(n + 4 of div.card-container) { display: none; } } @@ -1244,7 +1245,7 @@ h6:has(a):hover { } /* If there is no featured card, last card that is the 3rd one should be full width */ - &:not(:has(.featured-card)) .card-container:nth-child(3n):last-child { + &:not(:has(.featured-card)) *:nth-child(n + 3 of div.card-container) { grid-column: 1 / -1; } } diff --git a/layouts/partials/list-main.html b/layouts/partials/list-main.html index 48a1a28..3f350d1 100644 --- a/layouts/partials/list-main.html +++ b/layouts/partials/list-main.html @@ -13,6 +13,31 @@

{{ partial "banner" .}} {{ $hasCustomContent := index .Params "nd-landing-page" | default false }} {{ if $hasCustomContent }} + {{ $cards := .Page.Scratch.Get "cards" }} +
+
+
+ {{ range .Pages.GroupBy "Section" }} + {{ range .Pages.ByWeight }} + {{ $title := .Title }} +
+
+

+ + {{ .Title }} +

+ {{ range $cards }} + {{ if eq .title $title }} +

{{ .content }}

+ {{ end }} + {{ end }} +
+
+ {{ end }} + {{ end }} +
+
+
{{ .Content }} {{ else }}
diff --git a/layouts/shortcodes/card-section.html b/layouts/shortcodes/card-section.html index c2df99b..593d3af 100644 --- a/layouts/shortcodes/card-section.html +++ b/layouts/shortcodes/card-section.html @@ -17,7 +17,7 @@ {{- $class := "card-grid" -}} {{- /* Validate that the parent is card-layout */ -}} {{ if eq .Parent.Name "card-layout"}} -
+