Commit Graph

31 Commits (b1912607ae9783d6ccf648bd7706a64eca5bedb9)

Author SHA1 Message Date
Markus Heiser b1912607ae [mod] replace /help by /info pages and include pages in project docs
This patch implements a bolierplate to share content from info-pages of the
SearXNG instance (URL /info) with the project documentation (path /docs/user).

The info pages are using Markdown (CommonMark), to include them in the project
documentation (reST) the myst-parser [1] is used in the Sphinx-doc build chain.

If base_url is known (defined in settings.yml) links to the instance are also
inserted into the project documentation::

    searxng_extra/docs_prebuild

[1] https://www.sphinx-doc.org/en/master/usage/markdown.html

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Alexandre Flament 56e34947a6 [mod] infinite_scroll as preference
* oscar theme: code from searx/plugins/infinite_scroll.py
* simple theme: new implementation

Co-authored-by: Markus Heiser <markus.heiser@darmarIT.de>
2 years ago
Martin Fischer 91527fbd6b [enh] avoid /about redirect in template links 2 years ago
Martin Fischer 743353dd09 [simple] add aria-label to preferences link 2 years ago
Martin Fischer e7c0f4e877 [simple] link preferences on /about and /stats
We want to link the preferences from every page
(except of course the preferences page).
2 years ago
Martin Fischer 6f0ec7e58f [simple] introduce page_with_header.html template
Previously the preferences & stats templates contained the markup:

<a href="{{ url_for('index') }}"><h1><span>SearXNG</span></h1></a>

There are many things wrong with this:

1. the markup was duplicated

2. the CSS needed to be changed whenever a new page wanted to use this
   header (since the CSS used page-specific selectors)

3. h1 should be reserved for the actual page title
   (e.g. Preferences or Engine stats)

4. the image was set via CSS which also set:

       span { visibility: hidden; }

   which however removes the alternative text from the accessibility
   tree (meaning screen readers will ignore it).

This commit fixes all these problems.
2 years ago
Markus Heiser 944b73511a [enh] add SVG favicon href="favicon.svg" type="image/svg+xml"
Add link::

    <link rel="icon" href="favicon.png" sizes="any">
    <link rel="icon" href="favicon.svg" type="image/svg+xml">

Modern browsers should request::

    INFO  werkzeug   : 127.0.0.1 - - [28/Nov/2021 17:03:07] "GET /static/themes/simple/img/favicon.svg HTTP/1.1" 200 -

[1] https://github.com/audreyfeldroy/favicon-cheat-sheet#svg-file
[2] https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Alexandre Flament ec5a82fccd [enh] simple theme: add "simple-style" preferences 3 years ago
MrPaulBlack a80b5dc110 [fix] scaling of result page on small screens by @ZetaTom
* thanks to https://github.com/ZetaTom for the fix!
* set the width of the input#q element to 100% of the 1fr space of the grid layout
* change the viewport meta tag to th recommended value (see: https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag#viewport_basics)
* add a new @ultra-small-phone width of 20rem; when a device is smaller than that the search logo does not get displayed on the result page anymore
3 years ago
Alexandre Flament d1c09c84e2 [fix] simple theme: disable hotkeys when they are not enabled in the preferences 3 years ago
Alexandre Flament 988910d451 [fix] templates: lang attribute of html uses hyphen
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-lang
https://www.w3.org/TR/REC-xml/#sec-lang-tag
3 years ago
Alexandre Flament 74b0830362 SearXNG: simple theme 3 years ago
MrPaulBlack 48d4296caa [theme] link to engine stats in footer 3 years ago
Alexandre Flament 4b43775c91 version based on the git repository
This commit remove the need to update the brand for GIT_URL and GIT_BRANCH:
there are read from the git repository.

It is possible to call python -m searx.version freeze to freeze the current version.
Useful when the code is installed outside git (distro package, docker, etc...)
3 years ago
Markus Heiser 3f638ed196 [mod] drop usage of the searx.brand namespace (templates & /config)
In the templates and the /config (JSON) the usage of the 'brand.*' name
space is replaced by 'searx.get_setting' function.

- new_issue_url          --> get_setting('brand.new_issue_url')
- brand.GIT_URL          --> get_setting('brand.git_url')
- brand.PUBLIC_INSTANCES --> get_setting('brand.public_instances')
- brand.DOCS_URL         --> get_setting('brand.docs_url')
- brand.ISSUE_URL        --> get_setting('brand.issue_url')
- brand.CONTACT_URL      --> get_setting('general.contact_url', '')

The macro 'new_issue' from searx/templates/*/messages/no_results.html
is now imported with context::

    {% from '__common__/new_issue.html' import new_issue with context %}

To get *public instances URL* from context's 'get_setting()' function::

    get_setting('brand.public_instances','')

Macro's prototype does no longer need the 'new_issue_url' argument and has been
changed to::

    macro new_issue(engine_name, engine_reliability)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Alexandre Flament 04b34c70b8 More branding 3 years ago
Alexandre Flament 6553c79029 [mod] replace /translations.js by embedded JSON
In webapp.py, there is a new function "get_translations" lists available translations

Close #2064
3 years ago
Alexandre Flament 14c7cc0e11 [mod] Makefile: make CONTACT_URL optional 3 years ago
BBaoVanC 19fce74443
Add link to contact instance maintainer to footer of each page (#2391) 3 years ago
Alexandre Flament bfdad7bc0f [fix] opensearch.xml URL contains method and autocomplete parameters
When the user add searx as a search engine, the browser loads the /opensearch.xml URL without the cookies.
Without the query parameters, the user preferences are ignored (method and autocomplete).

In addition, opensearch.xml is modified to support automatic updates,
see https://developer.mozilla.org/en-US/docs/Web/OpenSearch
4 years ago
TheEvilSkeleton 925be22d8f
Replaced dash with em in searx description (#1973)
Very small change, but it looks better
4 years ago
Adam Tauber 4ca0d8cb0f [enh] add translatable strings to javascript - closes #461 4 years ago
Adam Tauber de1b08a941 [enh] add unique class for each endpoint - closes #1133 4 years ago
Markus Heiser 3381471933 brands: add ISSUE_URL
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 04c687403e [fix] brands: add variables from build env to jinja templating
We have some variables in the build environment which are also needed in the
templating process.  Theses variables are relavant if one creates a fork with
its own branding.  We treat these variables under the term 'brands'.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Dalf 88f9ac58f4 [mod] move public instance list to https://searx.space 4 years ago
Dalf 6fbba63c83 oscar and simple themes: no inline script (allow A+ Content-Security-Policy) 5 years ago
b_b 4ca7e68841
use instance_name for page title
related to #1025
5 years ago
Noémi Ványi e31409daf7 revert changin about to searx docs 7 years ago
Noémi Ványi 4f4dcdf38f add links to footers of oscar and simple themes
Links:
 * Source code
 * Issue tracker
 * List of public instances

Closes #1071
7 years ago
Alexandre Flament 10a24bdc2c [enh] add simple theme (WIP) 7 years ago