#our $W;
# $W->{"title"}
# $W->{"head"}
- # $W->{"head_css"}
# $W->{"force_charset"}
# $W->{"heading_done"}
# $W->{"footer_passed"}
do { $W->{$_}=1 if !defined $W->{$_}; } for ("footer_ids");
do { $W->{$_}=1 if !defined $W->{$_}; } for ("indexme");
do { $W->{$_}="" if !defined $W->{$_}; } for ("head");
- do { $W->{$_}="" if !defined $W->{$_}; } for ("head_css");
+ do { $W->{$_}="" if !defined $W->{$_}; } for ("body_attr");
do { $W->{$_}="en-US" if !defined $W->{$_}; } for ("language");
my $footer_any=0;
$url=top_dir($url,%args) if $url=~m#^/# || $args{"abs"};
my $uri=URI->new($url);
- for my $key (keys(%{$W->{"args_persistent"}})) {
- my $val=$W->{"args"}{$key};
- next if !defined $val;
- $uri->query_param_append($key=>$val);
- }
+ # Prefer the $uri values over "args_persistent" values.
+ $uri->query_form_hash({
+ map({
+ my $key=$_;
+ my $val=$W->{"args"}{$key};
+ (!defined $val ? () : ($key=>$val));
+ } keys(%{$W->{"args_persistent"}})),
+ %{$uri->query_form_hash()},
+ });
$url="".$uri;
return $url;
$title=~s#<[^>]*>##g;
Wprint "<head>";
Wprint "<title>$title</title>\n";
-
if ($W->{"have_css"}) {
- Wprint <<'HERE';
-<style type="text/css"><!--
-.cvs-id { font-family: monospace; }
-.error { color: red; background-color: transparent; }
-.quote { font-family: monospace; }
-.nowrap { white-space: nowrap; }
-.centered { text-align: center; }
-.tab-bold { font-weight: bold; }
-.tab-head { font-weight: bold; }
-/*
-.tab-head { font-weight: bold; color: yellow; background-color: transparent; }
-body {
- background-color: black;
- color: white;
- }
-:link { color: aqua; background-color: transparent; }
-:visited { color: teal; background-color: transparent; }
-h1,h2 { color: yellow; background-color: transparent; }
-*/
-td { padding: 2px; }
-caption { caption-side: bottom; }
-.footer img { vertical-align: middle; }
+ # Everything can get overriden later.
+ Wprint <<"HERE";
+<link rel="stylesheet" type="text/css" href="@{[ url_out("/My/Web.css") ]}" />
HERE
- Wprint $W->{"head_css"}."\n";
- Wprint "--></style>\n";
}
-
Wprint '<meta name="robots" content="'.($W->{"indexme"} ? "" : "no" ).'index,follow" />'."\n";
Wprint $W->{"head"};
for my $type (qw(prev next index contents start up)) {
Wprint "</head><body";
# Wprint ' bgcolor="black" text="white" link="aqua" vlink="teal"'
# if $W->{"browser"}->netscape() && (!$W->{"browser"}->major() || $W->{"browser"}->major()<=4);
- do { &{$_}($W) if $_; } for $W->{"body_attr_sub"};
+ Wprint $W->{"body_attr"};
Wprint ">\n";
do { &{$_}() if $_; } for ($W->{"heading"});