[Checkins] SVN: Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/ CSS based homepage. Optimised for resolutions of 1024 x 800

Charlie Clark charlie at begeistert.org
Sun Oct 5 11:55:05 EDT 2008


Log message for revision 91781:
  CSS based homepage. Optimised for resolutions of 1024 x 800

Changed:
  U   Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/main_template.pt
  A   Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/zpt_stylesheet_new.css

-=-
Modified: Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/main_template.pt
===================================================================
--- Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/main_template.pt	2008-10-05 15:17:59 UTC (rev 91780)
+++ Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/main_template.pt	2008-10-05 15:55:04 UTC (rev 91781)
@@ -19,20 +19,17 @@
                   object_actions actions/object;
                   workflow_actions actions/workflow;
                   folder_actions actions/folder;
-                  add_actions python: actions.get('folder/add', {});
                   global_actions actions/global;
                   wf_state globals/wf_state;
-                  show_actionicons globals/show_actionicons;
                  "
 >
 
 <head>
  <title tal:content="context/expanded_title">Title goes here</title>
-
  <metal:slot define-slot="base" />
 
- <link rel="stylesheet" type="text/css" href="zpt_stylesheet.css"
-       tal:attributes="href context/zpt_stylesheet.css/absolute_url" />
+   <link rel="stylesheet" type="text/css" href="zpt_stylesheet_new.css"
+             tal:attributes="href context/zpt_stylesheet_new.css/absolute_url" />
  <link rel="stylesheet" type="text/css" href="calendar.css"
        tal:condition="caltool_installed"
        tal:attributes="href string:${portal_url}/++resource++calendar.css" />
@@ -40,31 +37,15 @@
 </head>
 
 <body>
-
-<div metal:define-macro="top_bar">
-
- <!-- hack around netscape 4.x to ensure table is solid -->
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
-
  <!-- Top bar -->
- <table id="Masthead"
-        width="100%" cellpadding="0" cellspacing="0" border="0">
+ <div metal:define-macro="top_bar" id="Masthead">
 
-  <tr>
-   <td id="PortalLogo">
     <a href="." tal:attributes="href string:${portal_url}/"
-    ><img src="Zope_logo.gif" alt="Zope Logo"
-          border="0" width="87" height="38"
-          tal:attributes="src string:${portal_url}/Zope_logo.gif" /></a>
-   </td>
+    ></a>
 
-   <td id="PortalTitle">
     <span tal:content="string:${portal_title}">Site Title</span>
-   </td>
 
-   <td id="NavBar" i18n:domain="cmf_default">
+   <div id="NavBar" i18n:domain="cmf_default">
    <form action="search" method="get"
          tal:attributes="action string:${portal_url}/search">
     <a href="."
@@ -88,250 +69,150 @@
            align="middle"
            tal:attributes="src string:${portal_url}/go.gif" /> &nbsp;
    </form>
-   </td>
-  </tr>
-
- </table>
- <!-- end topbar -->
-
- </td>
- </tr>
- </table>
- <!-- end NS4 hack -->
-
-<!-- end top_bar-->
+   </div>
 </div>
+<!-- end top_bar-->
 
-<div metal:define-macro="user_menu_bar"
+<div id="UserBar"
+     metal:define-macro="user_menu_bar"
      tal:define="uname python: isAnon and 'Guest' or member.getUserName()" >
+     <!-- user_menu_bar -->
+     
+     <span id="UserName" tal:content="uname">Guest</span>
 
- <!-- hack around netscape 4.x to ensure table is solid -->
- <table width="100%" border="0" cellpadding="0" cellspacing="0"
-        i18n:domain="cmf_default">
- <tr>
- <td>
-
- <!-- user_menu_bar -->
- <table id="MemberActionsBox"
-        width="100%" border="0" cellpadding="0" cellspacing="0">
-  <tr>
-   <td class="ActionTitle" tal:content="uname">Guest</td>
-   <td class="ActionLink" align="right">
-    <tal:span tal:repeat="action user_actions"
-    ><img src="" alt="" title=""
-            tal:define="icon_url action/icon|nothing"
-            tal:condition="python: show_actionicons and icon_url"
-            tal:attributes="src icon_url;
-                            alt action/title;
-                            title action/title"/>   
-    <a href="" tal:attributes="href action/url"
+   <ul id="MemberActionsBox" >
+    <li tal:repeat="action user_actions"
+    ><a href="" tal:attributes="href action/url"
                 tal:content="action/title" i18n:translate="">Login</a
-    ><tal:span tal:condition="not: repeat/action/end"> |</tal:span></tal:span>
-    <tal:span tal:condition="nothing"
-    ><a href="">Join</a></tal:span> </td>
-  </tr>
- </table>
- <!-- end user_menu_bar -->
+    ><tal:if tal:condition="not: repeat/action/end"> |</tal:if></li>
+    <tal:if tal:condition="nothing"
+    ><a href="">Join</a></tal:if> 
+    </ul>
 
- </td>
- </tr>
- </table>
- <!-- end NS4 hack -->
-
 <!-- end user_menu_bar div-->
 </div>
 
-<div id="main_body" i18n:domain="cmf_default">
+<div id="Desktop" i18n:domain="cmf_default">
 
- <table class="Forematter"
-        width="100%" border="0" cellpadding="0" cellspacing="0" >
- <tr>
- <td width="200px">
+  <p id="Breadcrumbs">
+   <span tal:repeat="bc context/breadcrumbs"
+    ><a href="."
+        tal:attributes="href bc/url" tal:content="bc/id"
+     >ID</a><span tal:condition="not: repeat/bc/end">&nbsp;/&nbsp;</span>
+   </span>
+  </p>
 
-  <!-- actions box -->
-  <table class="ContextActionsBox"
-         width="100%"
-         style="float: left;"
-         metal:define-macro="actions_box">
+  <p id="DesktopStatusBar"
+     tal:condition="globals/status_message"
+     tal:content="globals/status_message"
+     i18n:translate="">Status message.</p>
 
-   <!-- object actions -->
-   <tr class="ContextActionsRow">
+<metal:slot metal:define-slot="body"
+><metal:slot metal:define-slot="header" />
+<metal:slot metal:define-slot="main" /></metal:slot>
 
-    <td class="ActionTitle"
-        tal:define="getIcon python: hasattr(context, 'getIcon') and context.getIcon();
-                    icon python: getIcon or getattr(context, 'icon', '');
-                    typ python: getattr(context, 'Type', '');
-                    objID python: context.truncID(context.getId(), size=15)">
+ </div>
 
-     <img src="icon" align="left" title="Type" alt="[X]"
-          height="16" width="16"
-          tal:condition="icon"
-          tal:attributes="src string:${portal_url}/${icon};
-                          alt typ; "
-          i18n:attributes="alt" /> &nbsp;
+ <!-- actions box -->
+ <div id="ContextActionsBox" metal:define-macro="actions_box">
 
-     <span tal:replace="structure objID">ID</span>
-    </td>
-   </tr>
+  <!-- object actions -->
+  <div class="ContextActionsRow">
+   <div class="ActionTitle"
+       tal:define="getIcon python: hasattr(context, 'getIcon') and context.getIcon();
+                   icon python: getIcon or getattr(context, 'icon', '');
+                   typ python: getattr(context, 'Type', '');
+                   objID python: context.truncID(context.getId(), size=15)">
 
-   <tr class="ContextActionsRow"
-       tal:condition="python: len( object_actions ) > 1"
-   >
+    <img src="icon" align="left" title="Type" alt="[X]"
+         height="16" width="16"
+         tal:condition="icon"
+         tal:attributes="src string:${portal_url}/${icon};
+                         alt typ; "
+         i18n:attributes="alt" /> &nbsp;
+    <span tal:replace="structure objID">ID</span>
+   </div>
+ </div>
 
-    <td class="ActionLink">
+  <div class="ContextActionsRow"
+      tal:condition="python: len(object_actions) > 1">
 
-     <span tal:repeat="action object_actions">
-       <img src="" alt="" title=""
-            tal:define="icon_url action/icon|nothing"
-            tal:condition="python: show_actionicons and icon_url"
-            tal:attributes="src icon_url;
-                            alt action/title;
-                            title action/title"/>
-      <a href=""
-         tal:attributes="href action/url"
-         tal:content="action/title"
-         i18n:translate="">View</a><br />
-     </span>
+   <ul class="ActionLink">
 
