Add mobile version

* Remove Backstretch plugin (not working well on mobile)
* Update all plugins
* Made Hisui a different region
This commit is contained in:
2022-02-26 13:11:35 +01:00
parent 10b56c86ee
commit 3a490aa173
14 changed files with 323 additions and 89 deletions

260
style.css
View File

@@ -3,6 +3,7 @@ html, body { margin: 0; padding: 0; }
body {
width: 100vw; min-height: 100vh;
min-height: -webkit-fill-available;
margin: auto;
font-family: Verdana;
color: #e7e2e2;
@@ -10,6 +11,26 @@ body {
overflow-x: hidden;
}
.bg {
top: 0;
height: 100vh;
left: 0;
right: 0;
z-index: -1;
background: url("artwork/artwork10.jpg") center center;
position: fixed;
background-attachment: fixed;
background-size: cover;
}
@supports ( -webkit-touch-callout : none) {
.bg { background-attachment: scroll }
}
@supports not ( -webkit-touch-callout : none) {
.bg { background-attachment: fixed; }
}
a { color: #e7e2e2; font-weight: bold; }
h1 { font-size: 1.7em; }
h2 { text-align: center; }
@@ -18,7 +39,6 @@ h3 { font-variant: small-caps; }
/**** HEADER ****/
header {
height:14vh;
background: #2f2e2e;
display: flex;
justify-content: space-between;
@@ -27,13 +47,15 @@ header {
header img {
display: flex;
align-items: flex-start;
height: 12.5vh;
margin-left: 8vw; margin-top: 0.75vh;
margin-left: 8vw;
padding-top: 0.5vh;
padding-bottom: 0.5vh;
max-height: 80px;
}
header nav {
display: flex; align-items: flex-end;
margin-right: 8vw; margin-bottom: 5vh;
margin-right: 8vw; margin-bottom: 3vh;
}
header nav ul, header nav ul li {
@@ -57,7 +79,7 @@ header nav ul li a:hover { color: #ff6b79; }
/**** MAIN CONTENT ****/
article { width: 100vw; margin-top: 5vh; }
article { width: 100vw; margin-top: 5vh; margin-bottom: 5vh; }
article #container {
margin-left: 10vw; margin-right: 10vw;
@@ -65,9 +87,15 @@ article #container {
background: rgba(0, 0, 0, .85);
}
article #container .companion {
article #container .poketest-companion {
float: right;
width: 280px;
width: 210px;
margin-left: 15px;
}
article #container .flashdex-companion {
float: right;
width: 265px;
margin-left: 15px;
}
@@ -119,11 +147,12 @@ article #container.about ul li a { margin-top: 5px; margin-bottom: 5px; font-wei
.XY { border-radius:50%; background: linear-gradient(-45deg, #025DA6 50%, #EA1A3E 50%); display:block; border: 1px solid white; }
.SM { border-radius:50%; background: linear-gradient(-45deg, #ef9039 50%, #589ac8 50%); display:block; border: 1px solid white; }
.SWSH { border-radius:50%; background: linear-gradient(-45deg, #00A1E9 50%, #BF004F 50%); display:block; border: 1px solid white; }
.LA { border-radius:50%; background: #36597B; display:block; border: 1px solid white; }
/**** FOOTER ****/
#content-wrap {
padding-bottom: 12vh; /* Footer height */
padding-bottom: 5vh; /* Footer height */
}
footer {
@@ -131,7 +160,7 @@ footer {
background: #2f2e2e;
text-align: center;
position: absolute;
width: 100vw; height: 7vh;
width: 100vw; height: 5vh;
display: flex;
justify-content: center;
align-items: center;
@@ -167,7 +196,7 @@ article #container #game #configuration #right_config { float: right; }
article #container #game .button {
margin: auto;
padding: 20px; padding-top: 30px;
padding: 20px;
clear: both;
text-align: center;
}
@@ -191,14 +220,16 @@ article #container input[type=submit]:hover {
/**** GAME LAUNCHED ****/
article #container.game_active { height: 68vh; }
article #container #top_game { display: flex; justify-content: space-between; height: 8vh; }
article #container.game_active { height: 72vh; }
article #container #top_game { display: flex; justify-content: space-between; height: 10vh; }
article #container #top_game .whois { display: flex; align-items: flex-start; }
article #container #top_game .chrono {
width: 35px; height: 35px;
margin-top: 10px; margin-bottom: 0px;
padding: 12px 10px 10px 10px;
width: 2.6rem;
height: 2.6rem;
line-height: 2.4rem;
padding: 10px;
margin-top: 10px;
border-radius: 100%;
background: #e7e2e2;
color: #2f2e2e;
@@ -217,14 +248,14 @@ article #container .pokemon img.silhouette { filter: contrast(0%) brightness(170
article #container #answers {
text-align: center;
height: 10vh;
height: 14vh;
display: flex;
align-items: center;
justify-content: center;
}
article #container #answers input { margin-right: 30px; display: inline; }
article #container #answers input:last-child { margin-right: 0px; }
article #container #answers input:last-child { margin-right: 30px; }
article #container #answers .final_answer { font-size: 23px; }
article #container #answers .final_answer .good { color:#3ad48d; font-weight:bold; }
@@ -296,25 +327,24 @@ article #container.diploma #score {
/**** FLASHDEX ****/
#game #flashdex_config { margin:auto; max-width:600px; }
#game #flashdex_config { margin:auto; }
#game #flashdex_config p { text-align: center; }
#game #flashdex_config p a { text-decoration: none; }
#game #flashdex_config p label { display: inline-block; margin: 7px; }
#game #flashdex_config h2 { text-decoration: underline; font-size: 1.05em; margin-top: 25px; }
#game #flashdex_config span.alternate_forms { margin-top: 20px; margin-bottom: 0px; display: block; font-variant: small-caps; font-size: 19px; }
#game #flashdex_config p.button { padding: 0px; margin-top: 20px; }
#loading {
display: block;
font-size: 1.5em;
text-align: center;
margin-top:15px;
margin-top: 15px;
margin-bottom: 15px;
}
#container #game #flashdex {
margin:auto;
display:inline-block;
display:none;
text-align:center;
margin-top:2vh;
}
@@ -357,5 +387,189 @@ span.form.mega { background-image: url('img/icon_mega.png'); }
span.form.giga {
background-image: url('img/icon_giga.png'); background-color: white;
background-position: center; background-size:20px;
border-radius:50%; border: 1px solid white;
border-radius: 50%; border: 1px solid white;
}
/*** MOBILE ***/
@media screen and (max-width:1100px) {
article #container {
margin-left: 5vw;
margin-right: 5vw;
}
}
@media screen and (max-width:800px) {
h1 { margin: 0.2em 0; font-size:1.3em; }
h2 { font-size:1.25em; }
h3 { margin: 10px; margin-left: 0; }
header img { margin-left: 4vw; }
header nav ul { display: none; }
header { display: block; }
header nav {
display: auto;
align-items: auto;
margin-right: auto;
margin-bottom: auto;
}
header nav #hamburger {
cursor: pointer;
position: absolute;
top: 1.75rem;
right: 1.2rem;
}
header nav #hamburger .bar1,
header nav #hamburger .bar2,
header nav #hamburger .bar3 { width:30px; height:3px; background-color:#ff3636; margin:6px 0; transition:0.4s; }
header nav.active #hamburger .bar1 { transform:rotate(-45deg) translate(-4px, 6px); }
header nav.active #hamburger .bar2 { opacity:0; }
header nav.active #hamburger .bar3 { transform:rotate(45deg) translate(-6px, -9.5px); }
header nav.active ul {
margin: auto;
margin-top: 0;
background: #2f2e2e;
width: 100%;
text-align:center;
padding: 10px;
padding-top: 0px;
z-index:0;
}
header a { display: inline-block; }
header nav ul, header nav ul li { margin: 15px; }
header nav ul li a { margin-left: 0; font-size: 1.3em; }
#content-wrap { padding-bottom: 8vh; }
article { margin-top: 2vh; margin-bottom: 0vh; }
article #container {
margin-left: 4vw;
margin-right: 4vw;
padding: 5px 10px;
border-radius: 18px;
}
/* poketest */
article #container #game #configuration #left_config { float: none; }
article #container #game #configuration #right_config { float: none; }
article #container #game #configuration input[name="gen"], article #container #game #selected_options input,
article #container #game #configuration .first { margin-left:15px; margin-bottom:5px; }
article #container #game .button { padding: 10px; padding-top: 20px; }
article #container #game #configuration input[type="checkbox"] {
margin-left: 15px;
margin-top: 7px;
margin-bottom: 8px;
}
article #container input[type="submit"] {
padding: 5px;
border: 2px;
border-radius: 8px;
font-size: 15px;
margin: 3px;
}
article #container.game_active {
max-height: 76vh;
height: auto;
}
article #container #answers {
height: 100%;
display: block;
}
article #container #answers input:last-child { margin-right: 0px; }
article #container.game_active div#answers span { display: block; }
article #container.diploma #score { background: none; }
article #container #seed input {
width: 90%;
margin-top: 10px;
}
article #container.diploma #score { padding: 0px; }
article #container.diploma { border: none; }
article #container .pokemon img {
height: 37vh;
margin-top: 1vh;
}
article #container #top_game .whois { width: 80%; }
article #container #top_game .chrono {
width: 2rem;
height: 2rem;
line-height: 1.8rem;
padding: 5px;
margin-top: 5px;
}
article #container #game .button {
padding: 10px; padding-top: 15px;
}
/* flashdex */
#container #game #flashdex .pokedex { width: 230px; height: 260px; }
#game #flashdex .pokedex img { height: 225px; }
#game #flashdex_config p { text-align: left; }
#game #flashdex_config .generation {
position: relative;
display: flex;
flex-direction: row;
justify-content: space-around;
flex-wrap: wrap;
}
#game #flashdex_config .generation .gen {
display: block;
position: relative;
padding: 10px;
}
#game #flashdex_config .gen { padding: 0; margin: 0; display: block; }
#game #flashdex_config .gen label { padding: 2px; margin: 2px; margin-left: 8px; }
#game #flashdex_config select.lang { margin-left: 15px; margin-top:5px; }
#game #flashdex_config p.button { padding-top: 15px; margin-top: 15px; }
/* about */
article #container .poketest-companion, article #container .flashdex-companion,
article #container .top-companion, article #container .companion { display: none; }
article #container .middle-companion {
width: 250px;
margin: auto;
display: block;
}
article #container.about ul {
margin-left: 10px;
padding-left: 5px;
}
article #container.about p { margin-left: 0px; }
footer { height:6vh; }
}
@media screen and (max-width:400px) {
header img { height: 60px; }
header nav #hamburger { top: 1.05rem; }
}