Skip to content

Commit

Permalink
check lower case company names and fix background logic
Browse files Browse the repository at this point in the history
  • Loading branch information
14ROVI committed Dec 21, 2022
1 parent 413e2c2 commit b3647cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit b3647cb

Please sign in to comment.