diff --git a/openlibrary/macros/CoverImage.html b/openlibrary/macros/CoverImage.html index 7608f0ae16a..48881031b7c 100644 --- a/openlibrary/macros/CoverImage.html +++ b/openlibrary/macros/CoverImage.html @@ -34,4 +34,4 @@ $if cover_url: $title $else: - $title + $title diff --git a/openlibrary/macros/FulltextSearchSuggestionItem.html b/openlibrary/macros/FulltextSearchSuggestionItem.html index 4bf42ac22e5..6502fe4a09f 100644 --- a/openlibrary/macros/FulltextSearchSuggestionItem.html +++ b/openlibrary/macros/FulltextSearchSuggestionItem.html @@ -44,7 +44,7 @@
- $ cover = get_cover_url(selected_ed) or "/images/icons/avatar_book-sm.png" + $ cover = get_cover_url(selected_ed) or "/static/images/icons/avatar_book-sm.png"
- $_('Loading indicator') + $_('Loading indicator')
- $ cover = get_cover_url(selected_ed) or "/images/icons/avatar_book-sm.png" + $ cover = get_cover_url(selected_ed) or "/static/images/icons/avatar_book-sm.png" web.Storage: for key, name in zip(doc.get('author_key', []), doc.get('author_name', [])) ] - w.cover_url = "/images/icons/avatar_book-sm.png" + w.cover_url = "/static/images/icons/avatar_book-sm.png" w.setdefault('ia', []) w.setdefault('first_publish_year', None) return w diff --git a/openlibrary/plugins/upstream/code.py b/openlibrary/plugins/upstream/code.py index fd77cd8257a..b61b55e7b1c 100644 --- a/openlibrary/plugins/upstream/code.py +++ b/openlibrary/plugins/upstream/code.py @@ -47,15 +47,6 @@ logger = logging.getLogger('openlibrary.plugins.upstream.code') -# Note: This is done in web_nginx.conf on production ; this endpoint is -# only used in development environments. -class static(delegate.page): - path = "/images/.*" - - def GET(self): - return web.seeother(f'/static{web.ctx.path}') - - class history(delegate.mode): """Overwrite ?m=history to remove IP""" diff --git a/openlibrary/plugins/upstream/tests/test_addbook.py b/openlibrary/plugins/upstream/tests/test_addbook.py index 9f4d2c5b3fa..c0a9529ead5 100644 --- a/openlibrary/plugins/upstream/tests/test_addbook.py +++ b/openlibrary/plugins/upstream/tests/test_addbook.py @@ -525,7 +525,7 @@ def test_make_work_does_indeed_make_a_work(self): "language": ["eng"], "title": "The Celebrated Jumping Frog of Calaveras County", "authors": [author], - "cover_url": "/images/icons/avatar_book-sm.png", + "cover_url": "/static/images/icons/avatar_book-sm.png", "ia": [], "first_publish_year": None, } @@ -548,7 +548,7 @@ def test_make_work_handles_no_author(self): "language": ["eng"], "title": "The Celebrated Jumping Frog of Calaveras County", "authors": [], - "cover_url": "/images/icons/avatar_book-sm.png", + "cover_url": "/static/images/icons/avatar_book-sm.png", "ia": [], "first_publish_year": None, } diff --git a/openlibrary/templates/account/not_verified.html b/openlibrary/templates/account/not_verified.html index 78c3f4e3843..8543dbb2c9b 100644 --- a/openlibrary/templates/account/not_verified.html +++ b/openlibrary/templates/account/not_verified.html @@ -5,7 +5,7 @@ diff --git a/openlibrary/templates/books/edit/edition.html b/openlibrary/templates/books/edit/edition.html index f0ed27a67d5..f190eafe214 100644 --- a/openlibrary/templates/books/edit/edition.html +++ b/openlibrary/templates/books/edit/edition.html @@ -570,7 +570,7 @@ - + diff --git a/openlibrary/templates/books/edition-sort.html b/openlibrary/templates/books/edition-sort.html index 728479e196f..398461d18cf 100644 --- a/openlibrary/templates/books/edition-sort.html +++ b/openlibrary/templates/books/edition-sort.html @@ -25,7 +25,7 @@ $ isbn = isbn_10 or isbn_13 $ asin = isbn_10 or None -$ url = book.get_cover_url("S") or "/images/icons/avatar_book-sm.png" +$ url = book.get_cover_url("S") or "/static/images/icons/avatar_book-sm.png"
$_('dimensions')$_('dimensions') diff --git a/openlibrary/templates/covers/author_photo.html b/openlibrary/templates/covers/author_photo.html index 323032a7cd3..8f17e30e72c 100644 --- a/openlibrary/templates/covers/author_photo.html +++ b/openlibrary/templates/covers/author_photo.html @@ -27,6 +27,6 @@

$truncate(author.name or "", 60)

