Commit b2444bac953cef5ae01cfd579cd150d6cbab132f
1 parent
e0e3ed68
Exists in
master
and in
1 other branch
changed transitions to fadeIn/fadeOut
maintopics-table has changed looks in chapters and locked topics
Showing
3 changed files
with
23 additions
and
17 deletions
Show diff stats
aprendizations/static/js/topic.js
| ... | ... | @@ -57,10 +57,10 @@ function new_question(type, question, tries, progress) { |
| 57 | 57 | window.scrollTo(0, 0); |
| 58 | 58 | |
| 59 | 59 | $("#submit").hide(); |
| 60 | - $("#question_div").animateCSS('bounceOutUp', function() { | |
| 60 | + $("#question_div").animateCSS('fadeOut', function() { | |
| 61 | 61 | $("#question_div").html(question); |
| 62 | 62 | MathJax.typeset(); |
| 63 | - $("#question_div").animateCSS('bounceInDown', function() { | |
| 63 | + $("#question_div").animateCSS('fadeIn', function() { | |
| 64 | 64 | showTriesLeft(tries); |
| 65 | 65 | $("#submit").removeClass("disabled").show(); |
| 66 | 66 | ... | ... |
aprendizations/templates/maintopics-table.html
| ... | ... | @@ -63,7 +63,7 @@ |
| 63 | 63 | <h4>{{ course_title }}</h4> |
| 64 | 64 | |
| 65 | 65 | <table class="table table-hover"> |
| 66 | - <thead> | |
| 66 | + <thead class=""> | |
| 67 | 67 | <tr> |
| 68 | 68 | <th>Tópico</th> |
| 69 | 69 | <th class="text-center">Nível</th> |
| ... | ... | @@ -71,15 +71,22 @@ |
| 71 | 71 | </thead> |
| 72 | 72 | <tbody> |
| 73 | 73 | {% for t in state %} |
| 74 | + <!-- ------------------------------------------------------------- --> | |
| 74 | 75 | {% if t['level'] is None %} |
| 75 | - <tr class="table-primary"> | |
| 76 | + <tr class="table-secondary"> | |
| 76 | 77 | <td> |
| 77 | 78 | {% if t['type']=='chapter' %} |
| 78 | 79 | <div class="text-muted lead"> |
| 79 | 80 | {{ t['name'] }} |
| 80 | 81 | </div> |
| 82 | + {% elif t['type']=='learn' %} | |
| 83 | + <div class="text-muted"> | |
| 84 | + <i class="fas fa-book"></i> | |
| 85 | + {{ t['name'] }} | |
| 86 | + </div> | |
| 81 | 87 | {% else %} |
| 82 | 88 | <div class="text-muted"> |
| 89 | + <i class="fas fa-pencil-alt"></i> | |
| 83 | 90 | {{ t['name'] }} |
| 84 | 91 | </div> |
| 85 | 92 | {% end %} |
| ... | ... | @@ -90,12 +97,14 @@ |
| 90 | 97 | </tr> |
| 91 | 98 | |
| 92 | 99 | {% else %} |
| 93 | - <tr class="clickable-row" data-href="/topic/{{t['ref']}}"> | |
| 100 | + | |
| 101 | + <tr class="clickable-row " data-href="/topic/{{t['ref']}}"> | |
| 94 | 102 | <td class="text-primary"> |
| 95 | 103 | {% if t['type']=='chapter' %} |
| 96 | - <div class="lead"> | |
| 104 | + <h5> | |
| 105 | + <i class="fas fa-flag-checkered"></i> | |
| 97 | 106 | {{ t['name'] }} |
| 98 | - </div> | |
| 107 | + </h5> | |
| 99 | 108 | {% elif t['type']=='learn' %} |
| 100 | 109 | <i class="fas fa-book"></i> |
| 101 | 110 | {{ t['name'] }} |
| ... | ... | @@ -104,25 +113,22 @@ |
| 104 | 113 | {{ t['name'] }} |
| 105 | 114 | {% end %} |
| 106 | 115 | </td> |
| 116 | + | |
| 107 | 117 | <td class="text-center"> |
| 108 | 118 | {% if t['level'] < 0.01 %} |
| 109 | 119 | <i class="fas fa-lock-open text-success"></i> |
| 110 | 120 | {% elif t['type']=='chapter' %} |
| 111 | - <div class="text-xs-right"> | |
| 112 | - <i class="fas fa-trophy fa-lg text-warning"></i> | |
| 113 | - <!-- <i class="fas fa-award fa-lg text-warning"></i> --> | |
| 114 | - </div> | |
| 121 | + <h5><i class="fas fa-award text-warning"></i></h5> | |
| 115 | 122 | {% else %} |
| 116 | - <div class="text-xs-right"> | |
| 117 | 123 | <span class="text-nowrap text-warning" data-toggle="tooltip" data-placement="bottom" title="{{round(t['level']*5, 2)}}"> |
| 118 | 124 | {{int(t['level']*5+0.25)*'<i class="fas fa-star"></i>'}}{% if int(t['level']*5+0.25) < 5 %}{{'<i class="fas fa-star-half-alt"></i>' if 0.25 <= t['level']*5-int(t['level']*5) < 0.75 else '<i class="far fa-star"></i>'}}{% end %}{{(4-int(t['level']*5+0.25))*'<i class="far fa-star"></i>' }} |
| 119 | 125 | </span> |
| 120 | - </div> | |
| 121 | - {% end %} | |
| 126 | + {% end %} <!-- if --> | |
| 122 | 127 | </td> |
| 123 | 128 | </tr> |
| 124 | - {% end %} | |
| 125 | - {% end %} | |
| 129 | + {% end %} <!-- if level is none --> | |
| 130 | + <!-- ------------------------------------------------------------- --> | |
| 131 | + {% end %} <!-- for --> | |
| 126 | 132 | </tbody> |
| 127 | 133 | </table> |
| 128 | 134 | </div> | ... | ... |
aprendizations/tools.py
| ... | ... | @@ -184,7 +184,7 @@ def run_script(script: str, |
| 184 | 184 | input=stdin, |
| 185 | 185 | stdout=subprocess.PIPE, |
| 186 | 186 | stderr=subprocess.STDOUT, |
| 187 | - universal_newlines=True, | |
| 187 | + text=True, # same as universal_newlines=True | |
| 188 | 188 | timeout=timeout, |
| 189 | 189 | ) |
| 190 | 190 | except FileNotFoundError: | ... | ... |