Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenitude committed Oct 8, 2023
1 parent 355b3b0 commit d2e0021
Show file tree
Hide file tree
Showing 10 changed files with 304 additions and 58 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./publics/styles/css/style.css">
<link rel="stylesheet" href="./publics/styles/css/build/style.css">
<!-- <link rel="stylesheet" href="./publics/styles/css/development/main.css"> -->
<title>Document</title>
</head>
<body>
<div class="container containerHome">
<div class="flex-center container containerHome">
<div class="pokedex-front"></div>
<div class="pokedex">
<div class="container-cards"></div>
Expand Down
4 changes: 2 additions & 2 deletions pokemon.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./publics/styles/css/style.css">
<link rel="stylesheet" href="./publics/styles/css/build/style.css">
<title>Document</title>
</head>
<body>
<div class="container containerPokemon">
<div class="flex-center container containerPokemon">
<div class="pokedex-front"></div>
<div class="pokedex">
<div class="pokemon">
Expand Down
3 changes: 2 additions & 1 deletion publics/scripts/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ if(document.querySelector('.containerHome')) {
});

const desc = document.createElement('a');
desc.setAttribute('class', 'desc');
desc.setAttribute('class', 'flex-center')
desc.classList.add('desc');
desc.setAttribute('href', `pokemon.html?name=${pokemon.name.en}`);

