From 9b53e9f3fb0fcd98939701b3029ad6745eed164c Mon Sep 17 00:00:00 2001 From: David Arcos Date: Wed, 30 Sep 2026 00:35:52 +0200 Subject: [PATCH 01/17] Render agenda levels and legend from data, not raw HTML The agenda read three front matter fields through safeHTML: python_level and topic_level in agenda.html and event_detail.html, and legend in agenda.html. safeHTML bypasses escaping even when goldmark unsafe is off, so any merged pull request could put script into every agenda page. The site takes talk data from outside contributors, so this was a persistent cross-site scripting path. Front matter now carries tokens and the templates own the markup: - python_level and topic_level take beginner, intermediate or advanced. A new level_badge.html partial maps the token to a label and a class. An unknown token prints as escaped text and logs a build warning. - legend is a list of items: "type: ", "level: " or "separator: true". A new agenda_legend.html partial renders it. - event_types.html holds the one table of type tokens, icons and labels. event_type_icon.html renders an icon from it. This replaces the two copies of the if-else icon chain in agenda.html and event_detail.html, which had drifted: the modal was missing the "photo" type. The change also fixes two accessibility defects: - The level was given by the colour of a dot alone, which fails WCAG 1.4.1 Use of Color. The badge now shows the text label next to the dot. - The dots did not meet the 3:1 floor of WCAG 1.4.11 Non-text Contrast. A red dot on the red cell of the agenda gave 1.38:1. The badge now draws its own white background, so contrast no longer depends on the cell colour: beginner 5.1:1, intermediate 5.2:1, advanced 5.5:1. The badge border holds 3:1 or better against every cell colour. - The legend was set to "opacity: 0.7" with full opacity on hover, which cut the contrast for every reader who does not hover. Removed. - The gold star of a sponsored event gave 1.44:1 on the white page background. Darkened to #8C6900 inside the legend. Migrated every affected file in content/events: 156 HTML level values in 6 files, 19 plain text level values in pyday_bcn_2020.md, and 6 legend strings. The legend of pyday_bcn_2024.md had a copy and paste fault, a second escaped icon where the word "Beginner" belonged. The structured legend removes it. Build verified: 310 HTML pages, no warnings from the new partials. --- README.md | 37 +++++++- content/events/pydatabcn/pydatabcn_2023.md | 58 +++++++------ content/events/pyday_bcn/pyday_bcn_2020.md | 38 ++++----- content/events/pyday_bcn/pyday_bcn_2021.md | 66 +++++++------- content/events/pyday_bcn/pyday_bcn_2022.md | 56 ++++++------ content/events/pyday_bcn/pyday_bcn_2023.md | 56 ++++++------ content/events/pyday_bcn/pyday_bcn_2024.md | 56 ++++++------ content/events/pyday_bcn/pyday_bcn_2025.md | 72 +++++++++------- themes/pybcn_theme/assets/scss/agenda.scss | 85 +++++++++++++++++-- .../pybcn_theme/layouts/partials/agenda.html | 28 +----- .../layouts/partials/agenda_legend.html | 35 ++++++++ .../layouts/partials/event_detail.html | 20 +---- .../layouts/partials/event_type_icon.html | 15 ++++ .../layouts/partials/event_types.html | 24 ++++++ .../layouts/partials/level_badge.html | 26 ++++++ 15 files changed, 440 insertions(+), 232 deletions(-) create mode 100644 themes/pybcn_theme/layouts/partials/agenda_legend.html create mode 100644 themes/pybcn_theme/layouts/partials/event_type_icon.html create mode 100644 themes/pybcn_theme/layouts/partials/event_types.html create mode 100644 themes/pybcn_theme/layouts/partials/level_badge.html diff --git a/README.md b/README.md index 268ead52..3a65d01d 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,42 @@ Each event in the list can indicate: - the color of the event in the calendar: red, orange, yellow, green, blue, purple (defaults to orange) - the location where the event will take place (a room, or a url) - the topic of the event (e.g. Data Science, Security...) -- the type of the event: talk, workshop, coffee, lunch, group, qa, lightning +- the type of the event: talk, workshop, coffee, lunch, photo, group, qa, lightning +- `python_level` and `topic_level`: the experience the attendee needs. Use one + of `beginner`, `intermediate` or `advanced` + +#### Experience levels + +`python_level` and `topic_level` take a token, never markup. The site renders +each token as a badge with a coloured dot and the matching text label, so the +level does not depend on colour alone: + +| Token | Label | Dot | +|---|---|---| +| `beginner` | Beginner | green | +| `intermediate` | Intermediate | amber | +| `advanced` | Advanced | red | + +An unknown token prints as plain text and logs a build warning. The tokens and +the labels live in `themes/pybcn_theme/layouts/partials/level_badge.html`. + +#### Agenda legend + +`legend` is a list of items, not an HTML string. Each item is one of: + +``` +legend: + - type: workshop # any event type, plus "sponsor" for the gold star + label: Hands-on # optional, overrides the default label + - type: talk + - separator: true # a visual group break + - level: beginner + - level: intermediate + - level: advanced +``` + +The icons and the default labels come from +`themes/pybcn_theme/layouts/partials/event_types.html`. ``` spansDuration: 20 diff --git a/content/events/pydatabcn/pydatabcn_2023.md b/content/events/pydatabcn/pydatabcn_2023.md index 93387cdc..1eb562c2 100644 --- a/content/events/pydatabcn/pydatabcn_2023.md +++ b/content/events/pydatabcn/pydatabcn_2023.md @@ -90,7 +90,15 @@ people_sections: spansDuration: 15 numTracks: 4 eventTimes: [9:00, 9:15, 9:30, 9:45, 10:00, 10:15, 10:30, 10:45, 11:00, 11:15, 11:30, 11:45, 12:00, 12:15, 12:30, 12:45, 13:00, 13:15, 13:30, 13:45, 14:00, 14:15, 14:30, 14:45, 15:00, 15:15, 15:30, 15:45, 16:00, 16:15, 16:30, 16:45, 17:00, 17:15, 17:30, 17:45] -legend: " Workshop     Talk    |    Beginner     Intermediate     Advanced    |    Sponsored event" +legend: + - type: workshop + - type: talk + - separator: true + - level: beginner + - level: intermediate + - level: advanced + - separator: true + - type: sponsor events: - start_time_slot: 9:00 end_time_slot: 9:15 @@ -109,8 +117,8 @@ events: end_time_slot: 10:45 track_length: 1 color: orange - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner type: workshop topic: "(Maintainable) Data Science" location: Sala d'actes Ada Lovelace @@ -123,8 +131,8 @@ events: end_time_slot: 10:45 track_length: 1 color: grey - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner type: workshop topic: "Data Analysis" location: Aula Hedy Lamarr @@ -137,8 +145,8 @@ events: end_time_slot: 10:45 track_length: 1 color: grey - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate type: workshop topic: "Big Data Analysis" location: Sala Margarita Salas @@ -151,8 +159,8 @@ events: end_time_slot: 10:45 track_length: 1 color: purple - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner type: workshop topic: "Machine Learning" location: Aula Hipàtia d'Alexandria @@ -175,8 +183,8 @@ events: end_time_slot: 12:45 track_length: 1 color: grey - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner type: workshop topic: "Data Analysis" location: Sala d'actes Ada Lovelace @@ -189,8 +197,8 @@ events: end_time_slot: 12:45 track_length: 1 color: purple - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner type: workshop topic: "Deep Learning, Artificial Intelligence" location: Aula Hedy Lamarr @@ -203,8 +211,8 @@ events: end_time_slot: 12:45 track_length: 1 color: purple - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate type: workshop topic: "Machine Learning Robustness and Monitoring" location: Sala Margarita Salas @@ -217,8 +225,8 @@ events: end_time_slot: 12:45 track_length: 1 color: orange - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner type: workshop topic: "Data Engineering" location: Aula Hipàtia d'Alexandria @@ -250,8 +258,8 @@ events: end_time_slot: 15:15 track_length: 1 color: purple - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner type: workshop topic: "Artificial Intelligence" location: Sala d'actes Ada Lovelace @@ -264,8 +272,8 @@ events: end_time_slot: 15:15 track_length: 1 color: purple - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner type: workshop topic: "Machine Learning" location: Aula Hedy Lamarr @@ -278,8 +286,8 @@ events: end_time_slot: 15:15 track_length: 1 color: purple - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate type: workshop location: Sala Margarita Salas requirements: "Intermediate knowledge of Python programming, understanding of natural language processing and semantic search concepts, enthusiasm and willingness to learn and collaborate.
Technical requirements: Laptop with python >= 3.9 installed and HF’s SentenceTransformers. Nucliadb is optional, if not installed we’ll do it together during the workshop. A requirements.txt and more details will be provided prior to the event." @@ -292,8 +300,8 @@ events: end_time_slot: 15:15 track_length: 1 color: grey - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner type: workshop location: Aula Hipàtia d'Alexandria requirements: "Cal certa comoditat a l'hora de treballar amb Python, NumPy i Matplotlib. Tots els gràfics seran introduïts abans d'utilitzar-se, però és recomanable tenir coneixements bàsics d'estadística." diff --git a/content/events/pyday_bcn/pyday_bcn_2020.md b/content/events/pyday_bcn/pyday_bcn_2020.md index a7dc3698..cf0b878b 100644 --- a/content/events/pyday_bcn/pyday_bcn_2020.md +++ b/content/events/pyday_bcn/pyday_bcn_2020.md @@ -95,7 +95,7 @@ events: language: "English" speaker: "Ankit Mahato" type: talk - python_level: Beginner + python_level: beginner topic: Data Science, ML, DL location: YouTube track1 - start_time_slot: 16:45 @@ -108,7 +108,7 @@ events: language: "Spanish" speaker: "Daniel Mesejo" type: talk - python_level: Intermediate + python_level: intermediate topic: Data Science, ML, DL location: YouTube track1 - start_time_slot: 17:15 @@ -121,7 +121,7 @@ events: language: "Catalan" speaker: "Ferran Fábregas" type: lightning - python_level: Intermediate + python_level: intermediate topic: Data Science, ML, DL location: YouTube track1 - start_time_slot: 17:30 @@ -134,7 +134,7 @@ events: language: "English" speaker: "Julio Martínez" type: lightning - python_level: Intermediate + python_level: intermediate topic: Data Science, ML, DL location: YouTube track1 - start_time_slot: 17:45 @@ -147,7 +147,7 @@ events: language: "English" speaker: "Miroslav Šedivý" type: lightning - python_level: Intermediate + python_level: intermediate topic: Python programming location: YouTube track1 - start_time_slot: 18:00 @@ -160,7 +160,7 @@ events: language: "Catalan" speaker: "Carles Barrobés" type: lightning - python_level: Intermediate + python_level: intermediate topic: Python programming location: YouTube track1 @@ -174,7 +174,7 @@ events: language: "Spanish" speaker: "Elisabeth Ortega Carrasco" type: talk - python_level: Beginner + python_level: beginner topic: IOT location: YouTube track2 - start_time_slot: 16:45 @@ -187,7 +187,7 @@ events: language: "English" speaker: "Christian Adell" type: talk - python_level: Intermediate + python_level: intermediate topic: Network automation location: YouTube track2 - start_time_slot: 17:15 @@ -200,7 +200,7 @@ events: language: "English" speaker: "Christian Adell" type: lightning - python_level: Beginner + python_level: beginner topic: Python programming location: YouTube track2 - start_time_slot: 17:30 @@ -213,7 +213,7 @@ events: language: "English" speaker: "Alvaro Duran" type: lightning - python_level: Beginner + python_level: beginner topic: Python programming location: YouTube track2 - start_time_slot: 17:45 @@ -226,7 +226,7 @@ events: location: YouTube track2 topic: Web development, microservices language: "English" - python_level: Intermediate + python_level: intermediate speaker: Francesco Faraone - start_time_slot: 18:15 @@ -246,7 +246,7 @@ events: language: "English" speaker: "Eduard Cespedes Borras" type: talk - python_level: Intermediate + python_level: intermediate topic: Data Science, ML, DL location: YouTube track1 - start_time_slot: 19:00 @@ -259,7 +259,7 @@ events: language: "English" speaker: "Alberto Camara" type: talk - python_level: Intermediate + python_level: intermediate topic: Data Science, ML, DL location: YouTube track1 - start_time_slot: 19:30 @@ -272,7 +272,7 @@ events: language: "English" speaker: "Edgar Riba" type: talk - python_level: Intermediate + python_level: intermediate topic: Data Science, ML, DL location: YouTube track1 - start_time_slot: 20:00 @@ -285,7 +285,7 @@ events: language: "English" speaker: "Joan Fontanals Martinez" type: talk - python_level: Beginner + python_level: beginner topic: Data Science, ML, DL location: YouTube track1 @@ -299,7 +299,7 @@ events: language: "English" speaker: "Marc Pous" type: talk - python_level: Beginner + python_level: beginner topic: IOT location: YouTube track2 - start_time_slot: 19:00 @@ -312,7 +312,7 @@ events: language: "English" speaker: "Jose Haro Peralta" type: talk - python_level: Beginner + python_level: beginner topic: Web location: YouTube track2 - start_time_slot: 19:30 @@ -325,7 +325,7 @@ events: language: "English" speaker: "Maria Teresa Grifa" type: talk - python_level: Beginner + python_level: beginner topic: Python programming location: YouTube track2 - start_time_slot: 20:00 @@ -338,7 +338,7 @@ events: language: "English" speaker: "Gajendra Deshpande" type: talk - python_level: Beginner + python_level: beginner topic: Security location: YouTube track2 diff --git a/content/events/pyday_bcn/pyday_bcn_2021.md b/content/events/pyday_bcn/pyday_bcn_2021.md index 6f68e862..7c4048af 100644 --- a/content/events/pyday_bcn/pyday_bcn_2021.md +++ b/content/events/pyday_bcn/pyday_bcn_2021.md @@ -87,7 +87,15 @@ previous_editions: spansDuration: 15 numTracks: 4 eventTimes: [9:00, 9:15, 9:30, 9:45, 10:00, 10:15, 10:30, 10:45, 11:00, 11:15, 11:30, 11:45, 12:00, 12:15, 12:30, 12:45, 13:00, 13:15, 13:30, 13:45, 14:00, 14:15, 14:30, 14:45, 15:00, 15:15, 15:30, 15:45, 16:00, 16:15, 16:30, 16:45, 17:00, 17:15, 17:30, 17:45] -legend: " Workshop     Talk    |    Beginner     Intermediate     Advanced    |    Sponsored event" +legend: + - type: workshop + - type: talk + - separator: true + - level: beginner + - level: intermediate + - level: advanced + - separator: true + - type: sponsor events: - start_time_slot: 9:00 end_time_slot: 9:15 @@ -109,8 +117,8 @@ events: language: "Spanish" type: workshop topic: Data Apps - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner location: Room Actes - speaker: "Diego Gonzalez" sponsor: Preply @@ -123,8 +131,8 @@ events: language: "English" type: workshop topic: Web development - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate location: Room Guinardó - speaker: "Esperanza Buitrago" title: "Implementing your API with FASTAPI" @@ -136,8 +144,8 @@ events: language: "English" type: workshop topic: Software Engineering - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner location: Room Gòtica requirements: "
  • Python3
  • Visual Studio Code
  • Pip3
  • Conda
  • We'll do everything from scratch: such as installing FastAPI, uvicorn and typing
