- Configuration Next.js 14 avec TypeScript et Tailwind CSS - Navigation mobile avec 4 onglets (Accueil, Explorer, Mana Tracker, Infos) - Page Accueil: WiFi card, widget météo, message gérant - Page Explorer: Lieux de Fakarava (plages, restaurants, épiceries) avec Google Maps - Page Mana Tracker: Marées, lever/coucher soleil, réservations excursions, notifications push - Page Infos Pratiques: FAQ par thèmes, lexique tahitien, section contact - PWA complète: manifest, service worker, cache offline - Design Tropical Chic: palette bleu lagon (#0E7490), vert citron (#ECFCCB) - Configuration Docker pour déploiement - Données spécifiques à Fakarava intégrées - Logo Relais Marama intégré - Serveur configuré pour accès réseau local (mobile)
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
"use client";
|
||
|
||
import { useState, useEffect } from "react";
|
||
|
||
interface LogoProps {
|
||
size?: number;
|
||
className?: string;
|
||
}
|
||
|
||
export default function Logo({ size = 120, className = "" }: LogoProps) {
|
||
const [imageError, setImageError] = useState(false);
|
||
const [imageLoaded, setImageLoaded] = useState(false);
|
||
|
||
useEffect(() => {
|
||
const img = new window.Image();
|
||
img.onload = () => setImageLoaded(true);
|
||
img.onerror = () => setImageError(true);
|
||
img.src = "/logo-relais-marama.png";
|
||
}, []);
|
||
|
||
if (imageError || !imageLoaded) {
|
||
return (
|
||
<div className={`flex items-center justify-center ${className}`}>
|
||
<div
|
||
className="bg-gradient-to-br from-primary/20 to-secondary rounded-full flex flex-col items-center justify-center text-primary font-bold border-2 border-primary/30"
|
||
style={{ width: size, height: size }}
|
||
>
|
||
<span className="text-2xl mb-1">🏝️</span>
|
||
<span style={{ fontSize: size * 0.2 }}>Relais</span>
|
||
<span style={{ fontSize: size * 0.15 }}>Marama</span>
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|
||
|
||
return (
|
||
<div className={`flex items-center justify-center ${className}`}>
|
||
<img
|
||
src="/logo-relais-marama.png"
|
||
alt="Relais Marama - Fakarava"
|
||
width={size}
|
||
height={size}
|
||
className="object-contain"
|
||
style={{ maxWidth: `${size}px`, maxHeight: `${size}px` }}
|
||
/>
|
||
</div>
|
||
);
|
||
}
|
||
|