-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
36 lines (36 loc) · 1.39 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="shortcut icon" href="logo.png" type="image/x-icon">
<link href="https://fonts.googleapis.com/css?family=Courgette" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.1/vue.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.16.2/axios.js"></script>
<title>Memory Game</title>
</head>
<body>
<div id="app">
<header>
<h3>Time: {{timer}} </h3>
<h1>Secret Pairs</h1>
<h3>Moves: {{moves}}</h3>
</header>
<section id="container">
<div class="img-placeholder" v-for="(obj, index) in finalArray">
<div :idx="obj.id">
<div v-show="selectedIndexes.indexOf(index) === -1 && matchedIndexes.indexOf(obj.id) === -1">
<img src="logo.png" @click="selectedIndexes.length <= 2 ? flip(obj.id,index) : null"/>
</div>
<div v-show="selectedIndexes.indexOf(index) > -1 || matchedIndexes.indexOf(obj.id) > -1">
<img class="front" :src="obj.url" />
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="app.js"></script>
</body>
</html>