Finally merged the branch 'apache20'(+'apache2') back to the main trunk.
[www.jankratochvil.net.git] / project / captive / Preview.pm
similarity index 72%
rename from project/captive/Preview.html.pl
rename to project/captive/Preview.pm
index ca49f1d..b516250 100755 (executable)
@@ -1,8 +1,6 @@
-#! /usr/bin/perl
-# 
 # $Id$
 # Captive project Preview page Perl template.
-# Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
+# Copyright (C) 2003-2005 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
@@ -25,22 +23,20 @@ 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;
-Wrequire 'My::Project';
+Wrequire 'project::Lib';
 
 
+sub handler
+{
 My::Web->init(
-               "__PACKAGE__"=>__PACKAGE__,
                "title"=>'Captive NTFS Technology Preview',
-               "head_css"=>"
-td { padding: 10px; text-align: center; }
-table { border-collapse: collapse; border-style: solid; }
-",
-               "WebConfig::heading_novskip"=>1,
+               "css_push"=>"./Preview.css",
+               "heading_novskip"=>1,
                );
 My::Web->heading();
-print My::Project->section("captive");
+print(project::Lib->section("captive"));
+
 
 print "<h1>Captive NTFS Technology Preview</h1>\n";
 
@@ -49,9 +45,9 @@ sub preview_img ($$;$)
 my($file_base,$text,$comment)=@_;
 
        return <<"HERE";
-<table border="1" align="center">
-<tr><td>@{[ img $file_base,$text ]}</td></tr>
-<tr><td><b>$text</b>@{[ map((!$_ ? "" : "<br />$_"),$comment) ]}</td></tr>
+<table border="1" class="margin-center">
+       <tr><td>@{[ img $file_base,$text ]}</td></tr>
+       <tr><td><b>$text</b>@{[ map((!$_ ? "" : "<br />$_"),$comment) ]}</td></tr>
 </table>
 @{[ vskip "3ex" ]}
 HERE
@@ -59,8 +55,8 @@ HERE
 
 print preview_img 'doc/ntdebug-ntfs','WinDbg Remote NT Kernel NTFS Debugging';
 print preview_img 'doc/dia/arch-all','Captive Components Architecture',''
-               .'<font color="red">Red color</font> indicates Captive components for the most common LUFS use case.<br />'
-               .'<font color="violet">Violet color</font> indicates system components for the most common LUFS use case.';
+               .'<span style="color: red;">Red color</span> indicates Captive components for the most common LUFS use case.<br />'
+               .'<span style="color: violet;">Violet color</span> indicates system components for the most common LUFS use case.';
 print preview_img 'doc/arch-captive','Captive Subsystems Architecture';
 print preview_img 'doc/arch-W32','Original Microsoft Windows Subsystems Architecture';
 print preview_img 'doc/ratio','Functions Reusal Ratio';
@@ -73,4 +69,6 @@ print preview_img 'doc/dia/TraceFS','TraceFS Debugging Hook for NT Cache Manager
 print preview_img 'captive-install-acquire','Captive Microsoft Windows Drivers Acquire Utility';
 
 
-My::Web->footer();
+exit;
+}
+1;