From 3fe02dd53b0a1bbd20fd95597d1bd22fcd3899bb Mon Sep 17 00:00:00 2001 From: Lam Nguyen Date: Wed, 25 Jun 2025 08:39:54 -0700 Subject: [PATCH 1/2] Cards: Added back data-mf to fix old theme --- layouts/partials/list-main.html | 25 +++++++++++++++++++++++++ layouts/shortcodes/card-section.html | 6 ++++-- layouts/shortcodes/card.html | 6 +++--- 3 files changed, 32 insertions(+), 5 deletions(-) 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"}} -
+