]> git.plutz.net Git - serve0/commitdiff
better alignment of playback buttons
authorpaul <paul@plutz.net>
Thu, 14 Jul 2016 09:16:30 +0000 (09:16 +0000)
committerpaul <paul@plutz.net>
Thu, 14 Jul 2016 09:16:30 +0000 (09:16 +0000)
svn path=/trunk/; revision=140

static/common.css
templates/playctl.html.sh

index 2e8effc0450459a2f204949abc3533b8ac19781c..516dff548e5d034bf30f2333f153d4428aefc0db 100644 (file)
@@ -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;}
-}
-
index e361ddae4cb316de57237f93aea8cf7f2c4ec4c3..62798500fab31c0c846dca270503235fd77b95e5 100755 (executable)
@@ -36,21 +36,21 @@ cat <<EOF
   <a href="$video">Download</a>
 
   <form action="?action=playctl" method="post">
-     <button type="submit" name="seek" value="-60">&lt;&lt;&lt;</button>
-     <button type="submit" name="seek" value="-10">&lt;&lt;</button>
-     <button type="submit" name="ctl" value="stop">&#x25a0;</button>
-     <button type="submit" name="ctl" value="pause">|| / &#x25b6;</button>
-     <button type="submit" name="seek" value="+10">&gt;&gt;</button>
-     <button type="submit" name="seek" value="+60">&gt;&gt;&gt;</button>
-     <br>
-     <button type="submit" name="amp" value="off">Amp Off</button>
-     <button type="submit" name="amp" value="on">Amp On</button>
-     <br>
-     $(for n in $(seq 0 5 100); do
-       printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' "$([ "$volume" = "$n" ] && printf selected)" "$n"
-     done)
-     <br>
-     <!--button type="submit" name="osd" value="progression">Progress</button -->
+     <fieldset class="playback">
+       <button type="submit" name="seek" value="-60">&lt;&lt;&lt;</button>
+       <button type="submit" name="seek" value="-10">&lt;&lt;</button>
+       <button type="submit" name="ctl" value="stop">&#x25a0;</button>
+       <button type="submit" name="ctl" value="pause">|| / &#x25b6;</button>
+       <button type="submit" name="seek" value="+10">&gt;&gt;</button>
+       <button type="submit" name="seek" value="+60">&gt;&gt;&gt;</button>
+     </fieldset>
+     <fieldset class="volume">
+       <button type="submit" name="amp" value="off">Amp Off</button>
+       <button type="submit" name="amp" value="on">Amp On</button>
+       $(for n in $(seq 0 5 100); do
+         printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' "$([ "$volume" = "$n" ] && printf selected)" "$n"
+       done)
+     </fieldset>
   </form>
 
   <span class="info length">$(printf "%d:%02d min" $(($length / 60)) $(($length % 60)) )</span>