diff --git a/app/assets/javascripts/wizard/addon/components/wizard-canvas.js b/app/assets/javascripts/wizard/addon/components/wizard-canvas.js index 35dc7bc5516..37f9f454beb 100644 --- a/app/assets/javascripts/wizard/addon/components/wizard-canvas.js +++ b/app/assets/javascripts/wizard/addon/components/wizard-canvas.js @@ -7,18 +7,10 @@ const SIZE = 144; let width, height; const COLORS = [ - "#BF1E2E", - "#F1592A", - "#F7941D", - "#9EB83B", - "#3AB54A", - "#12A89D", - "#25AAE2", - "#0E76BD", - "#652D90", - "#92278F", - "#ED207B", - "#8C6238", + "--tertiary", + "--quaternary", + "--tertiary-medium", + "--quaternary-low", ]; class Particle { @@ -34,7 +26,8 @@ class Particle { this.ang = Math.random() * 2 * Math.PI; this.scale = Math.random() * 0.4 + 0.2; this.radius = Math.random() * 25 + 25; - this.color = COLORS[Math.floor(Math.random() * COLORS.length)]; + const colorVar = COLORS[Math.floor(Math.random() * COLORS.length)]; + this.color = getComputedStyle(document.body).getPropertyValue(colorVar); this.flipped = Math.random() > 0.5 ? 1 : -1; } diff --git a/app/assets/javascripts/wizard/addon/controllers/wizard.js b/app/assets/javascripts/wizard/addon/controllers/wizard.js new file mode 100644 index 00000000000..e7ec5bf4789 --- /dev/null +++ b/app/assets/javascripts/wizard/addon/controllers/wizard.js @@ -0,0 +1,8 @@ +import Controller, { inject as controller } from "@ember/controller"; + +export default class extends Controller { + @controller wizardStep; + get showCanvas() { + return this.wizardStep.get("step.id") === "ready"; + } +} diff --git a/app/assets/stylesheets/wizard.scss b/app/assets/stylesheets/wizard.scss index 73bcfcbbc6d..7647c3f2905 100644 --- a/app/assets/stylesheets/wizard.scss +++ b/app/assets/stylesheets/wizard.scss @@ -33,6 +33,7 @@ body.wizard { } .discourse-logo svg { + position: relative; height: 70px; width: auto; @include breakpoint("mobile-extra-large") { @@ -44,6 +45,12 @@ body.wizard { } } } + + .wizard-canvas { + position: fixed; + top: 0; + pointer-events: none; + } } // Refactored SCSS