1
0
Fork 0
gaming.bathynomus.xyz/index.php
2023-03-08 03:15:11 -07:00

89 lines
4.8 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" rel="stylesheet" type="text/css" media="all"/>
<title>gaming</title>
<?php
include("lib.php");
$theday = (int)floor((time() / 3600) / 24);
srand($theday);
$bgs = glob("*/bg/*.png");
shuffle($bgs);
$bg = $bgs[array_rand($bgs)];
echo "<style type='text/css'>body{background-image:url('$bg');}</style>";
?>
<style>
#about, #servers {
display: none;
}
input#abouttoggle:checked ~ #about {
display: initial;
}
input#abouttoggle:checked ~ nav label[for=abouttoggle] {
font-weight: bold;
}
input#serverstoggle:checked ~ #servers {
display: initial;
}
input#serverstoggle:checked ~ nav label[for=serverstoggle] {
font-weight: bold;
}
</style>
</head>
<body>
<main>
<h1>gaming moment</h1>
<input type="radio" name="toggles" id="serverstoggle" checked>
<input type="radio" name="toggles" id="abouttoggle">
<nav>
<label for="serverstoggle">Servers</label>
<label for="abouttoggle">About</label>
</nav>
<div id="servers">
<a href="lasagna/" class="server">
<h2><?php
$lasagnastats = json_decode(file_get_contents("lasagna/status.txt"));
if($lasagnastats->online) {
echo "<span title='The server is online with " . $lasagnastats->player_count . "/" . $lasagnastats->player_max . " players as of " . roundtime(time() - filemtime("lasagna/status.txt")) . " ago.'>🟢</span>";
} else {
echo "<span title='The server is offline as of " . roundtime(time() - filemtime("lasagna/status.txt")) . " ago.'>🔴</span>";
}
?> Lasagna <span class="game">Minecraft<?php if($lasagnastats->online) { echo " " . $lasagnastats->version; } ?></span></h2>
<p>A private vanilla Minecraft survival server for me and some friends, affectionately termed "Lasagna" by some of them for reasons.</p>
</a>
<a href="fiori/" class="server">
<h2><?php
$fioristats = json_decode(file_get_contents("fiori/status.txt"));
if($fioristats->online) {
echo "<span title='The server is online with " . $fioristats->player_count . "/" . $fioristats->player_max . " players as of " . roundtime(time() - filemtime("fiori/status.txt")) . " ago.'>🟢</span>";
} else {
echo "<span title='The server is offline as of " . roundtime(time() - filemtime("fiori/status.txt")) . " ago.'>🔴</span>";
}
?> Fiori <span class="game">Minecraft 1.12.2 + SkyFactory 4</span></h2>
<p>Semi-private SkyFactory 4 server. Has a whitelist, but I'll probably add you if you ask and don't seem insane.</p>
<p><strong>Port</strong>: 25665</p>
</a>
</div>
<div id="about">
<p>Hey there! I'm Will, and this is the companion website to my game servers. By my estimation, odds are you came here from one of them. Here you'll find information about each, such as IPs, rules, relevant downloads, and the like. I try to keep these things running as much as possible, but given they run on a laptop in my house, I make no guarantees as to uptime or connection quality.</p>
<p>Generally, you should be able to connect to a server by just pointing your client to this domain, as the game's default port will typically be used. If this isn't the case, the IP and port you need instead will be listed here.</p>
<p>Server-specific rules are listed under the servers themselves. In general (unless specified otherwise):
<ol>
<li>Be nice</li>
<li>No hate speech</li>
<li>Avoid discussion of sensitive topics</li>
<li>Respect other peoples' things<ul><li>Don't steal, grief or infringe on someone's space without permission</li></ul></li>
<li title="By &quot;cosmetic or QOL&quot; I mean things like minimap mods, the item physics mod, OptiFine, etc. Texture packs are obviously fine. Generally, if it doesn't affect the server itself or other players, it's not my business.">Don't cheat<ul><li>Client-side cosmetic or QOL mods are generally allowed, but things like hacks and x-ray are off the table.</li></ul></li>
</ol>
</p>
<p>If you need to contact me for any reason, I'm available at <a href="mailto:willem@bathynomus.xyz">willem@bathynomus.xyz</a> or <a href="https://matrix.to/#/@bathynomus:matrix.org">@bathynomus:matrix.org</a> on Matrix.</p>
</div>
</main>
<script src="link.js"></script>
<?php //include('chromealert.php'); ?>
</body>
</html>