From 357adf02b161c6c06582fd15dad3038f33bb4eb2 Mon Sep 17 00:00:00 2001 From: Oliver Burn Date: Sun, 14 Aug 2005 13:23:39 +0000 Subject: [PATCH] Major update to the documentation look and feel. It is based *very* heavily on the TWiki.org documentation. --- src/xdocs/config_javadoc.xml | 16 +- src/xdocs/css/cs-layout.css | 40 +++++ src/xdocs/css/cs-style.css | 278 ++++++++++++++++++++++++++++++ src/xdocs/stylesheets/project.xml | 37 ++-- src/xdocs/stylesheets/site.vsl | 246 ++++++++++++-------------- 5 files changed, 457 insertions(+), 160 deletions(-) create mode 100755 src/xdocs/css/cs-layout.css create mode 100755 src/xdocs/css/cs-style.css diff --git a/src/xdocs/config_javadoc.xml b/src/xdocs/config_javadoc.xml index f0c0a1ca3..57f288143 100755 --- a/src/xdocs/config_javadoc.xml +++ b/src/xdocs/config_javadoc.xml @@ -230,9 +230,9 @@ An example of how to configure the check is:

-
+        
 <module name="JavadocMethod"/>
-        
+

An example of how to configure the check to check to allow @@ -241,13 +241,13 @@ param tags is:

-
+        
 <module name="JavadocMethod">
   <property name="scope" value="public"/>
   <property name="allowUndeclaredRTE" value="true"/>
   <property name="allowMissingParamTags" value="true"/>
 </module>
-        
+ @@ -414,20 +414,20 @@ public boolean isSomething() com.puppycrawl.tools.checkstyle.Verifier interface, then the Javadoc could be done as: - +
 /** @see com.puppycrawl.tools.checkstyle.Verifier **/
 public int checkReturnTag(final int aTagIndex,
                           JavadocTag[] aTags,
                           int aLineNo)
-            
+            
or: - +
 /** {@inheritDoc} */
 public int checkReturnTag(final int aTagIndex,
                           JavadocTag[] aTags,
                           int aLineNo)
