more detail from catalogs

This commit is contained in:
Edward Betts 2019-09-27 11:02:24 +01:00
parent 921824833f
commit 14b93fb7de
3 changed files with 204 additions and 17 deletions

View file

@ -4,7 +4,20 @@
{% block content %}
<div class="m-3">
<p><a href="{{ url_for('random_painting') }}">random painting</a></p>
<p><a href="{{ url_for('random_painting') }}">random painting</a>
{% if not username %}
| <a href="{{ url_for('start_oauth') }}">connect to Wikidata account</a>
{% endif %}
</p>
<p>username: {{ username }}</p>
{% if not username %}
<p>This tool must be connected with Wikidata to work.</p>
<p><a href="{{ url_for('start_oauth') }}" class="btn btn-primary btn-lg">Connect with Wikidata</a>
{% endif %}
<ul>
{% for pid, label in props.items() %}
<li><a href="{{ url_for('property_query_page', property_id=pid[1:]) }}">{{ label }}</a>

View file

@ -47,12 +47,38 @@
</div>
{% endif %}
{% endfor %}
{% if catalog_detail %}
{% for detail in catalog_detail %}
<div>
<strong>{{ detail.label }}</strong>:
<a href="{{ detail.url }}">{{ detail.value }}</a>
</div>
{% endfor %}
{% endif %}
{% if saam_data %}
{% if catalog_url %}
<p>
<strong>catalog URL</strong>:
<a href="{{ catalog_url }}">{{ catalog_url }}</a>
</p>
{% endif %}
{% if catalog %}
<div class="mt-2">
<h4>information from the Smithsonian American Art Museum</h4>
<div><strong>description</strong>: {{ saam_data.description }}</div>
<div><strong>keywords</strong>: {{ '; '.join(saam_data.keywords) }}</div>
<h4>information from the {{ catalog.institution }} catalog</h4>
{% if catalog.description %}
<div><strong>description</strong>: {{ catalog.description }}</div>
{% endif %}
{% if catalog.keywords %}
<div><strong>keywords</strong>
<ul>
{% for keyword in catalog.keywords %}
<li>{{ keyword }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endif %}
</div>
@ -95,7 +121,7 @@
{% endraw %}
</div>
<div class="flex-shrink-1 vh-100">
<img src="{{ image.thumburl }}" class="h-100" />
<img src="{{ image.thumburl }}" />
</div>
</div>