forked from rc/aircox
147 lines
5.4 KiB
HTML
147 lines
5.4 KiB
HTML
{% comment %}
|
|
Base website template. It displays various elements depending on context
|
|
variables.
|
|
|
|
Usefull context:
|
|
- cover: image cover
|
|
- site: current website
|
|
- has_filters: display filter bar (using block "filters")
|
|
- model: view model or displayed `object`'s
|
|
- sidebar_object_list: item to display in sidebar
|
|
- sidebar_url_name: url name sidebar item complete list
|
|
- sidebar_url_parent: parent page for sidebar items complete list
|
|
|
|
Blocks:
|
|
- assets
|
|
- head_title
|
|
- head_extra
|
|
- top_nav
|
|
- header:
|
|
- title
|
|
- subtitle
|
|
- header_meta
|
|
- main:
|
|
- filters
|
|
- cover
|
|
- sidebar:
|
|
- sidebar_title
|
|
{% endcomment %}
|
|
{% load static i18n thumbnail aircox %}
|
|
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="application-name" content="aircox" />
|
|
<meta name="description" content="{{ site.description }}" />
|
|
<meta name="keywords" content="{{ site.tags }}" />
|
|
<meta name="generator" content="Aircox" />
|
|
<link rel="icon" href="{% thumbnail site.favicon 32x32 crop %}" />
|
|
|
|
{% block assets %}
|
|
<link rel="stylesheet" type="text/css" href="{% static "aircox/vendor.css" %}"/>
|
|
<link rel="stylesheet" type="text/css" href="{% static "aircox/main.css" %}"/>
|
|
<script src="{% static "aircox/vendor.js" %}"></script>
|
|
<script src="{% static "aircox/main.js" %}"></script>
|
|
{% endblock %}
|
|
|
|
<title>
|
|
{% block head_title %}{{ station.name }}{% endblock %}
|
|
</title>
|
|
|
|
{% block head_extra %}{% 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="{{ station.logo.url }}" class="logo"/>
|
|
</a>
|
|
</div>
|
|
<div class="navbar-menu">
|
|
<div class="navbar-start">
|
|
{% block top-nav %}
|
|
{% nav_items "top" css_class="navbar-item" active_class="is-active" as items %}
|
|
{% for item, render in items %}
|
|
{{ render }}
|
|
{% endfor %}
|
|
{% endblock %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container">
|
|
<div class="columns is-desktop">
|
|
<main class="column page">
|
|
<header class="header">
|
|
{% block header %}
|
|
<h1 class="title is-1">{% block title %}{% endblock %}</h1>
|
|
|
|
<h3 class="subtitle is-3">
|
|
{% block subtitle %}{% endblock %}
|
|
</h3>
|
|
|
|
<div class="columns is-size-4">
|
|
{% block header_meta %}
|
|
{% if parent %}
|
|
<a href="{{ parent.get_absolute_url }}" class="column">
|
|
❬ {{ parent.title }}</a></li>
|
|
{% endif %}
|
|
{% endblock %}
|
|
</div>
|
|
|
|
{% endblock %}
|
|
</header>
|
|
|
|
{% block main %}
|
|
{% if has_filters %}
|
|
{% comment %}Translators: extra toolbar displayed on the top of page lists {% endcomment %}
|
|
<nav class="navbar toolbar"
|
|
aria-label="{% trans "list filters" %}">
|
|
{% block filters %}{% endblock %}
|
|
</nav>
|
|
{% endif %}
|
|
{% endblock main %}
|
|
</main>
|
|
|
|
{% if has_sidebar %}
|
|
{% comment %}Translators: main sidebar {% endcomment %}
|
|
<aside class="column is-one-third-desktop">
|
|
{# FIXME: block cover into sidebar one #}
|
|
{% block cover %}
|
|
{% if cover is not None %}
|
|
<img class="cover" src="{{ cover.url }}" class="cover"/>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block sidebar %}
|
|
{% if sidebar_object_list %}
|
|
{% with object_list=sidebar_object_list %}
|
|
{% with list_url=sidebar_list_url %}
|
|
{% with has_headline=False %}
|
|
<section>
|
|
<h4 class="title is-4">
|
|
{% block sidebar_title %}{% trans "Recently" %}{% endblock %}
|
|
</h4>
|
|
{% include "aircox/widgets/page_list.html" %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|
|
</aside>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
</div>
|
|
<div id="player">{% include "aircox/widgets/player.html" %}</div>
|
|
</body>
|
|
</html>
|
|
|
|
|