From 937165853185ca16b0da6f72bc42bd1487ea0dcb Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 13 Oct 2025 09:28:42 +0200 Subject: [mod] typification of SearXNG: add new result type File This PR adds a new result type: File Python class: searx/result_types/file.py Jinja template: searx/templates/simple/result_templates/file.html CSS (less) client/simple/src/less/result_types/file.less Class 'File' (singular) replaces template 'files.html' (plural). The renaming was carried out because there is only one file (singular) in a result. Not to be confused with the category 'files' where in multiple results can exist. As mentioned in issue [1], the class '.category-files' was removed from the CSS and the stylesheet was adopted in result_types/file.less (there based on the templates and no longer based on the category). [1] https://github.com/searxng/searxng/issues/5198 Signed-off-by: Markus Heiser --- searx/templates/simple/result_templates/files.html | 45 ---------------------- 1 file changed, 45 deletions(-) delete mode 100644 searx/templates/simple/result_templates/files.html (limited to 'searx/templates/simple/result_templates/files.html') diff --git a/searx/templates/simple/result_templates/files.html b/searx/templates/simple/result_templates/files.html deleted file mode 100644 index 13a425f31..000000000 --- a/searx/templates/simple/result_templates/files.html +++ /dev/null @@ -1,45 +0,0 @@ -{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_link with context %} -{% from 'simple/icons.html' import icon_small %} - -{{- result_header(result, favicons, image_proxify) -}} -{{- result_sub_header(result) -}} - -{%- if result.embedded -%} - -{%- endif -%} - -{%- if result.embedded -%} - -{%- endif -%} - -{%- if result.abstract %}

{{ result.abstract|safe }}

{% endif -%} - -{%- if result.img_src -%} -
-
-{{ result.title|striptags }} -{%- if result.content %}

{{ result.content|safe }}

{% endif -%} -
-
-{%- else -%} -{%- if result.content %}

{{ result.content|safe }}

{% endif -%} -{%- endif -%} - - -{%- if result.author %}{% endif -%} - -{%- if result.filename %}{% endif -%} - -{%- if result.size %}{%- endif -%} - -{%- if result.time %}{% endif -%} - -{%- if result.mtype %}{% endif -%} - - -{{ result_footer(result) }} -- cgit v1.2.3