|
1 | 1 | <ion-header [translucent]="true"> |
2 | | - <ion-toolbar> |
3 | | - <ion-title> |
4 | | - MDCU Recorded Lecture |
5 | | - </ion-title> |
6 | | - <ion-buttons slot="secondary"> |
7 | | - <ion-button fill="solid" color="secondary" (click)="logout()"> |
8 | | - Sign out |
9 | | - <ion-icon slot="end" name="log-out-outline"></ion-icon> |
10 | | - </ion-button> |
11 | | - </ion-buttons> |
12 | | - </ion-toolbar> |
| 2 | + <ion-toolbar> |
| 3 | + <ion-title> |
| 4 | + MDCU Recorded Lecture |
| 5 | + </ion-title> |
| 6 | + <ion-buttons slot="end"> |
| 7 | + <ion-button fill="outline" color="secondary" (click)="logout()"> |
| 8 | + Sign out |
| 9 | + <ion-icon slot="end" name="log-out-outline"></ion-icon> |
| 10 | + </ion-button> |
| 11 | + </ion-buttons> |
| 12 | + </ion-toolbar> |
13 | 13 | </ion-header> |
14 | 14 |
|
15 | | -<ion-content [fullscreen]="true"> |
16 | | - @if (response$ | async; as response) { |
17 | | - <div> |
18 | | - <ion-grid> |
19 | | - <ion-row> |
20 | | - @for (folder of Object.keys(response.years); track folder) { |
21 | | - <ion-col size-xs="12" size-sm="6" size-md="4" size-lg="3" size-xl="2"> |
22 | | - <ion-card [routerLink]="folder" [ngStyle]="{'background-color': colorByFolderName(folder)}"> |
23 | | - <ion-card-header> |
24 | | - <ion-card-title>{{ folder }}</ion-card-title> |
25 | | - </ion-card-header> |
26 | | - </ion-card> |
27 | | - </ion-col> |
28 | | - } |
29 | | - </ion-row> |
30 | | - </ion-grid> |
31 | | - @if (response.last_played) { |
32 | | - <div> |
33 | | - <p> |
34 | | - Last played: |
35 | | - <a (click)="goToLastVideo(response.last_played.video)" (keyup)="goToLastVideo(response.last_played.video)" tabindex="0"> |
36 | | - <span class="course-name">{{ response.last_played.video.course.name }}</span> |
37 | | - <ion-icon name="play"></ion-icon> |
38 | | - </a> |
39 | | - </p> |
40 | | - </div> |
41 | | - } |
42 | | - <p class="small-text"> |
43 | | - @if (response.last_fetched_at) { |
44 | | - <span> |
45 | | - Last fetched from MDCU E-Learning at {{ response.last_fetched_at }}<br/> |
46 | | - </span> |
| 15 | +<ion-content [fullscreen]="true" class="ion-padding"> |
| 16 | + <main> |
| 17 | + @if (response$ | async; as response) { |
| 18 | + @if (response.last_played) { |
| 19 | + <ion-card color="tertiary" class="ion-margin-top"> |
| 20 | + <ion-card-header> |
| 21 | + <ion-card-title>Last Played</ion-card-title> |
| 22 | + </ion-card-header> |
| 23 | + <ion-card-content> |
| 24 | + <ion-item button="true" detail="true" (click)="goToLastVideo(response.last_played.video)"> |
| 25 | + <ion-label> |
| 26 | + <h2>{{ response.last_played.video.course.name }}</h2> |
| 27 | + </ion-label> |
| 28 | + <ion-icon name="play-circle" slot="end" size="large" color="secondary"></ion-icon> |
| 29 | + </ion-item> |
| 30 | + </ion-card-content> |
| 31 | + </ion-card> |
| 32 | + } |
| 33 | + |
| 34 | + <ion-grid> |
| 35 | + <ion-row> |
| 36 | + @for (folder of Object.keys(response.years); track folder) { |
| 37 | + <ion-col size-xs="12" size-sm="6" size-md="4" size-lg="3" size-xl="2"> |
| 38 | + <ion-card [routerLink]="folder" [ngStyle]="{'background-color': colorByFolderName(folder)}" |
| 39 | + class="ion-text-center hover-card"> |
| 40 | + <ion-card-header> |
| 41 | + <ion-card-title>{{ folder }}</ion-card-title> |
| 42 | + </ion-card-header> |
| 43 | + </ion-card> |
| 44 | + </ion-col> |
| 45 | + } |
| 46 | + </ion-row> |
| 47 | + </ion-grid> |
| 48 | + |
| 49 | + } @else { |
| 50 | + <ion-spinner name="crescent" class="ion-margin-top center-spinner"></ion-spinner> |
| 51 | + <h4 class="ion-text-center ion-margin-top">Loading lectures...</h4> |
47 | 52 | } |
48 | | - Your feedback and suggestions are welcome. Please email them to <a href="mailto:siwat.techa@docchula.com" target="_blank">siwat.techa@docchula.com</a>.<br/> |
49 | | - Contents are provided for MDCU students only. You may not copy, reproduce, distribute, publish, display, create derivative works, |
50 | | - transmit, or |
51 | | - in any way exploit any such content. |
52 | | - </p> |
53 | | - </div> |
54 | | - } @else { |
55 | | - <h4 class="center-text">Loading...</h4> |
56 | | - } |
| 53 | + </main> |
| 54 | + |
| 55 | + <footer> |
| 56 | + <ion-text class="ion-padding small-text"> |
| 57 | + @if (response$ | async; as response) { |
| 58 | + @if (response.last_fetched_at) { |
| 59 | + <p>Last fetched from MDCU E-Learning at {{ response.last_fetched_at }}</p> |
| 60 | + } |
| 61 | + } |
| 62 | + <p> |
| 63 | + Your feedback is welcome. Email: |
| 64 | + <a href="mailto:siwat.techa@docchula.com">siwat.techa@docchula.com</a> or |
| 65 | + <a href="mailto:it@docchula.com">it@docchula.com</a> |
| 66 | + </p> |
| 67 | + <p> |
| 68 | + Contents are provided for MDCU students only. You may not copy, reproduce, distribute, publish, display, create |
| 69 | + derivative works, transmit, or in any way exploit any such content. |
| 70 | + </p> |
| 71 | + </ion-text> |
| 72 | + </footer> |
57 | 73 | </ion-content> |
0 commit comments