Initial Commit
This commit is contained in:
22
templates/admin-adduser.html
Normal file
22
templates/admin-adduser.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="center">
|
||||
<form class="pure-form pure-form-aligned" action="/admin/users/new/save" method="POST">
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
<label for="email">Email Address</label>
|
||||
<input id="email" name="email" type="text" placeholder="Email Address" value="">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="password">Password</label>
|
||||
<input id="password" name="password" type="password" placeholder="Password">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="password_rpt">Repeat Password</label>
|
||||
<input id="password_rpt" name="password_rpt" type="password" placeholder="Repeat Password">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="pure-button pure-button-primary">Add User</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
47
templates/admin-edituser.html
Normal file
47
templates/admin-edituser.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<div class="center">
|
||||
<form class="pure-form pure-form-aligned" action="/admin/users/{{ .TemplateData }}/save" method="POST">
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
<span>{{ .TemplateData }}</span>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label class="control-label" for="password">Password</label>
|
||||
<input id="password" name="password" type="password" placeholder="Password">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label class="control-label" for="password_rpt">Repeat Password</label>
|
||||
<input id="password_rpt" name="password_rpt" type="password" placeholder="Repeat Password">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group reset-pull">
|
||||
<a href="/admin/users" class="pull-left space pure-button pure-button-plain">Cancel</a>
|
||||
<button type="submit" class="pull-right space pure-button pure-button-primary">Update</button>
|
||||
<button type="button" id="btnDeleteUser" class="pull-right space pure-button pure-button-error">Delete</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
snack.listener(
|
||||
{node:document.getElementById('btnDeleteUser'),event:'click'},
|
||||
function() {
|
||||
showModal({
|
||||
title: 'Delete User',
|
||||
subtitle: '({{ .TemplateData }})',
|
||||
body: 'Are you sure? This cannot be undone.',
|
||||
buttons: [{
|
||||
title:'Cancel',
|
||||
position:'left',
|
||||
click: hideModal
|
||||
},{
|
||||
title:'Delete',
|
||||
position:'right',
|
||||
class: 'pure-button-error',
|
||||
href: '/admin/users/{{ .TemplateData.ID }}/delete'
|
||||
}]
|
||||
});
|
||||
}
|
||||
);
|
||||
</script>
|
22
templates/admin-login.html
Normal file
22
templates/admin-login.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="center">
|
||||
<form class="pure-form pure-form-aligned" action="/admin/dologin" method="POST">
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
<label for="email">Email Address</label>
|
||||
<input id="email" name="email" type="text" placeholder="Email Address">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="password">Password</label>
|
||||
<input id="password" name="password" 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>
|
6
templates/admin-main.html
Normal file
6
templates/admin-main.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="content">
|
||||
<button onclick="window.location.href='/admin/votes'">Votes</button>
|
||||
<button onclick="window.location.href='/admin/teams'">Teams</button>
|
||||
<button onclick="window.location.href='/admin/games'">Games</button>
|
||||
<button onclick="window.location.href='/admin/users'">Users</button>
|
||||
</div>
|
24
templates/admin-menu.html
Normal file
24
templates/admin-menu.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<div id="menu">
|
||||
<div class="pure-menu">
|
||||
<a class="pure-menu-heading" href="/admin/">Admin</a>
|
||||
<a href="#menu" class="menu-button">
|
||||
<i class="fa fa-bars"></i>
|
||||
</a>
|
||||
<div class="menu-container">
|
||||
<ul class="pure-menu-list">
|
||||
{{ range $k, $v := .Menu }}
|
||||
<li class="pure-menu-item">
|
||||
<a href="{{ $v.Location }}" class="pure-menu-link"><i class="fa {{ $v.Icon }}"></i> {{ $v.Label }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<ul class="pure-menu-list menu-bottom">
|
||||
{{ range $k, $v := .BottomMenu }}
|
||||
<li class="pure-menu-item">
|
||||
<a href="{{ $v.Location }}" class="pure-menu-link"><i class="fa {{ $v.Icon }}"></i> {{ $v.Label }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
31
templates/admin-users.html
Normal file
31
templates/admin-users.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<div class="bottom-space center">
|
||||
<a id="btnAddUser" class="pure-button pure-button-success" href="/admin/users/new"><i class="fa fa-plus"></i> Add User</a>
|
||||
</div>
|
||||
<table id="users-table" class="hidden sortable pure-table pure-table-bordered center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $i, $v := .TemplateData.Users }}
|
||||
<tr>
|
||||
<td>{{ $v }}</td>
|
||||
<td>
|
||||
<a href="/admin/users/{{ $v }}/edit" class="pure-button pure-button-plain"><i class="fa fa-pencil"></i></a>
|
||||
<a href="/admin/users/{{ $v }}/delete" class="pure-button pure-button-plain"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
<script>
|
||||
snack.ready(function() {
|
||||
var tableBody = document.querySelector("#users-table>tbody");
|
||||
if(tableBody.children.length>0) {
|
||||
// Show the table
|
||||
document.getElementById('users-table').classList.remove('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
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>
|
10
templates/header.html
Normal file
10
templates/header.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="content">
|
||||
<aside class="flash center {{.FlashClass}}">
|
||||
{{.FlashMessage}}
|
||||
</aside>
|
||||
<div class="header">
|
||||
ICT GameJam 2017
|
||||
</div>
|
||||
<div class="header-menu">
|
||||
<h2>{{.SubTitle}}</h2>
|
||||
</div>
|
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">
|
1
templates/main.html
Normal file
1
templates/main.html
Normal file
@@ -0,0 +1 @@
|
||||
<div>Default Public Facing Page</div>
|
Reference in New Issue
Block a user