Skip to content

Commit 8b3d327

Browse files
authored
Merge pull request #149 from ioet/140/fix-dashboard-structure
fix: #140 Refactor dashboard structure
2 parents 58a9f23 + aff51be commit 8b3d327

File tree

8 files changed

+68
-90
lines changed

8 files changed

+68
-90
lines changed

src/app/modules/activities-management/components/activity-list/activity-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="card-body">
1+
<div class="card-body pt-0 mt-4">
22
<div class="scroll">
33
<div class="accordion" id="accordionActivities">
44
<div *ngIf="activities?.length > 0; else notShow">

src/app/modules/activities-management/components/create-activity/create-activity.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="card">
1+
<div class="card mt-4">
22
<form class="card-body" [formGroup]="activityForm" (ngSubmit)="onSubmit(activityForm.value)">
33
<h1 class="card-title">Activity</h1>
44
<div class="form-group">
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
<div class="parent">
2-
<app-create-activity class="item"> </app-create-activity>
3-
4-
<app-activity-list class="item"> </app-activity-list>
1+
<div class="container">
2+
<div class="row">
3+
<div class="col">
4+
<app-create-activity></app-create-activity>
5+
</div>
6+
<div class="col">
7+
<app-activity-list></app-activity-list>
8+
</div>
9+
</div>
510
</div>
Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +0,0 @@
1-
.parent {
2-
display: flex;
3-
}
4-
5-
.item {
6-
width: 50%;
7-
margin: 2em;
8-
min-height: 500px;
9-
max-height: 500px;
10-
}
11-
12-
@media screen and (max-width: 600px){
13-
.parent {
14-
flex-direction: column-reverse;
15-
}
16-
17-
.item {
18-
width: auto;
19-
min-height: 200px;
20-
}
21-
}

src/app/modules/shared/components/navbar/navbar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<nav class="navbar navbar-light bg-white border-light border-bottom mt-1">
1+
<nav class="navbar navbar-fixed-top h-100 border-bottom">
22
<div class="col-10 text-center">
33
<app-clock></app-clock>
44
</div>

src/app/modules/shared/components/sidebar/sidebar.component.html

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
11
<div class="d-flex" id="wrapper">
22
<!-- Sidebar -->
3-
<div class="mt-1 ml-1 rounded-lg" id="sidebar-wrapper" *ngIf="itemsSidebar?.length > 0">
4-
<div class="text-center mt-5 mb-5">
5-
<img
6-
src="assets/img/ioet-logo-light.png"
7-
width="100"
8-
height="100"
9-
class="img-fluid text-center"
10-
alt="Ioet logo"
11-
/>
3+
<div id="sidebar-wrapper" *ngIf="itemsSidebar?.length > 0">
4+
<div class="text-center my-5">
5+
<img src="assets/img/ioet-logo-light.png" width="70" height="auto" class="img-fluid" alt="Ioet logo" />
126
</div>
13-
<div class="list-group list-group-flush rounded-lg">
7+
<div class="d-flex flex-column">
148
<a
159
*ngFor="let item of itemsSidebar"
1610
[routerLink]="item.route"
1711
routerLinkActive="background-item-sidebar-active"
18-
class="list-group-item list-group-item-action content-sidebar-style item-hover"
19-
><i class="{{ item.icon }} mr-3 ml-3"></i> {{ item.text }}</a
12+
class="item-hover text-white p-3 text-decoration-none"
13+
>
14+
<i class="{{ item.icon }} mr-3 ml-3"></i> {{ item.text }}</a
2015
>
2116
</div>
2217
</div>
2318
<!-- /#sidebar-wrapper -->
24-
<div class="container-fluid mt-1">
25-
<app-navbar></app-navbar>
26-
<div class="container">
19+
<div class="main_app">
20+
<div class="header_app">
21+
<app-navbar></app-navbar>
22+
</div>
23+
<div class="content_app">
2724
<!-- Page Content -->
2825
<router-outlet></router-outlet>
2926
</div>
Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,44 @@
11
@import '../../../../../styles/colors.scss';
22

3-
body {
4-
overflow-x: hidden;
5-
}
3+
#wrapper {
4+
height: 100vh;
65

7-
#sidebar-wrapper {
8-
min-height: 100vh;
9-
margin-left: -15rem;
10-
-webkit-transition: margin 0.25s ease-out;
11-
-moz-transition: margin 0.25s ease-out;
12-
-o-transition: margin 0.25s ease-out;
13-
transition: margin 0.25s ease-out;
14-
background-image: $background-gradient-pantone;
15-
}
6+
#sidebar-wrapper {
7+
flex: 0 0 14.5rem;
8+
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.3);
9+
background-image: $background-gradient-pantone;
10+
z-index: 1;
11+
margin-left: -15rem;
12+
-webkit-transition: margin 0.25s ease-out;
13+
-moz-transition: margin 0.25s ease-out;
14+
-o-transition: margin 0.25s ease-out;
15+
transition: margin 0.25s ease-out;
16+
}
1617

17-
#sidebar-wrapper .sidebar-heading {
18-
padding: 0.875rem 1.25rem;
19-
font-size: 1.2rem;
20-
}
18+
.main_app {
19+
flex: 1;
20+
}
2121

22-
#sidebar-wrapper .list-group {
23-
width: 15rem;
24-
}
22+
.header_app {
23+
height: 8%;
24+
}
2525

26-
#page-content-wrapper {
27-
min-width: 100vw;
28-
}
26+
.content_app {
27+
height: 92%;
28+
padding: 1rem 3rem;
29+
overflow-y: auto;
30+
}
2931

30-
#wrapper.toggled #sidebar-wrapper {
31-
margin-left: 0;
32+
.background-item-sidebar-active,
33+
.item-hover:hover {
34+
background-color: $item-background;
35+
}
3236
}
3337

3438
@media (min-width: 768px) {
35-
#sidebar-wrapper {
36-
margin-left: 0;
37-
}
38-
#page-content-wrapper {
39-
min-width: 0;
40-
width: 100%;
41-
}
42-
#wrapper.toggled #sidebar-wrapper {
43-
margin-left: -15rem;
39+
#wrapper {
40+
#sidebar-wrapper {
41+
margin-left: 0;
42+
}
4443
}
4544
}
46-
47-
.content-sidebar-style {
48-
background-color: transparent;
49-
color: white;
50-
font-weight: bold;
51-
border: 0px;
52-
}
53-
54-
.background-item-sidebar-active,
55-
.item-hover:hover {
56-
background-color: $item-background;
57-
}

src/styles.scss

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
/* You can add global styles to this file, and also import other style files */
22

3-
@import "styles/themes/orange-theme";
4-
@import "~bootstrap/scss/bootstrap";
3+
@import 'styles/themes/orange-theme';
4+
@import '~bootstrap/scss/bootstrap';
5+
6+
html,
7+
body {
8+
font-family: 'Roboto', sans-serif;
9+
height: 100vh;
10+
width: 100vw;
11+
margin: 0;
12+
padding: 0;
13+
overflow-x: hidden;
14+
}

0 commit comments

Comments
 (0)