move stats to L2
[librarian.git] / src / librarian / elements / poetry / wers.py
1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 from ..base import WLElement
5
6
7 class Wers(WLElement):
8     STRIP = True
9
10     TXT_TOP_MARGIN = 1
11     TXT_BOTTOM_MARGIN = 1
12     TXT_LEGACY_TOP_MARGIN = 1
13     TXT_LEGACY_BOTTOM_MARGIN = 0
14
15     EPUB_TAG = HTML_TAG = 'div'
16     EPUB_CLASS = HTML_CLASS = 'verse'
17
18     @property
19     def meta(self):
20         if hasattr(self, 'stanza'):
21             return self.stanza.meta
22         return super(Wers, self).meta
23
24     def _epub_build_inner(self, builder):
25         super()._epub_build_inner(builder)
26         builder.push_text('''\u00a0''')
27