forked from tangled.org/core
Monorepo for Tangled — https://tangled.org
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"> 64 <a 65 href="/{{ $userHandle }}" 66 class="no-underline hover:underline" 67 >{{ $userHandle | truncateAt30 }}</a 68 > 69 {{ if .Source }} 70 forked 71 <a 72 href="/{{ index $.DidHandleMap .Source.Did }}/{{ .Source.Name }}" 73 class="no-underline hover:underline" 74 > 75 {{ index $.DidHandleMap .Source.Did }}/{{ .Source.Name }} 76 </a> 77 to 78 <a 79 href="/{{ $userHandle }}/{{ .Repo.Name }}" 80 class="no-underline hover:underline" 81 >{{ .Repo.Name }}</a 82 > 83 {{ else }} 84 created 85 <a 86 href="/{{ $userHandle }}/{{ .Repo.Name }}" 87 class="no-underline hover:underline" 88 >{{ .Repo.Name }}</a 89 > 90 {{ end }} 91 <time 92 class="text-gray-700 dark:text-gray-400 text-xs" 93 >{{ .Repo.Created | timeFmt }}</time 94 > 95 </p> 96 </div> 97 {{ else if .Follow }} 98 {{ $userHandle := index $.DidHandleMap .Follow.UserDid }} 99 {{ $subjectHandle := index $.DidHandleMap .Follow.SubjectDid }} 100 <div class="flex items-center"> 101 <p class="text-gray-600 dark:text-gray-300"> 102 <a 103 href="/{{ $userHandle }}" 104 class="no-underline hover:underline" 105 >{{ $userHandle | truncateAt30 }}</a 106 > 107 followed 108 <a 109 href="/{{ $subjectHandle }}" 110 class="no-underline hover:underline" 111 >{{ $subjectHandle | truncateAt30 }}</a 112 > 113 <time 114 class="text-gray-700 dark:text-gray-400 text-xs" 115 >{{ .Follow.FollowedAt | timeFmt }}</time 116 > 117 </p> 118 </div> 119 {{ else if .Star }} 120 {{ $starrerHandle := index $.DidHandleMap .Star.StarredByDid }} 121 {{ $repoOwnerHandle := index $.DidHandleMap .Star.Repo.Did }} 122 <div class="flex items-center"> 123 <p class="text-gray-600 dark:text-gray-300"> 124 <a 125 href="/{{ $starrerHandle }}" 126 class="no-underline hover:underline" 127 >{{ $starrerHandle | truncateAt30 }}</a 128 > 129 starred 130 <a 131 href="/{{ $repoOwnerHandle }}/{{ .Star.Repo.Name }}" 132 class="no-underline hover:underline" 133 >{{ $repoOwnerHandle | truncateAt30 }}/{{ .Star.Repo.Name }}</a 134 > 135 <time 136 class="text-gray-700 dark:text-gray-400 text-xs" 137 >{{ .Star.Created | timeFmt }}</time 138 > 139 </p> 140 </div> 141 {{ end }} 142 </div> 143 {{ end }} 144 </div> 145 </div> 146{{ end }}