mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #143 from matthojo/Login-Screen
Fixes login box being off centred on small screens
This commit is contained in:
commit
ed8ccc2170
2 changed files with 5 additions and 4 deletions
|
@ -23,8 +23,8 @@
|
||||||
$(window).resize(function () {
|
$(window).resize(function () {
|
||||||
|
|
||||||
var loginContainer = $(".js-login-container"),
|
var loginContainer = $(".js-login-container"),
|
||||||
marginTop = Math.round(($(window).height() / 2) - loginContainer.outerHeight());
|
marginTop = Math.floor((loginContainer.parent().height() - loginContainer.height()) / 2) - 15;
|
||||||
loginContainer.css('margin-top', marginTop);
|
loginContainer.css('margin-top', marginTop).fadeIn(400);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
top: 15px;
|
top: 15px;
|
||||||
@include breakpoint($mobile) { top: 0; }
|
@include breakpoint($mobile) { top: 0; }
|
||||||
}
|
}
|
||||||
}//.ghost-login
|
}//.ghost-login
|
||||||
|
|
||||||
.login-box {
|
.login-box {
|
||||||
max-width: 530px;
|
max-width: 530px;
|
||||||
margin: 240px auto; // TODO: Change this to proper vertical centering with JS
|
margin: 0 auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
display: none;
|
||||||
|
|
||||||
@include breakpoint(630px) {
|
@include breakpoint(630px) {
|
||||||
max-width: 264px;
|
max-width: 264px;
|
||||||
|
|
Loading…
Add table
Reference in a new issue