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: 게시판/게시물 퍼블리싱 #262

Merged
merged 29 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
da972cf
Feat: 홈 폴더 및 페이지 생성
Nahyun-Kang Aug 8, 2024
5076fea
Design: 추천 리스터 css 수정
Nahyun-Kang Aug 8, 2024
7582642
Feat: 헤더 컴포넌트 생성
Nahyun-Kang Aug 15, 2024
e03c63d
Merge branch 'dev' of https://github.com/Nahyun-Kang/ListyWave-front …
Nahyun-Kang Aug 15, 2024
5c08f0b
Feat: 헤더 퍼블리싱 완료
Nahyun-Kang Aug 15, 2024
3bf6cbd
Feat: 트렌딩리스트 수정
Nahyun-Kang Aug 16, 2024
a3277ca
Chore: 불필요한 css 파일 삭제
Nahyun-Kang Aug 16, 2024
7d9f6ab
Feat: 플로팅 버튼 정리
Nahyun-Kang Aug 18, 2024
698c56f
Fix: 플로팅 버튼 디자인 수정
Nahyun-Kang Aug 18, 2024
8f022e5
Feat: 주제 요청하기 버튼 만들기
Nahyun-Kang Aug 18, 2024
880bd9f
Merge branch 'dev' into Feature/homeamend
Nahyun-Kang Sep 27, 2024
cc2a666
Feat: 헤더 로직 구현
Nahyun-Kang Sep 27, 2024
bf037c8
Feat: 최신 리스트 수정
Nahyun-Kang Sep 27, 2024
767f53a
Feat: 팔로잉 리스트 구현 완료
Nahyun-Kang Sep 27, 2024
f579dc5
Style: 일부 코드 정리
Nahyun-Kang Oct 14, 2024
9fbea7c
Feat: 게시판 퍼블리싱 완료
Nahyun-Kang Oct 14, 2024
a77393d
Feat: 게시물 페이지 특 작성
Nahyun-Kang Oct 20, 2024
4c742a2
Feat: 게시판 타입 수정
Nahyun-Kang Oct 23, 2024
a608ac6
Feat: 게시물 퍼블리싱 완료
Nahyun-Kang Oct 23, 2024
5572e40
Fix: 목데이터 및 퍼블리싱 수정
Nahyun-Kang Oct 23, 2024
3023afc
Merge branch 'dev' of https://github.com/8-Sprinters/ListyWave-front …
Nahyun-Kang Oct 27, 2024
a99fb98
Fix: 목데이터 보강
Nahyun-Kang Oct 27, 2024
ece24a5
Feat: 게시판 퍼블리싱 완료
Nahyun-Kang Oct 14, 2024
93dd197
Feat: 게시물 페이지 특 작성
Nahyun-Kang Oct 20, 2024
fbf8826
Feat: 게시판 타입 수정
Nahyun-Kang Oct 23, 2024
ff3c572
Feat: 게시물 퍼블리싱 완료
Nahyun-Kang Oct 23, 2024
97a2685
Fix: 코드리뷰 반영
Nahyun-Kang Oct 29, 2024
1a21622
Fix: 빌드에러 수정
Nahyun-Kang Oct 29, 2024
77970be
Fix: ci에러해결
Nahyun-Kang Oct 29, 2024
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
2 changes: 1 addition & 1 deletion public/icons/arrow_up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/icons/ver3/Avatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/bell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/blue_heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/chevron_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/house.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: 9 additions & 0 deletions public/icons/ver3/list_create.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/ver3/square_pencil.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions src/app/(home)/_components/Categories.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { style } from '@vanilla-extract/css';

export const gridContainer = style({
padding: '0 16px',

width: '100%',
position: 'relative',
});

export const list = style({
display: 'inline-flex',
gap: '8px',
flexWrap: 'wrap',
listStyle: 'none',
padding: 0,
margin: 0,
});

export const item = style({
padding: '6px 12px',
flexShrink: 0,

borderRadius: '20px',
backgroundColor: '#fff',
fontWeight: '500',
fontSize: '1.4rem',
color: '#8599AD',
});

export const selectedItem = style([
item,
{
backgroundColor: '#E3EEFF',
color: '#3D95FF',
},
]);

export const alignText = style({
flexGrow: 1,
});

export const orderDropdown = style({
display: 'flex',
alignItems: 'center',
gap: '8px',
float: 'right',
});

export const order = style({
fontWeight: '400',
fontSize: '1.6rem',
color: '#3C4F76',
});
54 changes: 54 additions & 0 deletions src/app/(home)/_components/Categories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use client';

import { useState } from 'react';
import { useQuery } from '@tanstack/react-query';

