topics.html 1.01 KB
{% 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>