MAPG-28 add static root and revision to the local JS and CSS files
This commit is contained in:
parent
7690714b26
commit
08d4aec48e
@ -1,3 +1,13 @@
|
||||
<?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; ?>
|
||||
<script>
|
||||
(function () {
|
||||
var anchors = document.getElementsByTagName('a');
|
||||
|
@ -4,9 +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="<?= $_ENV['STATIC_ROOT'] ?>/css/mapguesser.css?rev=<?= REVISION ?>" rel="stylesheet">
|
||||
<?php if (isset($cssFiles)) : ?>
|
||||
<?php foreach ($cssFiles as $cssFile) : ?>
|
||||
<?php
|
||||
if (!preg_match('/^http(s)?/', $cssFile)) {
|
||||
$cssFile = $_ENV['STATIC_ROOT'] . '/' . $cssFile . '?rev=' . REVISION;
|
||||
}
|
||||
?>
|
||||
<link href="<?= $cssFile ?>" rel="stylesheet">
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user