Author: ArcRiley
Date: 2008-09-28 20:41:06 -0400 (Sun, 28 Sep 2008)
New Revision: 1369

Added:
   trunk/pysoy/docs/templates/genindex.html
   trunk/pysoy/docs/templates/layout.html
Modified:
   trunk/pysoy/docs/templates/page.html
Log:
Ticket #964 :
  * split layout from page using Xinclude
  * started work on genindex


Added: trunk/pysoy/docs/templates/genindex.html
===================================================================
--- trunk/pysoy/docs/templates/genindex.html                            (rev 0)
+++ trunk/pysoy/docs/templates/genindex.html    2008-09-29 00:41:06 UTC (rev 
1369)
@@ -0,0 +1,65 @@
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";
+      xmlns:py="http://genshi.edgewall.org/";
+      xmlns:xi="http://www.w3.org/2001/XInclude";
+      lang="en">
+  <xi:include href="layout.html" />
+  <py:match path="title" once="true" buffer="false">
+    <title>Index</title>
+  </py:match>
+  <py:match path="body" once="true" buffer="false"><body>
+   <h1 id="index">Index</h1>
+
+   {% for key, dummy in genindexentries -%}
+   <a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| 
{% endif %}
+   {%- endfor %}
+
+   <hr />
+
+   {% for key, entries in genindexentries %}
+<h2 id="{{ key }}">{{ key }}</h2>
+<table width="100%" class="indextable"><tr><td width="33%" valign="top">
+<dl>
+{%- set breakat = genindexcounts[loop.index0] // 2 %}
+{%- set numcols = 1 %}
+{%- set numitems = 0 %}
+{% for entryname, (links, subitems) in entries %}
+<dt>{%- if links -%}<a href="{{ links[0] }}">{{ entryname|e }}</a>
+  {%- for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%}
+  {%- else -%}
+{{ entryname|e }}
+  {%- endif -%}</dt>
+  {%- if subitems %}
+  <dd><dl>
+    {%- for subentryname, subentrylinks in subitems %}
+    <dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a>
+    {%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% 
endfor -%}
+    </dt>
+    {%- endfor %}
+  </dl></dd>
+  {%- endif -%}
+{%- set numitems = numitems + 1 + len(subitems) -%}
+{%- if numcols < 2 and numitems > breakat -%}
+{%- set numcols = numcols+1 -%}
+</dl></td><td width="33%" valign="top"><dl>
+{%- endif -%}
+{%- endfor %}
+</dl></td></tr></table>
+{% endfor %}
+
+{% endblock %}
+
+{% block sidebarrel %}
+{% if split_index %}
+   <h4>Index</h4>
+   <p>{% for key, dummy in genindexentries -%}
+   <a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a>
+     {% if not loop.last %}| {% endif %}
+   {%- endfor %}</p>
+
+   <p><a href="{{ pathto('genindex-all') }}"><strong>Full index on one 
page</strong></a></p>
+{% endif %}
+  </body></py:match>
+</html>

Copied: trunk/pysoy/docs/templates/layout.html (from rev 1367, 
trunk/pysoy/docs/templates/page.html)
===================================================================
--- trunk/pysoy/docs/templates/layout.html                              (rev 0)
+++ trunk/pysoy/docs/templates/layout.html      2008-09-29 00:41:06 UTC (rev 
1369)
@@ -0,0 +1,20 @@
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";
+      xmlns:py="http://genshi.edgewall.org/";
+      xmlns:xi="http://www.w3.org/2001/XInclude";
+      lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>${pagename} - ${docstitle}</title>
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <link rel="stylesheet" href="_static/${style}" type="text/css" 
+     py:if="style" />
+    <link rel="shortcut icon" href="_static/${favicon}" type="image/x-icon" 
+     py:if="favicon" />
+    <link rel="icon" href="_static/${favicon}" type="image/x-icon" 
+     py:if="favicon" />
+  </head>
+  <body />
+</html>

Modified: trunk/pysoy/docs/templates/page.html
===================================================================
--- trunk/pysoy/docs/templates/page.html        2008-09-28 21:59:49 UTC (rev 
1368)
+++ trunk/pysoy/docs/templates/page.html        2008-09-29 00:41:06 UTC (rev 
1369)
@@ -5,18 +5,8 @@
       xmlns:py="http://genshi.edgewall.org/";
       xmlns:xi="http://www.w3.org/2001/XInclude";
       lang="en">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>${pagename} - ${docstitle}</title>
-    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-    <link rel="stylesheet" href="_static/${style}" type="text/css" 
-     py:if="style" />
-    <link rel="shortcut icon" href="_static/${favicon}" type="image/x-icon" 
-     py:if="favicon" />
-    <link rel="icon" href="_static/${favicon}" type="image/x-icon" 
-     py:if="favicon" />
-  </head>
-  <body>
+  <py:match path="body" once="true"><body>
 ${Markup(body)}
-  </body>
+  </body></py:match>
+  <xi:include href="layout.html" />
 </html>

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to