Initial Commit
This commit is contained in:
23
templates/admin-login.html
Normal file
23
templates/admin-login.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<h1>Admin Login</h1>
|
||||
<div class="center">
|
||||
<form class="pure-form pure-form-aligned" action="/admin/dologin" method="POST">
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
<label for="un">Username</label>
|
||||
<input id="un" name="un" type="text" placeholder="username" autofocus>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="pw">Password</label>
|
||||
<input id="pw" name="pw" type="password" placeholder="password">
|
||||
</div>
|
||||
|
||||
<div class="pure-controls">
|
||||
<label for="remember" class="pure-checkbox">
|
||||
<input id="remember" name="remember" type="checkbox"> Remember Me
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="pure-button pure-button-primary">Submit</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
11
templates/footer.html
Normal file
11
templates/footer.html
Normal file
@@ -0,0 +1,11 @@
|
||||
</div>
|
||||
<div id="modal-overlay">
|
||||
<div>
|
||||
<h1 id="modal-title"></h1>
|
||||
<h2 id="modal-subtitle"></h2>
|
||||
<div id="modal-body"></div>
|
||||
<div id="modal-buttons">
|
||||
</div>
|
||||
<div class="reset-pull"></div>
|
||||
</div>
|
||||
</div>
|
9
templates/header.html
Normal file
9
templates/header.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="flash center {{.FlashClass}}">
|
||||
{{.FlashMessage}}
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ if .SubTitle }}
|
||||
<div class="header-menu">
|
||||
<h2>{{.SubTitle}}</h2>
|
||||
</div>
|
||||
{{ end }}
|
6
templates/htmlfooter.html
Normal file
6
templates/htmlfooter.html
Normal file
@@ -0,0 +1,6 @@
|
||||
</div>
|
||||
{{ range $i, $v := .Scripts }}
|
||||
<script src="{{ $v }}"></script>
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
25
templates/htmlheader.html
Normal file
25
templates/htmlheader.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta http-equiv="Cache-control" content="No-Cache">
|
||||
<link rel="apple-touch-icon" href="/assets/img/favicon.png" type="image/png">
|
||||
<link rel="shortcut icon" href="/assets/img/favicon.png" type="image/png">
|
||||
|
||||
<title>{{.Site.Title}} - {{.SubTitle}}</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
{{ range $i, $v := .Stylesheets }}
|
||||
<link rel="stylesheet" href="{{ $v }}">
|
||||
{{ end }}
|
||||
{{ range $i, $v := .HeaderScripts }}
|
||||
<script src="{{ $v }}"></script>
|
||||
{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
<div id="layout">
|
74
templates/song-picker.html
Normal file
74
templates/song-picker.html
Normal file
@@ -0,0 +1,74 @@
|
||||
{{ if not .TemplateData.Songs }}
|
||||
<div>No songs are available</div>
|
||||
{{ else }}
|
||||
<form class="pure-form" action="/admin/build" method="POST">
|
||||
<fieldset>
|
||||
<input id="chosen_songs" name="chosen_songs" value="" type="hidden">
|
||||
<button class="pure-button pure-button-primary" type="submit">Build File</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div>
|
||||
<label for="filter">Filter</label>
|
||||
<input onkeyup="updateFilter(this.value);" name="filter" value="" placeholder="Filter Songs">
|
||||
<table id="song-table" class="pure-table pure-table-bordered center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $i, $v := .TemplateData.Songs }}
|
||||
<tr data-file="{{$v.Name}}>
|
||||
<td>{{$v.Name}}</td>
|
||||
<td>
|
||||
<a class="pure-button pure-button-secondary" onclick="javascript:toggleFile(this, '{{$v.Name}});">Add</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
var selectedFiles = [];
|
||||
var tablerows = document.getElementsByTagName("tr");
|
||||
|
||||
function updateFilter(flt) {
|
||||
flt = flt.toLowerCase();
|
||||
for(var i = 0; i < tablerows.length; i++) {
|
||||
if(tablerows[i].dataset.file.toLowerCase().startsWith(flt)) {
|
||||
tablerows[i].classList.remove("hidden");
|
||||
} else {
|
||||
tablerows[i].classList.add("hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function toggleFile(btn, sng) {
|
||||
if(!btn.classList.contains("pure-button-warning")) {
|
||||
btn.classList.remove("pure-button-secondary");
|
||||
btn.classList.add("pure-button-warning");
|
||||
for(var i = 0; i < selectedFiles.length; i++) {
|
||||
if(selectedFiles[i] == sng) { return; }
|
||||
}
|
||||
selectedFiles.push(sng);
|
||||
btn.innerText = "Remove";
|
||||
} else {
|
||||
btn.classList.remove("pure-button-warning");
|
||||
btn.classList.add("pure-button-secondary");
|
||||
for(var i = 0; i < selectedFiles.length; i++) {
|
||||
if(selectedFiles[i] == sng) { delete selectedFiles[i]; }
|
||||
}
|
||||
btn.innerText = "Add";
|
||||
}
|
||||
updateFilesInput();
|
||||
}
|
||||
|
||||
function removeSong(sng) {
|
||||
for(var i = 0; i < selectedFiles.length; i++ {
|
||||
if(selectedFiles[i] == sng) { delete selectedFiles[i]; }
|
||||
}
|
||||
updateFilesInput();
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
Reference in New Issue
Block a user