forked from tangled.org/core
Monorepo for Tangled — https://tangled.org
1{{ define "title" }}new repo{{ end }} 2 3{{ define "content" }} 4<div class="p-6"> 5 <p class="text-xl font-bold dark:text-white">Create a new repository</p> 6</div> 7<div class="p-6 bg-white dark:bg-gray-800 drop-shadow-sm rounded"> 8 <form hx-post="/repo/new" class="space-y-12" hx-swap="none" hx-indicator="#spinner"> 9 <div class="space-y-2"> 10 <label for="name" class="-mb-1 dark:text-white">Repository name</label> 11 <input 12 type="text" 13 id="name" 14 name="name" 15 required 16 class="w-full max-w-md dark:bg-gray-700 dark:text-white dark:border-gray-600" 17 /> 18 <p class="text-sm text-gray-500 dark:text-gray-400">All repositories are publicly visible.</p> 19 20 <label for="branch" class="dark:text-white">Default branch</label> 21 <input 22 type="text" 23 id="branch" 24 name="branch" 25 value="main" 26 required 27 class="w-full max-w-md dark:bg-gray-700 dark:text-white dark:border-gray-600" 28 /> 29 30 <label for="description" class="dark:text-white">Description</label> 31 <input 32 type="text" 33 id="description" 34 name="description" 35 class="w-full max-w-md dark:bg-gray-700 dark:text-white dark:border-gray-600" 36 /> 37 </div> 38 39 <fieldset class="space-y-3"> 40 <legend class="dark:text-white">Select a knot</legend> 41 <div class="space-y-2"> 42 <div class="flex flex-col"> 43 {{ range .Knots }} 44 <div class="flex items-center"> 45 <input 46 type="radio" 47 name="domain" 48 value="{{ . }}" 49 class="mr-2" 50 id="domain-{{ . }}" 51 /> 52 <span class="dark:text-white">{{ . }}</span> 53 </div> 54 {{ else }} 55 <p class="dark:text-white">No knots available.</p> 56 {{ end }} 57 </div> 58 </div> 59 <p class="text-sm text-gray-500 dark:text-gray-400">A knot hosts repository data. <a href="/knots" class="underline">Learn how to register your own knot.</a></p> 60 </fieldset> 61 62 <div class="space-y-2"> 63 <button type="submit" class="btn flex gap-2 items-center"> 64 create repo 65 <span id="spinner" class="group"> 66 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 67 </span> 68 </button> 69 <div id="repo" class="error"></div> 70 </div> 71 </form> 72</div> 73{{ end }}