forked from rc/aircox
cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: rc/aircox#131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
This commit is contained in:
@ -1,85 +1,74 @@
|
||||
{% extends "aircox/page_list.html" %}
|
||||
{% comment %}Home page{% endcomment %}
|
||||
{% load i18n %}
|
||||
{% extends "./public.html" %}
|
||||
{% load i18n aircox %}
|
||||
|
||||
|
||||
{% block head_title %}{{ station.name }}{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if not page or not page.title %}{{ station.name }}
|
||||
{% else %}{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block title %}{% if page %}{{ block.super }}{% endif %}{% endblock %}
|
||||
|
||||
{% block before_list %}{% endblock %}
|
||||
|
||||
{% block pages_list %}
|
||||
{% if page and page.content %}<hr/>{% endif %}
|
||||
{% block breadcrumbs-container %}{% endblock %}
|
||||
|
||||
{% block content-container %}
|
||||
{{ block.super }}
|
||||
|
||||
{% if next_diffs %}
|
||||
<div class="columns">
|
||||
{% with render_card=True %}
|
||||
{% for object in next_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 }}">
|
||||
{% translate "Currently" %}
|
||||
</time>
|
||||
{% else %}
|
||||
{{ object.start|date:"H:i" }}
|
||||
{% endif %}
|
||||
<section class="container">
|
||||
<h2 class="title">
|
||||
{% with station.name as station %}
|
||||
{% blocktrans %}Today on {{ station }}{% endblocktrans %}
|
||||
{% endwith %}
|
||||
</h2>
|
||||
|
||||
{% if object.episode.category %}
|
||||
// {{ object.episode.category.title }}
|
||||
{% endif %}
|
||||
</h4>
|
||||
{% include object.item_template_name %}
|
||||
<div class="mb-3">
|
||||
{% with next_diffs.0 as obj %}
|
||||
{% page_widget "wide" obj.episode diffusion=obj timetable=True %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if object_list %}
|
||||
<h4 class="title is-4">{% translate "Today" %}</h4>
|
||||
<section role="list">
|
||||
{% include 'aircox/widgets/diffusion_list.html' %}
|
||||
<hr/>
|
||||
|
||||
<a-carousel section-class="card-grid">
|
||||
{% for obj in next_diffs|slice:"1:" %}
|
||||
{% if object != diffusion %}
|
||||
{% page_widget "card" obj.episode diffusion=obj timetable=True %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</a-carousel>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block pagination %}
|
||||
<ul class="pagination-list">
|
||||
<li>
|
||||
<a href="{% url "page-list" %}" class="pagination-link"
|
||||
aria-label="{% translate "Show all publication" %}">
|
||||
{% translate "More publications..." %}
|
||||
{% if logs %}
|
||||
<section class="container">
|
||||
<h2 class="title">{% translate "It just happened" %}</h2>
|
||||
|
||||
<div class="grid" role="list">
|
||||
{% include "./widgets/logs.html" with object_list=logs %}
|
||||
</div>
|
||||
|
||||
<nav class="nav-urls">
|
||||
<a href="{% url "timetable-list" %}"
|
||||
aria-label="{% translate "Show all program's for today" %}">
|
||||
{% translate "Today" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if podcasts %}
|
||||
<section class="container">
|
||||
<h2 class="title is-3 p-2">{% translate "Last podcasts" %}</h2>
|
||||
{% include "./widgets/carousel.html" with objects=podcasts url_name="podcast-list" url_label=_("All podcasts") %}
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if publications %}
|
||||
<section class="container">
|
||||
<h2 class="title">{% translate "Last publications" %}</h2>
|
||||
{% include "./widgets/carousel.html" with objects=publications url_name="page-list" url_label=_("All publications") %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block sidebar %}
|
||||
<section>
|
||||
<h4 class="title is-4">{% translate "Previously on air" %}</h4>
|
||||
{% with has_cover=False %}
|
||||
{% with logs as object_list %}
|
||||
{% include "aircox/widgets/log_list.html" %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="title is-4">{% translate "Last publications" %}</h4>
|
||||
{% with hide_schedule=True %}
|
||||
{% with has_headline=False %}
|
||||
{% for object in last_publications %}
|
||||
{% include object.item_template_name|default:'aircox/widgets/page_item.html' %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% block pages_list %}{% endblock %}
|
||||
|
Reference in New Issue
Block a user