diff --git a/themes/hello-friend-ng/layouts/partials/singleImage-embed.html b/themes/hello-friend-ng/layouts/partials/singleImage-embed.html new file mode 100644 index 00000000..43e0c1e0 --- /dev/null +++ b/themes/hello-friend-ng/layouts/partials/singleImage-embed.html @@ -0,0 +1,20 @@ +{{ $image := . }} +{{ $full := index ($image.Links) 0 }} +{{ $alt := $image.Caption }} +{{ if not $alt}} +{{ $alt = $image.Title }} +{{ end }} +{{ $srcset := "" }} +{{ range $image.Links }} +{{ $srcset = printf "%s %s %vw," $srcset .Url .Width }} +{{ end }} +{{ $srcset = trim $srcset ","}} + + + + + \ No newline at end of file diff --git a/themes/hello-friend-ng/layouts/shortcodes/albumImage.html b/themes/hello-friend-ng/layouts/shortcodes/albumImage.html index 7886ba62..44772fb2 100644 --- a/themes/hello-friend-ng/layouts/shortcodes/albumImage.html +++ b/themes/hello-friend-ng/layouts/shortcodes/albumImage.html @@ -3,7 +3,7 @@ {{ $album := .Site.GetPage $albumName }} {{ $image := index $album.Params.Pictures $imageIndex }} {{ with $image }} -