+7
-5
appview/pages/templates/fragments/tinyAvatarList.html
+7
-5
appview/pages/templates/fragments/tinyAvatarList.html
···
5
<div class="inline-flex items-center -space-x-3">
6
{{ $c := "z-50 z-40 z-30 z-20 z-10" }}
7
{{ range $i, $p := $ps }}
8
-
<img
9
-
src="{{ tinyAvatar . }}"
10
-
alt=""
11
-
class="rounded-full size-8 mr-1 border-2 border-gray-100 dark:border-gray-900 z-{{sub 5 $i}}0 {{ $classes }}"
12
-
/>
13
{{ end }}
14
15
{{ if gt (len $all) 5 }}
···
5
<div class="inline-flex items-center -space-x-3">
6
{{ $c := "z-50 z-40 z-30 z-20 z-10" }}
7
{{ range $i, $p := $ps }}
8
+
<a href="/{{ resolve . }}" title="{{ resolve . }}">
9
+
<img
10
+
src="{{ tinyAvatar . }}"
11
+
alt=""
12
+
class="rounded-full size-8 mr-1 border-2 border-gray-100 dark:border-gray-900 z-{{sub 5 $i}}0 {{ $classes }}"
13
+
/>
14
+
</a>
15
{{ end }}
16
17
{{ if gt (len $all) 5 }}
+30
-17
appview/pages/templates/labels/fragments/label.html
+30
-17
appview/pages/templates/labels/fragments/label.html
···
2
{{ $d := .def }}
3
{{ $v := .val }}
4
{{ $withPrefix := .withPrefix }}
5
-
<span class="w-fit flex items-center gap-2 font-normal normal-case rounded py-1 px-2 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-sm">
6
-
{{ template "repo/fragments/colorBall" (dict "color" $d.GetColor) }}
7
8
-
{{ $lhs := printf "%s" $d.Name }}
9
-
{{ $rhs := "" }}
10
11
-
{{ if not $d.ValueType.IsNull }}
12
-
{{ if $d.ValueType.IsDidFormat }}
13
-
{{ $v = resolve $v }}
14
-
{{ end }}
15
16
-
{{ if not $withPrefix }}
17
-
{{ $lhs = "" }}
18
-
{{ else }}
19
-
{{ $lhs = printf "%s/" $d.Name }}
20
-
{{ end }}
21
22
-
{{ $rhs = printf "%s" $v }}
23
-
{{ end }}
24
25
-
{{ printf "%s%s" $lhs $rhs }}
26
-
</span>
27
{{ end }}
28
29
···
2
{{ $d := .def }}
3
{{ $v := .val }}
4
{{ $withPrefix := .withPrefix }}
5
6
+
{{ $lhs := printf "%s" $d.Name }}
7
+
{{ $rhs := "" }}
8
+
{{ $isDid := false }}
9
+
{{ $resolvedVal := "" }}
10
11
+
{{ if not $d.ValueType.IsNull }}
12
+
{{ $isDid = $d.ValueType.IsDidFormat }}
13
+
{{ if $isDid }}
14
+
{{ $resolvedVal = resolve $v }}
15
+
{{ $v = $resolvedVal }}
16
+
{{ end }}
17
+
18
+
{{ if not $withPrefix }}
19
+
{{ $lhs = "" }}
20
+
{{ else }}
21
+
{{ $lhs = printf "%s/" $d.Name }}
22
+
{{ end }}
23
24
+
{{ $rhs = printf "%s" $v }}
25
+
{{ end }}
26
27
+
{{ $chipClasses := "w-fit flex items-center gap-2 font-normal normal-case rounded py-1 px-2 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-sm" }}
28
29
+
{{ if $isDid }}
30
+
<a href="/{{ $resolvedVal }}" class="{{ $chipClasses }} no-underline hover:underline">
31
+
{{ template "repo/fragments/colorBall" (dict "color" $d.GetColor) }}
32
+
{{ printf "%s%s" $lhs $rhs }}
33
+
</a>
34
+
{{ else }}
35
+
<span class="{{ $chipClasses }}">
36
+
{{ template "repo/fragments/colorBall" (dict "color" $d.GetColor) }}
37
+
{{ printf "%s%s" $lhs $rhs }}
38
+
</span>
39
+
{{ end }}
40
{{ end }}
41
42