$else:
- $_('We need a photo of %(author)s', author=author.name) + $_('We need a photo of %(author)s', author=author.name)
diff --git a/openlibrary/templates/covers/book_cover.html b/openlibrary/templates/covers/book_cover.html index efbe3f1e68c..3491bb0d3bb 100644 --- a/openlibrary/templates/covers/book_cover.html +++ b/openlibrary/templates/covers/book_cover.html @@ -12,8 +12,8 @@ $ cover_aspect_ratio = book.get_cover_aspect_ratio() $ cover_aspect_ratio_str = 'aspect-ratio: ' + str(cover_aspect_ratio) if cover_aspect_ratio else "" -$ src = cover_url or '/images/icons/avatar_book.png' -$ srcset = '%s 2x' % (cover_lg or '/images/icons/avatar_book-lg.png') +$ src = cover_url or '/static/images/icons/avatar_book.png' +$ srcset = '%s 2x' % (cover_lg or '/static/images/icons/avatar_book-lg.png') $if preload: $add_metatag(tag="link", **{'rel': 'preload', 'as': 'image', 'href': src, 'imagesrcset': srcset, 'fetchpriority': 'high'}) diff --git a/openlibrary/templates/covers/book_cover_small.html b/openlibrary/templates/covers/book_cover_small.html index 1ed869747bb..0e793ed5fa4 100644 --- a/openlibrary/templates/covers/book_cover_small.html +++ b/openlibrary/templates/covers/book_cover_small.html @@ -14,8 +14,8 @@ $_('Cover of: %(title)s by %(authors)s', title=title, authors=author_names)
- $_('We need a book cover for: %(title)s', title=title) + $_('We need a book cover for: %(title)s', title=title)
$else: - $title + $title diff --git a/openlibrary/templates/lists/home.html b/openlibrary/templates/lists/home.html index 1095085c4e4..19c8686c52c 100644 --- a/openlibrary/templates/lists/home.html +++ b/openlibrary/templates/lists/home.html @@ -35,7 +35,7 @@

$_('Active Lists')

$ cover = list.get_cover() or list.get_default_cover() - $ cover_url = cover and cover.url("S") or "/images/icons/avatar_book-sm.png" + $ cover_url = cover and cover.url("S") or "/static/images/icons/avatar_book-sm.png"
$list.name diff --git a/openlibrary/templates/lists/list_follow.html b/openlibrary/templates/lists/list_follow.html index 719e8af5e2d..32623f39981 100644 --- a/openlibrary/templates/lists/list_follow.html +++ b/openlibrary/templates/lists/list_follow.html @@ -20,7 +20,7 @@ $if img_url: $ img_url = img_url.replace("-S.jpg", "-M.jpg") $else: - $ img_url = '/images/icons/avatar_book-sm.png' + $ img_url = '/static/images/icons/avatar_book-sm.png' $_('Cover of book')
diff --git a/openlibrary/templates/lists/preview.html b/openlibrary/templates/lists/preview.html index 442a2f32f80..3e1be3b80b1 100644 --- a/openlibrary/templates/lists/preview.html +++ b/openlibrary/templates/lists/preview.html @@ -1,7 +1,7 @@ $def with (list) $ cover = list.get_cover() or list.get_default_cover() - $ cover_url = cover and cover.url("M") or "/images/icons/avatar_book-sm.png" + $ cover_url = cover and cover.url("M") or "/static/images/icons/avatar_book-sm.png" $_('Cover of: %(title)s', title=list.name) diff --git a/openlibrary/templates/lists/showcase.html b/openlibrary/templates/lists/showcase.html index cdda94dfc94..ff64100aa36 100644 --- a/openlibrary/templates/lists/showcase.html +++ b/openlibrary/templates/lists/showcase.html @@ -10,7 +10,7 @@ $if img_url: $ img_url = img_url.replace("-S.jpg", "-M.jpg") $else: - $ img_url = '/images/icons/avatar_book-sm.png' + $ img_url = '/static/images/icons/avatar_book-sm.png'
diff --git a/openlibrary/templates/lists/snippet.html b/openlibrary/templates/lists/snippet.html index 6e247ec8652..440ce64780a 100644 --- a/openlibrary/templates/lists/snippet.html +++ b/openlibrary/templates/lists/snippet.html @@ -1,7 +1,7 @@ $def with (list) $ cover = list.get_cover() or list.get_default_cover() - $ cover_url = cover and cover.url("S") or "/images/icons/avatar_book-sm.png" + $ cover_url = cover and cover.url("S") or "/static/images/icons/avatar_book-sm.png" $ title = _("Cover of: %(title)s", title=list.name) $title diff --git a/openlibrary/templates/search/sort_options.html b/openlibrary/templates/search/sort_options.html index 6a389a9412a..d7569b72e7d 100644 --- a/openlibrary/templates/search/sort_options.html +++ b/openlibrary/templates/search/sort_options.html @@ -69,7 +69,7 @@ selected_sort_option = get_selected_sort_option(sort_options, selected_sort) or get_selected_sort_option(sort_options, default_sort)
- $_('Sorting by') + $_('Sorting by') $selected_sort_option['name'] diff --git a/openlibrary/templates/type/author/edit.html b/openlibrary/templates/type/author/edit.html index 2b63ae74b5a..2f95db0290d 100644 --- a/openlibrary/templates/type/author/edit.html +++ b/openlibrary/templates/type/author/edit.html @@ -102,7 +102,7 @@

$_("Edit Author")

-
$_("Identifiers") $_('Author Identifiers Purpose')
+
$_("Identifiers") $_('Author Identifiers Purpose')
diff --git a/openlibrary/templates/type/author/view.html b/openlibrary/templates/type/author/view.html index 77f64a6069a..935898a4fe3 100644 --- a/openlibrary/templates/type/author/view.html +++ b/openlibrary/templates/type/author/view.html @@ -76,7 +76,7 @@