You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/05/26 12:09:55 UTC

svn commit: rev 20457 - in avalon/trunk/central/system/themes/avalon2/html: . resources

Author: niclas
Date: Wed May 26 03:09:54 2004
New Revision: 20457

Modified:
   avalon/trunk/central/system/themes/avalon2/html/nav-aggregate.xsl
   avalon/trunk/central/system/themes/avalon2/html/resources/style.css
   avalon/trunk/central/system/themes/avalon2/html/transform.xsl
Log:
Fixes in the theme.

Modified: avalon/trunk/central/system/themes/avalon2/html/nav-aggregate.xsl
==============================================================================
--- avalon/trunk/central/system/themes/avalon2/html/nav-aggregate.xsl	(original)
+++ avalon/trunk/central/system/themes/avalon2/html/nav-aggregate.xsl	Wed May 26 03:09:54 2004
@@ -3,8 +3,10 @@
     version="1.0" 
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xml:lang="en" 
-    lang="en"
 >
+  <xsl:param name="directory" />
+  <xsl:param name="file" />
+  <xsl:param name="fullpath" />
   <xsl:template match="project" >
     <project>
       <xsl:apply-templates />  
@@ -44,10 +46,38 @@
   </xsl:template>
 
   <xsl:template match="item" >
-      <xsl:copy-of select="." />
+    <item>
+      <xsl:choose>
+        <!-- Contains index.html and a directory -->
+        <xsl:when test="contains( @href, 'index.html') and contains( @href, '/')" >
+          <xsl:attribute name="href"><xsl:value-of select="substring-before( @href, 'index.html' ) " /></xsl:attribute>
+          <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute>
+          <xsl:if test="contains( $fullpath, substring-before( @href, 'index.html' ) )" >
+            <xsl:attribute name="selected">true</xsl:attribute>
+          </xsl:if>
+        </xsl:when>
+        <!-- Contains an html file without a directory -->
+        <xsl:when test="contains( @href, '.html') and not( contains( @href, '/') )" >
+          <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute>
+          <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute>
+        </xsl:when>
+        <!-- Contains a directory without file -->
+        <xsl:when test="contains( @href, 'index.html') and contains( @href, '/')" >
+          <xsl:attribute name="href"><xsl:value-of select="substring-before( @href, 'index.html' ) " /></xsl:attribute>
+          <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute>
+          <xsl:if test="contains( $fullpath, substring-before( @href, 'index.html' ) )" >
+            <xsl:attribute name="selected">true</xsl:attribute>
+          </xsl:if>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="href"><xsl:value-of select="substring-before( @href, 'index.html' ) " /></xsl:attribute>
+          <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute>
+          <xsl:if test="contains( $fullpath, @href)" >
+            <xsl:attribute name="selected">true</xsl:attribute>
+          </xsl:if>
+        </xsl:otherwise>
+      </xsl:choose>
+    </item>
   </xsl:template>
   
 </xsl:stylesheet> 
-
-
-

Modified: avalon/trunk/central/system/themes/avalon2/html/resources/style.css
==============================================================================
--- avalon/trunk/central/system/themes/avalon2/html/resources/style.css	(original)
+++ avalon/trunk/central/system/themes/avalon2/html/resources/style.css	Wed May 26 03:09:54 2004
@@ -79,6 +79,17 @@
     padding-right: 6px;
 }
 
