Commit d7b9a6ea authored by colmoneill's avatar colmoneill

Merge branch 'master' of gitlab.com:bemaker/eu.bemaker.flask

parents bf18e518 a140f37d
......@@ -320,11 +320,11 @@ def check_quiz(id):
# print({ "badges.name": badge,"_id": ObjectId(user)}, {"$set": {"badges.$.lvl": 2}})
#({'badges.name': 'electronique', '_id': ObjectId('5b3f847e5087266741cf1fef')}, {'$set': {'badges.$.lvl': 1}})
success_message = gettext(" Felicitation vous avez le badge : ") + badge +"<i class='material-icons'>sentiment_satisfied</i>"
success_message = gettext("<i class='material-icons md-48'>sentiment_satisfied</i> Felicitation vous avez le badge : ") + badge +"</br>"
flash(success_message, 'alert-success')
else:
print('user got less than required amount')
fail_message = gettext("ohhh non tu n'as pas eu assez de bonne reponses !") + "<i class='material-icons'>sentiment_dissatisfied</i>"
fail_message = gettext(" <i class='material-icons md-48'>sentiment_dissatisfied</i> ohhh non tu n'as pas eu assez de bonne reponses ! </br> ")
flash(fail_message, 'alert-danger')
return render_template('check_quiz.html', quiz=quiz, question_answer=zip(quiz['questions'], answers_list), correct=number_correct, total=len(answers_list))
......
@charset "UTF-8";
@font-face {
font-family: "hershey";
src: url(fonts/Hershey-futuram-1-1.woff) format("woff"), url(fonts/Hershey-futuram-1-1.ttf) format("ttf");
......@@ -120,14 +121,101 @@ h1, h2, h3, h4, h5 {
vertical-align: middle;
}
input[type=radio] {
background: #FF0000;
border: none;
.answerCenter {
width: 60%;
margin: auto;
}
.funkyradio label {
width: 100%;
border-radius: 3px;
border: 1px solid #D1D3D4;
font-weight: normal;
}
.funkyradio input[type=radio]:empty,
.funkyradio input[type=checkbox]:empty {
display: none;
}
.funkyradio input[type=radio]:empty ~ label,
.funkyradio input[type=checkbox]:empty ~ label {
position: relative;
line-height: 2.5em;
text-indent: 3.25em;
margin-top: 2em;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.funkyradio input[type=radio]:empty ~ label:before,
.funkyradio input[type=checkbox]:empty ~ label:before {
position: absolute;
display: block;
top: 0;
bottom: 0;
left: 0;
content: "";
width: 2.5em;
background: #D1D3D4;
border-radius: 3px 0 0 3px;
}
input[type=radio]:checked {
background: #0000FF;
border: RED;
.funkyradio input[type=radio]:hover:not(:checked) ~ label,
.funkyradio input[type=checkbox]:hover:not(:checked) ~ label {
color: #888;
}
.funkyradio input[type=radio]:hover:not(:checked) ~ label:before,
.funkyradio input[type=checkbox]:hover:not(:checked) ~ label:before {
content: "✔";
text-indent: 0.9em;
color: #C2C2C2;
}
.funkyradio input[type=radio]:checked ~ label,
.funkyradio input[type=checkbox]:checked ~ label {
color: #777;
}
.funkyradio input[type=radio]:checked ~ label:before,
.funkyradio input[type=checkbox]:checked ~ label:before {
content: "✔";
text-indent: 0.9em;
color: #333;
background-color: #ccc;
}
.funkyradio input[type=radio]:focus ~ label:before,
.funkyradio input[type=checkbox]:focus ~ label:before {
box-shadow: 0 0 0 3px #999;
}
.funkyradio-default input[type=radio]:checked ~ label:before,
.funkyradio-default input[type=checkbox]:checked ~ label:before {
color: #333;
background-color: #ccc;
}
.funkyradio-primary input[type=radio]:checked ~ label:before,
.funkyradio-primary input[type=checkbox]:checked ~ label:before {
color: #fff;
background-color: #337ab7;
}
.funkyradio-success input[type=radio]:checked ~ label:before,
.funkyradio-success input[type=checkbox]:checked ~ label:before {
color: #fff;
background-color: #5cb85c;
}
.funkyradio-danger input[type=radio]:checked ~ label:before,
.funkyradio-danger input[type=checkbox]:checked ~ label:before {
color: #fff;
background-color: #d9534f;
}
#myBtn {
......
......@@ -137,15 +137,109 @@ h1, h2, h3, h4, h5 {
.material-icons.md-48 { font-size: 48px; vertical-align: middle;}
.material-icons.md-100 { font-size: 100px; vertical-align: middle;}
input[type="radio"] {
background: #FF0000;
border: none;
.answerCenter{
width: 60%;
margin: auto;
}
.funkyradio label {
width: 100%;
border-radius: 3px;
border: 1px solid #D1D3D4;
font-weight: normal;
}
input[type="radio"]:checked{
background: #0000FF;
border: RED;
.funkyradio input[type="radio"]:empty,
.funkyradio input[type="checkbox"]:empty {
display: none;
}
.funkyradio input[type="radio"]:empty ~ label,
.funkyradio input[type="checkbox"]:empty ~ label {
position: relative;
line-height: 2.5em;
text-indent: 3.25em;
margin-top: 2em;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.funkyradio input[type="radio"]:empty ~ label:before,
.funkyradio input[type="checkbox"]:empty ~ label:before {
position: absolute;
display: block;
top: 0;
bottom: 0;
left: 0;
content: '';
width: 2.5em;
background: #D1D3D4;
border-radius: 3px 0 0 3px;
}
.funkyradio input[type="radio"]:hover:not(:checked) ~ label,
.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label {
color: #888;
}
.funkyradio input[type="radio"]:hover:not(:checked) ~ label:before,
.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label:before {
content: '\2714';
text-indent: .9em;
color: #C2C2C2;
}
.funkyradio input[type="radio"]:checked ~ label,
.funkyradio input[type="checkbox"]:checked ~ label {
color: #777;
}
.funkyradio input[type="radio"]:checked ~ label:before,
.funkyradio input[type="checkbox"]:checked ~ label:before {
content: '\2714';
text-indent: .9em;
color: #333;
background-color: #ccc;
}
.funkyradio input[type="radio"]:focus ~ label:before,
.funkyradio input[type="checkbox"]:focus ~ label:before {
box-shadow: 0 0 0 3px #999;
}
.funkyradio-default input[type="radio"]:checked ~ label:before,
.funkyradio-default input[type="checkbox"]:checked ~ label:before {
color: #333;
background-color: #ccc;
}
.funkyradio-primary input[type="radio"]:checked ~ label:before,
.funkyradio-primary input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #337ab7;
}
.funkyradio-success input[type="radio"]:checked ~ label:before,
.funkyradio-success input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #5cb85c;
}
.funkyradio-danger input[type="radio"]:checked ~ label:before,
.funkyradio-danger input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #d9534f;
}
#myBtn {
display: none; /* Hidden by default */
position: fixed; /* Fixed/sticky position */
......
app/static/img/jumbo.png

224 KB | W: | H:

app/static/img/jumbo.png

430 KB | W: | H:

app/static/img/jumbo.png
app/static/img/jumbo.png
app/static/img/jumbo.png
app/static/img/jumbo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -23,6 +23,11 @@ $( document ).ready(function() {
if ($('#my-svg').length){
new Vivus('my-svg', {duration: 200});
}
// var sliderHeight = "100px";
// $('.slider').each(function () {
// var current = $(this);
......
......@@ -7,14 +7,14 @@
{{ super() }}
<style type="text/css">
.question-correct:after {
.question-correct:before {
content: "✓";
font-size: 30px;
color: green;
padding-left: 10px;
}
.question-incorrect:after {
.question-incorrect:before {
content: "✗";
font-size: 30px;
color: red;
......@@ -29,7 +29,7 @@
<ul class=flashes>
{% for category, message in messages %}
<div class="alert {{ category }} alert-dismissible fade show" role="alert">
<h3>{{ message }} &nbsp; &nbsp; {{_("ton resultat")}} :<b> {{correct}} / {{total}}</b></h3>
<h3>{{ message | safe}} &nbsp; &nbsp; {{_("ton resultat")}} :<b> {{correct}} / {{total}}</b></h3>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
......@@ -41,18 +41,33 @@
{% for question, choice in question_answer %}
<div>
<h4 {% if choice[1] %} class="question-correct" {% else %} class="question-incorrect" {% endif %}>{{question['text']|safe}}</h4>
<h4 {% if choice[1] %} class="question-correct" style="color:green!important" {% else %} class="question-incorrect" style="color:red!important"{% endif %}>{{question['text']|safe}}</h4>
<div class="funkyradio">
<div class="answerCenter">
{% for answer in question['options'] %}
<div {% if answer[1] %}class="funkyradio-success" {% elif not answer[1] %} class="funkyradio-danger" {% endif %}>
<input type="checkbox" name="checkbox" id="checkbox4" checked/>
<label for="checkbox4">{{answer[0]|safe}} {% if answer == choice %} - <strong> Chosen </strong> {% endif %} </label>
</div>
{% endfor %}
</div>
</diV>
<!-- {% for answer in question['options'] %}
<p {% if answer[1] %} class="question-correct" {% elif not answer[1] %} class="question-incorrect" {% endif %}>
{{answer[0]|safe}} {% if answer == choice %} - <strong> Chosen </strong> {% endif %}
</p>
{% endfor %}
</div>
-->
{% if loop.revindex0 > 0 %}
<hr />
<div class="spacer"></div>
{% endif %}
{% endfor %}
</div>
<div class="spacer"></div>
{% endblock %}
......@@ -20,7 +20,7 @@
<div class="row no-gutter">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="container">
<div class="spacer"></div>
<h2>{{_("VERSION ENG")}}</h2>
<p>{{page}}</p>
......@@ -46,6 +46,7 @@
tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
<div class="spacer"></div>
</div>
......@@ -62,6 +63,7 @@
tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
<div class="spacer"></div>
</div>
......@@ -78,6 +80,7 @@
tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
<div class="spacer"></div>
</div>
</div>
......@@ -97,6 +100,7 @@
</div>
<div class="homePush greyBg">
<div class="spacer"></div>
<h2>{{_("apprendre")}} </h2>
<div class="container-fluid">
......@@ -116,7 +120,7 @@
<span class="desc">{{article.desc}}</span>
</div>
{% else %}
<img src="../static/placeholder.jpg">
<img src="../static/img/placeHolder.png">
<div class="overTuto {{ article.cat }}">
<h4>{{article.title}}</h4>
<span class="desc">{{article.desc}}</span>
......@@ -141,6 +145,7 @@
<div class="homePush workshopList">
<div class="spacer"></div>
<h2>WORKSHOP </h2>
<div class="container">
......
......@@ -3,19 +3,33 @@
<div class='container'>
<form method="post" action="/check_quiz/{{id}}">
<input type="hidden" name="ord" value="{{quiz_ordering}}" />
<p>{{quiz['description']|safe}}</p>
<div class="spacer"></div>
<h2 class="center">{{quiz['description']|safe}}</h2>
<div class="spacer"></div>
{% for question in quiz['questions'] %}
{% set outer_loop = loop %}
<p>
<h5>{{question['text']|safe}}</h5>
{% for answer in question['options'] %}
<p><label><input type="radio" checked="checked" name="{{outer_loop.index0}}" value="{{loop.index0}}" /> {{answer[0]|safe}}</label></p>
<div class="funkyradio">
<div class="answerCenter">
{% for answer in question['options'] %}
<div class="funkyradio-primary">
<input type="radio" name="{{outer_loop.index0}}" id="ans-{{outer_loop.index}}-{{loop.index}}" value="{{loop.index0}}"/>
<label for="ans-{{outer_loop.index}}-{{loop.index}}" >{{answer[0]|safe}}</label>
</div>
<!-- <p><label class="h5"></span><input type="radio" class="custom-control-input" checked="checked" name="{{outer_loop.index0}}" value="{{loop.index0}}" /> {{answer[0]|safe}}</label></p> -->
{% endfor %}
</div>
</div>
<div class="spacer"></div>
</p>
{% endfor %}
<input type="submit" value="{{_("swwooooch")}}">
<input style="width:100%" type="submit" value="{{_("swwooooch")}}">
</form>
<div class="spacer"></div>
</div>
{% endblock %}
......@@ -2,10 +2,11 @@
{% block title %} Quiz Website - All Quizzes {% endblock %}
{% block content %}
<div class='container'>
<span id='title'>{{_("tout les questionnaires")}}</span>
<div class="spacer"></div>
<span id='title' class="center"><h1>{{_("tout les questionnaires")}}</h1></span>
<ul>
{% for id, name in quiz_names %}
<li><a href="{{url_for('quiz', id=id)}}">{{name}}</a>
<li class="h5" ><a href="{{url_for('quiz', id=id)}}">{{name}}</a>
</li>
{% endfor %}
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment