mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 20:08:54 +00:00
52 lines
2 KiB
Twig
Executable file
52 lines
2 KiB
Twig
Executable file
{# Configuration of navbar buttons #}
|
|
{% set icon_lang = theme_var('menu_langswitcher')|defined('false') %}
|
|
{% set icon_search = theme_var('menu_search')|defined('false') %}
|
|
{% set icon_login = theme_var('menu_login')|defined('false') %}
|
|
{% set logoImageHeader = theme_var('type_logo_header')|defined('text') %}
|
|
<header id="header">
|
|
|
|
<div class="logo">
|
|
|
|
<a href="{{ home_url }}" class="">
|
|
{% if logoImageHeader == 'image' %}
|
|
{% include 'partials/logo.html.twig' with {'logo_class': 'logo-img'} %}
|
|
{% elseif logoImageHeader == 'both' %}
|
|
{% include 'partials/logo.html.twig' with {'logo_class': 'logo-img'} %}{{ site.title }}
|
|
{% else %}
|
|
{{ site.title }}
|
|
{% endif %}
|
|
</a>
|
|
</div>
|
|
|
|
<nav class="dropdown">
|
|
{% block header_navigation %}
|
|
{% include 'partials/navigation.html.twig' %}
|
|
{% endblock %}
|
|
</nav>
|
|
<nav class="main">
|
|
{% block header_extra %}
|
|
<ul>
|
|
{% if icon_login %}
|
|
<li class="login-logout">
|
|
{% if not grav.user.authenticated %}
|
|
<a class="fa-sign-in-alt" href="{{ base_url_absolute }}/login" title="{{ 'PLUGIN_LOGIN.BTN_LOGIN'|t }}">{{ 'PLUGIN_LOGIN.BTN_LOGIN'|t }}</a>
|
|
{% else %}
|
|
<a class="fa-sign-out-alt" href="{{ url(uri.addNonce((uri.path)|trim('/') ~ '/task' ~ config.system.param_sep ~ 'login.logout', 'logout-form', 'logout-nonce'))|e }}" title="{{ 'PLUGIN_LOGIN.BTN_LOGOUT'|t }} {{ grav.user.fullname ?: grav.user.username }}">{{ 'PLUGIN_LOGIN.BTN_LOGOUT'|t }}</a>
|
|
{% endif %}
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% if icon_lang and config.plugins.langswitcher.enabled and system.languages.supported is not null %}
|
|
{% include 'partials/langswitcher.html.twig' %}
|
|
{% endif %}
|
|
|
|
{% if config.plugins.simplesearch.enabled and icon_search %}
|
|
{% include 'partials/simplesearch_searchbox.html.twig' %}
|
|
{% endif %}
|
|
<li class="menu">
|
|
<a class="fa-bars" href="#menu">Menu</a>
|
|
</li>
|
|
</ul>
|
|
{% endblock %}
|
|
</nav>
|
|
</header>
|