summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/post-entry.css7
-rw-r--r--layouts/_default/list.html5
-rw-r--r--layouts/_default/single.html5
3 files changed, 17 insertions, 0 deletions
diff --git a/assets/css/post-entry.css b/assets/css/post-entry.css
index c140e25..d2a8659 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 ecb3f8d..ae8c367 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -32,6 +32,11 @@
{{- $class = "post-entry tag-entry" }}
{{- end }}
<article class="{{ $class }}">
+ {{ if .Params.cover }}
+ <figure class="entry-cover">
+ <img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title }}">
+ </figure>
+ {{ end }}
<header class="entry-header">
<h2>
{{ .Title }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index f1d2407..a10ce57 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -14,6 +14,11 @@
</div>
{{end}}
</header>
+ {{ if .Params.cover }}
+ <figure class="entry-cover">
+ <img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title | plainify }}">
+ </figure>
+ {{ end }}
{{ if .Params.ShowToc }}
<div class="toc">
<details>