Skip to content

Commit 3c70b67

Browse files
committed
refactor: change image styles in speakers section
in this commit i've changed some images styles to sync the new img format changes also changed some speaker component styles for better output
1 parent a436e5f commit 3c70b67

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

src/components/sections/speakers/Speaker.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const Speaker = ({ speakerInfo }: { speakerInfo: speakerInfoType }) => {
88

99
const { name, role, company, imageUrl } = speakerInfo;
1010
return (
11-
<div className="speaker-card flex w-[146px] flex-col gap-[12px]">
11+
<div className="speaker-card flex w-[138px] flex-col gap-[12px]">
1212
{/* speaker picture */}
1313
<div className="relative flex items-center justify-center rounded-[8px] p-[5px]">
1414
{/* Gradient */}
@@ -24,29 +24,28 @@ const Speaker = ({ speakerInfo }: { speakerInfo: speakerInfoType }) => {
2424

2525
<Image
2626
src={imageUrl ?? null}
27-
width={0}
28-
height={0}
27+
width={100}
28+
height={100}
2929
alt={name}
30-
layout="responsive"
31-
className="rounded-inherit z-[1]"
30+
className="rounded-inherit z-[1] w-[128px]"
3231
/>
3332
</div>
3433
{/* info section*/}
3534
<div className="info-wrapper flex flex-col items-center font-[400]">
3635
{/* speaker name*/}
3736
<span className="text-[20px] text-[#FAFAFA]">{name}</span>
3837
{/* speaker role (stack)*/}
39-
<span className="text-[16px] text-[#A1A1AA]">{role}</span>
38+
<span className="w-max text-[16px] text-[#A1A1AA]">{role}</span>
4039
{/* speaker company details */}
4140
<div className="mt-[12px] flex items-center gap-[16px]">
4241
<span className="text-[16px]">در</span>
4342
<div className="flex items-center gap-[4px]">
4443
<Image
45-
width={0}
46-
height={0}
44+
width={100}
45+
height={100}
4746
src={company.logo ?? null}
4847
alt={company.name}
49-
className="w-[28px] border-[1px] border-[#FFFFFF1A]"
48+
className="w-[20px] border-[1px] border-[#FFFFFF1A]"
5049
/>
5150
<span className="text-[14px] font-[500]">{company.name}</span>
5251
</div>

src/configs/speakers.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,82 +5,82 @@ export const speakersData: speakerInfoType[] = [
55
{
66
name: "پوریا باباعلی",
77
role: "توسعده دهنده فرانت اند",
8-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
8+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
99
company: {
1010
name: "رسمیو",
11-
logo: "/images/speakers/company-logo/rasmio.svg",
11+
logo: "/images/speakers/company-logo/rasmio.png",
1212
},
1313
},
1414
{
1515
name: "پوریا باباعلی",
1616
role: "توسعده دهنده فرانت اند",
17-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
17+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
1818
company: {
1919
name: "رسمیو",
20-
logo: "/images/speakers/company-logo/rasmio.svg",
20+
logo: "/images/speakers/company-logo/rasmio.png",
2121
},
2222
},
2323
{
2424
name: "پوریا باباعلی",
2525
role: "توسعده دهنده فرانت اند",
26-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
26+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
2727
company: {
2828
name: "رسمیو",
29-
logo: "/images/speakers/company-logo/rasmio.svg",
29+
logo: "/images/speakers/company-logo/rasmio.png",
3030
},
3131
},
3232
{
3333
name: "پوریا باباعلی",
3434
role: "توسعده دهنده فرانت اند",
35-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
35+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
3636
company: {
3737
name: "رسمیو",
38-
logo: "/images/speakers/company-logo/rasmio.svg",
38+
logo: "/images/speakers/company-logo/rasmio.png",
3939
},
4040
},
4141
{
4242
name: "پوریا باباعلی",
4343
role: "توسعده دهنده فرانت اند",
44-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
44+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
4545
company: {
4646
name: "رسمیو",
47-
logo: "/images/speakers/company-logo/rasmio.svg",
47+
logo: "/images/speakers/company-logo/rasmio.png",
4848
},
4949
},
5050
{
5151
name: "پوریا باباعلی",
5252
role: "توسعده دهنده فرانت اند",
53-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
53+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
5454
company: {
5555
name: "رسمیو",
56-
logo: "/images/speakers/company-logo/rasmio.svg",
56+
logo: "/images/speakers/company-logo/rasmio.png",
5757
},
5858
},
5959
{
6060
name: "پوریا باباعلی",
6161
role: "توسعده دهنده فرانت اند",
62-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
62+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
6363
company: {
6464
name: "رسمیو",
65-
logo: "/images/speakers/company-logo/rasmio.svg",
65+
logo: "/images/speakers/company-logo/rasmio.png",
6666
},
6767
},
6868
{
6969
name: "پوریا باباعلی",
7070
role: "توسعده دهنده فرانت اند",
71-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
71+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
7272
company: {
7373
name: "رسمیو",
74-
logo: "/images/speakers/company-logo/rasmio.svg",
74+
logo: "/images/speakers/company-logo/rasmio.png",
7575
},
7676
},
7777
{
7878
name: "پوریا باباعلی",
7979
role: "توسعده دهنده فرانت اند",
80-
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.svg",
80+
imageUrl: "/images/speakers/profile-picture/pooria-baba-ali.webp",
8181
company: {
8282
name: "رسمیو",
83-
logo: "/images/speakers/company-logo/rasmio.svg",
83+
logo: "/images/speakers/company-logo/rasmio.png",
8484
},
8585
},
8686
];

0 commit comments

Comments
 (0)