diff --git a/static/src/js/events.js b/static/src/js/events.js index 69b88df..bf45c32 100644 --- a/static/src/js/events.js +++ b/static/src/js/events.js @@ -2,7 +2,7 @@ var is_navbar_attached = false; $(window).load(function() { - $(window).trigger('scroll').trigger('resize'); + $(window).trigger('scroll'); }); function detach_navbar() { @@ -42,14 +42,6 @@ function position_navbar() { }); } -function space_navbar() { //This really should be CSS! - if ($(window).width() < 862) { return; } // @screen-sm - var nav_width = $('#navigation').outerWidth(true); - var full_width = $('nav > .container-fluid').outerWidth(true) - $('.home-button').outerWidth(true); - var margin = (full_width - nav_width) / 2; - $('#navigation').css('margin-left', margin); -} - $(function() { // https://css-tricks.com/snippets/jquery/smooth-scrolling/ $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') @@ -72,5 +64,3 @@ $('a[href="soon"]').click(function (e) { }); $(window).scroll(position_navbar); - -$(window).resize(space_navbar); diff --git a/static/src/less/navbar.less b/static/src/less/navbar.less index 49f3440..89c28d6 100644 --- a/static/src/less/navbar.less +++ b/static/src/less/navbar.less @@ -20,6 +20,9 @@ } #navigation { + .flexbox(); + justify-content: center; + float: none; & a { .transition(~"ease-in-out .3s color"); }