diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2023-09-06 19:12:27 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2023-09-11 12:27:56 +0200 |
commit | 935aed7ca4339a72dc9ace7297d34550e991c6f9 (patch) | |
tree | 3d93dbcb238846ac9bda79444bda8dfdb6f32594 /searx/templates | |
parent | 432febd810fb45181a9b575eb71a33fcda9c7703 (diff) | |
download | searxng-935aed7ca4339a72dc9ace7297d34550e991c6f9.tar.gz searxng-935aed7ca4339a72dc9ace7297d34550e991c6f9.zip |
[feature] dark theme for code highlighter in the result list
Closes: https://github.com/searxng/searxng/issues/1354
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/simple/result_templates/code.html | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/searx/templates/simple/result_templates/code.html b/searx/templates/simple/result_templates/code.html index 3fe429caa..7d2c8ff79 100644 --- a/searx/templates/simple/result_templates/code.html +++ b/searx/templates/simple/result_templates/code.html @@ -2,12 +2,31 @@ {{ result_header(result, favicons, image_proxify) -}} {{- result_sub_header(result) -}} -{%- if result.content %}{{ result.content|safe }}{% endif %}</p> + +{%- if result.content -%} + <p class="content"> + {{- result.content|safe -}} + </p> +{%- endif -%} {%- if result.repository -%} -<p class="content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p> + <p class="content">{{- '' -}} + {{ _('repo') }}: {{- ' ' -}} + <a href="{{ result.repository|safe }}"{{- ' ' -}} + {% if results_on_new_tab %} + target="_blank" {{- ' ' -}} + rel="noopener noreferrer" + {%- else -%} + rel="noreferrer" + {%- endif -%} + > + {{- result.repository -}} + </a>{{- '' -}} + </p> {%- endif -%} + <div dir="ltr" class="codelines"> {{- result.codelines|code_highlighter(result.code_language)|safe -}} -</div>{{- '' -}} +</div> + {{- result_sub_footer(result, proxify) -}} -{{ result_footer(result) }} +{{- result_footer(result) -}} |