Alt Rules added (up for additions or critizing) #14

Closed
Lupancham wants to merge 3 commits from Lupancham/Website:main into main
7 changed files with 109 additions and 18 deletions
Showing only changes of commit c9e8092851 - Show all commits

View file

@ -1,6 +1,9 @@
name: Upload Website
name: Upload Website
on: [ push ]
on:
push:
branches:
- main
jobs:
sftp:

View file

@ -19,26 +19,43 @@
'short_description' => 'The first nation, prev. known as ROP.',
'description' => 'The first nation on CRSS, previously known as ROP.',
),
'drr' => array(
'name' => 'Democratic Republic of Rayland',
'flag' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/Democratic%20Republic%20of%20Rayland/bannre.png',
'short' => 'drr',
'short_description' => 'Short description of D.R.R.',
'description' => 'Full description of D.R.R', //does this support html and line breaks
),
'cnk' => array(
'name' => 'Chunkia',
'flag' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/Chunkia/chunkia512.png',
'short' => 'cnk',
'short_description' => 'Chunkia is based in a chaotic landscape',
'description' => 'In the chaos of Minecraft, chunk errors are inevitable. Chunkia is based in one.',
)
),
'ttk' => array(
'name' => 'The Toaster-Königreich',
'flag' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/The%20Toaster-K%C3%B6nigreich/The%20Toaster-K%C3%B6nigreich%20Flag.png',
'short' => 'ttk',
'short_description' => 'The Toaster-Königreich is the Industrialized Nation of CRSS',
'description' => 'In the vast landsacpe of CRSS, The Toaster-Königreich is one of the most industrialized Marxist district of CRSS. With Charge Industries as one of the main government controlled company in the nation.',
),
'rob' => array(
'name' => 'Republic of Budapest',
'flag' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/Republic%20of%20Budapest/Assets/Flag.svg',
'short' => 'rob',
'short_description' => 'Republic of Budapest is a country located to the west of the map.',
'description' => 'Republic of Budapest is a country located to the west of the map.',
)
);
$companies = array(
'fbk' => array(
'name' => 'FedBank',
'logo' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/Republic%20of%20Panorama/Flag.svg',
'short' => 'fbk',
'short_description' => 'An International Bank, owned by the PSF government',
'description' => 'FedBank is an International bank owned and controlled by the Panorama Socialist Federation\'s Government. The main building is in PSF, but there is a FedBank in TTK too.'
),
'ntn' => array(
'name' => 'Northern',
'logo' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Companies/Chunkia/northern.svg',
'short' => 'ntn',
'short_description' => 'The Northern Company.',
'description' => 'Creators of the H1 and the Northern Complex, Northern is dedicated to improving the CRSS experience.'
)
);
@ -62,6 +79,7 @@
$twig->addGlobal('playerCount', $json);
$twig->addGlobal('nations', $nations);
$twig->addGlobal('companies', $companies);
$twig->addGlobal('dc_uri', 'https://discord.com/api/oauth2/authorize?client_id=1144248396467683338&redirect_uri=' . urlencode($_ENV['DISCORD_REDIRECT']) . '&response_type=code&scope=identify%20guilds&state=' . urlencode($_SERVER['REQUEST_URI']));
$twig->addGlobal('reduced', isset($_GET['reduced']));
@ -82,6 +100,14 @@
echo $twig->render('nations.twig');
});
$router->get('/companies', function() {
global $twig;
$twig->addGlobal('pageUri', '/companies');
echo $twig->render('companies.twig');
});
$router->get('/gallery', function() {
global $twig;
@ -140,6 +166,21 @@
}
});
$router->get('/company/([a-z]+)', function ($company) {
global $twig, $mysql, $companies;
$twig->addGlobal('pageUri', '/company/' . $company);
if(!$companies[$company]) {
http_response_code(404);
echo $twig->render('404.twig');
} else {
echo $twig->render('nation.twig', array('nation' => $companies[$company]));
}
});
$router->get('/u/([a-z0-9_\.]+)', function($name) {
global $twig, $mysql, $discord;

View file

@ -50,21 +50,21 @@ markers.forEach(marker => {
ropMarkers
.addLayer(
L.marker([
parseInt(coords[0]), parseInt(coords[1])
parseFloat(coords[0]), parseFloat(coords[1])
]).bindPopup(marker.name)
);
break;
case 'drr':
drrMarkers.addLayer(
L.marker([
parseInt(coords[0]), parseInt(coords[1])
parseFloat(coords[0]), parseFloat(coords[1])
]).bindPopup(marker.name)
);
break;
default:
miscMarkers.addLayer(
L.marker([
parseInt(coords[0]), parseInt(coords[1])
parseFloat(coords[0]), parseFloat(coords[1])
]).bindPopup(marker.name)
);
break;
@ -94,8 +94,8 @@ let map = L.map('map', {
projection: L.Projection.LonLat
}),
}).setView([
parseInt(center.split(';')[1]),
parseInt(center.split(';')[0])
parseFloat(center.split(';')[1]),
parseFloat(center.split(';')[0])
], 2);
let baseMaps = {

22
template/companies.twig Normal file
View file

@ -0,0 +1,22 @@
{% include 'includes/head.twig' with {'pageTitle': 'Companies'} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': 'companies'} %}
<main class="pageContent container">
<h1>Companies</h1>
<div class="cards">
{% for company in companies %}
<a class="card transitionEnabled" href="/company/{{ company.short }}">
<h1>{{ company.name }}</h1>
<p>{{ company.short_description }}</p>
<img class="icon" src="{{ company.logo }}">
</a>
{% endfor %}
</div>
</main>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

25
template/company.twig Normal file
View file

@ -0,0 +1,25 @@
{% include 'includes/head.twig' with {'pageTitle': company.name} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': 'company'} %}
<main class="pageContent container">
<ul>
<li>
code: {{ company.short }}
</li>
<li>
name: {{ company.name }}
</li>
<li>
flag: <img height="32px" src="{{ company.logo }}" alt="{{ company.name }}'s flag." />
</li>
<li>
description: {{company.description}}
</li>
</ul>
</main>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

View file

@ -11,8 +11,8 @@
<!-- Right -->
<div class="Server-Information">
<span>Server address:</span>
<input type="text" size="14" readonly value="play.blurryface.xyz">
<span>Version: 1.8.9</span>
<input type="text" size="14" readonly value="play.blryface.xyz">
<span>Version: 1.9.4</span> <!-- is this needed anymore since via -->
</div>
</div>

View file

@ -30,7 +30,7 @@
<h2 id="rules">Rules</h2>
<ol>
<li>
The usage of modified clients that gives unfair advantage to players is not permitted. Even if you only use certain cheats, such as FullBright and InvMove, you'll still get banned. <b>TL;DR Do not cheat.</b><br />
The usage of modified clients that gives unfair advantage to players (i.e. cheat clients) is not permitted. Even if you only use these clients for legit functions, such as FullBright, you'll still get banned. <b>TL;DR Do not cheat.</b><br />
</li>
<li>
Do not modify (or destroy) other players' constructions, or take their items, without their permission. <b>TL;DR Do not grief or steal.</b><br />