From 2374d63536fd9459243a235763c87f8e9fdfc581 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 24 Jul 2017 15:09:08 +0200 Subject: Redesign extended information page (#4322) * Redesign extended information page * Remove unused keys * Add $ui-base-lighter-color variable to SCSS --- app/javascript/styles/about.scss | 241 ++++++++++++++++++---------------- app/javascript/styles/boost.scss | 2 +- app/javascript/styles/components.scss | 48 +++---- app/javascript/styles/forms.scss | 4 +- app/javascript/styles/variables.scss | 9 +- 5 files changed, 158 insertions(+), 146 deletions(-) (limited to 'app/javascript/styles') diff --git a/app/javascript/styles/about.scss b/app/javascript/styles/about.scss index 90ad9bea9..01a341538 100644 --- a/app/javascript/styles/about.scss +++ b/app/javascript/styles/about.scss @@ -120,18 +120,55 @@ } .information-board { - margin: 20px 0; - display: flex; - justify-content: space-between; - border-top: 1px solid lighten($ui-base-color, 10%); - border-bottom: 1px solid lighten($ui-base-color, 10%); - padding-right: 14px; + background: darken($ui-base-color, 4%); + padding: 40px 0; + + .panel { + position: absolute; + width: 280px; + box-sizing: border-box; + background: darken($ui-base-color, 8%); + padding: 20px; + padding-top: 10px; + border-radius: 4px 4px 0 0; + right: 0; + bottom: -40px; + + .panel-header { + font-family: 'mastodon-font-display', sans-serif; + font-size: 14px; + line-height: 24px; + font-weight: 500; + color: $ui-base-lighter-color; + padding-bottom: 5px; + margin-bottom: 15px; + border-bottom: 1px solid lighten($ui-base-color, 4%); + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + + span { + font-weight: 400; + color: lighten($ui-base-color, 34%); + } + } + } + + .container { + position: relative; + padding-right: 280px + 15px; + } + + .information-board-sections { + display: flex; + justify-content: space-between; + } .section { flex: 1 0 0; - padding: 14px; - text-align: right; font: 16px/28px 'mastodon-font-sans-serif', sans-serif; + text-align: right; + padding: 0 15px; span, strong { @@ -143,7 +180,6 @@ &:last-child { color: $ui-secondary-color; - font-size: 14px; } } @@ -203,100 +239,6 @@ } } -.contact-email { - text-align: center; - margin: 40px 0; - - strong { - display: block; - color: $primary-text-color; - word-break: break-word; - } -} - -.sidebar-layout { - display: flex; - - .main { - flex: 1 1 auto; - padding: 14px 0; - - .panel { - padding-right: 14px; - } - } - - .sidebar { - border-left: 1px solid lighten($ui-base-color, 10%); - width: 200px; - flex: 0 0 auto; - } - - .panel { - .panel-header { - background: lighten($ui-base-color, 10%); - padding: 7px 14px; - text-transform: uppercase; - font-size: 12px; - font-weight: 500; - } - - .panel-body { - padding: 14px; - } - - .panel-list { - ul { - list-style: none; - margin: 0; - - li { - margin: 0; - font-family: inherit; - font-size: 13px; - line-height: 18px; - - a { - display: block; - padding: 7px 14px; - color: rgba($primary-text-color, 0.7); - text-decoration: none; - transition: all 200ms linear; - - i.fa { - margin-right: 5px; - } - - &:hover { - color: $primary-text-color; - background-color: darken($ui-base-color, 5%); - transition: all 100ms linear; - } - - &.selected { - color: $primary-text-color; - background-color: $ui-highlight-color; - - &:hover { - background-color: lighten($ui-highlight-color, 5%); - } - } - } - } - } - } - } - - @media screen and (max-width: 625px) { - flex-direction: column; - - .sidebar { - border: 1px solid lighten($ui-base-color, 10%); - width: auto; - } - } -} - .features-list__row { display: flex; padding: 10px 0; @@ -322,7 +264,7 @@ .text { font-size: 16px; line-height: 30px; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; h6 { font-weight: 500; @@ -338,6 +280,15 @@ background: linear-gradient(150deg, lighten($ui-base-color, 8%), $ui-base-color); position: relative; + &.compact { + background: $ui-base-color; + padding-bottom: 15px; + + .hero .heading { + padding-bottom: 30px; + } + } + .mascot-container { max-width: 800px; margin: 0 auto; @@ -402,7 +353,7 @@ right: -120px; bottom: 0; animation-duration: 3s; - background-image: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .float-2 { @@ -412,7 +363,7 @@ bottom: 0; animation-duration: 3.5s; animation-delay: 0.2s; - background-image: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .float-3 { @@ -422,7 +373,7 @@ top: -30px; animation-duration: 4s; animation-delay: 0.5s; - background-image: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } } @@ -505,10 +456,6 @@ a { padding-left: 0; color: $white; - - &:hover img { - opacity: 1; - } } img { @@ -517,7 +464,6 @@ position: relative; top: 4px; left: -10px; - opacity: 0.8; } } } @@ -541,6 +487,42 @@ padding: 50px 0; } + .extended-description { + padding: 50px 0; + + ul, + ol { + list-style: inherit; + margin-left: 20px; + + &[type='a'] { + list-style-type: lower-alpha; + } + + &[type='i'] { + list-style-type: lower-roman; + } + } + + li > ol, + li > ul { + margin-top: 20px; + } + + p, + li { + font: 16px/28px 'mastodon-font-sans-serif', sans-serif; + font-weight: 400; + margin-bottom: 12px; + color: $ui-base-lighter-color; + + a { + color: $ui-highlight-color; + text-decoration: underline; + } + } + } + h3 { font-family: 'mastodon-font-display', sans-serif; font-size: 16px; @@ -553,7 +535,7 @@ p { font-size: 16px; line-height: 30px; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } .features { @@ -645,14 +627,14 @@ display: block; font-size: 18px; font-weight: 400; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } } .footer-links { padding-bottom: 50px; text-align: right; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; p { font-size: 14px; @@ -669,6 +651,29 @@ padding: 0 20px; } + .information-board { + padding-bottom: 20px; + } + + .information-board .container { + padding-right: 20px; + + .panel { + position: static; + margin-top: 30px; + width: 100%; + border-radius: 4px; + + .panel-header { + text-align: center; + } + } + } + + .information-board .section { + text-align: center; + } + .header-wrapper .mascot { left: 20px; } @@ -720,6 +725,12 @@ padding: 30px 0; } + .links .brand img { + left: 0; + top: 0; + margin-right: 0; + } + .hero { .simple_form, .closed-registrations-message { diff --git a/app/javascript/styles/boost.scss b/app/javascript/styles/boost.scss index 5eb3149ef..31053decc 100644 --- a/app/javascript/styles/boost.scss +++ b/app/javascript/styles/boost.scss @@ -6,7 +6,7 @@ } button.icon-button i.fa-retweet { - background-image: url("data:image/svg+xml;utf8,"); + background-image: url("data:image/svg+xml;utf8,"); &:hover { background-image: url("data:image/svg+xml;utf8,"); diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 4523c9156..c4c4420eb 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -107,7 +107,7 @@ .icon-button { display: inline-block; padding: 0; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; border: none; background: transparent; cursor: pointer; @@ -145,7 +145,7 @@ &:hover, &:active, &:focus { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } &.active { @@ -185,7 +185,7 @@ &:hover, &:active, &:focus { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; transition: color 200ms ease-out; } @@ -610,13 +610,13 @@ } .status__relative-time { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; float: right; font-size: 14px; } .status__display-name { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } .status__info .status__display-name { @@ -652,14 +652,14 @@ .status__prepend { margin-left: 68px; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; padding: 8px 0; padding-bottom: 2px; font-size: 14px; position: relative; .status__display-name strong { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } } @@ -725,7 +725,7 @@ .detailed-status__meta { margin-top: 15px; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; font-size: 14px; line-height: 18px; } @@ -944,7 +944,7 @@ } abbr { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } } @@ -1046,11 +1046,11 @@ .muted { .status__content p, .status__content a { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } .status__display-name strong { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } .status__avatar { @@ -1058,7 +1058,7 @@ } a.status__content__spoiler-link { - background: lighten($ui-base-color, 26%); + background: $ui-base-lighter-color; color: lighten($ui-base-color, 4%); &:hover { @@ -1273,7 +1273,7 @@ .static-content { padding: 10px; padding-top: 20px; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; h1 { font-size: 16px; @@ -1736,7 +1736,7 @@ .column-subheading { background: $ui-base-color; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; padding: 8px 20px; font-size: 12px; font-weight: 500; @@ -1875,7 +1875,7 @@ } a { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; } } @@ -1939,7 +1939,7 @@ button.icon-button.active i.fa-retweet { font-size: 14px; border: 1px solid lighten($ui-base-color, 8%); border-radius: 4px; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; margin-top: 14px; text-decoration: none; overflow: hidden; @@ -2034,7 +2034,7 @@ button.icon-button.active i.fa-retweet { .load-more { display: block; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; background-color: transparent; border: 0; font-size: inherit; @@ -2723,13 +2723,13 @@ button.icon-button.active i.fa-retweet { color: $ui-secondary-color; font-size: 18px; font-weight: 500; - border: 2px dashed lighten($ui-base-color, 26%); + border: 2px dashed $ui-base-lighter-color; border-radius: 4px; } .upload-progress { padding: 10px; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; overflow: hidden; display: flex; @@ -2754,7 +2754,7 @@ button.icon-button.active i.fa-retweet { width: 100%; height: 6px; border-radius: 6px; - background: lighten($ui-base-color, 26%); + background: $ui-base-lighter-color; position: relative; margin-top: 5px; } @@ -2965,7 +2965,7 @@ button.icon-button.active i.fa-retweet { } .search-results__header { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; background: lighten($ui-base-color, 2%); border-bottom: 1px solid darken($ui-base-color, 4%); padding: 15px 10px; @@ -3559,7 +3559,7 @@ button.icon-button.active i.fa-retweet { .attachment-list__icon { flex: 0 0 auto; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; padding: 8px 18px; cursor: default; border-right: 1px solid lighten($ui-base-color, 8%); @@ -3589,7 +3589,7 @@ button.icon-button.active i.fa-retweet { a { text-decoration: none; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; font-weight: 500; &:hover { @@ -3752,7 +3752,7 @@ button.icon-button.active i.fa-retweet { } .account-section-headline { - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; background: lighten($ui-base-color, 2%); border-bottom: 1px solid lighten($ui-base-color, 4%); padding: 15px 10px; diff --git a/app/javascript/styles/forms.scss b/app/javascript/styles/forms.scss index c467aa7db..cffb6f197 100644 --- a/app/javascript/styles/forms.scss +++ b/app/javascript/styles/forms.scss @@ -32,7 +32,7 @@ code { line-height: 18px; margin-top: 15px; margin-bottom: 0; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; a { color: $ui-primary-color; @@ -308,7 +308,7 @@ code { padding: 7px 4px; padding-bottom: 9px; font-size: 16px; - color: lighten($ui-base-color, 26%); + color: $ui-base-lighter-color; font-family: inherit; pointer-events: none; cursor: default; diff --git a/app/javascript/styles/variables.scss b/app/javascript/styles/variables.scss index 8362096e1..52c8cd1cf 100644 --- a/app/javascript/styles/variables.scss +++ b/app/javascript/styles/variables.scss @@ -22,7 +22,8 @@ $valid-value-color: $success-green !default; $error-value-color: $error-red !default; // Tell UI to use selected colors -$ui-base-color: $classic-base-color !default; // Darkest -$ui-primary-color: $classic-primary-color !default; // Lighter -$ui-secondary-color: $classic-secondary-color !default; // Lightest -$ui-highlight-color: $classic-highlight-color !default; // Vibrant +$ui-base-color: $classic-base-color !default; // Darkest +$ui-base-lighter-color: lighten($ui-base-color, 26%) !default; // Lighter darkest +$ui-primary-color: $classic-primary-color !default; // Lighter +$ui-secondary-color: $classic-secondary-color !default; // Lightest +$ui-highlight-color: $classic-highlight-color !default; // Vibrant -- cgit