diff --git a/package.json b/package.json index 377fcfd..d6c29b1 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,8 @@ "@angular/platform-browser-dynamic": "^5.2.0", "@angular/platform-server": "^5.2.0", "@angular/router": "^5.2.0", - "@nguniversal/express-engine": "^5.0.0-beta.5", - "@nguniversal/module-map-ngfactory-loader": "^5.0.0-beta.5", + "@nguniversal/express-engine": "5.0.0-beta.5", + "@nguniversal/module-map-ngfactory-loader": "5.0.0-beta.5", "core-js": "^2.4.1", "normalize.css": "^7.0.0", "pm2": "^2.6.1", diff --git a/src/app/gallery/album/album.component.html b/src/app/gallery/album/album.component.html index 46403d3..bcef6a4 100644 --- a/src/app/gallery/album/album.component.html +++ b/src/app/gallery/album/album.component.html @@ -2,14 +2,15 @@

{{album.name}} - +

- + [width]="thumbnail.width" + [height]="thumbnail.height" + (click)="imageClick(album.slug, thumbnail.path)">
-
\ No newline at end of file diff --git a/src/app/gallery/album/album.component.ts b/src/app/gallery/album/album.component.ts index ba60f81..5804e6c 100644 --- a/src/app/gallery/album/album.component.ts +++ b/src/app/gallery/album/album.component.ts @@ -57,6 +57,7 @@ export class AlbumComponent implements OnInit { extraLeft: '', }, height: image.thumbHeight, + width: image.thumbWidth }).map(thumbnail => this.thumbnails.push(thumbnail)); } @@ -70,6 +71,7 @@ export class AlbumComponent implements OnInit { public imageClick(slug: string, path: string) { this.displayImageService.activate(slug, path, this.album.name); + return false; } public switchImage(evnt: { direction: string, currentPath: string }) { diff --git a/src/app/gallery/gallery/gallery.component.html b/src/app/gallery/gallery/gallery.component.html index d3d5425..8826bf4 100644 --- a/src/app/gallery/gallery/gallery.component.html +++ b/src/app/gallery/gallery/gallery.component.html @@ -4,6 +4,8 @@ diff --git a/src/app/gallery/gallery/gallery.component.ts b/src/app/gallery/gallery/gallery.component.ts index cc8f5bc..76f65e5 100644 --- a/src/app/gallery/gallery/gallery.component.ts +++ b/src/app/gallery/gallery/gallery.component.ts @@ -43,6 +43,7 @@ export class GalleryComponent implements OnInit { extraLeft: album.date, }, height: album.coverImage.thumbHeight, + width: album.coverImage.thumbWidth }).map(thumbnail => this.thumbnails.push(thumbnail)); } diff --git a/src/app/gallery/shared/thumbnail.model.ts b/src/app/gallery/shared/thumbnail.model.ts index ad26199..46d30de 100644 --- a/src/app/gallery/shared/thumbnail.model.ts +++ b/src/app/gallery/shared/thumbnail.model.ts @@ -6,4 +6,5 @@ export class Thumbnail { public path: string = ''; public label: ThumbLabel = new ThumbLabel(); public height: number = 0; + public width: number = 0; } diff --git a/src/app/gallery/thumbnail/thumbnail.component.html b/src/app/gallery/thumbnail/thumbnail.component.html index aeb7e8b..493be94 100644 --- a/src/app/gallery/thumbnail/thumbnail.component.html +++ b/src/app/gallery/thumbnail/thumbnail.component.html @@ -1,5 +1,5 @@ - +

{{label.title}}

{{label.extraLeft}}{{label.extraRight}}

diff --git a/src/app/gallery/thumbnail/thumbnail.component.ts b/src/app/gallery/thumbnail/thumbnail.component.ts index 5571078..1db26ce 100644 --- a/src/app/gallery/thumbnail/thumbnail.component.ts +++ b/src/app/gallery/thumbnail/thumbnail.component.ts @@ -12,6 +12,8 @@ export class ThumbnailComponent implements OnInit { @Input() image: string = ""; @Input() label: ThumbLabel = null; @Input() target: any = {}; + @Input() width: number = 0; + @Input() height: number = 0; constructor() {} diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 82db99d..720289d 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,4 +1,4 @@ export const environment = { production: true, - apiUrl: 'http://photos-api.yvan.hu', + apiUrl: 'https://photos-api.yvan.hu', }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 9de6b3a..81d12a9 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,5 +6,5 @@ export const environment = { production: false, // apiUrl: 'http://localhost:8888', - apiUrl: 'http://photos-api.yvan.hu', + apiUrl: '//photos-api.yvan.hu', };