From cf7e00db16a1ff076df29fc9d4531ea0b19c6243 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 12 Oct 2016 09:31:43 +0000 Subject: [PATCH] tabbed interface svn path=/trunk/; revision=152 --- static/common.css | 70 +++++++++++++++++++----- templates/advfilter.html.sh | 1 + templates/list.html.sh | 55 +++++++++---------- templates/playctl.html.sh | 49 ++++++++++------- templates/tree.html.sh | 25 +++++---- templates/view.html.sh | 105 ++++++++++++++++++------------------ 6 files changed, 179 insertions(+), 126 deletions(-) diff --git a/static/common.css b/static/common.css index e6de713..94c0c29 100644 --- a/static/common.css +++ b/static/common.css @@ -18,6 +18,7 @@ * { -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; box-sizing: border-box; -moz-transition: all .25s linear; transition: all .25s linear; @@ -25,10 +26,12 @@ body { padding: 0; + padding-top: 3em; margin: 0; background-color: #000; color: #DDD; } +body.playctl { padding-top: 4.25em; } a { color: #EEE; } legend, label, .label { font-weight: bold; } @@ -94,6 +97,40 @@ textarea { /* == Panels == */ +body:before { + position: absolute; display: block; + top: -1px; height: 2.25em; width: 100%; + background-color: #222; + margin: 0; padding: 0; + padding-top: .5em; + border-bottom: 1px solid #FFF; + content: ''; +} +body.playctl:before { + top: -2px; + margin-top: 1.25em; + border-top: 1px solid #FFF; +} + +input[name=topmenu] {display: none;} +input[name=topmenu] + label { + position: relative; + top: -3em; + max-width: 25%; + margin: .5em 0 0 0; + display: inline-block; + text-decoration: none; + padding: .5em 1.5em; + line-height: 1.25em; + transition: none; + border: 1px none #FFF; +} +input[name=topmenu]:checked + label { + background-color: #333; + margin-left: -1px; margin-top: -1px; + border-style: solid solid none solid; +} +input[name=topmenu]:checked + label + * + input + label { margin-left: -1px; } .panel#search select { margin-right: .5em; } .panel#search:after { @@ -113,10 +150,15 @@ textarea { } .panel#search, .panel.top { - position: relative; top: 0; border-style: none none solid none; + top: 2.75em; } -.panel.top.switchable { position: absolute; } +body.playctl .panel#search, +body.playctl .panel.top { top: 4em; } + + +.panel#search, +.panel.top.switchable { position: absolute; min-height: 2.5em;} .panel#foot, .panel.bottom { position: fixed; bottom: 0; @@ -124,25 +166,23 @@ textarea { } .panel.switchable { + display: none; max-height: 0; overflow: hidden; margin: 0; padding: 0; border-width: 0; } + +input[name=topmenu]:checked + label + .panel.switchable, .panel.switchable:target { + display: block; max-height: 80%; - overflow-y: scroll; + overflow-y: auto; padding: .25em .5em; border-width: 1px; z-index: 2; } -body.playctl .panel#search, -body.playctl .panel.top { - margin-top: 1.25em; - border-top: 1px solid #FFF; -} - .panel#search > a, .panel#foot > a, .panel.top > a, .panel.bottom > a{ display: inline-block; @@ -152,7 +192,7 @@ body.playctl .panel.top { } .panel.switchable.top a:first-of-type { - display: block; + display: block; display: none; margin-bottom: .5em; border-bottom: 1px solid #FFF; } @@ -171,11 +211,11 @@ body.playctl .panel.top { display: inline-block; vertical-align: top; margin-top: 1em; - max-width: 48%; } -.panel.switchable > fieldset.additional, -.panel.switchable > fieldset.description { +#tagger > fieldset { max-width: 48%;} +#tagger > fieldset.additional, +#tagger > fieldset.description { max-width: 100%; } @@ -187,6 +227,10 @@ body.playctl .panel.top { border-radius: .25em; padding: .25em .5em; } +#advfilter .filter .help { + display: block; + height: 0; overflow: hidden; +} #advfilter .filter .tabcontainer { position: relative; width: 16em; diff --git a/templates/advfilter.html.sh b/templates/advfilter.html.sh index 5d27f3b..3f8c620 100755 --- a/templates/advfilter.html.sh +++ b/templates/advfilter.html.sh @@ -61,6 +61,7 @@ cat < Hide + Most recent

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.

$(filterbox {0..9}) diff --git a/templates/list.html.sh b/templates/list.html.sh index e25daf3..21dfd11 100755 --- a/templates/list.html.sh +++ b/templates/list.html.sh @@ -15,7 +15,25 @@ # You should have received a copy of the GNU Affero General Public License # along with Serve0 If not, see . +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='';; + esac + + printf '%s\n' "$class" "$page_link" "$plink" "$pn" +done +)" + cat <