stas 02/05/14 03:16:48 Modified: tmpl/custom/ps body index tail Added: tmpl/custom/ps index_toc index_toc_section Log: add index templates like in html/ so we can have the bot/top text in the pdf, and as well, the descriptions of the chapters in the front TOC - fix a few alignments Revision Changes Path 1.5 +1 -1 modperl-docs/tmpl/custom/ps/body Index: body =================================================================== RCS file: /home/cvs/modperl-docs/tmpl/custom/ps/body,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- body 29 Apr 2002 14:32:55 -0000 1.4 +++ body 14 May 2002 10:16:47 -0000 1.5 @@ -14,7 +14,7 @@ [% doc.meta.title %] </h1> - <hr class=PAGE-BREAK> + <hr class="PAGE-BREAK"> [% FOREACH sec = doc.body; sec; 1.4 +43 -8 modperl-docs/tmpl/custom/ps/index Index: index =================================================================== RCS file: /home/cvs/modperl-docs/tmpl/custom/ps/index,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- index 25 Jan 2002 09:06:10 -0000 1.3 +++ index 14 May 2002 10:16:47 -0000 1.4 @@ -2,24 +2,59 @@ paget = doc.meta.title title = "mod_perl: $paget" %] - <p> </p> - <p> </p> - <p> </p> - <p> </p> - <p> </p> + +<p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> <div align=center><font size="7"><b>[% doc.meta.title %]</b></font></div> - <p> </p> - <p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> -<table align=center width=60%> +[%- IF doc.meta.abstract -%] +<table align="center" width="60%"> <tr> <td> [% doc.meta.abstract %] </td> </tr> </table> +[% END -%] + +<p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> +<p> </p> + +<p align="center">Last modified [% doc.last_modified %]</p> + +<hr class="PAGE-BREAK"> + + +[%- + IF doc.body.top; + "${doc.body.top}\n"; + END; + + PROCESS index_toc toc=doc.toc; + + IF doc.body.bot; + "${doc.body.bot}\n"; + END; + +-%] [% INCLUDE tail %] 1.2 +2 -1 modperl-docs/tmpl/custom/ps/tail Index: tail =================================================================== RCS file: /home/cvs/modperl-docs/tmpl/custom/ps/tail,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tail 5 Jan 2002 19:29:54 -0000 1.1 +++ tail 14 May 2002 10:16:47 -0000 1.2 @@ -1,3 +1,4 @@ </body> </html> -<hr class=PAGE-BREAK> \ No newline at end of file +<hr class=PAGE-BREAK> + 1.1 modperl-docs/tmpl/custom/ps/index_toc Index: index_toc =================================================================== [%-# # expected args: # toc - an array with keys: link, stitle, title, abstract, subs # (subs is optional and includes a similar array) -%] [%- numbers = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X'] -%] [%- IF toc.size -%] [% SET chap_counter = 0 %] <div class="toc"> [%- IF toc.0.group_title.defined; SET counter = 0; FOREACH group = toc; "<b>Part ${numbers.$counter}: ${group.group_title}</b>"; PROCESS index_toc_section subs=group.subs; counter = counter + 1; END; ELSE; INCLUDE index_toc_section subs=toc; END; -%] </div> [%- END -%] 1.1 modperl-docs/tmpl/custom/ps/index_toc_section Index: index_toc_section =================================================================== [%-# render one level of toc and call recursively itself if there are # nested levels. # expected args: # subs - an array with keys indentical to 'toc' from above. # chap_counter - is a global variable, which should be set to 0 # in the caller for the first loop -%] [%- FOREACH sec = subs -%] [% SET chap_counter = chap_counter + 1%] <dl> <dt><a href="[%- sec.link -%]"><img src="[%- doc.dir.abs_doc_root -%]/images/arrow_right.gif" alt="-" align="bottom" border="0" height="10" width="18">[%- chap_counter -%]. [%- sec.title -%]</a></dt> [%- IF sec.abstract -%] <dd>[%- sec.abstract -%]</dd> [%- END -%] </dl> [%- END -%]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]