forked from tangled.org/core
this repo has no description
at file-tree 1.7 kB view raw
1{{ define "repo/fragments/repoActions" }} 2 <div class="flex items-center gap-2 z-auto"> 3 <button 4 id="starBtn" 5 class="btn disabled:opacity-50 disabled:cursor-not-allowed" 6 {{ if .IsStarred }} 7 hx-delete="/star?subject={{ .RepoAt }}&countHint={{ .Stats.StarCount }}" 8 {{ else }} 9 hx-post="/star?subject={{ .RepoAt }}&countHint={{ .Stats.StarCount }}" 10 {{ end }} 11 12 hx-trigger="click" 13 hx-target="#starBtn" 14 hx-swap="outerHTML" 15 hx-disabled-elt="#starBtn" 16 > 17 <div class="flex gap-2 items-center"> 18 {{ if .IsStarred }} 19 {{ i "star" "w-4 h-4 fill-current" }} 20 {{ else }} 21 {{ i "star" "w-4 h-4" }} 22 {{ end }} 23 <span class="text-sm"> 24 {{ .Stats.StarCount }} 25 </span> 26 </div> 27 </button> 28 {{ if .DisableFork }} 29 <button 30 class="btn text-sm no-underline hover:no-underline flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed" 31 disabled 32 title="Empty repositories cannot be forked" 33 > 34 {{ i "git-fork" "w-4 h-4" }} 35 fork 36 </button> 37 {{ else }} 38 <a 39 class="btn text-sm no-underline hover:no-underline flex items-center gap-2" 40 href="/{{ .FullName }}/fork" 41 > 42 {{ i "git-fork" "w-4 h-4" }} 43 fork 44 </a> 45 {{ end }} 46 </div> 47{{ end }}