forked from rc/aircox
clean-up list system a bit (still some fixes left); work on design (cover, lists rendering)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load wagtailcore_tags %}
|
||||
{% load wagtailimages_tags %}
|
||||
{% load wagtailsettings_tags %}
|
||||
|
||||
@ -60,12 +61,47 @@
|
||||
|
||||
<header>
|
||||
{% block title %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% if page.cover %}
|
||||
<div class="background">
|
||||
{% image page.cover max-600x480 class="background-cover" height="" width="" %}
|
||||
</div>
|
||||
{% image page.cover max-600x480 class="cover" height="" width="" %}
|
||||
<div class="foreground">
|
||||
{% endif %}
|
||||
<h1 class="title"><a href="{{ page.url }}">{{ page.title }}</a></h1>
|
||||
|
||||
{% if page.headline %}
|
||||
<section class="headline">
|
||||
{{ page.headline }}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% if page.cover %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</header>
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
<div class="content">
|
||||
{% block content %}
|
||||
{% if page.body %}
|
||||
<section class="body">
|
||||
{{ page.body|richtext}}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content_extras %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="post_content">
|
||||
{% render_sections position="post_content" %}
|
||||
</div>
|
||||
|
||||
<section class="comments">
|
||||
{% include "aircox_cms/snippets/comments.html" %}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<nav class="menu page_right flex_item">
|
||||
|
3
aircox_cms/templates/aircox_cms/category_page.html
Normal file
3
aircox_cms/templates/aircox_cms/category_page.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% extends "aircox_cms/publication.html" %}
|
||||
|
||||
|
@ -6,40 +6,8 @@
|
||||
|
||||
{% load aircox_cms %}
|
||||
|
||||
{% if not object_list %}
|
||||
{% block title %}
|
||||
<h1 class="title">{{ page.title }}</h1>
|
||||
|
||||
{% if page.cover %}
|
||||
<span class="cover_container">
|
||||
{% image page.cover max-600x480 class="cover" height="" width="" %}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<section class="headline">
|
||||
{% if page.headline %}
|
||||
{{ page.headline }}
|
||||
{% else %}
|
||||
{{ page.body|truncatewords:24|richtext }}
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% if object_list %}
|
||||
{# list view #}
|
||||
<section class="body headline">
|
||||
{{ page.headline }}
|
||||
<a href="?" class="go_back float_right">{% trans "Go back to the publication" %}</a>
|
||||
</section>
|
||||
|
||||
{% with list_paginator=paginator %}
|
||||
{% include "aircox_cms/snippets/list.html" %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{# detail view #}
|
||||
<div class="content">
|
||||
{% if page.body %}
|
||||
<section class="body">
|
||||
@ -47,21 +15,18 @@
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if page.links.count %}
|
||||
{% include "aircox_cms/sections/section_link_list.html" %}
|
||||
{% if object_list %}
|
||||
{# list view #}
|
||||
{% with list_paginator=paginator %}
|
||||
{% include "aircox_cms/snippets/list.html" %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{# detail view #}
|
||||
{% if page.links.count %}
|
||||
{% include "aircox_cms/sections/section_link_list.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% block content_extras %}{% endblock %}
|
||||
|
||||
<div class="post_content">
|
||||
{% render_sections position="post_content" %}
|
||||
</div>
|
||||
|
||||
<section class="comments">
|
||||
{% include "aircox_cms/snippets/comments.html" %}
|
||||
</section>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,16 +1,9 @@
|
||||
{% extends "aircox_cms/sections/section_item.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if focus %}
|
||||
{% with item=focus item_big_cover=True %}
|
||||
{% include "aircox_cms/snippets/list_item.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% with url=url url_text=self.url_text %}
|
||||
{% include "aircox_cms/snippets/list.html" %}
|
||||
{% endwith %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% extends "aircox_cms/sections/section_item.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% with item_date_format="H:i" list_css_class="date_list" list_no_cover=True %}
|
||||
{% with item_date_format="H:i" list_css_class="date_list" list_no_cover=True list_no_headline=True %}
|
||||
{% for item in object_list %}
|
||||
{% include "aircox_cms/snippets/date_list_item.html" %}
|
||||
{% endfor %}
|
||||
|
@ -31,7 +31,9 @@ is just a bit different.
|
||||
<div class="flex_item">
|
||||
<h3 class="title">{{ item.title }}</h3>
|
||||
|
||||
{% if item.headline %}<div class="headline">{{ item.headline }}</div>{% endif %}
|
||||
{% if not list_no_headline and item.headline %}
|
||||
<div class="headline">{{ item.headline }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if item.info %}
|
||||
<span class="info">{{ item.info|safe }}</span>
|
||||
|
@ -7,6 +7,11 @@ Options:
|
||||
{% load i18n %}
|
||||
{% load aircox_cms %}
|
||||
|
||||
{% if focus %}
|
||||
{% with item=focus item_big_cover=True %}
|
||||
{% include "aircox_cms/snippets/list_item.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
<ul class="list {{ list_css_class|default:'' }}">
|
||||
{% for page in object_list %}
|
||||
@ -20,13 +25,13 @@ Options:
|
||||
<nav>
|
||||
{% with list_paginator.num_pages as num_pages %}
|
||||
{% if object_list.has_previous %}
|
||||
<a href="?page={{ object_list.previous_page_number }}">
|
||||
<a href="?{{ list_url_args }}&page={{ object_list.previous_page_number }}">
|
||||
{% trans "previous page" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if object_list.number > 3 %}
|
||||
<a href="?page=1">1</a>
|
||||
<a href="?{{ list_url_args }}&page=1">1</a>
|
||||
{% if object_list.number > 4 %}
|
||||
…
|
||||
{% endif %}
|
||||
@ -36,7 +41,7 @@ Options:
|
||||
{% if i == object_list.number %}
|
||||
{{ object_list.number }}
|
||||
{% elif i > 0 and i <= num_pages %}
|
||||
<a href="?page={{ i }}">{{ i }}</a>
|
||||
<a href="?{{ list_url_args }}&page={{ i }}">{{ i }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@ -45,7 +50,7 @@ Options:
|
||||
{% if max|add:"1" < num_pages %}
|
||||
…
|
||||
{% endif %}
|
||||
<a href="?page={{ num_pages }}">{{ num_pages }}</a>
|
||||
<a href="?{{ list_url_args }}&page={{ num_pages }}">{{ num_pages }}</a>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
|
Reference in New Issue
Block a user