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.
76 lines
2.0 KiB
76 lines
2.0 KiB
{% extends "layout.html" %}
|
|
{% block content %}
|
|
|
|
<div id="home-top-div"></div>
|
|
<div id="home-recently-added-works">
|
|
<div id="home-recent-title">RECENTLY ADDED WORKS</div>
|
|
|
|
<div id="home-recent-grid">
|
|
|
|
|
|
|
|
{% for x in results['results']['bindings']%}
|
|
<div class="home-recent-items">
|
|
{% if "image" in x %}
|
|
<a href='/artwork?id={{ x["work"]["value"] | replace("http://daap.bannerrepeater.org/entity/", "") }}'>
|
|
<img class="home-recent-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="home-recent-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 %}
|
|
|
|
<span class="home-show"></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--
|
|
|
|
|
|
post_wrap =
|
|
home-recent-grid
|
|
|
|
pst =
|
|
home-recent-items
|
|
|
|
-->
|
|
|
|
<script type="text/javascript">
|
|
$ShowHideMore = $('#home-recent-grid');
|
|
$ShowHideMore.each(function() {
|
|
var $times = $(this).children('.home-recent-items');
|
|
if ($times.length > 9) {
|
|
$ShowHideMore.children(':nth-of-type(n+9)').addClass('moreShown').hide();
|
|
$(this).find('span.home-show').addClass('more-times').html('SHOW MORE');
|
|
}
|
|
});
|
|
|
|
$(document).on('click', '#home-recent-grid > span', function() {
|
|
var that = $(this);
|
|
var thisParent = that.closest('#home-recent-grid');
|
|
if (that.hasClass('more-times')) {
|
|
thisParent.find('.moreShown').show();
|
|
that.toggleClass('more-times', 'less-times').html('SHOW LESS');
|
|
} else {
|
|
thisParent.find('.moreShown').hide();
|
|
that.toggleClass('more-times', 'less-times').html('SHOW MORE');
|
|
}
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
{% endblock content %}
|