this repo has no description
1{{ define "title" }}knots{{ end }} 2 3{{ define "content" }} 4<div class="px-6 py-4"> 5 <h1 class="text-xl font-bold dark:text-white">Knots</h1> 6</div> 7 8<section class="bg-white dark:bg-gray-800 p-6 rounded relative w-full mx-auto drop-shadow-sm dark:text-white"> 9 <div class="flex flex-col gap-6"> 10 {{ block "about" . }} {{ end }} 11 {{ block "list" . }} {{ end }} 12 {{ block "register" . }} {{ end }} 13 </div> 14</section> 15{{ end }} 16 17{{ define "about" }} 18 <section class="rounded flex flex-col gap-2"> 19 <p class="dark:text-gray-300"> 20 Knots are lightweight headless servers that enable users to host Git repositories with ease. 21 Knots are designed for either single or multi-tenant use which is perfect for self-hosting on a Raspberry Pi at home, or larger “community” servers. 22 When creating a repository, you can choose a knot to store it on. 23 <a href="https://tangled.sh/@tangled.sh/core/blob/master/docs/knot-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">your knots</h2> 33 <div class="flex flex-col rounded border border-gray-200 dark:border-gray-700 w-full"> 34 {{ range $registration := .Registrations }} 35 {{ template "knots/fragments/knotListing" . }} 36 {{ else }} 37 <div class="flex items-center justify-center p-2 border-b border-gray-200 dark:border-gray-700 text-gray-500"> 38 no knots registered yet 39 </div> 40 {{ end }} 41 </div> 42 <div id="operation-error" class="text-red-500 dark:text-red-400"></div> 43 </section> 44{{ end }} 45 46{{ define "register" }} 47 <section class="rounded w-full lg:w-fit flex flex-col gap-2"> 48 <h2 class="text-sm font-bold py-2 uppercase dark:text-gray-300">register a knot</h2> 49 <p class="mb-2 dark:text-gray-300">Enter the hostname of your knot to get started.</p> 50 <form 51 hx-post="/knots/register" 52 class="max-w-2xl mb-2 space-y-4" 53 hx-indicator="#register-button" 54 hx-swap="none" 55 > 56 <div class="flex gap-2"> 57 <input 58 type="text" 59 id="domain" 60 name="domain" 61 placeholder="knot.example.com" 62 required 63 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" 64 > 65 <button 66 type="submit" 67 id="register-button" 68 class="btn rounded flex items-center py-2 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 group" 69 > 70 <span class="inline-flex items-center gap-2"> 71 {{ i "plus" "w-4 h-4" }} 72 register 73 </span> 74 <span class="pl-2 hidden group-[.htmx-request]:inline"> 75 {{ i "loader-circle" "w-4 h-4 animate-spin" }} 76 </span> 77 </button> 78 </div> 79 80 <div id="register-error" class="error dark:text-red-400"></div> 81 </form> 82 83 </section> 84{{ end }}