Commit a0a12849 authored by marc's avatar marc
Browse files

wikidata refactor and more attributes (see issue #560)

parent a4c77f88
.coverage
coverage/
.installed.cfg
engines.cfg
env
......
This diff is collapsed.
<div class="infobox">
<h2>{{ infobox.infobox }}</h2>
<h2><bdi>{{ infobox.infobox }}</bdi></h2>
{% if infobox.img_src %}<img src="{{ image_proxify(infobox.img_src) }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
<p>{{ infobox.entity }}</p>
<p>{{ infobox.content | safe }}</p>
<p><bdi>{{ infobox.entity }}</bdi></p>
<p><bdi>{{ infobox.content | safe }}</bdi></p>
{% if infobox.attributes %}
<div class="attributes">
<table>
{% for attribute in infobox.attributes %}
<tr>
<td>{{ attribute.label }}</td>
<td><bdi>{{ attribute.label }}</bdi></td>
{% if attribute.image %}
<td><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{% else %}
<td>{{ attribute.value }}</td>
<td><bdi>{{ attribute.value }}</bdi></td>
{% endif %}
</tr>
{% endfor %}
......@@ -24,7 +24,7 @@
<div class="urls">
<ul>
{% for url in infobox.urls %}
<li class="url"><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></li>
<li class="url"><bdi><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></bdi></li>
{% endfor %}
</ul>
</div>
......@@ -34,7 +34,7 @@
<div class="relatedTopics">
{% for topic in infobox.relatedTopics %}
<div>
<h3>{{ topic.name }}</h3>
<h3><bdi>{{ topic.name }}</bdi></h3>
{% for suggestion in topic.suggestions %}
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
<input type="hidden" name="q" value="{{ suggestion }}">
......
<div class="panel panel-default infobox">
<div class="panel-heading">
<bdi><h4 class="panel-title infobox_part">{{ infobox.infobox }}</h4></bdi>
<h4 class="panel-title infobox_part"><bdi>{{ infobox.infobox }}</bdi></h4>
</div>
<div class="panel-body">
<bdi>
{% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" alt="{{ infobox.infobox }}" />{% endif %}
{% if infobox.content %}<p class="infobox_part">{{ infobox.content }}</p>{% endif %}
{% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content }}</bdi></p>{% endif %}
{% if infobox.attributes %}
<table class="table table-striped infobox_part">
{% for attribute in infobox.attributes %}
<tr>
<td>{{ attribute.label }}</td>
<td><bdi>{{ attribute.label }}</bdi></td>
{% if attribute.image %}
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{% else %}
<td>{{ attribute.value }}</td>
<td><bdi>{{ attribute.value }}</bdi></td>
{% endif %}
</tr>
{% endfor %}
......@@ -24,11 +23,12 @@
{% if infobox.urls %}
<div class="infobox_part">
<bdi>
{% for url in infobox.urls %}
<p class="btn btn-default btn-xs"><a href="{{ url.url }}" rel="noreferrer">{{ url.title }}</a></p>
{% endfor %}
</bdi>
</div>
{% endif %}
</bdi>
</div>
</div>
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment