Changeset 35c4fa3


Ignore:
Timestamp:
05/15/2004 12:27:17 AM (20 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Children:
20e2a65
Parents:
1b9d582
Message:

Navigational links: Back again to table layout for version 5.1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/b5_1/BOOK@3588 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
stylesheets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs.css

    r1b9d582 r35c4fa3  
    44  font-family: verdana, tahoma, helvetica, arial, sans-serif;
    55  text-align: left;
     6  background: #fff;
    67}
    78
    89.toc ul, .index ul {
    910        list-style: none;
    10 }
    11 
    12 .navheader, .navfooter {
    13   font-size: smaller;
    14   text-align: center;
    15 }
    16 
    17 .headerlinks {
    18   border-bottom : solid 2px green;
    19   padding-bottom: 0.5em;
    20 }
    21 
    22 .navfooter {
    23   border-top : solid 2px green;
    24   padding-top: 0.5em;
    25   margin-top: 0.5em;
    26 }
    27 
    28 .prev {
    29    float     : left;
    30    text-align: left;
    31    /* border    : solid 1px #ddd; */
    32    padding-left: 2em;
    33 }
    34 
    35 .next {
    36    float     : right;
    37    text-align: right;
    38    /* border    : solid 1px #0dd; */
    39    padding-right: 2em;
    40 }
    41 
    42 .up {
    43    /* border : solid 1px #ff0; */
    44    width  : 10em;
    45    /* background-color: #bbb; */
    46    margin: 0px auto;
    4711}
    4812
  • stylesheets/xhtml/lfs-navigational.xsl

    r1b9d582 r35c4fa3  
    2727    <xsl:if test="$row and $home != .">
    2828      <div class="navheader">
    29         <xsl:if test="$home != .">
    30           <div class="headertitles">
    31             <p>
    32               <xsl:apply-templates select="$home" mode="object.title.markup"/>
    33               <xsl:text> - </xsl:text>
    34               <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
    35             </p>
    36             <xsl:if test="$up != $home">
    37               <p><b>
    38                 <xsl:apply-templates select="$up" mode="object.title.markup"/>
    39               </b></p>
    40             </xsl:if>
    41           </div>
    42         </xsl:if>
    43         <div class="headerlinks">
    44           <xsl:if test="count($prev)&gt;0 and $prev != $home">
    45             <div class='prev'>
    46               <a accesskey="p">
    47                 <xsl:attribute name="href">
    48                   <xsl:call-template name="href.target">
    49                     <xsl:with-param name="object" select="$prev"/>
    50                   </xsl:call-template>
    51                 </xsl:attribute>
    52                 <xsl:text>Prev</xsl:text>
    53               </a>
    54             </div>
    55           </xsl:if>
    56           <xsl:if test="count($next)&gt;0">
    57             <div class='next'>
    58               <a accesskey="n">
    59                 <xsl:attribute name="href">
    60                   <xsl:call-template name="href.target">
    61                     <xsl:with-param name="object" select="$next"/>
    62                   </xsl:call-template>
    63                 </xsl:attribute>
    64                 <xsl:text>Next</xsl:text>
    65               </a>
    66             </div>
    67           </xsl:if>
    68           <div class='home'>
    69             <a accesskey="h">
    70               <xsl:attribute name="href">
    71                 <xsl:call-template name="href.target">
    72                   <xsl:with-param name="object" select="$home"/>
    73                 </xsl:call-template>
    74               </xsl:attribute>
    75               <xsl:text>Home</xsl:text>
    76             </a>
    77           </div>
    78         </div>
    79       </div>
    80     </xsl:if>
    81   </xsl:template>
    82 
    83         <!-- Footer Navigation-->
    84   <xsl:template name="footer.navigation">
    85     <xsl:param name="prev" select="/foo"/>
    86     <xsl:param name="next" select="/foo"/>
    87     <xsl:param name="nav.context"/>
    88     <xsl:variable name="home" select="/*[1]"/>
    89     <xsl:variable name="up" select="parent::*"/>
    90     <xsl:variable name="row" select="count($prev) &gt; 0 or count($up) &gt; 0
    91             or count($next) &gt; 0 or generate-id($home) != generate-id(.)"/>
    92     <xsl:if test="$row">
    93       <div class="navfooter">
    94           <xsl:if test="count($prev)&gt;0 and $prev != $home">
    95             <div class='prev'>
    96               <a accesskey="p">
    97                 <xsl:attribute name="href">
    98                   <xsl:call-template name="href.target">
    99                     <xsl:with-param name="object" select="$prev"/>
    100                   </xsl:call-template>
    101                 </xsl:attribute>
    102                 <xsl:text>Prev</xsl:text>
    103               </a><br/>
    104               <xsl:text> </xsl:text>
    105               <xsl:apply-templates select="$prev" mode="object.title.markup"/>
    106             </div>
    107           </xsl:if>
    108           <xsl:if test="count($next)&gt;0">
    109             <div class='next'>
    110               <a accesskey="n">
    111                 <xsl:attribute name="href">
    112                   <xsl:call-template name="href.target">
    113                     <xsl:with-param name="object" select="$next"/>
    114                   </xsl:call-template>
    115                 </xsl:attribute>
    116                 <xsl:text>Next</xsl:text>
    117               </a><br/>
    118               <xsl:text> </xsl:text>
    119               <xsl:apply-templates select="$next" mode="object.title.markup"/>
    120             </div>
    121           </xsl:if>
    122           <xsl:if test="count($up)&gt;0 and $up != $home">
    123             <div class='up'>
    124               <a accesskey="u">
    125                 <xsl:attribute name="href">
    126                   <xsl:call-template name="href.target">
    127                     <xsl:with-param name="object" select="$up"/>
    128                   </xsl:call-template>
    129                 </xsl:attribute>
    130                 <xsl:text>Up</xsl:text>
    131                </a>
    132                <xsl:if  test="$home != .">
    133                  <div class='home'>
    134                    <a accesskey="h">
    135                      <xsl:attribute name="href">
    136                        <xsl:call-template name="href.target">
    137                          <xsl:with-param name="object" select="$home"/>
    138                        </xsl:call-template>
    139                      </xsl:attribute>
    140                      <xsl:text>Home</xsl:text>
    141                    </a>
    142                  </div>
    143                </xsl:if>
    144             </div>
    145           </xsl:if>
    146       </div>
    147     </xsl:if>
    148   </xsl:template>
     29                                <xsl:if test="$home != .">
     30                                        <table width="100%" summary="Navigation header">
     31                                                <tr>
     32                                                        <th colspan="3" align="center">
     33                                                                <h4>
     34                                                                        <xsl:apply-templates select="$home" mode="object.title.markup"/>
     35                                                                        <xsl:text> - </xsl:text>
     36                  <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
     37                                                                </h4>
     38                                                        </th>
     39                                                </tr>
     40                                                <xsl:if test="$up != $home">
     41                                                        <tr>
     42                                                                <th colspan="3" align="center">
     43                                                                        <h3>
     44                                                                                <xsl:apply-templates select="$up" mode="object.title.markup"/>
     45                                                                        </h3>
     46                                                                </th>
     47                                                        </tr>
     48                                                </xsl:if>
     49                                                <tr>
     50                                                        <td width="33%" align="left">
     51                                                                <a accesskey="p">
     52                                                                        <xsl:attribute name="href">
     53                                                                                <xsl:call-template name="href.target">
     54                                                                                        <xsl:with-param name="object" select="$prev"/>
     55                                                                                </xsl:call-template>
     56                                                                        </xsl:attribute>
     57                                                                        <xsl:call-template name="navig.content">
     58                                                                                <xsl:with-param name="direction" select="'prev'"/>
     59                                                                        </xsl:call-template>
     60                                                                </a>
     61                                                                <xsl:text>&#160;</xsl:text>
     62                                                        </td>
     63                                                        <td width="34%" align="center">
     64                                                                <a accesskey="h">
     65                        <xsl:attribute name="href">
     66                                                                                <xsl:call-template name="href.target">
     67                                                                                        <xsl:with-param name="object" select="$home"/>
     68                                                                                </xsl:call-template>
     69                                                                        </xsl:attribute>
     70                                                                        <xsl:call-template name="navig.content">
     71                                                                                <xsl:with-param name="direction" select="'home'"/>
     72                                                                        </xsl:call-template>
     73                                                                </a>
     74                                                        </td>
     75                                                        <td width="33%" align="right">
     76                                                                <xsl:text>&#160;</xsl:text>
     77                                                                <xsl:if test="count($next)&gt;0">
     78                                                                        <a accesskey="n">
     79                                                                                <xsl:attribute name="href">
     80                                                                                        <xsl:call-template name="href.target">
     81                                                                                                <xsl:with-param name="object" select="$next"/>
     82                                                                                        </xsl:call-template>
     83                                                                                </xsl:attribute>
     84                                                                                <xsl:call-template name="navig.content">
     85                                                                                        <xsl:with-param name="direction" select="'next'"/>
     86                                                                                </xsl:call-template>
     87                                                                        </a>
     88                                                                </xsl:if>
     89                                                        </td>
     90                                                </tr>
     91                                        </table>
     92                                        <hr/>
     93                                </xsl:if>
     94                        </div>
     95                </xsl:if>
     96        </xsl:template>
    14997
    15098</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.