{% extends "base.html" %}
{% block content %}        
{% block content_title %}{% endblock %}
{% for article in articles %}        
    {% if loop.index == 1 %}
        <aside id="featured" class="body"><article>
                <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2> 
                <footer class="post-info">
                        <abbr class="published" title="{{ article.date.isoformat() }}">
                                {{ article.date.strftime('%a %d %B %Y') }}
                        </abbr>

                        {% if article.author %}
                        <address class="vcard author">
                                By <a class="url fn" href="#">{{ article.author }}</a>
                        </address>
                        {% endif %}<p> In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a></p>
                </footer><!-- /.post-info -->
                {{ article.content }}
        </article></aside><!-- /#featured -->
        {% if loop.length  > 1 %}
            <section id="content" class="body">
                <h2>Others articles</h2>
                <hr />
                    <ol id="posts-list" class="hfeed">
        {% endif %}
    {% else %} 
        <li><article class="hentry">    
                <header>
                        <h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h2>
                </header>
                
                <div class="entry-content">
                <footer class="post-info">
                        <abbr class="published" title="{{ article.date.isoformat() }}">
                                {{ article.date.strftime('%a %d %B %Y') }}
                        </abbr>

                        <address class="vcard author">
                                By <a class="url fn" href="#">{{ article.author }}</a>
                        </address>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>
                </footer><!-- /.post-info -->
                {{ article.summary }}
                <a class="readmore" href="{{ SITEURL }}/{{ article.url }}">read more</a>
                </div><!-- /.entry-content -->
        </article></li>
    {% endif %}
{% endfor %}
</ol><!-- /#posts-list -->
</section><!-- /#content -->
{% endblock content %}
