From 3328f743ac5b2dff350e9981e113b205047a7caa Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 29 Jul 2015 16:05:21 +0000 Subject: [PATCH] merged filter and list page svn path=/trunk/; revision=64 --- pages/filter.sh | 35 -------------- pages/list.sh | 3 ++ .../{filter.html.sh => advfilter.html.sh} | 17 +------ templates/common.css.sh | 7 +++ templates/list.html.sh | 31 ++----------- templates/tagger.html.sh | 46 +++++++++++++++++++ 6 files changed, 61 insertions(+), 78 deletions(-) delete mode 100755 pages/filter.sh rename templates/{filter.html.sh => advfilter.html.sh} (91%) create mode 100755 templates/tagger.html.sh diff --git a/pages/filter.sh b/pages/filter.sh deleted file mode 100755 index 9f7483c..0000000 --- a/pages/filter.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/zsh - -# Copyright 2014, 2015 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 . - -. $_EXEC/pages/common.sh - -filters="$(echo -E "$_GET[\"f\"]" |sed -r 's;^!*\^*;;; s;\^*!*$;;; s;!+;!;g; s;\^+;^;g')" -debug "FILTERS: $filters" - -case "$1" in - title) - echo "Videos" - ;; - css) - . ${_EXEC}/templates/common.css.sh - ;; - body) - . ${_EXEC}/templates/filter.html.sh - ;; -esac diff --git a/pages/list.sh b/pages/list.sh index 34b4339..f970a32 100755 --- a/pages/list.sh +++ b/pages/list.sh @@ -19,6 +19,9 @@ . $_EXEC/pages/common.sh +filters="$(echo -E "$_GET[\"f\"]" |sed -r 's;^!*\^*;;; s;\^*!*$;;; s;!+;!;g; s;\^+;^;g')" +debug "FILTERS: $filters" + case "$1" in title) echo "Videos" diff --git a/templates/filter.html.sh b/templates/advfilter.html.sh similarity index 91% rename from templates/filter.html.sh rename to templates/advfilter.html.sh index 86d5b2b..80ec4c2 100755 --- a/templates/filter.html.sh +++ b/templates/advfilter.html.sh @@ -28,7 +28,7 @@ cat < Clear All - Hide + Hide

Up to 10 filter boxes will appear as you start selecting tags. You can select multiple tags in each box by holding down the Ctrl-key. Click the "Filter!" button when you are ready.

@@ -104,21 +104,6 @@ cat < - -
-
    - $(thumblist) -
- - -
EOF # vi:set filetype=html: diff --git a/templates/common.css.sh b/templates/common.css.sh index c9ca351..02d02f3 100755 --- a/templates/common.css.sh +++ b/templates/common.css.sh @@ -180,6 +180,13 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav { margin: .75em .5em; } +#advfilter { display: none; } +#advfilter:target { + display: block; + position: absolute; + top: 0; +} + #tagger { display: none; } #tagger:target { display: block; z-index: 1; } .footer { diff --git a/templates/list.html.sh b/templates/list.html.sh index eed4fef..ca875df 100755 --- a/templates/list.html.sh +++ b/templates/list.html.sh @@ -29,7 +29,7 @@ cat < Clear All - Advanced + Advanced
@@ -39,36 +39,13 @@ cat < + $(. $_EXEC/templates/advfilter.html.sh) +
    $(thumblist)
- - + $($_EXEC/templates/tagger.html.sh)
+EOF + +# vi:set filetype=html: -- 2.39.2