Generate series pages

This commit is contained in:
Nathan McCarty 2025-02-09 05:28:59 -05:00
parent 7cf4827d0c
commit baf8d6556b
8 changed files with 168 additions and 41 deletions

View file

@ -5,6 +5,15 @@ use DB::Post;
use HTML::Functional;
sub show-html($html) is export {
my $out = "<!doctype html>$html";
# Work around HTML::Functional automatically putting newlines between tags
$out ~~ s:g/'</i>' \v+ '<span>'/<\/i><span>/;
$out ~~ s:g/\v+ '</a>'/<\/a>/;
$out ~~ s:g/',' \v+ '<span'/,<span/;
$out
}
sub opt($test, $item) is export {
if $test {
$item