Skip to content

Commit 909627c

Browse files
committed
Feature: 치킨 이벤트 카드 추가 및 인스타 링크 연결 (#221)
* fix: 사파리에서 input창 클릭시 확대되는 현상 해결 * feat: event-card 컴포넌트 추가 * style: border 스타일, 폰트스타일 추가 * feat: 인스타 링크 연결 * refactor: 셀프 클로징으로 수정 * refactor: 코드리뷰 반영
1 parent 6ac8167 commit 909627c

5 files changed

Lines changed: 159 additions & 2 deletions

File tree

app/(main)/explore/_components/card-container/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import Card from "@/shared/ui/card";
21
import EmptySection from "@/app/(main)/explore/_components/empty-section";
3-
2+
import EventCard from "@/app/(main)/explore/_components/event-card";
3+
import Card from "@/shared/ui/card";
44
import * as styles from "./card-container.css";
55

66
import { CARD_GRADIENTS } from "@/shared/constants/card";
@@ -24,6 +24,7 @@ const CardContainer = ({ capsules, isLoading }: CardContainerProps) => {
2424

2525
return (
2626
<div className={styles.cardContainer}>
27+
<EventCard />
2728
{capsules.map((capsule, index) => (
2829
<Card
2930
key={capsule.id}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
import { themeVars } from "@/shared/styles/base/theme.css";
2+
import { colorTheme } from "@/shared/styles/tokens/color";
3+
import { screen } from "@/shared/styles/tokens/screen";
4+
import { style } from "@vanilla-extract/css";
5+
6+
export const cardBase = style({
7+
position: "relative",
8+
border: "1.5px solid #4d4d4d",
9+
zIndex: 2,
10+
width: "100%",
11+
height: "24.5rem",
12+
borderRadius: "16px",
13+
display: "flex",
14+
flexDirection: "column",
15+
overflow: "hidden",
16+
cursor: "pointer",
17+
backgroundColor: themeVars.color.white[5],
18+
background: "linear-gradient(180deg, #202025 50%, #5B5D8E 100%)",
19+
...screen.md({
20+
height: "30rem",
21+
}),
22+
});
23+
24+
export const chipClass = style({
25+
...themeVars.text.F12,
26+
height: "1.9rem",
27+
...screen.md({
28+
...themeVars.text.F14,
29+
height: "2.25rem",
30+
}),
31+
});
32+
33+
export const cardGradientOverlay = style({
34+
position: "absolute",
35+
top: 0,
36+
left: 0,
37+
width: "100%",
38+
height: "100%",
39+
pointerEvents: "none",
40+
zIndex: 1,
41+
});
42+
43+
export const cardContentWrapper = style({
44+
height: "50%",
45+
width: "100%",
46+
display: "flex",
47+
flexDirection: "column",
48+
padding: "1.4rem",
49+
gap: "0.7rem",
50+
51+
...screen.md({
52+
padding: "2rem",
53+
gap: "0.8rem",
54+
}),
55+
});
56+
57+
export const cardTopWrapper = style({
58+
display: "flex",
59+
flexDirection: "row",
60+
gap: "1.4rem",
61+
alignItems: "center",
62+
background: "linear-gradient(90deg, #8CA8FA 0%, #886DF4 100%)",
63+
backgroundClip: "text",
64+
WebkitBackgroundClip: "text",
65+
color: "transparent",
66+
fontFamily: "Pretendard",
67+
fontSize: "1.4rem",
68+
fontStyle: "normal",
69+
fontWeight: "800",
70+
lineHeight: "140%",
71+
...screen.md({
72+
fontSize: "1.6rem",
73+
}),
74+
});
75+
76+
export const cardIcon = style({
77+
width: "12.6rem",
78+
height: "9.7rem",
79+
});
80+
81+
export const cardIconWrapper = style({
82+
position: "relative",
83+
zIndex: 2,
84+
width: "100%",
85+
height: "50%",
86+
padding: "2rem",
87+
display: "flex",
88+
justifyContent: "flex-end",
89+
alignItems: "flex-end",
90+
});
91+
92+
export const cardTitle = style({
93+
whiteSpace: "pre-wrap",
94+
wordWrap: "break-word",
95+
wordBreak: "break-word",
96+
...themeVars.text.F17,
97+
color: colorTheme.white[85],
98+
99+
...screen.md({
100+
...themeVars.text.F22,
101+
}),
102+
});
103+
104+
export const cardDescription = style({
105+
whiteSpace: "pre-wrap",
106+
...themeVars.text.F14,
107+
color: colorTheme.white[60],
108+
gap: "0.4rem",
109+
display: "flex",
110+
flexDirection: "row",
111+
112+
...screen.md({
113+
...themeVars.text.F15,
114+
color: colorTheme.white[50],
115+
}),
116+
});
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import HoverMotion from "@/shared/ui/motion/hover-motion";
2+
import { cn } from "@/shared/utils/cn";
3+
import * as styles from "./event-card.css";
4+
5+
const eventLink = "https://www.instagram.com/p/DNpm2HGp8Ow/?img_index=1";
6+
7+
const EventCard = () => {
8+
return (
9+
<HoverMotion>
10+
<a
11+
className={styles.cardBase}
12+
href={eventLink}
13+
target="_blank"
14+
rel="noreferrer"
15+
>
16+
<div className={cn(styles.cardGradientOverlay)} />
17+
<div className={styles.cardContentWrapper}>
18+
<div className={styles.cardTopWrapper}>OPEN EVENT</div>
19+
<span className={styles.cardTitle}>
20+
타임캡슐 만들고
21+
<br />
22+
치킨 받아가요!
23+
</span>
24+
<div className={styles.cardDescription}>
25+
<span>9/30까지</span>
26+
</div>
27+
</div>
28+
<div className={styles.cardIconWrapper}>
29+
<div className={styles.cardIcon}>
30+
<img src="/event-chicken.png" alt="이벤트 치킨" />
31+
</div>
32+
</div>
33+
</a>
34+
</HoverMotion>
35+
);
36+
};
37+
38+
export default EventCard;

app/(sub)/search/_components/search-bar-section/search-bar-section.css.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export const searchBar = style({
2323
backgroundColor: themeVars.color.white[5],
2424
padding: "1.2rem 1.8rem 1.2rem 4.8rem",
2525
borderRadius: "12px",
26+
zoom: 1,
27+
fontSize: "16px",
2628
selectors: {
2729
"&::placeholder": {
2830
color: themeVars.color.white[40],

public/event-chicken.png

19.2 KB
Loading

0 commit comments

Comments
 (0)