fmartingr.com-legacy/fmartingrcom/themes/v1/templates/blog/list.jinja

100 lines
3.3 KiB
Django/Jinja

{% extends "blog/layout.jinja" %}
{% block page_title %}
{{ super() }}{% if page.number > 1 %} page {{ page_number }}{% endif %}
{% endblock %}
{#
{% block submenu %}
{{ super() }}
{% if page.has_next() %}
<a href="{{ url('blog:list', page.next_page_number()) }}" class="button prev-page pull-right gap half">
Older <i class="fa fa-angle-double-right"></i>
</a>
<a href="#">
{% endif %}
{% if page.has_previous() %}
{% if page.previous_page_number() == 1 %}
<a href="{{ url('blog:list') }}" class="button prev-page pull-left gap half">
{% else %}
<a href="{{ url('blog:list', page.previous_page_number()) }}" class="button prev-page pull-left gap half">
{% endif %}
<i class="fa fa-angle-double-left"></i> Newer
</a>
{% endif %}
{% endblock %}
#}
{% block content %}
{% for item in page.object_list %}
<article class="blog-entry {% if item.draft %}draft{% endif %}">
<h1><a class="dark" href="{{ item.get_absolute_url() }}">{{ item.title }}</a></h1>
<div>
<i class="fa fa-calendar"></i>
<time datetime="{{ item.date }}"
pubdate=""
data-updated="true">{{ item.date|dt('%B %e, %Y') }}</time>
{% if config.disqus_shortname and config.enable_comments %}
&nbsp;
<i class="fa fa-comment"></i> <a href="{{ item.get_absolute_url() }}#disqus_thread">0 Comments</a>
{% endif %}
{% if item.tags.count() > 0 %}
&nbsp;
<i class="fa fa-tag"></i> {{ item.tags.all()|join(', ') }}
{% endif %}
</div>
<div class="content">
{% if config.readmore_tag in item.content %}
{{ item.content|readmore|safe }}
{% else %}
{{ item.content|safe }}
{% endif %}
</div>
{% if config.readmore_tag in item.content %}
<a class="readmore pull-right" href="{{ item.get_absolute_url() }}#more">
Read more &raquo;
</a>
{% endif %}
<div class="clearfix"></div>
</article>
<hr class="big" />
{% else %}
<div class="text-center">No results found!</div>
{% endfor %}
<div class="pagination">
{% if page.has_next() %}
<a href="{{ url('blog:list') }}?page={{ page.next_page_number() }}" class="button prev-page pull-right gap half">
Older <i class="fa fa-angle-double-right"></i>
</a>
<a href="#">o
{% endif %}
{% if page.has_previous() %}
{% if page.previous_page_number() == 1 %}
<a href="{{ url('blog:list') }}" class="button prev-page pull-left gap half">
{% else %}
<a href="{{ url('blog:list') }}?page={{ page.previous_page_number() }}" class="button prev-page pull-left gap half">
{% endif %}
<i class="fa fa-angle-double-left"></i> Newer
</a>
{% endif %}
</div>
{#
{% if paginator.num_pages > 1 %}
<div class="pagination pagination-centered">
<ul>
{% for p in range(1, paginator.num_pages+1) %}
<li {% if p == page_number %}class="active"{% endif %}>
<a href="{{ url('blog:list') }}">?page={{ p }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
#}
{% endblock %}