From dfc4085b49cf04e79a419a3819548e5722841fd3 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 8 Dec 2025 06:53:01 +0000 Subject: [PATCH] appview/pages: introduce "tinyAvatarList" template Change-Id: pnwvyvnvnllzsyuyzorupqmtqomqloqo 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 --- .../templates/fragments/tinyAvatarList.html | 22 +++++++++++++++++++ .../repo/fragments/participants.html | 17 +------------- 2 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 appview/pages/templates/fragments/tinyAvatarList.html diff --git a/appview/pages/templates/fragments/tinyAvatarList.html b/appview/pages/templates/fragments/tinyAvatarList.html new file mode 100644 index 00000000..3499fd06 --- /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 index eeb50994..ac78b667 100644 --- 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 }} -- 2.43.0