Commit cfbee40e authored by Matthieu BENOIST's avatar Matthieu BENOIST
Browse files

Merge branch 'DOS0099168_SEO' into 'master'

SEO

See merge request !131
parents 660ed84d 92901f06
Pipeline #14586 passed with stage
in 1 minute and 49 seconds
version: "3.7"
services:
rendertron:
build:
context: ./docker/dev/
dockerfile: Dockerfile-rendertron
networks:
- default
- grandlyon
labels:
- "traefik.frontend.rule=Host:rendertron.data.grandlyon.docker"
- "traefik.port=8083"
- "traefik.protocol=http"
- "traefik.docker.network=grandlyon"
proxy:
build:
context: ./docker/dev/
dockerfile: Dockerfile-nginx
volumes:
- ./docker/dev/nginx-development-proxy.conf:/etc/nginx/conf.d/default.conf
labels:
- "traefik.frontend.rule=Host:data.grandlyon.docker"
- "traefik.port=80"
- "traefik.protocol=http"
- "traefik.docker.network=grandlyon"
networks:
default:
aliases:
- data.grandlyon.docker
grandlyon:
networks:
grandlyon:
external: true
FROM nginx
RUN apt-get update
RUN apt-get --assume-yes install nginx-extras
RUN rm /etc/nginx/conf.d/*
RUN ls -l /usr/share/nginx/html
FROM scandipwa/rendertron
server {
# staging server is listening on the port 8180
listen 80;
server_name data.grandlyon.docker proxy;
root /usr/share/nginx/html/;
error_page 404 /page-404;
location / {
set $prerender 0;
if ($http_user_agent ~* "googlebot|yahoo|bingbot|baiduspider|yandex|yeti|yodaobot|gigabot|ia_archiver|facebookexternalhit|twitterbot|linkedinbot|developers\.google\.com") {
set $prerender 1;
}
if ($args ~ "_escaped_fragment_|prerender=1") {
set $prerender 1;
}
if ($http_user_agent ~ "Prerender") {
set $prerender 0;
}
if ($request_uri ~* "gif|png|jpg|pdf|svg|jpeg|css") {
set $prerender 0;
}
if ($prerender = 1) {
rewrite .* /render/http://$server_name$request_uri break;
proxy_pass http://rendertron:8083;
add_header Access-Control-Allow-Origin *;
}
if ($prerender = 0) {
proxy_pass http://host.docker.internal:4200;
add_header Access-Control-Allow-Origin *;
}
if ($request_uri ~* "page-404") {
proxy_pass http://host.docker.internal:4200;
return 404;
}
}
#location /robots.txt {
# rewrite ^ /fr/robots.txt;
#}
}
......@@ -5,8 +5,8 @@
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"start-aot-fr": "ng serve --configuration=aot-fr",
"start-aot-en": "ng serve --configuration=aot-en",
"start-aot-fr": "ng serve --configuration=aot-fr --disable-host-check",
"start-aot-en": "ng serve --configuration=aot-en --disable-host-check",
"build-i18n:dev": "for lang in en fr; do node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --configuration=development-$lang --delete-output-path false; done",
"build-i18n:prod": "for lang in en fr; do node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --configuration=production-$lang --delete-output-path false; done",
"win-build-i18n:fr": "node --max_old_space_size=2048 ./node_modules/@angular/cli/bin/ng build --configuration=development-fr --delete-output-path false",
......
......@@ -27,6 +27,17 @@ Using the npm script (which use the Angular CLI):
npm run start
```
### Using with rendertron
Add 127.0.0.1 data.grandlyon.docker rendertron.data.grandlyon.docker to your host
Run the container with
```bash
docker-compose -f docker-compose-developement.rendertron.yml up -d
```
Start the web application with npm. You can no acces to both app and SSR version through the 2 domains aforesaid.
### Build the application
We defined in the package.json two scripts that can build the application. One that generates an optimized build and the other an unoptimized build. The optimized build takes longer than the normal one.
......
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './editorialisation/components';
import { AppRoutes } from './routes';
export const routes: Routes = [
{
path: '',
component: HomeComponent,
},
{
path: '**',
redirectTo: AppRoutes.page404.uri,
......
......@@ -6,6 +6,8 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
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',
......@@ -19,6 +21,7 @@ export class AppComponent implements OnInit {
private _activatedRoute: ActivatedRoute,
private _titleService: Title,
private _angulartics2Piwik: Angulartics2Piwik,
private _seoSErvice: SeoSErvice,
) {
this._angulartics2Piwik.startTracking();
}
......@@ -30,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),
......@@ -46,9 +50,15 @@ export class AppComponent implements OnInit {
}
return titles;
}),
).subscribe((titles) => {
const title = titles.join(' - ');
this._titleService.setTitle(title);
).subscribe((titles): void => {
if (titles.length > 1) {
const title = titles.join(' - ');
this._seoSErvice.setRoutingSEO(title);
}
else {
this._seoSErvice.setRoutingSEO('');
}
});
}
......
......@@ -9,7 +9,7 @@
</div>
</div>
<div class="navbar-header-item logo-data">
<a [routerLink]="['/', AppRoutes.home.uri]" *ngIf="!isHomePage">
<a [routerLink]="['']" *ngIf="!isHomePage">
<img class="logo-data-beta is-hidden-mobile" src="./assets/img/header_logo_data.svg"
alt="Return to homepage" i18n-alt="@@header.returnHome">
<img class="is-hidden-tablet" src="./assets/img/header_logo_data_mobile.svg"
......
......@@ -3,7 +3,7 @@
<nav class="menu-list">
<ul class="menu-list">
<li>
<a [routerLink]="['/', AppRoutes.home.uri]" routerLinkActive="active-link"
<a [routerLink]="['/']" routerLinkActive="active-link"
[routerLinkActiveOptions]="{ exact: true }" [tabIndex]="isOpened ? 0 : -1">
<div class="icon-item">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23">
......@@ -16,14 +16,26 @@
</a>
</li>
<li>
<a [routerLink]="['/', AppRoutes.research.uri]" routerLinkActive="active-link" [tabIndex]="isOpened ? 0 : -1">
<a [routerLink]="['/', AppRoutes.datasets.uri]" routerLinkActive="active-link" [tabIndex]="isOpened ? 0 : -1">
<div class="icon-item">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23">
<path class="main" fill-rule="evenodd"
d="M18.1 10.1a8 8 0 1 1-8-8 8 8 0 0 1 8 8zm-1.9 6.7a9.2 9.2 0 0 1-6.1 2.3 9 9 0 1 1 9-9 9 9 0 0 1-2.2 6l5 4.8a.5.5 0 0 1 0 .7.6.6 0 0 1-.8 0z" />
</svg>
</div>
<span i18n="@@menu.research" class="label-menu">Research</span>
<span i18n="@@menu.datasets" class="label-menu">Datasets</span>
</a>
</li>
<li>
<a [routerLink]="['/', AppRoutes.news.uri]" routerLinkActive="active-link" [tabIndex]="isOpened ? 0 : -1">
<div class="icon-item">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23">
<path id="picto_x5F_documentation"
d="M19 6.9l-5-4.7c-.4-.5-.9-.7-1.5-.7h-6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V8.2c0-.4-.2-.9-.5-1.3zm-5.7-4l4.9 4.6H14c-.6 0-1-.4-1-1V2.7c.1 0 .2.1.3.2zm4.2 17.6h-11c-.6 0-1-.4-1-1v-16c0-.6.4-1 1-1H12v4c0 1.1.9 2 2 2h4.5v11c0 .6-.4 1-1 1z"
class="main" />
</svg>
</div>
<span i18n="@@menu.news" class="label-menu">News</span>
</a>
</li>
<li *ngIf="APP_CONFIG.theFunctionalitiesInterruptor.partners">
......
......@@ -7,6 +7,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
overflow-y: auto;
@media screen and (max-width: $tablet) {
overflow: scroll;
......
......@@ -8,4 +8,4 @@
i18n="@@page404.backBtnText">Back
to home page</a>
</div>
</div>
\ No newline at end of file
</div>
import { Component, OnInit } from '@angular/core';
import { AppRoutes } from '../../../routes';
import { isRentertron } from '../../../shared/variables';
@Component({
selector: 'app-page-not-found',
......@@ -13,6 +14,10 @@ export class PageNotFoundComponent implements OnInit {
constructor() { }
ngOnInit() {
if (isRentertron) {
window.location.href = 'page-404';
}
}
}
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from '../editorialisation/components';
import { AppRoutes } from '../routes';
import { ContactComponent } from './components';
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
......@@ -7,8 +8,7 @@ import { PageNotFoundComponent } from './components/page-not-found/page-not-foun
export const routes: Routes = [
{
path: '',
redirectTo: AppRoutes.home.uri,
pathMatch: 'full',
component: HomeComponent,
},
{
path: AppRoutes.page404.uri,
......
......@@ -3,122 +3,36 @@
<app-page-header [pageInfo]="pageHeaderInfo" [customGoToPreviousPage]="goToPreviousPage"></app-page-header>
</div>
<div class="tabulations">
<div class="tabulations" >
<ul class="navigation-tabs">
<li [routerLinkActive]="'is-active'" *ngIf="hasTable || hasMap">
<a (click)="setPosition()" [routerLink]="[AppRoutes.data.uri]" class="tab-link">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 32" aria-hidden="true">
<path class="primary"
d="M19 0L4.5 6.4v19.4L19 32l14.5-6.4V6.4L19 0zm13.5 24.9l-13 5.7-.5.3-13.5-5.8v-18l13.5-6 13.1 5.8L19 13l.5.2v.6l13-6.1v17.2z" />
<path class="secondary" d="M19 30.9l.5-.2V13.2L5.9 6.9l-.4.2v.7l13 6.1v16.8z" />
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title" i18n="@@dataset.detail.data">Data</span>
</div>
<div>
<span class="tab-subtitle" i18n="@@dataset.detail.lines">{{ datasetDataNumber }} lines</span>
</div>
</div>
<li [routerLinkActive]="'is-active'">
<a (click)="setPosition()" [routerLink]="[AppRoutes.info.uri]" class="tab-link" *ngIf="!isRendertron; else infoTab">
<ng-template *ngTemplateOutlet="infoTab"></ng-template>
</a>
</li>
<li [routerLinkActive]="'is-active'">
<a (click)="setPosition()" [routerLink]="[AppRoutes.info.uri]" class="tab-link">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 37" aria-hidden="true">
<g id="picto_x5F_info">
<path d="M19 15.6c.3 0 .5.2.5.6V25c0 .3-.2.6-.5.6s-.5-.2-.5-.6v-8.9c0-.3.2-.5.5-.5z" class="secondary" />
<circle cx="19" cy="12" r=".5" class="secondary" />
<path
d="M19 2.5c8.5 0 15.5 7 15.5 15.5s-7 15.5-15.5 15.5S3.5 26.5 3.5 18 10.5 2.5 19 2.5m0-1C9.9 1.5 2.5 8.9 2.5 18S9.9 34.5 19 34.5 35.5 27.1 35.5 18 28.1 1.5 19 1.5z"
class="primary" />
</g>
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.infoTab">Information</span>
<span class="tab-title tab-title-short">Info</span>
</div>
<div>
<span class="tab-subtitle" [title]="datasetLicense">
{{ datasetLicense }}
</span>
</div>
</div>
<li [routerLinkActive]="'is-active'" *ngIf="hasTable || hasMap">
<a (click)="setPosition()" [routerLink]="[AppRoutes.data.uri]" class="tab-link" *ngIf="!isRendertron; else dataTab">
<ng-template *ngTemplateOutlet="dataTab"></ng-template>
</a>
</li>
<li [routerLinkActive]="'is-active'" *ngIf="datasetFormatsList">
<a (click)="setPosition()" [routerLink]="[AppRoutes.downloads.uri]" class="tab-link">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
<path class="primary"
d="M32.515 30H4.5a.5.5 0 01-.5-.5v-7.485a.5.5 0 011 0V29h27.015v-6.985a.5.5 0 011 0V29.5a.5.5 0 01-.5.5z" />
<path class="secondary"
d="M26.771 14.024a.5.5 0 00-.708 0l-7.056 7.057V2.7a.5.5 0 00-1 0v18.381l-7.056-7.057a.5.5 0 00-.707.707l7.91 7.911a.5.5 0 00.707 0l7.91-7.911a.5.5 0 000-.707z" />
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.downloads">Downloads</span>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.downloads">Downloads</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetFormatsList }}</span>
</div>
</div>
<a (click)="setPosition()" [routerLink]="[AppRoutes.downloads.uri]" class="tab-link" *ngIf="!isRendertron; else dlTab">
<ng-template *ngTemplateOutlet="dlTab"></ng-template>
</a>
</li>
<li [routerLinkActive]="'is-active'" *ngIf="datasetServicesList.length > 0">
<a (click)="setPosition()" [routerLink]="[AppRoutes.resources.uri]" class="tab-link">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
<path class="secondary"
d="M12.841 22.076l-8.889-5.484 8.889-5.485a.5.5 0 10-.526-.85l-9.578 5.91-.011.01a.616.616 0 00-.075.07.478.478 0 00-.065.07s-.009.007-.012.012a.489.489 0 00-.026.073.411.411 0 00-.035.094.466.466 0 000 .1.55.55 0 000 .091.456.456 0 00.038.1.412.412 0 00.024.067l.01.01a.5.5 0 00.153.154l9.578 5.91a.5.5 0 00.526-.852z" />
<path class="primary"
d="M35.491 16.594a.46.46 0 000-.1.418.418 0 00-.035-.095.477.477 0 00-.026-.072s-.009-.007-.012-.012a.478.478 0 00-.065-.07.546.546 0 00-.075-.07l-.011-.01-9.578-5.91a.5.5 0 10-.526.85l8.889 5.485-8.889 5.484a.5.5 0 00.526.852l9.578-5.91a.5.5 0 00.153-.154l.01-.01a.54.54 0 00.025-.067.509.509 0 00.037-.1.562.562 0 00-.001-.091zM15.53 28.907a.526.526 0 01-.14-.02.5.5 0 01-.339-.62L21.99 4.6a.5.5 0 01.959.281L16.01 28.548a.5.5 0 01-.48.359z" />
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.api">API</span>
<span class="tab-title tab-title-short">API</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetServicesList }}</span>
</div>
</div>
<a (click)="setPosition()" [routerLink]="[AppRoutes.resources.uri]" class="tab-link" *ngIf="!isRendertron; else apiTab">
<ng-template *ngTemplateOutlet="apiTab"></ng-template>
</a>
</li>
<li [routerLinkActive]="'is-active'" *ngIf="otherResourceList && !datasetFormatsList">
<a (click)="setPosition()" [routerLink]="[AppRoutes.otherResources.uri]" class="tab-link">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
<path class="secondary"
d="M12.841 22.076l-8.889-5.484 8.889-5.485a.5.5 0 10-.526-.85l-9.578 5.91-.011.01a.616.616 0 00-.075.07.478.478 0 00-.065.07s-.009.007-.012.012a.489.489 0 00-.026.073.411.411 0 00-.035.094.466.466 0 000 .1.55.55 0 000 .091.456.456 0 00.038.1.412.412 0 00.024.067l.01.01a.5.5 0 00.153.154l9.578 5.91a.5.5 0 00.526-.852z" />
<path class="primary"
d="M35.491 16.594a.46.46 0 000-.1.418.418 0 00-.035-.095.477.477 0 00-.026-.072s-.009-.007-.012-.012a.478.478 0 00-.065-.07.546.546 0 00-.075-.07l-.011-.01-9.578-5.91a.5.5 0 10-.526.85l8.889 5.485-8.889 5.484a.5.5 0 00.526.852l9.578-5.91a.5.5 0 00.153-.154l.01-.01a.54.54 0 00.025-.067.509.509 0 00.037-.1.562.562 0 00-.001-.091zM15.53 28.907a.526.526 0 01-.14-.02.5.5 0 01-.339-.62L21.99 4.6a.5.5 0 01.959.281L16.01 28.548a.5.5 0 01-.48.359z" />
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.resources">Ressources</span>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.resources">Ressources</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetFormatsList }}</span>
</div>
</div>
<a (click)="setPosition()" [routerLink]="[AppRoutes.otherResources.uri]" class="tab-link" *ngIf="!isRendertron; else resTab">
<ng-template *ngTemplateOutlet="resTab"></ng-template>
</a>
</li>
<li [routerLinkActive]="'is-active'">
<a (click)="setPosition()" [routerLink]="[AppRoutes.dataReuses.uri]" class="tab-link">
<svg class="tab-icon" viewBox="0 0 38 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path class="primary" fill-rule="evenodd" clip-rule="evenodd" d="M5 6.286L19.455 0 33.91 6.285V25.14l-14.455 6.284L5 25.14V6.286zm27.59.516l-6.484-2.82.002.005-5.362 2.264-1.229-.567 5.328-2.25-5.39-2.344-5.423 2.358 5.4 2.218-1.24.572-5.33-2.189.046-.112-6.59 2.866 5.494 2.38-.527.244v.619L6 7.754v7.874l5.285 2.485v1.055l1 .423v7.626l6.541 2.844v-7.703l.63.267.37-.157v7.7h-.007l.006.005 6.543-2.845V19.7l1.257-.532v-1.086l5.285-2.46V7.753l-5.285 2.286v-.613l-.532-.246 5.497-2.378zm.32 9.923l-5.542 2.58v7.588l5.542-2.41v-7.758zM11.285 26.782v-7.564L6 16.733v7.752l5.285 2.297z" fill="#464A57"/>
<path class="secondary" fill-rule="evenodd" clip-rule="evenodd" d="M11.285 19.17V9.427l8.17-3.771 8.17 3.77v9.742l-8.17 3.457-8.17-3.457v.002zm1.75-9.45l6.42-2.962 6.45 2.976-6.274 2.836h-.349l-6.247-2.85zm-.75.758v8.029l6.541 2.767V13.46l-6.54-2.983zm7.541 10.905l6.8-2.877v-8l-6.8 3.073v7.804z" fill="#DA322F"/>
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.reuse">Reuse</span>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.reuse">Reuse</span>
</div>
<div>
<span class="tab-subtitle">{{reusesTypes}}</span>
</div>
</div>
<a (click)="setPosition()" [routerLink]="[AppRoutes.dataReuses.uri]" class="tab-link" *ngIf="!isRendertron; else reuseTab">
<ng-template *ngTemplateOutlet="reuseTab"></ng-template>
</a>
</li>
</ul>
......@@ -127,3 +41,112 @@
<router-outlet></router-outlet>
</div>
</div>
<ng-template #infoTab>
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 37" aria-hidden="true">
<g id="picto_x5F_info">
<path d="M19 15.6c.3 0 .5.2.5.6V25c0 .3-.2.6-.5.6s-.5-.2-.5-.6v-8.9c0-.3.2-.5.5-.5z" class="secondary" />
<circle cx="19" cy="12" r=".5" class="secondary" />
<path
d="M19 2.5c8.5 0 15.5 7 15.5 15.5s-7 15.5-15.5 15.5S3.5 26.5 3.5 18 10.5 2.5 19 2.5m0-1C9.9 1.5 2.5 8.9 2.5 18S9.9 34.5 19 34.5 35.5 27.1 35.5 18 28.1 1.5 19 1.5z"
class="primary" />
</g>
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.infoTab">Information</span>
<span class="tab-title tab-title-short">Info</span>
</div>
<div>
<span class="tab-subtitle" [title]="datasetLicense">
{{ datasetLicense }}
</span>
</div>
</div>
</ng-template>
<ng-template #dataTab>
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 32" aria-hidden="true">
<path class="primary"
d="M19 0L4.5 6.4v19.4L19 32l14.5-6.4V6.4L19 0zm13.5 24.9l-13 5.7-.5.3-13.5-5.8v-18l13.5-6 13.1 5.8L19 13l.5.2v.6l13-6.1v17.2z" />
<path class="secondary" d="M19 30.9l.5-.2V13.2L5.9 6.9l-.4.2v.7l13 6.1v16.8z" />
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title" i18n="@@dataset.detail.data">Data</span>
</div>
<div>
<span class="tab-subtitle" i18n="@@dataset.detail.lines">{{ datasetDataNumber }} lines</span>
</div>
</div>
</ng-template>
<ng-template #dlTab>
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
<path class="primary"
d="M32.515 30H4.5a.5.5 0 01-.5-.5v-7.485a.5.5 0 011 0V29h27.015v-6.985a.5.5 0 011 0V29.5a.5.5 0 01-.5.5z" />
<path class="secondary"
d="M26.771 14.024a.5.5 0 00-.708 0l-7.056 7.057V2.7a.5.5 0 00-1 0v18.381l-7.056-7.057a.5.5 0 00-.707.707l7.91 7.911a.5.5 0 00.707 0l7.91-7.911a.5.5 0 000-.707z" />
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.downloads">Downloads</span>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.downloads">Downloads</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetFormatsList }}</span>
</div>
</div>
</ng-template>
<ng-template #apiTab>
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
<path class="secondary"
d="M12.841 22.076l-8.889-5.484 8.889-5.485a.5.5 0 10-.526-.85l-9.578 5.91-.011.01a.616.616 0 00-.075.07.478.478 0 00-.065.07s-.009.007-.012.012a.489.489 0 00-.026.073.411.411 0 00-.035.094.466.466 0 000 .1.55.55 0 000 .091.456.456 0 00.038.1.412.412 0 00.024.067l.01.01a.5.5 0 00.153.154l9.578 5.91a.5.5 0 00.526-.852z" />
<path class="primary"
d="M35.491 16.594a.46.46 0 000-.1.418.418 0 00-.035-.095.477.477 0 00-.026-.072s-.009-.007-.012-.012a.478.478 0 00-.065-.07.546.546 0 00-.075-.07l-.011-.01-9.578-5.91a.5.5 0 10-.526.85l8.889 5.485-8.889 5.484a.5.5 0 00.526.852l9.578-5.91a.5.5 0 00.153-.154l.01-.01a.54.54 0 00.025-.067.509.509 0 00.037-.1.562.562 0 00-.001-.091zM15.53 28.907a.526.526 0 01-.14-.02.5.5 0 01-.339-.62L21.99 4.6a.5.5 0 01.959.281L16.01 28.548a.5.5 0 01-.48.359z" />
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.api">API</span>
<span class="tab-title tab-title-short">API</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetServicesList }}</span>
</div>
</div>
</ng-template>
<ng-template #resTab>
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
<path class="secondary"
d="M12.841 22.076l-8.889-5.484 8.889-5.485a.5.5 0 10-.526-.85l-9.578 5.91-.011.01a.616.616 0 00-.075.07.478.478 0 00-.065.07s-.009.007-.012.012a.489.489 0 00-.026.073.411.411 0 00-.035.094.466.466 0 000 .1.55.55 0 000 .091.456.456 0 00.038.1.412.412 0 00.024.067l.01.01a.5.5 0 00.153.154l9.578 5.91a.5.5 0 00.526-.852z" />
<path class="primary"
d="M35.491 16.594a.46.46 0 000-.1.418.418 0 00-.035-.095.477.477 0 00-.026-.072s-.009-.007-.012-.012a.478.478 0 00-.065-.07.546.546 0 00-.075-.07l-.011-.01-9.578-5.91a.5.5 0 10-.526.85l8.889 5.485-8.889 5.484a.5.5 0 00.526.852l9.578-5.91a.5.5 0 00.153-.154l.01-.01a.54.54 0 00.025-.067.509.509 0 00.037-.1.562.562 0 00-.001-.091zM15.53 28.907a.526.526 0 01-.14-.02.5.5 0 01-.339-.62L21.99 4.6a.5.5 0 01.959.281L16.01 28.548a.5.5 0 01-.48.359z" />
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.resources">Ressources</span>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.resources">Ressources</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetFormatsList }}</span>
</div>
</div>
</ng-template>
<ng-template #reuseTab>
<svg class="tab-icon" viewBox="0 0 38 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path class="primary" fill-rule="evenodd" clip-rule="evenodd" d="M5 6.286L19.455 0 33.91 6.285V25.14l-14.455 6.284L5 25.14V6.286zm27.59.516l-6.484-2.82.002.005-5.362 2.264-1.229-.567 5.328-2.25-5.39-2.344-5.423 2.358 5.4 2.218-1.24.572-5.33-2.189.046-.112-6.59 2.866 5.494 2.38-.527.244v.619L6 7.754v7.874l5.285 2.485v1.055l1 .423v7.626l6.541 2.844v-7.703l.63.267.37-.157v7.7h-.007l.006.005 6.543-2.845V19.7l1.257-.532v-1.086l5.285-2.46V7.753l-5.285 2.286v-.613l-.532-.246 5.497-2.378zm.32 9.923l-5.542 2.58v7.588l5.542-2.41v-7.758zM11.285 26.782v-7.564L6 16.733v7.752l5.285 2.297z" fill="#464A57"/>
<path class="secondary" fill-rule="evenodd" clip-rule="evenodd" d="M11.285 19.17V9.427l8.17-3.771 8.17 3.77v9.742l-8.17 3.457-8.17-3.457v.002zm1.75-9.45l6.42-2.962 6.45 2.976-6.274 2.836h-.349l-6.247-2.85zm-.75.758v8.029l6.541 2.767V13.46l-6.54-2.983zm7.541 10.905l6.8-2.877v-8l-6.8 3.073v7.804z" fill="#DA322F"/>
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.reuse">Reuse</span>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.reuse">Reuse</span>
</div>
<div>
<span class="tab-subtitle">{{reusesTypes}}</span>
</div>
</div>
</ng-template>
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Meta } from '@angular/platform-browser';
import { ActivatedRoute, Router, Scroll } from '@angular/router';
import { Subscription } from 'rxjs';
import { filter } from 'rxjs/operators';
......@@ -9,7 +8,9 @@ import { datatsetDataRepresentationType, geosource, reusesTypes } from '../../..
import { NavigationHistoryService } from '../../../core/services';
import { AppRoutes } from '../../../routes';
import { IPageHeaderInfo, Metadata, typesMetadata } from '../../../shared/models';
import { isRentertron } from '../../../shared/variables';
import { DatasetDetailService } from '../../services';
import { SeoSErvice } from '../../../editorialisation/services';
@Component({
......@@ -20,6 +21,8 @@ import { DatasetDetailService } from '../../services';
export class DatasetDetailComponent implements OnInit, OnDestroy {
AppRoutes = AppRoutes;
isRendertron = isRentertron;
pageHeaderInfo: IPageHeaderInfo = {
title: '',
shareButtons: {
......@@ -38,7 +41,7 @@ export class DatasetDetailComponent implements OnInit, OnDestroy {
private _router: Router,
private _scroller: ViewportScroller,
private _navigationHistoryService: NavigationHistoryService,
private _meta: Meta,
private _seoService: SeoSErvice,
) { }
ngOnInit() {
......@@ -55,8 +58,6 @@ export class DatasetDetailComponent implements OnInit, OnDestroy {
this._route.params.subscribe((params) => {
// Set the title and description for the research page