2019-06-24 16:09:40 +02:00
|
|
|
import {Component, Input} from '@angular/core';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'gif-slider',
|
|
|
|
template: `
|
2019-06-24 21:21:31 +02:00
|
|
|
<div class="uk-position-relative uk-height-max-large" tabindex="-1" uk-slideshow="animation: fade; autoplay: true; autoplay-interval: 4000; pause-on-hover: false">
|
2019-06-24 16:09:40 +02:00
|
|
|
<ul class="uk-slideshow-items">
|
2019-06-24 21:21:31 +02:00
|
|
|
<li *ngFor="let gif of gifs" >
|
2019-06-24 16:09:40 +02:00
|
|
|
<div class="uk-flex uk-flex-middle uk-padding" uk-grid>
|
|
|
|
<div class="uk-width-1-2">
|
2019-06-24 21:21:31 +02:00
|
|
|
<img [attr.src]="gif.gif">
|
2019-06-24 16:09:40 +02:00
|
|
|
</div>
|
|
|
|
<div class="uk-width-1-2">
|
2019-06-24 21:21:31 +02:00
|
|
|
<h1 style="font-size: 28px">{{gif.header}}</h1>
|
|
|
|
<div class="uk-text-large"> {{gif.text}}</div>
|
|
|
|
<div *ngIf="link" class="uk-inline uk-margin-large-top uk-margin-bottom">
|
|
|
|
<a class="uk-button portal-button uk-text-uppercase" [routerLink]="route" routerLinkActive="router-link-active">{{linkTitle}}</a>
|
2019-06-24 16:09:40 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>`
|
|
|
|
})
|
|
|
|
|
|
|
|
export class GifSliderComponent {
|
2019-06-24 21:21:31 +02:00
|
|
|
@Input() gifs: {"gif": string, "header": string, "text"}[] = [];
|
|
|
|
@Input() link = false;
|
|
|
|
@Input() route = null;
|
|
|
|
@Input() linkTitle = null;
|
2019-06-24 16:09:40 +02:00
|
|
|
}
|