From 1317345f739c0e3131689c7e557966ab58e18764 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 27 Aug 2023 18:44:24 +0530 Subject: styled images on blog page --- layouts/blog/single.html | 2 +- static/css/blog.css | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index f6e3980..7fd8efe 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -11,7 +11,7 @@ {{ .Date.Format "2006" }} - + Approx {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }} diff --git a/static/css/blog.css b/static/css/blog.css index eb2e9a0..eff7957 100644 --- a/static/css/blog.css +++ b/static/css/blog.css @@ -72,6 +72,19 @@ justify-content: space-evenly; } -#blog-post header hr { +#blog-post hr { border: 1px solid var(--blog-h1-fg); } + +article#blog-post img { + display: block; + margin: 1rem auto; + max-width: 90%; + max-height: 30rem; + border: 1px solid var(--blog-h1-fg); +} + +/* linked images have different colored borders */ +article#blog-post a img { + border: 1px solid var(--link-fg); +} -- cgit v1.2.3