From: paul Date: Thu, 14 Jul 2016 09:16:30 +0000 (+0000) Subject: better alignment of playback buttons X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=e4964c907ee9df48038007a62da802201a98bb87;p=serve0 better alignment of playback buttons svn path=/trunk/; revision=140 --- diff --git a/static/common.css b/static/common.css index 2e8effc..516dff5 100644 --- a/static/common.css +++ b/static/common.css @@ -364,24 +364,36 @@ p.quicklinks input:checked + a { display: none;} width: 100%; } -#playctl form { text-align: center; } -#playctl form button { - display: inline-block; - height: 100%; - min-height: 4em; - margin: 0 -.75ex .5em 0; +#playctl form fieldset { + display: block; + position: relative; + width: 100%; + border: none; + text-align: center; +} +#playctl form fieldset.playback { height: 12em; } +#playctl form fieldset.playback button { + position: absolute; + height: 6em; + padding-top: 1em; background-color: #EEE; border: 1px solid #333; - vertical-align: bottom; - padding-top: 1em; } -#playctl form button[name="seek"], -#playctl form button[name="ctl"] { width: 40%;} -#playctl form button[name="amp"] { width: 40%; margin-top: 2em;} -#playctl form button[name="vol"] { width: 5%; min-height: 1em;} -#playctl form button[name="vol"].selected { background-color: #FA6;} -#playctl form button[name="vol"][value="100"], -#playctl form button[name="vol"][value="0"] { width: 6%;} +#playctl form fieldset.playback button[value="-60"] {top: 6em; left: 0; width: 20%;} +#playctl form fieldset.playback button[value="-10"] {top: 6em; left: 20%; width: 30%;} +#playctl form fieldset.playback button[value="stop"] {top: 0; left: 0; width: 40%;} +#playctl form fieldset.playback button[value="pause"] {top: 0; right: 0; width: 60%;} +#playctl form fieldset.playback button[value="+10"] {top: 6em; right: 20%; width: 30%;} +#playctl form fieldset.playback button[value="+60"] {top: 6em; right: 0; width: 20%;} + +#playctl form fieldset.volume { height: 7em; } +#playctl form fieldset.volume button[name="amp"] {position: absolute; width: 50%; height: 4em; top: 0;} +#playctl form fieldset.volume button[value="off"] {left:0;} +#playctl form fieldset.volume button[value="on"] {right:0;} +#playctl form fieldset.volume button[name="vol"] {position: relative; display: inline-block; top: 5em; width: 4%;} +#playctl form fieldset.volume button[name="vol"].selected { background-color: #FA6;} +#playctl form fieldset.volume button[name="vol"][value="100"], +#playctl form fieldset.volume button[name="vol"][value="0"] { width: 4%;} span.progress { display: block; @@ -399,18 +411,3 @@ span.progress > * { text-align: center; background-color: #333; } - -@media (min-width: 460px){ - #playctl form button { - max-width: 4em; - min-height: 2em; - padding-top: 0em; - margin-bottom: 2em; - } - #playctl form button[name="seek"], - #playctl form button[name="ctl"] { width: 16%;} - #playctl form button[name="amp"] { width: 15%;} - #playctl form button[name="vol"] { width: 3%;} - #playctl form button[name="amp"] + br {display: none;} -} - diff --git a/templates/playctl.html.sh b/templates/playctl.html.sh index e361dda..6279850 100755 --- a/templates/playctl.html.sh +++ b/templates/playctl.html.sh @@ -36,21 +36,21 @@ cat <Download
- - - - - - -
- - -
- $(for n in $(seq 0 5 100); do - printf '' "$([ "$volume" = "$n" ] && printf selected)" "$n" - done) -
- +
+ + + + + + +
+
+ + + $(for n in $(seq 0 5 100); do + printf '' "$([ "$volume" = "$n" ] && printf selected)" "$n" + done) +
$(printf "%d:%02d min" $(($length / 60)) $(($length % 60)) )