2 Custom parameters and user templates.
5 <!DOCTYPE xsl:stylesheet
7 <!ENTITY nbsp
" ">
8 <!ENTITY copy
"©">
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"
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">
34 <xsl:when test=
"$foam.man.current">../..
</xsl:when>
35 <xsl:otherwise>..
</xsl:otherwise>
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">
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')"/>
51 <xsl:value-of select=
"concat($foam.doc.sf_url, '/UserGuide')"/>
56 <!-- API doc location -->
57 <xsl:param name=
"foam.api.location">
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>
63 <xsl:value-of select=
"concat($foam.doc.sf_url, '/API')"/>
68 <!-- XHTML manpages location -->
69 <xsl:param name=
"foam.man.location">
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>
75 <xsl:value-of select=
"concat($foam.doc.sf_url, '/man')"/>
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"/>
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"/>
101 <img id=
"layout-description" src=
"{$foam.doc.location}/img/CrossPlatformToolkit.png"
102 alt=
"The Cross-Platform CFD Toolkit"/>
105 <div id=
"layout-menu-box">
106 <div id=
"layout-menu">
108 <li><a href=
"http://freefoam.sourceforge.net/index.html">Home
</a></li>
109 <li><a href=
"http://freefoam.sourceforge.net/downloads/index.html">
111 <li><a href=
"http://freefoam.sourceforge.net/documentation.html">
112 Documentation
</a></li>
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
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>
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
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>
134 <li><a href=
"http://freefoam.sourceforge.net/support.html">
136 <li><a href=
"http://www.sourceforge.net/projects/freefoam">
137 SourceForge Project
</a></li>
140 <xsl:if test=
"$foam.doc.for_sf">
142 Hosted by SourceForge:
<br />
143 <a href=
"http://sourceforge.net/projects/freefoam">
145 src=
"http://sflogo.sourceforge.net/sflogo.php?group_id=215833&type=12"
146 width=
"120" height=
"30" alt=
"Get FreeFOAM at SourceForge.net.
147 Fast, secure and Free Open Source software downloads" />
152 <xsl:text disable-output-escaping=
"yes"><![CDATA[
153 <div id=
"layout-content-box">
154 <div id=
"layout-content">
158 <xsl:template name=
"user.footer.content">
160 <div id=
"footer-text">
161 Copyright
© 2008-
2011 Michael Wild and Gerber van der Graaf
<br/>
162 Copyright
© 2004-
2011 OpenCFD Ltd
<br/>
163 OpenFOAM
® and OpenCFD
® are registered trademarks of OpenCFD Limited.
<br/>
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'"/>
171 <xsl:text disable-output-escaping=
"yes"><![CDATA[