help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gnatsweb: patch to add stylesheet support


From: Yngve Svendsen
Subject: Gnatsweb: patch to add stylesheet support
Date: Tue, 20 Mar 2001 13:47:35 +0100

The following patch adds the ability to have an external stylesheet linked to all pages generated by Gnatsweb. It is against the version in the current GNATS 4 CVS.

Gerald: Isn't it a good idea to change the version number of the development Gnatsweb in CVS to distinguish it from the version that works with GNATS 3.x? I would suggest going to "4.0-dev". In the future, version numbers don't need to be synced between GNATS and Gnatsweb, but I think it is a good idea to use a common starting point for version 4, since older versions of Gnatsweb won't work with GNATS 4. Does that make sense?

Next, I'll be going through some of the HTML constructs produced by Gnatsweb in order to make them more amenable to formatting with stylesheets. Expect more patches soon.

- Yngve



Index: gnatsweb.pl
===================================================================
RCS file: /cvs/gnats/gnats/contrib/gnatsweb/gnatsweb.pl,v
retrieving revision 2.24
diff -u -p -r2.24 gnatsweb.pl
--- gnatsweb.pl 2001/02/08 10:49:15     2.24
+++ gnatsweb.pl 2001/03/20 12:40:10
@@ -26,6 +26,11 @@ $site_banner_text = 'gnatsweb';
 $site_banner_background = '#000000';
 $site_banner_foreground = '#ffffff';

+# Uncomment the following line and insert stylesheet URL in order to
+# link all generated pages to an external stylesheet. Both absolute
+# and relative URLs are supported.
+#$site_stylesheet='http://url.of/stylesheet';
+
 $popup_menu_becomes_obnoxious = 20;

 $client_would_have_exited = 0;
@@ -2182,6 +2187,8 @@ sub page_start_html
   my @args = (-title=>"$title - $site_banner_text");
   push(@args, -bgcolor=>$site_background)
         if defined($site_background);
+  push(@args, -style=>{-src=>$site_stylesheet})
+        if defined($site_stylesheet);
   print $q->start_html(@args);

   # Add the page banner.  This banner is a string slammed to the right




reply via email to

[Prev in Thread] Current Thread [Next in Thread]