From: short <> Date: Sat, 11 Oct 2003 09:17:51 +0000 (+0000) Subject: menu X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=commitdiff_plain;h=9c880923e6eeb52d36ba4a3e13eb89178e71be8d menu --- diff --git a/SendMsg.pl b/SendMsg.pl index 4a8528a..1f7b4fb 100755 --- a/SendMsg.pl +++ b/SendMsg.pl @@ -35,8 +35,8 @@ my $W=My::Web->init( "__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"}; diff --git a/WebConfig.pm b/WebConfig.pm index fe5cd04..001edc2 100644 --- a/WebConfig.pm +++ b/WebConfig.pm @@ -61,7 +61,8 @@ our %WebConfig=( .' style="border-collapse: collapse; border-style: solid; border-width: 2px;">'."\n"; print ''."\n"; print ''."\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 ''."\n"; print ''."\n"; print ''; @@ -74,7 +75,7 @@ our %WebConfig=( 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) { @@ -82,7 +83,8 @@ our %WebConfig=( my $section_name=shift @sections; print ''; print(($My::Web::W->{"section"} || "") eq $section_name ? "$section_name" - : My::Web::a_href($section_path,$section_name)); + : My::Web::a_href($section_path,$section_name, + "attr"=>'style="text-decoration: inherit; /* revoke underline */;"')); print "\n"; } print ''."\n"; @@ -90,7 +92,7 @@ our %WebConfig=( print ''."\n"; print ''."\n"; print ''."\n"; - print My::Web::vskip("1ex"); + print My::Web::vskip("1ex") if !$My::Web::W->{"WebConfig::heading_novskip"}; }, "footing"=>sub () { # print "

footing

\n"; diff --git a/project/Index.html.pl b/project/Index.html.pl index 33bc3a2..b48fd54 100755 --- a/project/Index.html.pl +++ b/project/Index.html.pl @@ -27,9 +27,7 @@ use warnings; 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'; -Wrequire 'project::Platform'; My::Web->init( @@ -39,28 +37,8 @@ My::Web->init( ); My::Web->heading(); -my $CGI=CGI->new(); - -print <<"HERE"; -

Project List of @{[ a_href 'http://www.jankratochvil.net/','Jan Kratochvil' ]}

- - -HERE - -print ''."\n"; - print ''."\n"; - my @platforms=@project::Platform::platforms; - while (@platforms) { - my $platform_sym =shift @platforms; - my $platform_name=shift @platforms; - print '\n"; - } - print ''."\n"; -print '
'.a_href('#'.$platform_sym,$platform_name)."
'."\n"; -print vskip "1ex"; +print My::Project->views("Detailed"); +print My::Project->platforms(undef()); my %item=( My::Project::item_hash_read() ); @@ -80,7 +58,7 @@ $col{"name"}{"format"}=sub { return "".$_[0].""; }; -@platforms=@project::Platform::platforms; +my @platforms=@My::Project::platforms; while (@platforms) { my $platform_sym =shift @platforms; my $platform_name=shift @platforms; diff --git a/project/List.html.pl b/project/List.html.pl index 06dd078..598c73c 100755 --- a/project/List.html.pl +++ b/project/List.html.pl @@ -34,14 +34,16 @@ Wrequire 'My::Project'; My::Web->init( "__PACKAGE__"=>__PACKAGE__, "title"=>'Project List', + "args_check"=>{ + "platform"=>'^(?:platform)?$', + }, ); My::Web->heading(); my $CGI=CGI->new(); -print <<"HERE"; -

@{[ a_href './','Project List' ]} of @{[ a_href 'http://www.jankratochvil.net/','Jan Kratochvil' ]}

-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() ); @@ -89,44 +91,66 @@ if (0) { push @col_order,map({ ($col_order{$_} ? () : $_); } keys(%{{ map(($_=>1),map((keys(%{$item{$_}})),keys(%item)))}})); } -print ''."\n"; - print ''; - for my $col (@col_order) { - next if defined $col{$col}{"show"} && !$col{$col}{"show"}; - print ''; - } - print ''."\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 '
'.($col{$col}{""} || "[$col]").'
'."\n"; print ''; - for my $col (@col_order) { - next if defined $col{$col}{"show"} && !$col{$col}{"show"}; - print ''; } - else { - print(&{$col{$col}{"format"}}($item{$row}{$col},$row)); - } - print ''; - } print ''."\n"; - if ($CGI->param("description_opt")) { - print ''; - print ''; + 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 ''; + for my $col (@col_order) { + next if defined $col{$col}{"show"} && !$col{$col}{"show"}; + print ''; + } print ''."\n"; - print ''."\n"; + if ($CGI->param("description_opt")) { + print ''; + print ''; + print ''."\n"; + print ''."\n"; + } } + print '
'; - if (!$col{$col}{"format"}) { - print(($item{$row}{$col} || "")); + for my $col (@col_order) { + next if defined $col{$col}{"show"} && !$col{$col}{"show"}; + print ''.($col{$col}{""} || "[$col]").'
'.$item{$row}{"description"}.'
'; + if (!$col{$col}{"format"}) { + print(($item{$row}{$col} || "")); + } + else { + print(&{$col{$col}{"format"}}($item{$row}{$col},$row)); + } + print '
 
'.$item{$row}{"description"}.'
 
'."\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 ''; + print "

$platform_name

"; + print '
'."\n"; + &{$print_one_platform}($platform_sym); } -print ''."\n"; + } + My::Web->footer(); diff --git a/project/Platform.pm b/project/Platform.pm deleted file mode 100755 index 4606f74..0000000 --- a/project/Platform.pm +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/perl -# -# $Id$ -# Definition of 'project::Platform' -# Copyright (C) 2003 Jan Kratochvil -# -# 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; diff --git a/project/captive/Index.html.pl b/project/captive/Index.html.pl index 8ded6ed..f035ebc 100755 --- a/project/captive/Index.html.pl +++ b/project/captive/Index.html.pl @@ -355,7 +355,8 @@ class="quote">/usr/share/lufs/prepmod.

Why did I install Microsoft Windows and wrote such disgusting piece of code?
- 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" ]}, !

HERE diff --git a/project/kix/ListItem.pm b/project/kix/ListItem.pm index 70eb687..02b9f49 100755 --- a/project/kix/ListItem.pm +++ b/project/kix/ListItem.pm @@ -33,7 +33,7 @@ our @ListItem=( "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", diff --git a/project/lynxilla/ListItem.pm b/project/lynxilla/ListItem.pm index 5c7bfb7..f3196b1 100755 --- a/project/lynxilla/ListItem.pm +++ b/project/lynxilla/ListItem.pm @@ -43,11 +43,11 @@ our @ListItem=( "description"=><<"HERE",

@{[ 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' ]}

+ 'userContent.css' ]} +as your local file: @{[ '$HOME/.mozilla/$USER/*/chrome/userContent.css' ]}

HERE ); diff --git a/project/postget/ListItem.pm b/project/postget/ListItem.pm index 968c20f..deae964 100755 --- a/project/postget/ListItem.pm +++ b/project/postget/ListItem.pm @@ -49,7 +49,7 @@ click its submit button. This script will allow you to:

form data as @{[ a_href 'http://www.w3.org/TR/html4/interact/forms.html#h-17.13.1','GET' ]} data (after '?' URL delimiter).
  • Replace all sensitive passwords by indirect references to your priv directory - to allow you to make your bookmark file public.
  • + to allow you to make your bookmark file itself public. HERE );