Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
93b020b7
Commit
93b020b7
authored
Jan 21, 2017
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper handling for non existing covers in calibre database
parent
a4032246
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
detail.html
cps/templates/detail.html
+3
-1
edit_book.html
cps/templates/edit_book.html
+3
-1
index.html
cps/templates/index.html
+10
-6
No files found.
cps/templates/detail.html
View file @
93b020b7
...
...
@@ -4,8 +4,10 @@
<div
class=
"row"
>
<div
class=
"col-sm-3 col-lg-3 col-xs-12"
>
<div
class=
"cover"
>
{% if entry.has_cover
is defined
%}
{% if entry.has_cover %}
<img
src=
"{{ url_for('get_cover', cover_path=entry.path.replace('\\','/')) }}"
/>
{% else %}
<img
src=
"{{ url_for('static', filename='generic_cover.jpg') }}"
/>
{% endif %}
</div>
</div>
...
...
cps/templates/edit_book.html
View file @
93b020b7
...
...
@@ -3,8 +3,10 @@
{% if book %}
<div
class=
"col-sm-3 col-lg-3 col-xs-12"
>
<div
class=
"cover"
>
{% if book.has_cover
is defined
%}
{% if book.has_cover %}
<img
src=
"{{ url_for('get_cover', cover_path=book.path) }}"
/>
{% else %}
<img
src=
"{{ url_for('static', filename='generic_cover.jpg') }}"
/>
{% endif %}
</div>
</div>
...
...
cps/templates/index.html
View file @
93b020b7
...
...
@@ -8,11 +8,13 @@
{% for entry in random %}
<div
class=
"col-sm-3 col-lg-2 col-xs-6 book"
>
<div
class=
"cover"
>
{% if entry.has_cover is defined %}
<a
href=
"{{ url_for('show_book', id=entry.id) }}"
>
<img
src=
"{{ url_for('get_cover', cover_path=entry.path.replace('\\','/')) }}"
/>
{% if entry.has_cover %}
<img
src=
"{{ url_for('get_cover', cover_path=entry.path.replace('\\','/')) }}"
/>
{% else %}
<img
src=
"{{ url_for('static', filename='generic_cover.jpg') }}"
/>
{% endif %}
</a>
{% endif %}
</div>
<div
class=
"meta"
>
<p
class=
"title"
>
{{entry.title|shortentitle}}
</p>
...
...
@@ -41,11 +43,13 @@
{% for entry in entries %}
<div
class=
"col-sm-3 col-lg-2 col-xs-6 book"
>
<div
class=
"cover"
>
{% if entry.has_cover is defined %}
<a
href=
"{{ url_for('show_book', id=entry.id) }}"
>
<img
src=
"{{ url_for('get_cover', cover_path=entry.path.replace('\\','/')) }}"
/>
{% if entry.has_cover %}
<img
src=
"{{ url_for('get_cover', cover_path=entry.path.replace('\\','/')) }}"
/>
{% else %}
<img
src=
"{{ url_for('static', filename='generic_cover.jpg') }}"
/>
{% endif %}
</a>
{% endif %}
</div>
<div
class=
"meta"
>
<p
class=
"title"
>
{{entry.title|shortentitle}}
</p>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment