{% import "macros.html" as macros %}

{% if 'SIDEBAR_MAIN_HEADER'|show_block_to(request.user) %}
<div class="box">
    {{ settings.SIDEBAR_MAIN_HEADER }}
</div>
{% endif %}

{% if contributors and settings.SIDEBAR_MAIN_SHOW_AVATARS %}
    {% include "widgets/contributors.html" %}
{% endif %}

{% if settings.TAG_SEARCH_INPUT_ENABLED %}
    {% include "main_page/tag_search.html" %}
{% endif %}

{% if request.user.is_authenticated and settings.SIDEBAR_MAIN_SHOW_TAG_SELECTOR %}
    {% include "widgets/tag_selector.html" %}
{% endif %}

{% if tags and settings.SIDEBAR_MAIN_SHOW_TAGS %}
<div class="box">
    <h2>{% trans %}Tags{% endtrans %}</h2>
    {% include "widgets/related_tags.html" %}
</div>
{% endif %}

{% if 'SIDEBAR_MAIN_FOOTER'|show_block_to(request.user) %}
<div class="box">
    {{ settings.SIDEBAR_MAIN_FOOTER }}
</div>
{% endif %}
