simple changes for the sheet for the learn more on welcome page

This commit is contained in:
talksik
2021-12-14 18:30:53 -08:00
parent 6cea5ff0d6
commit 15211ab3b6
3 changed files with 37 additions and 6 deletions
@@ -19,8 +19,6 @@ struct HeaderView: View {
.resizable() .resizable()
.frame(width: 20.0, height: 32.132) .frame(width: 20.0, height: 32.132)
.padding() .padding()
Spacer()
} }
} else { } else {
HStack(alignment:.center) { HStack(alignment:.center) {
@@ -53,7 +53,7 @@ struct OnboardingTemplateView: View {
self.bottomActionArea self.bottomActionArea
} }
.padding(.horizontal, screenWidth * 0.1) .padding(.horizontal, screenWidth * 0.05)
Spacer() Spacer()
} //outermost vstack } //outermost vstack
@@ -105,7 +105,7 @@ struct OnboardingTemplateView: View {
Spacer() Spacer()
} }
.frame(maxWidth: screenWidth - 20) .frame(maxWidth: screenWidth - 10)
} }
} }
} }
@@ -8,6 +8,8 @@
import SwiftUI import SwiftUI
struct WelcomeView: View { struct WelcomeView: View {
@State var showLearnMore = false
var body: some View { var body: some View {
NavigationView { NavigationView {
OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race on insta, snap, tik-tok, \"meta\"?", bottomActArea: AnyView( OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race on insta, snap, tik-tok, \"meta\"?", bottomActArea: AnyView(
@@ -26,11 +28,15 @@ struct WelcomeView: View {
Button( Button(
action: { action: {
print("link to website learn more clicked") print("link to website learn more clicked")
showLearnMore.toggle()
}, },
label: { label: {
Text("Learn More") Text("Learn More")
.bold() .bold()
}) })
.sheet(isPresented: $showLearnMore) {
LearnMoreView()
}
//learn more button to usenirvana.com //learn more button to usenirvana.com
} }
@@ -45,9 +51,36 @@ struct WelcomeView: View {
struct WelcomeView_Previews: PreviewProvider { struct WelcomeView_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
WelcomeView() WelcomeView().environmentObject(AuthSessionStore())
} }
} }
struct LearnMoreView: View {
@Environment(\.presentationMode) var presentationMode
var body: some View {
ScrollView {
Text("🍃your minimalist social media\n")
.font(.title)
.foregroundColor(NirvanaColor.black)
Text("tired of the rat race on ")
.font(.title)
Text("insta, tiktok, snap, \"meta\"...?\n")
.font(.title)
.foregroundColor(NirvanaColor.light)
Text("start your detox with us and:\n- live in the present\n- build a more intimate inner circle\n- cut out the noise\n- focus on your goals and personal growth")
.font(.title)
Text("p.s. we don't sell your data or hire phd's to drug you...")
.font(.subheadline)
Spacer()
Button("Dismiss Me") {
presentationMode.wrappedValue.dismiss()
}
.padding()
}.padding(25)
}
}