Skip to content

Commit eb9d362

Browse files
committed
Move topbar to it's own component.
1 parent 530629f commit eb9d362

File tree

4 files changed

+41
-25
lines changed

4 files changed

+41
-25
lines changed

angular/src/app/app.component.html

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<!-- Overlay For Sidebars -->
2-
<div class="overlay"></div>
3-
<!-- #END# Overlay For Sidebars -->
1+
<div class="overlay"></div>
2+
43
<!-- Search Bar -->
54
<div class="search-bar">
65
<div class="search-icon">
@@ -10,39 +9,22 @@
109
<div class="close-search">
1110
<i class="material-icons">close</i>
1211
</div>
13-
</div>
14-
<!-- #END# Search Bar -->
15-
<!-- Top Bar -->
16-
<nav class="navbar">
17-
<div class="container-fluid">
18-
<div class="navbar-header">
19-
<a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a>
20-
<a href="javascript:void(0);" class="bars"></a>
21-
<a class="navbar-brand" asp-controller="Home" asp-action="Index"><i class="fa fa-cubes"></i> AbpProjectName</a>
22-
</div>
23-
<div class="collapse navbar-collapse" id="navbar-collapse">
24-
<ul class="nav navbar-nav navbar-right">
25-
<li><a href="javascript:void(0);" class="js-search" data-close="true"><i class="material-icons">search</i></a></li>
26-
<topbar-languageswitch></topbar-languageswitch>
27-
<li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i class="material-icons">more_vert</i></a></li>
28-
</ul>
29-
</div>
30-
</div>
31-
</nav>
32-
<!-- #Top Bar -->
12+
</div> <!-- #END# Search Bar -->
13+
14+
<top-bar></top-bar>
3315

3416
<section>
3517
<aside id="leftsidebar" class="sidebar">
3618
<sidebar-user-area></sidebar-user-area>
3719
<sidebar-nav></sidebar-nav>
3820
<sidebar-footer></sidebar-footer>
3921
</aside>
22+
4023
<right-sidebar></right-sidebar>
4124
</section>
4225

43-
4426
<section class="content">
4527
<div class="container-fluid">
4628
<router-outlet></router-outlet>
4729
</div>
48-
</section>
30+
</section>

angular/src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { UsersComponent } from '@app/users/users.component';
1919
import { CreateUserModalComponent } from '@app/users/create-user-modal.component';
2020
import { TenantsComponent } from '@app/tenants/tenants.component';
2121
import { CreateTenantModalComponent } from '@app/tenants/create-tenant-modal.component';
22+
import { TopBarComponent } from '@app/layout/topbar.component';
2223
import { TopBarLanguageSwitchComponent } from '@app/layout/topbar-languageswitch.component';
2324
import { SideBarUserAreaComponent } from '@app/layout/sidebar-user-area.component';
2425
import { SideBarNavComponent } from '@app/layout/sidebar-nav.component';
@@ -34,6 +35,7 @@ import { RightSideBarComponent } from '@app/layout/right-sidebar.component';
3435
CreateUserModalComponent,
3536
TenantsComponent,
3637
CreateTenantModalComponent,
38+
TopBarComponent,
3739
TopBarLanguageSwitchComponent,
3840
SideBarUserAreaComponent,
3941
SideBarNavComponent,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<nav class="navbar">
2+
<div class="container-fluid">
3+
<div class="navbar-header">
4+
<a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a>
5+
<a href="javascript:void(0);" class="bars"></a>
6+
<a class="navbar-brand" asp-controller="Home" asp-action="Index"><i class="fa fa-cubes"></i> AbpProjectName</a>
7+
</div>
8+
<div class="collapse navbar-collapse" id="navbar-collapse">
9+
<ul class="nav navbar-nav navbar-right">
10+
<li><a href="javascript:void(0);" class="js-search" data-close="true"><i class="material-icons">search</i></a></li>
11+
<topbar-languageswitch></topbar-languageswitch>
12+
<li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i class="material-icons">more_vert</i></a></li>
13+
</ul>
14+
</div>
15+
</div>
16+
</nav>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Component, Injector, ViewEncapsulation } from '@angular/core';
2+
import { AppComponentBase } from '@shared/app-component-base';
3+
4+
@Component({
5+
templateUrl: './topbar.component.html',
6+
selector: 'top-bar',
7+
encapsulation: ViewEncapsulation.None
8+
})
9+
export class TopBarComponent extends AppComponentBase {
10+
11+
constructor(
12+
injector: Injector
13+
) {
14+
super(injector);
15+
}
16+
}

0 commit comments

Comments
 (0)