1<?xml version="1.0" encoding="UTF-8"?>
2<package xmlns="http://www.idpf.org/2007/opf" version="{{ epub_version }}" xml:lang="{{ lang }}"
3 unique-identifier="{{ uid }}"
4 prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">
5  <metadata xmlns:opf="http://www.idpf.org/2007/opf"
6        xmlns:dc="http://purl.org/dc/elements/1.1/">
7    <dc:language>{{ lang }}</dc:language>
8    <dc:title>{{ title }}</dc:title>
9    <dc:description>{{ description }}</dc:description>
10    <dc:creator>{{ author }}</dc:creator>
11    <dc:contributor>{{ contributor }}</dc:contributor>
12    <dc:publisher>{{ publisher }}</dc:publisher>
13    <dc:rights>{{ copyright }}</dc:rights>
14    {%- if epub_version == 3.1 %}
15    <dc:identifier id="{{ uid }}" opf:scheme="{{ scheme }}">{{ id }}</dc:identifier>
16    {%- else %}
17    <dc:identifier id="{{ uid }}">{{ id }}</dc:identifier>
18    {%- endif %}
19    <dc:date>{{ date }}</dc:date>
20    <meta property="dcterms:modified">{{ date }}</meta>
21    <meta property="ibooks:version">{{ version }}</meta>
22    <meta property="ibooks:specified-fonts">true</meta>
23    <meta property="ibooks:binding">true</meta>
24    <meta property="ibooks:scroll-axis">{{ ibook_scroll_axis }}</meta>
25    {%- if cover %}
26    <meta name="cover" content="{{ cover }}"/>
27    {%- endif %}
28  </metadata>
29  <manifest>
30    <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml" />
31    <item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
32    {%- for item in manifest_items %}
33    <item id="{{ item.id }}" href="{{ item.href }}" media-type="{{ item.media_type }}" />
34    {%- endfor %}
35  </manifest>
36  <spine toc="ncx" page-progression-direction="{{ page_progression_direction }}">
37    {%- for spine in spines %}
38    {%- if spine.linear %}
39    <itemref idref="{{ spine.idref }}" />
40    {%- else %}
41    <itemref idref="{{ spine.idref }}" linear="no" />
42    {%- endif %}
43    {%- endfor %}
44  </spine>
45  <guide>
46    {%- for guide in guides %}
47    <reference type="{{ guide.type }}" title="{{ guide.title }}" href="{{ guide.uri }}" />
48    {%- endfor %}
49  </guide>
50</package>
51