Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landing Page initial #8

Merged
merged 11 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions src/app/(pages)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Navbar from "../components/Navbar";
import Footer from "../components/Footer";

export default function RootLayout({ children }) {
return (
<main>
<Navbar />
{children}
<Footer />
</main>
);
}
88 changes: 88 additions & 0 deletions src/app/(pages)/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import Image from "next/image";
import Button from "../components/Button";
import SlideBox from "../components/Slidebox";
import aboutData from "../../../public/data/about";
import Testimonial from "../components/Testimonial";
import Projects from "../components/Projects";
export const metadata = {
title: "Currenci | Home",
description: "Welcome",
};

export default function Home() {
return (
<main className="bg-white w-screen min-h-screen flex flex-col items-center pb-16">
<div className="w-[70vw] rounded-lg md:rounded-3xl mt-[6.75rem]">
<video
controls
loop
className="w-full h-full object-cover rounded-lg md:rounded-3xl"
>
<source src="/aot.mp4" type="video/mp4" />
</video>
</div>
<div className="flex flex-col items-center justify-center md:mt-[2.5rem] mt-[1.5rem]">
<h1
className="text-4xl text-center md:text-6xl text-gray-800"
style={{ fontFamily: "Sofia Pro Medium" }}
>
Valuing Today, Shaping Tomorrow
</h1>
<Button href="/pricing">Get Started</Button>
</div>
<section className="md:mt-[6rem] mt-10 flex flex-col items-center">
<h1
className="text-4xl md:text-6xl text-gray-800"
style={{ fontFamily: "Sofia Pro Medium" }}
>
Our Areas of Expertise
</h1>
{aboutData.map((item, index) => {
return (
<SlideBox side={index % 2 === 1} key={item.title}>
<Image
src={`/images/${item.image}`}
alt="distribution"
width={350}
height={350}
className="h-auto w-[20vw]"
/>
<div className="mx-0 w-[65%]">
<h1
className="lg:text-5xl md:text-3xl text-lg md:leading-none leading-4 text-[#1E3432] text-start mb-4"
style={{ fontFamily: "Sofia Pro Regular" }}
>
{item.title}
</h1>
<p
className="lg:text-2xl md:text-[1rem] text-[0.6rem] lg:leading-none md:leading-5 leading-[0.6rem] text-start"
style={{ fontFamily: "Sofia Pro UltraLight" }}
>
{item.content}
</p>
</div>
</SlideBox>
);
})}
</section>
<section className="md:mt-[6rem] mt-10 flex flex-col items-center">
<h1
className="text-4xl text-center md:text-6xl text-gray-800"
style={{ fontFamily: "Sofia Pro Medium" }}
>
Why Us?
</h1>
<Testimonial />
</section>
<section className="md:mt-[6rem] mt-10 flex flex-col items-center">
<h1
className="text-4xl text-center md:text-6xl text-gray-800"
style={{ fontFamily: "Sofia Pro Medium" }}
>
Projects
</h1>
<Projects />
</section>
</main>
);
}
3 changes: 2 additions & 1 deletion src/app/api/v1/addTestimonial/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import jwt from "jsonwebtoken";
import { NextRequest, NextResponse } from "next/server";
import moment from "moment-timezone";
import Testimonial from "../../../../model/Testimonial";
import dbConnect from "../../../../lib/dbConnect";

