Author: alexsmirnov
Date: 2009-03-04 20:38:23 -0500 (Wed, 04 Mar 2009)
New Revision: 12832
Added:
trunk/sandbox/ui/layout/src/main/config/faces/
trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml
trunk/sandbox/ui/layout/src/main/resources/META-INF/
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background.png
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_bottom.gif
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_content.gif
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_top.gif
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx
Modified:
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java
trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.xhtml
trunk/sandbox/ui/layout/src/main/config/component/page.xml
trunk/sandbox/ui/layout/src/main/java/org/richfaces/component/UIPage.java
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlLayoutPanel.jspx
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx
Log:
Implemented page themes switcing.
Modified:
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java
===================================================================
---
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java 2009-03-04
18:19:20 UTC (rev 12831)
+++
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java 2009-03-05
01:38:23 UTC (rev 12832)
@@ -8,5 +8,72 @@
*
*/
public class Bean {
+
+ private String position="left";
+
+ private String theme = null;
+
+ private int width=0;
+
+ private int sidebarWidth=160;
+ /**
+ * @return the position
+ */
+ public String getPosition() {
+ return position;
+ }
+
+ /**
+ * @param position the position to set
+ */
+ public void setPosition(String position) {
+ this.position = position;
+ }
+
+ /**
+ * @return the width
+ */
+ public int getWidth() {
+ return width;
+ }
+
+ /**
+ * @param width the width to set
+ */
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ /**
+ * @return the sidebarWidth
+ */
+ public int getSidebarWidth() {
+ return sidebarWidth;
+ }
+
+ /**
+ * @param sidebarWidth the sidebarWidth to set
+ */
+ public void setSidebarWidth(int sidebarWidth) {
+ this.sidebarWidth = sidebarWidth;
+ }
+
+ /**
+ * @return the theme
+ */
+ public String getTheme() {
+ return theme;
+ }
+
+ /**
+ * @param theme the theme to set
+ */
+ public void setTheme(String theme) {
+ if("".equals(theme)){
+ theme = null;
+ }
+ this.theme = theme;
+ }
+
}
Modified: trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.xhtml
===================================================================
(Binary files differ)
Modified: trunk/sandbox/ui/layout/src/main/config/component/page.xml
===================================================================
--- trunk/sandbox/ui/layout/src/main/config/component/page.xml 2009-03-04 18:19:20 UTC
(rev 12831)
+++ trunk/sandbox/ui/layout/src/main/config/component/page.xml 2009-03-05 01:38:23 UTC
(rev 12832)
@@ -103,6 +103,7 @@
<classname>int</classname>
<description>
</description>
+ <defaultvalue>160</defaultvalue>
</property>
<property>
<name>sidebarPosition</name>
@@ -145,4 +146,8 @@
</property>
-->
</component>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.CssZendPageRenderer</name>
+ <template>org/richfaces/cssZendPage.jspx</template>
+ </renderer>
</components>
Added: trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml
===================================================================
--- trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml
(rev 0)
+++ trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml 2009-03-05 01:38:23 UTC
(rev 12832)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
+ <render-kit>
+ <renderer>
+ <component-family>org.richfaces.Page</component-family>
+ <renderer-type>org.richfaces.CssZendPageRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.CssZendRenderer</renderer-class>
+ </renderer>
+ </render-kit>
+</faces-config>
\ No newline at end of file
Property changes on: trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/sandbox/ui/layout/src/main/java/org/richfaces/component/UIPage.java
===================================================================
--- trunk/sandbox/ui/layout/src/main/java/org/richfaces/component/UIPage.java 2009-03-04
18:19:20 UTC (rev 12831)
+++ trunk/sandbox/ui/layout/src/main/java/org/richfaces/component/UIPage.java 2009-03-05
01:38:23 UTC (rev 12832)
@@ -6,6 +6,8 @@
import javax.faces.component.UIPanel;
+import org.richfaces.skin.SkinFactory;
+
/**
* JSF component class
*
@@ -17,5 +19,32 @@
public static final String COMPONENT_FAMILY = "org.richfaces.Page";
+ /**
+ * Get Page theme name
+ * @return
+ */
+ public abstract String getTheme();
+
+ /**
+ * Set Page theme name
+ * @param newvalue
+ */
+ public abstract void setTheme(String newvalue);
+
+
+ @Override
+ public String getRendererType() {
+ String theme = getTheme();
+ String rendererType = null;
+ if(null != theme && theme.length()>0){
+ rendererType = SkinFactory.getInstance().getTheme(getFacesContext(),
theme).getRendererType();
+ }
+ if(null == rendererType){
+ rendererType = super.getRendererType();
+ }
+ return rendererType;
+ }
+
+
}
Modified:
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
===================================================================
---
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-03-04
18:19:20 UTC (rev 12831)
+++
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-03-05
01:38:23 UTC (rev 12832)
@@ -14,22 +14,25 @@
import org.ajax4jsf.renderkit.AjaxComponentRendererBase;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.renderkit.html.AjaxPageRenderer;
+import org.richfaces.component.UIPage;
+import org.richfaces.skin.SkinFactory;
+import org.richfaces.skin.Theme;
/**
* @author asmirnov
- *
+ *
*/
public abstract class AbstractPageRenderer extends HeaderResourcesRendererBase {
-
+
public static final String RENDERER_TYPE = "org.richfaces.PageRenderer";
-
- private static final Map<String,String[]> doctypes ;
+ private static final Map<String, String[]> doctypes;
static {
// Fill doctype, content-type and namespace map for different formats.
- doctypes = new HashMap<String,String[]>();
+ doctypes = new HashMap<String, String[]>();
doctypes
.put(
"html-transitional",
@@ -72,10 +75,11 @@
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2
Final//EN\">\n",
"text/html", null });
}
-
- public String prolog(FacesContext context, UIComponent component) throws IOException {
+
+ public String prolog(FacesContext context, UIComponent component)
+ throws IOException {
ResponseWriter out = context.getResponseWriter();
- Map<String,Object> attributes = component.getAttributes();
+ Map<String, Object> attributes = component.getAttributes();
String format = (String) attributes.get("markupType");
String contentType = null;
String namespace = null;
@@ -85,9 +89,10 @@
docType = (String[]) doctypes.get(format);
} else {
contentType = out.getContentType();
- for (Iterator<String[]> iterator = doctypes.values().iterator();
iterator.hasNext();) {
+ for (Iterator<String[]> iterator = doctypes.values().iterator(); iterator
+ .hasNext();) {
String[] types = (String[]) iterator.next();
- if(types[1].equals(contentType)){
+ if (types[1].equals(contentType)) {
docType = types;
break;
}
@@ -107,17 +112,112 @@
}
return namespace;
}
+
+
+ public Theme getTheme(FacesContext context, UIPage page) {
+ Theme theme = null;
+ String themeName = page.getTheme();
+ if(null != themeName && themeName.length()>0){
+ theme = SkinFactory.getInstance().getTheme(context, themeName);
+ }
+ return theme;
+ }
- public void styles(FacesContext context, UIComponent component) {
+ public void themeStyle(FacesContext context, UIPage component) throws IOException{
+ Theme theme = getTheme(context, component);
+ if(null != theme){
+ String style = theme.getStyle();
+ if(null != style){
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement(HTML.LINK_ELEMENT, component);
+ writer.writeAttribute(HTML.TYPE_ATTR, "text/css", null);
+ writer.writeAttribute(HTML.REL_ATTR, "stylesheet", null);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, "component", null);
+ style = context.getApplication().getViewHandler().getResourceURL(context, style);
+ style= context.getExternalContext().encodeResourceURL(style);
+ writer.writeAttribute(HTML.HREF_ATTR, style, null);
+ writer.endElement(HTML.LINK_ELEMENT);
+ }
+ }
}
+
+ public void themeScript(FacesContext context, UIPage component) throws IOException{
+ Theme theme = getTheme(context, component);
+ if(null != theme){
+ String script = theme.getScript();
+ if(null != script){
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement(HTML.SCRIPT_ELEM, component);
+ writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+ script = context.getApplication().getViewHandler().getResourceURL(context, script);
+ script= context.getExternalContext().encodeResourceURL(script);
+ writer.writeAttribute(HTML.src_ATTRIBUTE, script, null);
+ writer.endElement(HTML.SCRIPT_ELEM);
+ }
+ }
+
+ }
+
- public String documentClass(FacesContext context, UIComponent component) {
- //TODO - calculate class.
- return "yui-t3";
+
+ public void pageStyle(FacesContext context, UIComponent component)
+ throws IOException {
+ // Write body class.
+ ResponseWriter writer = context.getResponseWriter();
+ Map<String, Object> attributes = component.getAttributes();
+ writer.startElement("style", component);
+ writer.writeAttribute(HTML.TYPE_ATTR, "text/css", null);
+ // Calculate page width
+ Integer width = (Integer) attributes.get("width");
+ if (null != width && width.intValue() > 0) {
+ float nonIeWidth = (width.floatValue() / 13.0f);
+ float ieWidth = (width.floatValue() / 13.333f);
+ StringBuilder format = new StringBuilder(
+ ".rich-page{margin:auto;text-align:left;");
+ format.append("width:").append(nonIeWidth).append("em;");
+ format.append("*width:").append(ieWidth).append("em;}\n");
+ writer.write(format.toString());
+ } else {
+ writer.write(".rich-page{margin:auto 10px;width:auto;}\n");
+ }
+ // Calculate sidebar width
+ if (component.getFacet("sidebar") != null) {
+ Object sidebarPosition = attributes.get("sidebarPosition");
+ String position;
+ if ("right".equals(sidebarPosition)) {
+ writer
+ .write(".rich-page-main{float:left;margin-right:-25em;}\n");
+ position = "right";
+ } else {
+ writer
+ .write(".rich-page-main{float:right;margin-left:-25em;}\n");
+ position = "left";
+ }
+ Integer sidebarWidth = (Integer) attributes.get("sidebarWidth");
+ if (null != sidebarWidth && sidebarWidth.intValue() > 0) {
+ float nonIeWidth = (sidebarWidth.floatValue() / 13.0f);
+ float ieWidth = (sidebarWidth.floatValue() / 13.333f);
+ StringBuilder format = new StringBuilder(
+ ".rich-page-sidebar{float:");
+ format.append(position).append(";");
+ format.append("width:").append(nonIeWidth).append("em;");
+ format.append("*width:").append(ieWidth).append("em;}\n");
+ format.append(".rich-page-body{margin-");
+ format.append(position).append(":").append(nonIeWidth + 1.0f)
+ .append("em;");
+ ;
+ format.append("*margin").append(position).append(":").append(
+ ieWidth + 1.05f).append("em;}\n");
+ writer.write(format.toString());
+ }
+
+ } // Cleanup
+ writer.write(".rich-page-body{float:none;width:auto;}\n");
+ writer.endElement("style");
}
-
- public boolean hasFacet(UIComponent component, String facet){
+
+ public boolean hasFacet(UIComponent component, String facet) {
return null != component.getFacet(facet);
}
Added:
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties
(rev 0)
+++
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1,2 @@
+rendererType=org.richfaces.CssZendPageRenderer
+styleSheet=resource:///org/richfaces/renderkit/html/css/zengarden.css
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties
(rev 0)
+++
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1 @@
+styleSheet=resource:///org/richfaces/renderkit/html/css/simple.xcss
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css
(rev 0)
+++
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1,28 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.2
+*/ /**
+ * Percents could work for IE, but for backCompat purposes, we are using keywords.
+ * x-small is for IE6/7 quirks mode.
+ */
+body {
+ font: 13px/ 1.231 arial, helvetica, clean, sans-serif; *
+ font-size: small; *
+ font: x-small;
+}
+
+table {
+ font-size: inherit;
+ font: 100%;
+}
+
+/**
+ * Bump up IE to get to 13px equivalent
+ */
+pre,code,kbd,samp,tt {
+ font-family: monospace; *
+ font-size: 108%;
+ line-height: 100%;
+}
\ No newline at end of file
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css
(rev 0)
+++
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1,57 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.2
+*/
+/*
+ Note: Throughout this file, the *property filter is used to
+ give a value to IE that other browsers do not see.
+*/
+
+/*
+ Section: General Rules
+*/
+
+ body {
+ text-align:center;
+ }
+
+ .rich-page-footer {
+ clear:both;
+ }
+
+/*
+ Section: Page Width Rules (#doc, #doc2, #doc3, #doc4)
+*/
+
+ /*
+ Subsection: General
+ */
+
+ .rich-page {
+ margin:auto;
+ text-align:left;
+ min-width:750px;
+ }
+
+/*
+ Section: Preset Template Rules (.yui-t[1-6])
+*/
+
+ /*
+ Subsection: General
+ */
+
+ /* to preserve source-order independence for Gecko */
+ .rich-page-sidebar{position:relative;}
+ .rich-page-sidebar,.rich-page-body{_position:static;}
+ .rich-page-body{position:static;}
+
+ .rich-page-main {width:100%;}
+/*
+ Section: Clearing
+*/
+
+.rich-page-content:after
{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.rich-page-content {zoom:1;}
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css
(rev 0)
+++
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1,77 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.2
+*/
+html {
+ color: #000;
+ background: #FFF;
+}
+
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td
+ {
+ margin: 0;
+ padding: 0;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+fieldset,img {
+ border: 0;
+}
+
+address,caption,cite,code,dfn,em,strong,th,var {
+ font-style: normal;
+ font-weight: normal;
+}
+
+li {
+ list-style: none;
+}
+
+caption,th {
+ text-align: left;
+}
+
+h1,h2,h3,h4,h5,h6 {
+ font-size: 100%;
+ font-weight: normal;
+}
+
+q:before,q:after {
+ content: '';
+}
+
+abbr,acronym {
+ border: 0;
+ font-variant: normal;
+}
+
+/* to preserve line-height and selector appearance */
+sup {
+ vertical-align: text-top;
+}
+
+sub {
+ vertical-align: text-bottom;
+}
+
+input,textarea,select {
+ font-family: inherit;
+ font-size: inherit;
+ font-weight: inherit;
+}
+
+/*to enable resizing for IE*/
+input,textarea,select { *
+ font-size: 100%;
+}
+
+/*because legend doesn't inherit in IE */
+legend {
+ color: #000;
+}
\ No newline at end of file
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css
===================================================================
---
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css
(rev 0)
+++
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1,117 @@
+body {
+ background: #CACACA url(../images/background.png) repeat-x;
+ font-family: "Trebuchet MS", Verdana, serif
+}
+#container {
+ margin: 0 auto;
+ width: 750px
+}
+#header {
+ width: 100%
+}
+#sub_header {
+ text-align: right;
+ font-weight: bold;
+ font-size: 20px;
+ color: #FFFFFF;
+ padding-right: 20px;
+ padding-bottom: 20px;
+}
+#main_content {
+ margin: 0 auto;
+ width: 100%;
+ background: #FFFFFF url('../images/background_content.gif');
+ background-repeat: repeat-y
+}
+#main_content_top {
+ height: 30px;
+ background: #FFFFFF url('../images/background_top.gif');
+}
+#main_content_bottom {
+ height: 30px;
+ background: #FFFFFF url('../images/background_bottom.gif');
+}
+#footer {
+ text-align: center;
+ font-size: 12px;
+ margin: 10px auto
+}
+.content {
+ float: left;
+ width: 510px;
+ text-align: justify;
+ padding: 0 30px 0 30px;
+ font-size: 12px
+}
+.menu {
+ width: 139px;
+ float: right;
+ padding: 0 20px 0 20px;
+ border-left: #8C8484 1px solid;
+ font-size: 12px
+}
+.menu ul {
+ margin: 0;
+ padding: 10px 0 10px 15px
+}
+.menu il {
+ list-style-type: disc
+}
+#header h1 {
+ margin-bottom: 0px;
+ font-size: 28px;
+ font-weight: bold;
+ color: #A40008
+}
+.content h2 {
+ margin-top: 0px;
+ font-size: 18px;
+ font-weight: bold;
+ color: #A40008
+}
+#clear {
+ display: block;
+ clear: both;
+ width: 100%;
+ height:1px;
+ overflow:hidden;
+}
+.menu_title {
+ font-size: 18px;
+ font-weight: bold;
+ color: #A40008
+}
+.menu ul {
+ margin: 0;
+ padding: 10px 0 20px 15px
+}
+.menu li {
+ padding-top: 2px;
+ list-style-type: circle
+}
+a {
+ color: #A40008;
+ font-weight: bold;
+ text-decoration: none
+}
+a:hover {
+ color: #A40008;
+ font-weight: bold;
+ text-decoration: underline
+}
+a.menu_link {
+ color: #000000;
+ font-weight: bold;
+ text-decoration: underline
+}
+a.menu_link:hover {
+ color: #A40008;
+ font-weight: bold;
+ text-decoration: none
+}
+.quote {
+ margin: 20px;
+ text-align: center;
+ font-weight: bold;
+ font-style: italic
+}
\ No newline at end of file
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
===================================================================
---
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
(rev 0)
+++
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<f:template
xmlns:f='http:/jsf.exadel.com/template'
+
xmlns:u='http:/jsf.exadel.com/template/util'
+
xmlns="http://www.w3.org/1999/xhtml">
+
+ <u:selector name="body">
+ <u:style name="background-image">
+ <f:resource
f:key="/org/richfaces/renderkit/html/images/background.png"/>
+ </u:style>
+ <u:style name="background-color" value="#CACACA"/>
+ <u:style name="background-repeat" value="repeat-x"/>
+ <u:style name="font-family" skin="generalFamilyFont" />
+ </u:selector>
+
+ <u:selector name=".rich-page">
+ <u:style name="font-size" skin="generalSizeFont" />
+ </u:selector>
+
+ <f:verbatim>
+ <![CDATA[
+ ]]>
+ </f:verbatim>
+
+ <u:selector name=".rich-page-header">
+ <u:style name="color" value="#FFFFFF" />
+ <u:style name="font-weight" value="bold" />
+ <u:style name="font-size" value="153.9%" />
+ </u:selector>
+
+ <u:selector name=".rich-page-content">
+ <u:style name="background-image">
+ <f:resource
f:key="/org/richfaces/renderkit/html/images/background_content.gif"/>
+ </u:style>
+ <u:style name="background-color" value="#CACACA"/>
+ <u:style name="background-repeat" value="repeat-x"/>
+ </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-footer">
+ <u:style name="text-align" value="center" />
+ </u:selector>
+
+ <u:selector name=".rich-page-sidebar">
+ <u:style name="padding" value="0 20px 0 20px" />
+ <u:style name="border-left" value="#8C8484 1px solid" />
+ </u:selector>
+
+ <u:selector name="a:hover">
+ <u:style name="color" skin="hoverLinkColor" />
+ </u:selector>
+
+ <u:selector name="a:visited">
+ <u:style name="color" skin="visitedLinkColor" />
+ </u:selector>
+</f:template>
\ No newline at end of file
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css
===================================================================
---
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css
(rev 0)
+++
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1,199 @@
+/* css Zen Garden default style v1.02 */
+/* css released under Creative Commons License -
http://creativecommons.org/licenses/by-nc-sa/1.0/ */
+
+/* This file based on 'Tranquille' by Dave Shea */
+/* You may use this file as a foundation for any new work, but you may find it easier to
start from scratch. */
+/* Not all elements are defined in this file, so you'll most likely want to refer to
the xhtml as well. */
+
+/* Your images should be linked as if the CSS file sits in the same folder as the images.
ie. no paths. */
+
+
+/* basic elements */
+html {
+ margin: 0;
+ padding: 0;
+ }
+body {
+ font: 75% georgia, sans-serif;
+ line-height: 1.88889;
+ color: #555753;
+ background: #fff url(blossoms.jpg) no-repeat bottom right;
+ margin: 0;
+ padding: 0;
+ }
+p {
+ margin-top: 0;
+ text-align: justify;
+ }
+h3 {
+ font: italic normal 1.4em georgia, sans-serif;
+ letter-spacing: 1px;
+ margin-bottom: 0;
+ color: #7D775C;
+ }
+a:link {
+ font-weight: bold;
+ text-decoration: none;
+ color: #B7A5DF;
+ }
+a:visited {
+ font-weight: bold;
+ text-decoration: none;
+ color: #D4CDDC;
+ }
+a:hover, a:active {
+ text-decoration: underline;
+ color: #9685BA;
+ }
+acronym {
+ border-bottom: none;
+ }
+
+
+/* specific divs */
+#container {
+ background: url(zen-bg.jpg) no-repeat top left;
+ padding: 0 175px 0 110px;
+ margin: 0;
+ position: relative;
+ }
+
+#intro {
+ min-width: 470px;
+ }
+
+/* using an image to replace text in an h1. This trick courtesy Douglas Bowman,
http://www.stopdesign.com/articles/css/replace-text/ */
+#pageHeader h1 {
+ background: transparent url(h1.gif) no-repeat top left;
+ margin-top: 10px;
+ width: 219px;
+ height: 87px;
+ float: left;
+ }
+#pageHeader h1 span {
+ display:none
+ }
+#pageHeader h2 {
+ background: transparent url(h2.gif) no-repeat top left;
+ margin-top: 58px;
+ margin-bottom: 40px;
+ width: 200px;
+ height: 18px;
+ float: right;
+ }
+#pageHeader h2 span {
+ display:none
+ }
+#pageHeader {
+ padding-top: 20px;
+}
+
+#quickSummary {
+ clear:both;
+ margin: 20px 20px 20px 10px;
+ width: 160px;
+ float: left;
+ }
+#quickSummary p {
+ font: italic 10pt/22pt georgia;
+ text-align:center;
+ }
+
+#preamble {
+ clear: right;
+ padding: 0px 10px 0 10px;
+ }
+#supportingText {
+ padding-left: 10px;
+ margin-bottom: 40px;
+ }
+
+#footer {
+ text-align: center;
+ }
+#footer a:link, #footer a:visited {
+ margin-right: 20px;
+ }
+
+#linkList {
+ margin-left: 600px;
+ position: absolute;
+ top: 0;
+ right: 0;
+ }
+#linkList2 {
+ font: 10px verdana, sans-serif;
+ background: transparent url(paper-bg.jpg) top left repeat-y;
+ padding: 10px;
+ margin-top: 150px;
+ width: 130px;
+ }
+#linkList h3.select {
+ background: transparent url(h3.gif) no-repeat top left;
+ margin: 10px 0 5px 0;
+ width: 97px;
+ height: 16px;
+ }
+#linkList h3.select span {
+ display:none
+ }
+#linkList h3.favorites {
+ background: transparent url(h4.gif) no-repeat top left;
+ margin: 25px 0 5px 0;
+ width: 60px;
+ height: 18px;
+ }
+#linkList h3.favorites span {
+ display:none
+ }
+#linkList h3.archives {
+ background: transparent url(h5.gif) no-repeat top left;
+ margin: 25px 0 5px 0;
+ width:57px;
+ height: 14px;
+ }
+#linkList h3.archives span {
+ display:none
+ }
+#linkList h3.resources {
+ background: transparent url(h6.gif) no-repeat top left;
+ margin: 25px 0 5px 0;
+ width:63px;
+ height: 10px;
+ }
+#linkList h3.resources span {
+ display:none
+ }
+
+
+#linkList ul {
+ margin: 0;
+ padding: 0;
+ }
+#linkList li {
+ line-height: 2.5ex;
+ background: transparent url(cr1.gif) no-repeat top center;
+ display: block;
+ padding-top: 5px;
+ margin-bottom: 5px;
+ list-style-type: none;
+ }
+#linkList li a:link {
+ color: #988F5E;
+ }
+#linkList li a:visited {
+ color: #B3AE94;
+ }
+
+
+#extraDiv1 {
+ background: transparent url(cr2.gif) top left no-repeat;
+ position: absolute;
+ top: 40px;
+ right: 0;
+ width: 148px;
+ height: 110px;
+ }
+.accesskey {
+ text-decoration: underline;
+ }
\ No newline at end of file
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background.png
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_bottom.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_bottom.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_content.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_content.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_top.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_top.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx
===================================================================
--- trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx
(rev 0)
+++ trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx 2009-03-05
01:38:23 UTC (rev 12832)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+
xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c="
http://java.sun.com/jsf/core"
+ xmlns:ui="
http://ajax4jsf.org/cdk/ui"
+ xmlns:u="
http://ajax4jsf.org/cdk/u"
+ xmlns:x="
http://ajax4jsf.org/cdk/x"
+
xmlns:h="http://jsf.exadel.com/header"
+
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.CssZendRenderer"
+ baseclass="org.richfaces.renderkit.AbstractPageRenderer"
+ component="org.richfaces.component.UIPage"
+ >
+ <c:set var="namespace"
value="#{this:prolog(context,component)}"/>
+ <html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
+ >
+ <head>
+ <title>#{component.attributes['pageTitle']}</title>
+ <f:call name="themeStyle"/>
+ <f:call name="themeScript"/>
+ <u:insertFacet name="pageHeader"/>
+ </head>
+ <body id="css-zen-garden"
x:passThruWithExclusions="value,name,type,id">
+ <div id="container" class="rich-page
#{component.attributes['pageClass']}"
+ x:style="#{component.attributes['pageStyle']}">
+ <div id="intro">
+ <c:if test="#{this:hasFacet(component,'header')}">
+ <div id="pageHeader" class="rich-page-header
#{component.attributes['headerClass']}">
+ <u:insertFacet name="header"/>
+ </div>
+ </c:if>
+ <c:if test="#{this:hasFacet(component,'summary')}">
+ <div id="quickSummary" class="rich-page-summary
#{component.attributes['summaryClass']}">
+ <u:insertFacet name="summary"/>
+ </div>
+ </c:if>
+ <c:if test="#{this:hasFacet(component,'preamble')}">
+ <div id="preamble" class="rich-page-preamble
#{component.attributes['preambleClass']}">
+ <u:insertFacet name="preamble"/>
+ </div>
+ </c:if>
+ </div>
+ <div id="supportingText" class="rich-page-content
#{component.attributes['contentClass']}">
+ <vcp:body>
+ <div class="rich-page-body
#{component.attributes['bodyClass']}">
+ <f:call name="renderChildren" />
+ </div>
+ </vcp:body>
+ <c:if test="#{this:hasFacet(component,'footer')}">
+ <div id="footer" class="rich-page-footer
#{component.attributes['footerClass']}">
+ <u:insertFacet name="footer"/>
+ </div>
+ </c:if>
+ </div>
+ <c:if test="#{this:hasFacet(component,'sidebar')}">
+ <div id="linkList" class="rich-page-sidebar
#{component.attributes['styleClass']}">
+ <div id="linkList2">
+ <u:insertFacet name="sidebar"/>
+ </div>
+ </div>
+ </c:if>
+ </div>
+ <!-- These extra divs/spans may be used as catch-alls to add extra imagery. -->
+<div id="extraDiv1">
+<span/>
+</div>
+<div id="extraDiv2">
+</div>
+<div id="extraDiv3">
+</div>
+<div id="extraDiv4">
+</div>
+<div id="extraDiv5">
+</div>
+<div id="extraDiv6">
+</div>
+ </body>
+ </html>
+</f:root>
\ No newline at end of file
Property changes on:
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlLayoutPanel.jspx
===================================================================
---
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlLayoutPanel.jspx 2009-03-04
18:19:20 UTC (rev 12831)
+++
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlLayoutPanel.jspx 2009-03-05
01:38:23 UTC (rev 12832)
@@ -12,7 +12,7 @@
component="org.richfaces.component.UILayoutPanel"
<f:clientid var="clientId"/>
- <h:styles>/org/richfaces/ui/renderkit/html/css/grids.css</h:styles>
+ <h:styles>css/grids.css</h:styles>
<c:set var="styleClass"
value="#{component.attributes['styleClass']}"/>
<c:set var="yuiClass"
value="#{component.attributes['type']}"/>
<div id="#{clientId}" class="#{styleClass} yui-#{yuiClass}"
Modified: trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx
===================================================================
--- trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx 2009-03-04
18:19:20 UTC (rev 12831)
+++ trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx 2009-03-05
01:38:23 UTC (rev 12832)
@@ -11,39 +11,48 @@
baseclass="org.richfaces.renderkit.AbstractPageRenderer"
component="org.richfaces.component.UIPage"
- <h:styles>css/grids.css</h:styles>
+ <h:styles>css/fonts.css,css/page.css</h:styles>
<f:clientid var="clientId"/>
<c:set var="namespace"
value="#{this:prolog(context,component)}"/>
<html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
<head>
<title>#{component.attributes['pageTitle']}</title>
- <f:call name="styles"/>
+ <f:call name="themeStyle"/>
+ <f:call name="themeScript"/>
+ <f:call name="pageStyle"/>
<u:insertFacet name="pageHeader"/>
</head>
<body x:passThruWithExclusions="value,name,type,id">
- <div id="doc3"
class="#{this:documentClass(context,component)}">
+ <div id="#{clientId}" class="rich-page
#{component.attributes['pageClass']}"
+ x:style="#{component.attributes['pageStyle']}">
<c:if test="#{this:hasFacet(component,'header')}">
- <div id="hd"
x:class="#{component.attributes['headerClass']}">
- <u:insertFacet name="header"/>
+ <div id="#{clientId}:hd" class="rich-page-header
#{component.attributes['headerClass']}">
+ <u:insertFacet name="header"/>
</div>
</c:if>
- <div id="bd">
+ <c:if test="#{this:hasFacet(component,'subheader')}">
+ <div id="#{clientId}:shd" class="rich-page-subheader
#{component.attributes['subheaderClass']}">
+ <u:insertFacet name="subheader"/>
+ </div>
+ </c:if>
+ <div id="#{clientId}:cnt" class="rich-page-content
#{component.attributes['contentClass']}">
<c:if test="#{this:hasFacet(component,'sidebar')}">
- <div class="yui-b">
+ <div class="rich-page-sidebar
#{component.attributes['styleClass']}">
<u:insertFacet name="sidebar"/>
</div>
</c:if>
<vcp:body>
- <div class="yui-main">
- <div class="yui-b
#{component.attributes['bodyClass']}">
+ <div class="rich-page-main">
+ <div class="rich-page-body
#{component.attributes['bodyClass']}">
<f:call name="renderChildren" />
</div>
</div>
</vcp:body>
</div>
<c:if test="#{this:hasFacet(component,'footer')}">
- <div id="ft"
x:class="#{component.attributes['footerClass']}">
+ <f:clientid var="clientId"/>
+ <div id="#{clientId}:ft" class="rich-page-footer
#{component.attributes['footerClass']}">
<u:insertFacet name="footer"/>
</div>
</c:if>