Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anushka/update profile page #566

Merged
merged 15 commits into from
Feb 11, 2024
Prev Previous commit
Next Next commit
Update iPad profile UI
anushkasankaran committed Jan 18, 2024

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
commit bbc4011919613e60747375eb55c78f3a89f5a171
14 changes: 8 additions & 6 deletions HackIllinois/ViewControllers/HIProfileCardView.swift
Original file line number Diff line number Diff line change
@@ -47,8 +47,12 @@ struct HIProfileCardView: View {
ZStack(alignment: .top) {
ZStack(alignment: .bottom) {
Image("ProfileCardBackground")
.resizable()
.frame(width: UIDevice.current.userInterfaceIdiom == .pad ? 566.93 : 338, height: UIDevice.current.userInterfaceIdiom == .pad ? 777.2 : 463.36)
ZStack {
Image("ProfileBanner")
.resizable()
.frame(width: UIDevice.current.userInterfaceIdiom == .pad ? 395.7 : 235.91, height: UIDevice.current.userInterfaceIdiom == .pad ? 137.71 : 82.1)
VStack(spacing: 0) {
Text("Your Ranking")
.foregroundColor(.white)
@@ -58,16 +62,13 @@ struct HIProfileCardView: View {
Image("RankSymbol")
Text("25").foregroundColor(.white).font(Font(HIAppearance.Font.profileSubtitle ?? .systemFont(ofSize: 20)))
}
}.padding(.bottom, 25)
}.padding(.bottom, isIpad ? 40 : 25)
}.alignmentGuide(.bottom) {dimensions in dimensions[.bottom] / 1.2 }
}
Image(uiImage: avatarUrl.load())
.resizable()
.frame(width: isIpad ? 149 : 149, height: isIpad ? 170.75 : 170.75)
.frame(width: isIpad ? 249.92 : 149, height: isIpad ? 286.4 : 170.75)
.alignmentGuide(.top) {dimensions in dimensions[VerticalAlignment.center] / 0.9 }
.onTapGesture {
print(avatarUrl)
}
}
VStack(spacing: 0) {
Spacer().frame(height: 90)
@@ -99,9 +100,10 @@ struct HIProfileCardView: View {
}.padding(.bottom)
Image(uiImage: UIImage(data: getQRCodeDate(text: qrInfo)!)!)
.resizable()
.frame(width: isIpad ? 200 : 221, height: isIpad ? 200 : 221)
.frame(width: isIpad ? 371 : 221, height: isIpad ? 371 : 221)
.padding(.bottom, 20)
}
.padding(.top, isIpad ? 50 : 0)
}
.padding(.top, 24)
}