Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft?rev=232682&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft
Sun Aug 14 17:51:56 2005
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 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 name="nav-section" type="nugget"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <description>
+ nav-section will output the navigation to pages within the current site section AKA menu
+ </description>
+ <usage><![CDATA[<forrest:contract name="nav-section"/>]]></usage>
+ <forrest:template
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ format="xhtml" name="nav-section" inputFormat="xsl" body="true" head="true">
+
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="nav-section-head">
+ <script type="text/javascript" language="javascript"
+ src="{$root}skin/menu.js"> </script>
+ </xsl:template>
+
+ <xsl:template name="nav-section-body">
+<xsl:comment>+
+ |start menu
+ +</xsl:comment>
+ <xsl:if test="div[@id='menu']/ul/li">
+ <xsl:call-template name="menu"/>
+ </xsl:if>
+<xsl:comment>+
+ |end menu
+ +</xsl:comment>
+ </xsl:template>
+ <xsl:template name="menu">
+<xsl:comment>+
+ |start Menu
+ +</xsl:comment>
+ <div id="nav-section">
+ <ul>
+<!--menu - inner-->
+ <xsl:for-each select = "div[@id='menu']/ul/li">
+ <xsl:call-template name = "innermenuli" >
+ <xsl:with-param name="id" select="concat('1.', position())"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </ul>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="innermenuli">
+ <xsl:param name="id"/>
+ <xsl:variable name="tagid">
+ <xsl:choose>
+ <xsl:when test="descendant-or-self::node()/li/div/@class='current'"><xsl:value-of
select="concat('menu_selected_',$id)"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="concat('menu_',concat(font,$id))"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="whichGroup">
+ <xsl:choose>
+ <xsl:when test="descendant-or-self::node()/li/div/@class='current'">selectedmenuitemgroup</xsl:when>
+ <xsl:otherwise>menuitemgroup</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <li class="pagegroup" id="{$tagid}Title"><span onclick="SwitchMenu('{$tagid}',
'{$root}skin/')"><xsl:value-of select="h1"/></span>
+ <ul class="{$whichGroup}" id="{$tagid}">
+ <xsl:for-each select= "ul/li">
+
+ <xsl:choose>
+ <xsl:when test="a">
+ <li class="menuitem"><a href="{a/@href}" title="{a/@title}"><xsl:value-of
select="a" /></a></li>
+ </xsl:when>
+ <xsl:when test="div/@class='current'">
+ <li class="menupage">
+ <div class="menupagetitle"><xsl:value-of select="div" /></div>
+ <xsl:if test="$config/toc/@max-depth>0 and contains($minitoc-location,'menu')">
+ <ul>
+ <li class="menupageitemgroup">
+ <xsl:for-each select = "//tocitems/tocitem">
+ <div class="menupageitem">
+ <xsl:choose>
+ <xsl:when test="string-length(@title)>15">
+ <a href="{@href}" title="{@title}"><xsl:value-of
+ select="substring(@title,0,20)" />...</a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{@href}">
+ <xsl:value-of select="@title" />
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </xsl:for-each>
+ </li>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name = "innermenuli">
+ <xsl:with-param name="id" select="concat($id, '.', position())"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:for-each>
+ </ul></li>
+ <script>SwitchMenu('<xsl:value-of select="$tagid"/>', '<xsl:value-of
select="$root"/>skin/')</script>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
\ No newline at end of file
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/nav-section.ft
------------------------------------------------------------------------------
svn:keywords = Id svn:eol-style=native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/search-input.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/search-input.ft?rev=232682&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/search-input.ft
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/search-input.ft
Sun Aug 14 17:51:56 2005
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 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 name="search-input" type="nugget"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <description>
+ search-input will output the default search form.
+ </description>
+ <usage><![CDATA[<forrest:contract name="search-input">
+ <forrest:properties contract="search-input">
+ <forrest:property name="input-size">25</forrest:property>
+ </forrest:properties>]
+</forrest:contract>]]></usage>
+
+ <forrest:template
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ format="xhtml" name="search-input" inputFormat="xsl" body="true" head="true">
+
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <!--FIXME: IMO each search provider should provide a form. This form should be refactored
into
+ a meta-search from-->
+ <xsl:template name="search-input-head">
+ <script type="text/javascript" language="javascript" src="{$root}skin/getBlank.js"> </script>
+ </xsl:template>
+
+ <xsl:template name="search-input-body">
+ <xsl:param name="input-size">25</xsl:param>
+<xsl:comment>+
+ |start Search
+ +</xsl:comment>
+ <div class="searchbox">
+ <div class="round-top-left-small">
+ <div class="round-top-right-small">
+ <div class="search-input">
+ <!-- Form prompt -->
+ <xsl:variable name="search-prompt">
+ <i18n:text>Search the site with</i18n:text>
+ <xsl:value-of select="$config/search/@provider"/>
+ </xsl:variable>
+ <!-- Form action -->
+ <xsl:variable name="search-action">
+ <xsl:choose>
+ <xsl:when test="$config/search/@provider = 'lucene'">
+ <xsl:value-of select="$root"/>
+ <xsl:value-of select="$lucene-search"/>
+ </xsl:when>
+ <xsl:otherwise>http://www.google.com/search</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <!-- Form query field -->
+ <xsl:variable name="search-query">
+ <xsl:choose>
+ <xsl:when test="$config/search/@provider = 'lucene'">
+ queryString</xsl:when>
+ <xsl:otherwise>q</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <!-- Search form generation -->
+ <form method="get" action="{$search-action}">
+ <div class="search-hidden">
+ <input type="hidden" name="sitesearch"
+ value="{$config/search/@domain}"/>
+ </div>
+ <div class="search-field">
+ <input type="text" name="{$search-query}"
+ size="{$input-size}" value="{normalize-space($search-prompt)}"
+ onFocus="getBlank(this, '{normalize-space($search-prompt)}');"
+ onBlur="getPrompt(this, '{normalize-space($search-prompt)}');"/>
+ </div>
+ <div class="search-submit">
+ <input type="submit" value="Search" name="Search"
+ i18n:attr="value"/>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ <xsl:comment>+ |end search +</xsl:comment>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/search-input.ft
------------------------------------------------------------------------------
svn:keywords = Id svn:eol-style=native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/siteinfo-credits.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/siteinfo-credits.ft?rev=232682&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/siteinfo-credits.ft
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/siteinfo-credits.ft
Sun Aug 14 17:51:56 2005
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2002-2004 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="siteinfo-credits" type="nugget">
+ <description>
+ siteinfo-credits - Template will output the siteinfo-credits with pelt look'n feel.
+ </description>
+ <usage><![CDATA[<forrest:contract name="siteinfo-credits">
+ [<forrest:properties contract="siteinfo-credits">
+ <forrest:property name="box-location"></forrest:property>
+ <forrest:property name="top-separator">[true|<strong>false</strong>]</forrest:property>
+ <forrest:property name="use-role-as-prefix">[true|<strong>false</strong>]</forrest:property>
+ </forrest:properties>]
+ </forrest:contract>]]></usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ format="xhtml" name="siteinfo-credits" inputFormat="xsl" body="true" head="false">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="siteinfo-credits-body">
+ <xsl:param name="box-location"></xsl:param>
+ <xsl:param name="top-separator">false</xsl:param>
+ <xsl:param name="use-role-as-prefix">false</xsl:param>
+ <xsl:if test="$config/credits/credit[@box-location = $box-location]">
+ <xsl:comment>
+ |start siteinfo-credits
+ </xsl:comment>
+ <div id="{$box-location}">
+ <xsl:if test="$top-separator = 'true'">
+ <hr/>
+ </xsl:if>
+ <xsl:for-each select="$config/credits/credit[not(@role='pdf') and @box-location = $box-location]">
+ <!-- xsl:if test="@box-location = $box-location" -->
+ <xsl:variable name="name" select="name"/>
+ <xsl:variable name="url" select="url"/>
+ <xsl:variable name="image" select="image"/>
+ <xsl:variable name="width" select="width"/>
+ <xsl:variable name="height" select="height"/>
+ <a href="{$url}">
+ <img alt="{$name} - logo" title="{$name}" border="0">
+ <xsl:attribute name="src">
+ <xsl:if test="not(starts-with($image, 'http://'))"><xsl:value-of select="$root"/></xsl:if>
+ <xsl:value-of select="$image"/>
+ </xsl:attribute>
+ <xsl:attribute name="style">
+ <xsl:if test="$width">width: <xsl:value-of select="$width"/>px;</xsl:if>
+ <xsl:if test="$height">height: <xsl:value-of select="$height"/>px;</xsl:if>
+ </xsl:attribute>
+ </img>
+ </a>
+ <!-- /xsl:if -->
+ </xsl:for-each>
+ <xsl:comment>+
+ |end siteinfo-credits
+ +</xsl:comment>
+ </div>
+ </xsl:if>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/pelt/siteinfo-credits.ft
------------------------------------------------------------------------------
svn:keywords = Id svn:eol-style=native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-current-time.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-current-time.ft?rev=232682&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-current-time.ft
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-current-time.ft
Sun Aug 14 17:51:56 2005
@@ -0,0 +1,38 @@
+<?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:forrest="http://apache.org/forrest/templates/1.0"
+ name="siteinfo-current-time"
+ type="nugget">
+ <description>
+ siteinfo-current-time will output the current time and date with the help of jscript.
+ </description>
+ <usage><![CDATA[<forrest:contract name="siteinfo-current-time"/>]]></usage>
+ <forrest:template
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ format="xhtml" name="siteinfo-current-time" inputFormat="xsl" body="true" head="false">
+ <xsl:stylesheet version="1.1"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="siteinfo-current-time-body">
+ <script type="text/javascript">document.write("<i18n:text >Today:</i18n:text> "
+ new Date());</script>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-current-time.ft
------------------------------------------------------------------------------
svn:keywords = Id svn:eol-style=native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta-icon.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta-icon.ft?rev=232682&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta-icon.ft
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta-icon.ft
Sun Aug 14 17:51:56 2005
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 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:forrest="http://apache.org/forrest/templates/1.0"
+ name="siteinfo-meta-icon"
+ type="nugget">
+ <description>
+ siteinfo-meta-icon will output the html additional shortcut icon in head element.
+ This icon is generally displayed by browser at the beginning of the URL.
+ </description>
+ <usage><![CDATA[<forrest:contract name="siteinfo-meta-icon"/>]]></usage>
+ <forrest:template
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ format="xhtml" name="siteinfo-meta-icon" inputFormat="xsl" body="false" head="true">
+ <xsl:stylesheet version="1.1"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="siteinfo-meta-icon-head">
+<!--+
+ |favicon
+ +-->
+ <xsl:if test="//skinconfig/favicon-url">
+ <link rel="shortcut icon">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat($root,//skinconfig/favicon-url)"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template >
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta-icon.ft
------------------------------------------------------------------------------
svn:keywords = Id svn:eol-style=native
|