diff --git a/openlibrary/i18n/messages.pot b/openlibrary/i18n/messages.pot index 7dc4521e522..8c479049ae3 100644 --- a/openlibrary/i18n/messages.pot +++ b/openlibrary/i18n/messages.pot @@ -806,6 +806,13 @@ msgid_plural "%(count)s editions" msgstr[0] "" msgstr[1] "" +#: SearchResultsWork.html publishers/view.html +#, python-format +msgid "%(count)s ebook" +msgid_plural "%(count)s ebooks" +msgstr[0] "" +msgstr[1] "" + #: SearchResultsWork.html #, python-format msgid "in %(count)d language" @@ -7050,13 +7057,6 @@ msgstr "" msgid "Publisher: %(name)s" msgstr "" -#: publishers/view.html -#, python-format -msgid "%(count)s ebook" -msgid_plural "%(count)s ebooks" -msgstr[0] "" -msgstr[1] "" - #: publishers/view.html msgid "0 ebooks" msgstr "" diff --git a/openlibrary/macros/SearchResultsWork.html b/openlibrary/macros/SearchResultsWork.html index 3351e10e1c2..b70c46db932 100644 --- a/openlibrary/macros/SearchResultsWork.html +++ b/openlibrary/macros/SearchResultsWork.html @@ -175,30 +175,37 @@

$if doc.get('ia') and len(doc.get('ia')) > 1: -
$ blur_preview = "preview-covers--blur" if blur else "" - - $for x, i in enumerate(doc.get('ia')[1:10]): - - $_('Cover of edition %(id)s', id=i) - - - - - $if doc.get('first_publish_year'): - - $_('First published in %(year)s', year=doc.first_publish_year) - — - $if doc.get('edition_count'): - - $ungettext('%(count)s edition', '%(count)s editions', doc.edition_count, count=doc.edition_count) + +
+ + $for x, i in enumerate(doc.get('ia')[1:5]): + + $_('Cover of edition %(id)s', id=i) + - $if doc.get('languages') and doc_type in ['infogami_work', 'solr_work']: - - $ langs = [get_language_name(lang.key if hasattr(lang, 'key') else '/languages' + lang) for lang in doc.languages] - $:ungettext('in %(count)d language', 'in %(count)d languages', len(doc.languages), count=len(doc.languages), langs=commify_list(langs)) + + + $if doc.get('first_publish_year'): + + $_('First published in %(year)s', year=doc.first_publish_year) + +
+ $if doc.get('edition_count'): + + $ungettext('%(count)s edition', '%(count)s editions', doc.edition_count, count=doc.edition_count), + + $if doc.get('ia'): + + $ungettext('%(count)s ebook', '%(count)s ebooks', len(doc.get('ia')), count=len(doc.get('ia'))) + + $if doc.get('languages') and doc_type in ['infogami_work', 'solr_work']: + + $ langs = [get_language_name(lang.key if hasattr(lang, 'key') else '/languages' + lang) for lang in doc.languages] + $:ungettext('in %(count)d language', 'in %(count)d languages', len(doc.languages), count=len(doc.languages), langs=commify_list(langs)) +
-
+
$if show_librarian_extras:
diff --git a/static/css/components/search-result-item.css b/static/css/components/search-result-item.css index 110d724fec8..193884d8997 100644 --- a/static/css/components/search-result-item.css +++ b/static/css/components/search-result-item.css @@ -124,16 +124,13 @@ } .searchResultItem .preview-covers { - display: block; - height: 45px; - overflow: hidden; - margin-top: 10px; - margin-bottom: 5px; + display: flex; + align-items: center; } .searchResultItem .preview-covers img { - border-radius: var(--border-radius-thumbnail); - opacity: 0.7; + border-radius: 4px; + opacity: 1; } .searchResultItem .preview-covers--blur img { @@ -153,10 +150,6 @@ width: 175px; } -.searchResultItem .bookcover--blur img { - filter: blur(4px); -} - .searchResultItem .imageLg { text-align: center; width: 100%; @@ -189,6 +182,40 @@ font-style: normal; } +.preview-covers-container { + display: flex; + align-items: center; + gap: 10px; + margin-top: 10px; + margin-bottom: 5px; +} + +.preview-covers a { + position: relative; + display: inline-block; + flex-shrink: 0; +} + +.preview-covers a:nth-child(n + 2) { + margin-left: -15px; +} + +.preview-covers a:nth-child(1) { + z-index: var(--z-index-level-4); +} + +.preview-covers a:nth-child(2) { + z-index: var(--z-index-level-3); +} + +.preview-covers a:nth-child(3) { + z-index: var(--z-index-level-2); +} + +.preview-covers a:nth-child(4) { + z-index: var(--z-index-level-1); +} + .srw__chapters { background: rgba(0, 124, 255, 0.2); border-radius: 4px; @@ -239,7 +266,7 @@ } .preview-covers img:hover { - opacity: 1; + z-index: var(--z-index-level-5); } /* Delete trashcan appears on https://openlibrary.org/people/jdlrobson/lists */