this repo has no description
1{{ define "title" }} 2 branches &middot; 3 {{ .RepoInfo.FullName }} 4{{ end }} 5 6{{ define "extrameta" }} 7 {{ $title := printf "branches &middot; %s" .RepoInfo.FullName }} 8 {{ $url := printf "https://tangled.sh/%s/branches" .RepoInfo.FullName }} 9 10 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} 11{{ end }} 12 13{{ define "repoContent" }} 14 <section id="branches-table" class="overflow-x-auto"> 15 <h2 class="font-bold text-sm mb-4 uppercase dark:text-white">Branches</h2> 16 17 <!-- desktop view (hidden on small screens) --> 18 <table class="w-full border-collapse hidden md:table"> 19 <thead> 20 <tr> 21 <th 22 class="py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold"> 23 Name 24 </th> 25 <th 26 class="py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold"> 27 Commit 28 </th> 29 <th 30 class="py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold"> 31 Message 32 </th> 33 <th 34 class="py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold"> 35 Date 36 </th> 37 </tr> 38 </thead> 39 <tbody> 40 {{ range $index, $branch := .Branches }} 41 <tr 42 class="{{ if ne $index (sub (len $.Branches) 1) }} 43 border-b border-gray-200 dark:border-gray-700 44 {{ end }}"> 45 <td class="py-3 whitespace-nowrap"> 46 <a 47 href="/{{ $.RepoInfo.FullName }}/tree/{{ .Name | urlquery }}" 48 class="no-underline hover:underline flex items-center gap-2"> 49 <span class="dark:text-white"> 50 {{ .Name }} 51 </span> 52 {{ if .IsDefault }} 53 <span 54 class=" 55 text-sm rounded 56 bg-gray-100 dark:bg-gray-700 text-black dark:text-white 57 font-mono 58 px-2 mx-1/2 59 inline-flex items-center 60 "> 61 default 62 </span> 63 {{ end }} 64 </a> 65 </td> 66 <td class="py-3 whitespace-nowrap"> 67 {{ if .Commit }} 68 <a 69 href="/{{ $.RepoInfo.FullName }}/commits/{{ .Name | urlquery }}" 70 class="font-mono text-gray-700 dark:text-gray-300 no-underline hover:underline"> 71 {{ slice .Commit.Hash.String 0 8 }} 72 </a> 73 {{ end }} 74 </td> 75 <td class="py-3 whitespace-nowrap"> 76 {{ if .Commit }} 77 {{ $messageParts := splitN .Commit.Message "\n\n" 2 }} 78 <span class="text-gray-700 dark:text-gray-300"> 79 {{ index $messageParts 0 }} 80 </span> 81 {{ end }} 82 </td> 83 <td class="py-3 whitespace-nowrap text-gray-500 dark:text-gray-400"> 84 {{ if .Commit }} 85 {{ template "repo/fragments/time" .Commit.Committer.When }} 86 {{ end }} 87 </td> 88 </tr> 89 {{ end }} 90 </tbody> 91 </table> 92 93 <!-- mobile view (visible only on small screens) --> 94 <div class="md:hidden"> 95 {{ range $index, $branch := .Branches }} 96 <div 97 class="relative p-2 {{ if ne $index (sub (len $.Branches) 1) }} 98 border-b border-gray-200 dark:border-gray-700 99 {{ end }}"> 100 <div class="flex items-center justify-between"> 101 <a 102 href="/{{ $.RepoInfo.FullName }}/tree/{{ .Name | urlquery }}" 103 class="no-underline hover:underline flex items-center gap-2"> 104 <span class="dark:text-white font-medium"> 105 {{ .Name }} 106 </span> 107 {{ if .IsDefault }} 108 <span 109 class=" 110 text-xs rounded 111 bg-gray-100 dark:bg-gray-700 text-black dark:text-white 112 font-mono 113 px-2 114 inline-flex items-center 115 "> 116 default 117 </span> 118 {{ end }} 119 </a> 120 </div> 121 122 {{ if .Commit }} 123 <div 124 class="text-xs text-gray-500 dark:text-gray-400 mt-1 flex items-center"> 125 <span class="font-mono"> 126 <a 127 href="/{{ $.RepoInfo.FullName }}/commits/{{ .Name | urlquery }}" 128 class="text-gray-500 dark:text-gray-400 no-underline hover:underline"> 129 {{ slice .Commit.Hash.String 0 8 }} 130 </a> 131 </span> 132 <div 133 class="inline-block px-1 select-none after:content-['·']"></div> 134 {{ template "repo/fragments/time" .Commit.Committer.When }} 135 </div> 136 {{ end }} 137 </div> 138 {{ end }} 139 </div> 140 </section> 141{{ end }}