Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 57 additions & 27 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="shortcut icon" type="image/x-icon" href="img/favicon-16x16.png">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
<title>Pokedoki JS App</title>
</head>
<body>
<section>
<h1>Hello! I am Píkachu.</h1>
<P>
<span>Find</span> me and other Pokémon's with this Pokédex List!
</p>
<a href="https://www.pokemon.com/us/pokedex/" target="_blank"> Search for a Pokémon</a>
</section>
<footer class="page-footer">
<p>Find me on</p><!--Scoial Media Icons-->
<div class="social-media">
<a href="#" target="_blank"><img src="img/Github.svg" alt="github"></a>
<a href="#" target="_blank"><img src="img/twitter.svg" alt="Twitter"></a>
<a href="#" target="_blank"><img src="img/linkedin.svg" alt="LinkedIn"></a>
</div>
</footer>
<script src="js/scripts.js"> </script><!--javascript src link-->
</body>
</html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="shortcut icon" type="image/x-icon" href="img/favicon-16x16.png">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
<title>Pokedoki JS App</title>

</head>

<body>

<section>
<h1>Hello! I am Píkachu.</h1>
<P>
<span>Find</span> out more about me + other creatures:
</p>
</section>

<header class="header-body">
<h1 class="header-title">Pokemon List</h1>
</header>

<script src="js/scripts.js"> </script><!--javascript src link-->

<ul class="pokemon-list"></ul>

<h1 class="pokemon-name"></h1>
<!-- adding more details like weight and height of the pokemons
<div class="Pokemon-details">
<p class="weight">Weight: <span class="pokemon-weight"></span></p>
<br>
<p class="height">Height: <span class="pokemon-height"></span></p>
<br>
<p class="type">Type: <span class="pokemon-type"></span></p>
</div>
-->
<div><!--Scoial Media Icons-->
<a href="https://www.pokemon.com/us/pokedex/" target="_blank"> Search for more Pokémons</a>
</div>

<footer class="page-footer">
<p>Find me on</p><!--Scoial Media Icons-->
<div class="social-media">
<a href="#" target="_blank"><img src="img/Github.svg" alt="github"></a>
<a href="#" target="_blank"><img src="img/twitter.svg" alt="Twitter"></a>
<a href="#" target="_blank"><img src="img/linkedin.svg" alt="LinkedIn"></a>
</div>
</footer>

<script src="js/tota11y.min.js"></script>

</body>

</html>
99 changes: 46 additions & 53 deletions js/scripts.js
Original file line number Diff line number Diff line change
@@ -1,70 +1,63 @@
/*!
* Here comes all Javascript
* Pokedoki App
* Date: 2019-11-11
*/
* Here comes all Javascript
* Pokedoki App
* Date: 2019-11-11
*/

// This array will become the repository of Pokémon to display in myapplication
var repository = [
pokemonName,
pokemonHeight,
pokemonType,
];
// This array will become the repository of Pokémon to display in myapplication
const pokemon = [];
// add several objects (Pokémons)to the array.
// Each Pokémon needs to have the same keys to avoid errors

// array of pokemon names
var pokemonName = [
'Absol',
'Luxray',
'Pikachu',
'Milotic',
'Eevee',
];

// array of pokemon types, use array of strings
var pokemonType = [
'water',
'electric',
'dark',
'normal'
];

// array of pokemon heights, use array of strings
var pokemonHeight = [
"3'11\"",
"4'07\"",
"1'04\"",
"20'04\"",
"1'00\"",
];


// defining the pokemons without external input
var absol = {
pokemonName: 'Absol',
pokemonHeight: "3'11\"",
pokemonType: 'dark',
name:'Absol',
height: 1.2,
type: 'dark',
};

var luxray = {
pokemonName:'Luxray',
pokemonHeight: "4'07\"",
pokemonType: 'electric',
name:'Luxray',
height: 1.4,
type: 'electric',
};

var pikachu = {
pokemonName:'Pikachu',
pokemonHeight: "1'04\"",
pokemonType: 'electric',
name:'Pikachu',
height: 0.4,
type: 'electric',
};

var milotic = {
pokemonName: 'Milotic',
pokemonHeight: "20'04\"",
pokemonType: 'water',
name: 'Milotic',
height: 6.2,
type: 'water',
};

var eevee = {
pokemonName:'Eevee',
pokemonHeight: "1'00\"",
pokemonType: 'normal',
name:'Eevee',
height: 0.3,
type: 'normal',
};

pokemon.push(absol);
pokemon.push(luxray);
pokemon.push(pikachu);
pokemon.push(milotic);
pokemon.push(eevee);


//var biggest = " Wow,that\'s big!"
for (var i = 0; i < pokemon.length; i++){

var biggest = pokemon[i].height;
var result;
if (biggest <= 5) {
result = "\ ";
} else {
result = " Wow,that\'s big!";
}

document.write("<br>" + pokemon[i].name +" (" + "height: " +pokemon[i].height+")" + result + "<br>");
// printing repository[i]’s other details
// ...
};