From 1c412dc206f5a02a40973facad36442de8052dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taavi=20V=C3=A4=C3=A4n=C3=A4nen?= Date: Sun, 13 Oct 2024 16:51:30 +0300 Subject: [PATCH] fix img-realsize on mobile --- themes/castor/assets/css/styles.css | 14 ++++++++++---- themes/castor/layouts/shortcodes/img-realsize.html | 13 +++++++------ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/themes/castor/assets/css/styles.css b/themes/castor/assets/css/styles.css index 21c95eb..1bcb005 100644 --- a/themes/castor/assets/css/styles.css +++ b/themes/castor/assets/css/styles.css @@ -119,13 +119,19 @@ a:not(.nav-item):hover { grid-column: 4; } -.container > p > img:not(.img-realsize), -.container > p > a > img:not(.img-realsize), -.container > div.img-page--image-container > img:not(.img-realsize) { +.container > p > img, +.container > p > a > img, +.container > div.img-page--image-container > img { width: 100%; } -.container > p > img.img-realsize { +div.img-realsize-wrapper { + /* center */ + display: block; + margin: auto; +} + +div.img-realsize-wrapper img.img-realsize { max-width: 100%; /* center */ diff --git a/themes/castor/layouts/shortcodes/img-realsize.html b/themes/castor/layouts/shortcodes/img-realsize.html index dc20362..0ff67fc 100644 --- a/themes/castor/layouts/shortcodes/img-realsize.html +++ b/themes/castor/layouts/shortcodes/img-realsize.html @@ -1,8 +1,9 @@

- {{ .Get 1 }} +

+ {{ .Get 1 }} +

-- 2.45.2