Merge branch 'master' of git.xpub.nl:/var/www/git.xpub.nl/repos/xpub-lib
This commit is contained in:
commit
822747f428
@ -176,6 +176,64 @@ background-color:red;
|
|||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-autocomplete {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
float: left;
|
||||||
|
display: none;
|
||||||
|
min-width: 160px;
|
||||||
|
padding: 4px 0;
|
||||||
|
margin: 0 0 10px 25px;
|
||||||
|
list-style: none;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-color: #ccc;
|
||||||
|
border-color: rgba(0, 0, 0, 0.2);
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
-webkit-background-clip: padding-box;
|
||||||
|
-moz-background-clip: padding;
|
||||||
|
background-clip: padding-box;
|
||||||
|
*border-right-width: 2px;
|
||||||
|
*border-bottom-width: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-menu-item > a.ui-corner-all {
|
||||||
|
display: block;
|
||||||
|
padding: 3px 15px;
|
||||||
|
clear: both;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 18px;
|
||||||
|
color: #555555;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-menu-item {
|
||||||
|
margin: 3px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-state-hover, .ui-state-active {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: #0088cc;
|
||||||
|
border-radius: 0px;
|
||||||
|
-webkit-border-radius: 0px;
|
||||||
|
-moz-border-radius: 0px;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-helper-hidden-accessible {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.footer{
|
.footer{
|
||||||
@ -489,4 +547,4 @@ nav { font-size: .7em }
|
|||||||
@page { size: A5; margin: 1cm }
|
@page { size: A5; margin: 1cm }
|
||||||
@media print {
|
@media print {
|
||||||
nav { display: none }
|
nav { display: none }
|
||||||
}
|
}
|
||||||
|
@ -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.
|
It starts at XPUB, but can go anywhere we want it to.
|
||||||
<br>
|
<br>
|
||||||
<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>
|
</p>
|
||||||
<h2> What's the deal with the stacks? </h2>
|
<h2> What's the deal with the stacks? </h2>
|
||||||
<p class='about'>
|
<p class='about'>
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
<br><br>
|
<br><br>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
|
{%if res %}
|
||||||
<div style="padding-bottom:20px;">
|
<div style="padding-bottom:20px;">
|
||||||
<h2>Annotations for <i>{{book.title}}</i>:</h4>
|
<h2>Annotations for <i>{{book.title}}</i>:</h4>
|
||||||
{% for row in res%}
|
{% for row in res%}
|
||||||
@ -128,6 +128,8 @@
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{%else%}<div style="padding-bottom:50px;"><i> No annotations yet for this book </i></div>
|
||||||
|
{%endif%}
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
{% if previousbook %}
|
{% if previousbook %}
|
||||||
@ -137,8 +139,4 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
10
app/views.py
10
app/views.py
@ -113,14 +113,14 @@ def annotations():
|
|||||||
rstr=('http://' + server+'/uploads/','')
|
rstr=('http://' + server+'/uploads/','')
|
||||||
annot = get_annotations()
|
annot = get_annotations()
|
||||||
print(annot)
|
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
|
# PDF from annotations
|
||||||
@app.route('/annotations.pdf')
|
@app.route('/annotations.pdf')
|
||||||
def annotations_pdf():
|
def annotations_pdf():
|
||||||
annot = get_annotations()
|
annot = get_annotations()
|
||||||
# Make a PDF straight from HTML in a string.
|
# 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))
|
return render_pdf(HTML(string=html))
|
||||||
|
|
||||||
@app.route('/myannotations.pdf')
|
@app.route('/myannotations.pdf')
|
||||||
@ -149,7 +149,7 @@ def get_updates():
|
|||||||
allbooks = db.session.query(Book).all()
|
allbooks = db.session.query(Book).all()
|
||||||
id = len(allbooks)
|
id = len(allbooks)
|
||||||
latest_upload = allbooks[-1]
|
latest_upload = allbooks[-1]
|
||||||
return "This is the XPPL ~ Library XPUB ~ Updates / / / / / / / Last viewed: " + userin.info + " / / / / / / / " + str(len(allbooks)) + " Books online "+ " / / / / / / / " + "Latest upload: " + latest_upload.title
|
return "This is the XPPL ~ Library XPUB ~ Updates / / / / / / / Last viewed: " + userin.info + " / / / / / / / " + str(len(allbooks)) + " Books online "+ " / / / / / / / " + "Latest entry: " + latest_upload.title
|
||||||
|
|
||||||
@app.route('/scape', methods=['POST', 'GET'])
|
@app.route('/scape', methods=['POST', 'GET'])
|
||||||
def scape():
|
def scape():
|
||||||
@ -217,7 +217,7 @@ def show_book_by_id(id):
|
|||||||
if not book:
|
if not book:
|
||||||
return render_template('red_link.html', id=id, light=light)
|
return render_template('red_link.html', id=id, light=light)
|
||||||
else:
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -776,7 +776,7 @@ def import_csv():
|
|||||||
name, file_extension = os.path.splitext(row['file'])
|
name, file_extension = os.path.splitext(row['file'])
|
||||||
print ('get_cover', fullpath, name)
|
print ('get_cover', fullpath, name)
|
||||||
cover = get_cover(fullpath, name)
|
cover = get_cover(fullpath, name)
|
||||||
file = str(id) + "_" + row['file']
|
file = row['file']
|
||||||
|
|
||||||
if row['year_published']:
|
if row['year_published']:
|
||||||
year_published = int(row['year_published'])
|
year_published = int(row['year_published'])
|
||||||
|
Loading…
Reference in New Issue
Block a user