diff --git a/Sources/allin/allin.xcodeproj/project.pbxproj b/Sources/allin/allin.xcodeproj/project.pbxproj index 338403a..0850035 100644 --- a/Sources/allin/allin.xcodeproj/project.pbxproj +++ b/Sources/allin/allin.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ EC87FCD92ABBA60900363986 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD82ABBA60900363986 /* Colors.swift */; }; EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */; }; EC9A45B02ABDF4A800125D41 /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC9A45AF2ABDF4A800125D41 /* HomeScreen.swift */; }; + ECFC54442AC0C39E00195760 /* LoginScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFC54432AC0C39E00195760 /* LoginScreen.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -65,6 +66,7 @@ EC87FCD82ABBA60900363986 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Colors.swift; path = allin/Ressources/Colors.swift; sourceTree = SOURCE_ROOT; }; EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TrendingBetCard.swift; path = allin/Views/TrendingBetCard.swift; sourceTree = SOURCE_ROOT; }; EC9A45AF2ABDF4A800125D41 /* HomeScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HomeScreen.swift; path = allin/Screens/HomeScreen.swift; sourceTree = SOURCE_ROOT; }; + ECFC54432AC0C39E00195760 /* LoginScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LoginScreen.swift; path = allin/Screens/LoginScreen.swift; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -187,6 +189,7 @@ EC9A45AF2ABDF4A800125D41 /* HomeScreen.swift */, EC50BF952ABF4D3300197685 /* SplashScreen.swift */, EC50BF972ABF541B00197685 /* WelcomeScreen.swift */, + ECFC54432AC0C39E00195760 /* LoginScreen.swift */, ); path = Screens; sourceTree = ""; @@ -329,6 +332,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + ECFC54442AC0C39E00195760 /* LoginScreen.swift in Sources */, EC87FCD62ABBA24000363986 /* Extensions.swift in Sources */, EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */, EC87FCD92ABBA60900363986 /* Colors.swift in Sources */, diff --git a/Sources/allin/allin/Assets.xcassets/PurpleText.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/PurpleText.colorset/Contents.json new file mode 100644 index 0000000..8790273 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/PurpleText.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF6", + "green" : "0x45", + "red" : "0x6E" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF6", + "green" : "0x45", + "red" : "0x6E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/StrokeGrayColor.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/StrokeGrayColor.colorset/Contents.json new file mode 100644 index 0000000..de593c3 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/StrokeGrayColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x8A", + "green" : "0x8A", + "red" : "0x8A" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x8A", + "green" : "0x8A", + "red" : "0x8A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Ressources/Colors.swift b/Sources/allin/allin/Ressources/Colors.swift index 6a62d2d..0bcac1b 100644 --- a/Sources/allin/allin/Ressources/Colors.swift +++ b/Sources/allin/allin/Ressources/Colors.swift @@ -14,6 +14,7 @@ struct AllinColor { static let pinkAccentText = Color("PinkAccentText") static let darkLight = Color("DarkLight") static let backgroundWhite = Color("BackgroundWhite") + static let PurpleText = Color("PurpleText") static let StartBackground = Color("StartBackground") static let blueAccent = Color("BlueAccent") static let TopBarColorPink = Color("TopBarColorPink") @@ -21,6 +22,7 @@ struct AllinColor { static let LightPurple = Color("LightPurple") static let TopBarColorBlue = Color("TopBarColorBlue") static let TopBarColorPurple = Color("TopBarColorPurple") + static let StrokeGrayColor = Color("StrokeGrayColor") static let DescriptionColorMenu = Color("DescriptionColorMenu") static let BorderColorMenu = Color("BorderColorMenu") static let gradiantCard = LinearGradient( diff --git a/Sources/allin/allin/Screens/LoginScreen.swift b/Sources/allin/allin/Screens/LoginScreen.swift new file mode 100644 index 0000000..2cfcd30 --- /dev/null +++ b/Sources/allin/allin/Screens/LoginScreen.swift @@ -0,0 +1,78 @@ +// +// LoginScreen.swift +// AllIn +// +// Created by étudiant on 24/09/2023. +// + +import SwiftUI + +struct Login: View { + + @State private var username: String = "" + @State private var password: String = "" + var body: some View { + GeometryReader { geometry in + VStack(spacing: 15) { + Spacer() + Text("Te revoilà!") + .betTextStyle(weight: .semibold, color: AllinColor.StartTextColor, size: 40) + Text("Bon retour parmis nous tu nous as manqué!") + .frame(width: 220) + .multilineTextAlignment(.center) + .betTextStyle(weight: .regular, color: AllinColor.StartTextColor, size: 20) + .padding(.bottom, 60) + + TextField("", text: $username, prompt: Text("Email").foregroundColor(.gray)) + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllinColor.StrokeGrayColor, lineWidth: 1) + ) + .padding(.bottom, 8) + + TextField("", text: $password, prompt: Text("Mot de passe").foregroundColor(.gray)) + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllinColor.StrokeGrayColor, lineWidth: 1) + ) + .foregroundColor(.black) + + Text("Mot de passe oublié?") + .frame(alignment: .trailing) + .padding(.bottom, 20) + .padding(.leading, 150) + .betTextStyle(weight: .medium, color: AllinColor.StartTextColor, size: 14) + + Button(action: {}) { + Text("Se connecter") + .betTextStyle(weight: .bold, color: .white, size: 17) + } + .frame(width: 300, height: 60) + .background(LinearGradient(gradient: + Gradient(colors:[AllinColor.TopBarColorPink,AllinColor.TopBarColorPurple,AllinColor.TopBarColorBlue]), + startPoint: .leading, endPoint: .trailing)) + .cornerRadius(13) + + Spacer() + HStack(spacing: 0) { + Text("Pas encore inscrit? ") + .betTextStyle(weight: .regular, color: AllinColor.StartTextColor, size: 16) + Text("S'inscrire") + .betTextStyle(weight: .semibold, color: AllinColor.PurpleText, size: 16) + } + + } + .frame(width: geometry.size.width, height: geometry.size.height) + .background(AllinColor.StartBackground) + } + } + +} +