Compare commits

..

29 Commits

Author SHA1 Message Date
06f0835353 Bump year to 2025 2025-01-25 01:23:29 +01:00
fe4dd38656 Update pokemon 2024-07-14 15:12:02 +02:00
b6393beaee Update repository URL 2024-07-14 15:10:34 +02:00
9429626a25 Add Hidden Treasure DLC Pokémons 2024-01-29 15:04:29 +01:00
8afa5684cf Flashdex: wording 2024-01-07 01:22:54 +01:00
cba1c7c3ef Flashdex: added parameters in URL for sharing 2024-01-06 15:31:52 +01:00
670b33850f Remove twitter script from homepage 2024-01-06 00:26:15 +01:00
a4b32ca3ae Fix 1G alternative images not showing 2024-01-06 00:24:53 +01:00
38bdaf397b Remove diploma border 2024-01-06 00:20:34 +01:00
9992e7cc28 Update jQuery, update 2024, remove Twitter share (RIP) 2024-01-05 18:38:03 +01:00
4ab3df9b81 Update jQuery: 3.6.0 => 3.6.4 2023-04-29 13:01:02 +02:00
bd413faf9f Bugfix and code cleaning 2023-04-29 12:57:21 +02:00
ae165903bd Add Walking Wake and Iron Leaves 2023-03-15 18:33:25 +01:00
36dc9b5923 Fix missing names 2023-02-19 00:52:59 +01:00
09bbf223c3 Update to support the 9th generation 2023-02-18 00:48:06 +01:00
c3f84ab2ab Adding 3 new 9G monsters 2022-10-17 23:39:00 +02:00
109334f441 Update with 5 new 9G monsters 2022-09-08 13:57:15 +02:00
5ec2590920 Update with new 9G Pokémons 2022-08-04 23:27:31 +02:00
68d555c676 Fix Pokétest indexes 2022-08-03 00:06:52 +02:00
9edf9e135d Add new batch of 9G monsters 2022-07-25 12:17:35 +02:00
3bde0a4a4f Fix: game could be launched multiple times 2022-03-15 12:47:37 +01:00
caab9fe47d Version 2.9
* Custom input for answer
* Option for no timer
* Play again button
* Rewrite About page
* Modernize clipboard copy
* Lots of misc. fixes
2022-03-14 21:30:46 +01:00
074726aea4 Small visual improvements for Flashdex 2022-03-04 14:39:45 +01:00
396681cfb0 Real iOS compatibility 2022-03-04 14:26:36 +01:00
14e784f821 iOS compatibility 2022-03-04 13:56:46 +01:00
0b19f84814 Simplification of multiple artworks 2022-03-03 14:22:30 +01:00
18c80456c4 Merge branch 'master' into type-forms 2022-03-03 13:32:45 +01:00
8eeb0dee35 Forms visible in Flashdex 2022-03-03 13:30:59 +01:00
19aa6b70b3 Add Pokémon types 2022-03-02 14:20:50 +01:00
26 changed files with 1801 additions and 1391 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "pokemon"]
path = pokemon
url = https://git.n700.ovh/keb/poketest-pokemon.git
url = https://git.marchal.dev/keb/poketest-pokemon.git

View File

