You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ni...@apache.org on 2004/01/03 16:36:29 UTC
cvs commit: xml-forrest/src/core/context/skins/tigris-style/css forrest.css.xslt
nicolaken 2004/01/03 07:36:29
Modified: src/core/context/skins/tigris-style/css forrest.css.xslt
Log:
<action dev="NKB" type="add" context="skins">
New "extra-css" tag in skinconf can contain css that is injected in
forrest.css, added in the skins by default.
</action>
<action dev="NKB" type="add" context="skins">
New section in skinconf about colors used by the site.
Enabled for krysalis-site and tigris-style.
If a needed color is not specified, the default one is used.
</action>
Revision Changes Path
1.2 +101 -73 xml-forrest/src/core/context/skins/tigris-style/css/forrest.css.xslt
Index: forrest.css.xslt
===================================================================
RCS file: /home/cvs/xml-forrest/src/core/context/skins/tigris-style/css/forrest.css.xslt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- forrest.css.xslt 30 Dec 2003 00:04:35 -0000 1.1
+++ forrest.css.xslt 3 Jan 2004 15:36:29 -0000 1.2
@@ -1,92 +1,120 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <!-- This is not used by Forrest but makes it possible to debug the
+ stylesheet in standalone editors -->
<xsl:output method = "text" omit-xml-declaration="yes" />
-
- <xsl:template match="skinconfig">
- <!-- insert CSS here -->
-/* $Id$ */
-/* colors */
-
-/* TODO */
-#toptabs td, #toptabs th {
- background-image: url(../images/nw_min_036.gif);
-}
+ <xsl:template match="colors">
+ <xsl:apply-templates/>
+ </xsl:template>
-.app h3, #banner, #banner td, #toptabs {
- background-color: #036;
- color: #fff;
-}
+<xsl:template match="group-logo">
+ <xsl:if test="'@width' and '@height'">
+#cn {
+ background-image: url('../<xsl:value-of select="."/>');
+ display: block;
+ height: <xsl:value-of select="@height"/>px;
+ width: <xsl:value-of select="@width"/>px;
+}
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="host-logo">
+ <xsl:if test="'@width' and '@height'">
+#poweredby {
+ background-image: url('../<xsl:value-of select="."/>');
+ display: block;
+ height: <xsl:value-of select="@height"/>px;
+ width: <xsl:value-of select="@width"/>px;
+}
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="project-logo">
+ <xsl:if test="'@width' and '@height'">
+#sc {
+ background-image: url('../<xsl:value-of select="."/>');
+ display: block;
+ height: <xsl:value-of select="@height"/>px;
+ width: <xsl:value-of select="@width"/>px;
+}
+ </xsl:if>
+</xsl:template>
-body #banner td a, .app h3 a, .app h4 a {
- color: #fff !important;
-}
-#banner {
- border-top: 1px solid #369;
-}
+<xsl:template match="color[@name='header']">
+#banner, #banner td, #toptabs { background-color: <xsl:value-of select="@value"/>;} </xsl:template>
+<xsl:template match="color[@name='tab-selected']">
+.tabs th { background-color: <xsl:value-of select="@value"/>;}
#mytools .label, #projecttools .label, #admintools .label, #communitytools .label {
- background-color: #ddd;
-}
-
-#mytools .body, #projecttools .body, #admintools .body, #communitytools .body {
- background-color: #fff;
- border-top: 1px solid #999;
-}
-
+ background-color: <xsl:value-of select="@value"/>;}
#mytools, #projecttools, #admintools, #communitytools {
- background-color: #ddd;
- border-right: 1px solid #666;
- border-bottom: 1px solid #666;
-}
-
-#helptext {
- background-color: #ffc;
-}
+ background-color: <xsl:value-of select="@value"/>;}
+.tabs { border-bottom: 6px <xsl:value-of select="@value"/> solid; }</xsl:template>
+<xsl:template match="color[@name='tab-unselected']">
+.tabs td { background-color: <xsl:value-of select="@value"/>;} </xsl:template>
+<xsl:template match="color[@name='subtab-selected']">
+#breadcrumbs {background-color: <xsl:value-of select="@value"/>;}</xsl:template>
+<xsl:template match="color[@name='subtab-unselected']">
+#breadcrumbs {background-color: <xsl:value-of select="@value"/>;}</xsl:template>
+
+<xsl:template match="color[@name='heading']">
+.app h3 {background-color: <xsl:value-of select="@value"/>;}</xsl:template>
+<xsl:template match="color[@name='subheading']">
+.app h4 { background-color: <xsl:value-of select="@value"/>;} </xsl:template>
+
+<xsl:template match="color[@name='navstrip']">
+#topmodule { background-color: <xsl:value-of select="@value"/>;} </xsl:template>
+<xsl:template match="color[@name='toolbox']">
+.toolgroup .label { background: <xsl:value-of select="@value"/>; } </xsl:template>
-#helptext .label {
- border-bottom: 1px solid #996;
- border-right: 1px solid #996;
- background-color: #cc9;
-}
-
-#helptext .body {
- border-bottom: 1px solid #cc9;
- border-right: 1px solid #cc9;
-}
-
-#topmodule {
- background-color: #ddd;
- border-top: 1px solid #fff;
- border-bottom: 1px solid #aaa;
-}
-
-#topmodule #issueid {
- border-right: 1px solid #aaa;
-}
-
-#login a:link, #login a:visited {
- color: white;
-}
+<xsl:template match="color[@name='menu']">
+#mytools .body, #projecttools .body, #admintools .body, #communitytools .body {
+ background-color: <xsl:value-of select="@value"/>;}</xsl:template>
+<xsl:template match="color[@name='dialog']">
+.toolgroup { background: <xsl:value-of select="@value"/>;} </xsl:template>
+
+<xsl:template match="color[@name='body']">
+body { background-color: <xsl:value-of select="@value"/>;} </xsl:template>
+
+<xsl:template match="color[@name='footer']">
+#footer { background-color: <xsl:value-of select="@value"/>;} </xsl:template>
+
+
+<!-- ==================== other colors ============================ -->
+<xsl:template match="color[@name='highlight']">
+.highlight { background-color: <xsl:value-of select="@value"/>;} </xsl:template>
+<xsl:template match="color[@name='fixme']">
+.warningmessage {border-color: <xsl:value-of select="@value"/>;} </xsl:template>
+<xsl:template match="color[@name='note']">
+.infomessage { border-color: <xsl:value-of select="@value"/>;} </xsl:template>
+<xsl:template match="color[@name='warning']">
+.errormessage{ border-color: <xsl:value-of select="@value"/>;} </xsl:template>
+<xsl:template match="color[@name='code']">
+.code, code, pre { border-color: <xsl:value-of select="@value"/>;} </xsl:template>
+<xsl:template match="color[@name='table']">
+body .grid td {
+ border-top: 1px solid <xsl:value-of select="@value"/>;
+ border-left: 1px solid <xsl:value-of select="@value"/>;}
+.app th {
+ background-color: <xsl:value-of select="@value"/>;}</xsl:template>
+<xsl:template match="color[@name='table-cell']">
+body .grid td {
+ background-color: <xsl:value-of select="@value"/>;
+} </xsl:template>
-#banner a:active, #banner a:hover {
- color: #f90 !important;
-}
-#toptabs td {
- border-bottom: 1px solid #666;
- border-right: 1px solid #333;
- border-left: 1px solid #036;
-}
-#toptabs th {
- border-left: 1px solid #036;
-}
-
- <!-- end CSS here -->
+ <xsl:template match="skinconfig">
+/* $Id$ */
+ <xsl:apply-templates/>
</xsl:template>
+ <xsl:template match="extra-css">
+ <xsl:value-of select="."/>
+ </xsl:template>
+
<xsl:template match="*"></xsl:template>
<xsl:template match="text()"></xsl:template>