Merged in feature/MAPG-168-prevent-home-redirection (pull request #137)

Feature/MAPG-168 prevent home redirection
This commit is contained in:
Bence Pőcze 2020-06-23 18:48:24 +00:00
commit dc4ba4b5a4
4 changed files with 4 additions and 5 deletions

View File

@ -15,7 +15,7 @@ $jsFiles = [
<?php require ROOT . '/views/templates/main_header.php'; ?>
<header class="small">
<h1>
<a href="/maps" title="Back to playable maps">
<a href="/" title="<?= $_ENV['APP_NAME'] ?>">
<img class="inline" width="1em" height="1em" src="<?= $_ENV['STATIC_ROOT'] ?>/img/icon.svg?rev=<?= REVISION ?>"><!--
--><span><?= $_ENV['APP_NAME'] ?></span>
</a>

View File

@ -10,7 +10,7 @@ $jsFiles = [
<?php require ROOT . '/views/templates/main_header.php'; ?>
<header class="small">
<h1>
<a href="/maps" title="Back to playable maps">
<a href="/" title="<?= $_ENV['APP_NAME'] ?>">
<img class="inline" width="1em" height="1em" src="<?= $_ENV['STATIC_ROOT'] ?>/img/icon.svg?rev=<?= REVISION ?>"><!--
--><span><?= $_ENV['APP_NAME'] ?></span>
</a>

View File

@ -5,7 +5,6 @@ $cssFiles = [
?>
<?php require ROOT . '/views/templates/main_header.php'; ?>
<?php require ROOT . '/views/templates/header.php'; ?>
<h2>Playable maps</h2>
<div id="mapContainer">
<?php foreach ($maps as $map): ?>
<div class="mapItem">

View File

@ -12,7 +12,7 @@ if (!empty($_ENV['DEV'])) {
Container::$routeCollection = new MapGuesser\Routing\RouteCollection();
Container::$routeCollection->get('index', '', [MapGuesser\Controller\HomeController::class, 'getIndex']);
Container::$routeCollection->get('index', '', [MapGuesser\Controller\MapsController::class, 'getMaps']);
Container::$routeCollection->group('login', function (MapGuesser\Routing\RouteCollection $routeCollection) {
$routeCollection->get('login', '', [MapGuesser\Controller\LoginController::class, 'getLoginForm']);
$routeCollection->post('login-action', '', [MapGuesser\Controller\LoginController::class, 'login']);
@ -35,7 +35,7 @@ Container::$routeCollection->group('profile', function (MapGuesser\Routing\Route
$routeCollection->get('profile', '', [MapGuesser\Controller\UserController::class, 'getProfile']);
$routeCollection->post('profile-action', '', [MapGuesser\Controller\UserController::class, 'saveProfile']);
});
Container::$routeCollection->get('maps', 'maps', [MapGuesser\Controller\MapsController::class, 'getMaps']);
//Container::$routeCollection->get('maps', 'maps', [MapGuesser\Controller\MapsController::class, 'getMaps']);
Container::$routeCollection->group('game', function (MapGuesser\Routing\RouteCollection $routeCollection) {
$routeCollection->get('game', '{mapId}', [MapGuesser\Controller\GameController::class, 'getGame']);
$routeCollection->get('game-json', '{mapId}/json', [MapGuesser\Controller\GameController::class, 'getGameJson']);