]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7588 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Jun 2025 11:06:03 +0000 (13:06 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Jun 2025 11:06:03 +0000 (13:06 +0200)
app/Elearning/QuizCompiler.php
app/Models/QuizTheme.php

index b53ace60a2974850938da5d5533368a23b15b1ca..d2fdbd5ebb208ccc41b1075d5ece6fa73932897e 100644 (file)
@@ -170,15 +170,17 @@ class QuizCompiler extends Base
         $this->sassVariables['nok-color'] = $this->theme->nokColor;
         $this->sassVariables['card-disabled-background'] = $darkTheme ? $this->theme->neutralColor : $textsColor;
         $this->sassVariables['card-disabled-color'] = $darkTheme ? $textsColor : $oppositeTextsColor;
+        // Active colors
+        $this->sassVariables['stroke-color'] = $this->theme->strokeColor ?: 'rgba($texts-color, .24)';
+        $this->sassVariables['active-stroke-color'] = $this->theme->activeStrokeColor ?: $textsColor;
+        $this->sassVariables['active-background-color'] = $this->theme->activeBackgroundColor ?: 'rgba($neutral-color,.8)';
         // Fonts size:Line Height
         $this->sassVariables['fonts-size'] = "(14: 20px, 16: 22px, 20: 28px, 24: 35px)";
-
         // fill areas
         $this->sassVariables['intro-fill-area'] = $this->theme->introColor ?: 'transparent';
         $this->sassVariables['outro-fill-area'] = $this->theme->outroColor ?: 'transparent';
         $this->sassVariables['standard-fill-area'] = $this->theme->standardColor ?: 'transparent';
         $this->sassVariables['drangandrop-fill-area'] = $this->theme->draganddropColor ?: 'transparent';
-
         // Main background
         $this->sassVariables['background-color'] = Color::colorToCSS($this->theme->backgroundColor);
 
index 907ead57f4fcf290406b703a34910a192a4233aa..7b27b776f13ec6eea675974d6388e52d4949a442 100644 (file)
@@ -84,6 +84,11 @@ class QuizTheme extends ToolboxModel
         $this->addField('neutralColor', Color::class, __('Couleur neutre principale'), ['hint' => __('Couleur des éléments d\'habillage du thème (privilégier une couleur foncée)')]);
         $this->addField('okColor', Color::class, __('Couleur OK'), ['hint' => __('Couleur générale affectée aux bonnes réponses (habituellement vert)')]);
         $this->addField('nokColor', Color::class, __('Couleur pas OK'), ['hint' => __('Couleur générale affectée aux mauvaises réponses (habituellement rouge)')]);
+        $this->addField('', FormSeparator::class);
+        $this->addField('strokeColor', Color::class, __('Couleur de contour des tuiles non-sélectionnées'), ['hint' => __('Laisser vide pour laisser le système déterminer la couleur'), 'allows_empty' => true]);
+        $this->addField('', FormSeparator::class);
+        $this->addField('activeStrokeColor', Color::class, __('Couleur de contour des tuiles sélectionnées'), ['hint' => __('Laisser vide pour laisser le système déterminer la couleur'), 'allows_empty' => true]);
+        $this->addField('activeBackgroundColor', Color::class, __('Couleur de fond des tuiles sélectionnées'), ['hint' => __('Laisser vide pour laisser le système déterminer la couleur'), 'allows_empty' => true]);
 
     }