From 4c36e4d9f491d1f75295e7c8a3c31e5aaa59acc8 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sun, 22 Sep 2013 09:27:56 +0000 Subject: [PATCH] adaptive resolution start --- raspberry-kiosk/kiosk.css | 23 +++++++++++--------- raspberry-kiosk/kiosk.html | 5 +++-- raspberry-kiosk/kiosk.js | 10 ++++----- raspberry-kiosk/kiosk1.html | 4 ++-- raspberry-kiosk/kiosk2cal.html | 1 + raspberry-kiosk/kiosk768x1366.html | 42 ++++++++++++++++++++++++++++++++++++ raspberry-kiosk/start-kiosk.sh | 8 +++++-- 7 files changed, 72 insertions(+), 21 deletions(-) create mode 100644 raspberry-kiosk/kiosk768x1366.html diff --git a/raspberry-kiosk/kiosk.css b/raspberry-kiosk/kiosk.css index 9aa7ff1..f069ea4 100644 --- a/raspberry-kiosk/kiosk.css +++ b/raspberry-kiosk/kiosk.css @@ -17,7 +17,7 @@ div#siteheader { text-align: center; color: white; background-color: rgb(118, 20, 7); - font-size:40px; + font-size:180%; font-weight: bold; margin-top:10px; } @@ -79,7 +79,7 @@ p.topic { margin-right:0px; font-weight: bold; font-variant:small-caps; - font-size:22px; + font-size:100%; color: white; text-align:center; background-color: #272727; @@ -88,7 +88,7 @@ p.topic { div.calendar { width: 100%; height: 13em; - font-size:26px; + font-size:112%; } ul { @@ -136,15 +136,16 @@ td.anwesenheitsstatus { vertical-align:middle; display:table-cell; font-weight:bold; - font-size:30px; + font-size:136%; } td.sensorstatus { - height:50px; + height:42px; text-align:center; vertical-align:middle; display:table-cell; - background-color: Gainsboro; + background-color: white; + font-size:66%; } div.sensorelem { @@ -194,7 +195,7 @@ p.gplustimestamp { margin-left:4px; margin-bottom:4px; margin-right:0; - font-size:9pt; + font-size:41%; color:DimGray; background-color: Gainsboro; border-bottom-left-radius:9px; @@ -215,16 +216,18 @@ table.gplusimg { } p.gplustxt { display:block; - font-size:11pt; + font-size:66%; margin: 4px; } div#dateclock { text-align: center; - font-size: 1.2em; font-weight: bold; color: white; background-color: #272727; - font-size:48px; + font-size:217%; } +table { + font-size: 100%; +} \ No newline at end of file diff --git a/raspberry-kiosk/kiosk.html b/raspberry-kiosk/kiosk.html index 14645bf..e396155 100644 --- a/raspberry-kiosk/kiosk.html +++ b/raspberry-kiosk/kiosk.html @@ -14,12 +14,13 @@
+

Veranstaltungskalender

Kalendar lädt ...
- + '; }); diff --git a/raspberry-kiosk/kiosk1.html b/raspberry-kiosk/kiosk1.html index 33f3426..6a59db1 100644 --- a/raspberry-kiosk/kiosk1.html +++ b/raspberry-kiosk/kiosk1.html @@ -13,8 +13,8 @@
-

Sensordaten

@@ -41,7 +42,7 @@
- +

Google+

