--- burst.pl 2001/05/08 07:51:54 1.11 +++ burst.pl 2001/05/08 12:14:35 1.12 @@ -189,6 +189,7 @@ $/ = undef; open(ALL, $all) || die "Error: Cannot open file: $all"; my $buf = ; +$buf =~ s/\r//g; # remove WINDOWS \r close(ALL); $/ = $sep; @@ -232,6 +233,7 @@ Text::FastTemplate->preload( [ { file => 'slide.html', key => 'slide' }, { file => 'overview.html', key => 'overview' }, + { file => 'title.html', key => 'title' }, ]); ## unroll relative anchors (#something) into links with slides @@ -531,6 +533,12 @@ my $slide_html=make_progress_bar($nr,$total); + # undefine body if no content is found (so that template can show + # only title and sub-title + if ($content !~ m/\S/g) { + undef $content; + } + %page_data = ( doctype => $doctype, talkTitle => $talkTitle, @@ -568,7 +576,12 @@ ); - my $page= new Text::FastTemplate key => 'slide'; + my $page; + if ($content) { + $page= new Text::FastTemplate key => 'slide'; + } else { + $page= new Text::FastTemplate key => 'title'; + } print SLIDE $page->output( \%page_data ); close(SLIDE);