From b3647cb5a2ee4ac4de192ce52c159f20c8bc3aa4 Mon Sep 17 00:00:00 2001 From: 14ROVI <29734170+14ROVI@users.noreply.github.com> Date: Wed, 21 Dec 2022 00:28:35 +0000 Subject: [PATCH] check lower case company names and fix background logic --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 2c89a7e..676b4fc 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,7 @@ async function loadCompanies() { function findCompany(companyName) { for (let company of companies) - if (company.attributes.name === companyName) + if (company.attributes.name.toLowerCase() === companyName.toLowerCase()) return company; return { @@ -124,7 +124,7 @@ function displayEvent(event) { let locationElement = document.getElementById("location"); const kioskDefault = { - background: "https://cssbristol.co.uk/assets/images/contrib/events/" + event.attributes.banner || "assets/default_background.png", + background: event.attributes.banner ? "https://cssbristol.co.uk/assets/images/contrib/events/" + event.attributes.banner : "default_background.png", short_description: event.body.substring(0, 150) + "..." || "", kiosk_title: event.attributes.title || "", show_sponsors: true, @@ -141,6 +141,7 @@ function displayEvent(event) { let logoURL = "https://cssbristol.co.uk/assets/images/contrib/companies/" + company.attributes.logo; let sponsorElement = document.createElement("img"); + sponsorElement.classList.add("bg-check-target"); sponsorElement.src = logoURL; sponsorsContainer.appendChild(sponsorElement);