Index: cgi-style.pl =================================================================== RCS file: /home/ncvs/www/en/cgi/cgi-style.pl,v retrieving revision 1.22 diff -u -r1.22 cgi-style.pl --- cgi-style.pl 17 Sep 2005 15:48:23 -0000 1.22 +++ cgi-style.pl 24 Oct 2005 14:03:26 -0000 @@ -25,50 +25,167 @@ # This can be set to either a string containing an inline CSS stylesheet # or to a element that references an external CSS stylesheet, to # make local modifications to the style of a CGI script's output. -$t_style = ""; +$t_style = ""; # Don't allow script to override completely, just + # let the script's setting cascade with the master. -$i_topbar = "Navigation Bar - -Site Root -Applications -Support -Documentation -Vendors -Search -Site Index -Site Root -Site Root -"; +$i_topbar = qq` +
+
+ Skip site + navigation (1)Skip section navigation (2) + +
+ + +

Site Navigation

+ + +
+
+`; + +#XXX does anyone use this? I don't know what it should be in the new style. if (!defined($hsty_home)) { $hsty_home = "FreeBSD Home Page"; } sub html_header { - local ($title) = @_; + local ($title, $xhtml) = @_; - return "Content-type: text/html\n\n" . - '' . - "\n\n\n$title\n" . - "\n" . - "\n$t_style\n\n\n" . - "$i_topbar\n

$title

\n"; + return short_html_header($title, $xhtml) . "

$title

\n"; } sub short_html_header { - local ($title) = @_; + local ($title, $xhtml) = @_; - return "Content-type: text/html\n\n" . - '' . - "\n\n$title\n" . - "\n" . - "\n\n\n" . - "$i_topbar\n"; + $xhtml = 1 unless defined($xhtml); + $doctype = $xhtml ? '' : ''; + $endslash = $xhtml ? '/' : ''; + $csshack = $xhtml ? '' : q` +`; + + return qq`Content-type: text/html + +$doctype + + +$title + + + + +$csshack + +$t_style + + +$i_topbar +`; } sub html_footer { - return "
$hsty_author
$hsty_date
\n\n"; + return qq` +
+ +
+
+ + +`; + + } sub get_the_source { Index: cvsweb.cgi =================================================================== RCS file: /home/ncvs/www/en/cgi/cvsweb.cgi,v retrieving revision 1.88 diff -u -r1.88 cvsweb.cgi --- cvsweb.cgi 30 Sep 2002 21:02:05 -0000 1.88 +++ cvsweb.cgi 18 Oct 2005 22:00:30 -0000 @@ -3638,16 +3638,8 @@ my ($title) = @_; http_header("text/html"); - (my $header = &cgi_style::html_header) =~ s,\A.*\n,,s; - - print < - -$title -$HTML_META -$header -EOH + (my $header = &cgi_style::html_header($title, 0)) =~ s,\A.*,\n$HTML_META,s; + print $header; } sub html_footer() {