* nofollow

* height+width added to thumb img tag
* deploy fix
This commit is contained in:
Danyi Dávid 2018-07-08 21:43:01 +02:00
parent 1b15d33841
commit 43f9eabaed
10 changed files with 18 additions and 9 deletions

View File

@ -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",

View File

@ -2,14 +2,15 @@
<h1>
<a [routerLink]="['']" title="Back to albums list"><i class="fa fa-level-up"></i></a>
{{album.name}}
<a [href]="exportUrl" title="Download compressed album"><i class="fa fa-download"></i></a>
<a rel="nofollow" [href]="exportUrl" title="Download compressed album"><i class="fa fa-download"></i></a>
</h1>
<div class="row images">
<app-thumbnail *ngFor="let thumbnail of thumbnails"
<a app-thumbnail *ngFor="let thumbnail of thumbnails" href="#"
[image]="thumbnail.image"
[label]="thumbnail.label"
(click)="imageClick(album.slug, thumbnail.path)"></app-thumbnail>
[width]="thumbnail.width"
[height]="thumbnail.height"
(click)="imageClick(album.slug, thumbnail.path)"></a>
</div>
<div class="row images">
</div>
<app-display-image (imageChange)="switchImage($event)"></app-display-image>

View File

@ -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 }) {

View File

@ -4,6 +4,8 @@
<a app-thumbnail *ngFor="let thumbnail of thumbnails"
[image]="thumbnail.image"
[label]="thumbnail.label"
[width]="thumbnail.width"
[height]="thumbnail.height"
[routerLink]="['/album', thumbnail.slug]"></a>
</div>
</div>

View File

@ -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));
}

View File

@ -6,4 +6,5 @@ export class Thumbnail {
public path: string = '';
public label: ThumbLabel = new ThumbLabel();
public height: number = 0;
public width: number = 0;
}

View File

@ -1,5 +1,5 @@
<a class="thumbnail">
<img class="image" src="{{image}}">
<img class="image" src="{{image}}" [width]="width" [height]="height">
<div class="label" *ngIf="label">
<h1 class="title">{{label.title}}</h1>
<h2 class="extra">{{label.extraLeft}}<span class="align right">{{label.extraRight}}</span></h2>

View File

@ -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() {}

View File

@ -1,4 +1,4 @@
export const environment = {
production: true,
apiUrl: 'http://photos-api.yvan.hu',
apiUrl: 'https://photos-api.yvan.hu',
};

View File

@ -6,5 +6,5 @@
export const environment = {
production: false,
// apiUrl: 'http://localhost:8888',
apiUrl: 'http://photos-api.yvan.hu',
apiUrl: '//photos-api.yvan.hu',
};