91 lines
3.3 KiB
Text
91 lines
3.3 KiB
Text
<!DOCTYPE html>
|
|
<html lang="en" data-theme="light">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes, viewport-fit=cover"
|
|
/>
|
|
<meta name="csrf-token" content={get_csrf_token()} />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta name="theme-color" content="#6366f1" />
|
|
<meta name="format-detection" content="telephone=no" />
|
|
<meta name="referrer" content="origin" />
|
|
<script>
|
|
(function() {
|
|
try {
|
|
var theme = (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) || 'auto';
|
|
if(theme === 'auto') {
|
|
if(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
document.documentElement.setAttribute('data-theme', 'dark');
|
|
} else {
|
|
document.documentElement.setAttribute('data-theme', 'light');
|
|
}
|
|
} else {
|
|
document.documentElement.setAttribute('data-theme', theme);
|
|
}
|
|
} catch(e) {
|
|
document.documentElement.setAttribute('data-theme', 'light');
|
|
}
|
|
})();
|
|
</script>
|
|
<.live_title suffix=" · aprs.me">
|
|
{assigns[:page_title] || "Aprs"}
|
|
</.live_title>
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/app.css"} />
|
|
|
|
<!-- Minimal vendor CSS -->
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/vendor/css/minimal-bundle.css"} />
|
|
|
|
<!-- Core utilities - always loaded -->
|
|
<script phx-track-static src={~p"/assets/vendor/js/core-bundle.js"}>
|
|
</script>
|
|
|
|
<!-- Conditional loading based on page type -->
|
|
<script>
|
|
window.VendorLoader = {
|
|
mapBundleUrl: '/assets/vendor/js/map-bundle.js',
|
|
chartBundleUrl: '/assets/vendor/js/chart-bundle.js',
|
|
dateAdapterUrl: '/assets/vendor/js/date-adapter.js',
|
|
|
|
loadMap: function() {
|
|
if (!window.mapBundleLoaded) {
|
|
const script = document.createElement('script');
|
|
script.src = this.mapBundleUrl;
|
|
script.onload = () => window.mapBundleLoaded = true;
|
|
document.head.appendChild(script);
|
|
}
|
|
},
|
|
|
|
loadCharts: function() {
|
|
if (!window.chartBundleLoaded) {
|
|
const chartScript = document.createElement('script');
|
|
chartScript.src = this.chartBundleUrl;
|
|
chartScript.onload = () => {
|
|
window.chartBundleLoaded = true;
|
|
// Date adapter is now included in the chart bundle
|
|
};
|
|
document.head.appendChild(chartScript);
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<!-- App scripts -->
|
|
<script phx-track-static type="text/javascript" src={~p"/assets/app.js"}>
|
|
</script>
|
|
|
|
<!-- Privacy-friendly analytics by Plausible -->
|
|
<script async src="https://a.w5isp.com/js/pa-7BkaTcdFcxr5y-7yhqhlJ.js">
|
|
</script>
|
|
<script>
|
|
window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
|
|
plausible.init()
|
|
</script>
|
|
</head>
|
|
<body class={body_class(assigns)}>
|
|
{@inner_content}
|
|
</body>
|
|
</html>
|