Add templates.
This commit is contained in:
parent
0a6ea8b416
commit
3215333caf
5 changed files with 160 additions and 0 deletions
32
templates/next.html
Normal file
32
templates/next.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ label }} ({{qid }}){% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="m-3">
|
||||
<h1>{{ self.title() }}</h1>
|
||||
{# <pre>{{ other | pprint }}</pre> #}
|
||||
|
||||
{# <img src="{{ image.thumburl }}" height="{{ image.thumbheight }}" width="{{ image.thumbwidth }}"> #}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<img src="{{ image.thumburl }}">
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<p><a href="https://www.wikidata.org/wiki/{{ qid }}">view on Wikidata</a></p>
|
||||
{% for key, prop_label in labels.items() %}
|
||||
{% set claims = entity['claims'][key] %}
|
||||
{% if claims %}
|
||||
<h3>{{ prop_label }} ({{ key }})</h3>
|
||||
{% for claim in claims %}
|
||||
{% set claim_qid = claim.mainsnak.datavalue.value.id %}
|
||||
<a href="{{ url_for('find_more_page', property_id=key[1:], item_id=claim_qid[1:]) }}">{{ other[claim_qid] }}</a> ({{ claim_qid }})
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue