forked from tangled.org/core
this repo has no description

appview: pulls: improve stack styling

bigger links

Changed files
+29 -15
appview
pages
templates
repo
pulls
fragments
+29 -15
appview/pages/templates/repo/pulls/fragments/pullStack.html
··· 5 5 {{ with $.Pull }} 6 6 {{ $isCurrent = eq $pull.PullId $.Pull.PullId }} 7 7 {{ end }} 8 - <div class="flex gap-2 items-center p-2 hover:bg-gray-100 hover:dark:bg-gray-700 {{ if $isCurrent }}bg-gray-100 dark:bg-gray-700{{ end }}"> 9 - {{ if $isCurrent }} 8 + <a href="/{{ $.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}" class="no-underline hover:no-underline hover:bg-gray-100 hover:dark:bg-gray-700"> 9 + <div class="flex gap-2 items-center px-2 {{ if $isCurrent }}bg-gray-100 dark:bg-gray-700{{ end }}"> 10 + {{ if $isCurrent }} 10 11 {{ i "arrow-right" "w-4 h-4" }} 11 - {{ end }} 12 - <div {{ if not $isCurrent }} class="ml-6" {{ end }}> 13 - {{ block "summarizedHeader" (list $pull $) }} {{ end }} 12 + {{ end }} 13 + <div class="{{ if not $isCurrent }} ml-6 {{ end }} w-full py-2"> 14 + {{ block "summarizedHeader" $pull }} {{ end }} 15 + </div> 14 16 </div> 15 - </div> 17 + </a> 16 18 {{ end }} 17 19 </div> 18 20 {{ end }} 19 21 20 22 {{ define "summarizedHeader" }} 21 - {{ $pull := index . 0 }} 22 - {{ $root := index . 1 }} 23 - <a href="/{{ $root.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}"> 24 - <div class="flex text-sm items-center gap-2"> 25 - {{ block "summarizedPullState" $pull }} {{ end }} 26 - <span class="dark:text-white"> 27 - <span class="text-gray-500 dark:text-gray-400">#{{ $pull.PullId }}</span> 28 - {{ $pull.Title }} 23 + <div class="flex text-sm items-center justify-between w-full"> 24 + <div class="flex items-center gap-2"> 25 + {{ block "summarizedPullState" . }} {{ end }} 26 + <span> 27 + <span class="text-gray-500 dark:text-gray-400">#{{ .PullId }}</span> 28 + {{ .Title }} 29 29 </span> 30 30 </div> 31 - </a> 31 + 32 + <div> 33 + {{ $latestRound := .LastRoundNumber }} 34 + {{ $lastSubmission := index .Submissions $latestRound }} 35 + {{ $commentCount := len $lastSubmission.Comments }} 36 + <span> 37 + <div class="inline-flex items-center gap-2"> 38 + {{ $commentCount }} 39 + comment{{if ne $commentCount 1}}s{{end}} 40 + </div> 41 + </span> 42 + <span class="mx-2 before:content-['·'] before:select-none"></span> 43 + <span>round <span class="font-mono">#{{ $latestRound }}</span></span> 44 + </div> 45 + </div> 32 46 {{ end }} 33 47 34 48 {{ define "summarizedPullState" }}