Flask application repository for Banner Repeater's DAAP (Digital Archive of Artists Publishing).
SPARQL queries by Lozana Rossenova, CSS and JS by Joana Chicau, python and Jinja by Julie Boschat-Thorez.
See https://daap.network
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.7 KiB
67 lines
1.7 KiB
{% extends "layout.html" %}
|
|
{% block content %}
|
|
|
|
<div id="browsethearchive-grid">
|
|
|
|
|
|
|
|
{% for x in results['results']['bindings']%}
|
|
<div class="browsethearchive-items">
|
|
{% if "image" in x %}
|
|
<a href='/artwork?id={{ x["work"]["value"] | replace("http://daap.bannerrepeater.org/entity/", "") }}'>
|
|
<img class="browsethearchive-imgs" src='{{ x["image"]["value"] | replace("wiki/File:","wiki/Special:Redirect/file/") }}'>
|
|
</a> <br>
|
|
{% else %}
|
|
<a href='/artwork?id={{ x["work"]["value"] | replace("http://daap.bannerrepeater.org/entity/", "") }}'>
|
|
<img class="browsethearchive-imgs" src="{{ url_for('static', filename='/imgs/Icons/placeholder_no-image2.png') }}"><br>
|
|
</a>
|
|
{% endif %}
|
|
<a href='/artwork?id={{ x["work"]["value"] | replace("http://daap.bannerrepeater.org/entity/", "") }}'>
|
|
{{ x["workLabel"]["value"]}}
|
|
</a> <br>
|
|
{% if "date" in x %}
|
|
{{ x["date"]["value"] | replace("T00:00:00Z", "") }} <br>
|
|
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<ul id="pagin">
|
|
</ul>
|
|
|
|
|
|
<script type="text/javascript">
|
|
//Pagination
|
|
pageSize = 16;
|
|
|
|
var pageCount = $(".browsethearchive-items").length / pageSize;
|
|
|
|
for(var i = 0 ; i<pageCount;i++){
|
|
|
|
$("#pagin").append('<li><a href="#">'+(i+1)+'</a></li> ');
|
|
}
|
|
$("#pagin li").first().find("a").addClass("current")
|
|
showPage = function(page) {
|
|
$(".browsethearchive-items").hide();
|
|
$(".browsethearchive-items").each(function(n) {
|
|
if (n >= pageSize * (page - 1) && n < pageSize * page)
|
|
$(this).show();
|
|
});
|
|
}
|
|
|
|
showPage(1);
|
|
|
|
$("#pagin li a").click(function() {
|
|
$("#pagin li a").removeClass("current");
|
|
$(this).addClass("current");
|
|
showPage(parseInt($(this).text()))
|
|
});
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
{% endblock content %}
|
|
|
|
|
|
|
|
|