Ships.tsx 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. import React, { useEffect } from 'react';
  2. import Navbar from '@/src/components/Navbar.tsx';
  3. import Sidebar from '@/src/components/Sidebar.tsx';
  4. import Footer from '@/src/components/Footer.tsx';
  5. import { CONTENT } from '../constants.ts';
  6. import { useLanguage } from '@/src/contexts/LanguageContext.tsx';
  7. import { useTheme } from '@/src/contexts/ThemeContext.tsx';
  8. import { useLocation, Link } from 'react-router-dom';
  9. import { ArrowRight, Anchor, Star, ChevronRight } from 'lucide-react';
  10. const Ships: React.FC = () => {
  11. const { language } = useLanguage();
  12. const { shipsPageImages } = useTheme();
  13. // We explicitly type 'any' here or assume CONTENT structure is updated because
  14. // TS might not immediately pick up the new keys added to constants without a full types reload in this context.
  15. // In a real app, types.ts should be updated, but here we access the object properties.
  16. const t = CONTENT[language].shipsPage as any;
  17. const location = useLocation();
  18. // Scroll to section on load or location change
  19. useEffect(() => {
  20. const params = new URLSearchParams(location.search);
  21. const section = params.get('section');
  22. // Always scroll to top first
  23. if (!section) {
  24. window.scrollTo({ top: 0, behavior: 'smooth' });
  25. } else {
  26. const element = document.getElementById(section);
  27. if (element) {
  28. // Small delay to ensure render
  29. setTimeout(() => {
  30. element.scrollIntoView({ behavior: 'smooth' });
  31. }, 300);
  32. }
  33. }
  34. }, [location]);
  35. return (
  36. <div className="min-h-screen bg-white font-sans text-vista-darkblue overflow-x-hidden">
  37. <Navbar />
  38. <Sidebar />
  39. {/* Hero Section */}
  40. <div className="relative h-[70vh] w-full bg-vista-darkblue flex items-center justify-center overflow-hidden">
  41. <div className="absolute inset-0 bg-black/40 z-10"></div>
  42. <img
  43. src="https://images.unsplash.com/photo-1548291616-3c0f5f743538?q=80&w=1920&auto=format&fit=crop"
  44. alt="Ships Hero"
  45. className="absolute inset-0 w-full h-full object-cover animate-slow-zoom"
  46. loading="lazy"
  47. />
  48. <div className="relative z-20 text-center text-white px-4 animate-fade-in-up">
  49. <span className="block text-sm md:text-base tracking-[0.3em] uppercase mb-4 text-vista-gold">{t.hero_sub}</span>
  50. <h1 className="text-5xl md:text-8xl font-serif italic mb-6">{CONTENT[language].nav.menu[1].title}</h1>
  51. <p className="max-w-xl mx-auto text-white/80 font-light text-lg">
  52. {t.hero_desc}
  53. </p>
  54. </div>
  55. </div>
  56. {/* Section 1: Vista Series Intro */}
  57. <section id="series" className="py-24 max-w-7xl mx-auto px-6">
  58. <div className="flex flex-col lg:flex-row gap-16 items-start">
  59. {/* Left: Text Content */}
  60. <div className="lg:w-3/5 space-y-12">
  61. <div>
  62. <h2 className="text-4xl md:text-5xl font-serif text-vista-darkblue mb-8 leading-tight">
  63. {t.intro.title}
  64. </h2>
  65. <div className="w-20 h-1 bg-vista-gold mb-8"></div>
  66. <p className="text-xl font-light leading-relaxed text-vista-darkblue/80">
  67. {t.intro.desc}
  68. </p>
  69. </div>
  70. <div className="space-y-12">
  71. {t.intro.points.map((point: any, index: number) => (
  72. <div key={index} className="flex gap-8 group">
  73. <span className="text-6xl font-serif text-vista-gold/20 font-bold -mt-2 group-hover:text-vista-gold/40 transition-colors duration-500">
  74. 0{index + 1}
  75. </span>
  76. <div>
  77. <h3 className="text-xl font-bold text-vista-darkblue mb-3 uppercase tracking-wider">{point.title}</h3>
  78. <p className="text-vista-darkblue/70 leading-relaxed">{point.desc}</p>
  79. </div>
  80. </div>
  81. ))}
  82. </div>
  83. </div>
  84. {/* Right: Navigation Cards */}
  85. <div className="lg:w-2/5 flex flex-col gap-8 sticky top-24">
  86. <Link to="/ships?section=lanyue" className="group relative h-72 overflow-hidden block shadow-2xl rounded-sm">
  87. <img
  88. src={shipsPageImages.lanyue[0]}
  89. alt="Lanyue"
  90. className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
  91. loading="lazy"
  92. />
  93. <div className="absolute inset-0 bg-gradient-to-t from-black/80 via-transparent to-transparent opacity-90 transition-opacity"></div>
  94. <div className="absolute bottom-8 left-8 text-white">
  95. <span className="text-xs uppercase tracking-widest block mb-2 text-vista-gold">{t.now_sailing}</span>
  96. <span className="text-3xl font-serif italic flex items-center gap-4">
  97. {t.lanyue.title} <ArrowRight size={24} className="transform group-hover:translate-x-4 transition-transform text-vista-gold" />
  98. </span>
  99. </div>
  100. </Link>
  101. <Link to="/ships?section=aurora" className="group relative h-72 overflow-hidden block shadow-2xl rounded-sm">
  102. <img
  103. src={shipsPageImages.aurora}
  104. alt="Aurora"
  105. className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110 grayscale group-hover:grayscale-0"
  106. loading="lazy"
  107. />
  108. <div className="absolute inset-0 bg-gradient-to-t from-black/80 via-transparent to-transparent opacity-90 transition-opacity"></div>
  109. <div className="absolute bottom-8 left-8 text-white">
  110. <span className="text-xs uppercase tracking-widest block mb-2 text-vista-gold">{t.coming_soon}</span>
  111. <span className="text-3xl font-serif italic flex items-center gap-4">
  112. {t.aurora.title} <ArrowRight size={24} className="transform group-hover:translate-x-4 transition-transform text-vista-gold" />
  113. </span>
  114. </div>
  115. </Link>
  116. </div>
  117. </div>
  118. </section>
  119. {/* Divider */}
  120. <div className="w-full h-px bg-vista-darkblue/10 max-w-7xl mx-auto"></div>
  121. {/* Section 2: Vista Lanyue Details */}
  122. <section id="lanyue" className="py-32 bg-vista-gray relative">
  123. {/* Background Decor */}
  124. <div className="absolute top-0 right-0 w-1/3 h-full bg-white/50 skew-x-12 hidden lg:block pointer-events-none"></div>
  125. <div className="max-w-7xl mx-auto px-6 relative z-10">
  126. <div className="text-center mb-20 max-w-4xl mx-auto">
  127. <div className="flex items-center justify-center gap-4 mb-6">
  128. <div className="h-px w-12 bg-vista-gold"></div>
  129. <span className="text-vista-gold uppercase tracking-widest text-sm font-bold">{t.flagship_label}</span>
  130. <div className="h-px w-12 bg-vista-gold"></div>
  131. </div>
  132. <h2 className="text-5xl md:text-7xl font-serif text-vista-darkblue mb-10">{t.lanyue.title}</h2>
  133. <p className="text-vista-darkblue/70 text-lg md:text-xl leading-relaxed font-light">
  134. {t.lanyue.desc}
  135. </p>
  136. <div className="mt-12 flex justify-center gap-6">
  137. <div className="flex flex-col items-center gap-2 px-6 border-r border-vista-darkblue/10">
  138. <Anchor size={24} className="text-vista-gold" />
  139. <span className="text-xs uppercase tracking-widest font-bold">{t.stats_tons}</span>
  140. </div>
  141. <div className="flex flex-col items-center gap-2 px-6 border-r border-vista-darkblue/10">
  142. <Star size={24} className="text-vista-gold" />
  143. <span className="text-xs uppercase tracking-widest font-bold">{t.stats_stars}</span>
  144. </div>
  145. <div className="flex flex-col items-center gap-2 px-6">
  146. <span className="text-xl font-serif font-bold text-vista-gold">1:1</span>
  147. <span className="text-xs uppercase tracking-widest font-bold">{t.stats_ratio}</span>
  148. </div>
  149. </div>
  150. </div>
  151. {/* Lanyue Image Grid (Masonry style) */}
  152. <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-4 auto-rows-[200px]">
  153. {/* Large Hero Image */}
  154. <div className="lg:col-span-8 lg:row-span-2 relative group overflow-hidden shadow-lg">
  155. <img
  156. src={shipsPageImages.lanyue[0]}
  157. alt="Lanyue Exterior"
  158. className="w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"
  159. loading="lazy"
  160. />
  161. </div>
  162. {/* Smaller Detail Images */}
  163. <div className="lg:col-span-4 lg:row-span-1 relative group overflow-hidden shadow-lg">
  164. <img
  165. src={shipsPageImages.lanyue[1]}
  166. alt="Lanyue Interior"
  167. className="w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"
  168. loading="lazy"
  169. />
  170. </div>
  171. <div className="lg:col-span-4 lg:row-span-1 relative group overflow-hidden shadow-lg">
  172. <img
  173. src={shipsPageImages.lanyue[2]}
  174. alt="Lanyue Deck"
  175. className="w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"
  176. loading="lazy"
  177. />
  178. </div>
  179. <div className="lg:col-span-12 lg:row-span-1 relative group overflow-hidden shadow-lg md:hidden lg:block">
  180. <img
  181. src={shipsPageImages.lanyue[3]}
  182. alt="Lanyue Wide"
  183. className="w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"
  184. loading="lazy"
  185. />
  186. </div>
  187. </div>
  188. <div className="mt-16 text-center">
  189. <Link to="/itineraries" className="inline-flex items-center gap-3 px-10 py-4 bg-vista-darkblue text-white uppercase tracking-widest text-xs font-bold hover:bg-vista-gold transition-colors duration-300">
  190. {t.view_itineraries} <ChevronRight size={16} />
  191. </Link>
  192. </div>
  193. </div>
  194. </section>
  195. {/* Section 3: Vista Aurora Teaser */}
  196. <section id="aurora" className="relative h-screen flex items-center justify-center overflow-hidden bg-black">
  197. <div className="absolute inset-0 opacity-70">
  198. <img
  199. src={shipsPageImages.aurora}
  200. alt="Aurora"
  201. className="w-full h-full object-cover animate-slow-zoom"
  202. loading="lazy"
  203. />
  204. <div className="absolute inset-0 bg-gradient-to-b from-black via-transparent to-black"></div>
  205. </div>
  206. <div className="relative z-10 text-center text-white px-6 max-w-4xl">
  207. <span className="inline-block border border-white/30 px-4 py-1 rounded-full text-xs uppercase tracking-widest mb-8 backdrop-blur-sm">{t.future_label}</span>
  208. <h2 className="text-6xl md:text-9xl font-serif italic mb-8 bg-clip-text text-transparent bg-gradient-to-r from-white via-white to-white/50">
  209. {t.aurora.title}
  210. </h2>
  211. <p className="text-xl md:text-2xl font-light tracking-wide mb-12 text-white/90">
  212. {t.aurora.desc}
  213. </p>
  214. <div className="flex flex-col md:flex-row items-center justify-center gap-6">
  215. <button className="px-10 py-4 bg-white text-black font-bold uppercase text-xs tracking-[0.2em] hover:bg-vista-gold hover:text-white transition-colors">
  216. {t.coming_soon}
  217. </button>
  218. <button className="px-10 py-4 border border-white/30 text-white font-bold uppercase text-xs tracking-[0.2em] hover:bg-white/10 transition-colors backdrop-blur-sm">
  219. {t.waitlist_btn}
  220. </button>
  221. </div>
  222. </div>
  223. </section>
  224. <Footer />
  225. </div>
  226. );
  227. };
  228. export default Ships;