EuroPython / website

Repository for the EuroPython 2022+ website.
https://europython.eu
23 stars 64 forks source link

Conference schedule enhancements #348

Open danidorbek opened 1 year ago

danidorbek commented 1 year ago

I would suggest to enhance conference schedule by:

  1. add option to download iCal (or common calendar format) calendar files which can be stored in attendees mobile devices
  2. add option for registered users to personalise schedule and select tracks into your personal list... to ease up planning of attendance.

This would actually help organisers to see potential interest on topics (how crowded rooms might be) and attendees would see if they have selected all tracks they are interested. In addition there is no reason to have schedule on paper - save money on printing and save nature by not generating additional waste.

patrick91 commented 1 year ago

add option to download iCal (or common calendar format) calendar files which can be stored in attendees mobile devices

would you want the ical for all the sessions?

danidorbek commented 1 year ago

Hi, i already entered into my calendar those sessions that im interested in. It was enhancement idea for future so that anyone could download the ones only that they are interested.

Br Dani

On Thu, 13. Jul 2023 at 13:05, Patrick Arminio @.***> wrote:

add option to download iCal (or common calendar format) calendar files which can be stored in attendees mobile devices

would you want the ical for all the sessions?

— Reply to this email directly, view it on GitHub https://github.com/EuroPython/website/issues/348#issuecomment-1634047272, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH4JLFFDYC3XMPIKPLOYGOTXP7I5ZANCNFSM6AAAAAAZXDJ7R4 . You are receiving this because you authored the thread.Message ID: @.***>

The-Compiler commented 1 year ago

I'm a bit late now I suppose, but this is already available from the Pretalx backend behind it: https://program.europython.eu/europython-2023/schedule/export/schedule.ics

gbdlin commented 11 months ago

Here is my very nasty and very hacky code I wrote myself to just paste in the browser console to have the functionality from 2.

I don't know if it helps at all, as it is not really using all the frameworks and stuff the website is built with, but maybe it'll work as an inspiration:

function getFavTalks() {
  let data = localStorage.getItem("favTalks");
  if (data === null) {
    return new Set();
  }
  return new Set(JSON.parse(data));
}

function setFavTalks(talks) {
  let data = JSON.stringify(Array.from(talks));
  localStorage.setItem("favTalks", data);
}

function appendFavTalk(talk) {
  let talks = getFavTalks();
  talks.add(talk);
  setFavTalks(talks);
  return talks;
}

function deleteFavTalk(talk) {
  let talks = getFavTalks();
  talks.delete(talk);
  setFavTalks(talks);
  return talks;
}

let favTalks = getFavTalks();

document.querySelectorAll('a[href^="/session/"]').forEach(function(el) {
  let talk = el.getAttribute("href");
  let parent = el.parentElement;
  let input = document.createElement("input");
  input.setAttribute("type", "checkbox");
  if (favTalks.has(talk)) {
      input.setAttribute("checked", true);
      el.parentElement.style.backgroundColor = "#99dd99";
  }
  input.addEventListener("change", (ev) => {
    if (ev.currentTarget.checked) {
      appendFavTalk(talk);
      favTalks.add(talk);
      el.parentElement.style.backgroundColor = "#99dd99";
    } else {
      deleteFavTalk(talk);
      favTalks.delete(talk);
      el.parentElement.style.backgroundColor = "#99dd99";
    }
  });
  input.style.position = "absolute";
  input.style.top = "43px";
  input.style.right = "10px";
  el.after(input);
})

It just saves selection in the session storage.