]> git.plutz.net Git - serve0/commitdiff
increase number of quicklinks, make player panel available in tree view
authorpaul <paul@plutz.net>
Wed, 13 Apr 2016 12:10:57 +0000 (12:10 +0000)
committerpaul <paul@plutz.net>
Wed, 13 Apr 2016 12:10:57 +0000 (12:10 +0000)
svn path=/trunk/; revision=117

pages/list.sh
static/common.css [changed mode: 0755->0644]
templates/list.html.sh
templates/playpanel.html.sh [new file with mode: 0755]
templates/tree.html.sh

index 063bf40893e1b67e74e29ac6f61f6069318eb7dd..fc4ff66ceab3d8508be5deabc876b4661f4773f2 100755 (executable)
@@ -42,13 +42,13 @@ fi
 quicklinks(){
   output=''
   tac ${_DATA}/meta/recent \
-  | while [ "$(printf %s "$output" |wc -l)" -lt 10 ] && read line; do
+  | while [ "$(printf %s "$output" |wc -l)" -lt 30 ] && read line; do
     printf %s "$output" |grep -qF "$line" || output="$output$line$LF"
   done 
   printf %s "$output" |while read line; do
     linef=$(printf %s "$line" |sed -r 's;^.*(\?|&)f=([^&]+)&?.*$;\2;g')
     lineo=$(printf %s "$line" |sed -r 's;^.*(\?|&)o=([^&]+)&?.*$;\2;g')
-    printf %s "<a href="$line">by ${lineo}: $(present_filter "$linef")</a>" 
+    printf '<input type="checkbox"><a href="%s">by %s: %s</a>' "$line" "${lineo}" "$(present_filter "$linef")"
   done
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index a995fd6..96f15be
@@ -247,12 +247,20 @@ div.panel {
   margin-left: 1em;
 }
 
-#advfilter .quicklinks {max-width: 100%;}
-#advfilter .quicklinks * {
-  display: block;
+#advfilter .quicklinks {width: 100%;}
+#advfilter .quicklinks :first-child {width: 100%;}
+#advfilter .quicklinks input { display: none; }
+#advfilter .quicklinks a {
+  display: none;
   word-wrap: break-word;
+  margin-left: 10%;
   margin-bottom: .75em;
+  margin-top: -1.5em;
 }
+#advfilter .quicklinks:hover input,
+#advfilter .quicklinks:hover a {display: block;}
+#advfilter .quicklinks input:checked,
+#advfilter .quicklinks input:checked + a { display: none;}
 
 /* == Thumblist == */
 
index e54f3c25d60ef0ebe35e43211f8d2dd813dbc190..2e49dd507fd01189b3fe99df7609cd0271a4067a 100755 (executable)
@@ -42,27 +42,7 @@ cat <<EOF
     </div>
   </form>
 
-  <div class="panel" id="playctl">
-     <a class="panel toggle" href="#">Hide</a>
-     <form action="?action=playctl" method="post">
-       <button type="submit" name="seek" value="-60">&lt;&lt;&lt;</button>
-       <button type="submit" name="seek" value="-10">&lt;&lt;</button>
-       <button type="submit" name="ctl" value="stop">&#x25a0;</button>
-       <button type="submit" name="ctl" value="pause">|| / &#x25b6;</button>
-       <button type="submit" name="seek" value="+10">&gt;&gt;</button>
-       <button type="submit" name="seek" value="+60">&gt;&gt;&gt;</button>
-       <br>
-       <button type="submit" name="amp" value="off">Amp Off</button>
-       <button type="submit" name="amp" value="on">Amp On</button>
-       <br>
-       $(for n in $(seq 0 5 100); do
-         printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' "$([ "$volume" = "$n" ] && printf selected)" "$n"
-       done)
-       <br>
-       <button type="submit" name="osd" value="progression">Progress</button>
-     </form>
-  </div>
-
+  $(. $_EXEC/templates/playpanel.html.sh)
 
   <form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8">
     <ul id="thumblist">
diff --git a/templates/playpanel.html.sh b/templates/playpanel.html.sh
new file mode 100755 (executable)
index 0000000..f3a9f15
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 2016 Paul Hänsch
+#
+# This file is part of Serve0
+# 
+# Serve0 is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# Serve0 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 Serve0  If not, see <http://www.gnu.org/licenses/>. 
+
+cat <<EOF
+  <div class="panel" id="playctl">
+     <a class="panel toggle" href="#">Hide</a>
+     <form action="?action=playctl" method="post">
+       <button type="submit" name="seek" value="-60">&lt;&lt;&lt;</button>
+       <button type="submit" name="seek" value="-10">&lt;&lt;</button>
+       <button type="submit" name="ctl" value="stop">&#x25a0;</button>
+       <button type="submit" name="ctl" value="pause">|| / &#x25b6;</button>
+       <button type="submit" name="seek" value="+10">&gt;&gt;</button>
+       <button type="submit" name="seek" value="+60">&gt;&gt;&gt;</button>
+       <br>
+       <button type="submit" name="amp" value="off">Amp Off</button>
+       <button type="submit" name="amp" value="on">Amp On</button>
+       <br>
+       $(for n in $(seq 0 5 100); do
+         printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' "$([ "$volume" = "$n" ] && printf selected)" "$n"
+       done)
+       <br>
+       <button type="submit" name="osd" value="progression">Progress</button>
+     </form>
+  </div>
+EOF
+
+# vi:set filetype=html:
index 9ddffbe6a6f2e8e85a8f4ee8609af38c66d36e1a..1b2a38a18cc4a9ad841225f76119dc91b0985044 100755 (executable)
@@ -21,8 +21,11 @@ cat <<EOF
     <input type="submit" name="submit" value="Find">
 
     <a class="panel clearsearch" href="?p=tree">Clear All</a>
+    <a class="panel toggle" href="#playctl">Player</a>
   </form>
 
+  $(. $_EXEC/templates/playpanel.html.sh)
+
   <form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8">
     <ul id="thumblist">
       $(filelist)