{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template theme_foundation/partials/navbar-secure

    Secure navbar.

    Context variables required for this template:
    * sitename - The name of the site.
    * output - The core renderer for the page.
    * config - The config instance.
    * hasdrawerblocks - true if there are drawer blocks on this page.
    * drawerclosed - true if the drawer is closed on this page.
    * navbarposition - Position of the navbar on the page.
    * navbarstyle - Style.
    * fa - true if using Font Awesome 4.
    * fav - true if using Font Awesome 5.
    * favi - true if using Font Awesome 6.

    Example context (json):
    {
        "output": {
            "should_display_navbar_logo": "true",
            "get_compact_logo_url": "http://example.com/image.png"
        },
        "sitename": "Moodle Site",
        "config": "",
        "hasdrawerblocks": true,
        "drawerclosed": true,
        "navbarposition": "top",
        "navbarstyle": "dark",
        "fa": false,
        "fav": true,
        "favi": false
    }
}}
<nav class="fixed-{{navbarposition}} navbar navbar-{{navbarstyle}} bg-primary navbar-expand-md moodle-has-zindex" aria-label="{{#str}}sitemenubar, admin{{/str}}">
    {{> partials/navbardrawerblocks}}

    {{# output.should_display_navbar_logo }}
        <span class="logo d-none d-sm-inline">
            <img src="{{output.get_compact_logo_url}}" alt="{{sitename}}">
        </span>
    {{/ output.should_display_navbar_logo }}
    <span class="site-name d-none d-md-inline">{{{ sitename }}}</span>

    <!-- primary_menu -->
    {{{ output.primary_menu }}}
    <ul class="nav navbar-nav ml-auto">
        <!-- Anti-gravity -->
        <li class="nav-item">
            <div class="d-flex navbarantigravity">
                <div class="bttc antigravity">
                    <div class="btts nav-link" title="{{#str}}backtotop, theme_foundation{{/str}}"><span aria-hidden="true" class="{{#fa}}fa fa-arrow-circle-o-up{{/fa}}{{#fav}}far fa-arrow-alt-circle-up{{/fav}}{{#favi}}fa-regular fa-arrow-alt-circle-up{{/favi}}"></span></div>
                    <div class="backtotop nav-link" title="{{#str}}backtotop, theme_foundation{{/str}}"><span aria-hidden="true" class="{{#fa}}fa fa-arrow-circle-o-up{{/fa}}{{#fav}}far fa-arrow-alt-circle-up{{/fav}}{{#favi}}fa-regular fa-arrow-alt-circle-up{{/favi}}"></span></div>
                </div>
                <div class="gtbc antigravity">
                    <div class="gtbs nav-link" title="{{#str}}gotobottom, theme_foundation{{/str}}"><span aria-hidden="true" class="{{#fa}}fa fa-arrow-circle-o-down{{/fa}}{{#fav}}far fa-arrow-alt-circle-down{{/fav}}{{#favi}}fa-regular fa-arrow-alt-circle-down{{/favi}}"></span></div>
                    <div class="gotobottom nav-link" title="{{#str}}gotobottom, theme_foundation{{/str}}"><span aria-hidden="true" class="{{#fa}}fa fa-arrow-circle-o-down{{/fa}}{{#fav}}far fa-arrow-alt-circle-down{{/fav}}{{#favi}}fa-regular fa-arrow-alt-circle-down{{/favi}}"></span></div>
                </div>
            </div>
        </li>
        {{# output.secure_layout_language_menu }}
        <ul class="navbar-nav d-none d-md-flex">
            <!-- language_menu -->
            {{{ . }}}
        </ul>
        {{/ output.secure_layout_language_menu }}
        {{# output.secure_layout_login_info }}
        <div class="ml-auto">
            {{{ . }}}
        </div>
        {{/ output.secure_layout_login_info }}
    </ul>
</nav>
{{#js}}
require(['theme_foundation/anti_gravity']);
{{/js}}
