forked from tangled.org/core
Monorepo for Tangled

appview: repo/log: minor UI tweaks

Changed files
+17 -21
appview
pages
templates
repo
+17 -21
appview/pages/templates/repo/log.html
··· 1 {{ define "title" }}commits &middot; {{ .RepoInfo.FullName }}{{ end }} 2 {{ define "repoContent" }} 3 <section id="commit-table" class="overflow-x-auto"> 4 <!-- desktop view (hidden on small screens) --> 5 <table class="w-full border-collapse hidden md:table"> 6 - <thead class="bg-gray-100 dark:bg-gray-700"> 7 <tr> 8 <th class="px-4 py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold">Author</th> 9 <th class="px-4 py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold">Commit</th> ··· 37 </div> 38 </td> 39 <td class="px-4 py-3 align-top"> 40 - {{ if eq $index 0 }} 41 - <a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" class="dark:text-white no-underline hover:underline"> 42 - <p>{{ index $messageParts 0 }}</p> 43 - {{ if gt (len $messageParts) 1 }}<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (unwrapText (index $messageParts 1)) }}</p>{{ end }} 44 - </a> 45 - {{ else }} 46 - <div> 47 - <a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" class="dark:text-white no-underline hover:underline">{{ index $messageParts 0 }}</a> 48 - {{ if gt (len $messageParts) 1 }} 49 - <button class="ml-2 py-1/2 px-1 bg-gray-200 hover:bg-gray-400 dark:bg-gray-700 dark:hover:bg-gray-600 rounded" hx-on:click="this.nextElementSibling.classList.toggle('hidden')">{{ i "ellipsis" "w-3 h-3" }}</button> 50 - <p class="hidden mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (index $messageParts 1) }}</p> 51 - {{ end }} 52 - </div> 53 - {{ end }} 54 </td> 55 <td class="px-4 py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Author.When }}</td> 56 </tr> ··· 92 {{ i "folder-code" "w-4 h-4" }} 93 </a> 94 </div> 95 - 96 </div> 97 </div> 98 </div> ··· 120 </div> 121 </section> 122 123 - {{ $commits_len := len .Commits }} 124 - <div class="flex justify-end mt-4 gap-2"> 125 - {{ if gt .Page 1 }}<a class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700" hx-boost="true" onclick="window.location.href = window.location.pathname + '?page={{ sub .Page 1 }}'">{{ i "chevron-left" "w-4 h-4" }} previous</a>{{ else }}<div></div>{{ end }} 126 - {{ if eq $commits_len 60 }}<a class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700" hx-boost="true" onclick="window.location.href = window.location.pathname + '?page={{ add .Page 1 }}'">next {{ i "chevron-right" "w-4 h-4" }}</a>{{ end }} 127 - </div> 128 {{ end }}
··· 1 {{ define "title" }}commits &middot; {{ .RepoInfo.FullName }}{{ end }} 2 + 3 {{ define "repoContent" }} 4 <section id="commit-table" class="overflow-x-auto"> 5 <!-- desktop view (hidden on small screens) --> 6 <table class="w-full border-collapse hidden md:table"> 7 + <thead> 8 <tr> 9 <th class="px-4 py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold">Author</th> 10 <th class="px-4 py-2 text-sm text-left text-gray-700 dark:text-gray-300 uppercase font-bold">Commit</th> ··· 38 </div> 39 </td> 40 <td class="px-4 py-3 align-top"> 41 + <div> 42 + <a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" class="dark:text-white no-underline hover:underline">{{ index $messageParts 0 }}</a> 43 + {{ if gt (len $messageParts) 1 }} 44 + <button class="ml-2 py-1/2 px-1 bg-gray-200 hover:bg-gray-400 dark:bg-gray-700 dark:hover:bg-gray-600 rounded" hx-on:click="this.nextElementSibling.classList.toggle('hidden')">{{ i "ellipsis" "w-3 h-3" }}</button> 45 + <p class="hidden mt-1 text-sm text-gray-600 dark:text-gray-400">{{ nl2br (index $messageParts 1) }}</p> 46 + {{ end }} 47 + </div> 48 </td> 49 <td class="px-4 py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Author.When }}</td> 50 </tr> ··· 86 {{ i "folder-code" "w-4 h-4" }} 87 </a> 88 </div> 89 </div> 90 </div> 91 </div> ··· 113 </div> 114 </section> 115 116 + {{ end }} 117 + 118 + {{ define "repoAfter" }} 119 + {{ $commits_len := len .Commits }} 120 + <div class="flex justify-end mt-4 gap-2"> 121 + {{ if gt .Page 1 }}<a class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700" hx-boost="true" onclick="window.location.href = window.location.pathname + '?page={{ sub .Page 1 }}'">{{ i "chevron-left" "w-4 h-4" }} previous</a>{{ else }}<div></div>{{ end }} 122 + {{ if eq $commits_len 60 }}<a class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700" hx-boost="true" onclick="window.location.href = window.location.pathname + '?page={{ add .Page 1 }}'">next {{ i "chevron-right" "w-4 h-4" }}</a>{{ end }} 123 + </div> 124 {{ end }}