From: Emil Williams Date: Thu, 8 May 2025 04:11:10 +0000 (-0600) Subject: -- X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=3a1389fa42b25148dfd901adb4a91d0bcf7eebf9;p=emil-3chen.org.git -- --- diff --git a/perl/Triple.pm b/perl/Triple.pm index 85deda3..33320b9 100644 --- a/perl/Triple.pm +++ b/perl/Triple.pm @@ -21,10 +21,10 @@ use constant { }; 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; @@ -46,7 +46,7 @@ sub Triple::main { -charset => 'UTF-8', ); - print %static{$path} || %static{''}; + print %static{$path} // %static{''}; } } @@ -83,13 +83,15 @@ sub init { 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) { diff --git a/tt/index b/tt/index index 296271e..ac61c58 100644 --- a/tt/index +++ b/tt/index @@ -12,8 +12,8 @@ [% FOREACH board IN boards %] - [% titles.${board} %] - [% descriptions.${board} %] + [% ${page.${board}}.2 %] + [% ${page.${board}}.3 %] [% END %]