diff --git a/wulkanowy.xcodeproj/project.pbxproj b/wulkanowy.xcodeproj/project.pbxproj index 08a7343..2d21481 100644 --- a/wulkanowy.xcodeproj/project.pbxproj +++ b/wulkanowy.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 96A2D96325D6FEA6001CB109 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 96A2D96525D6FEA6001CB109 /* Localizable.strings */; }; 96A2D97B25D7003F001CB109 /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A2D97A25D7003F001CB109 /* OnboardingView.swift */; }; + 96A2D98825D73DCF001CB109 /* OnboardingButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A2D98725D73DCF001CB109 /* OnboardingButtonView.swift */; }; F4C6D9082544E17400F8903A /* wulkanowyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C6D9072544E17400F8903A /* wulkanowyApp.swift */; }; F4C6D90C2544E17500F8903A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4C6D90B2544E17500F8903A /* Assets.xcassets */; }; F4C6D90F2544E17500F8903A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4C6D90E2544E17500F8903A /* Preview Assets.xcassets */; }; @@ -37,6 +38,7 @@ 96A2D96425D6FEA6001CB109 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 96A2D96925D6FEBB001CB109 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; 96A2D97A25D7003F001CB109 /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = ""; }; + 96A2D98725D73DCF001CB109 /* OnboardingButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingButtonView.swift; sourceTree = ""; }; F4C6D9042544E17400F8903A /* wulkanowy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = wulkanowy.app; sourceTree = BUILT_PRODUCTS_DIR; }; F4C6D9072544E17400F8903A /* wulkanowyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = wulkanowyApp.swift; sourceTree = ""; }; F4C6D90B2544E17500F8903A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -103,6 +105,7 @@ isa = PBXGroup; children = ( 96A2D97A25D7003F001CB109 /* OnboardingView.swift */, + 96A2D98725D73DCF001CB109 /* OnboardingButtonView.swift */, ); path = Onboarding; sourceTree = ""; @@ -299,6 +302,7 @@ files = ( F4C6D9082544E17400F8903A /* wulkanowyApp.swift in Sources */, 96A2D97B25D7003F001CB109 /* OnboardingView.swift in Sources */, + 96A2D98825D73DCF001CB109 /* OnboardingButtonView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/wulkanowy/Assets.xcassets/wulkanowy-logo.imageset/Contents.json b/wulkanowy/Assets.xcassets/Colors/Contents.json similarity index 51% rename from wulkanowy/Assets.xcassets/wulkanowy-logo.imageset/Contents.json rename to wulkanowy/Assets.xcassets/Colors/Contents.json index 6fe3320..73c0059 100644 --- a/wulkanowy/Assets.xcassets/wulkanowy-logo.imageset/Contents.json +++ b/wulkanowy/Assets.xcassets/Colors/Contents.json @@ -1,9 +1,4 @@ { - "images" : [ - { - "idiom" : "universal" - } - ], "info" : { "author" : "xcode", "version" : 1 diff --git a/wulkanowy/Assets.xcassets/Colors/OnboardingColor.colorset/Contents.json b/wulkanowy/Assets.xcassets/Colors/OnboardingColor.colorset/Contents.json new file mode 100644 index 0000000..f9db063 --- /dev/null +++ b/wulkanowy/Assets.xcassets/Colors/OnboardingColor.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x09", + "green" : "0x02", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/wulkanowy/Assets.xcassets/SVG/Contents.json b/wulkanowy/Assets.xcassets/SVG/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/wulkanowy/Assets.xcassets/SVG/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/wulkanowy/Assets.xcassets/SVG/wulkanowy-svg.imageset/Contents.json b/wulkanowy/Assets.xcassets/SVG/wulkanowy-svg.imageset/Contents.json new file mode 100644 index 0000000..e868bc3 --- /dev/null +++ b/wulkanowy/Assets.xcassets/SVG/wulkanowy-svg.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "wulkanowy-1.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" + } +} diff --git a/wulkanowy/Assets.xcassets/SVG/wulkanowy-svg.imageset/wulkanowy-1.svg b/wulkanowy/Assets.xcassets/SVG/wulkanowy-svg.imageset/wulkanowy-1.svg new file mode 100644 index 0000000..de66e7a --- /dev/null +++ b/wulkanowy/Assets.xcassets/SVG/wulkanowy-svg.imageset/wulkanowy-1.svg @@ -0,0 +1,9 @@ + + + Shape + + + + + + \ No newline at end of file diff --git a/wulkanowy/Resources/en.lproj/Localizable.strings b/wulkanowy/Resources/en.lproj/Localizable.strings index 2d7e9f8..a8934a6 100644 --- a/wulkanowy/Resources/en.lproj/Localizable.strings +++ b/wulkanowy/Resources/en.lproj/Localizable.strings @@ -7,3 +7,7 @@ */ "title" = "Wulkanowy"; + +"onboarding.description.title" = "Keep track of your educational progress with Wulkanowy app!"; +"onboarding.description.content" = "Wulkanowy allows you to view your grades, attendance, messages from teachers and many more!"; +"onboarding.start" = "Start!"; diff --git a/wulkanowy/Resources/pl.lproj/Localizable.strings b/wulkanowy/Resources/pl.lproj/Localizable.strings index 2d7e9f8..09af0cb 100644 --- a/wulkanowy/Resources/pl.lproj/Localizable.strings +++ b/wulkanowy/Resources/pl.lproj/Localizable.strings @@ -7,3 +7,7 @@ */ "title" = "Wulkanowy"; + +"onboarding.description.title" = "Śledź swoje postępy w nauce za pomocą Wulkanowego!"; +"onboarding.description.content" = "Wulkanowy pozwala Tobie na sprawdzenie swoich ocen, frewkwencji, wiadomości od nauczycieli i wiele więcej!"; +"onboarding.start" = "Start!"; diff --git a/wulkanowy/Views/Onboarding/OnboardingButtonView.swift b/wulkanowy/Views/Onboarding/OnboardingButtonView.swift new file mode 100644 index 0000000..a53e9f0 --- /dev/null +++ b/wulkanowy/Views/Onboarding/OnboardingButtonView.swift @@ -0,0 +1,31 @@ +// +// OnboardingButtonView.swift +// wulkanowy +// +// Created by Karol Zientek on 12/02/2021. +// + +import SwiftUI + +struct OnboardingButtonView: View { + var body: some View { + Button(action: { + print("Exit the onboarding") + }, label: { + Text("onboarding.start") + }) + .padding(10) + .frame(minWidth: 0, maxWidth: .infinity) + .background(Color("OnboardingColor")) + .foregroundColor(.white) + .font(.title) + .cornerRadius(20) + } +} + +struct OnboardingButtonView_Previews: PreviewProvider { + static var previews: some View { + OnboardingButtonView() + .previewLayout(.sizeThatFits) + } +} diff --git a/wulkanowy/Views/Onboarding/OnboardingView.swift b/wulkanowy/Views/Onboarding/OnboardingView.swift index cc0dc81..146f95b 100644 --- a/wulkanowy/Views/Onboarding/OnboardingView.swift +++ b/wulkanowy/Views/Onboarding/OnboardingView.swift @@ -8,13 +8,42 @@ import SwiftUI struct OnboardingView: View { + + @State private var isAnimating: Bool = false + var body: some View { - + VStack(spacing: 20) { + Spacer() + Image("wulkanowy-svg") + .resizable() + .frame(width: 200, height: 200, alignment: .top) + .foregroundColor(Color("OnboardingColor")) + .scaleEffect(isAnimating ? 1.0 : 0.6) + VStack(spacing: 20) { + Text("onboarding.description.title") + .font(.headline) + .multilineTextAlignment(.center) + Text("onboarding.description.content") + .font(.subheadline) + .multilineTextAlignment(.center) + } + .padding(.horizontal, 20) + Spacer() + OnboardingButtonView() + .padding() + } + .onAppear { + withAnimation(.easeOut(duration: 0.5)) { + isAnimating = true + } + } } } -struct OnboardingView_Previews: PreviewProvider { +struct WulkanowyCardView_Previews: PreviewProvider { static var previews: some View { - OnboardingView() + Group { + OnboardingView().previewLayout(.fixed(width: 320, height: 640)) + } } }