{% extends base %}
{% block content %}

<div class="row welcome-box">
  <div class="span12 genra">
    {% for category in categories -%}
        <a class="gen" style="background-color: {{ category.color }}" href="{{ url_for('search.simple', search_type='category', search_id=category.id) }}">{{ category.name }}</a>
    {%- endfor %}
  </div>
</div>

<div class="row">
    <div class="span8 top-list">
        <h2>Новые добавления</h2>
        {% include "includes/stories.html" %}
        <p class="more">
            <a href="{{ url_for('stream.stories') }}">Лента добавлений</a>
            | <a href="{{ url_for('object_lists.top') }}">Топ</a>
            | <a href="{{ url_for('feeds.stories') }}" data-noajax="1">RSS</a>
            {% if current_user.is_staff %}| <a href="{{ url_for('stream.edit_log') }}">Лог модерации</a>{% endif %}
        </p>
    </div>
    <div class="span4 sidelist top-list">
        <h2>Обновившиеся рассказы</h2>
        {% include "includes/chapters_short.html" %}
        <p class="more"><a href="{{ url_for('stream.chapters') }}">Лента обновлений</a> | <a href="{{ url_for('feeds.chapters') }}" data-noajax="1">RSS</a></p>
        <h2>Последние комментарии</h2>
        {% include "includes/story_comments_list.html" %}
        <p class="more"><a href="{{ url_for('stream.comments') }}">Лента комментариев</a></p>
    </div>
</div>
{% endblock %}
