routes.pm 551 B

12345678910111213141516171819202122232425
  1. package Theme;
  2. use lib 'lib';
  3. use Trog::Routes::HTML;
  4. my %routes = {
  5. '/links' => {
  6. method => 'GET',
  7. callback => \&links,
  8. },
  9. };
  10. my $processor = Text::Xslate->new(
  11. path => 'www/themes/teodesian.net/templates',
  12. );
  13. sub links ($query, $input, $render_cb) {
  14. my $content = $processor->render('links.tx', {
  15. title => "Approved Propaganda from the ministry of family values",
  16. theme_dir => 'www/themes/teodesian.net',
  17. });
  18. return Trog::Routes::HTML::index($query, $input, $render_cb, $content);
  19. }
  20. 1;