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