adaptive resolution start
authorBernhard Tittelbach <xro@realraum.at>
Sun, 22 Sep 2013 09:27:56 +0000 (09:27 +0000)
committerBernhard Tittelbach <xro@realraum.at>
Sun, 22 Sep 2013 09:27:56 +0000 (09:27 +0000)
raspberry-kiosk/kiosk.css
raspberry-kiosk/kiosk.html
raspberry-kiosk/kiosk.js
raspberry-kiosk/kiosk1.html
raspberry-kiosk/kiosk2cal.html
raspberry-kiosk/kiosk768x1366.html [new file with mode: 0644]
raspberry-kiosk/start-kiosk.sh

index 9aa7ff1..f069ea4 100644 (file)
@@ -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
index 14645bf..e396155 100644 (file)
   <div id="headerphoto" class="headerphoto">
   <img class="headerphoto" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
   </div>
+  <!-- Calendar ------------------------ -->
   <div class="calendar">
     <p class="topic">Veranstaltungskalender</p>
     <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
   </div>
-   <!-- Sensor Data ------------------------ -->
  <table border="0" cellpadding="0" cellspacing="0"><tr>
+ <!-- Sensor Data ------------------------ -->
  <td style="vertical-align:top; padding-right:2px;">
   <div class="sensorgraphs">
     <p class="topic">Sensordaten</p>
@@ -41,7 +42,7 @@
   </div>
   
   </td><td style="vertical-align:top;">
-
+   <!-- Google Plus Wall ------------------------ -->
    <div class="gpluswall">
     <p class="topic">Google+</p>
     <div id="gplusevents">Lädt ...</div>
index e9d4b6c..bb69932 100644 (file)
@@ -195,7 +195,7 @@ function writeAnwesenheitStatus(data)
   {
     if (data.sensors.temperature)
     {
-      sensorstd+='<td style="background-color:white; height:42px; text-align:center; vertical-align:middle; display:table-cell;"><b>Temperatur</b>';
+      sensorstd+='<td class="sensorstatus"><b>Temperatur</b>';
       $.each( data.sensors.temperature, function(s, sensorobj) {
         sensorstd+='<br/>'+sensorobj.location+': '+sensorobj.value.toFixed(2)+sensorobj.unit;
       });
@@ -203,7 +203,7 @@ function writeAnwesenheitStatus(data)
     }
     if (data.sensors.ext_illumination)
     {
-      sensorstd+='<td style="background-color:white; height:42px; text-align:center; vertical-align:middle; display:table-cell;"><b>Licht</b>';
+      sensorstd+='<td class="sensorstatus"><b>Licht</b>';
       $.each( data.sensors.ext_illumination, function(s, sensorobj) {
         sensorstd+='<br/>'+sensorobj.location+': '+sensorobj.value;
       });
@@ -211,7 +211,7 @@ function writeAnwesenheitStatus(data)
     }
     if (data.sensors.door_locked)
     {
-      sensorstd+='<td style="background-color:white; height:42px; text-align:center; vertical-align:middle; display:table-cell;"><b>Eingangstür</b>';
+      sensorstd+='<td class="sensorstatus"><b>Eingangstür</b>';
       $.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+='<td style="background-color:white; height:42px; text-align:center; vertical-align:middle; display:table-cell;"><b>Türkontakt</b>';
+      sensorstd+='<td class="sensorstatus"><b>Türkontakt</b>';
       $.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+='<td style="background-color:white; height:42px; text-align:center; vertical-align:middle; display:table-cell;"><b>Staub</b>';
+      sensorstd+='<td class="sensorstatus"><b>Staub</b>';
       $.each( data.sensors.ext_dust, function(s, sensorobj) {
         sensorstd+='<br/>'+sensorobj.location+': '+sensorobj.value+sensorobj.unit+'</td>';
       });
index 33f3426..6a59db1 100644 (file)
@@ -13,8 +13,8 @@
   <div id="headerphoto" class="headerphoto">
   <img class="headerphoto" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
   </div>
-   <!-- Sensor Data ------------------------ -->
  <table border="0" cellpadding="0" cellspacing="0"><tr>
+ <!-- Sensor Data ------------------------ -->
  <td style="vertical-align:top; padding-right:2px;">
   <div class="sensorgraphs">
     <p class="topic">Sensordaten</p>
@@ -36,7 +36,7 @@
   </div>
   
   </td><td style="vertical-align:top;">
-
+   <!-- Google Plus Wall ------------------------ -->
    <div class="gpluswall">
     <p class="topic">Google+</p>
     <div id="gplusevents">Lädt ...</div>
index 6252fea..51336a8 100644 (file)
@@ -14,6 +14,7 @@
   <div id="headerphoto2" class="headerphoto2">
   <img class="headerphoto2" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
   </div>
+  <!-- Calendar ------------------------ -->
   <div class="calendar">
     <p class="topic">Veranstaltungskalender</p>
     <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
diff --git a/raspberry-kiosk/kiosk768x1366.html b/raspberry-kiosk/kiosk768x1366.html
new file mode 100644 (file)
index 0000000..cfdc786
--- /dev/null
@@ -0,0 +1,42 @@
+<html>
+  <head>
+  <meta charset="utf-8">
+  <title>Realraum Kiosk Seite</title>
+  <link rel="stylesheet" href="kiosk.css" type="text/css" />
+  <script type="text/javascript" src="/jquery.min.js"></script>
+  <!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
+  <!--script src="/purl.js"></script-->
+  <script type="text/javascript" src="kiosk.js"></script>
+ </head>
+ <body style="max-width:768px; max-height:1366px; font-size:19px;">
+  <div id="dateclock"></div>
+  <div id="siteheader">Neuigkeiten auf <span style="font-size:110%;">http://realraum.at</span></div>  
+  <div id="headerphoto" class="headerphoto">
+  <img class="headerphoto" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
+  </div>
+  <!-- Calendar ------------------------ -->
+  <div class="calendar">
+    <p class="topic">Veranstaltungskalender</p>
+    <div id="grical_upcoming_kiosk">Kalendar lädt ...</div>
+  </div>
+   <!-- Sensor Data ------------------------ -->
+  <div class="sensorgraphs"  style="width:100%;">
+    <p class="topic">Sensordaten</p>
+    <div class="sensorelem">
+    <table class="status" style="">
+    <tr><td id="anwesenheit_status_kiosk" style="height:100px; border:0px none black;">Lädt ...</td></tr>
+    <tr><td id="sensor_status" style="border:0px none black; margin-top:5px;">Lädt ...</td></tr>
+    </table>
+    </div>
+    <div class="sensorelem">
+     <img id="tempsensor" class="sensorimg" src="http://realraum.at/shmcache/temp0.png"/>
+    </div>
+    <div class="sensorelem">
+      <img id="lightsensor" class="sensorimg" src="http://realraum.at/shmcache/light0.png"/>
+    </div>
+    <div class="sensorelem">
+      <img id="movementsensor" class="sensorimg" src="http://realraum.at/shmcache/movement.png"/>
+    </div>
+  </div>
+</body>
+</html>
index 475ceff..a32269f 100644 (file)
@@ -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"