Skip to content

Commit

Permalink
feat: add presentation link
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gavanier committed Sep 4, 2023
1 parent a4f6a7e commit 6550ec4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/features/core/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './collapse/collapse.module';
export * from './modal/modal.module';
export * from './modal/modal.component';
export * from './offcanvas/offcanvas.component';
export * from './offcanvas/offcanvas.module';
1 change: 1 addition & 0 deletions src/features/core/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components';
export * from './skip-link';
5 changes: 3 additions & 2 deletions src/root/components/conteneur/conteneur.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@
[useHeader]="false"
className="w-100 mt-lg-0 mt-navbar z-index-over">
<ul class="navbar-nav nav-underline ms-auto mb-2 mb-lg-0">
<ng-content select="[slot=links]"></ng-content>
<li class="nav-item">
<a
[routerLink]="['/', 'orientation']"
queryParamsHandling="preserve"
class="nav-link me-4 pb-0 px-0"
class="nav-link ms-4 pb-0 px-0"
ariaCurrentWhenActive="page"
routerLinkActive="active"
(click)="navbarOffcanvas.close()">
Expand All @@ -52,7 +53,7 @@
<a
[routerLink]="['/', 'cartographie']"
queryParamsHandling="preserve"
class="nav-link pb-0 px-0"
class="nav-link ms-4 pb-0 px-0"
ariaCurrentWhenActive="page"
routerLinkActive="active"
(click)="navbarOffcanvas.close()">
Expand Down
6 changes: 4 additions & 2 deletions src/root/components/conteneur/conteneur.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, Renderer2 } from '@angular/core';
import { SkipLinkPresenter } from '../../../features/core';
import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, Renderer2, ViewChild } from '@angular/core';
import { OffcanvasComponent, SkipLinkPresenter } from '../../../features/core';
import { BRAND_CONFIGURATION, BRAND_TOKEN, BrandConfiguration } from '../../configuration';

@Component({
Expand All @@ -16,6 +16,8 @@ export class ConteneurComponent {
BRAND_CONFIGURATION.name = name;
}

@ViewChild('navbarOffcanvas') navbarOffcanvas!: OffcanvasComponent;

public constructor(
@Inject(BRAND_TOKEN) public readonly brandConfiguration: BrandConfiguration,
public readonly skipLinkPresenter: SkipLinkPresenter,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<app-conteneur>
<app-conteneur #conteneur>
<router-outlet></router-outlet>
<ng-container slot="links">
<li class="nav-item">
<a
[routerLink]="['/', 'presentation']"
queryParamsHandling="preserve"
class="nav-link ms-4 pb-0 px-0"
ariaCurrentWhenActive="page"
routerLinkActive="active"
(click)="conteneur.navbarOffcanvas.close()">
Presentation
</a>
</li>
</ng-container>
<footer id="footer" slot="footer" class="container-fluid p-4 bg-dark d-print-none">
<div class="row justify-content-between">
<div class="col-lg-auto">
Expand Down

0 comments on commit 6550ec4

Please sign in to comment.