return;
}
//this.quiz.screens.currentQuestionAnswers.push(area === 'zone-1' ? 1 : 2);
- console.log("index",index)
+ console.log("index", index)
this.quiz.screens.currentQuestionAnswers.splice(index, 0, area === 'zone-1' ? 1 : 2)
this.animating = true;
height: slot.h,
x: slot.x,
y: slot.y,
- fontSize: "14px",
+ fontSize: "12px",
padding: "7px 8px",
borderRadius: "8px",
position: 'absolute',
if (!this.quiz.resize.isMobile()) {
let freeSlot = this.getAreaElement(zone).find(".slot:not(.active)")
- freeSlot.eq(0).addClass("active").append("<h4>" + title + "</h4><p>" + text + "</p>").attr('data-order', target.data("id"))
+ let slotContent = "<h4>" + title + "</h4>";
+ if (text !== '') {
+ slotContent = "<p>" + text + "</p>";
+ } else {
+ freeSlot.addClass('onlyh4');
+ }
+ freeSlot.eq(0).addClass("active").html(slotContent).attr('data-order', target.data("id"))
}
target.remove()
},
getSlotInformations: function (zone) {
let a = this.getAreaElement(zone);
let freeSlot = $(a).find('.slot:not(.active)')
- if(freeSlot.index() > 5) {
+ if (freeSlot.index() > 5) {
freeSlot = $(a).find('.slot:nth-child(6)')
}
freeSlot = freeSlot.eq(0);
object-fit: fill
-.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)
border: 1px dashed rgba($texts-color, .24)
z-index: 3
+.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
+
+ &.onlyh4
+ h4
+ max-height: 2.05em
+
+ h4
+ font-size: 1.25em
+ font-weight: 600
+ max-height: 1.05em
+ 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)
+
+
.m
.container-screen.question-draganddrop
.controls
@php
$h1class='';
+
+ $limit=105;
+ if($question['type'] === "draganddrop"){
+ $limit=40;
+ }
+
if(mb_strlen($question['question'])>105){
$h1class='small';
}
</div>
@if($question['type'] === "draganddrop")
- <h1 id="titleQuestion">
- <span class="only-desktop">{{$__('Drag and drop each card in the right container')}}</span>
- <span class="only-mobile">{{$__('Swipe up or down each card in the right container')}}</span>
+ <h1 class="{{$h1class}}" id="titleQuestion">
+ <span
+ class="only-desktop">{{$__('Drag and drop each card in the right container')}}{{__(': ')}}<br>{{$question['question']}}</span>
+ <span class="only-mobile">{{$__('Swipe up or down each card in the right container')}}{{__(': ')}}<br>{{$question['question']}}</span>
</h1>
<h2 class="subtitle only-desktop">{{$__('Use arrow keys to move the cards to the corresponding zone')}}</h2>
@elseif($question['type']==='match')