Browse Source

artwork img placeholder + link to org publisersindex + whatever I cannot remmber

master
jules 4 years ago
parent
commit
f9a8eceba8
  1. 2
      daapinterface.py
  2. 34
      templates/artwork.html
  3. 4
      templates/publishersindex.html

2
daapinterface.py

@ -235,7 +235,7 @@ def artwork():
''')
sparql.setReturnFormat(JSON)
artworkimages = sparql.query().convert()
# print(artworkimages)
print(artworkimages)
######### Right top
# contributors

34
templates/artwork.html

@ -39,17 +39,20 @@
<div class="artwork-about">
<!-- left -->
<div class="artwork-leftcolumn">
<!-- img - I am unsure how to handle the thing to go through the different pictures -->
<div class="artwork-about-img">
{% for x in artworkimages['results']['bindings'] %}
{% if loop.index <= 1 %}
{% if "image" in x %}
<img class="artwork-about-imgs" src='{{ x["image"]["value"] | replace("wiki/File:","wiki/Special:Redirect/file/") }}'>
{% else %}
<img class="artwork-about-imgs" src="{{ url_for('static', filename='/imgs/Icons/placeholder_no-image2.png') }}">
{% endif %}
{% if artworkimages['results']['bindings']==[] %}
<img class="artwork-about-imgs" src="{{ url_for('static', filename='/imgs/Icons/placeholder_no-image2.png') }}">
{% else %}
{% for x in artworkimages['results']['bindings'] %}
{% if loop.index <= 1 %}
{% if "image" in x %}
<img class="artwork-about-imgs" src='{{ x["image"]["value"] | replace("wiki/File:","wiki/Special:Redirect/file/") }}'>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
<!-- other stuff like downloads, absent for now -->
<div></div>
@ -122,15 +125,18 @@
<span class="label-item">DESCRIPTION</span>
<!-- left part with the description text already coming in a div from wiki-->
{{ artworkdescriptiontext }}
<!-- right ride with author etc -->
<div>
<span class="label-item">AUTHOR</span>
<!-- right ride with author etc LATER-->
<!-- <div> -->
<!-- <span class="label-item">AUTHOR</span> -->
<!-- if there is an author name then add here otherwise info non available -->
<span class="label-item">SOURCE</span>
<!-- <span class="label-item">SOURCE</span> -->
<!-- if there is a source name then add here otherwise info non available -->
<span class="label-item">DATE</span>
<!-- <span class="label-item">DATE</span> -->
<!-- if there is a date add here otherwise info non available-->
</div>
<!-- </div> -->
</div>
<!-- end description loop -->

4
templates/publishersindex.html

@ -15,8 +15,8 @@
<tbody>
{% for x in results['results']['bindings']%}
<tr>
<th class="idnumber"><a href="person?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}</a></th>
<th class="label"><a href="person?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x["publishersLabel"]['value'] }}</a></th>
<th class="idnumber"><a href="organisation?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}</a></th>
<th class="label"><a href="organisation?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x["publishersLabel"]['value'] }}</a></th>
<th class="altaliases">
{% if "publishersAltLabel" in x %}
{{ x["publishersAltLabel"]["value"] }}

Loading…
Cancel
Save