summaryrefslogtreecommitdiff
path: root/app/views/pokedex/show.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/pokedex/show.html.erb')
-rw-r--r--app/views/pokedex/show.html.erb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/views/pokedex/show.html.erb b/app/views/pokedex/show.html.erb
new file mode 100644
index 0000000..bcff932
--- /dev/null
+++ b/app/views/pokedex/show.html.erb
@@ -0,0 +1,15 @@
+<div class="space-y-4">
+ <h1>Pokédex</h1>
+
+ <div class="flex flex-wrap gap-4">
+ <% Pokemon.where(pokedex_num: 1..151).order(:pokedex_num).each do |pokemon| %>
+ <div class="flex flex-col flex-auto items-center w-[100px] bg-orange-200 rounded">
+ <div class="flex-1 text-display">No. <%= pokemon.pokedex_num %></div>
+ <div class="flex-grow flex flex-col justify-around">
+ <%= image_tag "sprites/pokemon/#{pokemon.pokedex_num}.png" %>
+ </div>
+ <div class="flex-1"><%= pokemon.name %></div>
+ </div>
+ <% end %>
+ </div>
+</div>