Author: alexsmirnov
Date: 2009-04-09 20:14:07 -0400 (Thu, 09 Apr 2009)
New Revision: 13482
Added:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java
trunk/samples/themes/src/main/java/org/richfaces/theme/AbstractThemeRenderer.java
trunk/samples/themes/src/main/java/org/richfaces/theme/images/
trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java
trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageHeaderGradient.java
trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/layout.css
Removed:
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageBackgroundGradient.java
Modified:
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss
trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
trunk/ui/layout/src/main/templates/org/richfaces/htmlLayout.jspx
Log:
theme 2 got working
Added: trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java
(rev 0)
+++
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java 2009-04-10
00:14:07 UTC (rev 13482)
@@ -0,0 +1,184 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.GradientPaint;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+import java.io.Serializable;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+import java.util.Date;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.resource.InternetResourceBuilder;
+import org.ajax4jsf.resource.Java2Dresource;
+import org.ajax4jsf.resource.PngRenderer;
+import org.ajax4jsf.resource.ResourceContext;
+import org.ajax4jsf.util.HtmlColor;
+import org.ajax4jsf.util.HtmlDimensions;
+import org.ajax4jsf.util.Zipper2;
+import org.richfaces.renderkit.html.images.GradientAlignment;
+import org.richfaces.renderkit.html.images.GradientType;
+import org.richfaces.renderkit.html.images.GradientType.BiColor;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author asmirnov
+ *
+ */
+public abstract class BaseSkinImage extends Java2Dresource {
+
+
+ public BaseSkinImage() {
+ super();
+ setRenderer(new PngRenderer());
+ }
+
+ public Dimension getDimensions(FacesContext facesContext, Object data) {
+ return getDimension();
+ }
+
+ /**
+ * Hook method to define constant dimension.
+ *
+ * @return
+ */
+ protected abstract Dimension getDimension();
+
+ protected Dimension getDimensions(ResourceContext resourceContext) {
+ return getDimension();
+ }
+
+ protected void drawRectangle(Graphics2D g2d, Rectangle2D rect,
+ BiColor biColor, boolean useTop) {
+ if (biColor != null) {
+ Color color = useTop ? biColor.getTopColor() : biColor
+ .getBottomColor();
+ g2d.setColor(color);
+ g2d.fill(rect);
+ }
+ }
+
+ protected void drawGradient(Graphics2D g2d, Rectangle2D rectangle,
+ BiColor colors, int height) {
+ if (colors != null) {
+ GradientPaint gragient = new GradientPaint(0, 0, colors
+ .getTopColor(), 0, height, colors.getBottomColor());
+ g2d.setPaint(gragient);
+ g2d.fill(rectangle);
+ }
+ }
+
+ protected void paint(ResourceContext resourceContext, Graphics2D g2d) {
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING,
+ RenderingHints.VALUE_DITHER_ENABLE);
+
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
+ RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
+ RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
+ RenderingHints.VALUE_RENDER_QUALITY);
+ paintImage(resourceContext,g2d);
+ }
+
+ /**
+ * @param resourceContext
+ * @param g2d
+ */
+ protected abstract void paintImage(ResourceContext resourceContext, Graphics2D g2d);
+
+ private Integer decodeColor(String value) {
+ if (value != null && value.length() != 0) {
+ return Integer.valueOf(HtmlColor.decode(value).getRGB());
+ } else {
+ return null;
+ }
+ }
+
+ private Integer decodeHeight(String value) {
+ if (value != null && value.length() != 0) {
+ return HtmlDimensions.decode(value).intValue();
+ } else {
+ return null;
+ }
+ }
+
+ protected static String safeTrim(String s) {
+ return s != null ? s.trim() : null;
+ }
+
+ protected Object getDataToStore(FacesContext context, Object parameterData) {
+ SkinFactory skinFactory = SkinFactory.getInstance();
+
+ Skin skin = skinFactory.getSkin(context);
+
+ int hashCode = skin.hashCode(context);
+ byte[] data = new byte[4];
+ ByteBuffer.wrap(data).asIntBuffer().put(hashCode);
+ return data;
+ }
+
+ public boolean isCacheable() {
+ return true;
+ }
+
+ @Override
+ public boolean requireFacesContext() {
+ return true;
+ }
+
+ protected Integer getSkinColor(String name) {
+ return decodeColor(getSkinParameter(name));
+ }
+
+ protected Integer getSkinSize(String name) {
+ return decodeHeight(getSkinParameter(name));
+ }
+ protected String getSkinParameter(String name) {
+ String value = null;
+ FacesContext context = FacesContext.getCurrentInstance();
+ if (null != context) {
+ SkinFactory skinFactory = SkinFactory.getInstance();
+ Skin skin = skinFactory.getSkin(context);
+ value = (String) skin.getParameter(context, name);
+
+ if (value == null || value.length() == 0) {
+ skin = skinFactory.getDefaultSkin(context);
+ value = (String) skin.getParameter(context, name);
+ }
+
+ }
+ return value;
+ }
+
+}
Property changes on:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/themes/src/main/java/org/richfaces/theme/AbstractThemeRenderer.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/AbstractThemeRenderer.java
(rev 0)
+++
trunk/samples/themes/src/main/java/org/richfaces/theme/AbstractThemeRenderer.java 2009-04-10
00:14:07 UTC (rev 13482)
@@ -0,0 +1,14 @@
+/**
+ *
+ */
+package org.richfaces.theme;
+
+import org.richfaces.renderkit.AbstractPageRenderer;
+
+/**
+ * @author asmirnov
+ *
+ */
+public abstract class AbstractThemeRenderer extends AbstractPageRenderer {
+
+}
Property changes on:
trunk/samples/themes/src/main/java/org/richfaces/theme/AbstractThemeRenderer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java
(rev 0)
+++
trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java 2009-04-10
00:14:07 UTC (rev 13482)
@@ -0,0 +1,17 @@
+/**
+ *
+ */
+package org.richfaces.theme.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class FooterBackground extends BaseGradient {
+
+ public FooterBackground() {
+ super(1, 95, 47,"panelBorderColor","generalBackgroundColor",
false);
+ }
+}
Property changes on:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java
(rev 0)
+++
trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java 2009-04-10
00:14:07 UTC (rev 13482)
@@ -0,0 +1,17 @@
+/**
+ *
+ */
+package org.richfaces.theme.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class HeaderBackground extends BaseGradient {
+
+ public HeaderBackground() {
+ super(1, 95, 47,"headerBackgroundColor","headerGradientColor",
false);
+ }
+}
Property changes on:
trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss
===================================================================
---
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss 2009-04-10
00:02:23 UTC (rev 13481)
+++
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss 2009-04-10
00:14:07 UTC (rev 13482)
@@ -11,7 +11,7 @@
<u:selector name=".header_bg">
<u:style name="background-image">
<!-- images/bg_header.png -->
- <f:resource
f:key="org.richfaces.renderkit.html.images.PageContentGradient"/>
+ <f:resource f:key="org.richfaces.theme.images.HeaderBackground"/>
</u:style>
<u:style name="border-bottom" value="1px solid" />
<u:style name="border-bottom-color"
skin="generalBackgroundColor" />
@@ -23,7 +23,7 @@
<u:selector name=".footer_bg">
<u:style name="background-image">
<!-- images/bg_footer.png -->
- <f:resource
f:key="org.richfaces.renderkit.html.images.PageContentGradient"/>
+ <f:resource f:key="org.richfaces.theme.images.FooterBackground"/>
</u:style>
<u:style name="border-top" value="1px solid" />
<u:style name="border-top-color" skin="generalBackgroundColor"
/>
Modified: trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx 2009-04-10 00:02:23
UTC (rev 13481)
+++ trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx 2009-04-10 00:14:07
UTC (rev 13482)
@@ -8,7 +8,7 @@
xmlns:h="http://jsf.exadel.com/header"
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
class="org.richfaces.renderkit.html.Theme2Renderer"
- baseclass="org.richfaces.renderkit.AbstractPageRenderer"
+ baseclass="org.richfaces.theme.AbstractThemeRenderer"
component="org.richfaces.component.UIPage"
<c:set var="namespace"
value="#{this:prolog(context,component)}"/>
Deleted:
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageBackgroundGradient.java
===================================================================
---
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageBackgroundGradient.java 2009-04-10
00:02:23 UTC (rev 13481)
+++
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageBackgroundGradient.java 2009-04-10
00:14:07 UTC (rev 13482)
@@ -1,17 +0,0 @@
-/**
- *
- */
-package org.richfaces.renderkit.html.images;
-
-import org.richfaces.renderkit.html.BaseGradient;
-
-/**
- * @author asmirnov
- *
- */
-public class PageBackgroundGradient extends BaseGradient {
-
- public PageBackgroundGradient() {
- super(1, 350,
300,"shadowBackgroundColor","additionalBackgroundColor", false);
- }
-}
Added:
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java
===================================================================
---
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java
(rev 0)
+++
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java 2009-04-10
00:14:07 UTC (rev 13482)
@@ -0,0 +1,17 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.html.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PageFooterGradient extends BaseGradient {
+
+ public PageFooterGradient() {
+ super(1, 95, 47,"panelBorderColor","generalBackgroundColor",
false);
+ }
+}
Property changes on:
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageFooterGradient.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageHeaderGradient.java
(from rev 13477,
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageBackgroundGradient.java)
===================================================================
---
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageHeaderGradient.java
(rev 0)
+++
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageHeaderGradient.java 2009-04-10
00:14:07 UTC (rev 13482)
@@ -0,0 +1,17 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.html.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PageHeaderGradient extends BaseGradient {
+
+ public PageHeaderGradient() {
+ super(1, 95, 47,"headerBackgroundColor","headerGradientColor",
false);
+ }
+}
Property changes on:
trunk/ui/layout/src/main/java/org/richfaces/renderkit/html/images/PageHeaderGradient.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/layout.css
===================================================================
--- trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/layout.css
(rev 0)
+++
trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/layout.css 2009-04-10
00:14:07 UTC (rev 13482)
@@ -0,0 +1,285 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 3.0.0pr2
+*/
+/*
+*
+* The YUI CSS Foundation uses the *property and _property CSS filter
+* techniques to shield a value from A-grade browsers [1] other than
+* IE6 & IE7 (*property) and IE6 (_property)
+*
+
+/*
+Section: Grids and Nesting Grids
+*/
+
+/*
+Subsection: Children generally take half the available space
+*/
+
+.yui-gb .yui-u,
+.yui-g .yui-gb .yui-u,
+.yui-gb .yui-g,
+.yui-gb .yui-gb,
+.yui-gb .yui-gc,
+.yui-gb .yui-gd,
+.yui-gb .yui-ge,
+.yui-gb .yui-gf,
+.yui-gc .yui-u,
+.yui-gc .yui-g,
+.yui-gd .yui-u {
+ float: left;
+}
+
+/*Float units (and sub grids) to the right */
+.yui-g .yui-u,
+.yui-g .yui-g,
+.yui-g .yui-gb,
+.yui-g .yui-gc,
+.yui-g .yui-gd,
+.yui-g .yui-ge,
+.yui-g .yui-gf,
+.yui-gc .yui-u,
+.yui-gd .yui-g,
+.yui-g .yui-gc .yui-u,
+.yui-ge .yui-u,
+.yui-ge .yui-g,
+.yui-gf .yui-g,
+.yui-gf .yui-u {
+ float: right;
+}
+
+/*Float units (and sub grids) to the left */
+.yui-g div.first,
+.yui-gb div.first,
+.yui-gc div.first,
+.yui-gd div.first,
+.yui-ge div.first,
+.yui-gf div.first,
+.yui-g .yui-gc div.first,
+.yui-g .yui-ge div.first,
+.yui-gc div.first div.first {
+ float: left;
+}
+
+.yui-g .yui-u,
+.yui-g .yui-g,
+.yui-g .yui-gb,
+.yui-g .yui-gc,
+.yui-g .yui-gd,
+.yui-g .yui-ge,
+.yui-g .yui-gf {
+ width: 49.1%;
+}
+
+.yui-gb .yui-u,
+.yui-g .yui-gb .yui-u,
+.yui-gb .yui-g,
+.yui-gb .yui-gb,
+.yui-gb .yui-gc,
+.yui-gb .yui-gd,
+.yui-gb .yui-ge,
+.yui-gb .yui-gf,
+.yui-gc .yui-u,
+.yui-gc .yui-g,
+.yui-gd .yui-u {
+ width: 32%;
+ margin-left: 2.0%;
+}
+
+/* Give IE some extra breathing room for 1/3-based rounding issues */
+.yui-gb .yui-u {
+ *width: 31.8%;
+ *margin-left: 1.9%;
+}
+
+.yui-gc div.first,
+.yui-gd .yui-u {
+ width: 66%;
+ _width: 65.7%;
+}
+.yui-gd div.first {
+ width: 32%;
+ _width: 31.5%;
+}
+
+.yui-ge div.first,
+.yui-gf .yui-u {
+ width: 74.2%;
+ _width: 74%;
+}
+
+.yui-ge .yui-u,
+.yui-gf div.first {
+ width: 24%;
+ _width: 23.8%;
+}
+
+.yui-g .yui-gb div.first,
+.yui-gb div.first,
+.yui-gc div.first,
+.yui-gd div.first {
+ margin-left: 0;
+}
+
+/*
+Section: Deep Nesting
+*/
+.yui-g .yui-g .yui-u,
+.yui-gb .yui-g .yui-u,
+.yui-gc .yui-g .yui-u,
+.yui-gd .yui-g .yui-u,
+.yui-ge .yui-g .yui-u,
+.yui-gf .yui-g .yui-u {
+ width: 49%;
+ *width: 48.1%;
+ *margin-left: 0;
+}
+
+.yui-g .yui-gb div.first,
+.yui-gb .yui-gb div.first {
+ *margin-right: 0;
+ *width: 32%;
+ _width: 31.7%;
+}
+
+.yui-g .yui-gc div.first,
+.yui-gd .yui-g {
+ width: 66%;
+}
+
+.yui-gb .yui-g div.first {
+ *margin-right: 4%;
+ _margin-right: 1.3%;
+}
+
+.yui-gb .yui-gc div.first,
+.yui-gb .yui-gd div.first {
+ *margin-right: 0;
+}
+
+.yui-gb .yui-gb .yui-u,
+.yui-gb .yui-gc .yui-u {
+ *margin-left: 1.8%;
+ _margin-left: 4%;
+}
+
+.yui-g .yui-gb .yui-u {
+ _margin-left: 1.0%;
+}
+
+.yui-gb .yui-gd .yui-u {
+ *width: 66%;
+ _width: 61.2%;
+}
+.yui-gb .yui-gd div.first {
+ *width: 31%;
+ _width: 29.5%;
+}
+
+.yui-g .yui-gc .yui-u,
+.yui-gb .yui-gc .yui-u {
+ width: 32%;
+ _float: right;
+ margin-right: 0;
+ _margin-left: 0;
+}
+.yui-gb .yui-gc div.first {
+ width: 66%;
+ *float: left;
+ *margin-left: 0;
+}
+
+.yui-gb .yui-ge .yui-u,
+.yui-gb .yui-gf .yui-u {
+ margin: 0;
+}
+
+.yui-gb .yui-gb .yui-u {
+ _margin-left: .7%;
+}
+
+.yui-gb .yui-g div.first,
+.yui-gb .yui-gb div.first {
+ *margin-left:0;
+}
+
+.yui-gc .yui-g .yui-u,
+.yui-gd .yui-g .yui-u {
+ *width: 48.1%;
+ *margin-left: 0;
+}
+
+.yui-gb .yui-gd div.first {
+ width: 32%;
+}
+.yui-g .yui-gd div.first {
+ _width: 29.9%;
+}
+
+.yui-ge .yui-g {
+ width: 24%;
+}
+.yui-gf .yui-g {
+ width: 74.2%;
+}
+
+.yui-gb .yui-ge div.yui-u,
+.yui-gb .yui-gf div.yui-u {
+ float: right;
+}
+.yui-gb .yui-ge div.first,
+.yui-gb .yui-gf div.first {
+ float: left;
+}
+
+/* Width Accommodation for Nested Contexts */
+.yui-gb .yui-ge .yui-u,
+.yui-gb .yui-gf div.first {
+ *width: 24%;
+ _width: 20%;
+}
+
+/* Width Accommodation for Nested Contexts */
+.yui-gb .yui-ge div.first,
+.yui-gb .yui-gf .yui-u {
+ *width: 73.5%;
+ _width: 65.5%;
+}
+
+/* Patch for GD within GE */
+.yui-ge div.first .yui-gd .yui-u {
+ width: 65%;
+}
+.yui-ge div.first .yui-gd div.first {
+ width: 32%;
+}
+
+/*
+Section: Clearing. zoom for IE, :after for others
+*/
+
+#bd:after,
+.yui-g:after,
+.yui-gb:after,
+.yui-gc:after,
+.yui-gd:after,
+.yui-ge:after,
+.yui-gf:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+#bd,
+.yui-g,
+.yui-gb,
+.yui-gc,
+.yui-gd,
+.yui-ge,
+.yui-gf {
+ zoom: 1;
+}
\ No newline at end of file
Property changes on:
trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/layout.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
===================================================================
---
trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss 2009-04-10
00:02:23 UTC (rev 13481)
+++
trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss 2009-04-10
00:14:07 UTC (rev 13482)
@@ -22,7 +22,14 @@
</f:verbatim>
<u:selector name=".rich-page-header">
- <u:style name="background-color" skin="generalLinkColor" />
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.html.images.PageHeaderGradient"/>
+ </u:style>
+ <u:style name="background-repeat" value="repeat-x"/>
+ <u:style name="background-position" value="top left"/>
+ <u:style name="border-bottom" value="1px solid" />
+ <u:style name="border-bottom-color"
skin="generalBackgroundColor" />
+ <u:style name="background-color"
skin="headerBackgroundColor"/>
<u:style name="min-height" value="40px" />
<u:style name="padding" value="0 20px" />
<u:style name="color" skin="trimColor" />
@@ -35,27 +42,56 @@
<u:style name="min-height" value="200px" />
<u:style name="background-color"
skin="generalBackgroundColor"/>
<u:style name="background-repeat" value="repeat-x"/>
+ <u:style name="background-position" value="top left"/>
</u:selector>
<u:selector name=".rich-page-main">
</u:selector>
- <!--u:selector name=".rich-page-body">
- <u:style name="padding" value="0 30px 0 30px" />
- </u:selector-->
+ <u:selector name=".rich-page-body">
+ <u:style name="vertical-align" value="top"/>
+ <u:style name="width" value="100%"/>
+ <u:style name="border-top" value="2px solid" />
+ <u:style name="border-top-color" skin="panelBorderColor" />
+ <u:style name="border-bottom" value="2px solid" />
+ <u:style name="border-bottom-color" skin="panelBorderColor"
/>
+ </u:selector>
<u:selector name=".rich-page-footer">
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.html.images.PageFooterGradient"/>
+ </u:style>
+ <u:style name="border-top" value="1px solid" />
+ <u:style name="border-top-color" skin="generalBackgroundColor"
/>
+ <u:style name="background-color" skin="panelBorderColor"/>
+ <u:style name="background-repeat" value="repeat-x"/>
+ <u:style name="background-position" value="top left"/>
<u:style name="text-align" value="center" />
<u:style name="padding" value="20px 0" />
- <u:style name="background-color" value="#333"/>
- <u:style name="color" skin="trimColor" />
- <u:style name="font-size" skin="headerSizeFont" />
</u:selector>
<u:selector name=".rich-page-sidebar">
<!--u:style name="padding" value="0 20px 0 20px" /-->
+ <u:style name="vertical-align" value="top"/>
+ <u:style name="border-top" value="2px solid" />
+ <u:style name="border-top-color" skin="panelBorderColor" />
+ <u:style name="border-right" value="2px solid" />
+ <u:style name="border-right-color" skin="panelBorderColor"
/>
+ <u:style name="border-bottom" value="2px solid" />
+ <u:style name="border-bottom-color" skin="panelBorderColor"
/>
</u:selector>
+ <u:selector name="*.rich-page-sidebar, *.rich-page-body,
*.rich-page-footer">
+ <u:style name="font-family" skin="generalFamilyFont" />
+ <u:style name="color" skin="generalTextColor" />
+ <u:style name="font-size" skin="generalSizeFont" />
+ </u:selector>
+ <u:selector name="*.rich-page-header-content">
+ <u:style name="font-family" skin="headerFamilyFont" />
+ <u:style name="color" skin="headerTextColor" />
+ <u:style name="font-size" skin="headerSizeFont" />
+ </u:selector>
+
<u:selector name="h1,h2,h3">
<u:style name="font-family" skin="headerFamilyFont" />
<u:style name="margin" value="0" />
Modified: trunk/ui/layout/src/main/templates/org/richfaces/htmlLayout.jspx
===================================================================
--- trunk/ui/layout/src/main/templates/org/richfaces/htmlLayout.jspx 2009-04-10 00:02:23
UTC (rev 13481)
+++ trunk/ui/layout/src/main/templates/org/richfaces/htmlLayout.jspx 2009-04-10 00:14:07
UTC (rev 13482)
@@ -11,7 +11,7 @@
baseclass="org.richfaces.renderkit.AbstractLayoutRenderer"
component="org.richfaces.component.UILayout"
- <h:styles>css/grids.css</h:styles>
+ <h:styles>css/layout.css</h:styles>
<f:clientid var="clientId"/>
<div id="#{clientId}"
x:passThruWithExclusions="value,name,type,id"