<header class="md-header" data-md-component="header">
    <nav class="md-header-nav md-grid">
        <div class="md-flex">
            <div class="md-flex__cell md-flex__cell--shrink">
                <a class="md-header-nav__button md-logo"
                   href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}">
                    <img src="{{ config.theme.logo | url }}" style="height:1.2rem;">
                </a>
            </div>
            <div class="md-flex__cell md-flex__cell--shrink">
                <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
            </div>
            <div class="md-flex__cell md-flex__cell--stretch">
                <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
                    {% block site_name %}
                    <span class="md-header-nav__topic">
                    {{ page.title }}
                    </span>
                    {% endblock %}
                </div>
            </div>
            <div class="md-flex__cell md-flex__cell--shrink">
                {% block search_box %}
                {% if "search" in config["plugins"] %}
                <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
                {% include "partials/search.html" %}
                {% endif %}
                {% endblock %}
            </div>
            {% if config.repo_url %}
            <div class="md-flex__cell md-flex__cell--shrink">
                <div class="md-header-nav__source">
                    {% include "partials/source.html" %}
                </div>
            </div>
            {% endif %}
        </div>
    </nav>
</header>