diff --git a/Resources/Views/CFP/index.leaf b/Resources/Views/CFP/index.leaf index 5dbfbf1d..7a1ac41c 100644 --- a/Resources/Views/CFP/index.leaf +++ b/Resources/Views/CFP/index.leaf @@ -1,6 +1,8 @@ #extend("base"): #export("title", "Call for Papers") - + #export("description"):Submit your talk proposal for #(event.name). We welcome speakers of all experience levels to share their knowledge.#endexport + #export("path", "/cfp") + #export("content"): #extend("Shared/_header") diff --git a/Resources/Views/Home/home.leaf b/Resources/Views/Home/home.leaf index 55b6aee2..71425b1d 100644 --- a/Resources/Views/Home/home.leaf +++ b/Resources/Views/Home/home.leaf @@ -1,6 +1,8 @@ #extend("base"): #export("title", event.event) - + #export("description"):#if(event.event == "KotlinLeeds"):KotlinLeeds is a unique Android and Kotlin conference held in the heart of Leeds, UK. Join us for talks, workshops, and networking.#else:SwiftLeeds is a unique iOS and Swift conference held in the heart of Leeds, UK. Join us for talks, workshops, and networking.#endif#endexport + #export("path", "/") + #export("content"): #extend("Shared/_header") @@ -48,4 +50,63 @@ #extend("Home/_ticket_cta") #endif #endexport + + #export("scripts"): + + + #if(event.date): + + #endif + #endexport #endextend diff --git a/Resources/Views/Schedule/index.leaf b/Resources/Views/Schedule/index.leaf index 4997da33..48aefdd0 100644 --- a/Resources/Views/Schedule/index.leaf +++ b/Resources/Views/Schedule/index.leaf @@ -1,6 +1,8 @@ #extend("base"): #export("title", "Schedule") - + #export("description"):View the full schedule for #(event.name) including talks, workshops, and activities.#endexport + #export("path", "/schedule") + #export("content"): #extend("Shared/_header") #extend("Home/_hero") diff --git a/Resources/Views/Secondary/conduct.leaf b/Resources/Views/Secondary/conduct.leaf index e440f182..31ecf2a2 100644 --- a/Resources/Views/Secondary/conduct.leaf +++ b/Resources/Views/Secondary/conduct.leaf @@ -1,5 +1,7 @@ #extend("base"): - #export("title", event.event) + #export("title", "Code of Conduct") + #export("description"):#(event.event) is committed to providing a safe and welcoming conference environment for all attendees, speakers, sponsors, and volunteers.#endexport + #export("path", "/conduct") #export("content"): #extend("Shared/_header") diff --git a/Resources/Views/Team/index.leaf b/Resources/Views/Team/index.leaf index 35e32229..e1ab8a25 100644 --- a/Resources/Views/Team/index.leaf +++ b/Resources/Views/Team/index.leaf @@ -1,6 +1,8 @@ #extend("base"): #export("title", "Team") - + #export("description"):Meet the volunteer team behind #(event.event) who organise the UK's unique #if(event.event == "KotlinLeeds"):Android and Kotlin#else:iOS and Swift#endif conference.#endexport + #export("path", "/team") + #export("content"): #extend("Shared/_header") #extend("Team/_team") diff --git a/Resources/Views/base.leaf b/Resources/Views/base.leaf index 3a710c91..50213d02 100644 --- a/Resources/Views/base.leaf +++ b/Resources/Views/base.leaf @@ -4,12 +4,28 @@ - + + #if(event.event == "SwiftLeeds"): #endif - - + + + + + + + + + + + + + + + + + @@ -54,7 +70,7 @@ #extend("Shared/_footer") #endif - + #if(!error): diff --git a/Sources/App/Context/HomeContext.swift b/Sources/App/Context/HomeContext.swift index 79afa5de..abed4701 100644 --- a/Sources/App/Context/HomeContext.swift +++ b/Sources/App/Context/HomeContext.swift @@ -26,22 +26,24 @@ struct EventContext: Codable { let event: String // SwiftLeeds let year: String // 2024 let conference: String - + let domain: String // swiftleeds.co.uk or kotlinleeds.co.uk + let date: Date? let dateFormatted: String? // 7-10 OCT - + let location: String - + let isCurrent: Bool let isFuture: Bool let isPast: Bool let isHidden: Bool - + init(event: Event) { name = event.name self.event = event.name.components(separatedBy: " ").first ?? "SwiftLeeds" year = event.name.components(separatedBy: " ").last ?? "" conference = event.conference + domain = event.conference == "kotlinleeds" ? "kotlinleeds.co.uk" : "swiftleeds.co.uk" // This is a total hack, but means if we set the date of an event to something earlier than 2015 then the event is hidden. // This prevents people accessing that year, useful for development and preparing. diff --git a/Sources/App/Features/Home/HomeRouteController.swift b/Sources/App/Features/Home/HomeRouteController.swift index c4b36fd1..69cb4031 100644 --- a/Sources/App/Features/Home/HomeRouteController.swift +++ b/Sources/App/Features/Home/HomeRouteController.swift @@ -224,14 +224,17 @@ struct Phase { struct PhaseContext: Codable { let ticketsEnabled: Bool let currentTicketPrice: String + let currentTicketPriceValue: String let showAddToCalendar: Bool let showSchedule: Bool let titoStub: String? - + init(phase: Phase, event: Event) { ticketsEnabled = phase.showTickets titoStub = event.titoEvent - currentTicketPrice = event.conference == "kotlinleeds" ? "£140" : "£180" // TODO: need to load from tito + let priceValue = event.conference == "kotlinleeds" ? "140" : "180" // TODO: need to load from tito + currentTicketPriceValue = priceValue + currentTicketPrice = "£\(priceValue)" showAddToCalendar = event.isCurrent && event.date.timeIntervalSince1970 > 1420074000 // TODO: make date optional in db and do nil check here showSchedule = phase.showSchedule }