forked from rc/aircox
		
	work on website; fix stuffs on aircox too
This commit is contained in:
		
							
								
								
									
										17
									
								
								aircox_web/templates/aircox_web/article.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								aircox_web/templates/aircox_web/article.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
{% 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 %}
 | 
			
		||||
 | 
			
		||||
@ -1,50 +0,0 @@
 | 
			
		||||
{% 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 %}" />
 | 
			
		||||
 | 
			
		||||
        {% block assets %}
 | 
			
		||||
        <link rel="stylesheet" type="text/css" href="{% static "aircox_web/assets/main.css" %}"/>
 | 
			
		||||
        <!-- <link rel="stylesheet" type="text/css" href="{% static "aircox_web/assets/vendor.css" %}"/> -->
 | 
			
		||||
 | 
			
		||||
        <script src="{% static "aircox_web/assets/main.js" %}"></script>
 | 
			
		||||
        <script src="{% static "aircox_web/assets/vendor.js" %}"></script>
 | 
			
		||||
        {% endblock %}
 | 
			
		||||
 | 
			
		||||
        <title>{% block title %}{{ site.title }}{% endblock %}</title>
 | 
			
		||||
 | 
			
		||||
        {% block extra_head %}{% endblock %}
 | 
			
		||||
    </head>
 | 
			
		||||
    <body id="app">
 | 
			
		||||
        <nav class="navbar has-shadow" role="navigation" aria-label="main navigation">
 | 
			
		||||
            <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>
 | 
			
		||||
        </nav>
 | 
			
		||||
 | 
			
		||||
        <div class="columns">
 | 
			
		||||
            <aside class="column">
 | 
			
		||||
                {{ site_regions.sidenav }}
 | 
			
		||||
            </aside>
 | 
			
		||||
            <main class="column is-three-quarters">
 | 
			
		||||
                {% block main %}
 | 
			
		||||
                <h1>{{ page.title }}</h1>
 | 
			
		||||
                {{ regions.main }}
 | 
			
		||||
                {% endblock main %}
 | 
			
		||||
            </main>
 | 
			
		||||
        </div>
 | 
			
		||||
    </body>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										43
									
								
								aircox_web/templates/aircox_web/diffusion_item.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								aircox_web/templates/aircox_web/diffusion_item.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,43 @@
 | 
			
		||||
{% load i18n easy_thumbnails_tags aircox_web %}
 | 
			
		||||
{% comment %}
 | 
			
		||||
Context variables:
 | 
			
		||||
- object: the actual diffusion
 | 
			
		||||
- page: current parent page in which item is rendered
 | 
			
		||||
{% endcomment %}
 | 
			
		||||
 | 
			
		||||
{% with page as context_page %}
 | 
			
		||||
{% with object.program as program %}
 | 
			
		||||
{% 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>
 | 
			
		||||
    </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 %}
 | 
			
		||||
          — <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>
 | 
			
		||||
          {{ page.headline|default:program.page.headline }}
 | 
			
		||||
        </p>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</article>
 | 
			
		||||
{% endwith %}
 | 
			
		||||
{% endwith %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										46
									
								
								aircox_web/templates/aircox_web/diffusions.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								aircox_web/templates/aircox_web/diffusions.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,46 @@
 | 
			
		||||
{% extends "aircox_web/page.html" %}
 | 
			
		||||
{% load i18n aircox_web %}
 | 
			
		||||
 | 
			
		||||
{% block main %}
 | 
			
		||||
{{ block.super }}
 | 
			
		||||
 | 
			
		||||
<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>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% 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>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    {% if page_obj.has_next %}
 | 
			
		||||
    <a href="?page={{ page_obj.next_page_number }}" class="pagination-next">
 | 
			
		||||
        {% trans "Next" %}</a>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    <ul class="pagination-list">
 | 
			
		||||
    {% for i in paginator.page_range %}
 | 
			
		||||
        <li>
 | 
			
		||||
            <a class="pagination-link {% if page_obj.number == i %}is-current{% endif %}"
 | 
			
		||||
               href="?page={{ i }}">{{ i }}</a>
 | 
			
		||||
        </li>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
    </ul>
 | 
			
		||||
</nav>
 | 
			
		||||
{% endif %}
 | 
			
		||||
</section>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										19
									
								
								aircox_web/templates/aircox_web/log_item.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								aircox_web/templates/aircox_web/log_item.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,19 @@
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
 | 
			
		||||
{% with object.track as track %}
 | 
			
		||||
<span class="has-text-info is-size-5">♬</span>
 | 
			
		||||
<span>{{ track.title }}</span>
 | 
			
		||||
{% with track.artist as artist %}
 | 
			
		||||
{% with track.info as info %}
 | 
			
		||||
<span class="has-text-grey-dark has-text-weight-light">
 | 
			
		||||
    {% blocktrans %}
 | 
			
		||||
    by {{ artist }}
 | 
			
		||||
    {% endblocktrans %}
 | 
			
		||||
    {% if info %}
 | 
			
		||||
    ({% blocktrans %}<i>{{ info }}</i>{% endblocktrans %})
 | 
			
		||||
    {% endif %}
 | 
			
		||||
</span>
 | 
			
		||||
{% endwith %}
 | 
			
		||||
{% endwith %}
 | 
			
		||||
{% endwith %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										51
									
								
								aircox_web/templates/aircox_web/logs.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								aircox_web/templates/aircox_web/logs.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,51 @@
 | 
			
		||||
{% extends "aircox_web/page.html" %}
 | 
			
		||||
{% load i18n aircox_web %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block main %}
 | 
			
		||||
{{ block.super }}
 | 
			
		||||
 | 
			
		||||
<section class="section">
 | 
			
		||||
    {% if dates %}
 | 
			
		||||
    <nav class="tabs is-centered" aria-label="{% trans "Other days' logs" %}">
 | 
			
		||||
        <ul>
 | 
			
		||||
        {% for day in dates %}
 | 
			
		||||
            <li {% if day == date %}class="is-active"{% endif %}>
 | 
			
		||||
                <a href="{% url "logs" date=day %}">
 | 
			
		||||
                    {{ day|date:"d b" }}
 | 
			
		||||
                </a>
 | 
			
		||||
            </li>
 | 
			
		||||
 | 
			
		||||
        {% if forloop.last and day > min_date %}
 | 
			
		||||
            <li>...</li>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
        </ul>
 | 
			
		||||
    </nav>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
 | 
			
		||||
    {# <h4 class="subtitle size-4">{{ date }}</h4> #}
 | 
			
		||||
    <table class="table is-striped is-hoverable is-fullwidth">
 | 
			
		||||
        {% for object in object_list reversed %}
 | 
			
		||||
        <tr>
 | 
			
		||||
        {% if object|is_diffusion %}
 | 
			
		||||
            <td>
 | 
			
		||||
                <time datetime="{{ object.start }}" title="{{ object.start }}">
 | 
			
		||||
                    {{ object.start|date:"H:i" }} - {{ object.end|date:"H:i" }}
 | 
			
		||||
                </time>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>{% include "aircox_web/diffusion_item.html" %}</td>
 | 
			
		||||
        {% else %}
 | 
			
		||||
            <td>
 | 
			
		||||
                <time datetime="{{ object.date }}" title="{{ object.date }}">
 | 
			
		||||
                    {{ object.date|date:"H:i" }}
 | 
			
		||||
                </time>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>{% include "aircox_web/log_item.html" %}</td>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        </tr>
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
    </table>
 | 
			
		||||
</section>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,59 @@
 | 
			
		||||
{% 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 %}" />
 | 
			
		||||
 | 
			
		||||
{% block title %}{{ page.title }} -- {{ block.super }}{% endblock %}
 | 
			
		||||
        {% 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 main %}
 | 
			
		||||
<h1 class="title">{{ page.title }}</h1>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										27
									
								
								aircox_web/templates/aircox_web/program.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								aircox_web/templates/aircox_web/program.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,27 @@
 | 
			
		||||
{% 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>
 | 
			
		||||
 | 
			
		||||
{{ block.super }}
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										52
									
								
								aircox_web/templates/aircox_web/timetable.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								aircox_web/templates/aircox_web/timetable.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,52 @@
 | 
			
		||||
{% extends "aircox_web/page.html" %}
 | 
			
		||||
{% load i18n aircox_web %}
 | 
			
		||||
 | 
			
		||||
{% block main %}
 | 
			
		||||
{{ block.super }}
 | 
			
		||||
 | 
			
		||||
<section class="section">
 | 
			
		||||
    <h3 class="subtitle size-3">
 | 
			
		||||
        {% blocktrans %}From <b>{{ start }}</b> to <b>{{ end }}</b>{% endblocktrans %}
 | 
			
		||||
    </h3>
 | 
			
		||||
 | 
			
		||||
    {% unique_id "timetable" as timetable_id %}
 | 
			
		||||
    <a-tabs default="{{ date }}">
 | 
			
		||||
        <template v-slot:tabs="scope" noscript="hidden">
 | 
			
		||||
            <li><a href="{% url "timetable" date=prev_date %}"><</a></li>
 | 
			
		||||
 | 
			
		||||
            {% for day in by_date.keys %}
 | 
			
		||||
            <a-tab value="{{ day }}">
 | 
			
		||||
                <a href="{% url "timetable" date=day %}">
 | 
			
		||||
                    {{ day|date:"D. d" }}
 | 
			
		||||
                </a>
 | 
			
		||||
            </a-tab>
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
 | 
			
		||||
            <li>
 | 
			
		||||
                <a href="{% url "timetable" date=next_date %}">></a>
 | 
			
		||||
            </li>
 | 
			
		||||
        </template>
 | 
			
		||||
 | 
			
		||||
        <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>
 | 
			
		||||
            <div id="{{timetable_id}}-{{ day|date:"Y-m-d" }}" v-if="value == '{{ day }}'">
 | 
			
		||||
                {% for object in diffusions %}
 | 
			
		||||
                <div class="columns">
 | 
			
		||||
                    <div class="column is-one-fifth has-text-right">
 | 
			
		||||
                        <time datetime="{{ object.start|date:"c" }}">
 | 
			
		||||
                            {{ object.start|date:"H:i" }} - {{ object.end|date:"H:i" }}
 | 
			
		||||
                        </time>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="column">
 | 
			
		||||
                        {% include "aircox_web/diffusion_item.html" %}
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
            </div>
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
        </template>
 | 
			
		||||
    </a-tabs>
 | 
			
		||||
</section>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user