summaryrefslogtreecommitdiff
path: root/app/views/pokedex_entries/index.html.erb
blob: e31cf2dded2437ad744721de8f518ef0d2bb4a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 %>