-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Feat/#41] 메인 뷰 구현 #63
Changes from 21 commits
732b37c
8c2949c
5fc82ed
3c2e9df
d39d94b
3cf1b5b
a28f35e
4512d40
5af16ee
f589ef0
1bfade7
33f8e0e
d06d60d
264fd23
ca55146
0a4e200
e746446
1221977
3fc8bb1
a8e26e8
5bbe011
dd3d8e7
6158e35
ba27575
b5c71df
4ead2d1
7a15e84
51cc0c3
f02da14
01eb32a
5b0a7ef
a0d7a11
1aec784
8ceea66
9a7b5f9
0ad0990
6673a47
8450df4
efcde5f
09f3287
7e5ec4f
c13491c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { SVGProps } from "react"; | ||
const SvgIcTemporary = (props: SVGProps<SVGSVGElement>) => ( | ||
// biome-ignore lint/a11y/noSvgWithoutTitle: <explanation> | ||
<svg xmlns="http://www.w3.org/2000/svg" width={57} height={56} fill="none" {...props}> | ||
<mask | ||
id="ic_temporary_svg__a" | ||
width={57} | ||
height={56} | ||
x={0} | ||
y={0} | ||
maskUnits="userSpaceOnUse" | ||
style={{ | ||
maskType: "alpha", | ||
}} | ||
> | ||
<path | ||
fill="#171719" | ||
d="M22.055 7.584c0-1.16.94-2.1 2.1-2.1h8.16a2.1 2.1 0 1 1 0 4.2h-8.16a2.1 2.1 0 0 1-2.1-2.1M18.093 7.55a2.1 2.1 0 0 1-2.035 2.163c-2 .06-2.832.219-3.426.524l-.02.01c-.901.451-1.65 1.203-2.158 2.172-.304.592-.461 1.426-.522 3.42a2.1 2.1 0 1 1-4.198-.128c.06-1.99.205-3.697.988-5.219l.006-.013c.88-1.684 2.242-3.104 3.994-3.983 1.52-.778 3.223-.921 5.208-.981a2.1 2.1 0 0 1 2.163 2.035M38.377 7.55a2.1 2.1 0 0 1 2.162-2.035c1.986.06 3.689.203 5.208.981 1.753.88 3.114 2.3 3.995 3.983l.006.013c.783 1.522.927 3.228.987 5.219a2.1 2.1 0 1 1-4.198.127c-.06-1.993-.218-2.826-.52-3.42-.509-.968-1.258-1.72-2.158-2.17l-.022-.01c-.593-.306-1.426-.465-3.425-.525a2.1 2.1 0 0 1-2.035-2.163M7.833 21.805c1.16 0 2.1.94 2.1 2.1v8.16a2.1 2.1 0 1 1-4.2 0v-8.16c0-1.16.94-2.1 2.1-2.1M48.636 21.805c1.16 0 2.1.94 2.1 2.1v8.16a2.1 2.1 0 1 1-4.2 0v-8.16c0-1.16.94-2.1 2.1-2.1M48.73 38.127a2.1 2.1 0 0 1 2.036 2.163c-.06 1.99-.204 3.696-.987 5.219l-.007.012c-.88 1.684-2.242 3.104-3.995 3.983-1.52.778-3.222.922-5.207.982a2.1 2.1 0 0 1-.128-4.198c2-.06 2.832-.22 3.426-.524l.02-.011c.901-.45 1.65-1.202 2.159-2.171.303-.593.46-1.427.52-3.42a2.1 2.1 0 0 1 2.163-2.035M7.77 38.157a2.1 2.1 0 0 1 2.162 2.036c.061 1.999.22 2.832.524 3.425l.011.021c.45.9 1.202 1.65 2.171 2.158.593.303 1.427.46 3.42.52a2.1 2.1 0 0 1-.128 4.199c-1.99-.06-3.696-.204-5.219-.987l-.012-.007c-1.684-.88-3.104-2.242-3.983-3.994-.778-1.52-.921-3.222-.982-5.208a2.1 2.1 0 0 1 2.036-2.163M22.055 48.387c0-1.16.94-2.1 2.1-2.1h8.16a2.1 2.1 0 0 1 0 4.2h-8.16a2.1 2.1 0 0 1-2.1-2.1" | ||
/> | ||
</mask> | ||
<g mask="url(#ic_temporary_svg__a)"> | ||
<path fill="#222" d="M.25 0h56v56h-56z" /> | ||
</g> | ||
</svg> | ||
); | ||
export default SvgIcTemporary; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { style } from "@vanilla-extract/css"; | ||
|
||
export const mainContainer = style({ | ||
width: "37.5rem", | ||
margin: "0 auto", | ||
position: "relative", | ||
}); | ||
|
||
export const headerContainer = style({ | ||
position: "absolute", | ||
top: "18rem", | ||
zIndex: 4, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,50 @@ | ||
import MainFooter from "./mainFooter/MainFooter"; | ||
import Divider from "@common/component/Divider/Divider"; | ||
import Spacing from "@common/component/Spacing/Spacing"; | ||
import { Button } from "@common/component/Button"; | ||
import { IcTest } from "@asset/svg"; | ||
import SimpleBottomSheet from "@common/component/SimpleBottomSheet/SimpleBottomSheet"; | ||
import CommentList from "@common/component/Comment/CommentList"; | ||
import { mockComments } from "../../../shared/constant/mockComment"; | ||
import HotPost from "./hotPost/HotPost"; | ||
import MainHeader from "./mainHeader/mainHeader"; | ||
import Symptom from "./symptom/Symptom"; | ||
import { TextField } from "@common/component/TextField"; | ||
import { useNavigate } from "react-router-dom"; | ||
import { IcSearch } from "@asset/svg"; | ||
import * as styles from "./Main.css"; | ||
import Nav from "@common/component/Nav/Nav"; | ||
|
||
const postsData = [ | ||
{ id: 1, title: "실시간 심장병 질문 1위" }, | ||
{ id: 2, title: "가장 인기 있는 산책 코스" }, | ||
{ id: 3, title: "반려동물 먹이 추천" }, | ||
{ id: 4, title: "집에서 하는 셀프 미용 팁" }, | ||
{ id: 5, title: "반려동물과 함께하는 여행 준비" }, | ||
]; | ||
|
||
const petName = "연진이"; | ||
|
||
const Main = () => { | ||
// const { category, categoryData, setOpen, toggleOpen } = useFilterStore(); | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<> | ||
<div style={{ margin: "3rem", display: "flex", gap: "1rem" }}> | ||
<Button label="Button" size="small" variant="solidPrimary" disabled={true} /> | ||
<Button label="Button" size="small" variant="solidPrimary" disabled={false} /> | ||
<Button label="Button" size="medium" variant="solidPrimary" disabled={false} /> | ||
<Button label="Button" size="large" variant="solidPrimary" disabled={false} /> | ||
</div> | ||
<div style={{ margin: "3rem", display: "flex", gap: "1rem" }}> | ||
<Button label="Button" size="small" variant="solidNeutral" disabled={true} /> | ||
<Button label="Button" size="small" variant="solidNeutral" disabled={false} /> | ||
<Button label="Button" size="medium" variant="solidNeutral" disabled={false} /> | ||
<Button label="Button" size="large" variant="solidNeutral" disabled={false} /> | ||
</div> | ||
<div style={{ margin: "3rem", display: "flex", gap: "1rem" }}> | ||
<Button label="Button" size="small" variant="outlinePrimary" disabled={true} /> | ||
<Button label="Button" size="small" variant="outlinePrimary" disabled={false} /> | ||
<Button label="Button" size="medium" variant="outlinePrimary" disabled={false} /> | ||
<Button label="Button" size="large" variant="outlinePrimary" disabled={false} /> | ||
</div> | ||
const handleSearchClick = () => { | ||
navigate("/search"); | ||
}; | ||
|
||
<div style={{ margin: "3rem", display: "flex", gap: "1rem" }}> | ||
<Button label="Button" leftIcon={<IcTest />} size="medium" variant="solidPrimary" disabled={false} /> | ||
<Button label="Button" rightIcon={<IcTest />} size="medium" variant="solidPrimary" disabled={false} /> | ||
<Button | ||
label="Button" | ||
leftIcon={<IcTest />} | ||
rightIcon={<IcTest />} | ||
size="medium" | ||
variant="solidPrimary" | ||
disabled={false} | ||
return ( | ||
<div className={styles.mainContainer}> | ||
<div className={styles.headerContainer}> | ||
<TextField | ||
state="search" | ||
placeholder="심장병, 백내장" | ||
onClick={handleSearchClick} | ||
value="" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p5) 검색 기능 구현 아직 안하셔서 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넹 기획분들이 아직 앱잼 단에서는 여기서 검색기능 없다고 하셔서 일단 그렇게 짰습니다 -! |
||
icon={<IcSearch />} | ||
/> | ||
</div> | ||
|
||
<span>main</span> | ||
<SimpleBottomSheet /> | ||
<Spacing marginBottom="10" /> | ||
<Divider size="small" /> | ||
<Spacing marginBottom="10" /> | ||
<MainHeader /> | ||
<Symptom /> | ||
<Divider /> | ||
<HotPost petName={petName} posts={postsData} /> | ||
<Divider /> | ||
<CommentList comments={mockComments} /> | ||
</> | ||
<MainFooter /> | ||
<Nav /> | ||
</div> | ||
); | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { color, font, semanticColor } from "@style/styles.css"; | ||
import { style } from "@vanilla-extract/css"; | ||
|
||
export const hotPostContainer = style({ | ||
display: "flex", | ||
width: "37.5rem", | ||
flexDirection: "column", | ||
padding: "2rem", | ||
marginTop: "3rem", | ||
}); | ||
|
||
export const p = style([ | ||
font.label01, | ||
{ | ||
color: semanticColor.text.normal, | ||
fontWeight: "500", | ||
letterSpacing: "-0.24rem", | ||
}, | ||
]); | ||
|
||
export const petName = style([ | ||
font.heading02, | ||
{ | ||
fontWeight: "600", | ||
color: color.primary.blue700, | ||
}, | ||
]); | ||
|
||
export const title = style([ | ||
{ marginBottom: "1.2rem" }, | ||
font.heading02, | ||
{ | ||
letterSpacing: "-0.18rem", | ||
color: semanticColor.text.normal, | ||
}, | ||
]); | ||
|
||
export const hotPostListContainer = style({ | ||
display: "flex", | ||
padding: "1.6rem 1.6rem 0rem 1.6rem", | ||
flexDirection: "column", | ||
alignItems: "flex-start", | ||
alignSelf: "stretch", | ||
gap: "1.2rem", | ||
borderRadius: "16px", | ||
border: `0.1rem solid ${semanticColor.text.normal}`, | ||
borderColor: "#f0f0f0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p3) 혹시 이거, 피그마에서 지정된 색상은 없이 f0f0f0 이었나요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 헉 그렇네요..! semanticColor 로 수정 했습니다 ! |
||
}); | ||
|
||
export const postContent = style({ | ||
display: "flex", | ||
gap: "0.4rem", | ||
marginBottom: "1.2rem", | ||
width: "30.3rem", | ||
}); | ||
|
||
export const contentId = style([ | ||
{ gap: "1.2rem" }, | ||
font.body01, | ||
{ | ||
color: semanticColor.primary.strong, | ||
}, | ||
]); | ||
|
||
export const contentTitle = style([ | ||
font.body01, | ||
{ | ||
letterSpacing: "-0.28rem", | ||
color: semanticColor.text.normal, | ||
}, | ||
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p4) 위
base
에display: flex"
속성이 있는데 search에도 추가하신 이유가 있나요?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
삭제했어요 졸렸나봐요... 꼼꼼 코리 감사합니다 -!