mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 12:51:02 +00:00
[enh] result rendering templates
This commit is contained in:
parent
9bd4459638
commit
fd0a93dd7c
3 changed files with 15 additions and 5 deletions
|
@ -64,7 +64,7 @@ input[type="checkbox"] { visibility: hidden; }
|
||||||
a { text-decoration: none; }
|
a { text-decoration: none; }
|
||||||
|
|
||||||
|
|
||||||
.result { margin-bottom: 16px; }
|
.result { margin-bottom: 16px; clear: both; }
|
||||||
.result_title { margin-bottom: 0; }
|
.result_title { margin-bottom: 0; }
|
||||||
.result p { margin-top: 0; padding-top: 0; font-size: 0.8em; max-width: 50em; }
|
.result p { margin-top: 0; padding-top: 0; font-size: 0.8em; max-width: 50em; }
|
||||||
.result h3 { font-size: 0.9em;}
|
.result h3 { font-size: 0.9em;}
|
||||||
|
@ -76,8 +76,13 @@ a { text-decoration: none; }
|
||||||
|
|
||||||
.engines { color: #888888; }
|
.engines { color: #888888; }
|
||||||
|
|
||||||
|
.small_font { font-size: 0.8em; }
|
||||||
|
|
||||||
.small p { margin: 2px 0; }
|
.small p { margin: 2px 0; }
|
||||||
|
|
||||||
.right { float: right; }
|
.right { float: right; }
|
||||||
|
|
||||||
.invisible { display: none; }
|
.invisible { display: none; }
|
||||||
|
|
||||||
|
.image_result { float: left; max-width: 250px; margin: 10px; height: 350px; min-width: 250px; }
|
||||||
|
.image_result img { max-width: 240px; max-height: 320px; border: 2px solid #000000; }
|
||||||
|
|
4
searx/templates/result_templates/default.html
Normal file
4
searx/templates/result_templates/default.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<div class="result">
|
||||||
|
<h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
|
||||||
|
<p class="content"><span class="engines">{{ result.engine }}</span><br />{% if result.content %}{{ result.content|safe }}<br />{% endif %}<span class="url">{{ result.url }}</span></p>
|
||||||
|
</div>
|
|
@ -9,10 +9,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="results">
|
<div id="results">
|
||||||
{% for result in results %}
|
{% for result in results %}
|
||||||
<div class="result">
|
{% if result['template'] %}
|
||||||
<h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
|
{% include 'result_templates/'+result['template'] %}
|
||||||
<p class="content"><span class="engines">{{ result.engine }}</span><br />{% if result.content %}{{ result.content|safe }}<br />{% endif %}<span class="url">{{ result.url }}</span></p>
|
{% else %}
|
||||||
</div>
|
{% include 'result_templates/default.html' %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue