mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Merge 6935fa393f
into af3be2b12b
This commit is contained in:
commit
e6523a63aa
6 changed files with 46 additions and 16 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -652,20 +652,30 @@ summary.title {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.answer-title {
|
||||
font-size: 1rem;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
span {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.answer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.answer-fields dt {
|
||||
font-weight: bold;
|
||||
margin-top: 0.8rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.answer-url {
|
||||
margin-left: auto;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
.answer-fields dd {
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.answer-sources {
|
||||
margin-top: 1rem;
|
||||
font-size: 0.8rem;
|
||||
.ltr-text-align-right();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,30 @@
|
|||
<div id="answers" role="complementary" aria-labelledby="answers-title"><h4 class="title" id="answers-title">{{ _('Answers') }} : </h4>
|
||||
{%- for answer in answers.values() -%}
|
||||
<div class="answer">
|
||||
<span>{{ answer.answer }}</span>
|
||||
{% if answer.url -%}
|
||||
<a href="{{ answer.url }}" class="answer-url">{{ urlparse(answer.url).hostname }}</a>
|
||||
{% endif -%}
|
||||
{% if answer.title %}
|
||||
<h5 class="answer-title">{{ answer.title }}</h5>
|
||||
{% endif %}
|
||||
{% if answer.url %}
|
||||
<a href="{{ answer.url }}">{{ answer.answer }}</a>
|
||||
{% else %}
|
||||
<span>{{ answer.answer }}</span>
|
||||
{% endif %}
|
||||
{% if answer.fields %}
|
||||
<dl class="answer-fields">
|
||||
{% for field in answer.fields -%}
|
||||
<dt>{{ field.label }}</dt>
|
||||
<dd>{{ field.value }}</dd>
|
||||
{%- endfor %}
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% if answer.sources %}
|
||||
<div class="answer-sources">
|
||||
{{ _('Sources') }}:
|
||||
{% for source in answer.sources -%}
|
||||
{% if not loop.first %}, {% endif %}<a href="{{ source.url }}">{{ source.title }}</a>
|
||||
{%- endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue