Changeset 8532


Ignore:
Timestamp:
2004-11-12T15:29:18+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/classic/transform
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/web/interfaces/classic/transform/about.xsl

    r7831 r8532  
    1414  <xsl:output method="html"/> 
    1515
    16   <xsl:template name="pageHead">
    17     <head>
    18       <title><xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/><xsl:text> </xsl:text></title>
    19     </head>
    20     <xsl:call-template name="headScript"/>
     16  <xsl:template name="pageTitle">
     17    <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/> 
    2118  </xsl:template>
     19
     20  <!-- page specific style goes here -->
     21  <xsl:template name="pageStyle"/>
     22
    2223
    2324  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/classic/transform/classifier.xsl

    r7831 r8532  
    1212  <xsl:output method="html"/> 
    1313
    14   <xsl:template name="pageHead">
    15     <head>
    16       <title><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/></title>
    17     <xsl:call-template name="headScript"/>
    18     </head>
     14  <xsl:template name="pageTitle">
     15    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/>
    1916  </xsl:template>
     17
     18  <!-- page specific style goes here -->
     19  <xsl:template name="pageStyle"/>
     20
    2021
    2122  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/classic/transform/help.xsl

    r7831 r8532  
    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, 'help')"/></title>
    18     </head>
    19     <xsl:call-template name="headScript"/>
     15  <xsl:template name="pageTitle">
     16    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help')"/>
    2017  </xsl:template>
     18
     19  <!-- page specific style goes here -->
     20  <xsl:template name="pageStyle"/>
     21
    2122
    2223  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/classic/transform/home.xsl

    r8054 r8532  
    1212  <xsl:output method="html"/> 
    1313
    14   <xsl:template name="pageHead">
    15     <head>
    16       <title>
    17     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
    18       </title>
    19     </head>
     14  <xsl:template name="pageTitle">
     15    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
    2016  </xsl:template>
    2117 
     18  <!-- page specific style goes here -->
     19  <xsl:template name="pageStyle"/>
     20
     21
    2222  <xsl:template match="pageResponse">
    2323    <xsl:call-template name="greenstonePageBanner"/>
  • trunk/gsdl3/web/interfaces/classic/transform/pref.xsl

    r7831 r8532  
    99  <xsl:include href="style.xsl"/>
    1010  <!--<xsl:include href="pref-text.xsl"/>-->
    11   <xsl:include href="page-common.xsl"/>
     11  <!--<xsl:include href="page-common.xsl"/>-->
    1212 
    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"/>
     15  <xsl:template name="pageTitle">
     16    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref')"/>
    2017  </xsl:template>
     18
     19  <!-- page specific style goes here -->
     20  <xsl:template name="pageStyle"/>
     21
    2122
    2223  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/classic/transform/query.xsl

    r7831 r8532  
    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"/>
     22
    2223
    2324  <xsl:template match="pageResponse">
  • trunk/gsdl3/web/interfaces/classic/transform/style.xsl

    r7831 r8532  
    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   -->
     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>
    7852 
    7953  <xsl:template name="greenstonePageBanner">
     
    9064      <td align="right">
    9165        <table>
    92           <tr><td xsl:use-attribute-sets="td-brownbutton">
    93           <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=home">
    94             <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')"/>
    9569          </a>
    9670        </td></tr></table>
     
    134108      <table cellspacing='4'>
    135109        <tr>
    136           <td xsl:use-attribute-sets="td-brownbutton">
    137         <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=home">
    138           <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')"/>
    139113        </a>
    140114          </td>
    141115<!--          <xsl:choose>
    142116        <xsl:when test="$pageType='help'">
    143           <td xsl:use-attribute-sets="td-brownbutton-off">
    144             <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')"/>
    145119          </td>
    146120        </xsl:when>
    147121        <xsl:otherwise>
    148           <td xsl:use-attribute-sets="td-brownbutton">
    149             <a style="text-decoration:none" href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}">
    150               <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')"/>
    151125            </a>
    152126          </td>
     
    155129          <xsl:choose>
    156130        <xsl:when test="$pageType='pref'">
    157           <td  xsl:use-attribute-sets="td-brownbutton-off">
    158             <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')"/>
    159133          </td>
    160134        </xsl:when>
    161135        <xsl:otherwise>
    162           <td xsl:use-attribute-sets="td-brownbutton">
    163             <a title="xxpref" style="text-decoration:none" href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}">
    164               <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')"/>
    165139            </a>
    166140          </td>
     
    199173      <tr>
    200174    <xsl:if test="$this-element/serviceList/service[@type='query']">
    201       <td xsl:use-attribute-sets="td-navbar">       
    202175        <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    203       </td>
    204176    </xsl:if>
    205177   
    206178    <xsl:for-each select="$classifiers/classifier">
    207       <td xsl:use-attribute-sets="td-navbar">
    208         <xsl:apply-templates select="." mode="navbar">
    209           <xsl:with-param name="collName" select="$collName"/>
    210           <xsl:with-param name="clTop" select="$clTop"/>
    211         </xsl:apply-templates>
    212       </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>
    213183    </xsl:for-each>
    214184   
    215185    <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
    216       <td xsl:use-attribute-sets="td-navbar">
    217         <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    218       </td>
     186      <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    219187    </xsl:if>
    220188      </tr>
     
    225193    <xsl:param name="collName"/>
    226194    <xsl:choose>
    227       <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>
    228198      <xsl:otherwise>
    229199    <xsl:variable name="service">
     
    236206    </xsl:variable>
    237207   
    238     <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>
    239209      </xsl:otherwise>
    240210    </xsl:choose>
     
    244214    <xsl:param name="collName"/>
    245215    <xsl:choose>
    246       <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>
    247219      <xsl:otherwise>
    248     <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>
    249221      </xsl:otherwise>
    250222    </xsl:choose>
     
    256228    <xsl:choose>
    257229      <xsl:when test="/page/pageRequest/@action='b' and $clTop=@name">
    258     <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>
    259232      <xsl:otherwise>
    260     <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>
    261234      </xsl:otherwise>
    262235    </xsl:choose>
     
    269242  </xsl:template>
    270243 
    271   <xsl:attribute-set name="body-style">
     244 <!-- <xsl:attribute-set name="body-style">
    272245    <xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
    273246    <xsl:attribute name="text">#000000</xsl:attribute>
     
    278251  </xsl:attribute-set>
    279252
    280   <xsl:attribute-set name="td-brownbutton">
     253  <xsl:attribute-set name="td-gsbutton">
    281254    <xsl:attribute name='background'>interfaces/default/images/brownbutton.gif</xsl:attribute>
    282255    <xsl:attribute name='height'>20</xsl:attribute>
     
    285258  </xsl:attribute-set>
    286259 
    287   <xsl:attribute-set name="td-brownbutton-off">
     260  <xsl:attribute-set name="td-gsbutton-off">
    288261    <xsl:attribute name='background'>interfaces/default/images/greenbar.gif</xsl:attribute>
    289262    <xsl:attribute name='height'>20</xsl:attribute>
     
    297270    <xsl:attribute name='align'>center</xsl:attribute>
    298271  </xsl:attribute-set>
    299 
     272-->
    300273  <xsl:template name="nzdlPageBanner">
    301274    <center>
Note: See TracChangeset for help on using the changeset viewer.