Updated Minecraft website.

This commit is contained in:
flash 2023-02-25 20:55:38 +00:00
parent f322be94b4
commit 44447d74ad
3 changed files with 65 additions and 52 deletions

View File

@ -65,9 +65,15 @@ $router->get('/', function($response, $request) use ($db, $remote, $loginUrl, $u
$body .= '</div>';
}
if($userInfo->success) {
if(!$userInfo->success) {
$body .= '<div class="section">';
$body .= ' <h2>You must be logged in to use this website!</h2>';
$body .= ' <p>This website allows you to whitelist yourself on our Minecraft servers, for which you need to be logged in.</p>';
$body .= ' <p>So it doesn\'t make sense to display the details either.</p>';
$body .= '</div>';
} else {
if($userInfo->mc_whitelisted < 1) {
$body .= '<div class="whitelist">';
$body .= '<div class="section whitelist">';
$body .= ' <h2>Add to Whitelist</h2>';
$body .= ' <p>This will give you access to the server.</p>';
$body .= ' <form method="post" action="/whitelist/add">';
@ -81,29 +87,30 @@ $router->get('/', function($response, $request) use ($db, $remote, $loginUrl, $u
$body .= '</div>';
}
$body .= '<div class="details">';
$body .= ' <h2>Server address</h2>';
$body .= ' <p style="color: red;">Down currently because I don\'t have the resources to run multiple games at once yet.</p>';
//$body .= ' <pre><code>mc.flashii.net</code></pre>';
//$body .= ' <p>An SRV record is used, so no port needs to be specified.</p>';
$body .= ' <p>We recommend you use <a href="https://multimc.org/" target="_blank" rel="noopener">MultiMC</a>/<a href="https://polymc.org/" target="_blank" rel="noopener">PolyMC</a> for easy version and mod management and <a href="https://adoptium.net/">Adoptium Java 17</a> to actually be able to launch the game. Other launchers work completely fine though.</p>';
$body .= '<div class="section">';
$body .= ' <h2>Servers</h2>';
$body .= ' <table class="servers">';
$body .= ' <thead>';
$body .= ' <tr><th class="col-name">Name</th> <th class="col-address">Address</th> <th class="col-java">Java version</th> <th class="col-bedrock">Bedrock version</th> <th class="col-details">Details</th></tr>';
$body .= ' </thead>';
$body .= ' <tbody>';
// $body .= ' <tr><td class="col-name">Vanilla Survival</td> <td class="col-address"><code>mc-survival.flashii.net</code></td> <td class="col-java">1.19.2</td> <td class="col-bedrock">N/A</td> <td class="col-details">Regular Minecraft Survival with some server-side extensions.</td></tr>';
// $body .= ' <tr><td class="col-name">Beta Survival</td> <td class="col-address"><code>mc-beta.flashii.net</code></td> <td class="col-java">Beta 1.7.3</td> <td class="col-bedrock">N/A</td> <td class="col-details">Classic Minecraft Survival!</td></tr>';
// $body .= ' <tr><td class="col-name">Tekkit Classic</td> <td class="col-address"><code>mc-tekkit.flashii.net</code></td> <td class="col-java">1.2.5</td> <td class="col-bedrock">N/A</td> <td class="col-details"><a href="https://www.technicpack.net/modpack/tekkit.552560" target="_blank" rel="noopener">Page for this modpack on the Technic Platform</a></td></tr>';
$body .= ' <tr><td class="col-name">All of Fabric 6</td> <td class="col-address"><code>mc-aof6.flashii.net</code></td> <td class="col-java">1.19.2</td> <td class="col-bedrock">N/A</td> <td class="col-details"><a href="https://www.curseforge.com/minecraft/modpacks/all-of-fabric-6" target="_blank" rel="noopener">Page for this modpack on CurseForge</a></td></tr>';
$body .= ' </tbody>';
$body .= ' </table>';
$body .= '</div>';
$body .= '<div class="bedrock">';
$body .= ' <h2>Bedrock versions</h2>';
$body .= ' <p>Through the black magic bestowed upon us by <a href="https://geysermc.org/" target="_blank" rel="noopener">GeyserMC</a> it\'s possible to play on the server through any of the updated Bedrock versions of Minecraft.</p>';
$body .= ' <p>This should allow you to play on the server from a phone, a tablet or a console, provided you also have an account for the original version of the game.</p>';
$body .= ' <p>You will need to link your Minecraft and Bedrock accounts, you can do this by connecting to <code>link.geysermc.org</code> in both versions of the game and following the on-screen instructions.</p>';
$body .= ' <p>Unfortunately, the Bedrock versions of the game don\'t support SRV records, so you\'ll have to join with a different address:</p>';
//$body .= ' <pre><code>mcb.flashii.net:19132</code></pre>';
$body .= ' <p style="color: red;">Also down, lol!</p>';
$body .= '</div>';
if($userInfo->mc_whitelisted > 0) {
$body .= '<div class="unwhitelist">';
$body .= '<div class="section unwhitelist">';
$body .= ' <h2>Remove from Whitelist</h2>';
$body .= ' <p>This will revoke your access to the server.</p>';
$body .= sprintf(' <p>You are currently whitelisted as <b>%s</b> on <b>%s</b>.</p>', $userInfo->mc_username, date('Y-m-d H:i:s T', $userInfo->mc_whitelisted));
if(floor($userInfo->mc_whitelisted / 300) === floor(time() / 300)) {
$body .= ' <p><b style="font-size: 1.1em; line-height: 1.4em;">The whitelists are synchronised once every 5 minutes, you\'ll be able to play soon!</b></p>';
$body .= ' <p>If you\'re playing a modpack, take that time to start the game up; it\'ll take a while.</p>';
}
$body .= ' <form method="post" action="/whitelist/remove">';
$body .= sprintf(' <input type="hidden" name="boob" value="%s">', $sVerification);
$body .= ' <input type="submit" value="Remove me from the whitelist">';
@ -111,24 +118,18 @@ $router->get('/', function($response, $request) use ($db, $remote, $loginUrl, $u
$body .= '</div>';
}
$body .= '<div class="bedrock">';
$body .= ' <h2>All Of Fabric 5 (1.3.0)</h2>';
$body .= ' <pre><code>aof.flashii.net</code></pre>';
$body .= ' <p>An SRV record is used, so no port needs to be specified.</p>';
$body .= ' <p>There\'s a pack for <a href="https://multimc.org/" target="_blank" rel="noopener">MultiMC</a>/<a href="https://polymc.org/" target="_blank" rel="noopener">PolyMC</a> somewhere and you\'ll probably need <a href="https://adoptium.net/">Adoptium Java 17</a> to actually be able to launch the game. Other launchers work completely fine though, probably.</p>';
$body .= ' <p>This server doesn\'t currently use a whitelist, so you don\'t have to worry about that.</p>';
$body .= '</div>';
} else {
$body .= '<div class="loggedout">';
$body .= ' <h2>You must be logged in to use this website!</h2>';
$body .= ' <p>This website allows you to whitelist yourself on our Minecraft server, for which you need to be logged in.</p>';
$body .= ' <p>So it doesn\'t make sense to display the details either.</p>';
$body .= '<div class="section">';
$body .= ' <h2>Bedrock versions</h2>';
$body .= ' <p>Through the black magic bestowed upon us by <a href="https://geysermc.org/" target="_blank" rel="noopener">GeyserMC</a> it\'s possible to play on the server through any of the updated Bedrock versions of Minecraft.</p>';
$body .= ' <p>This should allow you to play on the server from a phone, a tablet or a console, provided you also have an account for the original version of the game.</p>';
$body .= ' <p>You will need to link your Minecraft and Bedrock accounts, you can do this by connecting to <code>link.geysermc.org</code> in both versions of the game and following the on-screen instructions.</p>';
$body .= ' <p>Do note that this only works for servers where both a Java and Bedrock version number is listed!</p>';
$body .= '</div>';
}
$body .= '<div class="rules">';
$body .= '<div class="section">';
$body .= ' <h2>Rules</h2>';
$body .= ' <p>1. Observe <a href="https://flashii.net/info/rules">Global Rules</a>.</p>';
$body .= ' <p>1. Observe <a href="//fii.moe/rules">Global Rules</a>.</p>';
$body .= ' <p>2. Don\'t be an asshole.</p>';
$body .= ' <p>3. Don\'t flood.</p>';
$body .= '</div>';

View File

@ -63,17 +63,20 @@ body {
}
.content {
max-width: 1000px;
max-width: 1020px;
width: 100%;
margin: 0 auto;
margin-top: 1em;
padding: 20px 0 40px;
padding: 5px 10px 40px;
}
.details p {
.section {
margin: 15px 0;
}
.section p {
margin: .2em 0;
}
.details pre {
.section pre {
font-size: 1.5em;
}
@ -82,9 +85,6 @@ body {
color: #f33;
}
.whitelist {
margin-bottom: 20px;
}
.whitelist input[type="submit"] {
font-size: 1.5em;
margin: 5px;
@ -103,9 +103,6 @@ body {
background-color: #232;
}
.unwhitelist {
margin-top: 20px;
}
.unwhitelist input[type="submit"] {
font-size: 1.5em;
margin: 5px;
@ -142,16 +139,30 @@ label .label-input input {
width: 100%;
}
.rules {
margin-top: 20px;
.servers {
margin: 0 auto;
font-size: 1.1em;
line-height: 1.4em;
border-spacing: 1px;
}
.bedrock {
margin-top: 20px;
.servers th {
border-bottom: 1px solid #888;
background-image: linear-gradient(0deg, #444 0, transparent 50%);
}
.bedrock pre {
font-size: 1.5em;
.servers th,
.servers td {
padding: 0 10px;
}
.bedrock p {
margin: .2em 0;
.servers .col-name {
font-weight: 700;
}
.servers .col-java,
.servers .col-bedrock {
text-align: center;
}
.servers tbody tr:nth-child(odd) td {
background-color: #222;
}
.servers tbody tr:nth-child(even) td {
background-color: #333;
}

View File

@ -15,6 +15,7 @@ final class HTML {
<head>
<meta charset="utf-8">
<title>{$title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/mince.css" type="text/css" rel="stylesheet">
</head>
<body>