mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-08 18:54:22 -04:00
Implementing an episode's more button with a download option
This commit is contained in:
parent
9e32eb6a4d
commit
3f0d5442db
@ -1,6 +1,8 @@
|
|||||||
<div class="root">
|
<div class="root">
|
||||||
<div class="episodes" #scrollView (scroll)="onScroll()">
|
<div class="episodes" #scrollView (scroll)="onScroll()">
|
||||||
<a class="episode" *ngFor="let episode of this.episodes" #episodeDom routerLink="/watch/{{episode.link}}" href="/watch/{{episode.link}}">
|
<div class="episode" *ngFor="let episode of this.episodes" #episodeDom >
|
||||||
|
<button mat-icon-button class="moreBtn" [matMenuTriggerFor]="more" [matMenuTriggerData]="{episode: episode}"><i class="material-icons">more_vert</i></button>
|
||||||
|
<a routerLink="/watch/{{episode.link}}" href="/watch/{{episode.link}}">
|
||||||
<div matRipple class="img" [style.background-image]="sanitize(episode.thumb)">
|
<div matRipple class="img" [style.background-image]="sanitize(episode.thumb)">
|
||||||
<button mat-icon-button class="playBtn"><i class="material-icons playIcon">play_circle_outline</i></button>
|
<button mat-icon-button class="playBtn"><i class="material-icons playIcon">play_circle_outline</i></button>
|
||||||
</div>
|
</div>
|
||||||
@ -16,6 +18,14 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<mat-menu #more="matMenu">
|
||||||
|
<ng-template matMenuContent let-episode="episode">
|
||||||
|
<a [href]="'/video/' + episode.link" download><button mat-menu-item>Download episode</button></a>
|
||||||
|
</ng-template>
|
||||||
|
</mat-menu>
|
||||||
|
|
||||||
<button mat-raised-button color="accent" class="scrollBtn leftBtn d-none" #leftBtn (click)="scrollLeft()"><mat-icon>arrow_left</mat-icon></button>
|
<button mat-raised-button color="accent" class="scrollBtn leftBtn d-none" #leftBtn (click)="scrollLeft()"><mat-icon>arrow_left</mat-icon></button>
|
||||||
<button mat-raised-button color="accent" class="scrollBtn rightBtn" #rightBtn (click)="scrollRight()"><mat-icon>arrow_right</mat-icon></button>
|
<button mat-raised-button color="accent" class="scrollBtn rightBtn" #rightBtn (click)="scrollRight()"><mat-icon>arrow_right</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,9 +52,8 @@
|
|||||||
padding: .25rem;
|
padding: .25rem;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 55%;
|
width: 55%;
|
||||||
cursor: pointer;
|
outline: none;
|
||||||
color: inherit;
|
position: relative;
|
||||||
text-decoration: inherit;
|
|
||||||
|
|
||||||
@include media-breakpoint-up(sm)
|
@include media-breakpoint-up(sm)
|
||||||
{
|
{
|
||||||
@ -76,8 +75,26 @@
|
|||||||
width: 18%;
|
width: 18%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img
|
|
||||||
|
> .moreBtn
|
||||||
{
|
{
|
||||||
|
position: absolute;
|
||||||
|
top: 2%;
|
||||||
|
right: 2%;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
outline: none;
|
||||||
|
display: none;
|
||||||
|
z-index: 255
|
||||||
|
}
|
||||||
|
|
||||||
|
> a {
|
||||||
|
cursor: pointer;
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: inherit;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
.img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0;
|
height: 0;
|
||||||
padding-top: 56.25%;
|
padding-top: 56.25%;
|
||||||
@ -85,8 +102,7 @@
|
|||||||
background-size: contain;
|
background-size: contain;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
> button
|
> .playBtn {
|
||||||
{
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -100,8 +116,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title
|
.title {
|
||||||
{
|
|
||||||
padding-top: .2rem;
|
padding-top: .2rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@ -111,8 +126,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overview
|
.overview {
|
||||||
{
|
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 4;
|
-webkit-line-clamp: 4;
|
||||||
@ -120,16 +134,23 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subtitle
|
.subtitle {
|
||||||
{
|
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 1;
|
-webkit-line-clamp: 1;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&:host-context(.hoverEnabled) &:hover
|
&:host-context(.hoverEnabled) &:hover
|
||||||
|
{
|
||||||
|
.moreBtn
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
> a
|
||||||
{
|
{
|
||||||
.img
|
.img
|
||||||
{
|
{
|
||||||
@ -146,6 +167,7 @@
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.playIcon
|
.playIcon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user