mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
056d509aa9
commit
30bcd2ab8f
@ -161,11 +161,13 @@ class BooksView:
|
||||
cover_url = str.format('get/thumb/{}/{}?sz={}x{}', book_id, self.interface_data['library_id'], THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT)
|
||||
metadata = self.interface_data['metadata'][book_id]
|
||||
alt = str.format(_('{} by {}'), metadata['title'], metadata['authors'].join(' & '))
|
||||
img = E.img(alt=alt, title=alt, data_title=metadata['title'], data_authors=metadata['authors'].join(' & '),
|
||||
img = E.img(src=cover_url, alt=alt, title=alt, data_title=metadata['title'], data_authors=metadata['authors'].join(' & '),
|
||||
style='max-width: 100%; max-height: 100%; display: block; width:auto; height:auto')
|
||||
img.onerror = def(err):
|
||||
img = err.target
|
||||
div = img.parentNode
|
||||
if not div:
|
||||
return
|
||||
clear(div)
|
||||
div.appendChild(E.div(
|
||||
style='position:relative; top:-50%; transform: translateY(50%)',
|
||||
@ -175,7 +177,6 @@ class BooksView:
|
||||
))
|
||||
set_css(div, border='dashed 1px currentColor', border_radius='10px')
|
||||
|
||||
img.setAttribute('src', cover_url)
|
||||
return E.div(
|
||||
style=str.format(('margin: 10px; display: flex; align-content: flex-end; align-items: flex-end; justify-content: space-around;'
|
||||
'width: 21vw; height: 28vw; max-width: {}px; max-height: {}px; min-width: {}px; min-height: {}px; cursor:pointer'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user