Author: thorsten
Date: Wed Dec 7 07:52:42 2005
New Revision: 354781
URL: http://svn.apache.org/viewcvs?rev=354781&view=rev
Log:
Added css as first "other" format besides html to implement the structurer.
Checked in an example reachable at localhost:8888/test.css.
Added:
forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/common/css/branding-generic-css.ft
Modified:
forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/index-foo.fv
Modified:
forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/index-foo.fv
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/index-foo.fv?rev=354781&r1=354780&r2=354781&view=diff
==============================================================================
---
forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/index-foo.fv
(original)
+++
forrest/trunk/main/template-sites/v2/src/documentation/content/xdocs/index-foo.fv
Wed Dec 7 07:52:42 2005
@@ -1,22 +1,27 @@
-<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ <forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
- <forrest:view type="xml">
- <forrest:hook name="test">
- <forrest:contract name="nav-main-testing"
- dataURI="cocoon://index.navigation.xml">
- <forrest:property name="nav-main-testing-test1" >x</forrest:property>
- <forrest:property name="nav-main-testing-test2" >
- <foo/>
- </forrest:property>
- <forrest:property name="nav-main-testing-test3" >xxx</forrest:property>
- </forrest:contract>
- </forrest:hook>
+ <forrest:view type="css" hooksXpath="/">
+ <forrest:contract name="branding-generic-css">
+ <forrest:property name="branding-generic-css-input">
+ /* Extra css */
+ p.quote {
+ margin-left: 2em;
+ padding: .5em;
+ background-color: #f0f0f0;
+ font-family: monospace;
+ }
+ </forrest:property>
+ </forrest:contract>
</forrest:view>
<forrest:view type="html" hooksXpath="/html/body">
- <forrest:hook name="test">
- <forrest:hook name="anotherXz">
+ <forrest:hook name="anotherXz">
<forrest:contract name="nav-main-testing-foo" />
+ <![CDATA[<forrest:contract name="nav-main-testing"
nugget="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>]]>
</forrest:hook>
+ <forrest:hook name="test">
+ <!-- <forrest:hook element="xXx">test</forrest:hook>-->
+ <!--<xXx>test</xXx>-->
+
<forrest:hook name="test2">
<forrest:contract name="nav-main-testing"
dataURI="cocoon://index.navigation.xml">
@@ -29,4 +34,4 @@
</forrest:hook>
<forrest:hook name="anotherX"/>
</forrest:view>
-</forrest:views>
\ No newline at end of file
+</forrest:views>
Added:
forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/common/css/branding-generic-css.ft
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/common/css/branding-generic-css.ft?rev=354781&view=auto
==============================================================================
---
forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/common/css/branding-generic-css.ft
(added)
+++
forrest/trunk/main/template-sites/v2/src/documentation/resources/themes/common/css/branding-generic-css.ft
Wed Dec 7 07:52:42 2005
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2005 The Apache Software Foundation or its licensors,
+ as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<forrest:contract
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="branding-generic-css" type="nugget">
+
+ <!--NOTE:
+ When using the branding-generic-css template as c'n p master just search
and replace 'branding-generic-css' by the {contract-name}!-->
+
+ <description>
+ {contract-name} will output {contract-funtion}. This is just a
branding-generic-css contract, it will output *nothing*.
+ </description>
+ <usage><![CDATA[<forrest:contract name="branding-generic-css"/>]]></usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="branding-generic-css" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="branding-generic-css-input"/>
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part>
+ <xsl:value-of select="$branding-generic-css-input"/>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
\ No newline at end of file