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

appview/pages: fix clone-instructions in mobile

and fix empty-repo rendering.

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

oppi.li 3ee002a1 801c1427

verified
Changed files
+10 -13
appview
pages
templates
-4
appview/pages/templates/repo/empty.html
··· 44 44 {{ end }} 45 45 </main> 46 46 {{ end }} 47 - 48 - {{ define "repoAfter" }} 49 - {{ template "repo/fragments/cloneInstructions" . }} 50 - {{ end }}
+3 -3
appview/pages/templates/repo/fragments/cloneDropdown.html
··· 7 7 <details id="clone-dropdown" class="relative inline-block text-left group"> 8 8 <summary class="btn-create cursor-pointer list-none flex items-center gap-2"> 9 9 {{ i "download" "w-4 h-4" }} 10 - <span>code</span> 10 + <span class="hidden md:inline">code</span> 11 11 <span class="group-open:hidden"> 12 12 {{ i "chevron-down" "w-4 h-4" }} 13 13 </span> ··· 16 16 </span> 17 17 </summary> 18 18 19 - <div class="absolute right-0 mt-2 w-96 bg-white dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 drop-shadow dark:text-white z-[9999]"> 19 + <div class="absolute right-0 mt-2 w-96 bg-white dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 drop-shadow-sm dark:text-white z-[9999]"> 20 20 <div class="p-4"> 21 21 <div class="mb-3"> 22 22 <h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-2">Clone this repository</h3> ··· 84 84 function copyToClipboard(button, text) { 85 85 navigator.clipboard.writeText(text).then(() => { 86 86 const originalContent = button.innerHTML; 87 - button.innerHTML = `{{ i "copy-check" "w-4 h-4" }}`; 87 + button.innerHTML = `{{ i "check" "w-4 h-4" }}`; 88 88 setTimeout(() => { 89 89 button.innerHTML = originalContent; 90 90 }, 2000);
+7 -6
appview/pages/templates/repo/index.html
··· 14 14 {{ end }} 15 15 <div class="flex items-center justify-between pb-5"> 16 16 {{ block "branchSelector" . }}{{ end }} 17 - <div class="flex md:hidden items-center gap-4"> 18 - <a href="/{{ .RepoInfo.FullName }}/commits/{{ .Ref | urlquery }}" class="inline-flex items-center text-sm gap-1"> 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 19 {{ i "git-commit-horizontal" "w-4" "h-4" }} {{ .TotalCommits }} 20 20 </a> 21 - <a href="/{{ .RepoInfo.FullName }}/branches" class="inline-flex items-center text-sm gap-1"> 21 + <a href="/{{ .RepoInfo.FullName }}/branches" class="inline-flex items-center text-sm gap-1 font-bold"> 22 22 {{ i "git-branch" "w-4" "h-4" }} {{ len .Branches }} 23 23 </a> 24 - <a href="/{{ .RepoInfo.FullName }}/tags" class="inline-flex items-center text-sm gap-1"> 24 + <a href="/{{ .RepoInfo.FullName }}/tags" class="inline-flex items-center text-sm gap-1 font-bold"> 25 25 {{ i "tags" "w-4" "h-4" }} {{ len .Tags }} 26 26 </a> 27 + {{ template "repo/fragments/cloneDropdown" . }} 27 28 </div> 28 29 </div> 29 30 <div class="grid grid-cols-1 md:grid-cols-2 gap-2"> ··· 125 126 </a> 126 127 </div> 127 128 </div> 128 - 129 + 129 130 <!-- Clone dropdown in top right --> 130 - <div class="flex items-center"> 131 + <div class="hidden md:flex items-center "> 131 132 {{ template "repo/fragments/cloneDropdown" . }} 132 133 </div> 133 134 </div>