]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6385 @4:00
authorsoufiane <soufiane@cubedesigners.com>
Thu, 12 Oct 2023 15:45:51 +0000 (17:45 +0200)
committersoufiane <soufiane@cubedesigners.com>
Thu, 12 Oct 2023 15:45:51 +0000 (17:45 +0200)
js/quiz.screen.outro.js
style/105-outro.sass
style/106-question-draganddrop.sass

index 06b269d99735b98e7ae99f3b0bc75f25cc7aaaa3..77edd60c9cefbbbe28212511e8c7316ccb6a584e 100644 (file)
@@ -191,14 +191,16 @@ QuizScreenOutro.prototype = {
 
             if(review.type === "draganddrop") {
                 html += '<div class="area-container">'
+                html += '<div class="area-title">'
+                html += '<p>'+review.data.area_1.title+'</p><p>'+review.data.area_2.title+'</p>'
+                html += '</div>'
                 for (let i = 1; i < 3; i++) {
                     let area = i === 1 ? review.data.area_1 : review.data.area_2
                     html += '<div class="area area"'+i+'>'
-                    html += '<p class="title">'+area.title+'</p>'
-                    html += '<ul class="area-list">'
+                    html += '<ul class="area-list card-holder">'
                     for (let k in correctAnswers) {
                         if(correctAnswers[k].drop_area === i) {
-                            html += '<li class="area-item slot"><p>'+correctAnswers[k].answer+'</p></li>'
+                            html += '<li class="area-item slot active"><p>'+correctAnswers[k].answer+'</p></li>'
                         }
                     }
                     html += '</ul>'
@@ -209,10 +211,13 @@ QuizScreenOutro.prototype = {
 
             if(review.type === "match") {
                 html += '<div class="match-container">'
+                html += '<div class="match-title">'
+                html += '<p>'+this.quiz.l10n.__('Question')+'</p><p>'+this.quiz.l10n.__('Answers')+'</p>'
+                html += '</div>'
                 for (let k in correctAnswers) {
-                    html += '<div class="match-wrapper">'
-                    html += '<div class="match-item slot"><p>'+correctAnswers[k].answer+'</p></div>'
-                    html += '<div class="match-item slot"><p>'+correctAnswers[k].proposition+'</p></div>'
+                    html += '<div class="match-wrapper card-holder">'
+                    html += '<div class="match-item slot active"><p>'+correctAnswers[k].answer+'</p></div>'
+                    html += '<div class="match-item slot active"><p>'+correctAnswers[k].proposition+'</p></div>'
                     html += '</div>'
                 }
                 html += '</div>'
index 52d0e7eb9ed8d2f3ffbf5dc13100f8083814ec60..bdc21fe459d78988f8245f32581f2db23891d216 100644 (file)
     #anime-result
         transform: scale(1.7)
 
+    .area-container,
+    .match-wrapper
+        display: grid
+        grid-template-columns: 2fr 2fr
+        gap: 8px
+
+    .match-container
+        display: grid
+        gap: 8px
+
+    .match-title
+        display: grid
+        grid-template-columns: 2fr 2fr
+        p
+            width: 50%
+
+    .area .title
+        margin-bottom: 4px
+
+    .area-list
+        display: grid
+        gap: 8px
+
 .m
     .score
         height: 600px
index 8e7bffd7a1cc0f49c4d0bd84a31630125d3527d2..059fa1225b0b1eec99ce93f6eb06894c9243cae0 100644 (file)
 
 
             .card-holder
-                transition: background-color .2s ease
-                +opacity(.08, background-color, $texts-color)
-                +radius(16px)
                 min-height: 196px
-                padding: 8px
 
                 .m &
                     display: none
                     margin-bottom: 8px
 
         .slot
-            width: 100%
-            height: 51px
-            transition: all .3s
-            +radius(8px)
-            padding: 7px 8px
-            font-size: 12px
-            margin-bottom: 8px
-
-            h4
-                font-size: 1.25em
-                font-weight: 600
-                max-height: 1.1em
-                overflow: hidden
-                text-align: left
-
-            p
-                font-size: 1em
-                font-weight: 400
-                max-height: 1em
-                overflow: hidden
-                text-align: left
-                white-space: pre-line
-                margin-top: 3px
-
-
-            &.active
-                background-color: rgba($opposite-texts-color, 0.24)
-                border: 1px solid rgba($texts-color, .24)
-
             span
                 display: -webkit-box
                 display: -moz-box
                             &:not(:nth-child(-n+4))
                                 top: 86px
 
-
-
-.slot
-    width: 100%
-    height: 51px
-    transition: all .3s
-    +radius(8px)
-    padding: 7px 8px
-    font-size: 12px
-    margin-bottom: 8px
-
-    h4
-        font-size: 1.25em
-        font-weight: 600
-        max-height: 1.1em
-        overflow: hidden
-        text-align: left
-
-    p
-        font-size: 1em
-        font-weight: 400
-        max-height: 1em
-        overflow: hidden
-        text-align: left
-        white-space: pre-line
-        margin-top: 3px
+.card-holder
+    transition: background-color .2s ease
+    +opacity(.08, background-color, $texts-color)
+    +radius(16px)
+    padding: 8px
+    display: grid
+    gap: 8px
+
+    .slot
+        width: 100%
+        height: 51px
+        transition: all .3s
+        +radius(8px)
+        padding: 7px 8px
+        font-size: 12px
+
+        h4
+            font-size: 1.25em
+            font-weight: 600
+            max-height: 1.1em
+            overflow: hidden
+            text-align: left
+
+        p
+            font-size: 1em
+            font-weight: 400
+            max-height: 1em
+            overflow: hidden
+            text-align: left
+            white-space: pre-line
+            margin-top: 3px
+
+        &.active
+            background-color: rgba($opposite-texts-color, 0.24)
+            border: 1px solid rgba($texts-color, .24)