james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1078475 - in /james/project/trunk/maven-skin/src: main/resources/META-INF/maven/ main/resources/images/logos/ site/ site/apt/
Date Sun, 06 Mar 2011 14:36:51 GMT
Author: felixk
Date: Sun Mar  6 14:36:51 2011
New Revision: 1078475

URL: http://svn.apache.org/viewvc?rev=1078475&view=rev
Log:
Fix banner inheritence. See JAMES-1203

Added:
    james/project/trunk/maven-skin/src/main/resources/images/logos/asf-logo-reduced.gif  
(with props)
    james/project/trunk/maven-skin/src/main/resources/images/logos/james-imap-logo.gif   (with
props)
    james/project/trunk/maven-skin/src/main/resources/images/logos/james-mailets-logo.gif
  (with props)
    james/project/trunk/maven-skin/src/main/resources/images/logos/james-mpt-logo.gif   (with
props)
    james/project/trunk/maven-skin/src/main/resources/images/logos/james-project-logo.gif
  (with props)
    james/project/trunk/maven-skin/src/main/resources/images/logos/james-server-logo.gif 
 (with props)
Modified:
    james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm
    james/project/trunk/maven-skin/src/site/apt/index.apt
    james/project/trunk/maven-skin/src/site/site.xml

Modified: james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm?rev=1078475&r1=1078474&r2=1078475&view=diff
==============================================================================
--- james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm (original)
+++ james/project/trunk/maven-skin/src/main/resources/META-INF/maven/site.vm Sun Mar  6 14:36:51
2011
@@ -83,19 +83,26 @@
     #end
 ##
     #if( $banner.src )
-        #set ( $bsrc = $banner.src )
-        #if ( ! ( $bsrc.toLowerCase().startsWith("http:/") || $bsrc.toLowerCase().startsWith("https:/")
||
-                $bsrc.toLowerCase().startsWith("ftp:/") || $bsrc.toLowerCase().startsWith("mailto:/")
||
-                $bsrc.toLowerCase().startsWith("file:/") || ($bsrc.toLowerCase().indexOf("://")
!= -1) ) )
-            #set ( $bsrc = $PathTool.calculateLink( $bsrc, $relativePath ) )
-            #set ( $bsrc = $src.replaceAll( '\\', '/' ) )
-        #end
-        #if ( $banner.alt )
-            #set ( $alt = $banner.alt )
+        #set ( $src = $banner.src )
+      
+        ## Workaround for banner inheriting problems, see also skin docs
+        ## Right banner is always ASF reduced logo, image included in skin
+        #if( $id.toLowerCase().equals('bannerright') )
+            #set ( $src = 'images/logos/asf-logo-reduced.gif' )
         #else
-            #set ( $alt = $banner.name )
+            ## Left banner is constructed by a fix path and the value given in the <alt>
tag
+            #set ( $src = 'images/logos/' + $banner.alt )
+            #if ( ! ( $src.toLowerCase().startsWith("http:/") || $src.toLowerCase().startsWith("https:/")
||
+                    $src.toLowerCase().startsWith("ftp:/") || $src.toLowerCase().startsWith("mailto:/")
||
+                    $src.toLowerCase().startsWith("file:/") || ($src.toLowerCase().indexOf("://")
!= -1) ) )
+                #set ( $src = $PathTool.calculateLink( $src, $relativePath ) )
+                #set ( $src = $src.replaceAll( '\\', '/' ) )
+            #end
         #end
-        <img src="$bsrc" alt="$alt" />
+        #set ( $alt = $banner.name )
+        ## End Workaround
+
+        <img src="$src" alt="$alt" />
     #else
         $banner.name
     #end

Added: james/project/trunk/maven-skin/src/main/resources/images/logos/asf-logo-reduced.gif
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/main/resources/images/logos/asf-logo-reduced.gif?rev=1078475&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/project/trunk/maven-skin/src/main/resources/images/logos/asf-logo-reduced.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/project/trunk/maven-skin/src/main/resources/images/logos/james-imap-logo.gif
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/main/resources/images/logos/james-imap-logo.gif?rev=1078475&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/project/trunk/maven-skin/src/main/resources/images/logos/james-imap-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/project/trunk/maven-skin/src/main/resources/images/logos/james-mailets-logo.gif
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/main/resources/images/logos/james-mailets-logo.gif?rev=1078475&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/project/trunk/maven-skin/src/main/resources/images/logos/james-mailets-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/project/trunk/maven-skin/src/main/resources/images/logos/james-mpt-logo.gif
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/main/resources/images/logos/james-mpt-logo.gif?rev=1078475&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/project/trunk/maven-skin/src/main/resources/images/logos/james-mpt-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/project/trunk/maven-skin/src/main/resources/images/logos/james-project-logo.gif
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/main/resources/images/logos/james-project-logo.gif?rev=1078475&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/project/trunk/maven-skin/src/main/resources/images/logos/james-project-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/project/trunk/maven-skin/src/main/resources/images/logos/james-server-logo.gif
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/main/resources/images/logos/james-server-logo.gif?rev=1078475&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/project/trunk/maven-skin/src/main/resources/images/logos/james-server-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: james/project/trunk/maven-skin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/site/apt/index.apt?rev=1078475&r1=1078474&r2=1078475&view=diff
==============================================================================
--- james/project/trunk/maven-skin/src/site/apt/index.apt (original)
+++ james/project/trunk/maven-skin/src/site/apt/index.apt Sun Mar  6 14:36:51 2011
@@ -32,26 +32,34 @@ Apache JAMES Official Maven2/3 Site Skin
   
   * The <<\<banner\>>> tag in site.xml
   
-    Make sure that the <<\<src\>>> tag contains an absolute URL. Other
will cause problems
-    when being inherited in a multi-module project due to bugs in probably doxia.
+    When inheriting the banner the <<\<src\>>> tag contains a strange url
(e.g. '../../../james-imap-api'). This
+    looks like a container ULR but not like an valid image src.
+    How the workaround works:
     
-    <<Do>>
+    For the <<\<bannerRight\>>> tag (add it as usual) the site.vm replaces
any src values by 'images/logos/asf-logo-reduced.gif'.
+    
+    For the <<\<bannerLeft\>>> tag (add it as usual) the site.vml replaces
any src values by ('images/logos/' + $banner.alt)
+    (set the images name as as value of the <<\<alt\>>> tag).
+    
+    The logos for all the JAMES projects are included via this skin (see src/resources/images/logos).
+    
+    <<Note>>
+    
+    When a project logo changes then it must also be added/changed in this maven-skin.
+   
+    <<A correct definition could look like>>
 
 +----------------------------------------+
 <bannerLeft>
-    <name>James Project</name>
-    <src>http://james.apache.org/images/logos/james-project-logo.gif</src>
-    <href>http://james.apache.org/index.html</href>
+    <name>James IMAP</name>
+    <src>images/logos/james-imap-logo.gif</src>
+    <href>http://james.apache.org/imap/index.html</href>
+    <alt>james-imap-logo.gif</alt>
 </bannerLeft>
-+----------------------------------------+
-
-    <<Don't>>
 
-+----------------------------------------+
-<bannerLeft>
-    <name>James Project</name>
-    <src>images/logos/james-project-logo.gif</src>
+<bannerRight>
+    <name>Apache Software Foundation</name>
+    <src>images/logos/asf-logo-reduced.gif</src>
     <href>http://james.apache.org/index.html</href>
 </bannerLeft>
 +----------------------------------------+
-    
\ No newline at end of file

Modified: james/project/trunk/maven-skin/src/site/site.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/maven-skin/src/site/site.xml?rev=1078475&r1=1078474&r2=1078475&view=diff
==============================================================================
--- james/project/trunk/maven-skin/src/site/site.xml (original)
+++ james/project/trunk/maven-skin/src/site/site.xml Sun Mar  6 14:36:51 2011
@@ -28,13 +28,14 @@
     <!-- Banner sources must have absolute URL, otherwise inheriting will fail -->
     <bannerLeft>
         <name>James Maven Skin</name>
-        <src>http://james.apache.org/images/logos/james-project-logo.gif</src>
+        <src>images/logos/james-project-logo.gif</src>
         <href>http://james.apache.org/index.html</href>
+        <alt>james-project-logo.gif</alt>
     </bannerLeft>
 
     <bannerRight>
         <name>The Apache Software Foundation</name>
-        <src>http://james.apache.org/images/logos/asf-logo-reduced.gif</src>
+        <src>images/logos/asf-logo-reduced.gif</src>
         <href>http://www.apache.org/index.html</href>
     </bannerRight>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message