{% extends "base.html" %} {% block title %}Calendario{% endblock %} {#- One definition of what an event looks like, used in the grid cell and again in the list underneath it. Two copies of this markup would drift the first time one of them gained a field. -#} {% macro event_link(item) %} {%- if item.starts_at %} {% endif %}{{ item.title }} {%- if item.public %} público{% endif %} {% endmacro %} {% block main %}

Calendario

{% if may_edit %} Añadir evento {% endif %}
{% if public_missing %}

No se pudo leer la agenda pública del servidor de git, así que aquí abajo faltan los eventos del sitio. Los internos están todos.

{% endif %} {#- Two round controls with the month between them, rather than three runs of text in a row that cannot wrap: at 320px «← Anterior / noviembre 2026 / Siguiente →» pushed the next-month link off the right edge, which is how a month became impossible to leave. The same shape as the public agenda's bar, which has never had that problem. -#}

Ir a este mes

{# Said above the grid rather than below it, so a thumb meets it first. The grid is drawn either way: a month that draws nothing because it holds nothing looks broken, and looking broken is what it did. #} {% if not by_day %}

No hay nada en {{ label }}.

{% endif %}
    {% for week in weeks %} {% for day in week %} {# calendar.monthdayscalendar pads the first and last weeks with zeroes, which are days belonging to the neighbouring months. They keep their space — that is what puts the 1st under its own weekday — and lose only their ink. #} {% if day == 0 %} {% else %}
  1. {# `loop.index0` of this inner loop *is* the weekday, since each week is seven cells starting on Monday, so nothing has to be computed in Python. The column header says the weekday at every width now, so this copy is for a screen reader: it is what makes «22» announce itself as a Thursday. #} {{ weekdays[loop.index0] }} {{ day }} {% if by_day.get(day) %} {# A phone cell is about fifty pixels wide, which holds a number and some dots and nothing else. The dots are the link to this day's block in the list below, so the month stays a month and the titles stay readable. Above 640px they are hidden and the titles sit in the cell itself. #} {% for item in by_day.get(day)[:4] %}{% endfor %} {% endif %} {% for item in by_day.get(day, []) %}{{ event_link(item) }}{% endfor %} {% if may_edit %} {# The day is carried into the form, so adding something to the 24th starts with the 24th already filled in. #} + {% endif %}
  2. {% endif %} {% endfor %} {% endfor %}
{# Only the days that have something in them, and only on a phone — above 640px every title is already in its cell and this would say it all twice. #}
{% for day, items in by_day|dictsort %}

{{ day }} de {{ label }}

{% for item in items %}{{ event_link(item) }}{% endfor %}
{% endfor %}

Los eventos marcados público están en vienalatina.com y los ve cualquiera. Los demás sólo se ven desde aquí.

{% endblock %}