MAPG-86 adapt URLs in HTML and JS

This commit is contained in:
bence committed 2020-05-31 21:00:23 +02:00
1 parent 28464fc4ac
commit 665eb7e4d1
4 files changed
+18 -24

No files matched your search

+5 -5
View File
@@ -1,9 +1,9 @@
<?php require 'templates/main_header.php'; ?>
<?php require ROOT . '/views/templates/main_header.php'; ?>
<div class="header small">
<div class="grid">
<h1>
<a href="maps" title="Back to playable maps">
<?php require 'templates/icon.php'; ?>
<a href="/maps" title="Back to playable maps">
<?php require ROOT . '/views/templates/icon.php'; ?>
<span>MapGuesser</span>
</a>
</h1>
@@ -49,5 +49,5 @@
var mapBounds = <?= json_encode($bounds) ?>;
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?= $_ENV['GOOGLE_MAPS_JS_API_KEY'] ?>"></script>
<script src="static/js/game.js"></script>
<?php require 'templates/main_footer.php'; ?>
<script src="/static/js/game.js"></script>
<?php require ROOT . '/views/templates/main_footer.php'; ?>
+4 -9
View File
@@ -1,10 +1,5 @@
<?php require 'templates/main_header.php'; ?>
<div class="header">
<h1>
<?php require 'templates/icon.php'; ?>
MapGuesser
</h1>
</div>
<?php require ROOT . '/views/templates/main_header.php'; ?>
<?php require ROOT . '/views/templates/header.php'; ?>
<div class="main">
<h2>Playable maps</h2>
<div class="mapContainer">
@@ -34,7 +29,7 @@
</div>
<p class="small justify marginTop"><?= $map['description'] ?></p>
</div>
<a class="button fullWidth" href="game?map=<?= $map['id']; ?>" title="Play map '<?= $map['name'] ?>'">Play this map</a>
<a class="button fullWidth" href="game/<?= $map['id']; ?>" title="Play map '<?= $map['name'] ?>'">Play this map</a>
</div>
<?php endforeach; ?>
<?php if (count($maps) < 4): ?>
@@ -44,4 +39,4 @@
<?php endif; ?>
</div>
</div>
<?php require 'templates/main_footer.php'; ?>
<?php require ROOT . '/views/templates/main_footer.php'; ?>
+6 -6
View File
@@ -4,14 +4,14 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MapGuesser</title>
<link href="static/css/mapguesser.css" rel="stylesheet">
<link href="/static/css/mapguesser.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&family=Roboto+Mono:wght@300;500&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" sizes="192x192" href="static/img/favicon/192x192.png">
<link rel="icon" type="image/png" sizes="96x96" href="static/img/favicon/96x96.png">
<link rel="icon" type="image/png" sizes="32x32" href="static/img/favicon/32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="static/img/favicon/16x16.png">
<link rel="icon" type="image/png" sizes="192x192" href="/static/img/favicon/192x192.png">
<link rel="icon" type="image/png" sizes="96x96" href="/static/img/favicon/96x96.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon/32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/img/favicon/16x16.png">
</head>
<body>
<div id="loading">
<img src="static/img/loading.svg">
<img src="/static/img/loading.svg">
</div>