-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
550 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
142 changes: 142 additions & 0 deletions
142
src/app/player/components/multi-epg/multi-epg-container.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<div id="epg-navigation"> | ||
<button | ||
[matTooltip]="'CLOSE' | translate" | ||
mat-button | ||
(click)="close()" | ||
color="accent" | ||
> | ||
<mat-icon>close</mat-icon> {{ 'CLOSE' | translate }} | ||
</button> | ||
<button | ||
[matTooltip]="'EPG.NEXT_DAY' | translate" | ||
mat-icon-button | ||
(click)="switchDay('prev')" | ||
> | ||
<mat-icon>navigate_before</mat-icon> | ||
</button> | ||
<button | ||
[matTooltip]="'EPG.PREVIOUS_DAY' | translate" | ||
mat-icon-button | ||
(click)="switchDay('next')" | ||
> | ||
<mat-icon>navigate_next</mat-icon> | ||
</button> | ||
<div class="today-date"> | ||
{{ today | momentDate: 'YYYYMMDD':'MMMM Do, dddd' }} | ||
</div> | ||
<button mat-icon-button (click)="zoomIn()" [disabled]="hourWidth >= 800"> | ||
<mat-icon>zoom_in</mat-icon> | ||
</button> | ||
<button mat-icon-button [disabled]="hourWidth <= 50" (click)="zoomOut()"> | ||
<mat-icon>zoom_out</mat-icon> | ||
</button> | ||
<button | ||
mat-button | ||
[disabled]="channelsLowerRange === 0" | ||
(click)="previousChannels()" | ||
> | ||
Previous channels | ||
</button> | ||
<button mat-button (click)="nextChannels()">Next channels</button> | ||
</div> | ||
<div class="parent" #epgContainer> | ||
<svg id="channels-column"> | ||
<g *ngFor="let item of channels; let i = index"> | ||
<!-- channel name --> | ||
<g class="channel"> | ||
<rect | ||
width="100" | ||
[attr.height]="barHeight" | ||
[attr.y]="barHeight * i + barHeight" | ||
stroke="black" | ||
></rect> | ||
<image | ||
*ngIf="item.icon[0]" | ||
[attr.y]="barHeight * i + barHeight + 1" | ||
[attr.href]="item.icon[0]" | ||
[attr.height]="barHeight - 2" | ||
width="100" | ||
[matTooltip]="item.name[0].value" | ||
></image> | ||
<foreignObject | ||
*ngIf="!item.icon[0]" | ||
[attr.y]="barHeight * i + barHeight" | ||
width="100" | ||
[attr.height]="barHeight" | ||
> | ||
<div class="channel-name"> | ||
{{ item.name[0].value }} | ||
</div> | ||
</foreignObject> | ||
</g> | ||
</g> | ||
</svg> | ||
<div id="epg-container"> | ||
<svg [attr.width]="24 * hourWidth" height="100%" id="epg-svg"> | ||
<!-- time headline --> | ||
<g *ngFor="let a of timeHeader; let i = index"> | ||
<rect | ||
[matTooltip]="i + ':00'" | ||
[attr.width]="hourWidth" | ||
[attr.height]="barHeight" | ||
[attr.x]="i * hourWidth" | ||
fill="#000" | ||
></rect> | ||
<text | ||
[attr.x]="i * hourWidth" | ||
y="10" | ||
font-size="14" | ||
fill="white" | ||
transform="translate(20,20)" | ||
> | ||
{{ i }}:00 | ||
</text> | ||
</g> | ||
|
||
<!-- epg channels with programs --> | ||
<g *ngFor="let item of channels; let i = index"> | ||
<g | ||
*ngFor="let program of item.programs; let a = index" | ||
[matTooltip]="program.title[0].value" | ||
class="program-item" | ||
> | ||
<!-- program item --> | ||
<rect | ||
[attr.width]="program.width" | ||
[attr.height]="barHeight" | ||
[attr.x]="program.startPosition" | ||
[attr.y]="barHeight * i + barHeight" | ||
fill="#000" | ||
></rect> | ||
<foreignObject | ||
(click)="showDescription(program)" | ||
[attr.width]="program.width" | ||
[attr.height]="barHeight" | ||
[attr.y]="barHeight * i + barHeight" | ||
[attr.x]="program.startPosition" | ||
> | ||
<div | ||
[innerHtml]="program.title[0]?.value" | ||
class="program-name" | ||
></div> | ||
</foreignObject> | ||
</g> | ||
<line | ||
[attr.x1]="0" | ||
[attr.y1]="barHeight * i + barHeight" | ||
[attr.x2]="24 * hourWidth" | ||
[attr.y2]="barHeight * i + barHeight" | ||
stroke="#676767" | ||
/> | ||
</g> | ||
<line | ||
[attr.x1]="currentTimeLine" | ||
[attr.y1]="barHeight" | ||
[attr.x2]="currentTimeLine" | ||
id="current-time-line" | ||
y2="1000" | ||
stroke="black" | ||
/> | ||
</svg> | ||
</div> | ||
</div> |
70 changes: 70 additions & 0 deletions
70
src/app/player/components/multi-epg/multi-epg-container.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.program-item { | ||
cursor: pointer; | ||
} | ||
|
||
rect { | ||
stroke: #676767; | ||
cursor: pointer; | ||
} | ||
|
||
.channel > rect { | ||
stroke: #676767; | ||
} | ||
|
||
.program-item:hover > rect { | ||
fill: #333; | ||
} | ||
|
||
.program-name, | ||
.channel-name { | ||
-webkit-line-clamp: 2; | ||
height: 32px; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
padding: 6px 2px; | ||
} | ||
|
||
#epg-container { | ||
width: calc(100vw - 100px); | ||
height: calc(100vh - 73px); | ||
overflow-x: scroll; | ||
overflow-y: hidden; | ||
} | ||
|
||
.parent { | ||
display: flex; | ||
background-color: black; | ||
} | ||
|
||
#channels-column { | ||
width: 100px; | ||
flex: none; | ||
border-right: 2px solid #ccc; | ||
} | ||
|
||
.channel-name { | ||
margin: 0 5px; | ||
text-align: center; | ||
} | ||
|
||
#epg-navigation { | ||
display: flex; | ||
background-color: black; | ||
margin-top: 30px; | ||
border-bottom: 2px solid #fff; | ||
} | ||
|
||
.today-date { | ||
flex: 1; | ||
align-items: center; | ||
line-height: 40px; | ||
height: 40px; | ||
padding: 0 20px; | ||
} | ||
|
||
#current-time-line { | ||
stroke-width: 2px; | ||
stroke: white; | ||
} |
Oops, something went wrong.