]> git.plutz.net Git - serve0/blobdiff - templates/list.html.sh
styling for pagination links
[serve0] / templates / list.html.sh
index b5b1ef6800535b27135a2229bac23e11eb13a013..e60f3b8b4d4ac9792426c19876841a774c68819d 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2014 - 2016 Paul Hänsch
+# Copyright 2014 - 2017 Paul Hänsch
 #
 # This file is part of Serve0
 # 
@@ -16,6 +16,8 @@
 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
 
 cat <<EOF
+
+  <input type=radio name=topmenu id=btn_search checked><label for=btn_search>Search</label>
   <form class="panel" id="search" action="?" method="get" accept-charset="UTF-8">
     <input type="text" name="s" value="$search" placeholder="Search">
 
@@ -27,45 +29,46 @@ cat <<EOF
     </select>
     <!-- input type="submit" name="submit" value="Find" -->
 
-    <a class="panel clearsearch" href="?">Clear All</a>
-    <a class="panel toggle" href="#advfilter">Advanced</a>
+    <a class="panel clearsearch" href="?">Clear</a>
+  </form>
+
+  <input type=radio name=topmenu id=btn_advfilter><label for=btn_advfilter>Advanced</label>
+  $(. $_EXEC/templates/advfilter.html.sh)
+
+  <input type=radio name=topmenu id=btn_preferences><label for=btn_preferences>Preferences</label>
+  $(. $_EXEC/templates/preferences.html.sh)
+
+  <input type=radio name=topmenu id=btn_morelinks><label for=btn_morelinks>{+}</label>
+  <div class="panel switchable top" id="morelinks">
+    <a class="panel toggle" href="#">Hide</a>
+
+    <a class="panel treeview" href="?p=browse">Browse Folders</a>
     <a class="panel" href="?p=playctl">Player</a>
+  </div>
 
-    <div class="pagination_nav">
-      <label>Page:</label>
+  <form action="?action=multitag" method="post" accept-charset="UTF-8">
+    <input type="hidden" name="page" value="?$(attribsafe "${page_this}")">
+
+    <ul id="thumblist">
 EOF
 
+  thumblist
+
   pages="$(
   seq 1 $(pagecount) \
   | while read pn; do
     plink="$(($pn * $pagesize - $pagesize + 1))"
     
     case "$plink" in
-      $(($page - $pagesize))) class=previous;;
-      $page) class=current;;
-      $(($page + $pagesize))) class=next;;
-      ) class='';;
+      ($(($page - $pagesize))) class=previous;;
+      ($page) class=current;;
+      ($(($page + $pagesize))) class=next;;
+      (*) class='';;
     esac
-
+  
     printf '<a class="%s" href="?%spn=%s">%s</a>\n' "$class" "$page_link" "$plink" "$pn"
   done
   )"
-  printf %s "$pages"
-      
-cat <<EOF
-    </div>
-  </form>
-
-  <form action="?action=multitag" method="post" accept-charset="UTF-8">
-    <input type="hidden" name="o" value="${order}">
-    <input type="hidden" name="s" value="${search}">
-    <input type="hidden" name="f" value="${filter}">
-    <input type="hidden" name="pn" value="${page}">
-
-    <ul id="thumblist">
-EOF
-
-  thumblist
 
 cat <<EOF
     </ul>
@@ -74,8 +77,7 @@ cat <<EOF
 
   <div class="panel" id="foot">
     <a class="panel toggle" href="#tagger">Add Tags</a>
-    <a class="panel toggle" href="#preferences">Preferences</a>
-    <a class="panel treeview" href="?p=tree">Browse Folders</a>
+    <a class="panel toggle" href="#">⇧</a>
 
     <div class="pagination_nav">
       <label>Page:</label>
@@ -83,8 +85,6 @@ cat <<EOF
     </div>
   </div>
 
-  $(. $_EXEC/templates/preferences.html.sh)
-  $(. $_EXEC/templates/advfilter.html.sh)
 EOF
 
 # vi:set filetype=html: