forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: rev 22274 - in forrest/trunk/src/core/context: resources/schema/dtd skins/common skins/common/xslt/html skins/krysalis-site skins/krysalis-site/css skins/krysalis-site/xslt/html
Date Tue, 29 Jun 2004 20:22:33 GMT
Author: thorsten
Date: Tue Jun 29 13:22:31 2004
New Revision: 22274

Modified:
   forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06-2.dtd
   forrest/trunk/src/core/context/skins/common/skinconf.xsl
   forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl
   forrest/trunk/src/core/context/skins/krysalis-site/css/forrest.css.xslt
   forrest/trunk/src/core/context/skins/krysalis-site/css/page.css
   forrest/trunk/src/core/context/skins/krysalis-site/skinconf.xsl
   forrest/trunk/src/core/context/skins/krysalis-site/xslt/html/site2xhtml.xsl
Log:
>> - desactivate the font size script
>
> I would prefer not to, it's an important part for accessibility.

...I had to because of the feedback in lenya-dev, so I started to patch the skinconf.xsl:

I added
<!-- If true, the font size script will not be rendered -->
<xsl:if test="not(disable-font-script)">
 <disable-font-script>true</disable-font-script>
</xsl:if>

Then I added to site2xhtml.xsl
<!-- If true, the font size script will not be rendered -->
  <xsl:variable name="disable-font-script" select="//skinconfig/disable-font-script"/>

The above mentioned patches where in skin/common.

Then I patched the site2xhtml.xsl of the krysalis-site like this:
<xsl:if test="$disable-font-script = 'false'">
            Font size:
              &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;"
title="Reset text" class="resetfont" value="Reset"/>
              &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;"
title="Shrink text" class="smallerfont" value="-a"/>
              &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;"
title="Enlarge text" class="biggerfont" value="+a"/>
</xsl:if>

Last but not least I declared the disable-font-script element in the skinconf.dtd to use it
like follow in my skinconf.xml
<!-- If true, the font size script will not be rendered -->
  <disable-font-script>true</disable-font-script> 

>> - move the right logo to absolute right (if no search box is activated)
>
>
>
> Sure.
>

I reckon a <xsl:choose/> within the document2xhtml.xsl would do the job:
- if the search box is disabled the colspan of the right logo would be +1 and align="right".
- if the search box is disabled the <td> of the searchbox column would not be displayed.
- if the search box is enabled the old style is applied. 

>> - desactivate the published notice on the top right
->now change color of published notice with
    <color name="published" value="#000000"/>

thorsten


Modified: forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06-2.dtd
==============================================================================
--- forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06-2.dtd	(original)
+++ forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06-2.dtd	Tue Jun 29 13:22:31
2004
@@ -39,7 +39,7 @@
 
   <!ELEMENT skinconfig (search?, disable-print-link?, disable-pdf-link?, 
    disable-xml-link?, disable-external-link-image?, 
-   disable-compliance-links?, obfuscate-mail-links?, 
+   disable-compliance-links?, obfuscate-mail-links?, disable-font-script?,
    project-name?, project-description?, project-url?, project-logo,
    group-name?, group-description?, group-url?, group-logo?,
    host-url?, host-logo?, favicon-url?, year?, vendor?, copyright-link?, trail?, 
@@ -56,6 +56,7 @@
   <!ELEMENT disable-external-link-image (#PCDATA)>
   <!ELEMENT disable-compliance-links (#PCDATA)>
   <!ELEMENT obfuscate-mail-links (#PCDATA)>
+  <!ELEMENT disable-font-script (#PCDATA)>
   <!ELEMENT project-name (#PCDATA)>
   <!ELEMENT project-description (#PCDATA)>
   <!ELEMENT project-url (#PCDATA)>

Modified: forrest/trunk/src/core/context/skins/common/skinconf.xsl
==============================================================================
--- forrest/trunk/src/core/context/skins/common/skinconf.xsl	(original)
+++ forrest/trunk/src/core/context/skins/common/skinconf.xsl	Tue Jun 29 13:22:31 2004
@@ -36,7 +36,9 @@
      <xsl:if test="not(obfuscate-mail-links)">     
        <obfuscate-mail-links>true</obfuscate-mail-links>
      </xsl:if>
-
+     <xsl:if test="not(disable-font-script)">     
+       <disable-font-script>true</disable-font-script>
+     </xsl:if>
      <!--
      <xsl:if test="not(project-name)">     
        <project-name>MyProject</project-name>

Modified: forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl
==============================================================================
--- forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl	(original)
+++ forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl	Tue Jun 29 13:22:31
2004
@@ -76,6 +76,8 @@
 
   <!-- Whether to obfuscate email links -->
   <xsl:variable name="obfuscate-mail-links" select="//skinconfig/obfuscate-mail-links"/>
+ <!-- If true, the font size script will not be rendered -->  
+  <xsl:variable name="disable-font-script" select="//skinconfig/disable-font-script"/>
   <!-- If true, an the images on all external links will not be added -->
   <xsl:variable name="disable-external-link-image" select="//skinconfig/disable-external-link-image"/>
 
   <xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>

Modified: forrest/trunk/src/core/context/skins/krysalis-site/css/forrest.css.xslt
==============================================================================
--- forrest/trunk/src/core/context/skins/krysalis-site/css/forrest.css.xslt	(original)
+++ forrest/trunk/src/core/context/skins/krysalis-site/css/forrest.css.xslt	Tue Jun 29 13:22:31
2004
@@ -65,6 +65,10 @@
 .subheading { background-color: <xsl:value-of select="@value"/>;} 
 </xsl:template> 
 
+<xsl:template match="color[@name='published']">
+.published { color: <xsl:value-of select="@value"/>;}
+</xsl:template> 
+
 <xsl:template match="color[@name='navstrip']">
 .subborder      { color: <xsl:value-of select="@font"/>;
                   background-color: <xsl:value-of select="@value"/>;}

Modified: forrest/trunk/src/core/context/skins/krysalis-site/css/page.css
==============================================================================
--- forrest/trunk/src/core/context/skins/krysalis-site/css/page.css	(original)
+++ forrest/trunk/src/core/context/skins/krysalis-site/css/page.css	Tue Jun 29 13:22:31 2004
@@ -71,7 +71,7 @@
         margin: 0px; 
         font-size : 70%;      
         border-right: 1px solid;
-	border-left: 1px solid;
+		border-left: 1px solid;
 }
 
 .menutitle { 
@@ -157,7 +157,9 @@
 }
 
 .bottomborder { height:10px; }
-    
+
+.published { color: #000000;}
+   
 /* ==================== tabs ============================ */
 
 .tab.separator { width:6px; }
@@ -173,20 +175,20 @@
 
 .level2tab { font-size : 80%; font-weight: normal; height: 10px;}
 
-.tab a:link {  font-weight: normal;}
+.tab a:link {  font-weight: normal; }
 .tab a:visited { font-weight: normal; }
 .tab a:active { font-weight: normal; }
 .tab a:hover {  font-weight: normal; }
 
-.tab.selected  a:link {  font-weight: bold;}
+.tab.selected  a:link {  font-weight: bold; }
 .tab.selected  a:visited { font-weight: bold; }
 .tab.selected  a:active { font-weight: bold; }
 .tab.selected  a:hover {  font-weight: bold; }
 
 /* ==================== snail trail ============================ */
 
-.trail { font-size: 70%;  }
-.trail a:link {  font-weight: normal;}
+.trail { font-size: 70%; }
+.trail a:link {  font-weight: normal; }
 .trail a:visited {  font-weight: normal; }
 .trail a:active {  font-weight: normal; }
 .trail a:hover {  font-weight: normal; }

Modified: forrest/trunk/src/core/context/skins/krysalis-site/skinconf.xsl
==============================================================================
--- forrest/trunk/src/core/context/skins/krysalis-site/skinconf.xsl	(original)
+++ forrest/trunk/src/core/context/skins/krysalis-site/skinconf.xsl	Tue Jun 29 13:22:31 2004
@@ -30,6 +30,7 @@
 
     <color name="heading" value="#a5b6c6"/>
     <color name="subheading" value="#CFDCED"/>
+    <color name="published" value="#000000"/>
         
     <color name="navstrip" value="#CFDCED" font="#000000" link="#000000" vlink="#000000"
hlink="#000000"/>
     <color name="toolbox" value="#a5b6c6"/>
@@ -73,7 +74,7 @@
      </xsl:if>  
      <xsl:if test="not(color[@name='tab-unselected'])">
       <color name="tab-unselected" value="#F7F7F7"  link="#000000" vlink="#000000" hlink="#000000"/>
-     </xsl:if>  
+     </xsl:if>
      <xsl:if test="not(color[@name='subtab-selected'])">
       <color name="subtab-selected" value="#a5b6c6"  link="#000000" vlink="#000000" hlink="#000000"/>
      </xsl:if>  
@@ -85,7 +86,10 @@
      </xsl:if>  
      <xsl:if test="not(color[@name='subheading'])">
       <color name="subheading" value="#CFDCED"/>
-     </xsl:if>  
+     </xsl:if>
+     <xsl:if test="not(color[@name='published'])">
+        <color name="published" value="#ffffff"/>
+     </xsl:if> 
      <xsl:if test="not(color[@name='navstrip'])">
       <color name="navstrip" value="#CFDCED" font="#000000" link="#000000" vlink="#000000"
hlink="#000000"/>
      </xsl:if>  

Modified: forrest/trunk/src/core/context/skins/krysalis-site/xslt/html/site2xhtml.xsl
==============================================================================
--- forrest/trunk/src/core/context/skins/krysalis-site/xslt/html/site2xhtml.xsl	(original)
+++ forrest/trunk/src/core/context/skins/krysalis-site/xslt/html/site2xhtml.xsl	Tue Jun 29
13:22:31 2004
@@ -54,8 +54,8 @@
         <script type="text/javascript" language="javascript" src="{$root}skin/menu.js"></script>
       </head>
       <body onload="init()" >
-        <script type="text/javascript">ndeSetTextSize();</script>
 
+        <script type="text/javascript">ndeSetTextSize();</script>
         <!--
           +=========================+
           |       topstrip          |
@@ -105,7 +105,9 @@
             </div>
         </td>
         <!-- ( ================= Project Logo ================== ) -->
-        <td align="center" >
+	<xsl:choose>
+      <xsl:when test="$config/search and not($config/search/@box-location = 'alt')">
+        <td align="center" >   
          <div class="headerlogo">
           <xsl:call-template name="renderlogo">
             <xsl:with-param name="name" select="//skinconfig/project-name"/>
@@ -115,9 +117,25 @@
           </xsl:call-template>
           </div>
         </td>
-        <!-- ( =================  Search ================== ) -->
+      </xsl:when>
+      <xsl:otherwise>
+      	<td align="right" colspan="3" valign="bottom"> 
+      	<div class="headerlogo right">
+          <xsl:call-template name="renderlogo">
+            <xsl:with-param name="name" select="//skinconfig/project-name"/>
+            <xsl:with-param name="url" select="//skinconfig/project-url"/>
+            <xsl:with-param name="logo" select="//skinconfig/project-logo"/>
+            <xsl:with-param name="root" select="$root"/>
+          </xsl:call-template>
+          </div>
+        </td>
+     </xsl:otherwise>
+      </xsl:choose>
+      <xsl:choose>
+	      <xsl:when test="$config/search and not($config/search/@box-location = 'alt')">
+	      	        <!-- ( =================  Search ================== ) -->
         <td class="search" align="right" rowspan="2" valign="top">
-          <xsl:if test="$config/search and not($config/search/@box-location = 'alt')">
+         
 	    <xsl:choose>
               <xsl:when test="$config/search/@provider = 'lucene'">
                 <!-- Lucene search -->
@@ -193,12 +211,14 @@
 		</form>
 	      </xsl:otherwise>
 	    </xsl:choose>
-          </xsl:if>
         </td>
-
         <td align="right" width="10" height="10">
           <span class="textheader"><xsl:value-of select="//skinconfig/project-name"/></span>
         </td>
+	      </xsl:when>
+      </xsl:choose>
+      
+
       </tr>
       <!-- ( ================= Tabs ================== ) -->
       <tr>
@@ -211,9 +231,10 @@
           <xsl:apply-templates select="table[@class='level2tab']"/>
         </td>
         <td colspan="2" class="datenote level2tabstrip">
+        <div class="published">
            <script language="JavaScript" type="text/javascript"><![CDATA[<!--
               document.write("Published: " + document.lastModified);
-              //  -->]]></script>
+              //  -->]]></script></div>
         </td>
       </tr>
     </table>
@@ -492,13 +513,15 @@
 	      <!-- ============ Breadcrumbs =========== -->
           <td class="subborder trail">
 	         &#160;<xsl:call-template name="breadcrumbs"/>&#160;
-	      </td>
+          </td>
 	      <!-- ============ Page font settings =========== -->
 	      <td class="subborder trail" align="right" nowrap="true">
+	       <xsl:if test="$disable-font-script = 'false'">
 	        Font size: 
 	          &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;"
title="Reset text" class="resetfont" value="Reset"/>      
 	          &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;"
title="Shrink text" class="smallerfont" value="-a"/>
 	          &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;"
title="Enlarge text" class="biggerfont" value="+a"/>
+           </xsl:if>
           </td>
 	    </tr>
 

Mime
View raw message