}).to(".active-screen .footer-question", {
y: "100%", duration: 0, onComplete: function () {
$(activeScreen).find('.btn.confirmMatch')?.remove()
- $(activeScreen).find('.btn.continue').removeClass('none')
+ $(activeScreen).find('.btn.continue, .btn.moreinfo').removeClass('none')
$(activeScreen).find('.btn.validate').addClass('none')
// Hide reset button
$this.quiz.animations.fadeOut($(activeScreen).find('.btn.reset'), true, false);
$this.resetForm();
});
+ //
+ $(document).on("click", ".btn.moreinfo, .close-explaination", function () {
+ $this.showExplaination();
+ });
+
// 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:not(.disabled)", function (e) {
showScreen: function (screen, callback) {
const $this = this;
let screenToShow = $('[data-screen="' + screen + '"]');
+
this.hideCurrentScreen(function () {
$this.resetCountdownBackground();
screenToShow.removeClass("none").addClass("next active-screen");
}
},
+ showExplaination: function() {
+ const el = this.getActiveScreen().find(".explaination")
+ let explaination = this.quiz.question.current().explaination
+ el.toggleClass("active")
+ el.find(".explaination-text").text(explaination)
+ },
+
getActiveScreen() {
return this.activeScreen;
},
--- /dev/null
+.explaination
+ width: 100%
+ height: 100%
+ position: absolute
+ top: 0
+ left: 0
+ display: flex
+ padding: 0 16px
+ align-items: flex-end
+ visibility: hidden
+ transition: opacity .8s
+ z-index: 1
+ opacity: 0
+ &.active
+ visibility: visible
+ backdrop-filter: blur(4px)
+ opacity: 1
+ .explaination-wrapper
+ top: 160px
+ opacity: 1
+
+.explaination-wrapper
+ width: 100%
+ max-width: 600px
+ max-height: 400px
+ padding: 40px
+ background-color: $neutral-color
+ +radius(16px)
+ position: absolute
+ top: 175px
+ left: 50%
+ transform: translateX(-50%)
+ z-index: 3
+ opacity: 0
+ transition: all .6s
+ h2
+ +font-size(24)
+ margin-bottom: 12px
+ p
+ +font-size(16)
+
+ .close-explaination
+ position: absolute
+ top: 16px
+ right: 16px
+ cursor: pointer
+
+.m
+ .explaination-wrapper
+ width: calc(100% - 32px)
+ margin: 0 auto
@import 106-question-draganddrop
@import 107-question-match
@import 108-question-text
+@import 109-modal-more-info
--- /dev/null
+<div class="explaination">
+ <div class="explaination-wrapper">
+ <h2>{{ $__('Explications') }}</h2>
+ <p class="explaination-text"></p>
+ <span class="close-explaination" data-icon="wrong"></span>
+ </div>
+</div>
<span class="access">R</span>
</a>
@endisset
+
+ @isset($info)
+ <a class="btn secondary none moreinfo" aria-keyshortcuts="M">
+ {{$__('More infos')}}
+ <span class="access infos">M</span>
+ </a>
+ @endisset
+
<a class="btn primary {{ isset($matchMaking) ? "confirmMatch" : "action validate" }} {{ $countdown ? ' countdown' : '' }}"
aria-keyshortcuts="Space">
<span class="text">
<span class="access space">{{$__('space')}}</span>
</a>
@endif
- @isset($info)
- <a class="btn secondary none" aria-keyshortcuts="F1">
- {{$__('More infos')}}
- <span class="access infos">F1</span>
- </a>
- @endisset
+
</footer>
+@isset($info)
+ @if($info)
+ @include('components.modal_more_info', ['explaination' => $info])
+ @endif
+@endisset
@include('components.background',['data'=>$data,'name'=>'background','fit'=>'cover'])
@include('screens.intro', ['data'=> $data])
@foreach($data->questions as $key => $question)
-
- @include('screens.question_'.$question['type'], ['theme' => $data->theme,'data'=> $data, 'question' => $question, 'max' => $totalQuestion, 'position' => $key, 'alphabet' => $alphabet, 'countdown' => isset($question['countdown_enable']) && $question["countdown_enable"]])
+ @php($info = $question['explaination'])
+ @include('screens.question_'.$question['type'], ['info' => $info,'theme' => $data->theme,'data'=> $data, 'question' => $question, 'max' => $totalQuestion, 'position' => $key, 'alphabet' => $alphabet, 'countdown' => isset($question['countdown_enable']) && $question["countdown_enable"]])
@endforeach
@include('screens.outro', ['data'=> $data])
<div id="instantReviewAnimation"></div>
</div>
</form>
</div>
- @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true, 'info' => true])
+ @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true])
</div>
</div>
</div>
@include('screens.question_draganddrop_area',['data'=>$data,'area'=>2,'question'=>$question,'theme'=>$theme])
- @include('footer', ['countdown' => $countdown,'question' => $question,'data' => $data, 'reset' => true, 'text' => $__('Validate answer'), 'info' => true])
+ @include('footer', ['countdown' => $countdown,'question' => $question,'data' => $data, 'reset' => true, 'text' => $__('Validate answer'), 'info' => $info])
</div>
</div>
</form>
</div>
- @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true, 'info' => true])
+ @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true])
</div>
<div class="swiper-pagination-bottom"></div>
</div>
</div>
- @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true, 'text' => $__('Validate answer'), 'info' => true, 'matchMaking' => true])
+ @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true, 'text' => $__('Validate answer'), 'info' => $info, 'matchMaking' => true])
</div>
</ul>
</form>
</div>
- @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true, 'info' => true])
+ @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true, 'info' => $info])
</div>
</div>
</form>
</div>
- @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true, 'info' => true])
+ @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true])
</div>
</div>
</form>
</div>
- @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true, 'info' => true])
+ @include('footer', ['countdown' => $countdown,'question' => $question, 'data' => $data, 'reset' => true])
</div>