From 5938bbb4367dbad2e75959aec3cde540fed94384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Sun, 23 Feb 2014 13:39:26 +0000 Subject: [PATCH 1/2] Further improve mobile layout * Dynamic sidebar width * Add padding so that entire sidebar is shown when scrolling is needed * this also applies to desktop, btw --- css/glowingbear.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/css/glowingbear.css b/css/glowingbear.css index 8005172..66bf63b 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -172,7 +172,8 @@ input[type=text], input[type=password], .badge { height: 100%; overflow-y: auto; overflow-x: hidden; - margin-top: 35px; /* topbar */ + padding-top: 35px; /* topbar */ + padding-bottom: 1px; /* need to force a padding here */ font-size: smaller; -webkit-transition:0.35s ease all; transition:0.35s ease all; @@ -345,8 +346,10 @@ table.notimestamp td.time { font-size: normal; z-index: 1; bottom: 0px; - width: 60%; + width: auto; + max-width: 60%; top: 0px; + padding-bottom: 35px; } #sidebar.in, #sidebar.collapsing { From 17cc3c90887a90d28c2bddfeac1d5bf48db2d6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Sun, 23 Feb 2014 14:17:59 +0000 Subject: [PATCH 2/2] Disable swiping on desktop --- js/glowingbear.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index 477d0ce..41da5a5 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -670,8 +670,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', } // Open and close panels while on mobile devices through swiping - $scope.swipeSidebar = function() { - $scope.showSidebar = !$scope.showSidebar; + $scope.swipeSidebar = function() { + if (document.body.clientWidth < mobile_cutoff) { + $scope.showSidebar = !$scope.showSidebar; + } }; $scope.openNick = function() {