Skip to content

Commit

Permalink
UPD epub cover
Browse files Browse the repository at this point in the history
  • Loading branch information
natenka committed Feb 6, 2023
1 parent a1b0d97 commit 3913f67
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions docs/source/_templates/epub_cover_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="calibre:cover" content="true" />
<title>{{ title }}</title>
<style type="text/css" title="override_css">
@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
</style>
</head>
<body>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%" viewBox="0 0 600 800"
preserveAspectRatio="none">
<image width="600" height="800" xlink:href="{{ pathto('_static/' + image, 1) }}"/>
</svg>
</body>
</html>

2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
epub_theme = 'epub'
epub_basename = 'Python для сетевых инженеров'
epub_author = 'Наташа Самойленко'
epub_cover = ('_static/cover.png', '')
epub_cover = ('cover.png', 'epub_cover_template.html')
# epub_publisher = 'https://natenka.io/'
epub_scheme = 'url'
# epub_identifier = 'https://natenka.io/'
Expand Down

0 comments on commit 3913f67

Please sign in to comment.