Signed-off-by: Mirror <voice@magicalmirro.red>
This commit is contained in:
2022-06-16 12:07:46 +03:00
commit 45d48b78ea
10 changed files with 653 additions and 0 deletions

41
templates/admin.html Normal file
View File

@@ -0,0 +1,41 @@
{{define "admin.html"}}
<!DOCTYPE html>
<html>
<head>
<title>{{.ApplicationName}} | Admin page</title>
<style>
body {
background-color: black;
color: antiquewhite;
}
</style>
</head>
<body>
<div class="playlist">
<p>Current playlist</p>
<table>
<thead>
<tr>
<td></td>
<td>name</td>
<td>size</td>
<td>preview</td>
</tr>
</thead>
<tbody>
{{range .Videos}}
<tr>
<td><form action="delete" method="post"><input id="fileid" name="fileid" type="hidden" value="{{.ID}}"><input value="Delete" type="submit"></form></td>
<td>{{html .DisplayName}}</td>
<td>{{html .Size}}</td>
</tr>
{{end}}
</tbody>
<form action="upload" method="post" enctype="multipart/form-data">
<p>Add new: <input id="file" type="file" name="file" multiple> <input type="submit" ></p>
</form>
</table>
</div>
</body>
</html>
{{end}}