CategoryBar.pm 533 B

1234567891011121314151617181920212223242526272829
  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. return Trog::Component::render_template( 'categories.tx', \%args );
  17. }
  18. 1;