bkp before branching

This commit is contained in:
bkfox
2019-07-23 23:04:35 +02:00
parent 3e432c42b0
commit 6ed33c34a9
17 changed files with 330 additions and 392 deletions

View File

@ -1,17 +0,0 @@
{% extends "aircox_web/page.html" %}
{% block main %}
<section class="is-inline-block">
<img class="cover" src="{{ page.cover.url }}"/>
{% block headline %}
{{ page.headline }}
{% endblock %}
{% block content %}
{{ regions.main }}
{% endblock %}
</section>
{% endblock %}

View File

@ -3,6 +3,7 @@
Context variables:
- object: the actual diffusion
- page: current parent page in which item is rendered
- hide_schedule: if True, do not display start time
{% endcomment %}
{% with page as context_page %}
@ -10,29 +11,41 @@ Context variables:
{% diffusion_page object as page %}
<article class="media">
<div class="media-left">
<figure class="image is-64x64">
<img src="{% thumbnail page.cover|default:site.logo 128x128 crop=scale %}">
</figure>
<img src="{% thumbnail page.cover|default:site.logo 128x128 crop=scale %}">
</div>
<div class="media-content">
<div class="content">
<p>
{% if page and context_page != page %}
<strong><a href="{{ page.path }}">{{ page.title }}</a></strong>
{% else %}
<strong>{{ page.title|default:program.name }}</strong>
{% endif %}
{% if object.page is page %}
&mdash; <a href="{{ program.page.path }}">{{ program.name }}</a></small>
{% endif %}
{% if object.initial %}
{% with object.initial.date as date %}
<span class="tag is-info" title="{% blocktrans %}Rerun of {{ date }}{% endblocktrans %}">
{% trans "rerun" %}
</span>
{% endwith %}
{% endif %}
<br>
<div>
<h4 class="subtitle is-size-4 is-inline-block">
{% if page and context_page != page %}
<a href="{{ page.path }}">{{ page.title }}</a>
{% else %}
{{ page.title|default:program.name }}
{% endif %}
</h4>
<span class="has-text-weight-normal">
{% if object.page is page and context_page != program.page %}
&mdash; <a href="{% url "program-page" slug=program.page.slug %}">{{ program.page.title }}</a>
{% endif %}
{% if not hide_schedule %}
<time datetime="{{ object.start|date:"c" }}" title="{{ object.start }}"
class="has-text-weight-light is-size-6">
&mdash; {{ object.start|date:"d M, H:i" }}
</time>
{% endif %}
{% if object.initial %}
{% with object.initial.date as date %}
<span class="tag is-info" title="{% blocktrans %}Rerun of {{ date }}{% endblocktrans %}">
{% trans "rerun" %}
</span>
{% endwith %}
{% endif %}
</span>
</div>
<div class="content">
{{ page.headline|default:program.page.headline }}
</p>
</div>

View File

@ -1,35 +1,53 @@
{% extends "aircox_web/page.html" %}
{% load i18n aircox_web %}
{% block main %}
{{ block.super }}
{% block title %}
{% if program %}
{% with program.name as program %}
{% blocktrans %}Diffusions of {{ program }}{% endblocktrans %}
{% endwith %}
{% else %}
{% trans "All diffusions" %}
{% endif %}
{% endblock %}
{% block header %}
{{ block.super }}
{% if program %}
<h4 class="subtitle is-size-3">
<a href="{% url "page" path=program.page.path %}">&#10092; {{ program.name }}</a></li>
</h4>
{% include "aircox_web/program_header.html" %}
{% endif %}
{% endblock %}
{% block content %}
<section class="section">
{% for object in object_list %}
<div class="columns">
<div class="column is-one-fifth has-text-right">
<time datetime="{{ object.start|date:"c" }}" title="{{ object.start }}">
{{ object.start|date:"d M, H:i" }}
</time>
</div>
<div class="column">
{% include "aircox_web/diffusion_item.html" %}
</div>
</div>
{% with object.diffusion as object %}
{% include "aircox_web/diffusion_item.html" %}
{% endwith %}
{% endfor %}
</section>
{% if is_paginated %}
<nav class="pagination is-centered" role="pagination" aria-label="{% trans "pagination" %}">
{% if page_obj.has_previous %}
<a href="?page={{ page_obj.previous_page_number }}" class="pagination-previous">
{% trans "Previous" %}</a>
{% else %}
<a class="pagination-previous" disabled>
{% endif %}
{% trans "Previous" %}</a>
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}" class="pagination-next">
{% trans "Next" %}</a>
{% else %}
<a class="pagination-next" disabled>
{% endif %}
{% trans "Next" %}</a>
<ul class="pagination-list">
{% for i in paginator.page_range %}

