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