hfexample's picture
Deploy clean snapshot of the repository
e221c83
/* --- ๊ฐ์ •๋ณ„ ์ƒ‰์ƒ ๋ณ€์ˆ˜ --- */
:root {
--primary-theme-color: #7b68ee; /* ๋ณด๋ผ์ƒ‰ ํฌ์ธํŠธ */
--background-light: #f4f7fc;
--text-dark: #333;
--text-light: #888;
--dot-joy: #ffdd57;
--dot-sad: #5390e3;
--dot-angry: #ff6b6b;
--dot-anxious: #9775fa;
--dot-surprised: #ffa94d;
--dot-hurt: #48d1cc;
--dot-default: #e0e0e0;
}
/* --- ์ „์ฒด ๋ ˆ์ด์•„์›ƒ --- */
.dashboard-container {
display: flex;
width: 95%;
max-width: 1400px;
height: 750px;
margin: 2rem auto;
margin-top: 5rem;
background-color: white;
border-radius: 20px;
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
overflow: hidden;
font-family: 'Spoqa Han Sans Neo', sans-serif;
}
/* --- 1. ์ขŒ์ธก ์‚ฌ์ด๋“œ๋ฐ” --- */
.sidebar {
width: 200px;
background-color: var(--primary-theme-color);
color: white;
padding: 0.5rem 0;
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.year-selector {
display: flex;
justify-content: space-around;
align-items: center;
padding: 0 1.5rem;
margin-bottom: 2rem;
}
.year-selector h2 {
font-size: 1.5rem;
margin: 0;
}
.year-selector button {
background: none;
border: none;
color: white;
font-size: 1.2rem;
cursor: pointer;
opacity: 0.8;
transition: opacity 0.2s;
}
.year-selector button:hover {
opacity: 1;
}
.month-list {
list-style: none;
padding: 0;
margin: 0;
flex-grow: 1;
}
.month-item {
padding: 0.7rem 2rem;
font-size: 1.3rem;
cursor: pointer;
transition: background-color 0.2s;
opacity: 0.7;
position: relative;
}
.month-item:hover, .month-item.active {
background-color: rgba(255, 255, 255, 0.1);
opacity: 1;
}
.month-item.active::before {
content: '';
position: absolute;
left: 0;
top: 0;
width: 4px;
height: 100%;
background-color: white;
}
.sidebar-footer {
text-align: center;
font-size: 0.9rem;
opacity: 0.6;
}
/* --- 2. ์ค‘์•™ ๋‹ฌ๋ ฅ --- */
.calendar-area {
flex-grow: 1;
padding: 2rem 2.5rem;
background-color: #fff;
display: flex;
flex-direction: column;
}
.calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.calendar-header h2 {
font-size: 2rem;
color: var(--text-dark);
margin: 0;
}
.add-btn {
background-color: var(--primary-theme-color);
color: white;
border: none;
width: 40px;
height: 40px;
border-radius: 50%;
font-size: 1.8rem;
cursor: pointer;
transition: transform 0.2s;
}
.add-btn:hover { transform: scale(1.1); }
/* Flatpickr ์ปค์Šคํ…€ */
#calendar {
flex-grow: 1;
display: flex;
}
.flatpickr-calendar {
width: 100% !important;
max-width: none !important;
padding: 0 !important;
height: 100%;
background: transparent;
box-shadow: none;
font-family: inherit;
display: flex;
flex-direction: column;
}
.flatpickr-innerContainer {
height: 100%;
display: flex;
flex-direction: column;
flex-grow: 1;
}
.flatpickr-rContainer {
flex-grow: 1;
display: flex;
flex-direction: column;
width: 100%;
}
/* --- ์š”์ผ ํ—ค๋” ์ •๋ ฌ ์ˆ˜์ • (Weekday Alignment Fix) --- */
.flatpickr-weekdays {
display: flex !important; /* Grid ๋Œ€์‹  Flex ์‚ฌ์šฉ */
width: 100% !important;
padding: 0 2.5rem !important;
box-sizing: border-box !important;
margin: 0 0 10px 0 !important;
overflow: hidden; /* ๋„˜์น˜๋Š” ๊ฒƒ ๋ฐฉ์ง€ */
}
span.flatpickr-weekday {
/* 7๋“ฑ๋ถ„ ๊ฐ•์ œ ์ ์šฉ (100% / 7 = 14.2857%) */
flex: 1 0 14.28% !important;
max-width: 14.28% !important;
display: flex !important;
justify-content: center !important;
align-items: center !important;
color: #888 !important;
font-weight: 600 !important;
font-size: 0.9rem !important;
margin: 0 !important;
}
.flatpickr-days {
width: 100%;
flex-grow: 1;
}
.dayContainer {
display: grid !important;
grid-template-columns: repeat(7, 1fr) !important;
width: 100% !important;
min-width: 100% !important;
max-width: 100% !important;
height: 100%;
justify-items: center !important;
gap: 0 !important;
padding: 0 2.5rem !important; /* Match weekday padding */
box-sizing: border-box; /* Match weekday box-sizing */
}
.flatpickr-day {
width: 100% !important;
max-width: none !important;
margin: 0 !important;
height: 80px !important; /* ์›๋ž˜ ๋†’์ด ์œ ์ง€ */
border-radius: 12px;
position: relative;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.2s, color 0.2s; /* color transition ์ถ”๊ฐ€ */
font-size: 1.4rem;
overflow: hidden; /* ๊ฐ€์ƒ์š”์†Œ๊ฐ€ ๋‘ฅ๊ทผ ๋ชจ์„œ๋ฆฌ๋ฅผ ๋„˜์ง€ ์•Š๋„๋ก */
}
/* ๋‚ ์งœ ์ˆซ์ž ์Šคํƒ€์ผ */
.flatpickr-day span.flatpickr-day-num {
position: relative;
z-index: 2; /* ๋ฐฐ๊ฒฝ๋ณด๋‹ค ์œ„์— ์˜ค๋„๋ก */
}
/* ์ผ๊ธฐ๊ฐ€ ์žˆ๋Š” ๋‚ ์˜ ๊ฐ€์ƒ์š”์†Œ (๋ฐฐ๊ฒฝ ์—ญํ• ) */
.flatpickr-day.has-diary::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1; /* ์ˆซ์ž๋ณด๋‹ค ๋’ค์— ์˜ค๋„๋ก */
transition: background-color 0.2s;
}
.flatpickr-day.today {
border: 1px solid var(--primary-theme-color);
}
.flatpickr-day:not(.has-diary):hover { /* ์ผ๊ธฐ๊ฐ€ ์—†๋Š” ๋‚ ์งœ์—๋งŒ ์ ์šฉ */
background-color: #f0edff;
}
.flatpickr-day.has-diary:hover::before { /* ์ผ๊ธฐ๊ฐ€ ์žˆ๋Š” ๋‚ ์งœ๋Š” ๋ฐ๊ธฐ๋งŒ ์กฐ์ ˆ */
filter: brightness(90%);
}
.flatpickr-day.selected {
border: 2px solid var(--primary-theme-color); /* ๋ฐฐ๊ฒฝ์ƒ‰ ๋Œ€์‹  ํ…Œ๋‘๋ฆฌ๋กœ ์„ ํƒ ํ‘œ์‹œ */
}
/* .flatpickr-day.selected::before ๊ทœ์น™์€ ์™„์ „ํžˆ ์ œ๊ฑฐ๋จ */
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: #ccc; }
.flatpickr-day.has-diary {
color: white; /* ๊ธฐ๋ณธ ํ…์ŠคํŠธ ์ƒ‰์ƒ์„ ํฐ์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝ */
}
/* ๊ฐ์ •๋ณ„ ๋ฐฐ๊ฒฝ์ƒ‰ (๊ฐ€์ƒ์š”์†Œ์— ์ ์šฉ) */
.flatpickr-day.has-diary.bg-๊ธฐ์จ::before { background-color: var(--dot-joy); }
.flatpickr-day.has-diary.bg-์Šฌํ””::before { background-color: var(--dot-sad); }
.flatpickr-day.has-diary.bg-๋ถ„๋…ธ::before { background-color: var(--dot-angry); }
.flatpickr-day.has-diary.bg-๋ถˆ์•ˆ::before { background-color: var(--dot-anxious); }
.flatpickr-day.has-diary.bg-๋‹นํ™ฉ::before { background-color: var(--dot-surprised); }
.flatpickr-day.has-diary.bg-์ƒ์ฒ˜::before { background-color: var(--dot-hurt); }
.flatpickr-day.has-diary.bg-default::before { background-color: var(--dot-default); }
.flatpickr-day.has-diary.bg-๊ธฐ์จ span.flatpickr-day-num,
.flatpickr-day.has-diary.bg-๋‹นํ™ฉ span.flatpickr-day-num,
.flatpickr-day.has-diary.bg-default span.flatpickr-day-num {
color: #333; /* ๋ฐ์€ ๋ฐฐ๊ฒฝ์ƒ‰์— ์–ด๋‘์šด ๊ธ€์ž์ƒ‰ ์ ์šฉ */
}
.flatpickr-day.today.has-diary {
border: none; /* ๋ฐฐ๊ฒฝ์ƒ‰์ด ์ฑ„์›Œ์ง€๋ฏ€๋กœ ํ…Œ๋‘๋ฆฌ ์ œ๊ฑฐ */
}
/* --- 3. ์šฐ์ธก ํƒ€์ž„๋ผ์ธ --- */
.timeline-area {
width: 350px;
background-color: #fcfcfc;
border-left: 1px solid #f0f0f0;
padding: 2rem;
overflow-y: auto;
flex-shrink: 0;
}
.timeline-title {
font-size: 1.5rem;
color: var(--text-dark);
margin: 0 0 2rem 0;
}
.timeline-area .placeholder {
text-align: center;
color: var(--text-light);
padding-top: 5rem;
}
#diary-list-container { position: relative; }
.timeline-item {
position: relative;
padding-left: 30px;
padding-bottom: 25px;
border-left: 2px solid #e0e0e0;
}
/* ํƒ€์ž„๋ผ์ธ ๋งˆ์ง€๋ง‰ ์•„์ดํ…œ์˜ ์„  ์ œ๊ฑฐ */
.timeline-item:last-child { border-left: 2px solid transparent; }
/* ํƒ€์ž„๋ผ์ธ ์  */
.timeline-item::before {
content: '';
position: absolute;
left: -9px; /* (16px / 2) - 2px */
top: 0;
width: 16px;
height: 16px;
border-radius: 50%;
background-color: white;
border: 3px solid var(--primary-theme-color);
}
.timeline-item.item-๊ธฐ์จ::before { border-color: var(--dot-joy); }
.timeline-item.item-์Šฌํ””::before { border-color: var(--dot-sad); }
.timeline-item.item-๋ถ„๋…ธ::before { border-color: var(--dot-angry); }
.timeline-item.item-๋ถˆ์•ˆ::before { border-color: var(--dot-anxious); }
.timeline-item.item-๋‹นํ™ฉ::before { border-color: var(--dot-surprised); }
.timeline-item.item-์ƒ์ฒ˜::before { border-color: var(--dot-hurt); }
.timeline-item.item-default::before { border-color: var(--dot-default); }
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.item-time {
font-weight: 600;
color: var(--text-dark);
}
.item-emotion {
font-size: 1.2rem;
}
.item-controls {
display: flex;
align-items: center;
gap: 10px; /* ์ด๋ชจ์ง€์™€ ์‚ญ์ œ ๋ฒ„ํŠผ ์‚ฌ์ด ๊ฐ„๊ฒฉ */
}
.delete-diary-btn {
background: none;
border: 1px solid #ff6b6b;
color: #ff6b6b;
padding: 2px 8px;
font-size: 0.8rem;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.2s, color 0.2s;
}
.delete-diary-btn:hover {
background-color: #ff6b6b;
color: white;
}
.item-content {
font-size: 0.9rem;
line-height: 1.6;
color: #666;
background-color: white;
padding: 15px;
border-radius: 10px;
border: 1px solid #f0f0f0;
}
.item-content h3 {
font-size: 1rem;
margin: 0 0 10px 0;
}
.item-content p {
margin: 0;
}
.item-recommendations {
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid #f0f0f0;
}
.item-recommendations h4 {
font-size: 0.9rem;
font-weight: 600;
color: var(--text-dark);
margin: 0 0 10px 0;
}
.item-recommendations ul {
list-style-type: '๐ŸŽต';
padding-left: 20px;
margin: 0;
font-size: 0.9rem;
color: #666;
}
.item-recommendations li {
padding-left: 8px;
margin-bottom: 5px;
}
.item-content ul {
padding-left: 20px;
margin: 10px 0 0 0;
}
.item-content li {
margin-bottom: 5px;
}
/* --- ์ƒ์„ธ ์ •๋ณด ๋ชจ๋‹ฌ ์Šคํƒ€์ผ --- */
.diary-detail-modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
display: none; /* ๊ธฐ๋ณธ์ ์œผ๋กœ ์ˆจ๊น€ */
justify-content: center;
align-items: center;
z-index: 1001;
backdrop-filter: blur(5px);
}
.diary-detail-modal-content {
background-color: white;
padding: 30px 40px;
border-radius: 15px;
width: 90%;
max-width: 600px;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 5px 20px rgba(0,0,0,0.2);
position: relative;
}
.diary-detail-modal-close {
position: absolute;
top: 15px;
right: 20px;
font-size: 2rem;
color: #aaa;
background: none;
border: none;
cursor: pointer;
}
#diary-detail-title {
font-size: 1.8rem;
margin-bottom: 20px;
color: var(--text-dark);
}
#diary-detail-body {
font-size: 1rem;
line-height: 1.7;
color: #444;
}
#diary-detail-body .diary-content-section {
margin-bottom: 25px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}
#diary-detail-body .diary-content-section h3 {
font-size: 1.2rem;
margin-bottom: 10px;
color: var(--primary-theme-color);
}
#diary-detail-body #rec-container h3 {
margin-bottom: 15px;
}