this repo has no description
1{{ define "title" }}timeline{{ end }}
2
3{{ define "extrameta" }}
4 <meta property="og:title" content="timeline · tangled" />
5 <meta property="og:type" content="object" />
6 <meta property="og:url" content="https://tangled.sh" />
7 <meta property="og:description" content="see what's tangling" />
8{{ end }}
9
10{{ define "topbar" }}
11 {{ template "layouts/topbar" $ }}
12{{ end }}
13
14{{ define "content" }}
15 {{ with .LoggedInUser }}
16 {{ block "timeline" $ }}{{ end }}
17 {{ else }}
18 {{ block "hero" $ }}{{ end }}
19 {{ block "timeline" $ }}{{ end }}
20 {{ end }}
21{{ end }}
22
23{{ define "hero" }}
24 <div class="flex flex-col text-black dark:text-white p-6 gap-6 max-w-xl">
25 <div class="font-bold text-4xl">tightly-knit<br>social coding.</div>
26
27 <p class="text-lg">
28 tangled is new social-enabled git collaboration platform built on <a class="underline" href="https://atproto.com/">atproto</a>.
29 </p>
30 <p class="text-lg">
31 we envision a place where developers have complete ownership of their
32 code, open source communities can freely self-govern and most
33 importantly, coding can be social and fun again.
34 </p>
35
36 <div class="flex gap-6 items-center">
37 <a href="/login" class="no-underline hover:no-underline ">
38 <button class="btn flex gap-2 px-4 items-center">
39 join now {{ i "arrow-right" "size-4" }}
40 </button>
41 </a>
42 </div>
43 </div>
44{{ end }}
45
46{{ define "timeline" }}
47 <div>
48 <div class="p-6">
49 <p class="text-xl font-bold dark:text-white">Timeline</p>
50 </div>
51
52 <div class="flex flex-col gap-4">
53 {{ range $i, $e := .Timeline }}
54 <div class="relative">
55 {{ if ne $i 0 }}
56 <div class="absolute left-8 -top-4 w-px h-4 bg-gray-300 dark:bg-gray-600"></div>
57 {{ end }}
58 {{ with $e }}
59 <div class="flex flex-col divide-y divide-gray-200 dark:divide-gray-700 border border-gray-200 dark:border-gray-700 rounded-sm">
60 {{ if .Repo }}
61 {{ block "repoEvent" (list $ .Repo .Source) }} {{ end }}
62 {{ else if .Star }}
63 {{ block "starEvent" (list $ .Star) }} {{ end }}
64 {{ else if .Follow }}
65 {{ block "followEvent" (list $ .Follow .Profile .FollowStats) }} {{ end }}
66 {{ end }}
67 </div>
68 {{ end }}
69 </div>
70 {{ end }}
71 </div>
72 </div>
73{{ end }}
74
75{{ define "repoEvent" }}
76 {{ $root := index . 0 }}
77 {{ $repo := index . 1 }}
78 {{ $source := index . 2 }}
79 {{ $userHandle := index $root.DidHandleMap $repo.Did }}
80 <div class="pl-6 py-2 bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-300 flex flex-wrap items-center gap-2 text-sm">
81 {{ template "user/fragments/picHandleLink" $userHandle }}
82 {{ with $source }}
83 forked
84 <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}"class="no-underline hover:underline">
85 {{ index $root.DidHandleMap .Did }}/{{ .Name }}
86 </a>
87 to
88 <a href="/{{ $userHandle }}/{{ $repo.Name }}" class="no-underline hover:underline">{{ $repo.Name }}</a>
89 {{ else }}
90 created
91 <a href="/{{ $userHandle }}/{{ $repo.Name }}" class="no-underline hover:underline">
92 {{ $repo.Name }}
93 </a>
94 {{ end }}
95 <span class="text-gray-700 dark:text-gray-400 text-xs">{{ template "repo/fragments/time" $repo.Created }}</span>
96 </div>
97 {{ with $repo }}
98 {{ template "user/fragments/repoCard" (list $root . true) }}
99 {{ end }}
100{{ end }}
101
102{{ define "starEvent" }}
103 {{ $root := index . 0 }}
104 {{ $star := index . 1 }}
105 {{ with $star }}
106 {{ $starrerHandle := index $root.DidHandleMap .StarredByDid }}
107 {{ $repoOwnerHandle := index $root.DidHandleMap .Repo.Did }}
108 <div class="pl-6 py-2 bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-300 flex flex-wrap items-center gap-2 text-sm">
109 {{ template "user/fragments/picHandleLink" $starrerHandle }}
110 starred
111 <a href="/{{ $repoOwnerHandle }}/{{ .Repo.Name }}" class="no-underline hover:underline">
112 {{ $repoOwnerHandle | truncateAt30 }}/{{ .Repo.Name }}
113 </a>
114 <span class="text-gray-700 dark:text-gray-400 text-xs">{{ template "repo/fragments/time" .Created }}</span>
115 </div>
116 {{ with .Repo }}
117 {{ template "user/fragments/repoCard" (list $root . true) }}
118 {{ end }}
119 {{ end }}
120{{ end }}
121
122
123{{ define "followEvent" }}
124 {{ $root := index . 0 }}
125 {{ $follow := index . 1 }}
126 {{ $profile := index . 2 }}
127 {{ $stat := index . 3 }}
128
129 {{ $userHandle := index $root.DidHandleMap $follow.UserDid }}
130 {{ $subjectHandle := index $root.DidHandleMap $follow.SubjectDid }}
131 <div class="pl-6 py-2 bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-300 flex flex-wrap items-center gap-2 text-sm">
132 {{ template "user/fragments/picHandleLink" $userHandle }}
133 followed
134 {{ template "user/fragments/picHandleLink" $subjectHandle }}
135 <span class="text-gray-700 dark:text-gray-400 text-xs">{{ template "repo/fragments/time" $follow.FollowedAt }}</span>
136 </div>
137 <div class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800 flex items-center gap-4">
138 <div class="flex-shrink-0 max-h-full w-24 h-24">
139 <img class="object-cover rounded-full p-2" src="{{ fullAvatar $subjectHandle }}" />
140 </div>
141
142 <div class="flex-1 min-h-0 justify-around flex flex-col">
143 <a href="/{{ $subjectHandle }}">
144 <span class="font-bold dark:text-white overflow-hidden text-ellipsis whitespace-nowrap max-w-full">{{ $subjectHandle | truncateAt30 }}</span>
145 </a>
146 {{ with $profile }}
147 {{ with .Description }}
148 <p class="text-sm pb-2 md:pb-2">{{.}}</p>
149 {{ end }}
150 {{ end }}
151 {{ with $stat }}
152 <div class="text-sm flex items-center gap-2 my-2 overflow-hidden text-ellipsis whitespace-nowrap max-w-full text-sm">
153 <span class="flex-shrink-0">{{ i "users" "size-4" }}</span>
154 <span id="followers">{{ .Followers }} followers</span>
155 <span class="select-none after:content-['·']"></span>
156 <span id="following">{{ .Following }} following</span>
157 </div>
158 {{ end }}
159 </div>
160 </div>
161{{ end }}