Translated the home page to work with both EN and AR

This commit is contained in:
Tiago Ribeiro
2023-10-21 14:22:57 +01:00
parent 0c747f6332
commit 799abc813d
17 changed files with 627 additions and 242 deletions

222
src/templates/Home.tsx Normal file
View File

@@ -0,0 +1,222 @@
/* eslint-disable @next/next/no-img-element */
import Link from "next/link";
import {BsCardChecklist, BsClipboardFill, BsClockFill, BsInstagram, BsShieldFillCheck, BsTwitter} from "react-icons/bs";
import {BiLogoFacebook} from "react-icons/bi";
import Navbar from "@/components/Navbar";
import Footer from "@/components/Footer";
import translation from "@/translation/home.json";
interface Props {
language: "en" | "ar";
}
export default function Home({language}: Props) {
return (
<main className="h-screen w-full bg-white text-mti-black flex flex-col">
<Navbar currentPage="/" language={language} />
<section className="w-full relative bg-white">
<img src="/home/first_banner.png" alt="IELTS Packages - Together we prepare for the future" className="w-full" />
<Link href="/join">
<button className="absolute bottom-1/10 left-1/12 bg-mti-purple-light hover:bg-mti-purple text-white rounded-xl px-8 py-4 transition ease-in-out duration-300 shadow">
{translation.get_started_btn[language]}
</button>
</Link>
</section>
{/* Perks Section */}
<section className="w-full bg-white">
<div className="w-full grid grid-rows-4 md:grid-rows-1 md:grid-cols-4 gap-8 p-8 md:p-24 container mx-auto">
<div className="flex flex-col items-center gap-6">
<div className="bg-mti-rose-ultralight border border-mti-rose-light p-6 rounded-3xl flex items-center justify-center">
<BsClockFill className="text-mti-rose-light w-10 h-10" />
</div>
<div className="flex flex-col gap-4 items-center text-center max-w-[240px]">
<span className="font-bold text-xl">{translation.perks["24_hour_access"].title[language]}</span>
<span>{translation.perks["24_hour_access"].description[language]}</span>
</div>
</div>
<div className="flex flex-col items-center gap-6">
<div className="bg-mti-rose-ultralight border border-mti-rose-light p-6 rounded-3xl flex items-center justify-center">
<BsClipboardFill className="text-mti-rose-light w-10 h-10" />
</div>
<div className="flex flex-col gap-4 items-center text-center max-w-[240px]">
<span className="font-bold text-xl">{translation.perks.complete_package.title[language]}</span>
<span>{translation.perks.complete_package.description[language]}</span>
</div>
</div>
<div className="flex flex-col items-center gap-6">
<div className="bg-mti-rose-ultralight border border-mti-rose-light p-6 rounded-3xl flex items-center justify-center">
<BsCardChecklist className="text-mti-rose-light w-10 h-10" />
</div>
<div className="flex flex-col gap-4 items-center text-center max-w-[240px]">
<span className="font-bold text-xl">{translation.perks.enjoy_learning.title[language]}</span>
<span>{translation.perks.enjoy_learning.description[language]}</span>
</div>
</div>
<div className="flex flex-col items-center gap-6">
<div className="bg-mti-rose-ultralight border border-mti-rose-light p-6 rounded-3xl flex items-center justify-center">
<BsShieldFillCheck className="text-mti-rose-light w-10 h-10" />
</div>
<div className="flex flex-col gap-4 items-center text-center max-w-[240px]">
<span className="font-bold text-xl">{translation.perks.guaranteed_results.title[language]}</span>
<span>{translation.perks.guaranteed_results.description[language]}</span>
</div>
</div>
</div>
</section>
{/* EnCoach Benefits Section */}
<section className="w-full bg-white">
<div className="w-full p-8 md:p-20 lg:p-32 flex flex-col-reverse gap-8 md:gap-24 md:flex-row items-center justify-center container mx-auto">
<div className="relative h-full grid grid-cols-2 place-items-center gap-8 -md:px-8">
<div className="w-60 h-60 rounded-xl overflow-hidden flex items-center justify-center">
<img src="/person_laptop_3.jpg" alt="Person using a laptop" />
</div>
<div className="w-60 h-80 rounded-xl overflow-hidden flex items-center justify-center row-span-2">
<img src="/person_laptop_1.jpg" alt="Person using a laptop" />
</div>
<div className="w-60 h-60 rounded-xl overflow-hidden flex items-center justify-center">
<img src="/person_laptop_2.jpg" alt="Person using a laptop" />
</div>
</div>
<div className="flex flex-col gap-8">
<span className="text-lg font-semibold">
<span className="text-white bg-mti-rose-light px-1 py-0">{translation.encoach_benefits.tag.encoach[language]}</span>{" "}
{translation.encoach_benefits.tag.benefits[language]}
</span>
<div className="flex flex-col gap-3">
<span className="text-4xl font-bold max-w-md">
{translation.encoach_benefits.title.text[language]}{" "}
<span className="text-mti-rose-light">{translation.encoach_benefits.title.highlight[language]}</span>
</span>
<p className="max-w-lg text-base">{translation.encoach_benefits.description[language]}</p>
</div>
<Link href="/about">
<button className="bg-mti-purple-light hover:bg-mti-purple text-white rounded-xl px-8 py-4 transition ease-in-out duration-300 shadow">
{translation.learn_more[language]}
</button>
</Link>
</div>
</div>
</section>
{/* Interested Section */}
<section className="w-full bg-mti-gray-seasalt">
<div className="w-full p-8 py-16 md:py-32 md:px-16 lg:px-28 items-center justify-center flex flex-col gap-10 relative container mx-auto">
<span className="text-xl">
<span className="text-white bg-mti-rose-light px-1 py-0">{translation.interested.tag.highlight[language]}</span>{" "}
{translation.interested.tag.text[language]}
</span>
<span className="text-4xl font-bold max-w-sm text-center">
{translation.interested.title.beginning[language]}{" "}
<span className="text-mti-rose-light">{translation.interested.title.highlight[language]}</span>{" "}
{translation.interested.title.end[language]}
</span>
<Link href="/contact">
<button className="bg-mti-purple-light hover:bg-mti-purple text-white rounded-xl px-8 py-4 transition ease-in-out duration-300 shadow">
{translation.interested.contact_us[language]}
</button>
</Link>
<div className="lg:absolute top-1/2 lg:-translate-y-2/3 right-1/6 flex flex-col items-center">
<em className="text-xs text-mti-purple-light font-semibold">{translation.interested.whatsapp[language]}</em>
<img className="w-32 h-32" alt="WhatsApp QR Code for MTI" src="/whatsapp_qrcode.png" />
<div className="w-full h-full relative">
<div className="w-3 h-3 bg-mti-purple rounded-full absolute -bottom-6" />
<div className="w-3 h-3 bg-mti-purple rounded-full absolute -bottom-0 -left-6" />
<div className="w-3 h-3 bg-mti-purple rounded-full absolute bottom-6 -left-6" />
<div className="w-3 h-3 bg-mti-purple rounded-full absolute bottom-12 -left-6" />
<div className="w-3 h-3 bg-mti-purple rounded-full absolute bottom-18 -left-6" />
<div className="w-3 h-3 bg-mti-purple rounded-full absolute -bottom-6 -left-6" />
<div className="w-3 h-3 bg-mti-purple rounded-full absolute -bottom-6 left-6" />
<div className="w-3 h-3 bg-mti-purple rounded-full absolute -bottom-6 left-12" />
<div className="w-3 h-3 bg-mti-purple rounded-full absolute -bottom-6 left-18" />
</div>
</div>
</div>
</section>
{/* CEO Message Section */}
<section className="w-full bg-white">
<div className="w-full p-8 md:p-20 lg:p-32 flex flex-col gap-12 md:flex-row items-center justify-around container mx-auto">
<div className="flex flex-col gap-8">
<span className="text-lg font-semibold">
<span className="text-white bg-mti-rose-light px-1 py-0">{translation.ceo_message.tag.highlight[language]}</span>{" "}
{translation.ceo_message.tag.text[language]}
</span>
<div className="flex flex-col gap-3">
<span className="text-4xl font-bold max-w-md">
&ldquo;{translation.ceo_message.title.text[language]}{" "}
<span className="text-mti-rose-light">{translation.ceo_message.title.highlight[language]}</span>&rdquo;
</span>
<p className="max-w-lg text-base">{translation.ceo_message.description[language]}</p>
</div>
<Link href="/about">
<button className="bg-mti-purple-light hover:bg-mti-purple text-white rounded-xl px-8 py-4 transition ease-in-out duration-300 shadow">
{translation.learn_more[language]}
</button>
</Link>
</div>
<div className="w-fit h-fit relative">
<div className="w-64 h-64 md:w-80 md:h-80 rounded-t-[80px] rounded-br-[80px] md:rounded-t-[120px] md:rounded-br-[120px] overflow-hidden">
<img className="w-full h-full" alt="MTI's CEO" src="/placeholder_person.png" />
</div>
<div>
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute left-10 -bottom-10" />
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute left-20 -bottom-10" />
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute left-30 -bottom-10" />
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute -bottom-10" />
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute -left-10 -bottom-10" />
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute -left-10 bottom-0" />
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute -left-10 bottom-10" />
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute -left-10 bottom-20" />
<div className="w-5 h-5 rounded-full bg-mti-purple-ultralight absolute -left-10 bottom-30" />
</div>
</div>
</div>
</section>
{/* Partner and Accreditation Section */}
<section className="w-full bg-white">
<div className="p-8 md:p-20 xl:p-32 flex flex-col gap-8 md:gap-24 lg:gap-32 w-full container mx-auto">
<div className="flex flex-col gap-12 w-full">
<span className="text-white bg-mti-rose-light px-1 py-0 font-semibold w-fit">{translation.our_partners[language]}</span>
<div className="flex gap-9 flex-wrap -lg:justify-center items-center">
<img src="/logos/dq_logo.png" alt="DQ's Logo" className="w-48 h-48 xl:w-52 xl:h-52 shadow-lg rounded-xl" />
<img
src="/logos/knowledge_grid_academy_logo.png"
alt="Knowledge Grid Academy's Logo"
className="w-48 h-48 xl:w-52 xl:h-52 shadow-lg rounded-xl"
/>
<img src="/logos/sohar_logo.png" alt="Sohar's Logo" className="w-48 h-48 xl:w-52 xl:h-52 shadow-lg rounded-xl" />
<img
src="/logos/partner_logo_unknown.png"
alt="Unknown Partner's Logo"
className="w-48 h-48 xl:w-52 xl:h-52 shadow-lg rounded-xl"
/>
<div className="w-48 h-48 xl:w-52 xl:h-52 shadow-lg rounded-xl flex items-center justify-center">
<img src="/logos/sohar_aluminium_logo.png" alt="Sohar Aluminium's Logo" />
</div>
</div>
</div>
<div className="flex flex-col gap-12 w-full">
<span className="text-white bg-mti-rose-light px-1 py-0 font-semibold w-fit">{translation.accreditation[language]}</span>
<div className="flex gap-9 flex-wrap -lg:justify-center items-center">
<div className="w-48 h-48 xl:w-52 xl:h-52 shadow-lg rounded-xl flex items-center justify-center">
<img src="/logos/idp_logo.png" alt="IDP's Logo" />
</div>
<div className="w-48 h-48 xl:w-52 xl:h-52 shadow-lg rounded-xl flex items-center justify-center">
<img src="/logos/ielts_logo.png" alt="IELTS's Logo" />
</div>
<div className="w-48 h-48 xl:w-52 xl:h-52 shadow-lg rounded-xl flex items-center justify-center">
<img src="/logos/ec_council_logo.png" alt="EC Council's Logo" />
</div>
</div>
</div>
</div>
</section>
<Footer language={language} />
</main>
);
}