$this->sassVariables['font'] = $this->_font($this->theme->font);
// Colors
$this->sassVariables['neutral-color'] = $this->theme->neutralColor;
+ $this->sassVariables['ok-color'] = $this->theme->okColor;
+ $this->sassVariables['nok-color'] = $this->theme->nokColor;
// Breakpoints
$this->sassVariables['breakpoints'] = "(sm: (min: '576px',max: '575.98px') , md: (min: '768px',max: '767.98px'), lg: (min: '1024px',max: '1023.98px' ), xl: (min: '1200px', max: '1199.98px'))";
- // Fonts size
+ // Fonts size:Line Height
$this->sassVariables['fonts-size'] = "(14: 20px, 16: 22px, 20: 28px, 24: 35px)";
$this->writeSass();
})
// Préparer les réponses du joueur dans l'objet this.responses
+ // à chaque fois que le formulaire change de valeur
$(document).on("change", ".active-screen form", function(e) {
$this.responses = []
$(this).find("input:checked").each(function() {
}else {
this.animationValidation("NOK")
}
- return false
+ this.displayResult(validated.status[position].answers)
}
return false
}
selector.removeClass("active")
selector.empty()
}, 10000)
+ },
+
+ displayResult: function(datas) {
+ for(let k in datas) {
+ let n = (parseInt(k) + 1)
+ let icon = getSpriteIcon("quiz-ok")
+ let $el = $(".active-screen .question-multiple .list-item:nth-of-type("+n+")")
+ $el.addClass(datas[k])
+ if(datas[k] !== "ok") {
+ icon = getSpriteIcon("quiz-wrong")
+ }
+ if(datas[k] !== "neutral") {
+ $el.find(".access").addClass(datas[k]).html(icon)
+ }
+ }
}
}
max-width: 177px
.access
+ width: 100%
+ max-width: 34px
+ height: 34px
border-radius: 4px
- padding: 6px 12px
+font-size(16)
+opacity(.16)
text-transform: uppercase
margin-left: 16px
+ +flex-config(center,false,false,center)
+ &.space
+ max-width: 70px
+ &.infos
+ max-width: 40px
+ &.ok
+ +opacity(.24, background-color, $ok-color)
+ &.nok
+ +opacity(.24, background-color, $nok-color)
+ &.ok,
+ &.nok
+ svg
+ width: 15px
+ height: 15px
.screen
position: relative
border: 2px solid rgba($texts-color, .24)
position: relative
overflow: hidden
+ &.ok
+ //
+ &.nok
+ //
+ &.neutral
+ //
+ &.missed
+ //
*
z-index: 1
<a class="btn secondary reset">
Reset
<span class="access">R</span>
- </>
+ </a>
@endisset
<a class="btn primary action">
{{$text}}
- <span class="access">space</span>
+ <span class="access space">space</span>
@isset($time)
<span data-icon="running-man"></span>
@endisset
@isset($info)
<a class="btn secondary">
More infos
- <span class="access">F1</span>
+ <span class="access infos">F1</span>
</a>
@endisset
</footer>