[Zope3-checkins] CVS: Products3/NewsSite/skin - __init__.py:1.1 configure.zcml:1.1 dialog_macros.pt:1.1 newssite.css:1.1 newssitemacros.py:1.1 template.pt:1.1 view_macros.pt:1.1
Ulrich Eck
ueck@net-labs.de
Thu, 27 Mar 2003 11:41:11 -0500
Update of /cvs-repository/Products3/NewsSite/skin
In directory cvs.zope.org:/tmp/cvs-serv8087/skin
Added Files:
__init__.py configure.zcml dialog_macros.pt newssite.css
newssitemacros.py template.pt view_macros.pt
Log Message:
major refactoring of newssite skin
=== Added File Products3/NewsSite/skin/__init__.py ===
=== Added File Products3/NewsSite/skin/configure.zcml ===
<zopeConfigure
xmlns='http://namespaces.zope.org/zope'
xmlns:browser='http://namespaces.zope.org/browser'
>
<browser:page
for="*"
name="newssite_macros"
permission="zope.View"
class=".newssitemacros.StandardMacros"
allowed_interface="zope.interface.common.mapping.IItemMapping"
/>
<browser:page
for="*"
name="newssite_skin_macros"
permission="zope.View"
template="template.pt"
/>
<browser:page
for="*"
name="newssite_view_macros"
permission="zope.View"
template="view_macros.pt" />
<browser:page
for="*"
name="newssite_dialog_macros"
permission="zope.View"
template="dialog_macros.pt" />
</zopeConfigure>
=== Added File Products3/NewsSite/skin/dialog_macros.pt ===
<metal:block define-macro="dialog"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block>
<html
xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en"
lang="en" >
<head>
<!-- Waaa -->
<title metal:define-slot="title">Z3 UI</title>
<style type="text/css"
media="all"
tal:content=
"string: @import url(${context/++resource++zope3.css});"
>
@import url(zope3.css);
</style>
<metal:block define-slot="headers" />
<metal:block define-slot="style_slot" />
<metal:block define-slot="ecmascript_slot" />
<script type="text/javascript" src="xmltree.js"
tal:attributes="src string:${context/++resource++xmltree.js}"
></script>
</head>
<body onload="loadtree('');"
tal:define="rooturl request/getApplicationURL;
thisbaseurl request/URL/-1;
"
tal:attributes="
onload string:loadtree('${rooturl}/', '${thisbaseurl}/');
"
>
<div id="global">
<img tal:attributes="src context/++resource++zope3logo.gif" />
</div>
<div id="personal">
<metal:block define-macro="logged_user">
User:
<tal:block replace="request/user/getTitle">
User
</tal:block>
</metal:block>
(Personal elements)
</div>
<div id="navigators">
<div class="box" id="navigationTree">
<h4>Navigation</h4>
<div
xmlns="http://www.zope.org/zope3xmltree"
id="navtreecontents"
class="body"
onclick="treeclicked(event);"
onmouseover="mouseOverTree(event);"
onmouseout="mouseOutTree(event);"
>
</div>
</div>
</div>
<div id="content">
<div class="itemViewsBar">
</div>
<div class="item">
<metal:block define-slot="body">
<table class="listing">
<thead>
<th>Test</th>
<th>Another</th>
</thead>
<tbody>
<tr>
<td>content</td>
<td>thingy</td>
</tr>
<tr class="even">
<td>more</td>
<td>data</td>
</tr>
</tbody>
</table>
</metal:block>
</div>
</div>
<div id="context_information">
<div id="helpers">
<div class="box" id="itemHelp" tal:condition="pagetip|nothing">
<h4>Tip</h4>
<div class="body">
<div class="content odd">
<metal:block define-slot="pagetip" tal:replace="pagetip">
A short tip goes here
</metal:block>
</div>
</div>
</div>
</div>
</div>
<div id="footer"
metal:define-macro="footer">
Powered by Zope
</div>
</body>
</html>
</metal:block>
=== Added File Products3/NewsSite/skin/newssite.css === (428/528 lines abridged)
/*
** Zope3 style sheet for CSS2-capable browsers.
**
*/
/*
* { border: 1px dotted red }
*/
/* Basic Elements */
body {
font: 85% Helvetica, Arial, sans-serif;
background: #F5FFFA;
color: Black;
margin: 0;
padding: 0;
/* These work in IE only, changes the look of the scrollbar + textareas */
scrollbar-base-color: White;
scrollbar-highlight-color: White;
scrollbar-track-color: #F8F8F8;
scrollbar-darkshadow-color: #F8F8F8;
scrollbar-3dlight-color: #336699;
scrollbar-shadow-color: #336699;
scrollbar-arrow-color: Black;
}
table {
font-size: 100%;
}
a {
text-decoration: none;
color: #336699;
background-color: transparent;
}
table {
}
img {
border: none;
vertical-align: middle;
}
p {
[-=- -=- -=- 428 lines omitted -=- -=- -=-]
table.listing tr.odd {
/*every second line should be shaded */
background: White;
}
table.listing tr.even {
background: #F8F8F8;
}
table.listing td {
border-right: 1px solid #CCCCCC;
padding: 0em 1em;
text-align: left;
}
table.listing img {
vertical-align: middle;
}
div.spacer {
clear: both;
}
div.message {
background: #FFCE7B;
border: 1px solid #FFA500;
color: Black;
font: bold 80% Verdana, Helvetica, Arial, sans-serif;
margin: 2em 0em 1em 0em;
padding: 0.5em 1em;
vertical-align: middle;
}
div.message a {
color: Black;
text-decoration: underline;
}
=== Added File Products3/NewsSite/skin/newssitemacros.py ===
from zope.app.browser.skins.basic.standardmacros import StandardMacros as BaseMacros
class StandardMacros(BaseMacros):
__implements__ = BaseMacros.__implements__
macro_pages = ('newssite_skin_macros',
'newssite_view_macros',
'newssite_dialog_macros')
=== Added File Products3/NewsSite/skin/template.pt ===
<metal:block define-macro="page"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block>
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en"
lang="en">
<head>
<title metal:define-slot="title">Z3 UI</title>
<style type="text/css"
media="all"
tal:content=
"string: @import url(${context/++resource++zope3.css});"
>
@import url(zope3.css);
</style>
<meta http-equiv="Content-Type"
content="text/html;charset=utf-8" />
<metal:block define-slot="headers" />
<metal:block define-slot="style_slot" />
<metal:block define-slot="ecmascript_slot" />
<script type="text/javascript" src="xmltree.js"
tal:attributes="src string:${context/++resource++xmltree.js}"></script>
</head>
<body tal:define="rooturl request/getApplicationURL;
thisbaseurl request/URL/-1;
"
>
<div id="global">
<img tal:attributes="src context/++resource++zope3logo.gif" />
</div>
<div id="personal">
<div id="userDetails">
<metal:block define-macro="logged_user">
User:
<tal:block replace="request/user/getTitle">
User
</tal:block>
</metal:block>
</div>
[Personalized Elements]
</div>
<div id="space"></div>
<div id="workspace">
<div id="actions"
tal:define="actions context/@@view_get_menu/newssite_actions"
tal:condition="actions"
metal:define-slot="tabs">
<a href="#"
tal:attributes="href info/action"
tal:repeat="info actions"
tal:content="info/title">
Action name
</a>
</div>
<div id="viewspace">
<div id="breadcrumbs"
metal:define-macro="breadcrumbs"
> Location: <tal:block
repeat="breadcrumb context/@@absolute_url/breadcrumbs"
><a href=""
tal:condition="repeat/breadcrumb/start"
tal:content="string:[top]"
tal:attributes="
href string:${breadcrumb/url}"
>XXX should not hardcode root folder name string</a
><a href=""
tal:condition="not:repeat/breadcrumb/start"
tal:content="string:${breadcrumb/name}"
tal:attributes="
href string:${breadcrumb/url}"
>breadcrumb item</a> / </tal:block>
</div>
<div metal:define-slot="message" id="message">
</div>
<div id="content">
<metal:block define-slot="body">
<table class="listing">
<thead>
<th>Test</th>
<th>Another</th>
</thead>
<tbody>
<tr>
<td>content</td>
<td>thingy</td>
</tr>
<tr class="even">
<td>more</td>
<td>data</td>
</tr>
</tbody>
</table>
</metal:block>
</div>
<div id="context_information">
<div id="helpers">
<div class="box" id="itemHelp" tal:condition="pagetip|nothing">
<h4>Tip</h4>
<div class="body">
<div class="content odd">
<metal:block define-slot="pagetip" tal:replace="pagetip">
A short tip goes here
</metal:block>
</div>
</div>
</div>
</div>
<!-- div id="inspectors">
<div class="box" id="metadata"
tal:define="view context/@@MetaDataBox|nothing"
tal:condition="view/strip|nothing">
<h4>Metadata</h4>
<div class="body">
<div class="content" tal:content="structure view">
Some metadata
</div>
</div>
</div>
</div -->
</div>
<div class="spacer">
</div>
</div>
<div class="box" id="help"
tal:define="results view/@@find_help_topics|nothing"
tal:condition="results">
<h4>Online Help</h4>
<div class="body">
<a href="#"
tal:repeat="entry results"
tal:attributes="href entry/url">
<div tal:define="oddrow repeat/entry/odd"
tal:attributes="class python:oddrow and 'even' or 'odd'"
tal:content="entry/topic/title">Topic Title
</div>
</a>
</div>
</div>
</div>
<div id="footer"
metal:define-macro="footer">
</div>
<div id="logger" />
</body>
</html>
</metal:block>
=== Added File Products3/NewsSite/skin/view_macros.pt ===
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html metal:define-macro="page">
<head metal:define-macro="head">
<title
metal:define-slot="title"
tal:content="options/getTitle|view/getTitle|context/getTitle|default"
>Zope</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/@@/zopetopBasic.css" rel="stylesheet" type="text/css"
tal:attributes="href string:/@@/zopetopBasic.css" />
<link href="/@@/zopetopWidgets.css" rel="stylesheet" type="text/css"
tal:attributes="href string:/@@/zopetopWidgets.css" />
<link href="/@@/zopetopStructure.css" rel="stylesheet" type="text/css"
tal:attributes="href string:/@@/zopetopStructure.css" />
<div metal:define-slot="headers">
</div>
</head>
<body>
<div metal:define-slot="body">
<p>Body here</p>
</div>
<div metal:define-macro="logged_user">
<p>User: <span tal:replace="request/user/getTitle">User</span></p>
</div>
<div metal:define-macro="footer">
<p>Powered by Zope</p>
</div>
</body>
</html>