summaryrefslogtreecommitdiff
path: root/pages/home.inc
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-12-10 22:27:08 +0100
committerMinteck <contact@minteck.org>2022-12-10 22:27:08 +0100
commit30303a3ad0d0f31d93c25f42bfd10d70e8277b72 (patch)
tree622964e7895c759232aff28230394aa5cc747be9 /pages/home.inc
parentf850a8a53efd719fef6c8784c5af7b89dd9a6a2f (diff)
downloadpluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.tar.gz
pluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.tar.bz2
pluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.zip
Update
Diffstat (limited to 'pages/home.inc')
-rw-r--r--pages/home.inc63
1 files changed, 23 insertions, 40 deletions
diff --git a/pages/home.inc b/pages/home.inc
index 54426a9..7d26e68 100644
--- a/pages/home.inc
+++ b/pages/home.inc
@@ -1,11 +1,11 @@
-<?php if (isset($_GET['error'])) header("HTTP/1.1 404 Not Found"); require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; global $readOnly; global $isNormallyLoggedIn; global $_PROFILE; ?>
+<?php if (isset($_GET['error'])) header("HTTP/1.1 404 Not Found"); require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; global $readOnly; global $isNormallyLoggedIn; global $_PROFILE; global $lang; global $pages; ?>
<br>
<div class="container">
<?php if (isset($_GET['error'])): ?>
<div class="alert alert-danger alert-dismissible">
<button onclick='window.history.pushState({"html":null,"pageTitle":document.title},"", "/");' type="button" class="btn-close" data-bs-dismiss="alert"></button>
- <b>Error: </b><?= strip_tags($_GET['error']) ?>
+ <b><?= $lang["home"]["error"] ?> </b><?= strip_tags($_GET['error']) ?>
</div>
<?php endif; ?>
@@ -15,56 +15,39 @@
</div>
<?php endif; ?>
- <?php global $travelling; if (!isset($_GET['legacy'])): $byColor = getMembersByColor(); ?>
- <div style="text-align: center;">
- <img alt="" src="/assets/logo/newlogo.png" style="width:128px;">
- <p style="z-index:999;position:relative;background:black;margin: 20px -10px 0 -20px;padding-right:30px;height:32px;text-align: center;display:grid;grid-template-columns: repeat(<?= count($byColor) ?>, 1fr);">
- <?php foreach ($byColor as $member): ?><a data-bs-html="true" class="rainbow-item tooltip-nohelp" title="<b><?= $member["display_name"] ?? $member["name"] ?></b><br><?= ($travelling[$member['id']]["travelling"] ? $member["_system"] === "ynmuc" : $member["_system"] === "gdapd") ? "Raindrops System" : "Cloudburst System" ?>" data-bs-toggle="tooltip" style="overflow: hidden;" href="/<?= $member["name"] ?>"><img src="<?= getAsset($member["_system"], $member["id"], "heads") ?>" style="height:32px;position:absolute;z-index:99;"></a><?php endforeach; ?>
- </p>
- <div style="margin-top:-33px;margin-bottom:0;margin-left:-20px;margin-right:20px;height:32px;text-align: center;display:grid;grid-template-columns: repeat(<?= count($byColor) ?>, 1fr);">
- <?php foreach ($byColor as $member): ?><div>
- <span style="display: inline-block;background: transparent;position:absolute;width: 20px;height: 15px;margin-top: 17px;box-shadow: 0 6px 20px 7px #<?= $member["color"] ?>;z-index: 9;margin-left: 8px;opacity: .75;"></span>
- </div><?php endforeach; ?>
- </div>
- <div style="padding:5px 10px;background:#222;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;">
- <h2 style="margin-top: 20px;">Cold Haze</h2>
- <p><?= count($byColor) ?> ponies in 2 plural systems</p>
- </div>
+ <?php global $travelling; $byColor = getMembersByColor($_SERVER['HTTP_HOST'] === "fr.equestria.horse"); ?>
+ <div style="text-align: center;">
+ <img alt="" src="/assets/logo/newlogo<?php if ($_SERVER['HTTP_HOST'] === "fr.equestria.horse"): ?>2<?php endif; ?>.png" style="width:128px;">
+ <p style="z-index:999;position:relative;background:black;margin: 20px -10px 0 -20px;padding-right:30px;height:32px;text-align: center;display:grid;grid-template-columns: repeat(<?= count($byColor) ?>, 1fr);">
+ <?php foreach ($byColor as $member): ?><a data-bs-html="true" class="rainbow-item tooltip-nohelp" title="<b><?= $member["display_name"] ?? $member["name"] ?></b><br><?= ($travelling[$member['id']]["travelling"] ? $member["_system"] === "ynmuc" : $member["_system"] === "gdapd") ? "Raindrops System" : "Cloudburst System" ?>" data-bs-toggle="tooltip" style="overflow: hidden;" href="/<?= $member["name"] ?>"><img src="<?= getAsset($member["_system"], $member["id"], "heads") ?>" style="height:32px;position:absolute;z-index:99;"></a><?php endforeach; ?>
+ </p>
+ <div style="margin-top:-33px;margin-bottom:0;margin-left:-20px;margin-right:20px;height:32px;text-align: center;display:grid;grid-template-columns: repeat(<?= count($byColor) ?>, 1fr);">
+ <?php foreach ($byColor as $member): ?><div>
+ <span style="display: inline-block;background: transparent;position:absolute;width: 20px;height: 15px;margin-top: 17px;box-shadow: 0 6px 20px 7px #<?= $member["color"] ?>;z-index: 9;margin-left: 8px;opacity: .75;"></span>
+ </div><?php endforeach; ?>
</div>
- <hr style="border-color:rgba(255, 255, 255, .25);">
- <?php else: ?>
- <div style="background:rgba(255, 255, 255, .1);max-width:100%;width:max-content;display:grid;grid-template-columns:128px 1fr;border-radius:10px;margin-left:auto;margin-right:auto;color:white;">
-
- <!-- Logo -->
- <img src="/assets/uploads/logo.jpg" alt="" style="width:128px;border-top-left-radius:10px;border-bottom-left-radius:10px;">
-
- <!-- Banner text -->
- <div style="padding:20px;display:flex;align-items:center;justify-content:center;">
- <div>
-
- <!-- Main title -->
- <span style="font-weight:bold;font-size:24px;">Cold Haze</span><br>
-
- <!-- Tagline -->
- <span style="font-weight:normal;font-size:16px;">Just a small safe place for two plural systems</span>
-
- </div>
- </div>
-
+ <div style="padding:5px 10px;background:#222;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;">
+ <h2 style="margin-top: 20px;">Cold Haze</h2>
+ <?php if ($_SERVER['HTTP_HOST'] === "fr.equestria.horse"): ?>
+ <p><?= count($byColor) ?> poneys dans une tĂȘte</p>
+ <?php else: ?>
+ <p><?= count($byColor) ?> <?= $lang["home"]["intro"] ?></p>
+ <?php endif; ?>
</div>
- <?php endif; ?>
+ </div>
+ <hr style="border-color:rgba(255, 255, 255, .25);">
<?php global $isLoggedIn; if ($isLoggedIn && ((int)date('H') >= 20 || (int)date('H') < 6)): ?>
<a href="/-/emergency" style="text-decoration: none;margin-top:15px;display:block;">
<div class="alert alert-danger">
- <b>Are you in need of help?</b> If you need immediate help from a loved one, you may want to enable the emergency alert by clicking here, even if that will wake up the <?= $_PROFILE['name'] === "Raindrops System" ? "Cloudburst System" : "Raindrops System" ?>. Use it as you need.
+ <b>Are you in need of help?</b> If you need immediate help from a loved one, you may want to enable the emergency alert by clicking here, even if that wakes up the <?= $_PROFILE['name'] === "Raindrops System" ? "Cloudburst System" : "Raindrops System" ?>. Use it as you need.
</div>
</a>
<?php endif; ?>
<div id="homepage-desktop" style="margin-top:10px;">
- <?php cloudburst(false); ?>
+ <?php if ($_SERVER['HTTP_HOST'] !== "fr.equestria.horse") cloudburst(false); ?>
<?php raindrops(false); ?>
</div>