topics.html
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{% autoescape %}
<h3>Tópicos</h3>
<ul class="nav nav-pills nav-stacked">
{% for t in state %}
{% if t[0] == current_topic %}
<li class="active"> <!-- class="active" class="disabled" -->
<a href="#">
{{ gettopicname(t[0]) }}
</a>
{% elif t[1] is None %}
<li class="disabled">
<a href="#">
{{ gettopicname(t[0]) }} <br>
<i class="fa fa-lock" aria-hidden="true"></i>
</a>
{% else %}
<li>
<a href="/?topic={{ t[0] }}">
{{ gettopicname(t[0]) }} <br>
{% if t[1] < 0.01 %}
<i class="fa fa-unlock" aria-hidden="true"></i>
{% else %}
{{ round(t[1]*5)*'<i class="fa fa-star text-success" aria-hidden="true"></i>' + round(5-t[1]*5)*'<i class="fa fa-star-o" aria-hidden="true"></i>' }}
{% end %}
</a>
{% end %}
</li>
{% end %}
</ul>