+.homecategory-selected
+{
+    float:left;
+    margin-left: 1em;
+    font-size: 8pt;
+    padding-top: 4px;
+    padding-bottom: 4px;
+    padding-left: 6px;
+    padding-right: 6px;
+}
+
 .category
 {
     float: right;
@@ -92,20 +103,13 @@
 
 .category-selected
 {
-    position: relative;
-    top: 0.5em;
+    float: right;
     margin-right: 1em;
     font-size: 8pt;
     padding-top: 4px;
     padding-bottom: 4px;
     padding-left: 6px;
     padding-right: 6px;
-    color: white;
-    background-color: #9999FF;
-    border-left: 1px solid #003399;
-    border-top: 1px solid #003399;
-    border-right: 1px solid white;
-    border-bottom: 1px solid white;
 }
 
 .menubar
@@ -129,10 +133,30 @@
 {
     display: block;
     width: 100%;
-    padding-left: 2em;
-    padding-right: 2em;
-    padding-top: 0.25em;
-    padding-bottom: 0.25em;
+    padding-left: 1em;
+    padding-right: 1em;
+    margin-left: 1em;
+    margin-right: 1em;
+    padding-top: 0.2em;
+    padding-bottom: 0.2em;
+    margin-top: 2px;
+    margin-bottom: 2px;
+}
+
+.menuitem-selected
+{
+    display: block;
+    width: 100%;
+    padding-left: 1em;
+    padding-right: 1em;
+    margin-left: 1em;
+    margin-right: 1em;
+    padding-top: 0.2em;
+    padding-bottom: 0.2em;
+    margin-top: 2px;
+    margin-bottom: 2px;
+    background-color: #9999FF;
+    color: black;
 }
 
 .content
@@ -189,6 +213,11 @@
     display: none;
 }
 
+.dummy
+{
+    display: none;
+}
+
 pre.source
 {
     padding: 1em;
@@ -298,6 +327,68 @@
 }
 
 a.menuitem:focus
