* {
-moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-transition: all .25s linear;
transition: all .25s linear;
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; }
/* == 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 {
}
.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;
}
.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;
}
.panel.switchable.top a:first-of-type {
- display: block;
+ display: block; display: none;
margin-bottom: .5em;
border-bottom: 1px solid #FFF;
}
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%;
}
border-radius: .25em;
padding: .25em .5em;
}
+#advfilter .filter .help {
+ display: block;
+ height: 0; overflow: hidden;
+}
#advfilter .filter .tabcontainer {
position: relative;
width: 16em;
action="?action=filter" method="post" accept-charset="UTF-8">
<a class="panel toggle" href="#">Hide</a>
+ <a class="panel" href="?p=quicklinks">Most recent</a>
<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})
# You should have received a copy of the GNU Affero General Public License
# along with Serve0 If not, see <http://www.gnu.org/licenses/>.
+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 '<a class="%s" href="?%spn=%s">%s</a>\n' "$class" "$page_link" "$plink" "$pn"
+done
+)"
+
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">
<!-- input type="submit" name="submit" value="Find" -->
<a class="panel clearsearch" href="?">Clear</a>
- <a class="panel toggle" href="#morelinks">More</a>
+ </form>
- <div class="pagination_nav">
- <label>Page:</label>
-EOF
+ <input type=radio name=topmenu id=btn_advfilter><label for=btn_advfilter>Advanced</label>
+ $(. $_EXEC/templates/advfilter.html.sh)
- 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 '<a class="%s" href="?%spn=%s">%s</a>\n' "$class" "$page_link" "$plink" "$pn"
- done
- )"
- printf %s "$pages"
-
-cat <<EOF
- </div>
- </form>
+ <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 toggle" href="#advfilter">Advanced</a>
- <a class="panel toggle" href="#preferences">Preferences</a>
-
<a class="panel treeview" href="?p=tree">Browse Folders</a>
- <a class="panel" href="?p=quicklinks">Most recent</a>
-
<a class="panel" href="?p=playctl">Player</a>
</div>
- $(. $_EXEC/templates/preferences.html.sh)
<form action="?action=multitag" method="post" accept-charset="UTF-8">
<input type="hidden" name="o" value="${order}">
</div>
</div>
- $(. $_EXEC/templates/advfilter.html.sh)
EOF
# vi:set filetype=html:
# along with Serve0 If not, see <http://www.gnu.org/licenses/>.
cat <<EOF
-<form class="panel top" id="search" style="display: block;" action="?" method="get" accept-charset="UTF-8">
+
+<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">
- <label for="o1" class="order">Order by:</label>
<select class="order" size="1" name="o" id="o1">
+ <option class="label" selected disabled>Order by</option>
<option>Name</option>
<option>Date</option>
<option>Length</option>
</select>
- <input type="submit" name="submit" value="Find">
+ <!-- input type="submit" name="submit" value="Find" -->
- <a class="panel clearsearch" href="?">Clear All</a>
<a class="panel" href="${info:+?p=list&${page_this}}${directory:+?p=tree&d=${directory}&${page_this}}#$(urlsafe $info)">Dismiss</a>
</form>
+<input type=radio name=topmenu id=btn_playctl><label for=btn_playctl>Audio</label>
+<form class="panel switchable top playctl" id="advctl" action="?action=playctl" method="post">
+ <fieldset class="volume">
+ <button type="submit" name="amp" value="off">Amp Off</button>
+ <button type="submit" name="amp" value="on">Amp On</button>
+ </fieldset>
+ <fieldset class="pasink">
+ $(pa_sinks |while read no name; do
+ printf '<button type="submit" name="pasink" value="%s">%s</button>' "$no" "$name"
+ done)
+ </fieldset>
+ <a class="panel toggle" href="#foot">Hide</a>
+</form>
+
+<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 listview" href="?p=list">Index view</a>
+ <a class="panel treeview" href="?p=tree">Browse Folders</a>
+</div>
+
+
<div id="playctl">
<h1>$info</h1>
<a href="$video">Download</a>
${description:+<span class="info description">$(printf %s "$description" |_wiki)</span>}
</div>
-<form class="panel switchable bottom playctl" id="advctl" action="?action=playctl" method="post">
- <fieldset class="volume">
- <button type="submit" name="amp" value="off">Amp Off</button>
- <button type="submit" name="amp" value="on">Amp On</button>
- </fieldset>
- <fieldset class="pasink">
- $(pa_sinks |while read no name; do
- printf '<button type="submit" name="pasink" value="%s">%s</button>' "$no" "$name"
- done)
- </fieldset>
- <a class="panel toggle" href="#foot">Hide</a>
-</form>
-
<form class="panel switchable bottom" id="tagger" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
<input type="hidden" name="length" value="$length">
<input type="hidden" name="width" value="$width">
<div class="panel footer" id="foot">
<a class="panel toggle" href="#tagger">Edit Tags</a>
- <a class="panel toggle" href="#advctl">More</a>
</div>
<span class="progress">
# along with Serve0 If not, see <http://www.gnu.org/licenses/>.
cat <<EOF
- <form class="panel top" id="search" action="?" method="get" accept-charset="UTF-8">
+ <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">
- <input type="submit" name="submit" value="Find">
- <a class="panel clearsearch" href="?p=tree">Clear All</a>
- <a class="panel toggle" href="#morelinks">More</a>
+ <select class="order" size="1" name="o" id="o1">
+ <option class="label" selected disabled>Order by</option>
+ <option>Name</option>
+ <option>Date</option>
+ <option>Length</option>
+ </select>
+ <!-- input type="submit" name="submit" value="Find" -->
+
+ <a class="panel clearsearch" href="?">Clear</a>
</form>
+ <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 toggle" href="#advfilter">Advanced</a>
- <a class="panel toggle" href="#preferences">Preferences</a>
-
<a class="panel listview" href="?p=list">Index view</a>
- <a class="panel" href="?p=quicklinks">Most recent</a>
<a class="panel" href="?p=playctl">Player</a>
</div>
- $(. $_EXEC/templates/preferences.html.sh)
-
<form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8">
<ul id="thumblist">
$(filelist)
# along with Serve0 If not, see <http://www.gnu.org/licenses/>.
cat <<EOF
-<form class="panel top" id="search" style="display: block;" action="?" method="get" accept-charset="UTF-8">
+<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">
- <label for="o1" class="order">Order by:</label>
<select class="order" size="1" name="o" id="o1">
+ <option class="label" selected disabled>Order by</option>
<option>Name</option>
<option>Date</option>
<option>Length</option>
</select>
- <input type="submit" name="submit" value="Find">
+ <!-- input type="submit" name="submit" value="Find" -->
- <a class="panel clearsearch" href="?">Clear All</a>
- <a class="panel" href="${info:+?p=list&${page_this}#$(urlsafe $info)}${info:-?p=tree&d=${directory}&${page_this}}">Dismiss</a>
-
- <div class="pagination_nav">
- <label>Page:</label>
- <a href="?p=view&${page_prev}"><<</a>
- <a href="?p=view&${page_this}">$(($page + 1))</a>
- <a href="?p=view&${page_next}">>></a>
- </div>
+ <a class="panel" href="${info:+?p=list&${page_this}}${directory:+?p=tree&d=${directory}&${page_this}}#$(urlsafe $info)">Dismiss</a>
</form>
+<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 listview" href="?p=list">Index view</a>
+ <a class="panel treeview" href="?p=tree">Browse Folders</a>
+</div>
+
+
<div id="videoview">
<h1>$info</h1>
<source src="$video" type='video/mp4; codecs="avc1.4D401E, mp3"'>"
</video>
- <span class="info length">$(($length / 60)):$(($length % 60)) min</span>
+ <span class="info length">$(printf "%d:%02d min" $(($length / 60)) $(($length % 60)) )</span>
<span class="info width" >Width: $width</span>
<span class="info height">Height: $height</span><br>
$(printf %s\\n "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span> :g')
${description:+<span class="info description">$(printf %s "$description" |_wiki)</span>}
+</div>
- <form class="panel" id="tagger" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
- <input type="hidden" name="length" value="$length">
- <input type="hidden" name="width" value="$width">
- <input type="hidden" name="height" value="$height">
-
- $(
- for cat in $(list_categories); do
- printf '<p class="newtag"><label class="category">%s:</label><select name="tag" size="12" multiple>' "${cat}"
- catt="${cat}:"
- [ "$catt" = "none:" ] && catt=''
-
- printf %s "$taglist_set" |egrep '^'"$catt"'[^:]+$' |while read line; do
- printf '<option %s value="%s">%s</option>' \
- "$(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && printf selected)" \
- "$line" "${line#*:}"
- done
- printf '</select></p>'
+<form class="panel switchable bottom" id="tagger" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
+ <input type="hidden" name="length" value="$length">
+ <input type="hidden" name="width" value="$width">
+ <input type="hidden" name="height" value="$height">
+
+ $(
+ for cat in $(list_categories); do
+ printf '<fieldset class="newtag"><label class="category">%s:</label><select name="tag" size="12" multiple>' "${cat}"
+ catt="${cat}:"
+ [ "$catt" = "none:" ] && catt=''
+
+ printf %s "$taglist_set" |egrep '^'"$catt"'[^:]+$' |while read line; do
+ printf '<option %s value="%s">%s</option>' \
+ "$(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && printf selected)" \
+ "$line" "${line#*:}"
done
- )
-
- <p class="newtag additional">
- <label class="additional">Additional Tags (one per line):</label>
- <textarea name="tags" rows="4"></textarea>
- </p>
- <p class="newtag description">
- <label class="description">Description:</label>
- <textarea name="description" rows="4">$description</textarea>
- </p>
- <input type="submit" value="Edit!">
- <input type="submit" name="trash" value="Delete Video">
-
- <a class="panel toggle" href="#foot">Hide</a>
-
- </form>
-</div>
+ printf '</select></fieldset>'
+ done
+ )
+
+ <fieldset class="newtag additional">
+ <label class="additional">Additional Tags (one per line):</label>
+ <textarea name="tags" rows="4"></textarea>
+ </fieldset>
+ <fieldset class="newtag description">
+ <label class="description">Description:</label>
+ <textarea name="description" rows="4">$description</textarea>
+ </fieldset>
+ <input type="submit" value="Edit!">
+ <input type="submit" name="trash" value="Delete Video">
+
+ <a class="panel toggle" href="#foot">Hide</a>
+</form>
<div class="panel bottom" id="foot">
<a class="panel toggle" href="#tagger">Edit Tags</a>
-
- <div class="pagination_nav">
- <label>Page:</label>
- <a href="?${page_prev}"><<</a>
- <a href="?${page_this}">$(($page + 1))</a>
- <a href="?${page_next}">>></a>
- </div>
</div>
EOF