forked from tangled.org/core
Monorepo for Tangled

appview/pages: fix some styles for repoindex

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 55f1fc1f bba4923d

verified
Changed files
+17 -16
appview
pages
templates
+12 -11
appview/pages/templates/repo/index.html
··· 144 {{ end }} 145 <a href="{{ $link }}" class="{{ $linkstyle }}"> 146 <div class="flex items-center gap-2"> 147 - {{ i $icon $iconStyle }}{{ .Name }} 148 </div> 149 </a> 150 </div> ··· 210 </div> 211 212 <!-- commit info bar --> 213 - <div class="text-xs mt-2 text-gray-500 dark:text-gray-400 flex items-center"> 214 {{ $verified := $.VerifiedCommits.IsVerified .Hash.String }} 215 {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} 216 {{ if $verified }} ··· 280 </a> 281 <div class="flex flex-col gap-1"> 282 {{ range .BranchesTrunc }} 283 - <div class="text-base flex items-center justify-between"> 284 - <div class="flex items-center gap-2"> 285 <a href="/{{ $.RepoInfo.FullName }}/tree/{{ .Reference.Name | urlquery }}" 286 - class="inline no-underline hover:underline dark:text-white"> 287 {{ .Reference.Name }} 288 </a> 289 {{ if .Commit }} 290 - <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> 291 - <span class="text-xs text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" .Commit.Committer.When }}</span> 292 {{ end }} 293 {{ if .IsDefault }} 294 - <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·']"></span> 295 - <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-xs font-mono">default</span> 296 {{ end }} 297 </div> 298 {{ if ne $.Ref .Reference.Name }} 299 <a href="/{{ $.RepoInfo.FullName }}/compare/{{ $.Ref | urlquery }}...{{ .Reference.Name | urlquery }}" 300 - class="text-xs flex gap-2 items-center" 301 title="Compare branches or tags"> 302 {{ i "git-compare" "w-3 h-3" }} compare 303 </a> 304 - {{end}} 305 </div> 306 {{ end }} 307 </div>
··· 144 {{ end }} 145 <a href="{{ $link }}" class="{{ $linkstyle }}"> 146 <div class="flex items-center gap-2"> 147 + {{ i $icon $iconStyle "flex-shrink-0" }} 148 + <span class="truncate">{{ .Name }}</span> 149 </div> 150 </a> 151 </div> ··· 211 </div> 212 213 <!-- commit info bar --> 214 + <div class="text-xs mt-2 text-gray-500 dark:text-gray-400 flex items-center flex-wrap"> 215 {{ $verified := $.VerifiedCommits.IsVerified .Hash.String }} 216 {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} 217 {{ if $verified }} ··· 281 </a> 282 <div class="flex flex-col gap-1"> 283 {{ range .BranchesTrunc }} 284 + <div class="text-base flex items-center justify-between overflow-hidden"> 285 + <div class="flex items-center gap-2 min-w-0 flex-1"> 286 <a href="/{{ $.RepoInfo.FullName }}/tree/{{ .Reference.Name | urlquery }}" 287 + class="inline-block truncate no-underline hover:underline dark:text-white"> 288 {{ .Reference.Name }} 289 </a> 290 {{ if .Commit }} 291 + <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·'] shrink-0"></span> 292 + <span class="whitespace-nowrap text-xs text-gray-500 dark:text-gray-400 shrink-0">{{ template "repo/fragments/time" .Commit.Committer.When }}</span> 293 {{ end }} 294 {{ if .IsDefault }} 295 + <span class="px-1 text-gray-500 dark:text-gray-400 select-none after:content-['·'] shrink-0"></span> 296 + <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-xs font-mono shrink-0">default</span> 297 {{ end }} 298 </div> 299 {{ if ne $.Ref .Reference.Name }} 300 <a href="/{{ $.RepoInfo.FullName }}/compare/{{ $.Ref | urlquery }}...{{ .Reference.Name | urlquery }}" 301 + class="text-xs flex gap-2 items-center shrink-0 ml-2" 302 title="Compare branches or tags"> 303 {{ i "git-compare" "w-3 h-3" }} compare 304 </a> 305 + {{ end }} 306 </div> 307 {{ end }} 308 </div>
+4 -4
appview/pages/templates/repo/tree.html
··· 54 55 {{ range .Files }} 56 <div class="grid grid-cols-12 gap-4 items-center py-1"> 57 - <div class="col-span-6 md:col-span-3"> 58 {{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) $.TreePath .Name }} 59 {{ $icon := "folder" }} 60 {{ $iconStyle := "size-4 fill-current" }} 61 62 {{ if .IsFile }} 63 {{ $icon = "file" }} 64 - {{ $iconStyle = "flex-shrink-0 size-4" }} 65 {{ end }} 66 <a href="{{ $link }}" class="{{ $linkstyle }}"> 67 <div class="flex items-center gap-2"> 68 - {{ i $icon $iconStyle }} 69 <span class="truncate">{{ .Name }}</span> 70 </div> 71 </a> 72 </div> 73 74 - <div class="col-span-0 md:col-span-7 hidden md:block overflow-hidden"> 75 {{ with .LastCommit }} 76 <a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash }}" class="text-gray-500 dark:text-gray-400 block truncate">{{ .Message }}</a> 77 {{ end }}
··· 54 55 {{ range .Files }} 56 <div class="grid grid-cols-12 gap-4 items-center py-1"> 57 + <div class="col-span-6 md:col-span-4"> 58 {{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) $.TreePath .Name }} 59 {{ $icon := "folder" }} 60 {{ $iconStyle := "size-4 fill-current" }} 61 62 {{ if .IsFile }} 63 {{ $icon = "file" }} 64 + {{ $iconStyle = "size-4" }} 65 {{ end }} 66 <a href="{{ $link }}" class="{{ $linkstyle }}"> 67 <div class="flex items-center gap-2"> 68 + {{ i $icon $iconStyle "flex-shrink-0" }} 69 <span class="truncate">{{ .Name }}</span> 70 </div> 71 </a> 72 </div> 73 74 + <div class="col-span-0 md:col-span-6 hidden md:block overflow-hidden"> 75 {{ with .LastCommit }} 76 <a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash }}" class="text-gray-500 dark:text-gray-400 block truncate">{{ .Message }}</a> 77 {{ end }}
+1 -1
input.css
··· 72 } 73 74 code { 75 - @apply px-1 font-mono rounded bg-gray-100 dark:bg-gray-700; 76 } 77 } 78
··· 72 } 73 74 code { 75 + @apply font-mono rounded bg-gray-100 dark:bg-gray-700; 76 } 77 } 78