You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/06/01 22:48:49 UTC

cvs commit: jakarta-commons/commons-build commons-site.jsl

dirkv       2004/06/01 13:48:49

  Modified:    commons-build commons-site.jsl
  Log:
  switch to small logo if window is smaller then 850pix
  
  Revision  Changes    Path
  1.10      +26 -1     jakarta-commons/commons-build/commons-site.jsl
  
  Index: commons-site.jsl
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/commons-build/commons-site.jsl,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- commons-site.jsl	4 Apr 2004 20:16:03 -0000	1.9
  +++ commons-site.jsl	1 Jun 2004 20:48:49 -0000	1.10
  @@ -120,7 +120,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 name="organization-logo" src="${image}" align="left" alt="${pom.organization.name}" border="0"/>
                     </a>
                   </j:if>
                 </td>
  @@ -145,6 +145,31 @@
               </tr>
             </table>
           </div>
  +
  +<x:element name="script"><x:attribute name="type">text/javascript</x:attribute>
  +<x:comment><![CDATA[
  +  var myWidth = 0, myHeight = 0;
  +  if( typeof( window.innerWidth ) == 'number' ) {
  +    //Non-IE
  +    myWidth = window.innerWidth;
  +    myHeight = window.innerHeight;
  +  } else if( document.documentElement &&
  +      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
  +    //IE 6+ in 'standards compliant mode'
  +    myWidth = document.documentElement.clientWidth;
  +    myHeight = document.documentElement.clientHeight;
  +  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
  +    //IE 4 compatible
  +    myWidth = document.body.clientWidth;
  +    myHeight = document.body.clientHeight;
  +  }
  +  // window.alert( 'Width = ' + myWidth );
  +  if (myWidth < 850) {
  +    document['organization-logo'].src='http://jakarta.apache.org/images/original-jakarta-logo.gif';
  +  }
  +]]>// </x:comment>
  +</x:element>
  +
           <div id="breadcrumbs">
             <table border="0" cellspacing="0" cellpadding="4" width="100%">
               <tr>
  
  
  

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