-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHomeView.swift
83 lines (77 loc) · 4.1 KB
/
HomeView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import SwiftUI
struct HomeView: View {
@EnvironmentObject var viewRouter: ViewRouter
var body: some View {
VStack(){
Spacer()
HStack{
Text("Hello, \(name)") // here there would have been database related code (aka the name from the database), but I removed it due to this repository going public
.font(.custom("OpenSans-Semibold",size: 48.0))
.padding(.leading)
Spacer()
}
ZStack(){
RoundedRectangle(cornerRadius: 20)
.frame(width: 343, height: 495)
.foregroundColor(Color(#colorLiteral(red: 0.9921568627, green: 0.9921568627, blue: 0.9921568627, alpha: 1)))
VStack(){
ActualMapView()
.frame(width: 343, height: 204)
.cornerRadius(20.0)
ZStack(){
RoundedRectangle(cornerRadius: 20.0)
.foregroundColor(Color(#colorLiteral(red: 0.9921568627, green: 0.9921568627, blue: 0.9921568627, alpha: 1)))
.frame(width: 343)
VStack(){
HStack(){
Image("tenaflydrycleaners")
.resizable()
.frame(width: 160.0, height: 160.0)
.padding(.all, -10)
.cornerRadius(20.0)
VStack(){
Text("Tenafly Dry Cleaners")
.font(.custom("OpenSans-SemiBold", size: 17))
.padding(.bottom, 1.0)
Text("22 Washington St, Tenafly, NJ 07670")
.font(.custom("OpenSans-SemiBold", size: 10.0))
.padding(.bottom, 1.0)
Text("(201) 569-1294")
.font(.custom("OpenSans-SemiBold", size: 10.0))
.padding(.bottom, 1.0)
Text("Open from 7:30 AM - 7:30 PM")
.font(.custom("OpenSans-SemiBold", size: 10.0))
.foregroundColor(Color(#colorLiteral(red: 0.09019607843, green: 0.8705882353, blue: 0.7450980392, alpha: 1)))
}
}
Spacer()
.frame(height: 75)
Button(action:{
self.viewRouter.currentPage = "orders"
}){
ZStack {
RoundedRectangle(cornerRadius: 20)
.fill(Color(#colorLiteral(red: 0.3490196078, green: 0.3137254902, blue: 0.6509803922, alpha: 1)))
.frame(width: 250, height: 50)
HStack {
Text("Schedule Drop-Off")
.foregroundColor(Color(.white))
.font(.custom("OpenSans-Bold", size: 17))
}
}
}
}
}
}
}.shadow(color: Color(#colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.1026428811)), radius: 8, x: 0, y: 1)
Spacer()
NavBar()
.shadow(color: Color(#colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.1026428811)), radius: 8, x: 0, y: 1)
}.edgesIgnoringSafeArea(.bottom)
}
}
struct HomeView_Previews: PreviewProvider {
static var previews: some View {
HomeView().environmentObject(ViewRouter())
}
}