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