/
index.html
75 lines (74 loc) · 1.59 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
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>MPD</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="refresh" content="15">
<style>
body {
border: 0;
padding: 0;
}
ul {
width:100%
list-style-type: none;
list-style: none;
margin: 0;
padding: 0;
padding-inline-start: 0 !important; // Just in case if you find that there is an extra padding at the start of the line
justify-content: space-around;
display: flex;
}
li {
width:50%;
padding: 0;
margin: 0;
float: left;
border: 1px solid silver;
}
li:hover {
border: 1px solid black;
}
li a {
width: 100%;
display: block;
font-weight: bold;
text-align: center;
padding: 16px;
text-decoration: none;
}
</style>
</head>
<body>
<h1>
{{if .Playing }}
<!-- We could have used `if len .Title ..` but this is cleaner -->
{{if .Populated }}
<p>Playing {{.Artist}}: {{.Title}}.</p>
{{ else }}
<p>Playing {{.File}}.</p>
{{end}}
{{else}}
Stopped
{{end}}
</h1>
<p><ul>
<li><a href="/prev">Previous</a></li>
<li><a href="/next">Next</a></li>
</ul></p><p>
<ul>
<li><a href="/play">Play</a></li>
<li><a href="/stop">Stop</a></li>
</ul></p><p>
<ul>
<li><a href="/">Index</a></li>
<li><a href="/status">Status</a></li>
</ul></p>
<h2>Playlist</h2>
<blockquote>
{{range .Playlist}}
<p><a href="/goto?position={{.Pos}}">{{.Name}}</a></p>
{{end}}
</blockquote>
</body>
</html>