" @@ -152,8 +160,8 @@ events: language: "English" type: workshop topic: Cloud-native Python applications - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner location: Room Raval requirements: "Python 3.8+" @@ -178,8 +186,8 @@ events: language: "Spanish" type: workshop topic: User interfaces - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner location: Room Actes - speaker: "Gabriel de Maeztu" sponsor: IOMED @@ -192,8 +200,8 @@ events: language: "English" type: workshop topic: Data Science - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate location: Room Guinardó - speaker: "Vincent Choubard" sponsor: Rover @@ -206,8 +214,8 @@ events: language: "English" type: workshop topic: Web Development - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner location: Room Gòtica requirements: "Ideally have python and django installed on your machine by following https://docs.djangoproject.com/en/3.2/intro/install/" - speaker: "Antonio Molina, Erik Tordera, Pablo Fernández" @@ -221,8 +229,8 @@ events: language: "Spanish" type: workshop topic: Architecture - python_level: "" - topic_level: "" + python_level: beginner + topic_level: intermediate location: Room Raval - start_time_slot: 13:00 @@ -253,8 +261,8 @@ events: language: "Spanish" type: workshop topic: Data science - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate location: Room Actes requirements: "A browser (preferably Google Chrome)
Github account." - speaker: "Jordi Mur" @@ -268,8 +276,8 @@ events: language: "English" type: workshop topic: Data science - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner location: Room Guinardó - speaker: "Matteo Bruno" sponsor: Onna @@ -326,8 +334,8 @@ events: language: "English" type: workshop topic: IOT, ML, Edge AI - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner location: Room Actes - speaker: "Mariana Meireles, Laysa Uchoa" title: "The moons of Jupyter: widgets ecosystem" @@ -339,8 +347,8 @@ events: language: "English" type: workshop topic: Data science, scientific computing - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner location: Room Guinardó requirements: "https://github.com/jupyter-widgets/tutorial#readme

