diff options
author | Alexandre Flament <alex@al-f.net> | 2017-02-12 15:06:01 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2017-08-06 16:04:21 +0200 |
commit | 10a24bdc2c3870f07ec62dd710841628d325aaf6 (patch) | |
tree | 400b579adb6268092f21ec21621a16c730cfef41 /searx/templates/simple/infobox.html | |
parent | 4f6586d8085460c368ad16904685199de630e1c8 (diff) | |
download | searxng-10a24bdc2c3870f07ec62dd710841628d325aaf6.tar.gz searxng-10a24bdc2c3870f07ec62dd710841628d325aaf6.zip |
[enh] add simple theme (WIP)
Diffstat (limited to 'searx/templates/simple/infobox.html')
-rw-r--r-- | searx/templates/simple/infobox.html | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/searx/templates/simple/infobox.html b/searx/templates/simple/infobox.html new file mode 100644 index 000000000..d99806ac4 --- /dev/null +++ b/searx/templates/simple/infobox.html @@ -0,0 +1,46 @@ +<aside class="infobox"> + <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><bdi>{{ infobox.entity }}</bdi></p> + <p><bdi>{{ infobox.content | safe }}</bdi></p> + {% if infobox.attributes %} + <div class="attributes"> + {% for attribute in infobox.attributes %} + <dl> + <dt><bdi>{{ attribute.label }} :</bdi></dt> + {%- if attribute.image -%} + <dd><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></dd> + {%- else -%} + <dd><bdi>{{ attribute.value }}</bdi></dd> + {%- endif -%} + </dl> + {% endfor %} + </div> + {% endif %} + + {% if infobox.urls %} + <div class="urls"> + <ul> + {%- for url in infobox.urls -%} + <li class="url"><bdi><a href="{{ url.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ url.title }}</a></bdi></li> + {%- endfor -%} + </ul> + </div> + {% endif %} + + {% if infobox.relatedTopics %} + <div class="relatedTopics"> + {% for topic in infobox.relatedTopics %} + <div> + <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 }}"> + <input type="submit" value="{{ suggestion }}" /> + </form> + {% endfor %} + </div> + {% endfor %} + </div> + {% endif %} +</aside> |