Compare commits

...

5 Commits

Author SHA1 Message Date
Siroco
dd5bf5c85b Upgrade Angular & Fix Design error 2020-01-28 21:14:17 +01:00
Siroco
3c51715948 Remove @angular/core 2020-01-22 22:15:48 +01:00
Siroco
9527ff0dcd Remove @angular/http 2020-01-22 22:03:42 +01:00
Siroco
e98a16b504 Update Angular codelyzer 2020-01-22 21:59:16 +01:00
Siroco
646f9332ca Update Angular Cli & other modules npm 2020-01-22 21:41:44 +01:00
15 changed files with 5371 additions and 4499 deletions

View File

@ -25,3 +25,15 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
## Extend
For redirect index.html:
```
<html>
<header>
<meta http-equiv="refresh" content="0; url=https://www.industriapaisaia.eus/eu/" />
</header>
</html>
```

View File

@ -12,6 +12,7 @@
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"rebaseRootRelativeCssUrls": true,
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
@ -28,6 +29,23 @@
"scripts": []
},
"configurations": {
"eu": {
"deployUrl":"/eu/",
"baseHref":"/eu/",
"outputPath": "dist/eu",
"i18nFile": "src/locale/messages.eu.xlf",
"i18nFormat": "xlf",
"i18nLocale": "eu",
},
"es": {
"deployUrl":"/es/",
"baseHref":"/es/",
"outputPath": "dist/es",
"i18nFile": "src/locale/messages.es.xlf",
"i18nFormat": "xlf",
"i18nLocale": "es",
},
"production": {
"optimization": true,
"outputHashing": "all",
@ -53,6 +71,12 @@
"browserTarget": "industria-paisaia:build"
},
"configurations": {
"eu": {
"browserTarget": "industria-paisaia:build:eu"
},
"es": {
"browserTarget": "industria-paisaia:build:es"
},
"production": {
"browserTarget": "industria-paisaia:build:production"
}

9655
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,47 +13,48 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@angular/animations": "^8.2.14",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@ks89/angular-modal-gallery": "^6.2.3",
"bootstrap": "^4.1.1",
"bootstrap": "^4.4.1",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"jquery": "^3.3.1",
"jquery": "^3.4.1",
"mousetrap": "^1.6.2",
"rxjs": "^5.5.6",
"simple-pdf-viewer": "^2.0.2",
"rxjs": "^6.5.4",
"rxjs-compat": "^6.0.0-rc.0",
"simple-pdf-viewer": "^2.0.3",
"tslib": "^1.9.0",
"zone.js": "^0.8.19"
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.0",
"@angular/cli": "^7.2.1",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@angular-devkit/build-angular": "^0.803.23",
"@angular/cli": "^8.3.23",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "^8.2.14",
"@types/hammerjs": "^2.0.36",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/mousetrap": "^1.6.0",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"codelyzer": "^4.5.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.1.4",
"karma": "^4.4.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"pdfjs-dist": "^2.2.228",
"protractor": "^5.4.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
"typescript": "~3.5.3"
}
}

60
package.json.backup Normal file
View File

@ -0,0 +1,60 @@
{
"name": "industria-paisaia",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"build-i18n": "for lang in es eu; do ng build --output-path=dist/$lang --aot --bh /$lang/ --i18n-file=src/locale/messages.$lang.xlf --i18n-format=xlf --locale=$lang; done",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^8.2.14",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@ks89/angular-modal-gallery": "^6.2.3",
"bootstrap": "^4.4.1",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"jquery": "^3.4.1",
"mousetrap": "^1.6.2",
"rxjs": "^6.5.4",
"rxjs-compat": "^6.0.0-rc.0",
"simple-pdf-viewer": "^2.0.2",
"tslib": "^1.9.0",
//"zlib": "^1.0.5",
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.23",
"@angular/cli": "^8.3.23",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "^8.2.14",
"@types/hammerjs": "^2.0.36",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/mousetrap": "^1.6.0",
"@types/node": "~6.0.60",
"codelyzer": "^4.5.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~3.5.3"
}
}

