diff options
author | mrpaulblack <paul@paulgo.io> | 2022-02-21 22:18:48 +0100 |
---|---|---|
committer | mrpaulblack <paul@paulgo.io> | 2022-02-26 22:31:47 +0100 |
commit | 21e3c4051689318d887da6bd0fd5ff9eaf077ae2 (patch) | |
tree | b7ad1efba18fec381efb140f36f6d67d6aa27445 /searx/templates | |
parent | 3408d061aab9abc6168fec9bbc6deab71b236dac (diff) | |
download | searxng-21e3c4051689318d887da6bd0fd5ff9eaf077ae2.tar.gz searxng-21e3c4051689318d887da6bd0fd5ff9eaf077ae2.zip |
[simple theme] replace Image_layout.js with flexbox CS impl.
* drop image_layout.js from simple theme
* move image_layout.js to oscar theme and delete common js dir (since its empty now)
* align top position of image detail modal with bottom position of search header
* use flexbox to display images; row height can be set via @results-image-row-height in defenitions.less
* display span title underneath each image with a max width of 12rem
* increase margin and padding around image article on desktop and tablet
* make article height smaller on phone layout (height of 6rem) to display more content on current view
* remove content from result, if the title and content matches
* use a group that cotains the flex image article, if images are mixed with other categories
* fix pylint issues in webapp.py
* use the default.html result template in unit tests (thanks @return42)
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/simple/results.html | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index 4149f83c3..ee47db662 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -15,7 +15,7 @@ {% if results and results|map(attribute='template')|unique|list|count == 1 %} {% set only_template = 'only_template_' + results[0]['template']|default('default')|replace('.html', '') %} {% else %} - {% set unique_template = '' %} + {% set only_template = '' %} {% endif %} <div id="results" class="{{ only_template }}"> @@ -131,12 +131,10 @@ <div id="urls"> {% for result in results %} + {% if result.open_group and not only_template %}<div class="template_group_{{ result['template']|replace('.html', '') }}">{% endif %} {% set index = loop.index %} - {% if result['template'] %} - {% include get_result_template('simple', result['template']) %} - {% else %} - {% include 'simple/result_templates/default.html' %} - {% endif %} + {% include get_result_template('simple', result['template']) %} + {% if result.close_group and not only_template %}</div>{% endif %} {% endfor %} {% if not results and not answers %} {% include 'simple/messages/no_results.html' %} |