@ -2,28 +2,30 @@
### About
Around 2012, when I was still a computer science student, I found increasingly difficult the remember the name of all Pokémons. So I decided, as a way to be familiar with JavaScript (even though I've never touched it again after that) to program this little website: <u>Pokétest</u>, an interactive browser game, where you have to find the name of Pokémons in a limited time ; and <u>Flashdex</u>, which is a simple Pokédex with high resolution images.
Around 2012, when I was still a computer science student, I found increasingly difficult the remember the name of all Pokémons. So I decided, as a way to be familiar with JavaScript (even though I've never touched it again after that) to program this little website: <u>Pokétest</u>, an interactive browser game, where you have to find the name of Pokémons in a limited time; and <u>Flashdex</u>, which is a simple Pokédex with high resolution images.
Now that there are now more than 900 of them, and it's as useful as ever! The website features filters for all generations, eight languages settings (English, French, Deutsch, Korean, Japanese, Rōmaji, Traditional and Simplified Chinese) and four combinables modes (image visible or as a silhouette ; configurable number of questions or infinite). It can be played with the mouse or the keyboard (input 1, 2, 3, 4).
Now that there are now more than a thousand of them, and it's as useful as ever! The website features filters for all generations, eight languages settings (English, French, Deutsch, Korean, Japanese, Rōmaji, Traditional and Simplified Chinese) and four combinables modes (image visible or as a silhouette; configurable number of questions or infinite). It can be played with the mouse or the keyboard (input 1, 2, 3, 4).
### Planned updates
- Multiple forms visible in Flashdex
- Custom input answers for harder difficulty
- Pokémon type support
- Make answer choices closer by type
- Type weakness calculator
### Scripts
**imagemagick** can be extremely useful to work with batch of images. This script allows to resize a batch of PNG images to a max width of 700px, without altering the height while keeping the ratio:
`mogrify '*.png[x700>]'`
`magick mogrify '*.png[x700>]'`
And this one allows to resize to 700x700px, but putting the image at the center if it is smaller than that.
`magick mogrify -resize 700x700 -background transparent -gravity center -extent 700x700 *.png`
### Licenses
This website has been developed in <strong>JavaScript</strong> using the <strong>jQuery</strong> library. It uses the <a href="https://github.com/alexanderdickson/waitForImages">waitForImages plugin</a>. All of those components are licensed under the MIT license, as is this website's source code. This website is <strong>HTML5</strong> and <strong>CSS3</strong> compliant.
The Pokémon names, the associated artworks and the Pokémon licence is trademarked by <strong>Nintendo</strong> and <strong>The Pokémon Company</strong>, 1996 - 2022.
The Pokémon names, the associated artworks and the Pokémon licence is trademarked by <strong>Nintendo</strong> and <strong>The Pokémon Company</strong>, 1996 - 2025.
All the Pokémon artworks were taken from <a href="https://bulbapedia.bulbagarden.net/wiki/Main_Page">Bulbapedia</a>, that I'd like to thank for their huge work for the Pokémon community.

View File

@ -7,10 +7,10 @@
<link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css" id="stylesheet">
<link rel="shortcut icon" type="image/png" href="img/favicon.png" />
<script src="jquery-3.6.0.min.js"></script>
<script src="jquery-3.7.1.min.js"></script>
<script src="interface.js"></script>
<script src="poketest.js"></script>
<title>Pokétest</title>
<title>Pokétest - About</title>
</head>
<body>
<div class="bg"></div>
@ -32,54 +32,58 @@
<img src="pokemon/877-0.png" class="top-companion" alt="morpeko" />
<h1>About</h1>
<ul>
<li><a href="#1">Who are you?</a></li>
<li><a href="#2">What is this website made with?</a></li>
<li><a href="#3">Can I use my keyboard to play?</a></li>
<li><a href="#4">What is the «Infinite» option in the number of questions exactly?</a></li>
<li><a href="#5">This website doesn't work well on my browser.</a></li>
<li><a href="#6">Can you add more languages?</a></li>
<li><a href="#7">Can you add this feature?</a></li>
<li><a href="#8">Copyrights</a></li>
<li><a href="#1">How to play: Pokétest</a></li>
<li><a href="#2">How to use: Flashdex</a></li>
<li><a href="#3">Website informations</a></li>
<li><a href="#4">Copyrights</a></li>
</ul>
<h3 id="1">Who are you?</h3>
<p>Hi! My name is <a href="https://theo.marchal.dev/">Théo</a> and I'm a game developer. I love Pokémon, but it has been getting hard to remember all those names, even though I always complete the Pokédex in my games!</p>
<h3 id="1">How to play: Pokétest</h3>
<p>The Pokétest is a game where you have to guess the name of the Pokémon appearing. The following options are available:</p>
<ul>
<li><strong>Generations</strong>: you can filter the Pokémon generations that you want. Either all of them, or what you choose, including options for regional forms, mega-evolutions and gigantamax forms.</li>
<li><strong>Language</strong>: all the languages available in the main games are present. Choose the one you're familiar with or want to learn! Please note that in certain country, the Pokémon names are the english ones.</li>
<li><strong>Answer type</strong>: "choice" makes you choose between 4 propositions ; "input" makes you type the exact name, for a harder difficulty!</li>
<li><strong>Silhouette</strong>: "silhouette" only allows you the see the shape, "full art" allows you to see the whole artwork.</li>
<li><strong>Number of questions</strong>: a number to choose between 15, 30, 50, 100, Infinite or Whole Set. In the case of Infinite, the game ends when you have made 5 bad answers.</li>
<li><strong>Time to answer</strong>: the timer, to choose between 2, 5, 10, 30 and 99 seconds. You can also deactivate it.</li>
</ul>
<p>Note: if the answer type is "Choice", you can use the "1", "2", "3" or "4" keys to answer. You can also use the "Enter" key to launch the game.</p>
<h3 id="2">What is this website made with?</h3>
<h3 id="2">How to use: Flashdex</h3>
<p>The Flashdex is a very simple Pokédex, useful to see the Pokémons in a good resolution. It is filtered by generation and alternate forms. You can chose the language in which it is displayed.</p>
<p>When a deck is generated, the URL is changed with the parameters that were selected. This way, you can easily share it to whoever you want.</p>
<p>Types are displayed in the top-left corner, and generations on the top-right corner. If there are different artworks available for the Pokémon, arrows are displayed on the bottom-left corner. You can use them to switch between artworks. Please note that those are not always alternate forms, they are alternate artworks. For example:</p>
<ul>
<li>The first generation has at least three artworks available by Pokémon.</li>
<li>The starters of the third and fourth generations have two official artworks.</li>
<li>A Pokémon like Pikachu (#25) has 17 official artworks, some of them are different forms available ingame.</li>
<li>Castform (#351) or Rotom (#479), for example, have different forms with different types associated.</li>
<li>A unique case is Beldum (#374) which has an artwork for its shiny form.</li>
</ul>
<h3 id="3">Website informations</h3>
<p>
This website has been developed in <strong>JavaScript</strong> using the <strong>jQuery</strong> library.<br />
It uses the <a href="https://github.com/alexanderdickson/waitForImages">waitForImages plugin</a>.<br />
This website is <strong>HTML5</strong> and <strong>CSS3</strong> compliant.<br />
It has been developed in <strong>JavaScript</strong> using the <strong>jQuery</strong> library.<br />
It uses the <a href="https://github.com/alexanderdickson/waitForImages">waitForImages plugin</a>.
</p>
<p>
All of those components are licensed under the MIT license, as is the website source code, which is <a href="https://git.n700.ovh/keb/poketest">available here</a>.<br />
This website is <strong>HTML5</strong> and <strong>CSS3</strong> compliant.
All of those components are licensed under the MIT license, as is the website source code, which is <a href="https://git.marchal.dev/keb/poketest">available here</a>.<br />
If you found a bug or want to add a feature, you can always contact me or make a pull request.
</p>
<p>
This website has been developed by <a href="https://theo.marchal.dev/">Théo</a>, a game developer having trouble to remember the name of all those monsters.
</p>
<h3 id="3">Can I use my keyboard to play?</h3>
<p>Yes! You can launch the game with "Enter", then press "1", "2", "3" or "4" to answer.</p>
<h3 id="4">What is the «Infinite» option in the number of questions exactly?</h3>
<p>When playing with the Infinite option, the game ends when you have 5 bad answers on all the set.</p>
<img src="pokemon/60RB.png" class="middle-companion" alt="poliwag" />
<h3 id="5">This website doesn't work well on my browser.</h3>
<p>Please contact me or make a pull request!</p>
<h3 id="6">Can you add more languages?</h3>
<p>The game currently supports all of the languages available in the main games. If your language is not on the list, it probably uses the English names! I will not support other languages by myself, but you can always contribute by making a pull request!</p>
<h3 id="7">Can you add this feature?</h3>
<p>Please contact me or make a pull request!</p>
<h3 id="8">Copyrights</h3>
<p>The Pokémon names, the associated artworks and the Pokémon licence is trademarked by <strong>Nintendo</strong> and <strong>The Pokémon Company</strong>, 1996 - 2022.<br />
All the Pokémon artworks were taken from <a href="https://bulbapedia.bulbagarden.net/wiki/Main_Page">Bulbapedia</a>, that I'd like to thank for their huge work for the Pokémon community.</p>
<h3 id="4">Copyrights</h3>
<p>The Pokémon names, the associated artworks and the Pokémon licence is trademarked by <strong>Nintendo</strong> and <strong>The Pokémon Company</strong>, 1996 - 2025.</p>
<p>All the Pokémon artworks were taken from <a href="https://bulbapedia.bulbagarden.net/wiki/Main_Page">Bulbapedia</a>, that I'd like to thank for their huge work for the Pokémon community.</p>
</div>
</article>
</div>
<footer>
<p>© 2012 - 2022 Pokétest 2.7</p>
<p>© 2012 - 2025 Pokétest 2.10</p>
</footer>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 KiB

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 KiB

After

Width:  |  Height:  |  Size: 761 KiB

BIN
artwork/artwork11.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 KiB

BIN
artwork/artwork12.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 KiB

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 KiB

After

Width:  |  Height:  |  Size: 474 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

After

Width:  |  Height:  |  Size: 408 KiB

View File

@ -7,11 +7,11 @@
<link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css" id="stylesheet">
<link rel="shortcut icon" type="image/png" href="img/favicon.png" />
<script src="jquery-3.6.0.min.js"></script>
<script src="jquery-3.7.1.min.js"></script>
<script src="waitforimages-2.4.0.min.js"></script>
<script src="interface.js"></script>
<script src="flashdex.js"></script>
<title>Pokétest</title>
<title>Pokétest - Flashdex</title>
</head>
<body>
<div class="bg"></div>
@ -31,13 +31,15 @@
<article>
<div id="container">
<div id="game">
<img src="pokemon/R79-99.png" alt="slowbro" class="flashdex-companion" />
<img src="pokemon/963-999.png" alt="finizen" class="flashdex-companion" />
<h1>Flashdex</h1>
<p><strong>Now including the first monsters from Pokémon Scarlet & Violet!</strong></p>
<p><strong>Now updated for Pokémon Scarlet and Violet DLC: The Hidden Treasure of Area Zero!</strong></p>
<p>The Flashdex is a very simple Pokédex, useful to see your favorite creatures in good resolution. Perfect for learning new names, and to see the different generations and different Pokémon forms!</p>
<p>The Flashdex is a very simple Pokédex, useful to see your favorite creatures in good resolution. Perfect for learning new names, and to see the different generations and Pokémon forms! It also includes the monster's type.</p>
<p>For more details, please read the <a href="about.html">About page</a>!</p>
<div id="flashdex_config">
<h2><a href="#" class="all unselected"><strong>Select all</strong></a></h2>
@ -85,7 +87,7 @@
</div>
</article>
<footer>
<p>© 2012 - 2022 Pokétest 2.7</p>
<p>© 2012 - 2025 Pokétest 2.10</p>
</footer>
</div>
</body>

View File

@ -1,5 +1,5 @@
$(document).ready(function() {
$(document).ready(function()
{
/****** Generations ******/
var G1 = [1, 151];
var G2 = [152, 251];
@ -9,24 +9,26 @@ $(document).ready(function() {
var G6 = [650, 721];
var G7 = [722, 809];
var G8 = [810, 905];
var G9 = [906, 908];
var MEGA = [909, 958];
var GIGA = [959, 990];
var REG = [991, 1043];
var G9 = [906, 1025];
var MEGA = [1026, 1075];
var GIGA = [1076, 1107];
var REG = [1108, 1162];
var gen_number = 9;
var extra_number = 3; // mega, giga, reg
/************ GAME *************/
/*******************************/
// loading json file
var json = $.getJSON('pokemon.json', function(pk) {
$.getJSON('pokemon.json', function(pk)
{
$('article #container #game #loading').hide();
var pklist = pk;
$('article #container #flashdex_config .all').click(function() {
if ($(this).hasClass("unselected")) {
$('article #container #flashdex_config .all').click(function()
{
if ($(this).hasClass("unselected"))
{
for (i = 1; i < 10; ++i)
$('input[name="'+i+'g"]').prop('checked', true);
$('input[name="mega"]').prop('checked', true);
@ -34,7 +36,9 @@ $(document).ready(function() {
$('input[name="gigantamax"]').prop('checked', true);
$(this).removeClass("unselected").addClass("selected");
$(this).text("Unselect all");
} else {
}
else
{
for (i = 1; i < 10; ++i)
$('input[name="'+i+'g"]').prop('checked', false);
$('input[name="mega"]').prop('checked', false);
@ -45,21 +49,38 @@ $(document).ready(function() {
}
})
// start the game when clicking on start game
$('article #container .button input.start').click(function() {
$('article #container #game #loading').show();
$('article #container #game #flashdex').empty();
$('article #container .button input.start').click(function()
{
var lang = $('article select.lang option:selected').attr('id');
var gen_list = new Array();
var pokemon_generation_list = new Array();
generations();
$('article #container #game #flashdex').hide();
if (gen_list.length == 0)
return;
function getFormText(pkmn) {
setUrlSearch();
$('article #container #game #loading').show();
$('article #container #game #flashdex').empty().hide();
function setUrlSearch()
{
gen = '';
if (gen_list.length < (gen_number + extra_number))
{
for (i in gen_list)
gen += gen_list[i].substring(0,1);
}
else gen += "all";
window.history.replaceState(null, null, "?gen=" + gen + "&lang=" + lang);
localStorage.setItem('lang', lang);
}
function getFormText(pkmn)
{
if (pkmn["origin"] == "Kanto")
return '<span class="form RB"></span>'
else if (pkmn["origin"] == "Johto")
@ -78,57 +99,191 @@ $(document).ready(function() {
return '<span class="form SWSH"></span>'
else if (pkmn["origin"] == "Hisui")
return '<span class="form LA"></span>'
else if (pkmn["origin"] == "9G")
else if (pkmn["origin"] == "Paldea")
return '<span class="form SV"></span>'
else if (pkmn["type"] == "mega")
else if (pkmn["form"] == "mega")
return '<span class="form mega"></span>';
else if (pkmn["type"] == "giga")
else if (pkmn["form"] == "giga")
return '<span class="form giga"></span>';
return '';
}
function getFormattedNumber(num) {
function getFormattedNumber(num)
{
if (num[0] == 'M' || num[0] == 'R' || num[0] == 'G')
return num.substring(1, num.length);
return num;
}
for (i in pokemon_generation_list) {
function getFormattedTypes(num) {
str = '<span class="types"><span class="'+num["type"][0]+'">'+num["type"][0]+'</span>';
if (num["type"][1])
str += '<span class="'+num["type"][1]+'">'+num["type"][1]+'</span>';
str += '</span>';
return str;
}
function getFormattedTypes(num, index)
{
str = '<span class="'+num["type"+index][0]+'">'+num["type"+index][0]+'</span>';
if (num["type"+index][1])
str += '<span class="'+num["type"+index][1]+'">'+num["type"+index][1]+'</span>';
return str;
}
function getFormattedSpriteButton(num)
{
if (num["sprite"] || num["origin"] == "Kanto")
return '<span class="button"><span class="left-arrow">&#9664;&#xFE0E;</span><span class="right-arrow">&#9654;&#xFE0E;</span></span>';
return '';
}
for (i in pokemon_generation_list)
{
$('article #container #game #flashdex').append(
'<div class="pokedex id_'+pklist.mn[pokemon_generation_list[i]]["num"]+'">'
+ '<span class="types">' + getFormattedTypes(pklist.mn[pokemon_generation_list[i]], '') + '</span>'
+ getFormattedSpriteButton(pklist.mn[pokemon_generation_list[i]], '')
+ getFormText(pklist.mn[pokemon_generation_list[i]]) // either gigantamax or mega-evolution
+ '<img src="pokemon/'+ imageType((pklist.mn[pokemon_generation_list[i]]["num"])) +'.png"/>'
+ '<img src="pokemon/'+ imageType(pklist.mn[pokemon_generation_list[i]]) +'.png"/>'
+ '<span class="name">' + '<strong>' + '#' + getFormattedNumber(pklist.mn[[pokemon_generation_list[i]]]["num"]) + '</strong> '
+ pklist.mn[[pokemon_generation_list[i]]][lang] + '</span>'
+ '</div>'
);
}
$('article #container #game #flashdex').waitForImages(function() {
$('article #container #game #flashdex').waitForImages(function()
{
$(this).show();
$('article #container #game #loading').hide();
});
function generations() {
function handleArtworks(origin, left)
{
function handleDefault()
{
var form = url.split('-')[1];
if (left)
{
if (form > 0)
form--;
else
form = pklist.mn[pokemon]["sprite"] - 1;
}
else
{
if (form < pklist.mn[pokemon]["sprite"] - 1)
form++;
else
form = 0;
}
var newUrl = 'pokemon/' + pokemonUrl + '-' + form + '.png';
origin.parent().parent().find("img").attr('src', newUrl);
handleChangeType(form, pokemon);
}
function handleKanto()
{
var KantoForm = '';
for (var i = 0; i < originalUrl.length; i++)
{
if (originalUrl[i].match(/[A-Z]/))
KantoForm += originalUrl[i];
}
if (left)
{
if (KantoForm == "RG")
KantoForm = "RB";
else if (KantoForm == "RB")
KantoForm = "";
else
KantoForm = "RG";
}
else
{
if (KantoForm == "RB")
KantoForm = "RG";
else if (KantoForm == "RG")
KantoForm = "";
else
KantoForm = "RB";
}
if (KantoForm)
KantoForm = "-" + KantoForm;
var newUrl = 'pokemon/' + pokemonUrl + KantoForm + '.png';
origin.parent().parent().find("img").attr('src', newUrl);
}
function handleChangeType(form, num)
{
if (form != 0)
{
if (pklist.mn[num]["type"+form])
origin.parent().parent().find(".types").empty().append(getFormattedTypes(pklist.mn[num], form));
}
else
origin.parent().parent().find(".types").empty().append(getFormattedTypes(pklist.mn[num], ''));
}
var url = origin.parent().parent().find("img").attr('src');
var originalUrl = url;
url = url.split('/')[1];
url = url.split('.')[0];
var pokemonUrl = url.split('-')[0];
var pokemon = pklist.mn.findIndex(function(item, i)
{
return item.num == pokemonUrl;
});
if (pklist.mn[pokemon]["origin"] == "Kanto" && !pklist.mn[pokemon]["sprite"])
handleKanto();
else if (pklist.mn[pokemon]["sprite"])
handleDefault();
}
$('.left-arrow').click(function(e)
{
handleArtworks($(this), true);
});
$('.right-arrow').click(function(e)
{
handleArtworks($(this), false);
});
function generations()
{
// create the list of the different generations
function createGenerationList(name) {
function createGenerationList(name)
{
if ( $('article input[name="'+name+'"]').is(':checked') )
gen_list[gen_list.length] = name;
}
// create the list of all possible pokemons for selected options
function generatePokemonList() {
function evaluateByGeneration(index, name, variable) {
if (gen_list[index] == name) {
function generatePokemonList()
{
function evaluateByGeneration(index, name, variable)
{
if (gen_list[index] == name)
{
for (j = (variable[0] - 1); j <= (variable[1] - 1); j++)
pokemon_generation_list[pokemon_generation_list.length] = j;
}
}
if (gen_list.length > 0) {
for (i in gen_list) {
if (gen_list.length > 0)
{
for (i in gen_list)
{
evaluateByGeneration(i, "1g", G1); evaluateByGeneration(i, "2g", G2); evaluateByGeneration(i, "3g", G3);
evaluateByGeneration(i, "4g", G4); evaluateByGeneration(i, "5g", G5); evaluateByGeneration(i, "6g", G6);
evaluateByGeneration(i, "7g", G7); evaluateByGeneration(i, "8g", G8); evaluateByGeneration(i, "9g", G9);
@ -146,44 +301,13 @@ $(document).ready(function() {
generatePokemonList();
}
// multiple artworks
function imageType(result) {
var four_types = [351, 386, 585, 586, 676, 741, 800];
var three_types = [249, 250, 384, 412, 413, 718, 745, 898];
var two_types = [251, 252, 255, 258, 374, 387, 390, 393, 421, 422, 423, 487, 492, 495, 498, 501, 521, 550, 555,
592, 593, 641, 642, 643, 644, 645, 647, 648, 668, 678, 681, 720, 746, 774, 791, 792, 802, 849,
876, 877, 888, 889, 892, 905, "G892"];
function no_randomizer() {
if (result === 25)
return (result+'-9');
if (result === 666)
return (result+'-0');
if (result === 646)
return (result+'-0');
if (result === 479)
return (result+'-0');
for (a in four_types) {
if (four_types[a] == result)
return (result+'-0');
function imageType(num)
{
if (num["sprite"])
return num["num"] + "-0";
return num["num"];
}
for (a in three_types) {
if (three_types[a] == result)
return (result+'-0');
}
for (a in two_types) {
if (two_types[a] == result)
return (result+'-0');
}
return result;
}
return no_randomizer(result);
}
});
});
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css" id="stylesheet">
<link rel="shortcut icon" type="image/png" href="img/favicon.png" />
<script src="jquery-3.6.0.min.js"></script>
<script src="jquery-3.7.1.min.js"></script>
<script src="interface.js"></script>
<script src="poketest.js"></script>
<title>Pokétest</title>
@ -30,14 +30,14 @@
<article>
<div id="container">
<div id="game">
<img src="pokemon/R58.png" alt="Growlithe" class="poketest-companion" />
<h1>What is Pokétest?</h1>
<img src="pokemon/912.png" alt="Quaxly" class="poketest-companion" />
<h1>Pokétest</h1>
<p><strong>Now updated for Pokémon Legends: Arceus!</strong></p>
<p><strong>Now updated for Pokémon Scarlet and Violet DLC: The Hidden Treasure of Area Zero!</strong></p>
<p>There are now more than 900 Pocket&nbsp;Monsters, and a handful number of alternative forms. It's getting pretty tricky to know them all, let alone to catch them all. With Pokétest, you can train yourself and become unbeatable! Filter by generation, language and even by Mega&nbsp;Evolutions, Regional or Gigantamax&nbsp;Forms!</p>
<p>We have now reached the thousand Pocket&nbsp;Monsters mark, and more than a hundred of alternative forms. It's getting pretty tricky to know them all, let alone to catch them all. With Pokétest, you can train yourself and become unbeatable! Filter by generation, language and even by Mega&nbsp;Evolutions, Regional or Gigantamax&nbsp;Forms!</p>
<p>You can play with your keyboard: just press 1, 2, 3 or 4 to choose the answer!</p>
<p>For more details, please read the <a href="about.html">About page</a>!</p>
<div id="configuration">
<h2>Configuration</h2>
@ -75,13 +75,17 @@
<span class="SM1">7</span><span class="SM2">G</span>
</strong> (722 - 809)</label><br />
<input type="checkbox" name="8g" id="8g"><label for="8g"> <strong title="8g">
<input type="checkbox" name="8g" id="8g"><label for="8g"> <strong title="Galar">
<span class="SWSH1">8</span><span class="SWSH2">G</span>
</strong> (810 - 905)</label><br />
<input type="checkbox" name="9g" id="9g"><label for="9g"> <strong title="Paldea">
<span class="SV1">9</span><span class="SV2">G</span>
</strong> (906 - 1008)</label><br />
<input type="checkbox" name="regional" id="regional"><label for="regional"> <strong title="Regional">
Regional Forms
</strong> (53)</label><br />
</strong> (55)</label><br />
<input type="checkbox" name="mega" id="mega"><label for="mega"> <strong title="Mega">
Mega-Evolutions
@ -104,6 +108,10 @@
<option name="lang" id="cn" value="cn">繁體中文</option>
<option name="lang" id="cs" value="cs">简体中文</option>
</select>
<h3>Answer type</h3>
<input type="radio" name="answertype" class="first" id="choice" checked><label for="choice"> Choice</label>
<input type="radio" name="answertype" id="input"><label for="input"> Input</label>
</div>
<div id="right_config">
<h3>Silhouette</h3>
@ -112,7 +120,7 @@
<h3>Number of questions</h3>
<select class="questions first">
<!--<option name="questions" id="1" value="1">1 (debug)</option>-->
<!-- <option name="questions" id="1" value="1">1 (debug)</option> -->
<option name="questions" id="15" value="15">15</option>
<option name="questions" id="30" value="30">30</option>
<option name="questions" id="50" value="50">50</option>
@ -123,14 +131,15 @@
<h3>Time to answer</h3>
<select class="time first">
<!--<option name="time" id="1" value="1">1 (debug)</option>-->
<option name="time" id="2" value="2">2</option>
<option name="time" id="5" value="5" selected>5</option>
<option name="time" id="10" value="10">10</option>
<option name="time" id="30" value="30">30</option>
<option name="time" id="99" value="99">99</option>
<!-- <option name="time" id="1" value="1">1 (debug)</option> -->
<option name="time" id="2" value="2">2 seconds</option>
<option name="time" id="5" value="5" selected>5 seconds</option>
<option name="time" id="10" value="10">10 seconds</option>
<option name="time" id="30" value="30">30 seconds</option>
<option name="time" id="99" value="99">99 seconds</option>
<option name="time" id="notimer" value="notimer">No timer</option>
<!--<option name="time" id="10000" value="10000">10000 (debug)</option>-->
</select> seconds
</select>
</div>
</div>
@ -141,11 +150,8 @@
</div>
</article>
<footer>
<p>© 2012 - 2022 Pokétest 2.7</p>
<p>© 2012 - 2025 Pokétest 2.10</p>
</footer>
</div>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
</script>
</body>
</html>

View File

@ -1,30 +1,55 @@
$(document).ready(function() {
function random(min, max) {
$(document).ready(function()
{
function random(min, max)
{
return Math.floor(Math.random()*(max-min+1)+min);
}
// have a nice little background
//$.backstretch("artwork/artwork"+random(1, 10)+".jpg");
// hamburger mobile
$("#hamburger .container").click(function()
{
if ($("nav").hasClass("active"))
{
$("nav ul").slideUp(200, function()
{
$("nav").removeClass("active");
});
}
else
{
$("nav").addClass("active");
$("nav ul").slideDown(200);
}
});
// splice url arguments
function gup(name, url) {
function gup(name, url)
{
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
var regex = new RegExp(regexS);
var results = regex.exec(url);
return results == null ? null : results[1];
}
// index.html
if (location.pathname.includes("index.html"))
{
// read url
local_gen = gup('gen', window.location.href);
if (local_gen != null) {
local_gen = gup('gen', location.href);
if (local_gen != null)
{
if (local_gen == "all")
$('article #container #game #configuration input#all').attr('checked', true);
else {
else
{
$('article #container #game #configuration input#select').attr('checked', true);
for (i = 0; i < local_gen.length; i++) {
for (i = 0; i < local_gen.length; i++)
{
if (local_gen.charAt(i)) {
if (local_gen.charAt(i) == "m")
$('article #container #game #configuration #selected_options input#mega').attr('checked', true);
@ -39,23 +64,33 @@ $(document).ready(function() {
$('#selected_options').slideDown();
}
$('article #container #game #configuration select.lang').val(gup('lang', window.location.href));
if (gup('silhouette', window.location.href) == "true")
$('article #container #game #configuration input#silhouette').attr('checked', true);
else
$('article #container #game #configuration input#full').attr('checked', true);
if (gup('answertype', window.location.href) == "choice")
$('article #container #game #configuration input#choice').attr('checked', true);
else
$('article #container #game #configuration input#input').attr('checked', true);
$('article #container #game #configuration select.questions').val(gup('questions', window.location.href));
$('article #container #game #configuration select.time').val(gup('time', window.location.href));
}
else { // if we did not come from a personalized URL, we read localstorage
if (localStorage.getItem('generation') != null) {
if (localStorage.getItem('generation') != 'all') {
else // if we did not come from a personalized URL, we read localstorage
{
if (localStorage.getItem('generation') != null)
{
if (localStorage.getItem('generation') != 'all')
{
gen_list = localStorage.getItem('generation');
$('article #container #game #configuration input#select').attr('checked', true);
for (i = 0; i < gen_list.length; i++) {
if (gen_list.charAt(i)) {
for (i = 0; i < gen_list.length; i++)
{
if (gen_list.charAt(i))
{
if (gen_list.charAt(i) == "m")
$('article #container #game #configuration #selected_options input#mega').attr('checked', true);
else if (gen_list.charAt(i) == "r")
@ -67,45 +102,72 @@ $(document).ready(function() {
}
}
$('#selected_options').slideDown();
} else
}
else
$('article #container #game #configuration input#all').attr('checked', true);
}
if (localStorage.getItem('lang') != null)
$('article #game #configuration select.lang').val(localStorage.getItem('lang'));
if (localStorage.getItem('silhouette') != null)
$('article #game #configuration input:radio[name=silhouette]#'+localStorage.getItem('silhouette')).attr('checked', true);
if (localStorage.getItem('answertype') != null)
$('article #game #configuration input:radio[name=answertype]#'+localStorage.getItem('answertype')).attr('checked', true);
if (localStorage.getItem('questions') != null)
$('article #game #configuration select.questions').val(localStorage.getItem('questions'));
if (localStorage.getItem('time') != null)
$('article #game #configuration select.time').val(localStorage.getItem('time'));
}
// select generation toggle
$('#configuration input#all').click(function() {
$('#configuration input#all').click(function()
{
$('#selected_options').slideUp();
});
$('#configuration input#select').click(function() {
$('#configuration input#select').click(function()
{
$('#selected_options').slideDown();
});
}
// hamburger mobile
$("#hamburger .container").click(function()
// flashdex.html
if (location.pathname.includes("flashdex.html"))
{
if ($("nav").hasClass("active"))
// read url
local_gen = gup('gen', location.href);
if (local_gen != null)
{
$("ul").slideUp(200, function()
if (local_gen == "all")
{
$("nav").removeClass("active");
});
for (i = 0; i < 10; i++)
$('article #container #game #flashdex_config input#' + i + 'g').attr('checked', true);
$('article #container #game #flashdex_config input#mega').attr('checked', true);
$('article #container #game #flashdex_config input#regional').attr('checked', true);
$('article #container #game #flashdex_config input#gigantamax').attr('checked', true);
}
else
{
$("nav").addClass("active");
$("ul").slideDown(200);
for (i = 0; i < local_gen.length; i++)
{
if (local_gen.charAt(i)) {
if (local_gen.charAt(i) == "m")
$('article #container #game #flashdex_config input#mega').attr('checked', true);
else if (local_gen.charAt(i) == "r")
$('article #container #game #flashdex_config input#regional').attr('checked', true);
else if (local_gen.charAt(i) == "g")
$('article #container #game #flashdex_config input#gigantamax').attr('checked', true);
else
$('article #container #game #flashdex_config input#' + local_gen.charAt(i) + 'g').attr('checked', true);
}
}
}
$('article #container #game #flashdex_config select.lang').val(gup('lang', window.location.href));
}
else
{
if (localStorage.getItem('lang') != null)
$('article #container #game #flashdex_config select.lang').val(localStorage.getItem('lang'));
}
}
});
});

2
jquery-3.6.0.min.js vendored

File diff suppressed because one or more lines are too long

2
jquery-3.7.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

Submodule pokemon updated: 169163ed00...7deba0828c

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,6 @@ $(document).ready(function() {
/********************************/
/****** General variables ******/
var score = 0;
var questions = 0;
var good_answers = 0;
var bad_answers = 0;
@ -30,10 +29,10 @@ $(document).ready(function() {
var G6 = [650, 721];
var G7 = [722, 809];
var G8 = [810, 905];
var G9 = [906, 908];
var MEGA = [909, 958];
var GIGA = [959, 990];
var REG = [991, 1043];
var G9 = [906, 1025];
var MEGA = [1026, 1075];
var GIGA = [1076, 1107];
var REG = [1108, 1162];
var gen_number = 9;
var extra_number = 3; // mega, giga, reg
@ -65,6 +64,11 @@ $(document).ready(function() {
return false;
}
function normalizeString(string)
{
return string.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, "");
}
/************ GAME *************/
/*******************************/
@ -96,6 +100,7 @@ $(document).ready(function() {
else // else, it's all the generation, from the first one to the regional forms
max_questions = REG[1] + 1;
}
answertype = $('article input[name="answertype"]:checked').attr('id');
game();
});
}
@ -156,7 +161,7 @@ $(document).ready(function() {
}
else
{
for (i = 0; i < gen_number; i++)
for (i = 1; i <= gen_number; i++)
createGenerationList((i + "g"));
createGenerationList("mega");
createGenerationList("gigantamax");
@ -170,36 +175,26 @@ $(document).ready(function() {
// multiple artworks
function imageType(result)
{
// TODO
var four_types = [351, 386, 585, 586, 676, 741, 800];
var three_types = [249, 250, 384, 412, 413, 718, 745, 898];
var two_types = [251, 252, 255, 258, 374, 387, 390, 393, 421, 422, 423, 487, 492, 495, 498, 501, 521, 550, 555,
592, 593, 641, 642, 643, 644, 645, 647, 648, 668, 678, 681, 720, 746, 774, 791, 792, 802, 849,
876, 877, 888, 889, 892, 905, "G892"];
function randomizer()
function randomizer(result)
{
if (result >= MEGA[0]) return (pklist.mn[result-1]["num"])
if (result === 25) return (result+'-'+random(0, 16));
if (result === 666) return (result+'-'+random(0, 20));
if (result === 646) return (result+'-'+random(0, 6));
if (result === 479) return (result+'-'+random(0, 5));
for (i in four_types) {
if (four_types[i] == result) return (result+'-'+random(0, 3));
if (pk.mn[result]["sprite"])
return pklist.mn[result]["num"] + '-' + random(0, pk.mn[result]["sprite"] - 1);
else
{
if (pk.mn[result]["origin"] == "Kanto")
{
randomValue = random(0, 2);
if (randomValue == 0)
return pklist.mn[result]["num"];
else if (randomValue == 1)
return pklist.mn[result]["num"]+'-RB';
else if (randomValue == 2)
return pklist.mn[result]["num"]+'-RG';
}
for (i in three_types) {
if (three_types[i] == result) return (result+'-'+random(0, 2));
return pklist.mn[result]["num"];
}
for (i in two_types) {
if (two_types[i] == result) return (result+'-'+random(0, 1));
}
if (result > 151) return result;
if ((tmp = random(0, 2)) == 0) return result;
else if (tmp == 1) return (result+'RB');
else return (result+'RG');
}
image_name = randomizer(result+1);
image_name = randomizer(result);
image_memory = new Image();
image_memory.src = 'pokemon/' + image_name + '.png';
return image_name;
@ -238,8 +233,10 @@ $(document).ready(function() {
available_pokemon.splice(resultIndex, 1);
answer = pklist.mn[result][lang];
if (answertype == "choice")
chooseOptions(result, lang);
imageType(result + 1);
imageType(result);
}
function game()
@ -248,16 +245,29 @@ $(document).ready(function() {
questions++;
chrono = max_chrono;
$('article #container').addClass('game_active');
$('article #container #share').empty();
$('article #container #seed').empty();
$('article #container #copyseed').empty();
$('article #container #share').remove();
$('article #container #seed').remove();
$('article #container #copyseed').remove();
if (chrono != "notimer")
$('article #container .chrono').empty().append(chrono);
$('article #container .whois').empty().append("Who's that Pokémon? " + (!infinite? " ("+questions+"/"+max_questions+")" : ""));
$('article #container .pokemon').empty().append('<img src="pokemon/'+image_name+'.png" class="'+(silhouette)+'" />');
$('article #container #answers').empty().append('<span><input type="submit" class="option a1" name="a1" value="'+options[0]+'"></span>')
$('article #container #answers').append('<span><input type="submit" class="option a2" name="a2" value="'+options[1]+'"></span>')
$('article #container #answers').append('<span><input type="submit" class="option a3" name="a3" value="'+options[2]+'"></span>')
$('article #container #answers').append('<span><input type="submit" class="option a4" name="a4" value="'+options[3]+'"></span>')
else
$('article #container .chrono').hide();
$('article #container .whois').empty().append("Who's that Pokémon? " + (!infinite? " (" + questions + "/" + max_questions + ")" : ""));
$('article #container .pokemon').empty().append('<img src="pokemon/' + image_name + '.png" class="' + (silhouette) + ' ' + (answertype) + '" />');
if (answertype == "choice")
{
$('article #container #answers').empty().append('<span><input type="submit" class="option a1" name="a1" value="' + options[0] + '"></span>');
$('article #container #answers').append('<span><input type="submit" class="option a2" name="a2" value="' + options[1] + '"></span>');
$('article #container #answers').append('<span><input type="submit" class="option a3" name="a3" value="' + options[2] + '"></span>');
$('article #container #answers').append('<span><input type="submit" class="option a4" name="a4" value="' + options[3] + '"></span>');
}
else
{
$('article #container #answers').empty().append('<form autocomplete="off"><input type="text" id="answer" name="answer" placeholder="Input the Pokémon name!"\
class="choice"><p class="button"><input type="submit" value="Answer!"></p></form>');
$('article #container #answers input').focus().select();
}
// timer setting
var clock = setInterval(function()
@ -278,6 +288,8 @@ $(document).ready(function() {
($(this).attr('value') == answer) ? showAnswer(true) : showAnswer(false);
});
if (answertype == "choice")
{
document.addEventListener('keydown', funcListener = function(event)
{
function checkAnswer(v)
@ -290,6 +302,20 @@ $(document).ready(function() {
else if (event.keyCode == 51 || event.keyCode == 75) checkAnswer(3);
else if (event.keyCode == 52 || event.keyCode == 76) checkAnswer(4);
});
}
else
{
$("form").submit(function(event)
{
clearInterval(clock);
pokemon_name = event.currentTarget[0].value;
event.preventDefault(); // do not submit form
if (normalizeString(answer) == normalizeString(pokemon_name))
showAnswer(true);
else
showAnswer(false);
});
}
function showAnswer(ok)
{
@ -320,16 +346,6 @@ $(document).ready(function() {
function score()
{
function generateTwitterText()
{
var start_sentence = 'I got ';
var end_sentence = 'Can you get a better score than me?';
var score_sentence = (Math.floor(good_answers/max_questions*100))+'% Pokémons right!'
if (!infinite) return start_sentence+score_sentence+" "+end_sentence;
else return start_sentence+good_answers+" good Pokémon answers! "+end_sentence;
}
function generateSeed()
{
gen = '';
@ -339,8 +355,10 @@ $(document).ready(function() {
gen += gen_list[i].substring(0,1);
}
else gen += "all";
s_gen = "?gen=" + gen;
s_lang = "&lang=" + lang;
s_answertype = "&answertype=" + answertype;
s_silhouette = "&silhouette=" + (silhouette == "silhouette" ? "true" : "false");
s_questions = "&questions=" + (!whole_set? max_questions : "set");
s_time = "&time=" + max_chrono;
@ -348,14 +366,15 @@ $(document).ready(function() {
// save in the local storage for default use
localStorage.setItem('generation', gen);
localStorage.setItem('lang', lang);
localStorage.setItem('answertype', answertype);
localStorage.setItem('silhouette', silhouette);
localStorage.setItem('questions', (!whole_set? max_questions : "set"));
localStorage.setItem('time', max_chrono);
return domain + s_gen + s_lang + s_silhouette + s_questions + s_time;
return domain + s_gen + s_lang + s_answertype + s_silhouette + s_questions + s_time;
}
$('article #container #score .pokemon').after('<div id="seed"></div><div id="share"></div>');
$('article #container #score .pokemon').empty().after('<div id="seed"></div><div id="share"></div>');
$('article #container').addClass('diploma');
$('article #container').removeClass('game_active');
$('article #container .chrono').hide();
@ -366,19 +385,15 @@ $(document).ready(function() {
$('article #container #seed').empty().append('<p style="margin:0px;">Share your configuration</p><input type="text" name="seed" value="'+
generateSeed()+'">');
$('article #container #share').empty().append('<div id="copyseed"><a href="#">Copy</a></div><a href="https://twitter.com/share" \
class="twitter-share-button" data-url="'+generateSeed()+'" data-text="'+generateTwitterText()+
'" data-size="large" data-hashtags="Pokétest">Tweet</a>');
$.getScript("//platform.twitter.com/widgets.js"); // for the twitter button to work
$('article #container #answers').remove(); // until play again is fixed
//$('article #container #answers').empty().append('<p class="button"><input type="submit" \
// class="start_again" name="start_again" value="Play again!"></p>');
$('article #container #share').empty().append('<div id="copyseed"><a href="#">Copy</a></div>');
$('article #container #answers').empty().append('<p class="button"><input type="submit" \
class="start_again" name="start_again" value="Play again!"></p>');
// copy seed in clipboard
$("article #container #copyseed").click(function()
{
$('article #container #seed input').select();
document.execCommand("copy");
navigator.clipboard.writeText($('article #container #seed input').val());
});
$('article #container .button input.start_again').click(function()
@ -387,6 +402,7 @@ $(document).ready(function() {
chrono = max_chrono;
$('article #container .chrono').show();
$('article #container').removeClass('diploma');
$('article #container').addClass('game_active');
game();
});
}

139
style.css
View File

@ -17,7 +17,7 @@ body {
left: 0;
right: 0;
z-index: -1;
background: url("artwork/artwork10.jpg") center center;
background: url("artwork/artwork11.jpg") center center;
position: fixed;
background-attachment: fixed;
background-size: cover;
@ -100,7 +100,7 @@ article #container .flashdex-companion {
}
article #container .top-companion {
margin-top: 20px;
margin-top: 20px; margin-bottom: 10px;
float: right;
width: 250px;
margin-left: 25px; margin-right: 25px;
@ -114,7 +114,6 @@ article #container .middle-companion {
article #container.about p { margin-left:20px; }
article #container.about ul { margin-bottom: 3.5%; }
article #container.about ul li { margin-top: 5px; margin-bottom: 5px; }
article #container.about ul li a { margin-top: 5px; margin-bottom: 5px; font-weight: normal; }
@ -257,8 +256,20 @@ article #container #answers {
justify-content: center;
}
article #container #answers input { margin-right: 30px; display: inline; }
article #container #answers input:last-child { margin-right: 30px; }
article #container #answers input { margin-right: 15px; margin-left: 15px; display: inline; }
article #container #answers form input:last-child { margin: initial; }
article #container #answers form input.choice {
padding: 10px;
min-width: 25vw;
margin: auto;
margin-bottom: auto;
border-radius: 9px;
margin-bottom: 5px;
margin-right: 15px;
}
article #container #answers form .button { margin: 5px; display: inline-block; }
article #container #answers .final_answer { font-size: 23px; }
article #container #answers .final_answer .good { color:#3ad48d; font-weight:bold; }
@ -293,7 +304,6 @@ article #container #seed input {
}
article #container #copyseed {
float: left;
width: 60px; height: 16px;
display: block;
padding: 10px; padding-top: 4px; padding-bottom: 8px;
@ -302,7 +312,8 @@ article #container #copyseed {
font-size: 15px;
font-variant: small-caps;
text-decoration: none;
cursor:pointer;
cursor: pointer;
margin: auto;
}
article #container #copyseed a {
@ -313,12 +324,6 @@ article #container #copyseed a {
article #container #copyseed:hover { background:lightseagreen; }
article #container.diploma {
border-style: solid;
border-image: url(img/border.png) 64 64 64 62 repeat;
border-width: 8px 8px 8px 8px;
}
article #container.diploma #score {
background: url('img/red.png') no-repeat;
background-size: 180px; background-position: right bottom;
@ -349,11 +354,10 @@ article #container.diploma #score {
margin:auto;
display:none;
text-align:center;
margin-top:2vh;
}
#container #game #flashdex .pokedex {
width: 250px; height: 285px;
width: 250px;
border: 1px solid white;
padding: 10px;
margin: 10px;
@ -368,32 +372,85 @@ article #container.diploma #score {
height: 250px;
display: block;
margin: auto;
margin: 12px auto;
}
#game #flashdex .pokedex span.name {
text-align: center;
font-size: 1em;
display: block;
margin: auto; margin-top: 15px;
#game #flashdex .pokedex .button {
position: absolute;
bottom: 0;
left: 0;
margin: 8px;
background: white;
padding: 0px;
border-radius: 5px;
color: dimgray;
padding-bottom: 1.5px;
padding-top: 0.5px;
}
span.form {
#game #flashdex .pokedex .left-arrow, #game #flashdex .pokedex .right-arrow {
cursor: pointer;
user-select: none;
font-size: 0.9rem;
padding: 0rem 0.2rem;
line-height: 1.2rem;
}
#game #flashdex .pokedex span.form {
display: block;
float: right;
width: 25px; height: 25px;
background-size: 25px 25px;
position: absolute;
right: 10px;
}
span.form.mega { background-image: url('img/icon_mega.png'); }
span.form.giga {
#game #flashdex .pokedex span.form.mega { background-image: url('img/icon_mega.png'); }
#game #flashdex .pokedex 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;
}
#game #flashdex .pokedex span.types {
display: flex;
float: left;
margin-bottom: 12px;
}
#game #flashdex .pokedex span.types:after {
clear: both;
}
#game #flashdex .pokedex span.types span {
margin: 0px;
margin-right: 5px;
padding: 5px;
border-radius: 2px;
font-family: Sans-Serif;
font-weight: bold;
color: #fff;
font-size: 0.8rem;
text-shadow: 0 0 2px #000;
}
#game #flashdex .pokedex span.types .Grass { background: #78C850; }
#game #flashdex .pokedex span.types .Poison { background: #A040A0; }
#game #flashdex .pokedex span.types .Fire { background: #F08030; }
#game #flashdex .pokedex span.types .Dragon { background: #7038F8; }
#game #flashdex .pokedex span.types .Flying { background: #A890F0; }
#game #flashdex .pokedex span.types .Water { background: #6890F0; }
#game #flashdex .pokedex span.types .Bug { background: #A8B820; }
#game #flashdex .pokedex span.types .Normal { background: #A8A878; }
#game #flashdex .pokedex span.types .Dark { background: #705848; }
#game #flashdex .pokedex span.types .Electric { background: #F8D030; }
#game #flashdex .pokedex span.types .Ground { background: #E0C068; }
#game #flashdex .pokedex span.types .Psychic { background: #F85888; }
#game #flashdex .pokedex span.types .Ice { background: #98D8D8; }
#game #flashdex .pokedex span.types .Steel { background: #B8B8D0; }
#game #flashdex .pokedex span.types .Fairy { background: #EE99AC; }
#game #flashdex .pokedex span.types .Fighting { background: #C03028; }
#game #flashdex .pokedex span.types .Rock { background: #B8A038; }
#game #flashdex .pokedex span.types .Ghost { background: #705898; }
/*** MOBILE ***/
@ -467,8 +524,8 @@ span.form.giga {
/* poketest */
article #container #game #configuration #left_config { float: none; }
article #container #game #configuration #right_config { float: none; }
/*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; }
@ -497,8 +554,11 @@ span.form.giga {
display: block;
}
article #container #answers input:last-child { margin-right: 0px; }
article #container #answers input:last-child { margin-right: 0px; margin-left: 0px; }
article #container.game_active div#answers span { display: block; }
article #container #answers form input.choice { min-width: 75vw; margin-right:0px; }
article #container.diploma #score { background: none; }
article #container #seed input {
width: 90%;
@ -512,6 +572,11 @@ span.form.giga {
margin-top: 1vh;
}
article #container .pokemon img.input {
height: 42vh;
margin-top: 1vh;
}
article #container #top_game .whois { width: 80%; }
article #container #top_game .chrono {
width: 2rem;
@ -525,10 +590,11 @@ span.form.giga {
padding: 10px; padding-top: 15px;
}
article #container #answers form .button { display: block; }
/* flashdex */
#container #game #flashdex .pokedex { width: 230px; height: 260px; }
#game #flashdex .pokedex img { height: 225px; }
#container #game #flashdex .pokedex { width: 230px; }
#game #flashdex_config p { text-align: left; }
@ -540,6 +606,10 @@ span.form.giga {
flex-wrap: wrap;
}
#game #flashdex .pokedex img {
height: 230px;
}
#game #flashdex_config .generation .gen {
display: block;
position: relative;
@ -549,7 +619,7 @@ span.form.giga {
#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; }
#game #flashdex_config p.button { padding-top: 0px; margin-top: 0px; }
/* about */
@ -572,6 +642,15 @@ span.form.giga {
footer { height:6vh; }
}
@media screen and (max-width:500px) {
article #container #game #configuration #left_config { float: none; text-align: center; }
article #container #game #configuration #right_config { float: none; text-align: center; }
article #container #game #configuration input[name="gen"], article #container #game #selected_options input, article #container #game #configuration .first {
margin-left: 0px;
}
}
@media screen and (max-width:400px) {
header img { height: 60px; }
header nav #hamburger { top: 1.05rem; }