X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=blobdiff_plain;f=project%2Fcaptive%2Fdoc%2FMacros.pm;h=4197b60fc4e276cb8335b3cea3879e1115f4ed62;hp=c2c3e091fe4a462e853ec6a8b7549c8f6b0160be;hb=7727ab02734783b8fd3082b55976f6b818f7529f;hpb=b75b1904ad5c2e30d63e1a2a09e723cf585dd5c5 diff --git a/project/captive/doc/Macros.pm b/project/captive/doc/Macros.pm index c2c3e09..4197b60 100755 --- a/project/captive/doc/Macros.pm +++ b/project/captive/doc/Macros.pm @@ -28,16 +28,26 @@ use warnings; 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/,)[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; } @@ -47,8 +57,46 @@ our $doc_Macros_head_css=" .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 ''."\n"; + print ''."\n" for (qw(10 20 40 20 10)); + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print '
'; + print a_href $My::Web::W->{"rel_prev"},img("/My/arrow-left" ,"Previous document") + if $My::Web::W->{"rel_prev"}; + print ''; + print a_href $My::Web::W->{"rel_up"} ,img("/My/arrow-up" ,"Parent") + if $My::Web::W->{"rel_up"} && !($where && $where eq "footer"); + print ''; + print a_href $My::Web::W->{"rel_next"},img("/My/arrow-right","Next document") + if $My::Web::W->{"rel_next"}; + print '
'."\n"; +} sub doc_img ($$) {