[Nice-commit] Nice/src/nice/tools/doc api.nice,1.3,1.4 htmlwriter.nice,1.14,1.15
Brought to you by:
bonniot
From: Francis B. <fb...@us...> - 2004-09-02 12:48:55
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28028/src/nice/tools/doc Modified Files: api.nice htmlwriter.nice Log Message: api.nice: runs a command to output a stylesheet. htmlwriter.nice: added stylesheet link to the header, but it needs to link properly to the root directory. Index: htmlwriter.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/htmlwriter.nice,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** htmlwriter.nice 8 Aug 2004 10:16:56 -0000 1.14 --- htmlwriter.nice 2 Sep 2004 12:48:45 -0000 1.15 *************** *** 1,6 **** package nice.tools.doc; - //TODO: change illegal windows filename (+ * etc) - /** --- 1,4 ---- *************** *** 345,349 **** // Not 7 Bit use the unicode system sb.append("&#"); ! sb.append(new Integer(ci).toString()); sb.append(';'); } --- 343,347 ---- // Not 7 Bit use the unicode system sb.append("&#"); ! sb.append(ci); sb.append(';'); } *************** *** 355,362 **** /** Returns a string containing everything required up to and including the <body> tag */ ! String getHeader(String title) { //we could also include some kind of visible header as well //Create a DateFormatter and set the time zone DateFormat df = new SimpleDateFormat("dd/MM/yyyy 'at' HH:mm:ss z"); --- 353,368 ---- /** Returns a string containing everything required up to and including the <body> tag + * @param title a String to be displayed in the browser's title bar + * @param depth the number of levels down we are (required for linking the stylesheet) */ ! String getHeader(String title, int depth) { //we could also include some kind of visible header as well + //if depth is 2, this string will contain "../../" etc, etc + String depthstr = ""; + for(int i = 0; i < depth; i++) { + depthstr += "../"; + } + //Create a DateFormatter and set the time zone DateFormat df = new SimpleDateFormat("dd/MM/yyyy 'at' HH:mm:ss z"); *************** *** 366,374 **** "<head>\n" + "<!-- Generated by nicedoc on " df.format(new Date()) " -->\n" + ! "\t<title>" + title + "</title>\n" + "</head>\n" + "<body>\n"; } /** Returns a string containing everything after and including the </body> tag */ --- 372,385 ---- "<head>\n" + "<!-- Generated by nicedoc on " df.format(new Date()) " -->\n" + ! "\t<title>" title "</title>\n" + ! "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"" depthstr "main.css\" />\n" + "</head>\n" + "<body>\n"; } + String getHeader(String title) { + return getHeader(title, 0); + } + /** Returns a string containing everything after and including the </body> tag */ Index: api.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/api.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** api.nice 14 Mar 2004 14:49:36 -0000 1.3 --- api.nice 2 Sep 2004 12:48:45 -0000 1.4 *************** *** 48,51 **** --- 48,54 ---- d.document(packages); packages.foreach(bossa.modules.Package p => d.document(p)); + + //we also need to write a stylesheet to control the look and feel + writeStylesheet(); } catch (bossa.modules.Exit e) { |