30 lines
1.0 KiB
HTML
30 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
<meta name="theme-color" content="#1a1a2e" />
|
|
<link rel="manifest" href="/manifest.json" />
|
|
<title>Diet Coach</title>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.jsx"></script>
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
navigator.serviceWorker.register('/sw.js').then(reg => {
|
|
reg.addEventListener('updatefound', () => {
|
|
const sw = reg.installing;
|
|
sw.addEventListener('statechange', () => {
|
|
if (sw.state === 'activated') window.location.reload();
|
|
});
|
|
});
|
|
setInterval(() => reg.update(), 60000);
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|