mirror of
https://github.com/shadoll/sLogos.git
synced 2025-12-20 02:26:05 +00:00
- Implemented service worker registration in main.js - Added icons for PWA in manifest.json - Created a basic service worker (sw.js) for caching static assets - Generated a list of files to cache using a Node.js script (generate-pwa-cache-list.js) - Added icon images (icon-192.png and icon-512.png) for PWA - Defined PWA manifest with app details and icon references
35 lines
1.1 KiB
HTML
35 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Logo Gallery</title>
|
|
<link rel="stylesheet" href="global.css">
|
|
<link rel="stylesheet" href="build/bundle.css">
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" href="favicon.svg" type="image/svg+xml">
|
|
<link rel="icon" href="favicon.png" sizes="32x32">
|
|
<link rel="icon" href="favicon.ico" sizes="any">
|
|
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
|
|
|
<!-- Manifest and theme color for PWA -->
|
|
<link rel="manifest" href="/manifest.json">
|
|
<meta name="theme-color" content="#ffffff">
|
|
<!-- To test PWA in Safari: Open Web Inspector > Storage tab. You should see 'Service Workers' and 'Manifest'. -->
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
if ('serviceWorker' in navigator) {
|
|
navigator.serviceWorker.register('/sw.js').then(function(reg) {
|
|
console.log('Service worker registered.', reg);
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script src="build/bundle.js"></script>
|
|
</body>
|
|
</html>
|