};
our %page = (
- '' => [ STATIC_PAGE, '404' ],
- '/' => [ STATIC_PAGE, 'index' ],
- '/+/' => [ DYNAMIC_PAGE, 'img' ], # General Board: General Discussion
- '/sys/' => [ DYNAMIC_PAGE, 'img' ], # Admin Board: Administration info, Q&A, & Changelog
+ '' => [ STATIC_PAGE, '404', '404 Not Found', '404 Not Found' ],
+ '/' => [ STATIC_PAGE, 'index', 'Root', 'Forum Index' ],
+ '/+/' => [ DYNAMIC_PAGE, 'img', 'General', 'General Discussion Board' ],
+ '/sys/' => [ DYNAMIC_PAGE, 'img', 'System', 'Site Info' ],
);
our %static;
-charset => 'UTF-8',
);
- print %static{$path} || %static{''};
+ print %static{$path} // %static{''};
}
}
sub init_static {
my ($sitename, $version) = @_;
+ my @boards = (
+ '/+/',
+ '/sys/',
+ );
my $vars = {
- # boards => \@Triple::boards,
- # titles => \%Triple::titles,
- # descriptions => \%Triple::descriptions,
+ boards => \@boards,
+ page => \%Triple::page,
sitename => $sitename,
version => $version,
- uri => '',
description => '',
};
foreach my $key (keys %page) {
</tr>
[% FOREACH board IN boards %]
<tr>
- <td><a href="[% board %]">[% titles.${board} %]</a></td>
- <td>[% descriptions.${board} %]</td>
+ <td><a href="[% board %]">[% ${page.${board}}.2 %]</a></td>
+ <td>[% ${page.${board}}.3 %]</td>
</tr>
[% END %]
</table>