]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6885 @1:30
authorsoufiane <soufiane@cubedesigners.com>
Mon, 13 May 2024 10:29:11 +0000 (12:29 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 13 May 2024 10:29:11 +0000 (12:29 +0200)
js/quiz.screens.js
style/100-global.sass
style/107-question-match.sass
views/components/background.blade.php
views/screens/question_draganddrop.blade.php
views/screens/question_match.blade.php

index 390f4cdac1f43a490d68597fcb99db05a5ba00ae..f4ebba56d14816f0887a83aa578162dba41fd1e7 100644 (file)
@@ -27,8 +27,11 @@ QuizScreens.prototype = {
     initEvents: function () {
         const $this = this;
 
+        let standardColor = $this.quiz.data.theme.standardColor ? $this.quiz.data.theme.standardColor : $this.quiz.data.theme.neutralColor
+        let matchColor = $this.quiz.data.theme.matchColor ? $this.quiz.data.theme.matchColor : $this.quiz.data.theme.neutralColor
+        document.documentElement.style.setProperty("--match-color", matchColor)
         // enabled click on item
-        $(".list-item").css("pointer-events","auto")
+        $(".list-item").css("pointer-events","auto").find('label').css("background-color",standardColor)
 
         // RĂ©initialiser les rĂ©ponses
         $(document).on("click", ".btn.reset", function () {
index 6a9005660ad0ae7db5334703fc59c997d00023f2..1ed864740eedcc46b91639f5bc5c023ce179f006 100644 (file)
@@ -292,7 +292,6 @@ body
         width: 100%
         height: 100%
 
-
     &[data-bg-fit="cover"]
         img
             object-fit: cover
index c08cd06fe2c490dea96df9e676f081aa3dcb954f..9b9852e2a78fe7686090d88a1c61501286999307 100644 (file)
@@ -33,7 +33,7 @@
             &:after
                 height: 0
                 width: 0
-                border-top: 16px solid $neutral-color
+                border-top: 16px solid var(--match-color)
                 border-right: 21px solid transparent
                 border-left: 21px solid transparent
                 content: ""
@@ -49,7 +49,7 @@
             +radius(16px)
             //border: 1px solid rgb($texts-color, .24)
             text-align: center
-            background-color: $neutral-color
+            background-color: var(--match-color) !important
             font-size: 20px
 
     .bottom-slider
@@ -69,7 +69,7 @@
             transition: background-color $transition-time, border $transition-time
             border: 2px solid transparent
             transform-origin: 50% 50%
-            +opacity(.24, background-color, $neutral-color)
+            +opacity(.24, background-color, var(--match-color))
             opacity: 0
             text-align: center
 
@@ -77,7 +77,7 @@
                 transition: background-color $transition-time, border $transition-time, opacity $transition-time, transform $transition-time
 
             &-active
-                background-color: $neutral-color
+                background-color: var(--match-color)
                 border: 2px solid $texts-color
                 top: 0 !important
 
index df897fbd5d2f385398979c8ba5cc58cacc7e2599..ba7735381133efe6aaaaa9d200845cf92276d9ff 100644 (file)
@@ -5,5 +5,7 @@
     }else{
         $m=false;
     }
+
+    $introColor = $data['theme']['introColor'] ?? $data['theme']['neutralColor'];
 @endphp
-<div data-bg-type="{{$name}}" data-bg-fit="{{$fit}}" data-bg="" data-bg-d="{{$d}}" @if($m)data-bg-m="{{$m}}"@endif></div>
+<div data-bg-type="{{$name}}" data-bg-fit="{{$fit}}" data-bg="" data-bg-d="{{$d}}" @if($m)data-bg-m="{{$m}}"@endif style="background-color: {{$introColor}};"></div>
index b5da27e1249e260868834cfc650ff63622624e1e..78339f4ebac149997cbac02c5bf6d319df11cded 100644 (file)
             <ul class="list">
                 @php
                     $keys = array_keys($question['answers']);
+                    $dragColor = $data['theme']['draganddropColor'] ?? $data['theme']['neutralColor']
                 @endphp
                 @foreach($question['answers'] as $index => $c)
-                    <li class="list-item {{ $index === 0 ? 'current' : '' }}" data-id="{{$index}}">
+                    <li class="list-item {{ $index === 0 ? 'current' : '' }}" data-id="{{$index}}" style="background-color: {{$dragColor}}">
                         <h4>{{$c['answer']}}</h4>
                         <p>{{$c['answer_text']}}</p>
                     </li>
index f3dc49fa7a615dca4725b793e131d7faac3bf7e1..5ab833863e8c8602323c0e432032203c6d74faae 100644 (file)
@@ -18,7 +18,7 @@
     @include('header_question', ['data' => $data, 'max' => $max, 'position' => $position])
     <div class="screen">
 
-        <div class="top-slider-container">
+        <div class="top-slider-container" data-bg="{{$data['theme']['matchColor']}}">
             @include('screens.arrow',['side'=>'left','action'=>'move-slide'])
             <div class="swiper-container top-slider">
                 <div class="swiper-pagination-top"></div>