Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d718074
style: ํƒœ๊ทธ ์Šคํƒ€์ผ ๊ฐœ์„  ๋ฐ ๋ ˆ์ด์•„์›ƒ ์ˆ˜์ •
jungsunbeen May 31, 2025
44b410c
Merge pull request #39 from OpenKetchupSource/feat/33
jungsunbeen May 31, 2025
a500a6a
feat: ๋ณ„ํ‘œ ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ๋ฐ ์ƒํƒœ ๊ด€๋ฆฌ ๊ตฌํ˜„
jungsunbeen May 31, 2025
a21899a
feat: ๋Œ“๊ธ€ ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„ ๋ฐ ์Šคํƒ€์ผ๋ง ์ถ”๊ฐ€
jungsunbeen May 31, 2025
678d487
feat: ๋Œ“๊ธ€ ๋ชฉ๋ก ์ œ๋ชฉ ์ˆ˜์ •
jungsunbeen May 31, 2025
c5d8206
feat: ๋Œ“๊ธ€ ๋ชฉ๋ก์— ๋„ค๋น„๊ฒŒ์ด์…˜ ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ๋ฐ ์Šคํƒ€์ผ๋ง ๊ฐœ์„ 
jungsunbeen May 31, 2025
4d66497
fix: ๋Œ“๊ธ€ ์ปดํฌ๋„ŒํŠธ ์•„์ด์ฝ˜ ํฌ๊ธฐ ์กฐ์ • ๋ฐ ์Šคํƒ€์ผ ๊ฐœ์„ 
jungsunbeen May 31, 2025
8a34fdc
Merge branch 'develop' of https://github.com/OpenKetchupSource/Web inโ€ฆ
jungsunbeen May 31, 2025
8f56361
Merge pull request #40 from OpenKetchupSource/feat/36
jungsunbeen May 31, 2025
7faf02d
feat: ํ—ค๋” ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„ ๋ฐ ๋Œ“๊ธ€ ํŽ˜์ด์ง€์— ํ†ตํ•ฉ
jungsunbeen May 31, 2025
67c78c4
feat: ํ—ค๋” ์ปดํฌ๋„ŒํŠธ์˜ props ๊ตฌ์กฐ ๊ฐœ์„  ๋ฐ ํ•ด์‹œํƒœ๊ทธ ์ƒ์„ธ ํŽ˜์ด์ง€ ์ถ”๊ฐ€
jungsunbeen May 31, 2025
d29c89f
feat: ํ•ด์‹œํƒœ๊ทธ ์ƒ์„ธ ํŽ˜์ด์ง€ ๋ผ์šฐํŠธ ์ถ”๊ฐ€
jungsunbeen May 31, 2025
1912915
feat: ๋‹ค์ด์–ด๋ฆฌ ์ƒ์„ธ ํŽ˜์ด์ง€์—์„œ ํƒœ๊ทธ ๋ฐ•์Šค ๋ฐ ํƒœ๊ทธ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€
jungsunbeen May 31, 2025
6dfddbc
fix: ํ•ด์‹œํƒœ๊ทธ ์ƒ์„ธ ํŽ˜์ด์ง€ ๋ผ์šฐํŠธ ๊ฒฝ๋กœ ์ˆ˜์ •
jungsunbeen May 31, 2025
8afde07
feat: ํ•ด์‹œํƒœ๊ทธ ๋ชฉ๋ก์—์„œ ํƒœ๊ทธ ํด๋ฆญ ์‹œ ์ƒ์„ธ ํŽ˜์ด์ง€๋กœ ์ด๋™ ๊ธฐ๋Šฅ ์ถ”๊ฐ€
jungsunbeen May 31, 2025
3eff51a
feat: ํ•ด์‹œํƒœ๊ทธ ์ƒ์„ธ ํŽ˜์ด์ง€์— ๋‹ค์ด์–ด๋ฆฌ ๋ชฉ๋ก ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€
jungsunbeen May 31, 2025
9474e56
Merge pull request #41 from OpenKetchupSource/feat/36
jungsunbeen May 31, 2025
4835d86
fix: ๋ถˆํ•„์š”ํ•œ TheFooter ์ปดํฌ๋„ŒํŠธ ์ž„ํฌํŠธ ์ œ๊ฑฐ
jungsunbeen May 31, 2025
1eec332
fix: .github/workflows์—์„œ closed-issue.yml ํŒŒ์ผ ์‚ญ์ œ
jungsunbeen May 31, 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
41 changes: 0 additions & 41 deletions .github/workflows/closed-issue.yml

This file was deleted.

2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import styled from "styled-components";
import WritingPage from "./pages/writing/WritingPage";
import Testpage from "./pages/Testpage";
import EditPage from "./pages/writing/EditPage";
import HashtagDetail from "./pages/collection/HashtagDetail";