But a link to a Binder project where you can run the workshop without installing anything on your machine will also be provided. It’s recommendable to install requirements locally, though." - speaker: "Vivek Sharma" @@ -353,8 +361,8 @@ events: language: "English" type: workshop topic: Signal Processing - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner location: Room Gòtica - speaker: "Christian Adell" title: "Keeping sync between datasets with Diffsync" @@ -367,8 +375,8 @@ events: language: "English" type: workshop topic: Data set synchronisation - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner location: Room Raval - start_time_slot: 17:30 diff --git a/content/events/pyday_bcn/pyday_bcn_2022.md b/content/events/pyday_bcn/pyday_bcn_2022.md index 74dcaa62..44b4d222 100644 --- a/content/events/pyday_bcn/pyday_bcn_2022.md +++ b/content/events/pyday_bcn/pyday_bcn_2022.md @@ -124,7 +124,13 @@ eventTimes: 17:30, 17:45, ] -legend: ' Workshop     Talk    |    Beginner     Intermediate     Advanced' +legend: + - type: workshop + - type: talk + - separator: true + - level: beginner + - level: intermediate + - level: advanced events: - start_time_slot: 9:00 end_time_slot: 9:15 @@ -145,8 +151,8 @@ events: color: red type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate requirements: "
  • Laptop , requirements.txt installed.
  • VS Code IDE.
