mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 14:48:44 +08:00
Consolidates all three wizard screens into one. Cleans up some leftover, unused wizard elements (checkbox, image, canvas inputs). Internal ticket: t/164852 <img width="2880" height="2376" alt="CleanShot 2025-11-25 at 10 35 43@2x" src="https://github.com/user-attachments/assets/f824a172-38b0-4fda-922a-3732335b93b2" /> --------- Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
439 lines
7.6 KiB
SCSS
Vendored
439 lines
7.6 KiB
SCSS
Vendored
@use "lib/viewport";
|
|
|
|
$blob-bg: absolute-image-url("/branded-background.svg");
|
|
$blob-mobile-bg: absolute-image-url("/branded-background-mobile.svg");
|
|
|
|
@keyframes bump {
|
|
0% {
|
|
transform: scale(1);
|
|
}
|
|
|
|
50% {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
100% {
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
// horizon specific style
|
|
.experimental-screen {
|
|
.wizard & {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
body.wizard {
|
|
background-color: var(--secondary);
|
|
background-image: $blob-bg;
|
|
background-size: 110vw 110vh; // crops better than cover at various viewport sizes
|
|
background-repeat: no-repeat;
|
|
background-position: bottom;
|
|
color: var(--primary-very-high);
|
|
|
|
.wrap {
|
|
max-width: 100%;
|
|
}
|
|
|
|
@include viewport.until(sm) {
|
|
background: $blob-mobile-bg;
|
|
background-size: cover;
|
|
background-repeat: no-repeat;
|
|
background-position: bottom;
|
|
}
|
|
|
|
#wizard-main {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding-top: 1.5em;
|
|
height: 100%;
|
|
}
|
|
|
|
.desktop-view & {
|
|
#main-outlet {
|
|
padding-top: 0;
|
|
}
|
|
}
|
|
|
|
.discourse-logo svg {
|
|
position: relative;
|
|
height: 50px;
|
|
width: auto;
|
|
|
|
@include viewport.until(sm) {
|
|
height: 50px;
|
|
}
|
|
|
|
@media screen and (height <= 900px) {
|
|
.desktop-view & {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Refactored SCSS
|
|
.wizard-container {
|
|
position: relative;
|
|
z-index: 11;
|
|
background-color: var(--secondary);
|
|
box-shadow: 0 4px 19px 6px rgb(0, 0, 0, 0.05);
|
|
box-sizing: border-box;
|
|
margin: 1em auto;
|
|
border: 1px solid var(--content-border-color);
|
|
border-radius: 8px;
|
|
padding: 2em;
|
|
|
|
@include viewport.until(lg) {
|
|
padding: 2em 1.5em;
|
|
}
|
|
|
|
&__step {
|
|
margin-top: 1em;
|
|
max-width: 700px;
|
|
width: 100%;
|
|
|
|
@include viewport.until(lg) {
|
|
max-width: 95%;
|
|
}
|
|
|
|
.wizard-container__button:not(.wizard-container__button-upload) {
|
|
@include viewport.until(sm) {
|
|
width: 100%;
|
|
margin: 0 0 0.5em;
|
|
}
|
|
}
|
|
}
|
|
|
|
&__fields {
|
|
width: 100%;
|
|
}
|
|
|
|
&__field {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
&__field.invalid input {
|
|
outline: 0;
|
|
border: 3px solid var(--danger);
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
animation: bump 0.25s ease-in-out;
|
|
animation-iteration-count: 2;
|
|
}
|
|
}
|
|
|
|
&__field label {
|
|
display: block;
|
|
}
|
|
|
|
&__step-form {
|
|
display: flex;
|
|
flex: 1 0 50%;
|
|
|
|
@media only screen and (width <= 568px) {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
&__step-header {
|
|
text-align: center;
|
|
margin-bottom: 3em;
|
|
|
|
&--emoji img {
|
|
width: 40px;
|
|
height: 40px;
|
|
margin-bottom: 1em;
|
|
}
|
|
}
|
|
|
|
&__step-title {
|
|
font-size: 2.5em;
|
|
color: var(--primary);
|
|
line-height: var(--line-height-medium);
|
|
margin: 0 0 0.5em 0;
|
|
|
|
@include viewport.until(lg) {
|
|
font-size: var(--font-up-5);
|
|
}
|
|
}
|
|
|
|
&__step-container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
&__step-contents {
|
|
min-height: 37em;
|
|
margin-bottom: 2em;
|
|
|
|
@include viewport.until(sm) {
|
|
min-height: 30em;
|
|
}
|
|
}
|
|
|
|
&__step-text {
|
|
display: inline;
|
|
|
|
@media only screen and (width <= 568px) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&__step-count {
|
|
min-width: 3.2em;
|
|
text-align: center;
|
|
}
|
|
|
|
.preloaded-font-styles {
|
|
font-size: 1px;
|
|
}
|
|
|
|
&__link {
|
|
margin-right: 1em;
|
|
text-decoration: none;
|
|
color: var(--primary-high);
|
|
font-size: var(--font-up-1);
|
|
}
|
|
|
|
&__link:hover {
|
|
color: var(--tertiary-hover);
|
|
}
|
|
|
|
&__button {
|
|
font-size: var(--font-up-1);
|
|
}
|
|
|
|
&__button.small {
|
|
padding: 0.25em 0.5em;
|
|
font-size: var(--font-down-1);
|
|
}
|
|
|
|
&__button:hover,
|
|
&__button:focus {
|
|
background-color: var(--primary-low);
|
|
}
|
|
|
|
&__button:active {
|
|
background-color: var(--primary-low-mid);
|
|
}
|
|
|
|
&__button:disabled,
|
|
&__button.disabled {
|
|
background-color: var(--primary-medium);
|
|
}
|
|
|
|
&__step-footer {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
|
|
@include viewport.until(sm) {
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: stretch;
|
|
}
|
|
}
|
|
|
|
&__label {
|
|
font-weight: bold;
|
|
font-size: var(--font-up-1);
|
|
}
|
|
|
|
&__label.required {
|
|
display: inline;
|
|
color: var(--danger);
|
|
}
|
|
|
|
&__description {
|
|
color: var(--primary-high);
|
|
font-size: var(--font-0);
|
|
font-weight: normal;
|
|
margin: 0.25em 0 0.5em 0;
|
|
|
|
a {
|
|
margin: 0;
|
|
}
|
|
|
|
@media only screen and (width <= 568px) {
|
|
font-size: var(--font-0);
|
|
}
|
|
}
|
|
|
|
&__description.extra {
|
|
color: var(--primary-high);
|
|
font-size: var(--font-up-1);
|
|
margin: 0.25em 0 0.5em 3.5em;
|
|
|
|
@media only screen and (width <= 568px) {
|
|
margin-left: 2em;
|
|
}
|
|
}
|
|
|
|
&__text-input {
|
|
border-radius: 4px !important;
|
|
width: 100%;
|
|
font-size: var(--font-up-1);
|
|
margin: 0;
|
|
padding: 10px;
|
|
background-color: var(--secondary);
|
|
border: 1px solid var(--primary-low-mid);
|
|
}
|
|
|
|
&__dropdown {
|
|
width: 100%;
|
|
height: 38px;
|
|
}
|
|
|
|
&__dropdown .select-kit-header:not(.btn) {
|
|
border-radius: 4px;
|
|
}
|
|
|
|
&__radio {
|
|
position: absolute;
|
|
visibility: hidden;
|
|
}
|
|
|
|
&__radio-choices {
|
|
align-items: stretch;
|
|
display: flex;
|
|
gap: 1em;
|
|
|
|
@include viewport.until(sm) {
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
|
|
&__radio-choice {
|
|
flex-basis: 0;
|
|
flex-grow: 1;
|
|
display: flex;
|
|
|
|
&.--selected {
|
|
.wizard-container__label {
|
|
background-color: var(--tertiary-very-low);
|
|
border-color: var(--tertiary-high);
|
|
border-width: 2px;
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
.wizard-container__label {
|
|
border-radius: 4px;
|
|
border: 1px solid var(--primary-low-mid);
|
|
flex-grow: 1;
|
|
margin: 1px 0;
|
|
}
|
|
|
|
label {
|
|
align-content: center;
|
|
cursor: pointer;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-wrap: wrap;
|
|
font-weight: normal;
|
|
padding: 1em;
|
|
text-align: center;
|
|
|
|
.svg-icon {
|
|
margin-bottom: 0.5em;
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
label .svg-icon {
|
|
top: 2px;
|
|
}
|
|
|
|
.finish-installation {
|
|
.wizard-congratulations-wrap {
|
|
display: flex;
|
|
gap: 1em;
|
|
|
|
@media screen and (width <= 750px) {
|
|
flex-direction: column-reverse;
|
|
}
|
|
}
|
|
|
|
.row:not(.finish-installation-image) {
|
|
margin-right: auto;
|
|
}
|
|
|
|
h1 {
|
|
margin: 0 auto 1em 0;
|
|
}
|
|
|
|
.tada {
|
|
height: 15vw;
|
|
max-height: 9em;
|
|
}
|
|
|
|
.help-text {
|
|
margin: 2em 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Register admin pages
|
|
// /finish-installation and /finish-installation/register
|
|
.wizard-container-contents.finish-installation {
|
|
font-family: var(--font-family);
|
|
|
|
.wizard-container__combobox {
|
|
background: var(--secondary);
|
|
color: var(--primary);
|
|
padding: 0.5em;
|
|
font-size: var(--font-up-1);
|
|
border-radius: 4px;
|
|
border: 1px solid var(--primary-low-mid);
|
|
margin-top: 0.25em;
|
|
}
|
|
|
|
.wizard-container__fields {
|
|
max-width: 500px;
|
|
}
|
|
|
|
.wizard-container__text-input {
|
|
color: var(--primary);
|
|
}
|
|
|
|
.wizard-container__button {
|
|
border-radius: 2px;
|
|
border: 0;
|
|
padding: 0.5em;
|
|
transition: var(--d-button-transition);
|
|
text-decoration: none;
|
|
background-color: var(--secondary);
|
|
color: var(--primary-very-high);
|
|
cursor: pointer;
|
|
|
|
&.btn-primary {
|
|
background-color: var(--tertiary);
|
|
color: var(--secondary);
|
|
display: inline-block;
|
|
|
|
@include viewport.until(sm) {
|
|
order: 1;
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
&:hover,
|
|
&:focus {
|
|
background-color: var(--tertiary-hover);
|
|
}
|
|
|
|
&primary:active {
|
|
background-color: var(--tertiary-high);
|
|
}
|
|
|
|
&:disabled {
|
|
background-color: var(--tertiary-low);
|
|
}
|
|
}
|
|
}
|