From 42b236bb3964e938c8875d360e04900c0a91c288 Mon Sep 17 00:00:00 2001 From: Gerrit Linnemann Date: Mon, 16 Nov 2015 21:38:06 +0100 Subject: [PATCH] media query 4 small displays --- kitchenradio/app/radio.js | 6 +++--- kitchenradio/public/stylesheets/style.css | 19 ++++++++++++++++- kitchenradio/public/stylesheets/style.less | 24 +++++++++++++++++++++- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/kitchenradio/app/radio.js b/kitchenradio/app/radio.js index af97312..7f83d29 100644 --- a/kitchenradio/app/radio.js +++ b/kitchenradio/app/radio.js @@ -36,8 +36,8 @@ exports.init = function(Express, Configuration) { }); // set default volume level - Helper.shspawn('amixer scontrols'); - Helper.shspawn('amixer sset \'PCM\' '+volume+'%'); + //Helper.shspawn('amixer scontrols'); + //Helper.shspawn('amixer sset \'PCM\' '+volume+'%'); return this; } @@ -103,7 +103,7 @@ exports.volume = function(step) { Log.log('Radio: volume ' + (step>0 ? 'up' : 'down')); if(step != 0) { - volume = volume + step; + volume += step; if(volume > 100) { volume = 100; } if(volume < 0) { volume = 0; } diff --git a/kitchenradio/public/stylesheets/style.css b/kitchenradio/public/stylesheets/style.css index 70b48b5..a3dccfa 100644 --- a/kitchenradio/public/stylesheets/style.css +++ b/kitchenradio/public/stylesheets/style.css @@ -136,11 +136,14 @@ body { background-repeat: no-repeat; background-position: left top; } +.clearboth { + clear: both; +} a { color: #00B7FF; } .hidden { - display: none; + display: none !important; } #navigation { height: 70%; @@ -176,6 +179,20 @@ a { #navigation .tile:hover { background-color: rgba(255, 255, 255, 0.5); } +@media screen and (max-width: 320px) { + #navigation { + display: block; + text-align: center; + } + #navigation .tile { + display: inline-block; + width: 32%; + } + #navigation .tile .content .icon { + height: auto; + width: 88%; + } +} #controls { background-color: rgba(255, 255, 255, 0.25); height: 30%; diff --git a/kitchenradio/public/stylesheets/style.less b/kitchenradio/public/stylesheets/style.less index a5e42cd..1be3145 100644 --- a/kitchenradio/public/stylesheets/style.less +++ b/kitchenradio/public/stylesheets/style.less @@ -68,12 +68,16 @@ body { background-position: left top; } +.clearboth { + clear: both; +} + a { color: #00B7FF; } .hidden { - display: none; + display: none !important; } #navigation { @@ -114,6 +118,24 @@ a { background-color: @backgroundcolor_element_hover; } } + + @media screen and (max-width: 320px) { + display: block; + text-align: center; + + .tile { + display: inline-block; + width: 32%; + + .content { + + .icon { + height: auto; + width: 88%; + } + } + } + } } #controls {