From 239d68f94c6250276850fbe95eaa6cdd5c38fb26 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sat, 16 Nov 2024 19:32:18 +0300 Subject: Своя тема, полностью всё переделал MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layouts/_default/_markup/render-image.html | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 themes/hugo-theme-stack/layouts/_default/_markup/render-image.html (limited to 'themes/hugo-theme-stack/layouts/_default/_markup/render-image.html') diff --git a/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html b/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html deleted file mode 100644 index 0ed5584..0000000 --- a/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html +++ /dev/null @@ -1,41 +0,0 @@ -{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}} -{{- $Permalink := .Destination | relURL | safeURL -}} -{{- $alt := .PlainText | safeHTML -}} -{{- $Width := 0 -}} -{{- $Height := 0 -}} -{{- $Srcset := "" -}} - -{{/* SVG and external images won't work with gallery layout, because their width and height attributes are unknown */}} -{{- $galleryImage := false -}} - -{{- if $image -}} - {{- $notSVG := ne (path.Ext .Destination) ".svg" -}} - {{- $Permalink = $image.RelPermalink -}} - - {{- if $notSVG -}} - {{- $Width = $image.Width -}} - {{- $Height = $image.Height -}} - {{- $galleryImage = true -}} - - {{- if (default true .Page.Site.Params.imageProcessing.content.enabled) -}} - {{- $small := $image.Resize `480x` -}} - {{- $big := $image.Resize `1024x` -}} - {{- $Srcset = printf `%s 480w, %s 1024w` $small.RelPermalink $big.RelPermalink -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{ . }} \ No newline at end of file -- cgit v1.2.3