You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/11/29 05:56:08 UTC

svn commit: r885191 - in /incubator/pivot: site/trunk/ site/trunk/xsl/ trunk/demos/www/ trunk/demos/xsl/

Author: tvolkert
Date: Sun Nov 29 04:56:07 2009
New Revision: 885191

URL: http://svn.apache.org/viewvc?rev=885191&view=rev
Log:
Site updates

Added:
    incubator/pivot/site/trunk/xsl/demo-index.xsl   (with props)
Modified:
    incubator/pivot/site/trunk/build.xml
    incubator/pivot/site/trunk/xsl/auxilliary.xsl
    incubator/pivot/site/trunk/xsl/project.xml
    incubator/pivot/site/trunk/xsl/project.xsl
    incubator/pivot/trunk/demos/www/decorators.xml
    incubator/pivot/trunk/demos/www/index.xml
    incubator/pivot/trunk/demos/xsl/index.xsl

Modified: incubator/pivot/site/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/build.xml?rev=885191&r1=885190&r2=885191&view=diff
==============================================================================
--- incubator/pivot/site/trunk/build.xml (original)
+++ incubator/pivot/site/trunk/build.xml Sun Nov 29 04:56:07 2009
@@ -46,6 +46,17 @@
             <param name="demos" expression="${folder.trunk}/demos/www"/>
         </xslt>
 
+        <!-- Transform the demos index -->
+        <xslt basedir="${folder.trunk}/demos/www"
+            includes="index.xml"
+            destdir="${folder.bin}/demos"
+            extension=".html"
+            style="xsl/demo-index.xsl">
+            <param name="release" expression="${version}"/>
+            <param name="demos" expression="${folder.trunk}/demos/www"/>
+            <param name="base" expression="../"/>
+        </xslt>
+
         <!-- Transform the demos pages -->
         <xslt basedir="${folder.trunk}/demos/www"
             includes="**/*.xml"

Modified: incubator/pivot/site/trunk/xsl/auxilliary.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/auxilliary.xsl?rev=885191&r1=885190&r2=885191&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/auxilliary.xsl (original)
+++ incubator/pivot/site/trunk/xsl/auxilliary.xsl Sun Nov 29 04:56:07 2009
@@ -27,7 +27,7 @@
                 <xsl:call-template name="group-navigation"/>
             </ul>
             <div class="content">
-                <xsl:apply-templates/>
+                <xsl:call-template name="content"/>
             </div>
         </div>
     </xsl:template>
@@ -37,6 +37,11 @@
         <xsl:apply-templates select="$project/item-groups/item-group[@id=$item-group]/item"/>
     </xsl:template>
 
+    <!-- Auxilliary content area -->
+    <xsl:template name="content">
+        <xsl:apply-templates/>
+    </xsl:template>
+
     <!-- <section> translates to an anchor, a title, and nested content -->
     <xsl:template match="section">
         <xsl:variable name="name" select="@name"/>

Added: incubator/pivot/site/trunk/xsl/demo-index.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/demo-index.xsl?rev=885191&view=auto
==============================================================================
--- incubator/pivot/site/trunk/xsl/demo-index.xsl (added)
+++ incubator/pivot/site/trunk/xsl/demo-index.xsl Sun Nov 29 04:56:07 2009
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you 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.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:import href="auxilliary.xsl"/>
+
+    <!-- Override group navigation to pull from the demos index -->
+    <xsl:template name="group-navigation">
+        <xsl:apply-templates select="$demos-index/body//application-item"/>
+    </xsl:template>
+
+    <!-- Override content area to show demos index -->
+    <xsl:template name="content">
+        <ul class="featuredDemos">
+            <xsl:for-each select="application-item[boolean(@featured)]">
+                <xsl:choose>
+                    <xsl:when test="remote">
+                        <xsl:call-template name="featured-demo">
+                            <xsl:with-param name="id" select="@id"/>
+                            <xsl:with-param name="title" select="properties/title"/>
+                            <xsl:with-param name="description" select="properties/description"/>
+                            <xsl:with-param name="href" select="remote/@href"/>
+                            <xsl:with-param name="new-window" select="@new-window"/>
+                            <xsl:with-param name="last" select="position()=last()"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:variable name="demo" select="document(concat($demos, '/', @id, '.xml'))/document"/>
+                        <xsl:call-template name="featured-demo">
+                            <xsl:with-param name="id" select="@id"/>
+                            <xsl:with-param name="title" select="$demo/properties/title"/>
+                            <xsl:with-param name="description" select="$demo/properties/description"/>
+                            <xsl:with-param name="href" select="concat($base, 'demos/', @id, '.html')"/>
+                            <xsl:with-param name="new-window" select="@new-window"/>
+                            <xsl:with-param name="last" select="position()=last()"/>
+                        </xsl:call-template>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:for-each>
+        </ul>
+
+        <h2>Other Demos</h2>
+        <ul class="otherDemos">
+            <xsl:for-each select="application-item[not(boolean(@featured))]">
+                <xsl:choose>
+                    <xsl:when test="remote">
+                        <xsl:call-template name="other-demo">
+                            <xsl:with-param name="title" select="properties/title"/>
+                            <xsl:with-param name="description" select="properties/description"/>
+                            <xsl:with-param name="href" select="remote/@href"/>
+                            <xsl:with-param name="new-window" select="@new-window"/>
+                        </xsl:call-template>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:variable name="demo" select="document(concat($demos, '/', @id, '.xml'))/document"/>
+                        <xsl:call-template name="other-demo">
+                            <xsl:with-param name="title" select="$demo/properties/title"/>
+                            <xsl:with-param name="description" select="$demo/properties/description"/>
+                            <xsl:with-param name="href" select="concat($base, 'demos/', @id, '.html')"/>
+                            <xsl:with-param name="new-window" select="@new-window"/>
+                        </xsl:call-template>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:for-each>
+        </ul>
+    </xsl:template>
+
+    <xsl:template name="featured-demo">
+        <xsl:param name="id"/>
+        <xsl:param name="title"/>
+        <xsl:param name="description"/>
+        <xsl:param name="href"/>
+        <xsl:param name="new-window"/>
+        <xsl:param name="last"/>
+
+        <xsl:variable name="target">
+            <xsl:choose>
+                <xsl:when test="boolean($new-window)">_new</xsl:when>
+                <xsl:otherwise>_self</xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+
+        <xsl:variable name="list-item-style">
+            <xsl:if test="boolean($last)">margin-right:0;</xsl:if>
+        </xsl:variable>
+
+        <li style="{$list-item-style}">
+            <h2><xsl:value-of select="$title"/></h2>
+            <div class="featuredDemosBox">
+                <xsl:if test="$project/demo-screenshots/screenshot[@id=$id]">
+                    <xsl:variable name="src">
+                        <xsl:value-of select="$base"/>
+                        <xsl:value-of select="$project/demo-screenshots/screenshot[@id=$id]"/>
+                    </xsl:variable>
+                    <p class="featuredDemoImg">
+                        <a href="{$href}" target="{$target}">
+                            <img src="{$src}" alt="{$title}"/>
+                        </a>
+                    </p>
+                </xsl:if>
+                <p class="featuredDemoDesc">
+                    <xsl:value-of select="$description"/>
+                </p>
+                <p class="featuredDemoView">
+                    <a href="{$href}" target="{$target}">View</a>
+                </p>
+            </div>
+        </li>
+    </xsl:template>
+
+    <xsl:template name="other-demo">
+        <xsl:param name="title"/>
+        <xsl:param name="description"/>
+        <xsl:param name="href"/>
+        <xsl:param name="new-window"/>
+
+        <xsl:variable name="target">
+            <xsl:choose>
+                <xsl:when test="boolean($new-window)">_new</xsl:when>
+                <xsl:otherwise>_self</xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+
+        <li>
+            <strong><xsl:value-of select="$title"/></strong>
+            <em><xsl:value-of select="$description"/></em>
+            <div class="btnView"><a href="{$href}" target="{$target}"><span>View</span></a></div>
+        </li>
+    </xsl:template>
+</xsl:stylesheet>

Propchange: incubator/pivot/site/trunk/xsl/demo-index.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/pivot/site/trunk/xsl/demo-index.xsl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/pivot/site/trunk/xsl/project.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/project.xml?rev=885191&r1=885190&r2=885191&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/project.xml (original)
+++ incubator/pivot/site/trunk/xsl/project.xml Sun Nov 29 04:56:07 2009
@@ -65,4 +65,12 @@
             <item name="Thanks" href="~asf/foundation/thanks.html" footer="false"/>
         </item-group>
     </item-groups>
+
+    <demo-screenshots>
+        <screenshot id="kitchen-sink">images/demos_feat_kitchen.jpg</screenshot>
+        <screenshot id="stock-tracker">images/demos_feat_stock.jpg</screenshot>
+        <screenshot id="itunes-search">images/demos_feat_itunes.jpg</screenshot>
+        <screenshot id="charting">images/demos_feat_chart.jpg</screenshot>
+        <screenshot id="decorators">images/demos_feat_deco.jpg</screenshot>
+    </demo-screenshots>
 </project>

Modified: incubator/pivot/site/trunk/xsl/project.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/site/trunk/xsl/project.xsl?rev=885191&r1=885190&r2=885191&view=diff
==============================================================================
--- incubator/pivot/site/trunk/xsl/project.xsl (original)
+++ incubator/pivot/site/trunk/xsl/project.xsl Sun Nov 29 04:56:07 2009
@@ -210,12 +210,8 @@
         </xsl:variable>
         <xsl:variable name="target">
             <xsl:choose>
-                <xsl:when test="boolean(@new-window)">
-                    <xsl:value-of select="'_new'"/>
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:value-of select="'_self'"/>
-                </xsl:otherwise>
+                <xsl:when test="boolean(@new-window)">_new</xsl:when>
+                <xsl:otherwise>_self</xsl:otherwise>
             </xsl:choose>
         </xsl:variable>
         <li><a href="{$href}" target="{$target}"><xsl:value-of select="$demo/properties/title"/></a></li>
@@ -229,12 +225,8 @@
     <xsl:template match="application-item[remote]">
         <xsl:variable name="target">
             <xsl:choose>
-                <xsl:when test="boolean(@new-window)">
-                    <xsl:value-of select="'_new'"/>
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:value-of select="'_self'"/>
-                </xsl:otherwise>
+                <xsl:when test="boolean(@new-window)">_new</xsl:when>
+                <xsl:otherwise>_self</xsl:otherwise>
             </xsl:choose>
         </xsl:variable>
         <xsl:variable name="href" select="remote/@href"/>

Modified: incubator/pivot/trunk/demos/www/decorators.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/www/decorators.xml?rev=885191&r1=885190&r2=885191&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/www/decorators.xml (original)
+++ incubator/pivot/trunk/demos/www/decorators.xml Sun Nov 29 04:56:07 2009
@@ -20,10 +20,8 @@
     <properties>
         <title>Decorators</title>
         <description>
-            Demonstrates the use of "decorators" in Pivot. Decorators allow a developer to attach
-            additional presentation to components, such as drop shadows, reflections, image
-            effects, etc. This example shows a window with a reflection decorator and a frame with
-            a fade decorator.
+            Decorators allow a developer to attach additional presentation to components, such as
+            drop shadows, reflections, image effects, etc.
         </description>
     </properties>
 

Modified: incubator/pivot/trunk/demos/www/index.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/www/index.xml?rev=885191&r1=885190&r2=885191&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/www/index.xml (original)
+++ incubator/pivot/trunk/demos/www/index.xml Sun Nov 29 04:56:07 2009
@@ -18,7 +18,7 @@
 
 <document>
     <properties>
-        <title>Pivot Demos</title>
+        <title>Demos</title>
     </properties>
 
     <body>
@@ -27,9 +27,9 @@
             <a href="http://www.java.com/">Java 6</a> or greater.
         </p>
         <application-item id="kitchen-sink" footer="true" featured="true" new-window="true"/>
-        <application-item id="stock-tracker"/>
-        <application-item id="component-explorer" footer="true" featured="true" new-window="true"/>
-        <application-item id="itunes-search"/>
+        <application-item id="stock-tracker" featured="true"/>
+        <application-item id="component-explorer" footer="true" new-window="true"/>
+        <application-item id="itunes-search" featured="true"/>
         <application-item id="charting" footer="true" featured="true" new-window="true">
             <remote href="http://ixnay.biz/charts.html"/>
             <properties>
@@ -59,7 +59,7 @@
         <application-item id="large-data"/>
         <application-item id="rss-feed"/>
         <application-item id="dom-interaction"/>
-        <application-item id="decorators"/>
+        <application-item id="decorators" featured="true"/>
         <application-item id="fixed-column-table"/>
         <application-item id="multiselect"/>
     </body>

Modified: incubator/pivot/trunk/demos/xsl/index.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/xsl/index.xsl?rev=885191&r1=885190&r2=885191&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/xsl/index.xsl (original)
+++ incubator/pivot/trunk/demos/xsl/index.xsl Sun Nov 29 04:56:07 2009
@@ -110,7 +110,7 @@
                 <h3><xsl:value-of select="properties/title"/></h3>
                 <p>
                     <xsl:choose>
-                        <xsl:when test="@new-window='true'">
+                        <xsl:when test="boolean(@new-window)">
                             <a href="{$href}" target="_new">Applet</a>
                         </xsl:when>
                         <xsl:otherwise>
@@ -126,7 +126,7 @@
                 <h3><xsl:value-of select="$demo/properties/title"/></h3>
                 <p>
                     <xsl:choose>
-                        <xsl:when test="@new-window='true'">
+                        <xsl:when test="boolean(@new-window)">
                             <a href="{$id}.html" target="_new">Applet</a>
                         </xsl:when>
                         <xsl:otherwise>