Compare commits

...

1 commit
main ... dev/v2

Author SHA1 Message Date
TheClashFruit 427b643fc9
feat: start v2 of the website 2024-06-09 15:47:59 +02:00
66 changed files with 1278 additions and 2196 deletions

View file

@ -0,0 +1,25 @@
name: Deploy Website
on:
push:
branches:
- main
jobs:
lint:
uses: ./.gitea/workflows/lint.yml
deploy:
runs-on: ubuntu-latest
needs: [ lint ]
steps:
- name: Deploy Website
uses: https://github.com/nekiro/ssh-job@main
with:
host: ${{ secrets.HOST }}
user: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}
command: |
cd /var/www/crss
git pull
composer install --no-dev --optimize-autoloader
php .scripts/deploy.php

18
.gitea/workflows/lint.yml Normal file
View file

@ -0,0 +1,18 @@
name: Lint PHP Code
on:
- push
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup PHP
uses: https://github.com/shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Lint PHP Code
run: php -l *.php **/*.php

View file

@ -1,34 +0,0 @@
name: Upload Website
on:
push:
branches:
- main
jobs:
sftp:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Upload files via SFTP
uses: https://github.com/wangyucode/sftp-upload-action@v2.0.2
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}
forceUpload: false
localDir: '.'
remoteDir: '/var/www/crss'
exclude: '.*,.git*,.gitea*,LICENSE,README.md'
- name: Install dependencies over SSH
uses: https://github.com/nekiro/ssh-job@main
with:
host: ${{ secrets.HOST }}
user: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}
command: |
cd /var/www/crss
composer install --no-dev --optimize-autoloader

6
.gitignore vendored
View file

@ -100,4 +100,8 @@ fabric.properties
!.idea/codeStyles
!.idea/runConfigurations
# End of https://www.toptal.com/developers/gitignore/api/phpstorm+all,composer,dotenv
# End of https://www.toptal.com/developers/gitignore/api/phpstorm+all,composer,dotenv
.build.json
style.css*
style.min.css*

49
.scripts/deploy.php Normal file
View file

@ -0,0 +1,49 @@
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use JShrink\Minifier;
$buildId = uniqid();
$_CONFIG = Array(
'paths' => Array(
'main' => str_replace('/.scripts/deploy.php', '', __FILE__),
'css' => str_replace('/.scripts/deploy.php', '', __FILE__) . '/css',
'js' => str_replace('/.scripts/deploy.php', '', __FILE__) . '/js'
)
);
require_once '_config.php';
// "Compile" SCSS
exec("sass {$_CONFIG['paths']['css']}/src/style.scss:{$_CONFIG['paths']['css']}/style.min.css --style compressed", $sassOutput);
// Get Git Data
exec('git rev-parse --abbrev-ref HEAD', $gitBranch);
exec('git rev-parse HEAD', $gitCommitSha);
exec('git show -s --format=%ct', $gitCommitTime);
// Write the contents to the file build file
file_put_contents('.build.json', json_encode([
'build' => [
'time' => date('c'),
'id' => $buildId
],
'git' => [
'branch' => $gitBranch[0],
'commit' => [
'sha' => $gitCommitSha[0],
'created' => date('c', $gitCommitTime[0])
]
]
]));
echo implode(PHP_EOL, $sassOutput) . PHP_EOL;
echo '`git rev-parse --abbrev-ref HEAD`: ' . implode(PHP_EOL, $gitBranch) . PHP_EOL;
echo '`git rev-parse HEAD`: ' . implode(PHP_EOL, $gitCommitSha) . PHP_EOL;
echo '`git show -s --format=%ct`: ' . implode(PHP_EOL, $gitCommitTime) . PHP_EOL;
echo PHP_EOL . "Deployment completed with build id: `$buildId`!" . PHP_EOL;
exit(0);

View file

@ -1,32 +1,18 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/util/Database.php';
require __DIR__ . '/util/Discord.php';
require __DIR__ . '/util/Admin.php';
use Dotenv\Dotenv;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv->load();
$loader = new FilesystemLoader('template');
$twig = new Twig\Environment($loader);
$twig->addGlobal('discord_auth', $_ENV['DISCORD_OAUTH']);
$discord = new Discord(
$_ENV['DISCORD_CLIENT'],
$_ENV['DISCORD_SECRET'],
$_ENV['DISCORD_REDIRECT']
);
$mysql = new Database(
$_ENV['MYSQL_HOST'],
$_ENV['MYSQL_USER'],
$_ENV['MYSQL_PASS'],
$_ENV['MYSQL_DB']
);
$twig = new Environment($loader);

View file

@ -1,49 +0,0 @@
<?php
global $discord, $mysql;
require_once "_config.php";
session_start();
if(isset($_GET['code'])) {
$res = $discord->validateCode($_GET['code']);
if(!$res['error']) {
$_SESSION['access_token'] = $res['access_token'];
$_SESSION['refresh_token'] = $res['refresh_token'];
$_SESSION['expires_in'] = $res['expires_in'];
$guilds = $discord->getGuilds($res['access_token']);
$guildIds = array();
foreach ($guilds as $guild) {
$guildIds[] = $guild['id'];
}
if(!in_array('1127731341283307520', $guildIds) || !in_array('1195393418151596032', $guildIds)) {
echo json_encode(array(
'error' => true,
'error_description' => 'You are not in any of CRSS\'s guilds.'
));
} else {
$_SESSION['user'] = $discord->getUser($res['access_token']);
$mysql->createUserRecord($_SESSION['user']);
if (isset($_GET['state'])) {
header('Location: ' . $_GET['state']);
} else {
header('Location: /');
}
}
} else {
echo json_encode($res);
}
} else {
echo json_encode(array(
'error' => true,
'error_description' => 'No code provided.'
));
}

View file

@ -1,8 +1,11 @@
{
"require": {
"twig/twig": "^3.0",
"anlutro/curl": "^1.5",
"vlucas/phpdotenv": "^5.5",
"bramus/router": "1.6"
}
"require": {
"twig/twig": "^3.9",
"anlutro/curl": "^1.5",
"vlucas/phpdotenv": "^5.6",
"bramus/router": "^1.6",
"tedivm/jshrink": "^1.7",
"simple-icons/simple-icons": "^12.2",
"theclashfruit/lucide-static-php": "^0.390.0"
}
}

347
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "37fb0f4a910e4ba4add92cd9abbdf84a",
"content-hash": "a76a73e4e249ed4a4f8f065d207b4037",
"packages": [
{
"name": "anlutro/curl",
@ -52,16 +52,16 @@
},
{
"name": "bramus/router",
"version": "1.6",
"version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/bramus/router.git",
"reference": "d2cf97d5c471e272ac5a2a88b652bc75089c8ae3"
"reference": "55657b76da8a0a509250fb55b9dd24e1aa237eba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bramus/router/zipball/d2cf97d5c471e272ac5a2a88b652bc75089c8ae3",
"reference": "d2cf97d5c471e272ac5a2a88b652bc75089c8ae3",
"url": "https://api.github.com/repos/bramus/router/zipball/55657b76da8a0a509250fb55b9dd24e1aa237eba",
"reference": "55657b76da8a0a509250fb55b9dd24e1aa237eba",
"shasum": ""
},
"require": {
@ -97,30 +97,30 @@
],
"support": {
"issues": "https://github.com/bramus/router/issues",
"source": "https://github.com/bramus/router/tree/1.6"
"source": "https://github.com/bramus/router/tree/1.6.1"
},
"time": "2021-07-23T09:48:14+00:00"
"time": "2021-11-18T19:24:07+00:00"
},
{
"name": "graham-campbell/result-type",
"version": "v1.1.1",
"version": "v1.1.2",
"source": {
"type": "git",
"url": "https://github.com/GrahamCampbell/Result-Type.git",
"reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831"
"reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831",
"reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831",
"url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862",
"reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862",
"shasum": ""
},
"require": {
"php": "^7.2.5 || ^8.0",
"phpoption/phpoption": "^1.9.1"
"phpoption/phpoption": "^1.9.2"
},
"require-dev": {
"phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12"
"phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
},
"type": "library",
"autoload": {
@ -149,7 +149,7 @@
],
"support": {
"issues": "https://github.com/GrahamCampbell/Result-Type/issues",
"source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1"
"source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2"
},
"funding": [
{
@ -161,20 +161,20 @@
"type": "tidelift"
}
],
"time": "2023-02-25T20:23:15+00:00"
"time": "2023-11-12T22:16:48+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.1",
"version": "1.9.2",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/php-option.git",
"reference": "dd3a383e599f49777d8b628dadbb90cae435b87e"
"reference": "80735db690fe4fc5c76dfa7f9b770634285fa820"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e",
"reference": "dd3a383e599f49777d8b628dadbb90cae435b87e",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820",
"reference": "80735db690fe4fc5c76dfa7f9b770634285fa820",
"shasum": ""
},
"require": {
@ -182,7 +182,7 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12"
"phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
},
"type": "library",
"extra": {
@ -224,7 +224,7 @@
],
"support": {
"issues": "https://github.com/schmittjoh/php-option/issues",
"source": "https://github.com/schmittjoh/php-option/tree/1.9.1"
"source": "https://github.com/schmittjoh/php-option/tree/1.9.2"
},
"funding": [
{
@ -236,20 +236,125 @@
"type": "tidelift"
}
],
"time": "2023-02-25T19:38:58+00:00"
"time": "2023-11-12T21:59:55+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.28.0",
"name": "simple-icons/simple-icons",
"version": "12.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
"url": "https://github.com/simple-icons/simple-icons.git",
"reference": "45b0840f6a15e4912c61a9415dcb85f4bb583f23"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
"url": "https://api.github.com/repos/simple-icons/simple-icons/zipball/45b0840f6a15e4912c61a9415dcb85f4bb583f23",
"reference": "45b0840f6a15e4912c61a9415dcb85f4bb583f23",
"shasum": ""
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"CC0-1.0"
],
"description": "SVG icons for popular brands",
"homepage": "https://simpleicons.org/",
"keywords": [
"icons",
"svg"
],
"support": {
"docs": "https://github.com/simple-icons/simple-icons#php-usage-",
"issues": "https://github.com/simple-icons/simple-icons/issues",
"source": "https://github.com/simple-icons/simple-icons"
},
"funding": [
{
"url": "https://opencollective.com/simple-icons",
"type": "opencollective"
}
],
"time": "2024-06-09T06:49:44+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.5.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-04-18T09:32:20+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4",
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4",
"shasum": ""
},
"require": {
@ -263,9 +368,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -302,7 +404,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0"
},
"funding": [
{
@ -318,20 +420,20 @@
"type": "tidelift"
}
],
"time": "2023-01-26T09:26:14+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.28.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "42292d99c55abe617799667f454222c54c60e229"
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
"reference": "42292d99c55abe617799667f454222c54c60e229",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"shasum": ""
},
"require": {
@ -345,9 +447,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -385,7 +484,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
},
"funding": [
{
@ -401,20 +500,20 @@
"type": "tidelift"
}
],
"time": "2023-07-28T09:04:16+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.28.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"shasum": ""
},
"require": {
@ -422,9 +521,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -468,7 +564,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0"
},
"funding": [
{
@ -484,33 +580,132 @@
"type": "tidelift"
}
],
"time": "2023-01-26T09:26:14+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "twig/twig",
"version": "v3.7.1",
"name": "tedivm/jshrink",
"version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554"
"url": "https://github.com/tedious/JShrink.git",
"reference": "7a35f5a4651ca2ce77295eb8a3b4e133ba47e19e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
"url": "https://api.github.com/repos/tedious/JShrink/zipball/7a35f5a4651ca2ce77295eb8a3b4e133ba47e19e",
"reference": "7a35f5a4651ca2ce77295eb8a3b4e133ba47e19e",
"shasum": ""
},
"require": {
"php": "^7.0|^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.14",
"php-coveralls/php-coveralls": "^2.5.0",
"phpunit/phpunit": "^9|^10"
},
"type": "library",
"autoload": {
"psr-0": {
"JShrink": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Robert Hafner",
"email": "tedivm@tedivm.com"
}
],
"description": "Javascript Minifier built in PHP",
"homepage": "http://github.com/tedious/JShrink",
"keywords": [
"javascript",
"minifier"
],
"support": {
"issues": "https://github.com/tedious/JShrink/issues",
"source": "https://github.com/tedious/JShrink/tree/v1.7.0"
},
"funding": [
{
"url": "https://github.com/tedivm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/tedivm/jshrink",
"type": "tidelift"
}
],
"time": "2023-10-04T17:23:23+00:00"
},
{
"name": "theclashfruit/lucide-static-php",
"version": "0.390.0",
"source": {
"type": "git",
"url": "https://github.com/TheClashFruit/lucide-static-php.git",
"reference": "2b6e1f1fd054afdbb8931d493422e93c04315dde"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/TheClashFruit/lucide-static-php/zipball/2b6e1f1fd054afdbb8931d493422e93c04315dde",
"reference": "2b6e1f1fd054afdbb8931d493422e93c04315dde",
"shasum": ""
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"ISC"
],
"authors": [
{
"name": "TheClashFruit",
"email": "admin@theclashfruit.me"
}
],
"support": {
"issues": "https://github.com/TheClashFruit/lucide-static-php/issues",
"source": "https://github.com/TheClashFruit/lucide-static-php/tree/0.390.0"
},
"time": "2024-06-09T10:46:54+00:00"
},
{
"name": "twig/twig",
"version": "v3.10.3",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "67f29781ffafa520b0bbfbd8384674b42db04572"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/67f29781ffafa520b0bbfbd8384674b42db04572",
"reference": "67f29781ffafa520b0bbfbd8384674b42db04572",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
"symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php80": "^1.22"
},
"require-dev": {
"psr/container": "^1.0|^2.0",
"symfony/phpunit-bridge": "^5.4.9|^6.3"
"symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0"
},
"type": "library",
"autoload": {
"files": [
"src/Resources/core.php",
"src/Resources/debug.php",
"src/Resources/escaper.php",
"src/Resources/string_loader.php"
],
"psr-4": {
"Twig\\": "src/"
}
@ -543,7 +738,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.7.1"
"source": "https://github.com/twigphp/Twig/tree/v3.10.3"
},
"funding": [
{
@ -555,35 +750,35 @@
"type": "tidelift"
}
],
"time": "2023-08-28T11:09:02+00:00"
"time": "2024-05-16T10:04:27+00:00"
},
{
"name": "vlucas/phpdotenv",
"version": "v5.5.0",
"version": "v5.6.0",
"source": {
"type": "git",
"url": "https://github.com/vlucas/phpdotenv.git",
"reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7"
"reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7",
"reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4",
"reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4",
"shasum": ""
},
"require": {
"ext-pcre": "*",
"graham-campbell/result-type": "^1.0.2",
"php": "^7.1.3 || ^8.0",
"phpoption/phpoption": "^1.8",
"symfony/polyfill-ctype": "^1.23",
"symfony/polyfill-mbstring": "^1.23.1",
"symfony/polyfill-php80": "^1.23.1"
"graham-campbell/result-type": "^1.1.2",
"php": "^7.2.5 || ^8.0",
"phpoption/phpoption": "^1.9.2",
"symfony/polyfill-ctype": "^1.24",
"symfony/polyfill-mbstring": "^1.24",
"symfony/polyfill-php80": "^1.24"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1",
"bamarni/composer-bin-plugin": "^1.8.2",
"ext-filter": "*",
"phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25"
"phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
},
"suggest": {
"ext-filter": "Required to use the boolean validator."
@ -595,7 +790,7 @@
"forward-command": true
},
"branch-alias": {
"dev-master": "5.5-dev"
"dev-master": "5.6-dev"
}
},
"autoload": {
@ -627,7 +822,7 @@
],
"support": {
"issues": "https://github.com/vlucas/phpdotenv/issues",
"source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0"
"source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0"
},
"funding": [
{
@ -639,7 +834,7 @@
"type": "tidelift"
}
],
"time": "2022-10-16T01:01:54+00:00"
"time": "2023-11-12T22:43:29+00:00"
}
],
"packages-dev": [],

1
css/map.min.css vendored
View file

@ -1 +0,0 @@
*{padding:0;margin:0;box-sizing:border-box}#map{height:100vh}#homeLink{position:absolute;bottom:10px;left:10px;padding:5px 10px;z-index:400;background-color:#fff;background-clip:padding-box;border:2px solid rgba(0,0,0,.2);border-radius:5px;text-decoration:none;color:#000}img.leaflet-tile,img.leaflet-marker-icon{image-rendering:pixelated}.leaflet-control{color:#333}.leaflet-control-mouseposition{background:rgba(255,255,255,.8);margin:0 !important;padding:6px;width:100%;text-align:end;border-top-left-radius:5px}.leaflet-marker-icon{transition:300ms}/*# sourceMappingURL=map.min.css.map */

