Author: vmassol
Date: 2008-01-31 16:33:57 +0100 (Thu, 31 Jan 2008)
New Revision: 7244
Modified:
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/stylesheets.vm
Log:
* Added indentations for easier read
* Small speed improvement since we go through the xwiki code only once instead
of twice by using a velocity variable instead
* Added some comments
Modified:
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/stylesheets.vm
===================================================================
---
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/stylesheets.vm
2008-01-31 15:33:12 UTC (rev 7243)
+++
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/stylesheets.vm
2008-01-31 15:33:57 UTC (rev 7244)
@@ -1,32 +1,32 @@
-#set( $defaultstyle = $xwiki.getWebPreference("stylesheet"))
-#set( $stylesheets = $xwiki.getWebPreference("stylesheets"))
-#if ($defaultstyle!="")
-<link href="$xwiki.getSkinFile($defaultstyle, true)" rel="stylesheet"
type="text/css" />
-<link href="$xwiki.getSkinFile($defaultstyle, true)" rel="stylesheet"
type="text/css" title="default" />
-#else
-<link href="$xwiki.getSkinFile("style.css", true)" rel="stylesheet"
type="text/css" />
-<link href="$xwiki.getSkinFile("style.css", true)" rel="stylesheet"
type="text/css" title="default" />
+## The default stylesheet configuration option allows to override the default
style.css CSS
+#set ( $defaultstyle = $xwiki.getWebPreference("stylesheet") )
+#if ( $defaultstyle != "" )
+ #set ( $defaultstyle = "style.css" )
#end
-#if($printss)
-<link href="$xwiki.getSkinFile("print.css")" rel="stylesheet" type="text/css"/>
+#set( $defaultStyleURL = $xwiki.getSkinFile($defaultstyle, true) )
+<link href="$defaultStyleURL" rel="stylesheet" type="text/css" />
+<link href="$defaultStyleURL" rel="stylesheet" type="text/css" title="default"
/>
+#if ( $printss )
+ <link href="$xwiki.getSkinFile("print.css")" rel="stylesheet"
type="text/css"/>
#end
-#if ($stylesheets != "")
-#set( $stylenb = 1)
-#foreach ( $stylesheet in $xwiki.split($stylesheets, ","))
-#if( !$stylesheet.equalsIgnoreCase($defaultstyle) )
-<link href="$xwiki.getSkinFile($stylesheet)" rel="alternate stylesheet"
type="text/css" title="Alternate StyleSheet $stylenb" />
-#end
-#set( $stylenb = $stylenb + 1)
-#end
+## The stylesheets configuration option allows to override the alternate
stylesheets
+## style1.css, style2.css and style3.css
+#set ( $stylesheets = $xwiki.getWebPreference("stylesheets") )
+#if ( $stylesheets != "" )
+ #set ( $stylenb = 1 )
+ #foreach ( $stylesheet in $xwiki.split($stylesheets, ",") )
+ #if( !$stylesheet.equalsIgnoreCase($defaultstyle) )
+ <link href="$xwiki.getSkinFile($stylesheet)" rel="alternate stylesheet"
type="text/css" title="Alternate StyleSheet $stylenb" />
+ #end
+ #set( $stylenb = $stylenb + 1 )
+ #end
#else
-<link href="$xwiki.getSkinFile("style1.css")" rel="alternate stylesheet"
type="text/css" title="Alternate StyleSheet 1" />
-<link href="$xwiki.getSkinFile("style2.css")" rel="alternate stylesheet"
type="text/css" title="Alternate StyleSheet 2" />
-<link href="$xwiki.getSkinFile("style3.css")" rel="alternate stylesheet"
type="text/css" title="Alternate StyleSheet 3" />
+ <link href="$xwiki.getSkinFile("style1.css")" rel="alternate stylesheet"
type="text/css" title="Alternate StyleSheet 1" />
+ <link href="$xwiki.getSkinFile("style2.css")" rel="alternate stylesheet"
type="text/css" title="Alternate StyleSheet 2" />
+ <link href="$xwiki.getSkinFile("style3.css")" rel="alternate stylesheet"
type="text/css" title="Alternate StyleSheet 3" />
#end
<link href="${request.contextPath}/yui/treeview/assets/tree.css"
rel="stylesheet" type="text/css"/>
-
<link href="$xwiki.getSkinFile("css/lightbox/lightbox.css", true)"
rel="stylesheet" type="text/css" />
-
<!--[if IE]>
-<link href="$xwiki.getSkinFile("css/lightbox/lightboxIE.css", true)"
rel="stylesheet" type="text/css" title="Lightbox Stylesheet For Ie" />
-<![endif]-->
\ No newline at end of file
+ <link href="$xwiki.getSkinFile("css/lightbox/lightboxIE.css", true)"
rel="stylesheet" type="text/css" title="Lightbox Stylesheet For Ie" />
+<![endif]-->
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications