[Glitch] Redesign forms, verify link ownership with rel="me"

Port SCSS changes from f4d549d300
This commit is contained in:
Thibaut Girka 2018-09-20 18:21:58 +02:00
parent a6d47ac5f5
commit fba0200765
6 changed files with 323 additions and 164 deletions

View File

@ -267,6 +267,20 @@
} }
} }
.verified {
border: 1px solid rgba($valid-value-color, 0.5);
background: rgba($valid-value-color, 0.25);
a {
color: $valid-value-color;
font-weight: 500;
}
&__mark {
color: $valid-value-color;
}
}
dl:last-child { dl:last-child {
border-bottom: 0; border-bottom: 0;
} }

View File

@ -1,3 +1,5 @@
$no-columns-breakpoint: 600px;
.admin-wrapper { .admin-wrapper {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -24,12 +26,22 @@
height: 100px; height: 100px;
} }
@media screen and (max-width: $no-columns-breakpoint) {
& > a:first-child {
display: none;
}
}
ul { ul {
list-style: none; list-style: none;
border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px;
overflow: hidden; overflow: hidden;
margin-bottom: 20px; margin-bottom: 20px;
@media screen and (max-width: $no-columns-breakpoint) {
margin-bottom: 0;
}
a { a {
display: block; display: block;
padding: 15px; padding: 15px;
@ -62,8 +74,10 @@
a { a {
border: 0; border: 0;
padding: 15px 35px; padding: 15px 35px;
}
}
&.selected { .simple-navigation-active-leaf a {
color: $primary-text-color; color: $primary-text-color;
background-color: $ui-highlight-color; background-color: $ui-highlight-color;
border-bottom: 0; border-bottom: 0;
@ -74,7 +88,9 @@
} }
} }
} }
}
& > ul > .simple-navigation-active-leaf a {
border-radius: 4px 0 0 4px;
} }
} }
@ -89,11 +105,19 @@
padding-top: 60px; padding-top: 60px;
padding-left: 25px; padding-left: 25px;
@media screen and (max-width: $no-columns-breakpoint) {
max-width: none;
padding: 15px;
padding-top: 30px;
}
h2 { h2 {
color: $secondary-text-color; color: $secondary-text-color;
font-size: 24px; font-size: 24px;
line-height: 28px; line-height: 28px;
font-weight: 400; font-weight: 400;
padding-bottom: 40px;
border-bottom: 1px solid lighten($ui-base-color, 8%);
margin-bottom: 40px; margin-bottom: 40px;
} }
@ -108,7 +132,7 @@
h4 { h4 {
text-transform: uppercase; text-transform: uppercase;
font-size: 13px; font-size: 13px;
font-weight: 500; font-weight: 700;
color: $darker-text-color; color: $darker-text-color;
padding-bottom: 8px; padding-bottom: 8px;
margin-bottom: 8px; margin-bottom: 8px;
@ -122,6 +146,11 @@
font-weight: 400; font-weight: 400;
} }
.fields-group h6 {
color: $primary-text-color;
font-weight: 500;
}
& > p { & > p {
font-size: 14px; font-size: 14px;
line-height: 18px; line-height: 18px;
@ -167,30 +196,7 @@
} }
} }
.simple_form { @media screen and (max-width: $no-columns-breakpoint) {
max-width: 400px;
&.edit_user,
&.new_form_admin_settings,
&.new_form_two_factor_confirmation,
&.new_form_delete_confirmation,
&.new_import,
&.new_domain_block,
&.edit_domain_block {
max-width: none;
}
.form_two_factor_confirmation_code,
.form_delete_confirmation_password {
max-width: 400px;
}
.actions {
max-width: 400px;
}
}
@media screen and (max-width: 600px) {
display: block; display: block;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
@ -204,16 +210,8 @@
.sidebar { .sidebar {
width: 100%; width: 100%;
padding: 10px 0; padding: 0;
height: auto; height: auto;
.logo {
margin: 20px auto;
}
}
.content {
padding-top: 20px;
} }
} }
} }

View File

