Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ri-FE-01 into feature/CSID-DGU#6
  • Loading branch information
Minn-Choi committed Dec 2, 2024
2 parents c99131d + fcc4e5f commit 4a67ce1
Show file tree
Hide file tree
Showing 13 changed files with 598 additions and 680 deletions.
4 changes: 4 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= htmlWebpackPlugin.options.title %></title>
<link
href="https://fonts.googleapis.com/css2?family=Nanum+Square+Round:wght@400;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<noscript>
Expand Down
129 changes: 0 additions & 129 deletions src/views/calendar/CalendarMainStyled.js

This file was deleted.

221 changes: 180 additions & 41 deletions src/views/calendar/CalendarMainView.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
<script setup>
import {
PageContainer,
InnerContainer,
MainContent,
SectionTitle,
MonthTitle,
CalendarContainer,
CalendarGrid,
CalendarDay,
CalendarWeek,
DayButton,
SchedulePopup,
LinkButton
} from './CalendarMainStyled.js'
import { ref, onMounted } from 'vue'
import {
DAY_LIST,
Expand Down Expand Up @@ -46,14 +31,27 @@ onMounted(() => {
</script>

<template>
<PageContainer>
<InnerContainer>
<div class="page-container">
<div
class="inner-container"
style="margin-top: 60px; font-family: 'NanumSquareRound', sans-serif"
>
<MainHeader />
<MainContent>
<div class="main-content">
<div>
<SectionTitle>{{ currentYear }} at 동국대학교</SectionTitle>
<h2
class="section-title"
style="font-family: 'NanumSquareRound', sans-serif"
>
{{ currentYear }} at 동국대학교
</h2>
<div class="flex items-center justify-between">
<MonthTitle>{{ currentMonth }}월</MonthTitle>
<h3
class="month-title"
style="font-family: 'NanumSquareRound', sans-serif"
>
{{ currentMonth }}월
</h3>
<div class="flex space-x-6">
<button @click="goToPrevMonth">
<img
Expand All @@ -72,31 +70,42 @@ onMounted(() => {
</div>
</div>

<CalendarContainer>
<CalendarGrid>
<CalendarDay v-for="day in DAY_LIST" :key="day">{{
day
}}</CalendarDay>
</CalendarGrid>
<CalendarWeek v-for="week in weekCalendarList" :key="week.toString()">
<DayButton
<div class="calendar-container">
<div class="calendar-grid">
<div class="calendar-day" v-for="day in DAY_LIST" :key="day">
{{ day }}
</div>
</div>
<div
class="calendar-week"
v-for="week in weekCalendarList"
:key="week.toString()"
>
<button
class="day-button"
:class="{
selected: day === selectedDay,
'sunday-saturday': isSundayOrSaturday(day)
}"
v-for="day in week"
:key="day"
:isSelected="day === selectedDay"
:isSundayOrSaturday="isSundayOrSaturday(day)"
@click="selectDay(day)"
>
{{ day !== 0 ? day : '' }}
</DayButton>
</CalendarWeek>
</CalendarContainer>
</button>
</div>
</div>

<SchedulePopup v-if="isScheduleOpen && selectedEvents.length > 0">
<!-- 일정 내용 -->
</SchedulePopup>
<div
class="schedule-popup"
v-if="isScheduleOpen && selectedEvents.length > 0"
>
<!-- 학사 일정 내용 -->
</div>

<div>
<LinkButton
<a
class="link-button"
v-for="(link, index) in links"
:key="index"
:href="link.url"
Expand All @@ -107,10 +116,140 @@ onMounted(() => {
src="@/assets/Icons/akoming/arrowright.svg"
alt="arrow right"
/>
</LinkButton>
</a>
</div>
</MainContent>
</div>
<MainFooter />
</InnerContainer>
</PageContainer>
</div>
</div>
</template>

<style scoped>
.page-container {
min-height: 100vh;
background-color: #fff9f2;
font-family: 'NanumSquareRound', sans-serif;
display: flex;
justify-content: center;
position: relative;
}
.inner-container {
width: 395px;
min-width: 340px;
background-color: #fae8da;
min-height: 100vh;
position: relative;
overflow-y: auto;
}
.main-content {
display: flex;
flex-direction: column;
padding: 20px 1.5rem 6rem;
margin-top: 30px;
}
.section-title {
font-size: 1.25rem;
font-weight: 500;
color: #4a4a4a;
margin-bottom: 0.5rem;
}
.month-title {
font-size: 1.5rem;
font-weight: bold;
color: #4a4a4a;
}
.calendar-container {
background-color: #fae8da;
border-radius: 0.5rem;
padding: 1rem;
margin-bottom: 1rem;
display: flex;
flex-direction: column;
align-items: center;
}
.calendar-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 1rem;
text-align: center;
margin-bottom: 1rem;
}
.calendar-day {
font-size: 0.875rem;
color: #b3b3b3;
}
.calendar-week {
display: flex;
width: 100%;
justify-content: space-between;
margin-bottom: 0.25rem;
}
.day-button {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
font-size: 0.75rem;
border-radius: 0.5rem;
margin: 0.125rem;
background-color: transparent;
color: #b3b3b3;
transition: background-color 0.3s, color 0.3s;
}
.day-button.selected {
background-color: #ff7f00;
color: white;
}
.day-button.sunday-saturday {
color: #17a1fa;
}
.schedule-popup {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #ffffff;
border-radius: 1.5rem 1.5rem 0 0;
padding: 1.5rem;
overflow-y: auto;
max-height: 60vh;
width: 395px;
margin: 0 auto;
}
.link-button {
display: flex;
align-items: center;
justify-content: space-between;
text-align: left;
padding: 0.5rem 1rem;
background-color: #ffd9bb;
color: #000000;
font-size: 0.875rem;
font-weight: 500;
border-radius: 0.5rem;
text-decoration: none;
max-width: 80%;
margin: 0 auto 0.625rem;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s ease;
}
.link-button:hover {
background-color: #f1cdb1;
}
</style>
Loading

0 comments on commit 4a67ce1

Please sign in to comment.