Server: Reduce the minimum thumbnail size a little from 150px to 105px

This commit is contained in:
Kovid Goyal 2017-08-04 11:29:49 +05:30
parent 032a4bdd78
commit 92c5529fab
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -8,8 +8,10 @@ from gettext import gettext as _
COVER_GRID_CLASS = 'book-list-cover-grid' COVER_GRID_CLASS = 'book-list-cover-grid'
THUMBNAIL_MAX_WIDTH = 300 THUMBNAIL_MAX_WIDTH = 3 * 100
THUMBNAIL_MAX_HEIGHT = 400 THUMBNAIL_MAX_HEIGHT = 4 * 100
THUMBNAIL_MIN_WIDTH = 3 * 35
THUMBNAIL_MIN_HEIGHT = 4 * 35
BORDER_RADIUS = 10 BORDER_RADIUS = 10
DESCRIPTION = _('A grid of book covers') DESCRIPTION = _('A grid of book covers')
@ -24,7 +26,7 @@ def cover_grid_css():
ans += build_rule( ans += build_rule(
sel, margin=f'{margin}{margin_unit}', display='flex', align_content='flex-end', align_items='flex-end', justify_content='space-around', sel, margin=f'{margin}{margin_unit}', display='flex', align_content='flex-end', align_items='flex-end', justify_content='space-around',
max_width=THUMBNAIL_MAX_WIDTH+'px', max_height=THUMBNAIL_MAX_HEIGHT+'px', cursor='pointer', max_width=THUMBNAIL_MAX_WIDTH+'px', max_height=THUMBNAIL_MAX_HEIGHT+'px', cursor='pointer',
min_width=f'{THUMBNAIL_MAX_WIDTH // 2}px', min_height=f'{THUMBNAIL_MAX_HEIGHT // 2}px') min_width=THUMBNAIL_MIN_WIDTH+'px', min_height=THUMBNAIL_MIN_HEIGHT + 'px')
mq = '@media all and (orientation: {orient}) {{ {sel} {{ width: 21{dim}; height: 28{dim} }} }}\n' mq = '@media all and (orientation: {orient}) {{ {sel} {{ width: 21{dim}; height: 28{dim} }} }}\n'
for dim in 'vw', 'vh': for dim in 'vw', 'vh':
ans += mq.format(sel=sel, dim=dim, orient='portrait' if dim is 'vw' else 'landscape') ans += mq.format(sel=sel, dim=dim, orient='portrait' if dim is 'vw' else 'landscape')