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

Updated iPad Texts for event cells and leaderboard #500

Merged
merged 3 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions HackIllinois/UI/HIAppearance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,17 @@ struct HIAppearance: Equatable {
}

enum Font {
static let glyphPad = UIFont.systemFont(ofSize: 24, weight: .bold)
static let timeIndicator = UIFont.systemFont(ofSize: 32, weight: .bold)
static let homeSegmentedTitlePad = UIFont.systemFont(ofSize: 40, weight: .bold)
static let viewTitlePad = UIFont.systemFont(ofSize: 48, weight: .bold)
static let scheduleSegmentedNumberPad = UIFont.systemFont(ofSize: 36, weight: .semibold)
static let scheduleSegmentedPad = UIFont.systemFont(ofSize: 32, weight: .semibold)
static let eventTitlePad = UIFont.systemFont(ofSize: 36, weight: .bold)
static let timeTextPad = UIFont.systemFont(ofSize: 28, weight: .semibold)
static let locationTextPad = UIFont.systemFont(ofSize: 24, weight: .semibold)
static let sponsorTextPad = UIFont.systemFont(ofSize: 24, weight: .semibold)
static let detailTextPad = UIFont.systemFont(ofSize: 24, weight: .regular)
static let glyphPad = UIFont(name: "MontserratRoman-Bold", size: 24)
static let timeIndicator = UIFont(name: "MontserratRoman-Bold", size: 32)
static let homeSegmentedTitlePad = UIFont(name: "MontserratRoman-Bold", size: 40)
static let viewTitlePad = UIFont(name: "MontserratRoman-Bold", size: 48)
static let scheduleSegmentedNumberPad = UIFont(name: "MontserratRoman-SemiBold", size: 36)
static let scheduleSegmentedPad = UIFont(name: "MontserratRoman-SemiBold", size: 32)
static let eventTitlePad = UIFont(name: "MontserratRoman-Bold", size: 36)
static let timeTextPad = UIFont(name: "MontserratRoman-SemiBold", size: 28)
static let locationTextPad = UIFont(name: "MontserratRoman-SemiBold", size: 24)
static let sponsorTextPad = UIFont(name: "MontserratRoman-SemiBold", size: 24)
static let detailTextPad = UIFont(name: "MontserratRoman-Regular", size: 24)
static let descriptionTextPad = UIFont(name: "MontserratRoman-SemiBold", size: 18)
static let contentSubtitle = UIFont(name: "MontserratRoman-Light", size: 13)
static let contentText = UIFont(name: "MontserratRoman-Regular", size: 14)
Expand Down Expand Up @@ -323,6 +323,9 @@ struct HIAppearance: Equatable {
static let leaderboardPoints = UIFont(name: "MontserratRoman-Semibold", size: 12)
static let leaderboardName = UIFont(name: "MontserratRoman-SemiBold", size: 16)
static let leaderboardRank = UIFont(name: "MontserratRoman-Bold", size: 24)
static let leaderboardPointsPad = UIFont(name: "MontserratRoman-Bold", size: 24)
static let leaderboardNamePad = UIFont(name: "MontserratRoman-SemiBold", size: 32)
static let leaderboardRankPad = UIFont(name: "MontserratRoman-Bold", size: 48)
}
}

Expand Down
18 changes: 15 additions & 3 deletions HackIllinois/UI/HILabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -298,17 +298,29 @@ class HILabel: UILabel {
case .leaderboardRank:
textHIColor = \.leaderboardText
backgroundHIColor = \.clear
font = HIAppearance.Font.leaderboardRank
if UIDevice.current.userInterfaceIdiom == .pad {
font = HIAppearance.Font.leaderboardRankPad
} else {
font = HIAppearance.Font.leaderboardRank
}

case .leaderboardName:
textHIColor = \.leaderboardText
backgroundHIColor = \.clear
font = HIAppearance.Font.leaderboardName
if UIDevice.current.userInterfaceIdiom == .pad {
font = HIAppearance.Font.leaderboardNamePad
} else {
font = HIAppearance.Font.leaderboardName
}

case .leaderboardPoints:
textHIColor = \.leaderboardText
backgroundHIColor = \.pointsBackground
font = HIAppearance.Font.leaderboardPoints
if UIDevice.current.userInterfaceIdiom == .pad {
font = HIAppearance.Font.leaderboardPointsPad
} else {
font = HIAppearance.Font.leaderboardPoints
}

case .newTime:
textHIColor = \.black
Expand Down