this repo has no description
at fix-tw-dark 3.8 kB view raw
1{{ define "title" }}knots{{ end }} 2{{ define "content" }} 3 <div class="p-6"> 4 <p class="text-xl font-bold dark:text-white">Knots</p> 5 </div> 6 <div class="flex flex-col"> 7 <h2 class="text-sm font-bold py-2 px-6 uppercase dark:text-gray-300">register a knot</h2> 8 <section class="rounded bg-white dark:bg-gray-800 drop-shadow-sm px-6 py-4 mb-6 w-full lg:w-fit"> 9 <p class="mb-8 dark:text-gray-300">Generate a key to initialize your knot server.</p> 10 <form 11 hx-put="/knots/key" 12 hx-swap="none" 13 class="max-w-2xl mb-8 space-y-4" 14 > 15 <input 16 type="text" 17 id="domain" 18 name="domain" 19 placeholder="knot.example.com" 20 required 21 class="w-full dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400" 22 /> 23 <button class="btn dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600" type="submit"> 24 generate key 25 </button> 26 <div id="settings-knots-error" class="error dark:text-red-400"></div> 27 </form> 28 </section> 29 30 <h2 class="text-sm font-bold py-2 px-6 uppercase dark:text-gray-300">my knots</h2> 31 <section class="rounded bg-white dark:bg-gray-800 drop-shadow-sm px-6 py-4 mb-6 w-full lg:w-fit"> 32 <div id="knots-list" class="flex flex-col gap-6 mb-8"> 33 {{ range .Registrations }} 34 {{ if .Registered }} 35 <div class="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-4"> 36 <div class="flex flex-col gap-1"> 37 <div class="inline-flex items-center gap-4"> 38 {{ i "git-branch" "w-3 h-3 dark:text-gray-300" }} 39 <p class="font-bold dark:text-white">{{ .Domain }}</p> 40 </div> 41 <p class="text-sm text-gray-500 dark:text-gray-400">owned by {{ .ByDid }}</p> 42 <p class="text-sm text-gray-500 dark:text-gray-400">registered {{ .Registered | timeFmt }}</p> 43 </div> 44 </div> 45 {{ end }} 46 {{ else }} 47 <p class="text-sm text-gray-500 dark:text-gray-400">No knots registered</p> 48 {{ end }} 49 </div> 50 </section> 51 52 <h2 class="text-sm font-bold py-2 px-6 uppercase dark:text-gray-300">pending registrations</h2> 53 <section class="rounded bg-white dark:bg-gray-800 drop-shadow-sm px-6 py-4 mb-6 w-full lg:w-fit"> 54 <div id="pending-knots-list" class="flex flex-col gap-6 mb-8"> 55 {{ range .Registrations }} 56 {{ if not .Registered }} 57 <div class="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-4"> 58 <div class="flex flex-col gap-1"> 59 <div class="inline-flex items-center gap-4"> 60 <p class="font-bold dark:text-white">{{ .Domain }}</p> 61 <div class="inline-flex items-center gap-1"> 62 <span class="text-xs bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200 px-2 py-1 rounded"> 63 pending 64 </span> 65 </div> 66 </div> 67 <p class="text-sm text-gray-500 dark:text-gray-400">opened by {{ .ByDid }}</p> 68 <p class="text-sm text-gray-500 dark:text-gray-400">created {{ .Created | timeFmt }}</p> 69 </div> 70 <div class="flex gap-2 items-center"> 71 <button 72 class="btn dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 gap-2" 73 hx-post="/knots/{{ .Domain }}/init"> 74 {{ i "square-play" "w-5 h-5" }} 75 <span class="hidden md:inline">initialize</span> 76 </button> 77 </div> 78 </div> 79 {{ end }} 80 {{ else }} 81 <p class="text-sm text-gray-500 dark:text-gray-400">No pending registrations</p> 82 {{ end }} 83 </div> 84 </section> 85 </div> 86{{ end }}