From 6a8ece286fd57581f67026842466f2befe002705 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Mon, 5 Feb 2024 20:54:16 +0100 Subject: [PATCH] Fix image styling in news and teaser image --- themes/tsc_vfl/assets/css/main.scss | 8 ++++++++ .../tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/themes/tsc_vfl/assets/css/main.scss b/themes/tsc_vfl/assets/css/main.scss index 7ab1c26..36e0e91 100644 --- a/themes/tsc_vfl/assets/css/main.scss +++ b/themes/tsc_vfl/assets/css/main.scss @@ -589,6 +589,9 @@ h1 { img { width: 90%; + height: 100%; + display: block; + margin: 0 auto; object-fit: contain; object-position: left top; } @@ -720,6 +723,11 @@ h1 { .tsc-image { margin: 0 auto; width: fit-content; + + img { + display: block; + margin: 0 auto; + } } .tsc-gallery { diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html b/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html index 08e5d46..6248046 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html @@ -8,7 +8,7 @@ {{ $resource := .Page.Resources.Get $filename -}} src="{{ $resource.RelPermalink }}" style=" - {{- with .Get "width" -}}width: {{.}}px;{{- end -}} + {{- with .Get "width" -}}max-width: min(90%, {{.}}px);{{- end -}} " > {{ with .Get "href" }}