From 7b1da7a8456b0404ad4ebcb8afd523a6618439ff Mon Sep 17 00:00:00 2001
From: BSD-Yassin <103321053+BSD-Yassin@users.noreply.github.com>
Date: Thu, 27 Apr 2023 18:12:56 +0000
Subject: [PATCH] i18n: Update fr.toml (#313)
---
layouts/_default/_markup/render-image.html | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index ff4e8b3..dbcf732 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -1,8 +1,9 @@
{{$src := .Destination | safeURL }}
+{{$width := index (split .Text "|") 1 | default "auto" }}
{{$external := strings.HasPrefix $src "http" }}
{{- if $external -}}
-<img src="{{ $src }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }} />
+<img src="{{ $src }}" width="{{ $width }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }} />
{{- else -}}
{{$fixedUrl := (cond (hasPrefix $src "/") $src (print "/" $src)) | urlize}}
-<img src="{{ $fixedUrl }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }} />
+<img src="{{.Page.Site.BaseURL}}{{ $fixedUrl }}" width="{{ $width }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }} />
{{- end -}}
--
Gitblit v1.10.0