HTMLDocGenerator.st
changeset 1923 57fbb3e512e3
parent 1896 ed785b09f5b1
child 1952 d4ce03b83795
--- a/HTMLDocGenerator.st	Wed Dec 06 16:25:51 2006 +0100
+++ b/HTMLDocGenerator.st	Fri Dec 15 16:17:35 2006 +0100
@@ -269,27 +269,19 @@
 !HTMLDocGenerator methodsFor:'document generation'!
 
 generateExampleEnd
-    outStream nextPutLine:'</PRE></CODE>'.
-    outStream nextPutLine:'</TD></TR></TABLE>'.
-
-    self generatingForSTXBrowser ifFalse:[
-        "/ outStream nextPutLine:'</FONT>'.
-        ^ self
+    outStream nextPutLine:'</code></pre>'.
+    self generatingForSTXBrowser ifTrue:[
+        outStream nextPutLine:'</a>'.
     ].
-    outStream nextPutLine:'</A>'.
+    outStream nextPutLine:'</td></tr></table>'.
 !
 
 generateExampleStart
-    outStream nextPutLine:'<P>'.
-    outStream nextPutLine:'<TABLE width="100%" bgcolor="#eedddd"><TR><TD>'.
+    outStream nextPutLine:'<p></p><table width="100%" bgcolor="#eedddd"><tr><td>'.
     self generatingForSTXBrowser ifTrue:[
-        outStream nextPutLine:'<A info="execute the example" type="example" showresult>'.
+        outStream nextPutLine:'<a info="execute the example" type="example" showresult>'.
     ].
-    outStream nextPutLine:'<CODE><PRE>'.
-
-    self generatingForSTXBrowser ifFalse:[
-        "/ outStream nextPutLine:'<FONT color=#7F0000>'.
-    ].
+    outStream nextPutLine:'<pre><code>'.
 !
 
 generateExamples:examples
@@ -1034,14 +1026,22 @@
     ].
 
     s nextPutLine:'<h1>'.
-    s nextPutAll:'Class: ';
-      nextPutAll:'<a INFO="Open a Browser on ' , shortName , '" type="example" action="Smalltalk browseInClass:' , className , '">';
-      nextPutAll:(shortName); nextPutLine:'</a>'.
-
+    s nextPutAll:'Class: '.
+
+    self generatingForSTXBrowser ifTrue:[
+        s nextPutAll:'<a INFO="Open a Browser on ' , shortName , '" type="example" action="Smalltalk browseInClass:' , className , '">';
+          nextPutAll:shortName; nextPutLine:'</a>'.
+    ] ifFalse:[
+        s nextPutAll:shortName.
+    ].
     owner notNil ifTrue:[
-        s nextPutAll:' (private in ';
-          nextPutAll:'<a INFO="Open a Browser on ' , owner nameWithoutPrefix , '" type="example" action="Smalltalk browseInClass:' , owner name , '">';
-          nextPutAll:(owner nameWithoutPrefix); nextPutLine:'</a>)'.
+        s nextPutAll:' (private in '.
+        self generatingForSTXBrowser ifTrue:[
+          s nextPutAll:'<a INFO="Open a Browser on ' , owner nameWithoutPrefix , '" type="example" action="Smalltalk browseInClass:' , owner name , '">';
+            nextPutAll:(owner nameWithoutPrefix); nextPutLine:'</a>)'.
+        ] ifFalse:[
+            s nextPutAll:owner nameWithoutPrefix.
+        ].
     ] ifFalse:[
         aClass nameSpace ~~ Smalltalk ifTrue:[
             s nextPutAll:' (in ' , aClass nameSpace name , ')'
@@ -1315,9 +1315,9 @@
         s nextPutLine:'<h2><a name="DEMOSTARTUP" href="#I_DEMOSTARTUP">Demonstration:</A></h2>'.
         demoLines do:[:l |
             s nextPutLine:'<a INFO="demonstration" type="example">'.
-            s nextPutLine:'<code><pre>'.
+            s nextPutLine:'<pre><code>'.
             s nextPutLine:'    ' , l withoutSeparators.
-            s nextPutLine:'</pre></code>'.
+            s nextPutLine:'</code></pre>'.
             s nextPutLine:'</a>'.
             s nextPutLine:'<br>'.
         ].
@@ -2096,9 +2096,9 @@
 
 noManPageForCommand:aCommand usingManCommand:manCommand
         ^ '
-No manual page for "<CODE><B>' , aCommand , '</B></CODE>" available.
+No manual page for "<code><b>' , aCommand , '</b></code>" available.
 <BR>
-(The failed command was: "<CODE>' , manCommand , '"</CODE>.)
+(The failed command was: "<code>' , manCommand , '"</code>.)
 '.
 ! !
 
@@ -2147,15 +2147,15 @@
         infoPart := self infoParameterFor:infoMessageOrNil.
     ].
     nameOrNil notNil ifTrue:[
-        namePart := 'NAME="' , nameOrNil , '" '. 
+        namePart := 'name="' , nameOrNil , '" '. 
     ].
-    ^ '<A HREF="' , self pathToTopOfDocumentation , '/misc/onlyInSTX2.html" ' 
+    ^ '<a href="' , self pathToTopOfDocumentation , '/misc/onlyInSTX2.html" ' 
       , namePart
       , infoPart
       , 'ACTION="html:' 
       , actionString 
       , '">' , text 
-      ,'</A>'.
+      ,'</a>'.
 
     "
      self new anchorForHTMLAction:'foo' info:'bla' text:'text'  
@@ -2358,7 +2358,7 @@
 generateUpArrowButtonWithReference:backHRef command:backCmd imagePath:imagePath altLabel:altLabel
     |p|
 
-    outStream nextPutAll:'<a NOPRINT HREF="' , backHRef , '"'.
+    outStream nextPutAll:'<a class="noprint" href="' , backHRef , '"'.
     backCmd notNil ifTrue:[
         outStream nextPutAll:' action="html:' , self class name , ' ' , backCmd , '"'.
     ].
@@ -2366,7 +2366,7 @@
     p isNil ifTrue:[
         p := self pathToTopOfDocumentation , '/icons'
     ].
-    outStream nextPutLine:'> <IMG NOPRINT SRC="' , p , '/DocsUpArrow.gif" ALT="[' , (altLabel ? 'back') , ']"></A>'.
+    outStream nextPutLine:'><img src="' , p , '/DocsUpArrow.gif" alt="[' , (altLabel ? 'back') , ']"></a>'.
 !
 
 generatingForSTXBrowser
@@ -2378,8 +2378,7 @@
 
     ^ 
       'ONMOUSEOVER="window.status=''',infoMessageOrNil,'''; return true" ' , 
-      'ONMOUSEOUT="window.status='' ''; return true" ' ,
-      'INFO="' , infoMessageOrNil , '" '
+      'ONMOUSEOUT="window.status='' ''; return true" '
 !
 
 methodCommentOf:aMethod
@@ -2505,5 +2504,5 @@
 !HTMLDocGenerator class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/HTMLDocGenerator.st,v 1.77 2006-11-10 16:23:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/HTMLDocGenerator.st,v 1.78 2006-12-15 15:17:35 stefan Exp $'
 ! !