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

Ishaan/home page #559

Merged
merged 8 commits into from
Jan 9, 2024
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
26 changes: 25 additions & 1 deletion HIAPI/Models/Time.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ public struct TimeContainer: Decodable, APIReturnable {
}

public struct EventTimes: Codable {

public let checkInStart: Date
public let checkInEnd: Date
public let scavengerHuntStart: Date
public let scavengerHuntEnd: Date
public let openingCeremonyStart: Date
public let openingCeremonyEnd: Date
public let projectShowcaseStart: Date
public let projectShowcaseEnd: Date
public let closingCeremonyStart: Date
public let closingCeremonyEnd: Date

public let eventStart: Date
public let eventEnd: Date
public let hackStart: Date
Expand All @@ -41,8 +53,20 @@ public struct EventTimes: Codable {
public let sundayStart: Date
public let sundayEnd: Date

public init(eventStart: Date, eventEnd: Date, hackStart: Date, hackEnd: Date, fridayStart: Date, fridayEnd: Date,
public init(checkInStart: Date, checkInEnd: Date, scavengerHuntStart: Date, scavengerHuntEnd: Date, openingCeremonyStart: Date, openingCeremonyEnd: Date,projectShowcaseStart: Date, projectShowcaseEnd: Date, closingCeremonyStart: Date, closingCeremonyEnd: Date,
eventStart: Date, eventEnd: Date, hackStart: Date, hackEnd: Date, fridayStart: Date, fridayEnd: Date,
saturdayStart: Date, saturdayEnd: Date, sundayStart: Date, sundayEnd: Date) {
self.checkInStart = checkInStart
self.checkInEnd = checkInEnd
self.scavengerHuntStart = scavengerHuntStart
self.scavengerHuntEnd = scavengerHuntEnd
self.openingCeremonyStart = openingCeremonyStart
self.openingCeremonyEnd = openingCeremonyEnd
self.projectShowcaseStart = projectShowcaseStart
self.projectShowcaseEnd = projectShowcaseEnd
self.closingCeremonyStart = closingCeremonyStart
self.closingCeremonyEnd = closingCeremonyEnd

self.eventStart = eventStart
self.eventEnd = eventEnd
self.hackStart = hackStart
Expand Down
6 changes: 6 additions & 0 deletions HackIllinois/Assets.xcassets/Home/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
23 changes: 23 additions & 0 deletions HackIllinois/Assets.xcassets/Home/Home_1.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions HackIllinois/Assets.xcassets/Home/Home_2.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions HackIllinois/Assets.xcassets/Home/Home_3.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_3.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions HackIllinois/Assets.xcassets/Home/Home_4.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_4.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions HackIllinois/Assets.xcassets/Home/Home_5.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_5.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions HackIllinois/Assets.xcassets/Home/Home_6.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_6.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_Final.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_Start.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Home_Tags_Transparent.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Question Mark Toggled.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Question Mark [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Question Mark [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Question Mark.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Question [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Question [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
11 changes: 11 additions & 0 deletions HackIllinois/DataSources/HITimeDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ final class HITimeDataSource {
static var shared = HITimeDataSource()

public static let defaultTimes = EventTimes(
checkInStart: Date(timeIntervalSince1970: 1708723800), // Friday, February 23, 2024 3:30:00 PM CST
checkInEnd: Date(timeIntervalSince1970: 1708725600), // Friday, February 23, 2024 4:00:00 PM CST
scavengerHuntStart: Date(timeIntervalSince1970: 1708725600), // Friday, February 23, 2024 4:00:00 PM CST
scavengerHuntEnd: Date(timeIntervalSince1970: 1708732800), // Friday, February 23, 2024 6:00:00 PM CST
openingCeremonyStart: Date(timeIntervalSince1970: 1708732800), // Friday, February 23, 2024 6:00:00 PM CST
openingCeremonyEnd: Date(timeIntervalSince1970: 1708736400), // Friday, February 23, 2024 7:00:00 PM CST
projectShowcaseStart: Date(timeIntervalSince1970: 1708880400), // Sunday, February 25, 2024 11:00:00 AM CST
projectShowcaseEnd: Date(timeIntervalSince1970: 1708894800), // Sunday, February 25, 2024 3:00:00 PM CST
closingCeremonyStart: Date(timeIntervalSince1970: 1708894800), // Sunday, February 25, 2024 3:00:00 PM CST
closingCeremonyEnd: Date(timeIntervalSince1970: 1708898400), // Sunday, February 25, 2024 4:00:00 PM CST

eventStart: Date(timeIntervalSince1970: 1708732800), // Friday, February 23, 2024 6:00:00 PM CST
eventEnd: Date(timeIntervalSince1970: 1708898400), // Sunday, February 25, 2024 4:00:00 PM CST
hackStart: Date(timeIntervalSince1970: 1708736400), // Friday, February 23, 2024 7:00:00 PM CST
Expand Down
17 changes: 14 additions & 3 deletions HackIllinois/UI/HIAppearance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ struct HIAppearance: Equatable {
let profileCardNone: UIColor

let profileBaseText: UIColor

let countdownTextColor: UIColor
let countdownBackground: UIColor
let bannerBackground: UIColor

let clear: UIColor = .clear
let black: UIColor = .black
Expand Down Expand Up @@ -200,7 +204,10 @@ struct HIAppearance: Equatable {
profileCardLactoseIntolerant: lactoseintolerant,
profileCardOther: other,
profileCardNone: none,
profileBaseText: profileBaseText
profileBaseText: profileBaseText,
countdownTextColor: brown,
countdownBackground: orange,
bannerBackground: lightYellow
)

fileprivate static let night = HIAppearance(
Expand Down Expand Up @@ -264,7 +271,10 @@ struct HIAppearance: Equatable {
profileCardLactoseIntolerant: lactoseintolerant,
profileCardOther: other,
profileCardNone: none,
profileBaseText: profileBaseText
profileBaseText: profileBaseText,
countdownTextColor: brown,
countdownBackground: orange,
bannerBackground: lightYellow
)

fileprivate static var current = day
Expand Down Expand Up @@ -342,7 +352,8 @@ struct HIAppearance: Equatable {
static let QRCheckInFont = UIFont(name: "MontserratRoman-SemiBold", size: 14)

// Home page countdown fonts
static let newCountdownText = UIFont(name: "MontserratRoman-Bold", size: 48) // Hack 2023
// static let newCountdownText = UIFont(name: "MontserratRoman-Bold", size: 48) // Hack 2023
static let newCountdownText = UIFont(name: "MontserratRoman-Bold", size: 42) // Hack 2024
static let countdownText = UIFont(name: "MontserratRoman-Bold", size: 25)

// Onboarding fonts
Expand Down
8 changes: 4 additions & 4 deletions HackIllinois/UI/HILabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class HILabel: UILabel {
case leaderboardRank
case leaderboardName
case leaderboardPoints
case neonCountdown
case newCountdown
// Cases used on bubble event cell
case newLocation
case time
Expand All @@ -77,9 +77,9 @@ class HILabel: UILabel {
translatesAutoresizingMaskIntoConstraints = false
if let style = style {
switch style {
case .neonCountdown:
textHIColor = \.neonCountdownText
backgroundHIColor = \.clear
case .newCountdown:
textHIColor = \.countdownTextColor
backgroundHIColor = \.countdownBackground
font = HIAppearance.Font.newCountdownText

case .location:
Expand Down
Loading
Loading