<div class="story-panel story-panel-sticky no-js" id="story_panel">
    {% if current_user.is_authenticated %}
        <a title="В избранное" href="{{ url_for('story.favorite', pk=story.id) }}" class="js-required story_favorite scon favorite{% if story.favorited(current_user.id) %} favorited{% endif %}"></a>
        <a title="Прочитать позже" href="{{ url_for('story.bookmark', pk=story.id) }}" class="js-required story_bookmark scon bookmark{% if story.bookmarked(current_user.id) %} bookmarked{% endif %}"></a>
    {% endif %}
    {% if not story.finished %}
        <a title="Подписаться на новые главы по RSS" href="{{ url_for('feeds.story', story_id=story.id) }}" class="scon feed" data-noajax="1"></a>
    {% endif %}

    {% if prev_chapter or next_chapter %}
    <span class="chapter-switch">
        {% if prev_chapter %}← <a class="left" href="{{ url_for('chapter.view', story_id=story.id, chapter_order=prev_chapter.order) }}">{{ prev_chapter.autotitle }}</a>{% endif %}
        {% if next_chapter %}<a href="{{ url_for('chapter.view', story_id=story.id, chapter_order=next_chapter.order) }}">{{ next_chapter.autotitle }}</a> →{% endif %}
    </span>
    {% endif %}
    {% if not chapter and not allchapters %}
        <a href="{{ url_for('chapter.view', story_id=story.id) }}">Все главы одной страницей</a>
    {% endif %}
    <span class="chapter-controls">
        {% for d in story.list_downloads() %}
            <a title="Скачать в {{ d.format.name }}" href="{{ d.url }}" class="get {{ d.format.slug }}" data-noajax="1"></a>
        {% endfor %}
    </span>

    {% if chapter or chapters %}
    <span class="js-required chapter-controls">
        <select class="select-font">
            <option value="1">Без засечек</option>
            <option value="2">С засечками</option>
            <option value="3">Моноширинный</option>
        </select>
        <select class="select-size">
            <option value="1">Обычный</option>
            <option value="2">Маленький</option>
            <option value="3">Большой</option>
        </select>
    </span>
    <span class=" js-required chapter-controls">
        <span class="btn btn-mini btn-mini-story-style story-style-align-left js-story-style-align-btn" title="Переключение выравнивания по ширине и переноса слов по слогам"><span class="story-style-icon"></span></span>
        <span class="btn btn-mini btn-mini-story-style story-style-indent-bottom js-story-style-indent-btn" title="Способ разделения абзацев: интервал между абзацами или абзацный отступ"><span class="story-style-icon"></span></span>
    </span>
    <span class="chapter-controls">
    {#
        <a title="Вниз" href="#" class="scon down" id="toDown"></a>
    #}
        <a title="Вверх" href="#" class="scon up" id="toTop"></a>
    </span>
    {% endif %}
</div>
