]> git.plutz.net Git - serve0/blob - templates/playctl.html.sh
improved player on small screens
[serve0] / templates / playctl.html.sh
1 # Copyright 2014 - 2016 Paul Hänsch
2 #
3 # This file is part of Serve0
4
5 # Serve0 is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Serve0 is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
17
18 cat <<EOF
19 <form class="panel" id="search" style="display: block;" action="?" method="get" accept-charset="UTF-8">
20   <input type="text" name="s" value="$search" placeholder="Search">
21
22   <label for="o1" class="order">Order by:</label>
23   <select class="order" size="1" name="o" id="o1">
24     <option>Name</option>
25     <option>Date</option>
26     <option>Length</option>
27   </select>
28   <input type="submit" name="submit" value="Find">
29
30   <a class="panel clearsearch" href="?">Clear All</a>
31   <a class="panel" href="${info:+?p=list&amp;${page_this}}${info:-?p=tree&amp;d=${directory}&amp;${page_this}}#$(urlsafe $info)">Dismiss</a>
32
33   <div class="pagination_nav">
34     <label>Page:</label>
35     <a href="?p=view&amp;${page_prev}">&lt;&lt;</a>
36     <a href="?p=view&amp;${page_this}">$(($page + 1))</a>
37     <a href="?p=view&amp;${page_next}">&gt;&gt;</a>
38   </div>
39 </form>
40
41 <div id="playctl">
42   <h1>$info</h1>
43   <a href="$video">Download</a>
44
45   <form action="?action=playctl" method="post">
46      <button type="submit" name="seek" value="-60">&lt;&lt;&lt;</button>
47      <button type="submit" name="seek" value="-10">&lt;&lt;</button>
48      <button type="submit" name="ctl" value="stop">&#x25a0;</button>
49      <button type="submit" name="ctl" value="pause">|| / &#x25b6;</button>
50      <button type="submit" name="seek" value="+10">&gt;&gt;</button>
51      <button type="submit" name="seek" value="+60">&gt;&gt;&gt;</button>
52      <br>
53      <button type="submit" name="amp" value="off">Amp Off</button>
54      <button type="submit" name="amp" value="on">Amp On</button>
55      <br>
56      $(for n in $(seq 0 5 100); do
57        printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' "$([ "$volume" = "$n" ] && printf selected)" "$n"
58      done)
59   </form>
60
61   <span class="info length">$(($length / 60)):$(($length % 60)) min</span>
62   <span class="info width" >Width: $width</span>
63   <span class="info height">Height: $height</span><br>
64   
65   $(printf %s\\n "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span> :g')
66   ${description:+<span class="info description">$(printf %s "$description" |_wiki)</span>}
67
68   <form class="panel" id="tagger" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
69     <input type="hidden" name="length" value="$length">
70     <input type="hidden" name="width" value="$width">
71     <input type="hidden" name="height" value="$height">
72
73     $(
74     for cat in $(list_categories); do
75       printf '<p class="newtag"><label class="category">%s:</label><select name="tag" size="12" multiple>' "${cat}"
76       catt="${cat}:"
77       [ "$catt" = "none:" ] && catt=''
78       
79       printf %s "$taglist" |egrep '^'"$catt"'[^:]+$' |while read line; do
80         printf '<option %s value="%s">%s</option>' \
81                "$(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && printf selected)" \
82                "$line" "${line#*:}"
83       done
84       printf '</select></p>'
85     done
86     )
87
88     <p class="newtag additional">
89       <label class="additional">Additional Tags (one per line):</label>
90       <textarea name="tags" rows="4"></textarea>
91     </p>
92     <p class="newtag description">
93       <label class="description">Description:</label>
94       <textarea name="description" rows="4">$description</textarea>
95     </p>
96     <input type="submit" value="Edit!">
97     <input type="submit" name="trash" value="Delete Video">
98
99     <a class="panel toggle" href="#foot">Hide</a>
100
101   </form>
102 </div>
103
104 <div class="panel footer" id="foot">
105   <a class="panel toggle" href="#tagger">Edit Tags</a>
106
107   <div class="pagination_nav">
108     <label>Page:</label>
109     <a href="?${page_prev}">&lt;&lt;</a>
110     <a href="?${page_this}">$(($page + 1))</a>
111     <a href="?${page_next}">&gt;&gt;</a>
112   </div>
113 </div>
114 EOF
115
116 # vi:set filetype=html: