summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/navigation.inc64
-rw-r--r--includes/system/species.inc3
-rw-r--r--pages/about.inc2
-rw-r--r--pages/byspecies.inc57
-rw-r--r--pages/front.inc30
-rw-r--r--pages/home.inc4
6 files changed, 114 insertions, 46 deletions
diff --git a/includes/navigation.inc b/includes/navigation.inc
index fe1c9ee..1d312e5 100644
--- a/includes/navigation.inc
+++ b/includes/navigation.inc
@@ -39,13 +39,6 @@ $navigation_admin = [
"invert" => false,
"link" => "/-/wakeup",
"stepped" => "rgb(13,202,240)"
- ],
- [
- "name" => $pages["pleasure"]["name"][$lang["_name"]],
- "icon" => "/assets/icons/pleasure.svg",
- "invert" => false,
- "link" => "/-/pleasure",
- "stepped" => "rgb(25,135,84)"
]
]
],
@@ -75,13 +68,6 @@ $navigation_admin = [
"stepped" => null
],
[
- "name" => $pages["actions"]["name"][$lang["_name"]],
- "icon" => "/assets/icons/actions.svg",
- "invert" => true,
- "link" => "/-/actions",
- "stepped" => null
- ],
- [
"name" => $pages["rules"]["name"][$lang["_name"]],
"icon" => "/assets/icons/rules.svg",
"invert" => true,
@@ -103,19 +89,25 @@ $navigation_admin = [
"stepped" => null
],
[
- "name" => $pages["nicknames"]["name"][$lang["_name"]],
- "icon" => "/assets/icons/nicknames.svg",
+ "name" => $pages["travelling"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/travelling.svg",
"invert" => true,
- "link" => "/-/nicknames",
+ "link" => "/-/travelling",
"stepped" => null
],
[
- "name" => $pages["together"]["name"][$lang["_name"]],
- "icon" => "/assets/icons/together.svg",
+ "name" => $pages["stats"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/stats.svg",
"invert" => true,
- "link" => "/-/together",
+ "link" => "/-/stats",
"stepped" => null
- ],
+ ]
+ ]
+ ],
+ "sort" => [
+ "name" => "Sorted members lists",
+ "minimal" => false,
+ "items" => [
[
"name" => $pages["splitting"]["name"][$lang["_name"]],
"icon" => "/assets/icons/splitting.svg",
@@ -131,29 +123,22 @@ $navigation_admin = [
"stepped" => null
],
[
- "name" => $pages["travelling"]["name"][$lang["_name"]],
- "icon" => "/assets/icons/travelling.svg",
+ "name" => $pages["alphabet"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/alphabet.svg",
"invert" => true,
- "link" => "/-/travelling",
+ "link" => "/-/alphabet",
"stepped" => null
],
[
- "name" => $pages["stats"]["name"][$lang["_name"]],
- "icon" => "/assets/icons/stats.svg",
+ "name" => $pages["s:species"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/species.svg",
"invert" => true,
- "link" => "/-/stats",
+ "link" => "/-/byspecies",
"stepped" => null
],
- [
- "name" => $pages["toys"]["name"][$lang["_name"]],
- "icon" => "/assets/icons/toys.svg",
- "invert" => true,
- "link" => "/-/toys",
- "stepped" => null
- ]
]
],
- "debug" => [
+ /*"debug" => [
"name" => $lang["navigation"]["debug"],
"minimal" => false,
"items" => [
@@ -186,7 +171,7 @@ $navigation_admin = [
"stepped" => null
]
]
- ]
+ ]*/
]
];
$navigation_global = [
@@ -228,13 +213,6 @@ $navigation_global = [
"stepped" => null
] : null),
[
- "name" => $pages["alphabet"]["name"][$lang["_name"]],
- "icon" => "/assets/icons/alphabet.svg",
- "invert" => true,
- "link" => "/-/alphabet",
- "stepped" => null
- ],
- [
"name" => $pages["terminology"]["name"][$lang["_name"]],
"icon" => "/assets/icons/terminology.svg",
"invert" => true,
diff --git a/includes/system/species.inc b/includes/system/species.inc
index 8f4368e..b5fdee6 100644
--- a/includes/system/species.inc
+++ b/includes/system/species.inc
@@ -25,8 +25,7 @@ function species(array $members, string $id, string $name) { global $systemID; g
<div class="relation-item" style="margin-left:10px;padding:0 20px;">
<?php if (count($members) > 0): ?>
- <?php $index = 0; foreach ($members as $member): ?>
- <a class="member-link" href="/<?= $member["name"] ?>"><img src="<?= getAsset($member["_system"], $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member["display_name"] ?? $member["name"]) ?></a><?php if ($index + 2 <= count($members)) echo('<span class="list-separator-desktop">, &nbsp;</span><span class="list-separator-mobile"><br></span>'); $index++; endforeach; ?>
+ <?php $index = 0; foreach ($members as $member): ?><a class="member-link" href="/<?= $member["name"] ?>"><img src="<?= getAsset($member["_system"], $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member["display_name"] ?? $member["name"]) ?></a><?php if ($index + 2 <= count($members)) echo('<span class="list-separator-desktop">, </span><span class="list-separator-mobile"><br></span>'); $index++; endforeach; ?>
<?php else: ?>-<?php endif; ?>
</div>
</div>
diff --git a/pages/about.inc b/pages/about.inc
index 855d9b1..0e0857e 100644
--- a/pages/about.inc
+++ b/pages/about.inc
@@ -67,7 +67,7 @@ function prettySize($bytes) {
<div id="page-content">
<h2>About Cold Haze</h2>
<p>
- <b>Cold Haze Engine version 2.<?= $version["build"] ?>.<?= hexdec(substr($version["hash"], 0, 4)) ?>.<?= $version["revision"] ?></b><br>
+ <b>Cold Haze Engine version 2.<?= $version["build"] ?>.<?= $version["revision"] ?></b><br>
Version date: <?= date('D j M Y, G:i:s T', $version["timestamp"]) ?><br>
Version ID: <code style="color: white;"><?= $version["hash"] ?></code><br>
Install path: <?= $_SERVER['DOCUMENT_ROOT'] ?><br>
diff --git a/pages/byspecies.inc b/pages/byspecies.inc
new file mode 100644
index 0000000..28f114e
--- /dev/null
+++ b/pages/byspecies.inc
@@ -0,0 +1,57 @@
+<?php global $system; global $systemCommonName; global $lang; global $pages; global $systemID; $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true); $title = $pages["s:species"]["name"][$lang["_name"]] . " ยท " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; global $travelling;
+
+$members = scoreOrderGlobal();
+
+function species(array $members, string $id, string $name) { global $systemID; global $travelling; ?>
+ <div class="relation" style="background-color:rgba(255, 255, 255, .1);margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 4fr;">
+ <div class="relation-intro" style="background-color:rgba(255, 255, 255, .05);border-right:1px solid rgba(255, 255, 255, .1);margin:-10px;padding:10px;border-top-left-radius:10px;border-bottom-left-radius:10px;color: white;text-decoration: none;">
+ <img src="/assets/species/<?= $id ?>.png" style="width:24px;"><span class="species-name"> <?= $name ?></span> (<?= count($members) ?>)
+ </div>
+
+ <div class="relation-item" style="margin-left:10px;padding:0 20px;">
+ <?php if (count($members) > 0): ?>
+ <?php $index = 0; foreach ($members as $member): ?><a class="member-link" href="/<?= $member["name"] ?>"><img src="<?= getAsset($member["_system"], $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member["display_name"] ?? $member["name"]) ?></a><?php if ($index + 2 <= count($members)) echo('<span class="list-separator-desktop">, </span><span class="list-separator-mobile"><br></span>'); $index++; endforeach; ?>
+ <?php else: ?>-<?php endif; ?>
+ </div>
+ </div>
+<?php }
+
+?>
+
+ <br>
+ <div class="container" id="page-content">
+ <h2><?= str_replace("%1", "All", $lang["species_compare"]["title"]) ?></h2>
+ <?php
+
+ $earth = [];
+ $pegasus = [];
+ $unicorn = [];
+ $alicorn = [];
+ $batpony = [];
+ $crystal = [];
+ $changeling = [];
+
+ foreach ($members as $member) {
+ foreach ($member["_metadata"]["species"] as $species) {
+ if ($species === "earth") $earth[] = $member;
+ if ($species === "pegasus") $pegasus[] = $member;
+ if ($species === "unicorn") $unicorn[] = $member;
+ if ($species === "alicorn") $alicorn[] = $member;
+ if ($species === "batpony") $batpony[] = $member;
+ if ($species === "crystal") $crystal[] = $member;
+ if ($species === "changeling") $changeling[] = $member;
+ }
+ }
+
+ ?>
+
+ <?php species($earth, "earth", $lang["species"]["earth"][3]); ?>
+ <?php species($pegasus, "pegasus", $lang["species"]["pegasus"][3]); ?>
+ <?php species($unicorn, "unicorn", $lang["species"]["unicorn"][3]); ?>
+ <?php species($alicorn, "alicorn", $lang["species"]["alicorn"][3]); ?>
+ <?php species($batpony, "batpony", $lang["species"]["batpony"][3]); ?>
+ <?php species($crystal, "crystal", $lang["species"]["crystal"][3]); ?>
+ <?php species($changeling, "changeling", "Changelings"); ?>
+ </div>
+
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?> \ No newline at end of file
diff --git a/pages/front.inc b/pages/front.inc
new file mode 100644
index 0000000..a60be1d
--- /dev/null
+++ b/pages/front.inc
@@ -0,0 +1,30 @@
+<?php
+
+$parts = explode("/", $_GET["_"]);
+
+var_dump($parts);
+
+if (isset($parts[2])) {
+ if ($parts[2] === "cloudburst") {
+ $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/fronters.json"), true);
+ } elseif ($parts[2] === "raindrops") {
+ $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/fronters.json"), true);
+ } else {
+ header("Location: /");
+ die();
+ }
+
+ if (count($fronters["members"]) > 0) {
+ header("Location: /" . $fronters["members"][0]["name"]);
+ die();
+ } else {
+ if ($parts[2] === "cloudburst") {
+ header("Location: /cloudburst");
+ } else {
+ header("Location: /raindrops");
+ }
+ }
+} else {
+ header("Location: /");
+ die();
+} \ No newline at end of file
diff --git a/pages/home.inc b/pages/home.inc
index 7d26e68..d61d467 100644
--- a/pages/home.inc
+++ b/pages/home.inc
@@ -45,6 +45,10 @@
</a>
<?php endif; ?>
+ <!--<div class="alert alert-info">
+ <b>Coming soon:</b> Free hosting for Project Scout (the software powering Cold Haze), so you can have your own website for your system. If you are interested and/or want to pre-register, feel free to <a href="https://equestria.horse/contact" target="_blank">contact us</a>.
+ </div>-->
+
<div id="homepage-desktop" style="margin-top:10px;">
<?php if ($_SERVER['HTTP_HOST'] !== "fr.equestria.horse") cloudburst(false); ?>