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"> 26 tightly-knit 27 <br /> 28 social coding. 29 </div> 30 31 <p class="text-lg"> 32 tangled is new social-enabled git collaboration platform built on 33 <a class="underline" href="https://atproto.com/">atproto</a> 34 . 35 </p> 36 <p class="text-lg"> 37 we envision a place where developers have complete ownership of their 38 code, open source communities can freely self-govern and most importantly, 39 coding can be social and fun again. 40 </p> 41 42 <div class="flex gap-6 items-center"> 43 <a href="/signup" class="no-underline hover:no-underline "> 44 <button class="btn-create flex gap-2 px-4 items-center"> 45 join now 46 {{ i "arrow-right" "size-4" }} 47 </button> 48 </a> 49 </div> 50 </div> 51{{ end }} 52 53{{ define "timeline" }} 54 <div> 55 <div class="p-6"> 56 <p class="text-xl font-bold dark:text-white">Timeline</p> 57 </div> 58 59 <div class="flex flex-col gap-4"> 60 {{ range $i, $e := .Timeline }} 61 <div class="relative"> 62 {{ if ne $i 0 }} 63 <div 64 class="absolute left-8 -top-4 w-px h-4 bg-gray-300 dark:bg-gray-600"></div> 65 {{ end }} 66 {{ with $e }} 67 <div 68 class="flex flex-col divide-y divide-gray-200 dark:divide-gray-700 border border-gray-200 dark:border-gray-700 rounded-sm"> 69 {{ if .Repo }} 70 {{ block "repoEvent" (list $ .Repo .Source) }}{{ end }} 71 {{ else if .Star }} 72 {{ block "starEvent" (list $ .Star) }}{{ end }} 73 {{ else if .Follow }} 74 {{ block "followEvent" (list $ .Follow .Profile .FollowStats) }} 75 {{ end }} 76 {{ end }} 77 </div> 78 {{ end }} 79 </div> 80 {{ end }} 81 </div> 82 </div> 83{{ end }} 84 85{{ define "repoEvent" }} 86 {{ $root := index . 0 }} 87 {{ $repo := index . 1 }} 88 {{ $source := index . 2 }} 89 {{ $userHandle := resolve $repo.Did }} 90 <div 91 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"> 92 {{ template "user/fragments/picHandleLink" $repo.Did }} 93 {{ with $source }} 94 {{ $sourceDid := resolve .Did }} 95 forked 96 <a 97 href="/{{ $sourceDid }}/{{ .Name }}" 98 class="no-underline hover:underline"> 99 {{ $sourceDid }}/{{ .Name }} 100 </a> 101 to 102 <a 103 href="/{{ $userHandle }}/{{ $repo.Name }}" 104 class="no-underline hover:underline"> 105 {{ $repo.Name }} 106 </a> 107 {{ else }} 108 created 109 <a 110 href="/{{ $userHandle }}/{{ $repo.Name }}" 111 class="no-underline hover:underline"> 112 {{ $repo.Name }} 113 </a> 114 {{ end }} 115 <span class="text-gray-700 dark:text-gray-400 text-xs"> 116 {{ template "repo/fragments/time" $repo.Created }} 117 </span> 118 </div> 119 {{ with $repo }} 120 {{ template "user/fragments/repoCard" (list $root . true) }} 121 {{ end }} 122{{ end }} 123 124{{ define "starEvent" }} 125 {{ $root := index . 0 }} 126 {{ $star := index . 1 }} 127 {{ with $star }} 128 {{ $starrerHandle := resolve .StarredByDid }} 129 {{ $repoOwnerHandle := resolve .Repo.Did }} 130 <div 131 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" $starrerHandle }} 133 starred 134 <a 135 href="/{{ $repoOwnerHandle }}/{{ .Repo.Name }}" 136 class="no-underline hover:underline"> 137 {{ $repoOwnerHandle | truncateAt30 }}/{{ .Repo.Name }} 138 </a> 139 <span class="text-gray-700 dark:text-gray-400 text-xs"> 140 {{ template "repo/fragments/time" .Created }} 141 </span> 142 </div> 143 {{ with .Repo }} 144 {{ template "user/fragments/repoCard" (list $root . true) }} 145 {{ end }} 146 {{ end }} 147{{ end }} 148 149{{ define "followEvent" }} 150 {{ $root := index . 0 }} 151 {{ $follow := index . 1 }} 152 {{ $profile := index . 2 }} 153 {{ $stat := index . 3 }} 154 155 {{ $userHandle := resolve $follow.UserDid }} 156 {{ $subjectHandle := resolve $follow.SubjectDid }} 157 <div 158 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"> 159 {{ template "user/fragments/picHandleLink" $userHandle }} 160 followed 161 {{ template "user/fragments/picHandleLink" $subjectHandle }} 162 <span class="text-gray-700 dark:text-gray-400 text-xs"> 163 {{ template "repo/fragments/time" $follow.FollowedAt }} 164 </span> 165 </div> 166 <div 167 class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800 flex items-center gap-4"> 168 <div class="flex-shrink-0 max-h-full w-24 h-24"> 169 <img 170 class="object-cover rounded-full p-2" 171 src="{{ fullAvatar $subjectHandle }}" /> 172 </div> 173 174 <div class="flex-1 min-h-0 justify-around flex flex-col"> 175 <a href="/{{ $subjectHandle }}"> 176 <span 177 class="font-bold dark:text-white overflow-hidden text-ellipsis whitespace-nowrap max-w-full"> 178 {{ $subjectHandle | truncateAt30 }} 179 </span> 180 </a> 181 {{ with $profile }} 182 {{ with .Description }} 183 <p class="text-sm pb-2 md:pb-2">{{ . }}</p> 184 {{ end }} 185 {{ end }} 186 {{ with $stat }} 187 <div 188 class="text-sm flex items-center gap-2 my-2 overflow-hidden text-ellipsis whitespace-nowrap max-w-full text-sm"> 189 <span class="flex-shrink-0">{{ i "users" "size-4" }}</span> 190 <span id="followers">{{ .Followers }} followers</span> 191 <span class="select-none after:content-['·']"></span> 192 <span id="following">{{ .Following }} following</span> 193 </div> 194 {{ end }} 195 </div> 196 </div> 197{{ end }}