View file

@ -1 +0,0 @@
{"version":3,"sourceRoot":"","sources":["src/map.scss"],"names":[],"mappings":"AAAA,EACE,UACA,SAEA,sBAKF,kBAEA,UACE,kBACA,YACA,UACA,iBACA,YAEA,sBACA,4BAEA,gCACA,kBAEA,qBACA,WAGF,yCACE,0BAGF,iBACE,WAGF,+BACE,gCAEA,oBACA,YAEA,WAEA,eAEA,2BAGF,qBACE","file":"map.min.css"}

27
css/src/_colors.scss Normal file
View file

@ -0,0 +1,27 @@
$colorPrimary: hsl(120, 21%, 41%);
$colorTextLight1: hsl(120, 40%, 8%);
$colorTextLight2: hsl(120, 5%, 45%);
$colorSurfaceLight1: hsl(120, 25%, 97%);
$colorSurfaceLight2: hsl(120, 20%, 95%);
$colorSurfaceLight3: hsl(120, 20%, 92%);
$colorSurfaceLight4: hsl(120, 20%, 85%);
$colorBorderLight1: hsl(120, 20%, 80%);
$colorBorderLight2: hsl(120, 20%, 70%);
$colorBorderLight3: hsl(120, 20%, 60%);
$colorBorderLight4: hsl(120, 20%, 50%);
$colorTextDark1: hsl(120, 15%, 85%);
$colorTextDark2: hsl(120, 5%, 65%);
$colorSurfaceDark1: hsl(120, 5%, 10%);
$colorSurfaceDark2: hsl(120, 10%, 15%);
$colorSurfaceDark3: hsl(120, 5%, 20%);
$colorSurfaceDark4: hsl(120, 5%, 25%);
$colorBorderDark1: hsl(120, 5%, 30%);
$colorBorderDark2: hsl(120, 5%, 40%);
$colorBorderDark3: hsl(120, 5%, 50%);
$colorBorderDark4: hsl(120, 5%, 60%);

View file

@ -1,18 +1,49 @@
// @import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&family=Noto+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Outfit:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=Noto+Color+Emoji&family=Noto+Emoji:wght@300..700&family=Noto+Sans+Mono:wght@100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&display=swap');
body, input {
font-family: "Noto Sans", "Noto Color Emoji", sans-serif;
font-family: 'Noto Sans', 'Noto Color Emoji', 'Noto Emoji', sans-serif;
}
code, pre, kbd {
font-family: 'Noto Sans Mono', 'Noto Color Emoji', 'Noto Emoji', sans-serif;
}
$headers: (
h1: 1.95rem,
h2: 1.5rem,
h3: 160%,
h4: 140%,
h5: 120%,
h6: 110%
);
h1, h2, h3, h4, h5, h6 {
font-family: "Outfit", "Noto Color Emoji", sans-serif;
font-family: 'Outfit', 'Noto Color Emoji', 'Noto Color Emoji', 'Noto Emoji', sans-serif;
font-weight: 500;
//margin-bottom: 6px;
line-height: 1.7;
}
.pageHero {
font-family: "Comic Neue", "Comic Sans MS", "Noto Color Emoji", sans-serif;
//margin-bottom: 6px;
@each $tag, $size in $headers {
#{$tag} {
font-size: $size;
margin-bottom: 1rem;
}
}
p, ol, ul, label, a {
font-size: 1rem;
line-height: 1.7;
}
p, ol, ul {
margin-bottom: 1rem;
}
/*
.pageHero {
font-family: 'Comic Neue', 'Comic Sans MS', 'Noto Color Emoji', 'Noto Emoji', sans-serif;
}
*/

View file

@ -1,28 +0,0 @@
// Dark Theme
$pageBG: #202120;
$pageFG: white;
$accent: #527D52;
$linkColor: #d0dfd0;
$btnNormalBG: $accent;
$btnNormalFG: white;
$btnActiveBG: $accent;
$btnActiveFG: white;
$navBG: #272f27;
$navBorder: #575f57;
$cardNormalBG: #272727;
$cardNormalFG: $pageFG;
$cardNormalBorder: #575757;
$cardActiveBG: $navBG;
$cardActiveFG: $linkColor;
$cardActiveBorder: $navBorder;
$navLinkOutlineColor: #707f70;
$navLinkNormalColor: #7E9E7E;
$navLinkActiveColor: #DEFEDE;
$headerOverlay: #101610;

View file

@ -1,32 +0,0 @@
// Light Theme
$pageBG: white;
$pageFG: black;
$accent: #527D52;
$linkColor: $accent;
$btnNormalBG: $accent;
$btnNormalFG: white;
$btnActiveBG: $accent;
$btnActiveFG: white;
$navBG: #f9fff9;
$navBorder: #d0dfd0;
$cardNormalBG: #f9f9f9;
$cardNormalFG: $pageFG;
$cardNormalBorder: #d0d0d0;
$cardActiveBG: $navBG;
$cardActiveFG: $linkColor;
$cardActiveBorder: $navBorder;
/*$cardBG: $navBG;
$cardFG: $pageFG;
$cardBorder: $navBorder;*/
$navLinkOutlineColor: #D0DFD0;
$navLinkNormalColor: #7E9E7E;
$navLinkActiveColor: $accent;
$headerOverlay: white;

View file

@ -1,52 +0,0 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
/// old
#map { height: 100vh; }
#homeLink {
position: absolute;
bottom: 10px;
left: 10px;
padding: 5px 10px;
z-index: 400;
background-color: #fff;
background-clip: padding-box;
border: 2px solid rgba(0,0,0,0.2);
border-radius: 5px;
text-decoration: none;
color: #000;
}
img.leaflet-tile, img.leaflet-marker-icon {
image-rendering: pixelated;
}
.leaflet-control {
color: #333;
}
.leaflet-control-mouseposition {
background: rgba(255, 255, 255, 0.8);
margin: 0 !important;
padding: 6px;
width: 100%;
text-align: end;
border-top-left-radius: 5px;
}
.leaflet-marker-icon {
transition: 300ms;
}

View file

