update frontend
This commit is contained in:
parent
352c5db328
commit
af7262868c
55
index.html
55
index.html
|
|
@ -1,27 +1,42 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>SocioWire</title>
|
<meta name="theme-color" content="#0ea5e9" />
|
||||||
<!-- PWA -->
|
<meta name="description" content="SocioWire - Wired to life. Discover local news, events, market deals and friends on the map." />
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
||||||
<meta name="theme-color" content="#0ea5e9" />
|
<!-- Favicon -->
|
||||||
<meta name="description" content="SocioWire - Wired to life. Local news, events, market deals & friends on map." />
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
<!-- Open Graph pour partage Facebook/Twitter -->
|
<link rel="apple-touch-icon" href="%PUBLIC_URL%/icons/apple-touch-icon.png" />
|
||||||
<meta property="og:title" content="SocioWire.com" />
|
|
||||||
<meta property="og:description" content="Wired to life. Discover local news, events, market deals and friends on the map." />
|
<!-- PWA Manifest -->
|
||||||
<meta property="og:image" content="%PUBLIC_URL%/icons/social-share.jpg" />
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||||
<meta property="og:url" content="https://sociowire.com" />
|
|
||||||
<meta property="og:type" content="website" />
|
<!-- Open Graph (Facebook, LinkedIn) -->
|
||||||
<!-- Twitter Card -->
|
<meta property="og:title" content="SocioWire.com - Wired to life" />
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta property="og:description" content="Local news, events, market deals & friends on the map." />
|
||||||
<meta name="twitter:title" content="SocioWire.com" />
|
<meta property="og:image" content="%PUBLIC_URL%/icons/og-image.png" />
|
||||||
<meta name="twitter:description" content="Wired to life. Local news, events, market deals & friends on map." />
|
<meta property="og:url" content="https://sociowire.com" />
|
||||||
<meta name="twitter:image" content="%PUBLIC_URL%/icons/social-share.jpg" />
|
<meta property="og:type" content="website" />
|
||||||
<!-- Apple touch icon -->
|
|
||||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/icons/icon-192x192.png" />
|
<!-- Twitter Card -->
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
<meta name="twitter:title" content="SocioWire.com - Wired to life" />
|
||||||
|
<meta name="twitter:description" content="Local news, events, market deals & friends on the map." />
|
||||||
|
<meta name="twitter:image" content="%PUBLIC_URL%/icons/og-image.png" />
|
||||||
|
|
||||||
|
<!-- Titre -->
|
||||||
|
<title>SocioWire.com - Wired to life</title>
|
||||||
</head>
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="root"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/src/main.jsx"></script>
|
<script type="module" src="/src/main.jsx"></script>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 17 KiB |
|
|
@ -11,11 +11,17 @@
|
||||||
"src": "icons/icon-512x512.png",
|
"src": "icons/icon-512x512.png",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"sizes": "512x512"
|
"sizes": "512x512"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "icons/icon-192x192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "any"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start_url": "/",
|
"start_url": "/",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"theme_color": "#0ea5e9",
|
"theme_color": "#0ea5e9",
|
||||||
"background_color": "#050816",
|
"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"
|
||||||
}
|
}
|
||||||
|
|
@ -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);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
11
src/main.jsx
11
src/main.jsx
|
|
@ -25,3 +25,14 @@ ReactDOM.createRoot(document.getElementById("root")).render(
|
||||||
</AuthProvider>
|
</AuthProvider>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// ... 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));
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue