package CW::Template::Index; use Moo; extends 'CW::Template'; sub render { my ($self) = @_; my @boards = @{ $self->ctx->{boards} }; return [ map { ( li => [ a => { href => '/' . $_->{id} . '/', class => 'index-board-link' } => [ '/' . $_->{id} . '/ - ' . $_->{name} ], p => { class => 'index-board-description' } => [ $_->{description} ] ] ) } @boards ]; } 1;