From 9fbf8da9707c3ea9b0fa0e9e12c5f8a6178e79d4 Mon Sep 17 00:00:00 2001 From: treasure-sky Date: Mon, 23 Sep 2024 01:29:02 +0900 Subject: [PATCH 1/9] =?UTF-8?q?feat:=20=EC=A7=80=EB=8F=84=20=EB=A7=81?= =?UTF-8?q?=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ImageModal/index.css.ts | 14 ++++++++++- src/components/ImageModal/index.tsx | 35 +++++++++++++++++++++++++- src/pages/BoothNFoodList/index.tsx | 18 ++++++------- 3 files changed, 56 insertions(+), 11 deletions(-) diff --git a/src/components/ImageModal/index.css.ts b/src/components/ImageModal/index.css.ts index 1d392e5..176023d 100644 --- a/src/components/ImageModal/index.css.ts +++ b/src/components/ImageModal/index.css.ts @@ -1,13 +1,15 @@ import { style } from "@vanilla-extract/css"; export const container = style({ + position: "relative", width: "100%", height: "100%", }); export const zoomInBtn = style({ position: "absolute", + top: "5px", + left: "5px", cursor: "pointer", - margin: "5px", padding: "3px", borderRadius: "5px", backgroundColor: "rgba(255, 255, 255, 0.3)", @@ -17,3 +19,13 @@ export const image = style({ height: "100%", objectFit: "cover", }); + +export const placeBtn = style({ + position: "absolute", + top: "5px", + right: "5px", + cursor: "pointer", + padding: "3px", + borderRadius: "5px", + backgroundColor: "rgba(255, 255, 255, 0.3)", +}); diff --git a/src/components/ImageModal/index.tsx b/src/components/ImageModal/index.tsx index e48cffe..119ca4d 100644 --- a/src/components/ImageModal/index.tsx +++ b/src/components/ImageModal/index.tsx @@ -1,6 +1,31 @@ import * as styles from "./index.css.ts"; -export default function ImageModal({ src, alt }: { src: string; alt: string }) { +interface ImageModalProps { + src: string; + alt: string; + activePlace?: "60주년기념관" | "함인섭광장" | "대운동장"; +} + +export default function ImageModal({ src, alt, activePlace }: ImageModalProps) { + const placeLinks: { [key: string]: string } = { + "60주년기념관": "https://kko.to/hKoJW3SEaa", + 함인섭광장: "https://kko.to/egxFtxQlQ0", + 대운동장: "https://kko.to/MkBZQvfuH0", + }; + + const handlePlaceButtonClick = () => { + if (activePlace) { + const link = placeLinks[activePlace]; + if (link) { + window.location.href = link; + } else { + console.error(`Link for ${activePlace} is not defined.`); + } + } else { + console.error("activePlace is not provided."); + } + }; + return (
zoom_in + {alt === "layout" && ( + + map + + )} {alt}
); diff --git a/src/pages/BoothNFoodList/index.tsx b/src/pages/BoothNFoodList/index.tsx index 8d83478..651cb6b 100644 --- a/src/pages/BoothNFoodList/index.tsx +++ b/src/pages/BoothNFoodList/index.tsx @@ -29,15 +29,15 @@ export default function BoothNFoodList() {
{activePlace !== "미래광장" && ( )}
From e63c65cddcb99783a38c629980bc938e1ccb2a5d Mon Sep 17 00:00:00 2001 From: treasure-sky Date: Mon, 23 Sep 2024 02:11:25 +0900 Subject: [PATCH 2/9] =?UTF-8?q?chore:=20=ED=95=A8=EC=9D=B8=EC=84=AD?= =?UTF-8?q?=EA=B4=91=EC=9E=A5=20=EB=A7=81=ED=81=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ImageModal/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ImageModal/index.tsx b/src/components/ImageModal/index.tsx index 119ca4d..ddb3d53 100644 --- a/src/components/ImageModal/index.tsx +++ b/src/components/ImageModal/index.tsx @@ -9,7 +9,7 @@ interface ImageModalProps { export default function ImageModal({ src, alt, activePlace }: ImageModalProps) { const placeLinks: { [key: string]: string } = { "60주년기념관": "https://kko.to/hKoJW3SEaa", - 함인섭광장: "https://kko.to/egxFtxQlQ0", + 함인섭광장: "https://kko.to/KvvTprkn8T", 대운동장: "https://kko.to/MkBZQvfuH0", }; From d06328d5a317c1fe897e52ed8b852da07c184a1b Mon Sep 17 00:00:00 2001 From: Kim-jaeyeon Date: Mon, 23 Sep 2024 10:29:54 +0900 Subject: [PATCH 3/9] =?UTF-8?q?Fix(onClick=20=EB=B2=94=EC=9C=84=20?= =?UTF-8?q?=ED=99=95=EC=9E=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Notice/index.tsx | 4 ++-- src/pages/QnA/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Notice/index.tsx b/src/pages/Notice/index.tsx index 664fb0b..778fa2c 100644 --- a/src/pages/Notice/index.tsx +++ b/src/pages/Notice/index.tsx @@ -100,14 +100,14 @@ function Notice() { ) : ( currentNotices.map((noticeItem, index) => (
-
+
toggleNotice(noticeItem.id)} className={notice}>

{index + 1 + (currentPage - 1) * itemsPerPage}

{/* 공지사항의 renewal이 true일 경우 'New' 배지를 표시 */} {noticeItem.renewal && 중요}
-
toggleNotice(noticeItem.id)} className={noticeContentWrapper}> +

{noticeItem.title}

diff --git a/src/pages/QnA/index.tsx b/src/pages/QnA/index.tsx index f3e8b52..81bcffe 100644 --- a/src/pages/QnA/index.tsx +++ b/src/pages/QnA/index.tsx @@ -121,13 +121,13 @@ function QnA() { ) : ( currentNotices.map((QnaItem, index) => (
-
+
toggleQna(QnaItem.id)} className={qna}> {/* 번호와 제목 표시 */}

{index + 1 + (currentPage - 1) * itemsPerPage}

-
toggleQna(QnaItem.id)} className={qnaContentWrapper}> +

{QnaItem.title}

{/* downbtn을 클릭하면 토글 */} From d052d3363d11068ce613a27d9d0d1e71f528144f Mon Sep 17 00:00:00 2001 From: Kim-jaeyeon Date: Mon, 23 Sep 2024 10:48:35 +0900 Subject: [PATCH 4/9] =?UTF-8?q?Fix(=ED=86=A0=EA=B8=80=20=ED=99=94=EC=82=B4?= =?UTF-8?q?=ED=91=9C=20=ED=81=B4=EB=A6=AD=20=EC=95=88=20=EB=90=98=EB=8A=94?= =?UTF-8?q?=20=EB=B2=84=EA=B7=B8=20=ED=95=B4=EA=B2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Notice/index.tsx | 8 +++++++- src/pages/Notice/notice.css.ts | 2 +- src/pages/QnA/index.tsx | 8 ++++++-- src/pages/QnA/qna.css.ts | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/pages/Notice/index.tsx b/src/pages/Notice/index.tsx index 778fa2c..4b35cc3 100644 --- a/src/pages/Notice/index.tsx +++ b/src/pages/Notice/index.tsx @@ -112,7 +112,13 @@ function Notice() {
{/* downbtn을 클릭하면 토글 */} -