From 3a1389fa42b25148dfd901adb4a91d0bcf7eebf9 Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Wed, 7 May 2025 22:11:10 -0600 Subject: [PATCH] -- --- perl/Triple.pm | 20 +++++++++++--------- tt/index | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) 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 %] -- 2.39.5