summaryrefslogtreecommitdiff
path: root/searx/templates/default/infobox.html
blob: d3ff8f06d3ba63b20746b23bcbb71190788dce4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<div class="infobox">
  <h2>{{ infobox.infobox }}</h2>
  {% if infobox.img_src %}<img src="{{ infobox.img_src }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
  <p>{{ infobox.entity }}</p>
  <p>{{ infobox.content | safe }}</p>
  {% if infobox.attributes %}
  <div class="attributes">
    <table>
      {% for attribute in infobox.attributes %}
      <tr><td>{{ attribute.label }}</td><td>{{ attribute.value }}</td></tr>
      {% endfor %}
    </table>
  </div>
  {% endif %}

  {% if infobox.urls %}
  <div class="urls">
    <ul>
      {% for url in infobox.urls %}
      <li class="url"><a href="{{ url.url }}">{{ url.title }}</a></li>
      {% endfor %}
    </ul>
  </div>
  {% endif %}

  {% if infobox.relatedTopics %}
  <div class="relatedTopics">
      {% for topic in infobox.relatedTopics %}
      <div>
	<h3>{{ topic.name }}</h3>
	{% for suggestion in topic.suggestions %}
	<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
            <input type="hidden" name="q" value="{{ suggestion }}">
            <input type="submit" value="{{ suggestion }}" />
        </form>
	{% endfor %}
      </div>
      {% endfor %}
  </div>
  {% endif %}

  <br />
  
</div>