1
0
Fork 0

Create "About" page, update main menu

This commit is contained in:
Krzysztof Sikorski 2022-04-26 01:20:35 +02:00
parent 1bbb8b5ebe
commit 3909314bde
Signed by: krzysztof-sikorski
GPG Key ID: 4EB564BD08FE8476
4 changed files with 74 additions and 6 deletions

View File

@ -11,6 +11,7 @@ final class AppRoutes
public const HOME = 'app_home';
public const FAVICON_ICO = 'app_favicon_ico';
public const LEADERBOARDS = 'app_leaderboards';
public const ABOUT = 'app_about';
public const SUBMIT_JSON = 'app_submit_json';
// undocumented routes

View File

@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace App\Controller;
use App\Contract\Config\AppRoutes;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Twig\Environment;
final class AboutController
{
public function __construct(private Environment $twigEnvironment)
{
}
#[Route(path: '/about', name: AppRoutes::ABOUT, methods: [Request::METHOD_GET])]
public function index(): Response
{
$responseBody = $this->twigEnvironment->render(name: 'about/index.html.twig');
return new Response(content: $responseBody);
}
}

View File

@ -26,21 +26,21 @@ final class MainMenuGenerator
'url' => $this->urlGenerator->generate(name: AppRoutes::LEADERBOARDS),
'external' => false,
],
[
'name' => 'About website',
'url' => $this->urlGenerator->generate(name: AppRoutes::ABOUT),
'external' => false,
],
[
'name' => 'Submit data',
'url' => $this->urlGenerator->generate(name: AppRoutes::SUBMIT_JSON),
'external' => false,
],
[
'name' => 'Nexus Clash',
'name' => 'Back to Nexus Clash',
'url' => 'https://www.nexusclash.com/',
'external' => true,
],
[
'name' => 'Discord',
'url' => 'https://discord.gg/zBVwzD3f8v',
'external' => true,
],
];
}
}

View File

@ -0,0 +1,41 @@
{% extends 'base.html.twig' %}
{% block title %}About - Nexus Archive{% endblock %}
{% block body %}
<section>
<h1>About Nexus Archive</h1>
<p>
This website was created to automatically collect and display various data
from the world of <a href="https://www.nexusclash.com/" rel="external">Nexus Clash</a> game.
</p>
<p>
Currently the only implemented feature is a "time machine" that presents various Leaderboards
in their state at the end of Breath 3.5.
</p>
</section>
<section>
<h1>Contact information</h1>
<p>
My Nexus Clash account is
<a href="https://www.nexusclash.com/memberlist.php?mode=viewprofile&u=108" rel="external">Badziew</a>,
you can send me a private message or start a forum thread.
</p>
<p>
My Discord username is <code>That Crazy Old Badziew#1362</code>,
you can find me on a few different Discord servers,<br>
including my own personal server
<a href="https://discord.gg/zBVwzD3f8v" rel="external">House of Badziew</a>.
Feel free to drop a message in one of these places.
</p>
</section>
<section>
<h1>Open source</h1>
<p>The website is an open source project, mirrored for redundancy to a few different code-sharing portals:</p>
<ul>
<li><a href="https://gitlab.com/krzysztof-sikorski/nexus-archive" rel="external">Gitlab copy</a></li>
<li><a href="https://github.com/krzysztof-sikorski/nexus-archive" rel="external">GitHub copy</a></li>
<li><a href="https://git.launchpad.net/nexus-archive" rel="external">Launchpad copy</a></li>
</ul>
</section>
{% endblock %}