X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=blobdiff_plain;f=WebConfig.pm;h=75def43a3a6d5cf2373b6969a54a4162fe615390;hp=76a2970de7daa134d157311184cb58e4adaa1384;hb=7a5684f4753deaac0f92223f89ad7d3e9ac2db9c;hpb=e4cd1f53fdcdfb94253f281fa8d4642ff316d0a1 diff --git a/WebConfig.pm b/WebConfig.pm index 76a2970..75def43 100644 --- a/WebConfig.pm +++ b/WebConfig.pm @@ -32,99 +32,98 @@ use vars qw(@ISA @EXPORT); @EXPORT=qw(%WebConfig); use My::Web; -require CGI; -my $resume_url="/resume/Resume-JanKratochvil.html.pl/Resume-JanKratochvil.html"; +my $resume_url="/resume/ResumeJanKratochvil.pm/ResumeJanKratochvil.html"; +sub vskip_hr($) { return "
\n".My::Web::vskip("1ex"); } + +# Only to be used privately by My::Web ! our %WebConfig=( "admin_mail"=>'web-www.jankratochvil.net@jankratochvil.net', - "SendMsg_to"=>'web-www.jankratochvil.net@jankratochvil.net', - "cvs_id_author"=>sub { + "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 CGI::escapeHTML($name); + 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", - "footer_mailme"=>0, "project_viewcvs"=>"http://cvs.jankratochvil.net/viewcvs/", "pserver"=>':pserver:pserver:@cvs.jankratochvil.net', "pserver_path"=>"/cvs", "resume_url"=>$resume_url, - "web_hostname_sub"=>sub () { return "www.jankratochvil.net"; }, # $My::Web::W->{"r"}->hostname() - "mailman_url_sub" =>sub () { return "http://".&{$My::Web::W->{"web_hostname_sub"}}."/mailman/"; }, - "pipermail_url_sub"=>sub () { return "http://".&{$My::Web::W->{"web_hostname_sub"}}."/pipermail/"; }, + "mailman_url" =>sub { return "http://".$My::Web::W->{"web_hostname"}."/mailman/"; }, + "pipermail_url"=>sub { return "http://".$My::Web::W->{"web_hostname"}."/pipermail/"; }, "heading"=>sub () { - print ''."\n"; -# print ''."\n"; -# print ''."\n"; -# print ''."\n"; - print ''."\n"; - print ''."\n"; + $r.=''."\n"; + $r.='
'."\n"; - print ''."\n"; - print ''."\n"; - print '
'."\n"; - print 'Jan Kratochvil'; -# print My::Web::a_href('http://www.jankratochvil.net/','Jan Kratochvil', + my $r=""; + $r.=''."\n"; + # Do not: + # as the constant are always bad. + $r.=''."\n"; - print ''."\n"; - print ''."\n"; - print '
'."\n"; + $r.='' + .''."\n"; - print ''."\n"; - print '
'."\n"; + $r.='Jan Kratochvil'; +# $r.=My::Web::a_href('http://www.jankratochvil.net/','Jan Kratochvil', # "attr"=>'style="text-decoration: inherit; /* revoke underline */;"'); - print '
'; - print '
'."\n"; - print ''."\n"; - print ''."\n"; - my @sections=( - "/project/"=>"Projects", - "http://cvs.jankratochvil.net/"=>"CVS", -# "/News.html.pl"=>"News", - $resume_url=>"Resume", - "/Contact.html.pl"=>"Contact", - ); - while (@sections) { - my $section_path=shift @sections; - my $section_name=shift @sections; - print '\n"; - } - print ''."\n"; - print '
'; - print(($My::Web::W->{"section"} || "") eq $section_name ? "$section_name" - : My::Web::a_href($section_path,$section_name, - "attr"=>'style="text-decoration: inherit; /* revoke underline */;"')); - print "
'."\n"; - print '
'."\n"; - if (!$My::Web::W->{"WebConfig::heading_novskip"}) { - print "
\n"; - print My::Web::vskip("6ex"); + $r.='
'; + $r.='
'."\n"; + $r.='' + .''."\n"; + my @sections=( + "/project/"=>"Projects", + "/product/"=>"Products", + "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; + my $class=""; + if ($section_path=~m{^/(.*)$}) { + $class=$1; + $class=~s{/}{::}g; + $class=~s{[.]pm$}{}; + } + my $chosen=($class && $My::Web::W->{"__PACKAGE__"}=~/^\Q$class\E/); + $r.='\n"; + } + $r.='
'; + $r.=(($My::Web::W->{"section"} || "") eq $section_name ? "$section_name" + : My::Web::a_href($section_path,$section_name, + "attr"=>($chosen + ? 'style="text-decoration: underline; font-weight: bold;"' + : 'style="text-decoration: inherit; /* revoke underline */"'))); + $r.="
'."\n"; + $r.='
'."\n"; + if (!$My::Web::W->{"heading_novskip"}) { + $r.=WebConfig->vskip_hr(); } + return $r; }, - "footing"=>sub () { -# print "

footing

\n"; - }, - "footing_delimit"=>sub () { + ###"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. - + Contractor - Software Engineer: + Please check if your planned project + @{[ My::Web::a_href($My::Web::W->{"resume_url"},'matches my experience',"attr"=>'style="color: inherit;"') ]},
HERE }, - "no_job"=>1, + "no_job"=>0, + "css_inherit"=>1, ); 1;