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

6
src/app/ar/page.tsx Normal file
View File

@@ -0,0 +1,6 @@
import Home from "@/templates/Home";
import {NextPageContext} from "next";
export default function Page({}: NextPageContext) {
return <Home language="ar" />;
}

View File

@@ -9,7 +9,7 @@ import Footer from "@/components/Footer";
export default function Home() {
return (
<main className="h-screen w-full bg-white text-mti-black flex flex-col">
<Navbar currentPage="/join" />
<Navbar currentPage="/join" language="en" />
<section className="w-full relative bg-white py-20 lg:py-48 px-8 flex flex-col items-center text-center gap-4">
<h2 className="text-3xl font-bold">Available Packages</h2>
@@ -22,7 +22,7 @@ export default function Home() {
</div>
</section>
<Footer />
<Footer language="en" />
</main>
);
}

View File

@@ -1,8 +1,6 @@
import "./globals.css";
import type {Metadata} from "next";
import {Inter} from "next/font/google";
import {Elements} from "@stripe/react-stripe-js";
import {loadStripe} from "@stripe/stripe-js";
const inter = Inter({subsets: ["latin"]});

View File

@@ -1,168 +1,5 @@
/* 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 Home from "@/templates/Home";
export default function Home() {
return (
<main className="h-screen w-full bg-white text-mti-black flex flex-col">
<Navbar currentPage="/" />
<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">
Get Started
</button>
</Link>
</section>
<section className="w-full grid grid-rows-4 md:grid-rows-1 md:grid-cols-4 gap-8 p-8 md:p-24 bg-white">
<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">Placeholder</span>
<span>Sit accusamus maxime maiores rerum cupiditate dolorum inventore.</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">Placeholder</span>
<span>Sit accusamus maxime maiores rerum cupiditate dolorum inventore.</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">Placeholder</span>
<span>Sit accusamus maxime maiores rerum cupiditate dolorum inventore.</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">Placeholder</span>
<span>Sit accusamus maxime maiores rerum cupiditate dolorum inventore.</span>
</div>
</div>
</section>
<section className="w-full p-8 py-16 md:py-32 md:px-16 lg:px-28 bg-mti-gray-seasalt items-center justify-center flex flex-col gap-10 relative">
<span className="text-xl">
<span className="text-white bg-mti-rose-light px-1 py-0">Interested</span> in us?
</span>
<span className="text-4xl font-bold max-w-sm text-center">
Contact us and <span className="text-mti-rose-light">Start</span> Learning
</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">
Contact Us
</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">WhatsApp Contact</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>
</section>
<section className="w-full p-8 md:p-20 lg:p-32 flex flex-col gap-12 md:flex-row items-center justify-around bg-white">
<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">About us</span> Message from CEO
</span>
<div className="flex flex-col gap-3">
<span className="text-4xl font-bold max-w-md">
&ldquo;We are the best service and the <span className="text-mti-rose-light">only one</span>&rdquo;
</span>
<p className="max-w-lg text-base">
Engaged in education, especially in providing teaching services for students who do not have the opportunity to learn in
conventional institutions.
</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">
Learn more
</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>
</section>
<section className="w-full p-8 md:p-20 xl:p-32 flex bg-white flex-col gap-8 md:gap-24 lg:gap-32">
<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">Our Partners</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">Accreditation</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>
</section>
<Footer />
</main>
);
export default function Page() {
return <Home language="en" />;
}

View File

@@ -53,7 +53,7 @@ export default function Home() {
return (
<main className="h-screen w-full bg-white text-mti-black flex flex-col">
<Navbar currentPage="/success" />
<Navbar currentPage="/success" language="en" />
<section className="w-full h-full relative bg-white py-32 flex flex-col items-center justify-center text-center gap-4">
{isLoading && (
@@ -83,7 +83,7 @@ export default function Home() {
)}
</section>
<Footer />
<Footer language="en" />
</main>
);
}