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-3 relative">
53 <div
54 class="absolute left-8 top-0 bottom-0 w-px bg-gray-300 dark:bg-gray-600"
55 ></div>
56 {{ range .Timeline }}
57 <div
58 class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit"
59 >
60 {{ if .Repo }}
61 {{ $userHandle := index $.DidHandleMap .Repo.Did }}
62 <div class="flex items-center">
63 <p class="text-gray-600 dark:text-gray-300 flex flex-wrap items-center gap-2">
64 {{ template "user/fragments/picHandle" $userHandle }}
65 {{ if .Source }}
66 forked
67 <a
68 href="/{{ index $.DidHandleMap .Source.Did }}/{{ .Source.Name }}"
69 class="no-underline hover:underline"
70 >
71 {{ index $.DidHandleMap .Source.Did }}/{{ .Source.Name }}</a
72 >
73 to
74 <a
75 href="/{{ $userHandle }}/{{ .Repo.Name }}"
76 class="no-underline hover:underline"
77 >{{ .Repo.Name }}</a
78 >
79 {{ else }}
80 created
81 <a
82 href="/{{ $userHandle }}/{{ .Repo.Name }}"
83 class="no-underline hover:underline"
84 >{{ .Repo.Name }}</a
85 >
86 {{ end }}
87 <time
88 class="text-gray-700 dark:text-gray-400 text-xs"
89 >{{ .Repo.Created | timeFmt }}</time
90 >
91 </p>
92 </div>
93 {{ else if .Follow }}
94 {{ $userHandle := index $.DidHandleMap .Follow.UserDid }}
95 {{ $subjectHandle := index $.DidHandleMap .Follow.SubjectDid }}
96 <div class="flex items-center">
97 <p class="text-gray-600 dark:text-gray-300 flex flex-wrap items-center gap-2">
98 {{ template "user/fragments/picHandle" $userHandle }}
99 followed
100 {{ template "user/fragments/picHandle" $subjectHandle }}
101 <time
102 class="text-gray-700 dark:text-gray-400 text-xs"
103 >{{ .Follow.FollowedAt | timeFmt }}</time
104 >
105 </p>
106 </div>
107 {{ else if .Star }}
108 {{ $starrerHandle := index $.DidHandleMap .Star.StarredByDid }}
109 {{ $repoOwnerHandle := index $.DidHandleMap .Star.Repo.Did }}
110 <div class="flex items-center">
111 {{ template "user/fragments/picHandle" $starrerHandle }}
112 <p class="text-gray-600 dark:text-gray-300 flex items-center gap-2">
113 starred
114 <a
115 href="/{{ $repoOwnerHandle }}/{{ .Star.Repo.Name }}"
116 class="no-underline hover:underline"
117 >{{ $repoOwnerHandle | truncateAt30 }}/{{ .Star.Repo.Name }}</a
118 >
119 <time
120 class="text-gray-700 dark:text-gray-400 text-xs"
121 >{{ .Star.Created | timeFmt }}</time
122 >
123 </p>
124 </div>
125 {{ end }}
126 </div>
127 {{ end }}
128 </div>
129 </div>
130{{ end }}