frontend: change exercice border coloration when solved or bonus are active
This commit is contained in:
parent
6f5d7828db
commit
03e3bb8118
3 changed files with 10 additions and 8 deletions
|
@ -15,12 +15,11 @@
|
|||
</div>
|
||||
|
||||
<div class="card-columns">
|
||||
<div class="card niceborder excard" ng-repeat="(k,theme) in themes" ng-click="goTheme()">
|
||||
<div class="card niceborder excard" ng-repeat="(k,theme) in themes" ng-click="goTheme()" ng-class="{'border-success': theme.solved > 0, 'border-warning': theme.exercice_coeff_max > 1}">
|
||||
<div class="card-img-top theme-card" ng-show="theme.image" style="background-image: url({{ theme.image }})"></div>
|
||||
<div class="card-body text-indent">
|
||||
<h5 class="card-title clearfix">
|
||||
<h5 class="card-title">
|
||||
<a ng-href="/{{ theme.urlid }}">{{ theme.name }}</a>
|
||||
<a ng-href="/tags/{{tag}}" class="badge badge-pill badge-secondary ml-1 float-right">#tag</a>
|
||||
</h5>
|
||||
<p class="card-text text-justify" ng-bind-html="theme.headline"></p>
|
||||
</div>
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
<div class="card-columns">
|
||||
<div class="card niceborder excard" ng-repeat="ex in exercices" ng-click="goDefi()">
|
||||
<div class="card niceborder excard" ng-repeat="ex in exercices" ng-click="goDefi()" ng-class="{'border-success': ex.exercice.solved, 'border-secondary': !my.exercices[ex.eid], 'border-warning': ex.exercice.curcoeff > 1.0}">
|
||||
<div class="card-img-top theme-card" ng-show="ex.theme.image" style="background-image: url({{ ex.theme.image }})"></div>
|
||||
<div class="card-body">
|
||||
<h6 class="card-title clearfix">
|
||||
<h6 class="card-title">
|
||||
<a ng-href="/{{ex.theme.urlid}}">{{ex.theme.name}}</a> >
|
||||
<a ng-href="/{{ex.theme.urlid}}/{{ex.exercice.urlid}}">{{ex.exercice.title}}</a>
|
||||
<a ng-href="/tags/{{tag}}" class="badge badge-pill badge-secondary mr-2 float-right" ng-repeat="tag in themes[ex.tid].exercices[ex.eid].tags">#{{ tag }}</a>
|
||||
<span class="glyphicon glyphicon-gift" aria-hidden="true" ng-if="ex.exercice.curcoeff > 1.0" title="Un bonus est actuellement appliqué lors de la résolution de ce défi"></span>
|
||||
</h6>
|
||||
<p class="card-text text-justify" ng-bind-html="ex.exercice.headline"></p>
|
||||
<div class="clearfix mb-2">
|
||||
<a ng-href="/tags/{{tag}}" class="badge badge-pill badge-secondary mr-2 float-right" ng-repeat="tag in themes[ex.tid].exercices[ex.eid].tags">#{{ tag }}</a>
|
||||
</div>
|
||||
<p class="card-text text-justify text-indent" ng-bind-html="ex.exercice.headline"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
{{ exercice.title }}
|
||||
</a>
|
||||
<span ng-if="!my.exercices[k]">
|
||||
{{ exercice.title }}
|
||||
<span class="glyphicon glyphicon-lock" aria-hidden="true" title="Vous n'avez pas encore accès à ce défi"></span>
|
||||
{{ exercice.title }}
|
||||
</span>
|
||||
<a ng-href="/tags/{{tag}}" class="badge badge-pill badge-secondary ml-1 float-right" ng-repeat="tag in themes[current_theme].exercices[k].tags">#{{tag}}</a>
|
||||
<span class="glyphicon glyphicon-ok" aria-hidden="true" ng-if="(my.team_id && my.exercices[k].solved)"></span>
|
||||
|
|
Reference in a new issue