From 1ae5a06ff854e577dd0fc485e0225cfd2821a440 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Tue, 30 Aug 2022 15:28:10 +1000 Subject: [PATCH] Fix #822 --- resources/js/jethro.js | 7 +++++-- resources/less/jethro.less.php | 12 +++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/resources/js/jethro.js b/resources/js/jethro.js index 93025395..2bb3b654 100644 --- a/resources/js/jethro.js +++ b/resources/js/jethro.js @@ -26,7 +26,7 @@ $(document).ready(function() { } // add a back button - $('a.brand').parent().prepend('') + $('a.brand').parent().prepend('') // stay inside the app, avoid linking out to mobile safari $("a").click(function (event) { @@ -43,7 +43,10 @@ $(document).ready(function() { } }); } - if (("standalone" in window.navigator) && !window.navigator.standalone) { + if ((navigator.userAgent.toLowerCase().indexOf('safari/') > -1) + && ("standalone" in window.navigator) + && !window.navigator.standalone) { + // we're in safari, but not in standalone mode, so show the tip $('.a2hs-prompt').show(); } diff --git a/resources/less/jethro.less.php b/resources/less/jethro.less.php index a6b5020b..164ddcbb 100644 --- a/resources/less/jethro.less.php +++ b/resources/less/jethro.less.php @@ -248,7 +248,9 @@ display: table-cell; vertical-align: middle; height: 40px; -/* border: 1px solid green;*/ + position: absolute; + margin-top: 0px; + z-index: 888; } #jethro-public #jethro-nav-toprow h1 { line-height: 40px; @@ -256,20 +258,21 @@ /* mobile back button */ #jethro-nav-toprow .icon-chevron-left { float: left; - margin-top: 9px; + margin-top: 12px; + margin-right: 3px; } #jethro-nav-toprow .brand { background: url(../img/jethro-white.png); background-repeat: no-repeat; background-position: 50% 50%; font-size: 0.01em; - height: 24px; - margin: 7px 10px 5px 0px; + height: 40px; padding: 0; text-indent: -9999px; width: 106px; float: left; display: block; + margin-right: 5px; } #jethro-nav .btn-navbar { display: none; @@ -324,7 +327,6 @@ display: inline; } #jethro-nav-toprow .brand { - position: absolute; top: 7px; z-index: 888; margin: 0px;