Version 1
[yaffs-website] / web / core / themes / classy / templates / layout / book-export-html.html.twig
1 {#
2 /**
3  * @file
4  * Theme override for printed version of book outline.
5  *
6  * Available variables:
7  * - title: Top level node title.
8  * - head: Header tags.
9  * - language: Language object.
10  * - language_rtl: A flag indicating whether the current display language is a
11  *   right to left language.
12  * - base_url: URL to the home page.
13  * - contents: Nodes within the current outline rendered through
14  *   book-node-export-html.html.twig.
15  *
16  * @see template_preprocess_book_export_html()
17  */
18 #}
19 <!DOCTYPE html>
20 <html{{ html_attributes }}>
21   <head>
22     <title>{{ title }}</title>
23     {{ page.head }}
24     <base href="{{ base_url }}" />
25     <link type="text/css" rel="stylesheet" href="misc/print.css" />
26   </head>
27   <body>
28     {#
29       The given node is embedded to its absolute depth in a top level section.
30       For example, a child node with depth 2 in the hierarchy is contained in
31       (otherwise empty) div elements corresponding to depth 0 and depth 1. This
32       is intended to support WYSIWYG output - e.g., level 3 sections always look
33       like level 3 sections, no matter their depth relative to the node selected
34       to be exported as printer-friendly HTML.
35     #}
36
37   {% for i in 1..depth-1 if depth > 1 %}
38     <div class="section-{{ i }}">
39   {% endfor %}
40   {{ contents }}
41   {% for i in 1..depth-1 if depth > 1 %}
42     </div>
43   {% endfor %}
44   </body>
45 </html>