this repo has no description
1{{ define "title" }}{{ or .UserHandle .UserDid }}{{ end }} 2 3{{ define "content" }} 4<div class="grid grid-cols-1 md:grid-cols-5 gap-6"> 5 <div class="md:col-span-1 order-1 md:order-1"> 6 {{ block "profileCard" . }}{{ end }} 7 </div> 8 <div class="md:col-span-2 order-2 md:order-2"> 9 {{ block "ownRepos" . }}{{ end }} 10 {{ block "collaboratingRepos" . }}{{ end }} 11 </div> 12 13 <div class="md:col-span-2 order-3 md:order-3"> 14 {{ block "profileTimeline" . }}{{ end }} 15 </div> 16</div> 17{{ end }} 18 19 20 21{{ define "profileTimeline" }} 22 <div class="flex flex-col gap-3 relative"> 23 <p class="px-6 text-sm font-bold py-2 dark:text-white">ACTIVITY</p> 24 {{ range .ProfileTimeline }} 25 {{ if eq .Type "issue" }} 26 <div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit max-w-full flex items-center gap-2"> 27 {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} 28 {{ $icon := "ban" }} 29 {{ if .Issue.Open }} 30 {{ $bgColor = "bg-green-600 dark:bg-green-700" }} 31 {{ $icon = "circle-dot" }} 32 {{ end }} 33 <div class="{{ $bgColor }} text-white rounded-full p-1"> 34 {{ i $icon "w-4 h-4 text-white" }} 35 </div> 36 <div> 37 <p class="text-gray-600 dark:text-gray-300"> 38 <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}/issues/{{ .Issue.IssueId }}" class="no-underline hover:underline">{{ .Issue.Title }} <span class="text-gray-500 dark:text-gray-400">#{{ .Issue.IssueId }}</span></a> 39 on 40 <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}" class="no-underline hover:underline">{{ index $.DidHandleMap .Repo.Did }}<span class="select-none">/</span>{{ .Repo.Name }}</a> 41 <time class="text-gray-700 dark:text-gray-400 text-xs ml-2">{{ .Repo.Created | shortTimeFmt }}</time> 42 </p> 43 </div> 44 </div> 45 {{ else if eq .Type "pull" }} 46 <div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit flex items-center gap-3"> 47 <div class="bg-purple-600 dark:bg-purple-700 text-white rounded-full p-1"> 48 {{ i "git-pull-request" "w-4 h-4" }} 49 </div> 50 <div> 51 <p class="text-gray-600 dark:text-gray-300"> 52 <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}/pulls/{{ .Pull.PullId }}" class="no-underline hover:underline">{{ .Pull.Title }} <span class="text-gray-500 dark:text-gray-400">#{{ .Pull.PullId }}</span></a> 53 on 54 <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}" class="no-underline hover:underline"> 55 {{ index $.DidHandleMap .Repo.Did }}<span class="select-none">/</span>{{ .Repo.Name }}</a> 56 <time class="text-gray-700 dark:text-gray-400 text-xs ml-2">{{ .Repo.Created | shortTimeFmt }}</time> 57 </p> 58 </div> 59 </div> 60 {{ else if eq .Type "repo" }} 61 <div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit flex items-center gap-3"> 62 <div class="bg-gray-200 dark:bg-gray-300 text-black rounded-full p-1"> 63 {{ i "book-plus" "w-4 h-4" }} 64 </div> 65 <div> 66 <p class="text-gray-600 dark:text-gray-300"> 67 created <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}" class="no-underline hover:underline">{{ .Repo.Name }}</a> 68 <time class="text-gray-700 dark:text-gray-400 text-xs ml-2">{{ .Repo.Created | shortTimeFmt }}</time> 69 </p> 70 </div> 71 </div> 72 {{ end }} 73 {{ end }} 74 </div> 75{{ end }} 76 77{{ define "profileCard" }} 78 <div class="bg-white dark:bg-gray-800 px-6 py-4 rounded drop-shadow-sm max-h-fit"> 79 <div class="flex justify-center items-center"> 80 {{ if .AvatarUri }} 81 <img class="w-3/4 rounded-full p-2" src="{{ .AvatarUri }}" /> 82 {{ end }} 83 </div> 84 <p class="text-xl font-bold text-center dark:text-white"> 85 {{ truncateAt30 (didOrHandle .UserDid .UserHandle) }} 86 </p> 87 <div class="text-sm text-center dark:text-gray-300"> 88 <span>{{ .ProfileStats.Followers }} followers</span> 89 <div 90 class="inline-block px-1 select-none after:content-['·']" 91 ></div> 92 <span>{{ .ProfileStats.Following }} following</span> 93 </div> 94 95 {{ if ne .FollowStatus.String "IsSelf" }} 96 {{ template "fragments/follow" . }} 97 {{ end }} 98 </div> 99{{ end }} 100 101{{ define "ownRepos" }} 102 <p class="text-sm font-bold py-2 px-6 dark:text-white">REPOS</p> 103 <div id="repos" class="grid grid-cols-1 gap-4 mb-6"> 104 {{ range .Repos }} 105 <div 106 id="repo-card" 107 class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800" 108 > 109 <div id="repo-card-name" class="font-medium dark:text-white"> 110 <a href="/@{{ or $.UserHandle $.UserDid }}/{{ .Name }}" 111 >{{ .Name }}</a 112 > 113 </div> 114 {{ if .Description }} 115 <div class="text-gray-600 dark:text-gray-300 text-sm"> 116 {{ .Description }} 117 </div> 118 {{ end }} 119 <div 120 class="text-gray-400 pt-1 text-sm font-mono inline-flex gap-4 mt-auto" 121 > 122 123 {{ if .RepoStats.StarCount }} 124 <div class="flex gap-1 items-center text-sm"> 125 {{ i "star" "w-3 h-3 fill-current" }} 126 <span>{{ .RepoStats.StarCount }}</span> 127 </div> 128 {{ end }} 129 </div> 130 </div> 131 {{ else }} 132 <p class="px-6 dark:text-white">This user does not have any repos yet.</p> 133 {{ end }} 134 </div> 135 136 <p class="text-sm font-bold py-2 px-6 dark:text-white">COLLABORATING ON</p> 137 <div id="collaborating" class="grid grid-cols-1 gap-4 mb-6"> 138 {{ range .CollaboratingRepos }} 139 <div 140 id="repo-card" 141 class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800 flex flex-col" 142 > 143 <div id="repo-card-name" class="font-medium dark:text-white"> 144 <a href="/{{ index $.DidHandleMap .Did }}/{{ .Name }}"> 145 {{ index $.DidHandleMap .Did }}/{{ .Name }} 146 </a> 147 </div> 148 {{ if .Description }} 149 <div class="text-gray-600 dark:text-gray-300 text-sm"> 150 {{ .Description }} 151 </div> 152 {{ end }} 153 <div class="text-gray-400 pt-1 text-sm font-mono inline-flex gap-4 mt-auto"> 154 155 {{ if .RepoStats.StarCount }} 156 <div class="flex gap-1 items-center text-sm"> 157 {{ i "star" "w-3 h-3 fill-current" }} 158 <span>{{ .RepoStats.StarCount }}</span> 159 </div> 160 {{ end }} 161 </div> 162 </div> 163 {{ else }} 164 <p class="px-6 dark:text-white">This user is not collaborating.</p> 165 {{ end }} 166 </div> 167{{ end }}