Files
compiled.world/lib/CW/Template/Index.pm
2026-08-22 23:59:41 -06:00

42 lines
1.1 KiB
Perl

package CW::Template::Index;
use Moo;
extends 'CW::Template';
sub render {
my ($self) = @_;
my @boards = @{ $self->ctx->{boards} };
return [
div => { class => "index-content" } => [
h2 => ["Boards"],
ul => { class => "board-list" } => [
map {
(
li => { class => "board-list-item" } => [
a => {
href => '/' . $_->{id} . '/',
class => 'index-board-link'
} => [ '/' . $_->{id} . '/ - ' . $_->{name} ],
# p => {
# style => "margin: 0",
# class => 'index-board-description'
# } => [ $_->{description} ]
]
)
} @boards
]
],
div => { class => "index-content" } => [
h2 => ["Changelog"],
ul => { class => 'changelog-list' } => [
li => ["Absofuckinglutely nothing"]
]
]
];
}
1;