Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a221768
[style] ์Šคํ”ผ๋„ˆ ui ์™„๋ฃŒ
EunbinJung Sep 24, 2025
709b01d
[style]keep์ปดํฌ๋„ŒํŠธ
mtm-git1018 Sep 23, 2025
3fb2731
[style]keep์ปดํฌ๋„ŒํŠธ ์•„์ด์ฝ˜ ํŽธ์ง‘
mtm-git1018 Sep 24, 2025
7999e09
[style] ์Šคํ”ผ๋„ˆ ui ์™„๋ฃŒ
EunbinJung Sep 24, 2025
a1ce68f
[chore] ์ถฉ๋Œ ํ•ด๊ฒฐ
EunbinJung Sep 24, 2025
c39465f
[style] ์Šคํ”ผ๋„ˆ ui ์™„๋ฃŒ
EunbinJung Sep 24, 2025
f6bfa0a
[style]keep์ปดํฌ๋„ŒํŠธ
mtm-git1018 Sep 23, 2025
316e09f
[style]keep์ปดํฌ๋„ŒํŠธ ์•„์ด์ฝ˜ ํŽธ์ง‘
mtm-git1018 Sep 24, 2025
7af729c
[style] ์Šคํ”ผ๋„ˆ ui ์™„๋ฃŒ
EunbinJung Sep 24, 2025
6ab0033
[chore] ์ถฉ๋Œ ํ•ด๊ฒฐ
EunbinJung Sep 24, 2025
74687b6
[style]๋ ˆ์‹œํ”ผ ํŽ˜์ด์ง€ ์ œ์ž‘
mtm-git1018 Sep 24, 2025
5afa4aa
[style]pageHeader์ปดํฌ๋„ŒํŠธ
mtm-git1018 Sep 24, 2025
4ce69c0
[style]page header์ปดํฌ๋„ŒํŠธ
mtm-git1018 Sep 24, 2025
dd92856
[style] star_bg๋ณ€๊ฒฝ
mtm-git1018 Sep 24, 2025
f0c38ba
[style] ์ปค๋ฎค๋‹ˆํ‹ฐ ui ์ž‘์—…
EunbinJung Sep 24, 2025
88c253b
[fix] ์˜ค๋ฅ˜ ์ˆ˜์ •
EunbinJung Sep 24, 2025
e2e0f71
[style] ์ปค๋ฎค๋‹ˆํ‹ฐ ui
EunbinJung Sep 24, 2025
54fee17
[style] ์‹œ๋งจํ‹ฑ ํƒœ๊ทธ ์ ‘๊ทผ์„ฑ ์ถ”๊ฐ€
EunbinJung Sep 24, 2025
2d1aebb
[refactor] ์‹œ๋งจํ‹ฑํƒœ๊ทธ ์ˆ˜์ •
EunbinJung Sep 24, 2025
30acec5
[style] ์Šคํ”ผ๋„ˆ ui ์™„๋ฃŒ
EunbinJung Sep 24, 2025
41fd64c
[style]keep์ปดํฌ๋„ŒํŠธ
mtm-git1018 Sep 23, 2025
1469169
[style] ์Šคํ”ผ๋„ˆ ui ์™„๋ฃŒ
EunbinJung Sep 24, 2025
2a5036e
[style]keep์ปดํฌ๋„ŒํŠธ
mtm-git1018 Sep 23, 2025
980876a
[style]keep์ปดํฌ๋„ŒํŠธ ์•„์ด์ฝ˜ ํŽธ์ง‘
mtm-git1018 Sep 24, 2025
0586a3d
Merge branch 'dev' into style/community#18
EunbinJung Sep 24, 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
35 changes: 34 additions & 1 deletion src/app/community/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
import CommunityFilter from '@/shared/components/community/CommunityFilter';
import CommunityHeader from '@/shared/components/community/CommunityHeader';
import CommunityTab from '@/shared/components/community/CommunityTab';
import PostCard from '@/shared/components/community/PostCard';
import WriteBtn from '@/shared/components/community/WriteBtn';

function Page() {
return <div></div>;
return (
<main className="page-layout max-w-1024">
<div className="mt-3 mb-10 flex flex-col gap-8 ">
<section aria-labelledby="community-heading">
<h1 id="community-heading" className="sr-only">
์ปค๋ฎค๋‹ˆํ‹ฐ ํŽ˜์ด์ง€
</h1>
<CommunityHeader />
</section>

<section
aria-label="ํƒญ๊ณผ ๊ธ€์“ฐ๊ธฐ"
className="flex justify-between item-center sm:flex-row flex-col gap-4 mt-1"
>
<CommunityTab />
<WriteBtn />
</section>

<section aria-label="๊ฒŒ์‹œ๋ฌผ ๋ชฉ๋ก">
<CommunityFilter />
<PostCard label="๋ ˆ์‹œํ”ผ" />
<PostCard label="ํŒ" />
<PostCard label="์งˆ๋ฌธ" />
<PostCard label="์ž์œ " />
</section>
</div>
</main>
);
}
export default Page;
Binary file added src/shared/assets/images/prepost_img.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/shared/components/InputBox/SelectBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function SelectBox({ ref, option, title }: Props) {
};