function App() {
return (
Expand All @@ -29,6 +30,7 @@ function App() {

<Route path="/comments" element={<Comments />} />
<Route path="/hashtags" element={<Hashtags />} />
<Route path="/hashtag/:id" element={<HashtagDetail />} />
<Route path="/test" element={<Testpage />} />
</Routes>
</Wrapper>
Expand Down
83 changes: 82 additions & 1 deletion src/components/diary/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,84 @@
const Header = () => {};
import styled from "styled-components";
import {
IoChevronBack,
IoChevronForward,
IoHomeOutline,
} from "react-icons/io5";
import { useNavigate } from "react-router-dom";

interface HeaderProps {
characterList: string[];
currentIndex: number;
setCurrentIndex: React.Dispatch<React.SetStateAction<number>>;
}

const Header = ({
characterList,
currentIndex,
setCurrentIndex,
}: HeaderProps) => {
const navigate = useNavigate();

const goPrev = () => {
setCurrentIndex(
(prev) => (prev - 1 + characterList.length) % characterList.length,
);
};

const goNext = () => {
setCurrentIndex((prev) => (prev + 1) % characterList.length);
};

return (
<HeaderWrapper>
<IoHomeOutline size={24} color="#2d3552" onClick={() => navigate("/")} />

<CenterContainer>
<ClickableIcon onClick={goPrev}>
<IoChevronBack />
</ClickableIcon>
<Name>{characterList[currentIndex]}</Name>
<ClickableIcon onClick={goNext}>
<IoChevronForward />
</ClickableIcon>
</CenterContainer>

<Placeholder />
</HeaderWrapper>
);
};

export default Header;

const HeaderWrapper = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
`;

const CenterContainer = styled.div`
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 160px;
display: flex;
align-items: center;
justify-content: space-between;
color: #2d3552;
font-weight: 500;
font-size: 1.2rem;
`;

const Name = styled.span`
flex: 1;
text-align: center;
`;

const Placeholder = styled.div`
width: 28px;
`;

const ClickableIcon = styled.div`
cursor: pointer;
`;
14 changes: 10 additions & 4 deletions src/components/home/DiaryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,19 @@ export const DiaryTitle = styled.div`

export const TagWrapper = styled.div`
display: flex;
gap: 8px;
font-size: 14px;
color: #3b82f6;
flex-wrap: nowrap;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-bottom: 8px;
`;

export const Tag = styled.span``;
export const Tag = styled.span`
font-size: 14px;
color: #3b82f6;
margin-right: 8px;
flex-shrink: 0;
`;

export const Content = styled.div`
font-size: 14px;
Expand Down
38 changes: 29 additions & 9 deletions src/pages/DiaryDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "styled-components";
import { IoHomeOutline, IoTrashBinOutline } from "react-icons/io5";
import { BsPencil } from "react-icons/bs";
import { BsPencil, BsStar, BsStarFill } from "react-icons/bs";
import { useNavigate, useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { getDiary } from "../services/apis/diary/diary";
Expand Down Expand Up @@ -48,6 +48,8 @@ const DiaryDetail = () => {
}
}, [diary]);

const [starred, setStarred] = useState(false);

const formatDate = (rawDate: string) => {
const date = new Date(rawDate);
return `${date.getFullYear()}.${String(date.getMonth() + 1).padStart(2, "0")}.${String(date.getDate()).padStart(2, "0")}.`;
Expand Down Expand Up @@ -87,6 +89,11 @@ const DiaryDetail = () => {
alt={diary.character}
/>
<CharacterName>{diary.character}</CharacterName>
{starred ? (
<StarIconFill onClick={() => setStarred(false)} />
) : (
<StarIcon onClick={() => setStarred(true)} />
)}
</CharacterRow>
<CommentText>
{aiComment || "AI ์ฝ”๋ฉ˜ํŠธ๋ฅผ ์ƒ์„ฑ ์ค‘์ž…๋‹ˆ๋‹ค..."}
Expand Down Expand Up @@ -148,7 +155,7 @@ const EditIcon = styled(BsPencil)`
color: #1e2a52;
`;

const Body = styled.div`
export const Body = styled.div`
padding: 24px;
display: flex;
flex-direction: column;
Expand All @@ -162,13 +169,13 @@ const Title = styled.h2`
border-radius: 8px;
`;

const TagBox = styled.div`
export const TagBox = styled.div`
display: flex;
gap: 8px;
flex-wrap: wrap;
`;

const Tag = styled.span`
export const Tag = styled.span`
background: #ffffff;
color: #2563eb;
padding: 6px 12px;
Expand All @@ -191,34 +198,47 @@ const CommentTitle = styled.h3`
color: #1e2a52;
`;

const CommentCard = styled.div`
export const CommentCard = styled.div`
background: #fff;
border-radius: 16px;
padding: 16px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
`;

const CharacterRow = styled.div`
export const CharacterRow = styled.div`
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 8px;
`;

const CharacterImg = styled.img`
export const CharacterImg = styled.img`
width: 40px;
height: 40px;
border-radius: 50%;
`;

const CharacterName = styled.div`
export const CharacterName = styled.div`
font-size: 16px;
font-weight: 600;
color: #1e2a52;
`;

const CommentText = styled.p`
export const CommentText = styled.p`
font-size: 14px;
color: #374151;
line-height: 1.6;
`;

export const StarIcon = styled(BsStar)`
margin-left: auto;
font-size: 20px;
cursor: pointer;
`;

export const StarIconFill = styled(BsStarFill)`
margin-left: auto;
font-size: 20px;
color: #ffd600;
cursor: pointer;
`;
66 changes: 62 additions & 4 deletions src/pages/collection/Comments.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,67 @@
import { useState } from "react";
import {
Body,
CharacterImg,
CharacterName,
CharacterRow,
CommentCard,
CommentText,
StarIcon,
StarIconFill,
} from "../DiaryDetail";
import Header from "../../components/diary/Header";

const dummyComments = [
"์˜ค๋žœ๋งŒ์— ์˜ํ™”๊ด€์—์„œ ์ข‹์€ ์‹œ๊ฐ„ ๋ณด๋ƒˆ๋‹ค๋‹ˆ ๋‚ด๊ฐ€ ๋‹ค ๊ธฐ์˜๋‹ค! ๋„ˆ์˜ ์—ฌ์œ ๋กœ์šด ํ•˜๋ฃจ๊ฐ€ ์ฐธ ๋”ฐ๋œปํ•˜๊ฒŒ ๋А๊ปด์ ธ :)",
"์˜ค๋Š˜ ํ•˜๋ฃจ๋„ ์ˆ˜๊ณ  ๋งŽ์•˜์–ด! ๋„ˆ์˜ ์ผ์ƒ์ด ๋” ํ–‰๋ณตํ•ด์ง€๊ธธ ๋ฐ”๋ž„๊ฒŒ.",
"์ƒˆ๋กœ์šด ๋„์ „์„ ํ–ˆ๋‹ค๋Š” ๋ง์— ๋‚˜๋„ ํž˜์ด ๋‚˜! ๊ณ„์† ์‘์›ํ• ๊ฒŒ :)",
];

const characterList = ["์›…์ด", "์•™๊ธ€์ด", "ํ‹ฐ๋ฐ”๋…ธ"];

const Comments = () => {
const [starred, setStarred] = useState<boolean[]>(
new Array(dummyComments.length).fill(false),
);
const [currentIndex, setCurrentIndex] = useState(0);

return (
<>
<>Comments</>
<p>์ผ๋‹จ ์—†๋Š” ๊ฑธ๋กœ</p>
</>
<Body>
<Header
characterList={characterList}
currentIndex={currentIndex}
setCurrentIndex={setCurrentIndex}
/>

<div>์ฆ๊ฒจ์ฐพ๊ธฐ ํ•œ ์ฝ”๋ฉ˜ํŠธ ๋ชฉ๋ก</div>
{dummyComments.map((comment, index) => (
<CommentCard key={index}>
<CharacterRow>
<CharacterImg src={`/images/characters/์›…์ด.png`} alt="์›…์ด" />
<CharacterName>์›…์ด</CharacterName>
{starred[index] ? (
<StarIconFill
onClick={() => {
const newStars = [...starred];
newStars[index] = false;
setStarred(newStars);
}}
/>
) : (
<StarIcon
onClick={() => {
const newStars = [...starred];
newStars[index] = true;
setStarred(newStars);
}}
/>
)}
</CharacterRow>
<CommentText>{comment}</CommentText>
</CommentCard>
))}
</Body>
);
};

export default Comments;
31 changes: 31 additions & 0 deletions src/pages/collection/HashtagDetail.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { useState } from "react";
import Header from "../../components/diary/Header";
import { Body } from "../DiaryDetail";
import DiaryList from "../../components/home/DiaryList";

const characterList = [
"์Šฌํ””",
"ํ–‰๋ณต",
"๊ธฐ์จ",
"์‚ฌ๋ž‘",
"์šฐ์ •",
"์ถ”์–ต",
"์—ฌํ–‰",
"์ผ์ƒ",
"๊ฟˆ",
];

const HashtagDetail = () => {
const [currentIndex, setCurrentIndex] = useState(0);
return (
<Body>
<Header
characterList={characterList}
currentIndex={currentIndex}
setCurrentIndex={setCurrentIndex}
/>
<DiaryList />
</Body>
);
};
export default HashtagDetail;
Loading
Loading