Author: manuel
Date: 2005-02-21 15:14:31 -0700 (Mon, 21 Feb 2005)
New Revision: 4666
Modified:
trunk/BOOK/stylesheets/lfs.css
trunk/BOOK/stylesheets/xhtml/lfs-mixed.xsl
Log:
Indenting segmentedlist for HTML output.
Modified: trunk/BOOK/stylesheets/lfs.css
===================================================================
--- trunk/BOOK/stylesheets/lfs.css 2005-02-21 21:19:30 UTC (rev 4665)
+++ trunk/BOOK/stylesheets/lfs.css 2005-02-21 22:14:31 UTC (rev 4666)
@@ -214,6 +214,32 @@
margin: 0px auto;
}
+div.package span.segtitle {
+ display: block;
+ float: left;
+ width: 23em;
+}
+
+div.package span.seg {
+ display: block;
+ padding-left: 23em;
+}
+
+div.content span.segtitle {
+ display: block;
+ float: left;
+ width: 10em;
+}
+
+div.content span.seg {
+ display: block;
+ padding-left: 10em;
+}
+
+div.seg {
+ clear: left;
+}
+
/* itemizedlist */
div.itemizedlist {
Modified: trunk/BOOK/stylesheets/xhtml/lfs-mixed.xsl
===================================================================
--- trunk/BOOK/stylesheets/xhtml/lfs-mixed.xsl 2005-02-21 21:19:30 UTC (rev
4665)
+++ trunk/BOOK/stylesheets/xhtml/lfs-mixed.xsl 2005-02-21 22:14:31 UTC (rev
4666)
@@ -62,6 +62,27 @@
</div>
</xsl:template>
+ <!-- segementedlist -->
+ <xsl:template match="seg">
+ <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
+ <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
+ <xsl:variable name="segtitles" select="$seglist/segtitle"/>
+ <!-- Note: segtitle is only going to be the right thing in a well formed
+ SegmentedList. If there are too many Segs or too few SegTitles,
+ you'll get something odd...maybe an error -->
+ <div class="seg">
+ <strong>
+ <span class="segtitle">
+ <xsl:apply-templates select="$segtitles[$segnum=position()]"
mode="segtitle-in-seg"/>
+ <xsl:text>: </xsl:text>
+ </span>
+ </strong>
+ <span class="seg">
+ <xsl:apply-templates/>
+ </span>
+ </div>
+ </xsl:template>
+
<!-- Body attributes -->
<xsl:template name="body.attributes">
<xsl:attribute name="id">
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page