From 4d71c200b883ad9c2d73a020de8443ec83842d40 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 08 Dec 2025 06:53:01 +0000 Subject: [PATCH] appview/pages: introduce "tinyAvatarList" template given a list of DIDs, this forms a list of profile pictures capped at 5 profile pictures. this component will be used to represent a collection of users (e.g.: participants, coauthors). Signed-off-by: oppiliappan --- appview/pages/templates/fragments/tinyAvatarList.html | 22 ++++++++++++++++++++++ appview/pages/templates/repo/fragments/participants.html | 17 +---------------- 2 file(s) changed, 23 insertion(s)(+), 16 deletion(s)(-) diff --git a/appview/pages/templates/fragments/tinyAvatarList.html b/appview/pages/templates/fragments/tinyAvatarList.html new file mode 100644 --- /dev/null +++ b/appview/pages/templates/fragments/tinyAvatarList.html @@ -0,0 +1,22 @@ +{{ define "fragments/tinyAvatarList" }} + {{ $all := .all }} + {{ $classes := .classes }} + {{ $ps := take $all 5 }} +
+ {{ $c := "z-50 z-40 z-30 z-20 z-10" }} + {{ range $i, $p := $ps }} + + {{ end }} + + {{ if gt (len $all) 5 }} + + +{{ sub (len $all) 5 }} + + {{ end }} +
+{{ end }} + diff --git a/appview/pages/templates/repo/fragments/participants.html b/appview/pages/templates/repo/fragments/participants.html --- a/appview/pages/templates/repo/fragments/participants.html +++ b/appview/pages/templates/repo/fragments/participants.html @@ -6,21 +6,6 @@ Participants {{ len $all }} -
- {{ $c := "z-50 z-40 z-30 z-20 z-10" }} - {{ range $i, $p := $ps }} - - {{ end }} - - {{ if gt (len $all) 5 }} - - +{{ sub (len $all) 5 }} - - {{ end }} -
+ {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "w-8 h-8") }} {{ end }} -- tangled.sh