forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/resources/skins/krysalis-site/xslt/html site2xhtml.xsl tab2menu.xsl
Date Mon, 24 Mar 2003 17:58:57 GMT
nicolaken    2003/03/24 09:58:56

  Modified:    src/resources/skins/krysalis-site/xslt/html site2xhtml.xsl
                        tab2menu.xsl
  Added:       src/resources/skins/krysalis-site/scripts fontsize.js
  Log:
        <action dev="NKB" type="add" context="skins">
         On krysalis skin: users can select font size, reworked left-bar inclusion
         of page section titles, made them only one level deep, moved buttons after
         the left navbar, added publish date on top right navbar.
         For both Forrest and krysalis skins, added single background pixel line below
         unselected tabs and made selected tab more prominent.
        </action>
  
  Revision  Changes    Path
  1.1                  xml-forrest/src/resources/skins/krysalis-site/scripts/fontsize.js
  
  Index: fontsize.js
  ===================================================================
  function init() 
  { 
    ndeSetTextSize();
  }
  
  function checkBrowser(){
    if (!document.getElementsByTagName){
      return true;
    }
    else{
      return false;
    }
  }
  
  
  function ndeSetTextSize(chgsize,rs) 
  {
    var startSize;
    var newSize;
  
    if (!checkBrowser)
    {
      return;
    }
  
    startSize = parseInt(ndeGetDocTextSize());
  
    if (!startSize)
    {
      startSize = 16;
    }
  
    switch (chgsize)
    {
    case 'incr':
      newSize = startSize + 2;
      break;
  
    case 'decr':
      newSize = startSize - 2;
      break;
  
    case 'reset':
      if (rs) {newSize = rs;} else {newSize = 16;}
      break;
  
    default:
      try{
        newSize = parseInt(ndeReadCookie("nde-textsize"));
      }
      catch(e){
        alert(e);
      }
      
      if (!newSize || newSize == 'NaN')
      {
        newSize = startSize;
      }
      break;
  
    }
  
    if (newSize < 10) 
    {
      newSize = 10;
    }
  
    newSize += 'px';
  
    document.getElementsByTagName('html')[0].style.fontSize = newSize;
    document.getElementsByTagName('body')[0].style.fontSize = newSize;
  
    ndeCreateCookie("nde-textsize", newSize, 365);
  }
  
  function ndeGetDocTextSize() 
  {
    if (!checkBrowser)
    {
      return 0;
    }
  
    var size = 0;
    var body = document.getElementsByTagName('body')[0];
  
    if (body.style && body.style.fontSize)
    {
      size = body.style.fontSize;
    }
    else if (typeof(getComputedStyle) != 'undefined')
    {
      size = getComputedStyle(body,'').getPropertyValue('font-size');
    }
    else if (body.currentStyle)
    {
      size = body.currentStyle.fontSize;
    }
    return size;
  }
  
  
  
  function ndeCreateCookie(name,value,days) 
  {
    var cookie = name + "=" + value + ";";
  
    if (days) 
    {
      var date = new Date();
      date.setTime(date.getTime()+(days*24*60*60*1000));
      cookie += " expires=" + date.toGMTString() + ";";
    }
    cookie += " path=/";
  
    document.cookie = cookie;
  
  }
  
  function ndeReadCookie(name) 
  {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
  
   
    for(var i = 0; i < ca.length; i++) 
    {
      var c = ca[i];
      while (c.charAt(0) == ' ') 
      {
        c = c.substring(1, c.length);
      }
  
      ctest = c.substring(0,name.length);
   
      if(ctest == name){
        return c.substring(nameEQ.length,c.length);
      }
    }
    return null;
  }
  
  
  
  1.11      +68 -13    xml-forrest/src/resources/skins/krysalis-site/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/krysalis-site/xslt/html/site2xhtml.xsl,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- site2xhtml.xsl	11 Feb 2003 14:19:06 -0000	1.10
  +++ site2xhtml.xsl	24 Mar 2003 17:58:56 -0000	1.11
  @@ -34,8 +34,9 @@
         <head>
           <title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
           <link rel="stylesheet" href="{$root}skin/page.css" type="text/css"/>
  +        <script type="text/javascript" language="javascript" src="{$root}skin/fontsize.js"></script>
         </head>
  -      <body bgcolor="#FFFFFF" text="#000000">
  +      <body bgcolor="#FFFFFF" text="#000000" onload="init()">
   
           <!-- ================================= top bar with logo's and search box ===================================
 -->
   
  @@ -125,7 +126,12 @@
               <td bgcolor="{$header-color}"><img src="{$spacer}" height="1" width="1"
