<div class="sticky">
    <nav class="navbar navbar-dark navbar-expand-sm bg-dark justify-content-end pe-3 p-0">
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#collapsingNavbar">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="navbar-collapse collapse w-100 p-0" id="collapsingNavbar">
            <ul class="navbar-nav w-100 p-0 justify-content-center" style="display: flex; align-items: center;">
                <li class="nav-item ps-3">
                    <a class="nav-link" href="/">Home</a>
                </li>

                <li class="nav-item ps-3">
                    <a class="nav-link" href="/subpages/research">Research</a>
                </li>

                <li class="nav-item ps-3">
                    <a class="nav-link" href="/subpages/publication">Publications</a>
                </li>

                <li class="nav-item ps-3">
                    <a class="nav-link" href="/contact">Contact</a>
                </li>



{#                    {% for item in navi.values() %}#}
{#                <li class="nav-item ps-3">#}
{#                    <a class="nav-link" href="/{{ item["slug"] }}">{{ item["title"] }}</a>#}
{#                </li>#}
{#                    {% endfor %}#}
                <li class="nav-item ps-3">
                    <a class="nav-link" href="/posts">Blog</a>
                </li>
                <li class="nav-item ps-3">
                          <form class="d-flex">
        <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" id="search-input">

      </form>
                </li>
            </ul>
        </div>
    </nav>
</div>


<div class="search-results" id="search-container">
    <div id = "divToHide">
<div class="row">

      <div class="col-sm-12  col-md-9 offset-md-2 col-lg-8 offset-lg-2 col-xl-6 offset-xl-3">
<section>
<h4><a target="_blank"></a></h4>
<div class="search-preview"></div>
</section>
</div>
</div>
        </div>
</div>

<script>
        const searchInput = document.getElementById('search-input');
        const searchContainer = document.getElementById('search-container');

        searchInput.addEventListener('input', () => {
            // Check if the search input has a value (i.e., user is typing)
            if (searchInput.value.trim()) {
                {#searchContainer.style.border = '4px solid #b36919';#}
                searchContainer.style.color = '#ffffff';
                searchContainer.style.backgroundColor = '#373a44';
            } else {
                searchContainer.style.border = 'none'; // No border when no input
                searchContainer.style.backgroundColor = 'transparent'; // No background color
            }
        });

    </script>


<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.6.2" defer></script>
<script src="{{root_path}}/static/js/fuse-search.js" defer></script>

