Skip to content

Commit

Permalink
Merge branch 'main' into bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-buffard committed Aug 18, 2024
2 parents 571de9e + 439c754 commit 4ed3081
Show file tree
Hide file tree
Showing 83 changed files with 142 additions and 172 deletions.
7 changes: 6 additions & 1 deletion web/actions/destinations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const fetchDestination = async (id: string): Promise<IDestination> => {

export const fetchDestinations = async (): Promise<IDestination[]> => {
const client = getClient();
const { data } = await client.query({
const {data} = await client.query({
query: gql`
query Destinations {
Destinations {
Expand All @@ -77,6 +77,11 @@ export const fetchDestinations = async (): Promise<IDestination[]> => {
featured {
alt
sizes {
thumbnail {
url
width
height
}
fhd {
url
width
Expand Down
4 changes: 2 additions & 2 deletions web/app/server-sitemap-en.xml/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const GET = async (request: Request) => {
URLs: {
loc: string;
lastmod: string;
hrefLang: string;
hreflang: string;
priority: number;
}[] = [];

Expand All @@ -16,7 +16,7 @@ export const GET = async (request: Request) => {
URLs.push({
loc: `https://www.g-yachts.com/en/${basePath}/${doc.id}`,
lastmod: doc.updatedAt,
hrefLang: "en",
hreflang: "en",
priority: 0.8,
});
});
Expand Down
4 changes: 2 additions & 2 deletions web/app/server-sitemap-fr.xml/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const GET = async (request: Request) => {
URLs: {
loc: string;
lastmod: string;
hrefLang: string;
hreflang: string;
priority: number;
}[] = [];

Expand All @@ -16,7 +16,7 @@ export const GET = async (request: Request) => {
URLs.push({
loc: `https://www.g-yachts.com/fr/${basePath}/${doc.id}`,
lastmod: doc.updatedAt,
hrefLang: "fr",
hreflang: "fr",
priority: 0.8,
});
});
Expand Down
2 changes: 1 addition & 1 deletion web/components/company/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React, { useEffect } from "react";
import { useTranslations } from "next-intl";
import Image from "next/image";
import monaco from "@/public/imagery/optimized/company/monaco.webp";
import monaco from "@/public/images/company/monaco.webp";

const Accordion = () => {
const t = useTranslations("company.philosophy");
Expand Down
2 changes: 1 addition & 1 deletion web/components/company/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { useTranslations } from "next-intl";
import hero from "@/public/imagery/optimized/company/hero.webp";
import hero from "@/public/images/company/hero.webp";
import Image from "next/image";

const Hero = () => {
Expand Down
2 changes: 1 addition & 1 deletion web/components/company/lifestyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Lifestyle = () => {
}
>
<video
src="/imagery/optimized/company/bottom.mp4"
src="/videos/company.mp4"
autoPlay
loop
muted
Expand Down
10 changes: 5 additions & 5 deletions web/components/company/story.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Image from "next/image";
import { useTranslations } from "next-intl";
import React from "react";
import first from "@/public/imagery/optimized/company/first.webp";
import second from "@/public/imagery/optimized/company/second.webp";
import third from "@/public/imagery/optimized/company/third.webp";
import fourth from "@/public/imagery/optimized/company/fourth.webp";
import gaspard from "@/public/imagery/optimized/company/Gaspard.jpeg";
import first from "@/public/images/company/first.webp";
import second from "@/public/images/company/second.webp";
import third from "@/public/images/company/third.webp";
import fourth from "@/public/images/company/fourth.webp";
import gaspard from "@/public/images/company/Gaspard.jpeg";

const Story = () => {
const t = useTranslations("company.story");
Expand Down
2 changes: 1 addition & 1 deletion web/components/destinations/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Hero = () => {
"w-full px-[4vw] md:px-[8vw] h-[36dvh] md:h-screen bg-cover bg-center flex flex-col justify-end items-start text-white uppercase py-[2vh] md:py-[6vh]"
}
style={{
backgroundImage: `url(/imagery/original/IMG_8260.JPG)`,
backgroundImage: `url(../images/destinations.webp)`,
}}
>
<h4>{t("heroSubtitle")}</h4>
Expand Down
108 changes: 57 additions & 51 deletions web/components/destinations/listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,66 @@ import { useMemo, useState } from "react";
import { Link } from "@/navigation";

const Listing = ({ data }: { data: IDestination[] }) => {
const continents: string[] = ["All"];
for (const destination of data) {
if (!continents.includes(destination.continent)) {
continents.push(destination.continent);
}
const continents: string[] = ["All"];
for (const destination of data) {
if (!continents.includes(destination.continent)) {
continents.push(destination.continent);
}
}

const [selectedContinent, setContinent] = useState<string>("All");
const getDestinations = useMemo(() => {
if (selectedContinent === "All") {
return data;
}
return data.filter((destination) => destination.continent === selectedContinent);
}, [selectedContinent]);

return (
<div className="w-full flex flex-col justify-start items-center py-5">
<div className="flex flex-row flex-wrap justify-start items-center w-full">
{continents.map((continent, index) => (
<div
onClick={() => setContinent(continent)}
key={index}
className={clsx(
"text-lg uppercase cursor-pointer transition-colors duration-300 w-1/2 md:w-1/4 lg:w-1/6 py-4 border-b-2 hover:border-gray-600 hover:text-gray-800",
{
"border-gray-300 text-gray-500": selectedContinent !== continent,
"border-gray-800 text-gray-800": selectedContinent === continent,
}
)}>
{continent}
</div>
))}
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 w-full my-10">
{getDestinations.map((destination, index) => (
<Link
key={destination.id}
href={{
pathname: "/destinations/[id]",
params: { id: destination.id },
}}
className="rounded-lg p-4 flex flex-col bg-center bg-cover h-64 text-white uppercase cursor-pointer hover:shadow-xl transition-shadow duration-300"
style={{
backgroundImage: `url(${destination.photos.featured}), linear-gradient(to bottom right, #74ebd5, #acb6e5)`,
}}>
<span className="text-3xl font-bold drop-shadow-md">
{destination.destination}
</span>
<span className="text-lg drop-shadow-sm">{destination.region}</span>
</Link>
))}
</div>
</div>
const [selectedContinent, setContinent] = useState<string>("All");
const getDestinations = useMemo(() => {
if (selectedContinent === "All") {
return data;
}
return data.filter(
(destination) => destination.continent === selectedContinent,
);
}, [selectedContinent]);

return (
<div className="w-full flex flex-col justify-start items-center py-5">
<div className="flex flex-row flex-wrap justify-start items-center w-full">
{continents.map((continent, index) => (
<div
onClick={() => setContinent(continent)}
key={index}
className={clsx(
"text-lg uppercase cursor-pointer transition-colors duration-300 w-1/2 md:w-1/4 lg:w-1/6 py-4 border-b-2 hover:border-gray-600 hover:text-gray-800",
{
"border-gray-300 text-gray-500":
selectedContinent !== continent,
"border-gray-800 text-gray-800":
selectedContinent === continent,
},
)}
>
{continent}
</div>
))}
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 w-full my-10">
{getDestinations.map((destination, index) => (
<Link
key={destination.id}
href={{
pathname: "/destinations/[id]",
params: { id: destination.id },
}}
className="rounded-lg p-4 flex flex-col bg-center bg-cover h-64 text-white uppercase cursor-pointer hover:shadow-xl transition-shadow duration-300"
style={{
backgroundImage: `url(${encodeURI(destination.photos.featured.sizes.thumbnail.url)}), linear-gradient(to bottom right, #74ebd5, #acb6e5)`,
}}
>
<span className="text-3xl font-bold drop-shadow-md">
{destination.destination}
</span>
<span className="text-lg drop-shadow-sm">{destination.region}</span>
</Link>
))}
</div>
</div>
);
};

export default Listing;
2 changes: 1 addition & 1 deletion web/components/index/memories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { useTranslations } from "next-intl";
import Image from "next/image";
import memories from "@/public/imagery/optimized/index/memories.webp";
import memories from "@/public/images/index/memories.webp";
import { Link } from "@/navigation";

const Memories = () => {
Expand Down
8 changes: 4 additions & 4 deletions web/components/index/services.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { useTranslations } from "next-intl";
import Image from "next/image";
import { Link } from "@/navigation";
import sales from "@/public/imagery/optimized/index/services/sales.webp";
import charter from "@/public/imagery/optimized/index/services/charter.webp";
import management from "@/public/imagery/optimized/index/services/management.webp";
import construction from "@/public/imagery/optimized/index/services/construction.webp";
import sales from "@/public/images/index/services/sales.webp";
import charter from "@/public/images/index/services/charter.webp";
import management from "@/public/images/index/services/management.webp";
import construction from "@/public/images/index/services/construction.webp";

const Services = () => {
const t = useTranslations("index.services");
Expand Down
2 changes: 1 addition & 1 deletion web/components/index/working.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from "next/image";
import working from "@/public/imagery/optimized/index/working.webp";
import working from "@/public/images/index/working.webp";
import { useTranslations } from "next-intl";
import { Link } from "@/navigation";

Expand Down
2 changes: 1 addition & 1 deletion web/components/management/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React, { useEffect } from "react";
import { useTranslations } from "next-intl";
import Image from "next/image";
import monaco from "@/public/imagery/optimized/company/monaco.webp";
import monaco from "@/public/images/company/monaco.webp";

const Accordion = () => {
const t = useTranslations("management.experience");
Expand Down
2 changes: 1 addition & 1 deletion web/components/management/assets.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useTranslations } from "next-intl";
import Image from "next/image";
import assets from "@/public/imagery/optimized/management/assets.webp";
import assets from "@/public/images/management/assets.webp";
import React from "react";

const Assets = () => {
Expand Down
2 changes: 1 addition & 1 deletion web/components/management/bottom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Bottom = () => {
>
<div className={"text-center"}>
<video
src="/imagery/optimized/management/bottomVideo.mp4"
src="/videos/management.mp4"
autoPlay
loop
muted
Expand Down
2 changes: 1 addition & 1 deletion web/components/management/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Hero = () => {
"w-full px-[4vw] md:px-[8vw] h-[36dvh] md:h-screen bg-cover bg-center flex flex-col justify-end items-start text-white py-[2vh] md:py-[6vh]"
}
style={{
backgroundImage: `url(/imagery/optimized/management/hero.webp)`,
backgroundImage: `url(../images/management/hero.webp)`,
}}
>
<h4>{t("subtitle")}</h4>
Expand Down
8 changes: 4 additions & 4 deletions web/components/management/serviceList.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useTranslations } from "next-intl";
import Image from "next/image";
import React from "react";
import finance from "@/public/imagery/optimized/management/finance.webp";
import support from "@/public/imagery/optimized/management/support.webp";
import administrative from "@/public/imagery/optimized/management/administrative.webp";
import management from "@/public/imagery/optimized/management/management.webp";
import finance from "@/public/images/management/finance.webp";
import support from "@/public/images/management/support.webp";
import administrative from "@/public/images/management/administrative.webp";
import management from "@/public/images/management/management.webp";

const ServiceList = () => {
const t = useTranslations("management.servicesList");
Expand Down
4 changes: 2 additions & 2 deletions web/components/nav/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { motion } from "framer-motion";
import { useFormStatus } from "react-dom";
import Lottie, { LottieRefCurrentProps } from "lottie-react";
import { colorify } from "lottie-colorify";
import loading from "@/public/imagery/optimized/contact/loading.json";
import submitted from "@/public/imagery/optimized/contact/submitted.json";
import loading from "../../public/images/contact/loading.json";
import submitted from "../../public/images/contact/submitted.json";
import { handleMouseMove } from "@/utils/mouseCoords";
import { useParams } from "next/navigation";
import { usePath } from "@/utils/contact";
Expand Down
36 changes: 18 additions & 18 deletions web/components/newContructions/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { useTranslations } from "next-intl";

const Hero = () => {
const t = useTranslations("new-constructions.hero");
return (
<section
className={
"w-full px-[4vw] md:px-[8vw] h-[36dvh] md:h-screen bg-cover bg-center flex flex-col justify-end items-start text-white py-[2vh] md:py-[6vh]"
}
style={{
backgroundImage: `url(/imagery/optimized/new-constructions.webp)`,
}}
>
<h4>{t("subtitle")}</h4>
<h1 className={"lg:text-6xl md:text-5xl text-xl font-regular"}>
{t.rich("title", {
classic: (chunk) => <span className={"classic"}>{chunk}</span>,
})}
</h1>
</section>
);
const t = useTranslations("new-constructions.hero");
return (
<section
className={
"w-full px-[4vw] md:px-[8vw] h-[36dvh] md:h-screen bg-cover bg-center flex flex-col justify-end items-start text-white py-[2vh] md:py-[6vh]"
}
style={{
backgroundImage: `url(../images/new-constructions.webp)`,
}}
>
<h4>{t("subtitle")}</h4>
<h1 className={"lg:text-6xl md:text-5xl text-xl font-regular"}>
{t.rich("title", {
classic: (chunk) => <span className={"classic"}>{chunk}</span>,
})}
</h1>
</section>
);
};

export default Hero;
2 changes: 1 addition & 1 deletion web/components/newsletter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useRef, useState } from "react";
import { motion } from "framer-motion";
import Lottie, { LottieRefCurrentProps } from "lottie-react";
import { colorify } from "lottie-colorify";
import submitted from "@/public/imagery/optimized/newsletter.json";
import submitted from "@/public/images/newsletter.json";
import { useParams } from "next/navigation";
import { usePath } from "@/utils/contact";
import { useViewContext } from "@/context/view";
Expand Down
Loading

0 comments on commit 4ed3081

Please sign in to comment.