diff --git a/index.html b/index.html index dadbb46..705ecc2 100644 --- a/index.html +++ b/index.html @@ -1,27 +1,42 @@ + + + - - - SocioWire - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + SocioWire.com - Wired to life + +
+ + +
diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..30be719 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/icons/favicon.ico b/public/icons/favicon.ico index 9fdb9e2..30be719 100644 Binary files a/public/icons/favicon.ico and b/public/icons/favicon.ico differ diff --git a/public/manifest.json b/public/manifest.json index 36ecfcd..3e7d913 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -11,11 +11,17 @@ "src": "icons/icon-512x512.png", "type": "image/png", "sizes": "512x512" + }, + { + "src": "icons/icon-192x192.png", + "type": "image/png", + "sizes": "any" } ], "start_url": "/", "display": "standalone", "theme_color": "#0ea5e9", "background_color": "#050816", - "description": "SocioWire - Local news, events, market deals & friends on map" + "description": "SocioWire - Local news, events, market deals & friends on map", + "orientation": "portrait" } \ No newline at end of file diff --git a/public/service-worker.js b/public/service-worker.js new file mode 100644 index 0000000..2d11506 --- /dev/null +++ b/public/service-worker.js @@ -0,0 +1,23 @@ +// public/service-worker.js +self.addEventListener('install', event => { + event.waitUntil( + caches.open('sociowire-v1').then(cache => { + return cache.addAll([ + '/', + '/index.html', + '/icons/icon-192x192.png', + '/icons/icon-512x512.png', + '/icons/apple-touch-icon.png', + '/icons/og-image.png' + ]); + }) + ); +}); + +self.addEventListener('fetch', event => { + event.respondWith( + caches.match(event.request).then(response => { + return response || fetch(event.request); + }) + ); +}); \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx index df437e5..3b7a94a 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -25,3 +25,14 @@ ReactDOM.createRoot(document.getElementById("root")).render( ); + +// ... ton render actuel ... + +// Ajoute à la fin +if ('serviceWorker' in navigator) { + window.addEventListener('load', () => { + navigator.serviceWorker.register('/service-worker.js') + .then(reg => console.log('Service Worker registered')) + .catch(err => console.log('Service Worker registration failed:', err)); + }); +} \ No newline at end of file