From 117ef7704903cb15496dc4dad9bdef4b03828ed7 Mon Sep 17 00:00:00 2001 From: short <> Date: Mon, 12 Dec 2005 17:43:01 +0000 Subject: [PATCH] +"product" category in general. Support also active-section besides inactive and active-target. --- WebConfig.pm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/WebConfig.pm b/WebConfig.pm index c95e8ca..75def43 100644 --- a/WebConfig.pm +++ b/WebConfig.pm @@ -36,6 +36,8 @@ use My::Web; 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', @@ -75,6 +77,7 @@ our %WebConfig=( .''."\n"; my @sections=( "/project/"=>"Projects", + "/product/"=>"Products", "http://cvs.jankratochvil.net/"=>"CVS", # "/News.pm"=>"News", $resume_url=>"Resume", @@ -83,18 +86,26 @@ our %WebConfig=( 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.=''; $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 */;"')); + "attr"=>($chosen + ? 'style="text-decoration: underline; font-weight: bold;"' + : 'style="text-decoration: inherit; /* revoke underline */"'))); $r.="\n"; } $r.=''."\n"; $r.=''."\n"; $r.=''."\n"; if (!$My::Web::W->{"heading_novskip"}) { - $r.="
\n"; - $r.=My::Web::vskip("6ex"); + $r.=WebConfig->vskip_hr(); } return $r; }, -- 1.8.3.1