Skip to content

Commit

Permalink
Merge pull request #11
Browse files Browse the repository at this point in the history
feat/game
  • Loading branch information
mojtaba-afraz authored Jul 14, 2022
2 parents e250c26 + 960b013 commit 1f4b03a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Components/menu-layout/menu-layout.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="main-section">
<div class="grid md:grid-cols-2 sm:grid-cols-1">
<div class="w-full text-slate-200 flex justify-center content-center items-center h-screen bg-slate-700/50">
<div>
<h2 class="sm:text-8xl text-center text-5xl tracking-widest mb-10 font-Corleone">{{title}}</h2>
<div class="w-full">
<h2 class="sm:text-8xl w-full text-center text-5xl tracking-widest mb-10 font-Corleone">{{title}}</h2>
<ng-content></ng-content>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index-page/index-page.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<menu-layout>
<div class="px-4">
<div class="px-5">
<div *ngFor="let btn of buttons">
<main-btn (click)="goToLink(btn.link)" [btn]="btn"></main-btn>
</div>
Expand Down
22 changes: 11 additions & 11 deletions src/pages/new-page/new-page.component.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<menu-layout title="players">
<main-btn (click)="startGame()" [btn]="{title:(addPlayerMode ? 'start' :'Quick Play')}"></main-btn>
<main-btn (click)="activateAddPlayerMode()" [btn]="{title:'Add Plyers'}"></main-btn>
<div *ngIf="addPlayerMode">
<input [(ngModel)]="inputValue" type="text" placeholder="Name"/>
<div *ngIf="game.getParticipants().length">
<p class="text-3xl tracking-widest">Players :</p>
<div *ngFor="let person of game.getParticipants()">
<p class="text-2xl tracking-widest">{{person.name}}</p>
<div class="px-5">
<main-btn (click)="startGame()" [btn]="{title:(addPlayerMode ? 'start' :'Quick Play')}"></main-btn>
<main-btn (click)="activateAddPlayerMode()" [btn]="{title:'Add Plyers'}"></main-btn>
<div *ngIf="addPlayerMode">
<input [(ngModel)]="inputValue" type="text" placeholder="Name"/>
<div *ngIf="game.getParticipants().length">
<p class="text-3xl tracking-widest">Players :</p>
<div *ngFor="let person of game.getParticipants()">
<p class="text-2xl tracking-widest">{{person.name}}</p>
</div>
</div>
<main-btn (click)="addUser()" [btn]="{title:'Add'}"></main-btn>
</div>
<main-btn (click)="addUser()" [btn]="{title:'Add'}"></main-btn>

</div>

</menu-layout>
2 changes: 1 addition & 1 deletion src/pages/new-page/new-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class NewPageComponent implements OnInit {
this.router.navigate(['game'])
}
activateAddPlayerMode(){
this.addPlayerMode = true
this.addPlayerMode = !this.addPlayerMode
}

ngOnInit(): void {
Expand Down

0 comments on commit 1f4b03a

Please sign in to comment.