189 |
$/ = undef; |
$/ = undef; |
190 |
open(ALL, $all) || die "Error: Cannot open file: $all"; |
open(ALL, $all) || die "Error: Cannot open file: $all"; |
191 |
my $buf = <ALL>; |
my $buf = <ALL>; |
192 |
|
$buf =~ s/\r//g; # remove WINDOWS \r |
193 |
close(ALL); |
close(ALL); |
194 |
$/ = $sep; |
$/ = $sep; |
195 |
|
|
233 |
Text::FastTemplate->preload( [ |
Text::FastTemplate->preload( [ |
234 |
{ file => 'slide.html', key => 'slide' }, |
{ file => 'slide.html', key => 'slide' }, |
235 |
{ file => 'overview.html', key => 'overview' }, |
{ file => 'overview.html', key => 'overview' }, |
236 |
|
{ file => 'title.html', key => 'title' }, |
237 |
]); |
]); |
238 |
|
|
239 |
## unroll relative anchors (#something) into links with slides |
## unroll relative anchors (#something) into links with slides |
533 |
|
|
534 |
my $slide_html=make_progress_bar($nr,$total); |
my $slide_html=make_progress_bar($nr,$total); |
535 |
|
|
536 |
|
# undefine body if no content is found (so that template can show |
537 |
|
# only title and sub-title |
538 |
|
if ($content !~ m/\S/g) { |
539 |
|
undef $content; |
540 |
|
} |
541 |
|
|
542 |
%page_data = ( |
%page_data = ( |
543 |
doctype => $doctype, |
doctype => $doctype, |
544 |
talkTitle => $talkTitle, |
talkTitle => $talkTitle, |
576 |
|
|
577 |
); |
); |
578 |
|
|
579 |
my $page= new Text::FastTemplate key => 'slide'; |
my $page; |
580 |
|
if ($content) { |
581 |
|
$page= new Text::FastTemplate key => 'slide'; |
582 |
|
} else { |
583 |
|
$page= new Text::FastTemplate key => 'title'; |
584 |
|
} |
585 |
print SLIDE $page->output( \%page_data ); |
print SLIDE $page->output( \%page_data ); |
586 |
|
|
587 |
close(SLIDE); |
close(SLIDE); |