@ -1,457 +1,569 @@
@use "fonts";
@use "colors/light" as light;
@use "colors/dark" as dark;
@import 'fonts';
@import 'colors';
* {
-webkit-tap-highlight-color: transparent; // fuck you (L)
}
html,
body {
overflow-x: hidden;
}
body {
padding: 0;
margin: 0;
background: light.$pageBG;
color: light.$pageFG;
box-sizing: border-box;
scrollbar-color: $colorPrimary $colorSurfaceLight1;
@media (prefers-color-scheme: dark) {
background: dark.$pageBG;
color: dark.$pageFG;
scrollbar-color: $colorPrimary $colorSurfaceDark1;
}
transition:
300ms color,
300ms background,
300ms border;
}
body {
background: $colorSurfaceLight1;
color: $colorTextLight1;
@media (prefers-color-scheme: dark) {
background: $colorSurfaceDark1;
color: $colorTextDark1;
}
}
main {
transition: 0.24s;
&.buffering {
transform: scale(1.01);
transition: 0.16s;
opacity: 0.4;
pointer-events: none;
user-select: none;
}
&.transition {
transform: scale(0.96);
transition: 0.16s;
opacity: 0;
}
}
.container {
max-width: 960px;
width: 100%;
margin: 0 auto;
padding: 24px;
box-sizing: border-box;
}
ul,
ol {
list-style-position: inside;
}
p {
line-height: 1.6;
opacity: 0.88;
}
img {
max-width: 100%;
}
.cards {
display: flex;
flex-wrap: wrap;
gap: 8px;
width: 100%;
@media (max-width: 600px) {
gap: 12px;
}
}
.card {
position: relative;
display: flex;
flex-direction: column;
box-sizing: border-box;
max-width: 100%;
height: 150px;
text-decoration: none;
border-radius: 4px;
padding: 8px 12px;
cursor: pointer;
overflow: hidden;
outline: 1px solid light.$cardNormalBorder;
background: light.$cardNormalBG;
color: light.$cardNormalFG;
@media (prefers-color-scheme: dark) {
outline-color: dark.$cardNormalBorder;
background: dark.$cardNormalBG;
color: dark.$cardNormalFG;
}
transition: 0.24s;
&:hover {
outline-width: 2px;
outline-color: light.$cardActiveBorder;
background: light.$cardActiveBG;
color: light.$cardActiveFG;
@media (prefers-color-scheme: dark) {
outline-color: dark.$cardActiveBorder;
background: dark.$cardActiveBG;
color: dark.$cardActiveFG;
}
transition: 0.08s;
.icon {
transition: 0.48s;
transform: scale(1.2);
}
}
width: calc(100% / 3 - 6px);
@media (max-width: 800px) {
width: calc(50% - 4px);
}
@media (max-width: 600px) {
border-radius: 8px;
width: 100%;
}
h1 {
margin: 0;
font-size: 1.2em;
font-weight: 400;
}
.icon {
position: absolute;
top: 0;
right: 0;
height: 100%;
aspect-ratio: 1/1;
object-fit: cover;
mask-image: linear-gradient(to right, transparent, rgba(red, 0.3));
@media (prefers-color-scheme: dark) {
mask-image: linear-gradient(to right, transparent, rgba(red, 0.1));
}
transition: 0.64s;
}
p {
margin: 8px 0;
}
padding: 1.5rem 0;
}
a {
color: light.$linkColor;
color: $colorPrimary;
@media (prefers-color-scheme: dark) {
color: dark.$linkColor;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
&:visited {
opacity: 0.9;
button {
cursor: pointer;
}
ol, ul {
list-style-position: inside;
margin-left: 1rem;
}
.container {
max-width: 1100px;
margin: 0 auto;
@media (max-width: 1100px) {
margin: 0 1rem;
}
}
.pageHero {
background-image: linear-gradient(rgba(light.$headerOverlay, 0.9), rgba(light.$headerOverlay, 0.9)), // white overlay. yeah that's a bit of an ugly hack?
url('/img/Panorama-Lens-Blur.png');
@media (prefers-color-scheme: dark) {
background-image: linear-gradient(rgba(dark.$headerOverlay, 0.9), rgba(dark.$headerOverlay, 0.9)),
url('/img/Panorama-Lens-Blur.png');
}
background-position: center;
background-size: cover;
height: 220px;
>.container {
background-image: url("https://crss.fra1.cdn.digitaloceanspaces.com/img/2024-06-08_14.19.52.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
font-family: 'Comic Neue', 'Comic Sans MS', 'Noto Color Emoji', 'Noto Emoji', sans-serif;
font-weight: 600;
> .heroOverlay {
background: rgba($colorSurfaceLight2, 0.9);
backdrop-filter: blur(8px);
height: 100%;
width: 100%;
display: flex;
flex-direction: row;
> .container {
height: 100%;
align-items: center;
justify-content: space-between;
@media (max-width: 600px) {
justify-content: center;
}
>div {
display: flex;
flex-direction: column;
gap: 12px;
align-items: center;
justify-content: space-between;
&.Branding {
align-items: flex-start;
> div:first-child {
display: flex;
@media (max-width: 600px) {
flex-direction: column;
gap: 0.5rem;
> h1 {
font-family: 'Comic Neue', 'Comic Sans MS', 'Noto Color Emoji', 'Noto Emoji', sans-serif;
font-weight: 600;
font-size: 1.5rem;
margin: 0;
}
@media (max-width: 768px) {
align-items: center;
}
justify-content: center;
@media (prefers-color-scheme: dark) {
img {
filter: invert(1)
}
}
span {
font-size: 24px;
opacity: 0.75;
width: 100%;
height: 100%;
}
}
&.Server-Information {
@media (max-width: 600px) {
display: none;
}
> div:last-child {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
input {
gap: 0.5rem;
> input {
background: rgba(0,0,0,0);
width: fit-content;
padding: 4px 16px;
font-size: 1.5rem;
text-align: center;
font-size: 24px;
&:not(:hover, :focus) {
color: inherit;
border-color: transparent;
background: transparent;
color: inherit;
border: 1px solid rgba(0, 0, 0, 0);
border-radius: 1rem;
transition: 150ms;
&:focus, &:hover {
outline: none;
background: rgba($colorSurfaceLight4, .65);
border: 1px solid $colorBorderLight3;
}
}
}
}
}
}
.navToggle {
@media (min-width: 601px) {
display: none;
}
z-index: 10;
position: fixed;
top: 8px;
right: 8px;
font-size: 18px;
background: light.$btnNormalBG;
color: light.$btnNormalFG;
@media (prefers-color-scheme: dark) {
background: dark.$btnNormalBG;
color: dark.$btnNormalFG;
}
padding: 8px 24px;
border-radius: 32px;
font-weight: bold;
user-select: none;
cursor: pointer;
}
.pageNav {
width: 100%;
border: solid light.$navBorder;
border-width: 0 0 1px 0;
background: light.$navBG;
@media (prefers-color-scheme: dark) {
border-color: dark.$navBorder;
background: dark.$navBG;
}
>.container {
padding: 16px 24px;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
@media (max-width: 600px) {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9;
backdrop-filter: blur(15px);
background: rgba(light.$navBG, 0.86);
@media (prefers-color-scheme: dark) {
background: rgba(dark.$navBG, 0.9);
}
justify-content: center;
flex-direction: column;
gap: 64px;
&,
>* {
transition: 0.16s
}
&:not(.opened) {
opacity: 0;
pointer-events: none;
//&, > * { transition: 0.12s }
>* {
transform: translateX(32px);
}
}
}
>div {
margin: 0;
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: 6px;
@media (max-width: 600px) {
width: 100%;
flex-direction: column;
}
>a {
font-family: Outfit;
user-select: none;
font-size: 16px;
box-sizing: border-box;
color: light.$navLinkNormalColor;
@media (prefers-color-scheme: dark) {
color: dark.$navLinkNormalColor;
}
@media (max-width: 600px) {
font-size: 28px;
outline: none;
padding: 8px 32px;
text-align: end;
&.active::before {
content: ""; // i know..
}
}
text-decoration: none;
padding: 6px 20px;
border-radius: 32px;
outline: solid transparent 2px;
transition: 0.24s;
&.active {
pointer-events: none;
}
&:hover,
&.active {
//background: rgba(15, 23, 42, 0.1);
color: light.$navLinkActiveColor;
outline-color: light.$navLinkOutlineColor;
@media (prefers-color-scheme: dark) {
color: dark.$navLinkActiveColor;
outline-color: dark.$navLinkOutlineColor;
color: inherit;
&:focus, &:hover {
background: rgba($colorSurfaceDark4, .65);
border: 1px solid $colorBorderDark3;
}
}
transition: 0.08s;
}
@media (min-width: 601px) {
&.buttonPrimary {
background: light.$btnNormalBG;
color: light.$btnNormalFG;
@media (max-width: 768px) {
display: none;
}
}
}
@media (prefers-color-scheme: dark) {
background: dark.$btnNormalBG;
color: dark.$btnNormalFG;
@media (prefers-color-scheme: dark) {
background: rgba($colorSurfaceDark2, 0.9);
}
}
@media (max-width: 768px) {
border-bottom: 1px solid $colorBorderLight1;
@media (prefers-color-scheme: dark) {
border-color: $colorBorderDark1;
}
}
}
.navBar {
height: 64px;
position: sticky;
top: 0;
left: 0;
right: 0;
background: $colorSurfaceLight3;
border-bottom: 1px solid $colorBorderLight1;
> .container {
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
@media (max-width: 768px) {
justify-content: space-between;
}
> .navMobileContainer {
display: none;
width: 100%;
height: 100%;
justify-content: end;
align-items: center;
z-index: 10000;
> .navToggle {
padding: 0.5rem;
background: none;
border: none;
border-radius: 50%;
display: flex;
color: $colorTextLight1;
transition: 150ms;
&:hover {
background: rgba($colorPrimary, 0.5);
}
@media (prefers-color-scheme: dark) {
color: $colorTextDark1;
}
}
@media (max-width: 768px) {
display: flex;
}
}
> .navCollapse {
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
width: 100%;
z-index: 5000;
> ul {
list-style: none;
display: flex;
align-items: center;
gap: .5rem;
margin: 0;
> li {
> a, .dropDown > label {
padding: 8px 16px;
display: flex;
flex-direction: row;
align-items: center;
gap: 1rem;
text-decoration: none;
transition: 150ms;
border-radius: 2rem;
color: $colorTextLight2;
outline: 2px solid rgba(0, 0, 0, 0);
> .icon {
width: 20px;
height: 20px;
}
font-weight: 700 !important;
&:hover, &.active {
outline: 2px solid rgba($colorPrimary, 0.65);
color: $colorPrimary;
}
@media (prefers-color-scheme: dark) {
color: $colorTextDark2;
&:hover, &.active {
outline-color: rgba($colorPrimary, 0.65);
}
}
}
}
}
@media (max-width: 768px) {
opacity: 1;
transition: 300ms;
position: fixed;
height: 100vh;
width: 100vw;
top: 0;
right: -110%;
display: flex;
flex: 1;
flex-direction: column;
align-items: end;
justify-content: center;
gap: 2rem;
padding: 1rem;
background: rgba($colorSurfaceLight3, 0.95);
backdrop-filter: blur(8px);
ul {
flex-direction: column;
align-items: end;
gap: 1rem;
li {
a {
padding: 8px 24px;
}
}
}
@media (prefers-color-scheme: dark) {
background: rgba($colorSurfaceDark3, 0.95);
}
}
}
}
@media (prefers-color-scheme: dark) {
background: $colorSurfaceDark3;
border-color: $colorBorderDark1;
}
&.navOpen {
> .container {
flex-direction: column;
> .navMobileContainer {
height: 64px;
}
> .navCollapse {
opacity: 1;
right: 0;
}
}
}
@media (max-width: 768px) {
background: none;
position: fixed;
top: 0;
border: none;
}
}
.dropDown {
position: relative;
> label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
padding: 8px 24px;
}
> .dropDownMenu {
position: absolute;
top: calc(100% + 4px);
right: 0;
background: $colorSurfaceLight4;
border: 1px solid $colorBorderLight1;
border-radius: .5rem;
overflow: hidden;
display: none;
min-width: max(100%, 200px);
> ul {
list-style: none;
display: flex;
flex-direction: column;
margin: 0;
> li {
> a {
padding: 11px 24px;
display: flex;
flex-direction: row;
align-items: center;
gap: 24px;
text-decoration: none;
transition: 150ms;
> .icon {
width: 20px;
height: 20px;
}
&:hover {
background: rgba($colorPrimary, 0.65);
color: $colorSurfaceLight1;
}
}
> .divider {
border-bottom: 1px solid $colorBorderLight1;
width: 100%;
@media (prefers-color-scheme: dark) {
border-color: $colorBorderDark1;
}
}
}
}
@media (prefers-color-scheme: dark) {
border-color: $colorBorderDark1;
background: $colorSurfaceDark4;
}
}
&.open {
> label {
outline: 2px solid rgba($colorPrimary, 0.65);
color: $colorPrimary;
}
> .dropDownMenu {
display: block;
}
}
}
.pageContent {
//
}
.pageFooter {
opacity: 0.8;
background: $colorSurfaceLight3;
>.SNS-Links {
border-top: 1px solid $colorBorderLight1;
> .container {
display: flex;
flex-wrap: wrap;
gap: 16px;
>a {
display: flex;
gap: 8px;
justify-content: space-between;
font-size: 18px;
align-items: start;
color: inherit;
padding: 1rem 0;
img {
width: 1em;
p {
margin-bottom: .5rem;
}
@media (prefers-color-scheme: dark) {
filter: invert(1);
div:first-child {
width: 420px;
}
div:last-child {
text-align: right;
> ul {
display: flex;
gap: 1rem;
list-style: none;
> li {
> a {
display: flex;
align-items: center;
justify-content: center;
width: 31px;
height: 31px;
border-radius: 50%;
padding: 4px;
transition: 150ms;
color: $colorTextLight1;
&:hover {
color: $colorTextLight2;
}
@media (prefers-color-scheme: dark) {
color: $colorTextDark1;
&:hover {
color: $colorTextDark2;
}
}
}
}
}
&:not(:hover, :focus) {
text-decoration: none;
}
}
}
@media (prefers-color-scheme: dark) {
background: $colorSurfaceDark3;
border-color: $colorBorderDark1;
}
}

1
css/style.min.css vendored

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
{"version":3,"sourceRoot":"","sources":["src/_fonts.scss","src/style.scss","src/colors/_light.scss","src/colors/_dark.scss"],"names":[],"mappings":"CAEQ,qKAER,WACE,sDAGF,kBACE,mDACA,gBAIF,UACE,uECXF,EACE,0CAGF,UACE,kBAGF,KACE,SAEA,WCbO,KDcP,MCbO,KDeP,mCANF,KAOI,WEjBK,QFkBL,MEjBK,MFqBT,KACE,gBAEA,eACE,sBACA,gBACA,WACA,oBACA,iBAGF,gBACE,sBACA,gBACA,UAIJ,WACE,gBAEA,WAEA,cAEA,aACA,sBAGF,MACE,2BAGF,EACE,gBACA,YAGF,IACE,eAGF,OACE,aACA,eACA,QACA,WAEA,yBANF,OAOI,UAIJ,MACE,kBACA,aACA,sBACA,sBACA,eACA,aACA,qBACA,kBACA,iBACA,eACA,gBAEA,0BACA,WC3Ea,QD4Eb,MCzFO,KDiGP,gBAsBA,iCA5BA,mCAjBF,MAkBI,cE7Ee,QF8Ef,WEhFW,QFiFX,ME9FK,MFmGP,YACE,kBACA,cC1FQ,QD2FR,WC5FI,QD6FJ,MCrGK,QD6GL,gBANA,mCANF,YAOI,cE/FM,QFgGN,WEjGE,QFkGF,MEzGM,SF8GR,kBACE,gBACA,qBAMJ,yBA/CF,MAgDI,uBAGF,yBAnDF,MAoDI,kBACA,YAGF,SACE,SACA,gBACA,gBAGF,YACE,kBACA,MACA,QACA,YACA,iBACA,iBAEA,wEAKA,gBAJA,mCATF,YAUI,yEAMJ,QACE,aAIJ,EACE,MC5JO,QD8JP,mCAHF,EAII,ME9JQ,SFiKV,UACE,WAIJ,UACE,wHAQA,2BACA,sBAEA,aARA,mCAJF,UAKI,mHASF,qBACE,YAEA,aACA,mBAEA,mBACA,8BAEA,yBATF,qBAUI,wBAGF,yBACE,aACA,sBAEA,SAEA,kCACE,uBAEA,yBAHF,kCAII,oBAGF,mCACE,sCACE,kBAIJ,uCACE,eACA,YAIJ,4CAKE,mBACA,QALA,yBADF,4CAEI,cAMF,kDACE,kBACA,eAEA,qEACE,cACA,2BACA,yBAQZ,WAIE,WAEA,eACA,QACA,UACA,eAEA,WC7PO,QD8PP,MC1PY,KDiQZ,iBAEA,mBAEA,iBACA,iBAEA,eAzBA,yBADF,WAEI,cAYF,mCAdF,WAeI,WEjQK,QFkQL,ME9PU,MF2Qd,SACE,WAEA,qBACA,uBAEA,WC7QM,QD+QN,mCARF,SASI,aE/QQ,QFgRR,WEjRI,SFoRN,oBACE,kBAEA,aACA,eAEA,mBACA,8BAEA,yBATF,oBAUI,eACA,MACA,OACA,WACA,YACA,UAEA,2BACA,iCAKA,uBACA,sBACA,UANA,yDAnBJ,oBAoBM,8BAXJ,yBAkBE,0CACE,gBAGF,iCACE,UACA,oBAGA,mCACE,4BAKN,wBACE,SAEA,aACA,eACA,qBAEA,QAEA,yBATF,wBAUI,WACA,uBAGF,0BACE,mBACA,iBAEA,eACA,sBACA,MCnUa,QDoVb,qBAEA,iBAEA,mBAEA,gCAEA,gBAxBA,mCAPF,0BAQI,MEzUW,SF4Ub,yBAXF,0BAYI,eACA,aACA,iBACA,eAEA,yCACE,aAeJ,iCACE,oBAGF,iEAEE,MC3XD,QD4XC,cCtWY,QD8WZ,gBANA,mCALF,iEAMI,ME3WS,QF4WT,cE9WU,SFqXd,yBACE,wCACE,WCzYH,QD0YG,MCtYE,KD6YF,4BALA,yDAJF,wCAKI,WE7YL,QF8YK,ME1YA,MFyZd,YACE,WAEA,uBACE,aACA,eACA,SAEA,yBACE,aACA,QAEA,eAEA,cAEA,6BACE,UAEA,mCAHF,6BAII,kBAIJ,4CACE","file":"style.min.css"}

View file

@ -1,3 +0,0 @@
module.exports = {
php: "/usr/bin/php"
}

1
icons/logo.svg Normal file
View file

@ -0,0 +1 @@
<svg width="146" height="96" viewBox="0 0 146 96" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M83.7827 12.6087C83.7827 10.6157 85.3984 9 87.3914 9C89.3844 9 91.0001 10.6157 91.0001 12.6087C91.0001 14.6017 89.3844 16.2174 87.3914 16.2174C85.3984 16.2174 83.7827 14.6017 83.7827 12.6087Z" fill="currentColor"/><path d="M32.6594 16.4528L41.9008 32.5134L50.8527 17.4646L54.8404 29.75L55.9553 28.8478L66.5686 10.2029" stroke="currentColor" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8 19.8261C8 17.8331 9.61567 16.2174 11.6087 16.2174C13.6017 16.2174 15.2174 17.8331 15.2174 19.8261C15.2174 21.8191 13.6017 23.4348 11.6087 23.4348C9.61567 23.4348 8 21.8191 8 19.8261Z" fill="currentColor"/><path d="M21.25 89.9906C27.4531 89.9906 33.0938 87.3656 36.6094 82.3656C37.0625 81.725 37.1875 81.0844 37.1875 80.4438C37.1875 78.3969 35.6406 77.2406 33.9844 77.2406C33.0312 77.2406 32.25 77.5063 31.4844 78.5219C29.4375 81.2094 26.2969 83.8344 21.25 83.8344C14.5938 83.8344 8.95312 79.0375 8.95312 70.725C8.95312 61.4438 15.4844 52.5375 22.0781 52.5375C25.5312 52.5375 27.5156 53.6313 28.8594 55.0375V55.4906C28.8594 56.8344 30.1406 58.0531 31.875 58.0531C33.6562 58.0531 35.0781 56.5688 35.0781 54.85V50.7563C35.0781 49.1469 33.8594 47.8031 32.125 47.8031C31.2344 47.8031 30.5938 48.1938 30.2031 48.5688C28.2812 47.4281 25.4062 46.3344 22.5312 46.3344C12.7344 46.3344 2.5625 57.9125 2.5625 70.725C2.5625 82.8813 11.0781 89.9906 21.25 89.9906ZM46.4015 89.9906C48.0578 89.9906 49.5421 88.6469 49.5421 86.85V75.2563C51.0734 75.0063 52.6046 74.8813 53.8234 74.8813C56.0578 74.8813 60.9953 75.6469 68.9328 88.3188C69.5734 89.35 70.5265 89.9906 71.7453 89.9906C73.6671 89.9906 74.8859 88.4438 74.8859 86.85C74.8859 86.3969 74.8234 85.8813 74.5578 85.3813C71.3546 78.975 66.9484 74.7563 63.9328 72.3813C68.9953 70.1469 73.4015 66.4281 73.4015 59.975C73.4015 51.3344 65.339 46.3344 51.0109 46.3344H48.3859C43.964 46.3344 43.2609 46.9125 43.2609 50.1781V86.85C43.2609 88.6469 44.6046 89.9906 46.4015 89.9906ZM49.5421 69.3813V52.475H50.8234C61.0578 52.475 67.0734 55.0375 67.0734 59.975C67.0734 66.1156 57.339 68.8656 49.5421 69.3813ZM93.0573 89.9906C101.37 89.9906 108.479 84.475 108.479 77.1156C108.479 70.85 103.807 66.8188 95.3541 64.3813C88.4479 62.3969 85.5104 60.5375 85.5104 57.5375C85.5104 54.3344 88.4479 52.225 94.276 52.225C99.0104 52.225 101.885 54.0844 102.214 56.3813C102.401 57.85 103.62 59.0688 105.151 59.0688C106.948 59.0688 108.292 57.6625 108.292 55.7406C108.292 50.1156 103.104 46.3344 94.276 46.3344C84.9948 46.3344 79.2916 51.1313 79.2916 57.9906C79.2916 65.2875 85.8854 68.4125 93.1823 70.4594C100.229 72.4438 102.339 74.8188 102.339 77.4438C102.339 81.0844 98.5573 83.975 93.1823 83.975C89.3385 83.975 84.9323 82.1781 83.526 78.2719C83.0104 76.8656 81.9166 75.8969 80.3229 75.8969C78.4635 75.8969 77.0573 77.3813 77.0573 79.1C77.0573 79.8031 77.3073 80.6469 77.7604 81.6C79.8073 85.9594 85.2448 89.9906 93.0573 89.9906ZM128.001 89.9906C136.314 89.9906 143.423 84.475 143.423 77.1156C143.423 70.85 138.751 66.8188 130.298 64.3813C123.392 62.3969 120.454 60.5375 120.454 57.5375C120.454 54.3344 123.392 52.225 129.22 52.225C133.954 52.225 136.829 54.0844 137.158 56.3813C137.345 57.85 138.564 59.0688 140.095 59.0688C141.892 59.0688 143.236 57.6625 143.236 55.7406C143.236 50.1156 138.048 46.3344 129.22 46.3344C119.939 46.3344 114.236 51.1313 114.236 57.9906C114.236 65.2875 120.829 68.4125 128.126 70.4594C135.173 72.4438 137.283 74.8188 137.283 77.4438C137.283 81.0844 133.501 83.975 128.126 83.975C124.283 83.975 119.876 82.1781 118.47 78.2719C117.954 76.8656 116.861 75.8969 115.267 75.8969C113.408 75.8969 112.001 77.3813 112.001 79.1C112.001 79.8031 112.251 80.6469 112.704 81.6C114.751 85.9594 120.189 89.9906 128.001 89.9906Z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="146px" height="96px" viewBox="0 0 146 96" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
<defs>
<path d="M146 0L146 0L146 96L0 96L0 0L146 0Z" id="path_1" />
<clipPath id="clip_1">
<use xlink:href="#path_1" clip-rule="evenodd" fill-rule="evenodd" />
</clipPath>
</defs>
<g id="Frame" clip-path="url(#clip_1)">
<path d="M146 0L146 0L146 96L0 96L0 0L146 0Z" id="Frame" fill="none" stroke="none" />
<path d="M83.7827 12.6087C83.7827 10.6157 85.3984 9 87.3914 9C89.3844 9 91.0001 10.6157 91.0001 12.6087C91.0001 14.6017 89.3844 16.2174 87.3914 16.2174C85.3984 16.2174 83.7827 14.6017 83.7827 12.6087Z" id="Oval-5" fill="#000000" fill-rule="evenodd" stroke="none" />
<path d="M32.6594 16.4528L41.9008 32.5134L50.8527 17.4646L54.8404 29.75L55.9553 28.8478L66.5686 10.2029" id="Vector-3" fill="none" fill-rule="evenodd" stroke="#000000" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M8 19.8261C8 17.8331 9.61567 16.2174 11.6087 16.2174C13.6017 16.2174 15.2174 17.8331 15.2174 19.8261C15.2174 21.8191 13.6017 23.4348 11.6087 23.4348C9.61567 23.4348 8 21.8191 8 19.8261Z" id="Oval-6" fill="#000000" fill-rule="evenodd" stroke="none" />
<g id="CRSS" transform="translate(0 32)">
<g id="CRSS">
<path d="M21.25 57.9906C27.4531 57.9906 33.0938 55.3656 36.6094 50.3656C37.0625 49.725 37.1875 49.0844 37.1875 48.4438C37.1875 46.3969 35.6406 45.2406 33.9844 45.2406C33.0312 45.2406 32.25 45.5063 31.4844 46.5219C29.4375 49.2094 26.2969 51.8344 21.25 51.8344C14.5938 51.8344 8.95312 47.0375 8.95312 38.725C8.95312 29.4438 15.4844 20.5375 22.0781 20.5375C25.5312 20.5375 27.5156 21.6313 28.8594 23.0375L28.8594 23.4906C28.8594 24.8344 30.1406 26.0531 31.875 26.0531C33.6562 26.0531 35.0781 24.5688 35.0781 22.85L35.0781 18.7563C35.0781 17.1469 33.8594 15.8031 32.125 15.8031C31.2344 15.8031 30.5938 16.1938 30.2031 16.5688C28.2812 15.4281 25.4062 14.3344 22.5312 14.3344C12.7344 14.3344 2.5625 25.9125 2.5625 38.725C2.5625 50.8813 11.0781 57.9906 21.25 57.9906ZM46.4015 57.9906C48.0578 57.9906 49.5421 56.6469 49.5421 54.85L49.5421 43.2563C51.0734 43.0063 52.6046 42.8813 53.8234 42.8813C56.0578 42.8813 60.9953 43.6469 68.9328 56.3188C69.5734 57.35 70.5265 57.9906 71.7453 57.9906C73.6671 57.9906 74.8859 56.4438 74.8859 54.85C74.8859 54.3969 74.8234 53.8813 74.5578 53.3813C71.3546 46.975 66.9484 42.7563 63.9328 40.3813C68.9953 38.1469 73.4015 34.4281 73.4015 27.975C73.4015 19.3344 65.339 14.3344 51.0109 14.3344L48.3859 14.3344C43.964 14.3344 43.2609 14.9125 43.2609 18.1781L43.2609 54.85C43.2609 56.6469 44.6046 57.9906 46.4015 57.9906ZM49.5421 37.3813L49.5421 20.475L50.8234 20.475C61.0578 20.475 67.0734 23.0375 67.0734 27.975C67.0734 34.1156 57.339 36.8656 49.5421 37.3813ZM93.0573 57.9906C101.37 57.9906 108.479 52.475 108.479 45.1156C108.479 38.85 103.807 34.8188 95.3541 32.3813C88.4479 30.3969 85.5104 28.5375 85.5104 25.5375C85.5104 22.3344 88.4479 20.225 94.276 20.225C99.0104 20.225 101.885 22.0844 102.214 24.3813C102.401 25.85 103.62 27.0688 105.151 27.0688C106.948 27.0688 108.292 25.6625 108.292 23.7406C108.292 18.1156 103.104 14.3344 94.276 14.3344C84.9948 14.3344 79.2916 19.1313 79.2916 25.9906C79.2916 33.2875 85.8854 36.4125 93.1823 38.4594C100.229 40.4438 102.339 42.8188 102.339 45.4438C102.339 49.0844 98.5573 51.975 93.1823 51.975C89.3385 51.975 84.9323 50.1781 83.526 46.2719C83.0104 44.8656 81.9166 43.8969 80.3229 43.8969C78.4635 43.8969 77.0573 45.3813 77.0573 47.1C77.0573 47.8031 77.3073 48.6469 77.7604 49.6C79.8073 53.9594 85.2448 57.9906 93.0573 57.9906ZM128.001 57.9906C136.314 57.9906 143.423 52.475 143.423 45.1156C143.423 38.85 138.751 34.8188 130.298 32.3813C123.392 30.3969 120.454 28.5375 120.454 25.5375C120.454 22.3344 123.392 20.225 129.22 20.225C133.954 20.225 136.829 22.0844 137.158 24.3813C137.345 25.85 138.564 27.0688 140.095 27.0688C141.892 27.0688 143.236 25.6625 143.236 23.7406C143.236 18.1156 138.048 14.3344 129.22 14.3344C119.939 14.3344 114.236 19.1313 114.236 25.9906C114.236 33.2875 120.829 36.4125 128.126 38.4594C135.173 40.4438 137.283 42.8188 137.283 45.4438C137.283 49.0844 133.501 51.975 128.126 51.975C124.283 51.975 119.876 50.1781 118.47 46.2719C117.954 44.8656 116.861 43.8969 115.267 43.8969C113.408 43.8969 112.001 45.3813 112.001 47.1C112.001 47.8031 112.251 48.6469 112.704 49.6C114.751 53.9594 120.189 57.9906 128.001 57.9906Z" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36"><path d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"/></svg>

Before

Width:  |  Height:  |  Size: 749 B

View file

@ -1,3 +0,0 @@
<svg width="74" height="79" viewBox="0 0 74 79" fill="black" xmlns="http://www.w3.org/2000/svg">
<path d="M73.7014 17.4323C72.5616 9.05152 65.1774 2.4469 56.424 1.1671C54.9472 0.950843 49.3518 0.163818 36.3901 0.163818H36.2933C23.3281 0.163818 20.5465 0.950843 19.0697 1.1671C10.56 2.41145 2.78877 8.34604 0.903306 16.826C-0.00357854 21.0022 -0.100361 25.6322 0.068112 29.8793C0.308275 35.9699 0.354874 42.0498 0.91406 48.1156C1.30064 52.1448 1.97502 56.1419 2.93215 60.0769C4.72441 67.3445 11.9795 73.3925 19.0876 75.86C26.6979 78.4332 34.8821 78.8603 42.724 77.0937C43.5866 76.8952 44.4398 76.6647 45.2833 76.4024C47.1867 75.8033 49.4199 75.1332 51.0616 73.9562C51.0841 73.9397 51.1026 73.9184 51.1156 73.8938C51.1286 73.8693 51.1359 73.8421 51.1368 73.8144V67.9366C51.1364 67.9107 51.1302 67.8852 51.1186 67.862C51.1069 67.8388 51.0902 67.8184 51.0695 67.8025C51.0489 67.7865 51.0249 67.7753 50.9994 67.7696C50.9738 67.764 50.9473 67.7641 50.9218 67.7699C45.8976 68.9569 40.7491 69.5519 35.5836 69.5425C26.694 69.5425 24.3031 65.3699 23.6184 63.6327C23.0681 62.1314 22.7186 60.5654 22.5789 58.9744C22.5775 58.9477 22.5825 58.921 22.5934 58.8965C22.6043 58.8721 22.621 58.8505 22.6419 58.8336C22.6629 58.8167 22.6876 58.8049 22.714 58.7992C22.7404 58.7934 22.7678 58.794 22.794 58.8007C27.7345 59.9796 32.799 60.5746 37.8813 60.5733C39.1036 60.5733 40.3223 60.5733 41.5447 60.5414C46.6562 60.3996 52.0437 60.1408 57.0728 59.1694C57.1983 59.1446 57.3237 59.1233 57.4313 59.0914C65.3638 57.5847 72.9128 52.8555 73.6799 40.8799C73.7086 40.4084 73.7803 35.9415 73.7803 35.4523C73.7839 33.7896 74.3216 23.6576 73.7014 17.4323ZM61.4925 47.3144H53.1514V27.107C53.1514 22.8528 51.3591 20.6832 47.7136 20.6832C43.7061 20.6832 41.6988 23.2499 41.6988 28.3194V39.3803H33.4078V28.3194C33.4078 23.2499 31.3969 20.6832 27.3894 20.6832C23.7654 20.6832 21.9552 22.8528 21.9516 27.107V47.3144H13.6176V26.4937C13.6176 22.2395 14.7157 18.8598 16.9118 16.3545C19.1772 13.8552 22.1488 12.5719 25.8373 12.5719C30.1064 12.5719 33.3325 14.1955 35.4832 17.4394L37.5587 20.8853L39.6377 17.4394C41.7884 14.1955 45.0145 12.5719 49.2765 12.5719C52.9614 12.5719 55.9329 13.8552 58.2055 16.3545C60.4017 18.8574 61.4997 22.2371 61.4997 26.4937L61.4925 47.3144Z" fill="inherit"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 KiB

View file

@ -1,3 +0,0 @@
<svg width="72" height="52" viewBox="0 0 72 52" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M28.8125 36.7812L47.464 26L28.8125 15.2188V36.7812ZM70.3562 8.64225C70.8235 10.3313 71.147 12.5952 71.3625 15.4702C71.614 18.3452 71.722 20.825 71.722 22.9813L71.9375 26C71.9375 33.8703 71.3625 39.6562 70.3562 43.3577C69.4577 46.5923 67.3735 48.6765 64.139 49.575C62.45 50.0422 59.3595 50.3658 54.6158 50.5813C49.9438 50.8328 45.6672 50.9408 41.714 50.9408L36 51.1562C20.9422 51.1562 11.5625 50.5812 7.861 49.575C4.6265 48.6765 2.54225 46.5923 1.64375 43.3577C1.1765 41.6688 0.853251 39.4047 0.637501 36.5297C0.386001 33.6547 0.278 31.175 0.278 29.0188L0.0625 26C0.0625 18.1297 0.637499 12.3438 1.64375 8.64225C2.54225 5.40775 4.6265 3.3235 7.861 2.425C9.55 1.95775 12.6407 1.63425 17.3845 1.41875C22.0562 1.16725 26.3327 1.05925 30.286 1.05925L36 0.84375C51.0578 0.84375 60.4375 1.41875 64.139 2.425C67.3735 3.3235 69.4577 5.40775 70.3562 8.64225Z" fill="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

331
index.php
View file

@ -1,301 +1,84 @@
<?php
global $twig, $mysql;
global $twig;
require_once '_config.php';
use Bramus\Router\Router;
use anlutro\cURL\cURL;
use Twig\TwigFunction;
$curl = new anlutro\cURL\cURL;
$curl = new cURL();
$router = new Router();
session_start();
session_start([
'cookie_lifetime' => 86400,
]);
$nations = array(
$buildData = json_decode(file_get_contents('.build.json'));
'psf' => array(
'name' => 'Panorama Socialist Federation',
'flag' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/Republic%20of%20Panorama/Flag.svg',
'short' => 'psf',
'short_description' => 'The first nation, prev. known as ROP.',
'description' => 'The first nation on CRSS, previously known as ROP.',
'leader' => 'iforgotaname',
'leader_term' => 'Prime Minister',
),
'cnk' => array(
'name' => 'Chunkia',
'flag' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/Chunkia/Chunkia.svg',
'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.',
'leader' => 'WorldWidePixel',
'leader_term' => 'Leader',
),
'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.svg',
'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.',
'leader' => 'Lupancham',
'leader_term' => 'Chancellor',
),
'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.',
'leader' => 'TheClashFruit',
'leader_term' => 'Leader',
),
'rfm' => array(
'name' => 'Romanian Federation of Minecraft',
'flag' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/Romanian%20Federation%20of%20Minecraft/FMC%20flag.svg',
'short' => 'rfm',
'short_description' => 'Helping modernise CRSS',
'description' => 'RFM is a nation helping in the modernisation of CRSS, not only by practices but by livelihood.',
'leader' => 'polycord',
'leader_term' => 'President',
),
'tcg' => array(
'name' => 'Toasteric Colony of Grapetopia',
'flag' => 'https://raw.theclashfruit.me/CRSS/CRSS/main/Nations/Grapetopia/TCG.svg',
'short' => 'tcg',
'short_description' => 'A colony of TTK, ~10K blocks out of 0,0',
'description' => 'This is a colony of TTK, an island with an area of ~382m², located at ~7.5k X and -2.8k Z',
'leader' => 'MrLagSwitcha',
'leader_term' => 'Leader in charge',
),
);
$iconsFun = new TwigFunction('icon', function($icon, $attributes = []) {
$iconName = str_replace('/', '', $icon);
$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.'
)
);
if(isset($_SESSION['user'])) {
$dbUser = $mysql->getUserRecordFromId($_SESSION['user']['id']);
if (str_starts_with($iconName, 'simpleicons')) {
$iconName = str_replace('simpleicons.', '', $iconName);
$user = $_SESSION['user'];
$iconData = file_get_contents("./vendor/simple-icons/simple-icons/icons/$iconName.svg");
} else if (str_starts_with($iconName, 'lucide')) {
$iconName = str_replace('lucide.', '', $iconName);
$user['is_admin'] = $dbUser['is_admin'];
$iconData = file_get_contents("./vendor/theclashfruit/lucide-static-php/icons/$iconName.svg");
} else {
$iconName = str_replace('.', '/', $iconName);
$twig->addGlobal('user', $user);
}
$iconData = file_get_contents("./icons/$iconName.svg");
}
$res = $curl->get('https://crss.blurryface.xyz/api/v1/players');
foreach ($attributes as $key => $value) {
if ($key == 'class') {
$iconData = preg_replace('/(class="\b[^"]*)"/i', '$1 ' . $value . '"', $iconData);
$json = json_decode($res->body, true);
$dom = new DOMDocument("1.0");
$dom->preserveWhiteSpace = false;
$dom->formatOutput = false;
$dom->loadXML($iconData);
if($json != null)
$twig->addGlobal('playerCount', count($json));
else
$twig->addGlobal('playerCount', $json);
$iconData = $dom->saveHTML();
$iconData = preg_replace('/(<!--\s.*)-->/i', '', $iconData);
$iconData = preg_replace('/\n/', ' ', $iconData);
} else {
$iconData = preg_replace('/(<svg\b[^><]*)>/i', '$1 ' . $key . '="' . $value . '">', $iconData);
}
}
$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']));
return $iconData;
});
$twig->addGlobal('reduced', isset($_GET['reduced']));
$twig->addFunction($iconsFun);
$twig->addGlobal('git', $buildData->git);
$twig->addGlobal('server', [
'version' => '1.11.2',
]);
$twig->addGlobal('user', [
'name' => 'John Doe'
]);
$router->get('/', function() {
global $twig;
$twig->addGlobal('pageUri', '/');
echo $twig->render('index.twig');
echo $twig->render('index.twig', [
'page' => [
'title' => 'Home',
'path' => '/',
]
]);
});
$router->get('/nations', function() {
global $twig;
$twig->addGlobal('pageUri', '/nations');
echo $twig->render('nations.twig');
$router->get('/helloworld', function() {
echo '<!DOCTYPE html>';
echo '<h1>Hello World!!</h1>';
});
$router->get('/companies', function() {
global $twig;
$twig->addGlobal('pageUri', '/companies');
echo $twig->render('companies.twig');
});
$router->get('/gallery', function() {
global $twig;
$twig->addGlobal('pageUri', '/gallery');
echo $twig->render('gallery.twig');
});
$router->get('/map', function() {
global $twig, $mysql;
$twig->addGlobal('pageUri', '/map');
$twig->addGlobal('markers', json_encode($mysql->getMarkers()));
if(isset($_GET['center']))
$twig->addGlobal('center', $_GET['center']);
else
$twig->addGlobal('center', '0;0');
echo $twig->render('map.twig');
});
$router->get('/profile', function() {
global $twig, $mysql;
$twig->addGlobal('pageUri', '/profile');
if (isset($_SESSION['user'])) {
$user = $mysql->getUserRecordFromId($_SESSION['user']['id']);
if ($user == null && $user['admin'] == 0) {
http_response_code(404);
echo $twig->render('404.twig');
} else {
echo $twig->render('profile.twig', array('db_data' => $user));
}
} else {
http_response_code(404);
echo $twig->render('404.twig');
}
});
$router->get('/nation/([a-z]+)', function ($nation) {
global $twig, $mysql, $nations;
$twig->addGlobal('pageUri', '/nation/' . $nation);
if(!$nations[$nation]) {
http_response_code(404);
echo $twig->render('404.twig');
} else {
echo $twig->render('nation.twig', array('nation' => $nations[$nation]));
}
});
$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('company.twig', array('company' => $companies[$company]));
}
});
$router->get('/u/([a-z0-9_\.]+)', function($name) {
global $twig, $mysql, $discord;
$twig->addGlobal('pageUri', '/u/' . $name);
$user = $mysql->getUserRecordFromUsername($name);
if($user == null) {
http_response_code(404);
echo $twig->render('404.twig');
} else {
echo $twig->render('user.twig', array('db_user' => $user));
}
});
// ---------------- Admin ---------------- //
$router->get('/admin', function() {
global $twig, $mysql;
$twig->addGlobal('pageUri', '/admin');
if (isset($_SESSION['user'])) {
$user = $mysql->getUserRecordFromId($_SESSION['user']['id']);
$users = $mysql->getUsers();
$markers = $mysql->getMarkers();
if ($user == null && $user['admin'] == 0) {
http_response_code(401);
echo '<style>body { overflow: hidden; height: 100svh; background: black; display: flex; justify-content: center; align-items: center; }</style><img src="https://http.cat/401" alt="401 Unauthorized" />';
} else {
echo $twig->render('admin/index.twig', array('users' => $users, 'markers' => $markers));
}
} else {
http_response_code(401);
echo '<style>body { overflow: hidden; height: 100svh; background: black; display: flex; justify-content: center; align-items: center; }</style><img src="https://http.cat/401" alt="401 Unauthorized" />';
}
});
$router->get('/admin/__data/page/([a-z]+)', function($page) {
global $twig, $mysql;
if (isset($_SESSION['user'])) {
$user = $mysql->getUserRecordFromId($_SESSION['user']['id']);
$users = $mysql->getUsers();
$markers = $mysql->getMarkers();
if ($user == null && $user['admin'] == 0) {
http_response_code(401);
echo '<style>body { overflow: hidden; height: 100svh; background: black; display: flex; justify-content: center; align-items: center; }</style><img src="https://http.cat/401" alt="401 Unauthorized" />';
} else {
try {
echo $twig->render('admin/pages/' . urlencode($page) . '.twig', array('users' => $users, 'markers' => $markers));
} catch (Exception $e) {
http_response_code(404);
echo $twig->render('admin/pages/404.twig');
}
}
} else {
http_response_code(401);
echo '<style>body { overflow: hidden; height: 100svh; background: black; display: flex; justify-content: center; align-items: center; }</style><img src="https://http.cat/401" alt="401 Unauthorized" />';
}
});
// ---------------- Admin API ---------------- //
$adminApi = new Admin($router);
$adminApi->registerApiRoutes();
// ----------------- 404 ----------------- //
$router->set404(function() {
global $twig;
$twig->addGlobal('pageUri', '404');
http_response_code(404);
echo $twig->render('404.twig');
});
$router->run();
$router->run();

View file

@ -1,50 +0,0 @@
const pageContainer = document.querySelector('.pageContainer');
window.history.pushState({}, '', '#/');
window.addEventListener('hashchange', () => {
let uri = window.location.href.split('#')[1];
if (!window.location.href.includes('#'))
uri = '/admin#/'
const allActiveLinks = document.querySelectorAll('.nav a.active');
const allLinksWithThisUrl = document.querySelectorAll(`.nav a[href="#${uri}"]`);
allActiveLinks.forEach(activeLink => {
activeLink.classList.remove('active');
activeLink.classList.add('link-body-emphasis');
});
allLinksWithThisUrl.forEach(link => {
link.classList.add('active');
link.classList.remove('link-body-emphasis');
});
changePage(window.location.href.split('#')[1].replace('/', ''));
});
const changePage = (url) => {
if (!url)
url = 'dashboard';
pageContainer.innerHTML = `<i class="loader" data-lucide="loader-circle"></i>`;
pageContainer.classList.add('d-flex');
pageContainer.classList.add('align-items-center');
pageContainer.classList.add('justify-content-center');
lucide.createIcons();
fetch(`/admin/__data/page/${url}`)
.then(res => res.text())
.then(html => {
pageContainer.innerHTML = html;
pageContainer.classList.remove('d-flex');
pageContainer.classList.remove('align-items-center');
pageContainer.classList.remove('justify-content-center');
lucide.createIcons();
});
};

View file

@ -1,13 +1,24 @@
import { enableTransition } from "/js/trans.js";
const $ = _ => document.querySelector(_);
const $$ = _ => document.querySelectorAll(_);
function enableLinks() {
document.querySelectorAll(".transitionEnabled").forEach( hyperlinkElement => {
enableTransition(hyperlinkElement);
hyperlinkElement.classList.remove("transitionEnabled");
});
}
const dropDowns = $$('.dropDown');
enableLinks();
dropDowns.forEach(dropDown => {
dropDown.children[0].addEventListener('click', () => {
dropDown.classList.toggle('open');
});
});
window.addEventListener("transitionEnd", enableLinks);
// ------------ //
const navBar = $('.navBar');
const navToggle = $('.navToggle');
const navCollapse = $('.navCollapse');
navToggle.addEventListener('click', () => {
navBar.classList.toggle('navOpen');
navToggle.innerHTML = navBar.classList.contains('navOpen') ?
'<svg xmlns="http://www.w3.org/2000/svg" class="lucide lucide-x icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>' :
'<svg xmlns="http://www.w3.org/2000/svg" class="lucide lucide-menu icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" x2="20" y1="12" y2="12"></line><line x1="4" x2="20" y1="6" y2="6"></line><line x1="4" x2="20" y1="18" y2="18"></line></svg>';
});

176
js/map.js
View file

@ -1,176 +0,0 @@
L.TileLayer.CRSSLayer = L.TileLayer.extend({
getTileUrl: function(coordinate) {
const tileX = coordinate.x;
const tileY = coordinate.y;
const tileZ = coordinate.z;
const url = ('https://cdn-new.theclashfruit.me/crss/tiles/zoom.{z}/{xd}/{yd}/tile.{x}.{y}.png')
.replace('{yd}', Math.floor(tileY / 10))
.replace('{xd}', Math.floor(tileX / 10))
.replace('{y}', tileY)
.replace('{x}', tileX)
.replace('{z}', tileZ);
return url;
}
});
L.tileLayer.crssLayer = function(templateUrl, options) {
return new L.TileLayer.CRSSLayer(templateUrl, options);
}
let mapLayer = L.tileLayer.crssLayer('https://cdn-new.theclashfruit.me/crss/tiles/zoom.{z}/{xd}/{yd}/tile.{x}.{y}.png', {
attribution: '&copy; <a href="https://crss.blurryface.xyz/">CRSS</a> Players | Tiles With <a href="https://unmined.net/">uNmINeD</a>.',
tileSize: 256,
noWrap: true,
maxNativeZoom: 0,
minNativeZoom: -4,
minZoom: -4,
maxZoom: -4 + 8,
zoomOffset: -8
});
let ropMarkers = L.layerGroup([]);
let drrMarkers = L.layerGroup([]);
let miscMarkers = L.layerGroup([]);
markers.forEach(marker => {
const coords = marker.data.split(';');
switch (marker.category) {
case 'rop':
ropMarkers
.addLayer(
L.marker([
parseFloat(coords[0]), parseFloat(coords[1])
]).bindPopup(marker.name)
);
break;
case 'drr':
drrMarkers.addLayer(
L.marker([
parseFloat(coords[0]), parseFloat(coords[1])
]).bindPopup(marker.name)
);
break;
default:
miscMarkers.addLayer(
L.marker([
parseFloat(coords[0]), parseFloat(coords[1])
]).bindPopup(marker.name)
);
break;
}
});
let playerMarkers = L.layerGroup([
]);
console.log(L.CRS.Simple.infinite)
let map = L.map('map', {
layers: [
mapLayer,
miscMarkers,
ropMarkers,
drrMarkers,
playerMarkers
],
preferCanvas: true,
crs: L.Util.extend(L.CRS.Simple, {
transformation: new L.Transformation(1, 0, 1, 0),
projection: L.Projection.LonLat
}),
}).setView([
parseFloat(center.split(';')[1]),
parseFloat(center.split(';')[0])
], 2);
let baseMaps = {
"Overworld": mapLayer
};
let overlayMaps = {
"Players": playerMarkers,
"Miscellaneous Markers": miscMarkers,
"Markers in RoP": ropMarkers,
"Markers in DRR": drrMarkers,
};
let layerControl = L.control.layers(baseMaps, overlayMaps).addTo(map);
L.control.mousePosition({
position: 'bottomright',
separator: '; ',
lngFormatter: (x) => {
return Math.floor(x)
},
latFormatter: (y) => {
return Math.floor(y)
},
wrapLng: false,
lngFirst: true
}).addTo(map);
const mappedPlayers = {}
const updatePlayerPos = (players) =>{
for (const player of players) {
const playerMarker = mappedPlayers[player.uniqueId];
if(playerMarker) {
playerMarker.setLatLng([player.location.z, player.location.x]);
playerMarker.setPopupContent(`${player.displayName} (${Math.floor(player.location.x)}; ${Math.floor(player.location.y)}; ${Math.floor(player.location.z)})`);
mappedPlayers[player.uniqueId] = playerMarker;
} else {
const playerIcon = L.icon({
iconUrl: `https://mc-heads.net/avatar/${player.displayName}/16`,
iconSize: [28, 28],
iconAnchor: [14, 14],
popupAnchor: [0, -14]
});
const marker = L.marker([player.location.z, player.location.x], { icon: playerIcon, alt: player.displayName })
.bindPopup(`${player.displayName} (${Math.floor(player.location.x)}; ${Math.floor(player.location.y)}; ${Math.floor(player.location.z)})`);
playerMarkers.addLayer(marker);
mappedPlayers[player.uniqueId] = marker;
}
}
for (const [uniqueId, playerMarker] of Object.entries(mappedPlayers)) {
if(!players.find(p => p.uniqueId === uniqueId)) {
playerMarkers.removeLayer(playerMarker);
delete mappedPlayers[uniqueId];
}
}
}
fetch('https://crss.blurryface.xyz/api/v1/players')
.then(r => r.json())
.then(p => {
updatePlayerPos(p);
});
setInterval(() => {
fetch('https://crss.blurryface.xyz/api/v1/players')
.then(r => r.json())
.then(p => {
updatePlayerPos(p);
});
}, 1000);

View file

@ -1,18 +0,0 @@
const $ = selector => document.querySelector(selector);
const navToggle = $(".navToggle");
const menu = $(".pageNav > .container");
navToggle.onclick = () => {
const menuToggled = menu.classList.contains("opened");
if (menuToggled) {
menu.classList.remove("opened");
} else {
menu.classList.add("opened");
}
navToggle.innerHTML = menuToggled ? "Menu" : "Close";
}
window.addEventListener("transitionBuffering", () => menu.classList.remove("opened"));

View file

@ -1,66 +0,0 @@
/*
* Myadeleines' Simple Page Transition Script. "Trans" for short. :trol:
* Making CSS-powered animated transitions between pages possible.
*
* Licensed under the Apache License. Please refer to the LICENSE file.
*/
const transitionBufferingEvent = new Event("transitionBuffering");
const transitionStartEvent = new Event("transitionStart");
const transitionEndEvent = new Event("transitionEnd");
const $ = selector => document.querySelector(selector);
const parser = new DOMParser();
const mainElement = $("main");
export function enableTransition( hyperlinkElement ) {
hyperlinkElement.addEventListener("click", event => {
event.preventDefault(); // Browser won't load the page when the hyperlink is pressed.
loadURL(hyperlinkElement.href, true, hyperlinkElement);
});
}
function loadURL( targetedURL, updateURL, hyperlinkElement ) {
const activeHyperlink = $(".pageNav .active");
mainElement.classList.add("buffering");
window.dispatchEvent(transitionBufferingEvent);
fetch(targetedURL + "?reduced")
.catch(error => {
console.log(error);
alert(error);
mainElement.classList.remove("buffering");
})
.then(response => response.text().then( fetchedPage => {
fetchedPage = parser.parseFromString(fetchedPage, "text/html");
fetchedPage = {
content: fetchedPage.querySelector("main").innerHTML,
title: fetchedPage.querySelector("title").innerHTML,
}
if (activeHyperlink) activeHyperlink.classList.remove("active");
if (hyperlinkElement) hyperlinkElement.classList.add("active");
if (updateURL) history.pushState({}, fetchedPage.title, targetedURL);
$("title").innerHTML = fetchedPage.title;
mainElement.classList.remove("buffering");
mainElement.classList.add("transition");
let transitionDuration = getComputedStyle(mainElement).transitionDuration;
transitionDuration = parseFloat(transitionDuration) * 1000;
window.dispatchEvent(transitionStartEvent);
setTimeout(() => {
mainElement.innerHTML = fetchedPage.content;
mainElement.classList.remove("transition");
window.dispatchEvent(transitionEndEvent);
}, transitionDuration);
}));
}
window.addEventListener("popstate", Event => {
loadURL(window.location.href, false)
});

View file

@ -1,16 +0,0 @@
{% include 'includes/head.twig' with {'pageTitle': '404'} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': '404',} %}
<main class="pageContent container">
<h1>Not found! :<</h1>
<p>
This page is nowhere to be found!<br>
Go on Discord and complain about it to Clash or Mya!!
</p>
</main>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

View file

@ -1,12 +0,0 @@
<script src="/js/admin/nav.js"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script>
lucide.createIcons();
changePage();
</script>
</body>
</html>

View file

@ -1,35 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>{{ pageTitle }} - Admin &bull; Clyde's Real Survival SMP</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" />
<style>
body {
min-height: 100svh;
}
.lucide {
vertical-align: -10%;
}
/* Loading Animation */
.loader {
animation: spin 1s linear infinite;
}
@keyframes spin {
100% {
-webkit-transform: rotate(360deg);
transform:rotate(360deg);
}
}
</style>
</head>
<body class="d-flex flex-column">

View file

@ -1,52 +0,0 @@
<div class="d-flex flex-column flex-shrink-0 p-3 bg-body-tertiary" style="width: 280px;">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-body-emphasis text-decoration-none">
<i class="pe-none me-2" data-lucide="gauge" width="40" height="32"></i>
<span class="fs-4">Admin Panel</span>
</a>
<hr>
<ul class="nav nav-pills flex-column mb-auto">
<li class="nav-item">
<a href="#/" class="nav-link active" aria-current="page">
<i class="pe-none me-2" data-lucide="home" width="16" height="16"></i>
Home
</a>
</li>
<li class="nav-item">
<a href="#/pages" class="nav-link link-body-emphasis">
<i class="pe-none me-2" data-lucide="notebook-text" width="16" height="16"></i>
Pages
</a>
</li>
<li class="nav-item">
<a href="#/users" class="nav-link link-body-emphasis">
<i class="pe-none me-2" data-lucide="users" width="16" height="16"></i>
Users
</a>
</li>
<li class="nav-item">
<a href="#/markers" class="nav-link link-body-emphasis">
<i class="pe-none me-2" data-lucide="map-pin" width="16" height="16"></i>
Markers
</a>
</li>
</ul>
<hr>
<div class="dropdown">
<a href="#" class="d-flex align-items-center link-body-emphasis text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<img src="https://cdn.discordapp.com/avatars/{{ user.id }}/{{ user.avatar }}.png" alt="" width="32" height="32" class="rounded-circle me-2">
<span>{{ user.global_name }}</span>
</a>
<ul class="dropdown-menu text-small shadow">
<li><a class="dropdown-item" href="#">New project...</a></li>
<li><a class="dropdown-item" href="#">Settings</a></li>
<li><a class="dropdown-item" href="#">Profile</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="/">Exit Admin</a></li>
</ul>
</div>
</div>

View file

@ -1,11 +0,0 @@
{% include 'admin/includes/head.twig' with {'pageTitle': 'Dashboard'} %}
<div class="d-flex flex-grow-1">
{% include 'admin/includes/sidebar.twig' %}
<div class="flex-grow-1 pageContainer">
</div>
</div>
{% include 'admin/includes/foot.twig' %}

View file

@ -1,3 +0,0 @@
<div class="d-flex align-items-center justify-content-center h-100">
<h1>Not Found :(</h1>
</div>

View file

@ -1,3 +0,0 @@
<div class="d-flex align-items-center justify-content-center h-100">
<h1>Welcome {{ user.global_name }} to the admin panel!</h1>
</div>

View file

@ -1,24 +0,0 @@
<table class="table">
<thead>
<tr>
<th scope="col">id</th>
<th scope="col">name</th>
<th scope="col">category</th>
<th scope="col">data</th>
<th scope="col">actions</th>
</tr>
</thead>
<tbody>
{% for marker in markers %}
<tr>
<th scope="row">{{ marker.id }}</th>
<td>{{ marker.name }}</td>
<td>{{ marker.category }}</td>
<td>{{ marker.data }}</td>
<td>
<button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#editModal">Edit</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View file

@ -1 +0,0 @@
pages

View file

@ -1,30 +0,0 @@
<table class="table">
<thead>
<tr>
<th scope="col">id</th>
<th scope="col">username</th>
<th scope="col">display_name</th>
<th scope="col">is_admin</th>
<th scope="col">date</th>
<th scope="col">actions</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<th scope="row">{{ user.id }}</th>
<td>{{ user.username }}</td>
<td>{{ user.display_name }}</td>
<td>{{ user.is_admin == 1 ? "true" : "false" }}</td>
<td>{{ user.date }}</td>
<td>
{% if user.is_admin == 1 %}
<button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#confirmModal">Revoke Admin</button>
{% else %}
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#confirmModal">Make Admin</button>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>

View file

@ -1,22 +0,0 @@
{% 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' %}

View file

@ -1,23 +0,0 @@
{% include 'includes/head.twig' with {'pageTitle': company.name} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': 'company'} %}
<main class="pageContent container">
<div class="nationLayout">
<div class="nationCoreInfo">
<h1 style="margin: 0"> {{ company.name }} </h1>
<p style="font-family:monospace"> {{ company.short }} </p>
<h2> Logo </h2>
<img class="nationFlag" src="{{ company.logo }}" alt="{{ company.name }}'s logo." />
</div>
<div class="nationCoreInfo">
<h2 style="margin: 0"> Description </h2>
<p> {{ company.description }} </p>
</div>
</div>
</main>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

View file

@ -1,16 +0,0 @@
{% include 'includes/head.twig' with {'pageTitle': 'Gallery'} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': 'gallery',} %}
<main class="container">
<h1>Gallery</h1>
<p>
Yet to be filled. :3<br>
Come later!
</p>
</main>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

View file

@ -1,4 +0,0 @@
{% if not reduced %}
</body>
</html>
{% endif %}

View file

@ -1,42 +0,0 @@
{% if not reduced %}
<div class="container">
<ins data-revive-zoneid="3" data-revive-id="5ae65e2e4729376e04e82303cef4f977"></ins>
<script async src="//ads.theclashfruit.me/www/delivery/asyncjs.php"></script>
</div>
<footer class="pageFooter container">
<p class="copyright">
Copyright &copy; 2024 CRSS <br>
Brought to by PrideCraft Studios, CustardMC, LoopMC, Devin, and TheClashFruit's Real Hosting Company!
</p>
<div class="SNS-Links">
<a href="https://discord.gg/rGjCKawPkS" target="_blank" rel="me">
<img src="/img/Discord.svg" alt="YouTube's icon">
<span>CRSS's Public Discord</span>
</a>
<a href="https://youtube.com/@CRSS666" target="_blank" rel="me">
<img src="/img/Youtube.svg" alt="YouTube's icon">
<span>CRSS's channel</span>
</a>
<a href="https://tech.lgbt/@blurryface" target="_blank" rel="me">
<img src="/img/Mastodon.svg" alt="Mastodon's icon">
<span>Blurryface</span>
</a>
<a href="https://wetdry.world/@TheClashFruit" target="_blank" rel="me">
<img src="/img/Mastodon.svg" alt="Mastodon's icon">
<span>TheClashFruit</span>
</a>
<a href="https://wetdry.world/@Myadeleines" target="_blank" rel="me">
<img src="/img/Mastodon.svg" alt="Mastodon's icon">
<span>Myadeleines</span>
</a>
</div>
</footer>
{% endif %}

View file

@ -1,48 +0,0 @@
{% if reduced %}
<title>{{ pageTitle }} &bull; Clyde's Real Survival SMP</title>
{% else %}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>{{ pageTitle }} &bull; Clyde's Real Survival SMP</title>
<meta name="name" content="Clyde's Real Survival SMP &bull; {{ pageTitle }}" />
<meta name="description" content="A very cool minecraft SMP that updates to every version starting from b1.0." />
<meta name="keywords" content="crss, minecraft, beta, alpha, release, new, 1.0, version" />
<meta name="theme-color" content="#ffffff" />
<meta property="og:site_name" content="Clyde's Real Survival SMP" />
<meta property="og:title" content="{{ pageTitle }}" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_UK" />
<meta property="og:url" content="https://crss.blurryface.xyz{{ pageUri }}" />
<meta property="og:image" content="https://crss.blurryface.xyz/img/social_image.png" />
<meta property="og:description" content="A very cool minecraft SMP that updates to every version starting from b1.0." />
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:domain" content="crss.blurryface.xyz" />
<meta property="twitter:url" content="https://crss.blurryface.xyz{{ pageUri }}" />
<meta name="twitter:title" content="Clyde's Real Survival SMP &bull; {{ pageTitle }}" />
<meta name="twitter:description" content="A very cool minecraft SMP that updates to every version starting from b1.0." />
<meta name="twitter:image" content="https://crss.blurryface.xyz/img/social_image.png" />
<script src="/js/main.js" type="module"></script>
{% if pageUri == '/map' %}
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>
<link rel="stylesheet" href="/css/map.min.css" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script src="https://cdn.jsdelivr.net/npm/leaflet-mouse-position@1.2.0/src/L.Control.MousePosition.min.js"></script>
{% endif %}
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/css/style.min.css">
</head>
<body>
{% endif %}

View file

@ -1,20 +0,0 @@
{% if not reduced %}
<header class="pageHero">
<div class="container">
<!-- Left -->
<div class="Branding">
<img src="/img/CRSS-Logo.svg">
<span>Clyde's Real Survival SMP!</span>
</div>
<!-- Right -->
<div class="Server-Information">
<span>Server address:</span>
<input type="text" size="14" readonly value="play.blryface.xyz">
<span>Version: 1.10.2</span> <!-- is this needed anymore since via -->
</div>
</div>
</header>
{% endif %}

View file

@ -1,41 +0,0 @@
{% if not reduced %}
<script src="/js/nav.js" type="module"></script>
<div class="navToggle">Menu</div>
<nav class="pageNav">
<div class="container">
<div class="navLeft">
<a class="transitionEnabled {% if page == 'home' %} active {% endif %}" href="/">
Home
</a>
<a class="transitionEnabled {% if page == 'gallery' %} active {% endif %}" href="/gallery">
Gallery
</a>
<a class="transitionEnabled {% if page == 'nations' %} active {% endif %}" href="/nations">
Nations
</a>
<a class="transitionEnabled {% if page == 'companies' %} active {% endif %}" href="/companies">
Companies
</a>
<a class="{% if page == 'map.js' %} active {% endif %}" href="/map">
Map
</a>
{% if user.is_admin == 1 %}
<a href="/admin">
Admin Panel
</a>
{% endif %}
</div>
<div class="navRight">
{% if user %}
<a class="transitionEnabled userButton {% if page == 'profile' %}active{% endif %}" href="{% if page == 'profile' %}#{% else %}/profile{% endif %}">
{{ user.global_name }}
</a>
{% else %}
<a class="buttonPrimary" href="{{ dc_uri }}">
Login
</a>
{% endif %}
</div>
</div>
</nav>
{% endif %}

View file

@ -1,48 +1,261 @@
{% include 'includes/head.twig' with {'pageTitle': 'Home'} %}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
{% include 'includes/hero.twig' %}
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
{% include 'includes/nav.twig' with {'page': 'home',} %}
<main class="pageContent container">
<h1>Welcome to Clyde's Real Survival SMP (CRSS)!</h1>
<p>This is a server made by Blurryface, hosted by TheClashFruit, played by Devin, and sponsored by TheClashFruit's Real Hosting Company Limited Liability Company (TCFRHCLLC) and Pridecraft Studios!</p>
<title>Clyde's Real Survival SMP &bull; {{ page.title }}</title>
<h2 id="info">Information</h2>
<ol>
<meta name="name" content="Clyde's Real Survival SMP &bull; {{ page.title }}" />
<meta name="description" content="A very cool minecraft SMP that updates to every version starting from b1.0." />
<meta name="keywords" content="crss, minecraft, beta, alpha, release, new, 1.0, version, {{ page.title }}" />
<meta name="theme-color" content="#537F53" />
This is CRSS, a server hosted by Blurryface which updates every 1st of the month, ever since beta 1.0.<br />
We've been doing this for a good while, and our server has many structures and has had many players.<br />
It currently has 3 nations, PSF, DRR and CNK, each one with unique builds and terrain.<br />
We have an Youtube channel where we post some bits of our server, you can stay tuned to it to get to know more about us.<br />
The seed used in the world is the same seed the first Main Menu Panorama used, and a pack with a panorama from the area which we built over, on the original coordinates, is due to be released soon™.<br />
Stay tuned to our Modrinth to download it!
<meta property="og:site_name" content="Clyde's Real Survival SMP" />
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_GB" />
<meta property="og:url" content="https://crss.cc{{ page.path }}" />
<meta property="og:image" content="https://crss.cc/_internal/card?page={{ page.path }}" />
<meta property="og:description" content="A very cool minecraft SMP that updates to every version starting from b1.0." />
</ol>
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:domain" content="crss.cc" />
<meta property="twitter:url" content="https://crss.cc{{ page.path }}" />
<meta name="twitter:title" content="Clyde's Real Survival SMP &bull; {{ page.title }}" />
<meta name="twitter:description" content="A very cool minecraft SMP that updates to every version starting from b1.0." />
<meta name="twitter:image" content="https://crss.cc/_internal/card?page={{ page.path }}" />
<script type="importmap">
{
"imports": {
"@crss/": "/js/"
}
}
</script>
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/css/style.min.css" />
</head>
<body>
<header class="pageHero">
<div class="heroOverlay">
<div class="container">
<div>
{{ icon('logo') | raw }}
<h2 id="rules">Rules</h2>
<ol>
<li>
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 />
</li>
<!-- <li>
Attempting to scam people, from IRL or in-game negotiations, will lead to a ban. It's only permitted to "scam" if it fits the lore. <b>TL;DR: Don't scam</b>
</li> -->
<li>
The only exceptions to the second rule is if you're taking over something, such as a government.<br /> This has happened, for example, to the Panorama Socialist Federation, previously known as "Republic of Panorama".<br /> You're free to do any modifications to whatever, if it fits your government, and the other players approve of that take over.<br /> If they don't approve of it, your government may get re-taken over, and any changes may be undone by players.<br /> <b>TL;DR You "can" grief if you take a government over and need to do changes</b><br />
</ol>
<b>Failing to follow these rules will result in a ban.</b>
</main>
<h1>Clyde's Real Survival SMP!</h1>
</div>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}
<div>
<label for="ip">
Server Address:
</label>
<input type="text" value="play.crss.cc" id="ip" readonly size="8" />
<label for="ip">
Version: {{ server.version }}
</label>
</div>
</div>
</div>
</header>
<nav class="navBar">
<div class="container">
<div class="navMobileContainer">
<button class="navToggle">
{{ icon('lucide.menu', { 'class': 'icon' }) | raw }}
</button>
</div>
<div class="navCollapse">
<ul>
<li>
<a href="#" class="active">
{{ icon('lucide.home', { 'class': 'icon' }) | raw }}
Home
</a>
</li>
<li>
<a href="/about">
{{ icon('lucide.at-sign', { 'class': 'icon' }) | raw }}
About
</a>
</li>
<li>
<a href="/gallery">
{{ icon('lucide.images', { 'class': 'icon' }) | raw }}
Gallery
</a>
</li>
<li>
<a href="/map">
{{ icon('lucide.map', { 'class': 'icon' }) | raw }}
Map
</a>
</li>
<li>
<a href="/game">
{{ icon('lucide.gamepad', { 'class': 'icon' }) | raw }}
In-Game
</a>
</li>
</ul>
<ul>
{% if user %}
<li>
<div class="dropDown">
<label>
{{ icon('lucide.user', { 'class': 'icon' }) | raw }}
{{ user.name }}
</label>
<div class="dropDownMenu">
<ul>
<li>
<a href="/u/user">
{{ icon('lucide.user', { 'class': 'icon' }) | raw }}
Profile
</a>
</li>
<li>
<a href="/settings">
{{ icon('lucide.settings', { 'class': 'icon' }) | raw }}
Settings
</a>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="/admin">
{{ icon('lucide.layout-dashboard', { 'class': 'icon' }) | raw }}
Admin
</a>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="/logout">
{{ icon('lucide.log-out', { 'class': 'icon' }) | raw }}
Logout
</a>
</li>
</ul>
</div>
</div>
</li>
{% else %}
<li>
<a href="/auth">
{{ icon('lucide.log-in', { 'class': 'icon' }) | raw }}
Login
</a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
<main class="pageContent">
<div class="container">
<h1>Home</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores beatae cum dicta dolor fugit hic inventore nostrum placeat provident saepe. At est ex excepturi exercitationem iure natus nisi soluta totam voluptatem voluptatum? Adipisci aliquid consectetur corporis delectus dolores, ea eius et hic inventore nesciunt nobis recusandae repellat sed! Delectus eaque excepturi inventore numquam quaerat? Ad alias aliquid aperiam cupiditate eos esse fugit illum iure laudantium modi molestiae numquam, odit officia quae quasi, quibusdam recusandae rem repellendus sapiente sint veniam vero vitae! Blanditiis dicta maiores nemo nesciunt rerum. Accusamus dolorum, eligendi itaque laborum magni modi obcaecati, officiis pariatur perspiciatis, tenetur unde.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores beatae cum dicta dolor fugit hic inventore nostrum placeat provident saepe. At est ex excepturi exercitationem iure natus nisi soluta totam voluptatem voluptatum? Adipisci aliquid consectetur corporis delectus dolores, ea eius et hic inventore nesciunt nobis recusandae repellat sed! Delectus eaque excepturi inventore numquam quaerat? Ad alias aliquid aperiam cupiditate eos esse fugit illum iure laudantium modi molestiae numquam, odit officia quae quasi, quibusdam recusandae rem repellendus sapiente sint veniam vero vitae! Blanditiis dicta maiores nemo nesciunt rerum. Accusamus dolorum, eligendi itaque laborum magni modi obcaecati, officiis pariatur perspiciatis, tenetur unde.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores beatae cum dicta dolor fugit hic inventore nostrum placeat provident saepe. At est ex excepturi exercitationem iure natus nisi soluta totam voluptatem voluptatum? Adipisci aliquid consectetur corporis delectus dolores, ea eius et hic inventore nesciunt nobis recusandae repellat sed! Delectus eaque excepturi inventore numquam quaerat? Ad alias aliquid aperiam cupiditate eos esse fugit illum iure laudantium modi molestiae numquam, odit officia quae quasi, quibusdam recusandae rem repellendus sapiente sint veniam vero vitae! Blanditiis dicta maiores nemo nesciunt rerum. Accusamus dolorum, eligendi itaque laborum magni modi obcaecati, officiis pariatur perspiciatis, tenetur unde.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores beatae cum dicta dolor fugit hic inventore nostrum placeat provident saepe. At est ex excepturi exercitationem iure natus nisi soluta totam voluptatem voluptatum? Adipisci aliquid consectetur corporis delectus dolores, ea eius et hic inventore nesciunt nobis recusandae repellat sed! Delectus eaque excepturi inventore numquam quaerat? Ad alias aliquid aperiam cupiditate eos esse fugit illum iure laudantium modi molestiae numquam, odit officia quae quasi, quibusdam recusandae rem repellendus sapiente sint veniam vero vitae! Blanditiis dicta maiores nemo nesciunt rerum. Accusamus dolorum, eligendi itaque laborum magni modi obcaecati, officiis pariatur perspiciatis, tenetur unde.
</p>
<h2 id="rules">Rules</h2>
<ol>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nihil, sit.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nihil, sit.
</li>
</ol>
</div>
</main>
<footer class="pageFooter">
<div class="container">
<div>
<p>
Copyright &copy; 2024 CRSS
</p>
<p>
Website originally designed by Myadeleines, heavily modified and rewritten by TheClashFruit.
</p>
</div>
<div>
<ul>
<li>
<a href="https://modrinth.com/organization/crss">
{{ icon('simpleicons.modrinth', { 'width': '24', 'height': '24', 'fill': 'currentColor' }) | raw }}
</a>
</li>
<li>
<a href="https://git.theclashfruit.me/crss">
{{ icon('simpleicons.forgejo', { 'width': '24', 'height': '24', 'fill': 'currentColor' }) | raw }}
</a>
</li>
<li>
<a href="https://youtube.com/@CRSS666">
{{ icon('simpleicons.youtube', { 'width': '24', 'height': '24', 'fill': 'currentColor' }) | raw }}
</a>
</li>
<li>
<a href="https://discord.gg/rGjCKawPkS">
{{ icon('simpleicons.discord', { 'width': '24', 'height': '24', 'fill': 'currentColor' }) | raw }}
</a>
</li>
</ul>
<p>
CRSS/Website
<br />
{{ git.branch }}@<a href="https://git.theclashfruit.me/CRSS/Website/commit/{{ git.commit.sha }}">{{ git.commit.sha | slice(0, 7) }}</a>
</p>
</div>
</div>
</footer>
<script type="module" src="/js/main.js"></script>
</body>
</html>

View file

@ -1,13 +0,0 @@
{% include 'includes/head.twig' with {'pageTitle': 'Map'} %}
<div id="map"></div>
<script>
const center = "{{ center }}";
const markers = {{ markers|raw }};
</script>
<script src="js/map.js"></script>
{% include 'includes/foot.twig' %}

View file

@ -1,63 +0,0 @@
{% include 'includes/head.twig' with {'pageTitle': nation.name} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': 'nation'} %}
<main class="pageContent container">
<div class="nationLayout">
<div class="nationCoreInfo">
<h1 style="margin: 0"> {{ nation.name }} </h1>
<p style="font-family:monospace"> {{ nation.short }} </p>
<h2> Flag </h2>
<img class="nationFlag" src="{{ nation.flag }}" alt="{{ nation.name }}'s flag." />
</div>
<div class="nationCoreInfo">
<h2 style="margin: 0"> Description </h2>
<p> {{ nation.description }} </p>
<h2> {{ nation.leader_term }} </h2>
<p> {{ nation.leader }} </p>
</div>
</div>
</main>
<style>
/* TCF PLEASE MOVE THIS TO THE CORRECT CSS FILE, I AM TOO LAZY */
@media (max-width: 700px) {
.nationLayout {
display: flex;
flex-direction: column;
gap: 1rem;
}
}
@media (min-width: 701px) {
.nationLayout {
display: flex;
flex-direction: row;
gap: 3rem;
}
}
.nationLayout p, h1, h2, h3 {
margin: 0;
}
.nationFlag {
border-radius: 12px;
}
.nationCoreInfo {
flex-grow: 1;
flex-basis: 250px;
gap: 1rem;
display: flex;
flex-direction: column;
flex-wrap: wrap;
}
</style>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

View file

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

View file

@ -1,36 +0,0 @@
{% include 'includes/head.twig' with {'pageTitle': 'Profile'} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': 'profile',} %}
<main class="pageContent" id="content">
<div class="container">
<ul>
<li>
id: {{ user.id }}
</li>
<li>
username: {{ user.username }}
</li>
<li>
global_name: {{ user.global_name }}
</li>
<li>
accent_color: {{ user.accent_color }}
</li>
<li>
premium_type: {{ user.premium_type }}
</li>
<li>
public_flags: {{ user.public_flags }}
</li>
<li>
is_admin: <label>{{ db_data.is_admin }}</label>
</li>
</ul>
</div>
</main>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

View file

@ -1,25 +0,0 @@
{% include 'includes/head.twig' with {'pageTitle': 'Rules'} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': 'rules',} %}
<main class="pageContent" id="content">
<div class="container">
<h2>Rules</h2>
<ol>
<li>
The usage of modified clients that gives unfair advantage to players is not permitted. <b>TL;DR Do not cheat.</b>
</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>
</li>
</ol>
<b>Failing to follow these basic rules will result in a ban.</b>
</div>
</main>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

View file

@ -1,14 +0,0 @@
{% include 'includes/head.twig' with {'pageTitle': username} %}
{% include 'includes/hero.twig' %}
{% include 'includes/nav.twig' with {'page': 'user',} %}
<main class="pageContent" id="content">
<div class="container">
{{ db_user.display_name }} is {% if db_user.is_admin == 1 %} an admin! {% else %} not an admin! {% endif %}
</div>
</main>
{% include 'includes/footer.twig' %}
{% include 'includes/foot.twig' %}

View file

@ -1,81 +0,0 @@
<?php
class Admin {
private Bramus\Router\Router $router;
function __construct($router) {
$this->router = $router;
}
function notFound($error): void {
header('Content-Type: application/json');
http_response_code(404);
echo json_encode(array(
'error' => true,
'error_description' => $error
));
exit();
}
function isSignedInAdmin(): void {
global $mysql;
if(!isset($_SESSION['user'])) {
$this->notFound('You are not logged in.');
}
$user = $mysql->getUserRecordFromId($_SESSION['user']['id']);
if($user == null && $user['admin'] == 0) {
$this->notFound('You are not an admin.');
}
}
function registerApiRoutes(): void {
$router = $this->router;
$router->mount('/admin/api', function() use ($router) {
$router->mount('/v1', function() use ($router) {
$router->get('/markers', function() {
global $mysql;
header('Content-Type: application/json');
$this->isSignedInAdmin();
$markers = $mysql->getMarkers();
$markersNew = array();
foreach ($markers as $marker) {
$markersNew[] = array(
'id' => $marker['id'],
'name' => $marker['name'],
'category' => $marker['category'],
'x' => floatval(explode(';', $marker['data'])[1]),
'y' => floatval(explode(';', $marker['data'])[0])
);
}
$finalOut = array(
'error' => false,
'markers' => $markersNew
);
echo json_encode($finalOut);
});
$router->get('/users', function() {
global $mysql;
header('Content-Type: application/json');
$this->isSignedInAdmin();
echo json_encode($mysql->getUsers());
});
});
});
}
}

View file

@ -1,92 +0,0 @@
<?php
class Database {
private string $host;
private string $user;
private string $pass;
private string $db;
private mysqli $conn;
function __construct($host, $user, $pass, $db) {
$this->host = $host;
$this->user = $user;
$this->pass = $pass;
$this->db = $db;
$this->conn = new mysqli($this->host, $this->user, $this->pass, $this->db);
}
function createUserRecord($user): void {
$sql = 'INSERT IGNORE INTO users (id, username, display_name) VALUES (?, ?, ?)';
$stmt = $this->conn->prepare($sql);
$stmt->bind_param('iss', $user['id'], $user['username'], $user['global_name']);
$stmt->execute();
}
function getUserRecordFromUsername($username): array | null {
$sql = 'SELECT * FROM users WHERE username = ?';
$stmt = $this->conn->prepare($sql);
$stmt->bind_param('s', $username);
$stmt->execute();
$res = $stmt->get_result();
if($res->num_rows > 0) {
return $res->fetch_assoc();
} else {
return null;
}
}
function getUserRecordFromId($id): array | null {
$sql = 'SELECT * FROM users WHERE id = ?';
$stmt = $this->conn->prepare($sql);
$stmt->bind_param('i', $id);
$stmt->execute();
$res = $stmt->get_result();
if($res->num_rows > 0) {
return $res->fetch_assoc();
} else {
return null;
}
}
function getUsers(): array | null {
$sql = 'SELECT * FROM users';
$stmt = $this->conn->prepare($sql);
$stmt->execute();
$res = $stmt->get_result();
if($res->num_rows > 0) {
return $res->fetch_all(MYSQLI_ASSOC);
} else {
return null;
}
}
function getMarkers(): array | null {
$sql = 'SELECT * FROM markers';
$stmt = $this->conn->prepare($sql);
$stmt->execute();
$res = $stmt->get_result();
if($res->num_rows > 0) {
return $res->fetch_all(MYSQLI_ASSOC);
} else {
return null;
}
}
}

View file

@ -1,88 +0,0 @@
<?php
use anlutro\cURL\cURL;
class Discord {
private string $client;
private string $secret;
private string $redirect;
private cURL $curl;
function __construct($client, $secret, $redirect) {
$this->client = $client;
$this->secret = $secret;
$this->redirect = $redirect;
$this->curl = new anlutro\cURL\cURL;
}
function validateCode($code): array {
$res = $this->curl->post('https://discord.com/api/v10/oauth2/token', [
'client_id' => $this->client,
'client_secret' => $this->secret,
'grant_type' => 'authorization_code',
'code' => $code,
'redirect_uri' => $this->redirect
]);
$json = json_decode($res->body, true);
if(isset($json['error'])) {
return array(
'error' => true,
'error_description' => $json['error_description']
);
} else {
return array(
'error' => false,
'access_token' => $json['access_token'],
'refresh_token' => $json['refresh_token'],
'expires_in' => $json['expires_in']
);
}
}
function refreshToken($refresh_token): array {
$res = $this->curl->post('https://discord.com/api/oauth2/token', [
'client_id' => $this->client,
'client_secret' => $this->secret,
'grant_type' => 'authorization_code',
'refresh_token' => $refresh_token
]);
$json = json_decode($res->body, true);
if(isset($json['error'])) {
return array(
'error' => true,
'error_description' => $json['error_description']
);
} else {
return array(
'error' => false,
'access_token' => $json['access_token'],
'refresh_token' => $json['refresh_token'],
'expires_in' => $json['expires_in']
);
}
}
function getUser($token): array {
$res = $this
->curl
->newRequest('get', 'https://discord.com/api/v10/users/@me')
->setHeader('Authorization', 'Bearer ' . $token)
->send();
return json_decode($res->body, true);
}
function getGuilds($token): array {
$res = $this
->curl
->newRequest('get', 'https://discord.com/api/v10/users/@me/guilds')
->setHeader('Authorization', 'Bearer ' . $token)
->send();
return json_decode($res->body, true);
}
}