Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
web-app
Commits
bd201319
Commit
bd201319
authored
Apr 13, 2021
by
Matthieu Benoist
Browse files
changing titles, meta, etc. Adding Descriptions blocks on news list and datasets page
parent
047a8eda
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/app/app.component.ts
View file @
bd201319
...
...
@@ -7,6 +7,7 @@ import { environment } from '../environments/environment';
import
{
NavigationHistoryService
}
from
'
./core/services
'
;
import
{
AppRoutes
}
from
'
./routes
'
;
import
{
SeoSErvice
}
from
'
./editorialisation/services
'
;
import
{
pageTitles
}
from
'
../i18n/traductions
'
;
@
Component
({
selector
:
'
app-root
'
,
...
...
@@ -32,6 +33,7 @@ export class AppComponent implements OnInit {
this
.
_navigationHistoryService
.
add
(
e
[
'
urlAfterRedirects
'
]);
});
// Change the title using the title property passed in the data of each route
this
.
_router
.
events
.
pipe
(
filter
(
event
=>
event
instanceof
NavigationEnd
),
...
...
src/app/datasets/components/results/results.component.html
View file @
bd201319
<div
class=
"page-header-container"
>
<app-page-header
[pageInfo]=
"pageHeaderInfo"
></app-page-header>
<p
*ngIf=
"intro"
>
{{ intro }}
</p>
</div>
<div
class=
"main-content"
>
<div
class=
"filter-button-touch column is-hidden-desktop"
(click)=
"toggleFilters()"
>
...
...
src/app/datasets/components/results/results.component.scss
View file @
bd201319
...
...
@@ -14,6 +14,20 @@ $sticky-distance: $header-bar-height + 32px;
}
}
.page-header-container
{
background-color
:
white
;
padding
:
0
1
.25rem
0
1
.25rem
;
margin
:
2rem
;
margin-bottom
:
0rem
;
border-radius
:
8px
;
box-shadow
:
0px
6px
12px
rgb
(
129
128
128
/
10%
);
p
{
padding-bottom
:
2em
;
}
}
@media
(
max-width
:
$tablet
)
{
.header-dataset
{
flex-direction
:
column-reverse
;
...
...
src/app/datasets/components/results/results.component.ts
View file @
bd201319
...
...
@@ -3,13 +3,13 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
import
{
Meta
}
from
'
@angular/platform-browser
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
Subscription
}
from
'
rxjs
'
;
import
{
metaDescription
,
introText
,
notificationMessages
}
from
'
../../../../i18n/traductions
'
;
import
{
metaDescription
,
introText
,
notificationMessages
,
pageTitles
}
from
'
../../../../i18n/traductions
'
;
import
{
Notification
}
from
'
../../../core/models
'
;
import
{
NotificationService
}
from
'
../../../core/services
'
;
import
{
CMSContent
}
from
'
../../../editorialisation/models
'
;
import
{
IScope
}
from
'
../../../elasticsearch/models
'
;
import
{
AppRoutes
}
from
'
../../../routes
'
;
import
{
Dataset
,
IMetadataLink
,
PaginatorOptions
}
from
'
../../../shared/models
'
;
import
{
Dataset
,
IMetadataLink
,
IPageHeaderInfo
,
PaginatorOptions
}
from
'
../../../shared/models
'
;
import
{
SearchSuggestion
}
from
'
../../models
'
;
import
{
DatasetResearchService
,
ResearchUrlService
}
from
'
../../services
'
;
...
...
@@ -24,6 +24,11 @@ export class ResultsComponent implements OnInit, OnDestroy {
results
:
Dataset
[]
|
CMSContent
[];
pageHeaderInfo
:
IPageHeaderInfo
=
{
title
:
pageTitles
.
datasets
};
intro
:
string
=
introText
.
research
;
countResults
:
[];
hasParams
:
boolean
=
false
;
searchChangeSub
:
Subscription
;
...
...
@@ -47,6 +52,8 @@ export class ResultsComponent implements OnInit, OnDestroy {
ngOnInit
()
{
console
.
log
(
`Titre vaut :
${
pageTitles
.
datasets
}
.`
);
console
.
log
(
pageTitles
);
// Set the title and description for the research page
this
.
_meta
.
updateTag
({
name
:
'
description
'
,
content
:
metaDescription
.
research
});
...
...
src/app/editorialisation/services/seo.service.ts
View file @
bd201319
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Meta
,
Title
}
from
'
@angular/platform-browser
'
;
import
{
environment
}
from
'
../../../environments/environment
'
;
import
{
pageTitles
}
from
'
../../../i18n/traductions
'
;
import
{
AppRoutes
}
from
'
../../routes
'
;
import
{
Metadata
}
from
'
../../shared/models
'
;
import
{
CMSContent
,
Reuse
}
from
'
../models
'
;
...
...
@@ -30,6 +31,7 @@ export class SeoSErvice {
const
imageUrl
=
(
post
.
content
.
og_image
!=
null
)
?
post
.
content
.
og_image
:
post
.
content
.
featureImage
;
const
meta
=
[
{
name
:
'
description
'
,
content
:
post
.
content
.
excerpt
},
{
property
:
'
og:title
'
,
content
:
post
.
content
.
og_title
},
...
...
src/app/routes.ts
View file @
bd201319
...
...
@@ -185,8 +185,8 @@ export const AppRoutes = {
datasets
:
{
uri
:
'
jeux-de-donnees
'
,
title
:
{
fr
:
'
Jeux de données
'
,
en
:
'
Datasets
'
,
fr
:
'
Jeux de données
de la plateforme data de la Métropole de Lyon
'
,
en
:
'
Datasets
from the Lyon Metropolis data platform
'
,
},
},
info
:
{
...
...
src/i18n/traductions.fr.ts
View file @
bd201319
...
...
@@ -259,6 +259,7 @@ export const subjects = [
export
const
pageTitles
=
{
siteMap
:
'
Plan du site
'
,
datasets
:
'
Jeux de données de la plateforme data de la Métropole de Lyon
'
,
credits
:
'
Crédits
'
,
partners
:
'
Partenaires
'
,
changelog
:
'
Dernières évolutions
'
,
...
...
@@ -276,7 +277,7 @@ export const pageTitles = {
userPasswordUpdate
:
'
Modifier mon mot de passe
'
,
contribution
:
'
Publier un jeu de données
'
,
reuses
:
'
Réutilisations
'
,
news
:
'
Actualités
'
,
news
:
'
Actualités
de la plateforme data de la Métropole de Lyon
'
,
};
export
const
datatsetDataRepresentationType
=
{
...
...
src/i18n/traductions.ts
View file @
bd201319
...
...
@@ -261,9 +261,10 @@ export const subjects = [
export
const
pageTitles
=
{
siteMap
:
'
Site map
'
,
datasets
:
'
Datasets from the Lyon Metropolis data platform
'
,
credits
:
'
Credits
'
,
partners
:
'
Partners
'
,
news
:
'
News
'
,
news
:
'
News
from the Lyon Metropolis data platform
'
,
changelog
:
'
Last changes
'
,
actors
:
'
Actors
'
,
signup
:
'
Sign up
'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment