You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cd...@apache.org on 2006/01/13 12:55:08 UTC
svn commit: r368693 - in
/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes:
common/html/branding-logo.ft pelt.fv
Author: cdupoirieux
Date: Fri Jan 13 03:54:57 2006
New Revision: 368693
URL: http://svn.apache.org/viewcvs?rev=368693&view=rev
Log:
Css inclusion and branding-logo.ft migration.
Added:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-logo.ft
- copied, changed from r368658, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/branding-logo.ft
Modified:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv
Copied: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-logo.ft (from r368658, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/branding-logo.ft)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-logo.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-logo.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/branding-logo.ft&r1=368658&r2=368693&rev=368693&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/branding-logo.ft (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-logo.ft Fri Jan 13 03:54:57 2006
@@ -15,44 +15,87 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<forrest:contract name="branding-logo" type="nugget"
+<forrest:contract name="branding-logo"
xmlns:forrest="http://apache.org/forrest/templates/1.0">
<description>
branding-logo will output the logo defined in the view.
</description>
+
<usage><![CDATA[<forrest:contract name="branding-logo">
- <forrest:properties contract="branding-logo">
- <forrest:property name="branding-logo-name">Apache Forrest</forrest:property>
- <forrest:property name="branding-logo-description">Apache Forrest</forrest:property>
- <forrest:property name="branding-logo-url">http://forrest.apache.org/</forrest:property>
- <forrest:property name="branding-logo-logo">images/project-logo.gif</forrest:property>
- </forrest:properties>
+ <forrest:property name="branding-logo-name">Apache Forrest</forrest:property>
+ <forrest:property name="branding-logo-description">Apache Forrest</forrest:property>
+ <forrest:property name="branding-logo-url">http://forrest.apache.org/</forrest:property>
+ <forrest:property name="branding-logo-logo">images/project-logo.gif</forrest:property>
</forrest:contract>]]></usage>
+
<forrest:template
xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="branding-logo" inputFormat="xsl" body="true" head="false">
+ name="branding-logo" inputFormat="xsl">
- <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="branding-logo-body">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="defaultVariables" select="'test.html'"/>
<xsl:param name="branding-logo-name"/>
<xsl:param name="branding-logo-description"/>
<xsl:param name="branding-logo-url"/>
<xsl:param name="branding-logo-logo"/>
+ <xsl:variable name="root" select="$defaultVariables/*/*[@name='root']/@value"/>
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part>
<xsl:comment>+
|start Logo
+</xsl:comment>
- <xsl:call-template name="renderlogo">
- <xsl:with-param name="name" select="normalize-space($branding-logo-name)"/>
- <xsl:with-param name="url" select="normalize-space($branding-logo-url)"/>
- <xsl:with-param name="logo" select="normalize-space($branding-logo-logo)"/>
- <xsl:with-param name="root" select="$root"/>
- <xsl:with-param name="description"
- select="normalize-space($branding-logo-description)"/>
- </xsl:call-template>
+ <xsl:call-template name="renderlogo">
+ <xsl:with-param name="name" select="normalize-space($branding-logo-name)"/>
+ <xsl:with-param name="url" select="normalize-space($branding-logo-url)"/>
+ <xsl:with-param name="logo" select="normalize-space($branding-logo-logo)"/>
+ <xsl:with-param name="root" select="$root"/>
+ <xsl:with-param name="description"
+ select="normalize-space($branding-logo-description)"/>
+ </xsl:call-template>
<xsl:comment>+
|end group Logo
+</xsl:comment>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+
+ <!-- FIXME : in the previous dispatcher, this template was defined in an external render-logo.xsl... -->
+ <xsl:template name="renderlogo">
+ <xsl:param name="name"/>
+ <xsl:param name="url"/>
+ <xsl:param name="logo"/>
+ <xsl:param name="width"/>
+ <xsl:param name="height"/>
+ <xsl:param name="root"/>
+ <xsl:param name="description"/>
+ <a href="{$url}">
+ <xsl:choose>
+ <xsl:when test="$logo and not($logo = '')">
+ <img alt="{$name}" class="logoImage">
+ <xsl:attribute name="src">
+ <xsl:if test="not(starts-with($logo, 'http://'))">
+ <xsl:value-of select="$root"/>
+ </xsl:if>
+ <xsl:value-of select="$logo"/>
+ </xsl:attribute>
+ <xsl:if test="$width">
+ <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$height">
+ <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$description">
+ <xsl:attribute name="title"><xsl:value-of select="$description"/></xsl:attribute>
+ </xsl:if>
+ </img>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$name"/></xsl:otherwise>
+ </xsl:choose>
+ </a>
</xsl:template>
</xsl:stylesheet>
+
</forrest:template>
</forrest:contract>
Modified: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv?rev=368693&r1=368692&r2=368693&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv Fri Jan 13 03:54:57 2006
@@ -19,7 +19,29 @@
<forrest:views
xmlns:forrest="http://apache.org/forrest/templates/1.0"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
- <forrest:view type="html">
+
+ <!-- The following variables are used to contact data models and/or contracts. -->
+ <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
+ <jx:set var="getRequestExstension" value="#{$cocoon/parameters/getRequestExstension}" />
+
+ <forrest:view type="html" hooksXpath="/html/body">
+ <!--
+ @type defines this structurer to html.
+ @hooksXpath defines where all hooks will be injected (as prefix).
+ -->
+ <forrest:contract name="branding-css-links">
+ <!-- More information around this contract
+ http://marc.theaimsgroup.com/?l=forrest-dev&m=113473237805195&w=2
+ -->
+ <!--Note: The forrest:properties element does not exit anymore (in comparison to a previous versions) -->
+ <forrest:property name="branding-css-links-input">
+ <css url="common.css" media="screen" rel="alternate stylesheet" theme="common"/>
+ <css url="leather-dev.css" media="screen" rel="alternate stylesheet" theme="common"/>
+ <css url="pelt.basic.css" media="screen" theme="Pelt"/>
+ <css url="pelt.screen.css" media="screen" theme="Pelt"/>
+ <css url="pelt.print.css" media="print"/>
+ </forrest:property>
+ </forrest:contract>
<!--
<forrest:css url="common.css" media="screen" rel="alternate stylesheet" theme="common"/>
<forrest:css url="leather-dev.css" media="screen" rel="alternate stylesheet" theme="common"/>
@@ -195,16 +217,8 @@
</forrest:properties>
</forrest:contract>
-->
+ <forrest:contract name="siteinfo-meta" dataURI="lm://project.build-info"/>
- <!--
- <forrest:contract name="siteinfo-meta">
- <forrest:properties contract="siteinfo-meta">
- <forrest:property name="siteinfo-meta" nugget="get.build.info">
- <jx:import uri="cocoon://build-info"/>
- </forrest:property>
- </forrest:properties>
- </forrest:contract>
--->
<!--
<forrest:contract name="siteinfo-meta-navigation">
<forrest:properties contract="siteinfo-meta-navigation">
@@ -221,8 +235,9 @@
</forrest:properties>
</forrest:contract>
-->
- <!--
+
<forrest:hook name="container">
+ <!--
<forrest:contract name="branding-breadcrumbs">
<forrest:properties contract="branding-breadcrumbs">
<forrest:property name="branding-breadcrumbs">
@@ -234,43 +249,32 @@
</forrest:property>
</forrest:properties>
</forrest:contract>
+ -->
<forrest:hook name="header">
- <forrest:contract name="branding-tagline">
- <forrest:properties contract="branding-tagline">
- <forrest:property name="branding-tagline-name">new
- seed v2</forrest:property>
- <forrest:property name="branding-tagline-tagline">powered by
- forrest:views v2</forrest:property>
- </forrest:properties>
+ <forrest:contract name="branding-tagline">
+ <forrest:property name="branding-tagline-name">new
+ seed</forrest:property>
+ <forrest:property name="branding-tagline-tagline">powered by the
+ dispatcher</forrest:property>
</forrest:contract>
+
<forrest:hook class="logo">
<forrest:contract name="branding-logo">
- <forrest:properties contract="branding-logo">
- <forrest:property name="branding-logo-name">
- MyGroup</forrest:property>
- <forrest:property name="branding-logo-description">MyGroup
- Description</forrest:property>
- <forrest:property name="branding-logo-url">
- http://mygroup.org/</forrest:property>
- <forrest:property name="branding-logo-logo">
- images/group.png</forrest:property>
- </forrest:properties>
+ <forrest:property name="branding-logo-name">MyGroup</forrest:property>
+ <forrest:property name="branding-logo-description">MyGroup Description</forrest:property>
+ <forrest:property name="branding-logo-url">http://mygroup.org/</forrest:property>
+ <forrest:property name="branding-logo-logo">images/group.png</forrest:property>
</forrest:contract>
- </forrest:hook>
- <forrest:hook class="logo">
+ </forrest:hook>
+ <forrest:hook class="logo">
<forrest:contract name="branding-logo">
- <forrest:properties contract="branding-logo">
- <forrest:property name="branding-logo-name">
- MyProject</forrest:property>
- <forrest:property name="branding-logo-description">MyProject
- Description</forrest:property>
- <forrest:property name="branding-logo-url">
- http://myproj.mygroup.org/</forrest:property>
- <forrest:property name="branding-logo-logo">
- images/project.png</forrest:property>
- </forrest:properties>
+ <forrest:property name="branding-logo-name">MyProject</forrest:property>
+ <forrest:property name="branding-logo-description">MyProject Description</forrest:property>
+ <forrest:property name="branding-logo-url">http://myproj.mygroup.org/</forrest:property>
+ <forrest:property name="branding-logo-logo">images/project.png</forrest:property>
</forrest:contract>
</forrest:hook>
+ <!--
<forrest:contract name="search-input">
<forrest:properties contract="search-input">
<forrest:property name="input-size">25</forrest:property>
@@ -298,7 +302,9 @@
<forrest:contract name="siteinfo-current-time"/>
</forrest:hook>
</forrest:hook>
+ -->
</forrest:hook>
+ <!--
<forrest:hook name="page">
<forrest:contract name="branding-breadcrumbs">
<forrest:properties contract="branding-breadcrumbs">
@@ -487,8 +493,9 @@
</forrest:contract>
</forrest:hook>
+-->
</forrest:hook>
- -->
+
</forrest:view>
</forrest:views>