refactor champion card

This commit is contained in:
Daniel Rodriguez 2021-09-20 17:51:12 +02:00
parent 3eb73961f3
commit 5f941efa38
7 changed files with 122 additions and 92 deletions

View file

@ -0,0 +1,16 @@
<div title="{{champion.name}}" class="imageWrap" [style.background-image]="getImage(champion.img)" (click)="selectChampion(champion)"
[ngClass]="{
'selected': champion.isSelected,
'sinergy': champion.sinergy && !champion.isSelected,
'sinergy2': champion.sinergy2 && !champion.isSelected,
'dark': !champion.isSelected && !champion.sinergy && !champion.sinergy2 && !noChampSelected
}">
<img class="checkSelectedChampion"*ngIf="champion.isSelected" src="../../assets/images/greencheck.png">
<span class="cost" title="cost">{{champion.cost}}</span>
</div>
<div class="rolesWrap">
<div *ngFor="let role of champion.roles" class="roles">
<img title="{{role }}" src="../../assets/images/traits/{{role.toLowerCase()}}.png" alt="{{role}}">
</div>
<div class="clear"></div>
</div>