From dc0aa3f27e1e6aadabbdd914a86f83930ae7eadf Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 06 Jul 2026 17:27:36 +0000 Subject: [PATCH] appview/pages: support image galleries in bsky posts in homepage Signed-off-by: oppiliappan --- appview/pages/templates/timeline/home.html | 66 +++++++++++++++++++++++++++++++++++++++++++++++------------------- 1 file(s) changed, 47 insertion(s)(+), 19 deletion(s)(-) diff --git a/appview/pages/templates/timeline/home.html b/appview/pages/templates/timeline/home.html --- a/appview/pages/templates/timeline/home.html +++ b/appview/pages/templates/timeline/home.html @@ -20,7 +20,6 @@ - + {{ end }} @@ -493,32 +504,49 @@

{{ .Text }}

{{ if .Embed }} - {{ if .Embed.EmbedImages_View }} -
- {{ range .Embed.EmbedImages_View.Images }} - {{ .Alt }} + {{ if .Embed.Images }} + {{ if eq (len .Embed.Images) 1 }} + {{ with index .Embed.Images 0 }} + {{ .Alt }} {{ end }} -
- {{ else if .Embed.EmbedExternal_View }} - - {{ if .Embed.EmbedExternal_View.External.Thumb }} - + {{ else }} + {{ $total := len .Embed.Images }} +
+ {{ range $i, $img := .Embed.Images }} +
+ {{ $img.Alt }} + {{ add $i 1 }}/{{ $total }} +
+ {{ end }} +
+ {{ end }} + {{ else if .Embed.External }} +
+ {{ if .Embed.External.Thumb }} + {{ end }}
-
{{ .Embed.EmbedExternal_View.External.Title }}
-
{{ .Embed.EmbedExternal_View.External.Description }}
-
{{ .Embed.EmbedExternal_View.External.Uri }}
+
{{ .Embed.External.Title }}
+
{{ .Embed.External.Description }}
+
{{ .Embed.External.Uri }}
- {{ else if .Embed.EmbedVideo_View }} + {{ else if .Embed.Video }} {{ end }} {{ end }} -- tangled.sh