diff options
author | David Gay <david@davidgay.org> | 2023-11-03 01:03:48 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2023-11-03 01:03:48 -0400 |
commit | 0c5cccbecfc8b71fb318c275f142306e19bb7e43 (patch) | |
tree | 178b401fe2ecf6bd965524e078e9882305342a69 /app/views/pokedex_entries/index.html.erb | |
parent | 47ecf3f515ef5bd7db2c4f3bce0a872a46ca2233 (diff) |
Pokedex entry recording and viewing on runs#show
Diffstat (limited to 'app/views/pokedex_entries/index.html.erb')
-rw-r--r-- | app/views/pokedex_entries/index.html.erb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/views/pokedex_entries/index.html.erb b/app/views/pokedex_entries/index.html.erb new file mode 100644 index 0000000..e31cf2d --- /dev/null +++ b/app/views/pokedex_entries/index.html.erb @@ -0,0 +1,20 @@ +<%= turbo_frame_tag "pokedex_entries" do %> + <%= link_to "Record an entry", new_run_pokedex_entry_path(@run) %> + + <div class="space-y-2 p-4 h-[400px] border border-orange-900 overflow-y-scroll"> + <% @pokedex_entries.each do |entry| %> + <div class="flex space-x-2 items-center"> + <div class="flex justify-around bg-white h-[60px] w-[60px] border border-orange-900 + rounded shadow"> + <%= image_tag entry.pokemon.sprite_path(shiny: entry.shiny?) %> + </div> + <div> + <div><%= "Shiny " if entry.shiny? %><%= entry.pokemon.name %></div> + <div class="text-sm">Recorded by + <%= link_to entry.user.name || "???", user_path(entry.user) %> @ <%= entry.recorded_at %> + </div> + </div> + </div> + <% end %> + </div> +<% end %> |