" topic: "Data Science and MLOPS" location: Sala d'actes Ada Lovelace @@ -159,8 +165,8 @@ events: color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "
  • Initial python knowledges
  • Would be great to know Django
  • Laptop with installed Docker and Docker Compose
  • " topic: "Security, software development" location: Sala Hedy Lamarr / Margarita Salas @@ -173,8 +179,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner topic: "Serverless apps" location: Sala Hipàtia d'Alexandria requirements: "Python, AWS account, AWS chalice framework" @@ -197,8 +203,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "Laptop" topic: "Internet of Things and Air quality sensors" location: Sala d'actes Ada Lovelace @@ -211,8 +217,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "
    • Familiarity with Python and basic understanding of HTML and CSS (ideally JS too, but it is not necessary)
    • Laptop with Python3, Flask, NuxtJS and Docker.
    " topic: "Web apps" location: Sala Hedy Lamarr / Margarita Salas @@ -225,8 +231,8 @@ events: color: red type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate requirements: "Laptop with conda if attendees want to follow the notebooks and do some exercises, just ears and be present otherwise." topic: "Python as a GIS" location: Sala Hipàtia d'Alexandria @@ -258,8 +264,8 @@ events: color: yellow type: workshop language: "Spanish or English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: intermediate topic: "Data engineering" location: Sala d'actes Ada Lovelace requirements: "Follow the installation steps in https://github.com/alabarga/pybcn22-modern-data-stack" @@ -272,8 +278,8 @@ events: color: blue type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner topic: "Scrapy" requirements: "Laptop" location: Sala Hedy Lamarr / Margarita Salas @@ -286,8 +292,8 @@ events: color: blue type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "Laptop" topic: "Observability" location: Sala Hipàtia d'Alexandria @@ -337,8 +343,8 @@ events: color: red type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate requirements: "This workshop is for Data scientists or developers who have math-heavy code that would like to speed up with the benefit of Numpy and Numba.

    What is required from attendees

    • - A computer with a stable internet connection (useful to look up information);
    • - Python 3.8 or above;
    • - Jupyter and Numba installed (detail about Python libraries required will be announced later);
    • - An opened mind and ready to learn something new
    " topic: "Data Science" location: Sala d'actes Ada Lovelace @@ -351,8 +357,8 @@ events: color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner topic: "Data Management" location: Sala Hedy Lamarr / Margarita Salas requirements: "For the folks who would like to follow along, a laptop with docker compose" @@ -365,8 +371,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner topic: "Test driven development " location: Sala Hipàtia d'Alexandria diff --git a/content/events/pyday_bcn/pyday_bcn_2023.md b/content/events/pyday_bcn/pyday_bcn_2023.md index 18efa9a1..437a4e94 100644 --- a/content/events/pyday_bcn/pyday_bcn_2023.md +++ b/content/events/pyday_bcn/pyday_bcn_2023.md @@ -127,7 +127,13 @@ eventTimes: 17:30, 17:45, ] -legend: ' Workshop     Talk    |    Beginner     Intermediate     Advanced' +legend: + - type: workshop + - type: talk + - separator: true + - level: beginner + - level: intermediate + - level: advanced events: - start_time_slot: 9:00 end_time_slot: 9:15 @@ -148,8 +154,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "Python, PyTorch, Jupyter, Matplotlib." topic: "Data science" location: Room B6 @@ -167,8 +173,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "To have the `qibo` package installed." topic: "Quantum Computing" location: Room B5 @@ -181,8 +187,8 @@ events: color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: intermediate topic: "Network/Infrastructure Automation" location: Room B3 requirements: "" @@ -205,8 +211,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "" topic: "Data Science" location: Room B6 @@ -219,8 +225,8 @@ events: color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate requirements: "Numpy, Scipy, Matplotlib, PyTorch, Qiskit" topic: "Quantum Computing" location: Room B5 @@ -234,8 +240,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "Laptop with latest Python version available and git installed" topic: "Python Packaging" location: Room B3 @@ -267,8 +273,8 @@ events: color: yellow type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "" topic: "Data science" location: Room B6 @@ -281,8 +287,8 @@ events: color: yellow type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate topic: "API requests" requirements: "Python 3.8 or above, VSCode or some similar IDE, FastApi and uvicorn libraries" location: Room B5 @@ -295,8 +301,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "" topic: "Documentation and blogging" location: Room B3 @@ -342,8 +348,8 @@ events: color: red type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: advanced requirements: "Python, Docker" topic: "Data Science" location: Room B6 @@ -357,8 +363,8 @@ events: color: yellow type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate requirements: "" topic: "General, Core" location: Room B5 @@ -372,8 +378,8 @@ events: color: yellow type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requeriments: "Python with pytest installed, code editor, git (for downloading the exercise)." topic: "Test driven development" location: Room B3 diff --git a/content/events/pyday_bcn/pyday_bcn_2024.md b/content/events/pyday_bcn/pyday_bcn_2024.md index cc902f4c..cedb6430 100644 --- a/content/events/pyday_bcn/pyday_bcn_2024.md +++ b/content/events/pyday_bcn/pyday_bcn_2024.md @@ -124,7 +124,13 @@ eventTimes: 17:30, 17:45, ] -legend: ' Workshop     Talk    |        Intermediate     Advanced' +legend: + - type: workshop + - type: talk + - separator: true + - level: beginner + - level: intermediate + - level: advanced events: - start_time_slot: 9:00 end_time_slot: 9:15 @@ -144,8 +150,8 @@ events: color: red type: workshop language: English - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate requirements: "numpy, scikit-learn, and keras installed" topic: "Data science, ML" location: "Sala d'actes Ada Lovelace" @@ -186,8 +192,8 @@ events: color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner topic: "Testing" location: "Sala Margarita Salas" requirements: "A Github account" @@ -242,8 +248,8 @@ During the talk, my idea is to present the tool and the technological solutions color: red type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "torch==2.0.1 torchvision==0.15.2 matplotlib==3.7.1" topic: "Artificial Intelligence" location: "Sala d'actes Ada Lovelace" @@ -258,8 +264,8 @@ During the talk, my idea is to present the tool and the technological solutions color: green type: workshop language: "Català" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "https://github.com/OriolAbril/pyday2024-xarray/blob/main/requirements.txt" topic: "Data science" location: "Aula Hipàtia d'Alexandria" @@ -280,8 +286,8 @@ During the talk, my idea is to present the tool and the technological solutions color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: intermediate requirements: "https://github.com/alexmolas/python-static-typing/blob/main/requirements.txt" topic: "Programming" location: "Aula Hedy Lamarr" @@ -294,8 +300,8 @@ During the talk, my idea is to present the tool and the technological solutions color: blue type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: intermediate requirements: "Git, Docker Desktop, Visual Studio Code" topic: "Data engineering" location: "Sala Margarita Salas" @@ -348,8 +354,8 @@ During the talk, my idea is to present the tool and the technological solutions color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: advanced + topic_level: advanced topic: "Serverless development" location: "Sala d'actes Ada Lovelace" requirements: "AWS Account" @@ -376,8 +382,8 @@ During the talk, my idea is to present the tool and the technological solutions color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate topic: "Apache Arrow, Data Science" requirements: "You will be able to find both the requirements and the Notebooks on the following repository: https://github.com/raulcd/2024-pyday-bcn-arrow-workshop" location: "Sala Margarita Salas" @@ -420,8 +426,8 @@ During the talk, my idea is to present the tool and the technological solutions color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner topic: "Data engineering" location: "Sala d'actes Ada Lovelace" requirements: "Docker, Conda" @@ -434,8 +440,8 @@ During the talk, my idea is to present the tool and the technological solutions color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "Postgres and MySQL installed locally or via Docker" topic: "Databases" location: "Aula Hipàtia d'Alexandria" @@ -450,8 +456,8 @@ During the talk, my idea is to present the tool and the technological solutions color: yellow type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner topic: "Web development, Videogames" location: "Aula Hedy Lamarr" - speaker: "Asia Noble" @@ -467,8 +473,8 @@ During the talk, my idea is to present the tool and the technological solutions color: red type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner topic: "Data science" location: "Sala Margarita Salas" requirements: "Data Science techstack: PowerBI, Python, Scikit Learn, Tensorflow. Background n the creative tech industry, management, consulting, and operations." diff --git a/content/events/pyday_bcn/pyday_bcn_2025.md b/content/events/pyday_bcn/pyday_bcn_2025.md index c7b60d84..946f0d33 100644 --- a/content/events/pyday_bcn/pyday_bcn_2025.md +++ b/content/events/pyday_bcn/pyday_bcn_2025.md @@ -153,7 +153,13 @@ eventTimes: 17:30, 17:45, ] -legend: ' Workshop     Talk    |    Beginner     Intermediate     Advanced' +legend: + - type: workshop + - type: talk + - separator: true + - level: beginner + - level: intermediate + - level: advanced events: - start_time_slot: 9:00 end_time_slot: 9:15 @@ -174,8 +180,8 @@ events: color: blue type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "Intermediate experience in Python and basic understanding of LLMs and how to use LLM APIs" topic: "LLM" location: "Sala d'actes Ada Lovelace" @@ -190,8 +196,8 @@ events: color: yellow type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: " - No prior experience with AI or machine learning - Basic familiarity with Python (variables, functions, running scripts) @@ -213,8 +219,8 @@ events: color: red type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "pip install qilisdk" topic: "Quantum Computing" location: "Sala Hedy Lamarr" @@ -231,8 +237,8 @@ events: color: orange type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate requirements: "Python environment y IDE" topic: "Testing" location: "Sala Hipàtia d'Alexandria" @@ -256,8 +262,8 @@ events: color: blue type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "Conexión a internet, cuenta de Google (para trabajar en Google Colab a través de librerías ya disponibles sin necesidad de usar consola de comandos (cmd) ni instalar Python en local." topic: "Data science, Natural Language Process, Data Visualization" location: "Sala d'actes Ada Lovelace" @@ -283,8 +289,8 @@ events: color: yellow type: workshop language: "Spanish/English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "Conexión a internet. Python 3.10+. Tener la librería \"openai\" instalada. No se necesitará una API key para el taller. Se recomienda usar un gestor de entornos como uv o virtualenv, aunque no es obligatorio. Cada participante debe tener su entorno listo. Durante el taller se utilizará \"uv\" para gestionar dependencias." topic: "LLM" location: "Sala Margarita Salas" @@ -299,8 +305,8 @@ events: color: red type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate topic: "Data Science" location: "Sala Hedy Lamarr" requirements: "Participants should bring a laptop with: @@ -325,8 +331,8 @@ events: color: orange type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "Python and DOCX" topic: "Artificial Intelligence" location: "Sala Hipàtia d'Alexandria" @@ -371,8 +377,8 @@ events: color: blue type: workshop language: "Spanish/English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "Python 3.10+ (cada participante puede decidir seguir el taller con un Jupyter Notebook, Google Colab, scripts de Python, etc). El taller se desarrollará utilizando archivos de texto de Python, pero es apto para seguirlo en un notebook también." topic: "LLM" location: "Sala d'actes Ada Lovelace" @@ -400,8 +406,8 @@ events: color: yellow type: workshop language: "Catalan" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: intermediate topic: "Computer vision" requirements: "Python" location: "Sala Margarita Salas" @@ -422,8 +428,8 @@ events: color: red type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: advanced + topic_level: advanced requirements: "python, transformers, llama-index" topic: "Agent IA" location: "Sala Hedy Lamarr" @@ -438,8 +444,8 @@ events: color: orange type: workshop language: "Catalan" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "Utilitzarem la última versió de la llibreria bambi durant el taller. Es recomana tenir un virtual environment amb la llibreria ja instal·lada si es vol seguir el taller en directe. El taller també assumeix un nivell intermedi en l'ús de NumPy i Pandas." topic: "Statistics and Data Science" location: "Sala Hipàtia d'Alexandria" @@ -463,8 +469,8 @@ events: color: blue type: workshop language: "Spanish" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "Portátil y acceso a internet, para poder clonar el repositorio y seguir las instrucciones." topic: "IA Generativa" location: "Sala d'actes Ada Lovelace" @@ -483,8 +489,8 @@ events: color: yellow type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: beginner + topic_level: beginner requirements: "" topic: "" location: "Sala Margarita Salas" @@ -499,8 +505,8 @@ events: color: red type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner topic: "Web development" location: "Sala Hedy Lamarr" repositories: "https://github.com/ericmassip/carbon-home-watcher" @@ -514,8 +520,8 @@ events: color: orange type: workshop language: "English" - python_level: "" - topic_level: "" + python_level: intermediate + topic_level: beginner requirements: "Notebook and basic python knowledge" topic: "Causal Inference & Data Science" location: "Sala Hipàtia d'Alexandria" diff --git a/themes/pybcn_theme/assets/scss/agenda.scss b/themes/pybcn_theme/assets/scss/agenda.scss index 3fe5d249..d4e639ea 100644 --- a/themes/pybcn_theme/assets/scss/agenda.scss +++ b/themes/pybcn_theme/assets/scss/agenda.scss @@ -146,18 +146,85 @@ $blockTimes15: 700,715,730,745,800,815,830,845,900,915,930,945,1000,1015,1030,10 } +/** + * Agenda legend. + * + * Built by the agenda_legend.html partial from structured front matter. + * It used to be a raw HTML blob, so the old "opacity: 0.7, full opacity on + * hover" trick cut the text contrast for every reader who never hovers. + * The text is now at full opacity. + */ .legend { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + gap: 0.4rem 1.1rem; + list-style: none; + padding: 0; + margin: 0 5px 25px 0; font-size: 0.9em; - opacity: 0.7; - text-align: right; - margin-bottom: 25px; - margin-right: 5px; - &:hover { - opacity: 1; + + li { + display: flex; + align-items: baseline; + gap: 0.35em; + } + + .legend_separator { + width: 1px; + align-self: stretch; + min-height: 1em; + background-color: #767676; + margin: 0 0.4rem; + } + + /* The gold of the agenda star is too light on a white page. */ + .fa-star.gold { + color: #8C6900; } } -i.green { color: #6CC417 } -i.yellow{ color: #FFFF33 } -i.red { color: red } +/** + * Experience level badge. + * + * Emitted by the level_badge.html partial. The text label carries the + * meaning, the dot is a redundant cue (WCAG 1.4.1 Use of Color). + * + * The badge draws its own light background, so dot contrast does not depend + * on the colour of the agenda cell behind it. Contrast of each dot against + * the #FFFFFF badge, against the 3:1 floor of WCAG 1.4.11 Non-text Contrast: + * beginner #2E7D32 5.1:1 + * intermediate #A15C00 5.2:1 + * advanced #CE1836 5.5:1 + * The #404040 border keeps the badge outline at 3:1 or better against every + * cell colour, the lightest of which is the #FF7900 orange at 3.9:1. + * + * The second selector repeats the first so that it outranks + * ".scheduleContainer .event span", which sets display block and width 100%. + */ +.level_badge, +.scheduleContainer .event .level_badge { + display: inline-flex; + align-items: baseline; + gap: 0.35em; + width: auto; + padding: 0 0.5em; + border: 1px solid #404040; + border-radius: 0.8em; + background-color: #FFFFFF; + color: #1F1F1F; + font-weight: 600; + white-space: nowrap; + vertical-align: baseline; + + i { + font-size: 0.7em; + } + + &.level_beginner i { color: #2E7D32; } + &.level_intermediate i { color: #A15C00; } + &.level_advanced i { color: #CE1836; } +} + i.gold { color: #FFD700 } diff --git a/themes/pybcn_theme/layouts/partials/agenda.html b/themes/pybcn_theme/layouts/partials/agenda.html index 48597675..fd322625 100644 --- a/themes/pybcn_theme/layouts/partials/agenda.html +++ b/themes/pybcn_theme/layouts/partials/agenda.html @@ -20,11 +20,7 @@ -{{ if .legend }} -
    - {{ .legend | safeHTML }} -
    -{{ end }} +{{ partial "agenda_legend.html" .legend }}
    @@ -43,23 +39,7 @@

    - {{ if eq $event.type "talk" }} - - {{ else if eq $event.type "coffee" }} - - {{ else if eq $event.type "lunch" }} - - {{ else if eq $event.type "photo" }} - - {{ else if eq $event.type "workshop" }} - - {{ else if eq $event.type "group" }} - - {{ else if eq $event.type "qa" }} - - {{ else if eq $event.type "lightning" }} - - {{ end }} + {{ partial "event_type_icon.html" $event.type }} {{ if $event.description }} @@ -97,10 +77,10 @@

    Topic: {{ . }} {{ end }} {{ with $event.python_level }} - Python level: {{ . | safeHTML }} + Python level: {{ partial "level_badge.html" . }} {{ end }} {{ with $event.topic_level }} - Topic level: {{ . | safeHTML }} + Topic level: {{ partial "level_badge.html" . }} {{ end }} {{ with $event.video }} Video diff --git a/themes/pybcn_theme/layouts/partials/agenda_legend.html b/themes/pybcn_theme/layouts/partials/agenda_legend.html new file mode 100644 index 00000000..708a5da8 --- /dev/null +++ b/themes/pybcn_theme/layouts/partials/agenda_legend.html @@ -0,0 +1,35 @@ +{{- /* + agenda_legend: render the agenda legend from structured front matter. + + Context: the "legend" list of an event page. Each item is one of: + - type: an entry type from event_types.html + label: optional. Overrides the default label + - level: beginner, intermediate or advanced + - separator: true a visual group break, hidden from screen readers + + The legend used to be one raw HTML string rendered with safeHTML, which + let any merged pull request inject script into every agenda page. Front + matter now carries tokens only, and this partial owns the markup. +*/ -}} +{{- $types := partialCached "event_types.html" "event_types" -}} +{{- with . }} +
      + {{- range . }} + {{- if .separator }} + + {{- else if .level }} +
    • {{ partial "level_badge.html" .level }}
    • + {{- else if .type }} + {{- $token := lower (trim (printf "%v" .type) " ") -}} + {{- $entry := index $types $token -}} + {{- if $entry }} +
    • {{ partial "event_type_icon.html" $token }} {{ default $entry.label .label }}
    • + {{- else }} + {{- warnf "agenda_legend: unknown legend type %q." $token -}} + {{- end }} + {{- else }} + {{- warnf "agenda_legend: legend item needs one of type, level or separator. Got %v." . -}} + {{- end }} + {{- end }} +
    +{{- end -}} diff --git a/themes/pybcn_theme/layouts/partials/event_detail.html b/themes/pybcn_theme/layouts/partials/event_detail.html index 346faf94..7c1e46ed 100644 --- a/themes/pybcn_theme/layouts/partials/event_detail.html +++ b/themes/pybcn_theme/layouts/partials/event_detail.html @@ -8,21 +8,7 @@ @@ -53,10 +39,10 @@