Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ChapTmpl = template.Must(template.New("").Parse(`<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>{{.Title}}</title>
</head>
<body>
<h2>{{.Title}}</h2>
{{.Body}}
</body>
</html>`))
View Source
var CoverTmpl = template.Must(template.New("").Parse(`<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>Cover</title>
</head>
<body>
<div style="text-align: center; padding: 0pt; margin: 0pt;">
<img src="../{{.Filename}}" />
</div>
</body>
</html>
`))
View Source
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en" xml:lang="en">
<head>
<meta charset="utf-8"/>
<style type="text/css">
nav#landmarks, nav#page-list { display:none; }
ol { list-style-type: none; }
</style>
<title>Table of Contents</title>
</head>
<body epub:type="frontmatter">
<nav epub:type="toc" id="toc">
<h1>Table of Contents</h1>
<ol>
{{range .}}
<li>
<a href="../{{.Path}}">{{.Title}}</a>
</li>
{{end}}
</ol>
</nav>
<nav epub:type="landmarks" id="landmarks" hidden="">
<h1>Landmarks</h1>
<ol>
<li>
<a epub:type="toc" href="#toc">Table of Contents</a>
</li>
{{range .}}
<li>
<a epub:type="chapter" href="../{{.Path}}">Chapter</a>
</li>
{{end}}
</ol>
</nav>
</body>
</html>`))
View Source
var TOCTmpl = template.Must(template.New("").Parse(`<?xml version="1.0" encoding="utf-8" ?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
<head>
</head>
<docTitle>
<text>{{.Title}}</text>
</docTitle>
<navMap>
{{range .Chapters}}
<navPoint>
<navLabel>
<text>{{.Title}}</text>
</navLabel>
<content src="{{.Path}}"/>
</navPoint>
{{end}}
</navMap>
</ncx>`))
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.