78 lines
2.8 KiB
PHP
78 lines
2.8 KiB
PHP
<?php
|
|
/**
|
|
* MobileApp PWA View Template
|
|
*
|
|
* Main shell for the unified Mobile App.
|
|
* Vue handles internal navigation between modules.
|
|
*/
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
|
<title>Xinon Mobile</title>
|
|
<link rel="shortcut icon" href="/assets/images/favicon.ico">
|
|
|
|
<!-- PWA Configuration -->
|
|
<link rel="manifest" href="/mobile/manifest.json">
|
|
<meta name="theme-color" content="#005384">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="apple-mobile-web-app-title" content="Xinon">
|
|
|
|
<!-- External Libraries (CDN) -->
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/vue@3.4.27/dist/vue.global.prod.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/axios@1.7.2/dist/axios.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/html5-qrcode@2.3.8/html5-qrcode.min.js"></script>
|
|
|
|
<!-- Shared Styles -->
|
|
<link rel="stylesheet" href="/mobile/shared/base.css">
|
|
|
|
<!-- App Configuration -->
|
|
<script>
|
|
window.TT_CONFIG = <?= json_encode($JSGlobals ?? []) ?>;
|
|
|
|
// Tailwind configuration
|
|
tailwind.config = {
|
|
darkMode: 'class',
|
|
theme: {
|
|
extend: {
|
|
colors: {
|
|
'primary': '#005384',
|
|
'secondary': '#fac41b',
|
|
},
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
</head>
|
|
<body class="transition-colors duration-300 overflow-hidden">
|
|
<div id="app" class="h-screen w-screen overflow-hidden antialiased">
|
|
<!-- Loading state while Vue initializes -->
|
|
<div class="flex items-center justify-center h-full bg-slate-100 dark:bg-slate-900">
|
|
<div class="text-center">
|
|
<img src="/assets/images/xinon-full-transparent.png" class="h-12 mx-auto mb-4 dark:hidden">
|
|
<img src="/assets/images/xinon-full-transparent-white.png" class="h-12 mx-auto mb-4 hidden dark:block">
|
|
<div class="animate-pulse text-slate-500 dark:text-slate-400">Lädt...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Load Vue app as ES module -->
|
|
<script type="module" src="/mobile/app.js"></script>
|
|
|
|
<!-- Register Service Worker -->
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
window.addEventListener('load', () => {
|
|
navigator.serviceWorker.register('/mobile/sw.js')
|
|
.then(reg => console.log('SW registered:', reg.scope))
|
|
.catch(err => console.log('SW registration failed:', err));
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|