-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/game
- Loading branch information
Showing
7 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/Components/character-card/character-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div | ||
[id]="'character-'+ character.index" | ||
class="w-full cursor-pointer grid grid-cols-4 tracking-widest mt-2 mb-2 rounded-3xl border-b-4 bg-gray-800 Corleone w-full block p-4 flex justify-center content-center items-center" | ||
[ngClass]="setCharacterClasses()" | ||
> | ||
<div> | ||
<img alt="character" class="rounded-full" src="../../assets/character.jpeg"/> | ||
</div> | ||
<div class="col-span-3 align-center justify-center"> | ||
<h4 class="text-center w-full text-4xl tracking-widest">{{character.name}}</h4> | ||
</div> | ||
</div> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Component, Input, OnInit} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-character-card', | ||
templateUrl: './character-card.component.html', | ||
styleUrls: ['./character-card.component.scss'] | ||
}) | ||
export class CharacterCardComponent implements OnInit { | ||
@Input() character:any; | ||
@Input() isKilled:boolean = false; | ||
@Input() characterTurn:boolean = false; | ||
setCharacterClasses(){ | ||
return { | ||
'border-red-600': this.isKilled, | ||
'bg-red-900':this.isKilled, | ||
'border-blue-600':this.characterTurn && !this.isKilled, | ||
}; | ||
} | ||
constructor() { } | ||
ngOnInit(): void {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters