summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
Diffstat (limited to 'searx')
-rw-r--r--searx/static/themes/simple/gruntfile.js6
-rw-r--r--searx/static/themes/simple/src/less/rss.less45
-rw-r--r--searx/templates/simple/opensearch_response_rss.xml2
-rw-r--r--searx/templates/simple/rss.xsl (renamed from searx/static/themes/simple/xsl/rss.xsl)1
-rwxr-xr-xsearx/webapp.py8
5 files changed, 61 insertions, 1 deletions
diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js
index 9410a674b..c2cbad315 100644
--- a/searx/static/themes/simple/gruntfile.js
+++ b/searx/static/themes/simple/gruntfile.js
@@ -136,6 +136,12 @@ module.exports = function (grunt) {
nonull: true,
filter: file_exists,
},
+ {
+ src: ['src/less/rss.less'],
+ dest: 'css/rss.min.css',
+ nonull: true,
+ filter: file_exists,
+ },
],
},
},
diff --git a/searx/static/themes/simple/src/less/rss.less b/searx/static/themes/simple/src/less/rss.less
new file mode 100644
index 000000000..0bc6622e3
--- /dev/null
+++ b/searx/static/themes/simple/src/less/rss.less
@@ -0,0 +1,45 @@
+@import (inline) "../../node_modules/normalize.css/normalize.css";
+@import "definitions.less";
+
+.text-size-adjust (@property: 100%) {
+ -webkit-text-size-adjust: @property;
+ -ms-text-size-adjust: @property;
+ -moz-text-size-adjust: @property;
+ text-size-adjust: @property;
+}
+
+// Reset padding and margin
+html,
+body,
+main {
+ padding: 0;
+ margin: 0;
+}
+
+html {
+ font-family: sans-serif;
+ font-size: 0.9em;
+ .text-size-adjust;
+
+ color: var(--color-base-font);
+ background-color: var(--color-base-background);
+
+ scroll-behavior: smooth;
+}
+
+body {
+ margin-inline: 1rem;
+}
+
+a {
+ text-decoration: none;
+ color: var(--color-url-font);
+
+ &:visited {
+ color: var(--color-url-visited-font);
+
+ .highlight {
+ color: var(--color-url-visited-font);
+ }
+ }
+}
diff --git a/searx/templates/simple/opensearch_response_rss.xml b/searx/templates/simple/opensearch_response_rss.xml
index 574f32e69..ab732aec2 100644
--- a/searx/templates/simple/opensearch_response_rss.xml
+++ b/searx/templates/simple/opensearch_response_rss.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet href="{{ url_for('static', filename='xsl/rss.xsl') }}" type="text/xsl"?>
+<?xml-stylesheet href="{{ url_for('rss_xsl') }}" type="text/xsl"?>
<rss version="2.0"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom">
diff --git a/searx/static/themes/simple/xsl/rss.xsl b/searx/templates/simple/rss.xsl
index 7de7f8037..a3b646ae3 100644
--- a/searx/static/themes/simple/xsl/rss.xsl
+++ b/searx/templates/simple/rss.xsl
@@ -8,6 +8,7 @@
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/rss.min.css') }}" type="text/css" media="screen"/>
</head>
<body>
<header>
diff --git a/searx/webapp.py b/searx/webapp.py
index 8158256e6..f7e7e1d5c 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -614,6 +614,14 @@ def client_token(token=None):
return Response('', mimetype='text/css')
+@app.route('/rss.xsl', methods=['GET', 'POST'])
+def rss_xsl():
+ return render_template(
+ f"{request.preferences.get_value('theme')}/rss.xsl",
+ url_for=custom_url_for,
+ )
+
+
@app.route('/search', methods=['GET', 'POST'])
def search():
"""Search query in q and return results.