I recently built a Wordpress site using Bootstrap 4.5 for the front-end, marking my first experience with Bootstrap. The site currently features the standard sticky Bootstrap 4 navbar as shown in the code snippet below:
<header>
<nav class="navbar navbar-dark navbar-expand-md bg-dark box-shadow fixed-top">
<a href="https://www.explorecinema.com" class="navbar-brand">
<h1 class="text-uppercase site-title"><?php bloginfo( 'name' ); ?></h1>
</a>
<p class="navbar-text site-description mb-0">
<?php
$description = get_bloginfo( 'description', 'display' );
echo $description;
?>
</p>
<button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse justify-content-end" id="navbarCollapse" style="">
<ul class="navbar-nav">
<li class="nav-item">
<a href="https://www.explorecinema.com/about-us/" class="nav-link navbar-right"> About</a>
</li>
</ul>
<form class="form-inline mt-2 mt-md-0">
<ul class="navbar-nav">
<li class="nav-item">
<a href="https://www.explorecinema.com/suggest-content/" class="navbar-link btn btn-outline-success">Suggest Content</a>
</li>
</ul>
</form>
</div>
</nav>
</header>
The default setup has the page title and filters positioned in the main container below the navbar. However, I want to achieve a styling similar to the mock-up image below when the user scrolls down:
Link to mock-up image: https://i.sstatic.net/RRsFz.png
I'm not familiar with how to implement this feature but I assume JQuery/Javascript might be required. My initial idea is to hide the default header and filters and then add them to the navbar as hidden elements which will become visible upon scrolling. But how can I ensure that the responsive design of the navbar remains intact?