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">Create a new repository</p> 6</div> 7<div class="p-6 bg-white drop-shadow-sm rounded"> 8 <form hx-post="/repo/new" class="space-y-12" hx-swap="none"> 9 <div class="space-y-2"> 10 <label for="name" class="block uppercase font-bold text-sm">Repository name</label> 11 <input 12 type="text" 13 id="name" 14 name="name" 15 required 16 class="w-full max-w-md" 17 /> 18 <p class="text-sm text-gray-500">All repositories are publicly visible.</p> 19 20 <label for="branch" class="block uppercase font-bold text-sm">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" 28 /> 29 30 <label for="description" class="block uppercase font-bold text-sm">Description</label> 31 <input 32 type="text" 33 id="description" 34 name="description" 35 class="w-full max-w-md" 36 /> 37 </div> 38 39 <fieldset class="space-y-3"> 40 <legend class="uppercase font-bold text-sm">Select a knot</legend> 41 <div class="space-y-2"> 42 {{ range .Knots }} 43 <div> 44 <label class="inline-flex items-center"> 45 <input 46 type="radio" 47 name="domain" 48 value="{{ . }}" 49 class="mr-2" 50 /> 51 <span>{{ . }}</span> 52 </label> 53 </div> 54 {{ else }} 55 <p>No knots available.</p> 56 {{ end }} 57 </div> 58 <p class="text-sm text-gray-500">A knot hosts repository data. <a href="/knots" class="underline">Learn how to register your own knot.</a></p> 59 </fieldset> 60 61 <div class="space-y-2"> 62 <button type="submit" class="btn">create repo</button> 63 <div id="repo" class="error"></div> 64 </div> 65 </form> 66</div> 67{{ end }}