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

Add speakers section #3

Closed
wants to merge 5 commits into from
Closed
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
9 changes: 9 additions & 0 deletions public/images/speakers/company-logo/rasmio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/images/speakers/profile-picture/pooria-baba-ali.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 4 additions & 96 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,101 +1,9 @@
import Image from "next/image";
import Speakers from "@/components/sections/speakers/Speakers";

export default function Home() {
return (
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image
className="dark:invert"
src="/next.svg"
alt="Next.js logo"
width={180}
height={38}
priority
/>
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2">
Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
src/app/page.tsx
</code>
.
</li>
<li>Save and see your changes instantly.</li>
</ol>

<div className="flex gap-4 items-center flex-col sm:flex-row">
<a
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
className="dark:invert"
src="/vercel.svg"
alt="Vercel logomark"
width={20}
height={20}
/>
Deploy now
</a>
<a
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Read our docs
</a>
</div>
</main>
<footer className="row-start-3 flex gap-6 flex-wrap items-center justify-center">
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/file.svg"
alt="File icon"
width={16}
height={16}
/>
Learn
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/window.svg"
alt="Window icon"
width={16}
height={16}
/>
Examples
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/globe.svg"
alt="Globe icon"
width={16}
height={16}
/>
Go to nextjs.org →
</a>
</footer>
</div>
<>
<Speakers />
</>
);
}
59 changes: 59 additions & 0 deletions src/components/sections/speakers/Speaker.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { speakerInfoType } from "../types";
import Image from "next/image";

const Speaker = ({ speakerInfo }: { speakerInfo: speakerInfoType }) => {
{
/* TODO: replace hard coded styles with global props */
}

const { name, role, company, imageUrl } = speakerInfo;
return (
<div className="speaker-card flex w-[146px] flex-col gap-[12px]">
{/* speaker picture */}
<div className="relative flex items-center justify-center rounded-[8px] p-[5px]">
{/* Gradient */}
<div
className="absolute inset-0 z-0 rounded-md"
style={{
background:
"radial-gradient(82.48% 67.73% at 8.62% 87.5%, #ECD8C6 0%, #A77344 49.5%, #222223 100%)",
}}
/>
{/* Black Background */}
<div className="absolute inset-[1px] z-0 rounded-md bg-[#09090B]" />

<Image
src={imageUrl ?? null}
width={0}
height={0}
alt={name}
layout="responsive"
className="rounded-inherit z-[1]"
/>
</div>
{/* info section*/}
<div className="info-wrapper flex flex-col items-center font-[400]">
{/* speaker name*/}
<span className="text-[20px] text-[#FAFAFA]">{name}</span>
{/* speaker role (stack)*/}
<span className="text-[16px] text-[#A1A1AA]">{role}</span>
{/* speaker company details */}
<div className="mt-[12px] flex items-center gap-[16px]">
<span className="text-[16px]">در</span>
<div className="flex items-center gap-[4px]">
<Image
width={0}
height={0}
src={company.logo ?? null}
alt={company.name}
className="w-[28px] border-[1px] border-[#FFFFFF1A]"
/>
<span className="text-[14px] font-[500]">{company.name}</span>
</div>
</div>
</div>
</div>
);
};

export default Speaker;
24 changes: 24 additions & 0 deletions src/components/sections/speakers/Speakers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Speaker from "./Speaker";
import { speakersData } from "@/data/speakers";

const Speakers = () => {
{
/* TODO: replace hard coded sizes with global props */
}

return (
<section
id="speakers"
className="flex flex-col items-center gap-[48px] px-[32px] py-[80px] text-[#FAFAFA]"
>
<h3 className="text-center text-[48px] font-[800]">سخنرانان همایش</h3>
<div className="speakers-wrapper flex max-w-[1080px] flex-wrap justify-center gap-[20px]">
{speakersData.map((info, idx) => (
<Speaker key={idx} speakerInfo={info} />
))}
</div>
</section>
);
};

export default Speakers;
9 changes: 9 additions & 0 deletions src/components/sections/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface speakerInfoType {
imageUrl: string;
role: string;
name: string;
company: {
logo: string;
name: string;
};
}
86 changes: 86 additions & 0 deletions src/data/speakers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import { speakerInfoType } from "@/components/sections/types";

export const speakersData: speakerInfoType[] = [
// all data will be replaced/removed with actual data
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
{
name: "پوریا باباعلی",
role: "توسعده دهنده فرانت اند",
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
company: {
name: "رسمیو",
logo: "/images/speakers/company-logo/rasmio.svg",
},
},
];
Loading