gbellini90 / js-pokemon-search-practice-assignment-nyc-web-102918

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS Pokemon Search Assignment

pikachu

Objectives

  • DOM Manipulation
  • Events and Event Handlers
  • Callbacks
  • Constructors and Prototypes or ES6 Classes (optional)

Hello, your assignment today is to re-create the functionality of our Pokemon search engine.

p.s. Don't forget to include the ability to toggle the card image and reset the card image upon submission of a new search.


Instructions

  • We're building out a search feature in our application (no backend persistence).

  • A user should be able to search for a Pokemon and flip that Pokemon card to see its alternate sprite.

  • Two files containing the same information are included: db.json and pokemon.js. If you've learned fetch, consider using json-server to spin up a simple RESTful API that will give you your pokemon data:

    • $ npm install -g json-server
    • $ json-server --watch db.json
  • If you aren't yet familiar with fetch, don't worry. We've included the same data in a file called pokemon.js. You should see the POKEMON console.logged when you start this app.


Deliverables:

  1. Implement a filter functionality for your Pokemon list.
  2. Implement a flip functionality on each Pokemon.
  3. Your search should include pokemon whose names are not exact matches
  4. AS A BONUS, add a way to show users details for a particular pokemon: moves, abilities, etc.

Sample Markup:

Each pokemon card might look something like this in HTML:

<div class="pokemon-container">
  <div style="width:230px;margin:10px;background:#fecd2f;color:#2d72fc" class="pokemon-frame">
    <h1 class="center-text">charizard</h1>
    <div style="width:239px;margin:auto">
      <div style="width:96px;margin:auto">
        <img data-id="7" data-action="flip" class="toggle-sprite" src="https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/6.png">
      </div>
    </div>
  </div>
</div>

About


Languages

Language:JavaScript 96.7%Language:CSS 2.0%Language:HTML 1.3%