Lädt ...
diff --git a/raspberry-kiosk/kiosk.js b/raspberry-kiosk/kiosk.js index e9d4b6c..bb69932 100644 --- a/raspberry-kiosk/kiosk.js +++ b/raspberry-kiosk/kiosk.js @@ -195,7 +195,7 @@ function writeAnwesenheitStatus(data) { if (data.sensors.temperature) { - sensorstd+='
Temperatur'; + sensorstd+='Temperatur'; $.each( data.sensors.temperature, function(s, sensorobj) { sensorstd+='
'+sensorobj.location+': '+sensorobj.value.toFixed(2)+sensorobj.unit; }); @@ -203,7 +203,7 @@ function writeAnwesenheitStatus(data) } if (data.sensors.ext_illumination) { - sensorstd+='
Licht'; + sensorstd+='Licht'; $.each( data.sensors.ext_illumination, function(s, sensorobj) { sensorstd+='
'+sensorobj.location+': '+sensorobj.value; }); @@ -211,7 +211,7 @@ function writeAnwesenheitStatus(data) } if (data.sensors.door_locked) { - sensorstd+='
Eingangstür'; + sensorstd+='Eingangstür'; $.each( data.sensors.door_locked, function(s, sensorobj) { var lockstatus="Auf"; if (sensorobj.value) { lockstatus = "Zu"; } @@ -221,7 +221,7 @@ function writeAnwesenheitStatus(data) } if (data.sensors.ext_door_ajar) { - sensorstd+='Türkontakt'; + sensorstd+='Türkontakt'; $.each( data.sensors.ext_door_ajar, function(s, sensorobj) { var lockstatus="Auf"; if (sensorobj.value) { lockstatus = "Zu"; } @@ -231,7 +231,7 @@ function writeAnwesenheitStatus(data) } if (data.sensors.ext_dust) { - sensorstd+='Staub'; + sensorstd+='Staub'; $.each( data.sensors.ext_dust, function(s, sensorobj) { sensorstd+='
'+sensorobj.location+': '+sensorobj.value+sensorobj.unit+'
+

Sensordaten

@@ -36,7 +36,7 @@
- +

Google+

Lädt ...
diff --git a/raspberry-kiosk/kiosk2cal.html b/raspberry-kiosk/kiosk2cal.html index 6252fea..51336a8 100644 --- a/raspberry-kiosk/kiosk2cal.html +++ b/raspberry-kiosk/kiosk2cal.html @@ -14,6 +14,7 @@
+

Veranstaltungskalender

Kalendar lädt ...
diff --git a/raspberry-kiosk/kiosk768x1366.html b/raspberry-kiosk/kiosk768x1366.html new file mode 100644 index 0000000..cfdc786 --- /dev/null +++ b/raspberry-kiosk/kiosk768x1366.html @@ -0,0 +1,42 @@ + + + + Realraum Kiosk Seite + + + + + + + +
+ +
+ +
+ +
+

Veranstaltungskalender

+
Kalendar lädt ...
+
+ +
+

Sensordaten

+
+ + + +
Lädt ...
Lädt ...
+
+
+ +
+
+ +
+
+ +
+
+ + diff --git a/raspberry-kiosk/start-kiosk.sh b/raspberry-kiosk/start-kiosk.sh index 475ceff..a32269f 100644 --- a/raspberry-kiosk/start-kiosk.sh +++ b/raspberry-kiosk/start-kiosk.sh @@ -1,5 +1,8 @@ #!/bin/sh -KIOSKURI="http://www.realraum.at/kiosk.html" +KIOSKURI_DEFAULT="http://www.realraum.at/kiosk.html" +KIOSKURI_900x1440="http://www.realraum.at/kiosk.html" +KIOSKURI_768x1366="http://www.realraum.at/kiosk768x1366.html" +KIOSKURI_1024x768="http://www.realraum.at/kiosk2cal.html" #KIOSKURI="http://grical.realraum.at" #KIOSKURI="http://radi-o-matic.helsinki.at/nextshows/index.php?len=11" sleep 1 @@ -15,7 +18,8 @@ xset dpms 0 0 0 xset dpms force on xset s off xset s noblank - +RESOLUTION=$(xrandr -q | awk -F'current' -F',' 'NR==1 {gsub("( |current)","");print $2}') +KIOSKURI=$(eval echo -n \${KIOSKURI_${RESOLUTION}:-$KIOSKURI_DEFAULT}) unclutter & #midori -e Fullscreen -a "$KIOSKURI" chromium --kiosk --incognito "$KIOSKURI" -- 1.7.10.4