import { CategoryType } from '@/lib/types/categoriesType';
import { QUERY_KEYS } from '@/lib/constants/queryKeys';
import getCategories from '@/app/_api/category/getCategories';

import * as styles from './Categories.css';
import ChevronDown from '/public/icons/ver3/chevron_down.svg';

interface CategoriesType {
onClick: (name: string) => void;
}

function Categories({ onClick }: CategoriesType) {
const [selectedCategoryCode, setSelectedCategoryCode] = useState('0');

const { data, isFetching } = useQuery<CategoryType[]>({
queryKey: [QUERY_KEYS.getCategories],
queryFn: getCategories,
});

const handleClickCategory = (codeNum: string, name: string) => {
setSelectedCategoryCode(codeNum);
onClick(name);
};

return (
<div className={styles.gridContainer}>
<ul className={styles.list}>
{data?.map((el) => {
return (
<li key={el.code}>
<button
className={selectedCategoryCode === el.code ? `${styles.selectedItem}` : `${styles.item}`}
onClick={() => handleClickCategory(el.code, el.engName)}
>
{el.korName}
</button>
</li>
);
})}
</ul>
{/* <div className={styles.orderDropdown}>
<span className={styles.order}>정렬</span>
<ChevronDown />
</div> */}
</div>
);
}

export default Categories;
23 changes: 23 additions & 0 deletions src/app/(home)/_components/Feed.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use client';

import { useTab } from '@/store/useTab';

import HomeTab from '@/app/(home)/_components/HomeTab';
import RecommendationFeed from '@/app/(home)/_components/RecommendationFeed';
import FollowingFeed from '@/app/(home)/_components/FollowingFeed';
import RecentFeed from '@/app/(home)/_components/RecentFeed';

function Feed() {
const { currentTab } = useTab();

return (
<div>
<HomeTab />
{currentTab === 'recommendation' && <RecommendationFeed />}
{currentTab === 'recent' && <RecentFeed />}
{currentTab === 'following' && <FollowingFeed />}
</div>
);
}

export default Feed;
136 changes: 136 additions & 0 deletions src/app/(home)/_components/FeedLists.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
import { style, createVar, keyframes } from '@vanilla-extract/css';
import { vars } from '@/styles/__theme.css';
import { headlineSmall } from '@/styles/__font.css';

export const listBackground = createVar();

export const wrapperOuter = style({
padding: '0 16px 30px',
marginTop: '12px',

display: 'flex',
flexDirection: 'column',
});

export const titleWrapper = style({
marginBottom: '26px',

display: 'flex',
alignItems: 'baseline',
gap: '5px',
});

export const sectionTitle = style([
headlineSmall,
{
fontWeight: 600,
},
]);

const listWrapperHoverAnimation = keyframes({
'0%': {
transform: 'scale(1)',
},
'100%': {
transform: 'scale(1.01)',
},
});

export const listWrapper = style({
width: '100%',
marginBottom: '35px',
padding: '30px 24px 14px',

position: 'relative',

display: 'flex',
flexDirection: 'column',
borderRadius: '24px',
backgroundColor: '#fff',

':hover': {
animation: `${listWrapperHoverAnimation} 0.1s forwards`,
boxShadow: 'rgba(0, 0, 0, 0.04) 0px 3px 5px',
},
});

export const listTopWrapper = style({
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',

marginBottom: '8px',
});

export const version = style({
padding: '6px 12px',

fontWeight: '400',
letterSpacing: '-3%',
fontSize: '1.4rem',
color: '#3D95FF',
backgroundColor: '#EEF6FF',
borderRadius: '20px',
});

export const listInformationWrapper = style({
marginBottom: '20px',

display: 'flex',
flexDirection: 'column',
});

export const listTitle = style({
color: '#3E4455',
wordBreak: 'break-word',
fontWeight: '700',
fontSize: '2rem',
letterSpacing: '-3%',
});

export const listDescription = style({
marginTop: '13px',

fontWeight: '400',
fontSize: '1.6rem',
color: '#3E4455',
wordBreak: 'break-word',
});

export const ownerInformationWrapper = style({
display: 'flex',
justifyContent: 'flex-start',
alignItems: 'center',
gap: '8px',
});

export const ownerNicknameText = style({
color: '#676B75',
fontSize: '1.6rem',
fontWeight: '500',
letterSpacing: '-3%',
});

export const profileImageWrapper = style({
width: '30px',
height: '30px',

position: 'relative',
});

export const ownerProfileImage = style({
borderRadius: '50%',
});

export const simpleListWrapper = style({
height: 'auto',
padding: '20px 16px',
marginBottom: '16px',

display: 'flex',
flexDirection: 'column',
gap: '10px',

borderTop: `1px solid ${vars.color.gray5}`,
backgroundColor: vars.color.white,
});
Loading
Loading