View File

@ -1,6 +1,8 @@
import { BrowserModule, Title } from '@angular/platform-browser';
import { NgModule, LOCALE_ID } from '@angular/core';
import { HttpModule } from '@angular/http';
// import { HttpModule } from '@angular/http';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
/*pdf*/
import { FormsModule } from '@angular/forms';
import { SimplePdfViewerModule } from 'simple-pdf-viewer';
@ -43,7 +45,8 @@ import { TextComponent } from './text/text.component';
],
imports: [
BrowserModule,
HttpModule,
// HttpModule,
HttpClientModule,
AppRoutingModule,
FormsModule,
SimplePdfViewerModule,

View File

@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { Http, Response, RequestOptions, Headers, URLSearchParams } from '@angular/http';
import { HttpClient,HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { InterviewItem } from './interview';
@ -12,16 +13,11 @@ export class DedaloService {
entrevistas : Entrevista[]
constructor(
private http: Http
private http: HttpClient,
) {}
getInterviews() : Observable<Entrevistas> {
return this.http.get(this.apiUrl)
.map( (res: Response)=> {
//console.log('response :')
// console.log(res.json())
return res.json()
})
return this.http.get<Entrevistas>(this.apiUrl);
}
}

View File

@ -2,6 +2,6 @@
<p>&copy; <span i18n>Museo Zumalakarregi</span>. 2018 - <span i18n="copyright text">El contenido de este sitio web está bajo la licencia <a target="_blank" href="https://creativecommons.org/licenses/by-nc-sa/3.0/deed.es_ES">Creative Commons By-SA-NC</a></span> - <span i18n><a [routerLink]="_link_texto_legal">{{_name_texto_legal}}</a></span> </p>
<p>www.zumalakarregimuseoa.eus - mzumalakarregi@gipuzkoa.eus - +34 943 88 99 00 - Muxika Egurastokia 6. 20216 Ormaiztegi (Gipuzkoa)</p>
<p>Developed by <a href="https://www.audio-lab.org">Audio-lab</a></p>
<a href="http://www.zumalakarregimuseoa.eus"><img title="Iniciativa del Museo Zumalakarregi" src="assets/zuma-dipu.jpg" style="margin:0 30px;"/></a>
<a href="http://www.irizar.com/"><img title="Con el patrocinio de Irizar Sociedad Cooperativa" src="assets/irizar.jpg" style="max-width:100px;margin:0 30px;"/></a>
<a href="http://www.zumalakarregimuseoa.eus"><img title="Iniciativa del Museo Zumalakarregi" [src]="_logoZuma" style="margin:0 30px;"/></a>
<a href="http://www.irizar.com/"><img title="Con el patrocinio de Irizar Sociedad Cooperativa" [src]="_logoIriziar" style="max-width:100px;margin:0 30px;"/></a>
</footer>

View File

@ -1,4 +1,6 @@
import { Component, OnInit,LOCALE_ID, Inject } from '@angular/core';
import {environment} from '../../environments/environment';
@Component({
selector: 'app-footer',
@ -9,12 +11,15 @@ export class FooterComponent implements OnInit {
_link_texto_legal:string;
_name_texto_legal:string;
_logoIriziar:string = environment.urlLogoIrizar;
_logoZuma:string = environment.urlLogoZuma;
constructor(
@Inject(LOCALE_ID) protected localeId: string
) { }
ngOnInit() {
switch (this.localeId) {
case "eu":
this._link_texto_legal = "lege-oharra";
@ -24,6 +29,8 @@ export class FooterComponent implements OnInit {
this._link_texto_legal = "texto-legal";
this._name_texto_legal = "Texto Legal";
}
this._logoIriziar = '/'+this.localeId+'/'+environment.urlLogoIrizar;
this._logoZuma = '/'+this.localeId+'/'+environment.urlLogoZuma;
}
}

View File

@ -1,5 +1,5 @@
<div class="menu">
<a routerLink="/"><img src="./assets/{{homeImage}}" width="150" height="60" alt=""/></a>
<a routerLink="/"><img [src]="logoIndustriaPaisaia" width="150" height="60" alt=""/></a>
<nav>
<ul class="nav">
<!-- <li class="nav-item" [routerLink]='home' [routerLinkActive]="['active']">Inicio</li> -->

View File

@ -12,6 +12,7 @@ export class MenuComponent implements OnInit {
@Input() pages : PageItem[];
homeImage = "industria-paisaia.es.svg";
logoIndustriaPaisaia:string;
constructor(
@Inject(LOCALE_ID) protected localeId: string,
@ -21,6 +22,9 @@ export class MenuComponent implements OnInit {
ngOnInit() {
if (this.localeId==='es') this.homeImage = "industria-paisaia.es.svg";
else if (this.localeId==='eu') this.homeImage = "industria-paisaia.svg";
this.logoIndustriaPaisaia = "/"+this.localeId+"/assets/"+this.homeImage;
//console.log(this.pages);
// this.pages = this.pages.filter(page => page.slug != 'texto-legal');
}

View File

@ -1,5 +1,7 @@
import { Injectable,LOCALE_ID, Inject } from '@angular/core';
import { Http, Response, RequestOptions, Headers, URLSearchParams } from '@angular/http';
//import { Http, Response, RequestOptions, Headers, URLSearchParams } from '@angular/http';
import { HttpClient,HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { PageItem } from './page';
@ -18,7 +20,7 @@ export class PageService {
apiUrl : string = "https://backend.industriapaisaia.eus/wp-json/wp/v2"
constructor(
private http: Http,
private http: HttpClient,
public sanitizer: DomSanitizer,
@Inject(LOCALE_ID) protected localeId: string
) { }
@ -64,14 +66,21 @@ export class PageService {
getPages(searchParams, childs = false) : Observable<PageItem[]> {
searchParams.set('orderby','menu_order');
searchParams.set('_embed','');
//searchParams.set('_embed','');
searchParams.set('per_page',20);
searchParams.set('lang',this.localeId);
//searchParams.set('context','embed');
let url = `${this.apiUrl}/pages`;
return this.http.get(url,{search:searchParams})
let url = `${this.apiUrl}/pages`+'?_embed&'+searchParams.toString();
return this.http.get<any[]>(url)
.map(res => {
return res.json().map(item => {
//console.log(res)
return res.map( (item) => {
//console.log(item)
let page = new PageItem(
item.id as string,
item.title.rendered,

View File

@ -1,3 +1,5 @@
export const environment = {
production: true
production: true,
urlLogoIrizar: "/assets/irizar.jpg",
urlLogoZuma: "/assets/zuma-dipu.jpg",
};

View File

@ -4,5 +4,7 @@
// The list of which env maps to which file can be found in `.angular-cli.json`.
export const environment = {
production: false
production: false,
urlLogoIrizar: "/assets/irizar.jpg",
urlLogoZuma: "/assets/zuma-dipu.jpg",
};

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title i18n>Industria Paisaia</title>
<title>Industria Paisaia</title>
<base href="/">
<meta name="description" content="Industria Paisaia">
@ -10,18 +10,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico">
<!-- Global site tag (gtag.js) - Google Analytics -->
<meta name="google-site-verification" content="OZI2HZ03xE118ZHu9QaWfRGm-dpUgFS4zrwfHlbj_UE" />
<meta name="google-site-verification" content="OZI2HZ03xE118ZHu9QaWfRGm-dpUgFS4zrwfHlbj_UE" />
</head>
<body>
<app-root></app-root>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-17688134-4"></script>
<script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-17688134-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-17688134-4');
</script>
<app-root></app-root>
</body>
</html>