Merge pull request #41 from gutenbergtools/relative-links

fix thumb url at source
gutenberg1
eshellman 2019-09-13 11:08:33 -04:00 committed by GitHub
commit 012c14c445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -925,7 +925,7 @@ class OpenSearch (object):
def format_thumb_url (self, row):
""" Generate the thumb url in results. """
if row.coverpages:
return row.coverpages[0]
return '/' + row.coverpages[0]
return None
def format_icon (self, dummy_row):

View File

@ -103,7 +103,7 @@ which contains *all* Project Gutenberg metadata in one RDF/XML file.
<span class="icon icon_${e.icon}" />
</span>
<img py:if="e.thumb_url"
class="cover-thumb" src="/${e.thumb_url}" alt="" />
class="cover-thumb" src="${e.thumb_url}" alt="" />
</span>
<span class="cell content">
<span py:if="e.title" class="title">${e.title}</span>