mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00

Specifically, the navigation bar now shrinks in height on scroll and when on devices smaller than 768px. Additionally, the search box disappears at the 1280px break point to avoid text wrapping. A JavaScript file was added (main.js) to apply the "compressed" class when scrolling, which is what provides the menu shrinking.
6 lines
152 B
JavaScript
6 lines
152 B
JavaScript
$(document).ready(function() {
|
|
$(window).on("scroll", function() {
|
|
$(".navbar").toggleClass("compressed", $(window).scrollTop() >= 20);
|
|
});
|
|
});
|