+Duat link
[www.jankratochvil.net.git] / WebConfig.pm
index 1b3ea33..d4ef2b0 100644 (file)
@@ -36,6 +36,8 @@ use My::Web;
 
 my $resume_url="/resume/ResumeJanKratochvil.pm/ResumeJanKratochvil.html";
 
+sub vskip_hr($) { return "<hr />\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=(
                                                        .'<tr>'."\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.='<td style="padding: 5px;">';
                                                                $r.=(($My::Web::W->{"section"} || "") eq $section_name ? "<b>$section_name</b>"
                                                                                : 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.="</td>\n";
                                                        }
                                        $r.='</tr></table>'."\n";
                                $r.='</td>'."\n";
                        $r.='</tr></table>'."\n";
                        if (!$My::Web::W->{"heading_novskip"}) {
-                               $r.="<hr />\n";
-                               $r.=My::Web::vskip("6ex");
+                               $r.=WebConfig->vskip_hr();
                                }
                        return $r;
                        },
@@ -102,15 +113,11 @@ our %WebConfig=(
                "footing_delimit_sub_push"=>sub () {
                        return if $My::Web::W->{"no_job"};
                        print <<"HERE";
-<table border="0" style="margin: 4ex; padding: 2ex; background: #552222;">
+<table border="0" style="padding: 2ex; background: #552222; color: white;" class="margin-center">
        <tr><td>
-               <b>A programmer for hire:</b>
-               <span style="color: #ffaaaa;">
-                       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.
-               </span>
+               <b>Contractor - Software Engineer:</b>
+               Please check if your planned project
+               @{[ My::Web::a_href($My::Web::W->{"resume_url"},'matches my experience',"attr"=>'style="color: inherit;"') ]},
        </td></tr>
 </table>
 HERE