You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by si...@apache.org on 2012/03/18 22:30:37 UTC

svn commit: r1302226 - in /maven/skins/trunk/maven-fluido-skin: ./ src/it/mskins-33/ src/it/mskins-33/src/ src/it/mskins-33/src/site/ src/it/mskins-33/src/site/apt/ src/main/resources/META-INF/maven/ src/site/ src/site/apt/

Author: simonetripodi
Date: Sun Mar 18 21:30:36 2012
New Revision: 1302226

URL: http://svn.apache.org/viewvc?rev=1302226&view=rev
Log:
[MSKINS-33] Add Facebook like button integration

Added:
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/pom.xml
      - copied, changed from r1302052, maven/skins/trunk/maven-fluido-skin/src/it/mskins-24_topbar/pom.xml
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/apt/
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/apt/index.apt.vm
      - copied, changed from r1302052, maven/skins/trunk/maven-fluido-skin/src/it/mskins-24_topbar/src/site/apt/index.apt.vm
    maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/site.xml
      - copied, changed from r1302052, maven/skins/trunk/maven-fluido-skin/src/it/mskins-31/src/site/apt/site.xml
Modified:
    maven/skins/trunk/maven-fluido-skin/pom.xml
    maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
    maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm
    maven/skins/trunk/maven-fluido-skin/src/site/site.xml

Modified: maven/skins/trunk/maven-fluido-skin/pom.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/pom.xml?rev=1302226&r1=1302225&r2=1302226&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/pom.xml (original)
+++ maven/skins/trunk/maven-fluido-skin/pom.xml Sun Mar 18 21:30:36 2012
@@ -438,6 +438,51 @@
                   <outputDirectory>${project.build.directory}/site/mskins-31/</outputDirectory>
                 </configuration>
               </execution>
+              <execution>
+                <id>copy-mskins-33</id>
+                <phase>site</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <resources>
+                    <resource>
+                      <directory>${project.build.directory}/it/mskins-33/target/site/</directory>
+                    </resource>
+                  </resources>
+                  <outputDirectory>${project.build.directory}/site/mskins-33/</outputDirectory>
+                </configuration>
+              </execution>
+              <execution>
+                <id>copy-mskins-33_default</id>
+                <phase>site</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <resources>
+                    <resource>
+                      <directory>${project.build.directory}/it/mskins-33_default/target/site/</directory>
+                    </resource>
+                  </resources>
+                  <outputDirectory>${project.build.directory}/site/mskins-33_default/</outputDirectory>
+                </configuration>
+              </execution>
+              <execution>
+                <id>copy-mskins-33_default-topbar</id>
+                <phase>site</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <resources>
+                    <resource>
+                      <directory>${project.build.directory}/it/mskins-33_default-topbar/target/site/</directory>
+                    </resource>
+                  </resources>
+                  <outputDirectory>${project.build.directory}/site/mskins-33_default-topbar/</outputDirectory>
+                </configuration>
+              </execution>
             </executions>
           </plugin>
         </plugins>

Copied: maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/pom.xml (from r1302052, maven/skins/trunk/maven-fluido-skin/src/it/mskins-24_topbar/pom.xml)
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/pom.xml?p2=maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/pom.xml&p1=maven/skins/trunk/maven-fluido-skin/src/it/mskins-24_topbar/pom.xml&r1=1302052&r2=1302226&rev=1302226&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-24_topbar/pom.xml (original)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/pom.xml Sun Mar 18 21:30:36 2012
@@ -25,12 +25,12 @@
   </parent>
 
   <groupId>org.apache.maven.skins.its</groupId>
-  <artifactId>@project.artifactId@-mskins-24_topbar</artifactId>
+  <artifactId>@project.artifactId@-mskins-33</artifactId>
   <version>1.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
-  <name>@project.name@ IT, MSKINS-24</name>
-  <url>http://maven.apache.org/skins/@project.artifactId@/mskins-24_topbar/</url>
+  <name>@project.name@ IT, MSKINS-33</name>
+  <url>http://maven.apache.org/skins/@project.artifactId@/mskins-23/</url>
 
   <properties>
     <skinName>@project.name@</skinName>

Copied: maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/apt/index.apt.vm (from r1302052, maven/skins/trunk/maven-fluido-skin/src/it/mskins-24_topbar/src/site/apt/index.apt.vm)
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/apt/index.apt.vm?p2=maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/apt/index.apt.vm&p1=maven/skins/trunk/maven-fluido-skin/src/it/mskins-24_topbar/src/site/apt/index.apt.vm&r1=1302052&r2=1302226&rev=1302226&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-24_topbar/src/site/apt/index.apt.vm (original)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/apt/index.apt.vm Sun Mar 18 21:30:36 2012
@@ -3,12 +3,12 @@
  ------
  Simo
  ------
- 2011-12-26
+ 2012-03-18
  ------
 
 ${project.name}
 
- This is a test for ${skinName} with MOJOs profiles enabled.
+ This is a test for ${skinName} with Facebook like button.
  ${skinDescription}
 
 * Actual configuration

Copied: maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/site.xml (from r1302052, maven/skins/trunk/maven-fluido-skin/src/it/mskins-31/src/site/apt/site.xml)
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/site.xml?p2=maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/site.xml&p1=maven/skins/trunk/maven-fluido-skin/src/it/mskins-31/src/site/apt/site.xml&r1=1302052&r2=1302226&rev=1302226&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-31/src/site/apt/site.xml (original)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-33/src/site/site.xml Sun Mar 18 21:30:36 2012
@@ -31,6 +31,19 @@
     <version>${skinVersion}</version>
   </skin>
 
+  <!-- START SNIPPET: skin-custom-config -->
+  <custom>
+    <fluidoSkin>
+      <facebookLike>
+        <send>false</send>
+        <layout>button_count</layout>
+        <showFaces>true</showFaces>
+        <action>like</action>
+      </facebookLike>
+    </fluidoSkin>
+  </custom>
+  <!-- END SNIPPET: skin-custom-config -->
+
   <publishDate format="yyyy-MM-dd" position="right" />
   <version position="right" />
 

Modified: maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm?rev=1302226&r1=1302225&r2=1302226&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm (original)
+++ maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm Sun Mar 18 21:30:36 2012
@@ -591,6 +591,33 @@
   #end
 #end
 ##
+#macro ( facebookLike $sideBarEnabled )
+  #if ( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'facebookLike' )
+          && $project.url )
+    #set( $facebookLike = $decoration.custom.getChild( 'facebookLike' ) )
+    ## kindly hardcoded
+
+    #set( $layout = 'box_count' )
+    #if( !$sideBarEnabled )
+      #set( $layout = 'button_count' )
+    #end
+
+    #set( $colorscheme = 'light' )
+    #if( !$sideBarEnabled )
+      #set( $colorscheme = 'dark' )
+    #end
+
+    #set( $frameWidth = 'width:48px; height:80px' )
+    #if( !$sideBarEnabled )
+      #set( $frameWidth = 'width:80px; height:20px' )
+    #end
+
+    <iframe src="http://www.facebook.com/plugins/like.php?href=$project.url&send=false&layout=$layout&show-faces=false&action=like&colorscheme=$colorscheme"
+        scrolling="no" frameborder="0"
+        style="border:none; $frameWidth; margin-top: 10px;" #if( !$sideBarEnabled ) class="pull-right" #end></iframe>
+  #end
+#end
+##
 #macro ( followTwitter $sideBarEnabled )
   #if ( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'twitter' )
         && $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'twitter' ).getChild( 'user' ) )
@@ -809,6 +836,10 @@
           #end
 
           #if ( !$sideBarEnabled )
+            #facebookLike( $sideBarEnabled )
+          #end
+
+          #if ( !$sideBarEnabled )
             #followTwitter( $sideBarEnabled )
           #end
 
@@ -887,10 +918,12 @@
 
           <hr class="divider" />
 
-          #followTwitter( $sideBarEnabled )
-
-            <div id="poweredBy">
-            #poweredByLogo( $decoration.poweredBy )
+           <div id="poweredBy">
+             #facebookLike( $sideBarEnabled )
+             <div class="clear"></div>
+             #followTwitter( $sideBarEnabled )
+             <div class="clear"></div>
+             #poweredByLogo( $decoration.poweredBy )
             </div>
           </div>
         </div>

Modified: maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm?rev=1302226&r1=1302225&r2=1302226&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm (original)
+++ maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm Sun Mar 18 21:30:36 2012
@@ -307,3 +307,33 @@ Welcome to ${project.name}!
 +-----+
 
  Ohloh widgets will be rendered always in the footer as last element
+
+** Facebook like button
+
+ Since version <<1.2>>, fluido-skin supports the Facebook {{{http://developers.facebook.com/docs/reference/plugins/like/}like}}
+ to simplify its integration. Users must define:
+
+ * <<<custom.fluidoSkin.facebookLike.send>>>: <<optional>>, specifies whether to include a Send button with the Like button (<<<true>>> by default);
+
+ * <<<custom.fluidoSkin.facebookLike.showFaces>>>: <<optional>>, specifies whether to display profile photos below the button (standard layout only) (<<<false>>> by default);
+
+ * <<<custom.fluidoSkin.facebookLike.action>>>: <<optional>>, the verb to display on the button. Options: 'like', 'recommend' (<<<like>>> by default);
+
++-----+
+<project name="xxx">
+  [...]
+  <custom>
+    <fluidoSkin>
+      <facebookLike>
+        <send>true</send>
+        <showFaces>true</showFaces>
+        <action>like</action>
+      </facebookLike>
+    </fluidoSkin>
+  </custom>
+  [...]
+</project>
++-----+
+
+ By default, it is rendered in the sidebar, if the topbar only is available it will be rendered there.
+

Modified: maven/skins/trunk/maven-fluido-skin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/site/site.xml?rev=1302226&r1=1302225&r2=1302226&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/site/site.xml (original)
+++ maven/skins/trunk/maven-fluido-skin/src/site/site.xml Sun Mar 18 21:30:36 2012
@@ -36,6 +36,12 @@ under the License.
     <version>${project.version}</version>
   </skin>
 
+  <custom>
+    <fluidoSkin>
+      <facebookLike />
+    </fluidoSkin>
+  </custom>
+
   <body>
 
     <menu ref="parent"/>
@@ -66,6 +72,9 @@ under the License.
       <item name="MSKINS-24 (topbar)" href="./mskins-24_topbar/index.html"/>
       <item name="MSKINS-25" href="./mskins-25/index.html"/>
       <item name="MSKINS-31" href="./mskins-31/index.html"/>
+      <item name="MSKINS-33" href="./mskins-33/index.html"/>
+      <item name="MSKINS-33 (default)" href="./mskins-33_default/index.html"/>
+      <item name="MSKINS-33 (default, topbar)" href="./mskins-33_default-topbar/index.html"/>
     </menu>
 
     <menu ref="reports"/>