From c107b42c61b01b9deef58e8d40ac642fc3d94d08 Mon Sep 17 00:00:00 2001 From: paul <paul@plutz.net> Date: Sun, 2 Aug 2015 17:40:52 +0000 Subject: [PATCH] display improvements for text browsers and mobile browsers svn path=/trunk/; revision=71 --- pages/common.sh | 2 +- templates/advfilter.html.sh | 14 +--- templates/common.css.sh | 125 +++++++++++++++++----------------- templates/list.html.sh | 7 +- templates/preferences.html.sh | 3 +- templates/tagger.html.sh | 4 +- 6 files changed, 71 insertions(+), 84 deletions(-) diff --git a/pages/common.sh b/pages/common.sh index 377e5f5..efb61fd 100755 --- a/pages/common.sh +++ b/pages/common.sh @@ -75,7 +75,7 @@ _printVideo(){ <input type="checkbox" name="tagsel" value="$info"> <span class="info property">${minutes}min</span> <span class="info property">${width}x${height}</span> - $(printf %s "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span>:g') + $(printf %s "$tags" |sed -r 's:\|*([^|]+)\|*: <span class="info tag">\1</span>:g') </li> VIDEOend fi diff --git a/templates/advfilter.html.sh b/templates/advfilter.html.sh index ce7d6ce..74860bc 100755 --- a/templates/advfilter.html.sh +++ b/templates/advfilter.html.sh @@ -18,13 +18,13 @@ category_tabs(){ for cat in "$@"; do cat <<EOF - <div class="tab"> + <div class="tab"> <input class="tabhandle" type="radio" name="category$n" id="cat${n}_$cat" value="$cat" $([ "$cat" = "$fcat" ] && echo checked)> <label class="category tabhandle" for="cat${n}_$cat">$([ "$cat" = none ] && printf %s general || printf %s "$cat")</label> <select class="category tabcontent" class="input tagfilter" name="cfilter${n}_" size="12" multiple> $(category_selected "$cat" "$filter") </select> - </div> + </div> EOF done } @@ -59,18 +59,8 @@ filterbox(){ cat <<EOF <form class="panel" id="advfilter" action="?action=filter" method="post" accept-charset="UTF-8"> - <input disabled type="text" name="s" value="$search" placeholder="Search"> - <label for="o2" class="order">Order by:</label> - <select disabled class="order" size="1" name="o" id="o2"> - <option>Name</option> - <option>Date</option> - <option>Length</option> - </select> - <input disabled type="submit" name="submit" value="Find"> - <a class="panel clearsearch" href="?">Clear All</a> <a class="panel advanced hide" href="#">Hide</a> - <hr> <p class="help">Up to <strong>10</strong> filter boxes will appear as you start selecting tags. You can select <strong>multiple</strong> tags in each box by holding down the <strong>Ctrl</strong>-key. Click the "<strong>Filter!</strong>" button when you are ready.</p> $(filterbox {0..9}) diff --git a/templates/common.css.sh b/templates/common.css.sh index 706ac85..0747d08 100755 --- a/templates/common.css.sh +++ b/templates/common.css.sh @@ -1,4 +1,4 @@ -# Copyright 2014 Paul Hänsch +# Copyright 2014, 2015 Paul Hänsch # # This file is part of Serve0 # @@ -28,18 +28,13 @@ body { background-color: #000; color: #DDD; } +a { color: #EEE; } +label, .label { font-weight: bold; } input.tabhandle { display: none; } .tabcontent { display: none; } -input.tabhandle:checked ~ .tabcontent { display: inline-block; } - -a { - color: #EEE; -} - -label, .label { - font-weight: bold; -} +input.tabhandle:checked + label.tabhandle + .tabcontent { display: inline-block; } +input.tabhandle:checked + .tabcontent { display: inline-block; } textarea { display: block; @@ -67,10 +62,16 @@ textarea { border-width: 1px; border-style: none none solid none; } -a.panel { - font-weight: bold; +.panel.footer { + position: fixed; + min-height: 2em; + bottom: 0px; + border-style: solid none none none; } -a.clearsearch, a.advanced, a.tagger, .pagination_nav { + +.panel .help { display: block;} +a.panel { font-weight: bold; } +a.clearsearch, a.show, .pagination_nav { display: inline; border: none; } @@ -80,59 +81,54 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav { padding-top: .125em; } -.panel .quicklinks, -.footer .newtag, .footer input[type=submit] { - display: inline-block; - vertical-align: top; - margin-top: 2em; -} -.panel .help { - display: block; +.footer a.panel { + border-style: solid none none none; + border-width: 1px; + margin-top: .5em; } -.footer .newtag select, .footer .newtag .label{ + +#advfilter { display: none; } +#advfilter:target { display: block; - width: 10em; -} -.panel .filter .help.conjunction { - font-weight: bold; + position: absolute; + top: 0; } -.panel .filter .label.category { - display: block; + +#advfilter .quicklinks, +#advfilter .filter, +#tagger .newtag, +#tagger input[type=submit] { + display: inline-block; + vertical-align: top; margin-top: 1em; } -.panel .quicklinks * { - display: block -} -.panel .filter { - vertical-align: top; - border: solid 1px #FFF; border-radius: .25em; +#advfilter .filter { + border: solid 1px #FFF; + border-radius: .25em; padding: .25em .5em; - margin: 0 0 1em 0; } -.panel > label.tabhandle { - display: inline-block; +#advfilter > label.tabhandle { text-align: right; width: 4em; margin-left: 4em; } -.panel > .tabhandle + label { display: none; } -.panel > .tabhandle + label + .tabcontent { display: none; } -.panel > .tabhandle:checked + label.tabhandle + .tabcontent { display: inline-block; } -.panel > .tabhandle:checked + label.tabhandle + .tabcontent + .tabhandle + label{ display: inline-block; } -.panel > .tabhandle:checked + label.tabhandle + .tabcontent + .tabhandle:checked + label{ display: none; } -.panel .filter .tabcontainer { +#advfilter > .tabhandle + label { display: none; } +#advfilter > .tabhandle + label + .tabcontent { display: none; } +#advfilter > .tabhandle:checked + label + .tabcontent { display: inline-block; } +#advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle + label{ display: inline-block; } +#advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle:checked + label{ display: none; } + +#advfilter .filter .tabcontainer { position: relative; width: 16em; } -.panel .filter .category.tabhandle { - display: block; -} -.panel .filter input:checked + .category.tabhandle { +#advfilter .filter .category.tabhandle { display: block; } +#advfilter .filter input:checked + .category.tabhandle { background: #FFF; color: #000; } -.panel .filter .category.tabcontent { +#advfilter .filter .category.tabcontent { position: absolute; top: 0; right: 0; width: 10em; @@ -140,12 +136,17 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav { min-height: 4em; } -.panel .filter.final { - display: inline-block; +#advfilter .filter.final { width: 16em; margin-left: 1em; } +#advfilter .quicklinks {max-width: 100%;} +#advfilter .quicklinks * { + display: block; + word-wrap: break-word; +} + #thumblist { width: 100%; padding: .5em 0 3em 0; @@ -185,23 +186,19 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav { margin: .75em .5em; } -#advfilter { display: none; } -#advfilter:target { - display: block; - position: absolute; - top: 0; -} - #preferences { display: none; } #preferences:target { display: block; z-index: 1; } + #tagger { display: none; } -#tagger:target { display: block; z-index: 1; } -.footer { - position: fixed; - min-height: 2em; - bottom: 0px; - width: 100%; - border-style: solid none none none; +#tagger:target { + display: block; + z-index: 1; +} + +#tagger .newtag select, +#tagger .newtag .label{ + display: block; + width: 10em; } #videoview a.panel { diff --git a/templates/list.html.sh b/templates/list.html.sh index 65a1e26..dd35173 100755 --- a/templates/list.html.sh +++ b/templates/list.html.sh @@ -39,8 +39,6 @@ cat <<EOF </div> </form> - $(. $_EXEC/templates/advfilter.html.sh) - <form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8"> <ul id="thumblist"> $(thumblist) @@ -48,8 +46,6 @@ cat <<EOF $(. $_EXEC/templates/tagger.html.sh) </form> - $(. $_EXEC/templates/preferences.html.sh) - <div class="panel footer" id="foot"> <a class="panel tagger show" href="#tagger">Add Tags</a> <a class="panel tagger show" href="#preferences">Preferences</a> @@ -61,6 +57,9 @@ cat <<EOF <a href="?${page_next}">>></a> </div> </div> + + $(. $_EXEC/templates/preferences.html.sh) + $(. $_EXEC/templates/advfilter.html.sh) EOF # vi:set filetype=html: diff --git a/templates/preferences.html.sh b/templates/preferences.html.sh index f472142..ee0e8be 100755 --- a/templates/preferences.html.sh +++ b/templates/preferences.html.sh @@ -18,7 +18,6 @@ cat <<EOF <form class="panel footer" id="preferences" action="?action=preferences" method="post" accept-charset="UTF-8"> - <a class="panel hide" href="#foot">Hide</a> <input type="checkbox" name="fakemp4" value="yes" $([ "${_COOKIE[fakemp4]}" = yes ] && printf 'checked') id="ck_fakemp4"> <label for="ck_fakemp4">Fake .mp4 file ending, even if file is of different type</label> @@ -38,6 +37,8 @@ cat <<EOF <label for="rd_wserv">on screen connected to server</label><br> <input type="submit" value="Set Cookie!"> + + <a class="panel hide" href="#foot">Hide</a> </form> EOF diff --git a/templates/tagger.html.sh b/templates/tagger.html.sh index 779f29c..20fdc84 100755 --- a/templates/tagger.html.sh +++ b/templates/tagger.html.sh @@ -39,8 +39,6 @@ EOF cat <<EOF <div class="panel footer" id="tagger"> - <a class="panel tagger hide" href="#foot">Hide</a> - <hr> <p class="help">Add selectetd tags to selected videos.</p> $(category_box $(list_categories)) <p class="newtag additional"> @@ -48,6 +46,8 @@ cat <<EOF <textarea name="tags" rows="2"></textarea> </p> <input type="submit" value="Add Tags!"> + + <a class="panel hide" href="#foot">Hide</a> </div> EOF -- 2.39.5