-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pokemon.html
63 lines (53 loc) · 2.37 KB
/
Pokemon.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta -->
<meta charset="UTF-8" />
<title>Vue.JS Grid</title>
<!-- Styles -->
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link rel="stylesheet" href="css/index.css">
<!-- Scripts -->
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
</head>
<body>
<div class="header">
<img class="header-logo" src="https://raw.githubusercontent.com/CodeLouisville/FSJS-Weekly-Challenges/master/Challenges/Week5/images/pokedex.png"><h1>Pokédex</h1>
</div>
<div id="main-content">
<div id="pokedex">
<single-poke :poke="pokeArray" v-show="singleDisplayed">
</single-poke>
<pokemon :pokemon="pokemonList" v-show="listDisplayed" v-on:select="select($event)"></pokemon>
<button id="previous" class="btn" v-on:click="previous" v-show="listDisplayed">Previous</button>
<button id="next" class="btn" v-on:click="next" v-show="listDisplayed">Next</button>
<button class="btn" v-show="singleDisplayed" v-on:click="singleDisplayed =! singleDisplayed, listDisplayed =! listDisplayed">Return to List View</button>
</div>
</div>
<script type="text/x-template" id="pokeCard">
<div>
<table>
<tr>
<td class="poke-card"><h3>Name</h3></td>
<td class="poke-card"><h3>Ability</h3></td>
<td class="poke-card"><h3>Move</h3></td>
<td class="poke-card"><h3>Type</h3></td>
<td class="poke-card"><h3>Weight</h3></td>
</tr>
<tr ><td v-for="item in poke" class="poke-card"><h3>{{ item }}</h3></td></tr>
</table>
</div>
</script>
<img id="pikachu" class="hvr-hang" src="https://raw.githubusercontent.com/CodeLouisville/FSJS-Weekly-Challenges/master/Challenges/Week5/images/pikachu.png" alt="Pikachu">
<script type="text/x-template" id="pokemon">
<div>
<ul class="pokemon" id="pokeList">
<li class="poke-card" v-for="(poke, index) in pokemon"><h3 v-on:click="thisSelect(poke.name)">{{poke.name}} - {{index}}</h3></li>
</ul>
</div>
</script>
<script src="https://unpkg.com/pokeapi-js-wrapper/dist/index.js"></script>
<script src="js/components.js"></script>
<script src="js/index.js"></script>
</body>
</html>