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