summaryrefslogtreecommitdiff
path: root/app/views/pokedex_entries/_entry.html.erb
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2023-11-03 02:25:06 -0400
committerDavid Gay <david@davidgay.org>2023-11-03 02:25:06 -0400
commite6577d0fd5ffacd24cf52125cd44037fc33fdb9a (patch)
treecc723b8a01df75735b01bd69c4ca3b32ea2082c5 /app/views/pokedex_entries/_entry.html.erb
parentd4c92922e393876e93ad13943ba45fb08586e6c8 (diff)
Better home#index, using partials
Diffstat (limited to 'app/views/pokedex_entries/_entry.html.erb')
-rw-r--r--app/views/pokedex_entries/_entry.html.erb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/views/pokedex_entries/_entry.html.erb b/app/views/pokedex_entries/_entry.html.erb
new file mode 100644
index 0000000..992aa69
--- /dev/null
+++ b/app/views/pokedex_entries/_entry.html.erb
@@ -0,0 +1,12 @@
+<div class="flex space-x-2 items-center">
+ <div class="flex justify-around bg-white h-[60px] w-[60px] border border-orange-900
+ p-1 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>