this repo has no description
1{{ define "title" }}strings by {{ or .Card.UserHandle .Card.UserDid }}{{ end }}
2
3{{ define "extrameta" }}
4 <meta property="og:title" content="{{ or .Card.UserHandle .Card.UserDid }}" />
5 <meta property="og:type" content="profile" />
6 <meta
7 property="og:url"
8 content="https://tangled.sh/{{ or .Card.UserHandle .Card.UserDid }}" />
9 <meta
10 property="og:description"
11 content="{{ or .Card.Profile.Description .Card.UserHandle .Card.UserDid }}" />
12{{ end }}
13
14{{ define "content" }}
15 <div class="grid grid-cols-1 md:grid-cols-11 gap-4">
16 <div class="md:col-span-3 order-1 md:order-1">
17 {{ template "user/fragments/profileCard" .Card }}
18 </div>
19 <div id="all-strings" class="md:col-span-8 order-2 md:order-2">
20 {{ block "allStrings" . }}{{ end }}
21 </div>
22 </div>
23{{ end }}
24
25{{ define "allStrings" }}
26 <p class="text-sm font-bold p-2 dark:text-white">ALL STRINGS</p>
27 <div id="strings" class="grid grid-cols-1 gap-4 mb-6">
28 {{ range .Strings }}
29 {{ template "singleString" (list $ .) }}
30 {{ else }}
31 <p class="px-6 dark:text-white">
32 This user does not have any strings yet.
33 </p>
34 {{ end }}
35 </div>
36{{ end }}
37
38{{ define "singleString" }}
39 {{ $root := index . 0 }}
40 {{ $s := index . 1 }}
41 <div class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800">
42 <div class="font-medium dark:text-white flex gap-2 items-center">
43 <a
44 href="/strings/{{ or $root.Card.UserHandle $root.Card.UserDid }}/{{ $s.Rkey }}">
45 {{ $s.Filename }}
46 </a>
47 </div>
48 {{ with $s.Description }}
49 <div class="text-gray-600 dark:text-gray-300 text-sm">
50 {{ . }}
51 </div>
52 {{ end }}
53
54 {{ $stat := $s.Stats }}
55 <div class="text-gray-400 pt-4 text-sm font-mono inline-flex gap-2 mt-auto">
56 <span>
57 {{ $stat.LineCount }}
58 line{{ if ne $stat.LineCount 1 }}s{{ end }}
59 </span>
60 <span class="select-none [&:before]:content-['·']"></span>
61 {{ with $s.Edited }}
62 <span>edited {{ template "repo/fragments/shortTimeAgo" . }}</span>
63 {{ else }}
64 {{ template "repo/fragments/shortTimeAgo" $s.Created }}
65 {{ end }}
66 </div>
67 </div>
68{{ end }}