forked from CRSS/Website
feat: add home page
This commit is contained in:
parent
44b742899c
commit
811acbec1c
|
@ -1,3 +1,4 @@
|
||||||
DISCORD_CLIENT=
|
DISCORD_CLIENT=
|
||||||
DISCORD_SECRET=
|
DISCORD_SECRET=
|
||||||
DISCORD_REDIRECT=
|
DISCORD_REDIRECT=
|
||||||
|
DISCORD_OAUTH=
|
|
@ -14,6 +14,8 @@
|
||||||
$loader = new FilesystemLoader('template');
|
$loader = new FilesystemLoader('template');
|
||||||
$twig = new Twig\Environment($loader);
|
$twig = new Twig\Environment($loader);
|
||||||
|
|
||||||
|
$twig->addGlobal('discord_auth', $_ENV['DISCORD_OAUTH']);
|
||||||
|
|
||||||
$discord = new Discord(
|
$discord = new Discord(
|
||||||
$_ENV['DISCORD_CLIENT'],
|
$_ENV['DISCORD_CLIENT'],
|
||||||
$_ENV['DISCORD_SECRET'],
|
$_ENV['DISCORD_SECRET'],
|
||||||
|
|
BIN
img/icon.png
Normal file
BIN
img/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
img/spawn.jpg
Normal file
BIN
img/spawn.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 MiB |
|
@ -1,4 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
require_once '_config.php';
|
require_once '_config.php';
|
||||||
|
|
||||||
echo $twig->render('index.html');
|
echo $twig->render('index.html', [
|
||||||
|
'user' => null
|
||||||
|
]);
|
|
@ -1 +1,88 @@
|
||||||
tba
|
<!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>CRSS</title>
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.ico">
|
||||||
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="pageHero" id="hero">
|
||||||
|
<div class="blurFiler">
|
||||||
|
<div class="container">
|
||||||
|
<h1>Clyde's Real Survival SMP</h1>
|
||||||
|
|
||||||
|
<div class="serverInfo">
|
||||||
|
Online: <label>0</label> / <label>20</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="pageNav" id="navigation">
|
||||||
|
<div class="container">
|
||||||
|
<ul class="navLeft">
|
||||||
|
<li>
|
||||||
|
<a class="active" href="#">
|
||||||
|
Home
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="nations.php">
|
||||||
|
Nations
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="rules.php">
|
||||||
|
Rules
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="map.php">
|
||||||
|
Map
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navRight">
|
||||||
|
{% if user %}
|
||||||
|
<li>
|
||||||
|
<a class="userButton">
|
||||||
|
{{ user.global_name }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li>
|
||||||
|
<a class="buttonPrimary" href="{{ discord_auth }}">
|
||||||
|
Login
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main class="pageContent" id="content">
|
||||||
|
<div class="container">
|
||||||
|
this is the home page
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="pageFooter container" id="footer">
|
||||||
|
<div class="left">
|
||||||
|
<p class="copyright">
|
||||||
|
Copyright © 2023 CRSS
|
||||||
|
</p>
|
||||||
|
<p class="sponsors">
|
||||||
|
Brought to by TCFRHC LLC., PrideCraft, TheClashFruit's Gitea.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="left">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue