my $self = shift;
my $fullpath = $self->{-fullpath};
my $title;
+ my $titleimage;
my $T;
+ my $TI;
if (open($T,'<'.$fullpath.'/.title')) {
binmode($T, ":utf8");
$title = <$T>;
$title=$self->{-relpath};
}
$self->{-title}=$title;
+ if (open($TI,'<'.$fullpath.'/.titleimage')) {
+ binmode($TI, ":utf8");
+ $titleimage = <$TI>;
+ $titleimage =~ s/[\r\n]*$//;
+ close($TI);
+ #print STDERR "found title image \"",$titleimage,"\"\n";
+ $self->{-titleimage}=$titleimage;
+ }
print "title in $fullpath is $title\n" if ($debug);
}
my $inc = $self->{-inc}.$incdir.'/';
my $title = $self->{-title};
+ my $titleimage = $self->{-titleimage};
print $IND start_html(-title => $title,
-encoding=>"utf-8",
-style=>[
-version => $version,
-depth => $self->{-depth},
-title => $title,
+ -titleimage => $titleimage,
-path => $self->{-fullpath},
-breadcrumbs => "breadcrumbs unimplemented",
);
print STDERR "could not open ",
$self->{-toppath}.'/'.$incdir.'/header.pl',
" ($!), reverting to default header";
- print $IND a({-href=>"../index.html"},"UP"),"\n",
- h1({-class=>'title'},$title),"\n",
+ print $IND a({-href=>"../index.html"},"UP"),"\n";
+ if ($titleimage) {
+ print $IND img({-src=>$titleimage,
+ -class=>'titleimage',
+ -alt=>'Title Image'}),"\n";
+ }
+ print $IND h1({-class=>'title'},$title),
+ br({-clear=>'all'}),"\n";
}
}
-version => $version,
-depth => $self->{-depth},
-title => $self->{-title},
+ -titleimage => $self->{-titleimage},
-breadcrumbs => "breadcrumbs unimplemented",
);
print $IND eval $prm,"\n";