UX: Move modal footer into better container (#12429)

* UX: Move modal footer into better container

This commit moves the modal footer under the sign-up form for a more cohesive feel between the login + create account modals.
This commit is contained in:
Jordan Vidrine 2021-03-17 14:10:49 -05:00 committed by GitHub
parent 44153cde18
commit 74dbf2b1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 55 deletions

View File

@ -147,10 +147,6 @@
{{/if}} {{/if}}
</form> </form>
</div> </div>
</div>
{{/if}}
{{/d-modal-body}}
{{#if showCreateForm}} {{#if showCreateForm}}
<div class="modal-footer"> <div class="modal-footer">
{{d-button {{d-button
@ -172,5 +168,8 @@
{{plugin-outlet name="create-account-after-modal-footer" tagName=""}} {{plugin-outlet name="create-account-after-modal-footer" tagName=""}}
{{/if}} {{/if}}
</div>
{{/if}}
{{/d-modal-body}}
{{/unless}} {{/unless}}
{{/create-account}} {{/create-account}}

View File

@ -23,12 +23,6 @@
order: 2; order: 2;
button { button {
&:first-of-type {
margin-top: 2.8em;
}
&:last-of-type {
margin-bottom: 3em;
}
margin: 0.35em; margin: 0.35em;
&:lang(zh_CN) { &:lang(zh_CN) {
min-width: 200px; min-width: 200px;
@ -194,44 +188,27 @@
// create account // create account
// modal only // modal only
.d-modal.create-account { .d-modal.create-account {
.create-account { .create-account-body {
position: relative; min-width: 700px !important;
}
.modal-body:not(.reorder-categories):not(.poll-ui-builder):not(.poll-breakdown) { .modal-body:not(.reorder-categories):not(.poll-ui-builder):not(.poll-breakdown) {
max-height: 70vh !important; max-height: 70vh !important;
overflow: hidden; overflow: hidden;
} }
}
.modal-footer {
padding: 2em 3em;
}
.has-alt-auth .create-account-form { .has-alt-auth .create-account-form {
display: grid; display: grid;
grid-template-columns: 65% 35%; grid-template-columns: 65% 35%;
grid-template-rows: auto 1fr; grid-template-rows: auto 1fr;
grid-template-areas: grid-template-areas:
"header login-buttons" "header login-buttons"
"form login-buttons"; "form login-buttons"
"footer login-buttons";
} }
.create-account-form { .create-account-form {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
position: relative; position: relative;
&:after {
content: "";
display: block;
position: absolute;
width: 65%;
pointer-events: none;
bottom: 0;
left: 0;
height: 1em;
background-image: linear-gradient(
to bottom,
rgba(var(--secondary-rgb), 0),
rgba(var(--secondary-rgb), 1)
);
}
} }
.create-account-login-buttons { .create-account-login-buttons {
display: none; display: none;
@ -257,9 +234,29 @@
display: flex; display: flex;
padding: 0; padding: 0;
} }
.modal-footer {
grid-area: footer;
background-color: var(--secondary);
position: relative;
&:before {
content: "";
display: block;
position: absolute;
width: 100%;
pointer-events: none;
top: calc(-1em - 1px);
left: 0;
height: 1em;
background-image: linear-gradient(
to bottom,
rgba(var(--secondary-rgb), 0),
rgba(var(--secondary-rgb), 1)
);
}
}
.login-welcome-header { .login-welcome-header {
grid-area: header; grid-area: header;
padding: 3em 3em 1em; padding: 3em 2em 1em;
.login-title { .login-title {
font-size: $font-up-6; font-size: $font-up-6;
@ -280,18 +277,24 @@
.has-alt-auth .login-form, .has-alt-auth .login-form,
.login-form { .login-form {
background: var(--secondary); background: var(--secondary);
padding: 2em 3em 0; padding: 1em 0 0 0;
grid-area: form; grid-area: form;
overflow-y: scroll; overflow-y: scroll;
.input-group { .input-group {
padding: 0 2em;
margin-bottom: 1em; margin-bottom: 1em;
input { input {
width: 100%; width: 100%;
} }
input:not(.value-entered):not(:focus) + label.alt-placeholder { input:not(.value-entered):not(:focus) + label.alt-placeholder {
top: 12px; top: 12px;
left: 3em;
}
input:focus + label.alt-placeholder,
input.value-entered + label.alt-placeholder {
top: -8px;
left: calc(3em - 0.25em);
} }
} }
.password-confirmation { .password-confirmation {
@ -324,6 +327,16 @@
} }
.user-field { .user-field {
&.text {
label.control-label {
left: 3em !important;
max-width: calc(100% - 6em) !important;
}
&.value-entered label.control-label,
label.control-label.value-entered {
left: calc(3em - 0.25em) !important;
}
}
display: flex; display: flex;
flex-direction: column; flex-direction: column;
&.confirm { &.confirm {