<section id="menu">
  <div style="padding: 1.5em;"><a class="close" href="#menu" title="Menu"></a></div>
  {% if config.plugins.simplesearch.enabled %}
    <!-- Search -->
    <section>
      {% include 'partials/simplesearch_searchbox_sidebar.html.twig' %}
    </section>
  {% endif %}
  <!-- Links -->
  <div id="sidebarmenu">
    {% include 'partials/sidebar_navigation.html.twig' %}
  </div>
  {% if config.plugins.archives.enabled and archives_data is not empty  %}
    <!-- Actions -->
    <div>
      <header>
        <h3>{{ 'FUTURE.SIDEBAR.ARCHIVES.HEADLINE'|t }}</h3>
      </header>
      {% include 'partials/archives.html.twig' %}
    </div>
  {% endif %}
  {% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
    <div>
      <header>
        <h3>{{ 'FUTURE.SIDEBAR.RELATED_POSTS.HEADLINE'|t }}</h3>
      </header>
      {% include 'partials/relatedpages.html.twig' %}
    </div>
  {% endif %}
  {% if config.plugins.taxonomylist.enabled %}
    <div>
      <header>
        <h3>{{ 'FUTURE.SIDEBAR.TAGS.HEADLINE'|t }}</h3>
      </header>
      {% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag'} %}
    </div>
  {% endif %}
  {% if config.plugins.login.enabled %}
    <div>
      <ul class="actions stacked">
      {% if not grav.user.authenticated %}
        <li><a href="{{ base_url_absolute }}{{config.plugins.login.route}}" class="button large fit">{{ 'PLUGIN_LOGIN.BTN_LOGIN'|t }}</a></li>
      {% else %}
        <li>Logged as: <strong>{{ grav.user.fullname ?: grav.user.username }}</strong></li>
        <li><a class="button large fit" href="{{ url(uri.addNonce((uri.path)|trim('/') ~ '/task' ~ config.system.param_sep ~ 'login.logout', 'logout-form', 'logout-nonce'))|e }}">{{ 'PLUGIN_LOGIN.BTN_LOGOUT'|t }}</a></li>
      {% endif %}
      </ul>
    </div>
  {% endif %}
</section>
