view MoinMoin/templates/blog/layout.html @ 1723:805f03d03259

Move blog templates to a separate 'blog' directory. Split 'blog_layout' into two parts, 'layout' and 'utils'.
author Pavel Sviderski <pavel@psviderski.name>
date Tue, 21 Aug 2012 22:42:59 +0200
parents
children a22b4979caa2
line wrap: on
line source
{% extends theme("layout.html") %}
{% import theme("blog/utils.html") as blog_utils %}
{% import "utils.html" as utils %}
{% import "itemviews.html" as itemviews with context %}

{% if blog_item %}
    {% set blog_header = blog_item.content._render_data()|safe %}
    {% set blog_name = blog_item.name %}
    {% set supertags = blog_item.meta['supertags'] %}
{% endif %}

{% if blog_name %}
    {% macro header_search(form) %}
        {{ blog_utils.header_search(blog_name, form) }}
    {% endmacro %}
{% endif %}

{% block theme_stylesheets %}
    {{ super() }}
    <link media="all" rel="stylesheet" href="{{ theme_static('css/blog.css') }}" />
{% endblock %}

{% block header_itemviews %}
    {{ itemviews }}
{% endblock %}

{% block content %}
    {% block content_data %}
        <div id="moin-content-data">
            <div id="moin-blog-header">
                {% if blog_header %}
                    {{ blog_header }}
                {% endif %}
            </div>
            <div id="moin-blog-body">
                <div id="moin-blog-content">
                {% block blog_content %}<br />{% endblock %}
                </div>
                {% if blog_name and supertags %}
                    <div id="moin-blog-sidebar">
                        {{ blog_utils.widget_supertags(blog_name, supertags) }}
                    </div>
                {% endif %}
            </div>
        </div>
    {% endblock %}
{% endblock %}

{% block footer_itemviews %}
    {{ itemviews }}
{% endblock %}