From 2d8636d1672b92f5cc9b2a252b17a41547d737da Mon Sep 17 00:00:00 2001 From: NeilBrommer Date: Tue, 12 Jun 2018 11:56:45 -0700 Subject: [PATCH] Better format link cards --- layouts/partials/linkCard.html | 17 +++++++---------- layouts/shortcodes/linkCardList.html | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/layouts/partials/linkCard.html b/layouts/partials/linkCard.html index 3585c94..c971a62 100644 --- a/layouts/partials/linkCard.html +++ b/layouts/partials/linkCard.html @@ -1,14 +1,11 @@ -
-
-

- {{ .title }} -

-
+
+

{{ .title }}

+
+

Link

- {{ if isset . "description" }} -

{{ .description | markdownify }}

- {{ end }} + {{ if isset . "description" }} +

{{ .description | markdownify }}

+ {{ end }} -
diff --git a/layouts/shortcodes/linkCardList.html b/layouts/shortcodes/linkCardList.html index 9ed273f..8444e5f 100644 --- a/layouts/shortcodes/linkCardList.html +++ b/layouts/shortcodes/linkCardList.html @@ -1,7 +1,7 @@ {{ with .Get 0 }} {{ $cardData := getJSON . }} -
+
{{ range $cardData }} {{ partial "linkCard" . }} {{ end }}