FEATURE: Horizontal login / create accout layout

This commit is contained in:
Joe 2018-05-25 20:15:34 +08:00 committed by GitHub
parent 7f6f61cff2
commit 1948a9912c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,31 +1,118 @@
// style that apply to the login popup // -webkit- prefix needed for
// flexbox on Safari 8
// can be removed once support
// for safari 8 is dropped
// shared styles used
// on both the login and
// create accont modals
.login-modal,
.create-account {
#login-buttons:not(.hidden) {
display: -webkit-flex;
-webkit-flex-direction: column;
-webkit-justify-content: center;
-webkit-flex-basis: 50%;
-webkit-align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
flex-basis: 50%;
align-items: center;
min-height: 200px;
border-left: 1px solid $primary-low;
#login-buttons {
button { button {
margin: 0 5px 5px 0; margin: 0.35em;
min-width: 180px; width: 160px;
&:lang(zh_CN) { &:lang(zh_CN) {
min-width: 200px; min-width: 200px;
} }
} }
margin-top: 10px;
margin-bottom: 20px;
} }
// Create account #login-form {
-webkit-flex: 1 0 auto;
flex: 1 0 auto;
padding: 1em 0;
}
.create-account { tr:not(.instructions) {
form { td {
display: -webkit-flex;
display: flex;
padding: 5px 0 0 0;
}
}
tr.input label {
margin-bottom: 0; margin-bottom: 0;
} }
table {
width: 100%;
} }
// styles used on
// login modal only
.d-modal.login-modal {
.modal-body,
#credentials {
display: -webkit-flex;
-webkit-align-items: center;
-webkit-justify-content: center;
display: flex;
align-items: center;
justify-content: center;
tr {
display: -webkit-flex;
-webkit-flex-direction: column;
display: flex;
flex-direction: column;
}
}
}
// styles used on the
// create account
// modal only
.d-modal.create-account {
.modal-body {
display: -webkit-flex;
-webkit-justify-content: space-evenly;
display: flex;
justify-content: space-evenly;
}
.create-account-form tr {
display: -webkit-flex;
-webkit-flex-direction: column;
display: flex;
flex-direction: column;
}
.login-form {
display: -webkit-flex;
-webkit-flex-basis: 50%;
-webkit-align-items: center;
display: flex;
flex-basis: 50%;
align-items: center;
tr:not(.password-confirmation) {
display: -webkit-flex;
-webkit-flex-direction: column;
display: flex;
flex-direction: column;
margin-top: 0.15em;
}
}
form {
margin: 0 auto;
}
tr.input { tr.input {
td { input,
padding-top: 10px; label {
}
input, label {
margin-bottom: 0; margin-bottom: 0;
} }
.tip { .tip {
@ -33,42 +120,16 @@
} }
} }
.tos-agree { .tip {
margin-bottom: 12px; &:not(:empty) + td {
display: none;
} }
.disclaimer { &:not(:empty),
margin-top: 15px; &:empty + td {
} min-height: 1.75em;
width: 240px;
.instructions { font-size: $font-down-1;
label {
color: dark-light-choose($primary-medium, $secondary-medium);
}
}
.user-fields {
border-top: 1px solid $primary-low;
padding-top: 20px;
}
}
.password-reset, .invites-show {
.col-form {
padding-left: 20px;
}
h2 {
margin-bottom: 12px;
}
.col-image img {
width: 200px;
height: 200px;
}
}
.password-reset {
.col-form {
padding-top: 40px;
} }
} }
@ -91,10 +152,12 @@
} }
} }
form { form {
.controls, .input { .controls,
.input {
margin-left: 20px; margin-left: 20px;
} }
input, label { input,
label {
margin-bottom: 0; margin-bottom: 0;
} }
.user-field .control-label:not(.checkbox-label) { .user-field .control-label:not(.checkbox-label) {
@ -102,3 +165,43 @@
} }
} }
} }
.password-reset,
.invites-show {
.col-form {
padding-left: 20px;
}
h2 {
margin-bottom: 12px;
}
.col-image img {
width: 200px;
height: 200px;
}
}
.password-reset {
.col-form {
padding-top: 40px;
}
}
.tos-agree {
margin-bottom: 12px;
}
.disclaimer {
margin-top: 15px;
}
.instructions {
label {
color: dark-light-choose($primary-medium, $secondary-medium);
}
}
.user-fields {
border-top: 1px solid $primary-low;
padding-top: 20px;
}
}