www.donaldharper.com/themes/hyde/templates/index.tmpl

43 lines
1.5 KiB
Cheetah

{# -*- coding: utf-8 -*- #}
{% import 'index_helper.tmpl' as helper with context %}
{% import 'math_helper.tmpl' as math 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 %}
{{ math.math_styles_ifposts(posts) }}
{% endblock %}
{% block content %}
{% block content_header %}{% endblock %}
{% if 'main_index' in pagekind %}
{{ front_index_header }}
{% endif %}
<div class="post">
{% for post in posts %}
<article class="post h-entry post-{{ post.meta('type') }}">
<header>
<h1 class="post-title p-name"><a href="{{ post.permalink() }}" class="u-url">{{ post.title()|e }}</a></h1>
<div class="metadata">
<span class="post-date dateline"><time class="published dt-published" datetime="{{ post.formatted_date('webiso') }}" title="{{ post.formatted_date(date_format)|e }}">{{ post.formatted_date(date_format)|e }}</time></span>
</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() }}
{{ math.math_scripts_ifposts(posts) }}
{% endblock %}