forked from tangled.org/core
this repo has no description
at oauth 1.8 kB view raw
1{{ define "user/fragments/editPins" }} 2 {{ $profile := .Profile }} 3 <form 4 hx-post="/profile/pins" 5 hx-disabled-elt="#save-btn,#cancel-btn" 6 hx-swap="none"> 7 <div class="flex items-center justify-between mb-2"> 8 <p class="text-sm font-bold p-2 dark:text-white">SELECT PINNED REPOS</p> 9 <div class="flex items-center gap-2"> 10 <button id="save-btn" type="submit" class="btn px-2 flex items-center gap-2 no-underline text-sm"> 11 {{ i "check" "w-3 h-3" }} save 12 </button> 13 <a href="/{{.LoggedInUser.Did}}" class="w-full no-underline hover:no-underline"> 14 <button id="cancel-btn" type="button" class="btn px-2 w-full flex items-center gap-2 no-underline text-sm"> 15 {{ i "x" "w-3 h-3" }} cancel 16 </button> 17 </a> 18 </div> 19 </div> 20 <div id="repos" class="grid grid-cols-1 gap-1 mb-6 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700"> 21 {{ range $idx, $r := .AllRepos }} 22 <div class="flex items-center gap-2 text-base p-2 border-b border-gray-200 dark:border-gray-700"> 23 <input type="checkbox" id="repo-{{$idx}}" name="pinnedRepo{{$idx}}" value="{{.RepoAt}}" {{if .IsPinned}}checked{{end}}> 24 <label for="repo-{{$idx}}" class="my-0 py-0 normal-case font-normal w-full"> 25 <div class="flex justify-between items-center w-full"> 26 <span class="flex-shrink-0 overflow-hidden text-ellipsis ">{{ index $.DidHandleMap .Did }}/{{.Name}}</span> 27 <div class="flex gap-1 items-center"> 28 {{ i "star" "size-4 fill-current" }} 29 <span>{{ .RepoStats.StarCount }}</span> 30 </div> 31 </div> 32 </label> 33 </div> 34 {{ end }} 35 </div> 36 37 </form> 38{{ end }}