pelican-mg/templates/index.html

43 lines
3.0 KiB
HTML
Raw Normal View History

2014-12-29 22:08:56 +00:00
{% extends "base.html" %}
{% block content_title %}{% endblock %}
{% block content %}
<div class="uk-width-medium-4-5">
{% if articles %}
{% for article in (articles_page.object_list if articles_page else articles) %}
2014-12-29 22:08:56 +00:00
2015-01-01 20:06:34 +00:00
{% if loop.index == 1 %}
<article class="uk-article" itemtype="http://schema.org/BlogPosting" itemscope="itemscope" itemprop="blogPost">
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-article-title uk-link-muted" itemprop="name">{{ article.title }}</a>
2015-01-09 18:56:22 +00:00
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}" itemprop="datePublished">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}</p>
2014-12-29 22:08:56 +00:00
</p>
<section class="uk-article-content" itemprop="articleBody">{{ article.content }}</section>
2015-01-01 20:06:34 +00:00
<a href="{{ SITEURL }}/{{ article.url }}#disqus_thread"></a>
<hr class="uk-article-divider">
</article>
{% else %}
<article class="uk-article" itemtype="http://schema.org/BlogPosting" itemscope="itemscope" itemprop="blogPost">
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-article-title uk-link-muted" itemprop="name">{{ article.title }}</a>
2015-01-09 18:56:22 +00:00
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}" itemprop="datePublished">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}</p>
2015-01-01 20:06:34 +00:00
</p>
<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags }}</p>
2014-12-29 22:08:56 +00:00
<a href="{{ SITEURL }}/{{ article.url }}">Read More</a>
<hr class="uk-article-divider">
2015-01-01 20:06:34 +00:00
</article>
{% endif %}
2014-12-29 22:08:56 +00:00
{% endfor %}
2015-01-01 20:06:34 +00:00
{% if DEFAULT_PAGINATION and articles_paginator.num_pages > 1 %}
<ul class="uk-pagination">
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}"><i class="uk-icon-angle-double-left"></i></a></li>{% endif %}
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">{{ articles_previous_page.number }}</a></li>{% endif %}
<li class="uk-active"><span>{{ articles_page.number }}</span></li>
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}"><i class="uk-icon-angle-double-right"></i></a></li>{% endif %}
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">{{ articles_next_page.number }}</a></li>{% endif %}
</ul>
{% endif %}
2014-12-29 22:08:56 +00:00
{% endif %}
</div>
{% endblock %}