Bring CSS to the CGI scripts.
This commit is contained in:
parent
df508e7e4e
commit
9cb8dd0d21
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=25107
2 changed files with 11 additions and 15 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# $FreeBSD: www/en/cgi/cgi-style.pl,v 1.18 2004/10/13 10:55:55 keramida Exp $
|
||||
# $FreeBSD: www/en/cgi/cgi-style.pl,v 1.19 2005/02/12 13:13:14 ceri Exp $
|
||||
#
|
||||
# Perl routines to encapsulate various elements of HTML page style.
|
||||
|
||||
|
|
@ -8,14 +8,6 @@ $yr += 1900;
|
|||
$mo += 1;
|
||||
$timestamp = "$mo-$md-$yr";
|
||||
|
||||
# Colors for the body
|
||||
$t_body = "<body text=\"#000000\" bgcolor=\"#ffffff\">";
|
||||
|
||||
# This can be set to either a string containing an inline CSS stylesheet
|
||||
# or to a <link> element that references an external CSS stylesheet, to
|
||||
# make local modifications to the style of a CGI script's output.
|
||||
$t_style = "";
|
||||
|
||||
if (!defined($hsty_base)) {
|
||||
$hsty_base = "..";
|
||||
}
|
||||
|
|
@ -30,6 +22,11 @@ if (!defined($hsty_date)) {
|
|||
$hsty_date = "";
|
||||
}
|
||||
|
||||
# This can be set to either a string containing an inline CSS stylesheet
|
||||
# or to a <link> element that references an external CSS stylesheet, to
|
||||
# make local modifications to the style of a CGI script's output.
|
||||
$t_style = "<link rel=\"stylesheet\" type=\"text/css\" href=\"$hsty_base/freebsd.css\">";
|
||||
|
||||
$i_topbar = "<IMG SRC=\"$hsty_base/gifs/bar.gif\" ALT=\"Navigation Bar\" WIDTH=\"565\" HEIGHT=\"33\" BORDER=0 usemap=\"#bar\">
|
||||
<map name=\"bar\">
|
||||
<area shape=\"rect\" coords=\"1,1,111,31\" href=\"$hsty_base/index.html\" ALT=\"Site Root\">
|
||||
|
|
@ -53,8 +50,8 @@ sub html_header {
|
|||
|
||||
return "Content-type: text/html\n\n" .
|
||||
"<html>\n<head><title>$title</title>\n" .
|
||||
"<meta name=\"robots\" content=\"nofollow\">\n$t_style\n</head>\n$t_body\n" .
|
||||
"$i_topbar <h1><font color=\"#660000\">$title</font></h1>\n";
|
||||
"<meta name=\"robots\" content=\"nofollow\">\n$t_style\n</head>\n<body>\n" .
|
||||
"$i_topbar <h1>$title</h1>\n";
|
||||
}
|
||||
|
||||
sub short_html_header {
|
||||
|
|
@ -62,7 +59,7 @@ sub short_html_header {
|
|||
|
||||
return "Content-type: text/html\n\n" .
|
||||
"<html>\n<head><title>$title</title>\n" .
|
||||
"<meta name=\"robots\" content=\"nofollow\">\n</head>\n$t_body\n" .
|
||||
"<meta name=\"robots\" content=\"nofollow\">\n</head>\n<body>\n" .
|
||||
"$i_topbar";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/perl -T
|
||||
# $FreeBSD: www/en/cgi/query-pr.cgi,v 1.38 2004/11/26 21:57:23 ceri Exp $
|
||||
# $FreeBSD: www/en/cgi/query-pr.cgi,v 1.39 2005/04/14 12:26:28 keramida Exp $
|
||||
|
||||
$ENV{'PATH'} = "/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin";
|
||||
|
||||
|
|
@ -141,8 +141,7 @@ while(<Q>) {
|
|||
$syn =~ s/[\t]+/ /g;
|
||||
$origsyn = $syn;
|
||||
$syn = &fixline($syn);
|
||||
print &short_html_header("Problem Report $cat/$number: $syn");
|
||||
print "<h1><font color=\"#660000\">Problem Report $cat/$number</font></h1>\n";
|
||||
print &html_header("Problem Report $cat/$number: $syn");
|
||||
print "<strong>$syn</strong><p>\n<dl>\n";
|
||||
} else {
|
||||
next if $inhdr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue