mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixes login staying centred
Now included in `$(window).resize();` to update location of Login container. The login is now more of a visually 'true' centre, with the offset being more towards the top. Centring on resize, wasn't in original commit to remove one extra event listener.
This commit is contained in:
parent
2be5ce72ae
commit
94c8c94ad1
1 changed files with 9 additions and 3 deletions
|
@ -19,6 +19,14 @@
|
||||||
return (obj.textContent || obj.innerText || $(obj).text() || "") === meta[3];
|
return (obj.textContent || obj.innerText || $(obj).text() || "") === meta[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Called on Window resize
|
||||||
|
$(window).resize(function () {
|
||||||
|
|
||||||
|
var loginContainer = $(".js-login-container"),
|
||||||
|
marginTop = Math.round(($(window).height() / 2) - loginContainer.outerHeight());
|
||||||
|
loginContainer.css('margin-top', marginTop);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
@ -33,9 +41,7 @@
|
||||||
|
|
||||||
// LOGIN SCREEN
|
// LOGIN SCREEN
|
||||||
|
|
||||||
var loginContainer = $(".js-login-container"),
|
$(window).resize();
|
||||||
marginTop = Math.round(($(window).height() - loginContainer.height()) / 2);
|
|
||||||
loginContainer.css('margin-top', marginTop);
|
|
||||||
|
|
||||||
// EDITOR / NOTIFICATIONS
|
// EDITOR / NOTIFICATIONS
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue