From 3835e843238026bc5d0ad04a556296d2e838c4d9 Mon Sep 17 00:00:00 2001 From: adamrushy Date: Sat, 14 Feb 2026 20:51:31 +0000 Subject: [PATCH 1/2] Add site descriptions and OG/X details for better sharing --- Resources/Views/CFP/index.leaf | 4 +- Resources/Views/Home/home.leaf | 63 +++++++++++++++++++++++++- Resources/Views/Schedule/index.leaf | 4 +- Resources/Views/Secondary/conduct.leaf | 4 +- Resources/Views/Team/index.leaf | 4 +- Resources/Views/base.leaf | 22 +++++++-- 6 files changed, 93 insertions(+), 8 deletions(-) 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..52ba517d 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..0b6b7454 100644 --- a/Resources/Views/base.leaf +++ b/Resources/Views/base.leaf @@ -4,12 +4,28 @@ - + + #if(event.event == "SwiftLeeds"): #endif - - + + + + + + + + + + + + + + + + + From f7ebd75a294b2060bcb9d3bfe1ced3fabbb3ffdf Mon Sep 17 00:00:00 2001 From: adamrushy Date: Mon, 16 Feb 2026 13:54:11 +0000 Subject: [PATCH 2/2] Move domain to context and use pricing from context --- Resources/Views/Home/home.leaf | 12 ++++++------ Resources/Views/base.leaf | 10 +++++----- Sources/App/Context/HomeContext.swift | 10 ++++++---- Sources/App/Features/Home/HomeRouteController.swift | 7 +++++-- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Resources/Views/Home/home.leaf b/Resources/Views/Home/home.leaf index 52ba517d..71425b1d 100644 --- a/Resources/Views/Home/home.leaf +++ b/Resources/Views/Home/home.leaf @@ -58,8 +58,8 @@ "@context": "https://schema.org", "@type": "Organization", "name": "#(event.event)", - "url": "https://#if(event.event == "KotlinLeeds"):kotlinleeds.co.uk#else:swiftleeds.co.uk#endif", - "logo": "https://#if(event.event == "KotlinLeeds"):kotlinleeds.co.uk#else:swiftleeds.co.uk#endif/img/logo.png", + "url": "https://#(event.domain)", + "logo": "https://#(event.domain)/img/logo.png", "sameAs": [ #if(event.event == "KotlinLeeds"): "https://twitter.com/KotlinLeeds" @@ -90,17 +90,17 @@ "addressCountry": "GB" } }, - "image": "https://#if(event.event == "KotlinLeeds"):kotlinleeds.co.uk#else:swiftleeds.co.uk#endif/img/logo.png", + "image": "https://#(event.domain)/img/logo.png", "organizer": { "@type": "Organization", "name": "#(event.event)", - "url": "https://#if(event.event == "KotlinLeeds"):kotlinleeds.co.uk#else:swiftleeds.co.uk#endif" + "url": "https://#(event.domain)" } #if(phase.ticketsEnabled): ,"offers": { "@type": "Offer", - "url": "https://#if(event.event == "KotlinLeeds"):kotlinleeds.co.uk#else:swiftleeds.co.uk#endif", - "price": "#if(event.event == "KotlinLeeds"):140#else:180#endif", + "url": "https://#(event.domain)", + "price": "#(phase.currentTicketPriceValue)", "priceCurrency": "GBP", "availability": "https://schema.org/InStock" } diff --git a/Resources/Views/base.leaf b/Resources/Views/base.leaf index 0b6b7454..50213d02 100644 --- a/Resources/Views/base.leaf +++ b/Resources/Views/base.leaf @@ -14,18 +14,18 @@ - - + + - + - + @@ -70,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 }