-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemory.html
More file actions
78 lines (72 loc) · 2.24 KB
/
memory.html
File metadata and controls
78 lines (72 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<head>
<title>memory</title>
</head>
<body>
</body>
<template name="ApplicationLayout">
{{> yield "header"}}
<div class="page-ct">
<h4>Make move <a href="#" class="showTurn">{{getCurrentUser}}</a></h4>
{{> yield "main"}}
</div>
</template>
<template name="navbar">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/">Memory!</a>
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Choose the user to play with<span class="caret"></span></a>
{{#if currentUser}}
<ul class="dropdown-menu">
{{#each users}}
{{> available_user}}
{{/each}}
</ul>
{{/if}}
</li>
</ul>
</div>
<div class="nav navbar-nav navbar-right">
{{> loginButtons align="right"}}
</div>
</div>
</nav>
</template>
<template name="lobby_page">
<h1>Lets Play!</h1>
</template>
<template name="available_user">
{{#unless isMyUser _id}}
<li>
<a href="/game/{{_id}}">{{getUsername _id}}</a>
</li>
{{/unless}}
</template>
<template name="gamePage">
{{#if gameReady}}
You are playing with {{getOpponentName}}. Score: (You: {{getYourScore}}, Opponent: {{getOpponentScore}}). It is {{getCurrentUser}}'s turn.
{{#if gameOver}}
{{#if currentUserWon}}
You won the game!
{{else}}
{{#if drawGame}}
Draw game!
{{else}}
You lost the game!
{{/if}}
{{/if}}
<div class="btn btn-primary btn-lg btn--restart js-restart">Restart Game</div>
{{else}}
<br/>
<div class="undercover">
<div class="game-field">
{{#each getCards}}
<img class="game-card js-card-clicked" src="{{getImageSrc this}}" id="{{id}}" />
{{/each}}
</div>
</div>
{{/if}}
{{/if}}
</template>