diff --git a/static/js/portico/landing-page.js b/static/js/portico/landing-page.js index 57075335f8..78bfcc6bc3 100644 --- a/static/js/portico/landing-page.js +++ b/static/js/portico/landing-page.js @@ -150,10 +150,8 @@ var events = function () { $("body").click(function (e) { var $e = $(e.target); - var should_close = !$e.is("ul, .hamburger") && $e.closest("ul, .hamburger").length === 0; - // this means that it is in mobile sidebar mode. - if ($("nav ul").height() === window.innerHeight && should_close) { + if ($e.is("nav ul .exit")) { $("nav ul").removeClass("show"); } }); diff --git a/static/styles/landing-page.css b/static/styles/landing-page.css index b8a273cc1c..04c5531e01 100644 --- a/static/styles/landing-page.css +++ b/static/styles/landing-page.css @@ -165,6 +165,10 @@ nav ul { cursor: pointer; } +nav ul .exit { + display: none; +} + nav ul li { position: relative; display: inline-block; @@ -2030,6 +2034,17 @@ a:not(.no-style):hover:before { transform: translate(0px, 0px); } + nav ul .exit { + display: block; + position: absolute; + top: 10px; + right: 25px; + + font-weight: 100; + font-size: 3em; + color: initial; + } + nav ul li:first-of-type { margin-top: 20px; } diff --git a/templates/zerver/landing_nav.html b/templates/zerver/landing_nav.html index 4ec261fcaa..1da32cf8ca 100644 --- a/templates/zerver/landing_nav.html +++ b/templates/zerver/landing_nav.html @@ -14,6 +14,7 @@ Zulip