File tree Expand file tree Collapse file tree 7 files changed +95
-40
lines changed
presentation-editor/wrappers/custom-component-editors/codelab-code-demo-console-editor Expand file tree Collapse file tree 7 files changed +95
-40
lines changed Original file line number Diff line number Diff line change 20
20
</ button >
21
21
</ div >
22
22
< div >
23
- < mat-checkbox [(ngModel)] ="showPreview " (ngModelChange) ="update() ">
24
- Show preview
25
- </ mat-checkbox >
26
- </ div >
27
- < div >
28
- < mat-checkbox [(ngModel)] ="allowSwitchingFiles " (ngModelChange) ="update() ">
29
- Allow switching files [{{ allowSwitchingFiles }}]
30
- </ mat-checkbox >
23
+ < div >
24
+ < mat-checkbox [(ngModel)] ="showPreview " (ngModelChange) ="update() ">
25
+ Show preview
26
+ </ mat-checkbox >
27
+ </ div >
28
+ < div >
29
+ < mat-checkbox [(ngModel)] ="allowSwitchingFiles " (ngModelChange) ="update() ">
30
+ Allow switching files
31
+ </ mat-checkbox >
32
+ </ div >
31
33
</ div >
32
34
</ div >
33
35
< slides-highlight-button
Original file line number Diff line number Diff line change
1
+
1
2
.header {
2
3
display : flex;
3
4
align-items : center;
5
+ justify-content : space-between;
4
6
}
5
7
6
8
.presentation {
7
9
background : white;
8
10
border : 1px solid # ddd ;
9
11
margin-top : 20px ;
10
12
min-height : 200px ;
11
- padding : 16px ;
13
+ padding : 0 16 px 16px ;
12
14
}
13
15
14
16
.wrapper {
15
17
width : 100% ;
16
18
display : grid;
17
- grid-template-columns : repeat (auto-fill, 250 px );
19
+ grid-template-columns : repeat (auto-fill, 256 px );
18
20
grid-gap : 20px ;
19
21
}
20
22
21
- .first-slide {
22
- border : 1 px # ddd solid ;
23
+ .mdc-list-item . mdc-list-item--with-one-line . first-slide {
24
+ display : block ;
23
25
border-radius : 4px ;
26
+ position : relative;
27
+ width : 220px ;
28
+ height : 160px ;
29
+ border : 1px # ddd solid;
30
+ }
31
+
32
+ .slides-slide-preview-wrapper {
33
+ transform : scale (0.2 );
34
+ transform-origin : 0 ;
35
+ position : absolute;
36
+ left : 0 ;
37
+ top : -320px ;
38
+ }
39
+
40
+ slides-slide-preview {
41
+ width : 1100px ;
42
+ height : 800px ;
43
+ display : block;
24
44
}
Original file line number Diff line number Diff line change 1
- < div class ="wrapper ">
1
+ < mat-nav-list class ="wrapper ">
2
2
< div
3
3
*ngFor ="let presentation of presentations$ | async "
4
- (click) ="navigationService.goToPresentation(presentation.id) "
5
4
class ="presentation "
6
- role ="button "
7
- tabindex ="0 "
8
5
>
9
6
< div class ="header ">
10
7
< div > {{ presentation.name }}</ div >
11
- < button mat-icon-button (click) ="deletePresentation(presentation.id) ">
12
- < mat-icon > cancel</ mat-icon >
8
+ < mat-menu #menu >
9
+ < button mat-menu-item (click) ="deletePresentation(presentation.id) ">
10
+ Delete
11
+ </ button >
12
+ </ mat-menu >
13
+ < button
14
+ mat-icon-button
15
+ [matMenuTriggerFor] ="menu "
16
+ aria-label ="Example icon-button with a menu "
17
+ >
18
+ < mat-icon > more_vert</ mat-icon >
13
19
</ button >
14
20
</ div >
15
- < div *ngIf ="presentation.slides[0] as slide " class ="first-slide ">
16
- < slides-slide-preview
17
- style ="display: block; width: 200px "
18
- mode ="preview "
19
- [slide] ="slide "
20
- > </ slides-slide-preview >
21
- </ div >
21
+
22
+ < a *ngIf ="presentation.slides[0] as slide " class ="first-slide "
23
+ mat-list-item
24
+ [routerLink] ="'./' + presentation.id + '/0' ">
25
+ < div class ="slides-slide-preview-wrapper ">
26
+ < slides-slide-preview
27
+ mode ="preview "
28
+ [slide] ="slide "
29
+ > </ slides-slide-preview >
30
+ </ div >
31
+ </ a >
22
32
</ div >
23
- </ div >
33
+ </ mat-nav-list >
24
34
25
35
< button mat-button (click) ="addPresentation() "> Create presentation</ button >
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { MatButtonModule } from '@angular/material/button';
5
5
import { RouterModule } from '@angular/router' ;
6
6
import { MatIconModule } from '@angular/material/icon' ;
7
7
import { PreviewModule } from '../presentation-editor/preview/preview.module' ;
8
+ import { MatListModule } from "@angular/material/list" ;
9
+ import { MatMenuModule } from "@angular/material/menu" ;
8
10
9
11
@NgModule ( {
10
12
declarations : [ PresentationListComponent ] ,
@@ -15,6 +17,8 @@ import { PreviewModule } from '../presentation-editor/preview/preview.module';
15
17
MatIconModule ,
16
18
RouterModule ,
17
19
PreviewModule ,
20
+ MatListModule ,
21
+ MatMenuModule ,
18
22
] ,
19
23
} )
20
24
export class PresentationListModule { }
Original file line number Diff line number Diff line change 14
14
.wrapper {
15
15
width : 100% ;
16
16
display : grid;
17
- grid-template-columns : repeat (auto-fill, 250 px );
17
+ grid-template-columns : repeat (auto-fill, 256 px );
18
18
grid-gap : 20px ;
19
19
}
20
20
21
21
.first-slide {
22
- border : 1px # ddd solid;
23
22
border-radius : 4px ;
23
+ position : relative;
24
+ width : 220px ;
25
+ height : 160px ;
26
+ border : 1px # ddd solid;
27
+ }
28
+
29
+ .slides-slide-preview-wrapper {
30
+ transform : scale (0.2 );
31
+ transform-origin : 0 ;
32
+ position : absolute;
33
+ left : 0 ;
34
+ top : -320px ;
35
+ }
36
+
37
+ slides-slide-preview {
38
+ width : 1100px ;
39
+ height : 800px ;
40
+ display : block;
24
41
}
Original file line number Diff line number Diff line change 1
- < div class ="wrapper ">
2
- < div
1
+ < mat-nav-list class ="wrapper ">
2
+ < a
3
3
*ngFor ="let presentation of presentations$ | async "
4
- (click) ="navigationService.goToPresentation(presentation.id) "
4
+ mat-list-item
5
+ [routerLink] ="'./' + presentation.id + '/0' "
5
6
class ="presentation "
6
- role ="button "
7
- tabindex ="0 "
8
7
>
9
8
< div class ="header ">
10
9
< div > {{ presentation.name }}</ div >
11
10
</ div >
12
11
< div *ngIf ="presentation.slides[0] as slide " class ="first-slide ">
13
- < slides-slide-preview
14
- style ="display: block; width: 200px "
15
- mode ="preview "
16
- [slide] ="slide "
17
- > </ slides-slide-preview >
12
+ < div class ="slides-slide-preview-wrapper ">
13
+ < slides-slide-preview
14
+ mode ="preview "
15
+ [slide] ="slide "
16
+ > </ slides-slide-preview >
17
+ </ div >
18
18
</ div >
19
- </ div >
20
- </ div >
19
+ </ a >
20
+ </ mat-nav-list >
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { MatButtonModule } from '@angular/material/button';
5
5
import { RouterModule } from '@angular/router' ;
6
6
import { MatIconModule } from '@angular/material/icon' ;
7
7
import { PreviewModule } from '../../admin/content/presentation-editor/preview/preview.module' ;
8
+ import { MatListModule } from "@angular/material/list" ;
8
9
9
10
@NgModule ( {
10
11
declarations : [ PresentationListComponent ] ,
@@ -15,6 +16,7 @@ import { PreviewModule } from '../../admin/content/presentation-editor/preview/p
15
16
MatIconModule ,
16
17
RouterModule ,
17
18
PreviewModule ,
19
+ MatListModule ,
18
20
] ,
19
21
} )
20
22
export class PresentationListModule { }
You can’t perform that action at this time.
0 commit comments