return (
<div className="flex flex-col gap-2 relative h-6 w-30">
<div className="flex flex-col gap-2 relative h-6">
<button
ref={ref}
className="flex gap-2 cursor-pointer text-base"
Expand All @@ -38,7 +38,7 @@ function SelectBox({ ref, option, title }: Props) {

<ul
className={`w-30 bg-white text-gray-dark p-2 rounded-xl duration-200 absolute transition-all
${isOpen ? 'opacity-100 top-8' : 'opacity-0 pointer-events-none top-4'}`}
${isOpen ? 'opacity-100 top-8 right-0' : 'opacity-0 pointer-events-none top-4 right-0'}`}
role="listbox"
>
{option.map((v, i) => (
Expand Down
16 changes: 16 additions & 0 deletions src/shared/components/community/CommunityFilter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use client';

import SelectBox from '../InputBox/SelectBox';
function CommunityFilter() {
return (
<section
className="w-full flex justify-between items-center border-b-1 border-gray-light pb-1.5"
aria-label="์ปค๋ฎค๋‹ˆํ‹ฐ ์ •๋ ฌ ํ•„ํ„ฐ"
>
<p aria-live="polite">100๊ฐœ</p>
<SelectBox option={['์ตœ์‹ ์ˆœ', '์ธ๊ธฐ์ˆœ', '๋Œ“๊ธ€์ˆœ']} title={'์ตœ์‹ ์ˆœ'} />
</section>
);
}

export default CommunityFilter;
12 changes: 12 additions & 0 deletions src/shared/components/community/CommunityHeader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import PageHeader from '../pageHeader/PageHeader';
import headerImg from '@/shared/assets/images/community_page_header.webp';

function CommunityHeader() {
return (
<section aria-label="์ปค๋ฎค๋‹ˆํ‹ฐ ํ—ค๋”">
<PageHeader src={headerImg} title="Community" description="์นตํ…Œ์ผ์— ๊ด€ํ•œ ๋ชจ๋“  ์ด์•ผ๊ธฐ" />
</section>
);
}

export default CommunityHeader;
42 changes: 42 additions & 0 deletions src/shared/components/community/CommunityTab.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'use client';

import tw from '@/shared/utills/tw';
import { useState } from 'react';

const tabItem = [
{ title: '์ „์ฒด' },
{ title: '๋ ˆ์‹œํ”ผ' },
{ title: 'ํŒ' },
{ title: '์งˆ๋ฌธ' },
{ title: '์ž์œ ' },
];

function CommunityTab() {
const [selectedIdx, setSelectedIdx] = useState(0);

return (
<section className="relative sm:w-[70%] w-full" aria-label="์ปค๋ฎค๋‹ˆํ‹ฐ ํƒญ">
<div className="w-full overflow-x-scroll no-scrollbar scroll-smooth">
<div className="flex gap-3 w-max" aria-label="์ปค๋ฎค๋‹ˆํ‹ฐ ์นดํ…Œ๊ณ ๋ฆฌ">
{tabItem.map(({ title }, idx) => (
<button
key={title + idx}
role="tab"
aria-selected={selectedIdx === idx}
tabIndex={selectedIdx === idx ? 0 : -1}
onClick={() => setSelectedIdx(idx)}
className={tw(
`border-1 py-1 px-3 rounded-2xl transition-colors ease-in`,
selectedIdx === idx ? 'bg-secondary text-primary' : ''
)}
>
{title}
</button>
))}
</div>
</div>
</section>
);
}

export default CommunityTab;
44 changes: 44 additions & 0 deletions src/shared/components/community/PostCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import Image from 'next/image';
import prePost from '@/shared/assets/images/prepost_img.webp';
import PostLabel from './PostLabel';

function PostCard({ label }: { label: string }) {
return (
<article className="pt-[30] pb-3 border-b-1 border-gray-light">
<PostLabel title={label} />

<section className="flex items-start justify-between mt-3 cursor-pointer" role="link">
<div className="flex flex-col gap-3">
<p className="font-bold sm:text-xl text-lg">์นตํ…Œ์ผ ๋งŒ๋“ค ๋•Œ ์ค€๋น„๋ฌผ</p>
<div className="font-light sm:text-[15px] text-sm">
<p>์นตํ…Œ์ผ ์ฒ˜์Œ ๋งŒ๋“ค์–ด ๋ณด๋Š”๋ฐ ๋ž„๋ž„</p>
<p>๊ฐ€๋‚˜๋‹ค๋ผ๋งˆ๋ฐ”์‚ฌ์•„์ž์ฐจ์นดํŒŒํƒ€ํ•˜</p>
</div>
<ul
className="flex font-light sm:gap-3 gap-1 sm:text-[14px] text-[12px] text-gray"
aria-label="๊ฒŒ์‹œ๊ธ€ ์ •๋ณด"
>
<li>์‹ค๋ฒ„๋ธฌ</li>
<li aria-hidden="true">|</li>
<li>3๋ถ„ ์ „</li>
<li aria-hidden="true">|</li>
<li>์กฐํšŒ 3</li>
<li aria-hidden="true">|</li>
<li>๋Œ“๊ธ€ 3</li>
</ul>
</div>
<figure className="flex items-start">
<Image
src={prePost}
alt="์˜ˆ๋น„์‚ฌ์ง„"
width={120}
height={120}
className="md:w-[120px] sm:w-[100px] w-[80px] self-start"
/>
</figure>
</section>
</article>
);
}

export default PostCard;
24 changes: 24 additions & 0 deletions src/shared/components/community/PostLabel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function PostLabel({ title }: { title: string }) {
return (
<span
role="status"
aria-label={title}
className={` text-primary py-1 px-2 rounded-md text-sm
${
title === '๋ ˆ์‹œํ”ผ'
? 'bg-[#FFE4E6]'
: title === 'ํŒ'
? 'bg-[#EDE9FE]'
: title === '์งˆ๋ฌธ'
? 'bg-[#E0F2FE]'
: title === '์ž์œ '
? 'bg-[#D1FAE5]'
: ''
}`}
>
{title}
</span>
);
}

export default PostLabel;
12 changes: 12 additions & 0 deletions src/shared/components/community/WriteBtn.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Write from '@/shared/assets/icons/edit_28.svg';

function WriteBtn() {
return (
<button className="flex items-center justify-center py-1 px-2.5 bg-tertiary rounded-lg">
<Write />
๊ธ€์“ฐ๊ธฐ
</button>
);
}

export default WriteBtn;
65 changes: 33 additions & 32 deletions src/shared/components/header/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ function DropdownMenu({ isClicked, setIsClicked }: Props) {
};

return (
<div
<nav
className="w-full h-screen bg-secondary absolute top-0 left-0 px-[12px] font-serif block sm:hidden"
role="menu"
role="navigation"
aria-label="๋ฉ”์ธ ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฉ”๋‰ด"
tabIndex={-1}
id="mobile-dropdown-menu"
Expand All @@ -75,52 +75,53 @@ function DropdownMenu({ isClicked, setIsClicked }: Props) {
className="w-[62px] md:w-[82px] h-auto"
/>
</div>
<div className="my-5">
<ul className="flex flex-col gap-[12px] text-black px-2">
{navItem.map(({ label, href }, idx) => (
<li
className={`font-normal ${pathname === href ? 'pl-1' : 'px-3 py-[12px]'}`}
key={href}
<ul className="flex flex-col gap-[12px] text-black px-2 my-5">
{navItem.map(({ label, href }, idx) => (
<li className={`font-normal ${pathname === href ? 'pl-1' : 'px-3 py-[12px]'}`} key={href}>
<Link
href={href}
onNavigate={() => setIsClicked(false)}
className={`items-start ${pathname === href ? 'bg-tertiary/70 inline-flex pr-5 p-2 rounded-md text-secondary' : 'hover:text-black/70 flex'}`}
aria-current={pathname === href ? 'page' : undefined}
>
<Link
href={href}
onNavigate={() => setIsClicked(false)}
className={`items-start ${pathname === href ? 'bg-tertiary/70 inline-flex pr-5 p-2 rounded-md text-secondary' : 'hover:text-black/70 flex'}`}
aria-current={pathname === href ? 'page' : undefined}
<span className="text-[20px] mr-3">{idx + 1}. </span>
<span
className="text-[28px]"
ref={(el) => {
textRef.current[idx] = el;
}}
onMouseEnter={() => handleMouseEnter(idx)}
onMouseLeave={() => handleMouseLeave(idx)}
>
<span className="text-[20px] mr-3">{idx + 1}. </span>
<span
className="text-[28px]"
ref={(el) => {
textRef.current[idx] = el;
}}
onMouseEnter={() => handleMouseEnter(idx)}
onMouseLeave={() => handleMouseLeave(idx)}
>
{label}
</span>
</Link>
</li>
))}
</ul>
</div>
<div className="border border-t-[1px] border-t-gray flex items-center py-[32px] gap-2">
{label}
</span>
</Link>
</li>
))}
</ul>

<section
aria-label="๋กœ๊ทธ์ธ ๋กœ๊ทธ์•„์›ƒ"
className="border border-t-[1px] border-t-gray flex items-center py-[32px] gap-2"
>
<User color="var(--color-primary)" />
<button type="button" className="text-black font-light text-xl hover:text-black/70">
๋กœ๊ทธ์ธ/ํšŒ์›๊ฐ€์ž…
</button>
</div>
</section>

<div className="absolute top-1.5 left-3">
<button
type="button"
aria-label="๋ชจ๋ฐ”์ผ ๋ฉ”๋‰ด ๋‹ซ๊ธฐ"
onClick={() => {
setIsClicked(false);
}}
>
<Close color="var(--color-primary)" className="w-8 h-8" />
</button>
</div>
</div>
</nav>
);
}

Expand Down
5 changes: 5 additions & 0 deletions src/shared/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@
.scroll-down {
transform: translateY(-100%);
}

.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}