<% content_for :title, "Todos" %>

Todos

<%= link_to new_todo_path, class: "px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors" do %>
New Todo
<% end %>
Total Todos
<%= @todos.count %>
Completed
<%= @todos.where(completed: true).count %>
<% @todos.each do |todo| %>
<%= render todo %>
<%= link_to "View", todo, class: "inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %> <%= link_to "Edit", edit_todo_path(todo), class: "inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
<% end %>
<% if @todos.empty? %>

No todos

Get started by creating a new todo.

<%= link_to new_todo_path, class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" do %> Add a todo <% end %>
<% end %>