diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-05-19 20:16:58 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-05-19 20:16:58 +0000 |
commit | a9e89d0c26b67d4f4ad136be1f701665c7b04c72 (patch) | |
tree | dcb6fb3d304753460d6f275ac3e3d9b74a2896a2 /stylesheets/xhtml | |
parent | 28501c71298af5866445fa8c8dd6e71f61287271 (diff) |
HEAD: StyleSheets - unified the identation to use spaces.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3663 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/xhtml')
-rw-r--r-- | stylesheets/xhtml/lfs-admon.xsl | 8 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-index.xsl | 64 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-legalnotice.xsl | 4 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-mixed.xsl | 48 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-navigational.xsl | 24 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-titles.xsl | 2 | ||||
-rw-r--r-- | stylesheets/xhtml/lfs-toc.xsl | 10 |
7 files changed, 89 insertions, 71 deletions
diff --git a/stylesheets/xhtml/lfs-admon.xsl b/stylesheets/xhtml/lfs-admon.xsl index 490556def..db71bcdfd 100644 --- a/stylesheets/xhtml/lfs-admon.xsl +++ b/stylesheets/xhtml/lfs-admon.xsl @@ -4,12 +4,12 @@ xmlns="http://www.w3.org/1999/xhtml" version="1.0"> - <!-- Use graphics in admonitions --> + <!-- Use graphics in admonitions --> <xsl:param name="admon.graphics" select="1"/> <xsl:param name="admon.graphics.path">../images/</xsl:param> <xsl:param name="admon.graphics.extension" select="'.png'"/> - <!-- Changing the output tagging --> + <!-- Changing the output tagging --> <xsl:template name="graphical.admonition"> <xsl:variable name="admon.type"> <xsl:choose> @@ -22,7 +22,7 @@ </xsl:choose> </xsl:variable> <div class="admonition"> - <div class ="admonhead"> + <div class ="admonhead"> <img alt="[{$admon.type}]"> <xsl:attribute name="src"> <xsl:call-template name="admon.graphic"/> @@ -37,7 +37,7 @@ </h3> </div> <div class="admonbody"> - <xsl:apply-templates/> + <xsl:apply-templates/> </div> </div> </xsl:template> diff --git a/stylesheets/xhtml/lfs-index.xsl b/stylesheets/xhtml/lfs-index.xsl index 07c7bd7d4..4e9a43255 100644 --- a/stylesheets/xhtml/lfs-index.xsl +++ b/stylesheets/xhtml/lfs-index.xsl @@ -20,51 +20,51 @@ <xsl:template match="index" mode="title.markup"> <xsl:value-of select="$index-title"/> - </xsl:template> + </xsl:template> <xsl:template name="index.titlepage"> <div class="titlepage"> - <h1 class="index"> - <xsl:value-of select="$index-title"/> - </h1> + <h1 class="index"> + <xsl:value-of select="$index-title"/> + </h1> </div> </xsl:template> - <!--Divisions--> + <!--Divisions--> <xsl:template match="indexterm" mode="index-div"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/> - <!-- Make sure that we don't generate a div if there are no terms in scope --> + <!-- Make sure that we don't generate a div if there are no terms in scope --> <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> <div class="indexdiv"> <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> <h2> - <xsl:choose> - <xsl:when test="$divtitle = 'A'"> - <xsl:text>Packages</xsl:text> + <xsl:choose> + <xsl:when test="$divtitle = 'A'"> + <xsl:text>Packages</xsl:text> </xsl:when> <xsl:when test="$divtitle = 'B'"> - <xsl:text>Programs</xsl:text> + <xsl:text>Programs</xsl:text> </xsl:when> <xsl:when test="$divtitle = 'C'"> - <xsl:text>Libraries</xsl:text> + <xsl:text>Libraries</xsl:text> </xsl:when> <xsl:when test="$divtitle = 'D'"> - <xsl:text>Scripts</xsl:text> + <xsl:text>Scripts</xsl:text> </xsl:when> <xsl:when test="$divtitle = 'E'"> <xsl:text>Others</xsl:text> </xsl:when> <xsl:otherwise> - <xsl:value-of select="$divtitle"/> - </xsl:otherwise> + <xsl:value-of select="$divtitle"/> + </xsl:otherwise> </xsl:choose> </h2> </xsl:if> <ul> <xsl:apply-templates select="key('letter', $key)[&scope;] - [count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary"> + [count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> @@ -73,27 +73,27 @@ </xsl:if> </xsl:template> - <!-- Dropping the separator from here--> + <!-- Dropping the separator from here--> <xsl:template match="indexterm" mode="reference"> <xsl:param name="scope" select="."/> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="normalize-space(@zone)"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> - </xsl:template> + </xsl:template> - <!-- Changing the output tags and re-addind the separator--> + <!-- Changing the output tags and re-addind the separator--> <xsl:template match="indexterm" mode="index-primary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="&primary;"/> <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <li> - <strong class="item"> - <xsl:value-of select="primary"/> + <strong class="item"> + <xsl:value-of select="primary"/> <xsl:text>: </xsl:text> - </strong> + </strong> <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', - concat($key, " ", generate-id((ancestor-or-self::book |ancestor-or-self::part + concat($key, " ", generate-id((ancestor-or-self::book |ancestor-or-self::part |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]"> @@ -101,32 +101,32 @@ <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> - <xsl:if test="$refs/secondary"> + <xsl:if test="$refs/secondary"> <ul> <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', - concat($key, " ", normalize-space(concat(secondary/@sortas, + concat($key, " ", normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))))[&scope;][1]) = 1]" mode="index-secondary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(normalize-space(concat(secondary/@sortas, - secondary[not(@sortas)])), &lowercase;, &uppercase;)"/> + secondary[not(@sortas)])), &lowercase;, &uppercase;)"/> </xsl:apply-templates> - </ul> - </xsl:if> + </ul> + </xsl:if> </li> </xsl:template> <xsl:template match="indexterm" mode="index-secondary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, " ", - normalize-space(concat(secondary/@sortas, secondary[not(@sortas)])))"/> + normalize-space(concat(secondary/@sortas, secondary[not(@sortas)])))"/> <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <li> - <strong class="secitem"> - <xsl:value-of select="secondary"/> + <strong class="secitem"> + <xsl:value-of select="secondary"/> <xsl:text>: </xsl:text> - </strong> + </strong> <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', - concat($key, " ", generate-id((ancestor-or-self::book |ancestor-or-self::part + concat($key, " ", generate-id((ancestor-or-self::book |ancestor-or-self::part |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]"> diff --git a/stylesheets/xhtml/lfs-legalnotice.xsl b/stylesheets/xhtml/lfs-legalnotice.xsl index 465c34542..8e59611f4 100644 --- a/stylesheets/xhtml/lfs-legalnotice.xsl +++ b/stylesheets/xhtml/lfs-legalnotice.xsl @@ -1,12 +1,10 @@ <?xml version='1.0' encoding='ISO-8859-1'?> -<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> --> - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> - <!-- Generating the page --> + <!-- Generating the page --> <xsl:template match="legalnotice" mode="titlepage.mode"> <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> <xsl:variable name="filename" select="concat($base.dir, 'prologue/legalnotice.html')"/> diff --git a/stylesheets/xhtml/lfs-mixed.xsl b/stylesheets/xhtml/lfs-mixed.xsl index e179769f4..d8f7cf64c 100644 --- a/stylesheets/xhtml/lfs-mixed.xsl +++ b/stylesheets/xhtml/lfs-mixed.xsl @@ -4,10 +4,10 @@ xmlns="http://www.w3.org/1999/xhtml" version="1.0"> - <!-- screen --> + <!-- screen --> <xsl:template match="screen"> <xsl:choose> - <!-- Temporally hack --> + <!-- Temporally hack --> <xsl:when test="child::* = userinput"> <pre class="{name(.)}"> <kbd class="command"> @@ -24,21 +24,31 @@ </xsl:template> <!-- variablelist --> -<xsl:template match="variablelist"> - <div class="{name(.)}"> - <xsl:if test="title"> - <h3> - <xsl:value-of select="title"/> - </h3> - </xsl:if> - <dl> - <xsl:if test="@role"> - <xsl:attribute name="class"> - <xsl:value-of select="@role"/> - </xsl:attribute> - </xsl:if> - <xsl:apply-templates select="varlistentry"/> - </dl> - </div> -</xsl:template> + <xsl:template match="variablelist"> + <div class="{name(.)}"> + <xsl:if test="title"> + <xsl:choose> + <xsl:when test="@role = 'materials'"> + <h3> + <xsl:value-of select="title"/> + </h3> + </xsl:when> + <xsl:otherwise> + <h4> + <xsl:value-of select="title"/> + </h4> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + <dl> + <xsl:if test="@role"> + <xsl:attribute name="class"> + <xsl:value-of select="@role"/> + </xsl:attribute> + </xsl:if> + <xsl:apply-templates select="varlistentry"/> + </dl> + </div> + </xsl:template> + </xsl:stylesheet> diff --git a/stylesheets/xhtml/lfs-navigational.xsl b/stylesheets/xhtml/lfs-navigational.xsl index b91d27f47..f652c3951 100644 --- a/stylesheets/xhtml/lfs-navigational.xsl +++ b/stylesheets/xhtml/lfs-navigational.xsl @@ -1,7 +1,5 @@ <?xml version='1.0' encoding='ISO-8859-1'?> -<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> --> - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> @@ -15,7 +13,7 @@ </head> </xsl:template> - <!-- Header Navigation--> + <!-- Header Navigation--> <xsl:template name="header.navigation"> <xsl:param name="prev" select="/foo"/> <xsl:param name="next" select="/foo"/> @@ -64,6 +62,19 @@ <xsl:text>Next</xsl:text> </a> </li> + </xsl:if> + <xsl:if test="count($up)>0 and $up != $home"> + <li class="up"> + <a accesskey="u"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$up"/> + </xsl:call-template> + </xsl:attribute> + <xsl:text>Up</xsl:text> + </a> + </li> + </xsl:if> <li class="home"> <a accesskey="h"> <xsl:attribute name="href"> @@ -74,13 +85,12 @@ <xsl:text>Home</xsl:text> </a> </li> - </xsl:if> </ul> </div> </xsl:if> </xsl:template> - <!-- Footer Navigation--> + <!-- Footer Navigation--> <xsl:template name="footer.navigation"> <xsl:param name="prev" select="/foo"/> <xsl:param name="next" select="/foo"/> @@ -103,7 +113,7 @@ <xsl:text>Prev</xsl:text> </a> <p> - <xsl:apply-templates select="$prev" mode="object.title.markup"/> + <xsl:apply-templates select="$prev" mode="object.title.markup"/> </p> </li> </xsl:if> @@ -118,7 +128,7 @@ <xsl:text>Next</xsl:text> </a> <p> - <xsl:apply-templates select="$next" mode="object.title.markup"/> + <xsl:apply-templates select="$next" mode="object.title.markup"/> </p> </li> </xsl:if> diff --git a/stylesheets/xhtml/lfs-titles.xsl b/stylesheets/xhtml/lfs-titles.xsl index b9512aafc..78fd1f00c 100644 --- a/stylesheets/xhtml/lfs-titles.xsl +++ b/stylesheets/xhtml/lfs-titles.xsl @@ -30,7 +30,7 @@ <xsl:template name="sect1.titlepage"> <xsl:choose> - <!-- I should find a better test --> + <!-- I should find a better test --> <xsl:when test="position() = 4"> <div class="titlepage"> <xsl:if test="@id"> diff --git a/stylesheets/xhtml/lfs-toc.xsl b/stylesheets/xhtml/lfs-toc.xsl index af9d57812..56ad11ebc 100644 --- a/stylesheets/xhtml/lfs-toc.xsl +++ b/stylesheets/xhtml/lfs-toc.xsl @@ -4,7 +4,7 @@ xmlns="http://www.w3.org/1999/xhtml" version="1.0"> - <!-- General settings --> + <!-- General settings --> <xsl:param name="generate.toc"> appendix toc book toc,title,figure,table,example,equation @@ -27,8 +27,8 @@ <xsl:param name="toc.max.depth">3</xsl:param> - <!-- Making the TOC --> - <xsl:template name="make.toc"> + <!-- Making the TOC --> + <xsl:template name="make.toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> <xsl:if test="$nodes"> @@ -46,7 +46,7 @@ </div> </xsl:if> </xsl:template> - + <!-- Making the subtocs --> <xsl:template name="subtoc"> <xsl:param name="toc-context" select="."/> @@ -71,7 +71,7 @@ <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> <xsl:if test="$toc.section.depth > $depth and count($nodes)>0 - and $toc.max.depth > $depth.from.context"> + and $toc.max.depth > $depth.from.context"> <xsl:copy-of select="$subtoc"/> </xsl:if> </li> |