amelioration du style globale
This commit is contained in:
parent
cd1f323686
commit
d1ac1b77f0
36 changed files with 191 additions and 112 deletions
|
|
@ -2,6 +2,7 @@
|
|||
<span class="helper"></span>
|
||||
<img [src]="'assets/pub/'+ad.images[idxImage].url"
|
||||
[alt]="ad.images[idxImage].url"
|
||||
(click)="onClick()"
|
||||
id="imgFromSearchOrMyPlaylists">
|
||||
</div>
|
||||
|
||||
|
|
@ -10,6 +11,7 @@
|
|||
<img *ngIf="from === 'watchingLeft'"
|
||||
[src]="'assets/pub/'+ad.images[idxImage].url"
|
||||
[alt]="ad.images[idxImage].url"
|
||||
(click)="onClick()"
|
||||
id="imgFromWatchingLeft">
|
||||
|
||||
<!-- --------------------------------------------------------------------- -->
|
||||
|
|
@ -17,4 +19,5 @@
|
|||
<img *ngIf="from === 'watchingRight'"
|
||||
[src]="'assets/pub/'+ad.images[idxImage].url"
|
||||
[alt]="ad.images[idxImage].url"
|
||||
(click)="onClick()"
|
||||
id="imgFromWatchingRight">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {Advert} from "../../../../utils/interfaces/advert";
|
||||
import {ThemeService} from "../../../../utils/services/theme/theme.service";
|
||||
import {Router} from "@angular/router";
|
||||
|
||||
|
||||
|
||||
|
|
@ -15,16 +15,17 @@ export class AdvertComponent implements OnInit
|
|||
@Input() from: string = "search";
|
||||
idxImage: number = 0;
|
||||
|
||||
|
||||
constructor(public themeService: ThemeService) { }
|
||||
|
||||
constructor(private router: Router) { }
|
||||
|
||||
ngOnInit(): void
|
||||
{
|
||||
const nbImages = this.ad.images.length;
|
||||
this.idxImage = Math.floor(Math.random() * nbImages);
|
||||
}
|
||||
|
||||
|
||||
onClick(): void
|
||||
{
|
||||
document.location.href = this.ad.url;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue