Skip to content

Commit 1182360

Browse files
Improve Dashboard Site Homepage (#817)
* commit01 * commit2 * commit03 * Run prettier command * fixed Errors in home.test.js * fixed the responsiveness of dashboard * fixed the font weight of description and title * fixed the dashboard buttons design
1 parent 22305a5 commit 1182360

File tree

3 files changed

+117
-34
lines changed

3 files changed

+117
-34
lines changed

__tests__/home/home.test.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,10 @@ describe('Home Page', () => {
348348
discordUsersButton,
349349
);
350350
const trimmedDiscordUsersButtonText = discordUsersButtonText.trim();
351-
expect(trimmedDiscordUsersButtonText).toBe('Discord Users');
351+
352+
expect(trimmedDiscordUsersButtonText).toBe(
353+
'Discord Users\n\nManage Discord user roles and activities.',
354+
);
352355
});
353356

354357
it('should display the User Management anchor button', async () => {
@@ -529,7 +532,10 @@ describe('Home Page', () => {
529532
applicationButton,
530533
);
531534
const trimmedApplicationButtonText = applicationButtonText.trim();
532-
expect(trimmedApplicationButtonText).toBe('Applications');
535+
536+
expect(trimmedApplicationButtonText).toBe(
537+
'Applications\n\nManage and review submitted applications.',
538+
);
533539
});
534540

535541
it('should close hamburger menu on clicking anywhere on the screen except the menu', async () => {

index.html

Lines changed: 62 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,30 @@
7878
</section>
7979

8080
<section class="buttonSection">
81-
<a
82-
class="action-button element-display-remove"
83-
href="/goal/index.html"
84-
id="create-goal"
85-
>
86-
Create Goals
81+
<a class="card" href="/goal/index.html" id="create-goal">
82+
<h5 class="card__title">Create Goals</h5>
83+
<p class="card__description">
84+
Set and track goals to align efforts and measure progress.
85+
</p>
8786
</a>
88-
<a class="action-button" href="/task/index.html"> Create Tasks </a>
89-
<a class="action-button" href="/profile/index.html"> Profile </a>
90-
<a
91-
id="discord-user-link"
92-
class="action-button"
93-
href="/users/discord/index.html"
94-
>
95-
Discord Users
87+
88+
<a class="card" href="/task/index.html">
89+
<h5 class="card__title">Create Tasks</h5>
90+
<p class="card__description">
91+
Define the tasks, create new tasks and track the progress.
92+
</p>
93+
</a>
94+
<a class="card" href="/profile/index.html">
95+
<h5 class="card__title">Profile</h5>
96+
<p class="card__description">
97+
View and edit your personal profile information.
98+
</p>
99+
</a>
100+
<a id="discord-user-link" class="card" href="/users/discord/index.html">
101+
<h5 class="card__title">Discord Users</h5>
102+
<p class="card__description">
103+
Manage Discord user roles and activities.
104+
</p>
96105
</a>
97106
<a
98107
id="user-management-link"
@@ -103,9 +112,12 @@
103112
</a>
104113
<a
105114
id="requests-link"
106-
class="action-button element-display-remove"
115+
class="card element-display-remove"
107116
href="/requests/index.html"
108-
>Requests
117+
><h5 class="card__title">Requests</h5>
118+
<p class="card__description">
119+
Manage requests for various resources and services.
120+
</p>
109121
</a>
110122
<a
111123
id="extension-requests-link"
@@ -121,28 +133,49 @@
121133
>
122134
Task Requests
123135
</a>
124-
<a href="/online-members/online-members.html" class="action-button">
125-
Online Members
136+
<a href="/online-members/online-members.html" class="card">
137+
<h5 class="card__title">Online Members</h5>
138+
<p class="card__description">
139+
View the list of currently online members.
140+
</p>
141+
</a>
142+
<a class="card" href="/groups/index.html">
143+
<h5 class="card__title">Discord Groups</h5>
144+
<p class="card__description">Manage Discord group memberships.</p>
145+
</a>
146+
<a class="card" href="/standup/index.html">
147+
<h5 class="card__title">Standup Updates</h5>
148+
149+
<p class="card__description">Post and view daily standup updates.</p>
150+
</a>
151+
<a class="card" href="/identity-service-logs/index.html"
152+
><h5 class="card__title">Identity Service Logs</h5>
153+
154+
<p class="card__description">
155+
Review logs related to identity services.
156+
</p>
126157
</a>
127-
<a class="action-button" href="/groups/index.html"> Discord Groups </a>
128-
<a class="action-button" href="/standup/index.html"> Standup Updates</a>
129-
<a class="action-button" href="/identity-service-logs/index.html"
130-
>Identity Service Logs</a
131-
>
132158
<a
133-
class="action-button element-display-remove"
159+
class="card element-display-remove"
134160
href="/feed/index.html"
135161
id="create-activity-feed"
136162
>
137-
Activity Feed</a
163+
<h5 class="card__title">Activity Feed</h5>
164+
<p class="card__description">
165+
View updates on activities and project progress.
166+
</p></a
138167
>
139-
<a id="application-button" href="/applications" class="action-button">
140-
Applications
168+
<a id="application-button" href="/applications" class="card">
169+
<h5 class="card__title">Applications</h5>
170+
<p class="card__description">
171+
Manage and review submitted applications.
172+
</p>
141173
</a>
142174
<div class="button-container element-display-remove" id="sync-repo-div">
143-
<button id="repo-sync-button" class="action-button">
175+
<button id="repo-sync-button" class="card">
144176
<span class="spinner"></span>
145-
Sync Repo
177+
<h5 class="card__title">Sync Repo</h5>
178+
<p class="card__description">Sync repository to update the changes</p>
146179
</button>
147180
<div class="status" id="sync-repo-status-update"></div>
148181
<div id="toast" class="hidden">

style.css

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ body {
3030
}
3131

3232
.buttonSection {
33+
margin-top: 10px;
3334
height: 80vh;
3435
display: flex;
3536
justify-content: center;
@@ -99,9 +100,10 @@ footer {
99100
}
100101

101102
.action-button {
103+
width: 350px;
102104
color: var(--black-color);
103-
font-weight: 500;
104-
font-size: larger;
105+
font-weight: 600;
106+
font-size: 1.1rem;
105107
background-color: var(--white-color);
106108
border: 2px solid var(--black-color);
107109
border-radius: 5px;
@@ -112,13 +114,50 @@ footer {
112114
text-decoration: none;
113115
}
114116

117+
.card {
118+
background-color: white;
119+
text-decoration: none;
120+
padding: 20px;
121+
width: 280px;
122+
border-radius: 15px;
123+
border: 1px solid hsla(0, 0%, 92%, 1);
124+
box-shadow: 1px 2px 4px 0px hsla(0, 0%, 0%, 0.1);
125+
}
126+
127+
.card:hover {
128+
background-color: rgb(215, 230, 241);
129+
transition: 0.5s ease;
130+
}
131+
132+
.card__title {
133+
margin: 0;
134+
font-size: 1.1rem;
135+
font-weight: 600;
136+
color: hsla(0, 0%, 21%, 1);
137+
}
138+
139+
.card__description {
140+
margin-top: 0.6rem;
141+
color: hsla(0, 0%, 21%, 0.75);
142+
font-weight: 400;
143+
font-size: 0.8rem;
144+
line-height: 18px;
145+
}
146+
115147
.action-button:hover,
116148
.action-button:focus {
117149
color: var(--white-color);
118150
background-color: var(--blue-color);
119151
border-color: var(--blue-color);
120152
}
121153

154+
.description {
155+
margin-top: 0.6rem;
156+
font-weight: 400;
157+
font-size: 0.8rem;
158+
line-height: 18px;
159+
}
160+
122161
#sync-buttons.element-display-remove {
123162
display: none;
124163
}
@@ -236,11 +275,16 @@ footer {
236275
display: none !important;
237276
}
238277

239-
@media only screen and (max-width: 600px) {
278+
@media only screen and (max-width: 1200px) {
240279
.buttonSection {
241280
flex-direction: column;
281+
height: auto;
282+
padding: 15px;
242283
}
243284
.action-button {
244285
text-align: center;
286+
width: 100%;
287+
padding: 10px;
288+
font-size: medium;
245289
}
246290
}

0 commit comments

Comments
 (0)