Skip to content
This repository was archived by the owner on Oct 21, 2023. It is now read-only.

Commit 4a3f4d7

Browse files
committed
Added light mode
1 parent c333cbc commit 4a3f4d7

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

Carousel/Carousel.xcodeproj/project.pbxproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
3A1805A925FD1F0200F43B44 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2323
3A1805AC25FD1F0200F43B44 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
2424
3A1805AE25FD1F0200F43B44 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
25-
3AF29F3525FD49620052A803 /* CarouselExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CarouselExtension.swift; path = ../../../Carousel/Carousel/Extensions/CarouselExtension.swift; sourceTree = "<group>"; };
26-
3AF29F3A25FD49810052A803 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HomeView.swift; path = ../../../Carousel/Carousel/Views/HomeView.swift; sourceTree = "<group>"; };
25+
3AF29F3525FD49620052A803 /* CarouselExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselExtension.swift; sourceTree = "<group>"; };
26+
3AF29F3A25FD49810052A803 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
2727
/* End PBXFileReference section */
2828

2929
/* Begin PBXFrameworksBuildPhase section */
@@ -80,17 +80,15 @@
8080
children = (
8181
3AF29F3525FD49620052A803 /* CarouselExtension.swift */,
8282
);
83-
name = Extensions;
84-
path = ../../Story/Story/Extensions;
83+
path = Extensions;
8584
sourceTree = "<group>";
8685
};
8786
3A1805BB25FD1F4000F43B44 /* Views */ = {
8887
isa = PBXGroup;
8988
children = (
9089
3AF29F3A25FD49810052A803 /* HomeView.swift */,
9190
);
92-
name = Views;
93-
path = ../../Story/Story/Views;
91+
path = Views;
9492
sourceTree = "<group>";
9593
};
9694
/* End PBXGroup section */

Carousel/Carousel/Views/HomeView.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ struct HomeView : View {
1111

1212
@State var index = 0
1313
@State var stories = [
14-
CarouselExtension(id: 0, image: "p0", offset: 0,title: "Jack the Persian and the Black Castel"),
15-
CarouselExtension(id: 1, image: "p1", offset: 0,title: "The Dreaming Moon"),
14+
CarouselExtension(id: 0, image: "p0", offset: 0,title: "Black Castel"),
15+
CarouselExtension(id: 1, image: "p1", offset: 0,title: "Dreaming Moon"),
1616
CarouselExtension(id: 2, image: "p2", offset: 0,title: "Fallen In Love"),
1717
CarouselExtension(id: 3, image: "p3", offset: 0,title: "Hounted Ground")]
1818
@State var scrolled = 0
@@ -23,32 +23,32 @@ struct HomeView : View {
2323
VStack{
2424
HStack{
2525
Button(action: {}) {
26-
Image(systemName: "line.horizontal.3")
26+
Image(systemName: "line.horizontal.3.decrease")
2727
.font(Font.title.weight(.medium))
2828
.imageScale(.small)
29-
.foregroundColor(.white)
29+
.foregroundColor(.black)
3030
}
3131

3232
Spacer()
3333
Button(action: {}) {
3434
Image(systemName: "magnifyingglass")
3535
.font(Font.title.weight(.medium))
3636
.imageScale(.small)
37-
.foregroundColor(.white)
37+
.foregroundColor(.black)
3838
}
3939
}
4040
.padding()
4141

4242
HStack{
4343
Text("Trending")
4444
.font(.system(size: 40, weight: .bold))
45-
.foregroundColor(.white)
45+
.foregroundColor(.black)
4646
Spacer(minLength: 0)
4747
Button(action: {}) {
4848
Image(systemName: "ellipsis")
4949
.font(Font.title.weight(.medium))
5050
.imageScale(.small)
51-
.foregroundColor(.white)
51+
.foregroundColor(.black)
5252
}
5353
}
5454
.padding(.horizontal)
@@ -60,7 +60,7 @@ struct HomeView : View {
6060
.fontWeight(.bold)
6161
.padding(.vertical,6)
6262
.padding(.horizontal,20)
63-
.background(Color.blue.opacity(index == 0 ? 1 : 0))
63+
.background(Color.black.opacity(index == 0 ? 1 : 0))
6464
.clipShape(Capsule())
6565
.onTapGesture {
6666
index = 0
@@ -72,7 +72,7 @@ struct HomeView : View {
7272
.fontWeight(.bold)
7373
.padding(.vertical,6)
7474
.padding(.horizontal,20)
75-
.background(Color.blue.opacity(index == 01 ? 1 : 0))
75+
.background(Color.black.opacity(index == 01 ? 1 : 0))
7676
.clipShape(Capsule())
7777
.onTapGesture {
7878
index = 1
@@ -108,7 +108,7 @@ struct HomeView : View {
108108
.foregroundColor(.white)
109109
.padding(.vertical,6)
110110
.padding(.horizontal,25)
111-
.background(Color.blue)
111+
.background(Color.black)
112112
.clipShape(Capsule())
113113
}
114114
}
@@ -159,13 +159,13 @@ struct HomeView : View {
159159
HStack{
160160
Text("Favorites")
161161
.font(.system(size: 40, weight: .bold))
162-
.foregroundColor(.white)
162+
.foregroundColor(.black)
163163
Spacer(minLength: 0)
164164
Button(action: {}) {
165165
Image(systemName: "ellipsis")
166166
.font(Font.title.weight(.medium))
167167
.imageScale(.small)
168-
.foregroundColor(.white)
168+
.foregroundColor(.black)
169169
}
170170
}
171171
.padding(.horizontal)
@@ -178,7 +178,7 @@ struct HomeView : View {
178178
.fontWeight(.bold)
179179
.padding(.vertical,6)
180180
.padding(.horizontal,20)
181-
.background(Color.blue.opacity(index1 == 0 ? 1 : 0))
181+
.background(Color.black.opacity(index1 == 0 ? 1 : 0))
182182
.clipShape(Capsule())
183183
.onTapGesture {
184184
index1 = 0
@@ -189,7 +189,7 @@ struct HomeView : View {
189189
.fontWeight(.bold)
190190
.padding(.vertical,6)
191191
.padding(.horizontal,20)
192-
.background(Color.blue.opacity(index1 == 01 ? 1 : 0))
192+
.background(Color.black.opacity(index1 == 01 ? 1 : 0))
193193
.clipShape(Capsule())
194194
.onTapGesture {
195195
index1 = 1

readme/animation.gif

5.13 MB
Loading

readme/screenshot.png

195 KB
Loading

0 commit comments

Comments
 (0)