@@ -13,37 +13,45 @@ struct HomeList: View {
13
13
var courses = coursesData
14
14
15
15
var body : some View {
16
- VStack {
17
- HStack {
18
- VStack ( alignment: . leading) {
19
- Text ( " Courses " )
20
- . font ( . largeTitle)
21
- . fontWeight ( . heavy)
16
+ ScrollView {
17
+ VStack {
18
+ HStack {
19
+ VStack ( alignment: . leading) {
20
+ Text ( " Courses " )
21
+ . font ( . largeTitle)
22
+ . fontWeight ( . heavy)
22
23
23
- Text ( " 22 Courses " )
24
- . color ( . gray)
24
+ Text ( " 22 Courses " )
25
+ . color ( . gray)
26
+ }
27
+ Spacer ( )
25
28
}
26
- Spacer ( )
27
- }
28
- . padding ( . leading, 70.0 )
29
- . padding ( . bottom, 40 )
29
+ . padding ( . leading, 70.0 )
30
30
31
- ScrollView ( . horizontal, showsIndicators: false ) {
32
- HStack ( spacing: 30.0 ) {
33
- ForEach ( courses) { item in
34
- PresentationLink ( destination: ContentView ( ) ) {
35
- CourseView ( title: item. title,
36
- image: item. image,
37
- color: item. color,
38
- shadowColor: item. shadowColor)
31
+ ScrollView ( . horizontal, showsIndicators: false ) {
32
+ HStack ( spacing: 30.0 ) {
33
+ ForEach ( courses) { item in
34
+ PresentationLink ( destination: ContentView ( ) ) {
35
+ GeometryReader { geometry in
36
+ CourseView ( title: item. title,
37
+ image: item. image,
38
+ color: item. color,
39
+ shadowColor: item. shadowColor)
40
+ . rotation3DEffect ( Angle ( degrees: Double ( geometry. frame ( in: . global) . minX - 40 ) / - 20 ) , axis: ( x: 0 , y: 10.0 , z: 0 ) )
41
+ }
42
+ . frame ( width: 246 , height: 150 )
43
+ }
39
44
}
40
45
}
46
+ . padding ( . leading, 40 )
47
+ . padding ( . top, 30 )
48
+ Spacer ( )
41
49
}
42
- . padding ( . leading , 40 )
43
- Spacer ( )
50
+ . frame ( height : 450 )
51
+ CertificateRow ( )
44
52
}
53
+ . padding ( . top, 78 )
45
54
}
46
- . padding ( . top, 78 )
47
55
}
48
56
}
49
57
@@ -101,8 +109,20 @@ let coursesData = [
101
109
image: " Illustration1 " ,
102
110
color: Color ( " background3 " ) ,
103
111
shadowColor: Color ( " backgroundShadow3 " ) ) ,
104
- Course ( title: " Design Course " ,
112
+ Course ( title: " Design and animate your UI " ,
105
113
image: " Illustration2 " ,
106
114
color: Color ( " background4 " ) ,
107
- shadowColor: Color ( " backgroundShadow4 " ) )
115
+ shadowColor: Color ( " backgroundShadow4 " ) ) ,
116
+ Course ( title: " Swift UI Advanced " ,
117
+ image: " Illustration3 " ,
118
+ color: Color ( " background7 " ) ,
119
+ shadowColor: Color ( hue: 0.677 , saturation: 0.701 , brightness: 0.788 , opacity: 0.5 ) ) ,
120
+ Course ( title: " Framer Playground " ,
121
+ image: " Illustration4 " ,
122
+ color: Color ( " background8 " ) ,
123
+ shadowColor: Color ( hue: 0.677 , saturation: 0.701 , brightness: 0.788 , opacity: 0.5 ) ) ,
124
+ Course ( title: " Flutter for Designers " ,
125
+ image: " Illustration5 " ,
126
+ color: Color ( " background9 " ) ,
127
+ shadowColor: Color ( hue: 0.677 , saturation: 0.701 , brightness: 0.788 , opacity: 0.5 ) ) ,
108
128
]
0 commit comments