"__PACKAGE__"=>__PACKAGE__,
"header_only"=>1,
"args_check"=>{
- "msgscript"=>'.*', # If 'text/javascript' is supported.
- "msghtml"=>'.*', # No 'text/javascript' available.
+ "msgscript"=>'', # If 'text/javascript' is supported.
+ "msghtml"=>'', # No 'text/javascript' available.
},
);
my $msg=$W->{"args"}{"msghtml"} || $W->{"args"}{"msgscript"};
.' style="border-collapse: collapse; border-style: solid; border-width: 2px;">'."\n";
print '<tr>'."\n";
print '<td style="padding: 5px; font-weight: bold;">'."\n";
- print My::Web::a_href('http://www.jankratochvil.net/','Jan Kratochvil');
+ print My::Web::a_href('http://www.jankratochvil.net/','Jan Kratochvil',
+ "attr"=>'style="text-decoration: inherit; /* revoke underline */;"');
print '</td>'."\n";
print '</tr>'."\n";
print '</table>';
My::Web::top_dir()."/project/"=>"Projects",
"http://cvs.jankratochvil.net/"=>"CVS",
# My::Web::top_dir()."/News.html.pl"=>"News",
- My::Web::top_dir()."/resume/"=>"Resume",
+ My::Web::top_dir()."/resume/Resume-JanKratochvil.html.pl/Resume-JanKratochvil.html"=>"Resume",
My::Web::top_dir()."/Contact.html.pl"=>"Contact",
);
while (@sections) {
my $section_name=shift @sections;
print '<td style="padding: 5px;">';
print(($My::Web::W->{"section"} || "") eq $section_name ? "<b>$section_name</b>"
- : My::Web::a_href($section_path,$section_name));
+ : My::Web::a_href($section_path,$section_name,
+ "attr"=>'style="text-decoration: inherit; /* revoke underline */;"'));
print "</td>\n";
}
print '</tr>'."\n";
print '</td>'."\n";
print '</tr>'."\n";
print '</table>'."\n";
- print My::Web::vskip("1ex");
+ print My::Web::vskip("1ex") if !$My::Web::W->{"WebConfig::heading_novskip"};
},
"footing"=>sub () {
# print "<h1>footing</h1>\n";
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';
-Wrequire 'project::Platform';
My::Web->init(
);
My::Web->heading();
-my $CGI=CGI->new();
-
-print <<"HERE";
-<h1>Project List of @{[ a_href 'http://www.jankratochvil.net/','Jan Kratochvil' ]}</h1>
-
-<ul>
- <li>@{[ a_href 'List.html.pl?platform=1','Brief project listing per platform' ]}</li>
- <li>@{[ a_href 'List.html.pl' ,'Unified brief project listing' ]}</li>
-</ul>
-HERE
-
-print '<table border="1" align="center" style="border-collapse: collapse; border-style: solid;">'."\n";
- print '<tr>'."\n";
- my @platforms=@project::Platform::platforms;
- while (@platforms) {
- my $platform_sym =shift @platforms;
- my $platform_name=shift @platforms;
- print '<td style="padding: 5px;">'.a_href('#'.$platform_sym,$platform_name)."</td>\n";
- }
- print '</tr>'."\n";
-print '</table>'."\n";
-print vskip "1ex";
+print My::Project->views("Detailed");
+print My::Project->platforms(undef());
my %item=( My::Project::item_hash_read() );
return "<a href=\"".$_[1]."/\">".$_[0]."</a>";
};
-@platforms=@project::Platform::platforms;
+my @platforms=@My::Project::platforms;
while (@platforms) {
my $platform_sym =shift @platforms;
my $platform_name=shift @platforms;
My::Web->init(
"__PACKAGE__"=>__PACKAGE__,
"title"=>'Project List',
+ "args_check"=>{
+ "platform"=>'^(?:platform)?$',
+ },
);
My::Web->heading();
my $CGI=CGI->new();
-print <<"HERE";
-<h1>@{[ a_href './','Project List' ]} of @{[ a_href 'http://www.jankratochvil.net/','Jan Kratochvil' ]}</h1>
-HERE
+print My::Project->views(($W->{"args"}{"platform"} ? "BriefPlatform" : "BriefUnified"));
+print My::Project->platforms(undef()) if $W->{"args"}{"platform"};
my %item=( My::Project::item_hash_read() );
push @col_order,map({ ($col_order{$_} ? () : $_); } keys(%{{ map(($_=>1),map((keys(%{$item{$_}})),keys(%item)))}}));
}
-print '<table border="1">'."\n";
- print '<tr>';
- for my $col (@col_order) {
- next if defined $col{$col}{"show"} && !$col{$col}{"show"};
- print '<th>'.($col{$col}{""} || "[$col]").'</th>';
- }
- print '</tr>'."\n";
- my @rows_ordered=sort {
- for my $order_by (@row_order,"name") {
- my $order_by=$order_by;
- my $minus=($order_by=~s/^(-)//)[0];
- my $r=($item{$a}{$order_by} cmp $item{$b}{$order_by});
- $r=-$r if $minus;
- return $r if $r;
- }
- return 0;
- } keys(%item);
- for my $row (@rows_ordered) {
+my $print_one_platform=sub ($)
+{
+my($platform)=@_;
+
+ print '<table border="1">'."\n";
print '<tr>';
- for my $col (@col_order) {
- next if defined $col{$col}{"show"} && !$col{$col}{"show"};
- print '<td>';
- if (!$col{$col}{"format"}) {
- print(($item{$row}{$col} || ""));
+ for my $col (@col_order) {
+ next if defined $col{$col}{"show"} && !$col{$col}{"show"};
+ print '<th>'.($col{$col}{""} || "[$col]").'</th>';
}
- else {
- print(&{$col{$col}{"format"}}($item{$row}{$col},$row));
- }
- print '</td>';
- }
print '</tr>'."\n";
- if ($CGI->param("description_opt")) {
- print '<tr><td style="border: none;"></td>';
- print '<td colspan="'.(scalar(@col_order)-1).'"><blockquote>'.$item{$row}{"description"}.'</blockquote></td>';
+ my @rows_ordered=sort {
+ for my $order_by (@row_order,"name") {
+ my $order_by=$order_by;
+ my $minus=($order_by=~s/^(-)//)[0];
+ my $r=($item{$a}{$order_by} cmp $item{$b}{$order_by});
+ $r=-$r if $minus;
+ return $r if $r;
+ }
+ return 0;
+ } map(($platform && $item{$_}{"platform"} ne $platform ? () : ($_)),keys(%item));
+ for my $row (@rows_ordered) {
+ print '<tr>';
+ for my $col (@col_order) {
+ next if defined $col{$col}{"show"} && !$col{$col}{"show"};
+ print '<td>';
+ if (!$col{$col}{"format"}) {
+ print(($item{$row}{$col} || ""));
+ }
+ else {
+ print(&{$col{$col}{"format"}}($item{$row}{$col},$row));
+ }
+ print '</td>';
+ }
print '</tr>'."\n";
- print '<tr><td style="border: none;" colspan="'.scalar(@col_order).'"> </td></tr>'."\n";
+ if ($CGI->param("description_opt")) {
+ print '<tr><td style="border: none;"></td>';
+ print '<td colspan="'.(scalar(@col_order)-1).'"><blockquote>'.$item{$row}{"description"}.'</blockquote></td>';
+ print '</tr>'."\n";
+ print '<tr><td style="border: none;" colspan="'.scalar(@col_order).'"> </td></tr>'."\n";
+ }
}
+ print '</table>'."\n";
+};
+
+
+if (!$W->{"args"}{"platform"}) {
+ &{$print_one_platform}(undef());
+ }
+else {
+ my @platforms=@My::Project::platforms;
+ while (@platforms) {
+ my $platform_sym =shift @platforms;
+ my $platform_name=shift @platforms;
+ print '<a name="'.$platform_sym.'">';
+ print "<h2>$platform_name</h2>";
+ print '</a>'."\n";
+ &{$print_one_platform}($platform_sym);
}
-print '</table>'."\n";
+ }
+
My::Web->footer();
+++ /dev/null
-#! /usr/bin/perl
-#
-# $Id$
-# Definition of 'project::Platform'
-# 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::Platform;
-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;
-
-
-our @platforms=(
- "unixuser"=>"GNU/Linux",
- "unixdevel"=>"GNU/Linux Development",
- "web"=>"Web",
- "amiga"=>"Amiga",
- "w32"=>"MS-Windows",
- "dos"=>"MS-DOS",
- "patch"=>"Patches",
- );
-
-1;
<p class="stuff">
Why did I install Microsoft Windows and wrote such disgusting piece of code?<br />
- Expecting @{[ a_href top_dir()."/CV.html.pl","yet another challenging task" ]}, !
+ Expecting @{[ a_href top_dir().'/resume/Resume-JanKratochvil.html.pl/Resume-JanKratochvil.html',
+ "yet another challenging task" ]}, !
</p>
HERE
"platform"=>"unixuser",
"priority"=>4,
"download"=>"kix.c",
- "summary"=>a_href('http://www.kali.net/','Kali').' server Free equivalent',
+ "summary"=>"Free protocol-compatible ".a_href('http://www.kali.net/','Kali').' server equivalent',
"license"=>"PD",
"maintenance"=>"ready",
"language"=>"C",
"description"=><<"HERE",
<p>@{[ a_href 'http://lynx.isc.org/','Lynx' ]} brings unified colors and fonts of all web pages.
Unfortunately it is not the one of those two browsers respected by broken websites.
-To get back the unified look and feel of all the web pages you can override CSS settings
-of your @{[ a_href 'http://www.mozilla.org/','Mozilla' ]} by placing
+To get back the unified look and feel of all the web pages while retaining the web compatibility
+you can override CSS settings of your @{[ a_href 'http://www.mozilla.org/','Mozilla' ]} by placing
@{[ a_href 'http://cvs.jankratochvil.net/viewcvs/'."*checkout*/nethome/.userContent.css?rev=HEAD",
- 'this file' ]}
-as your: @{[ '$HOME/.mozilla/$USER/*/chrome/userContent.css' ]}</p>
+ 'userContent.css' ]}
+as your local file: @{[ '$HOME/.mozilla/$USER/*/chrome/userContent.css' ]}</p>
HERE
);
form data as @{[ a_href 'http://www.w3.org/TR/html4/interact/forms.html#h-17.13.1','GET' ]} data
(after '<b>?</b>' URL delimiter).</li>
<li>Replace all sensitive passwords by indirect references to your <b>priv</b> directory
- to allow you to make your bookmark file public.</li>
+ to allow you to make your bookmark file itself public.</li>
</ul>
HERE
);