</component>
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
- <change beforePath="$PROJECT_DIR$/.docker/docker-compose.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.docker/docker-compose.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/cave.php" beforeDir="false" />
- <change beforePath="$PROJECT_DIR$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/install.md" beforeDir="false" afterPath="$PROJECT_DIR$/install.md" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/cuisine.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cuisine.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/entree.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/entree.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/sdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/sdb.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/water.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/cron/flight.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/cron/traffic.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/hotwater.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/ical.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/jarvis.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/kodi.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/jarvis.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/off.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/off.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/traffic.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/velib.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/velib.php" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1772370387714" duration="7090000" />
<workItem from="1773390371781" duration="506000" />
<workItem from="1774028822942" duration="792000" />
- <workItem from="1774430967346" duration="3394000" />
+ <workItem from="1774430967346" duration="4576000" />
</task>
<task id="LOCAL-00502" summary=".">
<created>1641726946298</created>
<option name="project" value="LOCAL" />
<updated>1687259667913</updated>
</task>
- <option name="localTasksCounter" value="635" />
+ <option name="localTasksCounter" value="636" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<breakpoints>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/scripts/cron/cron.php</url>
- <line>249</line>
+ <line>207</line>
<option name="timeStamp" value="1" />
</line-breakpoint>
</breakpoints>
$favoriteslights = array_merge($favoriteslights, $c['favorites']);
include "default.php";
- include "water.php";
$nav=['home','lights','water','music','remote','coffee','switch','settings','alert','off'];
}
\ No newline at end of file
$c = home();
$shortcuts['lights'] = $c['all'];
$favoriteslights = $c['favorites'];
- array_splice($favoriteslights, 3, 0, [['type' => 'lock'], ['type' => 'velib'], ['type' => 'traffic']]);
$nav = ['home', 'lights', 'music', 'coffee', 'switch', 'settings', 'alert', 'off'];
$favoriteslights = array_merge($favoriteslights, $c['favorites']);
$favoriteslights[] = array_merge($allmusics['FIP'], array('volume' => 50));
$favoriteslights[] = ['type' => 'phone', 'task' => 'Balance', 'phone' => 'sdb', 'label' => 'Balance'];
- include "water.php";
include "media.php";
include "default.php";
}
\ No newline at end of file
+++ /dev/null
-<?php
-
-$shortcuts['water'] = [
- ['type' => 'light', 'scene' => 'sdb/hotwater/auto/force', 'label' => 'Auto'],
- ['type' => 'light', 'scene' => 'sdb/hotwater/eco', 'label' => 'Eco'],
- ['type' => 'light', 'scene' => 'sdb/hotwater/max', 'label' => 'Max'],
- ['type' => 'light', 'scene' => 'sdb/hotwater/off', 'label' => 'Off'],
-
-];
\ No newline at end of file
changeAddress();
initScreenSaver();
initWeather();
- initTraffic();
- initVelib();
initLocks();
setTimeout(function () {
}
}
-function initVelib() {
- $(document).on('click', "a.velib", function () {
- displayLoader($(this));
- updateVelib(true);
- return false;
- });
- setInterval(function () {
- updateVelib(false);
- }, 1000 * 30);
- updateVelib(false);
-}
-
-function initTraffic() {
- $(document).on('click', ".traffic", function () {
- displayLoader($(this));
- updateTraffic(true);
- });
- setInterval(function () {
- updateTraffic(false);
- }, 1000 * 30);
- updateTraffic(false);
-}
function initLocks() {
$(document).on('click', ".lock", function () {
});
}
-function updateTraffic(force) {
- var t = $(".traffic");
- if (t.length == 0) {
- return;
- }
- if (force == undefined) {
- force = false;
- }
- var url = 'cache/traffic.json?j=';
- if (force) {
- url = 'scripts/cron/traffic.php?force=1&';
- }
-
- $.get(url + new Date().getTime(), function (data) {
- t.find('.dtime').text(data.time);
- t.find('.jams').text(data.jams + ' km');
- t.find('.car').text(data.car + ' min');
- t.find('.subway').text(data.subway + ' min');
- t.find('.bike').text(data.bike + ' min');
- t.attr('data-init', '1');
- resize();
- hideLoader();
- }).fail(function () {
- hideLoader();
- });
-}
-
-function updateVelib(force) {
- var v = $(".velib");
- if (v.length == 0) {
- return;
- }
- if (force == undefined) {
- force = false;
- }
- var url = 'cache/velib.json?j=';
- if (force) {
- url = 'scripts/velib.php?j=';
- }
-
- $.get(url + new Date().getTime(), function (data) {
- console.log(data);
- var list = [];
- $.each(data.stations, function (k, v) {
- list.push('<li data-enabled="' + v.enabled + '"><span class="l">' + v.name + '</span><span class="n blue">' + v.nbe + '</span><span class="n green">' + v.nb + '</span></li>');
- });
- v.find('ul').html(list.join(''));
- v.find('.dtime').text(data.time);
- v.attr('data-init', '1');
- resize();
- hideLoader();
- }).fail(function () {
- hideLoader();
- });
-}
-
function initWeather() {
setInterval(function () {
updateWeather();
return;
}
var paddingSide = 0.5;
- if ($(this).hasClass('velib')) {
- paddingSide = 0.1;
- }
var span = resizeText($(this), paddingSide, s);
var sh = $(span).height();
var h = $(a).height();
var span = $(a).find('span');
var securityMargin = w / 50;
- if ($(a).hasClass('velib')) {
- return span;
- }
$(span).css('fontSize', '');
$(span).each(function () {
$(this).data('fz', parseFloat($(this).css('fontSize')));
echo '------------------------------------' . "\n";
_logSection('One Loop // ' . $cronmin);
cronHeartbeat($cronmin, false);
- cronHotWater($cronmin);
cronRooms($cronmin);
cronWeather($cronmin);
}
if ($cronmin % 5 == 0) {
- cronTraffic($cronmin, false);
- cronVelib($cronmin);
cronGuest($cronmin);
cronShield($cronmin);
}
_logSection('End Loop (min:' . $cronmin . ')');
}
-function cronHotWater($cronmin) {
- _logSection('Hot water');
- hotwaterCheckMode();
-}
function cronBackyard($cronmin)
{
getWeather();
}
-function cronVelib($cronmin) {
- _logSection('Velib');
- velibStations(false);
-}
-
-function cronTraffic($cronmin, $force = false) {
- _logSection('Traffic');
- $cache = ROOT . '/cache/traffic.json';
-
- $hour = date('G');
- $day = date('w');
- $limit = 3600;
- $departure_in = 5;
-
- if ($day > 0 && $day < 6 && $hour > 6 && $hour < 10) {
- $limit = 60;
- }
- if ($force || !file_exists($cache) || filemtime($cache) < time() - $limit) {
- $traffic = [
- 'time' => date('H:i', time() + ($departure_in * 60)),
- 'jams' => trafficJams(),
- 'car' => itineraryIssy(),
- 'subway' => itineraryIssy('transit'),
- 'bike' => itineraryIssy('bicycling')
- ];
- $json = json_encode($traffic);
- file_put_contents($cache, $json);
- if (isset($_GET['force'])) {
- ob_end_clean();
- header('Content-type: application/json');
- echo $json;
- exit;
- }
- }
-}
function cronPodcasts($cronmin) {
checkSpottyLogin();
+++ /dev/null
-<?php
-require_once "../import.php";
-$currentPos = getState('flight_pos', null);
-$currentFlight = getState('current_flight', null);
-
-if ($currentFlight == null) {
- pickFlight($currentPos);
-}
-
-function pickFlight($pos = null)
-{
- //
- if ($pos = null) {
-
- }
-
- print_r(getStopedPlanes());
-}
-
-function getAirFrancePlanes()
-{
- $raw = json_decode(file_get_contents("https://public-api.adsbexchange.com/VirtualRadar/AircraftList.json?fOpIcaoQ=AFR"))->acList;
- $res = array();
- foreach ($raw as $item) {
- if (!in_array($item->Man, ['Boeing', 'Airbus'])) {
- continue;
- }
- if (!isset($item->From) || !isset($item->To)) {
- continue;
- }
- $res[] = $item;
- }
-
- return $res;
-}
-
-function getStopedPlanes()
-{
- $planes = getAirFrancePlanes();
- $res = array();
- foreach ($planes as $plane) {
- if (isset($plane->Spd) && $plane->Spd > 0) {
- continue;
- }
- $res[] = $plane;
- }
- return $res;
-}
\ No newline at end of file
+++ /dev/null
-<?php
-require_once 'cron.php';
-cronTraffic(1, true);
\ No newline at end of file
+++ /dev/null
-<?php
-require_once "import.php";
-echo "\n\n";
-hotwaterCheckMode(true);
-echo "\n\n";
-echo getState('hotwater');
-if (isset($_GET['on'])) {
- echo hotwater($_GET['on']);
-}
+++ /dev/null
-<?php
-header('Content-type: text/plain');
-require_once "import.php";
-
-isJerome();
\ No newline at end of file
+++ /dev/null
-<?php
-require_once 'import.php';
-
-$auth = ['33664863307', '33662717540', '33646396295'];
-if (isset($_GET['from']) && !in_array($_GET['from'], $auth)) {
- echo 'Désolé, je ne vous connais pas';
-} else {
- echo jarvisCmd($_GET['question']);
-}
\ No newline at end of file
+++ /dev/null
-<?php
-include "import.php";
-
-if ($_GET['action'] == 'sync_seen') {
- kodiSyncPlayedStatus();
-}
\ No newline at end of file
+++ /dev/null
-<?php
-
-function jarvisCmd($question)
-{
- $c = sshCommand('/usr/local/bin/jarvis -j -x "' . addcslashes($question, '"') . '"', 'jarvis');
-
- $o = preg_replace('/[\x00-\x1F\x7F]/', '', $c['output']);
- $j = json_decode(trim($o), true);
-
- if (!is_countable($j) || !count($j)) {
- return 'Désolé, il y a eu un problème !';
- }
- foreach ($j as $k => $v) {
- if (isset($v['answer'])) {
- return $v['answer'];
- }
- }
- return 'Désolé, je crois qu\'il y a eu un affreux malentendu entre nous :(';
-}
\ No newline at end of file
require_once ROOT . '/scripts/lib/harmony.php';
require_once ROOT . '/scripts/lib/scenes.php';
require_once ROOT . '/scripts/lib/squeezebox.php';
-require_once ROOT . '/scripts/lib/jarvis.php';
require_once ROOT . '/scripts/lib/mediarasp.php';
require_once ROOT . '/scripts/lib/http.php';
require_once ROOT . '/scripts/lib/pc.php';
require_once ROOT . '/scripts/lib/youtubedl.php';
require_once ROOT . '/scripts/lib/remoteinfos.php';
require_once ROOT . '/scripts/lib/weatherstation.php';
-require_once ROOT . '/scripts/lib/velib.php';
-require_once ROOT . '/scripts/lib/traffic.php';
require_once ROOT . '/scripts/lib/medialibrary.php';
require_once ROOT . '/scripts/lib/heartbeats.php';
require_once ROOT . '/scripts/lib/ssh.php';
<div class="icons"><span class="icon-day"></span><span class="icon-night"></span></div>
<span class="temp"></span>
<div class="temperatures"><span class="temp-min"></span><span class="temp-max"></span></div>';
- } elseif ($s['type'] == 'traffic') {
- $attrs['class'] = $s['type'] . ' info';
- $attrs['data-init'] = "0";
- $attrs['data-init-function'] = "updateTraffic";
- $s['label'] = '<div class="departure">Départ à <span class="dtime"></span></div>
-<ul class="issy"><li class="car"></li><li class="subway"></li><li class="bike"></li></ul>
-<div class="total_jams"><span class="jams"></span> de bouchons</div>';
-
- } else if ($s['type'] === 'lock') {
+ } else if ($s['type'] === 'lock') {
$attrs['class'] = $s['type'] . ' info';
$attrs['data-init'] = "0";
$attrs['data-init-function'] = "updateLocks";
$s['label'] = '<div class="icon"></div>';
- } elseif ($s['type'] == 'velib') {
- $attrs['class'] = $s['type'] . ' info';
- $attrs['data-init'] = "0";
- $attrs['data-init-function'] = "updateVelib";
- $s['label'] = '<div class="dtime"></div><ul></ul>';
} elseif ($s['type'] == 'action') {
$attrs['data-action'] = $s['action'];
$attrs['data-device'] = isset($s['device']) ? $s['device'] : getCurrentConfig();
'music' => '<div data-menu="music"><i class="fa fa-music" aria-hidden="true"></i><span>Musique & Radio</span></div>',
'media' => '<div data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i><span>Medias & TV</span></div>',
'coffee' => '<div data-menu="coffee"><i class="fa fa-oven" aria-hidden="true"></i><span>Cuisine / Café</span></div>',
- 'water' => '<div data-menu="water"><i class="fa fa-faucet-drip" aria-hidden="true"></i><span>Eau chaude</span></div>',
'fan' => '<a href="/scripts/light.php?scene=' . config('ROOM') . '/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i><span>Ventilateur</span></a>',
'remote' => '<div data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i><span>Télécommande</span></div>',
'switch' => '<div data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i><span>Changer de pièce</span></div>',
{
execScene('sdb/ampli/off');
sleep(10);
- hotwaterAutoMode('1');
}
function offChambre()
['type' => 'function', 'function' => 'stopAllSqueezebox'],
['type' => 'nightmode', 'mode' => '1'],
['type' => 'ecomode', 'mode' => '1'],
- ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'],
],
'salon/projector/on' => [
['type' => 'function', 'function' => 'epson', 'args' => [true, true]],
['type' => 'scene', 'scene' => 'home/hueoff'],
['type' => 'scene', 'scene' => 'salon/media/off'],
['type' => 'scene', 'scene' => 'salon/off', 'delay' => 2],
- ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'],
['type' => 'function', 'function' => 'stopHarmony'],
['type' => 'function', 'function' => 'stopAllSqueezebox'],
],
['type' => 'scene', 'scene' => 'salon/auto'],
['type' => 'scene', 'scene' => 'cuisine/on'],
['type' => 'ecomode', 'mode' => '0'],
- ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'],
['type' => 'scene', 'scene' => 'bureau/off'],
['type' => 'scene', 'scene' => 'chambre/off'],
],
['type' => 'scene', 'scene' => 'bureau/auto'],
['type' => 'scene', 'scene' => 'cuisine/on'],
['type' => 'ecomode', 'mode' => '0'],
- ['type' => 'scene', 'scene' => 'sdb/hotwater/auto'],
['type' => 'scene', 'scene' => 'salon/off'],
['type' => 'scene', 'scene' => 'chambre/off'],
['type' => 'ha', 'device' => HA_OFFICE_PLANE_SCREENS, 'action' => 'turn_off'],
'sdb/ampli/off' => [
['type' => 'ha', 'device' => HA_SDB_AMPLI, 'command' => 'turn_off', 'priority' => true],
],
- 'sdb/hotwater/auto' => [
- ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['1']],
- ],
- 'sdb/hotwater/auto/force' => [
- ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['1', true]],
- ],
- 'sdb/hotwater/eco' => [
- ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['0']],
- ['type' => 'function', 'function' => 'hotwater', 'args' => ['1']],
- ],
- 'sdb/hotwater/max' => [
- ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['0']],
- ['type' => 'function', 'function' => 'hotwater', 'args' => ['2']],
- ],
- 'sdb/hotwater/off' => [
- ['type' => 'function', 'function' => 'hotwaterAutoMode', 'args' => ['0']],
- ['type' => 'function', 'function' => 'hotwater', 'args' => ['0']],
- ],
'sdb/off' => [
['type' => 'state', 'key' => 'sdb', 'value' => 0],
['type' => 'function', 'function' => 'stopSqueezeboxPlayer', 'args' => [$squeezeboxPlayers['Salle de bains'], false]],
}
_squeezePlay($player, $volume);
-
- if ($sdb) {
- hotwaterCheckMode();
- sleep(3);
- hotwaterCheckMode();
- }
}
function squeezePlayerOn($player)
// }
} else if ($player == $squeezeboxPlayers['Salle de bains']) {
execScene('sdb/ampli/on');
- hotwaterCheckMode();
if (getSqueezePlayerStatus($player) < 0) {
phoneTask('Tortuga', 'sdb');
}
+++ /dev/null
-<?php
-function trafficJams() {
- $dom = new DOMDocument();
- @$dom->loadHTMLFile('http://www.sytadin.fr/');
- $e = $dom->getElementById('cumul_bouchon');
- if (null === $e) {
- return '??';
- }
- $i = $e->getElementsByTagName('img')->item(0);
- return intval((string)$i->getAttribute('alt'));
-}
-
-function itineraryIssy($mode = 'driving') {
- global $departure_in;
- $key = 'AIzaSyCmBfccaAxrhp5CH27sydD2n0jE-xFp9A8';
- //$origin = '5 rue de Rochechouart, Paris';
- //$origin = 'place_id:ChIJISH0cEBu5kcRtWqJGS8R9vc';
- if ($mode === 'driving') {
- $origin = 'place_id:ChIJ28lUzD5u5kcRQo1KXiy9xys';
- } else {
- $origin = 'place_id:ChIJfdFmjj9u5kcRUyCLnw-tkIU';
- }
- // $destination = '11 rue René Jacques, Issy-les-moulineaux';
- $destination = 'place_id:ChIJ_zVpOo965kcRLVwpXuatEOo';
- $departure = time() + ($departure_in * 60);
- $transit_mode = '';
- if ($mode == 'transit') {
- $transit_mode = '&transit_mode=rail';
- }
- $res = json_decode(file_get_contents('https://maps.googleapis.com/maps/api/directions/json?mode=' . $mode . $transit_mode . '&languages=fr&departure_time=' . $departure . '&origin=' . urlencode($origin) . '&destination=' . urlencode($destination) . '&key=' . $key), true);
- if ($mode == 'driving') {
- return round($res['routes'][0]['legs'][0]['duration_in_traffic']['value'] / 60) + 10;
- } else {
- return round($res['routes'][0]['legs'][0]['duration']['value'] / 60);
- }
-}
\ No newline at end of file
+++ /dev/null
-<?php
-function velibStations($force = false)
-{
- $cache = ROOT . '/cache/velib.json';
-
- $hour = date('G');
- $day = date('w');
- $limit = 180;
-
- if ($day > 0 && $day < 6 && $hour > 7 && $hour < 11) {
- $limit = 60;
- }
-
- if ($force || !file_exists($cache) || filemtime($cache) < (time() - $limit)) {
- $allcache = __DIR__ . '/../../cache/velib.all.json';
- $ffversion = rand('105', '124');
- $thversion = rand('1', '150');
-
- `curl --max-time 10 'https://velib-metropole-opendata.smoove.pro/opendata/Velib_Metropole/station_status.json' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv$ffversion.0) Gecko/20100101 Firefox/$ffversion.0 TortugaHome/$thversion.0' --output $allcache`;
- $alldata = json_decode(file_get_contents($allcache), true);
-
- $stations = ['Cadet' => '9101', 'Bleue' => '9113', 'Folies bergères' => '9011', 'Square Montholon' => '9009', 'Le Pelletier' => '9014'];
- $res = array();
- foreach ($alldata['data']['stations'] as $n => $s) {
- if (!in_array($s['stationCode'], $stations)) {
- continue;
- }
- $res[$s['stationCode']] = $s;
- }
-
- $ordered = [];
- foreach ($stations as $name => $s) {
- if (isset($res[$s])) {
- $data = $res[$s];
- $o = ['name' => $name, 'enabled' => $data['is_returning'] && $data['is_renting'], 'nb' => 0, 'nbe' => 0];
- if($o['enabled']) {
- foreach ($data['num_bikes_available_types'] as $k => $v) {
- foreach ($v as $type => $nb) {
- if ($type === 'mechanical') {
- $o['nbe'] = $nb;
- } else {
- $o['nb'] = $nb;
- }
- }
- }
- }
- $ordered['s' . $s] = $o;
- }
- }
- $res = ['time' => date('H:i'), 'stations' => $ordered];
- $json = json_encode($res);
- file_put_contents($cache, $json);
- } else {
- $json = file_get_contents($cache);
- }
- return $json;
-}
\ No newline at end of file
+++ /dev/null
-<?php
-
-include "import.php";
-header('Content-Type: application/json');
-echo velibStations(true);
\ No newline at end of file
section .col > *.velib li .n.blue {
background-color: #59b0e3;
}
-section .col > *.traffic {
- padding-left: 0 !important;
- padding-right: 0 !important;
-}
-section .col > *.traffic ul {
- padding: 0.1em 0.5em;
- text-align: left;
-}
-section .col > *.traffic ul li {
- list-style: none;
- text-align: right;
- position: relative;
- text-transform: lowercase;
-}
-section .col > *.traffic ul li:before {
- font-family: Font Awesome\ 5 Pro;
- position: absolute;
- top: 0.2em;
- left: 0;
- width: 1.2em;
- display: inline-block;
- text-align: center;
-}
-section .col > *.traffic ul li.car:before {
- content: "\f1b9";
-}
-section .col > *.traffic ul li.bike:before {
- content: "\f206";
-}
-section .col > *.traffic ul li.subway:before {
- content: "\f239";
-}
-section .col > *.traffic div {
- font-size: 0.6em;
-}
-section .col > *.traffic div span {
- font-size: 1em !important;
-}
+
section .col > *.weather {
position: relative;
}
section accordion > a.velib li .n.blue {
background-color: #59b0e3;
}
-section accordion > a.traffic {
- padding-left: 0 !important;
- padding-right: 0 !important;
-}
-section accordion > a.traffic ul {
- padding: 0.1em 0.5em;
- text-align: left;
-}
-section accordion > a.traffic ul li {
- list-style: none;
- text-align: right;
- position: relative;
- text-transform: lowercase;
-}
-section accordion > a.traffic ul li:before {
- font-family: Font Awesome\ 5 Pro;
- position: absolute;
- top: 0.2em;
- left: 0;
- width: 1.2em;
- display: inline-block;
- text-align: center;
-}
-section accordion > a.traffic ul li.car:before {
- content: "\f1b9";
-}
-section accordion > a.traffic ul li.bike:before {
- content: "\f206";
-}
-section accordion > a.traffic ul li.subway:before {
- content: "\f239";
-}
-section accordion > a.traffic div {
- font-size: 0.6em;
-}
-section accordion > a.traffic div span {
- font-size: 1em !important;
-}
+
section accordion > a.weather {
position: relative;
}
}
}
- &.velib {
- .dtime {
- &:before {
- font-family: @font-awesome;
- content: "\f206";
- margin-right: 0.3em;
- }
- }
-
- ul {
+ div {
+ font-size: 0.6em;
+ span {
+ font-size: 1em !important;
}
+ }
+}
- li {
- text-align: left;
- list-style: none;
- font-size: 0.55em;
- margin-top: 0.3em;
- clear: both;
-
- &[data-enabled=false] {
- .n {
- &.blue, &.green {
- background-color: #cc0000;
- color: #cc0000;
- }
- }
- }
-
- .l {
- max-width: 7.2em;
- display: inline-block;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- vertical-align: top;
- }
-
- .n {
- float: right;
- vertical-align: top;
- margin-left: 0.2em;
- border-radius: 50%;
- display: inline-block;
- height: 1.6em;
- width: 1.6em;
- border: 0.1em solid #fff;
- text-align: center;
- position: relative;
- line-height: 1.4em;
- font-size: 0.8em;
- color: #fff;
-
- &.green {
- background-color: #a2b43a;
- }
+&.weather {
+ position: relative;
- &.blue {
- background-color: #59b0e3;
- }
- }
- }
+ .temp {
+ font-size: 1.3em;
+ text-align: center;
+ display: block;
}
- &.traffic {
- padding-left: 0 !important;
- padding-right: 0 !important;
-
- ul {
- padding: 0.1em 0.5em;
+ .icons {
+ span {
+ width: 50%;
+ display: inline-block;
text-align: left;
- li {
- list-style: none;
+ &.icon-night {
text-align: right;
- position: relative;
- text-transform: lowercase;
-
- &:before {
- font-family: @font-awesome;
- position: absolute;
- top: 0.2em;
- left: 0;
- width: 1.2em;
- display: inline-block;
- text-align: center;
- }
-
- &.car {
- &:before {
- content: "\f1b9";
- }
- }
-
- &.bike {
- &:before {
- content: "\f206";
- }
- }
-
- &.subway {
- &:before {
- content: "\f239";
- }
- }
}
- }
-
- div {
- font-size: 0.6em;
- span {
- font-size: 1em !important;
+ img {
+ width: 2.2em;
+ height: 2.2em;
+ position: relative;
+ top: -0.3em;
}
}
}
- &.weather {
- position: relative;
+ .temperatures {
+ font-size: 0.7em;
- .temp {
- font-size: 1.3em;
+ span {
+ width: 50%;
+ display: inline-block;
text-align: center;
- display: block;
- }
- .icons {
- span {
- width: 50%;
- display: inline-block;
- text-align: left;
-
- &.icon-night {
- text-align: right;
- }
-
- img {
- width: 2.2em;
- height: 2.2em;
- position: relative;
- top: -0.3em;
- }
+ &.temp-min {
+ color: cornflowerblue;
}
- }
-
- .temperatures {
- font-size: 0.7em;
-
- span {
- width: 50%;
- display: inline-block;
- text-align: center;
-
- &.temp-min {
- color: cornflowerblue;
- }
-
- &.temp-max {
- color: orangered;
- }
+ &.temp-max {
+ color: orangered;
}
}
- }
- span {
- display: inline-block;
+ }
+}
- .fa {
- font-size: 3em;
- }
+span {
+ display: inline-block;
+ .fa {
+ font-size: 3em;
}
+
+}
+
}