aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/data/themes/base-jinja/templates/index.tmpl
blob: 222da432c96c2c4e3f0e0f635985dd98e9de1ddf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{#  -*- coding: utf-8 -*- #}
{% import 'index_helper.tmpl' as helper with context %}
{% import 'comments_helper.tmpl' as comments with context %}
{% extends 'base.tmpl' %}

{% block extra_head %}
    {{ super() }}
    {% if posts and (permalink == '/' or permalink == '/' + index_file) %}
        <link rel="prefetch" href="{{ posts[0].permalink() }}" type="text/html">
    {% endif %}
{% endblock %}

{% block content %}
{% block content_header %}{% endblock %}
<div class="postindex">
{% for post in posts %}
    <article class="h-entry post-{{ post.meta('type') }}">
    <header>
        <h1 class="p-name entry-title"><a href="{{ post.permalink() }}" class="u-url">{{ post.title()|e }}</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">{{ post.author() }}</span></p>
            <p class="dateline"><a href="{{ post.permalink() }}" rel="bookmark"><time class="published dt-published" datetime="{{ post.formatted_date('webiso') }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></a></p>
            {% if not post.meta('nocomments') and site_has_comments %}
                <p class="commentline">{{ comments.comment_link(post.permalink(), post._base_path) }}
            {% endif %}
        </div>
    </header>
    {% if index_teasers %}
    <div class="p-summary entry-summary">
    {{ post.text(teaser_only=True) }}
    {% else %}
    <div class="e-content entry-content">
    {{ post.text(teaser_only=False) }}
    {% endif %}
    </div>
    </article>
{% endfor %}
</div>
{{ helper.html_pager() }}
{{ comments.comment_link_script() }}
{{ helper.mathjax_script(posts) }}
{% endblock %}