From 2b4519709525c1eedac9c0edce5ce82ebfe65df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 10 Oct 2018 18:37:57 -0400 Subject: [PATCH] closes #402 --- lib/persona.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/persona.js b/lib/persona.js index a7f8cd6..6e24c13 100644 --- a/lib/persona.js +++ b/lib/persona.js @@ -9,8 +9,19 @@ $(document).ready(function() { setupMobileMenu(); setupQuickReply(); configureNavbarHiding(); + fixHeaderPadding(); $(window).on('resize', utils.debounce(configureNavbarHiding, 200)); + $(window).on('resize', fixHeaderPadding); + + function fixHeaderPadding() { + var env = utils.findBootstrapEnvironment(); + if (env === 'sm' || env === 'xs' || env === 'md') { + $('#panel').css('padding-top', $('#header-menu').outerHeight(true)); + } else { + $('#panel').css('padding-top', ''); + } + } function configureNavbarHiding () { var navbarEl = $(".navbar-fixed-top");