-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.html
172 lines (134 loc) · 3.87 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" id="viewport" content="width=device-width">
<title>Admin Demo | Riot.js – The 1kb MVP library</title>
<link rel="stylesheet" href="dist/style.css">
</head>
<!-- application root -->
<body id="app">
<!-- riot logo -->
<a id="logo" href="https://muut.com/riotjs/" title="Riot.js website"></a>
<header>
<div>
<form id="search">
<input name="q" placeholder="Search...">
<div id="results"></div>
</form>
<nav>
<a id="stats-nav" href="#/stats">Statistics</a>
<a id="customers-nav" href="#/customers">Customers</a>
</nav>
<a id="logout">Logout</a>
</div>
</header>
<div id="main">
<!-- login -->
<form id="login">
<h3>Administration</h3>
<label>
<span>Username</span>
<input name="username" value="riot" autofocus>
</label>
<label>
<span>Password</span>
<input name="password" type="password" value="riot">
</label>
<p><button>Log in</button></p>
</form>
<!-- home -->
<div class="page" id="stats-page">
<h3>Customers</h3>
<canvas height="200"></canvas>
<h3>Users</h3>
<canvas height="200"></canvas>
<h3>Posts</h3>
<canvas height="200"></canvas>
</div>
<!-- customers -->
<div class="page" id="customers-page">
<div id="bars"></div>
</div>
<!-- customer -->
<div class="page" id="customer-page"></div>
<!-- search -> user -->
<div class="page" id="user-page"></div>
</div>
<!-- footer links, only shown on login screen -->
<footer>
<a href="https://github.com/muut/riotjs-admin">View source</a> •
<a href="https://muut.com/riotjs/">Riot.js website</a> •
<a href="https://github.com/muut/riotjs">Riot.js @ Github</a>
</footer>
<!-- templates -->
<!-- single statistical bar -->
<script type="text/tmpl" id="bars-tmpl">
<a href="#/customer/{id}">
<em>{name}</em>
<span>
<strong style="width: {width}%"></strong>
</span>
</a>
</script>
<!-- search result entry -->
<script type="text/tmpl" id="result-tmpl">
<a href="#/user/{id}">
<img src="{img}"> <span>{name}</span>
</a>
</script>
<!-- user page template -->
<script type="text/tmpl" id="user-tmpl">
<img src="{img}">
<div class="details">
<h1>{name}</h1>
<p class="meta">
@{username} <span>•</span>
{email} <span>•</span>
{joined}
</p>
<p class="desc">{desc}</p>
<button>Ban user</button>
</div>
</script>
<!-- link to individual user -->
<script type="text/tmpl" id="user-link-tmpl">
<a href="#/user/{id}" title="{title}"><img src="{img}"></a>
</script>
<!-- invoice entry -->
<script type="text/tmpl" id="invoice-tmpl">
<li>{time} <strong>${total}</strong></li>
</script>
<!-- customer page -->
<script type="text/tmpl" id="customer-tmpl">
<img src="{img}">
<div class="details">
<h1>{name}</h1>
<p class="meta">
{email} <span>•</span>
{joined}
</p>
<p class="desc">{desc}</p>
</div>
<div id="user-list">
<h3>Users</h3>
</div>
<div id="invoice-list">
<h3>Invoices</h3>
<ul></ul>
</div>
</script>
<!-- scripts -->
<script src="dist/jquery.min.js"></script>
<script src="dist/admin.js"></script>
<!-- start the application -->
<script>
admin({
page: location.hash.slice(2),
root: $("body"),
debug: true,
cache: false
});
</script>
</body>
</html>