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