fixed light=light missing in some routes
This commit is contained in:
parent
90b8585027
commit
be41426018
@ -13,7 +13,7 @@ This digital library gathers all the books and articles floating around on the s
|
||||
It starts at XPUB, but can go anywhere we want it to.
|
||||
<br>
|
||||
<br>
|
||||
Are you interested in how this library works? Have a look at the source code in <a href 'https://git.xpub.nl/xpub-lib/log.html'> our git. </a>
|
||||
Are you interested in how this library works? Have a look at the source code in <a href= 'https://git.xpub.nl/xpub-lib/log.html'> our git. </a>
|
||||
</p>
|
||||
<h2> What's the deal with the stacks? </h2>
|
||||
<p class='about'>
|
||||
|
@ -109,7 +109,7 @@
|
||||
<br><br>
|
||||
{%endif%}
|
||||
|
||||
|
||||
{%if res %}
|
||||
<div style="padding-bottom:20px;">
|
||||
<h2>Annotations for <i>{{book.title}}</i>:</h4>
|
||||
{% for row in res%}
|
||||
@ -128,6 +128,8 @@
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{%else%}<div style="padding-bottom:50px;"><i> No annotations yet for this book </i></div>
|
||||
{%endif%}
|
||||
</div>
|
||||
<hr>
|
||||
{% if previousbook %}
|
||||
@ -137,8 +139,4 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
@ -111,14 +111,14 @@ def annotations():
|
||||
# id = book.id
|
||||
annot = get_annotations()
|
||||
print(annot)
|
||||
return render_template('annotations.html', annot=annot, books=books)
|
||||
return render_template('annotations.html', annot=annot, books=books, light=light)
|
||||
|
||||
# PDF from annotations
|
||||
@app.route('/annotations.pdf')
|
||||
def annotations_pdf():
|
||||
annot = get_annotations()
|
||||
# Make a PDF straight from HTML in a string.
|
||||
html = render_template(('annotations.html'), annot=annot)
|
||||
html = render_template(('annotations.html'), annot=annot, light=light)
|
||||
return render_pdf(HTML(string=html))
|
||||
|
||||
@app.route('/viewpdf/<filename>')
|
||||
@ -204,7 +204,7 @@ def show_book_by_id(id):
|
||||
if not book:
|
||||
return render_template('red_link.html', id=id, light=light)
|
||||
else:
|
||||
return render_template('show_book_detail.html', book=book, previousbook = previousbook, nextbook = nextbook, all_instances=all_instances, name=name, annot=annot, res=res)
|
||||
return render_template('show_book_detail.html', book=book, previousbook = previousbook, nextbook = nextbook, all_instances=all_instances, name=name, annot=annot, res=res, light=light)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user