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

24.09.23 13시 배포 #110

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 13 additions & 1 deletion src/components/ImageModal/index.css.ts
Original file line number Diff line number Diff line change
@@ -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)",
Expand All @@ -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)",
});
35 changes: 34 additions & 1 deletion src/components/ImageModal/index.tsx
Original file line number Diff line number Diff line change
@@ -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/KvvTprkn8T",
대운동장: "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 (
<div className={styles.container}>
<span
Expand All @@ -9,6 +34,14 @@ export default function ImageModal({ src, alt }: { src: string; alt: string }) {
>
zoom_in
</span>
{alt === "layout" && (
<span
className={`material-symbols-outlined ${styles.placeBtn}`}
onClick={handlePlaceButtonClick}
>
map
</span>
)}
<img src={src} alt={alt} className={styles.image} />
</div>
);
Expand Down
11 changes: 9 additions & 2 deletions src/pages/BoothNFoodDetail/Overview/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import ImageModal from "../../../components/ImageModal/index.tsx";
import { BoothPlaceType } from "../../../shared/types/asset_types.ts";
import * as styles from "./index.css.ts";

type OverviewProps = {
title: string;
date: number[];
imgURL: string;
order: number;
place: string;
place: BoothPlaceType;
};

export default function Overview({ title, date, imgURL, order, place }: OverviewProps) {
Expand All @@ -20,7 +21,13 @@ export default function Overview({ title, date, imgURL, order, place }: Overview
<div className={styles.hoursContainer}>
<div className={styles.hoursLabel}>
<span className="material-symbols-outlined">schedule</span>
<span>{title.includes("주점") ? "18:00 ~ 01:00" : "11:00 ~ 17:00"}</span>
<span>
{title === "주점"
? place === "미래광장"
? "18:00 ~ 00:00"
: "18:00 ~ 01:00"
: "11:00 ~ 17:00"}
</span>
</div>
<div className={styles.hoursLabel}>
<span className="material-symbols-outlined">date_range</span>
Expand Down
18 changes: 9 additions & 9 deletions src/pages/BoothNFoodList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ export default function BoothNFoodList() {
<div className={styles.imgContainer2}>
{activePlace !== "미래광장" && (
<ImageModal
{...{
src:
activePlace === "함인섭광장"
? haminseop_layout
: activePlace === "대운동장"
? playground_layout
: sixty_anniv_layout,
alt: "layout",
}}
src={
activePlace === "함인섭광장"
? haminseop_layout
: activePlace === "대운동장"
? playground_layout
: sixty_anniv_layout
}
alt="layout"
activePlace={activePlace}
/>
)}
</div>
Expand Down
12 changes: 9 additions & 3 deletions src/pages/Notice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,25 @@ function Notice() {
) : (
currentNotices.map((noticeItem, index) => (
<div className={noticeContainer} key={noticeItem.id}>
<div className={notice}>
<div onClick={() => toggleNotice(noticeItem.id)} className={notice}>
<div style={{ display: "flex", alignItems: "center" }}>
<p className={noticeNumber}>{index + 1 + (currentPage - 1) * itemsPerPage}</p>
{/* 공지사항의 renewal이 true일 경우 'New' 배지를 표시 */}
{noticeItem.renewal && <span className={newBadge}>중요</span>}
</div>

<div onClick={() => toggleNotice(noticeItem.id)} className={noticeContentWrapper}>
<div className={noticeContentWrapper}>
<p className={noticeTitle}>{noticeItem.title}</p>
</div>

{/* downbtn을 클릭하면 토글 */}
<button onClick={() => toggleNotice(noticeItem.id)} className={arrowButton}>
<button
onClick={(e) => {
e.stopPropagation(); // 이벤트 전파 방지
toggleNotice(noticeItem.id);
}}
className={arrowButton}
>
<span className="material-symbols-outlined">
{expandedNoticeId === noticeItem.id ? "arrow_drop_up" : "arrow_drop_down"}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Notice/notice.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const notice = style({
alignItems: "center",
flexDirection: "row",
position: "relative",
cursor: "pointer",
"@media": {
"(max-width: 375px)": {
//Iphone SE 같은 소형폰
Expand All @@ -115,7 +116,6 @@ export const noticeContentWrapper = style({
overflow: "hidden", // 넘치는 부분을 숨김
position: "relative",
marginLeft: 10,
cursor: "pointer",
});

export const noticeTitle = style({
Expand Down
12 changes: 8 additions & 4 deletions src/pages/QnA/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,23 @@ function QnA() {
) : (
currentNotices.map((QnaItem, index) => (
<div className={qnaContainer} key={QnaItem.id}>
<div className={qna}>
<div onClick={() => toggleQna(QnaItem.id)} className={qna}>
{/* 번호와 제목 표시 */}
<div style={{ display: "flex", alignItems: "center" }}>
<p className={qnaNumber}>{index + 1 + (currentPage - 1) * itemsPerPage}</p>
</div>

<div onClick={() => toggleQna(QnaItem.id)} className={qnaContentWrapper}>
<div className={qnaContentWrapper}>
<p className={qnaContent}>{QnaItem.title}</p>
</div>

{/* downbtn을 클릭하면 토글 */}
<button
onClick={() => toggleQna(QnaItem.id)}
className={arrowButton} // 스타일 추가
onClick={(e) => {
e.stopPropagation(); // 이벤트 버블링을 막음
toggleQna(QnaItem.id);
}}
className={arrowButton}
>
<span className="material-symbols-outlined">
{expandedQna.includes(QnaItem.id) ? "arrow_drop_up" : "arrow_drop_down"}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/QnA/qna.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const qna = style({
alignItems: "center",
flexDirection: "row",
position: "relative",
cursor: "pointer",
"@media": {
"(max-width: 375px)": {
//Iphone SE 같은 소형폰
Expand All @@ -83,7 +84,6 @@ export const qnaContentWrapper = style({
overflow: "hidden", // 넘치는 부분을 숨김
position: "relative",
marginLeft: 10,
cursor: "pointer",
});

export const qnaContent = style({
Expand Down
11 changes: 9 additions & 2 deletions src/pages/Timetable/.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ export const timeTableDescription = style({
},
});

export const timeTableLink = style({
color: vars.color.blue2,
textDecoration: "none",
marginLeft: "5px",
fontFamily: vars.font.pretendardRegular,
});

export const timeTableTime = style({
fontSize: "0.9rem",
fontWeight: "bold",
Expand Down Expand Up @@ -154,11 +161,11 @@ export const artistImage = style({
});

export const artistName = style({
fontSize: "2rem",
fontSize: "1.7rem",
fontFamily: vars.font.pyeongChangLight,
"@media": {
"screen and (max-width: 768px)": {
fontSize: "2rem",
fontSize: "1.7rem",
},
},
});
Expand Down
14 changes: 13 additions & 1 deletion src/pages/Timetable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,19 @@ const TimeTableItem: React.FC<{
<div className={`${styles.timeTableItem}`} ref={status === "current" ? refCallback : null}>
<h2 className={styles.timeTableTitle}>{timeTable.title}</h2>
{timeTable.descriptionShow && (
<p className={styles.timeTableDescription}>{timeTable.description}</p>
<p className={styles.timeTableDescription}>
{timeTable.description}
{timeTable.link && (
<a
className={styles.timeTableLink}
href={timeTable.link.url}
target="_blank"
rel="noreferrer"
>
{timeTable.link.text}
</a>
)}
</p>
)}
<p className={styles.timeTableTime}>
{timeTable.startTime.getMonth() + 1}/{timeTable.startTime.getDate()} |{" "}
Expand Down
Loading