You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by we...@apache.org on 2003/12/11 03:40:21 UTC

cvs commit: maven-plugins/xdoc/src/plugin-resources/css maven-base.css maven-theme.css maven.css

werken      2003/12/10 18:40:21

  Modified:    xdoc/src/plugin-resources site.jsl
               xdoc/src/plugin-resources/css maven.css
  Added:       xdoc/src/plugin-resources/css maven-base.css maven-theme.css
  Log:
  Possibly could be rolled back out, but, my experiment trying
  to make maven xdoc things more theme-able.
  
  Now, we have maven-base.css that only sets things like *relative*
  sizes, positioning of divs, etc.
  
  Then, we have, by default, maven-theme.css, which paints on the
  new maven theme.
  
  Or, if you set maven.xdoc.theme.url property to point to a URL of
  some shared .css.  This way, generated sites can be retheme from
  a central location.
  
  Lastly, if xdocs/style/project.css exists, it'll also be used to
  style, to provide project-specific modifications of the theme.
  
  Check maven-theme.css for possible places to customize.
  
  Instead of a growing number of properties, just move it to CSS.
  Makes sense to me.
  
  Some properties, such as where the Last Build date's placement,
  still are used.  Anything involving color is *not* used anymore.
  
  Revision  Changes    Path
  1.38      +51 -35    maven-plugins/xdoc/src/plugin-resources/site.jsl
  
  Index: site.jsl
  ===================================================================
  RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-resources/site.jsl,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- site.jsl	10 Dec 2003 15:50:27 -0000	1.37
  +++ site.jsl	11 Dec 2003 02:40:21 -0000	1.38
  @@ -29,28 +29,35 @@
             <title>${pom.name} - ${docTitle}</title>
           </x:if>
           
  -        <style type="text/css"><![CDATA[
  +<!--
             @import url("${relativePath}/style/tigris.css");
  -          @import url("${relativePath}/style/maven.css");
  +-->
  +
  +        <style type="text/css"><![CDATA[
  +          @import url("${relativePath}/style/maven-base.css");
           ]]></style>
           
  +        <j:set var="themeUrl" value="${maven.xdoc.theme.url}x"/>
  +        <j:if test="${themeUrl != 'x'}">
  +          <style type="text/css"><![CDATA[
  +            @import url("${maven.xdoc.theme.url}");
  +          ]]></style>
  +        </j:if>
  +
  +        <j:if test="${themeUrl == 'x'}">
  +          <style type="text/css"><![CDATA[
  +            @import url("${relativePath}/style/maven-theme.css");
  +          ]]></style>
  +        </j:if>
  +        
           <util:file var="projectCssFile" name="${maven.docs.src}/style/project.css"/>
           <j:if test="${projectCssFile.exists()}">
             <style type="text/css"><![CDATA[
               @import url("${relativePath}/style/project.css");
             ]]></style>
           </j:if>
  -        
  -        <!-- FIXME: once someone works out how to stop this breaking
  -        <x:element name="script"><x:attribute name="type">text/javascript</x:attribute>
  -          if (document.layers) {
  -                document.writeln(''+
  -                '<link rel="stylesheet" type="text/css" href="${relativePath}/style/ns4_only.css" media="screen" /><link rel="stylesheet" type="text/css" href="${relativePath}/style/maven_ns4_only.css" media="screen"/>');
  -              }
  -            </x:element>
  -        -->
  -        <link rel="stylesheet" type="text/css" href="${relativePath}/style/print.css" media="print"/>
  -        <meta http-equiv="Content-Type" content="text/html; charset=${outputencoding}"></meta>
  +
  +        <meta http-equiv="Content-Type" content="text/html; charset=${outputencoding}"/>
           <x:forEach var="author" select="./properties/author">
             <meta name="author" content="${author.text}"/>
             <meta name="email" content="${author.attribute('email').value}"/>
  @@ -88,7 +95,7 @@
                       <j:set var="image" value="${relativePath}${image}"/>
                     </j:if>
                     <a href="${home}">
  -                    <img src="${image}" align="left" alt="${pom.organization.name}" border="0"/>
  +                    <img src="${image}" align="left" alt="${pom.organization.name}" border="0" id="orgLogo"/>
                     </a>
                   </j:if>
                 </td>
  @@ -105,7 +112,7 @@
                       </j:if>
   
                       <a href="${pom.url}">
  -                      <img src="${image}" align="right" alt="${pom.name}" border="0"/>
  +                      <img src="${image}" align="right" alt="${pom.name}" border="0" id="projctLogo"/>
                       </a>
                     </j:if>
                   </div>
  @@ -141,13 +148,13 @@
             </table>
           </div>
           <!-- Body of the page -->
  -        <table border="0" cellspacing="0" cellpadding="8" width="100%"> <!--id="main" -->
  +        <table border="0" cellspacing="0" cellpadding="8" width="100%" id="layout">
             <tr valign="top">
  -            <td id="leftcol" width="${maven.ui.navcol.width}">
  -              <div id="navcolumn">
  +            <td id="leftColumn" width="${maven.ui.navcol.width}">
  +              <div id="navBox">
                   <j:if test="${date == 'navigation-top'}">
  -                  <div>
  -                    <small>Last published: ${build.date}</small>
  +                  <div id="lastPublished">
  +                    Last published: ${build.date}
                     </div>
                   </j:if>
   
  @@ -165,21 +172,21 @@
                   <j:set var="poweredbyurl">${maven.xdoc.poweredby.url}</j:set>
                   <j:if test="${!empty(poweredbyimage)}">
                   	<div style="margin-top: 20px; width: 100%; text-align: center;">
  -                		<a href="${poweredbyurl}" title="${poweredbytitle}"><img alt="${maven.xdoc.poweredby.title}" style="border: 1px solid black" src="${relativePath}/images/logos/${poweredbyimage}"/></a>
  +                		<a href="${poweredbyurl}" title="${poweredbytitle}"><img id="poweredBy" alt="${maven.xdoc.poweredby.title}" src="${relativePath}/images/logos/${poweredbyimage}"/></a>
                   	</div>
                   </j:if>
                 
                   <j:if test="${date == 'navigation-bottom'}">
  -                  <div>
  -                    <small>Last published: ${build.date}</small>
  +                  <div id="lastPublished">
  +                    Last published: ${build.date}
                     </div>
                   </j:if>
                 </div>
               </td>
               <td rowspan="2">
  -              <div id="bodycol">
  +              <div id="bodyColumn">
                   <!-- Insert MAIN body here -->
  -                <div class="app">
  +                <div class="contentBox">
                     <!-- FIXME really shouldn't use $doc, but jelly loses it's context again -->
                     <jsl:applyTemplates select="$doc/document/body/section"/>
                     <jsl:applyTemplates select="$doc/document/body/glossary" />
  @@ -233,7 +240,7 @@
     <!-- Process a menu for the navigation bar -->
     <jsl:template match="menu" trim="false">
       <div class="navSection">
  -      <strong><x:expr select="@name"/></strong>
  +      <div class="navSectionHead"><x:expr select="@name"/></div>
         <jsl:applyTemplates select="item"/>
       </div>
     </jsl:template>
  @@ -312,31 +319,37 @@
   
     <!-- process a documentation section -->
     <jsl:template match="section" trim="false">
  -    <div class="h3">
  +    <div class="section">
         <j:set var="_sectionName"><x:expr select="@name"/></j:set>
         <j:if test="${!empty(_sectionName)}">
  -        <h3>
  -          <a name="${_sectionName}">${_sectionName}</a>
  -        </h3>
  +          <div class="sectionTitle"><a name="${_sectionName}">${_sectionName}</a></div>
         </j:if>
         <jsl:applyTemplates select="*"/>
       </div>
     </jsl:template>
   
     <jsl:template match="subsection" trim="false">
  -    <div class="h4">
  +    <div class="subsection">
  +      <j:set var="_sectionName"><x:expr select="@name"/></j:set>
  +      <j:if test="${!empty(_sectionName)}">
  +          <div class="subsectionTitle"><a name="${_sectionName}">${_sectionName}</a></div>
  +      </j:if>
  +      <jsl:applyTemplates select="*"/>
  +    </div>
  +  </jsl:template>
  +
  +  <jsl:template match="subsubsection" trim="false">
  +    <div class="subsubsection">
         <j:set var="_sectionName"><x:expr select="@name"/></j:set>
         <j:if test="${!empty(_sectionName)}">
  -        <h4>
  -          <a name="${_sectionName}">${_sectionName}</a>
  -        </h4>
  +          <div class="subsubsectionTitle"><a name="${_sectionName}">${_sectionName}</a></div>
         </j:if>
         <jsl:applyTemplates select="*"/>
       </div>
     </jsl:template>
   
     <jsl:template match="source" trim="false">
  -    <div id="source">
  +    <div class="source">
         <pre><x:expr select="."/></pre>
       </div>
     </jsl:template>
  @@ -351,7 +364,10 @@
   
     <jsl:template match="table" trim="false">
       <j:set var="rowcount" value="0"/>
  +<!--
       <table cellpadding="3" cellspacing="2" border="1" width="100%">
  +-->
  +    <table class="bodyTable">
         <jsl:applyTemplates select="*"/>
       </table>
     </jsl:template>
  
  
  
  1.9       +69 -4     maven-plugins/xdoc/src/plugin-resources/css/maven.css
  
  Index: maven.css
  ===================================================================
  RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-resources/css/maven.css,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- maven.css	10 Dec 2003 15:50:27 -0000	1.8
  +++ maven.css	11 Dec 2003 02:40:21 -0000	1.9
  @@ -1,7 +1,11 @@
  +
   body {
  - background: @UI_BODY_BACKGROUND@;
  - color: @UI_BODY_FOREGROUND@;
  - }
  +  background: @UI_BODY_BACKGROUND@;
  +  color: @UI_BODY_FOREGROUND@;
  +  font-family: Verdana, Helvetica, Arial, sans-serif;
  +  margin-top: 0px;
  +  padding-top: 0px;
  +}
   
   /*
   .app h3 {
  @@ -23,15 +27,71 @@
     /* margin-left: -10px; */
   }
   
  +a {
  +  text-decoration: none;
  +}
  +
  +a:link.selfref, a:visited.selfref {
  +  color: @UI_HREF_LINK@ !important;
  +}
  +
  +a:link, a:visited {
  +  color: @UI_HREF_LINK@;
  +}
  +
  +a:active, a:hover {
  +  color: @UI_HREF_LINK_ACTIVE@;
  +  border-top: 1px solid @UI_HREF_LINK_ACTIVE@;
  +  border-bottom: 1px solid @UI_HREF_LINK_ACTIVE@;
  +}
  +
  +#banner {
  +  margin-top: 0px;
  +  padding-top: 0px;
  +  border-bottom: 1px solid @UI_BANNER_BORDER_BOTTOM@;
  +}
  +
  +#lastPublished {
  +  font-size: small;
  +}
  +
   .navSection {
  -  padding-bottom: 8px;
  +  margin-bottom: 8px;
  +  padding: 8px;
  +  border: 1px solid @UI_NAVCOL_FOREGROUND@
  +}
  +
  +.navSectionHead {
  +  font-weight: bold;
  +  font-size: x-small;
  +  border-bottom: 1px solid @UI_NAVCOL_FOREGROUND@;
   }
   
   .navLink {
     padding-top: 2px;
     padding-bottom: 2px;
  +  font-size: small;
  +}
  +
  +.section {
  +  padding: 4px;
  +}
  +
  +.sectionTitle {
  +  border: 1px solid black;
  +  padding: 4px;
   }
   
  +.subsection {
  +  padding: 4px;
  +}
  +
  +.subsectionTitle {
  +  border: 1px solid black;
  +  padding: 4px;
  +}
  +
  +
   .app h3 a
   {
     font-weight: normal;
  @@ -57,10 +117,12 @@
    color: @UI_TABLE_HEADER_FOREGROUND@;
    }
   
  +/*
   div#banner {
    border-top: 1px solid @UI_BANNER_BORDER_TOP@;
    border-bottom: 1px solid @UI_BANNER_BORDER_BOTTOM@;
    }
  +*/
   
   #banner, #banner td { 
    background: @UI_BANNER_BACKGROUND@;
  @@ -88,6 +150,7 @@
    color: @UI_BREADCRUMBS_FOREGROUND@;
    border-top: 1px solid @UI_BREADCRUMBS_BORDER_TOP@;
    border-bottom: 1px solid @UI_BREADCRUMBS_BORDER_BOTTOM@;
  + font-size: small;
    }
   
   #source {
  @@ -111,6 +174,7 @@
    color: inherit !important;
    }
   
  +/*
   a:link, #breadcrumbs a:visited, #navcolumn a:visited, .app a:visited, .tasknav a:visited {
    color: @UI_HREF_LINK@;
    }
  @@ -122,6 +186,7 @@
   a:link.selfref, a:visited.selfref {
    color: @UI_HREF_LINK_SELFREF@ !important;
    }
  +*/
   
   h3, h4 {
    margin-top: 1em;
  
  
  
  1.1                  maven-plugins/xdoc/src/plugin-resources/css/maven-base.css
  
  Index: maven-base.css
  ===================================================================
  
  body {
    margin: 0px;
    padding-top: 0px;
  }
  
  #banner {
    margin-top: 0px;
    padding-top: 0px;
  }
  
  #lastPublished {
    font-size: small;
  }
  
  .navSection {
    margin-bottom: 8px;
    padding: 8px;
  }
  
  .navSectionHead {
    font-weight: bold;
    font-size: x-small;
  }
  
  .navLink {
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: small;
  }
  
  .section {
    padding: 4px;
  }
  
  .sectionTitle {
    padding: 4px;
  }
  
  .subsection {
    padding: 4px;
  }
  
  .subsectionTitle {
    padding: 4px;
  }
  
  #leftColumn {
  }
  
  #navBox {
  }
  
  #rightColun {
  
  }
  
  #contentBox {
  
  }
  
  #footer {
    font-size: small;
  }
  
  #breadcrumbs {
   font-size: small;
   margin: 0pt;
  }
  
  #source {
   margin-right: 7px;
   margin-left: 7px;
   margin-top: 1em;
   }
  
  img.handle {
   border: 0;
   padding-right: 2px;
  }
  
  #poweredBy {
    border: 1px solid black;
  }
  
  
  
  1.1                  maven-plugins/xdoc/src/plugin-resources/css/maven-theme.css
  
  Index: maven-theme.css
  ===================================================================
  
  body {
    font-family: Verdana, Helvetica, Arial, sans-serif;
    margin: 0;
  }
  
  a {
    text-decoration: none;
  }
  
  a:link.selfref, a:visited.selfref {
    color: blue; !important;
  }
  
  a:link, a:visited {
    color: blue;
  }
  
  a:active, a:hover {
    color: #990000;
  }
  
  #breadcrumbs {
    border-top: 1px solid #aaaaaa;
    border-bottom: 1px solid #aaaaaa;
    background-color: #cccccc;
  }
  
  .navSection {
    background-color: #eeeeee;
  }
  
  .navSectionHead {
    border-bottom: 1px solid #aaaaaa;
  }
  
  .navLink {
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: small;
    padding-left: 14px;
  }
  
  .section {
  }
  
  .sectionTitle {
    padding: 10px;
    border: 1px solid #999999;
    color: #990000;
    font-weight: bold;
    font-size: larger;
    background-color: #dddddd;
  }
  
  .subsection {
    padding-left: 20px;
  }
  
  .subsectionTitle {
    padding: 6px;
    border: 1px solid #999999;
    color: #990000;
    background-color: #eeeeee;
  }
  
  p {
    line-height: 1.3em;
  }
  
  ul, ol {
    margin-left: 20px;
    font-size: smaller;
  }
  
  li {
    padding-top: 2px;
    padding-bottom: 2px;
  }
  
  #leftColumn {
    border-right: 1px solid #999999;
    border-bottom: 1px solid #999999;
    background-color: #eeeeee;
  }
  
  #navBox {
  }
  
  #rightColun {
  
  }
  
  #contentBox {
  
  }
  
  table.bodyTable {
    width: 100%;
  }
  
  table.bodyTable th, table.bodyTable td {
    border: 1px solid #999999;
    font-size: smaller;
  }
  
  table.bodyTable th {
    background-color: #cccccc;
    text-align: left;
  }
  
  table.bodyTable td {
    padding-left: 2px;
    padding-right: 2px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  
  table.bodyTable tr.a {
    background-color: #dddddd;
  }
  
  table.bodyTable tr.b {
    background-color: #eeeeee;
  }
  
  .source {
    padding: 12px;
    margin: 12px;
    border: 1px solid #999999;
  }
  
  .source pre {
    margin: 0px;
    padding: 0px;
  }
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org