Dashboard

<%= link_to "Add Game", new_game_path, class: "px-4 py-2 bg-indigo-600 text-white rounded hover:bg-indigo-700" %>
Total Games
<%= @total_games %>
Physical Games
<%= @physical_games %>
Digital Games
<%= @digital_games %>
Total Spent
$<%= sprintf("%.2f", @total_spent || 0) %>
Completed
<%= @completed_games %>
Backlog
<%= @backlog_games %>

Top Platforms

<% if @games_by_platform.any? %>
    <% @games_by_platform.each do |platform, count| %>
  • <%= platform %> <%= count %>
  • <% end %>
<% else %>

No games yet

<% end %>

Top Genres

<% if @games_by_genre.any? %>
    <% @games_by_genre.each do |genre, count| %>
  • <%= genre %> <%= count %>
  • <% end %>
<% else %>

No games yet

<% end %>

Recently Added

<% if @recently_added_games.any? %>
<% @recently_added_games.each do |game| %>
<%= link_to game.title, game, class: "font-semibold text-indigo-600 hover:text-indigo-800" %>
<%= game.platform.name %>
<%= game.date_added.strftime("%b %d, %Y") %>
<% end %>
<%= link_to "View All Games", games_path, class: "mt-4 inline-block text-indigo-600 hover:text-indigo-800" %> <% else %>

No games in your collection yet. <%= link_to "Add your first game", new_game_path, class: "text-indigo-600 hover:text-indigo-800" %>

<% end %>

Currently Playing

<% if @currently_playing_games.any? %>
<% @currently_playing_games.each do |game| %>
<%= link_to game.title, game, class: "font-semibold text-indigo-600 hover:text-indigo-800" %>
<%= game.platform.name %>
<% end %>
<% else %>

Not currently playing anything

<% end %>