From acbd51bcd7fcc802e02a2078b7c15c8bbdb15f7e Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Fri, 9 Aug 2024 15:46:18 +0200 Subject: [PATCH] Allow for credits in image positions --- themes/tsc_vfl/assets/css/main.scss | 7 +++++++ .../layouts/shortcodes/tsc/news/gallery-image.html | 6 ++++++ .../layouts/shortcodes/tsc/news/inline-float.html | 9 +++++---- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/themes/tsc_vfl/assets/css/main.scss b/themes/tsc_vfl/assets/css/main.scss index 72e53df7..41836325 100644 --- a/themes/tsc_vfl/assets/css/main.scss +++ b/themes/tsc_vfl/assets/css/main.scss @@ -760,6 +760,13 @@ h1 { } } +.tsc-image, .tsc-gallery-img { + .credits { + font-style: italic; + float: right; + } +} + .youtube-video { max-width: 100%; } diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/news/gallery-image.html b/themes/tsc_vfl/layouts/shortcodes/tsc/news/gallery-image.html index 9bf13fa9..79d2facc 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/news/gallery-image.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/news/gallery-image.html @@ -24,4 +24,10 @@ src="{{ $img.RelPermalink }}" > + {{ with .Get "credits" }} +
Foto: {{ . }}
+ {{ end }} + {{ with .Get "caption" }} + {{ . }} + {{ end }} 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 6248046c..98122cac 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html @@ -1,4 +1,4 @@ -
+
{{ with .Get "href" }} {{ end }} @@ -7,16 +7,17 @@ {{- $filename := .Get "src" }} {{ $resource := .Page.Resources.Get $filename -}} src="{{ $resource.RelPermalink }}" - style=" - {{- with .Get "width" -}}max-width: min(90%, {{.}}px);{{- end -}} - " > {{ with .Get "href" }} {{ end }} + {{ with .Get "credits" }} +
Foto: {{ . }}
+ {{ end }} {{ with .Get "caption" }}
{{ . }}
{{ end }}
+