fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
release
[librarian.git]
/
src
/
librarian
/
elements
/
poetry
/
wers_wciety.py
diff --git
a/src/librarian/elements/poetry/wers_wciety.py
b/src/librarian/elements/poetry/wers_wciety.py
index
8ac2bb3
..
4a2744a
100644
(file)
--- a/
src/librarian/elements/poetry/wers_wciety.py
+++ b/
src/librarian/elements/poetry/wers_wciety.py
@@
-1,7
+1,12
@@
+# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
+#
from .wers import Wers
class WersWciety(Wers):
from .wers import Wers
class WersWciety(Wers):
+ HTML_CLASS = Wers.HTML_CLASS + ' verse-indent'
+
@property
def typ(self):
v = self.attrib.get('typ')
@property
def typ(self):
v = self.attrib.get('typ')
@@
-16,5
+21,10
@@
class WersWciety(Wers):
def get_html_attr(self, builder):
attr = super(WersWciety, self).get_html_attr(builder)
def get_html_attr(self, builder):
attr = super(WersWciety, self).get_html_attr(builder)
- attr['style'] = "padding-left: {}em".format(self.typ)
+ attr['class'] += f" verse-indent-{self.typ}"
+ return attr
+
+ def get_epub_attr(self, builder):
+ attr = super(WersWciety, self).get_html_attr(builder)
+ attr['style'] = "margin-left: {}em".format(self.typ)
return attr
return attr