File: content_template.eex

package info (click to toggle)
elixir-ex-doc 0.35.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,784 kB
  • sloc: javascript: 2,848; makefile: 15; xml: 12; sh: 5
file content (46 lines) | stat: -rw-r--r-- 2,346 bytes parent folder | download
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
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf"
         unique-identifier="project-<%= config.project %>"
         version="3.0">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:title><%= config.project %> - <%= config.version %></dc:title>
    <dc:identifier id="project-<%= config.project %>"><%= uuid %></dc:identifier>
    <dc:language><%= config.language %></dc:language>
    <%= for {author, index} <- Enum.with_index(config.authors || [], 1) do %>
      <dc:creator id="author<%= index %>"><%= author %></dc:creator>
    <% end %>
    <meta property="dcterms:modified"><%= datetime %></meta>
    <%= if config.cover do %>
      <meta name="cover" content="cover-image"/>
    <% end %>
  </metadata>
  <manifest>
    <item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav scripted"/>
    <item id="cover" href="title.xhtml" media-type="application/xhtml+xml" properties="scripted"/>
    <%= for {_title, extras} <- config.extras, extra <- extras do %>
      <item id="<%= URI.encode extra.id %>" href="<%= URI.encode extra.id %>.xhtml" media-type="application/xhtml+xml" properties="scripted"/>
    <% end %>
    <%= for filter <- [:modules, :tasks], node <- nodes[filter] do %>
      <item id="<%= URI.encode node.id %>" href="<%= URI.encode node.id %>.xhtml" media-type="application/xhtml+xml" properties="scripted"/>
    <% end %>
    <%= for {static_file, media_type} <- static_files do %>
      <item id="<%= static_file_to_id(static_file) %>" href="<%= static_file %>" media-type="<%= media_type %>"/>
    <% end %>
    <%= if config.cover do %>
      <item id="cover-image" href="assets/cover<%= Path.extname(config.cover) %>" media-type="<%= media_type(Path.extname(config.cover)) %>"/>
    <% end %>
    <%= if config.logo do %>
      <item id="logo" href="assets/logo<%= Path.extname(config.logo) %>" media-type="<%= media_type(Path.extname(config.logo)) %>"/>
    <% end %>
  </manifest>
  <spine>
    <itemref idref="cover"/>
    <itemref idref="nav"/>
    <%= for {_title, extras} <- config.extras, extra <- extras do %>
      <itemref idref="<%= URI.encode extra.id %>"/>
    <% end %>
    <%= for filter <- [:modules, :tasks], node <- nodes[filter] do %>
      <itemref idref="<%= URI.encode node.id %>"/>
    <% end %>
  </spine>
</package>