update frontend

This commit is contained in:
Your Name 2025-12-21 19:02:04 -05:00
parent 352c5db328
commit af7262868c
6 changed files with 76 additions and 21 deletions

View File

@ -1,27 +1,42 @@
<!doctype html>
<html lang="en">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SocioWire</title>
<!-- PWA -->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<meta name="theme-color" content="#0ea5e9" />
<meta name="description" content="SocioWire - Wired to life. Local news, events, market deals & friends on map." />
<!-- Open Graph pour partage Facebook/Twitter -->
<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." />
<meta property="og:image" content="%PUBLIC_URL%/icons/social-share.jpg" />
<meta property="og:url" content="https://sociowire.com" />
<meta property="og:type" content="website" />
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="SocioWire.com" />
<meta name="twitter:description" content="Wired to life. Local news, events, market deals & friends on map." />
<meta name="twitter:image" content="%PUBLIC_URL%/icons/social-share.jpg" />
<!-- Apple touch icon -->
<link rel="apple-touch-icon" href="%PUBLIC_URL%/icons/icon-192x192.png" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#0ea5e9" />
<meta name="description" content="SocioWire - Wired to life. Discover local news, events, market deals and friends on the map." />
<!-- Favicon -->
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/icons/apple-touch-icon.png" />
<!-- PWA Manifest -->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!-- Open Graph (Facebook, LinkedIn) -->
<meta property="og:title" content="SocioWire.com - Wired to life" />
<meta property="og:description" content="Local news, events, market deals & friends on the map." />
<meta property="og:image" content="%PUBLIC_URL%/icons/og-image.png" />
<meta property="og:url" content="https://sociowire.com" />
<meta property="og:type" content="website" />
<!-- 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>
<body>
<div id="root"></div>
</body>
</html>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>

BIN
public/favicon.ico Normal file

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

View File

@ -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"
}

23
public/service-worker.js Normal file
View File

@ -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);
})
);
});

View File

@ -25,3 +25,14 @@ ReactDOM.createRoot(document.getElementById("root")).render(
</AuthProvider>
</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));
});
}