Expand Down Expand Up @@ -45,7 +46,7 @@ export async function POST(req: NextRequest) {
const testimonial: TestimonialInter = {
userId: (user as { id: number }).id,
content,
createdAt: new Date(),
createdAt: moment().tz("Asia/Kolkata").toDate(),
};

await Testimonial.create(testimonial);
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/v1/editTeamMember/[memberId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function PUT(req: NextRequest) {
teamMember.designation = designation || teamMember.designation;
teamMember.email = email || teamMember.email;
teamMember.linkedin = linkedin || teamMember.linkedin;
teamMember.updatedAt = moment().tz("Asia/Kolkata").format();
teamMember.updatedAt = moment().tz("Asia/Kolkata").toDate();

await teamMember.save();

Expand Down
16 changes: 16 additions & 0 deletions src/app/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Link from "next/link";

export default function Button({ children, href }) {
return (
<div className="btn md:mt-[3rem] mt-4 p-[3px] py-[2px] rounded-full flex items-center justify-center bg-[#F2B263]">
<Link
href={href}
className="cursor-pointer px-[4vw] py-[1vw] bg-[#14342F] md:text-3xl text-xl text-white rounded-full"
>
<p className="select-none" style={{ fontFamily: "Sofia Pro Medium" }}>
{children}
</p>
</Link>
</div>
);
}
91 changes: 91 additions & 0 deletions src/app/components/Projects.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
"use client";

import Autoplay from "embla-carousel-autoplay";
import useEmblaCarousel from "embla-carousel-react";
import Image from "next/image";

const testData = [
{
title: "Financial Modeling",
image: "distri.png",
content:
"Lorem ipsum dolor sit amet consectetur. Malesuada pharetra senectus fames metus in. Elementum sodales vestibulum maecenas vivamus justo leo varius. Elit pretium commodo libero malesuada sed nunc et. Fringilla cursus viverra tellus enim sed molestie vitae eu eu.",
},
{
title: "Ratio Analysis",
image: "plan.png",
content:
"Lorem ipsum dolor sit amet consectetur. Malesuada pharetra senectus fames metus in. Elementum sodales vestibulum maecenas vivamus justo leo varius. Elit pretium commodo libero malesuada sed nunc et. Fringilla cursus viverra tellus enim sed molestie vitae eu eu.",
},
{
title: "Forecasting",
image: "pred.png",
content:
"Lorem ipsum dolor sit amet consectetur. Malesuada pharetra senectus fames metus in. Elementum sodales vestibulum maecenas vivamus justo leo varius. Elit pretium commodo libero malesuada sed nunc et. Fringilla cursus viverra tellus enim sed molestie vitae eu eu.",
},
{
title: "Discounted Cash Flow(DCF) (WACC)",
image: "money.png",
content:
"Lorem ipsum dolor sit amet consectetur. Malesuada pharetra senectus fames metus in. Elementum sodales vestibulum maecenas vivamus justo leo varius. Elit pretium commodo libero malesuada sed nunc et. Fringilla cursus viverra tellus enim sed molestie vitae eu eu.",
},
{
title: "Terminal Value(FCFF)",
image: "val.png",
content:
"Lorem ipsum dolor sit amet consectetur. Malesuada pharetra senectus fames metus in. Elementum sodales vestibulum maecenas vivamus justo leo varius. Elit pretium commodo libero malesuada sed nunc et. Fringilla cursus viverra tellus enim sed molestie vitae eu eu.",
},
{
title: "Intrinsic Growth",
image: "career.png",
content:
"Lorem ipsum dolor sit amet consectetur. Malesuada pharetra senectus fames metus in. Elementum sodales vestibulum maecenas vivamus justo leo varius. Elit pretium commodo libero malesuada sed nunc et. Fringilla cursus viverra tellus enim sed molestie vitae eu eu.",
},
];

export default function Projects() {
const [emblaRef] = useEmblaCarousel({ loop: true }, [Autoplay()]);
return (
<section>
<div className="md:mt-12 mt-6 w-screen overflow-hidden" ref={emblaRef}>
<div className="flex">
{testData.map((item, index) => (
<div
className="min-w-0"
style={{ flex: "0 0 100%" }}
key={item.title}
>
<div
className={`w-[84vw] h-[35vw] md:h-[30vw] mx-[10vw] p-[4vw] rounded-3xl flex items-center justify-evenly text-justify ${index % 2 === 1 ? "flex-row-reverse" : ""}`}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use vw for height cause for larger wider displays it looks hideous.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
image

Refer to design and adhere to it. You components doesn't match with design

>
<div>
<Image
src={`/images/${item.image}`}
alt="project"
height={300}
width={300}
className="h-auto w-[20vw] "
></Image>
</div>
<div className="w-[65%] ml-4">
<h1
className="lg:text-5xl md:text-3xl text-lg md:leading-none leading-4 text-[#1E3432] text-start mb-4"
style={{ fontFamily: "Sofia Pro Regular" }}
>
{item.title}
</h1>
<p
className="lg:text-2xl md:text-[1rem] text-[0.6rem] lg:leading-none md:leading-5 leading-[0.6rem] text-start"
style={{ fontFamily: "Sofia Pro UltraLight" }}
>
{item.content}
</p>
</div>
</div>
</div>
))}
</div>
</div>
</section>
);
}
42 changes: 42 additions & 0 deletions src/app/components/Slidebox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"use client";

import { useEffect, useRef } from "react";

export default function SlideBox({ children, side }) {
const ref = useRef<HTMLDivElement>(null);

useEffect(() => {
const element = ref.current;

const observer = new IntersectionObserver(
([entry]) => {
if (entry.isIntersecting) {
element?.classList.add(
side ? "animate-slideLeft" : "animate-slideRight",
);
element?.classList.remove("opacity-0");
}
},
{ threshold: 1 },
);

if (element) observer.observe(element);

return () => {
if (element) observer.unobserve(element);
};
}, [side]);

return (
<div
ref={ref}
className={`w-[80vw] md:aspect-[16/5] aspect-[16/7] bg-angled-gradient rounded-[1rem] p-[2px] opacity-0 md:mt-[3.5rem] md:mb-[3.5rem] mt-[1.75rem] mb-[1.75rem] animate-none text-center text-2xl transition flex items-center justify-between ${side ? "translateX(-100%) flex-row-reverse" : "translateX(100%)"}`}
>
<div
className={`h-full w-full lg::py-32 lg:px-14 md:py-16 md:px-8 py-8 px-4 bg-white rounded-[1rem] flex items-center justify-between ${side ? "flex-row-reverse" : ""}`}
>
{children}
</div>
</div>
);
}
Loading
Loading