comics/templates/manager.html

69 lines
2.1 KiB
HTML

{{ define "top" }}
<div class="manager-top">
<div class="logging-buttom">
<a href="/logout">
<h1>{{ .UserName }} &ltLogout&gt</h1>
</a>
</div>
<div class="site-button">
<a href="{{ .SiteURL }}">
<h1>&ltSite&gt</h1>
</a>
</div>
</div>
{{ end }}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="icon" type="/image/png" href="/static/img/favicon.png"/>
<link rel="stylesheet" href="/static/css/publish.css">
<link rel="stylesheet" href="/static/css/manager.css">
<link rel="stylesheet" href="/static/css/base.css">
<link rel="stylesheet" href="/static/css/top.css">
<title>{{ .Title }}</title>
</head>
<body>
{{ template "top" . }}
<div class="manager-publish">
<form enctype="multipart/form-data" action="/publish" method="post">
<label for="title">&ltTitle&gt</label>
<input type="text" class="title" name="title" onkeypress="return event.keyCode != 13;">
<input type="file" name="image" style="display:none;" id="browse" accept=".jpg, .jpeg, .png">
<label type="submit" class="browse fake-button" for="browse" class="fake-button">&ltBrowse&gt</label>
<input type="submit" style="display:none;" id="publish">
<label type="submit" class="publish fake-button" for="publish">&ltPublish&gt</label>
</form>
</div>
<div class="manager-list">
<table>
<tr>
<th scope="col">&ltTitle&gt</th>
<th scope="col">&ltDate&gt</th>
<th scope="col">&ltImage&gt</th>
<th scope="col">&ltActions&gt</th>
</tr>
{{ if .Comics }}
{{ range $comic := .Comics }}
<tr>
<td>{{ $comic.Title }}</td>
<td>{{ $comic.Date }}</td>
<td>
<a href="/media/{{ $comic.Image }}">
{{ $comic.Image }}
</a>
</td>
<td class="actions">
<a href="/edit/{{ $comic.No }}">&ltEdit&gt</a>
<a href="/remove/{{ $comic.No }}">&ltRemove&gt</a>
</td>
</tr>
{{ end }}
{{ end }}
</table>
</div>
</body>
</html>