FIX: Repair invalid HTMl in navigation menus
[freefoam.git] / data / asciidoc / docbook-xsl / custom.xsl
blob277b426efeec66a73060c224c4bb3219b9ebe4b7
1 <!--
2 Custom parameters and user templates.
3 -->
5 <!DOCTYPE xsl:stylesheet
7 <!ENTITY nbsp "&#160;">
8 <!ENTITY copy "&#169;">
9 <!ENTITY reg "&#174;">
12 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
13 xmlns="http://www.w3.org/1999/xhtml"
14 xmlns:date="http://exslt.org/dates-and-times"
15 exclude-result-prefixes="date"
16 version="1.0">
18 <!-- ======================================================================
19 default values for parameters
20 ====================================================================== -->
21 <xsl:param name="foam.ug.current" select="0"/> <!-- UserGuide is current -->
22 <xsl:param name="foam.api.current" select="0"/> <!-- API doc is current -->
23 <xsl:param name="foam.man.current" select="0"/> <!-- man doc is current -->
24 <xsl:param name="foam.doc.have_ug" select="0"/> <!-- have local UserGuide -->
25 <xsl:param name="foam.doc.have_doxy" select="0"/> <!-- have local API doc -->
26 <xsl:param name="foam.doc.have_man" select="0"/> <!-- have local UserGuide -->
27 <xsl:param name="foam.doc.for_sf" select="0"/> <!-- docs are for SF -->
28 <xsl:param name="foam.use.mathjax" select="0"/> <!-- user MathJax -->
29 <xsl:param name="foam.mathjax.url"
30 select="'http://cdn.mathjax.org/mathjax/latest'"/> <!-- MathJax URL -->
31 <!-- relative path to doc base directory -->
32 <xsl:param name="foam.doc.location">
33 <xsl:choose>
34 <xsl:when test="$foam.man.current">../..</xsl:when>
35 <xsl:otherwise>..</xsl:otherwise>
36 </xsl:choose>
37 </xsl:param>
38 <!-- doc SF url -->
39 <xsl:param name="foam.doc.sf_url"
40 select="concat('http://freefoam.sourceforge.net/doc/v',
41 $foam.version.full)"/>
43 <!-- user guide location -->
44 <xsl:param name="foam.ug.location">
45 <xsl:choose>
46 <xsl:when test="$foam.ug.current">.</xsl:when>
47 <xsl:when test="$foam.doc.for_sf or $foam.doc.have_ug">
48 <xsl:value-of select="concat($foam.doc.location, '/UserGuide')"/>
49 </xsl:when>
50 <xsl:otherwise>
51 <xsl:value-of select="concat($foam.doc.sf_url, '/UserGuide')"/>
52 </xsl:otherwise>
53 </xsl:choose>
54 </xsl:param>
56 <!-- API doc location -->
57 <xsl:param name="foam.api.location">
58 <xsl:choose>
59 <xsl:when test="$foam.api.current">.</xsl:when>
60 <xsl:when test="$foam.doc.for_sf or $foam.doc.have_doxy">
61 <xsl:value-of select="concat($foam.doc.location, '/API')"/></xsl:when>
62 <xsl:otherwise>
63 <xsl:value-of select="concat($foam.doc.sf_url, '/API')"/>
64 </xsl:otherwise>
65 </xsl:choose>
66 </xsl:param>
68 <!-- XHTML manpages location -->
69 <xsl:param name="foam.man.location">
70 <xsl:choose>
71 <xsl:when test="$foam.man.current">..</xsl:when>
72 <xsl:when test="$foam.doc.for_sf or $foam.doc.have_man">
73 <xsl:value-of select="concat($foam.doc.location, '/man')"/></xsl:when>
74 <xsl:otherwise>
75 <xsl:value-of select="concat($foam.doc.sf_url, '/man')"/>
76 </xsl:otherwise>
77 </xsl:choose>
78 </xsl:param>
80 <!-- =====================================================================
81 customization templates
82 ===================================================================== -->
83 <xsl:template name="user.head.content">
84 <link rel="stylesheet" href="{$foam.doc.location}/css/xhtml11.css" type="text/css" />
85 <link rel="stylesheet" href="{$foam.doc.location}/css/layout.css" type="text/css" />
86 <link rel="stylesheet" href="{$foam.doc.location}/css/custom.css" type="text/css" />
87 <xsl:if test="$foam.use.mathjax">
88 <script type="text/javascript"
89 src="{$foam.mathjax.url}/MathJax.js?config=default"/>
90 <script type="text/javascript"
91 src="{$foam.doc.location}/js/MathJaxMacros.js"/>
92 </xsl:if>
93 </xsl:template>
95 <xsl:template name="foam.header.content">
96 <div id="layout-banner-box">
97 <div id="layout-banner">
98 <a href="http://freefoam.sourceforge.net/index.html">
99 <img id="layout-title" src="{$foam.doc.location}/img/FreeFOAMLogo.png" alt="FreeFOAM"/>
100 </a>
101 <img id="layout-description" src="{$foam.doc.location}/img/CrossPlatformToolkit.png"
102 alt="The Cross-Platform CFD Toolkit"/>
103 </div>
104 </div>
105 <div id="layout-menu-box">
106 <div id="layout-menu">
107 <ul>
108 <li><a href="http://freefoam.sourceforge.net/index.html">Home</a></li>
109 <li><a href="http://freefoam.sourceforge.net/downloads/index.html">
110 Downloads</a></li>
111 <li><a href="http://freefoam.sourceforge.net/documentation.html">
112 Documentation</a></li>
113 <li>
114 <ul>
115 <li><a href="{$foam.doc.location}/INSTALL.html">Installation</a></li>
116 <li><a href="{$foam.ug.location}/index.html">
117 <xsl:if test="$foam.ug.current">
118 <xsl:attribute name="class">current_page</xsl:attribute></xsl:if>
119 User&nbsp;Guide</a></li>
120 <li><a href="{$foam.man.location}/man1/freefoam.1.html">
121 <xsl:if test="$foam.man.current">
122 <xsl:attribute name="class">current_page</xsl:attribute></xsl:if>
123 man-pages</a></li>
124 <li><a href="{$foam.api.location}/index.html">
125 <xsl:if test="$foam.api.current">
126 <xsl:attribute name="class">current_page</xsl:attribute></xsl:if>
127 API&nbsp;Documentation</a></li>
128 <li><a href="{$foam.doc.location}/README.html">README</a></li>
129 <li><a href="{$foam.doc.location}/ReleaseNotes.html">Release Notes</a></li>
130 <li><a href="{$foam.doc.location}/ChangeLog.html">Changes</a></li>
131 <li><a href="{$foam.doc.location}/COPYING.html">License</a></li>
132 </ul>
133 </li>
134 <li><a href="http://freefoam.sourceforge.net/support.html">
135 Support</a></li>
136 <li><a href="http://www.sourceforge.net/projects/freefoam">
137 SourceForge Project</a></li>
138 </ul>
139 </div>
140 <xsl:if test="$foam.doc.for_sf">
141 <div id="layout-sf">
142 Hosted by SourceForge:<br />
143 <a href="http://sourceforge.net/projects/freefoam">
144 <img
145 src="http://sflogo.sourceforge.net/sflogo.php?group_id=215833&amp;type=12"
146 width="120" height="30" alt="Get FreeFOAM at SourceForge.net.
147 Fast, secure and Free Open Source software downloads" />
148 </a>
149 </div>
150 </xsl:if>
151 </div>
152 <xsl:text disable-output-escaping="yes"><![CDATA[
153 <div id="layout-content-box">
154 <div id="layout-content">
155 ]]></xsl:text>
156 </xsl:template>
158 <xsl:template name="user.footer.content">
159 <div id="footer">
160 <div id="footer-text">
161 Copyright&nbsp;&copy;&nbsp;2008-2011&nbsp;Michael Wild and Gerber van der Graaf<br/>
162 Copyright&nbsp;&copy;&nbsp;2004-2011&nbsp;OpenCFD Ltd<br/>
163 OpenFOAM&reg; and OpenCFD&reg; are registered trademarks of OpenCFD Limited.<br/>
164 Last updated
165 <xsl:call-template name="datetime.format">
166 <xsl:with-param name="date" select="date:date-time()"/>
167 <xsl:with-param name="format" select="'c'"/>
168 </xsl:call-template>
169 </div>
170 </div>
171 <xsl:text disable-output-escaping="yes"><![CDATA[
172 </div>
173 </div>
174 ]]></xsl:text>
175 </xsl:template>
177 </xsl:stylesheet>