-            
+            
diff --git a/src/xdocs/css/cs-layout.css b/src/xdocs/css/cs-layout.css new file mode 100755 index 000000000..c84f0a470 --- /dev/null +++ b/src/xdocs/css/cs-layout.css @@ -0,0 +1,40 @@ +.csTopBar { + height:80px; +} + +.csLeft { + float:left; + position:relative; +} + +.csRight { + position:relative; + float:right; + display:inline; + margin:0; + text-align:right; +} + + +.csMiddleContainer {} +.csLeftBar { + top:80px; + position:absolute; + left:0; + margin:0; + padding:0; +} + +/* positioning the left bar (width:13em) */ +.csLeftBar, +.csLeftBarContents /* needed for Explorer 5.0 */ { + width:13em; +} + +.csMain { + margin-left:13em; +} + +.csBottomBar { + margin:0 0 0 13.5em; /* add small margin for content offset */ +} diff --git a/src/xdocs/css/cs-style.css b/src/xdocs/css/cs-style.css new file mode 100755 index 000000000..bf351a760 --- /dev/null +++ b/src/xdocs/css/cs-style.css @@ -0,0 +1,278 @@ +/* Derived from Twiki */ + +/* Top bar */ +.csTopBar { + background-color:transparent; +} +.csTopBarContents { + margin:0; + padding:5px 2em 5px 1em; +} +.csTopBarContents p { + display:inline; +} + +.csBottomBar { + margin:0 0 0 13.5em; /* add small margin for content offset */ +} + +/* Left bar */ +.csLeftBar { + border-top:1px solid #ddd; + border-right:1px solid #ddd; + border-bottom:1px solid #ddd; + color:#800; + overflow:hidden; + line-height:1.5em; + background-color:#FBFAF8; +} +.csLeftBar a:link, +.csLeftBar a:visited { + text-decoration:none; + padding-bottom:1px; /* to account for hover border */ + border-bottom:0px; +} +.csLeftBar a:hover, +.csLeftBar a:visited:hover, +.csLeftBar a:active { + text-decoration:none; + color:#0029A3; /*C3*/ + padding-bottom:0; + border-bottom:1px solid #0054C0; /*C1*/ +} + +.csLeftBar .csWebIndicator a { + height:2em; +} +.csLeftBar .csWebIndicator a:link, +.csLeftBar .csWebIndicator a:visited { + color:black; + text-decoration:none; + border-bottom:0px; +} +.csLeftBar .csWebIndicator a:hover, +.csLeftBar .csWebIndicator a:active { + color:black; + text-decoration:underline; + border-bottom:0px; + padding-bottom:1px; + background-color:transparent; +} +.csLeftBar .csLeftBarContents { + font-size:95%; + font-weight:normal; + margin:0; + padding:1em 0 1.7em 1em; + width:auto; + border-top:3px solid #666; /*C4*/ +} +.csLeftBar ul { + padding:0; + margin:0; +} +.csLeftBar li { + display:block; + list-style:none; + width:100%; +} +.csLeftBar li a { + display:block; + width:98%; + padding-right:2%; +} + +.csMain { + padding:0 3.5em; + background-color:#fff; + border-width:1px; + border-style:solid; + border-color:#ddd #ddd #ddd #ddd; +} + +/* General formatting */ + +/* HTML elements */ +html body { + line-height:1.4em; /*C10*/ + font-family:"Lucida Grande", verdana, lucida, helvetica, sans-serif; + background-color:#F8F4F1; /*C7*/ + color:#000; + margin:0; + padding:0; + font-size:x-small; + voice-family:"\"}\""; + voice-family:inherit; + font-size:small; +} +html>body { + font-size:small; +} + +/* be kind to netscape 4 that doesn't understand inheritance */ +body, p, li, ul, ol, dl, dt, dd, acronym, h1, h2, h3, h4, h5, h6 { + background-color:transparent; +} +p { + margin:1em 0 0 0; +} + +:link:focus, +:visited:focus, +:link, +:visited, +:link:active, +:visited:active { + text-decoration:none; + color:#0054C0; /*C1*/; + background-color:transparent; +} +:link:hover, +:visited:hover { + text-decoration:underline; + color:#0029A3; /*C3*/ + background-color:#b4d5ff; /*C2*/ +} + +/* Text */ +h1, h2, h3, h4, h5, h6 { + font-family:"Lucida Grande", helvetica, lucida, verdana, sans-serif; + line-height:104%; + padding:0; + margin:1em 0 0.1em 0; + text-transform: capitalize; +} +h1 { + font-size:210%; + color:#e24628; + /* margin:0 0 0.5em 0; */ +} +h2, h3, h4, h5, h6 {color:#900;} /*C5*/ +h2 { + font-size:145%; + display:block; + background-color:#F3EDE7; /*C8*/ + padding:0.2em 0.7em; + margin:1em -0.7em 0.35em -0.7em; + height:auto; +} +h3 { font-size:140%;} +h4 { font-size:125%;} +h5 { font-size:110%;} +h6 { font-size:95%;} + +/* Original stuff */ + +/* +h1 { + font-family : monospace; + font-size : 28px; + font-weight : bold; + color : #aaaaaa; + background-color: #ffffff; + text-transform: capitalize; +} + +h2 { + text-transform: capitalize; +} +*/ + +h4.tip { + text-transform: capitalize; + text-align: center; +} + +td { + vertical-align:top; +} + +tr.odd { + background-color: #EEEEEE; +} + +tr.even { + background-color: #E5E5E5; +} + +th { + background-color: Silver; + color:Black; + font-weight: bolder; + text-align: center; +} + +td.navbarHeader { + border-top: 1px solid #909090; + background-color: #dddddd; + color:Black; + text-align: left; + white-space: nowrap; + padding-left : 0.5ex; + padding-right: 0.5ex; +} + + +td.navbarItem { + background-color: #eeeeee; + color:Black; + text-align: left; + white-space: nowrap; + padding-left : 1ex; + padding-right: 1ex; +} + +#navbar ul { + padding-left: 0.4em; +} + +#navbar li { + list-style-type: none; + font-size: smaller; +} + +#navbar ul.sectionquicklink { + padding-left: 1em; +} + +td.content { + width: 100%; +} + +td#mainContents { + padding-left : 1em; + padding-right : 1em; +} + +*.body { + margin-left : 5%; + margin-right : 3%; +} + +img { + border: none; +} + +p.copyright { + text-align: center; +} + +span.code { + white-space: nowrap; + font-family: monospace; + font-weight: bold +} + +span.default { + white-space: nowrap; + font-family: monospace; +} + +div.tip { + margin-left : 5%; + margin-right : 5%; + padding-left: 2%; + padding-right: 2%; + background-color: Silver; + color:Black; + border: ridge; +} diff --git a/src/xdocs/stylesheets/project.xml b/src/xdocs/stylesheets/project.xml index d35aae3a1..2698f309a 100644 --- a/src/xdocs/stylesheets/project.xml +++ b/src/xdocs/stylesheets/project.xml @@ -24,26 +24,25 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + diff --git a/src/xdocs/stylesheets/site.vsl b/src/xdocs/stylesheets/site.vsl index e05f269d3..e20d977bc 100644 --- a/src/xdocs/stylesheets/site.vsl +++ b/src/xdocs/stylesheets/site.vsl @@ -53,13 +53,16 @@ #end #macro ( td $value $trclass) + +> #if ($value.getText().length() != 0 || $value.hasChildren()) $value.getContent() #else @@ -69,13 +72,16 @@ #end #macro ( th $value) + +> #if ($value.getText().length() != 0 || $value.hasChildren()) $value.getContent() #else @@ -84,17 +90,17 @@ #end -#macro ( projectanchor $name $value ) +#macro ( projectanchor $name $value $indent) #if ($value.startsWith("http://")) - $name + ${indent}$name #else - $name + ${indent}$name #end #end #macro ( metaauthor $author $email ) - - + + #end #macro ( image $value ) @@ -161,7 +167,7 @@ ## section macro ## ================================ #macro ( section $section) - +

$section.getAttributeValue("name")

#foreach ( $items in $section.getChildren() ) #if ($items.getName().equals("img")) @@ -182,73 +188,57 @@ ## make navigation bar ## =================================== -#macro ( makeNavigationMenu $menu ) -
    +#macro ( makeNavigationMenu $menu $indentStr) #foreach ( $item in $menu.getChildren() ) #set ($name = $item.getAttributeValue("name")) #if ( $name.equalsIgnoreCase($docname) ) -
  • #projectanchor($name $item.getAttributeValue("href"))
  • +
  • #projectanchor($name $item.getAttributeValue("href") ${indentStr})
  • #else -
  • #projectanchor($name $item.getAttributeValue("href"))
  • +
  • #projectanchor($name $item.getAttributeValue("href") ${indentStr})
  • #end #if ( $name.equalsIgnoreCase($docname) ) - #end - #makeNavigationMenu ($item ) + #makeNavigationMenu ($item "${indentStr}   ") #end -
+ #end #macro ( makeNavigationBar ) - - #set ($menus = $project.getChild("body").getChildren("menu")) - #set ($docname = $root.getChild("properties").getChild("title").getText()) + + #set ($menus = $project.getChild("body").getChildren("menu")) + #set ($docname = $root.getChild("properties").getChild("title").getText()) + +
    #foreach ( $menu in $menus ) -
- - - - - - +
  • + $menu.getAttributeValue("name") +
  • + #makeNavigationMenu ($menu "") #end - + +
      +
    • + Hosted by: +
      +

      + SourceForge Logo +

      +
      +
    • +
    + + + #end -## ==================================== -## getProjectImage -## ==================================== -#macro (getProjectImage) - -

    $root.getChild("properties").getChild("title").getText()

    - - - #set ( $logoString = $project.getChild("logo").getAttributeValue("href") ) - #if ( $logoString.startsWith("/") ) - - $project.getChild( - - #else - - $project.getChild( - - #end - -#end #macro (printMeta $metaElement) - - - + + + - #set ($authors = $root.getChild("properties").getChildren("author")) - #foreach ( $au in $authors ) - #metaauthor ( $au.getText() $au.getAttributeValue("email") ) - #end + #set ($authors = $root.getChild("properties").getChildren("author")) + #foreach ( $au in $authors ) + #metaauthor ( $au.getText() $au.getAttributeValue("email") ) + #end - #set ($metas = $root.getChildren("meta")) + #set ($metas = $root.getChildren("meta")) - ## Parse meta directives such as - ## - #foreach ($meta in $metas) #printMeta($meta) #end + ## Parse meta directives such as + ## + #foreach ($meta in $metas) #printMeta($meta) #end - ## Support for tags. - #if ($root.getChild("properties").getChild("base")) - #set ($url = $root.getChild("properties").getChild("base").getAttributeValue("href")) - - #end + ## Support for tags. + #if ($root.getChild("properties").getChild("base")) + #set ($url = $root.getChild("properties").getChild("base").getAttributeValue("href")) + + #end - + $project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText() - $project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText() - + + - - - - - - #getProjectImage() - -
    - + +
    +
    +
    +

    $root.getChild("properties").getChild("title").getText()

    +
    +
    + + Checkstyle Logo + +
    +
    +
    - - - - - - - - - - - - -
    -
    -
    - #foreach ( $item in $root.getChild("body").getChildren() ) - #if ($item.getName().equals("img")) - #image ($item) - #elseif ($item.getName().equals("section")) - #section ($item) - #elseif ($item.getName().equals("source")) - #source ($item) - #elseif ($item.getName().equals("table")) - #table ($item) - #elseif ($item.getName().equals("subsection")) - #subsection ($item) - #else - $item - #end - #end +
    +
    + Copyright © 2001-2005, Oliver Burn +
    +
    + + -
    -
    -
    -
    - Copyright © 2001-2005, Oliver Burn -
    -
    - - - #end