diff options
author | Christoph Cullmann <cullmann@kde.org> | 2024-04-28 17:33:09 +0200 |
---|---|---|
committer | Christoph Cullmann <cullmann@kde.org> | 2024-04-28 17:33:09 +0200 |
commit | e77051ccc4b47951bfa4fde2be436b1bb2fb113b (patch) | |
tree | f0b75ee3521da9c8cd39dac4359212348f70e4e8 /themes/blowfish/layouts/partials/article-meta/list.html | |
parent | 4b355837824ac2422d371acef790f0f4249255c7 (diff) |
use https://github.com/nunocoracao/blowfish.git
Diffstat (limited to 'themes/blowfish/layouts/partials/article-meta/list.html')
-rw-r--r-- | themes/blowfish/layouts/partials/article-meta/list.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/themes/blowfish/layouts/partials/article-meta/list.html b/themes/blowfish/layouts/partials/article-meta/list.html new file mode 100644 index 0000000..4bf21c5 --- /dev/null +++ b/themes/blowfish/layouts/partials/article-meta/list.html @@ -0,0 +1,36 @@ +{{/* Determine the correct context and scope */}} +{{/* This allows for different logic depending on where the partial is called */}} +{{ $context := . }} +{{ $scope := default nil }} + +{{ if (reflect.IsMap . ) }} +{{ $context = .context }} +{{ $scope = cond (not .scope) nil .scope }} +{{ end }} + +{{ with $context }} +{{ $meta := newScratch }} + +{{/* Gather partials for this context */}} + +{{ if (.Params.showViews | default (.Site.Params.list.showViews | default false)) }} +{{ $meta.Add "partials" (slice (partial "meta/views.html" .)) }} +{{ end }} + +{{ if (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }} +{{ $meta.Add "partials" (slice (partial "meta/likes.html" .)) }} +{{ end }} + +{{ if and (eq $scope "single") (.Params.showLikes | default (.Site.Params.list.showLikes | default false)) }} +{{ $meta.Add "partials" (slice (partial "meta/likes_button.html" .)) }} +{{ end }} + + +<div class="flex flex-row flex-wrap items-center"> + {{/* Output partials */}} + {{ with ($meta.Get "partials") }} + {{ delimit . "<span class=\"px-2 text-primary-500\">·</span>" | safeHTML}} + {{ end }} +</div> + +{{ end }}
\ No newline at end of file |