View File

@ -25,6 +25,7 @@
{% endif %}
{# <h4 class="subtitle size-4">{{ date }}</h4> #}
{% with True as hide_schedule %}
<table class="table is-striped is-hoverable is-fullwidth">
{% for object in object_list reversed %}
<tr>
@ -46,6 +47,7 @@
</tr>
{% endfor %}
</table>
{% endwith %}
</section>
{% endblock %}

View File

@ -1,59 +1,36 @@
{% extends "aircox_web/base.html" %}
{% load static i18n thumbnail %}
<html>
<head>
<meta charset="utf-8">
<meta name="application-name" content="aircox">
<meta name="description" content="{{ site.description }}">
<meta name="keywords" content="{{ site.tags }}">
<link rel="icon" href="{% thumbnail site.favicon 32x32 crop %}" />
{% comment %}
Context:
- cover: cover image
- title: title
- page: page
{% endcomment %}
{% block assets %}
<link rel="stylesheet" type="text/css" href="{% static "aircox_web/assets/main.css" %}"/>
<script src="{% static "aircox_web/assets/main.js" %}"></script>
<script src="{% static "aircox_web/assets/vendor.js" %}"></script>
{% endblock %}
<title>{% block title %}{% if title %}{{ title }} -- {% endif %}{{ site.title }}{% endblock %}</title>
{% block extra_head %}{% endblock %}
</head>
<body>
<div id="app">
<nav class="navbar has-shadow" role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
<a href="/" title="{% trans "Home" %}" class="navbar-item">
<img src="{{ site.logo.url }}" class="logo"/>
</a>
</div>
<div class="navbar-menu">
<div class="navbar-start">
{{ site_regions.topnav }}
</div>
</div>
</div>
</nav>
<div class="container">
<div class="columns">
<aside class="column is-one-quarter">
{% block left-sidebar %}
{{ site_regions.sidenav }}
{% endblock %}
</aside>
<main class="column page">
<header class="header">
{% block header %}
<h1 class="title is-1">{{ title }}</h1>
{% endblock %}
</header>
{% block main %}{% endblock main %}
</main>
</div>
</div>
</div>
</body>
</html>
{% block head_title %}
{% block title %}{{ title }}{% endblock %}
{% if title %} &mdash; {% endif %}
{{ site.title }}
{% endblock %}
{% block main %}
{% block headline %}
{% if page and page.headline %}
<p class="headline">{{ page.headline }}</p>
{% endif %}
{% endblock %}
{% block content %}
{{ regions.content }}
{% endblock %}
{% endblock %}
{% block side_nav %}
{% if cover is not None %}
<img class="cover" src="{{ cover.url }}" class="cover"/>
{% endif %}
{% endblock %}

View File

@ -1,27 +1,8 @@
{% extends "aircox_web/article.html" %}
{% load i18n %}
{% block headline %}
<section class="is-size-5">
{% for schedule in program.schedule_set.all %}
<p>
<strong>{{ schedule.datetime|date:"l H:i" }}</strong>
<small>
{{ schedule.get_frequency_display }}
{% if schedule.initial %}
{% with schedule.initial.date as date %}
<span title="{% blocktrans %}Rerun of {{ date }}{% endblocktrans %}">
/ {% trans "rerun" %}
</span>
{% endwith %}
{% endif %}
</small>
</p>
{% endfor %}
</section>
{% extends "aircox_web/page.html" %}
{% block header %}
{{ block.super }}
{% include "aircox_web/program_header.html" %}
{% endblock %}

View File

@ -1,6 +1,10 @@
{% extends "aircox_web/page.html" %}
{% load i18n aircox_web %}
{% block title %}
{% trans "Timetable" %}
{% endblock %}
{% block main %}
{{ block.super }}
@ -27,6 +31,7 @@
</li>
</template>
{% with True as hide_schedule %}
<template v-slot:default="{value}">
{% for day, diffusions in by_date.items %}
<noscript><h4 class="subtitle is-4">{{ day|date:"l d F Y" }}</h4></noscript>
@ -46,6 +51,7 @@
</div>
{% endfor %}
</template>
{% endwith %}
</a-tabs>
</section>
{% endblock %}