-     <span tal:condition="nothing">
-      <a href="">Edit</a><br />
-     </span>
+    <li tal:repeat="action object_actions">
+     <a href=""
+        tal:attributes="href action/url"
+        tal:content="action/title"
+        i18n:translate="">View</a>
+    </li>
 
-     <span tal:condition="nothing">
-      <a href="">Metadata</a><br />
-     </span>
+    <li tal:condition="nothing">
+     <a href="">Edit</a><br />
+    </li>
 
-    </td>
-   </tr>
+    <li tal:condition="nothing">
+     <a href="">Metadata</a><br />
+    </li>
 
-   <!-- workflow actions -->
-   <tr class="ContextActionsRow"
-       tal:condition="workflow_actions" >
+  </ul>
+  </div>
 
-    <td class="ActionLink">
+  <!-- workflow actions -->
+  <div class="ContextActionsRow"
+      tal:condition="workflow_actions">
 
-      <span class="ObjectStatus">
-       <span tal:omit-tag=""
-             i18n:translate="">Status:</span>
-       <span tal:omit-tag=""
-             tal:content="wf_state"
-             i18n:translate="">Private</span><br />
-      </span>
+   <ul class="ActionLink">
 
-      <span tal:repeat="action workflow_actions">
-       <img src="" alt="" title=""
-            tal:define="icon_url action/icon|nothing"
-            tal:condition="python: show_actionicons and icon_url"
-            tal:attributes="src icon_url;
-                            alt action/title;
-                            title action/title"/>
-       <a href="content_submit_form"
-          tal:attributes="href action/url"
-          tal:content="action/title"
-          i18n:translate="">Submit</a><br />
-      </span>
-    </td>
-   </tr>
+     <span class="ObjectStatus">
+      <span tal:omit-tag=""
+            i18n:translate="">Status:</span>
+      <span tal:omit-tag=""
+            tal:content="wf_state"
+            i18n:translate="">Private</span><br />
+     </span>
 
-   <!-- folder actions -->
-   <tr class="ContextActionsRow"
-       tal:condition="folder_actions"
-   >
-    <td class="ActionLink">
-      <span tal:repeat="action folder_actions">
-       <img src="" alt="" title=""
-            tal:define="icon_url action/icon|nothing"
-            tal:condition="python: show_actionicons and icon_url"
-            tal:attributes="src icon_url;
-                            alt action/title;
-                            title action/title"/>
-       <a href="../folder_contents"
-          tal:attributes="href action/url"
-          tal:content="action/title"
-          i18n:translate="">Folder contents</a><br />
-      </span>
-    </td>
-   </tr>
+     <li tal:repeat="action workflow_actions">
+      <a href="content_submit_form"
+         tal:attributes="href action/url"
+         tal:content="action/title"
+         i18n:translate="">Submit</a><br />
+     </li>
+     </ul>
+   </div>
 
-   <!-- add actions -->
-   <tr class="ContextActionsRow"
-       tal:condition="add_actions"
-   >
-    <td class="ActionLink">
-      <span class="ObjectStatus">
-       <span tal:omit-tag=""
-             i18n:translate="">Add...</span><br />
-      </span>
 
-      <span tal:repeat="action add_actions">
-       <img src="" alt="" title=""
-            tal:define="icon_url action/icon|nothing"
-            tal:condition="python: show_actionicons and icon_url"
-            tal:attributes="src icon_url;
-                            alt action/title;
-                            title action/title"/>
-       <a href="+Document"
-          tal:attributes="href action/url"
-          tal:content="action/title"
-          i18n:translate="">Document</a><br />
-      </span>
-    </td>
-   </tr>
-
-   <!-- global actions -->
-   <tr class="ContextActionsRow"
-       tal:condition="global_actions"
-   >
-    <td class="ActionLink">
-     <span tal:repeat="action global_actions">
-       <img src="" alt="" title=""
-            tal:define="icon_url action/icon|nothing"
-            tal:condition="python: show_actionicons and icon_url"
-            tal:attributes="src icon_url;
-                            alt action/title;
-                            title action/title"/>
-      <a href="undo_form"
+  <!-- folder actions -->
+  <div class="ContextActionsRow"
+      tal:condition="folder_actions">
+   <ul class="ActionLink">
+     <li tal:repeat="action folder_actions">
+      <a href="../folder_contents"
          tal:attributes="href action/url"
          tal:content="action/title"
-         i18n:translate="">Undo</a><br />
-     </span>
-    </td>
-   </tr>
+         i18n:translate="">Folder contents</a><br />
+     </li>
+   </ul>
+  </div>
 
-   <tr tal:condition="caltool_installed">
-    <td>
-     <div metal:use-macro="context/@@calendar_widget/macros/calendarBox">
-     </div>
-    </td>
-   </tr>
+  <!-- global actions -->
+  <div class="ContextActionsRow"
+      tal:condition="global_actions">
+   <ul class="ActionLink">
+    <li tal:repeat="action global_actions">
+     <a href="undo_form"
+        tal:attributes="href action/url"
+        tal:content="action/title"
+        i18n:translate="">Undo</a><br />
+    </li>
+   </ul>
+  </div>
 
-  </table>
-  <!-- end actions_box -->
+  <div tal:condition="caltool_installed">
 
- </td>
-
- <td width="16px">&nbsp;</td>
-
- <td id="ForematterCell">
-  <div id="Desktop">
-
-  <p id="Breadcrumbs">
-   <span tal:repeat="bc context/breadcrumbs"
-    ><a href="."
-        tal:attributes="href bc/url" tal:content="bc/id"
-     >ID</a><span tal:condition="not: repeat/bc/end">&nbsp;/&nbsp;</span>
-   </span>
-  </p>
-
-  <p id="DesktopStatusBar"
-     tal:condition="globals/status_message"
-     tal:content="globals/status_message"
-     i18n:translate="">Status message.</p>
-
-<metal:slot metal:define-slot="body"
-><metal:slot metal:define-slot="header" />
-<metal:slot metal:define-slot="main" /></metal:slot>
-
+    <div metal:use-macro="context/@@calendar_widget/macros/calendarBox">
+    </div>
+  </div>
+</div>
  <div id="Permalink"
       tal:define="url context/get_permalink | nothing"
       tal:condition="url">
@@ -341,12 +222,7 @@
   </a>
  </div>
 
-  </div>
- </td>
- </tr>
- </table>
 
-</div>
-
 </body>
-</html></metal:macro>
+</html>
+</metal:macro>

Added: Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/zpt_stylesheet_new.css
===================================================================
--- Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/zpt_stylesheet_new.css	                        (rev 0)
+++ Products.CMFDefault/branches/Charlie_X/Products/CMFDefault/skins/zpt_generic/zpt_stylesheet_new.css	2008-10-05 15:55:04 UTC (rev 91781)
@@ -0,0 +1,84 @@
+html {
+    border: 0;
+    padding: 0;
+}
+
+#Masthead {
+    background: #369 url(Zope_logo.gif) no-repeat top left;
+    border: 0.2em;
+    border-color: #369;
+    padding-left: 12em;
+    height: 3em;
+    width: 43em;
+}
+
+#NavBar {
+    height: 3em;
+    float: right;
+}
+
+#UserBar {
+    border-top: #AAA solid 1px;
+    clear: left;
+    float: left;
+    background: #59C;
+    width: 54em;
+    padding-left: 1em;
+}
+
+.ActionLink{
+    list-style-type: none;
+    padding: 1px;
+    color: #F00;
+}
+
+.ActionTitle {
+    display: inline;
+}
+
+#UserName {
+    float: left;
+}
+
+#MemberActionsBox{
+    float: right;
+    text-align: right;
+    display: inline;
+    margin: 0;
+}
+
+#MemberActionsBox ul, #MemberActionsBox li{
+    display: inline;
+}
+
+#main_body {
+    float: left;
+    border-top: #FFF solid 1px;
+
+}
+
+#ContextActionsBox {
+    margin-left: -55em;
+    width: 9em;
+    height: 15em;
+    background-color: #AAA;
+    padding: 1em;
+    float: left;
+}
+
+#Desktop {
+    float: left;
+    border-left: #AAA solid 11em;
+    width: 42em;
+    padding: 1em;
+    background: #FFF;
+}
+
+#content_well {
+    float: left;
+}
+
+#right_sidebar {
+    float: right;
+}
+



More information about the Checkins mailing list