{% extends "aircox/page_list.html" %}
{% load i18n %}

{% block head_title %}{{ station.name }}{% endblock %}

{% block title %}
{% if not page or not page.title %}{{ station.name }}
{% else %}{{ block.super }}
{% endif %}
{% endblock %}


{% block pages_list %}
{% if page and page.content %}<hr/>{% endif %}
<div class="columns">
    {% with render_card=True %}
    {% for object in top_diffs %}
    {% with is_primary=object.is_now %}
    <div class="column is-relative">
        <h4 class="card-super-title" title="{{ object.start }}">
            {% if is_primary %}
            <span class="fas fa-play"></span>
            <time datetime="{{ object.start }}">
                {% trans "Currently" %}
                {% else %}{{ object.start|date:"H:i" }}{% endif %}
            </time>

            {% if object.episode.category %}
            // {{ object.episode.category.title }}
            {% endif %}
        </h4>
        {% include object.item_template_name %}
    </div>
    {% endwith %}
    {% endfor %}
    {% endwith %}
</div>

<hr>
<h4 class="title is-4">{% trans "Last publications" %}</h4>
{% with has_headline=True %}
{{ block.super }}
{% endwith %}
{% endblock %}


{% block pagination %}
<ul class="pagination-list">
    <li>
        <a href="{% url "page-list" %}" class="pagination-link"
            aria-label="{% trans "Show all publication" %}">
            {% trans "More publications..." %}
        </a>
    </li>
</ul>
{% endblock %}


{% block sidebar %}
<section>
    <h4 class="title is-4">{% trans "Previously on air" %}</h4>
    {% with logs as object_list %}
    {% include "aircox/widgets/log_list.html" %}
    {% endwith %}
</section>

<section>
    <h4 class="title is-4">{% trans "Today" %}</h4>
    {% with is_thin=True %}
    {% with hide_schedule=True %}
    {% with has_headline=False %}
    <table class="table is-fullwidth has-background-transparent">
    {% for object in sidebar_object_list %}
    <tr {% if object.is_now %}class="is-selected"{% endif %}>
        <td>{{ object.start|date:"H:i" }}</td>
        <td>{% include "aircox/widgets/diffusion_item.html" %}</td>
    </tr>
    {% endfor %}
    </table>
    {% endwith %}
    {% endwith %}
    {% endwith %}
</section>
{% endblock %}


