mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #141 from matthojo/Login-Screen
Keep login centered, fixes #134
This commit is contained in:
commit
f2e913ddfd
1 changed files with 9 additions and 3 deletions
|
@ -19,6 +19,14 @@
|
|||
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 () {
|
||||
|
||||
|
@ -33,9 +41,7 @@
|
|||
|
||||
// LOGIN SCREEN
|
||||
|
||||
var loginContainer = $(".js-login-container"),
|
||||
marginTop = Math.round(($(window).height() - loginContainer.height()) / 2);
|
||||
loginContainer.css('margin-top', marginTop);
|
||||
$(window).resize();
|
||||
|
||||
// EDITOR / NOTIFICATIONS
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue