{% extends 'base.html' %} {% block title %}Kalendarz | pdlzbs{% endblock %}
<!---->
{% load static tailwind_tags wysiwyg %} {% block content %}
<!---->

{% if calendars %}

<ul class="flex justify-center gap-4">
  {% for calendar in calendars %}
  <li>
    <a
      href="{% url 'calendar' %}#{{ calendar.year }}"
      class="button py-2 active:ring-2 {% if forloop.counter0|divisibleby:2 %} sky color {% else %} green color {% endif %}"
    >
      {{ calendar.year }}
    </a>
  </li>
  {% endfor %}
</ul>
{% endif %}

<div class="flex flex-col items-center">
  {% for calendar in calendars %}
  <div class="w-full">
    <span
      class="peer absolute top-0 inset-x-0 float-right"
      id="{{ calendar.year }}"
    ></span>
    <article class="w-full py-4 hidden peer-target:block">
      {% content calendar %}
      <div class="flex flex-wrap gap-4 items-center justify-center">
        {% buttons calendar.buttons %}
      </div>
    </article>
  </div>
  {% empty %}
  <span class="py-4 text-xl">Brak kalendarzy</span>
  {% endfor %}
</div>
{% endblock %}
