Skip to content

Commit da83502

Browse files
committed
refactor(EventPopup): simplify event title display and adjust layout for better readability
style(CSCalendar): update stage tag background color and add tooltip styles
1 parent e8ec80b commit da83502

5 files changed

Lines changed: 41 additions & 17 deletions

File tree

src/assets/scss/components/_cs-calendar.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,21 @@ thead {
145145
justify-content: center;
146146
}
147147
}
148+
149+
.ant-picker-cell:not(.ant-picker-cell-in-view) {
150+
.stage-tag {
151+
background-color: #5d6ef5 !important;
152+
}
153+
}
154+
155+
.tooltip-style {
156+
display: flex;
157+
flex-direction: column;
158+
gap: 2px;
159+
padding: 2px 4px;
160+
161+
div {
162+
font-size: 13px;
163+
line-height: 19px;
164+
}
165+
}

src/assets/scss/components/_event-popup.scss

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@
100100
box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
101101
padding: 18px 20px;
102102
color: var(--text-color);
103-
font-size: 14px;
103+
font-size: 13px;
104+
font-family: inherit;
105+
line-height: 1.55;
106+
letter-spacing: 0.01em;
104107
direction: rtl;
105108
overflow: hidden;
106109
border: 1px solid rgba(0, 0, 0, 0.06);
@@ -131,7 +134,7 @@
131134
align-items: center;
132135
justify-content: space-between;
133136
gap: 12px;
134-
margin-bottom: 14px;
137+
margin-bottom: 16px;
135138
}
136139
.event-popup__subtitle {
137140
font-size: 12px;
@@ -150,7 +153,7 @@
150153
min-width: 0;
151154
display: flex;
152155
align-items: center;
153-
gap: 12px;
156+
gap: 10px;
154157
}
155158
.event-popup__color-dot {
156159
width: 14px;
@@ -161,7 +164,8 @@
161164
}
162165
.event-popup__header-title {
163166
font-weight: 700;
164-
font-size: 15px;
167+
font-size: 14px;
168+
letter-spacing: 0.01em;
165169
line-height: 1.1;
166170
overflow: hidden;
167171
text-overflow: ellipsis;
@@ -212,6 +216,8 @@
212216
min-width: 96px;
213217
color: rgba(0, 0, 0, 0.58);
214218
font-weight: 700;
219+
font-size: 12.5px;
220+
line-height: 1.45;
215221
text-align: right;
216222
letter-spacing: 0.2px;
217223
flex: 0 0 auto;
@@ -221,6 +227,7 @@
221227
flex: 1 1 auto;
222228
word-break: break-word;
223229
color: rgba(0, 0, 0, 0.86);
230+
letter-spacing: 0.01em;
224231
}
225232

226233
.event-popup__link {
@@ -253,6 +260,7 @@
253260
.event-popup__label.small {
254261
min-width: 60px;
255262
font-weight: 600;
263+
font-size: 12px;
256264
color: rgba(0, 0, 0, 0.55);
257265
}
258266

@@ -264,7 +272,7 @@
264272
.event-popup__creator {
265273
margin-top: 14px;
266274
display: flex;
267-
justify-content: flex-end;
275+
justify-content: center;
268276
}
269277

270278
@media (max-width: 420px) {
@@ -281,3 +289,7 @@
281289
}
282290
}
283291
}
292+
293+
.calendar-event-creator .ant-btn {
294+
padding: 0 30px;
295+
}

src/components/CSCalendar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const CSCalendar = ({ setAnnouncementData, addToCurrentWeek }) => {
9393

9494
const stageLabel =
9595
(event &&
96-
(event.stage ||
96+
(event.title ||
9797
(event.title &&
9898
(event.title.match(/مرحله\s*[^\s]+/)?.[0] ||
9999
event.title.replace(/^جلسه\s*/u, ""))) ||

src/components/EventPopup.jsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const EventPopup = ({ visible, anchorRect, date, event, onClose }) => {
134134
/>
135135
)}
136136
<div className="event-popup__header-title">
137-
{event?.stage || event?.title || "جزئیات جلسه"}
137+
{event?.title || "جزئیات جلسه"}
138138
</div>
139139
</div>
140140
</div>
@@ -192,12 +192,10 @@ const EventPopup = ({ visible, anchorRect, date, event, onClose }) => {
192192
</>
193193
)}
194194

195-
<div className="event-popup__footer">
196-
<div className="event-popup__meta">
197-
<div className="event-popup__label small">زمان</div>
198-
<div className="event-popup__value small">
199-
{event?.time || "ساعت ۱۸:۰۰ تا ۱۹:۰۰"}
200-
</div>
195+
<div className="event-popup__row">
196+
<div className="event-popup__label">زمان</div>
197+
<div className="event-popup__value">
198+
{event?.time || "ساعت ۱۸:۰۰ تا ۱۹:۰۰"}
201199
</div>
202200
</div>
203201

src/constants/events.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export const events = [
22
{
33
title: "جلسه مرحله سوم",
4-
stage: "مرحله سوم",
54
color: "#3BB273",
65
fullName: "پرسش‌وپاسخ داکیومنت فرآیند‌های برنامه CS Internship",
76
link: "https://teams.microsoft.com/l/meetup-join/19%3A92b6afa889824abe96a1cfa45204209a%40thread.tacv2/1748521847152?context=%7B%22Tid%22%3A%2224fbf492-43a9-4a8f-ba7b-6f12fa9b8d87%22%2C%22Oid%22%3A%223e1989b9-3427-4202-986e-e2a62f053845%22%7D",
@@ -10,7 +9,6 @@ export const events = [
109
},
1110
{
1211
title: "جلسه مرحله دوم",
13-
stage: "مرحله دوم",
1412
color: "#5D6EF5",
1513
fullName: "پرسش‌وپاسخ فیلم معرفی برنامه‌ CS Internship",
1614
link: "https://teams.microsoft.com/l/meetup-join/19%3A92b6afa889824abe96a1cfa45204209a%40thread.tacv2/1748521728714?context=%7B%22Tid%22%3A%2224fbf492-43a9-4a8f-ba7b-6f12fa9b8d87%22%2C%22Oid%22%3A%223e1989b9-3427-4202-986e-e2a62f053845%22%7D",
@@ -19,14 +17,12 @@ export const events = [
1917
},
2018
{
2119
title: "جلسه مصاحبه",
22-
stage: "مصاحبه",
2320
color: "#FFB020",
2421
fullName: "جلسه مصاحبه ورود به برنامه",
2522
link: "",
2623
},
2724
{
2825
title: "جلسه مرحله اول",
29-
stage: "مرحله اول",
3026
color: "#F35E7F",
3127
fullName: "پرسش‌وپاسخ داکیومنت CS Internship Overview",
3228
link: "https://teams.microsoft.com/l/meetup-join/19%3A92b6afa889824abe96a1cfa45204209a%40thread.tacv2/1748716646151?context=%7B%22Tid%22%3A%2224fbf492-43a9-4a8f-ba7b-6f12fa9b8d87%22%2C%22Oid%22%3A%223e1989b9-3427-4202-986e-e2a62f053845%22%7D",

0 commit comments

Comments
 (0)