[48743] trunk/doc-new
raimue at macports.org
raimue at macports.org
Fri Mar 27 19:55:10 PDT 2009
Revision: 48743
http://trac.macports.org/changeset/48743
Author: raimue at macports.org
Date: 2009-03-27 19:55:10 -0700 (Fri, 27 Mar 2009)
Log Message:
-----------
guide:
Provide a small tab in the upper right corner to switch between the single page
and the chunked version of the guide. Build the both versions by default.
Modified Paths:
--------------
trunk/doc-new/Makefile
trunk/doc-new/guide/resources/chunk.xsl
trunk/doc-new/guide/resources/docbook.css
trunk/doc-new/guide/resources/single-page.xsl
Added Paths:
-----------
trunk/doc-new/guide/resources/tabs.xsl
Modified: trunk/doc-new/Makefile
===================================================================
--- trunk/doc-new/Makefile 2009-03-28 00:32:26 UTC (rev 48742)
+++ trunk/doc-new/Makefile 2009-03-28 02:55:10 UTC (rev 48743)
@@ -42,9 +42,9 @@
# DocBook HTML stylesheet for the guide.
STYLESHEET = docbook.css
-.PHONY: all guide man clean validate
+.PHONY: all guide guide-chunked man clean validate
-all: guide man
+all: guide guide-chunked man
# Generate the HTML guide using DocBook from the XML sources in $(GUIDE_SRC).
guide:
Modified: trunk/doc-new/guide/resources/chunk.xsl
===================================================================
--- trunk/doc-new/guide/resources/chunk.xsl 2009-03-28 00:32:26 UTC (rev 48742)
+++ trunk/doc-new/guide/resources/chunk.xsl 2009-03-28 02:55:10 UTC (rev 48743)
@@ -1,6 +1,8 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<xsl:import href="xsl/xhtml/chunk.xsl"/>
<xsl:include href="base.xsl"/>
+ <!-- Include tab switching for chunk and single-page -->
+ <xsl:include href="tabs.xsl"/>
<!-- See http://docbook.sourceforge.net/release/xsl/current/doc/html/ for parameters -->
@@ -9,4 +11,6 @@
<xsl:param name="chunk.section.depth">1</xsl:param>
<xsl:param name="use.id.as.filename">1</xsl:param>
+ <!-- Set param for tabs.xml -->
+ <xsl:param name="chunkmode">1</xsl:param>
</xsl:stylesheet>
Modified: trunk/doc-new/guide/resources/docbook.css
===================================================================
--- trunk/doc-new/guide/resources/docbook.css 2009-03-28 00:32:26 UTC (rev 48742)
+++ trunk/doc-new/guide/resources/docbook.css 2009-03-28 02:55:10 UTC (rev 48743)
@@ -208,3 +208,34 @@
content: "MacPorts Guide Contents";
} */
+/* Tabswitch for single page/chunked */
+div#tabswitch {
+ position: absolute;
+ top: 0;
+ right: 0;
+ background-color: #9FB6CD;
+ border: 1px solid black;
+}
+
+div#tabswitch a {
+ padding: 0.3em;
+ line-height: 2em;
+}
+
+div#tabswitch a.selected {
+ font-weight: bold;
+}
+
+div#tabswitch a:link {
+ color: royalblue;
+ text-decoration: none;
+}
+
+div#tabswitch a:hover {
+ color: gray;
+}
+
+div#tabswitch a:visited {
+ color: black;
+ text-decoration: none;
+}
Modified: trunk/doc-new/guide/resources/single-page.xsl
===================================================================
--- trunk/doc-new/guide/resources/single-page.xsl 2009-03-28 00:32:26 UTC (rev 48742)
+++ trunk/doc-new/guide/resources/single-page.xsl 2009-03-28 02:55:10 UTC (rev 48743)
@@ -1,6 +1,11 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<xsl:import href="xsl/xhtml/profile-docbook.xsl"/>
<xsl:include href="base.xsl"/>
+ <!-- Include tab switching for chunk and single-page -->
+ <xsl:include href="tabs.xsl"/>
<!-- See http://docbook.sourceforge.net/release/xsl/current/doc/html/ for parameters -->
+
+ <!-- Set param for tabs.xml -->
+ <xsl:param name="chunkmode">0</xsl:param>
</xsl:stylesheet>
Added: trunk/doc-new/guide/resources/tabs.xsl
===================================================================
--- trunk/doc-new/guide/resources/tabs.xsl (rev 0)
+++ trunk/doc-new/guide/resources/tabs.xsl 2009-03-28 02:55:10 UTC (rev 48743)
@@ -0,0 +1,20 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+ <xsl:template name="user.header.content">
+ <div id="tabswitch">
+ <a href="/index.html">
+ <xsl:if test="$chunkmode = 0">
+ <xsl:attribute name="class">selected</xsl:attribute>
+ </xsl:if>
+ Single Page
+ </a>
+ <a href="/chunked/index.html">
+ <xsl:if test="$chunkmode = 1">
+ <xsl:attribute name="class">selected</xsl:attribute>
+ </xsl:if>
+ Chunked
+ </a>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090327/80cb0bfb/attachment.html>
More information about the macports-changes
mailing list