You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/04/17 14:55:37 UTC
svn commit: r529584 - in /lenya/trunk/src: modules/resource/sitemap.xmap
modules/resource/xslt/svgIcon.xsl webapp/lenya/resources/images/icons/
webapp/lenya/resources/images/icons/empty-icon.png
Author: andreas
Date: Tue Apr 17 05:55:36 2007
New Revision: 529584
URL: http://svn.apache.org/viewvc?view=rev&rev=529584
Log:
Generate icons with extensions as label
Added:
lenya/trunk/src/modules/resource/xslt/svgIcon.xsl
lenya/trunk/src/webapp/lenya/resources/images/icons/
lenya/trunk/src/webapp/lenya/resources/images/icons/empty-icon.png (with props)
Modified:
lenya/trunk/src/modules/resource/sitemap.xmap
Modified: lenya/trunk/src/modules/resource/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/resource/sitemap.xmap?view=diff&rev=529584&r1=529583&r2=529584
==============================================================================
--- lenya/trunk/src/modules/resource/sitemap.xmap (original)
+++ lenya/trunk/src/modules/resource/sitemap.xmap Tue Apr 17 05:55:36 2007
@@ -96,17 +96,24 @@
<map:read src="fallback://lenya/modules/resource/resources/icons/default.gif"/>
</map:match>
- <map:match pattern="**icons/**.*">
+ <map:match pattern="bitmap-icons/*">
+ <map:read src="resources/icons/{1}"/>
+ </map:match>
+
+ <map:match pattern="icons/*.*">
<map:act type="resource-exists-enhanced">
- <map:parameter name="url"
- value="fallback://lenya/modules/resource/resources/icons/{2}.{3}"/>
+ <map:parameter name="url" value="fallback://lenya/modules/resource/resources/icons/{2}.{3}"/>
<map:parameter name="type" value="file"/>
- <map:read
- src="fallback://lenya/modules/resource/resources/icons/{2}.{3}"/>
+ <map:read src="fallback://lenya/modules/resource/resources/icons/{2}.{3}"/>
</map:act>
- <map:read
- src="fallback://lenya/modules/resource/resources/icons/default_med.gif"/>
+ <map:generate src="context://lenya/content/util/empty.xml"/>
+ <map:transform src="fallback://lenya/modules/resource/xslt/svgIcon.xsl">
+ <map:parameter name="basePath" value="{realpath:.}"/>
+ <map:parameter name="extension" value="{1}"/>
+ </map:transform>
+ <map:serialize type="svg2png"/>
</map:match>
+
</map:pipeline>
Added: lenya/trunk/src/modules/resource/xslt/svgIcon.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/resource/xslt/svgIcon.xsl?view=auto&rev=529584
==============================================================================
--- lenya/trunk/src/modules/resource/xslt/svgIcon.xsl (added)
+++ lenya/trunk/src/modules/resource/xslt/svgIcon.xsl Tue Apr 17 05:55:36 2007
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <xsl:param name="basePath"/>
+ <xsl:param name="extension"/>
+
+ <xsl:template match="/*">
+
+ <svg:svg width="33" height="40">
+
+ <svg:image x="0" y="0" width="33" height="40"
+ xlink:href="file://{$basePath}/lenya/resources/images/icons/empty-icon.png"/>
+
+ <svg:text x="16" y="24"
+ style="text-anchor: middle; font-size: 11; font-weight: bold; fill: #000000;">
+ <xsl:value-of select="translate(substring($extension, 1, 3),
+ 'abcdefghijklmnopqrstuvwxyz',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ </svg:text>
+
+ </svg:svg>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: lenya/trunk/src/webapp/lenya/resources/images/icons/empty-icon.png
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/images/icons/empty-icon.png?view=auto&rev=529584
==============================================================================
Binary file - no diff available.
Propchange: lenya/trunk/src/webapp/lenya/resources/images/icons/empty-icon.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org