1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
4 from ..base import WLElement
7 class Numeracja(WLElement):
11 class Rownolegle(WLElement):
12 def build_epub(self, builder):
13 for i, block in enumerate(self):
14 attr = {"class": "rownolegly-blok"}
16 attr['class'] += ' first'
17 if i == len(self) - 1:
18 attr['class'] += ' last'
19 builder.start_element('div', attr)
20 self.build_epub(block, builder)
25 EPUB_TAG = HTML_TAG = 'span'
27 def get_html_attr(self, builder):
29 szer = int(self.get('szer', 1))
33 "display": "inline-block",
37 get_epub_attr = get_html_attr