summaryrefslogtreecommitdiff
path: root/pages/home.inc
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-06-25 20:10:39 +0200
committerRaindropsSys <contact@minteck.org>2023-06-25 20:10:39 +0200
commit5adf2b8517c21845dd0b406dee910514ff78640d (patch)
tree433c26dd202a8e201cef5b2ea7786e038ffd84d7 /pages/home.inc
parent395cc068abf1aadb34be8b03e5567e24aa8a898d (diff)
downloadpluralconnect-5adf2b8517c21845dd0b406dee910514ff78640d.tar.gz
pluralconnect-5adf2b8517c21845dd0b406dee910514ff78640d.tar.bz2
pluralconnect-5adf2b8517c21845dd0b406dee910514ff78640d.zip
Updated 6 files and added 2 files (automated)
Diffstat (limited to 'pages/home.inc')
-rw-r--r--pages/home.inc23
1 files changed, 22 insertions, 1 deletions
diff --git a/pages/home.inc b/pages/home.inc
index 62474d3..6e2c073 100644
--- a/pages/home.inc
+++ b/pages/home.inc
@@ -17,7 +17,7 @@ function banner() { global $isLoggedIn; global $isLowerLoggedIn; $byColor = getM
<span style="display: inline-block;background: transparent;position:absolute;width: 0;height: 0;margin-top: 17px;box-shadow: 0 6px 20px 20px #<?= $member["color"] ?>;z-index: 9;margin-left: 8px;opacity: .75;"></span>
</div><?php endforeach; ?>
</div>
- <div style="padding:5px 10px;background:#3332328a;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;position:relative;z-index: 999;backdrop-filter: blur(30px);">
+ <div style="padding:5px 10px;background:#3332328a;position:relative;z-index: 999;backdrop-filter: blur(30px);">
<h2 style="margin-top: 20px;">Cold Haze</h2>
<?php if ($isLoggedIn || $isLowerLoggedIn): ?>
<p><?= count($byColor) ?> ponies in 3 plural systems</p>
@@ -156,6 +156,27 @@ function members() { global $isLoggedIn; global $isLowerLoggedIn; global $app; ?
}
?>
+ <div style="background: #3332328a;padding: 5px 10px;border-top:1px solid rgba(255,255,255,.1);border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;">
+ <div id="timeline"></div>
+ <script>
+ async function refreshTimeline() {
+ document.getElementById("timeline").innerHTML = await (await fetch("/api/timeline?gdapd&ynmuc<?= ($isLowerLoggedIn || $isLoggedIn) ? "&" . $app["other"]["id"] : "" ?>")).text();
+
+ Array.from(document.getElementsByClassName("dynamic-time")).forEach((el) => {
+ let time = el.getAttribute("data-time");
+ el.innerText = new Date(parseInt(time) * 1000).toTimeString().split(":").splice(0, 2).join(":");
+ });
+
+ Array.from(document.getElementsByClassName("dynamic-time-mobile")).forEach((el) => {
+ let time = el.getAttribute("data-time");
+ el.innerText = new Date(parseInt(time) * 1000).toTimeString().split(":")[0] + ":";
+ });
+ }
+
+ setInterval(refreshTimeline, 10000);
+ refreshTimeline();
+ </script>
+ </div>
<!--<div class="alert alert-warning" style="margin-top:20px;">
<b>Notice:</b> The administrators are currently trying a new optimisation technique based on a virtual file system (chvfs). Data loss, corruption or inconsistency may happen and should be reported on <a href="https://bugs.equestria.dev/issues/CH" target="_blank">bugs.equestria.dev</a>.