Pokedex
- --
-
-
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..dfe077042 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/README.md b/README.md index 0c237c1c3..51ee4539a 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ -# Trilha JS Developer - Pokedex +# pokedex + diff --git a/assets/css/global.css b/assets/css/global.css index 980e87861..f52d6317d 100644 --- a/assets/css/global.css +++ b/assets/css/global.css @@ -1,24 +1,14 @@ -* { - font-family: 'Roboto', sans-serif; - box-sizing: border-box; -} +@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;500;700&display=swap'); -body { - background-color: #f6f8fc; -} +*{ + margin: 0; + padding: 0; + box-sizing: border-box; -.content { - width: 100vw; - height: 100vh; + font-family: 'Roboto', sans-serif; +}main{ padding: 1rem; - background-color: #fff; -} - -@media screen and (min-width: 992px) { - .content { - max-width: 992px; - height: auto; - margin: 1rem auto; - border-radius: 1rem; - } +}a{ + color: currentColor; + text-decoration: none; } \ No newline at end of file diff --git a/assets/css/paige.css b/assets/css/paige.css new file mode 100644 index 000000000..ee709923c --- /dev/null +++ b/assets/css/paige.css @@ -0,0 +1,105 @@ +#content{ + height: 100vh; + display: grid; + grid-template-rows: 1fr 9fr; +} +header{ + display: flex; + justify-content: space-between; + padding: 1rem 1rem 0 1rem; + +}header a, header div{ + width: 50px; + height: 50px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; +}header a:hover, header div:hover{ + background-color: rgba(255, 255, 255, 0.418); +}header i{ + color: white; + font-size: 30px; + + +}main{ + padding: 0; + display: grid; + grid-template-rows: 1fr 1fr; +}main>div{ + padding: 1rem; +}.perfil{ + display: flex; + flex-direction: column; + position: relative; + color: white; +}.type{ + display: flex; +}.type>li{ + display: flex; + margin: .2rem; + font-size: 1.2rem; +}.perfil>span{ + align-self: flex-end; + font-size: 1.5rem; + position: relative; +}h1{ + margin: 0; + font-size: 3.5rem; +}.pokeImg{ + position: absolute; + height: 250px; + align-self: center; + bottom: -25px; + z-index: 1; +}.info{ + background-color: white; + position: absolute; + bottom: 0; + left: 0; + width: 100vw; + border-radius: 2.5rem 2.5rem 0 0; +} +th{ + text-align: left; + width: 100px; + color: gray; +}th, td{ + padding: 20px 7px; + font-size: 1.1rem; +} + +h1, h2, h3{ + text-transform: capitalize; +} +.statistic{ + text-align: center; + border-bottom: 2px solid rgba(0, 0, 0, 0.233); + padding: 5px; + width: 80%; + margin: auto; +}.fa-mars{ + color: blue; + margin: 0 3px; +}.fa-venus{ + color: rgb(255, 42, 149); + margin: 0 3px 0 5px; +} + +@media(min-width:600px){ + .pokeImg{ + height: 270px; + bottom: -45px; + }h1{ + font-size: 5rem; + } +}@media(min-width:1100px){ + .pokeImg{ + height: 350px; + }h1{ + font-size: 6rem; + }.type>li{ + font-size: 1.5rem; + } +} \ No newline at end of file diff --git a/assets/css/pokedex.css b/assets/css/pokedex.css deleted file mode 100644 index 59eef2bde..000000000 --- a/assets/css/pokedex.css +++ /dev/null @@ -1,165 +0,0 @@ -.pokemons { - display: grid; - grid-template-columns: 1fr; - margin: 0; - padding: 0; - list-style: none; -} - -.normal { - background-color: #a6a877; -} - -.grass { - background-color: #77c850; -} - -.fire { - background-color: #ee7f30; -} - -.water { - background-color: #678fee; -} - -.electric { - background-color: #f7cf2e; -} - -.ice { - background-color: #98d5d7; -} - -.ground { - background-color: #dfbf69; -} - -.flying { - background-color: #a98ff0; -} - -.poison { - background-color: #a040a0; -} - -.fighting { - background-color: #bf3029; -} - -.psychic { - background-color: #f65687; -} - -.dark { - background-color: #725847; -} - -.rock { - background-color: #b8a137; -} - -.bug { - background-color: #a8b720; -} - -.ghost { - background-color: #6e5896; -} - -.steel { - background-color: #b9b7cf; -} - -.dragon { - background-color: #6f38f6; -} - -.fairy { - background-color: #f9aec7; -} - -.pokemon { - display: flex; - flex-direction: column; - margin: .5rem; - padding: 1rem; - border-radius: 1rem; -} - -.pokemon .number { - color: #000; - opacity: .3; - text-align: right; - font-size: .625rem; -} - -.pokemon .name { - text-transform: capitalize; - color: #fff; - margin-bottom: .25rem; -} - -.pokemon .detail { - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; -} - -.pokemon .detail .types { - padding: 0; - margin: 0; - list-style: none; -} - -.pokemon .detail .types .type { - color: #fff; - padding: .25rem .5rem; - margin: .25rem 0; - font-size: .625rem; - border-radius: 1rem; - filter: brightness(1.1); - text-align: center; -} - -.pokemon .detail img { - max-width: 100%; - height: 70px; -} - -.pagination { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - width: 100%; - padding: 1rem; -} - -.pagination button { - padding: .25rem .5rem; - margin: .25rem 0; - font-size: .625rem; - color: #fff; - background-color: #6c79db; - border: none; - border-radius: 1rem; -} - -@media screen and (min-width: 380px) { - .pokemons { - grid-template-columns: 1fr 1fr; - } -} - -@media screen and (min-width: 576px) { - .pokemons { - grid-template-columns: 1fr 1fr 1fr; - } -} - -@media screen and (min-width: 992px) { - .pokemons { - grid-template-columns: 1fr 1fr 1fr 1fr; - } -} \ No newline at end of file diff --git a/assets/css/pokemon.css b/assets/css/pokemon.css new file mode 100644 index 000000000..3d8a5da35 --- /dev/null +++ b/assets/css/pokemon.css @@ -0,0 +1,137 @@ +@keyframes giro { + 0%{ + transform: rotate(0deg); + }100%{ + transform: rotate(360deg); + } +} + +main{ + display: flex; + flex-direction: column; + align-items: center; +} +#pokemonList{ + list-style: none; + display: grid; + grid-template-columns: 1fr 1fr; + + + +}.pokemon{ + background-color: #49d086; + margin: .5rem; + padding: 1rem ; + display: flex; + flex-direction: column; + + color: white; + border-radius: 1rem; + + +}.pokemon>div{ + + display: flex; + justify-content: space-around; +}.pokeImg{ + max-width: 60%; + height: 100px; + object-fit: contain; + align-self: flex-end; +}.type{ + list-style: none; +}.type>li{ + background-color: rgba(255, 255, 255, 0.205); + padding: .2rem .5rem; + margin: .5rem; + border-radius: 1rem; + text-align: center; +}.pokemon>span{ + align-self: flex-end; + color: rgba(0, 0, 0, 0.295); + font-weight: bolder; +}.pokemon>h2{ + align-self: flex-start; + text-transform: capitalize; +} + + +.carga{ + width: 40px; + display: none; +} +.carga>img{ + width: 100%; + animation: giro .5s 0s infinite forwards normal; +} + +#carregar{ + color: white; + background-color: rgb(36, 87, 255); + border: none; + padding: 4px; + border-radius: 5px; + cursor: pointer; + display: none; +}#carregar:hover{ + background-color: rgb(64, 109, 255); +} + +.grass{ + background-color: #49d086; +}.water{ + background-color: #74bcfc; +}.fire{ + background-color: #fc6c6c; +}.electric{ + background-color: #fcdc6c; +}.poison{ + background-color: #b66cfc; +}.ground{ + background-color: #c5ac5c; +}.normal{ + background-color: #bbbcbc; +}.bug{ + background-color: #6ecc3c; +}.ghost{ + background-color: #724ccc; +}.fighting{ + background-color: #fcbe6c; +}.dark{ + background-color: #352c3c; +}.rock{ + background-color: #838383; +}.psychic{ + background-color: #fc6c9c; +}.fairy{ + background-color: #fc6cdd; +}.dragon{ + background-color: #657cfc; +}.steel{ + background-color: #95b2be; +}.ice{ + background-color: #9ec8ff; +} + + + + + +@media(max-width:360px){ + #pokemonList{ + grid-template-columns: 1fr; + } +} +@media(min-width:650px){ + #pokemonList{ + grid-template-columns: 1fr 1fr 1fr; + }.pokeImg{ + height: 150px; + } +}@media(min-width:1100px){ + #pokemonList{ + grid-template-columns: 1fr 1fr 1fr 1fr; + }.pokeImg{ + height: 200px; + } +} \ No newline at end of file diff --git a/assets/favicon/favicon.ico b/assets/favicon/favicon.ico new file mode 100644 index 000000000..24fe28e5d Binary files /dev/null and b/assets/favicon/favicon.ico differ diff --git a/assets/js/main.js b/assets/js/main.js index bcaa24508..0e0fd5858 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,47 +1,39 @@ -const pokemonList = document.getElementById('pokemonList') -const loadMoreButton = document.getElementById('loadMoreButton') - -const maxRecords = 151 -const limit = 10 -let offset = 0; - -function convertPokemonToLi(pokemon) { - return ` -
epecies | +${pokemon.specie} | +
---|---|
height | +${pokemon.height} | +
weight | +${pokemon.weight} | +
abilities | +${pokemon.abilities.join(', ')} | +