-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html.erb
113 lines (103 loc) · 3.87 KB
/
index.html.erb
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
<%
# Copyright (C) 2011-2017 Andrew "Jamoozy" Sabisch
#
# This file is part of GOPF.
#
# GOPF is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# GOPF is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License
# along with GOPF. If not, see http://www.gnu.org/licenses/.
require './list'
# Parse simple URL params to determine how to generate this page.
playlist = false;
media = false;
if $cgi.params.has_key?('p')
playlist = CGI.unescape($cgi.params['p'][0])
if $cgi.params.has_key?('m')
media = CGI.unescape($cgi.params['m'][0])
# TODO implement t=??? param.
end
end
%>
<%$title='GOPF'%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title id="page-title"><%=$title%></title>
<script src="jquery-1.11.0.min.js" type="text/javascript"></script>
<!--script src="loc.js" type="text/javascript"></script-->
<script src="media.js" type="text/javascript"></script>
<script src="playlist.js" type="text/javascript"></script>
<script src="input.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Poiret+One|Tinos|Headland+One">
<link rel="stylesheet" type="text/css" href="style.css">
<link id="preload" rel="preload" href="" as="audio">
</head>
<body>
<div id="player-container" class="player-container">
<div id="url" class="url"></div>
<div id="title-header">
<h1 class="header">Now Playing:</h1>
<div class="title" style="font-family:'Poiret One'">(nothing loaded)</div>
</div>
<div id="notification"> </div>
<audio id="player" src="" seek="true" controls>
Hey, man, get an HTML5-compatible browser, okay?
</audio>
<div id="controls" class="controls-container">
<span id="prev" class="controls"><<</span>
<input id="loop" type="checkbox">
<span id="loop_label" class="controls"><span class="mnemonic">l</span>oop</span>
</input>
<select id="speed" class="speed">
<option value="0.5">0.5</option>
<option value="1" selected>1</option>
<option value="1.25">1.25</option>
<option value="1.5">1.5</option>
<option value="2">2</option>
<option value="2.5">2.5</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<input id="shuf" type="checkbox">
<span id="shuf_label" class="controls"><span class="mnemonic">s</span>huffle</span>
</input>
<span id="next" class="controls">>></span>
</div>
</div>
<nav id="navigator">
<div id="playlist-container" class="playlist-container">
<ul id="playlists" class="playlists">
<%= generate_playlists(playlist) %>
</ul>
<h1 id="playlist-header" class="header">Playlists</h1>
</div>
<div id="media-container" class="media-container">
<ul id="media" class="media">
<%= generate_media(playlist, media) if playlist %>
</ul>
<h1 id="media-header" class="header">Songs</h1>
</div>
</nav>
<div id="help-dialog" class="help-dialog"></div>
<footer id="footer">
<div class="name">
<a href="http://github.com/jamoozy/gopf" target="_blank">
GOPF: The GNU Online Player Framework
</a>
</div>
<div class="name">
Written by <author>Andrew "Jamoozy" C. Sabisch</author>
</div>
</footer>
</body>
</html>