commencement de la page watching

This commit is contained in:
MiharyR 2021-11-21 01:30:53 +01:00
parent fd7322a7bc
commit ccb33d8aeb
27 changed files with 691 additions and 59 deletions

View file

@ -1,6 +1,20 @@
<div [class]="themeService.getClassTheme()">
<div class="myContainer">
<span class="helper"></span>
<img [src]="'assets/pub/'+ad.images[idxImage].url" [alt]="ad.images[idxImage].url">
</div>
<div *ngIf="from==='search' || from==='myPlaylists'" class="myContainer">
<span class="helper"></span>
<img [src]="'assets/pub/'+ad.images[idxImage].url"
[alt]="ad.images[idxImage].url"
id="imgFromSearchOrMyPlaylists">
</div>
<!-- --------------------------------------------------------------------- -->
<img *ngIf="from === 'watchingLeft'"
[src]="'assets/pub/'+ad.images[idxImage].url"
[alt]="ad.images[idxImage].url"
id="imgFromWatchingLeft">
<!-- --------------------------------------------------------------------- -->
<img *ngIf="from === 'watchingRight'"
[src]="'assets/pub/'+ad.images[idxImage].url"
[alt]="ad.images[idxImage].url"
id="imgFromWatchingRight">

View file

@ -6,23 +6,33 @@
transform: translateY(-50%);
}
img {
#imgFromSearchOrMyPlaylists {
max-width: 100%;
max-height: 100%;
border: solid 3px;
border: solid 3px black;
vertical-align: middle;
}
.lightTheme img {
border-color: black;
}
.darkTheme img {
border-color: white;
}
.helper {
display: inline-block;
height: 100%;
vertical-align: middle;
}
// ------------------------------------------------------------------------------
#imgFromWatchingLeft {
width: 14vw;
height: 70vh;
border: solid 3px black;
position: fixed;
left: 1vw;
}
#imgFromWatchingRight {
width: 15vw;
height: 70vh;
border: solid 3px black;
position: fixed;
right: 1vw;
}

View file

@ -12,6 +12,7 @@ import {ThemeService} from "../../../../utils/services/theme/theme.service";
export class AdvertComponent implements OnInit
{
@Input() ad: Advert;
@Input() from: string = "search";
idxImage: number = 0;
@ -22,6 +23,8 @@ export class AdvertComponent implements OnInit
{
const nbImages = this.ad.images.length;
this.idxImage = Math.floor(Math.random() * nbImages);
}
}