Use SYSTEM_VERSION for footer display and cache busting
- Single SYSTEM_VERSION variable (currently 2.1) - Footer shows 'SYSTEM V2.1' dynamically - Same version used for CSS/JS cache busting - Just update SYSTEM_VERSION to change both
This commit is contained in:
+12
-5
@@ -8,10 +8,17 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap" rel="stylesheet">
|
||||
<script>
|
||||
// Cache buster version - update this number to force reload
|
||||
const ASSET_VERSION = '5';
|
||||
// System version - used for cache busting AND footer display
|
||||
// Update this to force cache refresh and show new version
|
||||
const SYSTEM_VERSION = '2.1';
|
||||
|
||||
// Display version in footer
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const versionEl = document.getElementById('systemVersion');
|
||||
if (versionEl) versionEl.textContent = 'SYSTEM V' + SYSTEM_VERSION;
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="css/style.css" onload="this.href='css/style.css?v='+ASSET_VERSION">
|
||||
<link rel="stylesheet" href="css/style.css" onload="this.href='css/style.css?v='+SYSTEM_VERSION">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Mobile Menu Toggle -->
|
||||
@@ -592,7 +599,7 @@
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<p>ENDFIELD OPERATOR DATABASE // <span style="color: var(--cyan);">SYSTEM V2.0</span> // <span style="color: #39ff14;">ONLINE</span></p>
|
||||
<p>ENDFIELD OPERATOR DATABASE // <span id="systemVersion" style="color: var(--cyan);">SYSTEM V2.0</span> // <span style="color: #39ff14;">ONLINE</span></p>
|
||||
<p style="margin-top: 10px; font-size: 10px; opacity: 0.5;">Images from Endfield Wiki • Official Game Assets</p>
|
||||
</footer>
|
||||
|
||||
@@ -607,6 +614,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/main.js" onload="this.src='js/main.js?v='+ASSET_VERSION"></script>
|
||||
<script src="js/main.js" onload="this.src='js/main.js?v='+SYSTEM_VERSION"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user