Compare commits

...

4 Commits

Author SHA1 Message Date
Siroco
848f7eb7c1 Seo utils 2019-02-03 01:48:02 +01:00
Siroco
276ebc948f Add Google Analytics 2019-02-03 01:07:46 +01:00
Siroco
3d5412d741 Edit Style on hover homepage 2019-02-03 00:57:27 +01:00
Siroco
6390e82599 Add Intro texto to Homepage 2019-02-03 00:47:13 +01:00
13 changed files with 106 additions and 7 deletions

View File

@ -18,6 +18,8 @@
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/robots.txt",
"src/sitemap.xml",
"src/favicon.ico"
],
"styles": [
@ -129,4 +131,4 @@
"prefix": "app"
}
}
}
}

View File

@ -1,4 +1,4 @@
import { BrowserModule } from '@angular/platform-browser';
import { BrowserModule, Title } from '@angular/platform-browser';
import { NgModule, LOCALE_ID } from '@angular/core';
import { HttpModule } from '@angular/http';
/*pdf*/
@ -23,6 +23,7 @@ import { InterviewComponent } from './interview/interview.component';
import { InterviewGridComponent } from './interview-grid/interview-grid.component';
import { DedaloService } from './dedalo.service';
import { HideMarkers } from './pipe';
import { TextComponent } from './text/text.component';
@NgModule({
@ -38,6 +39,7 @@ import { HideMarkers } from './pipe';
InterviewComponent,
InterviewGridComponent,
HideMarkers,
TextComponent,
],
imports: [
BrowserModule,
@ -50,6 +52,7 @@ import { HideMarkers } from './pipe';
providers: [
PageService,
DedaloService,
Title,
//{provide: LOCALE_ID, useValue: 'es-ES'}
],
bootstrap: [AppComponent]

View File

@ -1,2 +1,4 @@
<header class="homepage" id="header" [ngStyle]="{'background-image': 'url(\'./assets/'+homeImage+'\')'}"></header>
<app-text *ngIf="localeId==='eu'" slug='aurkezpena-industria-paisaia'></app-text>
<app-text *ngIf="localeId==='es'" slug='presentacion-paisaje-industrial'></app-text>
<app-section [pages]=pages></app-section>

View File

@ -2,6 +2,8 @@ import { Component, OnInit,LOCALE_ID, Inject } from '@angular/core';
import { PageService } from '../page.service';
import { PageItem } from '../page';
import { ActivatedRoute } from "@angular/router";
import { Meta } from '@angular/platform-browser';
import { Title } from '@angular/platform-browser';
@Component({
selector: 'app-home',
@ -16,14 +18,16 @@ export class HomeComponent implements OnInit {
constructor(
private route: ActivatedRoute,
private pageService: PageService,
@Inject(LOCALE_ID) protected localeId: string
@Inject(LOCALE_ID) public localeId: string,
private titleService: Title,
private meta: Meta,
)
{
// this.route.params.subscribe( params => console.log(params.id) );
}
ngOnInit() {
console.log(this.localeId);
// console.log(this.localeId);
if (this.localeId==='es') this.homeImage = "industria-paisaia.es.svg";
else if (this.localeId==='eu') this.homeImage = "industria-paisaia.svg";
// this.pageService.getItems();
@ -32,6 +36,9 @@ export class HomeComponent implements OnInit {
this.pages = data;
//this.pageService.currentPage
});
let title = "Industria Paisaia"
this.titleService.setTitle(title);
}
}

View File

@ -4,7 +4,7 @@
<a routerLink="/{{page.slug}}">
<div class="row section-content" >
<div class="col-md-1 ia-select"></div>
<div class="col-md-5" [ngStyle]="{'background-size':'cover', 'background-repeat':'no-repeat','background-image':'url(\''+page.background_image+'\')'}"><h1><span>{{page.title}}</span></h1></div>
<div class="col-md-5 ia-image" [ngStyle]="{'background-size':'cover', 'background-repeat':'no-repeat','background-image':'url(\''+page.background_image+'\')'}"><h1><span>{{page.title}}</span></h1></div>
<div class="col-md-6 ia-home-excerpt" [innerHTML]="page.excerpt"></div>
</div>
</a>

View File

View File

@ -0,0 +1,5 @@
<article *ngIf="pages">
<div class="row">
<div class="col-md-10 offset-md-1 info col-xm-12" [innerHTML]="pages[0].content" style="font-size:1.5em;margin-bottom:50px;"></div>
</div>
</article>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TextComponent } from './text.component';
describe('TextComponent', () => {
let component: TextComponent;
let fixture: ComponentFixture<TextComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TextComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TextComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,27 @@
import { Component, OnInit, Input, Inject, LOCALE_ID} from '@angular/core';
import { PageService } from '../page.service';
import { PageItem } from '../page';
@Component({
selector: 'app-text',
templateUrl: './text.component.html',
styleUrls: ['./text.component.css']
})
export class TextComponent implements OnInit {
@Input() slug:string;
pages:PageItem[];
constructor(
private pageService: PageService,
@Inject(LOCALE_ID) protected localeId: string
) { }
ngOnInit() {
this.pageService.getPage(this.slug)
.subscribe(data => {
this.pages = data;
});
}
}

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title i18n>Industria Paisaia . Irizar</title>
<title i18n>Industria Paisaia</title>
<base href="/">
<meta name="description" content="Industria Paisaia">
@ -10,8 +10,18 @@
<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" />
</head>
<body>
<app-root></app-root>
<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>
</body>
</html>

2
src/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Allow: /

14
src/sitemap.xml Normal file
View File

@ -0,0 +1,14 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://www.industriapaisaia.eus/eu/</loc></url>
<url><loc>https://www.industriapaisaia.eus/eu/</loc></url>
<url><loc>https://www.industriapaisaia.eus/eu/jarduerak</loc></url>
<url><loc>https://www.industriapaisaia.eus/eu/elkarrizketak</loc></url>
<url><loc>https://www.industriapaisaia.eus/eu/ikerketa</loc></url>
<url><loc>https://www.industriapaisaia.eus/eu/erakusketa</loc></url>
<url><loc>https://www.industriapaisaia.eus/es/</loc></url>
<url><loc>https://www.industriapaisaia.eus/es/entrevistas</loc></url>
<url><loc>https://www.industriapaisaia.eus/es/exposicion</loc></url>
<url><loc>https://www.industriapaisaia.eus/es/actividades</loc></url>
<url><loc>https://www.industriapaisaia.eus/es/trabajos-de-investigacion</loc></url>
</urlset>

View File

@ -49,7 +49,7 @@ div.menu nav ul li.active { background-color:#f7886c;color:#fff;}
div.stick-menu { z-index:200;position:fixed;width:100%;top:0;}
/* section */
div.ia-section { min-height:300px;width:100%;background-size:contain; background-repeat:no-repeat; }
div.ia-section { margin-bottom:30px; min-height:300px;width:100%;background-size:contain; background-repeat:no-repeat; }
div.ia-section div.row div {text-align:center;min-height:300px;}
div.ia-section h1,
div.ia-section p {margin-top:50px;padding:20px;}
@ -59,6 +59,8 @@ div.ia-section h2 span { background-color:#f7886c; }
div.ia-section:hover { cursor:pointer; }
div.ia-section:active { background: #f7886c; }
div.ia-section:hover div.ia-select { min-height:300px; background:#f7886c; padding:0 !important; }
div.ia-section:hover div.ia-image {filter:grayscale(1);opacity:0.8;}
div.ia-section:hover div.ia-home-excerpt { background:#f7886c;}
div.ia-section div.col-md-5,
div.ia-section div.col-md-6 { padding:20px;}
div.ia-section div.ia-home-excerpt { font-size:1.5em; }