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