diff --git a/www/where/index.php b/www/where/index.php index 3af1918..0a00293 100644 --- a/www/where/index.php +++ b/www/where/index.php @@ -1,17 +1,24 @@ array( - 'method' => 'GET', - 'header' => 'x-ha-access: nXa7LiR1PG' - ) - ); + if (isset($_GET["data"])): + $options = array( + 'http' => array( + 'method' => 'GET', + 'header' => 'x-ha-access: nXa7LiR1PG' + ) + ); - $context = stream_context_create($options); - $data = json_decode(file_get_contents("http://192.168.0.25:8123/api/states", false, $context), true); + $context = stream_context_create($options); + $data = json_decode(file_get_contents("http://192.168.0.25:8123/api/states", false, $context), true); - foreach($data as $item) { - $output[$item["entity_id"]] = $item; - } + foreach($data as $item) { + $output[$item["entity_id"]] = $item; + } + + header('Content-Type: application/json'); + echo json_encode($output['device_tracker.jasonsphone_jason']); + exit(); + + else: ?> @@ -24,16 +31,50 @@ html, body {height: 100%; min-height: 100%;} body {background-color: #333333;} p {font-size: 5vh; color: #FFFFFF; opacity: 0.5;} - h1 {font-size: 14vh; color: #FFFFFF;} - #container {width: 100%; height: 100%; border: 1.5vw solid #333333; background: linear-gradient(135deg, #a25cbf 0%,#009cde 100%);} + h1 {font-size: 13.9vh; color: #FFFFFF;} + #map {width: 100; height: 100%;} + #container {position: absolute; top: 0; width: 100%; height: 100%; border: 1.5vw solid #333333; background: linear-gradient(135deg, rgba(139,51,175,0.8) 0%, rgba(0,131,214,0.8) 100%);} #centered {position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);} + + +
+Where tf is Jason?
-