This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / appview / pages / templates / user / fragments / picLink.html
1.9 kB 47 lines
1{{ define "user/fragments/picLink" }} 2 {{ $did := index . 0 }} 3 {{ $classes := index . 1 }} 4 {{ $handle := resolve $did }} 5 {{ $vr := false }} 6 {{ if ge (len .) 3 }} 7 {{ $vr = index . 2 }} 8 {{ end }} 9 <div class="relative inline-block"> 10 <a href="/{{ $handle }}" title="{{ $handle }}"> 11 <img 12 src="{{ tinyAvatar $did }}" 13 alt="" 14 class="rounded-full border border-gray-300 dark:border-gray-700 {{ $classes }}" 15 /> 16 </a> 17 {{ if $vr }} 18 {{ if ne $did $vr.ViewerDid }} 19 <button 20 type="button" 21 popovertarget="vouch-modal-{{ normalizeForHtmlId $vr.SubjectDid.String }}" 22 popovertargetaction="toggle" 23 class="absolute -bottom-0.5 -right-0.5 w-1/2 h-1/2 cursor-pointer" 24 title="{{ template "user/fragments/vouchTooltip" $vr }}"> 25 {{ if $vr.IsDirectVouch }} 26 {{ template "fragments/icons/shield-direct-vouch" "w-full h-full" }} 27 {{ else if $vr.IsDirectDenounce }} 28 {{ template "fragments/icons/shield-direct-denounce" "w-full h-full" }} 29 {{ else if $vr.IsMixed }} 30 {{ template "fragments/icons/shield-mixed" "w-full h-full" }} 31 {{ else if $vr.IsIndirectVouch }} 32 {{ template "fragments/icons/shield-indirect-vouch" "w-full h-full text-white dark:text-gray-900" }} 33 {{ else if $vr.IsIndirectDenounce }} 34 {{ template "fragments/icons/shield-indirect-denounce" "w-full h-full text-white dark:text-gray-900" }} 35 {{ else }} 36 {{ template "fragments/icons/shield-empty" "w-full h-full" }} 37 {{ end }} 38 </button> 39 {{ end }} 40 {{ end }} 41 </div> 42 {{ if $vr }} 43 {{ if ne $did $vr.ViewerDid }} 44 {{ template "user/fragments/vouchPopover" (dict "VouchRelationship" $vr) }} 45 {{ end }} 46 {{ end }} 47{{ end }}