From 13d801b75d012a7a7a76440e1d2a51ed2ae03171 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Tue, 8 Aug 2023 18:12:07 +0200 Subject: [PATCH] [feat] results: show source of suggested answer --- searx/static/themes/simple/src/less/style.less | 12 ++++++++++++ searx/templates/simple/results.html | 9 ++++----- searx/webapp.py | 3 ++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/searx/static/themes/simple/src/less/style.less b/searx/static/themes/simple/src/less/style.less index 366b4d580..ccfc221a2 100644 --- a/searx/static/themes/simple/src/less/style.less +++ b/searx/static/themes/simple/src/less/style.less @@ -633,6 +633,18 @@ summary.title { span { overflow-wrap: anywhere; } + + .answer { + display: flex; + flex-direction: column; + } + + .answer-url { + margin-left: auto; + margin-top: 5px; + margin-right: 10px; + margin-bottom: 10px; + } } #infoboxes { diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index c472d585c..42ad3fa3d 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -23,11 +23,10 @@ diff --git a/searx/webapp.py b/searx/webapp.py index 59c1dd1a1..9793ee534 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -22,7 +22,7 @@ from typing import List, Dict, Iterable import urllib import urllib.parse -from urllib.parse import urlencode, unquote +from urllib.parse import urlencode, urlparse, unquote import httpx @@ -444,6 +444,7 @@ def render(template_name: str, **kwargs): } ) ) + kwargs['urlparse'] = urlparse # scripts from plugins kwargs['scripts'] = set()