Commit 977fa0708f24d9fbacdb20d4395571c7e4d20478

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

- shows a book icon for topics of type learn

- shows halfstars and tooltip with numeric progress
aprendizations/templates/courses.html
... ... @@ -58,7 +58,6 @@
58 58 {% for k,v in courses.items() %}
59 59 <div class="card-deck col-md-4">
60 60 <a href="/course/{{k}}" class="card mb-3">
61   - <!-- text-dark mb-3" style="width: 18rem;" -->
62 61 <div class="card-body">
63 62 <h6 class="card-title">{{ v['title'] }}</h6>
64 63 <p class="card-text">{{ v.get('description', '') }}</p>
... ...
aprendizations/templates/maintopics-table.html
... ... @@ -96,6 +96,9 @@
96 96 <div class="lead">
97 97 {{ t['name'] }}
98 98 </div>
  99 + {% elif t['type']=='learn' %}
  100 + <i class="fas fa-book"></i>&nbsp;
  101 + {{ t['name'] }}
99 102 {% else %}
100 103 <i class="fas fa-pencil-alt"></i>&nbsp;
101 104 {{ t['name'] }}
... ... @@ -111,8 +114,8 @@
111 114 </div>
112 115 {% else %}
113 116 <div class="text-xs-right">
114   - <span class="text-nowrap">
115   - {{ round(t['level']*5)*'<i class="fas fa-star text-warning"></i>' + (5-round(t['level']*5))*'<i class="far fa-star text-warning"></i>' }}
  117 + <span class="text-nowrap text-warning" data-toggle="tooltip" data-placement="bottom" title="{{round(t['level']*5, 2)}}">
  118 + {{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>' }}
116 119 </span>
117 120 </div>
118 121 {% end %}
... ...