const number = document.createElement('strong');
Expand Down
9 changes: 6 additions & 3 deletions publics/scripts/js/pokemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ if(document.querySelector('.containerPokemon')) {

// Name & Number
const containerNameNumber = document.createElement('div');
containerNameNumber.setAttribute('class', 'nameAndNumber');
containerNameNumber.setAttribute('class', 'flex-center');
containerNameNumber.classList.add('nameAndNumber');

const number = document.createElement('h2');
number.setAttribute('class', 'number');
Expand All @@ -211,7 +212,8 @@ if(document.querySelector('.containerPokemon')) {
titleSprites.innerText = 'Formes';

const containerSprites = document.createElement('div');
containerSprites.setAttribute('class', 'sprites');
containerSprites.setAttribute('class', 'flex-center');
containerSprites.classList.add('sprites');

const spriteDefault = document.createElement('img');
spriteDefault.setAttribute('src', `${pkmn.sprites.front_default}`);
Expand All @@ -236,7 +238,8 @@ if(document.querySelector('.containerPokemon')) {
titleTypes.innerText = 'Types';

const types = document.createElement('p');
types.setAttribute('class', 'types');
types.setAttribute('class', 'flex-center');
types.classList.add('types');
types.innerHTML = pkmn.types.length > 1
? `<img src="${pkmn.types[0][0]}"> <img src="${pkmn.types[1][0]}">`
: `<img src="${pkmn.types[0][0]}">`;
Expand Down
211 changes: 211 additions & 0 deletions publics/styles/css/build/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
*, ::before, ::after {
box-sizing: border-box;
margin: 0;
padding: 0;

}

html, body, .container {
width: 100%;
height: 100%;
font-family: Arial, Helvetica, sans-serif;
background: linear-gradient(45deg, #e0a352, #e43030);
}

.flex-center {
display: flex;
justify-content: center;
align-items: center;
}

.container {
flex-wrap: wrap;
background: transparent;
position: relative;
}

.pokedex-front {
background: url('../../../assets/images/motismart1.png') no-repeat center;
background-size: contain;
position: absolute;
top: 5px;
left: 5px;
filter: drop-shadow(0 0 1px #000);
}

.pokedex {
width: 280px;
height: 575px;
background: url('../../../assets/images/motismart2.png') no-repeat center;
background-size: contain;
z-index: 10px;
position: relative;
filter: drop-shadow(0 0 5px #000);
-webkit-filter: drop-shadow(0 0 5px #000);
}

.container-cards, .pokemon {
padding: 10px 5px;
background: #333;
border-radius: 16px;
display: flex;
flex-direction: column;
gap: 10px;
width: 162px;
height: 313px;
overflow-x: auto;
position: absolute;
top: 55%;
left: 50%;
transform: translate(-50%, -50%);
}

.pokemon {
padding: 15px 10px;
}

:is(.container-cards, .pokemon)::-webkit-scrollbar {
width: 0;
}

.card {
border: 1px solid black;
width: 98%;
height: 50px;
margin: 0 auto;
padding-left: 5px;
border-radius: 15px;
display: flex;
box-shadow: inset 0 0 7px #000;
}

.card > img {
z-index: 5px;
transform: scale(1.1);
filter: drop-shadow(0 0 2px #000);
cursor: pointer;
}

.desc {
padding-left: 5px;
text-decoration: none;
color: #000 ;
font-size: 0.7rem;
flex-direction: column;
gap: 5px;
flex-grow: 1;
height: 100%;
}

/* Pokemon Page : Global */

.back {
text-decoration: none;
color: #000;
font-weight: bold;
font-size: 1.5rem;
}

h3 {
width: 100%;
padding: 5px 0 15px;
}

.types, .number, .name, h3, .nameAndNumber {
text-align: center;
}

/* Pokemon Page : Name and Number */

.nameAndNumber {
border-top: 1px dashed #000;
padding: 10px 0;
}

.number {
width: 30%;
font-size: 1rem;
}

.name {
width: 70%;
font-size: 1rem;
}

/* Pokemon Page : Sprites */
.sprites {
padding: 5px 0 15px;
flex-wrap: wrap;
border-top: 1px dashed #000;
border-bottom: 1px dashed #000;
}

.sprites img{
width: 50%;
cursor: pointer;
}

/* Pokemon Page : Types */
.types {
padding: 0 0 20px;
border-bottom: 1px dashed #000;
filter: drop-shadow(0 0 2px #000);
-webkit-filter: drop-shadow(0 0 2px #000);
flex-direction: column;
gap: 10px;
}

/* Pokemon Page : Measures */
.measures {
padding: 0px 0 20px;
border-bottom: 1px dashed #000;
}

.measures ul {
list-style-position: inside;
}

/* Pokedex front */
@media all and (min-height: 700px) {
.pokedex-front {
width: 110px;
height: 220px;
}
}

@media all and (min-height: 900px) {
.pokedex-front {
width: 150px;
height: 300px;
}
}

@media all and (min-width: 1000px) {
.pokedex-front {
width: 250px;
height: 650px;
}
}

/* Pokedex */
@media all and (min-width: 700px) and (min-height: 601px) {
.pokedex {
width: 450px;
height: 775px;
}

.container-cards, .pokemon {
width: 217px;
height: 415px;
}

.desc {
flex-direction: row;
justify-content: flex-start;
}

.types {
flex-direction: row;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

html, body {
width: 100%;
height: 100%;
min-height: 100%;
font-family: Arial, Helvetica, sans-serif;
background: linear-gradient(45deg, #e0a352, #e43030);
}
Expand All @@ -17,30 +17,27 @@ html, body {
height: 100%;
display: flex;
flex-wrap: wrap;
gap: 10px;
display: flex;
justify-content: center;
align-items: center;
background: transparent;
position: relative;

}

.pokedex-front {
width: 380px;
height: 450px;
background: url('../../assets/images/motismart1.png') no-repeat center;
background: url('../../../assets/images/motismart1.png') no-repeat center;
background-size: contain;
z-index: 9;
position: absolute;
top: 5%;
left: 5%;

top: 5px;
left: 5px;
filter: drop-shadow(0 0 1px #000);
}

.pokedex {
width: 80%;
height: 80%;
background: url('../../assets/images/motismart2.png') no-repeat center;
width: 280px;
height: 575px;
background: url('../../../assets/images/motismart2.png') no-repeat center;
background-size: contain;
z-index: 10px;
position: relative;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
.container-cards {
padding: 20px 5px 10px 5px;
padding: 10px 5px;
background: #333;
width: 190px;
height: 361px;
border-radius: 16px;
-webkit-border-radius: 16px;
-moz-border-radius: 16px;
-ms-border-radius: 16px;
-o-border-radius: 16px;
position: absolute;
top: 43%;
left: 50%;
transform: translate(-50%, -27.4%);
-webkit-transform: translate(-50%, -27.4%);
-moz-transform: translate(-50%, -27.4%);
-ms-transform: translate(-50%, -27.4%);
-o-transform: translate(-50%, -27.4%);
overflow-x: hidden;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 5px;
z-index: -1;
gap: 10px;
width: 162px;
height: 313px;
overflow-x: auto;
position: absolute;
top: 55%;
left: 50%;
transform: translate(-50%, -50%);
}

.container-cards::-webkit-scrollbar {
Expand Down Expand Up @@ -61,6 +51,8 @@
color: #000 ;
font-size: 0.7rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 5px;
flex-grow: 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import url('./global.css');
@import url('./home.css');
@import url('./pokemon.css');
@import url('./queries.css');
Loading

0 comments on commit d2e0021

Please sign in to comment.