pelican-mg/templates/index.html

32 lines
1.9 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 %}
<article class="uk-article">
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-article-title uk-link-muted">{{ article.title }}</a>
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread"></a>{% endif %}</p>
2014-12-29 22:08:56 +00:00
</p>
2014-12-30 20:42:05 +00:00
<p class="uk-article-lead">{{ article.summary|striptags }}</p>
2014-12-29 22:08:56 +00:00
<p>{{ ' '.join(article.content.split(' ')[0:100])|striptags }}...</p>
<a href="{{ SITEURL }}/{{ article.url }}">Read More</a>
<hr class="uk-article-divider">
</article>
{% 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 %}
{% endfor %}
{% endif %}
</div>
{% endblock %}