diff options
Diffstat (limited to 'pages/schedules.inc')
-rw-r--r-- | pages/schedules.inc | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/pages/schedules.inc b/pages/schedules.inc index 9b1c5eb..04081fe 100644 --- a/pages/schedules.inc +++ b/pages/schedules.inc @@ -33,7 +33,16 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; <div class="container"> <h2>Schedules</h2> - <div id="schedules" style="margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 20px;"> + <div id="schedules" style="margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 20px;"> + <div> + <div id="live-time-other2-outer" class="day-gradient" style="text-align: center; background-color: rgba(255, 255, 255, .1); padding: 20px 0; border-radius: 10px; margin-bottom: 20px;"> + <b>Meadowsys</b><br> + <h3 id="live-time-other2">--:--</h3> + </div> + + <hr style="display: none;" class="schedules-separator"> + </div> + <div> <div id="live-time-other-outer" class="day-gradient" style="text-align: center; background-color: rgba(255, 255, 255, .1); padding: 20px 0; border-radius: 10px; margin-bottom: 20px;"> <b><?= $app["other"]["name"] ?></b><br> @@ -63,11 +72,6 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; ?>--> - <ul> - <li><b>Anchorage:</b> <span id="live-time-other1">--:--</span></li> - <li><b>Vancouver:</b> <span id="live-time-other2">--:--</span></li> - </ul> - <hr style="display: none;" class="schedules-separator"> </div> @@ -157,6 +161,16 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/composer/ical/ical.php"; } function updateTime() { + let time0 = (new Intl.DateTimeFormat('en-US', { + timeZone: 'America/Los_Angeles', + hour: 'numeric', + minute: '2-digit', + hour12: true + })).format(new Date()); + + document.getElementById("live-time-other2").innerText = time0; + document.getElementById("live-time-other2-outer").style.backgroundPositionY = getDayPercentage(time0) + "%"; + let time1 = (new Intl.DateTimeFormat('en-US', { timeZone: 'Europe/Paris', hour: 'numeric', |