2012-06-27 10:20 UTC+0200 Viktor Szakats (harbour syenar.net)

* examples/hbdoc/genhtml.prg
    * write well-formatted CSS code

  * examples/hbdoc/hbdoc.ch
  * examples/hbdoc/hbdoc.prg
  * examples/hbdoc/tmplates.prg
    % eliminated one PUBLIC var
This commit is contained in:
Viktor Szakats
2012-06-27 08:21:41 +00:00
parent aaefbf3466
commit 809f557e18
5 changed files with 60 additions and 15 deletions

View File

@@ -16,6 +16,15 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-27 10:20 UTC+0200 Viktor Szakats (harbour syenar.net)
* examples/hbdoc/genhtml.prg
* write well-formatted CSS code
* examples/hbdoc/hbdoc.ch
* examples/hbdoc/hbdoc.prg
* examples/hbdoc/tmplates.prg
% eliminated one PUBLIC var
2012-06-27 00:22 UTC+0200 Viktor Szakats (harbour syenar.net)
+ examples/hbdoc/genbase.prg
- examples/hbdoc/gentpl.prg

View File

@@ -294,18 +294,54 @@ METHOD Append( cText, cFormat ) CLASS GenerateHTML
RETURN self
METHOD RecreateStyleDocument( cStyleFile ) CLASS GenerateHTML
LOCAL cString
IF ! hb_MemoWrit( ::cFolder + hb_ps() + cStyleFile,;
"/* Harbour Documents Stylesheet */" + hb_eol() + ;
"body {font-family:arial;font-size:14px;line-height:18px;}" + hb_eol() + ;
/* ".classtitle {font-weight:bold;font-size:22px;padding-bottom:4px;}" + hb_eol() + */ ;
".name {font-weight:bold;font-size:18px;margin-left:0px;padding-top:0px;padding-bottom:4px;}" + hb_eol() + ;
".oneliner {font-style:italic;margin-bottom:12px;}" + hb_eol() + ;
".itemtitle {font-weight:bold;margin-left:0px;padding-top:0px;padding-bottom:4px;}" + hb_eol() + ;
".itemtext {margin-left:10px;padding-bottom:4px;}" + hb_eol() + ;
".examples {margin-left:10px;padding-bottom:4px;}" + hb_eol() + ;
".tests {margin-left:10px;padding-bottom:4px;}" + hb_eol() + ;
"" )
#pragma __cstream|cString := %s
/* Harbour Documents Stylesheet */
body {
font-family: arial;
font-size: 14px;
line-height: 18px;
}
.name {
font-weight: bold;
font-size: 18px;
margin-left: 0px;
padding-top: 0px;
padding-bottom: 4px;
}
.oneliner {
font-style: italic;
margin-bottom: 12px;
}
.itemtitle {
font-weight: bold;
margin-left: 0px;
padding-top: 0px;
padding-bottom: 4px;
}
.itemtext {
margin-left: 10px;
padding-bottom: 4px;
}
.examples {
margin-left: 10px;
padding-bottom: 4px;
}
.tests {
margin-left: 10px;
padding-bottom: 4px;
}
#pragma __endtext
IF ! hb_MemoWrit( ::cFolder + hb_ps() + cStyleFile, cString )
// TODO: raise an error, could not create style file
ENDIF

View File

@@ -57,7 +57,6 @@
#define HBDOC_CH_
MEMVAR p_aCategories
MEMVAR p_hsSwitches
MEMVAR p_aCompliance
MEMVAR p_aPlatforms
MEMVAR p_aStatus

View File

@@ -109,6 +109,8 @@ REQUEST HB_GT_CGI_DEFAULT
STATIC s_aExclusions := { "class_tp.txt", "hdr_tpl.txt" }
MEMVAR p_hsSwitches
PROCEDURE Main( ... )
LOCAL aArgs := HB_AParams()
LOCAL idx, idx2, idx3, idx4
@@ -957,7 +959,7 @@ PROCEDURE ShowHelp( cExtraMessage, aArgs )
aHelp := { ;
iif( Len( aArgs ) >= 3, aArgs[ 3 ] + " template is:", "Defined templates are:" ), ;
"", ;
{|| ShowTemplatesHelp( iif( Len( aArgs ) >= 3, aArgs[ 3 ], NIL ) ) } ;
{|| ShowTemplatesHelp( iif( Len( aArgs ) >= 3, aArgs[ 3 ], NIL ), p_hsSwitches[ "DELIMITER" ] ) } ;
}
CASE aArgs[ 2 ] == "Compliance"

View File

@@ -487,10 +487,9 @@ PROCEDURE init_Templates()
RETURN
PROCEDURE ShowTemplatesHelp( cTemplate )
PROCEDURE ShowTemplatesHelp( cTemplate, cDelimiter )
LOCAL o := Entry():New()
LOCAL idxTemplates, nFrom := 1, nTo := Len( o:Templates )
LOCAL cDelimiter := p_hsSwitches[ "DELIMITER" ]
LOCAL idx
IF ! Empty( cTemplate ) .AND. cTemplate != "Template"