From: Vincent Vanwaelscappel Date: Wed, 25 Mar 2026 10:49:40 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=aacb2b013b47e9c4916574ea841b9bb9092e6ae1;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 4b4dd24..6d25d29 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,12 +5,29 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -1758,7 +1775,7 @@ file://$PROJECT_DIR$/scripts/cron/cron.php - 249 + 207 diff --git a/config/cuisine.php b/config/cuisine.php index 84a5ca2..f683040 100644 --- a/config/cuisine.php +++ b/config/cuisine.php @@ -21,7 +21,6 @@ if (DISPLAYINTERFACE) { $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 diff --git a/config/entree.php b/config/entree.php index 9cf7134..34e015c 100644 --- a/config/entree.php +++ b/config/entree.php @@ -19,7 +19,6 @@ if (DISPLAYINTERFACE) { $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']; diff --git a/config/sdb.php b/config/sdb.php index 5d0a221..5546b47 100644 --- a/config/sdb.php +++ b/config/sdb.php @@ -29,7 +29,6 @@ if (DISPLAYINTERFACE) { $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 diff --git a/config/water.php b/config/water.php deleted file mode 100644 index 4f68275..0000000 --- a/config/water.php +++ /dev/null @@ -1,9 +0,0 @@ - '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 diff --git a/js/home.js b/js/home.js index 33b3a3d..f67c476 100644 --- a/js/home.js +++ b/js/home.js @@ -392,8 +392,6 @@ $(function () { changeAddress(); initScreenSaver(); initWeather(); - initTraffic(); - initVelib(); initLocks(); setTimeout(function () { @@ -679,28 +677,6 @@ function sshCommand(cmd, immediate, device) { } } -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 () { @@ -734,62 +710,6 @@ function updateLocks() { }); } -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('
  • ' + v.name + '' + v.nbe + '' + v.nb + '
  • '); - }); - 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(); @@ -968,9 +888,6 @@ function resize() { return; } var paddingSide = 0.5; - if ($(this).hasClass('velib')) { - paddingSide = 0.1; - } var span = resizeText($(this), paddingSide, s); var sh = $(span).height(); @@ -1013,9 +930,6 @@ function resizeText(a, paddingSide) { 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'))); diff --git a/scripts/cron/cron.php b/scripts/cron/cron.php index af35044..92f1315 100644 --- a/scripts/cron/cron.php +++ b/scripts/cron/cron.php @@ -8,7 +8,6 @@ function cronOneLoop($cronmin) { echo '------------------------------------' . "\n"; _logSection('One Loop // ' . $cronmin); cronHeartbeat($cronmin, false); - cronHotWater($cronmin); cronRooms($cronmin); cronWeather($cronmin); @@ -22,8 +21,6 @@ function cronOneLoop($cronmin) { } if ($cronmin % 5 == 0) { - cronTraffic($cronmin, false); - cronVelib($cronmin); cronGuest($cronmin); cronShield($cronmin); } @@ -48,10 +45,6 @@ function cronOneLoop($cronmin) { _logSection('End Loop (min:' . $cronmin . ')'); } -function cronHotWater($cronmin) { - _logSection('Hot water'); - hotwaterCheckMode(); -} function cronBackyard($cronmin) { @@ -172,41 +165,6 @@ function cronWeather($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(); diff --git a/scripts/cron/flight.php b/scripts/cron/flight.php deleted file mode 100644 index f437201..0000000 --- a/scripts/cron/flight.php +++ /dev/null @@ -1,48 +0,0 @@ -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 diff --git a/scripts/cron/traffic.php b/scripts/cron/traffic.php deleted file mode 100644 index f050663..0000000 --- a/scripts/cron/traffic.php +++ /dev/null @@ -1,3 +0,0 @@ - $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 diff --git a/scripts/lib/lib.php b/scripts/lib/lib.php index 9866f4f..9145f64 100644 --- a/scripts/lib/lib.php +++ b/scripts/lib/lib.php @@ -15,7 +15,6 @@ require_once ROOT . '/scripts/lib/hue.php'; 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'; @@ -29,8 +28,6 @@ require_once ROOT . '/scripts/lib/bricks.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'; @@ -290,24 +287,11 @@ function shortcut($s, $hash)
    '; - } elseif ($s['type'] == 'traffic') { - $attrs['class'] = $s['type'] . ' info'; - $attrs['data-init'] = "0"; - $attrs['data-init-function'] = "updateTraffic"; - $s['label'] = '
    Départ à
    - -
    de bouchons
    '; - - } 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'] = '
    '; - } elseif ($s['type'] == 'velib') { - $attrs['class'] = $s['type'] . ' info'; - $attrs['data-init'] = "0"; - $attrs['data-init-function'] = "updateVelib"; - $s['label'] = '
    '; } elseif ($s['type'] == 'action') { $attrs['data-action'] = $s['action']; $attrs['data-device'] = isset($s['device']) ? $s['device'] : getCurrentConfig(); @@ -610,7 +594,6 @@ function makeNav($nav) 'music' => '
    Musique & Radio
    ', 'media' => '
    Medias & TV
    ', 'coffee' => '
    Cuisine / Café
    ', - 'water' => '
    Eau chaude
    ', 'fan' => 'Ventilateur', 'remote' => '
    Télécommande
    ', 'switch' => '
    Changer de pièce
    ', diff --git a/scripts/lib/off.php b/scripts/lib/off.php index e3f1f2c..f6f546b 100644 --- a/scripts/lib/off.php +++ b/scripts/lib/off.php @@ -49,7 +49,6 @@ function offSdb() { execScene('sdb/ampli/off'); sleep(10); - hotwaterAutoMode('1'); } function offChambre() diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index 3d26a45..2c01bfa 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -288,7 +288,6 @@ $scenes = [ ['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]], @@ -636,7 +635,6 @@ $scenes = [ ['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'], ], @@ -649,7 +647,6 @@ $scenes = [ ['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'], ], @@ -658,7 +655,6 @@ $scenes = [ ['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'], @@ -734,24 +730,6 @@ $scenes = [ '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]], diff --git a/scripts/lib/squeezebox.php b/scripts/lib/squeezebox.php index f2e6464..246a80a 100644 --- a/scripts/lib/squeezebox.php +++ b/scripts/lib/squeezebox.php @@ -181,12 +181,6 @@ function squeezePlayByName($musicName, $player, $volume = null, $playIfSync = tr } _squeezePlay($player, $volume); - - if ($sdb) { - hotwaterCheckMode(); - sleep(3); - hotwaterCheckMode(); - } } function squeezePlayerOn($player) @@ -203,7 +197,6 @@ function squeezePlayerOn($player) // } } else if ($player == $squeezeboxPlayers['Salle de bains']) { execScene('sdb/ampli/on'); - hotwaterCheckMode(); if (getSqueezePlayerStatus($player) < 0) { phoneTask('Tortuga', 'sdb'); } diff --git a/scripts/lib/traffic.php b/scripts/lib/traffic.php deleted file mode 100644 index a706902..0000000 --- a/scripts/lib/traffic.php +++ /dev/null @@ -1,36 +0,0 @@ -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 diff --git a/scripts/lib/velib.php b/scripts/lib/velib.php deleted file mode 100644 index 5fb35c5..0000000 --- a/scripts/lib/velib.php +++ /dev/null @@ -1,57 +0,0 @@ - 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 diff --git a/scripts/velib.php b/scripts/velib.php deleted file mode 100644 index 52dcc1b..0000000 --- a/scripts/velib.php +++ /dev/null @@ -1,5 +0,0 @@ - *.velib li .n.green { 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; } @@ -570,44 +533,7 @@ section accordion > a.velib li .n.green { 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; } diff --git a/style/style.less b/style/style.less index dcae523..f36dc9b 100644 --- a/style/style.less +++ b/style/style.less @@ -339,180 +339,73 @@ section { } } - &.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; } + +} + }