Commit 977fa0708f24d9fbacdb20d4395571c7e4d20478
1 parent
8342f047
Exists in
master
and in
1 other branch
- shows a book icon for topics of type learn
- shows halfstars and tooltip with numeric progress
Showing
2 changed files
with
5 additions
and
3 deletions
Show diff stats
aprendizations/templates/courses.html
| @@ -58,7 +58,6 @@ | @@ -58,7 +58,6 @@ | ||
| 58 | {% for k,v in courses.items() %} | 58 | {% for k,v in courses.items() %} |
| 59 | <div class="card-deck col-md-4"> | 59 | <div class="card-deck col-md-4"> |
| 60 | <a href="/course/{{k}}" class="card mb-3"> | 60 | <a href="/course/{{k}}" class="card mb-3"> |
| 61 | - <!-- text-dark mb-3" style="width: 18rem;" --> | ||
| 62 | <div class="card-body"> | 61 | <div class="card-body"> |
| 63 | <h6 class="card-title">{{ v['title'] }}</h6> | 62 | <h6 class="card-title">{{ v['title'] }}</h6> |
| 64 | <p class="card-text">{{ v.get('description', '') }}</p> | 63 | <p class="card-text">{{ v.get('description', '') }}</p> |
aprendizations/templates/maintopics-table.html
| @@ -96,6 +96,9 @@ | @@ -96,6 +96,9 @@ | ||
| 96 | <div class="lead"> | 96 | <div class="lead"> |
| 97 | {{ t['name'] }} | 97 | {{ t['name'] }} |
| 98 | </div> | 98 | </div> |
| 99 | + {% elif t['type']=='learn' %} | ||
| 100 | + <i class="fas fa-book"></i> | ||
| 101 | + {{ t['name'] }} | ||
| 99 | {% else %} | 102 | {% else %} |
| 100 | <i class="fas fa-pencil-alt"></i> | 103 | <i class="fas fa-pencil-alt"></i> |
| 101 | {{ t['name'] }} | 104 | {{ t['name'] }} |
| @@ -111,8 +114,8 @@ | @@ -111,8 +114,8 @@ | ||
| 111 | </div> | 114 | </div> |
| 112 | {% else %} | 115 | {% else %} |
| 113 | <div class="text-xs-right"> | 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 | </span> | 119 | </span> |
| 117 | </div> | 120 | </div> |
| 118 | {% end %} | 121 | {% end %} |