summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-06-04 19:20:44 +0200
committerAdam Tauber <asciimoo@gmail.com>2020-06-04 19:21:15 +0200
commitde1b08a941a6834a39159b9a2aa3ff3552df029f (patch)
tree8e4ab076fdce203f2c714657c648560f8978e11d
parent5af873b74ee8ff30d0d70e0e310b094d1568cf58 (diff)
downloadsearxng-de1b08a941a6834a39159b9a2aa3ff3552df029f.tar.gz
searxng-de1b08a941a6834a39159b9a2aa3ff3552df029f.zip
[enh] add unique class for each endpoint - closes #1133
-rw-r--r--searx/templates/courgette/base.html2
-rw-r--r--searx/templates/legacy/base.html2
-rw-r--r--searx/templates/oscar/base.html2
-rw-r--r--searx/templates/simple/base.html2
-rwxr-xr-xsearx/webapp.py1
5 files changed, 5 insertions, 4 deletions
diff --git a/searx/templates/courgette/base.html b/searx/templates/courgette/base.html
index 8e272585c..f4c61dac2 100644
--- a/searx/templates/courgette/base.html
+++ b/searx/templates/courgette/base.html
@@ -29,7 +29,7 @@
searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
</script>
</head>
- <body>
+ <body class="{{ endpoint }}_endpoint" >
<div id="container">
{% block content %}
{% endblock %}
diff --git a/searx/templates/legacy/base.html b/searx/templates/legacy/base.html
index da19741cb..21fe42e16 100644
--- a/searx/templates/legacy/base.html
+++ b/searx/templates/legacy/base.html
@@ -20,7 +20,7 @@
<link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
{% endblock %}
</head>
- <body>
+ <body class="{{ endpoint }}_endpoint" >
<div id="container">
{% block content %}
{% endblock %}
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html
index 5eb4462e4..cd3d23df5 100644
--- a/searx/templates/oscar/base.html
+++ b/searx/templates/oscar/base.html
@@ -47,7 +47,7 @@
</style>
</noscript>
</head>
-<body>
+<body class="{{ endpoint }}_endpoint" >
{% include 'oscar/navbar.html' %}
<div class="container">
diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html
index 71df123ea..650ef771c 100644
--- a/searx/templates/simple/base.html
+++ b/searx/templates/simple/base.html
@@ -32,7 +32,7 @@
{% endblock %}
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}" />
</head>
-<body>
+<body class="{{ endpoint }}_endpoint" >
<main id="main_{{ self._TemplateReference__context.name|replace("simple/", "")|replace(".html", "") }}">
{% if errors %}
<div class="dialog-error" role="alert">
diff --git a/searx/webapp.py b/searx/webapp.py
index 46d4e949c..2ba8ccfb8 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -425,6 +425,7 @@ def render(template_name, override_theme=None, **kwargs):
kwargs['brand'] = brand
kwargs['scripts'] = set()
+ kwargs['endpoint'] = 'results' if 'q' in kwargs else request.endpoint
for plugin in request.user_plugins:
for script in plugin.js_dependencies:
kwargs['scripts'].add(script)