{% if config.DEBUG %}<span class="debug-hint" title="{{ self._TemplateReference__context.name }}">?</span>{% endif %}

{% block pre %}{% if content.pre %}{{ content.pre.render() }}{% endif %}{% endblock %}

<article class="content-type-{{ content.__class__.__name__.lower() }} mode-{{ mode }} {{ content.css_class }}">
    
    {% if self.header()|trim %}
        <header>
        {% block header %}
            {% if mode not in ('full', 'inline') %}
                {% with url = content.url('full', quiet=True) %}
                    {% if url %}
                        <h2><a href="{{ url }}" title="{{ content.title }}">{{ content.title }}</a></h2>
                    {% else %}
                        <h2 title="{{ content.title }}">{{ content.title }}</h2>
                    {% endif %}
                {% endwith %}
            {% endif %}
        {% endblock %}
        </header>
    {% endif %}
   
    {% if self.content()|trim %} 
        <div class="content">
        {% block content %}
            This is the ultimate fallback template. Somebody probably ought to implement one of these templates:
            <ul>
                {% for template in content.templates() %}
                    <li>{{ template }}</li>
                {% endfor %}
            </ul>
        {% endblock %}
        </div>
    {% endif %}

    {% if self.footer()|trim %}
    <footer>
        {% block footer %}{% endblock %}
    </footer>
    {% endif %}
</article>

{% block post %}{% if content.post %}{{ content.post.render() }}{% endif %}{% endblock %}
