diff --git a/macao/assets/quiz.js b/macao/assets/quiz.js index c1e4527246888c7733466e57d323b78575868025..4569e1170b348b5202966a034a0149e3a8426432 100644 --- a/macao/assets/quiz.js +++ b/macao/assets/quiz.js @@ -106,8 +106,15 @@ $(function () { innerCss: "sd-btn nav-input" }); + // Ugly tricks to avoid to create a new theme + const customTheme = SurveyTheme.DefaultLightPanelless; + const primColor = getComputedStyle(document.documentElement,null).getPropertyValue('--macao-primary-color'); + + customTheme.cssVariables["--sjs-primary-backcolor"] = primColor; + customTheme.cssVariables["--sjs-primary-backcolor-dark"] = primColor; // Apply theme survey.applyTheme(SurveyTheme.DefaultLightPanelless); + console.log("Survey theme applied", SurveyTheme.DefaultLightPanelless); // Inflate the survey in the page $("#surveyContainer").Survey({ model: survey });