commit 49fd31f4dbfb832f6e9af98f0ffb0af4cc22d684 Author: Puechberty Arthur Date: Mon Mar 30 23:07:36 2026 +0200 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c22bdd --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files (can opt-in for committing if needed) +.env* + +# vercel +.vercel + +# local editor settings (can contain infrastructure details) +.vscode/ + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/README.md b/README.md new file mode 100644 index 0000000..4290da0 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# Moon + +Application web sur les phases de la lune, avec calendrier lunaire, simulateur, visualisation 3D et contenus éducatifs. + +Site en ligne: [moon.arthurp.fr](https://moon.arthurp.fr) + +## Aperçu + +Moon est un projet Next.js orienté SEO et performance qui propose: + +- calendrier lunaire avec dates et heures des phases +- noms traditionnels des pleines lunes +- simulateur de phase selon une date choisie +- visualisation 3D de la lune +- carte de visibilité mondiale +- infographies sur les cycles lunaires +- quiz interactif +- export PDF du calendrier +- interface multilingue (11 langues) + +Pour en savoir plus, consulte aussi la page principale: [Moon phases and lunar calendar](https://moon.arthurp.fr). + +## Stack technique + +- Next.js 16 (App Router) +- React 19 +- TypeScript +- Tailwind CSS +- Three.js + +## Lancement en local + +Prérequis: + +- Node.js 20+ +- npm + +Installation et démarrage: + +```bash +npm install +npm run dev +``` + +Application disponible sur [http://localhost:3000](http://localhost:3000). + +## Scripts utiles + +```bash +npm run dev # développement +npm run lint # linting +npm run build # build de production +npm run start # run du build en local +``` + +## Déploiement GitHub (checklist) + +Avant push/publication: + +- vérifier que les fichiers locaux sensibles ne sont pas versionnés (`.env*`, `.vscode/`, `node_modules/`, `.next/`) +- relancer `npm run lint` +- relancer `npm run build` +- vérifier les metadata et URL canoniques de production + +## Backlinks + +Si tu utilises ce repo comme référence, ajoute un lien vers le site public: + +- [https://moon.arthurp.fr](https://moon.arthurp.fr) + +Exemple d'ancre SEO: + +- [calendrier lunaire interactif](https://moon.arthurp.fr) + +## Licence + +Projet privé pour le moment (`private: true` dans `package.json`). diff --git a/app/apple-icon.tsx b/app/apple-icon.tsx new file mode 100644 index 0000000..b3182af --- /dev/null +++ b/app/apple-icon.tsx @@ -0,0 +1,30 @@ +import { ImageResponse } from 'next/og'; + +export const size = { + width: 180, + height: 180, +}; +export const contentType = 'image/png'; + +export default function AppleIcon() { + return new ImageResponse( + ( +
+ 🌕 +
+ ), + { + ...size, + } + ); +} diff --git a/app/favicon.ico b/app/favicon.ico new file mode 100644 index 0000000..718d6fe Binary files /dev/null and b/app/favicon.ico differ diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 0000000..78b3777 --- /dev/null +++ b/app/globals.css @@ -0,0 +1,390 @@ +@import "tailwindcss"; + +:root { + --background: #0a0a1a; + --foreground: #e8e8f0; + --accent: #6366f1; + --accent-light: #818cf8; + --card-bg: rgba(15, 15, 35, 0.8); + --card-border: rgba(99, 102, 241, 0.2); + --glow: rgba(99, 102, 241, 0.15); +} + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-accent: var(--accent); + --color-accent-light: var(--accent-light); + --font-sans: var(--font-geist-sans); + --font-mono: var(--font-geist-mono); +} + +/* Gradient text utilities (bg-linear-to-r not generating CSS in this setup) */ +.gradient-text-hero { + background-image: linear-gradient(to right, #ffffff, #c7d2fe, #d8b4fe); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} +.gradient-text-brand { + background-image: linear-gradient(to right, #ffffff, #a5b4fc); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} +.gradient-bar-illumination { + background-image: linear-gradient(to right, #818cf8, #fde047); +} +.gradient-radial-glow { + background-image: radial-gradient(circle, rgba(254, 240, 138, 0.1), rgba(99, 102, 241, 0.05), transparent); +} + +* { + box-sizing: border-box; +} + +html { + scroll-behavior: smooth; +} + +body { + background: var(--background); + color: var(--foreground); + font-family: var(--font-sans, system-ui, -apple-system, sans-serif); + min-height: 100vh; + overflow-x: hidden; +} + +/* Dynamic Moon Background */ +.moon-bg { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; + overflow: hidden; +} + +.moon-bg::before { + content: ''; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%), + radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%), + radial-gradient(ellipse at 50% 50%, rgba(30, 27, 75, 0.3) 0%, transparent 70%); + animation: nebula 60s ease-in-out infinite alternate; +} + +.moon-bg .stars { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image: + radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8), transparent), + radial-gradient(1px 1px at 30% 40%, rgba(255,255,255,0.6), transparent), + radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.7), transparent), + radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.5), transparent), + radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,0.9), transparent), + radial-gradient(1px 1px at 15% 70%, rgba(255,255,255,0.4), transparent), + radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.6), transparent), + radial-gradient(1px 1px at 60% 90%, rgba(255,255,255,0.5), transparent), + radial-gradient(1px 1px at 80% 15%, rgba(255,255,255,0.7), transparent), + radial-gradient(2px 2px at 25% 55%, rgba(255,255,255,0.3), transparent), + radial-gradient(1px 1px at 5% 45%, rgba(255,255,255,0.6), transparent), + radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.4), transparent), + radial-gradient(1px 1px at 45% 35%, rgba(255,255,255,0.5), transparent), + radial-gradient(2px 2px at 95% 5%, rgba(255,255,255,0.3), transparent), + radial-gradient(1px 1px at 55% 65%, rgba(255,255,255,0.7), transparent); + animation: twinkle 8s ease-in-out infinite alternate; +} + +@keyframes nebula { + 0% { transform: rotate(0deg) scale(1); } + 100% { transform: rotate(3deg) scale(1.02); } +} + +@keyframes twinkle { + 0% { opacity: 0.7; } + 50% { opacity: 1; } + 100% { opacity: 0.8; } +} + +/* Glass card effect */ +.glass-card { + background: var(--card-bg); + backdrop-filter: blur(20px); + border: 1px solid var(--card-border); + border-radius: 1rem; + transition: all 0.3s ease; +} + +.glass-card:hover { + border-color: rgba(99, 102, 241, 0.4); + box-shadow: 0 0 30px var(--glow); +} + +/* Section styling */ +.section-container { + max-width: 1280px; + margin: 0 auto; + padding: 4rem 1.5rem; +} + +@media (min-width: 768px) { + .section-container { + padding: 6rem 2rem; + } +} + +.section-title { + font-size: 2rem; + font-weight: 700; + background: linear-gradient(135deg, #e8e8f0, #818cf8); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + margin-bottom: 0.5rem; +} + +@media (min-width: 768px) { + .section-title { + font-size: 2.5rem; + } +} + +.section-subtitle { + color: rgba(232, 232, 240, 0.6); + font-size: 1rem; + max-width: 600px; + line-height: 1.6; +} + +/* Glow button */ +.glow-btn { + background: linear-gradient(135deg, #6366f1, #8b5cf6); + color: white; + border: none; + padding: 0.75rem 2rem; + border-radius: 9999px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s ease; + box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); +} + +.glow-btn:hover { + box-shadow: 0 0 40px rgba(99, 102, 241, 0.5); + transform: translateY(-2px); +} + +/* Countdown */ +.countdown-box { + display: flex; + flex-direction: column; + align-items: center; + min-width: 60px; + padding: 0.75rem; + background: rgba(99, 102, 241, 0.1); + border: 1px solid rgba(99, 102, 241, 0.3); + border-radius: 0.75rem; +} + +@media (min-width: 640px) { + .countdown-box { + min-width: 70px; + padding: 1rem; + } +} + +.countdown-number { + font-size: 1.5rem; + font-weight: 700; + color: #818cf8; + font-variant-numeric: tabular-nums; +} + +@media (min-width: 640px) { + .countdown-number { + font-size: 2rem; + } +} + +.countdown-label { + font-size: 0.75rem; + color: rgba(232, 232, 240, 0.5); + text-transform: uppercase; + letter-spacing: 0.05em; +} + +/* Nav */ +.nav-link { + color: rgba(232, 232, 240, 0.7); + text-decoration: none; + font-size: 0.875rem; + font-weight: 500; + padding: 0.5rem 1rem; + border-radius: 9999px; + transition: all 0.2s ease; +} + +.nav-link:hover, .nav-link.active { + color: #818cf8; + background: rgba(99, 102, 241, 0.1); +} + +/* Scrollbar */ +::-webkit-scrollbar { + width: 8px; +} + +::-webkit-scrollbar-track { + background: #0a0a1a; +} + +::-webkit-scrollbar-thumb { + background: rgba(99, 102, 241, 0.3); + border-radius: 4px; +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(99, 102, 241, 0.5); +} + +/* Phase badges */ +.phase-badge { + display: inline-flex; + align-items: center; + gap: 0.5rem; + padding: 0.5rem 1rem; + border-radius: 9999px; + font-size: 0.8rem; + font-weight: 500; +} + +.phase-badge.full_moon { + background: rgba(251, 191, 36, 0.15); + color: #fbbf24; + border: 1px solid rgba(251, 191, 36, 0.3); +} + +.phase-badge.new_moon { + background: rgba(148, 163, 184, 0.15); + color: #94a3b8; + border: 1px solid rgba(148, 163, 184, 0.3); +} + +.phase-badge.first_quarter { + background: rgba(34, 197, 94, 0.15); + color: #22c55e; + border: 1px solid rgba(34, 197, 94, 0.3); +} + +.phase-badge.last_quarter { + background: rgba(168, 85, 247, 0.15); + color: #a855f7; + border: 1px solid rgba(168, 85, 247, 0.3); +} + +/* Quiz */ +.quiz-option { + padding: 1rem 1.5rem; + border: 1px solid var(--card-border); + border-radius: 0.75rem; + cursor: pointer; + transition: all 0.2s ease; + background: var(--card-bg); +} + +.quiz-option:hover { + border-color: rgba(99, 102, 241, 0.5); + background: rgba(99, 102, 241, 0.1); +} + +.quiz-option.correct { + border-color: #22c55e; + background: rgba(34, 197, 94, 0.15); +} + +.quiz-option.wrong { + border-color: #ef4444; + background: rgba(239, 68, 68, 0.15); +} + +/* Mobile nav */ +.mobile-nav { + position: fixed; + bottom: 0; + left: 0; + right: 0; + z-index: 50; + background: rgba(10, 10, 26, 0.95); + backdrop-filter: blur(20px); + border-top: 1px solid var(--card-border); + padding: 0.5rem; + display: flex; + justify-content: space-around; +} + +@media (min-width: 768px) { + .mobile-nav { + display: none; + } +} + +/* Give body extra padding on mobile for bottom nav */ +main { + padding-bottom: 4rem; +} + +@media (min-width: 768px) { + main { + padding-bottom: 0; + } +} + +/* RTL support */ +[dir="rtl"] { + text-align: right; +} + +/* Performance: reduce paint on heavy sections */ +.section-container { + contain: content; +} + +/* Reduce motion for accessibility */ +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } +} + +/* Focus-visible for keyboard navigation */ +:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; +} + +/* Print styles */ +@media print { + .moon-bg, .stars, header, footer, nav, .mobile-nav { + display: none !important; + } + body { + background: white !important; + color: black !important; + } + section { + break-inside: avoid; + page-break-inside: avoid; + } +} diff --git a/app/icon.tsx b/app/icon.tsx new file mode 100644 index 0000000..830978c --- /dev/null +++ b/app/icon.tsx @@ -0,0 +1,30 @@ +import { ImageResponse } from 'next/og'; + +export const size = { + width: 512, + height: 512, +}; +export const contentType = 'image/png'; + +export default function Icon() { + return new ImageResponse( + ( +
+ 🌕 +
+ ), + { + ...size, + } + ); +} diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..8dbb85f --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,203 @@ +import type { Metadata, Viewport } from "next"; +import { Geist, Geist_Mono } from "next/font/google"; +import "./globals.css"; +import { LocaleProvider } from "@/components/LocaleProvider"; + +const geistSans = Geist({ + variable: "--font-geist-sans", + subsets: ["latin"], + display: "swap", +}); + +const geistMono = Geist_Mono({ + variable: "--font-geist-mono", + subsets: ["latin"], + display: "swap", +}); + +const SITE_URL = "https://moon.arthurp.fr"; +const SITE_NAME = "Moon Phases"; +const SITE_DESCRIPTION = "Complete guide to moon phases: lunar calendar 2026 with exact times, traditional full moon names & origins, interactive phase simulator, 3D moon visualization, world visibility map, tidal infographics, moon quiz, and downloadable PDF calendar. Available in 11 languages."; + +export const viewport: Viewport = { + width: "device-width", + initialScale: 1, + themeColor: "#0a0a1a", + colorScheme: "dark", +}; + +export const metadata: Metadata = { + metadataBase: new URL(SITE_URL), + applicationName: SITE_NAME, + title: { + default: "Moon Phases 2026 | Full Moon Calendar, Lunar Simulator & 3D Moon", + template: "%s | Moon Phases", + }, + description: SITE_DESCRIPTION, + keywords: [ + "full moon 2026", "lunar calendar 2026", "moon phases", "next full moon", + "new moon", "first quarter moon", "last quarter moon", "moon phase today", + "moon simulator", "3D moon", "lunar cycle", "moon visibility map", + "harvest moon", "wolf moon", "blood moon", "supermoon", "blue moon", + "tides and moon", "moon gardening", "moon photography", + "astronomy", "lunar eclipse", "moon calendar PDF", + "pleine lune 2026", "calendrier lunaire", "phases de la lune", + "pleine lune eclipse lunaire", + "pleine lune mars", + "lune rouge", + "pleine lune", + "eclipse lunaire ", + "lune de sang", + "lune rouge heure", + "pleine lune", + "lune de sang", + "eclipse lunaire", + "lune", + "pleine lune mars", + "lune de sang", + "a quelle heure la lune de sang", + "date pleine lune mars", + "lune", + "lune rouge heure", + "la lune rouge", + "lune rouge heure", + "prochaine pleine lune", + "horoscope", + "semaine", + ], + authors: [{ name: SITE_NAME, url: SITE_URL }], + creator: SITE_NAME, + publisher: SITE_NAME, + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + "max-video-preview": -1, + "max-image-preview": "large", + "max-snippet": -1, + }, + }, + alternates: { + canonical: SITE_URL, + }, + openGraph: { + type: "website", + locale: "en_US", + url: SITE_URL, + title: "Moon Phases 2026 — Full Moon Calendar, Lunar Simulator & Interactive 3D Moon", + description: "Explore moon phases, full moon traditions, interactive lunar simulator, 3D visualization, visibility map, tidal charts, quiz and more. Free PDF calendar download.", + siteName: SITE_NAME, + images: [ + { + url: `${SITE_URL}/opengraph-image`, + width: 1200, + height: 630, + alt: "Moon Phases — Full Moon Calendar 2026", + }, + ], + }, + twitter: { + card: "summary_large_image", + title: "Moon Phases 2026 — Full Moon Calendar & Lunar Guide", + description: "Explore moon phases, full moon traditions, interactive lunar simulator, 3D visualization and more.", + images: [`${SITE_URL}/twitter-image`], + creator: "@moonphases", + }, + icons: { + icon: "/icon", + apple: "/apple-icon", + }, + manifest: "/manifest.json", + category: "science", + classification: "Astronomy", + other: { + "format-detection": "telephone=no", + }, +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + const jsonLd = [ + { + "@context": "https://schema.org", + "@type": "WebSite", + name: SITE_NAME, + url: SITE_URL, + description: SITE_DESCRIPTION, + inLanguage: ["en", "fr", "es", "de", "pt", "it", "ja", "zh", "ar", "ru", "hi"], + }, + { + "@context": "https://schema.org", + "@type": "Organization", + name: SITE_NAME, + url: SITE_URL, + logo: `${SITE_URL}/icon`, + }, + { + "@context": "https://schema.org", + "@type": "WebPage", + name: "Moon Phases 2026", + url: SITE_URL, + isPartOf: { + "@type": "WebSite", + name: SITE_NAME, + url: SITE_URL, + }, + description: SITE_DESCRIPTION, + primaryImageOfPage: `${SITE_URL}/opengraph-image`, + inLanguage: "en", + }, + { + "@context": "https://schema.org", + "@type": "WebApplication", + name: "Moon Phase Simulator", + url: `${SITE_URL}/#simulator`, + applicationCategory: "EducationalApplication", + operatingSystem: "Any", + offers: { "@type": "Offer", price: "0", priceCurrency: "USD" }, + description: "Interactive moon phase simulator — see how the moon looks on any date.", + }, + { + "@context": "https://schema.org", + "@type": "BreadcrumbList", + itemListElement: [ + { "@type": "ListItem", position: 1, name: "Home", item: SITE_URL }, + { "@type": "ListItem", position: 2, name: "Lunar Calendar", item: `${SITE_URL}/#calendar` }, + { "@type": "ListItem", position: 3, name: "Full Moon Names", item: `${SITE_URL}/#fullmoons` }, + { "@type": "ListItem", position: 4, name: "Phase Simulator", item: `${SITE_URL}/#simulator` }, + { "@type": "ListItem", position: 5, name: "Quiz", item: `${SITE_URL}/#quiz` }, + ], + }, + ]; + + return ( + + + + + + + {jsonLd.map((schema, i) => ( +