Partial CSS support added

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22192 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2005-12-21 08:49:31 +00:00
parent f6b0c3c5e7
commit ee82979a58
2 changed files with 32 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2005-12-21 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/AGSHtml.m: Partial update for use of CSS ... as provided by
Fabien Vallon. Need to decide where the stylesheet file should come
from and where it should be installed. Probably need a new autogsdoc
flag for this and some internal api changes.
2005-12-20 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/AGSParser.m: Deal with C++ declaration of external C/ObjC libs.

View file

@ -286,7 +286,14 @@ static NSString *mainFont = nil;
}
buf = [NSMutableString stringWithCapacity: 4096];
[buf appendString: @"<html>\n"];
/* Declaration */
[buf appendString: @"<!DOCTYPE html PUBLIC "];
[buf appendString: @"\"-//W3C//DTD XHTML 1.0 Strict//EN\"\n"];
[buf appendString: @"\"http://www.w3.org/TR/xhtml1/DTD/"];
[buf appendString: @"xhtml1-strict.dtd\">\n"];
[buf appendString: @"<html xmlns=\"http://www.w3.org/1999/xhtml\" "];
[buf appendString: @"xml:lang=\"en\" lang=\"en\">\n"];
[self incIndent];
[self outputNodeList: node to: buf];
[self decIndent];
@ -846,7 +853,7 @@ static NSString *mainFont = nil;
else if ([name isEqual: @"declared"] == YES)
{
[buf appendString: indent];
[buf appendString: @"<blockquote>\n"];
[buf appendString: @"<blockquote class=\"declared\">\n"];
[self incIndent];
[buf appendString: indent];
[buf appendString: @"<dl>\n"];
@ -867,7 +874,7 @@ static NSString *mainFont = nil;
else if ([name isEqual: @"desc"] == YES)
{
[buf appendString: indent];
[buf appendString: @"<p>\n"];
[buf appendString: @"<div class=\"desc\">\n"];
[self incIndent];
while (children != nil)
{
@ -875,7 +882,7 @@ static NSString *mainFont = nil;
}
[self decIndent];
[buf appendString: indent];
[buf appendString: @"</p>\n"];
[buf appendString: @"</div>\n"];
}
else if ([name isEqual: @"em"] == YES)
{
@ -1110,6 +1117,13 @@ static NSString *mainFont = nil;
[self outputText: [children firstChild] to: buf];
[self decIndent];
[buf appendString: @"</title>\n"];
#if 0
/** Css : TODO print.css **/
[buf appendString:@"<meta http-equiv=\"Content-Style-Type\" content=\"text/css\"/>\n"];
[buf appendString:@"<link rel=\"stylesheet\" type=\"text/css\" href=\"screen.css\" media=\"screen\" title=\"Normal\" />\n"];
/** Robots **/
[buf appendString:@"<meta name=\"robots\" content=\"all\" />\n"];
#endif
[self decIndent];
[buf appendString: indent];
[buf appendString: @"</head>\n"];
@ -1504,6 +1518,8 @@ static NSString *mainFont = nil;
GSXMLNode *tmp = children;
BOOL hadArg = NO;
[buf appendString:@"<div class=\"method\">\n"];
sel = [prop objectForKey: @"factory"];
str = [prop objectForKey: @"type"];
if (sel != nil && [sel boolValue] == YES)
@ -1661,6 +1677,7 @@ static NSString *mainFont = nil;
[buf appendString: indent];
[buf appendString: @"<hr width=\"25%\" align=\"left\" />\n"];
}
[buf appendString:@"</div>\n"];
}
else if ([name isEqual: @"p"] == YES)
{
@ -2426,6 +2443,7 @@ static NSString *mainFont = nil;
rem = 0;
[buf appendString: indent];
[buf appendString: @"<div class=\"availability\">\n"];
[buf appendString: @"<b>Availability:</b> "];
if (add < GS_API_OSSPEC)
{
@ -2490,11 +2508,13 @@ static NSString *mainFont = nil;
[buf appendString: gvrem];
}
}
[buf appendString:@"</div>\n"];
[buf appendString: @"<br />\n"];
}
else if ([gvadd length] > 0)
{
[buf appendString: indent];
[buf appendString: @"<div class=\"availability\">\n"];
[buf appendString: @"<b>Availability:</b> "];
[buf appendString: project];
[buf appendString: @" "];
@ -2510,6 +2530,7 @@ static NSString *mainFont = nil;
[buf appendString: @" removed at "];
[buf appendString: gvrem];
}
[buf appendString:@"</div>\n"];
[buf appendString: @"<br />\n"];
}
}