amelioration du style globale

This commit is contained in:
MiharyR 2021-11-26 17:05:12 +01:00
parent cd1f323686
commit d1ac1b77f0
36 changed files with 191 additions and 112 deletions

View file

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

View file

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