this repo has no description
1{{ define "title" }}{{ resolve .Card.UserDid }} · strings {{ end }} 2 3{{ define "profileContent" }} 4 <div id="all-strings" class="md:col-span-8 order-2 md:order-2"> 5 {{ block "allStrings" . }}{{ end }} 6 </div> 7{{ end }} 8 9{{ define "allStrings" }} 10 <div id="strings" class="grid grid-cols-1 gap-4 mb-6"> 11 {{ range .Strings }} 12 <div class="border border-gray-200 dark:border-gray-700 rounded-sm"> 13 {{ template "singleString" (list $ .) }} 14 </div> 15 {{ else }} 16 <div class="text-base text-gray-500 flex items-center justify-center italic p-12 border border-gray-200 dark:border-gray-700 rounded"> 17 <span>This user does not have any strings yet.</span> 18 </div> 19 {{ end }} 20 </div> 21{{ end }} 22 23{{ define "singleString" }} 24 {{ $root := index . 0 }} 25 {{ $s := index . 1 }} 26 <div class="py-4 px-6 rounded bg-white dark:bg-gray-800"> 27 <div class="font-medium dark:text-white flex gap-2 items-center"> 28 <a href="/strings/{{ resolve $root.Card.UserDid }}/{{ $s.Rkey }}">{{ $s.Filename }}</a> 29 </div> 30 {{ with $s.Description }} 31 <div class="text-gray-600 dark:text-gray-300 text-sm"> 32 {{ . }} 33 </div> 34 {{ end }} 35 36 {{ $stat := $s.Stats }} 37 <div class="text-gray-400 pt-4 text-sm font-mono inline-flex gap-2 mt-auto"> 38 <span>{{ $stat.LineCount }} line{{if ne $stat.LineCount 1}}s{{end}}</span> 39 <span class="select-none [&:before]:content-['·']"></span> 40 {{ with $s.Edited }} 41 <span>edited {{ template "repo/fragments/shortTimeAgo" . }}</span> 42 {{ else }} 43 {{ template "repo/fragments/shortTimeAgo" $s.Created }} 44 {{ end }} 45 </div> 46 </div> 47{{ end }}