From d6e0835ae24768e4b73b9bd7fe662e3304a6aeb9 Mon Sep 17 00:00:00 2001 From: Matthew Harrison-Jones Date: Wed, 21 Aug 2013 12:45:33 +0100 Subject: [PATCH] Bug Fix: Login form now maintains the right layout on reize --- ghost/admin/assets/sass/layouts/login.scss | 3 +-- ghost/admin/views/login.js | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ghost/admin/assets/sass/layouts/login.scss b/ghost/admin/assets/sass/layouts/login.scss index 6f5f500074..ca876fa06d 100644 --- a/ghost/admin/assets/sass/layouts/login.scss +++ b/ghost/admin/assets/sass/layouts/login.scss @@ -19,8 +19,7 @@ } main { - top: 15px; - @include breakpoint($mobile) { top: 0; } + top: 0; } }//.ghost-login diff --git a/ghost/admin/views/login.js b/ghost/admin/views/login.js index 4bd30eb964..08c7343ba0 100644 --- a/ghost/admin/views/login.js +++ b/ghost/admin/views/login.js @@ -24,7 +24,13 @@ }, centerOnResize: _.debounce(function (e) { - $(".js-login-container").center(); + var container = $(".js-login-container"); + container.css({ + 'position': 'relative' + }).animate({ + 'top': Math.round($(window).height() / 2) - container.outerHeight() / 2 + 'px' + }); + $(window).trigger("centered"); }, 100), remove: function () {