discourse/app/assets/stylesheets/wizard.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

657 lines
11 KiB
SCSS
Raw Normal View History

@import "wizard_fonts";
@import "color_definitions";
@import "vendor/normalize";
@import "vendor/normalize-ext";
@import "vendor/sweetalert";
2017-10-19 15:51:08 -04:00
@import "common/foundation/colors";
@import "common/foundation/variables";
2019-11-06 14:16:23 -05:00
@import "common/foundation/mixins";
@import "common/select-kit/*";
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-26 16:49:57 -05:00
@import "common/components/svg";
body.wizard {
background-color: var(--secondary);
background-repeat: repeat;
background-position: left top;
color: var(--primary-very-high);
2018-01-12 17:27:38 -05:00
line-height: $line-height-large;
font-size: 15px;
2020-07-22 10:24:04 -04:00
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
#wizard-main:before {
mask: asset-url("/images/wizard/bubbles.svg");
-webkit-mask: asset-url("/images/wizard/bubbles.svg");
mask-size: 30%;
-webkit-mask-size: 30%;
background-color: var(--primary-low-mid);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: "";
opacity: 0.6;
}
}
.finish-installation {
.tada {
width: 300px;
}
.row {
text-align: center;
margin-bottom: 1em;
}
.help-text {
color: var(--primary-medium);
}
}
.discourse-logo {
&,
svg {
height: 30px;
width: 110px;
}
.logo-contour {
fill: var(--primary);
}
}
.wizard-warning {
font-family: sans-serif;
p {
margin-top: 0;
}
fieldset {
display: none;
}
h2 {
display: none;
}
.sa-icon {
display: none !important;
}
}
.select {
width: 400px;
}
.wizard-canvas {
position: absolute;
top: 0;
left: 0;
z-index: 10;
}
.staff-count {
font-weight: bold;
}
.wizard-step-privacy {
label[for="privacy_options"] .field-description {
margin-bottom: 1em;
font-weight: bold;
}
.field-privacy-options {
margin-bottom: 0.8em;
.radio-label {
font-weight: normal;
}
}
}
.wizard-step-form {
max-height: 500px;
}
2016-09-21 11:22:46 -04:00
.wizard-step-emoji {
.radio-area {
display: flex;
flex-direction: row;
align-items: center;
input {
flex: 1 0 0px;
2016-09-21 11:22:46 -04:00
}
span {
flex: 10 0 0;
}
span.extra-label {
flex: 20 0 0;
}
}
.emoji-preview {
margin-left: 1em;
img {
2016-09-21 12:03:48 -04:00
height: 40px;
width: 40px;
2016-09-21 11:22:46 -04:00
padding-right: 0.5em;
}
}
}
.wizard-step-homepage {
.field-homepage-style {
width: 280px;
}
}
.wizard-step-colors,
.wizard-step-fonts {
max-height: 465px;
overflow-y: auto;
.grid {
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
padding: 0;
margin: 0 auto;
list-style-type: none;
text-align: center;
li {
display: inline-block;
vertical-align: top;
margin: 0 5px 25px 5px;
label:checked + div {
display: none;
}
.is-selected {
box-shadow: 0 0 0 5px var(--tertiary);
}
div {
display: flex;
flex: 1 1 auto;
}
.radio-area {
display: none;
& > * {
position: relative;
right: 7px;
}
}
canvas {
transition: box-shadow 0.25s;
&:hover {
box-shadow: shadow("card");
cursor: pointer;
}
}
}
}
}
.wizard-column {
position: relative;
z-index: 11;
background-color: var(--secondary);
box-shadow: 0 5px 10px rgba(var(--primary-rgb), 0.15);
box-sizing: border-box;
2016-08-25 13:14:56 -04:00
margin: 1.5em auto;
padding: 0;
max-width: 700px;
min-width: 280px;
width: 100%;
border: 1px solid var(--primary-low-mid);
border-radius: 5px;
a {
text-decoration: none;
color: var(--tertiary);
}
.preloaded-font-styles {
font-size: 1px;
}
.wizard-step-contents {
height: 550px;
margin-bottom: 2em;
}
.wizard-column-contents {
2016-08-25 13:14:56 -04:00
padding: 1.2em;
h1 {
2016-08-25 13:14:56 -04:00
margin: 0 0 1em 0;
}
}
.wizard-step-description {
margin-bottom: 2em;
}
.wizard-step-banner {
margin-bottom: 2em;
2016-09-20 16:49:42 -04:00
width: 660px;
}
2016-08-25 13:14:56 -04:00
.wizard-footer {
border-top: 1px solid var(--primary-low-mid);
background-color: var(--primary-low);
2016-08-25 13:14:56 -04:00
padding: 0.5em;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
2016-08-25 13:14:56 -04:00
}
.wizard-progress {
border: 1px solid var(--tertiary-high);
2016-09-20 14:04:18 -04:00
width: 200px;
height: 1.4em;
div {
position: absolute;
height: 1.4em;
}
.white {
background: var(--secondary);
2016-09-20 14:04:18 -04:00
width: 200px;
z-index: 11;
}
.black {
background: var(--primary);
transition: width 0.3s;
2016-09-20 14:04:18 -04:00
z-index: 12;
}
span {
position: absolute;
2018-01-12 17:27:38 -05:00
font-size: $font-0;
2016-09-20 14:04:18 -04:00
mix-blend-mode: difference;
color: var(--secondary-or-primary);
2016-09-20 14:04:18 -04:00
z-index: 13;
2018-01-12 17:27:38 -05:00
left: 1.5em;
}
2016-09-20 14:04:18 -04:00
.screen {
background-color: var(--tertiary-high);
2016-09-20 14:04:18 -04:00
mix-blend-mode: screen;
width: 200px;
z-index: 14;
2016-08-25 13:14:56 -04:00
}
}
.action-link {
margin-right: 1em;
text-decoration: none;
color: var(--tertiary);
}
2016-09-08 16:58:07 -04:00
.wizard-btn {
border-radius: 2px;
2018-01-12 17:27:38 -05:00
font-size: $font-0;
border: 0;
2016-09-08 16:58:07 -04:00
padding: 0.5em;
transition: background-color 0.3s;
2016-09-08 16:58:07 -04:00
margin-right: 0.5em;
text-decoration: none;
background-color: var(--secondary);
color: var(--primary-very-high);
box-shadow: 0 1px 4px rgba(var(--always-black-rgb), 0.4);
cursor: pointer;
2016-09-08 16:58:07 -04:00
2016-09-13 15:14:17 -04:00
&.small {
padding: 0.25em 0.5em;
2018-01-12 17:27:38 -05:00
font-size: $font-down-1;
2016-09-13 15:14:17 -04:00
}
&:hover,
&:focus {
background-color: var(--primary-low);
2016-09-08 16:58:07 -04:00
}
&:active {
background-color: var(--primary-low-mid);
2016-09-08 16:58:07 -04:00
}
&:disabled,
2016-09-08 16:58:07 -04:00
&.disabled {
background-color: var(--primary-medium);
2016-09-08 16:58:07 -04:00
}
.d-icon-chevron-right {
2016-09-08 16:58:07 -04:00
margin-left: 0.25em;
font-size: 0.8em;
}
.d-icon-chevron-left {
2016-09-08 16:58:07 -04:00
margin-right: 0.25em;
font-size: 0.8em;
}
}
2016-09-13 15:14:17 -04:00
.wizard-btn.primary {
background-color: var(--tertiary);
color: var(--secondary);
box-shadow: 0 1px 4px rgba(var(--always-black-rgb), 0.6);
2016-09-13 15:14:17 -04:00
&:hover,
&:focus {
background-color: var(--tertiary-hover);
2016-09-13 15:14:17 -04:00
}
&:active {
background-color: var(--tertiary-high);
2016-09-13 15:14:17 -04:00
}
&:disabled {
background-color: var(--tertiary-low);
2016-09-13 15:14:17 -04:00
}
}
.wizard-btn.danger {
background-color: var(--danger);
color: var(--secondary);
2016-09-13 15:14:17 -04:00
&:hover,
&:focus {
background-color: var(--danger-hover);
2016-09-13 15:14:17 -04:00
}
&:active {
background-color: var(--danger-medium);
2016-09-13 15:14:17 -04:00
}
&:disabled {
background-color: var(--danger-low);
2016-09-13 15:14:17 -04:00
}
}
2016-09-08 16:58:07 -04:00
.wizard-btn-upload {
clear: both;
display: inline-block;
.fa {
margin-left: 0.5em;
}
}
2016-08-25 13:14:56 -04:00
.wizard-hidden-upload-field {
visibility: hidden;
position: absolute;
}
2016-08-25 13:14:56 -04:00
.wizard-step-footer {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
2016-09-08 16:58:07 -04:00
.wizard-btn.next {
2016-08-25 13:14:56 -04:00
min-width: 70px;
.d-icon-chevron-right {
2016-08-25 13:14:56 -04:00
margin-left: 0.25em;
font-size: 0.8em;
}
}
button.wizard-btn:last-child {
margin-right: 0;
}
button.wizard-btn.done,
button.wizard-btn.finish {
color: var(--secondary);
background-color: var(--success);
&:hover,
&:focus {
background-color: var(--success-hover);
}
&:active {
background-color: var(--success-medium);
}
&:disabled {
background-color: var(--success-low);
}
}
2016-08-25 13:14:56 -04:00
}
2016-09-08 16:58:07 -04:00
.wizard-image-row {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.wizard-image-preview {
img.field-logo-url {
max-height: 40px;
}
img.field-logo-small-url {
max-height: 40px;
max-width: 80px;
}
img.field-favicon-url {
max-height: 16px;
max-width: 16px;
}
img.field-apple-touch-icon-url {
max-height: 40px;
max-width: 40px;
}
padding: 0.1em;
}
2016-08-25 13:14:56 -04:00
.wizard-field {
label .label-value {
font-weight: bold;
}
.input-area {
margin-top: 0.5em;
}
.field-error-description {
color: var(--danger);
font-weight: bold;
}
.field-description {
margin-top: 0.5em;
}
2016-09-13 15:14:17 -04:00
margin-bottom: 2em;
}
}
2016-08-25 13:14:56 -04:00
.wizard-step-themes-further-reading {
.wizard-field .input-area {
margin-top: 0;
}
.popular-themes {
display: flex;
a.popular-theme-item {
background: var(--secondary-very-high);
padding: 8px;
margin: 0px 4px;
width: 25%;
}
}
}
2016-09-20 17:01:54 -04:00
.textarea-field {
textarea {
width: 100%;
height: 10em;
background: var(--secondary);
2016-09-20 17:01:54 -04:00
}
&.invalid {
textarea {
padding: 3px;
border: 4px solid var(--danger);
2016-09-20 17:01:54 -04:00
}
}
}
2016-09-13 15:14:17 -04:00
.text-field {
input {
width: 100%;
2018-01-12 17:27:38 -05:00
font-size: $font-up-1;
2016-09-13 15:14:17 -04:00
padding: 6px;
background-color: var(--secondary);
border: 1px solid var(--primary-low-mid);
transition: border-color 0.5s;
2016-09-13 15:14:17 -04:00
}
2016-08-25 13:14:56 -04:00
2016-09-13 15:14:17 -04:00
&.invalid {
input {
padding: 3px;
border: 4px solid var(--danger);
2016-09-13 15:14:17 -04:00
}
}
}
2016-09-09 15:57:44 -04:00
.radio-field-choice {
margin-bottom: 1.25em;
2016-09-09 15:57:44 -04:00
input {
/* TODO: Custom :focus style */
/* outline: 0;*/
2016-09-09 15:57:44 -04:00
}
.radio-label {
font-weight: bold;
margin-left: 0.5em;
}
.radio-description {
margin-top: 0.25em;
margin-left: 1.75em;
color: #777;
color: var(--primary-low-mid);
2016-09-09 15:57:44 -04:00
}
}
2016-09-13 15:14:17 -04:00
.invite-list {
.users-list {
margin-bottom: 1em;
.invite-list-user {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 1em;
.email {
width: 330px;
}
.role {
width: 200px;
}
}
}
.new-user {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 1em;
.invite-email {
width: 350px;
}
}
button.add-user {
.fa {
margin-right: 0.5em;
}
}
}
/* fix wizard for mobile -- iPhone 5 default width */
2017-10-19 15:51:08 -04:00
@media only screen and (max-device-width: 568px) {
h1 {
font-size: $font-up-2 !important;
}
.wizard-column {
margin: auto !important;
}
.wizard-step-form {
max-height: none;
}
.wizard-step-contents {
height: auto !important;
}
.wizard-step-banner {
width: 100% !important;
margin-bottom: 1em !important;
}
.wizard-step-footer {
display: block !important;
}
.wizard-progress {
margin-bottom: 10px !important;
}
.wizard-buttons {
text-align: right !important;
}
.wizard-footer {
display: none !important;
}
.wizard-step-description {
margin-bottom: 1em !important;
}
.wizard-column-contents {
padding: 1em !important;
}
.wizard-step-themes-further-reading {
.popular-themes {
a.popular-theme-item {
width: 33.3%;
2019-06-03 10:54:24 -04:00
&:nth-child(4),
&:nth-child(5) {
display: none;
}
}
}
}
.emoji-preview img {
width: 16px !important;
height: 16px !important;
}
.invite-list .new-user {
flex-direction: column !important;
align-items: inherit !important;
}
.invite-list .new-user .invite-email {
width: 100% !important;
margin-bottom: 5px !important;
}
.invite-list .add-user {
margin-top: 5px !important;
}
2016-10-27 13:59:15 -04:00
canvas {
max-width: 365px;
}
.wizard-step-logos,
.wizard-step-icons {
2016-10-27 13:59:15 -04:00
canvas {
max-width: 225px;
}
}
}