aboutsummaryrefslogtreecommitdiff
path: root/templates/admin.html
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2022-01-01 19:43:19 -0700
committerJordan <me@jordan.im>2022-01-01 19:43:19 -0700
commit4f1178fc2a3e5865c2fb1c16c83fc1abb15484f9 (patch)
treeecec1f79a373cb2331de9b8011177ae2db9d039b /templates/admin.html
parent8401a6bdeec321920550f813a1c7843ed6e66a44 (diff)
downloadcrane-4f1178fc2a3e5865c2fb1c16c83fc1abb15484f9.tar.gz
crane-4f1178fc2a3e5865c2fb1c16c83fc1abb15484f9.zip
crane, http, util: housekeeping, performance improvements, styling
Diffstat (limited to 'templates/admin.html')
-rw-r--r--templates/admin.html74
1 files changed, 39 insertions, 35 deletions
diff --git a/templates/admin.html b/templates/admin.html
index 8573e23..fb3a3d2 100644
--- a/templates/admin.html
+++ b/templates/admin.html
@@ -1,51 +1,55 @@
{{ template "layout.html" . }}
{{ define "content" }}
-{{ if .LastPaperDL }}
-<p>{{ .Status }} (<a style="text-decoration: underline;" href="/download/{{ .LastPaperDL }}">download</a>)</p>
-{{ else }}
-<p>{{ .Status }}</p>
-{{ end }}
-<table id='header'>
+<table class="admin">
+ <tr>
+ <td>
+ {{ if .LastPaperDL }}
+ {{ .Status }} (<a style="text-decoration: underline;" href="/download/{{ .LastPaperDL }}">download</a>)
+ {{ else }}
+ {{ .Status }}
+ {{ end }}
+ </td>
+ </tr>
<tr>
- <td class='inpt'>
- <form method='post' action='/admin/add/'>
- <input type='text' name='new-category' placeholder="Mathematics" value=''/>
- <input class='btn' type="submit" value="New Category" />
+ <td>
+ <form method='post' action='/admin/add/'>
+ <input type='text' name='new-category' placeholder="Mathematics" value=''/>
+ <input type="submit" value="New Category" />
</form>
- </td>
+ </td>
</tr>
{{ $categoryCount := len .Papers.List }}
{{ if gt $categoryCount 0 }}
<tr>
- <td class='inpt'>
- <form method='post' action='/admin/add/'>
- <input type='text' name='dl-paper' placeholder="URL or DOI" value=''/>
- <select class="sel" name="dl-category" id="category">
- {{ $lastUsedCategory := .LastUsedCategory }}
- {{ if $lastUsedCategory }}
- <option value="{{ .LastUsedCategory }}">{{ $lastUsedCategory }}</option>
- {{ end }}
- {{ range $category, $papers := .Papers.List }}
- {{ if ne $category $lastUsedCategory }}
- <option value="{{ $category }}">{{ $category }}</option>
- {{ end }}
- {{ end }}
- </select>
- <input class="btn" type="submit" value="Download" />
- </form>
- </td>
+ <td>
+ <form method='post' action='/admin/add/'>
+ <input type='text' name='dl-paper' placeholder="URL or DOI" value=''/>
+ <select class="sel" name="dl-category" id="category">
+ {{ $lastUsedCategory := .LastUsedCategory }}
+ {{ if $lastUsedCategory }}
+ <option value="{{ .LastUsedCategory }}">{{ $lastUsedCategory }}</option>
+ {{ end }}
+ {{ range $category, $papers := .Papers.List }}
+ {{ if ne $category $lastUsedCategory }}
+ <option value="{{ $category }}">{{ $category }}</option>
+ {{ end }}
+ {{ end }}
+ </select>
+ <input type="submit" value="Download" />
+ </form>
+ </td>
</tr>
{{ end }}
</table>
{{ if gt $categoryCount 0 }}
-<div class="cat">
- <span>{{ range $category, $paper := .Papers.List }}<span class="nowrap">[<a href="#{{ $category }}">{{ $category }}</a>]</span> {{ end }}</span>
+<div class="cat-cont">
+ <div class="cat">
+ {{ range $category, $paper := .Papers.List }}
+ <span class="cat">[<a href="#{{ $category }}">{{ $category }}</a>]</span>
+ {{ end }}
+ </div>
</div>
-<table class='tabs'>
- <tr>
- <td><a class='active' href='/admin/edit/'>Edit</a></td>
- </tr>
-</table>
+<p class="Pp"><a class='active' href='/admin/edit/'>Edit</a></p>
<div class='content'>
{{ block "list" . }}{{ end }}
</div>