Skip to content

Landing Page initial #8

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

Merged
merged 11 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from 9 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="/">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.5rem] 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="md:mt-[3rem] mt-4 p-[2px] py-[2px] rounded-full flex items-center justify-center bg-[#F2B263] hover:bg-gradient-to-r hover:from-white to-[#F2B263] duration-300">
<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.5rem] 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-[5.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 p-[4vw] bg-white rounded-[1rem] flex items-center justify-between ${side ? "flex-row-reverse" : ""}`}
>
{children}
</div>
</div>
);
}
40 changes: 26 additions & 14 deletions src/app/components/Testimonial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const testData = [
user: {
userId: 1,
name: "Batman",
role: "CEO at Doe",
image:
"https://4kwallpapers.com/images/wallpapers/batman-dc-superheroes-dc-comics-cosplay-2048x2048-954.jpg",
},
Expand All @@ -65,6 +66,7 @@ const testData = [
user: {
userId: 2,
name: "Batman",
role: "CEO at Doe",
image:
"https://4kwallpapers.com/images/wallpapers/batman-dc-superheroes-dc-comics-cosplay-2048x2048-954.jpg",
},
Expand All @@ -75,6 +77,7 @@ const testData = [
user: {
userId: 3,
name: "Batman",
role: "CEO at Doe",
image:
"https://4kwallpapers.com/images/wallpapers/batman-dc-superheroes-dc-comics-cosplay-2048x2048-954.jpg",
},
Expand All @@ -85,6 +88,7 @@ const testData = [
user: {
userId: 4,
name: "Batman",
role: "CEO at Doe",
image:
"https://4kwallpapers.com/images/wallpapers/batman-dc-superheroes-dc-comics-cosplay-2048x2048-954.jpg",
},
Expand All @@ -95,6 +99,7 @@ const testData = [
user: {
userId: 5,
name: "Batman",
role: "CEO at Doe",
image:
"https://4kwallpapers.com/images/wallpapers/batman-dc-superheroes-dc-comics-cosplay-2048x2048-954.jpg",
},
Expand All @@ -105,6 +110,7 @@ const testData = [
user: {
userId: 6,
name: "Batman",
role: "CEO at Doe",
image:
"https://4kwallpapers.com/images/wallpapers/batman-dc-superheroes-dc-comics-cosplay-2048x2048-954.jpg",
},
Expand All @@ -115,6 +121,7 @@ const testData = [
user: {
userId: 7,
name: "Batman",
role: "CEO at Doe",
image:
"https://4kwallpapers.com/images/wallpapers/batman-dc-superheroes-dc-comics-cosplay-2048x2048-954.jpg",
},
Expand Down Expand Up @@ -144,24 +151,29 @@ export default function Testimonial() {
className="min-w-0 flex-[0_0_60vw] md:flex-[0_0_100%] flex justify-center"
key={item.user.userId}
>
<div className="w-[80vw] hidden mx-[10vw] p-10 h-max rounded-3xl md:flex items-center justify-evenly bg-[#14342F] md:bg-white text-center border border-[#F2B263]">
<div>
<div
style={{ aspectRatio: "8/3" }}
className="w-[80vw] hidden h-max rounded-3xl p-10 md:flex items-center justify-between bg-[#14342F] text-white text-center border border-[#F2B263] realtive"
>
<div className="w-[26%] relative">
<Image
src={item.user.image}
alt="batman"
height={300}
width={300}
className="h-[15vw] w-auto rounded-xl"
className="w-full h-auto rounded-xl"
></Image>
<p
className="text-white md:text-black text-4xl mt-5"
style={{ fontFamily: "Sofia Pro Regular" }}
>
{item.user.name}
</p>
<div className="text-white text-2xl mt-5">
<p style={{ fontFamily: "Sofia Pro Regular" }}>
{item.user.role}
</p>
<p style={{ fontFamily: "Sofia Pro Light" }}>
{item.user.name}
</p>
</div>
</div>
<div className="w-[60%] max-h-[30vw] mt-10 flex">
<span className="text-[#F2B662] text-8xl relative font-serif bottom-4 right-4 flex gap-2">
<div className="w-[65%] mt-10 mr-6">
<span className="text-[#F2B662] text-8xl flex gap-2 mb-2 relative left-2">
<svg
width="20"
height="36"
Expand All @@ -188,12 +200,12 @@ export default function Testimonial() {
</svg>
</span>
<p
className="text-white md:text-black text-lg"
className="text-white mx-10"
style={{ fontFamily: "Sofia Pro UltraLight" }}
>
{item.content}
{item.content.split(" ").slice(0, 80).join(" ")}...
Copy link
Collaborator

Choose a reason for hiding this comment

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

will it not add '...' even if the content <80? Its better to condition on character rather than on words.(length of a word varies..) . Do the samething for anywhere with longer text.

</p>
<span className="text-[#F2B662] text-8xl relative font-serif top-44 flex gap-2 transform scale-x-[-1]">
<span className="text-[#F2B662] text-8xl font-serif flex gap-2 transform scale-x-[-1]">
<svg
width="20"
height="36"
Expand Down
Loading
Loading