-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: intranet header condensed (#4084)
Introduces a new option for the intranet header that allows to display the navigation on one line. Previous work done by @riscie and @yopemu on #3539 and backported to v8 by @gfellerph. --------- Co-authored-by: Oliver Schürch <[email protected]> Co-authored-by: Pedroso Munoz Yohandris <[email protected]> Co-authored-by: Matthias Langhard <[email protected]>
- Loading branch information
1 parent
1a55586
commit 209640f
Showing
23 changed files
with
2,415 additions
and
1,257 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
36 changes: 36 additions & 0 deletions
36
...t/components/intranet-header-demo-condensed/intranet-header-demo-condensed.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,36 @@ | ||
<section class="layout-container header-small"> | ||
<sp-intranet-header siteTitle="Condensed" searchUrl="/" [condenseHeader]="true"> | ||
<li class="nav-item"><a href="/postweb" class="col-auto py-3 px-5 nav-link">Home</a></li> | ||
<li class="nav-item"> | ||
<a href="/postweb/post-informatik" class="col-auto py-3 px-5 nav-link" target="_self"> | ||
Post Informatik | ||
</a> | ||
</li> | ||
<li class="nav-item"><a class="col-auto py-3 px-5 nav-link">HR-Portal</a></li> | ||
<li class="nav-item"> | ||
<a href="/postweb/service-portal" class="col-auto py-3 px-5 nav-link">Service-Portal</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="/postweb/die-post" class="col-auto py-3 px-5 nav-link">Die Post</a> | ||
</li> | ||
</sp-intranet-header> | ||
|
||
<div class="container header-margin"> | ||
<main role="main" class="col-md-9 col-lg-10 p-3"> | ||
<h1>Content</h1> | ||
<p> | ||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor | ||
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam | ||
et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est | ||
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed | ||
diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam | ||
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd | ||
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit | ||
amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et | ||
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores | ||
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit | ||
amet. | ||
</p> | ||
</main> | ||
</div> | ||
</section> |
20 changes: 20 additions & 0 deletions
20
...out/components/intranet-header-demo-condensed/intranet-header-demo-condensed.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,20 @@ | ||
import { Component, Inject, LOCALE_ID } from '@angular/core'; | ||
import { HttpErrorResponse } from '@angular/common/http'; | ||
import { ErrorService } from '../../services/error.service'; | ||
|
||
@Component({ | ||
selector: 'app-intranet-header-condesed', | ||
templateUrl: './intranet-header-demo-condensed.component.html', | ||
styleUrls: ['../../intranet-layout.component.css'], | ||
}) | ||
export class IntranetHeaderDemoCondensedComponent { | ||
openedMenu = false; | ||
|
||
constructor(@Inject(LOCALE_ID) public language: string, private errorService: ErrorService) { | ||
// handle language for ngx-translate and for angular PIPE | ||
// Handle unexpected errors | ||
this.errorService.unexpectedErrorEvent.subscribe((response: HttpErrorResponse) => { | ||
console.error('Unexpected error', response); | ||
}); | ||
} | ||
} |
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
1 change: 1 addition & 0 deletions
1
...ace/projects/intranet-header-showcase/src/samples/navigation/navigation.component.spec.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
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
17 changes: 17 additions & 0 deletions
17
...es/samples-navigation-condensed-header/samples-navigation-condensed-header.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,17 @@ | ||
<section class="preview"> | ||
<sp-intranet-header siteTitle="Condensed" searchUrl="/" [condenseHeader]="true"> | ||
<li class="nav-item"><a href="/postweb" class="col-auto py-3 px-5 nav-link">Home</a></li> | ||
<li class="nav-item"> | ||
<a href="/postweb/post-informatik" class="col-auto py-3 px-5 nav-link" target="_self"> | ||
Post Informatik | ||
</a> | ||
</li> | ||
<li class="nav-item"><a class="col-auto py-3 px-5 nav-link">HR-Portal</a></li> | ||
<li class="nav-item"> | ||
<a href="/postweb/service-portal" class="col-auto py-3 px-5 nav-link">Service-Portal</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="/postweb/die-post" class="col-auto py-3 px-5 nav-link">Die Post</a> | ||
</li> | ||
</sp-intranet-header> | ||
</section> |
22 changes: 22 additions & 0 deletions
22
...samples-navigation-condensed-header/samples-navigation-condensed-header.component.spec.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,22 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SamplesNavigationCondensedHeaderComponent } from './samples-navigation-condensed-header.component'; | ||
|
||
describe('SamplesNavigationCondensedHeaderComponent', () => { | ||
let component: SamplesNavigationCondensedHeaderComponent; | ||
let fixture: ComponentFixture<SamplesNavigationCondensedHeaderComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [SamplesNavigationCondensedHeaderComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(SamplesNavigationCondensedHeaderComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
7 changes: 7 additions & 0 deletions
7
...ples/samples-navigation-condensed-header/samples-navigation-condensed-header.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,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-samples-navigation-condensed-header', | ||
templateUrl: './samples-navigation-condensed-header.component.html', | ||
}) | ||
export class SamplesNavigationCondensedHeaderComponent {} |
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.