forked from porscheinformatik/material-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Provide a Sidebar page-layout porscheinformatik#149
- Loading branch information
Marc Pestel
committed
Nov 9, 2023
1 parent
71617c0
commit 433abc3
Showing
68 changed files
with
599 additions
and
143 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...dons/src/lib/content-panel/content-panel-container/content-panel-container.component.html
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...tent-header/content-header.component.scss → ...tent-header/content-header.component.scss
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.content-header { | ||
padding-right: 0.5rem; | ||
background-color: var(--background-color); | ||
} |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -3,5 +3,4 @@ | |
overflow-y: auto; | ||
border-top: 0.05rem solid #cccccc; | ||
padding: 1rem; | ||
height: 1rem; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...tent-panel/content-panel-container-sidebar/content-panel-container-sidebar.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 @@ | ||
<ng-content></ng-content> |
6 changes: 6 additions & 0 deletions
6
...tent-panel/content-panel-container-sidebar/content-panel-container-sidebar.component.scss
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,6 @@ | ||
:host { | ||
border-top: 0.05rem solid #cccccc; | ||
min-height: 2rem; | ||
display: flex; | ||
flex: 0 0 auto; | ||
} |
8 changes: 8 additions & 0 deletions
8
...ontent-panel/content-panel-container-sidebar/content-panel-container-sidebar.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,8 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'mad-content-panel-container-sidebar', | ||
templateUrl: './content-panel-container-sidebar.component.html', | ||
styleUrls: ['./content-panel-container-sidebar.component.scss'], | ||
}) | ||
export class ContentPanelContainerSidebarComponent {} |
7 changes: 7 additions & 0 deletions
7
...c/lib/layout/content-panel/content-panel-container/content-panel-container.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,7 @@ | ||
<div class="content-panel-sidebar-wrapper"> | ||
<ng-content select="mad-content-panel-container-sidebar"></ng-content> | ||
<div class="content-panel-outer-wrapper"> | ||
<ng-content select="mad-content-panel-container-content"></ng-content> | ||
<ng-content select="mad-content-panel-container-footer"></ng-content> | ||
</div> | ||
</div> |
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
projects/material-addons/src/lib/layout/sidebar/sidebar-item/sidebar-item.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,4 @@ | ||
<span class="content-wrapper"> | ||
<ng-content></ng-content> | ||
</span> | ||
<span class="focus-overlay"></span> |
33 changes: 33 additions & 0 deletions
33
projects/material-addons/src/lib/layout/sidebar/sidebar-item/sidebar-item.component.scss
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,33 @@ | ||
[mad-sidebar-item] { | ||
padding: 9px 24px 8px; | ||
color: var(--panel-color); | ||
position: relative; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
font-size: 16px; | ||
font-weight: 300; | ||
|
||
letter-spacing: 0.5px; | ||
|
||
.focus-overlay { | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
position: absolute; | ||
pointer-events: none; | ||
border-radius: inherit; | ||
} | ||
|
||
&.active-sidebar-item { | ||
background-color: var(--panel-select-background); | ||
} | ||
|
||
&:hover { | ||
.focus-overlay { | ||
background-color: black; | ||
opacity: 0.04; | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
projects/material-addons/src/lib/layout/sidebar/sidebar-item/sidebar-item.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,9 @@ | ||
import { Component, ViewEncapsulation } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: '[mad-sidebar-item]', | ||
templateUrl: 'sidebar-item.component.html', | ||
styleUrls: ['sidebar-item.component.scss'], | ||
encapsulation: ViewEncapsulation.None, | ||
}) | ||
export class SidebarItemComponent {} |
10 changes: 10 additions & 0 deletions
10
projects/material-addons/src/lib/layout/sidebar/sidebar.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 @@ | ||
<div [class.collapsed]="collapsed" class="sidebar-wrapper"> | ||
<div class="sidebar-header"> | ||
<button (click)="toggleCollapse()" color="basic" mat-button> | ||
<mat-icon>{{ collapsed ? 'keyboard_double_arrow_right' : 'keyboard_double_arrow_left' }}</mat-icon> | ||
</button> | ||
</div> | ||
<div class="item-list"> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> |
42 changes: 42 additions & 0 deletions
42
projects/material-addons/src/lib/layout/sidebar/sidebar.component.scss
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,42 @@ | ||
$color-gray: #707070; | ||
|
||
.sidebar-wrapper { | ||
background: var(--panel-background-color); | ||
min-height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
border-right: 1px solid var(--panel-border-color); | ||
margin-top: 10px; | ||
|
||
transition: width 0.1s ease-in; | ||
|
||
&:not(.collapsed) { | ||
min-width: 239px; | ||
} | ||
|
||
&.collapsed { | ||
width: 64px; | ||
} | ||
|
||
.sidebar-header { | ||
display: flex; | ||
flex-direction: row-reverse; | ||
border-bottom: 1px solid var(--panel-border-color); | ||
|
||
button { | ||
color: $color-gray; | ||
} | ||
} | ||
|
||
&.collapsed { | ||
.item-list { | ||
display: none; | ||
} | ||
} | ||
|
||
.item-list { | ||
display: flex; | ||
flex-direction: column; | ||
margin-top: 16px; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
projects/material-addons/src/lib/layout/sidebar/sidebar.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,14 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'mad-sidebar', | ||
templateUrl: './sidebar.component.html', | ||
styleUrls: ['./sidebar.component.scss'], | ||
}) | ||
export class SidebarComponent { | ||
collapsed = false; | ||
|
||
toggleCollapse() { | ||
this.collapsed = !this.collapsed; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
projects/material-addons/src/lib/layout/sidebar/sidebar.module.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,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { SidebarComponent } from './sidebar.component'; | ||
import { SidebarItemComponent } from './sidebar-item/sidebar-item.component'; | ||
import { MatIconModule } from '@angular/material/icon'; | ||
import { MatButtonModule } from '@angular/material/button'; | ||
|
||
@NgModule({ | ||
declarations: [SidebarComponent, SidebarItemComponent], | ||
exports: [SidebarComponent, SidebarItemComponent], | ||
imports: [CommonModule, MatIconModule, MatButtonModule], | ||
}) | ||
export class SidebarModule {} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
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
Oops, something went wrong.