@ -1,3 +1,10 @@
@function hex-color($color) {
@if type-of($color) == 'color' {
$color: str-slice(ie-hex-str($color), 4);
}
@return '%23' + unquote($color)
}
body { body {
font-family: 'mastodon-font-sans-serif', sans-serif; font-family: 'mastodon-font-sans-serif', sans-serif;
background: darken($ui-base-color, 8%); background: darken($ui-base-color, 8%);

File diff suppressed because one or more lines are too long

View File

@ -724,6 +724,14 @@
a { a {
color: lighten($ui-highlight-color, 8%); color: lighten($ui-highlight-color, 8%);
} }
dl:first-child .verified {
border-radius: 0 4px 0 0;
}
.verified a {
color: $valid-value-color;
}
} }
.account__header__content { .account__header__content {

View File

@ -1,3 +1,5 @@
$no-columns-breakpoint: 600px;
code { code {
font-family: 'mastodon-font-monospace', monospace; font-family: 'mastodon-font-monospace', monospace;
font-weight: 400; font-weight: 400;
@ -13,6 +15,60 @@ code {
.input { .input {
margin-bottom: 15px; margin-bottom: 15px;
overflow: hidden; overflow: hidden;
&.hidden {
margin: 0;
}
&.radio_buttons {
.radio {
margin-bottom: 15px;
&:last-child {
margin-bottom: 0;
}
}
.radio > label {
position: relative;
padding-left: 28px;
input {
position: absolute;
top: -2px;
left: 0;
}
}
}
&.boolean {
position: relative;
margin-bottom: 0;
.label_input > label {
font-family: inherit;
font-size: 14px;
padding-top: 5px;
color: $primary-text-color;
display: block;
width: auto;
}
.label_input,
.hint {
padding-left: 28px;
}
.label_input__wrapper {
position: static;
}
label.checkbox {
position: absolute;
top: 2px;
left: 0;
}
}
} }
.row { .row {
@ -27,9 +83,22 @@ code {
} }
} }
.hint {
color: $darker-text-color;
a {
color: $highlight-text-color;
}
code {
border-radius: 3px;
padding: 0.2em 0.4em;
background: darken($ui-base-color, 12%);
}
}
span.hint { span.hint {
display: block; display: block;
color: $darker-text-color;
font-size: 12px; font-size: 12px;
margin-top: 4px; margin-top: 4px;
} }
@ -44,17 +113,6 @@ code {
line-height: 18px; line-height: 18px;
margin-top: 15px; margin-top: 15px;
margin-bottom: 0; margin-bottom: 0;
color: $darker-text-color;
a {
color: $highlight-text-color;
}
}
code {
border-radius: 3px;
padding: 0.2em 0.4em;
background: darken($ui-base-color, 12%);
} }
} }
@ -72,83 +130,60 @@ code {
} }
} }
.input.with_floating_label {
.label_input { .label_input {
display: flex; display: flex;
label { & > label {
font-family: inherit;
font-size: 14px;
color: $primary-text-color;
font-weight: 500;
min-width: 150px;
flex: 0 0 auto; flex: 0 0 auto;
} }
input { input,
select {
flex: 1 1 auto; flex: 1 1 auto;
} }
} }
&.select .hint {
margin-top: 6px;
margin-left: 150px;
}
}
.input.with_label { .input.with_label {
padding: 15px 0;
margin-bottom: 0;
.label_input {
flex-wrap: wrap;
align-items: flex-start;
}
&.select .label_input {
align-items: initial;
}
.label_input > label {
font-family: inherit;
font-size: 16px;
color: $primary-text-color;
display: block;
padding-top: 5px;
margin-bottom: 5px;
flex: 1;
min-width: 150px;
word-wrap: break-word;
&.select {
flex: 0;
}
& ~ * {
margin-left: 10px;
}
}
ul {
flex: 390px;
}
&.boolean {
padding: initial;
margin-bottom: initial;
.label_input > label { .label_input > label {
font-family: inherit; font-family: inherit;
font-size: 14px; font-size: 14px;
color: $primary-text-color; color: $primary-text-color;
display: block; display: block;
width: auto; margin-bottom: 8px;
word-wrap: break-word;
font-weight: 500;
} }
label.checkbox { .hint {
position: relative; margin-top: 6px;
padding-left: 25px;
flex: 1 1 auto;
} }
ul {
flex: 390px;
} }
} }
.input.with_block_label { .input.with_block_label {
padding-top: 15px; max-width: none;
& > label { & > label {
font-family: inherit; font-family: inherit;
font-size: 16px; font-size: 16px;
color: $primary-text-color; color: $primary-text-color;
display: block; display: block;
font-weight: 500;
padding-top: 5px; padding-top: 5px;
} }
@ -161,8 +196,59 @@ code {
} }
} }
.required abbr {
text-decoration: none;
color: lighten($error-value-color, 12%);
}
.fields-group { .fields-group {
margin-bottom: 25px; margin-bottom: 25px;
.input:last-child {
margin-bottom: 0;
}
}
.fields-row {
display: flex;
margin: 0 -10px;
padding-top: 5px;
margin-bottom: 25px;
.input {
max-width: none;
}
&__column {
box-sizing: border-box;
padding: 0 10px;
flex: 1 1 auto;
min-height: 1px;
&-6 {
max-width: 50%;
}
}
.fields-group:last-child,
.fields-row__column.fields-group {
margin-bottom: 0;
}
@media screen and (max-width: $no-columns-breakpoint) {
display: block;
margin-bottom: 0;
&__column {
max-width: none;
}
.fields-group:last-child,
.fields-row__column.fields-group,
.fields-row__column {
margin-bottom: 25px;
}
}
} }
.input.radio_buttons .radio label { .input.radio_buttons .radio label {
@ -174,36 +260,6 @@ code {
width: auto; width: auto;
} }
.input.boolean {
margin-bottom: 5px;
label {
font-family: inherit;
font-size: 14px;
color: $primary-text-color;
display: block;
width: auto;
}
label.checkbox {
position: relative;
padding-left: 25px;
flex: 1 1 auto;
}
input[type=checkbox] {
position: absolute;
left: 0;
top: 5px;
margin: 0;
}
.hint {
padding-left: 25px;
margin-left: 0;
}
}
.check_boxes { .check_boxes {
.checkbox { .checkbox {
label { label {
@ -232,12 +288,7 @@ code {
input[type=email], input[type=email],
input[type=password], input[type=password],
textarea { textarea {
background: transparent;
box-sizing: border-box; box-sizing: border-box;
border: 0;
border-bottom: 2px solid $ui-primary-color;
border-radius: 2px 2px 0 0;
padding: 7px 4px;
font-size: 16px; font-size: 16px;
color: $primary-text-color; color: $primary-text-color;
display: block; display: block;
@ -245,23 +296,31 @@ code {
outline: 0; outline: 0;
font-family: inherit; font-family: inherit;
resize: vertical; resize: vertical;
background: darken($ui-base-color, 10%);
border: 1px solid darken($ui-base-color, 14%);
border-radius: 4px;
padding: 10px;
&:invalid { &:invalid {
box-shadow: none; box-shadow: none;
} }
&:focus:invalid { &:focus:invalid {
border-bottom-color: lighten($error-red, 12%); border-color: lighten($error-red, 12%);
} }
&:required:valid { &:required:valid {
border-bottom-color: $valid-value-color; border-color: $valid-value-color;
}
&:hover {
border-color: darken($ui-base-color, 20%);
} }
&:active, &:active,
&:focus { &:focus {
border-bottom-color: $highlight-text-color; border-color: $highlight-text-color;
background: rgba($base-overlay-background, 0.1); background: darken($ui-base-color, 8%);
} }
} }
@ -345,22 +404,32 @@ code {
} }
select { select {
appearance: none;
box-sizing: border-box;
font-size: 16px; font-size: 16px;
max-height: 29px; color: $primary-text-color;
display: block;
width: 100%;
outline: 0;
font-family: inherit;
resize: vertical;
background: darken($ui-base-color, 10%) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14.933 18.467' height='19.698' width='15.929'><path d='M3.467 14.967l-3.393-3.5H14.86l-3.392 3.5c-1.866 1.925-3.666 3.5-4 3.5-.335 0-2.135-1.575-4-3.5zm.266-11.234L7.467 0 11.2 3.733l3.733 3.734H0l3.733-3.734z' fill='#{hex-color(lighten($ui-base-color, 12%))}'/></svg>") no-repeat right 8px center / auto 16px;
border: 1px solid darken($ui-base-color, 14%);
border-radius: 4px;
padding: 10px;
height: 41px;
} }
.input-with-append { .label_input {
&__wrapper {
position: relative; position: relative;
.input input {
padding-right: 142px;
} }
.append { &__append {
position: absolute; position: absolute;
right: 0; right: 1px;
top: 0; top: 1px;
padding: 7px 4px; padding: 10px;
padding-bottom: 9px; padding-bottom: 9px;
font-size: 16px; font-size: 16px;
color: $dark-text-color; color: $dark-text-color;
@ -379,7 +448,7 @@ code {
right: 0; right: 0;
bottom: 1px; bottom: 1px;
width: 5px; width: 5px;
background-image: linear-gradient(to right, rgba($ui-base-color, 0), $ui-base-color); background-image: linear-gradient(to right, rgba(darken($ui-base-color, 10%), 0), darken($ui-base-color, 10%));
} }
} }
} }
@ -455,6 +524,30 @@ code {
} }
} }
.quick-nav {
list-style: none;
margin-bottom: 25px;
font-size: 14px;
li {
display: inline-block;
margin-right: 10px;
}
a {
color: $highlight-text-color;
text-transform: uppercase;
text-decoration: none;
font-weight: 700;
&:hover,
&:focus,
&:active {
color: lighten($highlight-text-color, 8%);
}
}
}
.oauth-prompt, .oauth-prompt,
.follow-prompt { .follow-prompt {
margin-bottom: 30px; margin-bottom: 30px;
@ -628,3 +721,49 @@ code {
font-family: 'mastodon-font-monospace', monospace; font-family: 'mastodon-font-monospace', monospace;
} }
} }
.input-copy {
background: darken($ui-base-color, 10%);
border: 1px solid darken($ui-base-color, 14%);
border-radius: 4px;
display: flex;
align-items: center;
padding-right: 4px;
position: relative;
top: 1px;
transition: border-color 300ms linear;
&__wrapper {
flex: 1 1 auto;
}
input[type=text] {
background: transparent;
border: 0;
padding: 10px;
font-size: 14px;
font-family: 'mastodon-font-monospace', monospace;
}
button {
flex: 0 0 auto;
margin: 4px;
text-transform: none;
font-weight: 400;
font-size: 14px;
padding: 7px 18px;
padding-bottom: 6px;
width: auto;
transition: background 300ms linear;
}
&.copied {
border-color: $valid-value-color;
transition: none;
button {
background: $valid-value-color;
transition: none;
}
}
}