diff --git a/Sources/allin/allin.xcodeproj/project.pbxproj b/Sources/allin/allin.xcodeproj/project.pbxproj index 4dfbea3..84b8ff6 100644 --- a/Sources/allin/allin.xcodeproj/project.pbxproj +++ b/Sources/allin/allin.xcodeproj/project.pbxproj @@ -16,6 +16,10 @@ D98C4D7F2AB9D019007A6B4D /* AllInUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D7E2AB9D019007A6B4D /* AllInUITests.swift */; }; D98C4D812AB9D019007A6B4D /* AllInUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D802AB9D019007A6B4D /* AllInUITestsLaunchTests.swift */; }; D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */; }; + EC2C1EEB2AC08BE80091D57C /* BetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C1EEA2AC08BE80091D57C /* BetCard.swift */; }; + EC2C1EED2AC093820091D57C /* TextCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C1EEC2AC093820091D57C /* TextCapsule.swift */; }; + EC2C1EEF2AC098D30091D57C /* UsersPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C1EEE2AC098D30091D57C /* UsersPreview.swift */; }; + EC3737E42AC2F5FB00E6BDB5 /* ChoiceCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3737E32AC2F5FB00E6BDB5 /* ChoiceCapsule.swift */; }; EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46D7DC2ABCCC270030AC04 /* MenuView.swift */; }; EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */; }; EC50BF962ABF4D3300197685 /* SplashScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC50BF952ABF4D3300197685 /* SplashScreen.swift */; }; @@ -60,6 +64,10 @@ D98C4D802AB9D019007A6B4D /* AllInUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITestsLaunchTests.swift; sourceTree = ""; }; D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopBarView.swift; sourceTree = ""; }; EC0EA7AF2ABDAAD1006BA4A0 /* PlusJakartaSans.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = PlusJakartaSans.ttf; sourceTree = ""; }; + EC2C1EEA2AC08BE80091D57C /* BetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = BetCard.swift; path = allin/Views/BetCard.swift; sourceTree = SOURCE_ROOT; }; + EC2C1EEC2AC093820091D57C /* TextCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TextCapsule.swift; path = allin/Views/TextCapsule.swift; sourceTree = SOURCE_ROOT; }; + EC2C1EEE2AC098D30091D57C /* UsersPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = UsersPreview.swift; path = allin/Views/UsersPreview.swift; sourceTree = SOURCE_ROOT; }; + EC3737E32AC2F5FB00E6BDB5 /* ChoiceCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ChoiceCapsule.swift; path = allin/Views/ChoiceCapsule.swift; sourceTree = SOURCE_ROOT; }; EC46D7DC2ABCCC270030AC04 /* MenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MenuView.swift; path = allin/Views/MenuView.swift; sourceTree = SOURCE_ROOT; }; EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ParameterMenuView.swift; path = allin/Views/ParameterMenuView.swift; sourceTree = SOURCE_ROOT; }; EC50BF952ABF4D3300197685 /* SplashScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SplashScreen.swift; path = allin/Screens/SplashScreen.swift; sourceTree = SOURCE_ROOT; }; @@ -106,6 +114,10 @@ EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */, EC46D7DC2ABCCC270030AC04 /* MenuView.swift */, EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */, + EC2C1EEA2AC08BE80091D57C /* BetCard.swift */, + EC2C1EEC2AC093820091D57C /* TextCapsule.swift */, + EC2C1EEE2AC098D30091D57C /* UsersPreview.swift */, + EC3737E32AC2F5FB00E6BDB5 /* ChoiceCapsule.swift */, ); path = Views; sourceTree = ""; @@ -341,10 +353,13 @@ ECFC54442AC0C39E00195760 /* LoginScreen.swift in Sources */, EC87FCD62ABBA24000363986 /* Extensions.swift in Sources */, EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */, + EC2C1EEB2AC08BE80091D57C /* BetCard.swift in Sources */, EC87FCD92ABBA60900363986 /* Colors.swift in Sources */, D98C4D662AB9D017007A6B4D /* ContentView.swift in Sources */, ECDF624C2AC205E100BA8213 /* BetScreen.swift in Sources */, D92EC57C2ABADA2800CCD30E /* CoinCounterView.swift in Sources */, + EC3737E42AC2F5FB00E6BDB5 /* ChoiceCapsule.swift in Sources */, + EC2C1EED2AC093820091D57C /* TextCapsule.swift in Sources */, D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */, EC50BF962ABF4D3300197685 /* SplashScreen.swift in Sources */, EC9A45B02ABDF4A800125D41 /* HomeScreen.swift in Sources */, @@ -352,6 +367,7 @@ ECDF624A2AC1CAFD00BA8213 /* RegisterScreen.swift in Sources */, EC50BF982ABF541B00197685 /* WelcomeScreen.swift in Sources */, D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */, + EC2C1EEF2AC098D30091D57C /* UsersPreview.swift in Sources */, EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Sources/allin/allin/Assets.xcassets/BackgroundWhite.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/BackgroundWhite.colorset/Contents.json index 79a05ce..6dc7e58 100644 --- a/Sources/allin/allin/Assets.xcassets/BackgroundWhite.colorset/Contents.json +++ b/Sources/allin/allin/Assets.xcassets/BackgroundWhite.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "display-p3", "components" : { "alpha" : "1.000", - "blue" : "0x26", - "green" : "0x24", - "red" : "0x25" + "blue" : "0x1C", + "green" : "0x1C", + "red" : "0x1C" } }, "idiom" : "universal" diff --git a/Sources/allin/allin/Assets.xcassets/BetCardBackground.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/BetCardBackground.colorset/Contents.json new file mode 100644 index 0000000..fe25ab7 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/BetCardBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x26", + "green" : "0x26", + "red" : "0x26" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/BetTitle.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/BetTitle.colorset/Contents.json new file mode 100644 index 0000000..2536dc2 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/BetTitle.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/CapsuleGray.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/CapsuleGray.colorset/Contents.json new file mode 100644 index 0000000..29efc6f --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/CapsuleGray.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF7", + "green" : "0xF7", + "red" : "0xF7" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2A", + "green" : "0x2A", + "red" : "0x2A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/DefaultUserIcon.imageset/Contents.json b/Sources/allin/allin/Assets.xcassets/DefaultUserIcon.imageset/Contents.json new file mode 100644 index 0000000..121781c --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/DefaultUserIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Ellipse 1-2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/DefaultUserIcon.imageset/Ellipse 1-2.png b/Sources/allin/allin/Assets.xcassets/DefaultUserIcon.imageset/Ellipse 1-2.png new file mode 100644 index 0000000..fd31ae8 Binary files /dev/null and b/Sources/allin/allin/Assets.xcassets/DefaultUserIcon.imageset/Ellipse 1-2.png differ diff --git a/Sources/allin/allin/Assets.xcassets/DelimiterGray.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/DelimiterGray.colorset/Contents.json new file mode 100644 index 0000000..53b0ea1 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/DelimiterGray.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEB", + "green" : "0xEB", + "red" : "0xEB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x39", + "green" : "0x39", + "red" : "0x39" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/LightGray.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/LightGray.colorset/Contents.json new file mode 100644 index 0000000..657fc42 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/LightGray.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xAA", + "green" : "0xAA", + "red" : "0xAA" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xAA", + "green" : "0xAA", + "red" : "0xAA" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/LightGray_200.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/LightGray_200.colorset/Contents.json new file mode 100644 index 0000000..4f6f888 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/LightGray_200.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEB", + "green" : "0xEB", + "red" : "0xEB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0x39", + "green" : "0x39", + "red" : "0x39" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/PrimaryTextColor.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/PrimaryTextColor.colorset/Contents.json new file mode 100644 index 0000000..9138853 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/PrimaryTextColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFB", + "green" : "0x7B", + "red" : "0x7F" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFB", + "green" : "0x7B", + "red" : "0x7F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/TopBarColorPurple.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/TopBarColorPurple.colorset/Contents.json index b48ebfa..3dd2ce2 100644 --- a/Sources/allin/allin/Assets.xcassets/TopBarColorPurple.colorset/Contents.json +++ b/Sources/allin/allin/Assets.xcassets/TopBarColorPurple.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0xF3", - "green" : "0x7E", - "red" : "0xAA" + "blue" : "0.953", + "green" : "0.494", + "red" : "0.667" } }, "idiom" : "universal" diff --git a/Sources/allin/allin/Assets.xcassets/TrendingBetCardBackground.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/TrendingBetCardBackground.colorset/Contents.json new file mode 100644 index 0000000..85730c1 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/TrendingBetCardBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2A", + "green" : "0x2A", + "red" : "0x2A" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2A", + "green" : "0x2A", + "red" : "0x2A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Ressources/Colors.swift b/Sources/allin/allin/Ressources/Colors.swift index 0bcac1b..d4c029b 100644 --- a/Sources/allin/allin/Ressources/Colors.swift +++ b/Sources/allin/allin/Ressources/Colors.swift @@ -24,10 +24,24 @@ struct AllinColor { static let TopBarColorPurple = Color("TopBarColorPurple") static let StrokeGrayColor = Color("StrokeGrayColor") static let DescriptionColorMenu = Color("DescriptionColorMenu") + static let lightGray = Color("LightGray") static let BorderColorMenu = Color("BorderColorMenu") + static let PrimaryTextColor = Color("PrimaryTextColor") + static let DelimiterGray = Color("DelimiterGray") + static let CapsuleGray = Color("CapsuleGray") + static let LightGray_200 = Color("LightGray_200") + static let TrendingBetCardBackground = Color("TrendingBetCardBackground") + static let BetCardBackground = Color("BetCardBackground") + + static let gradiantCard = LinearGradient( gradient: Gradient(colors: [AllinColor.pinkAccentText, AllinColor.blueAccent]), startPoint: .bottomLeading, endPoint: .topTrailing ) + static let fadeInGradiantCard = LinearGradient( + gradient: Gradient(colors: [AllinColor.backgroundWhite.opacity(0), AllinColor.backgroundWhite.opacity(0.9),AllinColor.backgroundWhite]), + startPoint: .bottom, + endPoint: .top + ) } diff --git a/Sources/allin/allin/Screens/HomeScreen.swift b/Sources/allin/allin/Screens/HomeScreen.swift index 19d7f75..95106d0 100644 --- a/Sources/allin/allin/Screens/HomeScreen.swift +++ b/Sources/allin/allin/Screens/HomeScreen.swift @@ -14,13 +14,42 @@ struct Home: View { var body: some View { VStack(alignment: .center, spacing: 0) { TopBarView(showMenu: self.$showMenu) - ScrollView{ - TrendingBetCard() + ScrollView(showsIndicators: false){ + LazyVStack(alignment: .leading, spacing: 0, pinnedViews: [.sectionHeaders]) { + + TrendingBetCard().padding(.top,25).padding([.leading,.trailing],25) + + Section { + VStack(spacing: 20){ + BetCard() + BetCard() + BetCard() + }.padding([.leading,.trailing],25) + } header: { + ZStack{ + AllinColor.fadeInGradiantCard + ScrollView(.horizontal,showsIndicators: false){ + HStack{ + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + }.padding(.leading,25).padding([.top,.bottom],15) + + } + } + + } + + } } Spacer() } - .edgesIgnoringSafeArea(.bottom) + .edgesIgnoringSafeArea(.bottom).background(AllinColor.backgroundWhite) } } diff --git a/Sources/allin/allin/Views/BetCard.swift b/Sources/allin/allin/Views/BetCard.swift new file mode 100644 index 0000000..70cb769 --- /dev/null +++ b/Sources/allin/allin/Views/BetCard.swift @@ -0,0 +1,77 @@ +// +// BetCard.swift +// AllIn +// +// Created by étudiant on 24/09/2023. +// + +import SwiftUI + +struct BetCard: View { + var body: some View { + VStack(spacing: 0){ + VStack(alignment: .leading,spacing: 2){ + HStack{ + Spacer() + Text("proposé par Lucas").font(.system(size: 10)).foregroundColor(AllinColor.lightGray) + + } + Text("Etudes").font(.system(size: 15)).foregroundColor(AllinColor.lightGray) + Text("Emre va réussir son TP de CI/CD mercredi?").font(.system(size: 20)).fontWeight(.bold) + HStack{ + Text("Commence le").font(.system(size: 15)).foregroundColor(AllinColor.lightGray) + TextCapsule() + TextCapsule() + Spacer() + + } + }.frame(width: .infinity).padding(.all,15) + + .background(AllinColor.BetCardBackground).cornerRadius(20, corners: [.topLeft,.topRight]).padding(.bottom,0) + VStack(alignment: .leading,spacing: 2){ + HStack{ + Spacer() + UsersPreview() + Text(" 4 joueurs en attente").font(.system(size: 15)).foregroundColor(AllinColor.lightGray).fontWeight(.medium) + + Spacer() + + }.padding(0) + Button { + + } label: { + Text("Participer") + .font(.system(size: 30)) + .fontWeight(.bold) + .frame(maxWidth: .infinity).padding(10) + .multilineTextAlignment(.center) + .overlay { + AllinColor.gradiantCard.frame(width: 170) + .mask( + Text("Participer") + .font(.system(size: 30)) + .fontWeight(.bold) + .frame(maxWidth: .infinity).padding(10) + ) + } + } + + .accentColor(AllinColor.BetCardBackground) + .buttonStyle(.borderedProminent).cornerRadius(4.0) + .overlay( + RoundedRectangle(cornerRadius: 12).stroke(AllinColor.DelimiterGray , lineWidth: 1) + ).padding([.top],5) + + }.frame(width: .infinity).padding(.all,8) + + .background(AllinColor.CapsuleGray).cornerRadius(20, corners: [.bottomLeft,.bottomRight]).padding(.bottom,0).border(width: 1, edges: [.top], color: AllinColor.DelimiterGray) + } + + } +} + +struct BetCard_Previews: PreviewProvider { + static var previews: some View { + BetCard() + } +} diff --git a/Sources/allin/allin/Views/ChoiceCapsule.swift b/Sources/allin/allin/Views/ChoiceCapsule.swift new file mode 100644 index 0000000..bb2f962 --- /dev/null +++ b/Sources/allin/allin/Views/ChoiceCapsule.swift @@ -0,0 +1,35 @@ +// +// ChoiceCapsule.swift +// AllIn +// +// Created by étudiant on 26/09/2023. +// + +import SwiftUI + +struct ChoiceCapsule: View { + @State var buttonPressed = false + var body: some View { + Group { + if(buttonPressed){ + Text("En cours").font(.system(size: 15)).foregroundColor(.white).fontWeight(.semibold).padding([.leading,.trailing],13.8).padding([.top,.bottom], 7).background(AllinColor.PrimaryTextColor).clipShape(Capsule() + ) + }else{ + Text("En cours").font(.system(size: 15)).foregroundColor(AllinColor.lightGray).fontWeight(.regular).padding([.leading,.trailing],15).padding([.top,.bottom], 7).background(AllinColor.CapsuleGray).clipShape(Capsule()).overlay( /// apply a rounded border + RoundedRectangle(cornerRadius: 20) + .stroke(AllinColor.LightGray_200, lineWidth: 1) + ) + } + } + .onTapGesture() { + buttonPressed.toggle() + } + + } +} + +struct ChoiceCapsule_Previews: PreviewProvider { + static var previews: some View { + ChoiceCapsule() + } +} diff --git a/Sources/allin/allin/Views/TextCapsule.swift b/Sources/allin/allin/Views/TextCapsule.swift new file mode 100644 index 0000000..699fdf4 --- /dev/null +++ b/Sources/allin/allin/Views/TextCapsule.swift @@ -0,0 +1,23 @@ +// +// TextCapsule.swift +// AllIn +// +// Created by étudiant on 24/09/2023. +// + +import SwiftUI + +struct TextCapsule: View { + var body: some View { + Text("12 sept.").font(.system(size: 15)).foregroundColor(AllinColor.PrimaryTextColor).fontWeight(.bold).padding([.leading,.trailing],10).padding([.top,.bottom], 5).background(AllinColor.CapsuleGray).clipShape(Capsule()).overlay( /// apply a rounded border + RoundedRectangle(cornerRadius: 20) + .stroke(AllinColor.DelimiterGray, lineWidth: 1) + ) + } +} + +struct TextCapsule_Previews: PreviewProvider { + static var previews: some View { + TextCapsule() + } +} diff --git a/Sources/allin/allin/Views/TrendingBetCard.swift b/Sources/allin/allin/Views/TrendingBetCard.swift index adcc5eb..f7574cc 100644 --- a/Sources/allin/allin/Views/TrendingBetCard.swift +++ b/Sources/allin/allin/Views/TrendingBetCard.swift @@ -70,13 +70,12 @@ struct TrendingBetCard: View { } } .frame(height: 127, alignment: .topLeading) - .background(AllinColor.darkerGray) + .background(AllinColor.TrendingBetCardBackground) .overlay( RoundedRectangle(cornerRadius: 20, style: .continuous) .stroke(AllinColor.gradiantCard, lineWidth: 5) ) .clipShape(RoundedRectangle(cornerRadius: 20, style: .continuous)) - .padding([.leading, .trailing], 20) } } diff --git a/Sources/allin/allin/Views/UsersPreview.swift b/Sources/allin/allin/Views/UsersPreview.swift new file mode 100644 index 0000000..a91be67 --- /dev/null +++ b/Sources/allin/allin/Views/UsersPreview.swift @@ -0,0 +1,33 @@ +// +// UsersPreview.swift +// AllIn +// +// Created by étudiant on 24/09/2023. +// + +import SwiftUI + +struct UsersPreview: View { + var body: some View { + HStack(spacing: -20){ + Image("DefaultUserIcon") + .resizable() + .frame(width: 35, height: 35) + Image("DefaultUserIcon") + .resizable() + .frame(width: 35, height: 35) + Image("DefaultUserIcon") + .resizable() + .frame(width: 35, height: 35) + Image("DefaultUserIcon") + .resizable() + .frame(width: 35, height: 35) + } + } +} + +struct UsersPreview_Previews: PreviewProvider { + static var previews: some View { + UsersPreview() + } +}