$WebConfig{"web_hostname"} is now optional.
+&a_href_inhibit for using &a_href before $W initialization (without URIs).
my $W=My::Web->init(
"title"=>"Contact",
"section"=>"Contact",
- "head"=><<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "/Contact.css") ]}" />
-HERE
+ "css_push"=>"./Contact.css",
);
My::Web->heading();
$W->{"r"}->status(HTTP_MOVED_TEMPORARILY);
-$W->{"r"}->headers_out()->{"Location"}="http://".$W->{"web_hostname"}."/project/";
+$W->{"r"}->headers_out()->{"Location"}=path_web "./project/","abs"=>1;
exit 0;
"pserver"=>':pserver:pserver:@cvs.jankratochvil.net',
"pserver_path"=>"/cvs",
"resume_url"=>$resume_url,
- "web_hostname"=>sub { return "www.jankratochvil.net"; }, # $My::Web::W->{"r"}->hostname()
"mailman_url" =>sub { return "http://".$My::Web::W->{"web_hostname"}."/mailman/"; },
"pipermail_url"=>sub { return "http://".$My::Web::W->{"web_hostname"}."/pipermail/"; },
"heading"=>sub () {
sub print_project
{
-my($class,$ListItem,%args)=@_;
+my($class,$ListItem)=@_;
- print "<h1>".$W->{"title"}."</h1>\n";
- do { print $_ if $_; } for ($args{"project_text_after_title"});
+ print "<h1>".$class->title($ListItem)."</h1>\n";
+ do { print $_ if $_; } for ($W->{"project_text_after_title"});
print $ListItem->{"description"};
print "<hr />\n";
- print($args{"before_project_data"}||"");
- return if $args{"no_project_data"};
+ print($W->{"before_project_data"}||"");
+ return if $W->{"no_project_data"};
my @table=(
{"key"=>"summary","text"=>"Summary"},
{"key"=>"license","text"=>"License","format"=>sub ($) {
or cluck "Error finding project name of the package: ".$args{"__PACKAGE__"};
my $ListItem=$class->name_to_hashref($args{"project_name"});
my $W=$class->SUPER::init(
- "title"=>$class->title($ListItem),
+ "title"=>My::Web->a_href_inhibit(sub { return $class->title($ListItem); }),
map(("rel_$_"=>'/project/Rel.pm?rel='.$_.'&project='.$args{"project_name"}),qw(prev next)),
"rel_up"=>'/project/',
# "rel_start"=>"/", # TODO:homepage
+ "css_push"=>"/project/Lib.css",
%args,
- "head"=>($args{"head"}||"").<<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "/project/Lib.css") ]}" />
-HERE
"heading_novskip"=>1,
);
$class->heading();
}
$W->{"r"}->status(HTTP_MOVED_TEMPORARILY);
-$W->{"r"}->headers_out()->{"Location"}="http://".$W->{"web_hostname"}
-# .":7680" # DEBUG
- ."/project/".(!$target ? "" : "$target/");
+$W->{"r"}->headers_out()->{"Location"}=path_web "./".($target && "$target/"),"abs"=>1;
exit 0;
{
my $W=project::Lib->init(
"project_name"=>"captive",
- "before_project_data"=>
- '<h2>'.a_href('./','Captive Main Page').'</h2>'."\n",
+ "before_project_data"=>sub { return '<h2>'.a_href('./','Captive Main Page').'</h2>'."\n"; },
);
{
my $W=project::Lib->init(
"no_project_data"=>1,
- "head"=><<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "./Index.css") ]}" />
-HERE
- "project_text_after_title"=>""
+ "css_push"=>"./Index.css",
+ "project_text_after_title"=>sub { return ""
.'<table border="0" width="100%"><tr><td align="center">'
.'<table border="0" class="navigate"><tr>'
.'<td>• '.a_href('#download','Download').'</td>'
.'<td>• '.a_href('#lists','Mailing Lists').'</td>'
.'<td>• '.a_href('#seealso','See Also').'</td>'
.'</tr></table>'
- .'</td></tr></table>',
+ .'</td></tr></table>';
+ },
);
{
My::Web->init(
"title"=>'Captive NTFS Internet Press',
- "head"=><<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "./Lib.css") ]}" />
-HERE
+ "css_push"=>"./Lib.css",
"heading_novskip"=>1,
"no_job"=>1,
"force_charset"=>"utf-8",
{
My::Web->init(
"title"=>'Captive NTFS Technology Preview',
- "head"=><<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "./Preview.css") ]}" />
-HERE
+ "css_push"=>"./Preview.css",
"heading_novskip"=>1,
);
My::Web->heading();
{
My::Web->init(
"title"=>'Captive NTFS - Hospital of Castelo Branco',
- "head"=><<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "./Lib.css") ]}" />
-HERE
+ "css_push"=>"./Lib.css",
"heading_novskip"=>1,
"no_job"=>1,
);
{
My::Web->init(
"title"=>'Captive NTFS Thanks',
- "head"=><<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "./Lib.css") ]}" />
-HERE
+ "css_push"=>"./Lib.css",
"heading_novskip"=>1,
"no_job"=>1,
);
{
my($class,%args)=@_;
- $args{"__PACKAGE__"}||=caller();
- %args=(
- "rel_start"=>"..",
- "rel_up"=>".",
- %args);
My::Web->init(
- "head"=><<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "./Macros.css") ]}" />
-HERE
+ "css_push"=>"./Macros.css",
"heading_novskip"=>1,
+ "rel_start"=>"..", # possibly overridable
+ "rel_up"=>".", # possibly overridable
+ "__PACKAGE__"=>caller(), # possibly overridable
%args,
);
"section"=>"Resume",
"heading"=>undef(),
"footer"=>undef(),
- "head"=><<"HERE",
-<link rel="stylesheet" type="text/css" href="@{[ uri_escaped(path_web "/resume/ResumeJanKratochvil.css") ]}" />
-HERE
+ "css_push"=>"/resume/ResumeJanKratochvil.css",
"args_check"=>{
"referees"=>'', # Do not bother with '^(?:(?i)referees)?$'
"print"=>'^(?:print)?$',