Version website stylesheet asset
This commit is contained in:
parent
a270c6eca4
commit
f121910cba
|
|
@ -200,7 +200,7 @@ function renderStackSourceLinks(string $stackKey, array $sourceLinks, string $so
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title><?php echo $text['blog_title']; ?> - <?php echo $text['name']; ?></title>
|
<title><?php echo $text['blog_title']; ?> - <?php echo $text['name']; ?></title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="<?php echo asset_url('styles.css'); ?>">
|
||||||
</head>
|
</head>
|
||||||
<body class="theme-dark">
|
<body class="theme-dark">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ $recruiterKeys = [
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>CV - <?php echo $text['name']; ?></title>
|
<title>CV - <?php echo $text['name']; ?></title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="<?php echo asset_url('styles.css'); ?>">
|
||||||
</head>
|
</head>
|
||||||
<body class="cv-page theme-dark">
|
<body class="cv-page theme-dark">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ $demoCards = [
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title><?php echo $text['demos_title']; ?> - <?php echo $text['name']; ?></title>
|
<title><?php echo $text['demos_title']; ?> - <?php echo $text['name']; ?></title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="<?php echo asset_url('styles.css'); ?>">
|
||||||
</head>
|
</head>
|
||||||
<body class="theme-dark">
|
<body class="theme-dark">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ $blogHref = 'blog.php?lang=' . urlencode($lang);
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title><?php echo $text['tree_title']; ?> - <?php echo $text['name']; ?></title>
|
<title><?php echo $text['tree_title']; ?> - <?php echo $text['name']; ?></title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="<?php echo asset_url('styles.css'); ?>">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ $homeProofCards = [
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title><?php echo $text['name']; ?></title>
|
<title><?php echo $text['name']; ?></title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="<?php echo asset_url('styles.css'); ?>">
|
||||||
</head>
|
</head>
|
||||||
<body class="home-page theme-dark">
|
<body class="home-page theme-dark">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,12 @@ function loadRuntimeTranslations(string $file, array $base): array {
|
||||||
return $translations;
|
return $translations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function asset_url(string $path): string {
|
||||||
|
$fullPath = __DIR__ . '/' . ltrim($path, '/');
|
||||||
|
$version = is_file($fullPath) ? (string) filemtime($fullPath) : '1';
|
||||||
|
return htmlspecialchars($path . '?v=' . $version);
|
||||||
|
}
|
||||||
|
|
||||||
$lang = getLang($availableLangs);
|
$lang = getLang($availableLangs);
|
||||||
|
|
||||||
$en = include "$staticLangDir/en.php";
|
$en = include "$staticLangDir/en.php";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue