Skip to content

Commit d27b8b1

Browse files
Merge pull request #88 from sparcs-kaist/feat/MainPage
special card for PM
2 parents 0ed08a6 + d3c2812 commit d27b8b1

File tree

3 files changed

+115
-26
lines changed

3 files changed

+115
-26
lines changed

src/app/makers/components/MakerCard.tsx

Lines changed: 100 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,60 +20,144 @@ const MakerCard: React.FC<MakerCardProps> = ({
2020
isProject = false,
2121
onClick
2222
}) => {
23+
// PM인지 확인
24+
const isPM = position?.includes('Project Manager');
25+
2326
if (isProject) {
2427
return (
2528
<div
2629
className={`
27-
w-[220px] h-[80px] rounded-[10px] bg-white flex flex-col items-center justify-center
30+
w-full max-w-[200px] h-[100px] rounded-[10px] bg-white flex flex-col items-center justify-center
2831
relative hover:shadow-lg transition-shadow duration-300 ease-in-out
2932
${active ? 'shadow-md' : 'shadow-sm'}
3033
cursor-pointer
31-
sm:w-[110px]
34+
sm:w-full sm:max-w-none
3235
`}
3336
onClick={onClick}
3437
>
35-
<span className="text-[15px] font-bold leading-[1.47] sm:text-[12px] sm:text-center">
38+
<span className="text-[16px] font-bold leading-[1.47] sm:text-[14px] sm:text-center px-2">
3639
{title}
3740
</span>
38-
<span className="mt-[12px] text-[9px] font-medium leading-[1.44] text-gray-400">
41+
<span className="mt-[12px] text-[10px] font-medium leading-[1.44] text-gray-400">
3942
{subtitle}
4043
</span>
4144
{launched && (
42-
<span className="text-[9px] font-medium leading-[1.44] text-gray-400">
45+
<span className="text-[10px] font-medium leading-[1.44] text-gray-400">
4346
launched at {launched}
4447
</span>
4548
)}
4649
</div>
4750
);
4851
}
4952

53+
// PM 카드 레이아웃
54+
if (isPM) {
55+
return (
56+
<div className={`
57+
w-full max-w-[220px] h-[140px] py-0 px-[30px] rounded-[10px]
58+
bg-gradient-to-br from-[#fff3d1] to-white
59+
shadow-sm
60+
flex flex-row items-center justify-between
61+
hover:shadow-md transition-all duration-1000 ease-in-out
62+
relative overflow-visible
63+
sm:w-full sm:max-w-none
64+
`}>
65+
<div className="absolute inset-0 z-[1] pointer-events-none overflow-hidden rounded-[10px]">
66+
<div
67+
style={{
68+
position: 'absolute',
69+
top: '0',
70+
width: '80%',
71+
height: '200%',
72+
background: 'linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.95), rgba(255,255,255,0))',
73+
opacity: '0.7',
74+
transform: 'skewX(45deg)',
75+
animation: 'pmShine 1.5s ease-in-out infinite',
76+
boxShadow: '0 0 30px 10px rgba(255,255,255,0.5)',
77+
}}
78+
/>
79+
</div>
80+
<div className="flex flex-col items-start z-[2] max-w-[55%]">
81+
<span className="text-[20px] font-bold leading-[1.3] text-[#333] truncate w-full">
82+
{title}
83+
</span>
84+
<div className="mt-[4px] flex flex-row items-center">
85+
<div className="w-[13px] h-[20px] overflow-hidden mr-1 flex-shrink-0">
86+
<Image
87+
src="/SparcsLogo.svg"
88+
alt="Sparcs Logo"
89+
width={70}
90+
height={20}
91+
className="w-[70px] max-w-none [filter:invert(74%)_sepia(56%)_saturate(1094%)_hue-rotate(347deg)_brightness(97%)_contrast(92%)]"
92+
/>
93+
</div>
94+
<span className="text-[14px] font-extrabold leading-[1.5] font-['Raleway'] text-[#eba12a] truncate">
95+
{subtitle}
96+
</span>
97+
</div>
98+
</div>
99+
100+
<div className="z-[2] self-center flex-shrink-0 flex flex-col items-end">
101+
<span className="text-[12px] font-semibold leading-[1.4] text-[#eba12a] mb-1">
102+
{position?.match(/\d{4}/)?.[0] || ''}
103+
</span>
104+
<span className="text-[12px] font-bold leading-[1.4] text-[#eba12a] text-right">
105+
Project Manager
106+
</span>
107+
</div>
108+
109+
<style dangerouslySetInnerHTML={{
110+
__html: `
111+
@keyframes pmShine {
112+
0% {
113+
left: -150%;
114+
}
115+
100% {
116+
left: 150%;
117+
}
118+
}
119+
120+
@keyframes borderRotate {
121+
0% {
122+
transform: rotate(0deg);
123+
}
124+
100% {
125+
transform: rotate(360deg);
126+
}
127+
}
128+
`
129+
}} />
130+
</div>
131+
);
132+
}
133+
50134
return (
51135
<div className={`
52-
w-[280px] h-[120px] py-0 px-[36px] rounded-[10px] shadow-md bg-white
136+
w-full max-w-[220px] h-[140px] py-0 px-[30px] rounded-[10px] shadow-sm bg-white
53137
flex flex-row items-center justify-between
54-
hover:shadow-lg transition-shadow duration-300 ease-in-out
55-
sm:w-[120px] sm:flex-col sm:justify-center
138+
hover:shadow-md transition-shadow duration-300 ease-in-out
139+
sm:w-full sm:max-w-none
56140
`}>
57-
<div className="flex flex-col items-start sm:items-center">
58-
<span className="text-[20px] font-bold leading-[1.5] sm:text-[14px] sm:text-center">
141+
<div className="flex flex-col items-start max-w-[65%]">
142+
<span className="text-[18px] font-bold leading-[1.5] truncate w-full">
59143
{title}
60144
</span>
61-
<div className="mt-[4px] flex flex-row items-start">
62-
<div className="w-[13px] h-[20px] overflow-hidden">
145+
<div className="mt-[4px] flex flex-row items-center">
146+
<div className="w-[13px] h-[20px] overflow-hidden mr-1 flex-shrink-0">
63147
<Image
64-
src="SparcsLogo.svg"
148+
src="/SparcsLogo.svg"
65149
alt="Sparcs Logo"
66150
width={70}
67151
height={20}
68-
className="w-[70px] max-w-none filter-[invert(63%)_sepia(71%)_saturate(514%)_hue-rotate(352deg)_brightness(97%)_contrast(91%)]"
152+
className="w-[70px] max-w-none [filter:invert(74%)_sepia(56%)_saturate(1094%)_hue-rotate(347deg)_brightness(97%)_contrast(92%)]"
69153
/>
70154
</div>
71-
<span className="text-[13px] font-extrabold leading-[1.5] font-['Raleway'] text-[#eba12a]">
155+
<span className="text-[13px] font-extrabold leading-[1.5] font-['Raleway'] text-[#eba12a] truncate">
72156
{subtitle}
73157
</span>
74158
</div>
75159
</div>
76-
<span className="text-[10px] font-medium leading-[1.5] text-gray-400 sm:mt-[5px] sm:text-center">
160+
<span className="text-[10px] font-medium leading-[1.5] text-gray-400 text-right flex-shrink-0">
77161
{position}
78162
</span>
79163
</div>

src/app/makers/page.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ export default function Makers() {
219219
};
220220

221221
return (
222-
<div className="max-w-[1280px] mx-auto px-4 py-8 bg-[#fafafa]">
222+
<div className="max-w-[1280px] w-[80%] mx-auto px-4 py-8 bg-[#fafafa]">
223223
<h1 className="text-[20px] font-bold leading-[1.45] mb-[18px] mx-[90px] md:mx-0 sm:mx-[50px] xs:mx-[20px]">
224224
Project
225225
</h1>
226226

227-
<div className="grid gap-[10px] justify-center mb-[48px] grid-cols-[repeat(auto-fit,minmax(220px,max-content))] sm:grid-cols-[repeat(auto-fit,minmax(110px,max-content))]">
227+
<div className="grid gap-[15px] justify-center mb-[48px] grid-cols-6 lg:grid-cols-5 md:grid-cols-4 sm:grid-cols-2 xs:grid-cols-1">
228228
{projects.map((project, index) => (
229229
<MakerCard
230230
key={project.name}
@@ -237,14 +237,13 @@ export default function Makers() {
237237
/>
238238
))}
239239
</div>
240-
241240
{projects[selected]?.description && (
242241
<div className="flex w-full flex-col justify-center my-[48px]">
243242
<h2 className="text-[20px] font-bold leading-[1.45] mb-[18px] mx-[90px] md:mx-0 sm:mx-[50px] xs:mx-[20px]">
244243
Description
245244
</h2>
246-
<div className="rounded-[10px] shadow-md bg-white p-[22px_64px] mt-[30px] mx-[90px] md:mx-0 sm:mx-[50px] sm:p-[22px_22px] xs:mx-[20px]">
247-
<p className="text-[15px] font-medium leading-[1.47] text-left sm:text-[12px]">
245+
<div className="rounded-[10px] shadow-sm bg-white p-[22px_64px] mt-[30px] mx-[90px] md:mx-0 sm:mx-[50px] sm:p-[22px_22px] xs:mx-[20px]">
246+
<p className="text-[16px] font-normal leading-[1.47] text-left">
248247
{projects[selected].description}
249248
</p>
250249
</div>
@@ -254,8 +253,7 @@ export default function Makers() {
254253
<h2 className="text-[20px] font-bold leading-[1.45] mb-[18px] mx-[90px] md:mx-0 sm:mx-[50px] xs:mx-[20px]">
255254
Member
256255
</h2>
257-
258-
<div className="grid gap-[10px] justify-center mt-[48px] mb-[10px] grid-cols-[repeat(auto-fit,minmax(280px,max-content))] sm:grid-cols-[repeat(auto-fit,minmax(120px,max-content))]">
256+
<div className="grid gap-[15px] justify-center mt-[48px] mb-[10px] grid-cols-5 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2 xs:grid-cols-1">
259257
{positions.map(position =>
260258
projects[selected].members[position as keyof typeof projects[typeof selected]['members']]?.map((member: any) => (
261259
<MakerCard

tailwind.config.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@ export default {
1919
ara_event_yellow_bright: "#FFEDD2",
2020
ara_event_green_bright: "#F8FFCC",
2121
},
22+
keyframes: {
23+
shine: {
24+
"0%": { transform: "translateX(-100%) rotate(45deg)" },
25+
"100%": { transform: "translateX(200%) rotate(45deg)" },
26+
},
27+
},
28+
animation: {
29+
shine: "shine 3s ease-in-out infinite",
30+
},
2231
},
2332
},
24-
plugins: [
25-
require("@tailwindcss/typography"),
26-
],
33+
plugins: [require("@tailwindcss/typography")],
2734
} satisfies Config;

0 commit comments

Comments
 (0)