Skip to content
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
4 changes: 3 additions & 1 deletion Resources/Views/CFP/index.leaf
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
63 changes: 62 additions & 1 deletion Resources/Views/Home/home.leaf
Original file line number Diff line number Diff line change
@@ -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")

Expand Down Expand Up @@ -48,4 +50,63 @@
#extend("Home/_ticket_cta")
#endif
#endexport

#export("scripts"):
<!-- JSON-LD Structured Data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "#(event.event)",
"url": "https://#(event.domain)",
"logo": "https://#(event.domain)/img/logo.png",
"sameAs": [
#if(event.event == "KotlinLeeds"):
"https://twitter.com/KotlinLeeds"
#else:
"https://twitter.com/swift_leeds",
"https://iosdev.space/@swiftleeds",
"https://www.youtube.com/channel/UCCq1K0eWKZFBCpqaC3n8V1g"
#endif
]
}
</script>
#if(event.date):
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Event",
"name": "#(event.name)",
"description": "#if(event.event == "KotlinLeeds"):A unique Android and Kotlin conference held in the heart of Leeds, UK.#else:A unique iOS and Swift conference held in the heart of Leeds, UK.#endif",
"startDate": "#date(event.date, "yyyy-MM-dd")",
"eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
"eventStatus": "https://schema.org/EventScheduled",
"location": {
"@type": "Place",
"name": "#(event.location)",
"address": {
"@type": "PostalAddress",
"addressLocality": "Leeds",
"addressCountry": "GB"
}
},
"image": "https://#(event.domain)/img/logo.png",
"organizer": {
"@type": "Organization",
"name": "#(event.event)",
"url": "https://#(event.domain)"
}
#if(phase.ticketsEnabled):
,"offers": {
"@type": "Offer",
"url": "https://#(event.domain)",
"price": "#(phase.currentTicketPriceValue)",
"priceCurrency": "GBP",
"availability": "https://schema.org/InStock"
}
#endif
}
</script>
#endif
#endexport
#endextend
4 changes: 3 additions & 1 deletion Resources/Views/Schedule/index.leaf
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
4 changes: 3 additions & 1 deletion Resources/Views/Secondary/conduct.leaf
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
4 changes: 3 additions & 1 deletion Resources/Views/Team/index.leaf
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
24 changes: 20 additions & 4 deletions Resources/Views/base.leaf
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,28 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta name="author" content="#(event.event)"/>

<meta name="description" content="#import("description")"/>

#if(event.event == "SwiftLeeds"):
<meta name="apple-itunes-app" content="app-id=1595490143, app-clip-bundle-id=uk.co.swiftleeds.SwiftLeeds.Clip, app-clip-display=card"/>
#endif

<meta property="og:image" content="/img/logo.png" />

<!-- Open Graph -->
<meta property="og:title" content="#import("title") - #(event.event)"/>
<meta property="og:description" content="#import("description")"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://#(event.domain)#import("path")"/>
<meta property="og:image" content="https://#(event.domain)/img/logo.png"/>

<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="#if(event.event == "KotlinLeeds"):@KotlinLeeds#else:@swift_leeds#endif"/>
<meta name="twitter:title" content="#import("title") - #(event.event)"/>
<meta name="twitter:description" content="#import("description")"/>
<meta name="twitter:image" content="https://#(event.domain)/img/logo.png"/>

<!-- Canonical URL -->
<link rel="canonical" href="https://#(event.domain)#import("path")"/>

<link rel="stylesheet" media="screen" href="/vendor/boxicons/css/boxicons.min.css"/>
<link rel="stylesheet" media="screen" href="/vendor/swiper/swiper-bundle.min.css"/>
Expand Down Expand Up @@ -54,7 +70,7 @@
#extend("Shared/_footer")
#endif

<script defer data-domain="#if(event.event == "KotlinLeeds"):kotlinleeds.co.uk#else:swiftleeds.co.uk#endif" src="https://plausible.io/js/plausible.js"></script>
<script defer data-domain="#(event.domain)" src="https://plausible.io/js/plausible.js"></script>

#if(!error):
<!-- Back to top button -->
Expand Down
10 changes: 6 additions & 4 deletions Sources/App/Context/HomeContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 5 additions & 2 deletions Sources/App/Features/Home/HomeRouteController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down