forked from rc/aircox
static pages
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
{% extends "aircox/page_list.html" %}
|
||||
{% comment %}List of articles{% endcomment %}
|
||||
|
@ -45,7 +45,11 @@ Blocks:
|
||||
{% endblock %}
|
||||
|
||||
<title>
|
||||
{% block head_title %}{{ station.name }}{% endblock %}
|
||||
{% block head_title %}
|
||||
{% if page and page.title %}{{ page.title }} — {{ station.name }}
|
||||
{% else %}{{ station.name }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</title>
|
||||
|
||||
{% block head_extra %}{% endblock %}
|
||||
@ -77,7 +81,13 @@ Blocks:
|
||||
<main class="column page">
|
||||
<header class="header">
|
||||
{% block header %}
|
||||
<h1 class="title is-1">{% block title %}{% endblock %}</h1>
|
||||
<h1 class="title is-1">
|
||||
{% block title %}
|
||||
{% if page and page.title %}
|
||||
{{ page.title }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</h1>
|
||||
|
||||
<h3 class="subtitle is-3">
|
||||
{% block subtitle %}{% endblock %}
|
||||
@ -96,6 +106,12 @@ Blocks:
|
||||
</header>
|
||||
|
||||
{% block main %}
|
||||
{% block content %}
|
||||
{% if page and page.content %}
|
||||
{{ page.content|safe }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% if has_filters %}
|
||||
{% comment %}Translators: extra toolbar displayed on the top of page lists {% endcomment %}
|
||||
<nav class="navbar toolbar"
|
||||
@ -103,6 +119,8 @@ Blocks:
|
||||
{% block filters %}{% endblock %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock main %}
|
||||
</main>
|
||||
|
||||
@ -111,8 +129,8 @@ Blocks:
|
||||
<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"/>
|
||||
{% if page and page.cover %}
|
||||
<img class="cover" src="{{ page.cover.url }}" class="cover"/>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -3,9 +3,13 @@
|
||||
{% load i18n aircox humanize %}
|
||||
|
||||
{% block title %}
|
||||
{% if not page or not page.title %}
|
||||
{% with station.name as station %}
|
||||
{% blocktrans %}Today on {{ station }}{% endblocktrans %}
|
||||
{% blocktrans %}This week on {{ station }}{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block subtitle %}{{ date|date:"l d F Y" }}{% endblock %}
|
||||
|
@ -1,3 +0,0 @@
|
||||
{% extends "aircox/page_list.html" %}
|
||||
{% comment %}List of episodes pages{% endcomment %}
|
||||
|
@ -1,17 +1,17 @@
|
||||
{% extends "aircox/page_list.html" %}
|
||||
{% comment %}
|
||||
Context:
|
||||
-
|
||||
- main:
|
||||
- focused
|
||||
- nav to 'publications' view
|
||||
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% block title %}{{ station.name }}{% endblock %}{% endblock %}
|
||||
{% block head_title %}{{ station.name }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% 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 %}
|
||||
|
@ -3,9 +3,13 @@
|
||||
{% load i18n humanize aircox %}
|
||||
|
||||
{% block title %}
|
||||
{% if not page or not page.title %}
|
||||
{% with station.name as station %}
|
||||
{% blocktrans %}That happened on {{ station }}{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,20 +1,12 @@
|
||||
{% extends "aircox/base.html" %}
|
||||
{% load static i18n thumbnail %}
|
||||
{% comment %}
|
||||
Base template to display pages (list, detail, whatever). By default extend to
|
||||
this one instead of "base.html"
|
||||
|
||||
Context:
|
||||
- cover: cover image
|
||||
- title: title
|
||||
- page: page
|
||||
This template is only used in order to have correct page <title></title>,
|
||||
otherwise use base.html
|
||||
{% endcomment %}
|
||||
|
||||
{% block head_title %}
|
||||
{% comment %}Hack to include the page title into the <title> tag.{% endcomment %}
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
{% block title %}{{ page.title }}{% endblock %}
|
||||
—
|
||||
{{ station.name }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -18,9 +18,7 @@ Context:
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% block content %}
|
||||
{{ object.content|default_if_none:''|safe }}
|
||||
{% endblock %}
|
||||
{{ block.super }}
|
||||
|
||||
{% block comments %}
|
||||
{% if comments or comment_form %}
|
||||
|
@ -3,14 +3,17 @@
|
||||
{% load i18n aircox %}
|
||||
|
||||
{% block title %}
|
||||
{% if not parent %}{{ view.model|verbose_name:True|title }}
|
||||
{% else %}
|
||||
{% with parent.title as title %}
|
||||
{% with model|default:"Publications"|verbose_name:True|capfirst as model %}
|
||||
{% comment %}Translators: title when pages are filtered for a specific parent page, e.g.: Articles of My Incredible Show{% endcomment %}
|
||||
{% blocktrans %}{{ model }} of {{ title }}{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% if not page or not page.title %}
|
||||
{% if not parent %}{{ view.model|verbose_name:True|title }}
|
||||
{% else %}
|
||||
{% with parent.title as title %}
|
||||
{% with model|default:"Publications"|verbose_name:True|capfirst as model %}
|
||||
{% comment %}Translators: title when pages are filtered for a specific parent page, e.g.: Articles of My Incredible Show{% endcomment %}
|
||||
{% blocktrans %}{{ model }} of {{ title }}{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% else %}{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@ -61,14 +64,19 @@
|
||||
|
||||
|
||||
{% block main %}{{ block.super }}
|
||||
|
||||
<section role="list">
|
||||
{% block pages_list %}
|
||||
{% with has_headline=True %}
|
||||
{% for object in object_list %}
|
||||
{% block list_object %}
|
||||
{% include object.item_template_name|default:item_template_name %}
|
||||
{% endblock %}
|
||||
{% empty %}
|
||||
{% blocktrans %}There is nothing published here...{% endblocktrans %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
</section>
|
||||
|
||||
{% if is_paginated %}
|
||||
|
Reference in New Issue
Block a user