Author: manuel Date: 2007-04-21 12:56:29 -0600 (Sat, 21 Apr 2007) New Revision: 8093
Added: branches/new-xsl/blfs-nochunks.xsl Modified: branches/new-xsl/lfs-nochunks.xsl Log: Ported new CSS code to lfs-nochunks.xsl. Added blfs-nochunks.xsl. Added: branches/new-xsl/blfs-nochunks.xsl =================================================================== --- branches/new-xsl/blfs-nochunks.xsl (rev 0) +++ branches/new-xsl/blfs-nochunks.xsl 2007-04-21 18:56:29 UTC (rev 8093) @@ -0,0 +1,25 @@ +<?xml version='1.0' encoding='ISO-8859-1'?> + +<!-- +$LastChangedBy$ +$Date$ +--> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns="http://www.w3.org/1999/xhtml" + version="1.0"> + + <!-- LFS top-level no-chunk templates. --> + <xsl:import href="lfs-nochunks.xsl"/> + + <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) --> + <xsl:param name="book-type">blfs</xsl:param> + + <!-- Are sections enumerated? 1 = yes, 0 = no + Note: Activating this will increase a lot rendering time. --> + <xsl:param name="section.autolabel" select="0"/> + + <!-- Do section labels include the component label? 1 = yes, 0 = no --> + <xsl:param name="section.label.includes.component.label" select="0"/> + +</xsl:stylesheet> Property changes on: branches/new-xsl/blfs-nochunks.xsl ___________________________________________________________________ Name: svn:keywords + Author Date Revision Id Modified: branches/new-xsl/lfs-nochunks.xsl =================================================================== --- branches/new-xsl/lfs-nochunks.xsl 2007-04-21 17:12:10 UTC (rev 8092) +++ branches/new-xsl/lfs-nochunks.xsl 2007-04-21 18:56:29 UTC (rev 8093) @@ -72,7 +72,7 @@ <!-- sect2.titlepage: Removed a lot of unneeded code. Skip empty titles. - No label in preface. --> + No label in preface (actualy, skip the hardcoded dot). --> <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl --> <xsl:template name="sect2.titlepage"> <xsl:choose> @@ -83,7 +83,7 @@ <a id="[EMAIL PROTECTED]" name="[EMAIL PROTECTED]"/> </xsl:if> <h3 class="{name(.)}"> - <xsl:if test="not(ancestor::preface)"> + <xsl:if test="not(ancestor::preface) and $section.autolabel != 0"> <xsl:apply-templates select="." mode="label.markup"/> <xsl:text>. </xsl:text> </xsl:if> @@ -96,77 +96,227 @@ <!-- The CSS Stylesheet: Note: there is a few diferences with lfs.css code releated - to h* values--> + to h* values. --> <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl --> <xsl:template name='user.head.content'> <style type="text/css"> <xsl:text> /* Global settings */ body { - font-family: sans-serif; + font-family: verdana, tahoma, helvetica, arial, sans-serif; text-align: left; background: #fff; - color: #333; + color: #222; margin: 1em; padding: 0; font-size: 1em; line-height: 1.2em } + +/* Links */ a:link { color: #22b; } -a:visited { color: #7e4988; } -a:hover, a:focus { color: #d30e08; } -a:active { color: #6b77b1;} +a.ulink:link { font-weight: bold; color: #55f; } +a:visited { color: #7e4988 ! important; } +a:hover, a:focus { color: #d30e08 ! important; } +a:active { color: #6b77b1 ! important;} -/* External links in italic font */ -a.ulink { font-style: italic; } +/* Book titlepage */ +.book { + margin: 0px auto; + padding: 0 1em; +} + +.book h1, .book .authorgroup, .book .copyright, .book .legalnotice .revhistory { + background: #f5f6f7; + margin: 0px auto; + padding: .1em 1em; +} + +.book hr { + background: #dbddec; + height: .3em; + border: 0px; + margin: 0; + padding: 0; +} + +div.dedication .titlepage { + background: #fff; +} + +div.dedication p { + padding-left: 2em; +} + + +/* Sections */ +div.sect1, div.appendix { + padding-left: .3em; +} + +.package, .kernel, .installation, .commands, .testing, .configuration, .content { + padding: 0 .5em .2em 0; + margin: 0; +} + +.lfs .package { + background: #f5f6f7; + border-bottom: 0.2em solid #dbddec; + padding-top: .1em; + margin-top: 0; +} + +.lfs .configuration { + background: #fefefe; + border-top: 0.2em solid #dbddec; +} + +.lfs .content { + background: #f5f6f7; + border-top: 0.2em solid #dbddec; + border-bottom: 0.2em solid #dbddec; + padding-bottom: .1em; + margin-bottom: 0; +} + + /* Headers */ -h1, h2, b, strong { +h1, h2, h3, h4, h5, h6, b, .strong { color: #000; font-weight: bold; + line-height: 1em; } -h3, h4, h5, h6 { - color: #222; +h1 { + font-size: 173%; + text-align: center; } -h1 { font-size: 173%; text-align: center; line-height: 1.2em; } -h2 { font-size: 144%; line-height: 1.2em; } -h2.subtitle { text-align: center; line-height: 1.2em; } -h3 { font-size: 120%; padding-top: 0.2em; margin-top: 0.3em; line-height: 1.2em; } -h4 { font-size: 110%; line-height: 1.2em;} -h5, h6 { font-size: 110%; font-style: italic; line-height: 1.2em; } +.book h1 { + margin: 0; + padding: 0.4em; +} -/* TOC and Index*/ +h1.title sup { + font-size: small; +} +h2 { + font-size: 144%; +} + +.preface h2, .part h1, .chapter h2, .appendix h2, .index h1, .sect1 h2 { + background: #f5f6f7; + border-top: .2em solid #dbddec; + border-bottom: .2em solid #dbddec; + margin-bottom: 1em; + margin-top: 1em; + padding: .4em; + text-align: center; +} + +.sect1 h2, .appendix h2 { + margin-left: -.2em; +} + +.wrap h2 { + background: #f5f6f7; + border-bottom: 0; + margin-top: 1em; + margin-bottom: 0; + padding-top: .4em; +} + +.book h2.subtitle { + text-align: center; + background: #dbddec; + margin: 0; + padding: 0.2em; +} + +h3 { + font-size: 120%; +} + +.appendix h3 { + font-size: 133%; + margin-top: .8em; + margin-bottom: 0.2em; +} + +h4 { + font-size: 110%; +} + +.package h4, h5, h6 { + font-size: 100%; + font-style: italic; +} + + +/* TOC */ div.toc ul, div.index ul, div.navheader ul, div.navfooter ul { list-style: none; } -div.toc, div.dedication { +div.toc { padding-left: 1em; } -li.preface, li.appendix { +li.preface, .part li.appendix { margin-left: 1em; } -div.toc ul li h3, div.toc ul li h4 { - margin: .4em; +div.toc h3 { + margin: 1em 0 .3em 0; } +li.appendix h3, li.glossary h3, li.index h3 { + margin: .5em +} + +div.toc h4 { + margin: .6em 0 .2em 0; +} + +li.chapter h4 a { + display: block; + margin-bottom: .4em +} + +.dummy { + display: block; + font-weight: bold; + font-size: 110%; + margin: .6em 0 .2em 0; +} + + +/* Index */ .item { - width: 17em; float: left; } .secitem { font-weight: normal; - width: 16em; float: left; } +.lfs .item + .indexref { + margin-left: 18em; +} + +.lfs .secitem + .indexref { + margin-left: 17em; +} + +.blfs .indexref { + margin-left: 26em; +} + + /* Admonitions */ div.note, div.tip { background-color: #fffff6; @@ -179,16 +329,15 @@ background-color: #fffff6; border: medium solid #400; width: 90%; - margin: 1.5em auto; + margin: .5em auto; color: #600; - font-size: larger; } div.important h3, div.warning h3, div.caution h3 { color: #900; } -h3.admontitle { +div.admonhead h3 { padding-left: 2.5em; padding-top: 1em; } @@ -202,114 +351,151 @@ font-weight: bold; } -div.important tt, div.warning tt, div.caution tt { - font-weight: bold; + +/* table */ +.table p.title { + text-align: center; + margin-top: 0; + margin-bottom: .3em; } -div.important tt.literal, div.warning tt.literal, div.caution tt.literal { - font-weight: normal; +.table table { + margin-left: auto; + margin-right: auto; } -/* variablelist and segmentedlist */ -dl { - margin: 0; - padding: 0; +.table table th, .table table td { + padding: 0.2em 2em 0.2em 2em; + text-align: left; } -dt { - display: list-item; - font-weight: bold; - margin: .33em 0 0 1em; - padding: 0; +div.revhistory { + padding-left: 1em; } -dd { - margin: 0 0 1em 3em; - padding: 0; +div.revhistory th { + line-height: 2em; + text-align: left; } -table { +div.revhistory td { + padding-right: 1em; +} + + +/* variablelist as table */ +.variablelist table { width: auto; - margin-left: 1em; + margin: 0 1em 0 1em; } -td { +.variablelist td { vertical-align: top; } -td span, td p { - margin: 0.3em; +.variablelist td span, td p { + margin: 0.25em; } -span.term { - display: block; +.variablelist td p { + margin-top: 0; } -div.variablelist dd { - margin-bottom: 1em; + +/* variablelist as list */ +dl { + padding-left: 1em } -div.variablelist dd p { - margin-top: 0px; - margin-bottom: 0px; - padding-top: 0px; - padding-bottom: 0px; +dt { + font-weight: bold; + margin-left: 1em; } -dl.materials dd { - margin-left: 0px; +dd { + margin-bottom: .6em; + margin-left: 1em; } -div.package div.seg { - margin-bottom: 0em; - margin-top: 0em; - clear: left; +dd p { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; } -div.package span.segtitle, div.appendix span.segtitle { - float: left; +div.materials dt { + display: list-item; } -div.package span.seg, div.appendix span.seg { - display: block; - padding-left: 14em; +div.materials dd { + margin-left: 0; + padding-left: 0; } -div.appendix div.segmentedlist { + +/* segmentedlist */ +.appendix .segmentedlist { padding-left: 1em; } -div.appendix h3 { - font-size: 133%; - margin-top: 1em; - margin-bottom: 0.2em; +.package .seg { + margin-bottom: 0em; + margin-top: 0em; + clear: left; } -div.content div.seg { - margin-bottom: 1em; - margin-top: 1em; +.content .seg { + margin-bottom: .4em; + margin-top: .4em; clear: left; } -div.content span.segtitle { +.segtitle { float: left; } -div.content span.seg { +.package .segbody, .appendix .segbody { display: block; + padding-left: 14em; +} + +.content .segbody { + display: block; padding-left: 12em; } + /* itemizedlist */ +ul { + padding-left: 1em +} -div.itemizedlist { - margin-left: 1em; +.itemizedlist ul { + margin-left: 1em } +.itemizedlist li ul { + margin-bottom: 1.2em; +} + +.itemizedlist li ul li p { + margin-top: .2em; + margin-bottom: .2em; +} + +.itemizedlist li ul li:first-child p:first-child { + margin-top: -.6em; +} + ul[compact="compact"] { list-style: none; } +.blfs ul[compact="compact"] { + list-style: disc; +} + ul[compact="compact"] li { margin: 0em; padding: 0em; @@ -320,33 +506,24 @@ margin: 0em; } -/*table */ - -div.table { - text-align: center; +.blfs ul[compact="compact"] li p { + background-color: #f0fff0; } -div.table table { - margin-left: auto; - margin-right: auto; - text-align: center; -} -div.table table th, div.table table td { - padding: 0.2em 2em 0.2em 2em; -} - /* Indented blocks */ -p, ul, dl, code, blockquote { +p, blockquote { padding-left: 1em; + padding-right: 1em; } + /* Monospaced elements */ tt, code, kbd, pre, .command { font-family: monospace; } -tt.systemitem { +.systemitem { font-style: italic; } @@ -355,12 +532,17 @@ background-color: #e5e5e5; border: 1px solid #050505; padding: .5em 1em; - margin: 0 2em; + margin: 0 2em .5em 2em; font-weight: bold; } -.literal { - font-weight: normal; +pre.root { + color: #101310; + background-color: #e5e5e5; + border: 1px solid #11a; + padding: .5em 1em; + margin: 0 2em; + font-weight: bold; } pre.screen { @@ -371,82 +553,34 @@ margin: 0 2em; } -/* Sections */ -div.wrap h2 { - background: #f5f6f7; - padding: 1em 0 0.5em 0; - margin: 0px auto; +.literal, .prompt { + font-weight: normal; } -div.package { - background: #f5f6f7; - border-bottom: 0.2em solid #dbddec; - padding: 0.5em 0.5em 0.3em 0.5em; - margin: 0px auto; -} -div.installation { - padding: 0 0.5em 0.3em 0.5em; - margin: 0.5em 0 0.5em 0; +/* Mixed tags */ +p.usernotes { + margin-left: -1em; + font-size: small; + font-weight: bold; + font-style: italic; } -div.configuration { - background: #fefefe; - border-top: 0.2em solid #dbddec; - padding: 0.5em; - margin: 0.5em 0 .5em 0; +.simplelist { + background-color: #f0fff0; } -div.content { - background: #f5f6f7; - border-top: 0.2em solid #dbddec; - border-bottom: 0.2em solid #dbddec; - padding: 0.5em 0.5em 1em 0.5em; - margin: 0.5em 0 .5em 0; +.underlined { + text-decoration: underline; } -div.installation h3.title, div.content h3.title { - padding-top: 0.3em; - margin: 0; -} -div.book, div.preface, div.part, div.chapter, div.sect1, div.appendix, div.index { - padding-bottom: 0.5em; +/* Last edited info */ +p.updated { + font-size: small; + font-weight: bold; + font-style: italic; } - -div.preface h2, div.part h1, div.chapter h2, div.sect1 h2, div.appendix h2, div.index h1 { - background: #f5f6f7; - border-bottom: .2em solid #dbddec; - border-top: .2em solid #dbddec; - margin-top 1em; - padding: .5em; - text-align: center; -} - -div.book h1 { - background: #f5f6f7; - margin: 0px auto; - padding: 0.5em; -} - -div.book h2.subtitle { - background: #dbddec; - margin: 0px auto; - padding: 0.2em; -} -div.authorgroup, div p.copyright, div.abstract { - background: #f5f6f7; - margin: 0px auto; - padding: 1em 0.5em; -} - -hr { - background: #dbddec; - height: .3em; - border: 0px; - margin: 0px auto; - padding: 0; -} </xsl:text> </style> </xsl:template> -- http://linuxfromscratch.org/mailman/listinfo/lfs-book FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
