socialnetworknews-web

A open-source Paper.li clone
git clone git://archive.git.mtrnord.blog/SocialNetworkNews/socialnetworknews-web.git
Log | Files | Refs | README | LICENSE

commit 87d980f774ec8b5e6135d00d696f7736da30ce49
parent 402ac37e0b634b40e12c5483fedf53d85f552330
Author: MTRNord <mtrnord1@gmail.com>
Date:   Mon, 26 Mar 2018 15:27:38 +0200

Lock the Image size to width 350px

Diffstat:
Msrc/app/tweet-list/tweet-list.component.html | 2+-
Msrc/app/tweet-list/tweet-list.component.scss | 5+++++
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/app/tweet-list/tweet-list.component.html b/src/app/tweet-list/tweet-list.component.html @@ -12,7 +12,7 @@ <mat-card-subtitle><i class="fa fa-clock-o">&nbsp;</i>{{item.created_at.toLocaleString()}}</mat-card-subtitle> </mat-card-header> <a (click)="lightbox.show(lightboxItem)" > - <img mat-card-image *ngIf="item.image_urls && item.image_urls[0]" [src]="item.image_urls[0]"> + <img mat-card-image *ngIf="item.image_urls && item.image_urls[0]" [src]="item.image_urls[0]" class="imageHack"> </a> <!-- lightbox container hidden with CSS --> diff --git a/src/app/tweet-list/tweet-list.component.scss b/src/app/tweet-list/tweet-list.component.scss @@ -3,6 +3,11 @@ margin-bottom: 10px; } +.imageHack { + height: 100%; + width: 350px; +} + /* Made by https://codepen.io/gschier/pen/HCoqh */ .lightbox {