sorl-thumbnail==12.5.0
# home-brewed & dependencies
-librarian==1.12
+librarian==1.13
# celery tasks
celery[redis]==4.4.7
from librarian import DCNS
url_elem = wldoc.edoc.getroot().find('.//' + DCNS('identifier.url'))
if url_elem is None:
- gallery = ''
+ gal_url = ''
+ gal_path = ''
else:
- gallery = gallery_url(slug=url_elem.text.rstrip('/').rsplit('/', 1)[1])
- return wldoc.as_html(options={'gallery': "'%s'" % gallery})
+ slug = url_elem.text.rstrip('/').rsplit('/', 1)[1]
+ gal_url = gallery_url(slug=slug)
+ gal_path = gallery_path(slug=slug)
+ return wldoc.as_html(gallery_path=gal_path, gallery_url=gal_url)
class BuildCover(BuildEbook):
dont_build=dont_build,
search_index_tags=False,
findable=options.get('findable'),
+ remote_gallery_url='file://' + os.path.dirname(os.path.abspath(file_base)) + '/img/'
)
for ebook_format in Book.ebook_formats:
if os.path.isfile(file_base + '.' + ebook_format):
warnings_def = {
'wulgaryzmy': _('vulgar language'),
}
- warnings = book.get_extra_info_json().get('content_warnings')
+ warnings = book.get_extra_info_json().get('content_warnings', [])
warnings = sorted(
warnings_def.get(w, w)
for w in warnings
def gallery_path(slug):
- return os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, slug)
+ return os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, slug) + '/'
def gallery_url(slug):
img {
max-width: 37.5rem;
margin-top: 1em;
+ width: 100%;
}
.animacja {
margin-top: 1em;
$S_NOTHEMES_TINY_MAX: 240px;
$W_NOTHEMES_SMALL: 30px;
$S_NOTHEMES_SMALL_MAX: 320px;
-$W_NOTHEMES: 44px;
+$W_NOTHEMES: 45px;
$S_THEMES: 600px;
$S_THEMES_WOTHER: 1200px;
$W_THEMES: 160px;