Changeset 8534


Ignore:
Timestamp:
2004-11-12T16:09:52+13:00 (19 years ago)
Author:
kjdon
Message:

tidied up the style stuff - now uses css. pageHead is now defined by style, with pageTitle and pageStyle in each page. got rid of the attribute sets and colors in style - uses css instead.

Location:
trunk/gsdl3/web/interfaces/nzdl/transform
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/web/interfaces/nzdl/transform/applet.xsl

    r5411 r8534  
    1111  <xsl:output method="html"/> 
    1212
    13   <xsl:template name="pageHead">
    14     <head>
    15       <title>
    16     <xsl:value-of select="pageResponse/service/applet"/>
    17       </title>
    18     </head>
     13  <xsl:template name="pageTitle">
     14    <xsl:value-of select="pageResponse/service/applet"/>
    1915  </xsl:template>
     16
     17  <!-- page specific style goes here -->
     18  <xsl:template name="pageStyle"/>
    2019
    2120  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/nzdl/transform/gsdl.xsl

    r6685 r8534  
    1414  <xsl:output method="html"/> 
    1515
    16  <xsl:template name="pageHead">
    17     <head>
    18       <title><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/></title>
    19     </head>
    20     <xsl:call-template name="headScript"/>
     16 <xsl:template name="pageTitle">
     17    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/>
    2118  </xsl:template>
     19
     20  <!-- page specific style goes here -->
     21  <xsl:template name="pageStyle"/>
    2222
    2323  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/nzdl/transform/home.xsl

    r6683 r8534  
    1313  <xsl:output method="html"/> 
    1414
    15   <xsl:template name="pageHead">
    16     <head>
    17       <title>
    18     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/>
    19       </title>
    20       <xsl:call-template name="headScript"/>
    21     </head>
    22   </xsl:template>
     15  <xsl:template name="pageTitle">
     16    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/>
     17  </xsl:template>
     18
     19  <!-- page specific style goes here -->
     20  <xsl:template name="pageStyle"/>
    2321
    2422  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/nzdl/transform/pref.xsl

    r6686 r8534  
    1313  <xsl:output method="html"/> 
    1414 
    15   <xsl:template name="pageHead">
    16     <head>
    17       <title><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref')"/></title>
    18     </head>
    19     <xsl:call-template name="headScript"/>
    20   </xsl:template>
     15  <xsl:template name="pageTitle">
     16    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref')"/>  </xsl:template>
     17
     18  <!-- page specific style goes here -->
     19  <xsl:template name="pageStyle"/>
    2120
    2221  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/nzdl/transform/style.xsl

    r6688 r8534  
    1111  <xsl:param name="library_name"/>
    1212
    13   <!-- some global variables -->
    14   <xsl:variable name="colour-button-text">#345437</xsl:variable>
    15   <xsl:variable name="colour-navbar-link-text">#345437</xsl:variable>
    16   <xsl:variable name="colour-navbar-selected-text">#c6aa69</xsl:variable>
    17 
    1813  <!-- the main page layout template is here -->
    1914  <xsl:template match="page">
    2015    <html>
    2116      <xsl:call-template name="pageHead"/>
    22       <body xsl:use-attribute-sets="body-style">
     17      <body>
    2318    <table border="0" cellspacing="0" cellpadding="0" width="100%">
    2419      <td valign="top" width="65">
     
    4035  </xsl:template>
    4136 
    42   <!-- any global java script should go in here -->
    43   <xsl:template name="headScript">
    44   </xsl:template>
    45  
    46   <!-- the old javascript for rollover images -->
    47   <!--
    48   <xsl:template name="headScript">
    49     <script>
    50       <xsl:text disable-output-escaping="yes">
    51     &lt;!
    52     var loaded = new Array();
    53     function gbutton (image, onimage) {
    54     if (image &amp;&amp; image.src &amp;&amp; (image.out == null || typeof(image.out) == typeof(void(0)))) {
    55     s = image.src;
    56     image.out = new Image();
    57     image.out.src = s;
    58     image.over = new Image();
    59     image.over.src = onimage;
    60     loaded[image.name] = image;
    61     }
    62     }
    63      
    64     function roll (imagename, over) {
    65     if (document.images) {
    66     if (over) i = "over";
    67     else i = "out";
    68     image = loaded[imagename];
    69     if (image) image.src = eval("image."+i+".src");
    70     }
    71     }
    72     //&gt;
    73      </xsl:text>
    74      
    75     </script>
    76   </xsl:template>
    77   -->
    78  
     37  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     38  <xsl:template name="pageHead">
     39    <head>
     40      <title>
     41    <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     42      </title>
     43      <xsl:call-template name="globalStyle"/>
     44      <xsl:call-template name="pageStyle"/>
     45    </head>
     46  </xsl:template>
     47
     48  <!-- any global style stuff should go in here -->
     49  <xsl:template name="globalStyle">
     50    <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>
     51  </xsl:template>
     52 
     53  <xsl:template name="greenstonePageBanner">
     54    <center><img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute></img></center>
     55    <xsl:call-template name="dividerBar"/>
     56  </xsl:template>
     57
    7958  <xsl:template name="genericPageBanner">
    8059    <xsl:param name='text'/>
     
    8564      <td align="right">
    8665        <table>
    87           <tr><td xsl:use-attribute-sets="td-brownbutton">
    88           <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=home">
    89             <b><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/></font></b>
     66          <tr><td class="gsbutton">
     67          <a class="gsbutton" href="{$library_name}?a=p&amp;sa=home">
     68            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
    9069          </a>
    9170        </td></tr></table>
     
    129108      <table cellspacing='4'>
    130109        <tr>
    131           <td xsl:use-attribute-sets="td-brownbutton">
    132         <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=home">
    133           <b><small><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/></font></small></b>
     110          <td class="gsbutton">
     111        <a class="gsbutton" href="{$library_name}?a=p&amp;sa=home">
     112          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
    134113        </a>
    135114          </td>
    136115<!--          <xsl:choose>
    137116        <xsl:when test="$pageType='help'">
    138           <td xsl:use-attribute-sets="td-brownbutton-off">
    139             <b><small><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></font></small></b>
     117          <td class="gsbuttonoff">
     118            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    140119          </td>
    141120        </xsl:when>
    142121        <xsl:otherwise>
    143           <td xsl:use-attribute-sets="td-brownbutton">
    144             <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}">
    145               <b><small><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></font></small></b>
     122          <td class="gsbutton">
     123            <a class="gsbutton" href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}">
     124              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    146125            </a>
    147126          </td>
     
    150129          <xsl:choose>
    151130        <xsl:when test="$pageType='pref'">
    152           <td  xsl:use-attribute-sets="td-brownbutton-off">
    153             <b><small><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></font></small></b>
     131          <td class="gsbuttonoff">
     132            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    154133          </td>
    155134        </xsl:when>
    156135        <xsl:otherwise>
    157           <td xsl:use-attribute-sets="td-brownbutton">
    158             <a title="xxpref" style="text-decoration:none" href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}">
    159               <b><small><font color='{$colour-button-text}'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></font></small></b>
     136          <td class="gsbutton">
     137            <a class="gsbutton" title="xxpref" href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}">
     138              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    160139            </a>
    161140          </td>
     
    194173      <tr>
    195174    <xsl:if test="$this-element/serviceList/service[@type='query']">
    196       <td xsl:use-attribute-sets="td-navbar">       
    197175        <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    198       </td>
    199176    </xsl:if>
    200177   
    201178    <xsl:for-each select="$classifiers/classifier">
    202       <td xsl:use-attribute-sets="td-navbar">
    203         <xsl:apply-templates select="." mode="navbar">
    204           <xsl:with-param name="collName" select="$collName"/>
    205           <xsl:with-param name="clTop" select="$clTop"/>
    206         </xsl:apply-templates>
    207       </td>
     179      <xsl:apply-templates select="." mode="navbar">
     180        <xsl:with-param name="collName" select="$collName"/>
     181        <xsl:with-param name="clTop" select="$clTop"/>
     182      </xsl:apply-templates>
    208183    </xsl:for-each>
    209184   
    210185    <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
    211       <td xsl:use-attribute-sets="td-navbar">
    212         <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    213       </td>
     186      <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    214187    </xsl:if>
    215188      </tr>
     
    220193    <xsl:param name="collName"/>
    221194    <xsl:choose>
    222       <xsl:when test="/page/pageRequest/@action='q'"><b><nobr><font size='+1' color='{$colour-navbar-selected-text}'>search</font></nobr></b></xsl:when>
     195      <xsl:when test="/page/pageRequest/@action='q'">     
     196    <td class="navbaroff"><nobr>search</nobr></td>
     197      </xsl:when>
    223198      <xsl:otherwise>
    224199    <xsl:variable name="service">
     
    231206    </xsl:variable>
    232207   
    233     <a style="text-decoration:none" href="{$library_name}?a=q&amp;rt=d&amp;s={$service}&amp;c={$collName}"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name=$service]/displayItem[@name='description']"/></xsl:attribute><b><nobr><font size='+1' color='{$colour-navbar-link-text}'>search</font></nobr></b></a>
     208    <td class="navbar"><a class="navbar" href="{$library_name}?a=q&amp;rt=d&amp;s={$service}&amp;c={$collName}"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name=$service]/displayItem[@name='description']"/></xsl:attribute><nobr>search</nobr></a></td>
    234209      </xsl:otherwise>
    235210    </xsl:choose>
     
    239214    <xsl:param name="collName"/>
    240215    <xsl:choose>
    241       <xsl:when test="/page/pageRequest/paramList/param[@name='s']/@value='PhindApplet'"><b><nobr><font size='+1' color='{$colour-navbar-selected-text}'>phrases</font></nobr></b></xsl:when>
     216      <xsl:when test="/page/pageRequest/paramList/param[@name='s']/@value='PhindApplet'">
     217    <td class="navbaroff"><nobr>phrases</nobr></td>
     218      </xsl:when>
    242219      <xsl:otherwise>
    243     <a style="text-decoration:none" href="{$library_name}?a=a&amp;rt=d&amp;s=PhindApplet&amp;c={$collName}"><xsl:if test="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"/></xsl:attribute></xsl:if><b><nobr><font size='+1' color='{$colour-navbar-link-text}'>phrases</font></nobr></b></a>
     220    <td class="navbar"><a class="navbar" href="{$library_name}?a=a&amp;rt=d&amp;s=PhindApplet&amp;c={$collName}"><xsl:if test="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"/></xsl:attribute></xsl:if><nobr>phrases</nobr></a></td>
    244221      </xsl:otherwise>
    245222    </xsl:choose>
     
    251228    <xsl:choose>
    252229      <xsl:when test="/page/pageRequest/@action='b' and $clTop=@name">
    253     <b><nobr><font size='+1' color='{$colour-navbar-selected-text}'><xsl:value-of select="displayItem[@name='name']"/></font></nobr></b></xsl:when>
     230    <td class="navbaroff"><nobr><xsl:value-of select="displayItem[@name='name']"/></nobr></td>
     231      </xsl:when>
    254232      <xsl:otherwise>
    255     <a style="text-decoration:none" href="{$library_name}?a=b&amp;rt=r&amp;s=ClassifierBrowse&amp;c={$collName}&amp;cl={@name}"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute><b><nobr><font size='+1' color='{$colour-navbar-link-text}'><xsl:value-of select="displayItem[@name='name']"/></font></nobr></b></a>
     233    <td class="navbar"><a class="navbar" href="{$library_name}?a=b&amp;rt=r&amp;s=ClassifierBrowse&amp;c={$collName}&amp;cl={@name}"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute><nobr><xsl:value-of select="displayItem[@name='name']"/></nobr></a></td>
    256234      </xsl:otherwise>
    257235    </xsl:choose>
     
    264242  </xsl:template>
    265243 
    266   <xsl:attribute-set name="body-style">
    267     <xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
    268     <xsl:attribute name="text">#000000</xsl:attribute>
    269     <xsl:attribute name="link">#006666</xsl:attribute>
    270     <xsl:attribute name="alink">#cc9900</xsl:attribute>
    271     <xsl:attribute name="vlink">#666633</xsl:attribute>
    272     <xsl:attribute name="background">interfaces/default/images/chalk.gif</xsl:attribute>
    273   </xsl:attribute-set>
    274 
    275   <xsl:attribute-set name="td-brownbutton">
    276     <xsl:attribute name='background'>interfaces/default/images/brownbutton.gif</xsl:attribute>
    277     <xsl:attribute name='height'>20</xsl:attribute>
    278     <xsl:attribute name='align'>center</xsl:attribute>
    279     <xsl:attribute name='valign'>bottom</xsl:attribute>
    280   </xsl:attribute-set>
    281  
    282   <xsl:attribute-set name="td-brownbutton-off">
    283     <xsl:attribute name='background'>interfaces/default/images/greenbar.gif</xsl:attribute>
    284     <xsl:attribute name='height'>20</xsl:attribute>
    285     <xsl:attribute name='align'>center</xsl:attribute>
    286   <xsl:attribute name='valign'>bottom</xsl:attribute>   
    287   </xsl:attribute-set>
    288  
    289   <xsl:attribute-set name="td-navbar">
    290     <xsl:attribute name='background'>interfaces/default/images/greenbar.gif</xsl:attribute>
    291     <xsl:attribute name='height'>20</xsl:attribute>
    292     <xsl:attribute name='align'>center</xsl:attribute>
    293   </xsl:attribute-set>
    294 
    295244  <xsl:template name="nzdlPageBanner">
    296245    <center>
Note: See TracChangeset for help on using the changeset viewer.