@@ -9,6 +9,7 @@ import { MatomoTracker } from "ngx-matomo-client";
9
9
import DOMIFA_NEWS from "../assets/files/news.json" ;
10
10
import { NgbModal , NgbModalRef } from "@ng-bootstrap/ng-bootstrap" ;
11
11
import { faRightFromBracket } from "@fortawesome/free-solid-svg-icons" ;
12
+ import { DsfrLink } from "@edugouvfr/ngx-dsfr" ;
12
13
13
14
@Component ( {
14
15
selector : "app-root" ,
@@ -23,6 +24,7 @@ export class AppComponent implements OnInit {
23
24
public readonly partnerLinks = LIENS_PARTENAIRES ;
24
25
public readonly faRightFromBracket = faRightFromBracket ;
25
26
public pendingNews = false ;
27
+ public skipLinks : DsfrLink [ ] = [ ] ;
26
28
// eslint-disable-next-line @typescript-eslint/no-explicit-any
27
29
public news : any ;
28
30
@@ -34,7 +36,7 @@ export class AppComponent implements OnInit {
34
36
private readonly router : Router ,
35
37
private readonly usagerAuthService : UsagerAuthService ,
36
38
private readonly matomo : MatomoTracker ,
37
- private readonly modalService : NgbModal ,
39
+ private readonly modalService : NgbModal
38
40
) {
39
41
this . apiVersion = null ;
40
42
this . usagerProfile = null ;
@@ -92,14 +94,18 @@ export class AppComponent implements OnInit {
92
94
this . modalService . dismissAll ( ) ;
93
95
localStorage . setItem (
94
96
"NEWS_MON_DOMIFA" ,
95
- new Date ( DOMIFA_NEWS [ 0 ] . date ) . toISOString ( ) ,
97
+ new Date ( DOMIFA_NEWS [ 0 ] . date ) . toISOString ( )
96
98
) ;
97
99
this . pendingNews = false ;
98
100
}
99
101
102
+ public onSkiplinkSelect ( event : string ) : void {
103
+ console . log ( "skiplink select" , event ) ;
104
+ }
105
+
100
106
public ngOnInit ( ) : void {
101
107
this . titleService . setTitle (
102
- "Mon DomiFa, l'outil qui facilite la gestion des structures domiciliatirices" ,
108
+ "Mon DomiFa, l'outil qui facilite la gestion des structures domiciliatirices"
103
109
) ;
104
110
105
111
this . usagerAuthService . currentUsagerSubject . subscribe (
@@ -109,7 +115,7 @@ export class AppComponent implements OnInit {
109
115
if ( usager ) {
110
116
this . checkNews ( ) ;
111
117
}
112
- } ,
118
+ }
113
119
) ;
114
120
115
121
this . router . events
@@ -119,7 +125,10 @@ export class AppComponent implements OnInit {
119
125
const event = ev as unknown as NavigationEnd ;
120
126
const splitUrl = event ?. url . split ( "#" ) ;
121
127
this . currentUrl = splitUrl [ 0 ] ;
122
-
128
+ this . skipLinks = [
129
+ { label : "Aller au contenu" , link : `${ this . currentUrl } #page` } ,
130
+ { label : "Aller au pied de page" , link : `${ this . currentUrl } #footer` } ,
131
+ ] ;
123
132
if ( typeof splitUrl [ 1 ] !== "undefined" ) {
124
133
const fragment = splitUrl [ 1 ] ;
125
134
const element = document . getElementById ( fragment ) ;
0 commit comments