|
1 <?php |
|
2 |
|
3 /** |
|
4 * @file |
|
5 * Default theme implementation for printed version of book outline. |
|
6 * |
|
7 * Available variables: |
|
8 * - $title: Top level node title. |
|
9 * - $head: Header tags. |
|
10 * - $language: Language code. e.g. "en" for english. |
|
11 * - $language_rtl: TRUE or FALSE depending on right to left language scripts. |
|
12 * - $base_url: URL to home page. |
|
13 * - $contents: Nodes within the current outline rendered through |
|
14 * book-node-export-html.tpl.php. |
|
15 * |
|
16 * @see template_preprocess_book_export_html() |
|
17 * |
|
18 * @ingroup themeable |
|
19 */ |
|
20 ?> |
|
21 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
22 <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language; ?>" xml:lang="<?php print $language->language; ?>" dir="<?php print $dir; ?>"> |
|
23 <head> |
|
24 <title><?php print $title; ?></title> |
|
25 <?php print $head; ?> |
|
26 <base href="<?php print $base_url; ?>" /> |
|
27 <link type="text/css" rel="stylesheet" href="misc/print.css" /> |
|
28 <?php if ($language_rtl): ?> |
|
29 <link type="text/css" rel="stylesheet" href="misc/print-rtl.css" /> |
|
30 <?php endif; ?> |
|
31 </head> |
|
32 <body> |
|
33 <?php |
|
34 /** |
|
35 * The given node is /embedded to its absolute depth in a top level |
|
36 * section/. For example, a child node with depth 2 in the hierarchy is |
|
37 * contained in (otherwise empty) <div> elements corresponding to |
|
38 * depth 0 and depth 1. This is intended to support WYSIWYG output - e.g., |
|
39 * level 3 sections always look like level 3 sections, no matter their |
|
40 * depth relative to the node selected to be exported as printer-friendly |
|
41 * HTML. |
|
42 */ |
|
43 $div_close = ''; |
|
44 ?> |
|
45 <?php for ($i = 1; $i < $depth; $i++): ?> |
|
46 <div class="section-<?php print $i; ?>"> |
|
47 <?php $div_close .= '</div>'; ?> |
|
48 <?php endfor; ?> |
|
49 <?php print $contents; ?> |
|
50 <?php print $div_close; ?> |
|
51 </body> |
|
52 </html> |