<a class="anchor-pos" id="top"></a>
<nav class="navbar navbar-expand-lg bg-body-tertiary sticky-top">
    <div class="container-fluid">
        <div class="navbar-header">
            {% if logo | length > 0 %}
                <a class="navbar-brand" href="#top">
                    <img alt="Logo" src="{{ logo }}">
                </a>
            {% endif %}
            <a class="navbar-brand anchor" href="#top">{{ title }}</a>
        </div>
        <a class="navbar-toggler"
                type="button"
                data-bs-toggle="offcanvas"
                data-bs-target="#navbar"
                aria-controls="navbar"
                aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </a>
        <div id="navbar" class="offcanvas offcanvas-end" aria-labelledby="offcanvas-navbar-label">
            <div class="offcanvas-header">
                <h5 id="offcanvas-navbar-label" class="offcanvas-title">{{ title }}</h5>
                <a type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></a>
            </div>
            <div class="offcanvas-body">
                <ul class="navbar-nav navbar-nav-scroll justify-content-end flex-grow-1">
                    {% for (name, anchor_id) in nav_items %}
                        <li class="nav-item">
                            <a class="nav-link" href="#{{ anchor_id }}">{{ name }}</a>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </div>
    </div>
</nav>
