-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(header): add
subheader
mode when header is placed on a side of…
- Loading branch information
Showing
10 changed files
with
179 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/playground/layout/layout-sidebar-subheader.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<nb-layout> | ||
|
||
<nb-layout-header subheader> | ||
<a href="#" (click)="toggle()"><i class="nb-menu"></i></a> | ||
</nb-layout-header> | ||
|
||
<nb-sidebar></nb-sidebar> | ||
|
||
<nb-layout-column>Layout Content</nb-layout-column> | ||
</nb-layout> |
30 changes: 30 additions & 0 deletions
30
src/playground/layout/layout-sidebar-subheader.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Component } from '@angular/core'; | ||
import { NbSidebarService } from '@nebular/theme'; | ||
|
||
@Component({ | ||
selector: 'nb-layout-sidebar-subheader', | ||
templateUrl: './layout-sidebar-subheader.component.html', | ||
styles: [` | ||
:host nb-layout-header a { | ||
font-size: 2rem; | ||
text-decoration: none; | ||
} | ||
:host nb-layout-column { | ||
height: 50vw; | ||
} | ||
:host nb-layout-column:first-child { | ||
background: #f4f4f7; | ||
} | ||
`], | ||
}) | ||
|
||
export class NbLayoutSidebarSubheaderComponent { | ||
|
||
constructor(private sidebarService: NbSidebarService) { | ||
} | ||
|
||
toggle() { | ||
this.sidebarService.toggle(true); | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<nb-layout> | ||
<nb-layout-header fixed> | ||
<a href="#" (click)="toggle()"><i class="nb-menu"></i></a> | ||
</nb-layout-header> | ||
|
||
<nb-layout-header subheader> | ||
<nb-actions> | ||
<nb-action icon="nb-home"></nb-action> | ||
<nb-action icon="nb-search"></nb-action> | ||
<nb-action icon="nb-edit"></nb-action> | ||
</nb-actions> | ||
</nb-layout-header> | ||
|
||
<nb-sidebar></nb-sidebar> | ||
|
||
<nb-layout-column>Layout Content</nb-layout-column> | ||
</nb-layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Component } from '@angular/core'; | ||
import { NbSidebarService } from '@nebular/theme'; | ||
|
||
@Component({ | ||
selector: 'nb-layout-subheader', | ||
templateUrl: './layout-subheader.component.html', | ||
styles: [` | ||
:host nb-layout-header a { | ||
font-size: 2rem; | ||
text-decoration: none; | ||
} | ||
:host nb-layout-column { | ||
height: 50vw; | ||
} | ||
:host nb-layout-column:first-child { | ||
background: #f4f4f7; | ||
} | ||
`], | ||
}) | ||
|
||
export class NbLayoutSubheaderComponent { | ||
|
||
constructor(private sidebarService: NbSidebarService) { | ||
} | ||
|
||
toggle() { | ||
this.sidebarService.toggle(true); | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters