hgbook
diff plastex-theme/default-layout.html @ 911:f06879de9b01
Develop per-chapter templates and adapt the element creation script to deal with them.
author | dukebody <dukebody@gmail.com> |
---|---|
date | Tue Oct 27 00:10:56 2009 +0100 (2009-10-27) |
parents | 17dd7df51f86 |
children | fe9ee05ed4d5 |
line diff
1.1 --- a/plastex-theme/default-layout.html Mon Oct 26 20:01:26 2009 +0100 1.2 +++ b/plastex-theme/default-layout.html Tue Oct 27 00:10:56 2009 +0100 1.3 @@ -1,10 +1,25 @@ 1.4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1.5 -<html> 1.6 +<html tal:define="links self/links" 1.7 + xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 1.8 <head> 1.9 - <title tal:content="self/title">Book Title</title> 1.10 + 1.11 <meta name="generator" content="plasTeX" /> 1.12 <meta http-equiv="content-type" 1.13 - tal:attributes="content string:text/html; charset=${config/files/output-encoding}" /> 1.14 + tal:attributes="content string:text/html;; charset=${config/files/output-encoding}" /> 1.15 + 1.16 + <title tal:condition="python:path('self/level') > -10" 1.17 + tal:content="stripped string:${links/document/title}: ${self/title}"> 1.18 + Book title 1.19 + </title> 1.20 + <link tal:condition="links/next" 1.21 + rel="next" 1.22 + tal:attributes="href links/next/url; title links/next/title/textContent" /> 1.23 + <link tal:condition="links/prev" 1.24 + rel="prev" 1.25 + tal:attributes="href links/prev/url; title links/prev/title/textContent" /> 1.26 + <link tal:condition="links/up" 1.27 + rel="up" 1.28 + tal:attributes="href links/up/url; title links/up/title/textContent" /> 1.29 1.30 <link rel="stylesheet" href="styles/styles.css"/> 1.31 <link rel="stylesheet" href="/support/styles/styles.css"/> 1.32 @@ -22,19 +37,80 @@ 1.33 <body> 1.34 1.35 <div class="navheader"><h2 class="booktitle"> 1.36 - <tal:booktitle replace="self/title" /> 1.37 + <tal:booktitle replace="links/document/title" /> 1.38 <div class="authors">by 1.39 - <tal:author tal:content="self/author"> 1.40 + <tal:author tal:content="links/document/attributes/author"> 1.41 Author 1.42 </tal:author> 1.43 </div> 1.44 </h2> 1.45 </div> 1.46 1.47 - <div class="chapter" id="{% doc_id %}"> 1.48 + <div class="navheader" metal:define-macro="navigation"> 1.49 + <table width="100%"> 1.50 + <tr> 1.51 + <td width="40%" align="left"> 1.52 + <a tal:condition="links/prev" 1.53 + tal:attributes="href links/prev/url; 1.54 + title stripped:links/prev/title" 1.55 + accesskey="p">Prev</a> </td> 1.56 + <td width="20%" align="center"> 1.57 + <a tal:condition="links/up" 1.58 + tal:attributes="href links/up/url">Up</a> 1.59 + </td> 1.60 + <td width="40%" align="right"> 1.61 + <a tal:condition="links/next" 1.62 + tal:attributes="href links/next/url; 1.63 + title stripped:links/next/title" 1.64 + accesskey="n">Next</a> 1.65 + </td> 1.66 + </tr> 1.67 + <tr> 1.68 + <td width="40%" align="left"> 1.69 + <span tal:condition="links/prev" 1.70 + tal:replace="stripped:links/prev/title">Prev</span> 1.71 + </td> 1.72 + <td width="20%" align="center"> </td> 1.73 + <td width="40%" align="right"> 1.74 + <span tal:condition="links/next" 1.75 + tal:replace="stripped:links/next/title">Next</span> 1.76 + </td> 1.77 + </tr> 1.78 + </table> 1.79 + </div> 1.80 + 1.81 + <div class="chapter" 1.82 + tal:attributes="id string:${links/document/title}: ${self/title}"> 1.83 1.84 <div class="file_contents" tal:content="self">File contents.</div> 1.85 1.86 + <div tal:condition="self/tableofcontents" 1.87 + tal:attributes="class 1.88 + string:contents 1.89 + ${self/nodeName}-contents"> 1.90 + <ul> 1.91 + <li tal:repeat="section self/tableofcontents"><a href="." tal:attributes="href section/url" tal:content="section/fullTocEntry">Aliquam est. Aliquam fringilla pede</a> 1.92 + <ul tal:condition="section/tableofcontents"> 1.93 + <li tal:repeat="subsection section/tableofcontents"><a href="." tal:attributes="href subsection/url" tal:content="subsection/fullTocEntry"></a> 1.94 + <ul tal:condition="subsection/tableofcontents"> 1.95 + <li tal:repeat="subsubsection subsection/tableofcontents"><a href="." tal:attributes="href subsubsection/url" tal:content="subsubsection/fullTocEntry"></a> 1.96 + <ul tal:condition="subsubsection/tableofcontents"> 1.97 + <li tal:repeat="paragraph subsubsection/tableofcontents"><a href="." tal:attributes="href paragraph/url" tal:content="paragraph/fullTocEntry"></a> 1.98 + <ul tal:condition="paragraph/tableofcontents"> 1.99 + <li tal:repeat="subparagraph paragraph/tableofcontents"><a href="." tal:attributes="href subparagraph/url" tal:content="subparagraph/fullTocEntry"></a></li> 1.100 + </ul> 1.101 + </li> 1.102 + </ul> 1.103 + </li> 1.104 + </ul> 1.105 + </li> 1.106 + </ul> 1.107 + </li> 1.108 + <li tal:replace="nothing"><a href=".">Maecenas id purus</a></li> 1.109 + </ul> 1.110 + </div> 1.111 + 1.112 + 1.113 <div id="footnotes" tal:condition="self/footnotes"> 1.114 <p><b>Footnotes</b></p> 1.115 <ol> 1.116 @@ -56,6 +132,8 @@ 1.117 href="http://mattahan.deviantart.com/">Mattahan</a>.</p> 1.118 </div> 1.119 1.120 + <div class="navfooter" 1.121 + metal:use-macro="template/macros/navigation" /> 1.122 </body> 1.123 1.124 <script language="javascript" src="icons/imgadjust.js"