]> git.xolatile.top Git - emil-3chen.org.git/commitdiff
--
authorEmil Williams <emilemilemil@cock.li>
Thu, 8 May 2025 04:11:10 +0000 (22:11 -0600)
committerEmil Williams <emilemilemil@cock.li>
Thu, 8 May 2025 04:11:10 +0000 (22:11 -0600)
perl/Triple.pm
tt/index

index 85deda391f4b6dceba134ae56a737acdddbad225..33320b9055d523374e3f2a7553c5b21763c1cacb 100644 (file)
@@ -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) {
index 296271e12759df84e3e3b3865d2bfc47ab1d6ea2..ac61c5876def8dbfdf8c17f728b6ce1a38e60b28 100644 (file)
--- a/tt/index
+++ b/tt/index
@@ -12,8 +12,8 @@
     </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>