Merge pull request #9941 from scmmishra/sidebar-sorcery

feat: add sidebar items to navbar in mobile
This commit is contained in:
mergify[bot] 2020-04-21 03:43:57 +00:00 committed by GitHub
commit 73729e5764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,24 @@
{% if not only_static %}
{% block navbar_right_extension %}{% endblock %}
{% endif %}
{% if show_sidebar and sidebar_items %}
<div class="d-block d-sm-none">
<hr>
{% for item in sidebar_items -%}
<li class="nav-item">
{% if item.type != 'input' %}
<a href="{{ item.route }}" class="nav-link {{ 'text-dark' if pathname==item.route else 'text-muted'}}"
{% if item.target %}target="{{ item.target }}"{% endif %}>
{{ _(item.title or item.label) }}
</a>
{% endif %}
</li>
{%- endfor %}
<hr>
</div>
{% endif %}
{% include "templates/includes/navbar/navbar_search.html" %}
{% include "templates/includes/navbar/navbar_login.html" %}
</ul>