diff --git a/src/app/carto/carto.component.ts b/src/app/carto/carto.component.ts index 52857d854d48f3ef0e0635e3b81c38172ea3e0cd..3c6d3289a6217ba7043c4189954ff48219fe70b6 100644 --- a/src/app/carto/carto.component.ts +++ b/src/app/carto/carto.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { Meta } from '@angular/platform-browser'; const { DateTime } = require('luxon'); import * as _ from 'lodash'; @@ -30,7 +31,8 @@ export class CartoComponent implements OnInit { constructor( private structureService: StructureService, private geoJsonService: GeojsonService, - private activatedRoute: ActivatedRoute + private activatedRoute: ActivatedRoute, + private meta: Meta ) {} ngOnInit(): void { @@ -45,6 +47,11 @@ export class CartoComponent implements OnInit { if (history.state.data) { this.currentStructure = new Structure(history.state.data); } + + this.meta.updateTag({ + name: 'description', + content: 'Recense tous les lieux, accompagnements et ateliers de médiation numérique de la Métropole de Lyon.', + }); } public getStructures(filters: Filter[]): void { diff --git a/src/app/contact/contact.component.ts b/src/app/contact/contact.component.ts index 367ec8eca317d810079db2f3aed8218312e7aff3..c2e9bfcc490484111d01c7363bd78e8c9a07d043 100644 --- a/src/app/contact/contact.component.ts +++ b/src/app/contact/contact.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Router } from '@angular/router'; +import { Meta } from '@angular/platform-browser'; import { ContactMessage } from '../models/contact-message.model'; import { AuthService } from '../services/auth.service'; import { ContactService } from '../services/contact.service'; @@ -23,7 +24,8 @@ export class ContactComponent implements OnInit { private router: Router, private authService: AuthService, private notificationService: NotificationService, - public utils: Utils + public utils: Utils, + private meta: Meta ) {} ngOnInit(): void { @@ -37,6 +39,12 @@ export class ContactComponent implements OnInit { subject: ['', Validators.required], message: ['', Validators.required], }); + + this.meta.updateTag({ + name: 'description', + content: + "Formulaire pour contacter Rés'IN, le Réseau des acteurs de l'inclusion numérique de la métropole de Lyon", + }); } public get isLoggedIn(): boolean { diff --git a/src/app/form/orientation-form/orientation-form.component.ts b/src/app/form/orientation-form/orientation-form.component.ts index a76082df793cdbf61c3d03a9ba1fe18943dd1521..59b8b65137b2e06345282418d5c2f53b3434ec76 100644 --- a/src/app/form/orientation-form/orientation-form.component.ts +++ b/src/app/form/orientation-form/orientation-form.component.ts @@ -1,6 +1,7 @@ import { stringify } from '@angular/compiler/src/util'; import { Component, EventEmitter, HostListener, OnInit, Output } from '@angular/core'; import { AbstractControl, Form, FormArray, FormControl, FormGroup, Validators } from '@angular/forms'; +import { Meta } from '@angular/platform-browser'; import { GeoJson } from '../../map/models/geojson.model'; import { Address } from '../../models/address.model'; import { OrientationFormFilters } from '../../models/orientation-filter.object'; @@ -79,13 +80,19 @@ export class OrientationFormComponent implements OnInit { private routerListener: RouterListenerService, private searchService: SearchService, private structureService: StructureService, - private geoJsonService: GeojsonService + private geoJsonService: GeojsonService, + private meta: Meta ) {} ngOnInit(): void { this.orientationForm = this.createOrientationForm(new OrientationFormFilters()); this.setValidationsForm(); this.setCategories(); + this.meta.updateTag({ + name: 'description', + content: + "Permet aux professionnels d'être aidés dans l'accompagnement d'un usager en fragilité numérique pour trouver une réponse adaptée.", + }); } private async setCategories(): Promise<void> { diff --git a/src/app/legal-notice/legal-notice.component.ts b/src/app/legal-notice/legal-notice.component.ts index 8e018f4ab937e0c7fd0e17198d51cfb3a173e73b..e211a76427a9fcd1f687945c8ec20748fff745d0 100644 --- a/src/app/legal-notice/legal-notice.component.ts +++ b/src/app/legal-notice/legal-notice.component.ts @@ -1,15 +1,18 @@ import { Component, OnInit } from '@angular/core'; +import { Meta } from '@angular/platform-browser'; @Component({ selector: 'app-legal-notice', templateUrl: './legal-notice.component.html', - styleUrls: ['./legal-notice.component.scss'] + styleUrls: ['./legal-notice.component.scss'], }) export class LegalNoticeComponent implements OnInit { - - constructor() { } + constructor(private meta: Meta) {} ngOnInit(): void { + this.meta.updateTag({ + name: 'description', + content: "Mentions légales de Rés'IN, le Réseau des acteurs de l'inclusion numérique de la métropole de Lyon", + }); } - } diff --git a/src/app/page/models/page.model.ts b/src/app/page/models/page.model.ts index 3ee6825384dcb172c6573a09b1dc8390f17566a6..ce9655c604c35a8d257fa83793dd9179f544ff8c 100644 --- a/src/app/page/models/page.model.ts +++ b/src/app/page/models/page.model.ts @@ -10,6 +10,7 @@ export class Page { feature_image: string; html: string; safeHtml: SafeHtml; + meta_description: string; constructor(obj?: any) { Object.assign(this, obj); diff --git a/src/app/page/page.component.ts b/src/app/page/page.component.ts index 7f29dce2618c6fe4aa4596340148c3d66c1445d0..3915c15239f24e27a6e3d895ab053e4245e03db2 100644 --- a/src/app/page/page.component.ts +++ b/src/app/page/page.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { DomSanitizer } from '@angular/platform-browser'; +import { Meta } from '@angular/platform-browser'; import packageJson from '../../../package.json'; import { Page } from './models/page.model'; import { PageService } from './services/page.service'; @@ -17,7 +18,12 @@ export class PageComponent implements OnInit { private slugPage: string; private quiSommesNous = PageEnum.quiSommesNous; - constructor(private sanitizer: DomSanitizer, private route: ActivatedRoute, private pageService: PageService) {} + constructor( + private sanitizer: DomSanitizer, + private route: ActivatedRoute, + private pageService: PageService, + private meta: Meta + ) {} ngOnInit(): void { this.route.params.subscribe((routeParams) => { @@ -25,6 +31,10 @@ export class PageComponent implements OnInit { this.pageService.getPage(this.slugPage).subscribe((page) => { this.page = page.pages[0]; this.page.safeHtml = this.sanitizer.bypassSecurityTrustHtml(this.page.html); + this.meta.updateTag({ + name: 'description', + content: this.page.meta_description, + }); }); // Display version number in 'About' page only this.slugPage == this.quiSommesNous ? (this.version = packageJson.version) : (this.version = ''); diff --git a/src/index.html b/src/index.html index 9a66f6a01e7f17fc1d3061b1201c188cb95bc409..78caed151ffbfd74023d064f96288f725cb686f8 100644 --- a/src/index.html +++ b/src/index.html @@ -11,10 +11,11 @@ <meta name="title" content="Rés'In | Réseau des acteurs de l'inclusion numérique de la métropole de Lyon" /> <meta name="description" - content="Retrouver tous les lieux de la médiation numérique de la métropole mais aussi les actualités, projets, ressources, études et appels à projet liès à l'inclusion numérique..." + content="Dédiée aux acteurs de l'inclusion numérique de la Métropole de Lyon, Rés'IN recense tous les lieux qui propose une offre de médiation numérique sur le territoire et vise à permettre une meilleure orientation des usagers. Actualités, appels à projets, outils et ressources en ligne sont également proposés pour faciliter l'accompagnement des personnes en fragilité numérique." /> <meta name="image" content="https://resin.grandlyon.com/assets/logos/resin-logo-1024x512.png" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="google-site-verification" content="gam2SZSqu_MO1xoHwcvhqPCXNsXf60qxXPalwPVKfLM" /> <!-- Open Graph general --> <meta property="og:title" content="Rés'In | Réseau des acteurs de l'inclusion numérique de la métropole de Lyon" />