[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/browser -
__init__.py:1.1 apidoc.css:1.1 apidoc.py:1.1
configure.zcml:1.1 contents.pt:1.1 details_macros.pt:1.1
index.html:1.1 macros.py:1.1 menu.html:1.1 menu_macros.pt:1.1
modules.pt:1.1
Philipp von Weitershausen
philikon at philikon.de
Thu Feb 19 15:46:40 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/apidoc/browser
In directory cvs.zope.org:/tmp/cvs-serv13817/browser
Added Files:
__init__.py apidoc.css apidoc.py configure.zcml contents.pt
details_macros.pt index.html macros.py menu.html
menu_macros.pt modules.pt
Log Message:
Bring over zope.products.apidoc to zope.app.
=== Added File Zope3/src/zope/app/apidoc/browser/__init__.py ===
# make this directory a package.
=== Added File Zope3/src/zope/app/apidoc/browser/apidoc.css ===
body {
font: 80% Verdana, Helvetica, Arial, sans-serif;
background: white;
color: black;
margin: 0pt;
padding: 0pt;
}
code, pre {
font-size: 110%;
}
ul {
margin: 0;
margin-left: 1.5em;
padding: 0;
}
table.menu {
font-size: 95%;
}
div.apihead {
font-weight: bold;
font-size: 120%;
margin: 0;
padding: 2pt;
margin-bottom: 3pt;
background: #fffbbe;
width: 98%;
}
div.menu {
border-top: solid 1pt black;
margin-bottom: 3pt;
font-weight: bold;
}
p.small, div.small {
font-size: 85%;
padding: 4pt;
}
span.small {
font-size: 85%;
}
div.indent {
margin-left: 1.5em;
}
h1.details-header {
font-size: 220%;
font-weight: normal;
margin-top: 0;
}
h2.details-section {
font-size: 150%;
font-style: italic;
}
h3.details-section {
margin-bottom: 2pt;
}
p.breadcrumbs {
padding: 2pt;
border: solid 1px black;
}
.important {
font-size: 120%;
}
ul.attr-list li {
margin-bottom: 0.5em;
}
/* Styles that are associated with STX-generated HTML */
div.documentation {
}
div.documentation h1 {
font-size: 120%;
}
div.documentation h2 {
font-size: 110%;
font-style: italic;
}
div.documentation h3 {
font-style: italic;
font-weight: normal;
padding: 0;
margin: 0;
}
div.documentation p {
padding: 0;
margin-top: 0;
margin-bottom: 1em;
}
div.documentation ul, ol {
margin: 0.5em 2em;
}
div.inline-documentation h3 {
font-style: italic;
font-weight: normal;
padding: 0;
margin: 0;
margin-bottom: 0.5em;
}
div.inline-documentation p {
padding: 0;
margin: 0 0.5em 0 0;
}
=== Added File Zope3/src/zope/app/apidoc/browser/apidoc.py ===
##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Main API Documentation View
$Id: apidoc.py,v 1.1 2004/02/19 20:46:39 philikon Exp $
"""
from zope.app.apidoc.utilities import stx2html
__metaclass__ = type
class APIDocumentation:
"""View for the API Documentation"""
def getModuleList(self):
"""Get a list of all available documentation modules."""
modules = []
items = list(self.context.items())
items.sort()
return [{'name': name,
'title': m.title,
'description': stx2html(m.description)}
for name, m in items ]
=== Added File Zope3/src/zope/app/apidoc/browser/configure.zcml ===
<configure
xmlns="http://namespaces.zope.org/browser"
i18n_domain="api_doc">
<resource name="apidoc.css" file="apidoc.css" />
<page
for="*"
name="apidoc_macros"
permission="zope.View"
class=".macros.APIDocumentationMacros"
allowed_interface="zope.interface.common.mapping.IItemMapping"
/>
<page
for="*"
name="menu_macros"
permission="zope.View"
template="menu_macros.pt"
/>
<page
for="*"
name="details_macros"
permission="zope.View"
template="details_macros.pt"
/>
<pages
for="zope.app.apidoc.APIDocumentation"
class=".apidoc.APIDocumentation"
permission="zope.View">
<page
name="index.html"
template="index.html" />
<page
name="modulelist.html"
template="modules.pt" />
<page
name="menu.html"
template="menu.html" />
<page
name="contents.html"
template="contents.pt" />
</pages>
</configure>
=== Added File Zope3/src/zope/app/apidoc/browser/contents.pt ===
<html metal:use-macro="views/apidoc_macros/details">
<body metal:fill-slot="contents">
<h1>Zope 3 API Documentation</h1>
<p>Welcome to the Zope 3 API documentation tool. The documentation provided
here is seperated in several discrete documentation modules. You can see
the list of available modules in the top-left box on your screen. When you
click on a module, the module's menu will appear below. In the menu you
have then navigational means to access the documentation content of the
module.</p>
<p>Modules are usually depending on each other by using links that create
references across all modules. Each module has a "theme" that it follows,
which was designed to aid the developer directly to the desired
information. Below you see a short description of every module.</p>
<tal:omit-tag repeat="module view/getModuleList">
<h2 tal:content="module/title">Module Title</h2>
<p tal:replace="structure module/description">
Module Description
</p>
</tal:omit-tag>
</body>
</html>
=== Added File Zope3/src/zope/app/apidoc/browser/details_macros.pt ===
<metal:block define-macro="details"><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"
i18n:domain="apidoc">
<head>
<title metal:define-slot="title" i18n:translate="">Z3 UI</title>
<style type="text/css"
media="all"
tal:content=
"string: @import url(${context/++resource++apidoc.css});"
>
@import url(/++resource++apidoc.css);
</style>
<metal:block define-slot="headers" />
<metal:block define-slot="style_slot" />
<metal:block define-slot="ecmascript_slot" />
<link rel="icon" type="image/png"
tal:attributes="href context/++resource++favicon.png" />
</head>
<head>
<body style="margin: 1em;">
<metal:block define-slot="contents" />
</body>
</html>
</metal:block>
=== Added File Zope3/src/zope/app/apidoc/browser/index.html ===
<html>
<head>
<title>Zope 3 API Docs</title>
</head>
<frameset cols="20%, *" border="1">
<frameset rows="120, *">
<frame name="modules" src="modulelist.html" border="1">
<frame name="menu" src="menu.html" border="1">
</frameset>
<frame name="main" src="contents.html" border="1">
</frameset>
</html>
=== Added File Zope3/src/zope/app/apidoc/browser/macros.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""API Documentation macros
$Id: macros.py,v 1.1 2004/02/19 20:46:39 philikon Exp $
"""
from zope.app.browser.skins.basic.standardmacros import StandardMacros
BaseMacros = StandardMacros
class APIDocumentationMacros(BaseMacros):
"""Page Template METAL macros for API Documentation"""
macro_pages = ('menu_macros', 'details_macros')
=== Added File Zope3/src/zope/app/apidoc/browser/menu.html ===
<html metal:use-macro="views/apidoc_macros/menu">
<body>
<div metal:fill-slot="menu">
<p class="small">Click on one of the Documentation Modules above and a menu
for this module will appear.</p>
</div>
</body>
</html>
=== Added File Zope3/src/zope/app/apidoc/browser/menu_macros.pt ===
<metal:block define-macro="menu"><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"
i18n:domain="apidoc">
<head>
<!-- Waaa -->
<title metal:define-slot="title" i18n:translate="">Z3 UI</title>
<style type="text/css"
media="all"
tal:content=
"string: @import url(${context/++resource++apidoc.css});"
>
@import url(/++resource++apidoc.css);
</style>
<metal:block define-slot="headers" />
<metal:block define-slot="style_slot" />
<metal:block define-slot="ecmascript_slot" />
<link rel="icon" type="image/png"
tal:attributes="href context/++resource++favicon.png" />
</head>
<head>
<body>
<div class="menu">Menu</div>
<metal:block define-slot="pre_menu" />
<metal:block define-slot="menu">
<table cellspacing="0" cellpadding="0" class="menu" border="0"
tal:define="root context/@@cookie_tree;
result root/getFlatDicts;
nodeDictList python:result[0];
maxDepth python:result[1]">
<tr tal:repeat="nodeInfo nodeDictList">
<tal:block tal:define="node nodeInfo/node">
<td style="width:16px" tal:repeat="state nodeInfo/row-state">
<img tal:attributes="src context/++resource++tree_images/vline.png"
tal:condition="state" alt="|" border="0" />
</td>
<td style="width:16px">
<a href=""
tal:attributes="href string:?tree-state=${nodeInfo/tree-state}"
tal:condition="node/hasChildren">
<tal:block condition="not:nodeInfo/last-level-node">
<img tal:attributes="src context/++resource++tree_images/plus_vline.png"
tal:condition="not:node/expanded" alt="+" border="0" />
<img tal:attributes="src context/++resource++tree_images/minus_vline.png"
tal:condition="node/expanded" alt="-" border="0" />
</tal:block>
<tal:block condition="nodeInfo/last-level-node">
<img tal:attributes="src context/++resource++tree_images/plus.png"
tal:condition="not:node/expanded" alt="+" border="0" />
<img tal:attributes="src context/++resource++tree_images/minus.png"
tal:condition="node/expanded" alt="-" border="0" />
</tal:block>
</a>
<tal:block condition="not:node/hasChildren">
<img tal:attributes="src context/++resource++tree_images/tline.png"
tal:condition="not:nodeInfo/last-level-node" alt="T" border="0" />
<img tal:attributes="src context/++resource++tree_images/lline.png"
tal:condition="nodeInfo/last-level-node" alt="L" border="0" />
</tal:block>
</td>
<td colspan="1" class="list-item"
tal:attributes="colspan python:maxDepth-len(nodeInfo['row-state'])+1">
<a href="" target="main"
tal:attributes="href python: view.getMenuLink(node)"
tal:content="python: view.getMenuTitle(node)"
tal:condition="python: view.getMenuLink(node) is not None">
node/id
</a><tal:block
replace="python: view.getMenuTitle(node)"
condition="python: view.getMenuLink(node) is None" />
</td>
</tal:block>
</tr>
</table>
</metal:block>
<metal:block define-slot="post_menu" />
</body>
</html>
</metal:block>
=== Added File Zope3/src/zope/app/apidoc/browser/modules.pt ===
<html metal:use-macro="views/apidoc_macros/details">
<body metal:fill-slot="contents"
style="padding: 0; margin: 0">
<div class="apihead">Zope 3 API Docs</div>
<div style="margin-left: 0.5em">
<ul class="modules">
<li tal:repeat="module view/getModuleList">
<a href="" target="menu"
tal:attributes="href string:${module/name}/menu.html"
tal:content="module/title">
Interfaces
</a>
</li>
</ul>
</div>
</body>
</html>
More information about the Zope3-Checkins
mailing list