use Exporter;
our @EXPORT=qw(
&doc_img &productname &captive_srcfile
- $doc_Macros_head_css $freespeech $freebeer $Wine $ReactOS $LinuxNTFS $GnomeVFS $GnomeVFSmodule $gnulinux
+ $freespeech $freebeer $Wine $ReactOS $LinuxNTFS $GnomeVFS $GnomeVFSmodule $gnulinux
);
our @ISA=qw(Exporter);
BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,<F>)[0]]}; eval "use lib '$top_dir'"; close F; }
use My::Web;
require CGI;
+Wrequire 'My::Project';
-our $doc_Macros_head_css="
+sub init ($%)
+{
+my($class,%args)=@_;
+
+ %args=(
+ "rel_start"=>top_dir("/project/captive/"),
+ "rel_up"=>top_dir("/project/captive/doc/"),
+ %args);
+ My::Web->init(
+ "head_css"=>"
.productname { font-family: cursive; }
.fname { font-family: monospace; }
.constant { font-family: monospace; }
.type { font-family: monospace; }
.command { font-family: monospace; }
.instruction { font-style: italic; }
-";
+",
+ "WebConfig::heading_novskip"=>1,
+ %args,
+ );
+ My::Web->heading();
+ print My::Project->section("captive");
+ $class->navigate();
+}
+
+sub footer ($)
+{
+my($class)=@_;
+ print vskip "2ex";
+ project::captive::doc::Macros->navigate("footer");
+ My::Web->footer();
+}
+
+sub navigate ($;$)
+{
+my($class,$where)=@_;
+
+ print '<table border="0" width="100%"><tr>'."\n";
+ print '<col width="'.$_.'%" />'."\n" for (qw(10 20 40 20 10));
+ print '<td></td>'."\n";
+ print '<td align="left">';
+ print a_href $My::Web::W->{"rel_prev"},img("/My/arrow-left" ,"Previous document")
+ if $My::Web::W->{"rel_prev"};
+ print '</td>'."\n";
+ print '<td align="center">';
+ print a_href $My::Web::W->{"rel_up"} ,img("/My/arrow-up" ,"Parent")
+ if $My::Web::W->{"rel_up"} && !($where && $where eq "footer");
+ print '</td>'."\n";
+ print '<td align="right">';
+ print a_href $My::Web::W->{"rel_next"},img("/My/arrow-right","Next document")
+ if $My::Web::W->{"rel_next"};
+ print '</td>'."\n";
+ print '<td></td>'."\n";
+ print '</tr></table>'."\n";
+}
sub doc_img ($$)
{