Skip to content

Commit 5977e6e

Browse files
committed
feat(Header): update header title to reflect new calendar name in Persian
feat(CalendarIntro): remove unused title and badge elements for cleaner rendering refactor(CSCalendar): simplify Flex component structure for better layout style(CalendarIntro): adjust paragraph margin and font weight for improved readability style(EventPopup): enhance link styling and add transition effects for better user experience
1 parent b755fb9 commit 5977e6e

7 files changed

Lines changed: 23 additions & 42 deletions

File tree

src/__tests__/components/Header.test.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ describe("Header", () => {
2929

3030
it("should render title text", () => {
3131
render(<Header />);
32-
expect(screen.getByText("CS-Queue-Calendar")).toBeInTheDocument();
32+
expect(
33+
screen.getByText(
34+
"تقویم جلسات گروه صف برنامه CS Internship"
35+
)
36+
).toBeInTheDocument();
3337
});
3438

3539
it("should have dashes on both sides", () => {
@@ -57,7 +61,9 @@ describe("Header", () => {
5761
it("should render title with correct styling", () => {
5862
const { container } = render(<Header />);
5963
const title = container.querySelector("h1");
60-
expect(title).toHaveTextContent("CS-Queue-Calendar");
64+
expect(title).toHaveTextContent(
65+
"تقویم جلسات گروه صف برنامه CS Internship"
66+
);
6167
});
6268

6369
it("should call window.open when first dash is clicked", () => {
Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.calendar-intro {
2-
margin: 0 52px 4px;
2+
margin: 0 60px;
33
border: 1px solid var(--calendar-border-color);
44
border-radius: 12px;
55
background:
@@ -21,31 +21,13 @@
2121
width: 100%;
2222
}
2323

24-
.calendar-intro__badge {
25-
display: inline-flex;
26-
align-items: center;
27-
gap: 6px;
28-
padding: 3px 10px;
29-
border-radius: 999px;
30-
background: rgba(47, 111, 237, 0.14);
31-
color: var(--text-color);
32-
font-size: 12px;
33-
font-weight: 700;
34-
letter-spacing: 0.2px;
35-
}
36-
37-
.calendar-intro__title {
38-
margin: 2px 0 0 !important;
39-
color: var(--text-color) !important;
40-
}
41-
4224
.calendar-intro__paragraph {
43-
margin-bottom: 4px !important;
25+
margin-bottom: 2px !important;
4426
color: var(--muted-text-color, rgba(107, 114, 128, 0.9));
4527
font-size: 14px;
46-
line-height: 1.65;
28+
line-height: 18px;
4729

4830
a {
49-
font-weight: 700;
31+
font-weight: 600;
5032
}
5133
}

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,17 +231,8 @@
231231
}
232232

233233
.event-popup__link {
234-
color: #1677ff;
235-
text-decoration: none;
234+
font-size: 13px;
236235
font-weight: 600;
237-
display: inline-flex;
238-
align-items: center;
239-
gap: 6px;
240-
241-
&:hover {
242-
color: #165bad;
243-
text-decoration: underline;
244-
}
245236
}
246237

247238
.event-popup__footer {
@@ -292,4 +283,8 @@
292283

293284
.calendar-event-creator .ant-btn {
294285
padding: 0 30px;
286+
transition:
287+
background-color 0.25s,
288+
color 0.25s,
289+
border-color 0.25s !important;
295290
}

src/assets/scss/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
body {
1919
height: 100vh !important;
2020
height: 100svh !important;
21-
overflow-y: hidden;
21+
// overflow-y: hidden; TODO: Handle this
2222
min-width: 780px;
2323
background-color: var(--bg-color);
2424
color: var(--text-color);

src/components/CSCalendar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ const CSCalendar = ({ setAnnouncementData, addToCurrentWeek }) => {
303303
}, [value, yearMonth]);
304304

305305
return (
306-
<Flex justify="space-between" vertical className="calendar-section">
306+
<Flex vertical className="calendar-section">
307307
<CalendarIntro />
308308

309309
<Calendar

src/components/CalendarIntro.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import { Card, Typography, Space } from "antd";
33

44
const CalendarIntro = () => {
5-
const { Title, Paragraph, Link, Text } = Typography;
5+
const { Paragraph, Link } = Typography;
66

77
return (
88
<Card bordered={false} className="calendar-intro" dir="rtl">
@@ -11,10 +11,6 @@ const CalendarIntro = () => {
1111
size={4}
1212
className="calendar-intro__body"
1313
>
14-
<Text className="calendar-intro__badge">راهنمای تقویم</Text>
15-
<Title level={4} className="calendar-intro__title">
16-
تقویم رسمی جلسات پرسش‌وپاسخ
17-
</Title>
1814
<Paragraph className="calendar-intro__paragraph">
1915
این تقویم، مرجع رسمی زمان‌بندی جلسات پرسش‌وپاسخ مراحل ورود
2016
به برنامه CS Internship است و ساختار برگزاری جلسات گروه صف

src/components/Header.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ const Header = () => {
3838
>
3939
-
4040
</div>
41-
<div className={"header-title"}>CS-Queue-Calendar</div>
41+
<div className={"header-title"} dir="rtl">
42+
تقویم جلسات گروه صف برنامه CS Internship
43+
</div>
4244
<div
4345
className={!EEClicked[1] ? "header-ICARUS" : ""}
4446
onClick={() => clickOnEE(1)}

0 commit comments

Comments
 (0)