X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=WebConfig.pm;h=5160bd268936e767ad6926552cf94eee352f42a2;hb=85a27b1b6b908cf6a7728b645a651d545cd2949a;hp=1e5db1777b38032e448853128ccb1611dc25cedb;hpb=023bd9615484000eec756de502600995e7b75fe8;p=www.jankratochvil.net.git diff --git a/WebConfig.pm b/WebConfig.pm index 1e5db17..5160bd2 100644 --- a/WebConfig.pm +++ b/WebConfig.pm @@ -20,8 +20,9 @@ package WebConfig; require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway -use vars qw($VERSION); +use vars qw($VERSION $CVS_ID); $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$CVS_ID=q$Id$; use strict; use warnings; @@ -30,10 +31,97 @@ use vars qw(@ISA @EXPORT); @ISA=qw(Exporter); @EXPORT=qw(%WebConfig); +use My::Web; + + +my $resume_url="/resume/ResumeJanKratochvil.pm/ResumeJanKratochvil.html"; + +# Only to be used privately by My::Web ! our %WebConfig=( "admin_mail"=>'web-www.jankratochvil.net@jankratochvil.net', - "viewcvs"=>map({ (!$_ ? $_ : s#^/#http://cvs.jankratochvil.net/viewcvs/energie/#); } $ENV{"SCRIPT_NAME"}), + "cvs_id_author_sub"=>sub { + my($name)=@_; + return My::Web::a_href("http://www.jankratochvil.net/","Jan Kratochvil") if 0 + || $name eq "short" + || $name eq "lace"; + return escapeHTML($name); + }, + "viewcvs_My"=>"http://cvs.jankratochvil.net/viewcvs/MyWeb/", + "viewcvs"=>"http://cvs.jankratochvil.net/viewcvs/www/www.jankratochvil.net/", "title_prefix"=>"Jan Kratochvil", + "project_viewcvs"=>"http://cvs.jankratochvil.net/viewcvs/", + "pserver"=>':pserver:pserver:@cvs.jankratochvil.net', + "pserver_path"=>"/cvs", + "resume_url"=>$resume_url, + "mailman_url" =>sub { return "http://".$My::Web::W->{"web_hostname"}."/mailman/"; }, + "pipermail_url"=>sub { return "http://".$My::Web::W->{"web_hostname"}."/pipermail/"; }, + "heading"=>sub () { + my $r=""; + $r.=''."\n"; + # Do not: + # as the constant are always bad. + $r.=''."\n"; + $r.=''."\n"; + $r.='
'."\n"; + $r.='' + .'
'."\n"; + $r.='Jan Kratochvil'; +# $r.=My::Web::a_href('http://www.jankratochvil.net/','Jan Kratochvil', +# "attr"=>'style="text-decoration: inherit; /* revoke underline */;"'); + $r.='
'; + $r.='
'."\n"; + $r.='' + .''."\n"; + my @sections=( + "/project/"=>"Projects", + "http://cvs.jankratochvil.net/"=>"CVS", +# "/News.pm"=>"News", + $resume_url=>"Resume", + "/Contact.pm"=>"Contact", + ); + while (@sections) { + my $section_path=shift @sections; + my $section_name=shift @sections; + $r.='\n"; + } +# FIXME: Catch the bug. +if ($r=~/resumejankratochvil.pm/) { + use Carp qw(confess cluck); + cluck "LOWERCASED; resume_url=$resume_url"; + } + $r.='
'; + $r.=(($My::Web::W->{"section"} || "") eq $section_name ? "$section_name" + : My::Web::a_href($section_path,$section_name, + "attr"=>'style="text-decoration: inherit; /* revoke underline */;"')); + $r.="
'."\n"; + $r.='
'."\n"; + if (!$My::Web::W->{"heading_novskip"}) { + $r.="
\n"; + $r.=My::Web::vskip("6ex"); + } + return $r; + }, + ###"footing"=>"

footing

\n", + "footing_delimit_sub_push"=>sub () { + return if $My::Web::W->{"no_job"}; + print <<"HERE"; + + +
+ A programmer for hire: + + I am looking for new challenges. + If you find the software here useful, please + @{[ My::Web::a_href($My::Web::W->{"resume_url"},'consider me') ]} + for your next software project. + +
+HERE + }, + "no_job"=>1, + "css_inherit"=>1, ); 1;