+link rel
authorshort <>
Mon, 13 Oct 2003 12:02:17 +0000 (12:02 +0000)
committershort <>
Mon, 13 Oct 2003 12:02:17 +0000 (12:02 +0000)
20 files changed:
autogen.pl
project/Index.html.pl
project/Makefile.am
project/Rel.pl [new file with mode: 0755]
project/captive/Preview.html.pl
project/captive/Resources.html.pl
project/captive/Thanks.html.pl
project/captive/doc/APITypes.html.pl
project/captive/doc/About.html.pl
project/captive/doc/Architecture.html.pl
project/captive/doc/CacheManager.html.pl
project/captive/doc/CallType.html.pl
project/captive/doc/Components.html.pl
project/captive/doc/Details.html.pl
project/captive/doc/Index.html.pl
project/captive/doc/LinuxNTFS.html.pl
project/captive/doc/Macros.pm
project/captive/doc/Related.html.pl
project/captive/doc/Reverse.html.pl
project/captive/doc/TODO.html.pl

index da0ac40..7e3ab3b 100755 (executable)
@@ -53,5 +53,6 @@ AutoGen->run(
                                ./project/LaserGame/*.gif
                                ./project/Islet/*.gif
                                ./project/surprise/*.gif
+                               ./My/*.gif
                                )],
                );
index b962a06..6c82b46 100755 (executable)
@@ -34,6 +34,8 @@ My::Web->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Project List',
                "section"=>"Projects",
+               "rel_up"=>top_dir(),
+               "rel_start"=>top_dir(),
                );
 My::Web->heading();
 
index ee556d6..9c90d93 100644 (file)
@@ -82,4 +82,5 @@ EXTRA_DIST+= \
                Index.html.pl \
                ChangeLog.txt.pl \
                Pod2Html.html.pl \
-               List.html.pl
+               List.html.pl \
+               Rel.pl
diff --git a/project/Rel.pl b/project/Rel.pl
new file mode 100755 (executable)
index 0000000..b5856a4
--- /dev/null
@@ -0,0 +1,66 @@
+#! /usr/bin/perl
+# 
+# $Id$
+# List of projects Perl template.
+# Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; exactly version 2 of June 1991 is required
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+package project::Index;
+require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
+our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
+our $CVS_ID=q$Id$;
+use strict;
+use warnings;
+
+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;
+use Apache::Constants qw(MOVED);
+Wrequire 'My::Project';
+
+
+my $W=My::Web->init(
+               "__PACKAGE__"=>__PACKAGE__,
+               "header_only"=>1,
+               "args_check"=>{
+                               "rel"=>'^(?:prev|next)$',
+                               "project"=>'^\w+$',
+                               },
+               );
+
+my %item=( My::Project::item_hash_read() );
+my @platforms=@My::Project::platforms;
+my @projects=();
+while (@platforms) {
+       my $platform_sym =shift @platforms;
+       my $platform_name=shift @platforms;
+       push @projects,sort {
+                       ($item{$b}{"priority"} <=> $item{$a}{"priority"})
+                       or
+                       (lc($item{$a}{"name"}) cmp lc($item{$b}{"name"}));
+                       } map({ $item{$_}{"platform"} ne $platform_sym ? () : ($_); } keys(%item));
+       }
+my $target=undef();
+for (0..$#projects) {
+       next if $projects[$_] ne $W->{"args"}{"project"};
+       $target=$projects[$_-1] if $_>0          && $W->{"args"}{"rel"} eq "prev";
+       $target=$projects[$_+1] if $_<$#projects && $W->{"args"}{"rel"} eq "next";
+       last if $target;
+       }
+
+$W->{"r"}->status(MOVED);
+$W->{"r"}->header_out("Location"=>"http://".$W->{"r"}->hostname()
+               .":7680"        # DEBUG
+               ."/project/".(!$target ? "" : "$target/"));
index 4ea9d32..8630c18 100755 (executable)
@@ -27,6 +27,7 @@ use warnings;
 
 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;
+Wrequire 'My::Project';
 
 
 My::Web->init(
@@ -36,8 +37,10 @@ My::Web->init(
 td { padding: 10px; text-align: center; }
 table { border-collapse: collapse; border-style: solid; }
 ",
+               "WebConfig::heading_novskip"=>1,
                );
 My::Web->heading();
+print My::Project->section("captive");
 
 print "<h1>Captive NTFS Technology Preview</h1>\n";
 
index c24ec8b..eb6aacb 100755 (executable)
@@ -27,13 +27,16 @@ use warnings;
 
 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;
+Wrequire 'My::Project';
 
 
 My::Web->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Internet Resources',
+               "WebConfig::heading_novskip"=>1,
                );
 My::Web->heading();
+print My::Project->section("captive");
 
 
 print "<h1>Captive NTFS Internet Resources</h1>\n";
index efd463f..c3a87d5 100755 (executable)
@@ -27,6 +27,7 @@ use warnings;
 
 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;
+Wrequire 'My::Project';
 
 
 My::Web->init(
@@ -35,8 +36,11 @@ My::Web->init(
                "head_css"=>"
 .name { font-style: italic; }
 ",
+               "WebConfig::heading_novskip"=>1,
                );
 My::Web->heading();
+print My::Project->section("captive");
+
 
 print <<'HERE';
 <h1>Captive NTFS Thanks</h1>
@@ -67,9 +71,9 @@ print name "Tomas Bures";
 print name a_href_cz('http://www.vellum.cz/','Lukas "Klokan" Horalek'),undef(),"services hosting";
 print name a_href('http://www-troja.fjfi.cvut.cz/~drab/','Martin Drab'),undef(),
                "betatesting, ".a_href('http://lufs.sourceforge.net/lufs/','LUFS')." patches";
-print name "Jesse Glick",a_href("http://www.sun.com/","Sun Microsystems"),"betatesting";
 print name a_href('http://www.pavouk.org/','Pavel "Pavouk" Ruzicka'),a_href('http://www.gtsgroup.cz/','GTS'),
                "betatesting";
+print name "Jesse Glick",a_href("http://www.sun.com/","Sun Microsystems"),"betatesting";
 print name a_href_cz('http://vellum.cz/~mikc/','Michal "MIKC" Conos'),undef(),
                "betatesting";
 print name a_href("http://sys.xiloo.com/","Matt Wu"),
@@ -78,7 +82,7 @@ print name a_href("http://sys.xiloo.com/","Matt Wu"),
 print name "Steven Edwards"  ,a_href("http://www.reactos.com/","ReactOS")." developer","W32 tips";
 print name "Casper Hornstrup",a_href("http://www.reactos.com/","ReactOS")." developer","W32 tips";
 print <<'HERE';
-<li>Last but not least - greetings to Danese Cooper, Open Source Diva!</li>
+<li>Last but not least - Kind greetings to Danese Cooper, Open Source Diva!</li>
 </ul>
 
 HERE
index 0f0957a..9d62faf 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: API Functions',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'Details.html.pl',
+               "rel_next"=>'CallType.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -477,4 +477,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index 757f6ad..444d98d 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: About',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'Index.html.pl',
+               "rel_next"=>'Architecture.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -137,4 +137,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index 48a4058..0f982ca 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: Architecture',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'About.html.pl',
+               "rel_next"=>'Components.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -211,4 +211,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index 778e412..fcd893e 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: NT Cache Manager',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'Reverse.html.pl',
+               "rel_next"=>'Details.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -316,4 +316,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index 4346c95..d1e3049 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: API Calling Conventions',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'APITypes.html.pl',
+               "rel_next"=>'TODO.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -160,4 +160,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index 9335919..c182074 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: Components',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'Architecture.html.pl',
+               "rel_next"=>'Reverse.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -276,4 +276,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index d31b085..be27aab 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: Implementation Details',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'CacheManager.html.pl',
+               "rel_next"=>'APITypes.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -501,4 +501,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index 1f4852c..3e7262f 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_next"=>'About.html.pl',
+               "rel_up"=>top_dir("/project/captive/"),
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -44,7 +44,6 @@ print <<"HERE";
 
 <h1>Captive NTFS Developer Documentation</h1>
 
-
 <ul>
 
 <li><a href="About.html.pl">About</a>
@@ -161,4 +160,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index fc5ffae..7d2393d 100755 (executable)
@@ -31,12 +31,11 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: Captive vs. Linux-NTFS',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'Related.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -88,4 +87,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index c2c3e09..4197b60 100755 (executable)
@@ -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/,<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; }
@@ -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 '<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 ($$)
 {
index 5ba1abe..98de84d 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: Related Projects',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'TODO.html.pl',
+               "rel_next"=>'LinuxNTFS.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -119,4 +119,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index ac89f79..d444c87 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: Reverse Engineering',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'Components.html.pl',
+               "rel_next"=>'CacheManager.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -185,4 +185,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();
index 30e052b..8085863 100755 (executable)
@@ -31,12 +31,12 @@ require CGI;
 BEGIN { Wuse 'project::captive::doc::Macros'; }
 
 
-My::Web->init(
+project::captive::doc::Macros->init(
                "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Developer Documentation: TODO',
-               "head_css"=>$doc_Macros_head_css,
+               "rel_prev"=>'CallType.html.pl',
+               "rel_next"=>'Related.html.pl',
                );
-My::Web->heading();
 
 
 print <<"HERE";
@@ -85,4 +85,4 @@ print <<"HERE";
 HERE
 
 
-My::Web->footer();
+project::captive::doc::Macros->footer();