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 {{ template "knots/fragments/knotListingFull" . }}
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 "register" }}
31 <section class="rounded max-w-2xl flex flex-col gap-2">
32 <h2 class="text-sm font-bold py-2 uppercase dark:text-gray-300">register a knot</h2>
33 <p class="mb-2 dark:text-gray-300">Enter the hostname of your knot to generate a key.</p>
34 <form
35 hx-post="/knots/key"
36 class="space-y-4"
37 hx-indicator="#register-button"
38 hx-swap="none"
39 >
40 <div class="flex gap-2">
41 <input
42 type="text"
43 id="domain"
44 name="domain"
45 placeholder="knot.example.com"
46 required
47 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"
48 >
49 <button
50 type="submit"
51 id="register-button"
52 class="btn rounded flex items-center py-2 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 group"
53 >
54 <span class="inline-flex items-center gap-2">
55 {{ i "plus" "w-4 h-4" }}
56 generate
57 </span>
58 <span class="pl-2 hidden group-[.htmx-request]:inline">
59 {{ i "loader-circle" "w-4 h-4 animate-spin" }}
60 </span>
61 </button>
62 </div>
63
64 <div id="registration-error" class="error dark:text-red-400"></div>
65 </form>
66
67 <div id="secret"></div>
68 </section>
69{{ end }}