Update of /cvsroot/ht2html/ht2html
In directory usw-pr-cvs1:/tmp/cvs-serv23113
Modified Files:
PDOGenerator.py
Log Message:
Add a hook to allow individual .ht files to specify a bit of CSS in the
headers; this will land in the <style> element.
Add a reference to the site-wide stylesheet so that it can be picked up as
pages get re-generated.
Index: PDOGenerator.py
===================================================================
RCS file: /cvsroot/ht2html/ht2html/PDOGenerator.py,v
retrieving revision 2.5
retrieving revision 2.6
diff -C2 -d -r2.5 -r2.6
*** PDOGenerator.py 28 Mar 2002 17:25:25 -0000 2.5
--- PDOGenerator.py 3 Apr 2002 22:10:12 -0000 2.6
***************
*** 71,74 ****
--- 71,88 ----
return s1 or s2
+ def get_style(self):
+ s1 = Skeleton.get_style(self)
+ s2 = self.__parser.get('local-css')
+ if s1:
+ if s2:
+ return s1 + "\n" + s2
+ else:
+ return s1
+ else:
+ return s2
+
+ def get_stylesheet(self):
+ return os.path.join(self.__d['rootdir'], 'style.css')
+
def get_title(self):
return self.__parser.get('title')
|