28 lines
1.2 KiB
HTML
28 lines
1.2 KiB
HTML
{{ define "content" }}
|
|
<h1 class="text-2xl mb-4">Domains</h1>
|
|
<form method="GET" class="mb-4">
|
|
<input type="text" name="query" placeholder="Search (use * for wildcard)" value="{{ with .PageData }}{{ .Query }}{{ end }}" class="p-2 bg-gray-700 rounded">
|
|
<button type="submit" class="bg-blue-600 p-2 rounded">Search</button>
|
|
</form>
|
|
<form method="POST" class="mb-4">
|
|
<input type="hidden" name="csrf_token" value="{{ .CSRFToken }}">
|
|
<input type="hidden" name="action" value="add">
|
|
<input type="text" name="domain" placeholder="Add Domain" class="p-2 bg-gray-700 rounded">
|
|
<button type="submit" class="bg-green-600 p-2 rounded">Add</button>
|
|
</form>
|
|
<ul class="space-y-2">
|
|
{{ with .PageData }}
|
|
{{ range .Domains }}
|
|
<li class="flex justify-between bg-gray-800 p-2 rounded">
|
|
{{ . }}
|
|
<form method="POST" class="inline">
|
|
<input type="hidden" name="csrf_token" value="{{ $.CSRFToken }}">
|
|
<input type="hidden" name="action" value="remove">
|
|
<input type="hidden" name="domain" value="{{ . }}">
|
|
<button type="submit" class="bg-red-600 p-1 rounded">Remove</button>
|
|
</form>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }} |