this repo has no description
1{{ define "title" }}{{ .RepoInfo.FullName }} at {{ .Ref }}{{ end }} 2 3 4{{ define "extrameta" }} 5 {{ template "repo/fragments/meta" . }} 6 7 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }} 8{{ end }} 9 10{{ define "repoContent" }} 11 <main> 12 {{ if .Languages }} 13 {{ block "repoLanguages" . }}{{ end }} 14 {{ end }} 15 <div class="flex items-center justify-between pb-5"> 16 {{ block "branchSelector" . }}{{ end }} 17 <div class="flex md:hidden items-center gap-2"> 18 <a href="/{{ .RepoInfo.FullName }}/commits/{{ .Ref | urlquery }}" class="inline-flex items-center text-sm gap-1 font-bold"> 19 {{ i "git-commit-horizontal" "w-4" "h-4" }} {{ .TotalCommits }} 20 </a> 21 <a href="/{{ .RepoInfo.FullName }}/branches" class="inline-flex items-center text-sm gap-1 font-bold"> 22 {{ i "git-branch" "w-4" "h-4" }} {{ len .Branches }} 23 </a> 24 <a href="/{{ .RepoInfo.FullName }}/tags" class="inline-flex items-center text-sm gap-1 font-bold"> 25 {{ i "tags" "w-4" "h-4" }} {{ len .Tags }} 26 </a> 27 {{ template "repo/fragments/cloneDropdown" . }} 28 </div> 29 </div> 30 <div class="grid grid-cols-1 md:grid-cols-2 gap-2"> 31 {{ block "fileTree" . }}{{ end }} 32 {{ block "rightInfo" . }}{{ end }} 33 </div> 34 </main> 35{{ end }} 36 37{{ define "repoLanguages" }} 38 <div class="flex gap-[1px] -m-6 mb-6 overflow-hidden rounded-t"> 39 {{ range $value := .Languages }} 40 <div 41 title='{{ or $value.Name "Other" }} {{ printf "%.1f" $value.Percentage }}%' 42 class="h-[4px] rounded-full" 43 style="background-color: {{ $value.Color }}; width: {{ $value.Percentage }}%" 44 ></div> 45 {{ end }} 46 </div> 47{{ end }} 48 49 50{{ define "branchSelector" }} 51 <div class="flex gap-2 items-center justify-between w-full"> 52 <div class="flex gap-2 items-center"> 53 <select 54 onchange="window.location.href = '/{{ .RepoInfo.FullName }}/tree/' + encodeURIComponent(this.value)" 55 class="p-1 border max-w-32 border-gray-200 bg-white dark:bg-gray-800 dark:text-white dark:border-gray-700" 56 > 57 <optgroup label="branches ({{len .Branches}})" class="bold text-sm"> 58 {{ range .Branches }} 59 <option 60 value="{{ .Reference.Name }}" 61 class="py-1" 62 {{ if eq .Reference.Name $.Ref }} 63 selected 64 {{ end }} 65 > 66 {{ .Reference.Name }} 67 </option> 68 {{ end }} 69 </optgroup> 70 <optgroup label="tags ({{len .Tags}})" class="bold text-sm"> 71 {{ range .Tags }} 72 <option 73 value="{{ .Reference.Name }}" 74 class="py-1" 75 {{ if eq .Reference.Name $.Ref }} 76 selected 77 {{ end }} 78 > 79 {{ .Reference.Name }} 80 </option> 81 {{ else }} 82 <option class="py-1" disabled>no tags found</option> 83 {{ end }} 84 </optgroup> 85 </select> 86 <div class="flex items-center gap-2"> 87 <a 88 href="/{{ .RepoInfo.FullName }}/compare?base={{ $.Ref | urlquery }}" 89 class="btn flex items-center gap-2 no-underline hover:no-underline" 90 title="Compare branches or tags" 91 > 92 {{ i "git-compare" "w-4 h-4" }} 93 </a> 94 </div> 95 </div> 96 97 <!-- Clone dropdown in top right --> 98 <div class="hidden md:flex items-center "> 99 {{ template "repo/fragments/cloneDropdown" . }} 100 </div> 101 </div> 102{{ end }} 103 104{{ define "fileTree" }} 105 <div id="file-tree" class="col-span-1 pr-2 md:border-r md:border-gray-200 dark:md:border-gray-700" > 106 {{ $linkstyle := "no-underline hover:underline dark:text-white" }} 107 108 {{ range .Files }} 109 <div class="grid grid-cols-3 gap-4 items-center py-1"> 110 <div class="col-span-2"> 111 {{ $link := printf "/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) .Name }} 112 {{ $icon := "folder" }} 113 {{ $iconStyle := "size-4 fill-current" }} 114 115 {{ if .IsFile }} 116 {{ $link = printf "/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) .Name }} 117 {{ $icon = "file" }} 118 {{ $iconStyle = "size-4" }} 119 {{ end }} 120 <a href="{{ $link }}" class="{{ $linkstyle }}"> 121 <div class="flex items-center gap-2"> 122 {{ i $icon $iconStyle "flex-shrink-0" }} 123 <span class="truncate">{{ .Name }}</span> 124 </div> 125 </a> 126 </div> 127 128 <div class="text-sm col-span-1 text-right"> 129 {{ with .LastCommit }} 130 <a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash }}" class="text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .When }}</a> 131 {{ end }} 132 </div> 133 </div> 134 {{ end }} 135 </div> 136{{ end }} 137 138{{ define "rightInfo" }} 139 <div id="right-info" class="hidden md:block col-span-1"> 140 {{ block "commitLog" . }} {{ end }} 141 {{ block "branchList" . }} {{ end }} 142 {{ block "tagList" . }} {{ end }} 143 </div> 144{{ end }} 145 146{{ define "commitLog" }} 147<div id="commit-log" class="md:col-span-1 px-2 pb-4"> 148 <div class="flex justify-between items-center"> 149 <a href="/{{ .RepoInfo.FullName }}/commits/{{ .Ref | urlquery }}" class="flex items-center gap-2 pb-2 cursor-pointer font-bold hover:text-gray-600 dark:hover:text-gray-300 hover:no-underline"> 150 {{ i "logs" "w-4 h-4" }} commits 151 <span class="bg-gray-100 dark:bg-gray-700 font-normal rounded py-1/2 px-1 text-sm">{{ .TotalCommits }}</span> 152 </a> 153 </div> 154 <div class="flex flex-col gap-6"> 155 {{ range .CommitsTrunc }} 156 <div> 157 <div id="commit-message"> 158 {{ $messageParts := splitN .Message "\n\n" 2 }} 159 <div class="text-base cursor-pointer"> 160 <div> 161 <div> 162 <a 163 href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}" 164 class="inline no-underline hover:underline dark:text-white" 165 >{{ index $messageParts 0 }}</a 166 > 167 {{ if gt (len $messageParts) 1 }} 168 169 <button 170 class="py-1/2 px-1 bg-gray-200 hover:bg-gray-400 rounded dark:bg-gray-700 dark:hover:bg-gray-600" 171 hx-on:click="this.parentElement.nextElementSibling.classList.toggle('hidden')" 172 > 173 {{ i "ellipsis" "w-3 h-3" }} 174 </button> 175 {{ end }} 176 </div> 177 {{ if gt (len $messageParts) 1 }} 178 <p 179 class="hidden mt-1 text-sm cursor-text pb-2 dark:text-gray-300" 180 > 181 {{ nl2br (index $messageParts 1) }} 182 </p> 183 {{ end }} 184 </div> 185 </div> 186 </div> 187 188 <!-- commit info bar --> 189 <div class="text-xs mt-2 text-gray-500 dark:text-gray-400 flex items-center flex-wrap"> 190 {{ $verified := $.VerifiedCommits.IsVerified .Hash.String }} 191 {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} 192 {{ if $verified }} 193 {{ $hashStyle = "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 px-2 rounded" }} 194 {{ end }} 195 <span class="font-mono"> 196 <a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}" 197 class="no-underline hover:underline {{ $hashStyle }} px-2 py-1 rounded flex items-center gap-2"> 198 {{ slice .Hash.String 0 8 }} 199 {{ if $verified }} 200 {{ i "shield-check" "w-3 h-3" }} 201 {{ end }} 202 </a> 203 </span> 204 <span 205 class="mx-1 before:content-['·'] before:select-none" 206 ></span> 207 <span> 208 {{ $didOrHandle := index $.EmailToDidOrHandle .Author.Email }} 209 <a 210 href="{{ if $didOrHandle }} 211 /{{ $didOrHandle }} 212 {{ else }} 213 mailto:{{ .Author.Email }} 214 {{ end }}" 215 class="text-gray-500 dark:text-gray-400 no-underline hover:underline" 216 >{{ if $didOrHandle }} 217 {{ template "user/fragments/picHandleLink" $didOrHandle }} 218 {{ else }} 219 {{ .Author.Name }} 220 {{ end }}</a 221 > 222 </span> 223 <div class="inline-block px-1 select-none after:content-['·']"></div> 224 {{ template "repo/fragments/time" .Committer.When }} 225 226 <!-- tags/branches --> 227 {{ $tagsForCommit := index $.TagMap .Hash.String }} 228 {{ if gt (len $tagsForCommit) 0 }} 229 <div class="inline-block px-1 select-none after:content-['·']"></div> 230 {{ end }} 231 {{ range $tagsForCommit }} 232 <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-[2px] inline-flex items-center"> 233 {{ . }} 234 </span> 235 {{ end }} 236 237 <!-- ci status --> 238 {{ $pipeline := index $.Pipelines .Hash.String }} 239 {{ if and $pipeline (gt (len $pipeline.Statuses) 0) }} 240 <div class="inline-block px-1 select-none after:content-['·']"></div> 241 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "RepoInfo" $.RepoInfo "Pipeline" $pipeline) }} 242 {{ end }} 243 </div> 244 </div> 245 {{ end }} 246 </div> 247</div> 248{{ end }} 249 250{{ define "branchList" }} 251 {{ if gt (len .BranchesTrunc) 0 }} 252 <div id="branches" class="md:col-span-1 px-2 py-4 border-t border-gray-200 dark:border-gray-700"> 253 <a href="/{{ .RepoInfo.FullName }}/branches" class="flex items-center gap-2 pb-2 cursor-pointer font-bold hover:text-gray-600 dark:hover:text-gray-300 hover:no-underline"> 254 {{ i "git-branch" "w-4 h-4" }} branches 255 <span class="bg-gray-100 dark:bg-gray-700 font-normal rounded py-1/2 px-1 text-sm">{{ len .Branches }}</span> 256 </a> 257 <div class="flex flex-col gap-1"> 258 {{ range .BranchesTrunc }} 259 <div class="text-base flex items-center justify-between overflow-hidden"> 260 <div class="flex items-center gap-2 min-w-0 flex-1"> 261 <a href="/{{ $.RepoInfo.FullName }}/tree/{{ .Reference.Name | urlquery }}" 262 class="inline-block truncate no-underline hover:underline dark:text-white"> 263 {{ .Reference.Name }} 264 </a> 265 {{ if .Commit }} 266 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·'] shrink-0"></span> 267 <span class="whitespace-nowrap text-xs text-gray-500 dark:text-gray-400 shrink-0">{{ template "repo/fragments/time" .Commit.Committer.When }}</span> 268 {{ end }} 269 {{ if .IsDefault }} 270 <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·'] shrink-0"></span> 271 <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-xs font-mono shrink-0">default</span> 272 {{ end }} 273 </div> 274 {{ if ne $.Ref .Reference.Name }} 275 <a href="/{{ $.RepoInfo.FullName }}/compare/{{ $.Ref | urlquery }}...{{ .Reference.Name | urlquery }}" 276 class="text-xs flex gap-2 items-center shrink-0 ml-2" 277 title="Compare branches or tags"> 278 {{ i "git-compare" "w-3 h-3" }} compare 279 </a> 280 {{ end }} 281 </div> 282 {{ end }} 283 </div> 284 </div> 285 {{ end }} 286{{ end }} 287 288{{ define "tagList" }} 289 {{ if gt (len .TagsTrunc) 0 }} 290 <div id="tags" class="md:col-span-1 px-2 py-4 border-t border-gray-200 dark:border-gray-700"> 291 <div class="flex justify-between items-center"> 292 <a href="/{{ .RepoInfo.FullName }}/tags" class="flex items-center gap-2 pb-2 cursor-pointer font-bold hover:text-gray-600 dark:hover:text-gray-300 hover:no-underline"> 293 {{ i "tags" "w-4 h-4" }} tags 294 <span class="bg-gray-100 dark:bg-gray-700 font-normal rounded py-1/2 px-1 text-sm">{{ len .Tags }}</span> 295 </a> 296 </div> 297 <div class="flex flex-col gap-1"> 298 {{ range $idx, $tag := .TagsTrunc }} 299 {{ with $tag }} 300 <div> 301 <div class="text-base flex items-center gap-2"> 302 <a href="/{{ $.RepoInfo.FullName }}/tree/{{ .Reference.Name | urlquery }}" 303 class="inline no-underline hover:underline dark:text-white"> 304 {{ .Reference.Name }} 305 </a> 306 </div> 307 <div> 308 {{ with .Tag }} 309 <span class="text-xs text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .Tagger.When }}</span> 310 {{ end }} 311 {{ if eq $idx 0 }} 312 {{ with .Tag }}<span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span>{{ end }} 313 <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-xs font-mono">latest</span> 314 {{ end }} 315 </div> 316 </div> 317 {{ end }} 318 {{ end }} 319 </div> 320 </div> 321 {{ end }} 322{{ end }} 323 324{{ define "repoAfter" }} 325 {{- if or .HTMLReadme .Readme -}} 326 <div class="mt-4 rounded bg-white dark:bg-gray-800 drop-shadow-sm w-full mx-auto overflow-hidden"> 327 {{- if .ReadmeFileName -}} 328 <div class="px-4 py-2 bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600 flex items-center gap-2"> 329 {{ i "file-text" "w-4 h-4" "text-gray-600 dark:text-gray-400" }} 330 <span class="font-mono text-sm text-gray-800 dark:text-gray-200">{{ .ReadmeFileName }}</span> 331 </div> 332 {{- end -}} 333 <section 334 class="p-6 overflow-auto {{ if not .Raw }} 335 prose dark:prose-invert dark:[&_pre]:bg-gray-900 336 dark:[&_code]:text-gray-300 dark:[&_pre_code]:bg-gray-900 337 dark:[&_pre]:border dark:[&_pre]:border-gray-700 338 {{ end }}" 339 > 340 <article class="{{ if .Raw }}whitespace-pre{{ end }}">{{- if .Raw -}}<pre class="dark:bg-gray-800 dark:text-white overflow-x-auto"> 341 {{- .Readme -}} 342 </pre> 343 {{- else -}} 344 {{ .HTMLReadme }} 345 {{- end -}}</article> 346 </section> 347 </div> 348 {{- end -}} 349{{ end }}