CategoryBar.pm 566 B

123456789101112131415161718192021222324252627282930
  1. package Trog::Component::CategoryBar;
  2. use 5.040;
  3. use re '/aasx';
  4. use warnings FATAL => 'all';
  5. use Trog::Component ();
  6. =head1 Trog::Component::CategoryBar
  7. The list of series links in the top bar.
  8. =head1 FUNCTIONS
  9. =head2 render(%args) = STRING
  10. Render categories.tx.
  11. Wants C<categories>, the series list the page was built with, and C<user>, which
  12. decides whether the links point at /secure.
  13. =cut
  14. sub render (%args) {
  15. $args{categories} //= [];
  16. $args{user} //= undef;
  17. return Trog::Component::render_template( 'categories.tx', \%args );
  18. }
  19. 1;