update responsive design & bugfixes
This commit is contained in:
parent
3453f42ad5
commit
8c3e7c3028
6 changed files with 93 additions and 41 deletions
|
|
@ -102,6 +102,7 @@ section {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
|
padding-bottom: 24px;
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
<section
|
<section
|
||||||
|
[ngClass]="{
|
||||||
|
fullVh: !screenWidth
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<div
|
||||||
class="movie-banner"
|
class="movie-banner"
|
||||||
[ngStyle]="{
|
[ngStyle]="{
|
||||||
'background-image':
|
'background-image':
|
||||||
|
|
@ -9,18 +14,35 @@
|
||||||
'/' +
|
'/' +
|
||||||
currentMovie[0]?.file_name +
|
currentMovie[0]?.file_name +
|
||||||
'_1080p.jpg' +
|
'_1080p.jpg' +
|
||||||
')'
|
')',
|
||||||
}"
|
}"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
fullVh: !screenWidth
|
fullVhBanner: !screenWidth
|
||||||
}"
|
}"
|
||||||
>
|
></div>
|
||||||
@if (currentMovie.length > 0) {
|
@if (currentMovie.length > 0) {
|
||||||
<div class="content">
|
<div
|
||||||
|
class="content"
|
||||||
|
[ngClass]="{
|
||||||
|
fullVhContent: !screenWidth
|
||||||
|
}"
|
||||||
|
>
|
||||||
<div class="title">{{ currentMovie[0].title }}</div>
|
<div class="title">{{ currentMovie[0].title }}</div>
|
||||||
<div class="description">
|
<div
|
||||||
|
class="description"
|
||||||
|
[ngClass]="{
|
||||||
|
fullVhDescription: !screenWidth
|
||||||
|
}"
|
||||||
|
>
|
||||||
{{ currentMovie[0].description }}
|
{{ currentMovie[0].description }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="buttons">
|
||||||
|
<app-btn-small
|
||||||
|
*ngIf="!screenWidth"
|
||||||
|
[imgPath]="'back'"
|
||||||
|
[imgRadius]="'24px'"
|
||||||
|
(click)="backToCategory()"
|
||||||
|
></app-btn-small>
|
||||||
<app-btn-large
|
<app-btn-large
|
||||||
[value]="'Play'"
|
[value]="'Play'"
|
||||||
[imgPath]="'play'"
|
[imgPath]="'play'"
|
||||||
|
|
@ -37,5 +59,6 @@
|
||||||
"
|
"
|
||||||
></app-btn-large>
|
></app-btn-large>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
section {
|
section {
|
||||||
height: 400px;
|
height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.movie-banner {
|
||||||
|
height: 400px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
img {
|
img {
|
||||||
|
|
@ -27,15 +31,8 @@ section {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullVh {
|
|
||||||
height: 100vh;
|
|
||||||
&::after {
|
|
||||||
height: 0%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
position: relative;
|
position: absolute;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
top: 120px;
|
top: 120px;
|
||||||
left: 96px;
|
left: 96px;
|
||||||
|
|
@ -61,10 +58,32 @@ section {
|
||||||
text-shadow: 1px 1px 2px $black;
|
text-shadow: 1px 1px 2px $black;
|
||||||
}
|
}
|
||||||
|
|
||||||
app-btn-large {
|
.fullVh {
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullVhBanner {
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullVhContent {
|
||||||
|
width: calc(100% - 48px);
|
||||||
|
top: 200px;
|
||||||
|
left: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullVhDescription {
|
||||||
|
max-height: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttons {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -60px;
|
bottom: -70px;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: left;
|
||||||
|
width: 100%;
|
||||||
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-banner {
|
.movie-banner {
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,12 @@ import {
|
||||||
import { BtnLargeComponent } from '../../../../shared/components/buttons/btn-large/btn-large.component';
|
import { BtnLargeComponent } from '../../../../shared/components/buttons/btn-large/btn-large.component';
|
||||||
import { MovieService } from '../../../../services/movie.service';
|
import { MovieService } from '../../../../services/movie.service';
|
||||||
import { environment } from '../../../../environments/environment';
|
import { environment } from '../../../../environments/environment';
|
||||||
|
import { BtnSmallComponent } from '../../../../shared/components/buttons/btn-small/btn-small.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-hero-banner',
|
selector: 'app-hero-banner',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [CommonModule, BtnLargeComponent],
|
imports: [CommonModule, BtnLargeComponent, BtnSmallComponent],
|
||||||
templateUrl: './hero-banner.component.html',
|
templateUrl: './hero-banner.component.html',
|
||||||
styleUrl: './hero-banner.component.scss',
|
styleUrl: './hero-banner.component.scss',
|
||||||
})
|
})
|
||||||
|
|
@ -59,4 +60,8 @@ export class HeroBannerComponent {
|
||||||
playMovieId(videoPath: string) {
|
playMovieId(videoPath: string) {
|
||||||
this.playMovie.emit(videoPath);
|
this.playMovie.emit(videoPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
backToCategory() {
|
||||||
|
window.location.href = '/browse/';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<header>
|
<header>
|
||||||
@if (browse) {
|
@if (browse) {
|
||||||
<div class="logo" routerLink="/browse/">
|
<div class="logo" (click)="reloadPage()">
|
||||||
<img src="./../../../../assets/img/logo_ci.svg" alt="" />
|
<img src="./../../../../assets/img/logo_ci.svg" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,10 @@ export class HeaderComponent {
|
||||||
|
|
||||||
constructor(private router: Router) {}
|
constructor(private router: Router) {}
|
||||||
|
|
||||||
|
reloadPage() {
|
||||||
|
window.location.href = '/browse/';
|
||||||
|
}
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
sessionStorage.clear();
|
sessionStorage.clear();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue