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 2011/12/27 00:30:47 UTC
svn commit: r1224835 - in /maven/skins/trunk/maven-fluido-skin/src:
it/mskins-22/ it/mskins-22/src/ it/mskins-22/src/site/
it/mskins-22/src/site/apt/ main/resources/META-INF/maven/
Author: simonetripodi
Date: Mon Dec 26 23:30:47 2011
New Revision: 1224835
URL: http://svn.apache.org/viewvc?rev=1224835&view=rev
Log:
[MSKINS-22] Add GitHub ribbons support
Added:
maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/pom.xml (with props)
maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/
maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/index.apt.vm (with props)
maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/site.xml (with props)
Modified:
maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
Added: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/pom.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/pom.xml?rev=1224835&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/pom.xml (added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/pom.xml Mon Dec 26 23:30:47 2011
@@ -0,0 +1,93 @@
+<?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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-parent</artifactId>
+ <version>21</version>
+ </parent>
+
+ <groupId>org.apache.maven.skins.its</groupId>
+ <artifactId>@project.artifactId@-sidebar</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>@project.name@ IT, sidebar layout</name>
+ <url>http://maven.apache.org/skins/@project.artifactId@/sidebar/</url>
+
+ <properties>
+ <skinName>@project.name@</skinName>
+ <skinDescription>@project.description@</skinDescription>
+ <skinGroupId>@project.groupId@</skinGroupId>
+ <skinArtifactId>@project.artifactId@</skinArtifactId>
+ <skinVersion>@project.version@</skinVersion>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.0</version>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
+ <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ <report>summary</report>
+ <report>license</report>
+ <report>project-team</report>
+ <report>scm</report>
+ <report>issue-tracking</report>
+ <report>mailing-list</report>
+ <report>dependencies</report>
+ <report>cim</report>
+ <report>plugin-management</report>
+ <report>plugins</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/index.apt.vm
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/index.apt.vm?rev=1224835&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/index.apt.vm (added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/index.apt.vm Mon Dec 26 23:30:47 2011
@@ -0,0 +1,16 @@
+ ------
+ ${project.name}
+ ------
+ Simo
+ ------
+ 2011-12-26
+ ------
+
+${project.name}
+
+ This is a test for ${skinName} with GitHub ribbon enabled.
+ ${skinDescription}
+
+* Actual configuration
+
+%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml}
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/index.apt.vm
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/index.apt.vm
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/apt/index.apt.vm
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/site.xml?rev=1224835&view=auto
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/site.xml (added)
+++ maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/site.xml Mon Dec 26 23:30:47 2011
@@ -0,0 +1,87 @@
+<?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.
+ */
+ -->
+
+<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
+ name="${skinName}">
+
+ <skin>
+ <groupId>${skinGroupId}</groupId>
+ <artifactId>${skinArtifactId}</artifactId>
+ <version>${skinVersion}</version>
+ </skin>
+
+ <!-- START SNIPPET: skin-custom-config -->
+ <custom>
+ <fluidoSkin>
+ <gitHub>
+ <projectId>99soft/backport-spi</projectId>
+ <ribbonOrientation>right</ribbonOrientation>
+ <ribbonColor>black</ribbonColor>
+ </gitHub>
+ </fluidoSkin>
+ </custom>
+ <!-- END SNIPPET: skin-custom-config -->
+
+ <publishDate format="yyyy-MM-dd" position="right" />
+ <version position="right" />
+
+ <body>
+ <breadcrumbs>
+ <item name="skins" href="/skins/"/>
+ <item name="${skinArtifactId}" href="/skins/${skinArtifactId}/"/>
+ </breadcrumbs>
+
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ <footer>
+ <div class="row span16">Apache Maven, Apache @project.name@, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+ <div class="row span16">
+ <div class="span4">
+ <address>
+ <strong>The Apache Software Foundation</strong><br/>
+ <i>Dept. 9660</i><br/>
+ <i>Los Angeles, CA 90084-9660</i><br/>
+ <i>USA</i><br/>
+ <abbr title="Fax">Fax:</abbr> <i>+1.919.573.9199</i>
+ </address>
+ </div>
+ <div class="span4">
+ <address>
+ <strong>The Apache Software Foundation</strong><br/>
+ <i>1901 Munsey Drive</i><br/>
+ <i>Forest Hill, MD 21050-2747</i><br/>
+ <i>USA</i><br/>
+ <a href="mailto:apache at apache dot org">apache at apache dot org</a>
+ </address>
+ </div>
+ </div>
+ </footer>
+ </body>
+
+</project>
\ No newline at end of file
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/site.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/site.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: maven/skins/trunk/maven-fluido-skin/src/it/mskins-22/src/site/site.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
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=1224835&r1=1224834&r2=1224835&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 Mon Dec 26 23:30:47 2011
@@ -543,6 +543,43 @@
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=search-form"></script>
#end
##
+#macro ( forkMeOnGitHub )
+ #if ( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'gitHub' )
+ && $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'gitHub' ).getChild( 'projectId' ) )
+
+ #set ( $gitHubProjectId = $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'gitHub' ).getChild( 'projectId' ).getValue() )
+
+ #set ( $leftRibbon = { "red" : "5d21241b64dc708fcbb701f68f72f41e9f1fadd6/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f7265645f6161303030302e706e67", "green" : "edc6dae7a1079163caf7f17c60495bbb6d027c93/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f677265656e5f3030373230302e706e67", "black" : "bec6c51521dcc8148146135149fe06a9cc737577/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67", "orange" : "6429057dfef9e98189338d22e7f6646c6694f032/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67", "gray" : "ce742187c818c67d98af16f96ed21c00160c234a/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f677261795f3664366436642e706e67" } )
+ #set ( $rightRibbon = { "red" : "e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67", "green" : "abad93f42020b733148435e2cd92ce15c542d320/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67", "black" : "7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67", "orange" : "30f550e0d38ceb6ef5b81500c64d970b7fb0f028/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67", "gray" : "71eeaab9d563c2b3c590319b398dd35683265e85/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" } )
+
+ #set ( $ribbon = $leftRibbon )
+ #set ( $ribbonOrientation = 'left' )
+ #set ( $definedRibbonOrientation = $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'gitHub' ).getChild( 'ribbonOrientation' ) )
+ #if ( $definedRibbonOrientation && $definedRibbonOrientation.getValue().equalsIgnoreCase( "right" ) )
+ #set ( $ribbonOrientation = 'right' )
+ #set ( $ribbon = $rightRibbon )
+ #end
+
+ #set ( $ribbonColor = 'red' )
+ #set ( $definedRibbonColor = $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'gitHub' ).getChild( 'ribbonColor' ) )
+
+ #if ( $definedRibbonColor
+ && ( $definedRibbonColor.getValue().equalsIgnoreCase( "red" )
+ || $definedRibbonColor.getValue().equalsIgnoreCase( "green" )
+ || $definedRibbonColor.getValue().equalsIgnoreCase( "black" )
+ || $definedRibbonColor.getValue().equalsIgnoreCase( "orange" )
+ || $definedRibbonColor.getValue().equalsIgnoreCase( "gray" ) ) )
+ #set ( $ribbonColor = $definedRibbonColor.getValue().toLowerCase() )
+ #end
+
+ <a href="http://github.com/$gitHubProjectId">
+ <img style="position: absolute; top: 0; $ribbonOrientation: 0; border: 0; z-index: 100;"
+ src="https://a248.e.akamai.net/assets.github.com/img/$ribbon.get( $ribbonColor )"
+ alt="Fork me on GitHub">
+ </a>
+ #end
+#end
+##
<html xmlns="http://www.w3.org/1999/xhtml"#if ( $locale ) xml:lang="$locale.language" lang="$locale.language"#end>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
@@ -591,6 +628,8 @@
#googleAnalytics( $decoration.googleAnalyticsAccountId )
</head>
<body>
+ #forkMeOnGitHub()
+
#set ( $sideBarEnabled = true )
#if ( $decoration.custom.getChild('fluidoSkin') )
#if ( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'sideBarEnabled' )