<nav id="kbb-navbar" class="navbar{{ ' is-' + style if style else '' }}"
     role="navigation" aria-label="main navigation">
    <div class="navbar-brand">
        <a class="navbar-item" href="{{ pathto('index') }}">
            {% set logo_src = siteconfig.logo.img_file and pathto('_static/' + siteconfig.logo.img_file, 1) or  siteconfig.logo.img_url %}
            <img src="{{ logo_src }}"
                 alt="{{ siteconfig.logo.alt }}">
        </a>
        <button class="button navbar-burger" data-target="navMenu">
            <span></span>
            <span></span>
            <span></span>
        </button>
    </div>
    <div class="navbar-menu" id="navMenu">
        <div class="navbar-start">
            {% for nav in navmenu %}
                <a class="navbar-item{{ ' is-active' if resource and resource.in_navitem(resources, nav.docname) }}"
                   href="{{ pathto(nav.docname, 1) + '.html' }}">
                    {{ nav.props.nav_title or nav.title }}
                </a>
            {% endfor %}

        </div>

        <div class="navbar-end">
            {% if siteconfig.social_media.github %}
                <a class="navbar-item" id="kbb-config-github"
                   href="https://github.com/{{ siteconfig.social_media.github }}">
                <span class="icon has-text-black">
                    <i class="fab fa-github" aria-hidden="true"></i>
                </span>
                </a>
            {% endif %}
            {% if siteconfig.social_media.twitter %}
                <a class="navbar-item" id="kbb-config-twitter"
                   href="https://twitter.com/{{ siteconfig.social_media.twitter }}">
                <span class="icon {{ 'has-text-info' if style not in ['info', 'link'] else 'danger' }}">
                    <i class="fab fa-twitter" aria-hidden="true"></i>
                </span>
                </a>
            {% endif %}
        </div>
    </div>
</nav>
