diff --git a/functions.php b/functions.php index 6d5da75..9a36de2 100644 --- a/functions.php +++ b/functions.php @@ -7,8 +7,11 @@ $config_filename = 'config_times.json'; $timeRegex = '/^((2[0-3]|1[0-9]|0[0-9]|[^0-9][0-9]):([0-5][0-9]|[0-9]))/'; -$sun_zenith = 96; /* Civilian Twilight */ -//$sun_zenith = 90+50/60; /* "true" sunrise/ sunset */ +$sunsetTrue = 90+50/60; /* "true" sunrise/ sunset */ +$sunsetCivilian = 96; /* Civilian Twilight */ +$sunsetNautical = 102; /* Nauticla Twilight */ + +$sun_zenith = $sunsetCivilian; $timezone = "Europe/Berlin"; class LightStatus { diff --git a/index.php b/index.php index 24ecaec..a86ff43 100644 --- a/index.php +++ b/index.php @@ -69,30 +69,41 @@ if (isset($_GET['action'])) { - +

Garagenlicht

-

Aktueller Status

-

-state) : ?> - Licht: AN
- - Licht: AUS
- - Zeit bis nächste Änderung: changeTime === 1) ? $light->changeTime." Minute" : $light->changeTime." Minuten" ?> -

- Licht temporär an (15 Min) + + + + + + + + + +
Licht:state) ? 'EINGESCHALTET' + : 'AUSGESCHALTET';?>
Änderung in:changeTime === 1) ? $light->changeTime." Minute" : $light->changeTime." Minuten" ?>
+ Licht temporär an (15 Min)
weitere Informationen:
-

- Sonnenaufgang: sunrise ?>
- Sonnenuntergang: sunset ?>
- Aktuelle Zeit:
-

+ + + + + + + + + + + + + +
Sonnenaufgang:sunrise ?>
Sonnenuntergang:sunset ?>
Aktuelle Zeit:
Nacht (ja/nein):isNight) ? "ja" : "nein" ?>

Einstellungen

@@ -117,7 +128,7 @@ if (isset($_GET['action'])) { - +
diff --git a/style.css b/style.css index b76b8be..f30cb52 100644 --- a/style.css +++ b/style.css @@ -5,6 +5,23 @@ body { max-width: 500px; + margin-bottom: 20px; +} +.big{ + font-size: 1.25em; +} +table { + margin-top: 1em; + margin-bottom: 1em; +} +table tr>td:first-child { + padding-right: 0.75em; + text-align: right; +} + +.dark { + background-color: #292929; + color: #efefef; } form div.form-group > div > input.form-control {