alt="" /></td>
             </tr>
             <tr>
  -            <td colspan="4" bgcolor="{$header-color2}"><img src="{$spacer}" alt=""
height="10" width="1" /></td>
  +            <td colspan="4" bgcolor="{$header-color2}" align="right">
  +               <img src="{$spacer}" alt="" height="10" width="1" />
  +               <span class="datenote"><script language="JavaScript" type="text/javascript"><![CDATA[<!--
  +                  document.write("Published: " + document.lastModified);
  +                  //  -->]]></script></span>
  +            </td>
             </tr>
           </table>
           <xsl:comment>================= end Banner ==================</xsl:comment>
  @@ -174,6 +180,40 @@
                   <tr>
                     <td bgcolor="{$header-color2}" height="1"><img src="{$spacer}"
alt="" height="1" width="1" /></td>
                   </tr>
  +                <tr>
  +                  <td height="5"><img src="{$spacer}" alt="" height="5" width="1"
/></td>
  +                </tr>                
  +        
  +                
  +              <xsl:if test="$filename = 'index.html' and $config/credits">
  +                <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
  +                  <xsl:variable name="name" select="name"/>
  +                  <xsl:variable name="url" select="url"/>
  +                  <xsl:variable name="image" select="image"/>
  +                  <xsl:variable name="width" select="width"/>
  +                  <xsl:variable name="height" select="height"/>
  +                  <tr>
  +                    <td height="5"><img src="{$spacer}" alt="" height="5" width="1"
/></td>
  +                  </tr> 
  +                  <tr> 
  +                  <td><img src="{$spacer}" alt="" height="1" width="1" /></td>
  +                  <td colspan="4" height="5">
  +                  <a href="{$url}">
  +                    <img alt="{$name} logo" border="0">
  +                      <xsl:attribute name="src">
  +                        <xsl:if test="not(starts-with($image, 'http://'))"><xsl:value-of
select="$root"/></xsl:if>
  +                        <xsl:value-of select="$image"/>
  +                      </xsl:attribute>
  +                      <xsl:if test="$width"><xsl:attribute name="width"><xsl:value-of
select="$width"/></xsl:attribute></xsl:if>
  +                      <xsl:if test="$height"><xsl:attribute name="height"><xsl:value-of
select="$height"/></xsl:attribute></xsl:if>
  +                    </img>
  +                    <img src="{$spacer}" border="0" alt="" width="5" height="1" />
  +                  </a>
  +                  </td>
  +                  </tr> 
  +                </xsl:for-each>
  +              </xsl:if>
  +              
                 </table>
               </td>
   
  @@ -181,9 +221,12 @@
                 <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="content">
   
                   <xsl:comment>================= start middle NavBar ==================</xsl:comment>
  -                <tr><td bgcolor="{$header-color2}" colspan="4"><img src="{$spacer}"
alt="" height="1" width="10" /></td></tr>
  +                <tr><td bgcolor="{$header-color2}" colspan="3"><img src="{$spacer}"
alt="" height="1" width="10" /></td></tr>
                   <tr>
                     <td bgcolor="{$background-bars}" width="10" align="left"><img
src="{$spacer}" alt="" height="1" width="10" /></td>
  +                  <td width="100%" bgcolor="{$background-bars}">
  +                  <table cellspacing="0" cellpadding="0" border="0" width="100%" >
  +                  <tr>
                     <td bgcolor="{$background-bars}" width="50%" align="left">
                       <!-- ============ Page number =========== -->
                       <span class="trail">
  @@ -195,13 +238,20 @@
                     </td>
                     <td bgcolor="{$background-bars}" width="50%" align="right">
                       <!-- ============ Page navigation =========== -->
  -                    <font face="Arial, Helvetica, Sans-serif" size="3" color="{$menu-border}">
  -                      &#160;
  -                      <!-- <b>&#171; prev&#160;&#160;<font size="4">[3]</font>&#160;&#160;next
&#187;</b> -->
  -                    </font>
  +                      <span class="trail">Font size: 
  +                                 &#160;<a href="javascript:void(0);" onclick="ndeSetTextSize('decr');
return false;" title="Shrink text" class="ui">&#8211;</a>
  +                                 &#160;<a href="javascript:void(0);" onclick="ndeSetTextSize('incr');
return false;" title="Enlarge text" class="ui">+</a>
  +                                 &#160;<a href="javascript:void(0);" onclick="ndeSetTextSize('reset');
return false;" title="Reset text" class="ui">R</a>
  +                      
  +                    </span>
                       <img src="{$spacer}" alt="" height="8" width="10" />
                     </td>
  -                  <td bgcolor="#CFDCED" width="10"><img src="{$spacer}" alt=""
height="1" width="10" /></td>
  +                  </tr>
  +                  </table>
  +                  </td>
  +                  <td bgcolor="#CFDCED" width="10">
  +                    <font face="Arial, Helvetica, Sans-serif" size="4" color="{$menu-border}">&#160;</font>
  +                    <img src="{$spacer}" alt="" height="1" width="10" /></td>
                   </tr>
                   <tr><td bgcolor="{$header-color2}" colspan="4"><img src="{$spacer}"
alt="" height="1" width="10" /></td></tr>
                   <xsl:comment>================= end middle NavBar ==================</xsl:comment>
  @@ -258,7 +308,8 @@
               <td class="logos" bgcolor="{$header-color2}" align="right" nowrap="nowrap">
   
                 <xsl:call-template name="compliancy-logos"/>
  -
  +              <!-- old place where to put credits icons-->
  +              <!--
                 <xsl:if test="$filename = 'index.html' and $config/credits">
                   <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
                     <xsl:variable name="name" select="name"/>
  @@ -279,6 +330,7 @@
                     </a>
                   </xsl:for-each>
                 </xsl:if>
  +              -->
               </td>
             </tr>
           </table>
  @@ -300,7 +352,7 @@
               <xsl:when test="span/@class='sel'">
                 <li>
                   <span class="sel"><xsl:value-of select="span" /></span>
  -                <xsl:if test="//toc/tocc"> <i>
  +                <xsl:if test="//toc/tocc"> <div class="page">
                       <ul>
                         <xsl:for-each select = "//toc/tocc">
                           <li>
  @@ -314,6 +366,8 @@
                             </xsl:choose>
   
                             <xsl:if test="toc2/tocc">
  +                          <!-- nicolaken: this enables double-nested page links-->
  +                          <!--
                               <ul>
                                 <xsl:for-each select = "toc2/tocc">
   
  @@ -327,11 +381,12 @@
                                   </xsl:choose>
   
                                 </xsl:for-each>
  -                            </ul>
  +                            </ul> 
  +                            -->
                             </xsl:if>
                           </li>
                         </xsl:for-each>
  -                  </ul></i>
  +                  </ul></div>
                   </xsl:if>
                 </li>
               </xsl:when>
  
  
  
  1.4       +5 -7      xml-forrest/src/resources/skins/krysalis-site/xslt/html/tab2menu.xsl
  
  Index: tab2menu.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/krysalis-site/xslt/html/tab2menu.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tab2menu.xsl	11 Feb 2003 14:19:06 -0000	1.3
  +++ tab2menu.xsl	24 Mar 2003 17:58:56 -0000	1.4
  @@ -54,7 +54,6 @@
         <table cellspacing="0" cellpadding="0" border="0" summary="selected tab">
           <tr>
             <td class="top-left" height="22"></td>
  -
             <td bgcolor="#a5b6c6" valign="middle" height="22">
               <span class="tab">
                 <b>
  @@ -62,7 +61,6 @@
                 </b>
               </span>
             </td>
  -
             <td class="top-right" height="22"></td>
           </tr>
         </table>
  @@ -73,18 +71,18 @@
       <td valign="bottom">
         <table cellspacing="0" cellpadding="0" border="0" summary="non selected tab">
           <tr>
  -
             <td class="top-left-tab" height="18"></td>
  -
             <td bgcolor="#cedfef" valign="middle" height="18">
               <span class="tab">
                 <xsl:call-template name="base-not-selected"/>
               </span>              
             </td>
  -
             <td class="top-right-tab" height="18"></td>
  -
           </tr>
  +        <tr>
  +          <td height="1" colspan="3">
  +          </td>
  +        </tr>     
         </table>
       </td>
     </xsl:template>
  
  
  

Mime
View raw message