getting a nice header in

This commit is contained in:
talksik
2021-12-16 12:54:53 -08:00
parent 6734b8f616
commit a26129a641
2 changed files with 24 additions and 6 deletions
+1
View File
@@ -12,6 +12,7 @@ struct ContentView: View {
var body: some View {
ZStack {
InnerCircleView()
// ContactsView() // TEMPORARY FOR TESTING
// switch self.authSessionStore.sessionState {
// case SessionState.isAuthenticated:
@@ -49,6 +49,7 @@ struct InnerCircleView: View {
.animation(
Animation.linear(duration: 12).repeatForever(autoreverses: false)
)
}
.ignoresSafeArea(.all)
@@ -62,23 +63,39 @@ struct InnerCircleView: View {
var content: some View {
VStack(alignment: .leading, spacing: 0) {
HStack {
HStack(alignment: .center) {
Image("undraw_handcrafts_leaf")
.resizable()
.frame(width: 20.0, height: 32.132)
.padding(.leading, 20)
Spacer()
Menu {
Button("Log out") {
print("log out button clicked")
}
Button("Friends") {
print("manage friends page")
}
} label: {
RemoteImage(url: "https://avatars.githubusercontent.com/u/41487836")
.background(NirvanaColor.teal)
.aspectRatio(contentMode: .fill)
.frame(width: 40, height: 40)
.clipShape(Circle())
.padding(5)
}
Text("nirvana")
.font(Font.custom("Satisfy-Regular", size: 35))
.foregroundColor(NirvanaColor.teal)
.multilineTextAlignment(.center)
}
.frame(maxWidth: .infinity)
.background(Color.white.opacity(0.35))
.clipShape(RoundedRectangle(cornerRadius: 30, style: .continuous))
.shadow(color: Color.black.opacity(0.1), radius: 30, x: 0, y: 20)
.shadow(color: Color.black.opacity(0.25), radius: 30, x: 0, y: 20)
.padding(.horizontal)
Spacer()
}
}