<%# /templates/todo.html.ep %> % layout 'default'; % title 'Todo List'; <% content_for head => begin %> <% end %>

✅ Todo List

<% my @active = grep { !$_->{is_completed} } @$todos; %> <% my @completed = grep { $_->{is_completed} } @$todos; %> <% if (@active) { %>

Active Tasks

<% for my $todo (@active) { %>
<%= $todo->{task_name} %>
<% } %> <% } %> <% if (@completed) { %>

Completed

<% for my $todo (@completed) { %>
<%= $todo->{task_name} %>
<% } %>
<% } %> <% unless (@$todos) { %>

📭 Your todo list is empty!

Add your first task above to get started.

<% } %>

Confirm Deletion

×

Are you sure you want to delete ""?

Clear Completed

×

Are you sure you want to remove all completed tasks?