mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
692500b852
commit
69dbc5cfb6
@ -123,13 +123,13 @@ class BooksView:
|
||||
metadata = self.interface_data['metadata'][book_id]
|
||||
alt = str.format(_('{} by {}'), metadata['title'], 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; cursor: pointer; width:auto; height:auto')
|
||||
style='max-width: 100%; max-height: 100%; display: block; width:auto; height:auto')
|
||||
img.onerror = def(err):
|
||||
img = err.target
|
||||
div = img.parentNode
|
||||
clear(div)
|
||||
div.appendChild(E.div(
|
||||
style='position:relative; top:-50%; transform: translateY(50%); cursor:pointer',
|
||||
style='position:relative; top:-50%; transform: translateY(50%)',
|
||||
E.h2(img.getAttribute('data-title'), style='text-align:center; font-size:larger; font-weight: bold'),
|
||||
E.div(_('by'), style='text-align: center'),
|
||||
E.h2(img.getAttribute('data-authors'), style='text-align:center; font-size:larger; font-weight: bold')
|
||||
@ -138,7 +138,7 @@ class BooksView:
|
||||
|
||||
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'),
|
||||
'width: 21vw; height: 28vw; max-width: {}px; max-height: {}px; min-width: {}px; min-height: {}px; cursor:pointer'),
|
||||
THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT, THUMBNAIL_MAX_WIDTH // 2, THUMBNAIL_MAX_HEIGHT // 2),
|
||||
data_book_id=str(book_id),
|
||||
img
|
||||
|
Loading…
x
Reference in New Issue
Block a user