Commit a967bc7822c563fc15e18c5e698958d23ac48aac

Authored by Miguel Barão
1 parent efdbe121
Exists in master and in 1 other branch dev

- fixed bug where comments were always visible

- fixed progressbar (was invisible)
- improved bottom margin
BUGS.md
... ... @@ -30,6 +30,7 @@ TODO:
30 30  
31 31 FIXED:
32 32  
  33 +- Está a mostrar a solução em 'comments'!!!
33 34 - database: answers não tem referencia para o topico, so para question_ref
34 35 - melhorar markdown das tabelas.
35 36 - gravar evolucao na bd no final de cada topico.
... ...
factory.py
... ... @@ -76,7 +76,7 @@ class QFactory(object):
76 76 # which will print a valid question in yaml format to stdout. This
77 77 # output is then yaml parsed into a dictionary `q`.
78 78 if q['type'] == 'generator':
79   - logger.debug(f' \_ Running script "{q["script"]}"...')
  79 + logger.debug(f' \_ Running "{q["script"]}".')
80 80 q.setdefault('arg', '') # optional arguments will be sent to stdin
81 81 script = path.join(q['path'], q['script'])
82 82 out = run_script(script=script, stdin=q['arg'])
... ...
templates/question.html
... ... @@ -7,5 +7,3 @@
7 7 </div>
8 8  
9 9 {% block answer %}{% end %}
10   -
11   -{{ md(question.get('comments', '')) }}
12 10 \ No newline at end of file
... ...
templates/topic.html
... ... @@ -30,13 +30,13 @@
30 30 <style>
31 31 /* progress bars have height of 4 pixels */
32 32 .progress {
33   - height: 10px;
  33 + height: 20px;
34 34 border-radius: 0px;
35 35 }
36 36 body {
37 37 margin: 0;
38   - padding-top: 55px;
39   - margin-bottom: 60px; /* Margin bottom by footer height */
  38 + padding-top: 70px;
  39 + margin-bottom: 80px; /* Margin bottom by footer height */
40 40 }
41 41 .footer {
42 42 position: absolute;
... ... @@ -88,7 +88,7 @@
88 88  
89 89 <!-- ===================================================================== -->
90 90 <div class="progress">
91   - <div class="progress-bar progress-bar-success" id="topic_progress" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width: 1em;width: 0%"></div>
  91 + <div class="progress-bar bg-warning" id="topic_progress" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width: 1em;width: 0%"></div>
92 92 </div>
93 93 <!-- ===================================================================== -->
94 94 <!-- main panel with questions -->
... ...