git.iko.soy/typeable/pandoc
on master help sign in
EPUB, EPUB3 templates: Handle structured metadata on titlepage.
2d5491bJohn MacFarlane
default.epub+16−1
@@ -17,15 +17,30 @@ $endfor$
17</head>
17</head>
18<body>
18<body>
19$if(titlepage)$
19$if(titlepage)$
20+$for(title)$
21+$if(title.text)$
22+ <h1 class="$title.type$">$title.text$</h1>
23+$else$
20 <h1 class="title">$title$</h1>
24 <h1 class="title">$title$</h1>
25+$endif$
26+$endfor$
21$if(subtitle)$
27$if(subtitle)$
22 <h1 class="subtitle">$subtitle$</h1>
28 <h1 class="subtitle">$subtitle$</h1>
23$endif$
29$endif$
24$for(author)$
30$for(author)$
25 <h2 class="author">$author$</h2>
31 <h2 class="author">$author$</h2>
26$endfor$
32$endfor$
33+$for(creator)$
34+ <h2 class="$creator.type$">$creator.text$</h2>
35+$endfor$
36+$if(publisher)$
37+ <p class="publisher">$publisher$</p>
38+$endif$
27$if(date)$
39$if(date)$
28− <h3 class="date">$date$</h3>
40+ <p class="date">$date$</p>
41+$endif$
42+$if(rights)$
43+ <p class="rights">$rights$</p>
29$endif$
44$endif$
30$else$
45$else$
31$body$
46$body$
default.epub3+21−6
@@ -21,18 +21,33 @@ $endfor$
21</head>
21</head>
22<body>
22<body>
23$if(titlepage)$
23$if(titlepage)$
24− <section epub:type="titlepage">
24+<section epub:type="titlepage">
25+$for(title)$
26+$if(title.type)$
25− <h1 class="title">$title$</h1>
27+ <h1 class="$title.type$">$title.text$</h1>
28+$else$
29+ <h1 class="title">$title$</h1>
30+$endif$
31+$endfor$
26$if(subtitle)$
32$if(subtitle)$
27− <h1 class="subtitle">$subtitle$</h1>
33+ <h1 class="subtitle">$subtitle$</h1>
28$endif$
34$endif$
29$for(author)$
35$for(author)$
30− <h2 class="author">$author$</h2>
36+ <h2 class="author">$author$</h2>
31$endfor$
37$endfor$
38+$for(creator)$
39+ <h2 class="$creator.type$">$creator.text$</h2>
40+$endfor$
41+$if(publisher)$
42+ <p class="publisher">$publisher$</p>
43+$endif$
32$if(date)$
44$if(date)$
33− <h3 class="date">$date$</h3>
45+ <p class="date">$date$</p>
46+$endif$
47+$if(rights)$
48+ <p class="rights">$rights$</p>
34$endif$
49$endif$
35− </section>
50+</section>
36$else$
51$else$
37$body$
52$body$
38$endif$
53$endif$