+{
+    color: black;
+    outline: none;
+}
+
+/********************************/
+a.category-selected:link:hover, a.category-selected:visited:hover, a.category-selected:active,
+a.homecategory-selected:link:hover, a.homecategory-selected:visited:hover, a.homecategory-selected:active
+{
+    color: black;
+    background-color: #9999FF;
+    text-decoration: underline;
+}
+
+a.category-selected:active, 
+a.homecategory-selected:active
+{
+    color: black;
+    background-color: #9999FF;
+    border-left: 1px solid #003399;
+    border-top: 1px solid #003399;
+    border-right: 1px solid #9999FF;
+    border-bottom: 1px solid #9999FF;
+    outline: none;
+    text-decoration: underline;
+}
+
+a.category-selected:link, a.category-selected:visited, 
+a.homecategory-selected:link, a.homecategory-selected:visited
+{
+    background-color: #666699;
+    color: white;
+    text-decoration: underline;
+}
+
+a.category-selected:focus, 
+a.homecategory-selected:focus
+{
+    outline: none;
+}
+
+a.menuitem-selected:link:hover, a.menuitem-selected:visited:hover, a.menuitem-selected:active
+{
+    color: black;
+    background-color: #9999FF;
+}
+
+a.menuitem-selected:active
+{
+    color: black;
+    background-color: #9999FF;
+    outline: none;
+}
+
+a.menuitem-selected:link, a.menuitem-selected:visited
+{
+    background-color: #9999FF;
+    color: black;
+    text-decoration: none;
+}
+
+a.menuitem-selected:focus
 {
     color: black;
     outline: none;

Modified: avalon/trunk/central/system/themes/avalon2/html/transform.xsl
==============================================================================
--- avalon/trunk/central/system/themes/avalon2/html/transform.xsl	(original)
+++ avalon/trunk/central/system/themes/avalon2/html/transform.xsl	Wed May 26 03:09:54 2004
@@ -5,6 +5,10 @@
     xmlns="http://www.w3.org/1999/xhtml" 
     xml:lang="en" 
 >
+  <xsl:param name="directory" />
+  <xsl:param name="file" />
+  <xsl:param name="fullpath" />
+  
   <xsl:template match="document">
     <html>
     <head>
@@ -16,6 +20,9 @@
       <link rel="stylesheet" type="text/css">
         <xsl:attribute name="href"><xsl:value-of select="$x[position() = last()]" />resources/style.css</xsl:attribute>
       </link>
+      <meta name="directory"><xsl:value-of select="$directory" /></meta>
+      <meta name="file"><xsl:value-of select="$file" /></meta>
+      <meta name="fullpath"><xsl:value-of select="$fullpath" /></meta>
     </head>
       <xsl:apply-templates select="body" />
     </html>    
@@ -67,6 +74,7 @@
       </div>
       
       <div class="menubar" >
+        <span class="dummy" />
         <xsl:apply-templates select="document('navigation.xml', / )/project/body/menu" >
           <xsl:with-param name="dir" select="''" />
         </xsl:apply-templates>
@@ -115,32 +123,20 @@
     </div>
   </xsl:template>
   
-  <xsl:template match="p">
-    <p>
-      <xsl:apply-templates />
-    </p>
-  </xsl:template>
-  
   <xsl:template match="menu">
     <xsl:param name="dir" />
     <xsl:choose>
       <xsl:when test="count( menu ) = 0" >
           <xsl:apply-templates select="menu" >
             <xsl:with-param name="dir" select="concat( $dir, '../')" />
-          </xsl:apply-templates>
-        <!--
-        <div class="menu">
-          <xsl:apply-templates select="item" >
-            <xsl:with-param name="dir" select="$dir" />
           </xsl:apply-templates>
-        </div>
-        -->
       </xsl:when>
       <xsl:otherwise>
         <div class="menu">
           <xsl:apply-templates select="menu" >
             <xsl:with-param name="dir" select="concat( $dir, '../')" />
           </xsl:apply-templates>
+          <span class="dummy" />
           <xsl:apply-templates select="item" >
             <xsl:with-param name="dir" select="$dir" />
           </xsl:apply-templates>
@@ -153,9 +149,23 @@
     <xsl:param name="dir" />
     <xsl:param name="class" select="'menuitem'" />
     <a>
-      <xsl:attribute name="class"><xsl:value-of select="$class" /></xsl:attribute>
+      <xsl:choose>
+        <xsl:when test="@selected = true() or contains( $file, @href )" >
+          <xsl:attribute name="class"><xsl:value-of select="$class" />-selected</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="class"><xsl:value-of select="$class" /></xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
       <xsl:attribute name="href">      
-        <xsl:value-of select="concat( $dir, @href )" />
+        <xsl:choose>
+          <xsl:when test="contains( @href, '.html' )" >
+            <xsl:value-of select="concat( $dir, @href )" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="concat( concat( $dir, @href ), 'index.html')" />
+          </xsl:otherwise>
+        </xsl:choose>
       </xsl:attribute>
       <xsl:value-of select="@name" />
     </a>
@@ -171,13 +181,6 @@
     <span class="legal"><xsl:value-of select="." /></span>
   </xsl:template>
   
-  <!-- Table generation  -->
-  <xsl:template match="table" >
-    <table>
-      <xsl:apply-templates />
-    </table>
-  </xsl:template>
-  
   <xsl:template match="tr" >
     <tr>
       <xsl:attribute name="row" >
@@ -191,40 +194,17 @@
     </tr>
   </xsl:template>
   
-  <xsl:template match="th" >
-    <th>
-      <xsl:apply-templates />
-    </th>
-  </xsl:template>
-  
-  <xsl:template match="td" >
-    <td>
-      <xsl:apply-templates />
-    </td>
-  </xsl:template>
-  
-  <!-- Inlines -->
-  <xsl:template match="strong" >
-    <strong>
-      <xsl:apply-templates />
-    </strong>
-  </xsl:template>
-  
-  <xsl:template match="em" >
-    <em>
-      <xsl:apply-templates />
-    </em>
-  </xsl:template>
-  
-  
   <!-- Create a box to be used for searching the site on Google. -->
   <xsl:template match="search" >
       <div class="search" >
       </div>
   </xsl:template>
 
-    
+  <xsl:template match="*" >
+    <xsl:copy>
+      <xsl:copy-of select="@*" />
+      <xsl:apply-templates />
+    </xsl:copy>
+  </xsl:template>
+      
 </xsl:stylesheet> 
-
-
-

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org