diff options
| author | Dalf <alex@al-f.net> | 2014-09-28 16:53:30 +0200 |
|---|---|---|
| committer | dalf <alex@al-f.net> | 2014-10-01 22:17:35 +0200 |
| commit | 0a71525ab6d4fe4cbc4b33b4653bdb39ae4d55e9 (patch) | |
| tree | e0d18119b90db93939b16d6f811ce2b7d161c173 /searx/templates/default | |
| parent | 6bfd5663539052a64c984f5bdb7135d0d652c923 (diff) | |
[enh] add infoboxes and answers (clean up)
Diffstat (limited to 'searx/templates/default')
| -rw-r--r-- | searx/templates/default/infobox.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/searx/templates/default/infobox.html b/searx/templates/default/infobox.html new file mode 100644 index 000000000..f963e898c --- /dev/null +++ b/searx/templates/default/infobox.html @@ -0,0 +1,44 @@ +<div class="infobox"> + <h2>{{ infobox.infobox }}</h2> + {% if infobox.img_src %}<img src="{{ infobox.img_src }}" />{% endif %} + <p>{{ infobox.entity }}</p> + <p>{{ infobox.content }}</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> |