From 1e48b12bf812640ec1396693bcea453b1136c2d4 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Tue, 14 Dec 2021 20:20:09 +0000 Subject: [PATCH] feat: add support for Portfolio's Showcase view in all normal, non-portfolio views --- wowchemy/layouts/partials/views/showcase.html | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 wowchemy/layouts/partials/views/showcase.html diff --git a/wowchemy/layouts/partials/views/showcase.html b/wowchemy/layouts/partials/views/showcase.html new file mode 100644 index 00000000..64b2cbd0 --- /dev/null +++ b/wowchemy/layouts/partials/views/showcase.html @@ -0,0 +1,61 @@ +{{ $item := .item }} +{{ $widget := .page }} +{{ $index := .index }} + +{{ $do_link := true }} +{{ if $item.Params.external_link | or $item.Content }} + {{ $do_link = true }} +{{ else }} + {{ $do_link = false }} +{{ end }} + +{{ $link := .link }} +{{ $target := .target }} + +{{/* Get summary. */}} +{{ $summary := "" }} +{{ if $item.Params.summary }} + {{ $summary = $item.Params.summary | markdownify | emojify }} +{{ else if .Params.abstract }} + {{ $summary = .Params.abstract | markdownify | emojify }} +{{ else if $item.Summary }} + {{ $summary = $item.Summary }} +{{ end }} + +{{ $order := "" }} +{{ if and ($widget.Params.design.flip_alt_rows | default true) (not (modBool $index 2)) }} + {{ $order = "order-md-2" }} +{{ end }} + + +
+
+
+
+ {{- if $do_link}}{{end -}} + {{ $item.Title | markdownify | emojify }} + {{- if $do_link}}{{end -}} +
+ + {{ with $summary }} +
+ {{ . }} +
+ {{ end }} + + + +
+
+ {{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $resource }} + {{ $image := .Resize "540x" }} + {{if $do_link}}{{end}} + {{ $item.Title }} + {{if $do_link}}{{end}} + {{end}} +
+
+