fix: cache-busting CSS URL + named function init for map/charts
All checks were successful
Deploy Internet for Kids / Build & Push (push) Successful in 14s
Deploy Internet for Kids / Deploy (push) Successful in 5s
Deploy Internet for Kids / Health Check (push) Successful in 1s
Deploy Internet for Kids / Smoke Tests (push) Successful in 2s
Deploy Internet for Kids / IndexNow Ping (push) Successful in 7s
Deploy Internet for Kids / Promote to Latest (push) Successful in 2s
Deploy Internet for Kids / Rollback (push) Has been skipped
Deploy Internet for Kids / Audit (push) Successful in 1s

CSS link now includes ?v=timestamp to bust browser cache.
Map/charts use named functions instead of IIFEs (minifier safe).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-04-03 15:25:11 +03:00
parent 9a86cf6383
commit da29dbc8bc
3 changed files with 9 additions and 7 deletions

View File

@@ -11,7 +11,7 @@
{{ partial "extend-head.html" . }} {{ partial "extend-head.html" . }}
{{/* Main stylesheet with Newsreader + custom colors */}} {{/* Main stylesheet with Newsreader + custom colors */}}
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}"> <link rel="stylesheet" href="{{ "css/main.css" | relURL }}?v={{ now.Unix }}">
</head> </head>
<body style="background-color:var(--ifk-bg);color:var(--ifk-text)"> <body style="background-color:var(--ifk-bg);color:var(--ifk-text)">
<header style="border-bottom:1px solid #e5e7eb;background:white;position:sticky;top:0;z-index:40"> <header style="border-bottom:1px solid #e5e7eb;background:white;position:sticky;top:0;z-index:40">

View File

@@ -36,8 +36,8 @@
<script src="{{ "js/chart.umd.min.js" | relURL }}"></script> <script src="{{ "js/chart.umd.min.js" | relURL }}"></script>
<script> <script>
(function initCharts() { function ifkInitCharts() {
if (typeof Chart === 'undefined') { setTimeout(initCharts, 100); return; } if (typeof Chart === 'undefined') { setTimeout(ifkInitCharts, 100); return; }
var LANG = "{{ $lang }}"; var LANG = "{{ $lang }}";
var countries = {{ $countries | jsonify }}; var countries = {{ $countries | jsonify }};
@@ -121,5 +121,6 @@
plugins: { legend: { position: 'bottom', labels: { padding: 16, usePointStyle: true } } } plugins: { legend: { position: 'bottom', labels: { padding: 16, usePointStyle: true } } }
} }
}); });
})(); }
ifkInitCharts();
</script> </script>

View File

@@ -34,9 +34,9 @@
<script src="{{ "js/maplibre-gl.min.js" | relURL }}"></script> <script src="{{ "js/maplibre-gl.min.js" | relURL }}"></script>
<script src="{{ "js/topojson-client.min.js" | relURL }}"></script> <script src="{{ "js/topojson-client.min.js" | relURL }}"></script>
<script> <script>
(function initMap() { function ifkInitMap() {
if (typeof maplibregl === 'undefined' || typeof topojson === 'undefined') { if (typeof maplibregl === 'undefined' || typeof topojson === 'undefined') {
setTimeout(initMap, 100); setTimeout(ifkInitMap, 100);
return; return;
} }
var LANG = "{{ $lang }}"; var LANG = "{{ $lang }}";
@@ -127,5 +127,6 @@
}); });
}); });
}); });
})(); }
ifkInitMap();
</script> </script>