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

[Feat/#41] 메인 뷰 구현 #63

Merged
merged 42 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
732b37c
feat: 헤더 (캐러셀 제외) 구현
Leeyoonji23 Jan 14, 2025
8c2949c
feat: 헤더 구현
Leeyoonji23 Jan 14, 2025
5fc82ed
feat: 스타일 수정
Leeyoonji23 Jan 14, 2025
3c2e9df
feat: footer 구현
Leeyoonji23 Jan 14, 2025
d39d94b
feat: 인기순위 중간저장
Leeyoonji23 Jan 14, 2025
3cf1b5b
Merge branch 'develop' into feat/#41/mainview
Leeyoonji23 Jan 14, 2025
a28f35e
fix: mainHeader 스타일 수정
Leeyoonji23 Jan 14, 2025
4512d40
feat: 인기 게시글 구현
Leeyoonji23 Jan 14, 2025
5af16ee
feat: footer 색상입히기
Leeyoonji23 Jan 15, 2025
f589ef0
feat: 인기 게시글 스타일 수정
Leeyoonji23 Jan 15, 2025
1bfade7
feat: 증상 부분 추가
Leeyoonji23 Jan 15, 2025
33f8e0e
feat: 증상 퍼블리싱
Leeyoonji23 Jan 15, 2025
d06d60d
feat:증상 스타일 수정
Leeyoonji23 Jan 15, 2025
264fd23
feat: 티끌만한 수정
Leeyoonji23 Jan 15, 2025
ca55146
feat: 버튼 기능 추가 (추후 API 붙일작업 해야됨)
Leeyoonji23 Jan 15, 2025
0a4e200
Merge branch 'develop' into feat/#41/mainview
Leeyoonji23 Jan 15, 2025
e746446
feat: main 뷰 width 값 설정
Leeyoonji23 Jan 15, 2025
1221977
feat: 검색 바 퍼블리싱 완료
Leeyoonji23 Jan 15, 2025
3fc8bb1
feat: 메인뷰 붙이기
Leeyoonji23 Jan 15, 2025
a8e26e8
fix: rem 값 수정
Leeyoonji23 Jan 15, 2025
5bbe011
fix: Nav 스타일 수정
Leeyoonji23 Jan 15, 2025
dd3d8e7
Merge branch 'feat/#41/mainview' of https://github.com/SOPT-all/35-AP…
ocahs9 Jan 17, 2025
6158e35
chore: 이상한 useEffect 제거
ocahs9 Jan 17, 2025
ba27575
fix: 메인헤더 텍스트 삭제
Leeyoonji23 Jan 17, 2025
b5c71df
Merge branch 'feat/#41/mainview' of https://github.com/SOPT-all/35-AP…
ocahs9 Jan 17, 2025
4ead2d1
chore: 빌드에러 해결
ocahs9 Jan 17, 2025
7a15e84
chore: 공백 제거
ocahs9 Jan 17, 2025
51cc0c3
chore: 공백 제거2
ocahs9 Jan 17, 2025
f02da14
캐러셀용 이미지 저장
Leeyoonji23 Jan 17, 2025
01eb32a
fix: 캐러셀 이미지 수정, 자동넘김, 페이지네이션 투명도 설정
Leeyoonji23 Jan 17, 2025
5b0a7ef
fix: 반응형으로 수정
Leeyoonji23 Jan 17, 2025
a0d7a11
fix: 푸터 링크 걸기
Leeyoonji23 Jan 17, 2025
1aec784
fix: 인기 게시글 navigate 구현
Leeyoonji23 Jan 17, 2025
8ceea66
fix: 에러잡기
Leeyoonji23 Jan 17, 2025
9a7b5f9
Merge branch 'develop' into feat/#41/mainview
Leeyoonji23 Jan 18, 2025
0ad0990
충돌해결
Leeyoonji23 Jan 18, 2025
6673a47
TextField 충돌해결
Leeyoonji23 Jan 18, 2025
8450df4
Merge branch 'develop' into feat/#41/mainview
Leeyoonji23 Jan 18, 2025
efcde5f
Merge remote-tracking branch 'origin/develop' into feat/#41/mainview
minjeoong Jan 18, 2025
09f3287
fix: 빌드 에러 해결
minjeoong Jan 18, 2025
7e5ec4f
Merge branch 'feat/#41/mainview' of https://github.com/SOPT-all/35-AP…
Leeyoonji23 Jan 18, 2025
c13491c
feat: 타입변환
Leeyoonji23 Jan 18, 2025
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@vanilla-extract/recipes": "^0.5.5",
"axios": "^1.7.9",
"clsx": "^2.1.1",
"embla-carousel-react": "^8.5.2",
"openapi-typescript": "^7.5.2",
"prop-types": "^15.8.1",
"react": "^18.3.1",
Expand Down
28 changes: 28 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions public/svgs/ic_temporary.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: 1 addition & 8 deletions src/asset/svg/IcClear.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import * as React from "react";
import type { SVGProps } from "react";
const SvgIcClear = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={21}
height={20}
fill="none"
{...props}
>
<svg xmlns="http://www.w3.org/2000/svg" width={21} height={20} fill="none" {...props}>
<path
stroke="#717171"
strokeLinecap="round"
Expand Down
26 changes: 26 additions & 0 deletions src/asset/svg/IcTemporary.tsx
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;
9 changes: 5 additions & 4 deletions src/asset/svg/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
export { default as IcNormal } from "./IcNormal";
export { default as IcBottomSheetLine } from "./IcBottomSheetLine";
export { default as IcoMessage } from "./IcoMessage";
export { default as IcoSkeleton } from "./IcoSkeleton";
export { default as IcDelete } from "./IcDelete";
export { default as IcEllipse57 } from "./IcEllipse57";
export { default as IcShape } from "./IcShape";
export { default as IcClear } from "./IcClear";
export { default as IcDelete } from "./IcDelete";
export { default as IcLogo } from "./IcLogo";
export { default as IcEllipses } from "./IcEllipses";
export { default as IcLeftarrow } from "./IcLeftarrow";
Expand All @@ -14,9 +15,9 @@ export { default as IcSearchFillterBlue } from "./IcSearchFillterBlue";

export { default as Check } from "./Check";
export { default as IcUp } from "./IcUp";
export { default as IcShape } from "./IcShape";
export { default as IcTemporary } from "./IcTemporary";
export { default as IcTest } from "./IcTest";
export { default as IcoMessage } from "./IcoMessage";
export { default as IcoSkeleton } from "./IcoSkeleton";
export { default as Plus } from "./Plus";
export { default as IcToastError } from "./IcToastError";
export { default as React } from "./React";
Expand Down
2 changes: 2 additions & 0 deletions src/common/component/Nav/Nav.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ export const container = style([

export const navItem = recipe({
base: {
width: "5.6rem",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
padding: "0 1.2rem",
whiteSpace: "nowrap",
},
variants: {
state: {
Expand Down
4 changes: 2 additions & 2 deletions src/common/component/TextField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { IcClear } from "@asset/svg";

interface TextFieldProps {
icon?: React.ReactNode;
state?: "default" | "error";
state?: "default" | "error" | "search";
active?: boolean;
placeholder?: string;
value: string;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
onClick?: () => void;
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
onClearClick?: () => void;
Expand Down
10 changes: 9 additions & 1 deletion src/common/component/TextField/styles.css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { recipe } from "@vanilla-extract/recipes";
import { color, font } from "@style/styles.css.ts";
import { color, font, semanticColor } from "@style/styles.css.ts";

export const styles = {
wrapper: recipe({
Expand All @@ -19,6 +19,14 @@ export const styles = {
error: {
border: `0.1rem solid ${color.red.warning_red200}`,
},
search: {
display: "flex",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p4) 위 basedisplay: flex" 속성이 있는데 search에도 추가하신 이유가 있나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

삭제했어요 졸렸나봐요... 꼼꼼 코리 감사합니다 -!

width: "33.5rem",
marginLeft: "2rem",
border: `0.1rem solid ${semanticColor.line.strong}`,
backgroundColor: semanticColor.neutral.normal,
boxShadow: " 0px 2px 10px 0px rgba(0, 0, 0, 0.15)",
},
},
active: {
true: {},
Expand Down
13 changes: 13 additions & 0 deletions src/page/main/index/Main.css.ts
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,
});
85 changes: 40 additions & 45 deletions src/page/main/index/Main.tsx
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=""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5) 검색 기능 구현 아직 안하셔서 value="" 인걸까요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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>
);
};

Expand Down
71 changes: 71 additions & 0 deletions src/page/main/index/hotPost/HotPost.css.ts
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",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3) 혹시 이거, 피그마에서 지정된 색상은 없이 f0f0f0 이었나요?
만약 있었다면 color나 semanticColor로 알맞게 변경부탁드립니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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,
},
]);
Loading
Loading