## -*- coding: utf-8 -*-
<%namespace name="arusahni" file="arusahni_helper.tmpl" import="*" />
<%namespace name="helper" file="index_helper.tmpl"/>
<%namespace name="comments" file="comments_helper.tmpl"/>
<%inherit file="base.tmpl"/>

<%block name="content">
    % for post in posts:
        <div class="post">
            <h1 class="title"><a href="${post.permalink()}">${post.title()}</a></h1>
            <div class="meta">
                <div class="authordate">
                    <time class="timeago" datetime="${post.date.isoformat()}">${post.formatted_date(date_format)}</time>
                </div>
                <div class="stats">
                % if not post.meta('nocomments'):
                    ${comments.comment_link(post.permalink(), post.base_path)}
                % endif
                </div>
            ${arusahni.html_tags(post)}
            </div>
            <div class="body">
            %if index_teasers:
                ${post.text(teaser_only=True)}
            %else:
                ${post.text(teaser_only=False)}
            %endif
            </div>
        </div>
    % endfor
    ${helper.html_pager()}
    ${comments.comment_link_script()}
    ${helper.mathjax_script(posts)}
</%block>
