2020-05-31 00:21:29 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2020-06-22 21:06:15 +02:00
|
|
|
<title><?= $_ENV['APP_NAME'] ?></title>
|
2020-06-12 19:17:41 +02:00
|
|
|
<link href="<?= $_ENV['STATIC_ROOT'] ?>/css/mapguesser.css?rev=<?= REVISION ?>" rel="stylesheet">
|
2020-06-01 20:39:23 +02:00
|
|
|
<?php if (isset($cssFiles)) : ?>
|
|
|
|
<?php foreach ($cssFiles as $cssFile) : ?>
|
2020-06-12 19:17:41 +02:00
|
|
|
<?php
|
|
|
|
if (!preg_match('/^http(s)?/', $cssFile)) {
|
|
|
|
$cssFile = $_ENV['STATIC_ROOT'] . '/' . $cssFile . '?rev=' . REVISION;
|
|
|
|
}
|
|
|
|
?>
|
2020-06-01 20:39:23 +02:00
|
|
|
<link href="<?= $cssFile ?>" rel="stylesheet">
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
2020-06-06 01:11:45 +02:00
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap" rel="stylesheet">
|
2020-06-12 20:13:43 +02:00
|
|
|
<link rel="icon" type="image/png" sizes="192x192" href="<?= $_ENV['STATIC_ROOT'] ?>/img/favicon/192x192.png?rev=<?= REVISION ?>">
|
|
|
|
<link rel="icon" type="image/png" sizes="96x96" href="<?= $_ENV['STATIC_ROOT'] ?>/img/favicon/96x96.png?rev=<?= REVISION ?>">
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="<?= $_ENV['STATIC_ROOT'] ?>/img/favicon/32x32.png?rev=<?= REVISION ?>">
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="<?= $_ENV['STATIC_ROOT'] ?>/img/favicon/16x16.png?rev=<?= REVISION ?>">
|
2020-05-31 00:21:29 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2020-06-24 21:57:34 +02:00
|
|
|
<?php if (!isset($_COOKIE['COOKIES_CONSENT'])): ?>
|
|
|
|
<div id="cookiesNotice">
|
|
|
|
<p class="small">
|
2020-06-24 22:55:13 +02:00
|
|
|
<?= $_ENV['APP_NAME'] ?> uses cookies to improve user experience. By using the app or clicking 'Agree', you consent to our use of cookies.
|
2020-06-24 21:57:34 +02:00
|
|
|
</p>
|
2020-06-25 14:02:39 +02:00
|
|
|
<button id="agreeCookiesButton" class="small marginTop">Agree</button>
|
2020-06-24 21:57:34 +02:00
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2020-05-31 00:21:29 +02:00
|
|
|
<div id="loading">
|
2020-06-14 11:12:18 +02:00
|
|
|
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/loading.svg?rev=<?= REVISION ?>" width="64" height="64">
|
2020-06-14 02:30:15 +02:00
|
|
|
</div>
|
|
|
|
<div id="cover"></div>
|
|
|
|
<div id="modal" class="modal">
|
|
|
|
<h2 id="modalTitle"></h2>
|
2020-06-14 17:16:47 +02:00
|
|
|
<p id="modalText" class="justify marginTop"></p>
|
2020-06-14 02:30:15 +02:00
|
|
|
<div id="modalButtons" class="right"></div>
|
2020-06-27 00:23:57 +02:00
|
|
|
</div>
|
|
|
|
@yields('pagemodal')
|
|
|
|
@yields('content')
|
|
|
|
<script>
|
|
|
|
const STATIC_ROOT = '<?= $_ENV['STATIC_ROOT'] ?>';
|
|
|
|
const REVISION = '<?= REVISION ?>';
|
|
|
|
var ANTI_CSRF_TOKEN = '<?= \Container::$request->session()->get('anti_csrf_token') ?>';
|
|
|
|
const GOOGLE_MAPS_JS_API_KEY = '<?= $_ENV['GOOGLE_MAPS_JS_API_KEY'] ?>';
|
|
|
|
<?php if (!empty($_ENV['GOOGLE_ANALITICS_ID'])): ?>
|
|
|
|
const GOOGLE_ANALITICS_ID = '<?= $_ENV['GOOGLE_ANALITICS_ID'] ?>';
|
|
|
|
<?php endif; ?>
|
|
|
|
</script>
|
|
|
|
@yields('pagescript')
|
|
|
|
<script src="<?= $_ENV['STATIC_ROOT'] ?>/js/mapguesser.js?rev=<?= REVISION ?>"></script>
|
|
|
|
<?php if (isset($jsFiles)) : ?>
|
|
|
|
<?php foreach ($jsFiles as $jsFile) : ?>
|
|
|
|
<?php
|
|
|
|
if (!preg_match('/^http(s)?/', $jsFile)) {
|
|
|
|
$jsFile = $_ENV['STATIC_ROOT'] . '/' . $jsFile . '?rev=' . REVISION;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<script src="<?= $jsFile ?>"></script>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if (!isset($_COOKIE['COOKIES_CONSENT'])): ?>
|
|
|
|
<script>
|
|
|
|
(function () {
|
|
|
|
// we don't want user to agree cookies when clicking on the notice itself
|
|
|
|
document.getElementById('cookiesNotice').onclick = function (e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
};
|
|
|
|
|
|
|
|
document.getElementById('agreeCookiesButton').onclick = function () {
|
|
|
|
MapGuesser.agreeCookies();
|
|
|
|
|
|
|
|
document.getElementById('cookiesNotice').style.display = 'none';
|
|
|
|
};
|
|
|
|
|
|
|
|
window.onclick = function () {
|
|
|
|
MapGuesser.agreeCookies();
|
|
|
|
};
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
<?php else: ?>
|
|
|
|
<?php if (!empty($_ENV['GOOGLE_ANALITICS_ID'])): ?>
|
|
|
|
<script>
|
|
|
|
(function () {
|
|
|
|
MapGuesser.initGoogleAnalitics();
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</body>
|
|
|
|
</html>
|