Commit 6818d19c21bb5b50a0245318a9ad45300f021f64
1 parent
bd2ad2b7
Exists in
master
and in
1 other branch
- simplify information templates to a single file
Showing
4 changed files
with
13 additions
and
13 deletions
Show diff stats
BUGS.md
1 | 1 | |
2 | 2 | # BUGS |
3 | 3 | |
4 | +- safari as vezes envia dois gets no inicio do topico. nesses casos, a segunda pergunta não é actualizada no browser... o topico tem de ser gerado qd se escolhe o topico em main_topics. O get nao deve alterar o estado. | |
4 | 5 | - click numa opcao checkbox fora da checkbox+label não está a funcionar. |
5 | 6 | - shift-enter não está a funcionar |
6 | 7 | - mathjax, formulas $$f(x)$$ nas opções de escolha multipla, não ficam centradas em toda a coluna mas apenas na largura do parágrafo. | ... | ... |
serve.py
... | ... | @@ -215,7 +215,7 @@ class QuestionHandler(BaseHandler): |
215 | 215 | 'textarea': 'question-textarea.html', |
216 | 216 | # -- information panels -- |
217 | 217 | 'information': 'question-information.html', |
218 | - 'success': 'question-success.html', | |
218 | + 'success': 'question-information.html', | |
219 | 219 | 'warning': 'question-information.html', |
220 | 220 | 'alert': 'question-information.html', |
221 | 221 | } | ... | ... |
templates/question-information.html
1 | 1 | {% autoescape %} |
2 | 2 | |
3 | +{% if q['type'] == 'information' %} | |
3 | 4 | <div class="card border-primary mb-3"> |
4 | 5 | <div class="card-body text-primary"> |
6 | +{% elif q['type'] == 'success' %} | |
7 | +<div class="card border-success mb-3"> | |
8 | + <div class="card-body text-success"> | |
9 | +{% elif q['type'] == 'warning' %} | |
10 | +<div class="card border-warning mb-3"> | |
11 | + <div class="card-body text-warning"> | |
12 | +{% elif q['type'] == 'alert' %} | |
13 | +<div class="card border-danger mb-3"> | |
14 | + <div class="card-body text-danger"> | |
15 | +{% end %} | |
5 | 16 | <h3 class="card-title">{{ question['title'] }}</h3> |
6 | 17 | <p class="card-text"> |
7 | 18 | {{ md(question['text']) }} | ... | ... |
templates/question-success.html
... | ... | @@ -1,12 +0,0 @@ |
1 | -{% autoescape %} | |
2 | - | |
3 | -<div class="card border-success mb-3"> | |
4 | - <div class="card-body text-success"> | |
5 | - <h3 class="card-title">{{ question['title'] }}</h3> | |
6 | - <p class="card-text"> | |
7 | - {{ md(question['text']) }} | |
8 | - </p> | |
9 | - </div> | |
10 | -</div> | |
11 | - | |
12 | -<input type="hidden" name="question_ref" value="{{ question['ref'] }}"> |