this repo has no description
1{{ define "title" }}spindles{{ end }} 2 3{{ define "content" }} 4<div class="px-6 py-4 flex items-end justify-start gap-4 align-bottom"> 5 <h1 class="text-xl font-bold dark:text-white">Spindles</h1> 6 7 8 <span class="flex items-center gap-1 text-sm"> 9 {{ i "book" "w-3 h-3" }} 10 <a href="https://tangled.sh/@tangled.sh/core/blob/master/docs/spindle/hosting.md"> 11 docs 12 </a> 13 </span> 14</div> 15 16<section class="bg-white dark:bg-gray-800 p-6 rounded relative w-full mx-auto drop-shadow-sm dark:text-white"> 17 <div class="flex flex-col gap-6"> 18 {{ block "about" . }} {{ end }} 19 {{ block "list" . }} {{ end }} 20 {{ block "register" . }} {{ end }} 21 </div> 22</section> 23{{ end }} 24 25{{ define "about" }} 26<section class="rounded flex items-center gap-2"> 27 <p class="text-gray-500 dark:text-gray-400"> 28 Spindles are small CI runners. 29 </p> 30</section> 31{{ end }} 32 33{{ define "list" }} 34 <section class="rounded w-full flex flex-col gap-2"> 35 <h2 class="text-sm font-bold py-2 uppercase dark:text-gray-300">your spindles</h2> 36 <div class="flex flex-col rounded border border-gray-200 dark:border-gray-700 w-full"> 37 {{ range $spindle := .Spindles }} 38 {{ template "spindles/fragments/spindleListing" . }} 39 {{ else }} 40 <div class="flex items-center justify-center p-2 border-b border-gray-200 dark:border-gray-700 text-gray-500"> 41 no spindles registered yet 42 </div> 43 {{ end }} 44 </div> 45 <div id="operation-error" class="text-red-500 dark:text-red-400"></div> 46 </section> 47{{ end }} 48 49{{ define "register" }} 50 <section class="rounded w-full lg:w-fit flex flex-col gap-2"> 51 <h2 class="text-sm font-bold py-2 uppercase dark:text-gray-300">register a spindle</h2> 52 <p class="mb-2 dark:text-gray-300">Enter the hostname of your spindle to get started.</p> 53 <form 54 hx-post="/spindles/register" 55 class="max-w-2xl mb-2 space-y-4" 56 hx-indicator="#register-button" 57 hx-swap="none" 58 > 59 <div class="flex gap-2"> 60 <input 61 type="text" 62 id="instance" 63 name="instance" 64 placeholder="spindle.example.com" 65 required 66 class="flex-1 w-full dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:placeholder-gray-400 px-3 py-2 border rounded" 67 > 68 <button 69 type="submit" 70 id="register-button" 71 class="btn rounded flex items-center py-2 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 group" 72 > 73 <span class="inline-flex items-center gap-2"> 74 {{ i "plus" "w-4 h-4" }} 75 register 76 </span> 77 <span class="pl-2 hidden group-[.htmx-request]:inline"> 78 {{ i "loader-circle" "w-4 h-4 animate-spin" }} 79 </span> 80 </button> 81 </div> 82 83 <div id="register-error" class="dark:text-red-400"></div> 84 </form> 85 86 </section> 87{{ end }}