From ab451ef89ccb489e06a8e7e64b67ae44308db80e Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 14 Sep 2020 17:45:22 +0530 Subject: [PATCH] post-cover-image : add support for cover image for post usage with post params => cover = "" --- assets/css/post-entry.css | 7 +++++++ layouts/_default/list.html | 5 +++++ layouts/_default/single.html | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/assets/css/post-entry.css b/assets/css/post-entry.css index c140e25b..d2a8659c 100644 --- a/assets/css/post-entry.css +++ b/assets/css/post-entry.css @@ -90,6 +90,13 @@ font-size: 14px; } +.entry-cover img { + border-radius: var(--radius); + margin-bottom: var(--gap); + pointer-events: none; + width: 100%; +} + .social-icons a { margin: 2px; padding: 6px; diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ecb3f8d0..ae8c367f 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -32,6 +32,11 @@ {{- $class = "post-entry tag-entry" }} {{- end }}
+ {{ if .Params.cover }} +
+ cover image for {{ .Title }} +
+ {{ end }}

{{ .Title }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index f1d24077..a10ce57c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,6 +14,11 @@ {{end}}

+ {{ if .Params.cover }} +
+ cover image for {{ .Title | plainify }} +
+ {{ end }} {{ if .Params.ShowToc }}