mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
feat: read version number from composer.json
this enables any cached css files to automatically to be discarded on release of a new version. Signed-off-by: Zoë Bijl <hiworks@hello.moiety.me> Signed-off-by: Zoë <hiworks@hello.moiety.me> Signed-off-by: Zoë <code@moiety.me>
This commit is contained in:
parent
c86b1b687b
commit
dc352478b5
@ -1,3 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
// Get and decode composer.json
|
||||||
|
$content = file_get_contents(__DIR__ . '/../../../composer.json');
|
||||||
|
$content = json_decode($content, true);
|
||||||
|
|
||||||
|
// Get the version number
|
||||||
|
$version = $content['version'];
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
@ -6,12 +14,12 @@
|
|||||||
<meta name="theme-color" content="#c3639e" />
|
<meta name="theme-color" content="#c3639e" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>
|
<title>
|
||||||
@yield('title')
|
@yield('title')
|
||||||
</title>
|
</title>
|
||||||
@if(isset($front) && $front == false)
|
@if(isset($front) && $front == false)
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/css/back/start.css?=sdfsdf">
|
<link rel="stylesheet" type="text/css" href="/assets/css/back/start.css?v=<?php echo($version); ?>">
|
||||||
@elseif(!isset($front) || $front == true)
|
@elseif(!isset($front) || $front == true)
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?=sdfsdf">
|
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?v=<?php echo($version); ?>">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@ -100,4 +108,4 @@
|
|||||||
</body>
|
</body>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user