File tree Expand file tree Collapse file tree 5 files changed +61
-102
lines changed
features/home/post-capture-tab
shared/services/dia-backend/series Expand file tree Collapse file tree 5 files changed +61
-102
lines changed Original file line number Diff line number Diff line change 4
4
< div class ="segments " [ngSwitch] ="categories ">
5
5
< ion-segment mode ="ios " [(ngModel)] ="categories ">
6
6
< ion-segment-button value ="Photo " checked >
7
- < ion-icon src ="/assets/icon/apps.svg " class ="series-tab-icon "> </ ion-icon >
7
+ < ion-icon src ="/assets/icon/apps.svg " class ="segment "> </ ion-icon >
8
8
</ ion-segment-button >
9
9
< ion-segment-button value ="Series ">
10
- < ion-icon
11
- src ="/assets/icon/series.svg "
12
- class ="series-tab-icon "
13
- > </ ion-icon >
10
+ < ion-icon src ="/assets/icon/series.svg " class ="segment "> </ ion-icon >
14
11
</ ion-segment-button >
15
12
</ ion-segment >
16
13
< div class ="post-captures " *ngSwitchCase ="'Photo' ">
28
25
</ mat-grid-list >
29
26
</ div >
30
27
31
- < div class ="series-wrapper " *ngSwitchCase ="'Series' ">
32
- < div
33
- class ="series-image "
28
+ < div class ="series " *ngSwitchCase ="'Series' ">
29
+ < ion-card
34
30
*ngFor ="let series of series$ | async "
35
31
[routerLink] ="['series', { id: series.id, cover: series.cover_image }] "
36
32
>
37
33
< ion-img [src] ="series.cover_image "> </ ion-img >
38
- </ div >
34
+ </ ion-card >
39
35
</ div >
40
36
</ div >
Original file line number Diff line number Diff line change 15
15
16
16
.segments {
17
17
display : flex ;
18
- padding : 8px ;
19
18
flex-direction : column ;
20
19
height : 100% ;
21
20
}
22
21
23
22
ion-segment {
24
23
width : 80% ;
25
- margin : 0 auto 16 px ;
24
+ margin : 8 px auto ;
26
25
flex-shrink : 0 ;
27
- }
28
-
29
- .post-captures {
30
- overflow : auto ;
31
- }
32
26
33
- mat-grid-tile {
34
- ion-img {
35
- width : 100% ;
36
- height : 100% ;
37
- object-fit : cover ;
38
- object-position : center ;
39
- overflow : hidden ;
40
- border-radius : 4px ;
27
+ ion-icon .segment {
28
+ height : 40px ;
41
29
}
42
30
}
43
31
44
- .series-tab-icon {
45
- height : 40px ;
46
- }
47
-
48
- .tab-content-post {
49
- height : 100% ;
50
- }
32
+ .post-captures {
33
+ overflow : auto ;
34
+ padding : 8px ;
51
35
52
- mat-icon {
53
- color : white ;
54
- z-index : 10 ;
55
- }
36
+ mat-grid-tile {
37
+ ion-img {
38
+ width : 100% ;
39
+ height : 100% ;
40
+ object-fit : cover ;
41
+ object-position : center ;
42
+ overflow : hidden ;
43
+ border-radius : 4px ;
44
+ }
56
45
57
- mat-icon .from-store {
58
- position : absolute ;
59
- bottom : 5px ;
60
- left : 5px ;
61
- font-size : 20px ;
62
- opacity : 90% ;
46
+ mat-icon .from-store {
47
+ color : white ;
48
+ z-index : 10 ;
49
+ position : absolute ;
50
+ bottom : 5px ;
51
+ left : 5px ;
52
+ font-size : 20px ;
53
+ opacity : 90% ;
54
+ }
55
+ }
63
56
}
64
57
65
- .series-image {
66
- margin-top : 10px ;
67
- margin-bottom : 20px ;
68
- width : 100% ;
69
- height : 300px ;
70
- max-width : 500px ;
71
- max-height : 300px ;
72
- overflow : hidden ;
73
- box-sizing : border-box ;
74
- box-shadow : 4px 0 4px #a5a5a5 ;
75
- border-radius : 5px ;
58
+ .series {
59
+ height : auto ;
60
+ overflow : auto ;
76
61
77
- ion-img {
78
- object-fit : cover ;
79
- object-position : center ;
80
- height : 100% ;
62
+ ion-card {
63
+ ion-img {
64
+ height : 300px ;
65
+ object-fit : cover ;
66
+ object-position : center ;
67
+ }
81
68
}
82
69
}
Original file line number Diff line number Diff line change 5
5
< div class ="toolbar-spacer "> </ div >
6
6
</ mat-toolbar >
7
7
< div class ="page-content ">
8
- < div class =" series-image " >
8
+ < ion-card >
9
9
< ion-img [src] ="cover$ | async "> </ ion-img >
10
- </ div >
10
+ </ ion-card >
11
11
< mat-grid-list cols ="3 " gutterSize ="8px ">
12
12
< mat-grid-tile
13
13
class ="collection-general "
Original file line number Diff line number Diff line change 1
- mat-toolbar {
2
- color : white ;
3
-
4
- .mat-icon {
5
- color : white ;
6
- }
7
- }
8
-
9
- .toolbar-spacer {
10
- flex : 1 1 auto ;
11
- }
12
-
13
- mat-grid-tile {
1
+ ion-card {
14
2
ion-img {
15
- width : 100% ;
16
- height : 100% ;
3
+ height : 300px ;
17
4
object-fit : cover ;
18
5
object-position : center ;
19
- overflow : hidden ;
20
- border-radius : 4px ;
21
6
}
22
7
}
23
8
24
- .page-content {
25
- padding : 16px ;
9
+ mat-grid-list {
10
+ margin : 8px ;
11
+
12
+ mat-grid-tile {
13
+ ion-img {
14
+ width : 100% ;
15
+ height : 100% ;
16
+ object-fit : cover ;
17
+ object-position : center ;
18
+ overflow : hidden ;
19
+ border-radius : 4px ;
20
+ }
21
+ }
26
22
}
27
23
28
24
.collection-general {
@@ -48,22 +44,3 @@ mat-grid-tile {
48
44
border-radius : 4px ;
49
45
background : #ffaced ;
50
46
}
51
-
52
- .series-image {
53
- margin-top : 10px ;
54
- margin-bottom : 20px ;
55
- width : 100% ;
56
- height : 300px ;
57
- max-width : 500px ;
58
- max-height : 300px ;
59
- overflow : hidden ;
60
- box-sizing : border-box ;
61
- box-shadow : 4px 0 4px #a5a5a5 ;
62
- border-radius : 5px ;
63
-
64
- ion-img {
65
- object-fit : cover ;
66
- object-position : center ;
67
- height : 100% ;
68
- }
69
- }
Original file line number Diff line number Diff line change 1
- // tslint:disable: no-magic-numbers
2
1
import { HttpClient , HttpErrorResponse } from '@angular/common/http' ;
3
2
import { Injectable } from '@angular/core' ;
4
3
import { defer , throwError } from 'rxjs' ;
@@ -12,11 +11,6 @@ import { BASE_URL } from '../secret';
12
11
providedIn : 'root' ,
13
12
} )
14
13
export class DiaBackendSeriesRepository {
15
- constructor (
16
- private readonly httpClient : HttpClient ,
17
- private readonly authService : DiaBackendAuthService
18
- ) { }
19
-
20
14
readonly fetchSeries$ = defer ( ( ) => this . authService . getAuthHeaders ( ) ) . pipe (
21
15
concatMap ( headers =>
22
16
this . httpClient . get < PaginatedResponse < DiaBackendSeries > > (
@@ -34,6 +28,11 @@ export class DiaBackendSeriesRepository {
34
28
return throwError ( err ) ;
35
29
} )
36
30
) ;
31
+
32
+ constructor (
33
+ private readonly httpClient : HttpClient ,
34
+ private readonly authService : DiaBackendAuthService
35
+ ) { }
37
36
}
38
37
39
38
export interface DiaBackendSeries {
You can’t perform that action at this time.
0 commit comments