Compare commits
No commits in common. "master" and "translations" have entirely different histories.
master
...
translatio
11
.coveragerc
|
@ -1,11 +0,0 @@
|
||||||
[run]
|
|
||||||
branch = True
|
|
||||||
source = searx
|
|
||||||
|
|
||||||
[report]
|
|
||||||
show_missing = True
|
|
||||||
exclude_lines =
|
|
||||||
if __name__ == .__main__.:
|
|
||||||
|
|
||||||
[html]
|
|
||||||
directory = coverage
|
|
|
@ -1,4 +0,0 @@
|
||||||
FROM mcr.microsoft.com/devcontainers/base:debian
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -y install python3 python3-venv redis firefox-esr graphviz imagemagick librsvg2-bin fonts-dejavu shellcheck
|
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
"build": {
|
|
||||||
"dockerfile": "Dockerfile"
|
|
||||||
},
|
|
||||||
"features": {
|
|
||||||
"ghcr.io/devcontainers/features/github-cli": {},
|
|
||||||
"ghcr.io/devcontainers/features/docker-in-docker": {}
|
|
||||||
},
|
|
||||||
"customizations": {
|
|
||||||
"vscode": {
|
|
||||||
"extensions": [
|
|
||||||
"ms-python.python",
|
|
||||||
"ms-azuretools.vscode-docker"
|
|
||||||
],
|
|
||||||
"remote.otherPortsAttributes": {
|
|
||||||
"protocol": "https"
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"files.autoSave": "off",
|
|
||||||
"python.defaultInterpreterPath": "/workspaces/searxng/local/py3/bin/python3",
|
|
||||||
"python.formatting.blackPath": "/workspaces/searxng/local/py3/bin/black",
|
|
||||||
"python.linting.pylintPath": "/workspaces/searxng/local/py3/bin/pylint"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"forwardPorts": [8000, 8888],
|
|
||||||
"portsAttributes": {
|
|
||||||
"8000": {"label": "Sphinx documentation"},
|
|
||||||
"8888": {"label": "SearXNG"}
|
|
||||||
},
|
|
||||||
"postCreateCommand": "git pull && make install"
|
|
||||||
}
|
|
|
@ -1,163 +0,0 @@
|
||||||
;;; .dir-locals.el
|
|
||||||
;;
|
|
||||||
;; Per-Directory Local Variables:
|
|
||||||
;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
|
|
||||||
;;
|
|
||||||
;; For full fledge developer tools install emacs packages:
|
|
||||||
;;
|
|
||||||
;; M-x package-install ...
|
|
||||||
;;
|
|
||||||
;; magit gitconfig
|
|
||||||
;; nvm lsp-mode lsp-pyright lsp-eslint
|
|
||||||
;; pyvenv pylint pip-requirements
|
|
||||||
;; jinja2-mode
|
|
||||||
;; json-mode
|
|
||||||
;; company company-jedi company-quickhelp company-shell
|
|
||||||
;; realgud
|
|
||||||
;; sphinx-doc markdown-mode graphviz-dot-mode
|
|
||||||
;; apache-mode nginx-mode
|
|
||||||
;;
|
|
||||||
;; To setup a developer environment, build target::
|
|
||||||
;;
|
|
||||||
;; $ make node.env.dev pyenv.install
|
|
||||||
;;
|
|
||||||
;; Some buffer locals are referencing the project environment:
|
|
||||||
;;
|
|
||||||
;; - prj-root --> <repo>/
|
|
||||||
;; - nvm-dir --> <repo>/.nvm
|
|
||||||
;; - python-environment-directory --> <repo>/local
|
|
||||||
;; - python-environment-default-root-name --> py3
|
|
||||||
;; - python-shell-virtualenv-root --> <repo>/local/py3
|
|
||||||
;; When this variable is set with the path of the virtualenv to use,
|
|
||||||
;; `process-environment' and `exec-path' get proper values in order to run
|
|
||||||
;; shells inside the specified virtualenv, example::
|
|
||||||
;; (setq python-shell-virtualenv-root "/path/to/env/")
|
|
||||||
;; - python-shell-interpreter --> <repo>/local/py3/bin/python
|
|
||||||
;;
|
|
||||||
;; Python development:
|
|
||||||
;;
|
|
||||||
;; Jedi, flycheck & other python stuff should use the 'python-shell-interpreter'
|
|
||||||
;; from the local py3 environment.
|
|
||||||
;;
|
|
||||||
|
|
||||||
((nil
|
|
||||||
. ((fill-column . 80)
|
|
||||||
(indent-tabs-mode . nil)
|
|
||||||
(eval . (progn
|
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.html\\'" . jinja2-mode))
|
|
||||||
|
|
||||||
;; project root folder is where the `.dir-locals.el' is located
|
|
||||||
(setq-local prj-root
|
|
||||||
(locate-dominating-file default-directory ".dir-locals.el"))
|
|
||||||
|
|
||||||
(setq-local python-environment-directory
|
|
||||||
(expand-file-name "./local" prj-root))
|
|
||||||
|
|
||||||
;; to get in use of NVM environment, install https://github.com/rejeep/nvm.el
|
|
||||||
(setq-local nvm-dir (expand-file-name "./.nvm" prj-root))
|
|
||||||
|
|
||||||
;; use nodejs from the (local) NVM environment (see nvm-dir)
|
|
||||||
(nvm-use-for-buffer)
|
|
||||||
(ignore-errors (require 'lsp))
|
|
||||||
(setq-local lsp-server-install-dir (car (cdr nvm-current-version)))
|
|
||||||
(setq-local lsp-enable-file-watchers nil)
|
|
||||||
|
|
||||||
;; use 'py3' environment as default
|
|
||||||
(setq-local python-environment-default-root-name
|
|
||||||
"py3")
|
|
||||||
|
|
||||||
(setq-local python-shell-virtualenv-root
|
|
||||||
(expand-file-name
|
|
||||||
python-environment-default-root-name python-environment-directory))
|
|
||||||
|
|
||||||
(setq-local python-shell-interpreter
|
|
||||||
(expand-file-name
|
|
||||||
"bin/python" python-shell-virtualenv-root))))))
|
|
||||||
(makefile-gmake-mode
|
|
||||||
. ((indent-tabs-mode . t)))
|
|
||||||
|
|
||||||
(yaml-mode
|
|
||||||
. ((eval . (progn
|
|
||||||
|
|
||||||
;; flycheck should use the local py3 environment
|
|
||||||
(setq-local flycheck-yaml-yamllint-executable
|
|
||||||
(expand-file-name "bin/yamllint" python-shell-virtualenv-root))
|
|
||||||
|
|
||||||
(setq-local flycheck-yamllintrc
|
|
||||||
(expand-file-name ".yamllint.yml" prj-root))
|
|
||||||
|
|
||||||
(flycheck-checker . yaml-yamllint)))))
|
|
||||||
|
|
||||||
(json-mode
|
|
||||||
. ((eval . (progn
|
|
||||||
(setq-local js-indent-level 4)
|
|
||||||
(flycheck-checker . json-python-json)))))
|
|
||||||
|
|
||||||
(js-mode
|
|
||||||
. ((eval . (progn
|
|
||||||
(ignore-errors (require 'lsp-eslint))
|
|
||||||
(setq-local js-indent-level 2)
|
|
||||||
;; flycheck should use the eslint checker from developer tools
|
|
||||||
(setq-local flycheck-javascript-eslint-executable
|
|
||||||
(expand-file-name "node_modules/.bin/eslint" prj-root))
|
|
||||||
;; (flycheck-mode)
|
|
||||||
|
|
||||||
(if (featurep 'lsp-eslint)
|
|
||||||
(lsp))
|
|
||||||
))))
|
|
||||||
|
|
||||||
(python-mode
|
|
||||||
. ((eval . (progn
|
|
||||||
(ignore-errors (require 'jedi-core))
|
|
||||||
(ignore-errors (require 'lsp-pyright))
|
|
||||||
(ignore-errors (sphinx-doc-mode))
|
|
||||||
(setq-local python-environment-virtualenv
|
|
||||||
(list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
|
|
||||||
;;"--system-site-packages"
|
|
||||||
"--quiet"))
|
|
||||||
|
|
||||||
(setq-local pylint-command
|
|
||||||
(expand-file-name "bin/pylint" python-shell-virtualenv-root))
|
|
||||||
|
|
||||||
(if (featurep 'lsp-pyright)
|
|
||||||
(lsp))
|
|
||||||
|
|
||||||
;; pylint will find the '.pylintrc' file next to the CWD
|
|
||||||
;; https://pylint.readthedocs.io/en/latest/user_guide/run.html#command-line-options
|
|
||||||
(setq-local flycheck-pylintrc
|
|
||||||
".pylintrc")
|
|
||||||
|
|
||||||
;; flycheck & other python stuff should use the local py3 environment
|
|
||||||
(setq-local flycheck-python-pylint-executable
|
|
||||||
python-shell-interpreter)
|
|
||||||
|
|
||||||
;; use 'M-x jedi:show-setup-info' and 'M-x epc:controller' to inspect jedi server
|
|
||||||
;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-root -- You
|
|
||||||
;; can specify a full path instead of a name (relative path). In that case,
|
|
||||||
;; python-environment-directory is ignored and Python virtual environment
|
|
||||||
;; is created at the specified path.
|
|
||||||
(setq-local jedi:environment-root
|
|
||||||
python-shell-virtualenv-root)
|
|
||||||
|
|
||||||
;; https://tkf.github.io/emacs-jedi/latest/#jedi:server-command
|
|
||||||
(setq-local jedi:server-command
|
|
||||||
(list python-shell-interpreter
|
|
||||||
jedi:server-script))
|
|
||||||
|
|
||||||
;; jedi:environment-virtualenv --> see above 'python-environment-virtualenv'
|
|
||||||
;; is set buffer local! No need to setup jedi:environment-virtualenv:
|
|
||||||
;;
|
|
||||||
;; Virtualenv command to use. A list of string. If it is nil,
|
|
||||||
;; python-environment-virtualenv is used instead. You must set non-nil
|
|
||||||
;; value to jedi:environment-root in order to make this setting work.
|
|
||||||
;;
|
|
||||||
;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-virtualenv
|
|
||||||
;;
|
|
||||||
;; (setq-local jedi:environment-virtualenv
|
|
||||||
;; (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
|
|
||||||
;; "--python"
|
|
||||||
;; "/usr/bin/python3.4"
|
|
||||||
;; ))
|
|
||||||
))))
|
|
||||||
)
|
|
|
@ -1,44 +0,0 @@
|
||||||
*~
|
|
||||||
*/*~
|
|
||||||
*/*/*~
|
|
||||||
*/*/*/*~
|
|
||||||
*/*/*/*/*~
|
|
||||||
|
|
||||||
# Git
|
|
||||||
.git
|
|
||||||
.gitignore
|
|
||||||
|
|
||||||
# CI
|
|
||||||
.codeclimate.yml
|
|
||||||
.travis.yml
|
|
||||||
.taskcluster.yml
|
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
__pycache__/
|
|
||||||
*/__pycache__/
|
|
||||||
*/*/__pycache__/
|
|
||||||
*/*/*/__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*/*.py[cod]
|
|
||||||
*/*/*.py[cod]
|
|
||||||
*/*/*/*.py[cod]
|
|
||||||
|
|
||||||
# node_modules
|
|
||||||
node_modules/
|
|
||||||
*/node_modules/
|
|
||||||
*/*/node_modules/
|
|
||||||
*/*/*/node_modules/
|
|
||||||
*/*/*/*/node_modules/
|
|
||||||
|
|
||||||
.tx/
|
|
||||||
|
|
||||||
# to sync with .gitignore
|
|
||||||
geckodriver.log
|
|
||||||
.coverage
|
|
||||||
coverage/
|
|
||||||
cache/
|
|
||||||
build/
|
|
||||||
dist/
|
|
||||||
local/
|
|
||||||
gh-pages/
|
|
||||||
*.egg-info/
|
|
|
@ -1,49 +0,0 @@
|
||||||
# https://editorconfig.org/
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 4
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
|
|
||||||
[*.py]
|
|
||||||
max_line_length = 119
|
|
||||||
|
|
||||||
[*.html]
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
[*.css]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.less]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.js]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.json]
|
|
||||||
indent_size = 2
|
|
||||||
insert_final_newline = ignore
|
|
||||||
|
|
||||||
# Minified JavaScript files shouldn't be changed
|
|
||||||
[**.min.js]
|
|
||||||
indent_style = ignore
|
|
||||||
insert_final_newline = ignore
|
|
||||||
|
|
||||||
# Makefiles always use tabs for indentation
|
|
||||||
[Makefile]
|
|
||||||
indent_style = tab
|
|
||||||
|
|
||||||
# Batch files use tabs for indentation
|
|
||||||
[*.bat]
|
|
||||||
indent_style = tab
|
|
||||||
|
|
||||||
[docs/**.rst]
|
|
||||||
max_line_length = 79
|
|
||||||
|
|
||||||
[*.yml]
|
|
||||||
indent_size = 2
|
|
11
.gitattributes
vendored
|
@ -1,12 +1 @@
|
||||||
*.gif -diff
|
|
||||||
*.png -diff
|
|
||||||
*.min.css -diff
|
|
||||||
*.min.js -diff
|
|
||||||
*.css.map -diff
|
|
||||||
*.js.map -diff
|
|
||||||
*.eot -diff
|
|
||||||
*.svg -diff
|
|
||||||
*.ttf -diff
|
|
||||||
*.woff -diff
|
|
||||||
*.woff2 -diff
|
|
||||||
messages.mo -diff
|
messages.mo -diff
|
||||||
|
|
39
.github/ISSUE_TEMPLATE/bug-report.md
vendored
|
@ -1,39 +0,0 @@
|
||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Report a bug in SearXNG
|
|
||||||
title: ''
|
|
||||||
labels: bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SearXNG -->
|
|
||||||
|
|
||||||
**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**
|
|
||||||
<!-- If you are running on master branch using git execute this command
|
|
||||||
in order to fetch the latest commit ID:
|
|
||||||
```
|
|
||||||
git log -1
|
|
||||||
```
|
|
||||||
If you are using searxng-docker then look at the bottom of the SearXNG page
|
|
||||||
and check for the version after "Powered by SearXNG"
|
|
||||||
|
|
||||||
Please also stipulate if you are using a forked version of SearXNG and
|
|
||||||
include a link to the fork source code.
|
|
||||||
-->
|
|
||||||
**How did you install SearXNG?**
|
|
||||||
<!-- Did you install SearXNG using the official wiki or using searxng-docker
|
|
||||||
or manually by executing the searx/webapp.py file? -->
|
|
||||||
**What happened?**
|
|
||||||
<!-- A clear and concise description of what the bug is. -->
|
|
||||||
|
|
||||||
**How To Reproduce**
|
|
||||||
<!-- How can we reproduce this issue? (as minimally and as precisely as possible) -->
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
<!-- A clear and concise description of what you expected to happen. -->
|
|
||||||
|
|
||||||
**Screenshots & Logs**
|
|
||||||
<!-- If applicable, add screenshots, logs to help explain your problem. -->
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
<!-- Add any other context about the problem here. -->
|
|
5
.github/ISSUE_TEMPLATE/config.yml
vendored
|
@ -1,5 +0,0 @@
|
||||||
blank_issues_enabled: true
|
|
||||||
contact_links:
|
|
||||||
- name: Questions & Answers (Q&A)
|
|
||||||
url: https://github.com/searxng/searxng/discussions/categories/q-a
|
|
||||||
about: Ask questions and find answers
|
|
31
.github/ISSUE_TEMPLATE/engine-request.md
vendored
|
@ -1,31 +0,0 @@
|
||||||
---
|
|
||||||
name: Engine request
|
|
||||||
about: Request a new engine in SearXNG
|
|
||||||
title: ''
|
|
||||||
labels: enhancement, engine request
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SearXNG -->
|
|
||||||
|
|
||||||
**Working URL to the engine**
|
|
||||||
<!-- Please check if the engine is responding correctly before submitting it. -->
|
|
||||||
|
|
||||||
**Why do you want to add this engine?**
|
|
||||||
<!-- What's special about this engine? Is it open source or libre? -->
|
|
||||||
|
|
||||||
**Features of this engine**
|
|
||||||
<!-- Features of this engine: Doesn't track its users, fast, easy to integrate, ... -->
|
|
||||||
|
|
||||||
**How can SearXNG fetch the information from this engine?**
|
|
||||||
<!-- List API URL, example code (using the correct markdown) and more
|
|
||||||
that could be useful for the developers in order to implement this engine.
|
|
||||||
If you don't know what to write, let this part blank. -->
|
|
||||||
|
|
||||||
**Applicable category of this engine**
|
|
||||||
<!-- Where should this new engine fit in SearXNG? Current categories in SearXNG:
|
|
||||||
general, files, images, it, map, music, news, science, social media and videos.
|
|
||||||
You can add multiple categories at the same time. -->
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
<!-- Add any other context about this engine here. -->
|
|
21
.github/ISSUE_TEMPLATE/feature-request.md
vendored
|
@ -1,21 +0,0 @@
|
||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Request a new feature in SearXNG
|
|
||||||
title: ''
|
|
||||||
labels: enhancement
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SearXNG -->
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
<!-- A clear and concise description of what you want to happen. -->
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
<!-- Add any other context or screenshots about the feature request here. -->
|
|
52
.github/dependabot.yml
vendored
|
@ -1,52 +0,0 @@
|
||||||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: "pip"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
day: "friday"
|
|
||||||
open-pull-requests-limit: 5
|
|
||||||
target-branch: "master"
|
|
||||||
commit-message:
|
|
||||||
prefix: "[upd] pypi:"
|
|
||||||
groups:
|
|
||||||
minor:
|
|
||||||
applies-to: version-updates
|
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
|
||||||
directory: "/client/simple"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
day: "friday"
|
|
||||||
open-pull-requests-limit: 5
|
|
||||||
target-branch: "master"
|
|
||||||
commit-message:
|
|
||||||
prefix: "[upd] web-client (simple):"
|
|
||||||
groups:
|
|
||||||
minor:
|
|
||||||
applies-to: version-updates
|
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
|
|
||||||
- package-ecosystem: "docker"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
day: "friday"
|
|
||||||
target-branch: "master"
|
|
||||||
commit-message:
|
|
||||||
prefix: "[upd] docker:"
|
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
day: "friday"
|
|
||||||
target-branch: "master"
|
|
||||||
commit-message:
|
|
||||||
prefix: "[upd] github-actions:"
|
|
46
.github/workflows/checker.yml
vendored
|
@ -1,46 +0,0 @@
|
||||||
---
|
|
||||||
name: Checker
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 4 * * 5"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
PYTHON_VERSION: "3.13"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
search:
|
|
||||||
name: Search
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "${{ env.PYTHON_VERSION }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- name: Setup cache Python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
|
||||||
path: "./local"
|
|
||||||
|
|
||||||
- name: Setup venv
|
|
||||||
run: make V=1 install
|
|
||||||
|
|
||||||
- name: Search checker
|
|
||||||
run: make search.checker
|
|
36
.github/workflows/cleanup.yml
vendored
|
@ -1,36 +0,0 @@
|
||||||
---
|
|
||||||
name: Cleanup
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "4 4 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
container-cache:
|
|
||||||
# FIXME: On forks it fails with "Failed to fetch packages: missing field `id` at line 1 column 141"
|
|
||||||
if: github.repository_owner == 'searxng' || github.event_name == 'workflow_dispatch'
|
|
||||||
name: Container cache
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
permissions:
|
|
||||||
# Organization GHCR
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Prune
|
|
||||||
uses: snok/container-retention-policy@v3.0.0
|
|
||||||
with:
|
|
||||||
account: "${{ github.repository_owner }}"
|
|
||||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
image-names: "cache base"
|
|
||||||
image-tags: "!searxng*"
|
|
||||||
cut-off: "1d"
|
|
||||||
keep-n-most-recent: "100"
|
|
252
.github/workflows/container.yml
vendored
|
@ -1,252 +0,0 @@
|
||||||
---
|
|
||||||
name: Container
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
workflow_run:
|
|
||||||
workflows:
|
|
||||||
- Integration
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
# Organization GHCR
|
|
||||||
packages: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
PYTHON_VERSION: "3.13"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-base:
|
|
||||||
if: |
|
|
||||||
(github.repository_owner == 'searxng' && github.event.workflow_run.conclusion == 'success')
|
|
||||||
|| github.event_name == 'workflow_dispatch'
|
|
||||||
name: Build base
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
permissions:
|
|
||||||
# Organization GHCR
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- if: github.repository_owner == 'searxng'
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- if: github.repository_owner == 'searxng'
|
|
||||||
name: Get date
|
|
||||||
id: date
|
|
||||||
run: echo "date=$(date +'%Y%m%d')" >>$GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- if: github.repository_owner == 'searxng'
|
|
||||||
name: Check cache apko
|
|
||||||
id: cache-apko
|
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
|
||||||
# yamllint disable-line rule:line-length
|
|
||||||
key: "apko-${{ steps.date.outputs.date }}-${{ hashFiles('./container/base.yml', './container/base-builder.yml') }}"
|
|
||||||
path: "/tmp/.apko/"
|
|
||||||
lookup-only: true
|
|
||||||
|
|
||||||
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
|
|
||||||
name: Setup cache apko
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
# yamllint disable-line rule:line-length
|
|
||||||
key: "apko-${{ steps.date.outputs.date }}-${{ hashFiles('./container/base.yml', './container/base-builder.yml') }}"
|
|
||||||
restore-keys: "apko-${{ steps.date.outputs.date }}-"
|
|
||||||
path: "/tmp/.apko/"
|
|
||||||
|
|
||||||
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
|
|
||||||
name: Setup apko
|
|
||||||
run: |
|
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
|
||||||
brew install apko
|
|
||||||
|
|
||||||
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
|
|
||||||
name: Login to GHCR
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: "ghcr.io"
|
|
||||||
username: "${{ github.repository_owner }}"
|
|
||||||
password: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
|
|
||||||
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
|
|
||||||
name: Build
|
|
||||||
run: |
|
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
|
||||||
|
|
||||||
apko publish ./container/base.yml ghcr.io/${{ github.repository_owner }}/base:searxng \
|
|
||||||
--cache-dir=/tmp/.apko/ \
|
|
||||||
--sbom=false \
|
|
||||||
--vcs=false \
|
|
||||||
--log-level=debug
|
|
||||||
|
|
||||||
apko publish ./container/base-builder.yml ghcr.io/${{ github.repository_owner }}/base:searxng-builder \
|
|
||||||
--cache-dir=/tmp/.apko/ \
|
|
||||||
--sbom=false \
|
|
||||||
--vcs=false \
|
|
||||||
--log-level=debug
|
|
||||||
|
|
||||||
build:
|
|
||||||
if: github.repository_owner == 'searxng' || github.event_name == 'workflow_dispatch'
|
|
||||||
name: Build (${{ matrix.arch }})
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
needs: build-base
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- arch: amd64
|
|
||||||
os: ubuntu-24.04
|
|
||||||
emulation: false
|
|
||||||
- arch: arm64
|
|
||||||
os: ubuntu-24.04-arm
|
|
||||||
emulation: false
|
|
||||||
- arch: armv7
|
|
||||||
os: ubuntu-24.04-arm
|
|
||||||
emulation: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
# Organization GHCR
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
version_string: ${{ steps.build.outputs.version_string }}
|
|
||||||
version_tag: ${{ steps.build.outputs.version_tag }}
|
|
||||||
docker_tag: ${{ steps.build.outputs.docker_tag }}
|
|
||||||
git_url: ${{ steps.build.outputs.git_url }}
|
|
||||||
git_branch: ${{ steps.build.outputs.git_branch }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "${{ env.PYTHON_VERSION }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- name: Setup cache Python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
|
||||||
path: "./local/"
|
|
||||||
|
|
||||||
- name: Setup cache container mounts
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
# yamllint disable-line rule:line-length
|
|
||||||
key: "container-mounts-${{ matrix.arch }}-${{ hashFiles('./container/Dockerfile', './container/legacy/Dockerfile') }}"
|
|
||||||
restore-keys: "container-mounts-${{ matrix.arch }}-"
|
|
||||||
path: |
|
|
||||||
/var/tmp/buildah-cache/
|
|
||||||
/var/tmp/buildah-cache-*/
|
|
||||||
|
|
||||||
- if: ${{ matrix.emulation }}
|
|
||||||
name: Setup QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: "ghcr.io"
|
|
||||||
username: "${{ github.repository_owner }}"
|
|
||||||
password: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
id: build
|
|
||||||
env:
|
|
||||||
OVERRIDE_ARCH: "${{ matrix.arch }}"
|
|
||||||
run: make podman.build
|
|
||||||
|
|
||||||
test:
|
|
||||||
name: Test (${{ matrix.arch }})
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
needs: build
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- arch: amd64
|
|
||||||
os: ubuntu-24.04
|
|
||||||
emulation: false
|
|
||||||
- arch: arm64
|
|
||||||
os: ubuntu-24.04-arm
|
|
||||||
emulation: false
|
|
||||||
- arch: armv7
|
|
||||||
os: ubuntu-24.04-arm
|
|
||||||
emulation: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- if: ${{ matrix.emulation }}
|
|
||||||
name: Setup QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: "ghcr.io"
|
|
||||||
username: "${{ github.repository_owner }}"
|
|
||||||
password: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
env:
|
|
||||||
OVERRIDE_ARCH: "${{ matrix.arch }}"
|
|
||||||
GIT_URL: "${{ needs.build.outputs.git_url }}"
|
|
||||||
run: make container.test
|
|
||||||
|
|
||||||
release:
|
|
||||||
if: github.repository_owner == 'searxng' && github.ref_name == 'master'
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
# Organization GHCR
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: "ghcr.io"
|
|
||||||
username: "${{ github.repository_owner }}"
|
|
||||||
password: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: "docker.io"
|
|
||||||
username: "${{ secrets.DOCKERHUB_USERNAME }}"
|
|
||||||
password: "${{ secrets.DOCKERHUB_TOKEN }}"
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
env:
|
|
||||||
GIT_URL: "${{ needs.build.outputs.git_url }}"
|
|
||||||
DOCKER_TAG: "${{ needs.build.outputs.docker_tag }}"
|
|
||||||
run: make container.push
|
|
85
.github/workflows/data-update.yml
vendored
|
@ -1,85 +0,0 @@
|
||||||
---
|
|
||||||
name: Update searx.data
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "59 23 28 * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
PYTHON_VERSION: "3.13"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
data:
|
|
||||||
if: github.repository_owner == 'searxng'
|
|
||||||
name: ${{ matrix.fetch }}
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
fetch:
|
|
||||||
- update_ahmia_blacklist.py
|
|
||||||
- update_currencies.py
|
|
||||||
- update_external_bangs.py
|
|
||||||
- update_firefox_version.py
|
|
||||||
- update_engine_traits.py
|
|
||||||
- update_wikidata_units.py
|
|
||||||
- update_engine_descriptions.py
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "${{ env.PYTHON_VERSION }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- name: Setup cache Python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
|
||||||
path: "./local/"
|
|
||||||
|
|
||||||
- name: Setup venv
|
|
||||||
run: make V=1 install
|
|
||||||
|
|
||||||
- name: Fetch data
|
|
||||||
run: V=1 ./manage pyenv.cmd python "./searxng_extra/update/${{ matrix.fetch }}"
|
|
||||||
|
|
||||||
- name: Create PR
|
|
||||||
id: cpr
|
|
||||||
uses: peter-evans/create-pull-request@v7
|
|
||||||
with:
|
|
||||||
author: "searxng-bot <searxng-bot@users.noreply.github.com>"
|
|
||||||
committer: "searxng-bot <searxng-bot@users.noreply.github.com>"
|
|
||||||
title: "[data] update searx.data - ${{ matrix.fetch }}"
|
|
||||||
commit-message: "[data] update searx.data - ${{ matrix.fetch }}"
|
|
||||||
branch: "update_data_${{ matrix.fetch }}"
|
|
||||||
delete-branch: "true"
|
|
||||||
draft: "false"
|
|
||||||
signoff: "false"
|
|
||||||
body: |
|
|
||||||
[data] update searx.data - ${{ matrix.fetch }}
|
|
||||||
labels: |
|
|
||||||
data
|
|
||||||
|
|
||||||
- name: Display information
|
|
||||||
run: |
|
|
||||||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
|
||||||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
|
66
.github/workflows/documentation.yml
vendored
|
@ -1,66 +0,0 @@
|
||||||
---
|
|
||||||
name: Documentation
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
PYTHON_VERSION: "3.13"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
permissions:
|
|
||||||
# for JamesIves/github-pages-deploy-action to push
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "${{ env.PYTHON_VERSION }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
fetch-depth: "0"
|
|
||||||
|
|
||||||
- name: Setup cache Python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
|
||||||
path: "./local/"
|
|
||||||
|
|
||||||
- name: Setup venv
|
|
||||||
run: make V=1 install
|
|
||||||
|
|
||||||
- name: Build documentation
|
|
||||||
run: make V=1 docs.clean docs.html
|
|
||||||
|
|
||||||
- if: github.ref_name == 'master'
|
|
||||||
name: Release
|
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
|
||||||
with:
|
|
||||||
folder: "dist/docs"
|
|
||||||
branch: "gh-pages"
|
|
||||||
commit-message: "[doc] build from commit ${{ github.sha }}"
|
|
||||||
# Automatically remove deleted files from the deploy branch
|
|
||||||
clean: "true"
|
|
||||||
single-commit: "true"
|
|
96
.github/workflows/integration.yml
vendored
|
@ -1,96 +0,0 @@
|
||||||
---
|
|
||||||
name: Integration
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref_name }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
PYTHON_VERSION: "3.13"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: Python ${{ matrix.python-version }}
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version:
|
|
||||||
- "3.9"
|
|
||||||
- "3.10"
|
|
||||||
- "3.11"
|
|
||||||
- "3.12"
|
|
||||||
- "3.13"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "${{ matrix.python-version }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- name: Setup cache Python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "python-${{ matrix.python-version }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
|
||||||
restore-keys: "python-${{ matrix.python-version }}-${{ runner.arch }}-"
|
|
||||||
path: "./local/"
|
|
||||||
|
|
||||||
- name: Setup venv
|
|
||||||
run: make V=1 install
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: make V=1 ci.test
|
|
||||||
|
|
||||||
theme:
|
|
||||||
name: Theme
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "${{ env.PYTHON_VERSION }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: "./.nvmrc"
|
|
||||||
|
|
||||||
- name: Setup cache Node.js
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "nodejs-${{ runner.arch }}-${{ hashFiles('./.nvmrc', './package.json') }}"
|
|
||||||
path: "./client/simple/node_modules/"
|
|
||||||
|
|
||||||
- name: Setup cache Python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
|
||||||
path: "./local/"
|
|
||||||
|
|
||||||
- name: Setup venv
|
|
||||||
run: make V=1 install
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: make themes.all
|
|
138
.github/workflows/l10n.yml
vendored
|
@ -1,138 +0,0 @@
|
||||||
---
|
|
||||||
name: Translation
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
workflow_run:
|
|
||||||
workflows:
|
|
||||||
- Integration
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
schedule:
|
|
||||||
- cron: "05 07 * * 5"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
PYTHON_VERSION: "3.13"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update:
|
|
||||||
if: github.repository_owner == 'searxng' && github.event.workflow_run.conclusion == 'success'
|
|
||||||
name: Update
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
permissions:
|
|
||||||
# For "make V=1 weblate.push.translations"
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "${{ env.PYTHON_VERSION }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
|
|
||||||
fetch-depth: "0"
|
|
||||||
|
|
||||||
- name: Setup cache Python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
|
||||||
path: "./local/"
|
|
||||||
|
|
||||||
- name: Setup venv
|
|
||||||
run: make V=1 install
|
|
||||||
|
|
||||||
- name: Setup Weblate
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.config
|
|
||||||
echo "${{ secrets.WEBLATE_CONFIG }}" > ~/.config/weblate
|
|
||||||
|
|
||||||
- name: Setup Git
|
|
||||||
run: |
|
|
||||||
git config --global user.email "searxng-bot@users.noreply.github.com"
|
|
||||||
git config --global user.name "searxng-bot"
|
|
||||||
|
|
||||||
- name: Update translations
|
|
||||||
run: make V=1 weblate.push.translations
|
|
||||||
|
|
||||||
pr:
|
|
||||||
if: |
|
|
||||||
github.repository_owner == 'searxng'
|
|
||||||
&& (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
|
|
||||||
name: Pull Request
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
permissions:
|
|
||||||
# For "make V=1 weblate.translations.commit"
|
|
||||||
contents: write
|
|
||||||
# For action "peter-evans/create-pull-request"
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "${{ env.PYTHON_VERSION }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
|
|
||||||
fetch-depth: "0"
|
|
||||||
|
|
||||||
- name: Setup cache Python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
|
||||||
path: "./local/"
|
|
||||||
|
|
||||||
- name: Setup venv
|
|
||||||
run: make V=1 install
|
|
||||||
|
|
||||||
- name: Setup Weblate
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.config
|
|
||||||
echo "${{ secrets.WEBLATE_CONFIG }}" > ~/.config/weblate
|
|
||||||
|
|
||||||
- name: Setup Git
|
|
||||||
run: |
|
|
||||||
git config --global user.email "searxng-bot@users.noreply.github.com"
|
|
||||||
git config --global user.name "searxng-bot"
|
|
||||||
|
|
||||||
- name: Merge and push translation updates
|
|
||||||
run: make V=1 weblate.translations.commit
|
|
||||||
|
|
||||||
- name: Create PR
|
|
||||||
id: cpr
|
|
||||||
uses: peter-evans/create-pull-request@v7
|
|
||||||
with:
|
|
||||||
author: "searxng-bot <searxng-bot@users.noreply.github.com>"
|
|
||||||
committer: "searxng-bot <searxng-bot@users.noreply.github.com>"
|
|
||||||
title: "[l10n] update translations from Weblate"
|
|
||||||
commit-message: "[l10n] update translations from Weblate"
|
|
||||||
branch: "translations_update"
|
|
||||||
delete-branch: "true"
|
|
||||||
draft: "false"
|
|
||||||
signoff: "false"
|
|
||||||
body: |
|
|
||||||
[l10n] update translations from Weblate
|
|
||||||
labels: |
|
|
||||||
translation
|
|
||||||
|
|
||||||
- name: Display information
|
|
||||||
run: |
|
|
||||||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
|
||||||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
|
44
.github/workflows/security.yml
vendored
|
@ -1,44 +0,0 @@
|
||||||
---
|
|
||||||
name: Security
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "42 05 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
container:
|
|
||||||
if: github.repository_owner == 'searxng'
|
|
||||||
name: Container
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
permissions:
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: "false"
|
|
||||||
|
|
||||||
- name: Run Trivy scanner
|
|
||||||
uses: aquasecurity/trivy-action@0.30.0
|
|
||||||
with:
|
|
||||||
image-ref: "ghcr.io/searxng/searxng:latest"
|
|
||||||
vuln-type: "os,library"
|
|
||||||
severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
|
|
||||||
ignore-unfixed: "false"
|
|
||||||
format: "sarif"
|
|
||||||
output: "./trivy-results.sarif"
|
|
||||||
|
|
||||||
- name: Upload SARIFs
|
|
||||||
uses: github/codeql-action/upload-sarif@v3
|
|
||||||
with:
|
|
||||||
sarif_file: "./trivy-results.sarif"
|
|
29
.gitignore
vendored
|
@ -1,28 +1 @@
|
||||||
# to sync with .dockerignore & pyrightconfig.json
|
messages.mo
|
||||||
|
|
||||||
*.pyc
|
|
||||||
*/*.pyc
|
|
||||||
*~
|
|
||||||
*.swp
|
|
||||||
geckodriver.log
|
|
||||||
|
|
||||||
.coverage
|
|
||||||
coverage/
|
|
||||||
|
|
||||||
.nvm/
|
|
||||||
cache/
|
|
||||||
build/
|
|
||||||
dist/
|
|
||||||
local/
|
|
||||||
gh-pages/
|
|
||||||
*.egg-info/
|
|
||||||
|
|
||||||
/package-lock.json
|
|
||||||
/node_modules/
|
|
||||||
|
|
||||||
.idea/
|
|
||||||
|
|
||||||
searx/version_frozen.py
|
|
||||||
.dir-locals.el
|
|
||||||
|
|
||||||
.python-version
|
|
||||||
|
|
1
.nvmrc
|
@ -1 +0,0 @@
|
||||||
v23.5
|
|
408
.pylintrc
|
@ -1,408 +0,0 @@
|
||||||
# -*- coding: utf-8; mode: conf-unix -*-
|
|
||||||
# lint Python modules using external checkers.
|
|
||||||
#
|
|
||||||
# This is the main checker controlling the other ones and the reports
|
|
||||||
# generation. It is itself both a raw checker and an astng checker in order
|
|
||||||
# to:
|
|
||||||
# * handle message activation / deactivation at the module level
|
|
||||||
# * handle some basic but necessary stats'data (number of classes, methods...)
|
|
||||||
#
|
|
||||||
[MASTER]
|
|
||||||
|
|
||||||
# A comma-separated list of package or module names from where C extensions may
|
|
||||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
|
||||||
# run arbitrary code
|
|
||||||
extension-pkg-whitelist=lxml.etree
|
|
||||||
|
|
||||||
# Add files or directories to the blacklist. They should be base names, not
|
|
||||||
# paths.
|
|
||||||
ignore=CVS, .git, .svn
|
|
||||||
|
|
||||||
# Add files or directories matching the regex patterns to the blacklist. The
|
|
||||||
# regex matches against base names, not paths.
|
|
||||||
ignore-patterns=
|
|
||||||
|
|
||||||
# Python code to execute, usually for sys.path manipulation such as
|
|
||||||
# pygtk.require().
|
|
||||||
#init-hook=
|
|
||||||
|
|
||||||
# Use multiple processes to speed up Pylint.
|
|
||||||
jobs=0
|
|
||||||
|
|
||||||
# List of plugins (as comma separated values of python modules names) to load,
|
|
||||||
# usually to register additional checkers.
|
|
||||||
load-plugins=
|
|
||||||
|
|
||||||
# Pickle collected data for later comparisons.
|
|
||||||
persistent=yes
|
|
||||||
|
|
||||||
# Specify a configuration file.
|
|
||||||
#rcfile=
|
|
||||||
|
|
||||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
|
||||||
# active Python interpreter and may run arbitrary code.
|
|
||||||
unsafe-load-any-extension=no
|
|
||||||
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
|
||||||
|
|
||||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
|
||||||
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
|
|
||||||
confidence=
|
|
||||||
|
|
||||||
# Disable the message, report, category or checker with the given id(s). You
|
|
||||||
# can either give multiple identifiers separated by comma (,) or put this
|
|
||||||
# option multiple times (only on the command line, not in the configuration
|
|
||||||
# file where it should appear only once).You can also use "--disable=all" to
|
|
||||||
# disable everything first and then reenable specific checks. For example, if
|
|
||||||
# you want to run only the similarities checker, you can use "--disable=all
|
|
||||||
# --enable=similarities". If you want to run only the classes checker, but have
|
|
||||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
|
||||||
# --disable=W"
|
|
||||||
disable=duplicate-code,
|
|
||||||
missing-function-docstring,
|
|
||||||
consider-using-f-string,
|
|
||||||
|
|
||||||
# Enable the message, report, category or checker with the given id(s). You can
|
|
||||||
# either give multiple identifier separated by comma (,) or put this option
|
|
||||||
# multiple time (only on the command line, not in the configuration file where
|
|
||||||
# it should appear only once). See also the "--disable" option for examples.
|
|
||||||
enable=
|
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
|
||||||
|
|
||||||
# Python expression which should return a note less than 10 (10 is the highest
|
|
||||||
# note). You have access to the variables errors warning, statement which
|
|
||||||
# respectively contain the number of errors / warnings messages and the total
|
|
||||||
# number of statements analyzed. This is used by the global evaluation report
|
|
||||||
# (RP0004).
|
|
||||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
|
||||||
|
|
||||||
# Template used to display messages. This is a python new-style format string
|
|
||||||
# used to format the message information. See doc for all details
|
|
||||||
|
|
||||||
# HINT: do not set this here, use argument --msg-template=...
|
|
||||||
#msg-template={path}:{line}: [{msg_id}({symbol}),{obj}] {msg}
|
|
||||||
|
|
||||||
# Set the output format. Available formats are text, parseable, colorized, json
|
|
||||||
# and msvs (visual studio).You can also give a reporter class, eg
|
|
||||||
# mypackage.mymodule.MyReporterClass.
|
|
||||||
|
|
||||||
# HINT: do not set this here, use argument --output-format=...
|
|
||||||
#output-format=text
|
|
||||||
|
|
||||||
# Tells whether to display a full report or only the messages
|
|
||||||
reports=no
|
|
||||||
|
|
||||||
# Activate the evaluation score.
|
|
||||||
score=yes
|
|
||||||
|
|
||||||
|
|
||||||
[REFACTORING]
|
|
||||||
|
|
||||||
# Maximum number of nested blocks for function / method body
|
|
||||||
max-nested-blocks=5
|
|
||||||
|
|
||||||
|
|
||||||
[BASIC]
|
|
||||||
|
|
||||||
# Regular expression matching correct argument names
|
|
||||||
argument-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
|
|
||||||
|
|
||||||
# Regular expression matching correct attribute names
|
|
||||||
attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*)|([A-Z0-9_]*))$
|
|
||||||
|
|
||||||
# Bad variable names which should always be refused, separated by a comma
|
|
||||||
bad-names=foo,bar,baz,toto,tutu,tata
|
|
||||||
|
|
||||||
# Regular expression matching correct class attribute names
|
|
||||||
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
|
||||||
|
|
||||||
# Regular expression matching correct class names
|
|
||||||
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
|
||||||
|
|
||||||
# Regular expression matching correct constant names
|
|
||||||
const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
|
|
||||||
#const-rgx=[f]?[A-Z_][a-zA-Z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Minimum line length for functions/classes that require docstrings, shorter
|
|
||||||
# ones are exempt.
|
|
||||||
docstring-min-length=-1
|
|
||||||
|
|
||||||
# Regular expression matching correct function names
|
|
||||||
function-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
|
|
||||||
|
|
||||||
# Good variable names which should always be accepted, separated by a comma
|
|
||||||
good-names=i,j,k,ex,Run,_,log,cfg,id
|
|
||||||
|
|
||||||
# Include a hint for the correct naming format with invalid-name
|
|
||||||
include-naming-hint=no
|
|
||||||
|
|
||||||
# Regular expression matching correct inline iteration names
|
|
||||||
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
|
||||||
|
|
||||||
# Regular expression matching correct method names
|
|
||||||
method-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$
|
|
||||||
|
|
||||||
# Regular expression matching correct module names
|
|
||||||
#module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
|
||||||
module-rgx=([a-z_][a-z0-9_]*)$
|
|
||||||
|
|
||||||
# Colon-delimited sets of names that determine each other's naming style when
|
|
||||||
# the name regexes allow several styles.
|
|
||||||
name-group=
|
|
||||||
|
|
||||||
# Regular expression which should only match function or class names that do
|
|
||||||
# not require a docstring.
|
|
||||||
no-docstring-rgx=^_
|
|
||||||
|
|
||||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
|
||||||
# to this list to register other decorators that produce valid properties.
|
|
||||||
property-classes=abc.abstractproperty
|
|
||||||
|
|
||||||
# Regular expression matching correct variable names
|
|
||||||
variable-rgx=(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*)|([a-z]))$
|
|
||||||
|
|
||||||
|
|
||||||
[FORMAT]
|
|
||||||
|
|
||||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
|
||||||
expected-line-ending-format=
|
|
||||||
|
|
||||||
# Regexp for a line that is allowed to be longer than the limit.
|
|
||||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
|
||||||
|
|
||||||
# Number of spaces of indent required inside a hanging or continued line.
|
|
||||||
indent-after-paren=4
|
|
||||||
|
|
||||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
|
||||||
# tab).
|
|
||||||
indent-string=' '
|
|
||||||
|
|
||||||
# Maximum number of characters on a single line.
|
|
||||||
max-line-length=120
|
|
||||||
|
|
||||||
# Maximum number of lines in a module
|
|
||||||
max-module-lines=2000
|
|
||||||
|
|
||||||
# Allow the body of a class to be on the same line as the declaration if body
|
|
||||||
# contains single statement.No config file found, using default configuration
|
|
||||||
|
|
||||||
single-line-class-stmt=no
|
|
||||||
|
|
||||||
# Allow the body of an if to be on the same line as the test if there is no
|
|
||||||
# else.
|
|
||||||
single-line-if-stmt=no
|
|
||||||
|
|
||||||
|
|
||||||
[LOGGING]
|
|
||||||
|
|
||||||
# Logging modules to check that the string format arguments are in logging
|
|
||||||
# function parameter format
|
|
||||||
logging-modules=logging
|
|
||||||
|
|
||||||
|
|
||||||
[MISCELLANEOUS]
|
|
||||||
|
|
||||||
# List of note tags to take in consideration, separated by a comma.
|
|
||||||
notes=FIXME,XXX,TODO
|
|
||||||
|
|
||||||
|
|
||||||
[SIMILARITIES]
|
|
||||||
|
|
||||||
# Ignore comments when computing similarities.
|
|
||||||
ignore-comments=yes
|
|
||||||
|
|
||||||
# Ignore docstrings when computing similarities.
|
|
||||||
ignore-docstrings=yes
|
|
||||||
|
|
||||||
# Ignore imports when computing similarities.
|
|
||||||
ignore-imports=no
|
|
||||||
|
|
||||||
# Minimum lines number of a similarity.
|
|
||||||
min-similarity-lines=4
|
|
||||||
|
|
||||||
|
|
||||||
[SPELLING]
|
|
||||||
|
|
||||||
# Spelling dictionary name. Available dictionaries: none. To make it working
|
|
||||||
# install python-enchant package.
|
|
||||||
spelling-dict=
|
|
||||||
|
|
||||||
# List of comma separated words that should not be checked.
|
|
||||||
spelling-ignore-words=
|
|
||||||
|
|
||||||
# A path to a file that contains private dictionary; one word per line.
|
|
||||||
spelling-private-dict-file=
|
|
||||||
|
|
||||||
# Tells whether to store unknown words to indicated private dictionary in
|
|
||||||
# --spelling-private-dict-file option instead of raising a message.
|
|
||||||
spelling-store-unknown-words=no
|
|
||||||
|
|
||||||
|
|
||||||
[TYPECHECK]
|
|
||||||
|
|
||||||
# List of decorators that produce context managers, such as
|
|
||||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
|
||||||
# produce valid context managers.
|
|
||||||
contextmanager-decorators=contextlib.contextmanager
|
|
||||||
|
|
||||||
# List of members which are set dynamically and missed by pylint inference
|
|
||||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
|
||||||
# expressions are accepted.
|
|
||||||
generated-members=
|
|
||||||
|
|
||||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
|
||||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
|
||||||
ignore-mixin-members=yes
|
|
||||||
|
|
||||||
# This flag controls whether pylint should warn about no-member and similar
|
|
||||||
# checks whenever an opaque object is returned when inferring. The inference
|
|
||||||
# can return multiple potential results while evaluating a Python object, but
|
|
||||||
# some branches might not be evaluated, which results in partial inference. In
|
|
||||||
# that case, it might be useful to still emit no-member and other checks for
|
|
||||||
# the rest of the inferred objects.
|
|
||||||
ignore-on-opaque-inference=yes
|
|
||||||
|
|
||||||
# List of class names for which member attributes should not be checked (useful
|
|
||||||
# for classes with dynamically set attributes). This supports the use of
|
|
||||||
# qualified names.
|
|
||||||
ignored-classes=optparse.Values,thread._local,_thread._local
|
|
||||||
|
|
||||||
# List of module names for which member attributes should not be checked
|
|
||||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
|
||||||
# and thus existing member attributes cannot be deduced by static analysis. It
|
|
||||||
# supports qualified module names, as well as Unix pattern matching.
|
|
||||||
ignored-modules=
|
|
||||||
|
|
||||||
# Show a hint with possible names when a member name was not found. The aspect
|
|
||||||
# of finding the hint is based on edit distance.
|
|
||||||
missing-member-hint=yes
|
|
||||||
|
|
||||||
# The minimum edit distance a name should have in order to be considered a
|
|
||||||
# similar match for a missing member name.
|
|
||||||
missing-member-hint-distance=1
|
|
||||||
|
|
||||||
# The total number of similar names that should be taken in consideration when
|
|
||||||
# showing a hint for a missing member.
|
|
||||||
missing-member-max-choices=1
|
|
||||||
|
|
||||||
|
|
||||||
[VARIABLES]
|
|
||||||
|
|
||||||
# List of additional names supposed to be defined in builtins. Remember that
|
|
||||||
# you should avoid to define new builtins when possible.
|
|
||||||
additional-builtins=
|
|
||||||
|
|
||||||
# Tells whether unused global variables should be treated as a violation.
|
|
||||||
allow-global-unused-variables=yes
|
|
||||||
|
|
||||||
# List of strings which can identify a callback function by name. A callback
|
|
||||||
# name must start or end with one of those strings.
|
|
||||||
callbacks=cb_,_cb
|
|
||||||
|
|
||||||
# A regular expression matching the name of dummy variables (i.e. expectedly
|
|
||||||
# not used).
|
|
||||||
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
|
||||||
|
|
||||||
# Argument names that match this expression will be ignored. Default to name
|
|
||||||
# with leading underscore
|
|
||||||
ignored-argument-names=_.*|^ignored_|^unused_
|
|
||||||
|
|
||||||
# Tells whether we should check for unused import in __init__ files.
|
|
||||||
init-import=no
|
|
||||||
|
|
||||||
# List of qualified module names which can have objects that can redefine
|
|
||||||
# builtins.
|
|
||||||
redefining-builtins-modules=six.moves,future.builtins
|
|
||||||
|
|
||||||
|
|
||||||
[CLASSES]
|
|
||||||
|
|
||||||
# List of method names used to declare (i.e. assign) instance attributes.
|
|
||||||
defining-attr-methods=__init__,__new__,setUp
|
|
||||||
|
|
||||||
# List of member names, which should be excluded from the protected access
|
|
||||||
# warning.
|
|
||||||
exclude-protected=_asdict,_fields,_replace,_source,_make
|
|
||||||
|
|
||||||
# List of valid names for the first argument in a class method.
|
|
||||||
valid-classmethod-first-arg=cls
|
|
||||||
|
|
||||||
# List of valid names for the first argument in a metaclass class method.
|
|
||||||
valid-metaclass-classmethod-first-arg=mcs
|
|
||||||
|
|
||||||
|
|
||||||
[DESIGN]
|
|
||||||
|
|
||||||
# Maximum number of arguments for function / method
|
|
||||||
max-args=8
|
|
||||||
max-positional-arguments=14
|
|
||||||
|
|
||||||
# Maximum number of attributes for a class (see R0902).
|
|
||||||
max-attributes=20
|
|
||||||
|
|
||||||
# Maximum number of boolean expressions in a if statement
|
|
||||||
max-bool-expr=5
|
|
||||||
|
|
||||||
# Maximum number of branch for function / method body
|
|
||||||
max-branches=12
|
|
||||||
|
|
||||||
# Maximum number of locals for function / method body
|
|
||||||
max-locals=20
|
|
||||||
|
|
||||||
# Maximum number of parents for a class (see R0901).
|
|
||||||
max-parents=7
|
|
||||||
|
|
||||||
# Maximum number of public methods for a class (see R0904).
|
|
||||||
max-public-methods=20
|
|
||||||
|
|
||||||
# Maximum number of return / yield for function / method body
|
|
||||||
max-returns=6
|
|
||||||
|
|
||||||
# Maximum number of statements in function / method body
|
|
||||||
max-statements=50
|
|
||||||
|
|
||||||
# Minimum number of public methods for a class (see R0903).
|
|
||||||
min-public-methods=2
|
|
||||||
|
|
||||||
|
|
||||||
[IMPORTS]
|
|
||||||
|
|
||||||
# Allow wildcard imports from modules that define __all__.
|
|
||||||
allow-wildcard-with-all=no
|
|
||||||
|
|
||||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
|
||||||
# 3 compatible code, which means that the block might have code that exists
|
|
||||||
# only in one or another interpreter, leading to false positives when analysed.
|
|
||||||
analyse-fallback-blocks=no
|
|
||||||
|
|
||||||
# Deprecated modules which should not be used, separated by a comma
|
|
||||||
deprecated-modules=optparse,tkinter.tix
|
|
||||||
|
|
||||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
|
||||||
# not be disabled)
|
|
||||||
ext-import-graph=
|
|
||||||
|
|
||||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
|
||||||
# given file (report RP0402 must not be disabled)
|
|
||||||
import-graph=
|
|
||||||
|
|
||||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
|
||||||
# not be disabled)
|
|
||||||
int-import-graph=
|
|
||||||
|
|
||||||
# Force import order to recognize a module as part of the standard
|
|
||||||
# compatibility libraries.
|
|
||||||
known-standard-library=
|
|
||||||
|
|
||||||
# Force import order to recognize a module as part of a third party library.
|
|
||||||
known-third-party=enchant
|
|
||||||
|
|
||||||
|
|
||||||
[EXCEPTIONS]
|
|
||||||
|
|
||||||
# Exceptions that will emit a warning when being caught. Defaults to
|
|
||||||
# "Exception"
|
|
||||||
overgeneral-exceptions=builtins.Exception
|
|
|
@ -1,4 +0,0 @@
|
||||||
nodejs 23.5.0
|
|
||||||
python 3.13.1
|
|
||||||
shellcheck 0.10.0
|
|
||||||
sqlite 3.47.2
|
|
23
.vscode/launch.json
vendored
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
// See https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "SearXNG",
|
|
||||||
"type": "python",
|
|
||||||
"request": "launch",
|
|
||||||
"module": "searx.webapp",
|
|
||||||
"env": {
|
|
||||||
"FLASK_APP": "webapp",
|
|
||||||
"FLASK_DEBUG": "1",
|
|
||||||
"SEARXNG_DEBUG": "1",
|
|
||||||
},
|
|
||||||
"args": [
|
|
||||||
"run"
|
|
||||||
],
|
|
||||||
"jinja": true,
|
|
||||||
"justMyCode": true,
|
|
||||||
"python": "${workspaceFolder}/local/py3/bin/python",
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
11
.vscode/settings.json
vendored
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"python.testing.unittestArgs": [
|
|
||||||
"-v",
|
|
||||||
"-s",
|
|
||||||
"./tests",
|
|
||||||
"-p",
|
|
||||||
"test_*.py"
|
|
||||||
],
|
|
||||||
"python.testing.pytestEnabled": false,
|
|
||||||
"python.testing.unittestEnabled": true,
|
|
||||||
}
|
|
36
.vscode/tasks.json
vendored
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
||||||
// for the documentation about the tasks.json format
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "make run",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "make run",
|
|
||||||
"problemMatcher": [],
|
|
||||||
"isBackground": true,
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated"
|
|
||||||
},
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "make docs.live",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "make docs.live",
|
|
||||||
"problemMatcher": [],
|
|
||||||
"isBackground": true,
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated"
|
|
||||||
},
|
|
||||||
"group": {
|
|
||||||
"kind": "build"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
3
.weblate
|
@ -1,3 +0,0 @@
|
||||||
[weblate]
|
|
||||||
url = https://translate.codeberg.org/api/
|
|
||||||
translation = searxng/searxng
|
|
|
@ -1,16 +0,0 @@
|
||||||
extends: default
|
|
||||||
|
|
||||||
rules:
|
|
||||||
|
|
||||||
indentation:
|
|
||||||
spaces: 2
|
|
||||||
|
|
||||||
# 120 chars should be enough, but don't fail if a line is longer
|
|
||||||
line-length:
|
|
||||||
max: 120
|
|
||||||
level: warning
|
|
||||||
allow-non-breakable-words: true
|
|
||||||
|
|
||||||
# we don't have multiple document per file
|
|
||||||
document-start: disable
|
|
||||||
document-end: disable
|
|
179
AUTHORS.rst
|
@ -1,179 +0,0 @@
|
||||||
searxng is a fork from `searx <https://github.com/searx/searx>`_ and is
|
|
||||||
maintained by Markus Heiser (`@return42 <https://github.com/return42>`_)
|
|
||||||
|
|
||||||
People who have submitted patches/translations, reported bugs, consulted
|
|
||||||
features or generally made searx better:
|
|
||||||
|
|
||||||
- Adam Tauber `@asciimoo <https://github.com/asciimoo>`_
|
|
||||||
- Matej Cotman `@matejc <https://github.com/matejc>`_
|
|
||||||
- Émilien Devos `@unixfox <https://github.com/unixfox>`_
|
|
||||||
- Thomas Pointhuber `pointhi <https://github.com/pointhi>`_
|
|
||||||
- Noémi Ványi `@kvch <https://github.com/kvch>`_
|
|
||||||
- `@Cqoicebordel <https://github.com/Cqoicebordel>`_
|
|
||||||
- Marc Abonce Seguin `@MarcAbonce <https://github.com/MarcAbonce>`_
|
|
||||||
- `@pofilo <https://github.com/pofilo>`_
|
|
||||||
|
|
||||||
- Laszlo Hammerl
|
|
||||||
- Stefan Marsiske
|
|
||||||
- Gabor Nagy
|
|
||||||
- @pw3t
|
|
||||||
- @rhapsodhy
|
|
||||||
- András Veres-Szentkirályi
|
|
||||||
- Benjamin Sonntag
|
|
||||||
- @HLFH
|
|
||||||
- @TheRadialActive
|
|
||||||
- @Okhin
|
|
||||||
- André Koot
|
|
||||||
- Alejandro León Aznar
|
|
||||||
- rike
|
|
||||||
- dp
|
|
||||||
- Martin Zimmermann
|
|
||||||
- @courgette
|
|
||||||
- @kernc
|
|
||||||
- @Reventl0v
|
|
||||||
- Caner Başaran
|
|
||||||
- Benjamin Sonntag
|
|
||||||
- @opi
|
|
||||||
- @dimqua
|
|
||||||
- Giorgos Logiotatidis
|
|
||||||
- Luc Didry
|
|
||||||
- Niklas Haas
|
|
||||||
- @underr
|
|
||||||
- Emmanuel Benazera
|
|
||||||
- @GreenLunar
|
|
||||||
- Kang-min Liu
|
|
||||||
- Kirill Isakov
|
|
||||||
- Guilhem Bonnefille
|
|
||||||
- @jibe-b
|
|
||||||
- Christian Pietsch @pietsch
|
|
||||||
- @Maxqia
|
|
||||||
- Ashutosh Das @pyprism
|
|
||||||
- YuLun Shih @imZack
|
|
||||||
- Dmitry Mikhirev @mikhirev
|
|
||||||
- David A Roberts `@davidar <https://github.com/davidar>`_
|
|
||||||
- Jan Verbeek @blyxxyz
|
|
||||||
- Ammar Najjar @ammarnajjar
|
|
||||||
- @stepshal
|
|
||||||
- François Revol @mmuman
|
|
||||||
- Harry Wood @harry-wood
|
|
||||||
- Thomas Renard @threnard
|
|
||||||
- Pydo `<https://github.com/pydo>`_
|
|
||||||
- Athemis `<https://github.com/Athemis>`_
|
|
||||||
- Stefan Antoni `<http://stefan.antoni.io>`
|
|
||||||
- @firebovine
|
|
||||||
- Lorenzo J. Lucchini @luccoj
|
|
||||||
- @eig8phei
|
|
||||||
- @maxigas
|
|
||||||
- Jannik Winkel @kiney
|
|
||||||
- @juanitobananas
|
|
||||||
- Vache Asatryan @vachi
|
|
||||||
- Luca CPZ @lcpz
|
|
||||||
- @nikaiw
|
|
||||||
- Thirnearez
|
|
||||||
- Hypolite Petovan @MrPetovan
|
|
||||||
- @woorst
|
|
||||||
- @Apply55gx
|
|
||||||
- @pyrrh0n1c
|
|
||||||
- @cclauss
|
|
||||||
- QGW @moon2l
|
|
||||||
- Pierre-Alain Toret @daftaupe
|
|
||||||
- Matthew Olmsted @icegiant
|
|
||||||
- Michael Tran @trankmichael
|
|
||||||
- Joseph Nuthalapati @josephkiranbabu
|
|
||||||
- @maiki
|
|
||||||
- Richard Didier @zeph33
|
|
||||||
- Michael Vieria @Themimitoof
|
|
||||||
- Richard Nespithal @rndevfx
|
|
||||||
- Stanislas @angristan
|
|
||||||
- @rinpatch
|
|
||||||
- g. s. @usernameisntallowed
|
|
||||||
- Léo Bourrel @bourrel
|
|
||||||
- @cy8aer
|
|
||||||
- @Popolon
|
|
||||||
- Alice Ferrazzi @aliceinwire
|
|
||||||
- @LiquidLemon
|
|
||||||
- @dadosch
|
|
||||||
- Václav Zouzalík @Venca24
|
|
||||||
- @ZEROF
|
|
||||||
- Ivan Skytte Jørgensen @isj-privacore
|
|
||||||
- @miicha
|
|
||||||
- Étienne Deparis @milouse
|
|
||||||
- @pelag0s
|
|
||||||
- Denis Wernert @d-tux
|
|
||||||
- Robin Hallabro-Kokko @hallabro
|
|
||||||
- Jonas Zohren @jfowl
|
|
||||||
- Elias Ojala @theel0ja
|
|
||||||
- @brunob
|
|
||||||
- Nick Espig @nachtalb
|
|
||||||
- Rachmadani Haryono @rachmadaniHaryono
|
|
||||||
- Frank de Lange @yetangitu
|
|
||||||
- Nicolas Gelot @nfk
|
|
||||||
- @volth
|
|
||||||
- Mathieu Brunot @madmath03
|
|
||||||
- @lorddavidiii
|
|
||||||
- @x250
|
|
||||||
- Robby O'Connor @robbyoconnor
|
|
||||||
- Finn @0xhtml
|
|
||||||
- @tmikaeld
|
|
||||||
- @hobbestigrou
|
|
||||||
- Vipul @finn0
|
|
||||||
- @CaffeinatedTech
|
|
||||||
- Robin Schneider @ypid
|
|
||||||
- @splintah
|
|
||||||
- Lukas van den Berk @lukasvdberk
|
|
||||||
- @piplongrun
|
|
||||||
- Jason Kaltsikis @jjasonkal
|
|
||||||
- Sion Kazama @KazamaSion
|
|
||||||
- @resynth1943
|
|
||||||
- Mostafa Ahangarha @ahangarha
|
|
||||||
- @gordon-quad
|
|
||||||
- Sophie Tauchert @999eagle
|
|
||||||
- @bauruine
|
|
||||||
- Michael Ilsaas `<https://mikeri.net>`_
|
|
||||||
- @renyhp
|
|
||||||
- rachmadani haryono @rachmadaniHaryono
|
|
||||||
- Mohamad Safadieh @msafadieh
|
|
||||||
- @gardouille
|
|
||||||
- @resynth1943
|
|
||||||
- @Eliesemoule
|
|
||||||
- @gardouille
|
|
||||||
- @GazoilKerozen
|
|
||||||
- Lukáš Kucharczyk @KucharczykL
|
|
||||||
- Lynda Lopez @lyndalopez544
|
|
||||||
- M. Efe Çetin @efectn
|
|
||||||
- Nícholas Kegler @nicholasks
|
|
||||||
- @pierrechtux
|
|
||||||
- Scott Wallace @scottwallacesh
|
|
||||||
- @Singustromo
|
|
||||||
- @TheEvilSkeleton
|
|
||||||
- @Wonderfall
|
|
||||||
- @mrwormo
|
|
||||||
- Xiaoyu WEI @xywei
|
|
||||||
- @joshu9h
|
|
||||||
- Daniel Hones
|
|
||||||
- @cyclaero
|
|
||||||
- @thezeroalpha
|
|
||||||
- @Tobi823
|
|
||||||
- @archiecodes
|
|
||||||
- @BBaoVanC
|
|
||||||
- @datagram1
|
|
||||||
- @lucky13820
|
|
||||||
- @jhigginbotham
|
|
||||||
- @xenrox
|
|
||||||
- @OliveiraHermogenes
|
|
||||||
- Paul Alcock @Guilvareux
|
|
||||||
- Sam A. `<https://samsapti.dev>`_
|
|
||||||
- @XavierHorwood
|
|
||||||
- Ahmad Alkadri `<https://github.com/ahmad-alkadri>`_
|
|
||||||
- Milad Laly @Milad-Laly
|
|
||||||
- @llmII
|
|
||||||
- @blob42 `<https://blob42.xyz>`_
|
|
||||||
- Paolo Basso `<https://github.com/paolobasso99>`
|
|
||||||
- Bernie Huang `<https://github.com/BernieHuang2008>`
|
|
||||||
- Austin Olacsi `<https://github.com/Austin-Olacsi>`
|
|
||||||
- @micsthepick
|
|
||||||
- Daniel Kukula `<https://github.com/dkuku>`
|
|
||||||
- Patrick Evans `https://github.com/holysoles`
|
|
||||||
- Daniel Mowitz `<https://daniel.mowitz.rocks>`
|
|
||||||
- `Bearz314 <https://github.com/bearz314>`_
|
|
||||||
- Tommaso Colella `<https://github.com/gioleppe>`
|
|
|
@ -1,14 +0,0 @@
|
||||||
=======
|
|
||||||
SearXNG
|
|
||||||
=======
|
|
||||||
|
|
||||||
SearXNG development has been started in the middle of 2021 as a fork of the
|
|
||||||
searx project. Since it beginning its a rolling release pulled from SearXNG's
|
|
||||||
master branch:
|
|
||||||
|
|
||||||
- The CHANGELOG_ is replaced by the commit history of the master branch.
|
|
||||||
- Since merged PR-229_, the version number is based on the git commit
|
|
||||||
|
|
||||||
.. _CHANGELOG: https://github.com/searxng/searxng/commits/master
|
|
||||||
.. _PR-229: https://github.com/searxng/searxng/pull/229
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
# How to contribute
|
|
||||||
|
|
||||||
## Resources in the documentation
|
|
||||||
|
|
||||||
* [Development quickstart](https://docs.searxng.org/dev/quickstart.html)
|
|
||||||
* [Contribution guide](https://docs.searxng.org/dev/contribution_guide.html)
|
|
||||||
|
|
||||||
## Submitting PRs
|
|
||||||
|
|
||||||
Please follow the provided PR template when writing a description for your changes.
|
|
||||||
|
|
||||||
Do not take criticism personally. When you get feedback, it is about your work,
|
|
||||||
not your character, personality, etc. Keep in mind we all want to make the project better.
|
|
||||||
|
|
||||||
When something is not clear, please ask questions to clear things up.
|
|
||||||
|
|
||||||
If you would like to introduce a big architectural changes or do a refactoring
|
|
||||||
either in the codebase or the development tools, please open an issue with a proposal
|
|
||||||
first. This way we can think together about the problem and probably come up
|
|
||||||
with a better solution.
|
|
||||||
|
|
||||||
## Coding conventions and guidelines
|
|
||||||
|
|
||||||
### Commit messages
|
|
||||||
|
|
||||||
* Always write descriptive commit messages ("fix bug" is not acceptable).
|
|
||||||
* Use the present tense ("Add feature" not "Added feature").
|
|
||||||
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
|
|
||||||
* Limit the first line to 72 characters or less.
|
|
||||||
* Include the number of the issue you are fixing.
|
|
||||||
|
|
||||||
### Coding guidelines
|
|
||||||
|
|
||||||
As a Python project, we must follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) and [PEP 20](https://www.python.org/dev/peps/pep-0020/) guidelines.
|
|
||||||
|
|
||||||
Furthermore, follow the Clean code conventions. The most important
|
|
||||||
in this project are the following rules:
|
|
||||||
|
|
||||||
* Simpler is better. [KISS principle](https://en.wikipedia.org/wiki/KISS_principle)
|
|
||||||
* Be consistent.
|
|
||||||
* Every function must do one thing.
|
|
||||||
* Use descriptive names for functions and variables.
|
|
||||||
* Always look for the root cause.
|
|
||||||
* Keep configurable data high level.
|
|
||||||
* Avoid negative conditionals.
|
|
||||||
* Prefer fewer arguments.
|
|
||||||
* Do not add obvious comment to code.
|
|
||||||
* Do not comment out code, just delete lines.
|
|
||||||
|
|
661
LICENSE
|
@ -1,661 +0,0 @@
|
||||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 19 November 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU Affero General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works, specifically designed to ensure
|
|
||||||
cooperation with the community in the case of network server software.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
our General Public Licenses are intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
Developers that use our General Public Licenses protect your rights
|
|
||||||
with two steps: (1) assert copyright on the software, and (2) offer
|
|
||||||
you this License which gives you legal permission to copy, distribute
|
|
||||||
and/or modify the software.
|
|
||||||
|
|
||||||
A secondary benefit of defending all users' freedom is that
|
|
||||||
improvements made in alternate versions of the program, if they
|
|
||||||
receive widespread use, become available for other developers to
|
|
||||||
incorporate. Many developers of free software are heartened and
|
|
||||||
encouraged by the resulting cooperation. However, in the case of
|
|
||||||
software used on network servers, this result may fail to come about.
|
|
||||||
The GNU General Public License permits making a modified version and
|
|
||||||
letting the public access it on a server without ever releasing its
|
|
||||||
source code to the public.
|
|
||||||
|
|
||||||
The GNU Affero General Public License is designed specifically to
|
|
||||||
ensure that, in such cases, the modified source code becomes available
|
|
||||||
to the community. It requires the operator of a network server to
|
|
||||||
provide the source code of the modified version running there to the
|
|
||||||
users of that server. Therefore, public use of a modified version, on
|
|
||||||
a publicly accessible server, gives the public access to the source
|
|
||||||
code of the modified version.
|
|
||||||
|
|
||||||
An older license, called the Affero General Public License and
|
|
||||||
published by Affero, was designed to accomplish similar goals. This is
|
|
||||||
a different license, not a version of the Affero GPL, but Affero has
|
|
||||||
released a new version of the Affero GPL which permits relicensing under
|
|
||||||
this license.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, if you modify the
|
|
||||||
Program, your modified version must prominently offer all users
|
|
||||||
interacting with it remotely through a computer network (if your version
|
|
||||||
supports such interaction) an opportunity to receive the Corresponding
|
|
||||||
Source of your version by providing access to the Corresponding Source
|
|
||||||
from a network server at no charge, through some standard or customary
|
|
||||||
means of facilitating copying of software. This Corresponding Source
|
|
||||||
shall include the Corresponding Source for any work covered by version 3
|
|
||||||
of the GNU General Public License that is incorporated pursuant to the
|
|
||||||
following paragraph.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the work with which it is combined will remain governed by version
|
|
||||||
3 of the GNU General Public License.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU Affero General Public License from time to time. Such new versions
|
|
||||||
will be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU Affero General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU Affero General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU Affero General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If your software can interact with users remotely through a computer
|
|
||||||
network, you should also make sure that it provides a way for users to
|
|
||||||
get its source. For example, if your program is a web application, its
|
|
||||||
interface could display a "Source" link that leads users to an archive
|
|
||||||
of the code. There are many ways you could offer source, and different
|
|
||||||
solutions will be better for different programs; see section 13 for the
|
|
||||||
specific requirements.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
||||||
<http://www.gnu.org/licenses/>.
|
|
101
Makefile
|
@ -1,101 +0,0 @@
|
||||||
# -*- coding: utf-8; mode: makefile-gmake -*-
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
|
|
||||||
.DEFAULT_GOAL=help
|
|
||||||
export MTOOLS=./manage
|
|
||||||
|
|
||||||
include utils/makefile.include
|
|
||||||
|
|
||||||
all: clean install
|
|
||||||
|
|
||||||
PHONY += help
|
|
||||||
|
|
||||||
help:
|
|
||||||
@./manage --help
|
|
||||||
@echo '----'
|
|
||||||
@echo 'run - run developer instance'
|
|
||||||
@echo 'install - developer install of SearxNG into virtualenv'
|
|
||||||
@echo 'uninstall - uninstall developer installation'
|
|
||||||
@echo 'clean - clean up working tree'
|
|
||||||
@echo 'search.checker - check search engines'
|
|
||||||
@echo 'test - run shell & CI tests'
|
|
||||||
@echo 'test.shell - test shell scripts'
|
|
||||||
@echo 'ci.test - run CI tests'
|
|
||||||
|
|
||||||
|
|
||||||
PHONY += run
|
|
||||||
run: install
|
|
||||||
$(Q)./manage webapp.run
|
|
||||||
|
|
||||||
PHONY += install uninstall
|
|
||||||
install uninstall:
|
|
||||||
$(Q)./manage pyenv.$@
|
|
||||||
|
|
||||||
PHONY += clean
|
|
||||||
clean: py.clean docs.clean node.clean nvm.clean test.clean
|
|
||||||
$(Q)./manage build_msg CLEAN "common files"
|
|
||||||
$(Q)find . -name '*.orig' -exec rm -f {} +
|
|
||||||
$(Q)find . -name '*.rej' -exec rm -f {} +
|
|
||||||
$(Q)find . -name '*~' -exec rm -f {} +
|
|
||||||
$(Q)find . -name '*.bak' -exec rm -f {} +
|
|
||||||
|
|
||||||
lxc.clean:
|
|
||||||
$(Q)rm -rf lxc-env
|
|
||||||
|
|
||||||
PHONY += search.checker search.checker.%
|
|
||||||
search.checker: install
|
|
||||||
$(Q)./manage pyenv.cmd searxng-checker -v
|
|
||||||
|
|
||||||
search.checker.%: install
|
|
||||||
$(Q)./manage pyenv.cmd searxng-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
|
|
||||||
|
|
||||||
PHONY += test ci.test test.shell
|
|
||||||
ci.test: test.yamllint test.black test.types.ci test.pylint test.unit test.robot test.rst test.shell test.pybabel
|
|
||||||
test: test.yamllint test.black test.types.dev test.pylint test.unit test.robot test.rst test.shell
|
|
||||||
test.shell:
|
|
||||||
$(Q)shellcheck -x -s dash \
|
|
||||||
container/entrypoint.sh
|
|
||||||
$(Q)shellcheck -x -s bash \
|
|
||||||
utils/brand.sh \
|
|
||||||
$(MTOOLS) \
|
|
||||||
utils/lib.sh \
|
|
||||||
utils/lib_sxng*.sh \
|
|
||||||
utils/lib_go.sh \
|
|
||||||
utils/lib_nvm.sh \
|
|
||||||
utils/lib_redis.sh \
|
|
||||||
utils/searxng.sh \
|
|
||||||
utils/lxc.sh \
|
|
||||||
utils/lxc-searxng.env
|
|
||||||
$(Q)$(MTOOLS) build_msg TEST "$@ OK"
|
|
||||||
|
|
||||||
|
|
||||||
# wrap ./manage script
|
|
||||||
|
|
||||||
MANAGE += weblate.translations.commit weblate.push.translations
|
|
||||||
MANAGE += data.all data.traits data.useragents data.locales data.currencies
|
|
||||||
MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
|
|
||||||
MANAGE += podman.build
|
|
||||||
MANAGE += docker.build docker.buildx
|
|
||||||
MANAGE += container.build container.test container.push
|
|
||||||
MANAGE += gecko.driver
|
|
||||||
MANAGE += node.env node.env.dev node.clean
|
|
||||||
MANAGE += py.build py.clean
|
|
||||||
MANAGE += pyenv pyenv.install pyenv.uninstall
|
|
||||||
MANAGE += format.python
|
|
||||||
MANAGE += test.yamllint test.pylint test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean test.themes test.types.dev test.types.ci
|
|
||||||
MANAGE += themes.all themes.fix themes.test
|
|
||||||
MANAGE += static.build.commit static.build.drop static.build.restore
|
|
||||||
MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs
|
|
||||||
|
|
||||||
PHONY += $(MANAGE)
|
|
||||||
|
|
||||||
$(MANAGE):
|
|
||||||
$(Q)$(MTOOLS) $@
|
|
||||||
|
|
||||||
# short hands of selected targets
|
|
||||||
|
|
||||||
PHONY += docs container themes
|
|
||||||
|
|
||||||
docs: docs.html
|
|
||||||
container: container.build
|
|
||||||
themes: themes.all
|
|
|
@ -1,25 +0,0 @@
|
||||||
## What does this PR do?
|
|
||||||
|
|
||||||
<!-- MANDATORY -->
|
|
||||||
|
|
||||||
<!-- explain the changes in your PR, algorithms, design, architecture -->
|
|
||||||
|
|
||||||
## Why is this change important?
|
|
||||||
|
|
||||||
<!-- MANDATORY -->
|
|
||||||
|
|
||||||
<!-- explain the motivation behind your PR -->
|
|
||||||
|
|
||||||
## How to test this PR locally?
|
|
||||||
|
|
||||||
<!-- commands to run the tests or instructions to test the changes -->
|
|
||||||
|
|
||||||
## Author's checklist
|
|
||||||
|
|
||||||
<!-- additional notes for reviewers -->
|
|
||||||
|
|
||||||
## Related issues
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Closes #234
|
|
||||||
-->
|
|
133
README.rst
|
@ -1,132 +1,3 @@
|
||||||
.. SPDX-License-Identifier: AGPL-3.0-or-later
|
This branch is updated automatically.
|
||||||
|
|
||||||
----
|
See https://searxng.github.io/searxng/dev/translation.html
|
||||||
|
|
||||||
.. figure:: https://raw.githubusercontent.com/searxng/searxng/master/client/simple/src/brand/searxng.svg
|
|
||||||
:target: https://docs.searxng.org/
|
|
||||||
:alt: SearXNG
|
|
||||||
:width: 100%
|
|
||||||
:align: center
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Fork of SearXNG. The globe icon for empty_favicon.svg in searx/static/themes/simple/img/ belongs to the Noto Emojis font by Google
|
|
||||||
|
|
||||||
Privacy-respecting, hackable `metasearch engine`_
|
|
||||||
|
|
||||||
Searx.space_ lists ready-to-use running instances.
|
|
||||||
|
|
||||||
A user_, admin_ and developer_ handbook is available on the homepage_.
|
|
||||||
|
|
||||||
|SearXNG install|
|
|
||||||
|SearXNG homepage|
|
|
||||||
|SearXNG wiki|
|
|
||||||
|AGPL License|
|
|
||||||
|Issues|
|
|
||||||
|commits|
|
|
||||||
|weblate|
|
|
||||||
|SearXNG logo|
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
.. _searx.space: https://searx.space
|
|
||||||
.. _user: https://docs.searxng.org/user
|
|
||||||
.. _admin: https://docs.searxng.org/admin
|
|
||||||
.. _developer: https://docs.searxng.org/dev
|
|
||||||
.. _homepage: https://docs.searxng.org/
|
|
||||||
.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine
|
|
||||||
|
|
||||||
.. |SearXNG logo| image:: https://raw.githubusercontent.com/searxng/searxng/master/client/simple/src/brand/searxng-wordmark.svg
|
|
||||||
:target: https://docs.searxng.org/
|
|
||||||
:width: 5%
|
|
||||||
|
|
||||||
.. |SearXNG install| image:: https://img.shields.io/badge/-install-blue
|
|
||||||
:target: https://docs.searxng.org/admin/installation.html
|
|
||||||
|
|
||||||
.. |SearXNG homepage| image:: https://img.shields.io/badge/-homepage-blue
|
|
||||||
:target: https://docs.searxng.org/
|
|
||||||
|
|
||||||
.. |SearXNG wiki| image:: https://img.shields.io/badge/-wiki-blue
|
|
||||||
:target: https://github.com/searxng/searxng/wiki
|
|
||||||
|
|
||||||
.. |AGPL License| image:: https://img.shields.io/badge/license-AGPL-blue.svg
|
|
||||||
:target: https://github.com/searxng/searxng/blob/master/LICENSE
|
|
||||||
|
|
||||||
.. |Issues| image:: https://img.shields.io/github/issues/searxng/searxng?color=yellow&label=issues
|
|
||||||
:target: https://github.com/searxng/searxng/issues
|
|
||||||
|
|
||||||
.. |PR| image:: https://img.shields.io/github/issues-pr-raw/searxng/searxng?color=yellow&label=PR
|
|
||||||
:target: https://github.com/searxng/searxng/pulls
|
|
||||||
|
|
||||||
.. |commits| image:: https://img.shields.io/github/commit-activity/y/searxng/searxng?color=yellow&label=commits
|
|
||||||
:target: https://github.com/searxng/searxng/commits/master
|
|
||||||
|
|
||||||
.. |weblate| image:: https://translate.codeberg.org/widgets/searxng/-/searxng/svg-badge.svg
|
|
||||||
:target: https://translate.codeberg.org/projects/searxng/
|
|
||||||
|
|
||||||
|
|
||||||
Contact
|
|
||||||
=======
|
|
||||||
|
|
||||||
Ask questions or chat with the SearXNG community (this not a chatbot) on
|
|
||||||
|
|
||||||
IRC
|
|
||||||
`#searxng on libera.chat <https://web.libera.chat/?channel=#searxng>`_
|
|
||||||
which is bridged to Matrix.
|
|
||||||
|
|
||||||
Matrix
|
|
||||||
`#searxng:matrix.org <https://matrix.to/#/#searxng:matrix.org>`_
|
|
||||||
|
|
||||||
|
|
||||||
Setup
|
|
||||||
=====
|
|
||||||
|
|
||||||
- A well maintained `Docker image`_, also built for ARM64 and ARM/v7
|
|
||||||
architectures.
|
|
||||||
- Alternatively there are *up to date* `installation scripts`_.
|
|
||||||
- For individual setup consult our detailed `Step by step`_ instructions.
|
|
||||||
- To fine-tune your instance, take a look at the `Administrator documentation`_.
|
|
||||||
|
|
||||||
.. _Administrator documentation: https://docs.searxng.org/admin/index.html
|
|
||||||
.. _Step by step: https://docs.searxng.org/admin/installation-searxng.html
|
|
||||||
.. _installation scripts: https://docs.searxng.org/admin/installation-scripts.html
|
|
||||||
.. _Docker image: https://github.com/searxng/searxng-docker
|
|
||||||
|
|
||||||
Translations
|
|
||||||
============
|
|
||||||
|
|
||||||
.. _Weblate: https://translate.codeberg.org/projects/searxng/searxng/
|
|
||||||
|
|
||||||
Help translate SearXNG at `Weblate`_
|
|
||||||
|
|
||||||
.. figure:: https://translate.codeberg.org/widgets/searxng/-/multi-auto.svg
|
|
||||||
:target: https://translate.codeberg.org/projects/searxng/
|
|
||||||
|
|
||||||
|
|
||||||
Contributing
|
|
||||||
============
|
|
||||||
|
|
||||||
.. _development quickstart: https://docs.searxng.org/dev/quickstart.html
|
|
||||||
.. _developer documentation: https://docs.searxng.org/dev/index.html
|
|
||||||
|
|
||||||
Are you a developer? Have a look at our `development quickstart`_ guide, it's
|
|
||||||
very easy to contribute. Additionally we have a `developer documentation`_.
|
|
||||||
|
|
||||||
|
|
||||||
Codespaces
|
|
||||||
==========
|
|
||||||
|
|
||||||
You can contribute from your browser using `GitHub Codespaces`_:
|
|
||||||
|
|
||||||
- Fork the repository
|
|
||||||
- Click on the ``<> Code`` green button
|
|
||||||
- Click on the ``Codespaces`` tab instead of ``Local``
|
|
||||||
- Click on ``Create codespace on master``
|
|
||||||
- VSCode is going to start in the browser
|
|
||||||
- Wait for ``git pull && make install`` to appear and then disappear
|
|
||||||
- You have `120 hours per month`_ (see also your `list of existing Codespaces`_)
|
|
||||||
- You can start SearXNG using ``make run`` in the terminal or by pressing ``Ctrl+Shift+B``
|
|
||||||
|
|
||||||
.. _GitHub Codespaces: https://docs.github.com/en/codespaces/overview
|
|
||||||
.. _120 hours per month: https://github.com/settings/billing
|
|
||||||
.. _list of existing Codespaces: https://github.com/codespaces
|
|
||||||
|
|
10
SECURITY.md
|
@ -1,10 +0,0 @@
|
||||||
# Security Policy
|
|
||||||
|
|
||||||
We love responsible reports of (potential) security issues in SearXNG.
|
|
||||||
|
|
||||||
You can contact us at security@searxng.org.
|
|
||||||
|
|
||||||
Be sure to provide as much information as possible and if found
|
|
||||||
also reproduction steps of the identified vulnerability. Also
|
|
||||||
add the specific URL of the project as well as code you found
|
|
||||||
the issue in to your report.
|
|
|
@ -1,6 +0,0 @@
|
||||||
[extractors]
|
|
||||||
searxng_msg = searx.babel_extract.extract
|
|
||||||
[ignore: **/node_modules/**]
|
|
||||||
[python: **.py]
|
|
||||||
[jinja2: **/templates/**.html]
|
|
||||||
[searxng_msg: **/searxng.msg]
|
|
3
client/simple/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
||||||
dist
|
|
||||||
node_modules
|
|
||||||
.stylelintcache
|
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
"formatter": "unix",
|
|
||||||
"plugins": [ "stylelint-prettier" ],
|
|
||||||
"extends": [ "stylelint-config-standard-less" ],
|
|
||||||
"rules": {
|
|
||||||
"prettier/prettier": true,
|
|
||||||
"declaration-empty-line-before": null,
|
|
||||||
"no-invalid-position-at-import-rule": null,
|
|
||||||
"property-no-vendor-prefix": null,
|
|
||||||
"selector-no-vendor-prefix": null,
|
|
||||||
"selector-attribute-quotes": null,
|
|
||||||
"shorthand-property-no-redundant-values": null,
|
|
||||||
"at-rule-no-vendor-prefix": null,
|
|
||||||
"selector-id-pattern": null,
|
|
||||||
"selector-class-pattern": null
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
=====================
|
|
||||||
MEMO vite development
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Local install::
|
|
||||||
|
|
||||||
# in folder ./client/simple/
|
|
||||||
$ npm install
|
|
||||||
|
|
||||||
Start development server::
|
|
||||||
|
|
||||||
$ ./manage vite.simple.dev
|
|
||||||
|
|
||||||
# in folder ./client/simple/
|
|
||||||
$ npm exec -- vite
|
|
||||||
|
|
||||||
Fix source code::
|
|
||||||
|
|
||||||
# in folder ./client/simple/
|
|
||||||
$ npm run fix
|
|
||||||
|
|
||||||
Fix & Build::
|
|
||||||
|
|
||||||
$ ./manage vite.simple.build
|
|
|
@ -1,34 +0,0 @@
|
||||||
import globals from "globals";
|
|
||||||
import pluginJs from "@eslint/js";
|
|
||||||
|
|
||||||
|
|
||||||
/** @type {import('eslint').Linter.Config[]} */
|
|
||||||
export default [
|
|
||||||
pluginJs.configs.recommended,
|
|
||||||
|
|
||||||
// global "ignores"
|
|
||||||
// https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
|
|
||||||
{
|
|
||||||
ignores: ["node_modules/", "dist/"]
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
files: [
|
|
||||||
"**/*.js",
|
|
||||||
],
|
|
||||||
linterOptions: {
|
|
||||||
reportUnusedDisableDirectives: "error",
|
|
||||||
// noInlineConfig: true
|
|
||||||
},
|
|
||||||
languageOptions: {
|
|
||||||
sourceType: "module",
|
|
||||||
globals: {
|
|
||||||
...globals.browser,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
indent: ["error", 2],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
];
|
|
|
@ -1,173 +0,0 @@
|
||||||
/*
|
|
||||||
this file is generated automatically by searxng_extra/update/update_pygments.py
|
|
||||||
using pygments version 2.19.1
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
.code-highlight {
|
|
||||||
|
|
||||||
pre { line-height: 100%; }
|
|
||||||
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
||||||
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
||||||
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
||||||
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
||||||
.hll { background-color: #ffffcc }
|
|
||||||
.c { color: #3D7B7B; font-style: italic } /* Comment */
|
|
||||||
.err { border: 1px solid #F00 } /* Error */
|
|
||||||
.k { color: #008000; font-weight: bold } /* Keyword */
|
|
||||||
.o { color: #666 } /* Operator */
|
|
||||||
.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
|
|
||||||
.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
|
|
||||||
.cp { color: #9C6500 } /* Comment.Preproc */
|
|
||||||
.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
|
|
||||||
.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
|
|
||||||
.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
|
|
||||||
.gd { color: #A00000 } /* Generic.Deleted */
|
|
||||||
.ge { font-style: italic } /* Generic.Emph */
|
|
||||||
.ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
|
|
||||||
.gr { color: #E40000 } /* Generic.Error */
|
|
||||||
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
|
||||||
.gi { color: #008400 } /* Generic.Inserted */
|
|
||||||
.go { color: #717171 } /* Generic.Output */
|
|
||||||
.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
|
|
||||||
.gs { font-weight: bold } /* Generic.Strong */
|
|
||||||
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
|
||||||
.gt { color: #04D } /* Generic.Traceback */
|
|
||||||
.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
|
|
||||||
.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
|
|
||||||
.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
|
|
||||||
.kp { color: #008000 } /* Keyword.Pseudo */
|
|
||||||
.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
|
|
||||||
.kt { color: #B00040 } /* Keyword.Type */
|
|
||||||
.m { color: #666 } /* Literal.Number */
|
|
||||||
.s { color: #BA2121 } /* Literal.String */
|
|
||||||
.na { color: #687822 } /* Name.Attribute */
|
|
||||||
.nb { color: #008000 } /* Name.Builtin */
|
|
||||||
.nc { color: #00F; font-weight: bold } /* Name.Class */
|
|
||||||
.no { color: #800 } /* Name.Constant */
|
|
||||||
.nd { color: #A2F } /* Name.Decorator */
|
|
||||||
.ni { color: #717171; font-weight: bold } /* Name.Entity */
|
|
||||||
.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
|
|
||||||
.nf { color: #00F } /* Name.Function */
|
|
||||||
.nl { color: #767600 } /* Name.Label */
|
|
||||||
.nn { color: #00F; font-weight: bold } /* Name.Namespace */
|
|
||||||
.nt { color: #008000; font-weight: bold } /* Name.Tag */
|
|
||||||
.nv { color: #19177C } /* Name.Variable */
|
|
||||||
.ow { color: #A2F; font-weight: bold } /* Operator.Word */
|
|
||||||
.w { color: #BBB } /* Text.Whitespace */
|
|
||||||
.mb { color: #666 } /* Literal.Number.Bin */
|
|
||||||
.mf { color: #666 } /* Literal.Number.Float */
|
|
||||||
.mh { color: #666 } /* Literal.Number.Hex */
|
|
||||||
.mi { color: #666 } /* Literal.Number.Integer */
|
|
||||||
.mo { color: #666 } /* Literal.Number.Oct */
|
|
||||||
.sa { color: #BA2121 } /* Literal.String.Affix */
|
|
||||||
.sb { color: #BA2121 } /* Literal.String.Backtick */
|
|
||||||
.sc { color: #BA2121 } /* Literal.String.Char */
|
|
||||||
.dl { color: #BA2121 } /* Literal.String.Delimiter */
|
|
||||||
.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
|
||||||
.s2 { color: #BA2121 } /* Literal.String.Double */
|
|
||||||
.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
|
|
||||||
.sh { color: #BA2121 } /* Literal.String.Heredoc */
|
|
||||||
.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
|
|
||||||
.sx { color: #008000 } /* Literal.String.Other */
|
|
||||||
.sr { color: #A45A77 } /* Literal.String.Regex */
|
|
||||||
.s1 { color: #BA2121 } /* Literal.String.Single */
|
|
||||||
.ss { color: #19177C } /* Literal.String.Symbol */
|
|
||||||
.bp { color: #008000 } /* Name.Builtin.Pseudo */
|
|
||||||
.fm { color: #00F } /* Name.Function.Magic */
|
|
||||||
.vc { color: #19177C } /* Name.Variable.Class */
|
|
||||||
.vg { color: #19177C } /* Name.Variable.Global */
|
|
||||||
.vi { color: #19177C } /* Name.Variable.Instance */
|
|
||||||
.vm { color: #19177C } /* Name.Variable.Magic */
|
|
||||||
.il { color: #666 } /* Literal.Number.Integer.Long */
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-highlight-dark(){
|
|
||||||
.code-highlight {
|
|
||||||
|
|
||||||
pre { line-height: 100%; }
|
|
||||||
td.linenos .normal { color: #3c4354; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
||||||
span.linenos { color: #3c4354; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
||||||
td.linenos .special { color: #3c4354; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
||||||
span.linenos.special { color: #3c4354; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
||||||
.hll { background-color: #6e7681 }
|
|
||||||
.c { color: #7E8AA1 } /* Comment */
|
|
||||||
.err { color: #F88F7F } /* Error */
|
|
||||||
.esc { color: #D4D2C8 } /* Escape */
|
|
||||||
.g { color: #D4D2C8 } /* Generic */
|
|
||||||
.k { color: #FFAD66 } /* Keyword */
|
|
||||||
.l { color: #D5FF80 } /* Literal */
|
|
||||||
.n { color: #D4D2C8 } /* Name */
|
|
||||||
.o { color: #FFAD66 } /* Operator */
|
|
||||||
.x { color: #D4D2C8 } /* Other */
|
|
||||||
.p { color: #D4D2C8 } /* Punctuation */
|
|
||||||
.ch { color: #F88F7F; font-style: italic } /* Comment.Hashbang */
|
|
||||||
.cm { color: #7E8AA1 } /* Comment.Multiline */
|
|
||||||
.cp { color: #FFAD66; font-weight: bold } /* Comment.Preproc */
|
|
||||||
.cpf { color: #7E8AA1 } /* Comment.PreprocFile */
|
|
||||||
.c1 { color: #7E8AA1 } /* Comment.Single */
|
|
||||||
.cs { color: #7E8AA1; font-style: italic } /* Comment.Special */
|
|
||||||
.gd { color: #F88F7F; background-color: #3D1E20 } /* Generic.Deleted */
|
|
||||||
.ge { color: #D4D2C8; font-style: italic } /* Generic.Emph */
|
|
||||||
.ges { color: #D4D2C8 } /* Generic.EmphStrong */
|
|
||||||
.gr { color: #F88F7F } /* Generic.Error */
|
|
||||||
.gh { color: #D4D2C8 } /* Generic.Heading */
|
|
||||||
.gi { color: #6AD4AF; background-color: #19362C } /* Generic.Inserted */
|
|
||||||
.go { color: #7E8AA1 } /* Generic.Output */
|
|
||||||
.gp { color: #D4D2C8 } /* Generic.Prompt */
|
|
||||||
.gs { color: #D4D2C8; font-weight: bold } /* Generic.Strong */
|
|
||||||
.gu { color: #D4D2C8 } /* Generic.Subheading */
|
|
||||||
.gt { color: #F88F7F } /* Generic.Traceback */
|
|
||||||
.kc { color: #FFAD66 } /* Keyword.Constant */
|
|
||||||
.kd { color: #FFAD66 } /* Keyword.Declaration */
|
|
||||||
.kn { color: #FFAD66 } /* Keyword.Namespace */
|
|
||||||
.kp { color: #FFAD66 } /* Keyword.Pseudo */
|
|
||||||
.kr { color: #FFAD66 } /* Keyword.Reserved */
|
|
||||||
.kt { color: #73D0FF } /* Keyword.Type */
|
|
||||||
.ld { color: #D5FF80 } /* Literal.Date */
|
|
||||||
.m { color: #DFBFFF } /* Literal.Number */
|
|
||||||
.s { color: #D5FF80 } /* Literal.String */
|
|
||||||
.na { color: #FFD173 } /* Name.Attribute */
|
|
||||||
.nb { color: #FFD173 } /* Name.Builtin */
|
|
||||||
.nc { color: #73D0FF } /* Name.Class */
|
|
||||||
.no { color: #FFD173 } /* Name.Constant */
|
|
||||||
.nd { color: #7E8AA1; font-weight: bold; font-style: italic } /* Name.Decorator */
|
|
||||||
.ni { color: #95E6CB } /* Name.Entity */
|
|
||||||
.ne { color: #73D0FF } /* Name.Exception */
|
|
||||||
.nf { color: #FFD173 } /* Name.Function */
|
|
||||||
.nl { color: #D4D2C8 } /* Name.Label */
|
|
||||||
.nn { color: #D4D2C8 } /* Name.Namespace */
|
|
||||||
.nx { color: #D4D2C8 } /* Name.Other */
|
|
||||||
.py { color: #FFD173 } /* Name.Property */
|
|
||||||
.nt { color: #5CCFE6 } /* Name.Tag */
|
|
||||||
.nv { color: #D4D2C8 } /* Name.Variable */
|
|
||||||
.ow { color: #FFAD66 } /* Operator.Word */
|
|
||||||
.pm { color: #D4D2C8 } /* Punctuation.Marker */
|
|
||||||
.w { color: #D4D2C8 } /* Text.Whitespace */
|
|
||||||
.mb { color: #DFBFFF } /* Literal.Number.Bin */
|
|
||||||
.mf { color: #DFBFFF } /* Literal.Number.Float */
|
|
||||||
.mh { color: #DFBFFF } /* Literal.Number.Hex */
|
|
||||||
.mi { color: #DFBFFF } /* Literal.Number.Integer */
|
|
||||||
.mo { color: #DFBFFF } /* Literal.Number.Oct */
|
|
||||||
.sa { color: #F29E74 } /* Literal.String.Affix */
|
|
||||||
.sb { color: #D5FF80 } /* Literal.String.Backtick */
|
|
||||||
.sc { color: #D5FF80 } /* Literal.String.Char */
|
|
||||||
.dl { color: #D5FF80 } /* Literal.String.Delimiter */
|
|
||||||
.sd { color: #7E8AA1 } /* Literal.String.Doc */
|
|
||||||
.s2 { color: #D5FF80 } /* Literal.String.Double */
|
|
||||||
.se { color: #95E6CB } /* Literal.String.Escape */
|
|
||||||
.sh { color: #D5FF80 } /* Literal.String.Heredoc */
|
|
||||||
.si { color: #95E6CB } /* Literal.String.Interpol */
|
|
||||||
.sx { color: #95E6CB } /* Literal.String.Other */
|
|
||||||
.sr { color: #95E6CB } /* Literal.String.Regex */
|
|
||||||
.s1 { color: #D5FF80 } /* Literal.String.Single */
|
|
||||||
.ss { color: #DFBFFF } /* Literal.String.Symbol */
|
|
||||||
.bp { color: #5CCFE6 } /* Name.Builtin.Pseudo */
|
|
||||||
.fm { color: #FFD173 } /* Name.Function.Magic */
|
|
||||||
.vc { color: #D4D2C8 } /* Name.Variable.Class */
|
|
||||||
.vg { color: #D4D2C8 } /* Name.Variable.Global */
|
|
||||||
.vi { color: #D4D2C8 } /* Name.Variable.Instance */
|
|
||||||
.vm { color: #D4D2C8 } /* Name.Variable.Magic */
|
|
||||||
.il { color: #DFBFFF } /* Literal.Number.Integer.Long */
|
|
||||||
}
|
|
||||||
}
|
|
7398
client/simple/package-lock.json
generated
|
@ -1,38 +0,0 @@
|
||||||
{
|
|
||||||
"name": "simple",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"clean": "rm -Rf node_modules",
|
|
||||||
"build": "node theme_icons.js && vite build",
|
|
||||||
"fix": "eslint --fix && stylelint --fix strict 'src/**/*.{css,scss,sass,less,styl,vue,svelte}'",
|
|
||||||
"icons.html": "node theme_icons.js"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@eslint/js": "^9.27.0",
|
|
||||||
"copy-webpack-plugin": "^13.0.0",
|
|
||||||
"css-loader": "^7.1.2",
|
|
||||||
"edge.js": "^6.2.1",
|
|
||||||
"eslint": "^9.27.0",
|
|
||||||
"filemanager-webpack-plugin": "^8.0.0",
|
|
||||||
"globals": "^16.2.0",
|
|
||||||
"ionicons": "^8.0.8",
|
|
||||||
"leaflet": "^1.9.4",
|
|
||||||
"less": "^4.3.0",
|
|
||||||
"less-loader": "^12.3.0",
|
|
||||||
"normalize.css": "^8.0.1",
|
|
||||||
"sharp": "^0.34.2",
|
|
||||||
"style-loader": "^4.0.0",
|
|
||||||
"stylelint": "^16.20.0",
|
|
||||||
"stylelint-config-standard": "^38.0.0",
|
|
||||||
"stylelint-config-standard-less": "^3.0.1",
|
|
||||||
"stylelint-prettier": "^5.0.3",
|
|
||||||
"svgo": "^3.3.2",
|
|
||||||
"swiped-events": "^1.2.0",
|
|
||||||
"vite": "^6.3.5",
|
|
||||||
"vite-plugin-static-copy": "^3.0.0",
|
|
||||||
"vite-plugin-stylelint": "^6.0.0",
|
|
||||||
"webpack": "^5.99.9",
|
|
||||||
"webpack-cli": "^6.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,71 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
id="svg8"
|
|
||||||
version="1.1"
|
|
||||||
viewBox="0 0 92 92"
|
|
||||||
height="92mm"
|
|
||||||
width="92mm"
|
|
||||||
sodipodi:docname="img_load_error.svg"
|
|
||||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
|
||||||
<sodipodi:namedview
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1"
|
|
||||||
objecttolerance="10"
|
|
||||||
gridtolerance="10"
|
|
||||||
guidetolerance="10"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:window-width="3840"
|
|
||||||
inkscape:window-height="1536"
|
|
||||||
id="namedview10"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:zoom="2.2374547"
|
|
||||||
inkscape:cx="-12.067286"
|
|
||||||
inkscape:cy="218.38203"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="27"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="svg8" />
|
|
||||||
<defs
|
|
||||||
id="defs2" />
|
|
||||||
<metadata
|
|
||||||
id="metadata5">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<path
|
|
||||||
d="M 39.581382,41.421315 H 30.62689 v -1.21543 q 0,-2.033984 0.818554,-3.59668 0.818555,-1.5875 3.447852,-4.018359 l 1.5875,-1.438672 q 1.413867,-1.289844 2.058789,-2.43086 0.669727,-1.141015 0.669727,-2.282031 0,-1.736328 -1.190625,-2.703711 -1.190625,-0.992188 -3.323828,-0.992188 -2.00918,0 -4.340821,0.84336 -2.331641,0.818554 -4.861719,2.455664 v -7.788673 q 3.001367,-1.041796 5.481836,-1.53789 2.480469,-0.496094 4.787305,-0.496094 6.052344,0 9.227344,2.480469 3.175001,2.455664 3.175001,7.19336 0,2.430859 -0.967383,4.365625 -0.967383,1.909961 -3.299024,4.117578 l -1.5875,1.413868 q -1.686719,1.53789 -2.207617,2.480469 -0.520899,0.917773 -0.520899,2.033984 z m -8.954492,3.671094 h 8.954492 v 8.830469 H 30.62689 Z"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:50.80000305px;line-height:1;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans Bold';display:inline;fill:#808080;fill-opacity:1;stroke-width:0.26458335"
|
|
||||||
id="path827"
|
|
||||||
inkscape:connector-curvature="0" />
|
|
||||||
<circle
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#808080;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="path834"
|
|
||||||
cx="35"
|
|
||||||
cy="36.486031"
|
|
||||||
r="30" />
|
|
||||||
<rect
|
|
||||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:none;stroke-width:8;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect912"
|
|
||||||
width="18.846331"
|
|
||||||
height="39.963303"
|
|
||||||
x="-12.021294"
|
|
||||||
y="80.490318"
|
|
||||||
ry="1.8669105e-13"
|
|
||||||
transform="rotate(-46.234709)" />
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 3 KiB |
|
@ -1,56 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
id="svg8"
|
|
||||||
version="1.1"
|
|
||||||
viewBox="0 0 92 92"
|
|
||||||
height="92mm"
|
|
||||||
width="92mm">
|
|
||||||
<defs
|
|
||||||
id="defs2" />
|
|
||||||
<metadata
|
|
||||||
id="metadata5">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
transform="translate(-40.921303,-17.416526)"
|
|
||||||
id="layer1">
|
|
||||||
<circle
|
|
||||||
r="0"
|
|
||||||
style="fill:none;stroke:#000000;stroke-width:12;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
cy="92"
|
|
||||||
cx="75"
|
|
||||||
id="path3713" />
|
|
||||||
<circle
|
|
||||||
r="30"
|
|
||||||
cy="53.902557"
|
|
||||||
cx="75.921303"
|
|
||||||
id="path834"
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#3050ff;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
|
||||||
<path
|
|
||||||
d="m 67.514849,37.91524 a 18,18 0 0 1 21.051475,3.312407 18,18 0 0 1 3.137312,21.078282"
|
|
||||||
id="path852"
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#3050ff;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
|
||||||
<rect
|
|
||||||
transform="rotate(-46.234709)"
|
|
||||||
ry="1.8669105e-13"
|
|
||||||
y="122.08995"
|
|
||||||
x="3.7063529"
|
|
||||||
height="39.963303"
|
|
||||||
width="18.846331"
|
|
||||||
id="rect912"
|
|
||||||
style="opacity:1;fill:#3050ff;fill-opacity:1;stroke:none;stroke-width:8;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.7 KiB |
|
@ -1,96 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
sodipodi:docname="searxng.svg"
|
|
||||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
|
||||||
id="svg8"
|
|
||||||
version="1.1"
|
|
||||||
viewBox="0 0 225.86871 38.709602"
|
|
||||||
height="38.709602mm"
|
|
||||||
width="225.86871mm">
|
|
||||||
<defs
|
|
||||||
id="defs2" />
|
|
||||||
<sodipodi:namedview
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:window-y="2149"
|
|
||||||
inkscape:window-x="-7"
|
|
||||||
inkscape:window-height="1346"
|
|
||||||
inkscape:window-width="2560"
|
|
||||||
fit-margin-bottom="0"
|
|
||||||
fit-margin-right="0"
|
|
||||||
fit-margin-left="0"
|
|
||||||
fit-margin-top="0"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:document-rotation="0"
|
|
||||||
inkscape:current-layer="layer1"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
inkscape:cy="235.27775"
|
|
||||||
inkscape:cx="1236.8338"
|
|
||||||
inkscape:zoom="0.7"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
borderopacity="1.0"
|
|
||||||
bordercolor="#666666"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
id="base" />
|
|
||||||
<metadata
|
|
||||||
id="metadata5">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
transform="translate(-4.020089,-7.482607)"
|
|
||||||
id="layer1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
inkscape:label="Layer 1">
|
|
||||||
<g
|
|
||||||
inkscape:export-ydpi="96"
|
|
||||||
inkscape:export-xdpi="96"
|
|
||||||
transform="translate(-25.702381,-86.178571)"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:50.8px;line-height:1.25;font-family:sans-serif;fill:#487cff;fill-opacity:1;stroke:none;stroke-width:0.264583"
|
|
||||||
id="text884"
|
|
||||||
aria-label="SearXNG">
|
|
||||||
<path
|
|
||||||
id="path886"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Libre Franklin';-inkscape-font-specification:'Libre Franklin';fill:#487cff;fill-opacity:1;stroke-width:0.264583"
|
|
||||||
d="m 56.494069,102.70358 q -1.1684,-1.2192 -3.047999,-2.032 -1.8796,-0.812802 -4.4196,-0.812802 -3.1496,0 -5.08,1.320802 -1.9304,1.27 -1.9304,3.4544 0,2.3368 3.7084,3.6068 l 7.6708,2.6416 q 3.962399,1.3208 5.841999,3.4036 1.8796,2.0828 1.8796,5.1308 0,4.064 -2.1844,7.0104 -2.1844,2.8956 -5.943599,4.4196 -3.7592,1.524 -8.4836,1.524 -5.334,0 -9.0424,-1.778 -3.7084,-1.8288 -5.5372,-5.1308 -0.2032,-0.3556 -0.2032,-0.7112 0,-0.3556 0.4064,-0.6096 l 4.0132,-2.4384 q 0.3556,-0.254 0.762,-0.254 0.6096,0 1.1176,0.6604 1.3208,1.6256 2.3876,2.54 1.1176,0.8636 2.6924,1.3208 1.6256,0.4572 4.1656,0.4572 3.2004,0 5.1816,-1.1684 1.9812,-1.2192 1.9812,-3.7592 0,-1.27 -0.9144,-2.0828 -0.9144,-0.8636 -2.9464,-1.5748 l -7.4168,-2.4892 q -3.6576,-1.2192 -5.588,-3.556 -1.8796,-2.3876 -1.8796,-5.4356 0,-3.7592 2.1336,-6.654802 2.1336,-2.8956 5.6896,-4.4704 3.6068,-1.5748 7.874,-1.5748 4.3688,0 7.670799,1.5748 3.3528,1.524 5.1816,3.9624 0.4064,0.508 0.4064,0.762 0,0.254002 -0.3556,0.457202 l -4.5212,2.9972 q -0.0508,0.0508 -0.2032,0.0508 -0.3048,0 -1.0668,-0.762 z" />
|
|
||||||
<path
|
|
||||||
id="path888"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Libre Franklin';-inkscape-font-specification:'Libre Franklin';fill:#487cff;fill-opacity:1;stroke-width:0.264583"
|
|
||||||
d="m 77.003775,132.37078 q -3.6068,0 -6.4008,-1.4732 -2.794,-1.4732 -4.318,-4.1148 -1.524,-2.6924 -1.524,-6.1976 0,-4.1656 1.9812,-7.874 2.032,-3.7592 5.5372,-5.9944 3.556,-2.286 7.9248,-2.286 5.334,0 8.4836,3.1496 3.1496,3.1496 3.1496,8.6868 0,1.4732 -0.2032,2.8448 -0.1016,0.4064 -0.3556,0.6096 -0.2032,0.1524 -0.8128,0.1524 h -17.1196 q -0.8128,0 -0.8128,2.1844 0,2.3876 1.524,3.7084 1.5748,1.27 4.064,1.27 1.9304,0 3.6068,-0.8128 1.6764,-0.8128 3.302,-2.54 0.254,-0.254 0.508,-0.254 0.1524,0 0.6604,0.2032 l 3.3528,1.5748 q 0.6096,0.2032 0.6096,0.6604 0,0.254 -0.254,0.6604 -2.9464,3.302 -5.8928,4.572 -2.8956,1.27 -7.0104,1.27 z m 6.4516,-16.5608 q 1.2192,0 1.2192,-1.9812 0,-1.9304 -1.1684,-3.2512 -1.1684,-1.3716 -3.2512,-1.3716 -2.54,0 -4.5212,1.9304 -1.9304,1.8796 -2.2352,4.6736 z" />
|
|
||||||
<path
|
|
||||||
id="path890"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Libre Franklin';-inkscape-font-specification:'Libre Franklin';fill:#487cff;fill-opacity:1;stroke-width:0.264583"
|
|
||||||
d="m 109.411,129.37358 q -3.048,2.9972 -8.3312,2.9972 -3.555996,0 -5.587996,-1.8288 -2.032,-1.8288 -2.032,-4.7752 0,-3.6068 2.3876,-5.8928 2.3876,-2.3368 5.994396,-3.3528 3.6576,-1.0668 7.5692,-1.1684 l 1.8288,-0.1524 q 0.9652,0 1.1176,-0.9652 l 0.1524,-1.0668 q 0.0508,-0.254 0.0508,-0.8128 0,-3.048 -3.5052,-3.048 -4.0132,0 -5.9436,3.1496 -0.254,0.3556 -0.6604,0.3556 -0.3048,0 -0.4572,-0.0508 l -4.927596,-1.1684 q -0.508,-0.1016 -0.508,-0.6604 0,-0.508 0.254,-1.016 3.352796,-5.4864 12.649196,-5.4864 5.4864,0 8.0264,1.9304 2.5908,1.9304 2.5908,5.334 0,0.4572 -0.1016,1.4732 l -2.54,17.78 q -0.0508,0.6604 -0.2032,0.8128 -0.1524,0.1016 -0.7112,0.1016 h -5.2324 q -0.508,0 -0.6604,-0.3048 -0.1524,-0.3048 -0.2032,-1.016 l 0.0508,-1.3208 q 0,-0.4064 -0.254,-0.4064 -0.254,0 -0.8128,0.5588 z m 2.1844,-9.7536 v -0.3048 q 0,-0.2032 -0.1016,-0.254 -0.1016,-0.1016 -0.4064,-0.0508 l -1.8288,0.1524 q -2.9464,0.2032 -5.4864,1.4732 -2.54,1.27 -2.54,3.9116 0,1.2192 0.8636,1.9812 0.9144,0.7112 2.4384,0.7112 1.3208,0 2.4892,-0.3556 1.1684,-0.4064 2.032,-1.0668 1.8796,-1.4224 2.0828,-2.8956 z" />
|
|
||||||
<path
|
|
||||||
id="path892"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Libre Franklin';-inkscape-font-specification:'Libre Franklin';fill:#487cff;fill-opacity:1;stroke-width:0.264583"
|
|
||||||
d="m 123.8636,131.86278 q -0.6096,0 -0.9144,-0.3556 -0.254,-0.3556 -0.1524,-0.9144 l 3.5052,-24.9428 q 0.0508,-0.4572 0.1524,-0.5588 0.1524,-0.1524 0.5588,-0.1524 h 6.0452 q 0.9144,0 0.7112,1.0668 l -0.3556,2.286 v 0.2032 q 0,0.3556 0.2032,0.3556 0.1524,0 0.4572,-0.3048 1.778,-1.8796 3.9624,-2.9972 2.1844,-1.1176 3.9624,-1.1176 1.0668,0 1.5748,0.1524 0.508,0.1524 0.4572,0.6096 l -0.8128,5.6896 q -0.0508,0.5588 -0.2032,0.7112 -0.1016,0.1524 -0.4064,0.1016 -1.7272,-0.254 -3.4544,-0.254 -1.3208,0 -2.794,0.7112 -1.4732,0.6604 -2.54,1.778 -1.016,1.0668 -1.1684,2.1336 l -2.0828,14.8336 q -0.1016,0.6604 -0.3556,0.8128 -0.2032,0.1524 -0.9652,0.1524 z" />
|
|
||||||
<path
|
|
||||||
id="path894"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Libre Franklin';-inkscape-font-specification:'Libre Franklin';fill:#487cff;fill-opacity:1;stroke-width:0.264583"
|
|
||||||
d="m 176.48129,130.08478 q 0.4572,0.8128 0.4572,1.2192 0,0.3048 -0.254,0.4572 -0.254,0.1016 -0.762,0.1016 h -7.0612 q -0.6096,0 -0.9652,-0.1524 -0.3048,-0.1524 -0.508,-0.6096 l -5.6388,-11.7348 q -0.254,-0.508 -0.508,-0.508 -0.1524,0 -0.5588,0.5588 l -9.0424,11.8364 q -0.254,0.4064 -0.6096,0.508 -0.3048,0.1016 -1.0668,0.1016 h -5.9436 q -1.016,0 -1.016,-0.6604 0,-0.4572 0.762,-1.524 l 13.0048,-16.3068 q 0.5588,-0.6096 0.5588,-1.0668 0,-0.3556 -0.1016,-0.5588 l -8.4836,-16.560802 q -0.1524,-0.254 -0.1524,-0.508 0,-0.508 0.762,-0.508 h 7.4168 q 0.6604,0 0.9144,0.1524 0.254,0.1524 0.508,0.6604 l 4.9276,10.363202 q 0.1524,0.4064 0.3556,0.4064 0.2032,0 0.508,-0.4064 l 8.0264,-10.566402 q 0.3048,-0.4064 0.5588,-0.508 0.3048,-0.1016 0.9652,-0.1016 h 6.5532 q 0.6096,0 0.6096,0.5588 0,0.4064 -0.3048,0.9144 l -12.5984,15.646402 q -0.508,0.6604 -0.508,0.9144 0,0.2032 0.1524,0.508 z" />
|
|
||||||
<path
|
|
||||||
id="path896"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Libre Franklin';-inkscape-font-specification:'Libre Franklin';fill:#487cff;fill-opacity:1;stroke-width:0.264583"
|
|
||||||
d="m 218.11268,94.169178 q 0.3556,0 0.4572,0.2032 0.1016,0.1524 0.0508,0.5588 l -5.1308,36.372802 q -0.0508,0.3556 -0.254,0.4572 -0.1524,0.1016 -0.5588,0.1016 h -5.1816 q -0.6604,0 -1.1684,-0.8128 l -13.1064,-22.7076 q -0.1524,-0.254 -0.3048,-0.254 -0.3048,0 -0.3556,0.5588 l -3.1496,22.4028 q -0.1016,0.508 -0.3048,0.6604 -0.1524,0.1524 -0.7112,0.1524 h -5.588 q -0.8128,0 -0.7112,-1.1176 l 5.08,-35.814002 q 0.1016,-0.508 0.2032,-0.6096 0.1524,-0.1524 0.6604,-0.1524 h 6.1468 q 0.508,0 0.762,0.254 0.3048,0.2032 0.5588,0.7112 l 11.9888,21.183602 q 0.254,0.4064 0.508,0.4064 0.4064,0 0.4572,-0.6096 l 2.9464,-21.285202 q 0.0508,-0.4064 0.2032,-0.508 0.2032,-0.1524 0.6604,-0.1524 z" />
|
|
||||||
<path
|
|
||||||
id="path898"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'Libre Franklin';-inkscape-font-specification:'Libre Franklin';fill:#487cff;fill-opacity:1;stroke-width:0.264583"
|
|
||||||
d="m 236.43958,132.37078 q -4.572,0 -7.9248,-1.9304 -3.3528,-1.9304 -5.1308,-5.4356 -1.7272,-3.556 -1.7272,-8.3312 0,-6.2992 2.4892,-11.5316 2.4892,-5.283202 7.0612,-8.382002 4.572,-3.0988 10.5156,-3.0988 4.064,0 7.1628,1.5748 3.1496,1.5748 4.8768,4.1656 1.7272,2.540002 1.8288,5.435602 0,0.508 -0.1016,0.762 -0.0508,0.2032 -0.254,0.254 l -6.9596,1.016 h -0.0508 q -0.2032,0 -0.3556,-0.254 -0.1016,-0.254 -0.254,-1.016 -0.3556,-2.54 -1.9304,-4.1148 -1.524,-1.574802 -4.318,-1.574802 -3.6068,0 -5.9944,2.641602 -2.3368,2.6416 -3.4544,6.8072 -1.1176,4.1148 -1.1176,8.5852 0,4.3688 1.6256,6.2992 1.6764,1.8796 4.8768,1.8796 3.0988,0 5.2324,-1.7272 2.1336,-1.7272 3.1496,-4.2164 l 0.3048,-1.4224 q 0.1524,-0.254 0.1524,-0.3556 0,-0.3048 -0.6096,-0.3048 h -6.2484 q -0.3048,0 -0.4064,-0.1016 -0.1016,-0.1524 -0.0508,-0.5588 l 0.4572,-4.1656 q 0.0508,-0.5588 0.508,-0.5588 l 14.5288,0.0508 q 0.6096,0 0.762,0.2032 0.2032,0.1524 0.1016,0.6604 l -2.4892,17.5768 q -0.0508,0.6604 -0.8128,0.6604 h -1.524 q -0.4572,0 -0.7112,-0.1524 -0.2032,-0.1524 -0.3556,-0.6096 l -0.8636,-3.7084 q -0.0508,-0.254 -0.3556,-0.254 -0.3048,0 -0.6604,0.4064 -1.6764,2.0828 -4.3688,3.4544 -2.6924,1.3716 -6.604,1.3716 z" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 10 KiB |
|
@ -1,20 +0,0 @@
|
||||||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
|
||||||
(function (w, d) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// add data- properties
|
|
||||||
var script = d.currentScript || (function () {
|
|
||||||
var scripts = d.getElementsByTagName('script');
|
|
||||||
return scripts[scripts.length - 1];
|
|
||||||
})();
|
|
||||||
|
|
||||||
w.searxng = {
|
|
||||||
settings: JSON.parse(atob(script.getAttribute('client_settings')))
|
|
||||||
};
|
|
||||||
|
|
||||||
// update the css
|
|
||||||
var htmlElement = d.getElementsByTagName("html")[0];
|
|
||||||
htmlElement.classList.remove('no-js');
|
|
||||||
htmlElement.classList.add('js');
|
|
||||||
|
|
||||||
})(window, document);
|
|
|
@ -1,165 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* (C) Copyright Contributors to the SearXNG project.
|
|
||||||
* (C) Copyright Contributors to the searx project (2014 - 2021).
|
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
*/
|
|
||||||
window.searxng = (function (w, d) {
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// not invented here toolkit with bugs fixed elsewhere
|
|
||||||
// purposes : be just good enough and as small as possible
|
|
||||||
|
|
||||||
// from https://plainjs.com/javascript/events/live-binding-event-handlers-14/
|
|
||||||
if (w.Element) {
|
|
||||||
(function (ElementPrototype) {
|
|
||||||
ElementPrototype.matches = ElementPrototype.matches ||
|
|
||||||
ElementPrototype.matchesSelector ||
|
|
||||||
ElementPrototype.webkitMatchesSelector ||
|
|
||||||
ElementPrototype.msMatchesSelector ||
|
|
||||||
function (selector) {
|
|
||||||
var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;
|
|
||||||
while (nodes[++i] && nodes[i] != node);
|
|
||||||
return !!nodes[i];
|
|
||||||
};
|
|
||||||
})(Element.prototype);
|
|
||||||
}
|
|
||||||
|
|
||||||
function callbackSafe (callback, el, e) {
|
|
||||||
try {
|
|
||||||
callback.call(el, e);
|
|
||||||
} catch (exception) {
|
|
||||||
console.log(exception);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var searxng = window.searxng || {};
|
|
||||||
|
|
||||||
searxng.on = function (obj, eventType, callback, useCapture) {
|
|
||||||
useCapture = useCapture || false;
|
|
||||||
if (typeof obj !== 'string') {
|
|
||||||
// obj HTMLElement, HTMLDocument
|
|
||||||
obj.addEventListener(eventType, callback, useCapture);
|
|
||||||
} else {
|
|
||||||
// obj is a selector
|
|
||||||
d.addEventListener(eventType, function (e) {
|
|
||||||
var el = e.target || e.srcElement, found = false;
|
|
||||||
while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement;
|
|
||||||
if (found) callbackSafe(callback, el, e);
|
|
||||||
}, useCapture);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.ready = function (callback) {
|
|
||||||
if (document.readyState != 'loading') {
|
|
||||||
callback.call(w);
|
|
||||||
} else {
|
|
||||||
w.addEventListener('DOMContentLoaded', callback.bind(w));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.http = function (method, url, data = null) {
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
try {
|
|
||||||
var req = new XMLHttpRequest();
|
|
||||||
req.open(method, url, true);
|
|
||||||
req.timeout = 20000;
|
|
||||||
|
|
||||||
// On load
|
|
||||||
req.onload = function () {
|
|
||||||
if (req.status == 200) {
|
|
||||||
resolve(req.response, req.responseType);
|
|
||||||
} else {
|
|
||||||
reject(Error(req.statusText));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Handle network errors
|
|
||||||
req.onerror = function () {
|
|
||||||
reject(Error("Network Error"));
|
|
||||||
};
|
|
||||||
|
|
||||||
req.onabort = function () {
|
|
||||||
reject(Error("Transaction is aborted"));
|
|
||||||
};
|
|
||||||
|
|
||||||
req.ontimeout = function () {
|
|
||||||
reject(Error("Timeout"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make the request
|
|
||||||
if (data) {
|
|
||||||
req.send(data)
|
|
||||||
} else {
|
|
||||||
req.send();
|
|
||||||
}
|
|
||||||
} catch (ex) {
|
|
||||||
reject(ex);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.loadStyle = function (src) {
|
|
||||||
var path = searxng.settings.theme_static_path + "/" + src,
|
|
||||||
id = "style_" + src.replace('.', '_'),
|
|
||||||
s = d.getElementById(id);
|
|
||||||
if (s === null) {
|
|
||||||
s = d.createElement('link');
|
|
||||||
s.setAttribute('id', id);
|
|
||||||
s.setAttribute('rel', 'stylesheet');
|
|
||||||
s.setAttribute('type', 'text/css');
|
|
||||||
s.setAttribute('href', path);
|
|
||||||
d.body.appendChild(s);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.loadScript = function (src, callback) {
|
|
||||||
var path = searxng.settings.theme_static_path + "/" + src,
|
|
||||||
id = "script_" + src.replace('.', '_'),
|
|
||||||
s = d.getElementById(id);
|
|
||||||
if (s === null) {
|
|
||||||
s = d.createElement('script');
|
|
||||||
s.setAttribute('id', id);
|
|
||||||
s.setAttribute('src', path);
|
|
||||||
s.onload = callback;
|
|
||||||
s.onerror = function () {
|
|
||||||
s.setAttribute('error', '1');
|
|
||||||
};
|
|
||||||
d.body.appendChild(s);
|
|
||||||
} else if (!s.hasAttribute('error')) {
|
|
||||||
try {
|
|
||||||
callback.apply(s, []);
|
|
||||||
} catch (exception) {
|
|
||||||
console.log(exception);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log("callback not executed : script '" + path + "' not loaded.");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.insertBefore = function (newNode, referenceNode) {
|
|
||||||
referenceNode.parentNode.insertBefore(newNode, referenceNode);
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.insertAfter = function (newNode, referenceNode) {
|
|
||||||
referenceNode.parentNode.insertAfter(newNode, referenceNode.nextSibling);
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.on('.close', 'click', function () {
|
|
||||||
this.parentNode.classList.add('invisible');
|
|
||||||
});
|
|
||||||
|
|
||||||
function getEndpoint () {
|
|
||||||
for (var className of d.getElementsByTagName('body')[0].classList.values()) {
|
|
||||||
if (className.endsWith('_endpoint')) {
|
|
||||||
return className.split('_')[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
searxng.endpoint = getEndpoint();
|
|
||||||
|
|
||||||
return searxng;
|
|
||||||
})(window, document);
|
|
|
@ -1,88 +0,0 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
|
|
||||||
/* global searxng */
|
|
||||||
|
|
||||||
searxng.ready(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
searxng.infinite_scroll_supported = (
|
|
||||||
'IntersectionObserver' in window &&
|
|
||||||
'IntersectionObserverEntry' in window &&
|
|
||||||
'intersectionRatio' in window.IntersectionObserverEntry.prototype);
|
|
||||||
|
|
||||||
if (searxng.endpoint !== 'results') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!searxng.infinite_scroll_supported) {
|
|
||||||
console.log('IntersectionObserver not supported');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let d = document;
|
|
||||||
var onlyImages = d.getElementById('results').classList.contains('only_template_images');
|
|
||||||
|
|
||||||
function newLoadSpinner () {
|
|
||||||
var loader = d.createElement('div');
|
|
||||||
loader.classList.add('loader');
|
|
||||||
return loader;
|
|
||||||
}
|
|
||||||
|
|
||||||
function replaceChildrenWith (element, children) {
|
|
||||||
element.textContent = '';
|
|
||||||
children.forEach(child => element.appendChild(child));
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadNextPage (callback) {
|
|
||||||
var form = d.querySelector('#pagination form.next_page');
|
|
||||||
if (!form) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
replaceChildrenWith(d.querySelector('#pagination'), [ newLoadSpinner() ]);
|
|
||||||
var formData = new FormData(form);
|
|
||||||
searxng.http('POST', d.querySelector('#search').getAttribute('action'), formData).then(
|
|
||||||
function (response) {
|
|
||||||
var nextPageDoc = new DOMParser().parseFromString(response, 'text/html');
|
|
||||||
var articleList = nextPageDoc.querySelectorAll('#urls article');
|
|
||||||
var paginationElement = nextPageDoc.querySelector('#pagination');
|
|
||||||
d.querySelector('#pagination').remove();
|
|
||||||
if (articleList.length > 0 && !onlyImages) {
|
|
||||||
// do not add <hr> element when there are only images
|
|
||||||
d.querySelector('#urls').appendChild(d.createElement('hr'));
|
|
||||||
}
|
|
||||||
articleList.forEach(articleElement => {
|
|
||||||
d.querySelector('#urls').appendChild(articleElement);
|
|
||||||
});
|
|
||||||
if (paginationElement) {
|
|
||||||
d.querySelector('#results').appendChild(paginationElement);
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
).catch(
|
|
||||||
function (err) {
|
|
||||||
console.log(err);
|
|
||||||
var e = d.createElement('div');
|
|
||||||
e.textContent = searxng.settings.translations.error_loading_next_page;
|
|
||||||
e.classList.add('dialog-error');
|
|
||||||
e.setAttribute('role', 'alert');
|
|
||||||
replaceChildrenWith(d.querySelector('#pagination'), [ e ]);
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (searxng.settings.infinite_scroll && searxng.infinite_scroll_supported) {
|
|
||||||
const intersectionObserveOptions = {
|
|
||||||
rootMargin: "20rem",
|
|
||||||
};
|
|
||||||
const observedSelector = 'article.result:last-child';
|
|
||||||
const observer = new IntersectionObserver(entries => {
|
|
||||||
const paginationEntry = entries[0];
|
|
||||||
if (paginationEntry.isIntersecting) {
|
|
||||||
observer.unobserve(paginationEntry.target);
|
|
||||||
loadNextPage(() => observer.observe(d.querySelector(observedSelector), intersectionObserveOptions));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
observer.observe(d.querySelector(observedSelector), intersectionObserveOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,461 +0,0 @@
|
||||||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
|
||||||
/* global searxng */
|
|
||||||
|
|
||||||
searxng.ready(function () {
|
|
||||||
|
|
||||||
function isElementInDetail (el) {
|
|
||||||
while (el !== undefined) {
|
|
||||||
if (el.classList.contains('detail')) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (el.classList.contains('result')) {
|
|
||||||
// we found a result, no need to go to the root of the document:
|
|
||||||
// el is not inside a <div class="detail"> element
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
el = el.parentNode;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getResultElement (el) {
|
|
||||||
while (el !== undefined) {
|
|
||||||
if (el.classList.contains('result')) {
|
|
||||||
return el;
|
|
||||||
}
|
|
||||||
el = el.parentNode;
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isImageResult (resultElement) {
|
|
||||||
return resultElement && resultElement.classList.contains('result-images');
|
|
||||||
}
|
|
||||||
|
|
||||||
searxng.on('.result', 'click', function (e) {
|
|
||||||
if (!isElementInDetail(e.target)) {
|
|
||||||
highlightResult(this)(true, true);
|
|
||||||
let resultElement = getResultElement(e.target);
|
|
||||||
if (isImageResult(resultElement)) {
|
|
||||||
e.preventDefault();
|
|
||||||
searxng.selectImage(resultElement);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
searxng.on('.result a', 'focus', function (e) {
|
|
||||||
if (!isElementInDetail(e.target)) {
|
|
||||||
let resultElement = getResultElement(e.target);
|
|
||||||
if (resultElement && resultElement.getAttribute("data-vim-selected") === null) {
|
|
||||||
highlightResult(resultElement)(true);
|
|
||||||
}
|
|
||||||
if (isImageResult(resultElement)) {
|
|
||||||
searxng.selectImage(resultElement);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, true);
|
|
||||||
|
|
||||||
/* common base for layouts */
|
|
||||||
var baseKeyBinding = {
|
|
||||||
'Escape': {
|
|
||||||
key: 'ESC',
|
|
||||||
fun: removeFocus,
|
|
||||||
des: 'remove focus from the focused input',
|
|
||||||
cat: 'Control'
|
|
||||||
},
|
|
||||||
'c': {
|
|
||||||
key: 'c',
|
|
||||||
fun: copyURLToClipboard,
|
|
||||||
des: 'copy url of the selected result to the clipboard',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
'h': {
|
|
||||||
key: 'h',
|
|
||||||
fun: toggleHelp,
|
|
||||||
des: 'toggle help window',
|
|
||||||
cat: 'Other'
|
|
||||||
},
|
|
||||||
'i': {
|
|
||||||
key: 'i',
|
|
||||||
fun: searchInputFocus,
|
|
||||||
des: 'focus on the search input',
|
|
||||||
cat: 'Control'
|
|
||||||
},
|
|
||||||
'n': {
|
|
||||||
key: 'n',
|
|
||||||
fun: GoToNextPage(),
|
|
||||||
des: 'go to next page',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
'o': {
|
|
||||||
key: 'o',
|
|
||||||
fun: openResult(false),
|
|
||||||
des: 'open search result',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
'p': {
|
|
||||||
key: 'p',
|
|
||||||
fun: GoToPreviousPage(),
|
|
||||||
des: 'go to previous page',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
'r': {
|
|
||||||
key: 'r',
|
|
||||||
fun: reloadPage,
|
|
||||||
des: 'reload page from the server',
|
|
||||||
cat: 'Control'
|
|
||||||
},
|
|
||||||
't': {
|
|
||||||
key: 't',
|
|
||||||
fun: openResult(true),
|
|
||||||
des: 'open the result in a new tab',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
};
|
|
||||||
var keyBindingLayouts = {
|
|
||||||
|
|
||||||
"default": Object.assign(
|
|
||||||
{ /* SearXNG layout */
|
|
||||||
'ArrowLeft': {
|
|
||||||
key: '←',
|
|
||||||
fun: highlightResult('up'),
|
|
||||||
des: 'select previous search result',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
'ArrowRight': {
|
|
||||||
key: '→',
|
|
||||||
fun: highlightResult('down'),
|
|
||||||
des: 'select next search result',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
}, baseKeyBinding),
|
|
||||||
|
|
||||||
'vim': Object.assign(
|
|
||||||
{ /* Vim-like Key Layout. */
|
|
||||||
'b': {
|
|
||||||
key: 'b',
|
|
||||||
fun: scrollPage(-window.innerHeight),
|
|
||||||
des: 'scroll one page up',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
'f': {
|
|
||||||
key: 'f',
|
|
||||||
fun: scrollPage(window.innerHeight),
|
|
||||||
des: 'scroll one page down',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
'u': {
|
|
||||||
key: 'u',
|
|
||||||
fun: scrollPage(-window.innerHeight / 2),
|
|
||||||
des: 'scroll half a page up',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
'd': {
|
|
||||||
key: 'd',
|
|
||||||
fun: scrollPage(window.innerHeight / 2),
|
|
||||||
des: 'scroll half a page down',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
'g': {
|
|
||||||
key: 'g',
|
|
||||||
fun: scrollPageTo(-document.body.scrollHeight, 'top'),
|
|
||||||
des: 'scroll to the top of the page',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
'v': {
|
|
||||||
key: 'v',
|
|
||||||
fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
|
|
||||||
des: 'scroll to the bottom of the page',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
'k': {
|
|
||||||
key: 'k',
|
|
||||||
fun: highlightResult('up'),
|
|
||||||
des: 'select previous search result',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
'j': {
|
|
||||||
key: 'j',
|
|
||||||
fun: highlightResult('down'),
|
|
||||||
des: 'select next search result',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
'y': {
|
|
||||||
key: 'y',
|
|
||||||
fun: copyURLToClipboard,
|
|
||||||
des: 'copy url of the selected result to the clipboard',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
}, baseKeyBinding)
|
|
||||||
}
|
|
||||||
|
|
||||||
var keyBindings = keyBindingLayouts[searxng.settings.hotkeys] || keyBindingLayouts.default;
|
|
||||||
|
|
||||||
searxng.on(document, "keydown", function (e) {
|
|
||||||
// check for modifiers so we don't break browser's hotkeys
|
|
||||||
if (
|
|
||||||
Object.prototype.hasOwnProperty.call(keyBindings, e.key)
|
|
||||||
&& !e.ctrlKey && !e.altKey
|
|
||||||
&& !e.shiftKey && !e.metaKey
|
|
||||||
) {
|
|
||||||
var tagName = e.target.tagName.toLowerCase();
|
|
||||||
if (e.key === 'Escape') {
|
|
||||||
keyBindings[e.key].fun(e);
|
|
||||||
} else {
|
|
||||||
if (e.target === document.body || tagName === 'a' || tagName === 'button') {
|
|
||||||
e.preventDefault();
|
|
||||||
keyBindings[e.key].fun();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function highlightResult (which) {
|
|
||||||
return function (noScroll, keepFocus) {
|
|
||||||
var current = document.querySelector('.result[data-vim-selected]'),
|
|
||||||
effectiveWhich = which;
|
|
||||||
if (current === null) {
|
|
||||||
// no selection : choose the first one
|
|
||||||
current = document.querySelector('.result');
|
|
||||||
if (current === null) {
|
|
||||||
// no first one : there are no results
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// replace up/down actions by selecting first one
|
|
||||||
if (which === "down" || which === "up") {
|
|
||||||
effectiveWhich = current;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var next, results = document.querySelectorAll('.result');
|
|
||||||
results = Array.from(results); // convert NodeList to Array for further use
|
|
||||||
|
|
||||||
if (typeof effectiveWhich !== 'string') {
|
|
||||||
next = effectiveWhich;
|
|
||||||
} else {
|
|
||||||
switch (effectiveWhich) {
|
|
||||||
case 'visible':
|
|
||||||
var top = document.documentElement.scrollTop || document.body.scrollTop;
|
|
||||||
var bot = top + document.documentElement.clientHeight;
|
|
||||||
|
|
||||||
for (var i = 0; i < results.length; i++) {
|
|
||||||
next = results[i];
|
|
||||||
var etop = next.offsetTop;
|
|
||||||
var ebot = etop + next.clientHeight;
|
|
||||||
|
|
||||||
if ((ebot <= bot) && (etop > top)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'down':
|
|
||||||
next = results[results.indexOf(current) + 1] || current;
|
|
||||||
break;
|
|
||||||
case 'up':
|
|
||||||
next = results[results.indexOf(current) - 1] || current;
|
|
||||||
break;
|
|
||||||
case 'bottom':
|
|
||||||
next = results[results.length - 1];
|
|
||||||
break;
|
|
||||||
case 'top':
|
|
||||||
/* falls through */
|
|
||||||
default:
|
|
||||||
next = results[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (next) {
|
|
||||||
current.removeAttribute('data-vim-selected');
|
|
||||||
next.setAttribute('data-vim-selected', 'true');
|
|
||||||
if (!keepFocus) {
|
|
||||||
var link = next.querySelector('h3 a') || next.querySelector('a');
|
|
||||||
if (link !== null) {
|
|
||||||
link.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!noScroll) {
|
|
||||||
scrollPageToSelected();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function reloadPage () {
|
|
||||||
document.location.reload(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeFocus (e) {
|
|
||||||
const tagName = e.target.tagName.toLowerCase();
|
|
||||||
if (document.activeElement && (tagName === 'input' || tagName === 'select' || tagName === 'textarea')) {
|
|
||||||
document.activeElement.blur();
|
|
||||||
} else {
|
|
||||||
searxng.closeDetail();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function pageButtonClick (css_selector) {
|
|
||||||
return function () {
|
|
||||||
var button = document.querySelector(css_selector);
|
|
||||||
if (button) {
|
|
||||||
button.click();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function GoToNextPage () {
|
|
||||||
return pageButtonClick('nav#pagination .next_page button[type="submit"]');
|
|
||||||
}
|
|
||||||
|
|
||||||
function GoToPreviousPage () {
|
|
||||||
return pageButtonClick('nav#pagination .previous_page button[type="submit"]');
|
|
||||||
}
|
|
||||||
|
|
||||||
function scrollPageToSelected () {
|
|
||||||
var sel = document.querySelector('.result[data-vim-selected]');
|
|
||||||
if (sel === null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var wtop = document.documentElement.scrollTop || document.body.scrollTop,
|
|
||||||
wheight = document.documentElement.clientHeight,
|
|
||||||
etop = sel.offsetTop,
|
|
||||||
ebot = etop + sel.clientHeight,
|
|
||||||
offset = 120;
|
|
||||||
// first element ?
|
|
||||||
if ((sel.previousElementSibling === null) && (ebot < wheight)) {
|
|
||||||
// set to the top of page if the first element
|
|
||||||
// is fully included in the viewport
|
|
||||||
window.scroll(window.scrollX, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (wtop > (etop - offset)) {
|
|
||||||
window.scroll(window.scrollX, etop - offset);
|
|
||||||
} else {
|
|
||||||
var wbot = wtop + wheight;
|
|
||||||
if (wbot < (ebot + offset)) {
|
|
||||||
window.scroll(window.scrollX, ebot - wheight + offset);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function scrollPage (amount) {
|
|
||||||
return function () {
|
|
||||||
window.scrollBy(0, amount);
|
|
||||||
highlightResult('visible')();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function scrollPageTo (position, nav) {
|
|
||||||
return function () {
|
|
||||||
window.scrollTo(0, position);
|
|
||||||
highlightResult(nav)();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchInputFocus () {
|
|
||||||
window.scrollTo(0, 0);
|
|
||||||
var q = document.querySelector('#q');
|
|
||||||
q.focus();
|
|
||||||
if (q.setSelectionRange) {
|
|
||||||
var len = q.value.length;
|
|
||||||
q.setSelectionRange(len, len);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function openResult (newTab) {
|
|
||||||
return function () {
|
|
||||||
var link = document.querySelector('.result[data-vim-selected] h3 a');
|
|
||||||
if (link === null) {
|
|
||||||
link = document.querySelector('.result[data-vim-selected] > a');
|
|
||||||
}
|
|
||||||
if (link !== null) {
|
|
||||||
var url = link.getAttribute('href');
|
|
||||||
if (newTab) {
|
|
||||||
window.open(url);
|
|
||||||
} else {
|
|
||||||
window.location.href = url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function initHelpContent (divElement) {
|
|
||||||
var categories = {};
|
|
||||||
|
|
||||||
for (var k in keyBindings) {
|
|
||||||
var key = keyBindings[k];
|
|
||||||
categories[key.cat] = categories[key.cat] || [];
|
|
||||||
categories[key.cat].push(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
var sorted = Object.keys(categories).sort(function (a, b) {
|
|
||||||
return categories[b].length - categories[a].length;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (sorted.length === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
|
|
||||||
html += '<h3>How to navigate SearXNG with hotkeys</h3>';
|
|
||||||
html += '<table>';
|
|
||||||
|
|
||||||
for (var i = 0; i < sorted.length; i++) {
|
|
||||||
var cat = categories[sorted[i]];
|
|
||||||
|
|
||||||
var lastCategory = i === (sorted.length - 1);
|
|
||||||
var first = i % 2 === 0;
|
|
||||||
|
|
||||||
if (first) {
|
|
||||||
html += '<tr>';
|
|
||||||
}
|
|
||||||
html += '<td>';
|
|
||||||
|
|
||||||
html += '<h4>' + cat[0].cat + '</h4>';
|
|
||||||
html += '<ul class="list-unstyled">';
|
|
||||||
|
|
||||||
for (var cj in cat) {
|
|
||||||
html += '<li><kbd>' + cat[cj].key + '</kbd> ' + cat[cj].des + '</li>';
|
|
||||||
}
|
|
||||||
|
|
||||||
html += '</ul>';
|
|
||||||
html += '</td>'; // col-sm-*
|
|
||||||
|
|
||||||
if (!first || lastCategory) {
|
|
||||||
html += '</tr>'; // row
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
html += '</table>';
|
|
||||||
|
|
||||||
divElement.innerHTML = html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleHelp () {
|
|
||||||
var helpPanel = document.querySelector('#vim-hotkeys-help');
|
|
||||||
if (helpPanel === undefined || helpPanel === null) {
|
|
||||||
// first call
|
|
||||||
helpPanel = document.createElement('div');
|
|
||||||
helpPanel.id = 'vim-hotkeys-help';
|
|
||||||
helpPanel.className = 'dialog-modal';
|
|
||||||
initHelpContent(helpPanel);
|
|
||||||
var body = document.getElementsByTagName('body')[0];
|
|
||||||
body.appendChild(helpPanel);
|
|
||||||
} else {
|
|
||||||
// toggle hidden
|
|
||||||
helpPanel.classList.toggle('invisible');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function copyURLToClipboard () {
|
|
||||||
var currentUrlElement = document.querySelector('.result[data-vim-selected] h3 a');
|
|
||||||
if (currentUrlElement === null) return;
|
|
||||||
|
|
||||||
const url = currentUrlElement.getAttribute('href');
|
|
||||||
navigator.clipboard.writeText(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
searxng.scrollPageToSelected = scrollPageToSelected;
|
|
||||||
searxng.selectNext = highlightResult('down');
|
|
||||||
searxng.selectPrevious = highlightResult('up');
|
|
||||||
});
|
|
|
@ -1,74 +0,0 @@
|
||||||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
|
||||||
/* global L */
|
|
||||||
(function (w, d, searxng) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
searxng.ready(function () {
|
|
||||||
searxng.on('.searxng_init_map', 'click', function (event) {
|
|
||||||
// no more request
|
|
||||||
this.classList.remove("searxng_init_map");
|
|
||||||
|
|
||||||
//
|
|
||||||
var leaflet_target = this.dataset.leafletTarget;
|
|
||||||
var map_lon = parseFloat(this.dataset.mapLon);
|
|
||||||
var map_lat = parseFloat(this.dataset.mapLat);
|
|
||||||
var map_zoom = parseFloat(this.dataset.mapZoom);
|
|
||||||
var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);
|
|
||||||
var map_geojson = JSON.parse(this.dataset.mapGeojson);
|
|
||||||
|
|
||||||
searxng.loadStyle('css/leaflet.css');
|
|
||||||
searxng.loadScript('js/leaflet.js', function () {
|
|
||||||
var map_bounds = null;
|
|
||||||
if (map_boundingbox) {
|
|
||||||
var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
|
|
||||||
var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
|
|
||||||
map_bounds = L.latLngBounds(southWest, northEast);
|
|
||||||
}
|
|
||||||
|
|
||||||
// init map
|
|
||||||
var map = L.map(leaflet_target);
|
|
||||||
// create the tile layer with correct attribution
|
|
||||||
var osmMapnikUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
|
||||||
var osmMapnikAttrib = 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
|
|
||||||
var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
|
|
||||||
var osmWikimediaUrl = 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
|
|
||||||
var osmWikimediaAttrib = 'Wikimedia maps | Maps data © <a href="https://openstreetmap.org">OpenStreetMap contributors</a>';
|
|
||||||
var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
|
|
||||||
// init map view
|
|
||||||
if (map_bounds) {
|
|
||||||
// TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
|
|
||||||
// Still useful ?
|
|
||||||
setTimeout(function () {
|
|
||||||
map.fitBounds(map_bounds, {
|
|
||||||
maxZoom: 17
|
|
||||||
});
|
|
||||||
}, 0);
|
|
||||||
} else if (map_lon && map_lat) {
|
|
||||||
if (map_zoom) {
|
|
||||||
map.setView(new L.latLng(map_lat, map_lon), map_zoom);
|
|
||||||
} else {
|
|
||||||
map.setView(new L.latLng(map_lat, map_lon), 8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
map.addLayer(osmMapnik);
|
|
||||||
|
|
||||||
var baseLayers = {
|
|
||||||
"OSM Mapnik": osmMapnik,
|
|
||||||
"OSM Wikimedia": osmWikimedia,
|
|
||||||
};
|
|
||||||
|
|
||||||
L.control.layers(baseLayers).addTo(map);
|
|
||||||
|
|
||||||
if (map_geojson) {
|
|
||||||
L.geoJson(map_geojson).addTo(map);
|
|
||||||
} /* else if(map_bounds) {
|
|
||||||
L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);
|
|
||||||
} */
|
|
||||||
});
|
|
||||||
|
|
||||||
// this event occur only once per element
|
|
||||||
event.preventDefault();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})(window, document, window.searxng);
|
|
|
@ -1,53 +0,0 @@
|
||||||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
|
||||||
(function (w, d, searxng) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
if (searxng.endpoint !== 'preferences') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
searxng.ready(function () {
|
|
||||||
let engine_descriptions = null;
|
|
||||||
function load_engine_descriptions () {
|
|
||||||
if (engine_descriptions == null) {
|
|
||||||
searxng.http("GET", "engine_descriptions.json").then(function (content) {
|
|
||||||
engine_descriptions = JSON.parse(content);
|
|
||||||
for (const [engine_name, description] of Object.entries(engine_descriptions)) {
|
|
||||||
let elements = d.querySelectorAll('[data-engine-name="' + engine_name + '"] .engine-description');
|
|
||||||
for (const element of elements) {
|
|
||||||
let source = ' (<i>' + searxng.settings.translations.Source + ': ' + description[1] + '</i>)';
|
|
||||||
element.innerHTML = description[0] + source;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const el of d.querySelectorAll('[data-engine-name]')) {
|
|
||||||
searxng.on(el, 'mouseenter', load_engine_descriptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
const enableAllEngines = d.querySelectorAll(".enable-all-engines");
|
|
||||||
const disableAllEngines = d.querySelectorAll(".disable-all-engines");
|
|
||||||
const engineToggles = d.querySelectorAll('tbody input[type=checkbox][class~=checkbox-onoff]');
|
|
||||||
const toggleEngines = (enable) => {
|
|
||||||
for (const el of engineToggles) {
|
|
||||||
// check if element visible, so that only engines of the current category are modified
|
|
||||||
if (el.offsetParent !== null) el.checked = !enable;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
for (const el of enableAllEngines) {
|
|
||||||
searxng.on(el, 'click', () => toggleEngines(true));
|
|
||||||
}
|
|
||||||
for (const el of disableAllEngines) {
|
|
||||||
searxng.on(el, 'click', () => toggleEngines(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
const copyHashButton = d.querySelector("#copy-hash");
|
|
||||||
searxng.on(copyHashButton, 'click', (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
navigator.clipboard.writeText(copyHashButton.dataset.hash);
|
|
||||||
copyHashButton.innerText = copyHashButton.dataset.copiedText;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})(window, document, window.searxng);
|
|
|
@ -1,184 +0,0 @@
|
||||||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
|
||||||
|
|
||||||
import "../../../node_modules/swiped-events/src/swiped-events.js";
|
|
||||||
|
|
||||||
(function (w, d, searxng) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
if (searxng.endpoint !== 'results') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
searxng.ready(function () {
|
|
||||||
d.querySelectorAll('#urls img').forEach(
|
|
||||||
img =>
|
|
||||||
img.addEventListener(
|
|
||||||
'error', () => {
|
|
||||||
// console.log("ERROR can't load: " + img.src);
|
|
||||||
img.src = window.searxng.settings.theme_static_path + "/img/img_load_error.svg";
|
|
||||||
},
|
|
||||||
{once: true}
|
|
||||||
));
|
|
||||||
|
|
||||||
if (d.querySelector('#search_url button#copy_url')) {
|
|
||||||
d.querySelector('#search_url button#copy_url').style.display = "block";
|
|
||||||
}
|
|
||||||
|
|
||||||
searxng.on('.btn-collapse', 'click', function () {
|
|
||||||
var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');
|
|
||||||
var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');
|
|
||||||
var target = this.getAttribute('data-target');
|
|
||||||
var targetElement = d.querySelector(target);
|
|
||||||
var html = this.innerHTML;
|
|
||||||
if (this.classList.contains('collapsed')) {
|
|
||||||
html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);
|
|
||||||
} else {
|
|
||||||
html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);
|
|
||||||
}
|
|
||||||
this.innerHTML = html;
|
|
||||||
this.classList.toggle('collapsed');
|
|
||||||
targetElement.classList.toggle('invisible');
|
|
||||||
});
|
|
||||||
|
|
||||||
searxng.on('.media-loader', 'click', function () {
|
|
||||||
var target = this.getAttribute('data-target');
|
|
||||||
var iframe_load = d.querySelector(target + ' > iframe');
|
|
||||||
var srctest = iframe_load.getAttribute('src');
|
|
||||||
if (srctest === null || srctest === undefined || srctest === false) {
|
|
||||||
iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
searxng.on('#copy_url', 'click', function () {
|
|
||||||
var target = this.parentElement.querySelector('pre');
|
|
||||||
navigator.clipboard.writeText(target.innerText);
|
|
||||||
this.innerText = this.dataset.copiedText;
|
|
||||||
});
|
|
||||||
|
|
||||||
// searxng.selectImage (gallery)
|
|
||||||
// -----------------------------
|
|
||||||
|
|
||||||
// setTimeout() ID, needed to cancel *last* loadImage
|
|
||||||
let imgTimeoutID;
|
|
||||||
|
|
||||||
// progress spinner, while an image is loading
|
|
||||||
const imgLoaderSpinner = d.createElement('div');
|
|
||||||
imgLoaderSpinner.classList.add('loader');
|
|
||||||
|
|
||||||
// singleton image object, which is used for all loading processes of a
|
|
||||||
// detailed image
|
|
||||||
const imgLoader = new Image();
|
|
||||||
|
|
||||||
const loadImage = (imgSrc, onSuccess) => {
|
|
||||||
// if defered image load exists, stop defered task.
|
|
||||||
if (imgTimeoutID) clearTimeout(imgTimeoutID);
|
|
||||||
|
|
||||||
// defer load of the detail image for 1 sec
|
|
||||||
imgTimeoutID = setTimeout(() => {
|
|
||||||
imgLoader.src = imgSrc;
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
// set handlers in the on-properties
|
|
||||||
imgLoader.onload = () => {
|
|
||||||
onSuccess();
|
|
||||||
imgLoaderSpinner.remove();
|
|
||||||
};
|
|
||||||
imgLoader.onerror = () => {
|
|
||||||
imgLoaderSpinner.remove();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.selectImage = (resultElement) => {
|
|
||||||
|
|
||||||
// add a class that can be evaluated in the CSS and indicates that the
|
|
||||||
// detail view is open
|
|
||||||
d.getElementById('results').classList.add('image-detail-open');
|
|
||||||
|
|
||||||
// add a hash to the browser history so that pressing back doesn't return
|
|
||||||
// to the previous page this allows us to dismiss the image details on
|
|
||||||
// pressing the back button on mobile devices
|
|
||||||
window.location.hash = '#image-viewer';
|
|
||||||
|
|
||||||
searxng.scrollPageToSelected();
|
|
||||||
|
|
||||||
// if there is none element given by the caller, stop here
|
|
||||||
if (!resultElement) return;
|
|
||||||
|
|
||||||
// find <img> object in the element, if there is none, stop here.
|
|
||||||
const img = resultElement.querySelector('.result-images-source img');
|
|
||||||
if (!img) return;
|
|
||||||
|
|
||||||
// <img src="" data-src="http://example.org/image.jpg">
|
|
||||||
const src = img.getAttribute('data-src');
|
|
||||||
|
|
||||||
// already loaded high-res image or no high-res image available
|
|
||||||
if (!src) return;
|
|
||||||
|
|
||||||
// use the image thumbnail until the image is fully loaded
|
|
||||||
const thumbnail = resultElement.querySelector('.image_thumbnail');
|
|
||||||
img.src = thumbnail.src;
|
|
||||||
|
|
||||||
// show a progress spinner
|
|
||||||
const detailElement = resultElement.querySelector('.detail');
|
|
||||||
detailElement.appendChild(imgLoaderSpinner);
|
|
||||||
|
|
||||||
// load full size image in background
|
|
||||||
loadImage(src, () => {
|
|
||||||
// after the singelton loadImage has loaded the detail image into the
|
|
||||||
// cache, it can be used in the origin <img> as src property.
|
|
||||||
img.src = src;
|
|
||||||
img.removeAttribute('data-src');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.closeDetail = function () {
|
|
||||||
d.getElementById('results').classList.remove('image-detail-open');
|
|
||||||
// remove #image-viewer hash from url by navigating back
|
|
||||||
if (window.location.hash == '#image-viewer') window.history.back();
|
|
||||||
searxng.scrollPageToSelected();
|
|
||||||
};
|
|
||||||
searxng.on('.result-detail-close', 'click', e => {
|
|
||||||
e.preventDefault();
|
|
||||||
searxng.closeDetail();
|
|
||||||
});
|
|
||||||
searxng.on('.result-detail-previous', 'click', e => {
|
|
||||||
e.preventDefault();
|
|
||||||
searxng.selectPrevious(false);
|
|
||||||
});
|
|
||||||
searxng.on('.result-detail-next', 'click', e => {
|
|
||||||
e.preventDefault();
|
|
||||||
searxng.selectNext(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
// listen for the back button to be pressed and dismiss the image details when called
|
|
||||||
window.addEventListener('hashchange', () => {
|
|
||||||
if (window.location.hash != '#image-viewer') searxng.closeDetail();
|
|
||||||
});
|
|
||||||
|
|
||||||
d.querySelectorAll('.swipe-horizontal').forEach(
|
|
||||||
obj => {
|
|
||||||
obj.addEventListener('swiped-left', function () {
|
|
||||||
searxng.selectNext(false);
|
|
||||||
});
|
|
||||||
obj.addEventListener('swiped-right', function () {
|
|
||||||
searxng.selectPrevious(false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
w.addEventListener('scroll', function () {
|
|
||||||
var e = d.getElementById('backToTop'),
|
|
||||||
scrollTop = document.documentElement.scrollTop || document.body.scrollTop,
|
|
||||||
results = d.getElementById('results');
|
|
||||||
if (e !== null) {
|
|
||||||
if (scrollTop >= 100) {
|
|
||||||
results.classList.add('scrolling');
|
|
||||||
} else {
|
|
||||||
results.classList.remove('scrolling');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, true);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
})(window, document, window.searxng);
|
|
|
@ -1,199 +0,0 @@
|
||||||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
|
||||||
/* exported AutoComplete */
|
|
||||||
|
|
||||||
(function (w, d, searxng) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var qinput_id = "q", qinput;
|
|
||||||
|
|
||||||
const isMobile = window.matchMedia("only screen and (max-width: 50em)").matches;
|
|
||||||
const isResultsPage = document.querySelector("main").id == "main_results";
|
|
||||||
|
|
||||||
function submitIfQuery () {
|
|
||||||
if (qinput.value.length > 0) {
|
|
||||||
var search = document.getElementById('search');
|
|
||||||
setTimeout(search.submit.bind(search), 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createClearButton (qinput) {
|
|
||||||
var cs = document.getElementById('clear_search');
|
|
||||||
var updateClearButton = function () {
|
|
||||||
if (qinput.value.length === 0) {
|
|
||||||
cs.classList.add("empty");
|
|
||||||
} else {
|
|
||||||
cs.classList.remove("empty");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// update status, event listener
|
|
||||||
updateClearButton();
|
|
||||||
cs.addEventListener('click', function (ev) {
|
|
||||||
qinput.value = '';
|
|
||||||
qinput.focus();
|
|
||||||
updateClearButton();
|
|
||||||
ev.preventDefault();
|
|
||||||
});
|
|
||||||
qinput.addEventListener('input', updateClearButton, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
const fetchResults = async (query) => {
|
|
||||||
let request;
|
|
||||||
if (searxng.settings.method === 'GET') {
|
|
||||||
const reqParams = new URLSearchParams();
|
|
||||||
reqParams.append("q", query);
|
|
||||||
request = fetch("./autocompleter?" + reqParams.toString());
|
|
||||||
} else {
|
|
||||||
const formData = new FormData();
|
|
||||||
formData.append("q", query);
|
|
||||||
request = fetch("./autocompleter", {
|
|
||||||
method: 'POST',
|
|
||||||
body: formData,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
request.then(async function (response) {
|
|
||||||
const results = await response.json();
|
|
||||||
|
|
||||||
if (!results) return;
|
|
||||||
|
|
||||||
const autocomplete = d.querySelector(".autocomplete");
|
|
||||||
const autocompleteList = d.querySelector(".autocomplete ul");
|
|
||||||
autocomplete.classList.add("open");
|
|
||||||
autocompleteList.innerHTML = "";
|
|
||||||
|
|
||||||
// show an error message that no result was found
|
|
||||||
if (!results[1] || results[1].length == 0) {
|
|
||||||
const noItemFoundMessage = document.createElement("li");
|
|
||||||
noItemFoundMessage.classList.add('no-item-found');
|
|
||||||
noItemFoundMessage.innerHTML = searxng.settings.translations.no_item_found;
|
|
||||||
autocompleteList.appendChild(noItemFoundMessage);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let result of results[1]) {
|
|
||||||
const li = document.createElement("li");
|
|
||||||
li.innerText = result;
|
|
||||||
|
|
||||||
searxng.on(li, 'mousedown', () => {
|
|
||||||
qinput.value = result;
|
|
||||||
const form = d.querySelector("#search");
|
|
||||||
form.submit();
|
|
||||||
autocomplete.classList.remove('open');
|
|
||||||
});
|
|
||||||
autocompleteList.appendChild(li);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
searxng.ready(function () {
|
|
||||||
// focus search input on large screens
|
|
||||||
if (!isMobile && !isResultsPage) document.getElementById("q").focus();
|
|
||||||
|
|
||||||
qinput = d.getElementById(qinput_id);
|
|
||||||
const autocomplete = d.querySelector(".autocomplete");
|
|
||||||
const autocompleteList = d.querySelector(".autocomplete ul");
|
|
||||||
|
|
||||||
if (qinput !== null) {
|
|
||||||
// clear button
|
|
||||||
createClearButton(qinput);
|
|
||||||
|
|
||||||
// autocompleter
|
|
||||||
if (searxng.settings.autocomplete) {
|
|
||||||
searxng.on(qinput, 'input', () => {
|
|
||||||
const query = qinput.value;
|
|
||||||
if (query.length < searxng.settings.autocomplete_min) return;
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
if (query == qinput.value) fetchResults(query);
|
|
||||||
}, 300);
|
|
||||||
});
|
|
||||||
|
|
||||||
searxng.on(qinput, 'keyup', (e) => {
|
|
||||||
let currentIndex = -1;
|
|
||||||
const listItems = autocompleteList.children;
|
|
||||||
for (let i = 0; i < listItems.length; i++) {
|
|
||||||
if (listItems[i].classList.contains('active')) {
|
|
||||||
currentIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let newCurrentIndex = -1;
|
|
||||||
if (e.key === "ArrowUp") {
|
|
||||||
if (currentIndex >= 0) listItems[currentIndex].classList.remove('active');
|
|
||||||
// we need to add listItems.length to the index calculation here because the JavaScript modulos
|
|
||||||
// operator doesn't work with negative numbers
|
|
||||||
newCurrentIndex = (currentIndex - 1 + listItems.length) % listItems.length;
|
|
||||||
} else if (e.key === "ArrowDown") {
|
|
||||||
if (currentIndex >= 0) listItems[currentIndex].classList.remove('active');
|
|
||||||
newCurrentIndex = (currentIndex + 1) % listItems.length;
|
|
||||||
} else if (e.key === "Tab" || e.key === "Enter") {
|
|
||||||
autocomplete.classList.remove('open');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newCurrentIndex != -1) {
|
|
||||||
const selectedItem = listItems[newCurrentIndex];
|
|
||||||
selectedItem.classList.add('active');
|
|
||||||
|
|
||||||
if (!selectedItem.classList.contains('no-item-found')) qinput.value = selectedItem.innerText;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Additionally to searching when selecting a new category, we also
|
|
||||||
// automatically start a new search request when the user changes a search
|
|
||||||
// filter (safesearch, time range or language) (this requires JavaScript
|
|
||||||
// though)
|
|
||||||
if (
|
|
||||||
qinput !== null
|
|
||||||
&& searxng.settings.search_on_category_select
|
|
||||||
// If .search_filters is undefined (invisible) we are on the homepage and
|
|
||||||
// hence don't have to set any listeners
|
|
||||||
&& d.querySelector(".search_filters") != null
|
|
||||||
) {
|
|
||||||
searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);
|
|
||||||
searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);
|
|
||||||
searxng.on(d.getElementById('language'), 'change', submitIfQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
const categoryButtons = d.querySelectorAll("button.category_button");
|
|
||||||
for (let button of categoryButtons) {
|
|
||||||
searxng.on(button, 'click', (event) => {
|
|
||||||
if (event.shiftKey) {
|
|
||||||
event.preventDefault();
|
|
||||||
button.classList.toggle("selected");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// manually deselect the old selection when a new category is selected
|
|
||||||
const selectedCategories = d.querySelectorAll("button.category_button.selected");
|
|
||||||
for (let categoryButton of selectedCategories) {
|
|
||||||
categoryButton.classList.remove("selected");
|
|
||||||
}
|
|
||||||
button.classList.add("selected");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// override form submit action to update the actually selected categories
|
|
||||||
const form = d.querySelector("#search");
|
|
||||||
if (form != null) {
|
|
||||||
searxng.on(form, 'submit', (event) => {
|
|
||||||
event.preventDefault();
|
|
||||||
const categoryValuesInput = d.querySelector("#selected-categories");
|
|
||||||
if (categoryValuesInput) {
|
|
||||||
let categoryValues = [];
|
|
||||||
for (let categoryButton of categoryButtons) {
|
|
||||||
if (categoryButton.classList.contains("selected")) {
|
|
||||||
categoryValues.push(categoryButton.name.replace("category_", ""));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
categoryValuesInput.value = categoryValues.join(",");
|
|
||||||
}
|
|
||||||
form.submit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
})(window, document, window.searxng);
|
|
|
@ -1 +0,0 @@
|
||||||
import "./head/00_init.js";
|
|
|
@ -1,7 +0,0 @@
|
||||||
import "./main/00_toolkit.js";
|
|
||||||
import "./main/infinite_scroll.js";
|
|
||||||
import "./main/keyboard.js";
|
|
||||||
import "./main/mapresult.js";
|
|
||||||
import "./main/preferences.js";
|
|
||||||
import "./main/results.js";
|
|
||||||
import "./main/search.js";
|
|
|
@ -1,19 +0,0 @@
|
||||||
.dialog-modal {
|
|
||||||
animation-name: dialogmodal;
|
|
||||||
animation-duration: 0.13s;
|
|
||||||
|
|
||||||
@keyframes dialogmodal {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
opacity: 0.5;
|
|
||||||
transform: translate(-50%, -50%) scale(1.05);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input.checkbox-onoff[type="checkbox"]::before {
|
|
||||||
transition: left 0.25s;
|
|
||||||
}
|
|
|
@ -1,73 +0,0 @@
|
||||||
/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */
|
|
||||||
|
|
||||||
.autocomplete {
|
|
||||||
position: absolute;
|
|
||||||
width: @search-width;
|
|
||||||
max-width: calc(100% - 2 * @search-padding-horizontal);
|
|
||||||
max-height: 0;
|
|
||||||
overflow-y: hidden;
|
|
||||||
.ltr-text-align-left();
|
|
||||||
|
|
||||||
.rounded-corners;
|
|
||||||
|
|
||||||
&:active,
|
|
||||||
&:focus,
|
|
||||||
&:hover {
|
|
||||||
background-color: var(--color-autocomplete-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:empty {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
> ul {
|
|
||||||
list-style-type: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
> li {
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0.5rem 1rem;
|
|
||||||
|
|
||||||
&.active,
|
|
||||||
&:active,
|
|
||||||
&:focus,
|
|
||||||
&:hover {
|
|
||||||
background-color: var(--color-autocomplete-background-hover);
|
|
||||||
|
|
||||||
a:active,
|
|
||||||
a:focus,
|
|
||||||
a:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.locked {
|
|
||||||
cursor: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.open {
|
|
||||||
display: block;
|
|
||||||
background-color: var(--color-autocomplete-background);
|
|
||||||
color: var(--color-autocomplete-font);
|
|
||||||
max-height: 32rem;
|
|
||||||
overflow-y: auto;
|
|
||||||
z-index: 5000;
|
|
||||||
margin-top: 3.5rem;
|
|
||||||
border-radius: 0.8rem;
|
|
||||||
|
|
||||||
&:empty {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @phone) {
|
|
||||||
.autocomplete {
|
|
||||||
> ul > li {
|
|
||||||
padding: 1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
@import "../../generated/pygments.less";
|
|
||||||
|
|
||||||
.codelines {
|
|
||||||
margin: @results-margin 0 0 0;
|
|
||||||
padding: @result-padding 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-highlight-sxng() {
|
|
||||||
.code-highlight {
|
|
||||||
pre {
|
|
||||||
overflow: auto;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0 0 0.75rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.linenos {
|
|
||||||
user-select: none;
|
|
||||||
cursor: default;
|
|
||||||
|
|
||||||
&::selection {
|
|
||||||
background: transparent; /* WebKit/Blink Browsers */
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-moz-selection {
|
|
||||||
background: transparent; /* Gecko Browsers */
|
|
||||||
}
|
|
||||||
margin-right: 8px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.linenos {
|
|
||||||
color: var(--color-line-number);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-highlight-sxng();
|
|
||||||
|
|
||||||
/// Dark Theme (autoswitch based on device pref)
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root.theme-auto {
|
|
||||||
.code-highlight-dark();
|
|
||||||
.code-highlight-sxng();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dark Theme by preferences
|
|
||||||
:root.theme-dark {
|
|
||||||
.code-highlight-dark();
|
|
||||||
.code-highlight-sxng();
|
|
||||||
}
|
|
|
@ -1,313 +0,0 @@
|
||||||
/*
|
|
||||||
* SearXNG, A privacy-respecting, hackable metasearch engine
|
|
||||||
*
|
|
||||||
* To change the colors of the site, simple edit this variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// Light Theme
|
|
||||||
:root {
|
|
||||||
/// Base Colors
|
|
||||||
--color-base-font: #444;
|
|
||||||
--color-base-font-rgb: 68, 68, 68;
|
|
||||||
--color-base-background: #fff;
|
|
||||||
--color-base-background-mobile: #f2f5f8;
|
|
||||||
--color-url-font: #334999;
|
|
||||||
--color-url-visited-font: #9822c3;
|
|
||||||
/// Header Colors
|
|
||||||
--color-header-background: #fdfbff;
|
|
||||||
--color-header-border: #ddd;
|
|
||||||
/// Footer Colors
|
|
||||||
--color-footer-background: #fdfbff;
|
|
||||||
--color-footer-border: #ddd;
|
|
||||||
/// Sidebar Colors
|
|
||||||
--color-sidebar-border: #ddd;
|
|
||||||
--color-sidebar-font: #000;
|
|
||||||
--color-sidebar-background: #fff;
|
|
||||||
/// BackToTop Colors
|
|
||||||
--color-backtotop-font: #444;
|
|
||||||
--color-backtotop-border: #ddd;
|
|
||||||
--color-backtotop-background: #fff;
|
|
||||||
/// Button Colors
|
|
||||||
--color-btn-background: #3050ff;
|
|
||||||
--color-btn-font: #fff;
|
|
||||||
--color-show-btn-background: #bbb;
|
|
||||||
--color-show-btn-font: #000;
|
|
||||||
/// Search Input Colors
|
|
||||||
--color-search-border: #bbb;
|
|
||||||
--color-search-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
|
||||||
--color-search-background: #fff;
|
|
||||||
--color-search-font: #222;
|
|
||||||
--color-search-background-hover: #3050ff;
|
|
||||||
/// Modal Colors
|
|
||||||
--color-error: #db3434;
|
|
||||||
--color-error-background: lighten(#db3434, 40%);
|
|
||||||
--color-warning: #dbba34;
|
|
||||||
--color-warning-background: lighten(#dbba34, 40%);
|
|
||||||
--color-success: #42db34;
|
|
||||||
--color-success-background: lighten(#42db34, 40%);
|
|
||||||
/// Categories Colors
|
|
||||||
--color-categories-item-selected-font: #3050ff;
|
|
||||||
--color-categories-item-border-selected: #3050ff;
|
|
||||||
/// Autocomplete Colors
|
|
||||||
--color-autocomplete-font: #000;
|
|
||||||
--color-autocomplete-border: #bbb;
|
|
||||||
--color-autocomplete-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
|
||||||
--color-autocomplete-background: #fff;
|
|
||||||
--color-autocomplete-background-hover: #e3e3e3;
|
|
||||||
/// Answer Colors
|
|
||||||
--color-answer-font: #444; // same as --color-base-font
|
|
||||||
--color-answer-background: #fff;
|
|
||||||
// colors of the KeyValue result class
|
|
||||||
--color-result-keyvalue-col-table: #fdfbff;
|
|
||||||
--color-result-keyvalue-odd: #fdfbff;
|
|
||||||
--color-result-keyvalue-even: #fff;
|
|
||||||
/// Results Colors
|
|
||||||
--color-result-background: #fff;
|
|
||||||
--color-result-border: #ddd;
|
|
||||||
--color-result-url-font: #000;
|
|
||||||
--color-result-vim-selected: #f7f7f7;
|
|
||||||
--color-result-vim-arrow: #000bbb;
|
|
||||||
--color-result-description-highlight-font: #000;
|
|
||||||
--color-result-link-font: #000bbb;
|
|
||||||
--color-result-link-font-highlight: #000bbb;
|
|
||||||
--color-result-link-visited-font: #9822c3;
|
|
||||||
--color-result-publishdate-font: #777;
|
|
||||||
--color-result-engines-font: #545454;
|
|
||||||
--color-result-search-url-border: #ddd;
|
|
||||||
--color-result-search-url-font: #000;
|
|
||||||
// Images Colors
|
|
||||||
--color-result-image-span-font: #444;
|
|
||||||
--color-result-image-span-font-selected: #fff;
|
|
||||||
--color-result-image-background: #fff;
|
|
||||||
/// Settings Colors
|
|
||||||
--color-settings-tr-hover: #ebebeb;
|
|
||||||
--color-settings-engine-description-font: #545454;
|
|
||||||
--color-settings-table-group-background: #0001;
|
|
||||||
/// Detail modal
|
|
||||||
--color-result-detail-font: #fff;
|
|
||||||
--color-result-detail-label-font: lightgray;
|
|
||||||
--color-result-detail-background: #242424;
|
|
||||||
--color-result-detail-hr: #555;
|
|
||||||
--color-result-detail-link: #8af;
|
|
||||||
--color-result-detail-loader-border: rgb(255 255 255 / 20%);
|
|
||||||
--color-result-detail-loader-borderleft: rgb(0 0 0 / 0%);
|
|
||||||
/// Toolkit Colors
|
|
||||||
--color-toolkit-badge-font: #fff;
|
|
||||||
--color-toolkit-badge-background: #545454;
|
|
||||||
--color-toolkit-kbd-font: #fff;
|
|
||||||
--color-toolkit-kbd-background: #000;
|
|
||||||
--color-toolkit-dialog-border: #ddd;
|
|
||||||
--color-toolkit-dialog-background: #fff;
|
|
||||||
--color-toolkit-tabs-label-border: #fff;
|
|
||||||
--color-toolkit-tabs-section-border: #ddd;
|
|
||||||
--color-toolkit-select-background: #e1e1e1;
|
|
||||||
--color-toolkit-select-border: #ddd;
|
|
||||||
--color-toolkit-select-background-hover: #bbb;
|
|
||||||
--color-toolkit-input-text-font: #222;
|
|
||||||
--color-toolkit-checkbox-onoff-off-background: #ddd;
|
|
||||||
--color-toolkit-checkbox-onoff-on-background: #ddd;
|
|
||||||
--color-toolkit-checkbox-onoff-on-mark-background: #3050ff;
|
|
||||||
--color-toolkit-checkbox-onoff-on-mark-color: #fff;
|
|
||||||
--color-toolkit-checkbox-onoff-off-mark-background: #aaa;
|
|
||||||
--color-toolkit-checkbox-onoff-off-mark-color: #fff;
|
|
||||||
--color-toolkit-checkbox-label-background: #ddd;
|
|
||||||
--color-toolkit-checkbox-label-border: #ddd;
|
|
||||||
--color-toolkit-checkbox-input-border: #3050ff;
|
|
||||||
--color-toolkit-engine-tooltip-border: #ddd;
|
|
||||||
--color-toolkit-engine-tooltip-background: #fff;
|
|
||||||
--color-toolkit-loader-border: rgb(0 0 0 / 20%);
|
|
||||||
--color-toolkit-loader-borderleft: rgb(255 255 255 / 0%);
|
|
||||||
--color-doc-code: #003;
|
|
||||||
--color-doc-code-background: #ddeaff;
|
|
||||||
/// Other misc colors
|
|
||||||
--color-bar-chart-primary: #5bc0de;
|
|
||||||
--color-bar-chart-secondary: #deb15b;
|
|
||||||
--color-image-resolution-background: rgb(0 0 0 / 50%);
|
|
||||||
--color-image-resolution-font: #fff;
|
|
||||||
--color-loading-indicator: rgb(255 255 255 / 20%);
|
|
||||||
--color-loading-indicator-gap: #fff;
|
|
||||||
--color-line-number: #64708d;
|
|
||||||
// Favicons Colors
|
|
||||||
--color-favicon-background-color: #ddd;
|
|
||||||
--color-favicon-border-color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark-themes() {
|
|
||||||
/// Base Colors
|
|
||||||
--color-base-font: #bbb;
|
|
||||||
--color-base-font-rgb: 187, 187, 187;
|
|
||||||
--color-base-background: #222428;
|
|
||||||
--color-base-background-mobile: #222428;
|
|
||||||
--color-url-font: #8af;
|
|
||||||
--color-url-visited-font: #c09cd9;
|
|
||||||
/// Header Colors
|
|
||||||
--color-header-background: #1e1e22;
|
|
||||||
--color-header-border: #333;
|
|
||||||
/// Footer Colors
|
|
||||||
--color-footer-background: #1e1e22;
|
|
||||||
--color-footer-border: #333;
|
|
||||||
/// Sidebar Colors
|
|
||||||
--color-sidebar-border: #555;
|
|
||||||
--color-sidebar-font: #fff;
|
|
||||||
--color-sidebar-background: #292c34;
|
|
||||||
/// BackToTop Colors
|
|
||||||
--color-backtotop-font: #bbb;
|
|
||||||
--color-backtotop-border: #333;
|
|
||||||
--color-backtotop-background: #2b2e36;
|
|
||||||
/// Button Colors
|
|
||||||
--color-btn-background: #58f;
|
|
||||||
--color-btn-font: #222;
|
|
||||||
--color-show-btn-background: #555;
|
|
||||||
--color-show-btn-font: #fff;
|
|
||||||
/// Search Input Colors
|
|
||||||
--color-search-border: #555;
|
|
||||||
--color-search-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
|
||||||
--color-search-background: #2b2e36;
|
|
||||||
--color-search-font: #fff;
|
|
||||||
--color-search-background-hover: #58f;
|
|
||||||
/// Modal Colors
|
|
||||||
--color-error: #f55b5b;
|
|
||||||
--color-error-background: darken(#db3434, 40%);
|
|
||||||
--color-warning: #f1d561;
|
|
||||||
--color-warning-background: darken(#dbba34, 40%);
|
|
||||||
--color-success: #79f56e;
|
|
||||||
--color-success-background: darken(#42db34, 40%);
|
|
||||||
/// Categories Colors
|
|
||||||
--color-categories-item-selected-font: #58f;
|
|
||||||
--color-categories-item-border-selected: #58f;
|
|
||||||
/// Autocomplete Colors
|
|
||||||
--color-autocomplete-font: #fff;
|
|
||||||
--color-autocomplete-border: #555;
|
|
||||||
--color-autocomplete-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
|
||||||
--color-autocomplete-background: #2b2e36;
|
|
||||||
--color-autocomplete-background-hover: #1e1e22;
|
|
||||||
/// Answer Colors
|
|
||||||
--color-answer-font: #bbb; // same as --color-base-font
|
|
||||||
--color-answer-background: #26292f;
|
|
||||||
// colors of the KeyValue result class
|
|
||||||
--color-result-keyvalue-col-table: #1e1e22;
|
|
||||||
--color-result-keyvalue-odd: #1e1e22;
|
|
||||||
--color-result-keyvalue-even: #26292f;
|
|
||||||
/// Results Colors
|
|
||||||
--color-result-background: #26292f;
|
|
||||||
--color-result-border: #333;
|
|
||||||
--color-result-url-font: #fff;
|
|
||||||
--color-result-vim-selected: #1f1f23cc;
|
|
||||||
--color-result-vim-arrow: #8af;
|
|
||||||
--color-result-description-highlight-font: #fff;
|
|
||||||
--color-result-link-font: #8af;
|
|
||||||
--color-result-link-font-highlight: #8af;
|
|
||||||
--color-result-link-visited-font: #c09cd9;
|
|
||||||
--color-result-publishdate-font: #888;
|
|
||||||
--color-result-engines-font: #a4a4a4;
|
|
||||||
--color-result-search-url-border: #555;
|
|
||||||
--color-result-search-url-font: #fff;
|
|
||||||
/// Detail modal : same as the light version
|
|
||||||
--color-result-detail-font: #fff;
|
|
||||||
--color-result-detail-label-font: lightgray;
|
|
||||||
--color-result-detail-background: #1a1a1c;
|
|
||||||
--color-result-detail-hr: #555;
|
|
||||||
--color-result-detail-link: #8af;
|
|
||||||
--color-result-detail-loader-border: rgb(255 255 255 / 20%);
|
|
||||||
--color-result-detail-loader-borderleft: rgb(0 0 0 / 0%);
|
|
||||||
// Images Colors
|
|
||||||
--color-result-image-span-font: #bbb;
|
|
||||||
--color-result-image-span-font-selected: #222;
|
|
||||||
--color-result-image-background: #222;
|
|
||||||
/// Settings Colors
|
|
||||||
--color-settings-tr-hover: #2c2c32;
|
|
||||||
--color-settings-engine-description-font: darken(#dcdcdc, 30%);
|
|
||||||
--color-settings-table-group-background: #1b1b21;
|
|
||||||
/// Toolkit Colors
|
|
||||||
--color-toolkit-badge-font: #fff;
|
|
||||||
--color-toolkit-badge-background: #555;
|
|
||||||
--color-toolkit-kbd-font: #000;
|
|
||||||
--color-toolkit-kbd-background: #fff;
|
|
||||||
--color-toolkit-dialog-border: #555;
|
|
||||||
--color-toolkit-dialog-background: #1e1e22;
|
|
||||||
--color-toolkit-tabs-label-border: #222;
|
|
||||||
--color-toolkit-tabs-section-border: #555;
|
|
||||||
--color-toolkit-select-background: #313338;
|
|
||||||
--color-toolkit-select-border: #555;
|
|
||||||
--color-toolkit-select-background-hover: #373b49;
|
|
||||||
--color-toolkit-input-text-font: #fff;
|
|
||||||
--color-toolkit-checkbox-onoff-off-background: #313338;
|
|
||||||
--color-toolkit-checkbox-onoff-on-background: #313338;
|
|
||||||
--color-toolkit-checkbox-onoff-on-mark-background: #58f;
|
|
||||||
--color-toolkit-checkbox-onoff-on-mark-color: #222;
|
|
||||||
--color-toolkit-checkbox-onoff-off-mark-background: #ddd;
|
|
||||||
--color-toolkit-checkbox-onoff-off-mark-color: #222;
|
|
||||||
--color-toolkit-checkbox-label-background: #222;
|
|
||||||
--color-toolkit-checkbox-label-border: #333;
|
|
||||||
--color-toolkit-checkbox-input-border: #58f;
|
|
||||||
--color-toolkit-engine-tooltip-border: #333;
|
|
||||||
--color-toolkit-engine-tooltip-background: #222;
|
|
||||||
--color-toolkit-loader-border: rgb(255 255 255 / 20%);
|
|
||||||
--color-toolkit-loader-borderleft: rgb(0 0 0 / 0%);
|
|
||||||
--color-doc-code: #ddd;
|
|
||||||
--color-doc-code-background: #4d5a6f;
|
|
||||||
// Favicons Colors
|
|
||||||
--color-favicon-background-color: #ddd;
|
|
||||||
--color-favicon-border-color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.black-themes() {
|
|
||||||
--color-base-background: #000;
|
|
||||||
--color-base-background-mobile: #000;
|
|
||||||
--color-header-background: #000;
|
|
||||||
--color-footer-background: #000;
|
|
||||||
--color-sidebar-background: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Dark Theme (autoswitch based on device pref)
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root.theme-auto {
|
|
||||||
.dark-themes();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dark Theme by preferences
|
|
||||||
:root.theme-dark {
|
|
||||||
.dark-themes();
|
|
||||||
}
|
|
||||||
|
|
||||||
:root.theme-black {
|
|
||||||
.dark-themes();
|
|
||||||
.black-themes();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// General Size
|
|
||||||
@results-width: 45rem;
|
|
||||||
@results-sidebar-width: 25rem;
|
|
||||||
@results-offset: 10rem;
|
|
||||||
@results-tablet-offset: 0.5rem;
|
|
||||||
@results-gap: 5rem;
|
|
||||||
@results-margin: 0.125rem;
|
|
||||||
@result-padding: 1rem;
|
|
||||||
@results-image-row-height: 12rem;
|
|
||||||
@results-image-row-height-phone: 10rem;
|
|
||||||
@search-width: 44rem;
|
|
||||||
// height of #search, see detail.less
|
|
||||||
@search-height: 13rem;
|
|
||||||
@search-padding-horizontal: 0.5rem;
|
|
||||||
|
|
||||||
/// Device Size
|
|
||||||
/// @desktop > @tablet
|
|
||||||
@tablet: 79.75em; // see https://github.com/searxng/searxng/issues/874
|
|
||||||
@phone: 50em;
|
|
||||||
@small-phone: 35em;
|
|
||||||
@ultra-small-phone: 20rem;
|
|
||||||
|
|
||||||
/// From style.less
|
|
||||||
@stacked-bar-chart: rgb(0, 0, 0);
|
|
||||||
|
|
||||||
/// Load fonts from this directory.
|
|
||||||
@icon-font-path: "../../../fonts/";
|
|
||||||
//** File name for all font files.
|
|
||||||
@icon-font-name: "glyphicons-halflings-regular";
|
|
||||||
//** Element ID within SVG icon file.
|
|
||||||
@icon-font-svg-id: "glyphicons_halflingsregular";
|
|
||||||
|
|
||||||
// decoration of the select HTML elements
|
|
||||||
@select-light-svg-path: "../svg/select-light.svg";
|
|
||||||
@select-dark-svg-path: "../svg/select-dark.svg";
|
|
|
@ -1,256 +0,0 @@
|
||||||
#main_results #results.image-detail-open.only_template_images {
|
|
||||||
width: min(98%, 59.25rem) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main_results #results.only_template_images.image-detail-open #backToTop {
|
|
||||||
.ltr-left(56.75rem) !important;
|
|
||||||
.ltr-right(inherit);
|
|
||||||
}
|
|
||||||
|
|
||||||
article.result-images .detail {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#results.image-detail-open article.result-images[data-vim-selected] .detail {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
position: fixed;
|
|
||||||
.ltr-left(60rem);
|
|
||||||
.ltr-right(0);
|
|
||||||
top: @search-height;
|
|
||||||
transition: top 0.064s ease-in 0s;
|
|
||||||
bottom: 0;
|
|
||||||
background: var(--color-result-detail-background);
|
|
||||||
border: 1px solid var(--color-result-detail-background);
|
|
||||||
z-index: 1000;
|
|
||||||
padding: 4rem 3rem 3rem 3rem;
|
|
||||||
overflow-y: scroll;
|
|
||||||
|
|
||||||
a.result-images-source {
|
|
||||||
display: block;
|
|
||||||
flex: 1;
|
|
||||||
text-align: left;
|
|
||||||
width: 100%;
|
|
||||||
border: none;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
img {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
object-fit: contain;
|
|
||||||
width: inherit;
|
|
||||||
height: inherit;
|
|
||||||
max-width: 100%;
|
|
||||||
min-height: inherit;
|
|
||||||
max-height: calc(100vh - 25rem - 17rem);
|
|
||||||
background: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-images-labels {
|
|
||||||
color: var(--color-result-detail-font);
|
|
||||||
height: 19rem;
|
|
||||||
|
|
||||||
hr {
|
|
||||||
border-top: 1px solid var(--color-result-detail-hr);
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
height: 2rem;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
color: var(--color-result-detail-label-font);
|
|
||||||
font-size: 0.9rem;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
margin: 0.8rem 0;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: inline-block;
|
|
||||||
width: 12rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h4,
|
|
||||||
p,
|
|
||||||
a {
|
|
||||||
.ltr-text-align-left();
|
|
||||||
}
|
|
||||||
|
|
||||||
p.result-content {
|
|
||||||
height: 2rem;
|
|
||||||
line-height: unset;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.result-url {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.result-content:hover,
|
|
||||||
p.result-url:hover {
|
|
||||||
position: relative;
|
|
||||||
overflow: inherit !important;
|
|
||||||
background: var(--color-result-detail-background);
|
|
||||||
text-overflow: inherit !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
a,
|
|
||||||
a:visited,
|
|
||||||
a:hover,
|
|
||||||
a:active {
|
|
||||||
color: var(--color-result-detail-link);
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a.result-detail-close {
|
|
||||||
top: 1rem;
|
|
||||||
.ltr-left(1rem);
|
|
||||||
padding: 0.4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.result-detail-previous {
|
|
||||||
top: 1rem;
|
|
||||||
.ltr-right(6rem);
|
|
||||||
// center the icon by moving it slightly on the left
|
|
||||||
padding-top: 0.4rem;
|
|
||||||
.ltr-padding-right(0.5rem);
|
|
||||||
padding-bottom: 0.4rem;
|
|
||||||
.ltr-padding-left(0.3rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
a.result-detail-next {
|
|
||||||
top: 1rem;
|
|
||||||
.ltr-right(2rem);
|
|
||||||
padding: 0.4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.result-detail-close,
|
|
||||||
a.result-detail-next,
|
|
||||||
a.result-detail-previous {
|
|
||||||
border-radius: 50%;
|
|
||||||
display: block;
|
|
||||||
width: 1.5rem;
|
|
||||||
height: 1.5rem;
|
|
||||||
position: absolute;
|
|
||||||
filter: opacity(40%);
|
|
||||||
z-index: 1200;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
width: 1.5rem;
|
|
||||||
height: 1.5rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a.result-detail-next,
|
|
||||||
a.result-detail-previous {
|
|
||||||
span::before {
|
|
||||||
// vertical center small icons
|
|
||||||
vertical-align: sub;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a.result-detail-close,
|
|
||||||
a.result-detail-close:visited,
|
|
||||||
a.result-detail-close:hover,
|
|
||||||
a.result-detail-close:active,
|
|
||||||
a.result-detail-previous,
|
|
||||||
a.result-detail-previous:visited,
|
|
||||||
a.result-detail-previous:hover,
|
|
||||||
a.result-detail-previous:active,
|
|
||||||
a.result-detail-next,
|
|
||||||
a.result-detail-next:visited,
|
|
||||||
a.result-detail-next:hover,
|
|
||||||
a.result-detail-next:active {
|
|
||||||
color: var(--color-result-detail-font);
|
|
||||||
background: var(--color-result-detail-background);
|
|
||||||
border: 1px solid var(--color-result-detail-font);
|
|
||||||
}
|
|
||||||
|
|
||||||
a.result-detail-close:focus,
|
|
||||||
a.result-detail-close:hover,
|
|
||||||
a.result-detail-previous:focus,
|
|
||||||
a.result-detail-previous:hover,
|
|
||||||
a.result-detail-next:focus,
|
|
||||||
a.result-detail-next:hover {
|
|
||||||
filter: opacity(80%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader {
|
|
||||||
position: absolute;
|
|
||||||
top: 1rem;
|
|
||||||
.ltr-right(50%);
|
|
||||||
border-top: 0.5em solid var(--color-result-detail-loader-border);
|
|
||||||
border-right: 0.5em solid var(--color-result-detail-loader-border);
|
|
||||||
border-bottom: 0.5em solid var(--color-result-detail-loader-border);
|
|
||||||
border-left: 0.5em solid var(--color-result-detail-loader-borderleft);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#results.image-detail-open.scrolling
|
|
||||||
article.result-images[data-vim-selected]
|
|
||||||
.detail {
|
|
||||||
top: 0;
|
|
||||||
|
|
||||||
a.result-images-source img {
|
|
||||||
max-height: calc(100vh - 25rem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @tablet) {
|
|
||||||
#results.image-detail-open article.result-images[data-vim-selected] .detail {
|
|
||||||
top: 0;
|
|
||||||
.ltr-left(0);
|
|
||||||
|
|
||||||
a.result-images-source {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
max-height: calc(100vh - 24rem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a.result-detail-next {
|
|
||||||
.ltr-right(1rem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @phone) {
|
|
||||||
#results.image-detail-open article.result-images[data-vim-selected] .detail {
|
|
||||||
top: 0;
|
|
||||||
.ltr-left(0);
|
|
||||||
padding: 1rem;
|
|
||||||
|
|
||||||
a.result-images-source img {
|
|
||||||
width: 100%;
|
|
||||||
max-height: calc(100vh - 20rem);
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-images-labels p span {
|
|
||||||
width: inherit;
|
|
||||||
.ltr-margin-right(1rem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
iframe[src^="https://w.soundcloud.com"]
|
|
||||||
{
|
|
||||||
height: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe[src^="https://www.deezer.com"]
|
|
||||||
{
|
|
||||||
// The real size is 92px, but 94px are needed to avoid an inner scrollbar of
|
|
||||||
// the embedded HTML.
|
|
||||||
height: 94px;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe[src^="https://www.mixcloud.com"]
|
|
||||||
{
|
|
||||||
// the embedded player from mixcloud has some quirks: initial there is an
|
|
||||||
// issue with an image URL that is blocked since it is an a Cross-Origin
|
|
||||||
// request. The alternative text (<img alt='Mixcloud Logo'> then cause an
|
|
||||||
// scrollbar in the inner of the iframe we can't avoid. Another quirk comes
|
|
||||||
// when pressing the play button, sometimes the shown player has an height of
|
|
||||||
// 200px, sometimes 250px.
|
|
||||||
height: 250px;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe[src^="https://bandcamp.com/EmbeddedPlayer"]
|
|
||||||
{
|
|
||||||
// show playlist
|
|
||||||
height: 350px;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe[src^="https://bandcamp.com/EmbeddedPlayer/track"]
|
|
||||||
{
|
|
||||||
// hide playlist
|
|
||||||
height: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe[src^="https://genius.com/songs"]
|
|
||||||
{
|
|
||||||
height: 65px;
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
#main_index {
|
|
||||||
margin-top: 26vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.index {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
background: url("../img/searxng.png") no-repeat;
|
|
||||||
min-height: 4rem;
|
|
||||||
margin: 4rem auto;
|
|
||||||
background-position: center;
|
|
||||||
background-size: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 4em;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search,
|
|
||||||
#search_header {
|
|
||||||
margin: 0 auto;
|
|
||||||
background: inherit;
|
|
||||||
border: inherit;
|
|
||||||
padding: 0;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_filters {
|
|
||||||
display: block;
|
|
||||||
margin: 1em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category label {
|
|
||||||
padding: 6px 10px;
|
|
||||||
border-bottom: initial !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @tablet) {
|
|
||||||
div.title {
|
|
||||||
h1 {
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#main_index {
|
|
||||||
margin-top: 6em;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
.info-page {
|
|
||||||
code {
|
|
||||||
font-family: monospace;
|
|
||||||
.rounded-corners-tiny;
|
|
||||||
background-color: var(--color-doc-code-background);
|
|
||||||
color: var(--color-doc-code);
|
|
||||||
padding: 0.2rem;
|
|
||||||
border: 0 none;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
|
|
||||||
// Mixins
|
|
||||||
.text-size-adjust (@property: 100%) {
|
|
||||||
-webkit-text-size-adjust: @property;
|
|
||||||
-ms-text-size-adjust: @property;
|
|
||||||
-moz-text-size-adjust: @property;
|
|
||||||
text-size-adjust: @property;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rounded-corners (@radius: 10px) {
|
|
||||||
border-radius: @radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rounded-right-corners (@radius: 0 10px 10px 0) {
|
|
||||||
border-radius: @radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rounded-corners-tiny (@radius: 5px) {
|
|
||||||
border-radius: @radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
// disable user selection
|
|
||||||
.disable-user-select () {
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.show-content-button() {
|
|
||||||
padding: 5px 10px;
|
|
||||||
.rounded-corners-tiny;
|
|
||||||
background: var(--color-show-btn-background);
|
|
||||||
color: var(--color-show-btn-font);
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: var(--color-btn-background);
|
|
||||||
color: var(--color-btn-font);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
.stats_endpoint {
|
|
||||||
.github-issue-button {
|
|
||||||
display: block;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.issue-hide {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="checked"] {
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
margin: 1rem 1rem 1rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step_content {
|
|
||||||
margin: 1rem 1rem 1rem 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step1,
|
|
||||||
.step2 {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step1_delay {
|
|
||||||
transition: visibility 0s linear 4s;
|
|
||||||
}
|
|
||||||
|
|
||||||
#step1:checked ~ .step1,
|
|
||||||
#step2:checked ~ .step2 {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,233 +0,0 @@
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
text-align: center;
|
|
||||||
padding: 1rem 0.5rem;
|
|
||||||
.ltr-text-align-left();
|
|
||||||
}
|
|
||||||
|
|
||||||
tr.pref-group th {
|
|
||||||
font-weight: normal;
|
|
||||||
.ltr-text-align-left();
|
|
||||||
background: var(--color-settings-table-group-background);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#main_preferences {
|
|
||||||
form {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset {
|
|
||||||
margin: 8px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
legend {
|
|
||||||
margin: 0;
|
|
||||||
padding: 5px 0 0 0;
|
|
||||||
display: block;
|
|
||||||
.ltr-float-left();
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"] {
|
|
||||||
width: 13.25rem;
|
|
||||||
color: var(--color-toolkit-input-text-font);
|
|
||||||
border: none;
|
|
||||||
background: none repeat scroll 0 0 var(--color-toolkit-select-background);
|
|
||||||
padding: 0.2rem 0.4rem;
|
|
||||||
height: 2rem;
|
|
||||||
.rounded-corners-tiny;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
background-color: var(--color-toolkit-select-background-hover);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
div.pref-group {
|
|
||||||
width: 100%;
|
|
||||||
font-weight: normal;
|
|
||||||
padding: 1rem 0.5rem;
|
|
||||||
.ltr-text-align-left();
|
|
||||||
background: var(--color-settings-table-group-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
.value {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
.ltr-float-left();
|
|
||||||
width: 15em;
|
|
||||||
|
|
||||||
select,
|
|
||||||
input[type="text"] {
|
|
||||||
font-size: inherit !important;
|
|
||||||
margin-top: 0;
|
|
||||||
.ltr-margin-right(1rem);
|
|
||||||
margin-bottom: 0;
|
|
||||||
.ltr-margin-left(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
select {
|
|
||||||
width: 14rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
select:focus,
|
|
||||||
input:focus {
|
|
||||||
outline: none;
|
|
||||||
box-shadow: 0 0 1px 1px var(--color-btn-background);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.description {
|
|
||||||
margin: 0;
|
|
||||||
padding: 5px 0 0 0;
|
|
||||||
.ltr-float-right();
|
|
||||||
width: 50%;
|
|
||||||
color: var(--color-settings-engine-description-font);
|
|
||||||
font-size: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bang {
|
|
||||||
.ltr-text-align-left();
|
|
||||||
.rounded-corners-tiny;
|
|
||||||
background-color: var(--color-doc-code-background);
|
|
||||||
color: var(--color-doc-code);
|
|
||||||
padding: 0.2rem;
|
|
||||||
border: 0 none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category {
|
|
||||||
.ltr-margin-right(0.5rem);
|
|
||||||
|
|
||||||
label {
|
|
||||||
border: 2px solid transparent;
|
|
||||||
padding: 0.2rem 0.4rem;
|
|
||||||
.rounded-corners-tiny;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.category input[type="checkbox"]:checked + label {
|
|
||||||
border: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
}
|
|
||||||
|
|
||||||
table.table_engines {
|
|
||||||
th.name {
|
|
||||||
/* stylelint-disable */
|
|
||||||
label {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
/* stylelint-enable */
|
|
||||||
|
|
||||||
.engine-tooltip {
|
|
||||||
margin-top: 1.8rem;
|
|
||||||
.ltr-left(calc((100% - 85em) / 2 + 10em));
|
|
||||||
max-width: 40rem;
|
|
||||||
|
|
||||||
.engine-description {
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bang {
|
|
||||||
margin: 0.3rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkbox-col,
|
|
||||||
.name,
|
|
||||||
.shortcut {
|
|
||||||
.ltr-text-align-left();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table.cookies {
|
|
||||||
width: 100%;
|
|
||||||
direction: ltr;
|
|
||||||
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
text-align: left;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 1rem;
|
|
||||||
padding: 0.5em;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
td:first-child {
|
|
||||||
word-break: keep-all;
|
|
||||||
width: 14rem;
|
|
||||||
padding-right: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
td:last-child {
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > tbody > tr:nth-child(even) > th,
|
|
||||||
& > tbody > tr:nth-child(even) > td {
|
|
||||||
background-color: var(--color-settings-tr-hover);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.preferences_back {
|
|
||||||
background: none repeat scroll 0 0 var(--color-btn-background);
|
|
||||||
color: var(--color-btn-font);
|
|
||||||
border: 0 none;
|
|
||||||
.rounded-corners;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 2px 4px;
|
|
||||||
padding: 0.7em;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: var(--color-settings-return-font);
|
|
||||||
}
|
|
||||||
|
|
||||||
a::first-letter {
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#toggle-all-engines-container {
|
|
||||||
width: max-content;
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.selectable_url {
|
|
||||||
pre {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#copy-hash-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
|
|
||||||
div.selectable_url {
|
|
||||||
pre {
|
|
||||||
width: auto;
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#pref-hash-input {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @tablet) {
|
|
||||||
.preferences_back {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.engine-tooltip {
|
|
||||||
.ltr-left(10em) !important;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
|
|
||||||
.osm-map-box {
|
|
||||||
height: 300px;
|
|
||||||
width: 100%;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
Layout of the KeyValue result class
|
|
||||||
*/
|
|
||||||
#main_results .result-keyvalue {
|
|
||||||
caption {
|
|
||||||
padding: 0.8rem 0.5rem;
|
|
||||||
font-style: italic;
|
|
||||||
caption-side: bottom;
|
|
||||||
background-color: var(--color-result-keyvalue-table);
|
|
||||||
}
|
|
||||||
|
|
||||||
.col-key {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
word-break: break-word;
|
|
||||||
table-layout: fixed;
|
|
||||||
width: 100%;
|
|
||||||
background-color: var(--color-result-keyvalue-table);
|
|
||||||
}
|
|
||||||
|
|
||||||
tr.odd {
|
|
||||||
background-color: var(--color-result-keyvalue-odd);
|
|
||||||
}
|
|
||||||
|
|
||||||
tr.even {
|
|
||||||
background-color: var(--color-result-keyvalue-even);
|
|
||||||
}
|
|
||||||
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
padding: 0.3rem 0.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
@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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,395 +0,0 @@
|
||||||
/*
|
|
||||||
* SearXNG, A privacy-respecting, hackable metasearch engine
|
|
||||||
*/
|
|
||||||
|
|
||||||
#search {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search_header {
|
|
||||||
padding-top: 1.5em;
|
|
||||||
.ltr-padding-right(2em);
|
|
||||||
.ltr-padding-left(@results-offset - 3rem);
|
|
||||||
margin: 0;
|
|
||||||
background: var(--color-header-background);
|
|
||||||
border-bottom: 1px solid var(--color-header-border);
|
|
||||||
display: grid;
|
|
||||||
gap: 1rem 1.2rem;
|
|
||||||
grid-template-columns: 3rem 1fr;
|
|
||||||
grid-template-areas:
|
|
||||||
"logo search"
|
|
||||||
"spacer categories";
|
|
||||||
}
|
|
||||||
|
|
||||||
.category_checkbox,
|
|
||||||
.category_button {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
.ltr-margin-right(1rem);
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category_checkbox {
|
|
||||||
input {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
svg {
|
|
||||||
padding-right: 0.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0.2rem 0;
|
|
||||||
display: inline-flex;
|
|
||||||
text-transform: capitalize;
|
|
||||||
font-size: 0.9em;
|
|
||||||
border-bottom: 2px solid transparent;
|
|
||||||
.disable-user-select;
|
|
||||||
|
|
||||||
div.category_name {
|
|
||||||
margin: auto 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="checkbox"]:checked + label {
|
|
||||||
color: var(--color-categories-item-selected-font);
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
button.category_button {
|
|
||||||
background-color: inherit;
|
|
||||||
color: var(--color-base-font);
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0.2rem 0;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
text-transform: capitalize;
|
|
||||||
font-size: 0.9em;
|
|
||||||
border: none;
|
|
||||||
border-bottom: 2px solid transparent;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
padding-right: 0.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.selected,
|
|
||||||
&:active {
|
|
||||||
color: var(--color-categories-item-selected-font);
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// only used when JavaScript is disabled
|
|
||||||
.no-js
|
|
||||||
#categories_container:has(button.category_button:focus-within)
|
|
||||||
button.category_button {
|
|
||||||
&.selected {
|
|
||||||
color: var(--color-base-font);
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus-within {
|
|
||||||
color: var(--color-categories-item-selected-font);
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#search_logo {
|
|
||||||
padding: 0.5rem 10px 0 10px;
|
|
||||||
grid-area: logo;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
flex: 1;
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
margin: 0.5rem 0 auto 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_categories {
|
|
||||||
grid-area: categories;
|
|
||||||
|
|
||||||
.help {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover .help {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
background: var(--color-base-background);
|
|
||||||
padding: 1rem 0.6rem 0.6rem 0;
|
|
||||||
z-index: 1000;
|
|
||||||
width: 100%;
|
|
||||||
left: -0.1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#search_view {
|
|
||||||
padding: 0.5rem @search-padding-horizontal 0 @search-padding-horizontal;
|
|
||||||
grid-area: search;
|
|
||||||
|
|
||||||
body.results_endpoint & {
|
|
||||||
padding: 0.5rem 2.8rem 0 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_box {
|
|
||||||
border-radius: 0.8rem;
|
|
||||||
width: 100%;
|
|
||||||
max-width: @search-width;
|
|
||||||
display: inline-flex;
|
|
||||||
flex-direction: row;
|
|
||||||
white-space: nowrap;
|
|
||||||
box-shadow: var(--color-search-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
#clear_search {
|
|
||||||
display: block;
|
|
||||||
border-collapse: separate;
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 1.8rem;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.8rem 0.2rem;
|
|
||||||
background: none repeat scroll 0 0 var(--color-search-background);
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
color: var(--color-search-font);
|
|
||||||
font-size: 1.1rem;
|
|
||||||
z-index: 1000;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--color-search-background-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.empty * {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
html.no-js #clear_search.hide_if_nojs {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#q,
|
|
||||||
#send_search {
|
|
||||||
display: block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.8rem;
|
|
||||||
background: none repeat scroll 0 0 var(--color-search-background);
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
color: var(--color-search-font);
|
|
||||||
font-size: 1.1rem;
|
|
||||||
z-index: 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
#q {
|
|
||||||
width: 100%;
|
|
||||||
.ltr-padding-left(1rem);
|
|
||||||
.ltr-padding-right(0) !important;
|
|
||||||
.ltr-rounded-left-corners(0.8rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#q::-ms-clear,
|
|
||||||
#q::-webkit-search-cancel-button {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#send_search {
|
|
||||||
.ltr-rounded-right-corners(0.8rem);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: var(--color-search-background-hover);
|
|
||||||
color: var(--color-search-background);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-js #clear_search,
|
|
||||||
.no-js #send_search {
|
|
||||||
width: auto !important;
|
|
||||||
.ltr-border-left(1px solid var(--color-search-border));
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_filters {
|
|
||||||
margin-top: 0.6rem;
|
|
||||||
.ltr-margin-right(0);
|
|
||||||
margin-bottom: 0;
|
|
||||||
.ltr-margin-left(@results-offset + 0.6rem);
|
|
||||||
display: flex;
|
|
||||||
overflow-x: auto;
|
|
||||||
overscroll-behavior-inline: contain;
|
|
||||||
|
|
||||||
select {
|
|
||||||
background-color: inherit;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
color: var(--color-base-font);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @tablet) {
|
|
||||||
#search_header {
|
|
||||||
padding: 1.5em @results-tablet-offset 0 @results-tablet-offset;
|
|
||||||
column-gap: @results-tablet-offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_filters {
|
|
||||||
margin-top: 0.6rem;
|
|
||||||
.ltr-margin-right(0);
|
|
||||||
margin-bottom: 0;
|
|
||||||
.ltr-margin-left(@results-tablet-offset + 3rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#categories {
|
|
||||||
font-size: 90%;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @tablet) and (hover: none) {
|
|
||||||
#main_index,
|
|
||||||
#main_results {
|
|
||||||
#categories_container {
|
|
||||||
width: max-content;
|
|
||||||
|
|
||||||
.category_checkbox {
|
|
||||||
display: inline-block;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#categories {
|
|
||||||
width: 100%;
|
|
||||||
.ltr-text-align-left();
|
|
||||||
overflow: scroll hidden;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @phone) {
|
|
||||||
#search_header {
|
|
||||||
width: 100%;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.1rem 0 0 0;
|
|
||||||
gap: 0 0;
|
|
||||||
grid-template-areas:
|
|
||||||
"logo search"
|
|
||||||
"categories categories";
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_logo {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_box {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#q {
|
|
||||||
width: 100%;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_filters {
|
|
||||||
margin: 0 10px;
|
|
||||||
padding: 0.5rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category {
|
|
||||||
display: inline-block;
|
|
||||||
width: auto;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.category_checkbox {
|
|
||||||
label {
|
|
||||||
padding: 1rem !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.category_button {
|
|
||||||
padding: 1rem !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search_view:focus-within {
|
|
||||||
display: block;
|
|
||||||
background-color: var(--color-search-background);
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 2000;
|
|
||||||
|
|
||||||
.search_box {
|
|
||||||
border-bottom: 1px solid var(--color-search-border);
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
|
|
||||||
#send_search {
|
|
||||||
.ltr-margin-right(0) !important; // Delete when send_search button is disabled on mobile.
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#main_results #q:placeholder-shown ~ #send_search {
|
|
||||||
.ltr-margin-right(2.6rem);
|
|
||||||
transition: margin 0.1s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @ultra-small-phone) {
|
|
||||||
#search_header {
|
|
||||||
grid-template-areas:
|
|
||||||
"search search"
|
|
||||||
"categories categories";
|
|
||||||
}
|
|
||||||
|
|
||||||
#search_logo {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#categories {
|
|
||||||
.disable-user-select;
|
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#categories_container {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.favicon img {
|
|
||||||
height: 1.5rem;
|
|
||||||
width: 1.5rem;
|
|
||||||
border-radius: 10%;
|
|
||||||
background-color: var(--color-favicon-background-color);
|
|
||||||
border: 1px solid var(--color-favicon-border-color);
|
|
||||||
display: flex;
|
|
||||||
}
|
|
|
@ -1,106 +0,0 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
|
|
||||||
.engine-stats {
|
|
||||||
border-spacing: 0;
|
|
||||||
border-collapse: collapse;
|
|
||||||
|
|
||||||
tr td,
|
|
||||||
tr th {
|
|
||||||
border-bottom: 1px solid var(--color-result-border);
|
|
||||||
padding: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.engine-tooltip {
|
|
||||||
border-spacing: 0;
|
|
||||||
border-collapse: collapse;
|
|
||||||
|
|
||||||
td,
|
|
||||||
th {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.engine-name {
|
|
||||||
width: 20rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.engine-score {
|
|
||||||
width: 7rem;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.engine-reliability {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table.engine-error th.engine-error-type,
|
|
||||||
table.engine-error td.engine-error-type,
|
|
||||||
failed-test {
|
|
||||||
width: 10rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.engine-errors {
|
|
||||||
margin-top: 3rem;
|
|
||||||
|
|
||||||
table.engine-error {
|
|
||||||
max-width: 1280px;
|
|
||||||
margin: 1rem 0 3rem 0;
|
|
||||||
border: 1px solid var(--color-result-border);
|
|
||||||
.ltr-text-align-left();
|
|
||||||
|
|
||||||
tr th,
|
|
||||||
tr td {
|
|
||||||
padding: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
& span.log_parameters {
|
|
||||||
border-right: 1px solid solid var(--color-result-border);
|
|
||||||
padding: 0 1rem 0 0;
|
|
||||||
margin: 0 0 0 0.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bar-chart-value {
|
|
||||||
width: 3em;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: right;
|
|
||||||
padding-right: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bar-chart-graph {
|
|
||||||
width: calc(100% - 5rem);
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bar-chart-bar {
|
|
||||||
border: 3px solid var(--color-bar-chart-primary);
|
|
||||||
margin: 1px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bar-chart-serie1 {
|
|
||||||
border: 3px solid var(--color-bar-chart-primary);
|
|
||||||
margin: 1px 0;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bar-chart-serie2 {
|
|
||||||
border: 3px solid var(--color-bar-chart-secondary);
|
|
||||||
margin: 1px 0;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bar0 {
|
|
||||||
width: 0;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.generate-bar(100);
|
|
||||||
|
|
||||||
.generate-bar(@n, @i: 1) when (@i =< @n) {
|
|
||||||
.bar@{i} {
|
|
||||||
width: (@i * 100% / @n);
|
|
||||||
}
|
|
||||||
.generate-bar(@n, (@i + 1));
|
|
||||||
}
|
|
|
@ -1,122 +0,0 @@
|
||||||
/*
|
|
||||||
--center-page-width overrides the less variable @results-width when the results are centered
|
|
||||||
see the CSS rules for #results in style.less ( grid-template-columns and gap).
|
|
||||||
|
|
||||||
In this file, the --center-page-width values comes from the Oscar theme (Bootstrap 3).
|
|
||||||
|
|
||||||
All rules starts with ".center-alignment-yes #main_results" to be enabled only
|
|
||||||
on the /search URL and when the "center alignment" preference is enabled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@media screen and (min-width: @phone) {
|
|
||||||
.center-alignment-yes #main_results {
|
|
||||||
--center-page-width: 48rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (width >= 62rem) {
|
|
||||||
.center-alignment-yes #main_results {
|
|
||||||
--center-page-width: 60rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: @tablet) {
|
|
||||||
.center-alignment-yes #main_results {
|
|
||||||
--center-page-width: 73rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: @phone) and (max-width: @tablet) {
|
|
||||||
// any change must be reset in @media screen and (min-width: @tablet) { ... }
|
|
||||||
.center-alignment-yes #main_results {
|
|
||||||
#results {
|
|
||||||
grid-template-columns: 60% calc(40% - @results-gap);
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#urls {
|
|
||||||
.ltr-margin-left(3rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar {
|
|
||||||
.ltr-margin-right(1rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#backToTop {
|
|
||||||
.ltr-left(calc(60% + 1rem));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: @tablet) {
|
|
||||||
.center-alignment-yes #main_results {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
#search {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search_header {
|
|
||||||
grid-template-columns:
|
|
||||||
calc(50% - 4.5rem - var(--center-page-width) / 2)
|
|
||||||
3rem var(--center-page-width);
|
|
||||||
grid-template-areas: "na logo search" "na spacer categories";
|
|
||||||
column-gap: 1.2rem; // from search.less
|
|
||||||
width: 100%;
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_filters {
|
|
||||||
.ltr-margin-left(0.5rem);
|
|
||||||
width: var(--center-page-width);
|
|
||||||
}
|
|
||||||
|
|
||||||
#results {
|
|
||||||
// from style.less (when screen width = @tablet, reset layout from tablet)
|
|
||||||
.ltr-margin-right(2rem);
|
|
||||||
.ltr-margin-left(@results-offset);
|
|
||||||
//
|
|
||||||
|
|
||||||
&.only_template_images,
|
|
||||||
&.image-detail-open {
|
|
||||||
// * grid-template-columns and .ltr-margin-left are set in style.less
|
|
||||||
// * With .image-detail-open.only_template_images, the width is set in detail.less
|
|
||||||
// * #results is going to be centered because of the #main_results rules,
|
|
||||||
// align-self aligns the results on the left or right according to the language.
|
|
||||||
align-self: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(.only_template_images, .image-detail-open) {
|
|
||||||
// the gap is set in style.less
|
|
||||||
.ltr-margin-left(1.5rem);
|
|
||||||
grid-template-columns:
|
|
||||||
calc(var(--center-page-width) - @results-gap - @results-sidebar-width)
|
|
||||||
@results-sidebar-width;
|
|
||||||
|
|
||||||
#backToTop {
|
|
||||||
.ltr-left(calc(50% - @results-sidebar-width - @results-gap + 1rem + var(--center-page-width) / 2));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.result .content {
|
|
||||||
max-width: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// from style.less (when screen width = @tablet, reset layout from tablet)
|
|
||||||
#urls {
|
|
||||||
.ltr-margin-left(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar {
|
|
||||||
.ltr-margin-right(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,85 +0,0 @@
|
||||||
.ltr-left(@offset) {
|
|
||||||
left: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-right(@offset) {
|
|
||||||
right: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-margin-right(@offset) {
|
|
||||||
margin-right: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-margin-left(@offset) {
|
|
||||||
margin-left: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-border-right(@offset) {
|
|
||||||
border-right: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-border-left(@offset) {
|
|
||||||
border-left: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-padding-right(@offset) {
|
|
||||||
padding-right: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-padding-left(@offset) {
|
|
||||||
padding-left: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-float-left() {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-float-right() {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-text-align-right() {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-left-corners(@radius) {
|
|
||||||
border-radius: @radius 0 0 @radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-top-left-corners(@radius) {
|
|
||||||
border-radius: @radius 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-bottom-left-corners(@radius) {
|
|
||||||
border-radius: 0 0 0 @radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-right-corners(@radius) {
|
|
||||||
border-radius: 0 @radius @radius 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-top-right-corners(@radius) {
|
|
||||||
border-radius: 0 @radius 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-bottom-right-corners(@radius) {
|
|
||||||
border-radius: 0 0 @radius 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-text-align-left() {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-border-left-width(@offset) {
|
|
||||||
border-left-width: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-border-right-width(@offset) {
|
|
||||||
border-right-width: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-transform() {
|
|
||||||
transform: scale(1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@import "style.less";
|
|
|
@ -1,169 +0,0 @@
|
||||||
.ltr-left(@offset) {
|
|
||||||
right: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-right(@offset) {
|
|
||||||
left: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-margin-right(@offset) {
|
|
||||||
margin-left: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-margin-left(@offset) {
|
|
||||||
margin-right: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-border-right(@offset) {
|
|
||||||
border-left: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-border-left(@offset) {
|
|
||||||
border-right: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-padding-right(@offset) {
|
|
||||||
padding-left: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-padding-left(@offset) {
|
|
||||||
padding-right: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-float-left() {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-float-right() {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-text-align-right() {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-left-corners(@radius) {
|
|
||||||
border-radius: 0 @radius @radius 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-top-left-corners(@radius) {
|
|
||||||
border-radius: 0 @radius 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-bottom-left-corners(@radius) {
|
|
||||||
border-radius: 0 0 @radius 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-right-corners(@radius) {
|
|
||||||
border-radius: @radius 0 0 @radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-top-right-corners(@radius) {
|
|
||||||
border-radius: @radius 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-rounded-bottom-right-corners(@radius) {
|
|
||||||
border-radius: 0 0 0 @radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-text-align-left() {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-border-left-width(@offset) {
|
|
||||||
border-right-width: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-border-right-width(@offset) {
|
|
||||||
border-left-width: @offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ltr-transform() {
|
|
||||||
transform: scale(-1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@import "style.less";
|
|
||||||
|
|
||||||
#q,
|
|
||||||
#sidebar .infobox dt bdi {
|
|
||||||
direction: rtl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// URL are displayed LTR but align on the right
|
|
||||||
#urls {
|
|
||||||
direction: initial;
|
|
||||||
text-align: right;
|
|
||||||
|
|
||||||
.result .url_header {
|
|
||||||
direction: rtl;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result .url_wrapper {
|
|
||||||
justify-content: end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Image flexbox
|
|
||||||
#main_results div#results.only_template_images #urls {
|
|
||||||
direction: rtl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Image detail
|
|
||||||
#results.image-detail-open
|
|
||||||
article.result-images[data-vim-selected]
|
|
||||||
.detail
|
|
||||||
.result-images-labels
|
|
||||||
p {
|
|
||||||
direction: rtl;
|
|
||||||
|
|
||||||
&.result-url {
|
|
||||||
// Display URL using the LTR direction
|
|
||||||
direction: ltr;
|
|
||||||
|
|
||||||
span {
|
|
||||||
// And put the label on the right
|
|
||||||
direction: rtl;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// select HTML element
|
|
||||||
@supports (
|
|
||||||
(background-position-x: 100%) and
|
|
||||||
(
|
|
||||||
(appearance: none) or (-webkit-appearance: none) or
|
|
||||||
(-moz-appearance: none)
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
select {
|
|
||||||
border-width: 0 0 0 2rem;
|
|
||||||
background-position-x: -2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// vim hotkey helps is not translated
|
|
||||||
#vim-hotkeys-help table {
|
|
||||||
direction: ltr;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Logo on the right
|
|
||||||
#main_preferences h1,
|
|
||||||
#main_stats h1 {
|
|
||||||
background-position-x: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
// patch of stats.less
|
|
||||||
.bar-chart-serie1,
|
|
||||||
.bar-chart-serie2 {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.engine-stats .engine-name,
|
|
||||||
.engine-stats .engine-score,
|
|
||||||
.engine-stats .result-count,
|
|
||||||
.engine-stats .response-time,
|
|
||||||
.engine-stats .engine-reliability {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
|
@ -1,663 +0,0 @@
|
||||||
// other solution : http://stackoverflow.com/questions/1577598/how-to-hide-parts-of-html-when-javascript-is-disabled/13857783#13857783
|
|
||||||
|
|
||||||
// stylelint-disable no-descending-specificity
|
|
||||||
|
|
||||||
html.no-js .hide_if_nojs {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
html.js .show_if_nojs {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.invisible {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-unstyled {
|
|
||||||
list-style-type: none;
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin-top: 4px;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.danger {
|
|
||||||
background-color: var(--color-error-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
.warning {
|
|
||||||
background: var(--color-warning-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
.success {
|
|
||||||
background: var(--color-success-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
display: inline-block;
|
|
||||||
color: var(--color-toolkit-badge-font);
|
|
||||||
background-color: var(--color-toolkit-badge-background);
|
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
vertical-align: baseline;
|
|
||||||
min-width: 10px;
|
|
||||||
padding: 1px 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// kbd
|
|
||||||
kbd {
|
|
||||||
padding: 2px 4px;
|
|
||||||
margin: 1px;
|
|
||||||
font-size: 90%;
|
|
||||||
color: var(--color-toolkit-kbd-font);
|
|
||||||
background: var(--color-toolkit-kbd-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
// table
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
&.striped {
|
|
||||||
tr {
|
|
||||||
border-bottom: 1px solid var(--color-settings-tr-hover);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
padding: 0.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
padding: 0 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr {
|
|
||||||
&:hover {
|
|
||||||
background: var(--color-settings-tr-hover) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// pre
|
|
||||||
.pre() {
|
|
||||||
display: block;
|
|
||||||
font-size: 0.8em;
|
|
||||||
word-break: break-all;
|
|
||||||
margin: 0.1em;
|
|
||||||
user-select: all;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.selectable_url {
|
|
||||||
display: block;
|
|
||||||
border: 1px solid var(--color-result-search-url-border);
|
|
||||||
padding: 4px;
|
|
||||||
color: var(--color-result-search-url-font);
|
|
||||||
margin: 0.1em;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 1.2em;
|
|
||||||
line-height: 1.2em;
|
|
||||||
.rounded-corners-tiny;
|
|
||||||
|
|
||||||
pre {
|
|
||||||
.pre();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// dialog
|
|
||||||
.dialog() {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
padding: 1rem;
|
|
||||||
margin: 0 0 1em 0;
|
|
||||||
border: 1px solid var(--color-toolkit-dialog-border);
|
|
||||||
.ltr-text-align-left();
|
|
||||||
.rounded-corners;
|
|
||||||
|
|
||||||
.close {
|
|
||||||
.ltr-float-right();
|
|
||||||
position: relative;
|
|
||||||
top: -3px;
|
|
||||||
color: inherit;
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul,
|
|
||||||
ol,
|
|
||||||
p {
|
|
||||||
margin: 1px 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr {
|
|
||||||
vertical-align: text-top;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: transparent !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
padding: 0 1em 0 0;
|
|
||||||
padding-top: 0;
|
|
||||||
.ltr-padding-right(1rem);
|
|
||||||
padding-bottom: 0;
|
|
||||||
.ltr-padding-left(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
margin-top: 0.3em;
|
|
||||||
margin-bottom: 0.3em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-error {
|
|
||||||
.dialog();
|
|
||||||
|
|
||||||
color: var(--color-error);
|
|
||||||
background: var(--color-error-background);
|
|
||||||
border-color: var(--color-error);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-error-block {
|
|
||||||
.dialog();
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
color: var(--color-error);
|
|
||||||
background: var(--color-error-background);
|
|
||||||
border-color: var(--color-error);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-warning {
|
|
||||||
.dialog();
|
|
||||||
|
|
||||||
color: var(--color-warning);
|
|
||||||
background: var(--color-warning-background);
|
|
||||||
border-color: var(--color-warning);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-modal {
|
|
||||||
.dialog();
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
background: var(--color-toolkit-dialog-background);
|
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
margin: 0 auto;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
z-index: 5000;
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// btn-collapse
|
|
||||||
.btn-collapse {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
.scrollx {
|
|
||||||
overflow: auto hidden;
|
|
||||||
display: block;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -- tabs -- */
|
|
||||||
.tabs .tabs > label {
|
|
||||||
font-size: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.tabs {
|
|
||||||
border-bottom: 1px solid var(--color-toolkit-tabs-section-border);
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 0;
|
|
||||||
|
|
||||||
li {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabs {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
width: 100%;
|
|
||||||
min-width: 100%;
|
|
||||||
|
|
||||||
& > * {
|
|
||||||
order: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > input[type="radio"] {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > label,
|
|
||||||
& > li > a {
|
|
||||||
order: 1;
|
|
||||||
padding: 0.7em;
|
|
||||||
margin: 0 0.7em;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
border: solid var(--color-toolkit-tabs-label-border);
|
|
||||||
border-width: 0 0 2px 0;
|
|
||||||
color: unset;
|
|
||||||
|
|
||||||
.disable-user-select();
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
background: var(--color-categories-item-selected);
|
|
||||||
color: var(--color-categories-item-selected-font);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& > label:hover,
|
|
||||||
& > li > a:hover {
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
}
|
|
||||||
|
|
||||||
& > section {
|
|
||||||
min-width: 100%;
|
|
||||||
padding: 0.7rem 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-top: 1px solid var(--color-toolkit-tabs-section-border);
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
// default selection
|
|
||||||
& > label:last-of-type {
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
background: var(--color-categories-item-selected);
|
|
||||||
color: var(--color-categories-item-selected-font);
|
|
||||||
letter-spacing: -0.1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > section:last-of-type {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
html body .tabs > input:checked {
|
|
||||||
~ section {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
~ label {
|
|
||||||
position: inherited;
|
|
||||||
background: inherit;
|
|
||||||
border-bottom: 2px solid transparent;
|
|
||||||
font-weight: normal;
|
|
||||||
color: inherit;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ label {
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
background: var(--color-categories-item-selected);
|
|
||||||
color: var(--color-categories-item-selected-font);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ label + section {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -- select -- */
|
|
||||||
select {
|
|
||||||
height: 2.4rem;
|
|
||||||
margin-top: 0;
|
|
||||||
.ltr-margin-right(1rem);
|
|
||||||
margin-bottom: 0;
|
|
||||||
.ltr-margin-left(0);
|
|
||||||
padding: 0.2rem !important;
|
|
||||||
color: var(--color-search-font);
|
|
||||||
font-size: 0.9rem;
|
|
||||||
z-index: 100;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@supports (
|
|
||||||
(background-position-x: 100%) and
|
|
||||||
(
|
|
||||||
(appearance: none) or (-webkit-appearance: none) or
|
|
||||||
(-moz-appearance: none)
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
select {
|
|
||||||
appearance: none;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
-moz-appearance: none;
|
|
||||||
border-width: 0 2rem 0 0;
|
|
||||||
border-color: transparent;
|
|
||||||
background: data-uri("image/svg+xml;charset=UTF-8", @select-light-svg-path)
|
|
||||||
no-repeat;
|
|
||||||
background-position-x: calc(100% + 2rem);
|
|
||||||
background-size: 2rem;
|
|
||||||
background-origin: content-box;
|
|
||||||
background-color: var(--color-toolkit-select-background);
|
|
||||||
outline: medium none;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
.rounded-corners-tiny;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
background-color: var(--color-toolkit-select-background-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
option {
|
|
||||||
background-color: var(--color-base-background);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
html.theme-auto select,
|
|
||||||
html.theme-dark select {
|
|
||||||
background-image: data-uri(
|
|
||||||
"image/svg+xml;charset=UTF-8",
|
|
||||||
@select-dark-svg-path
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
html.theme-dark select {
|
|
||||||
background-image: data-uri(
|
|
||||||
"image/svg+xml;charset=UTF-8",
|
|
||||||
@select-dark-svg-path
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -- checkbox-onoff -- */
|
|
||||||
input.checkbox-onoff[type="checkbox"] {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
-moz-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
width: 2.5em;
|
|
||||||
height: 0.7em;
|
|
||||||
box-shadow: none !important;
|
|
||||||
margin: 0 16px;
|
|
||||||
border-radius: 10px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
/* focus & hover */
|
|
||||||
&:focus,
|
|
||||||
&:hover {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
width: 3.5em;
|
|
||||||
height: 1.65em;
|
|
||||||
border: 1px solid var(--color-btn-background);
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: var(--color-btn-background) 0 0 3px;
|
|
||||||
z-index: 1200;
|
|
||||||
top: -0.55em;
|
|
||||||
left: -0.6em;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
position: absolute;
|
|
||||||
top: -0.5em;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 0.75em;
|
|
||||||
width: 1.875em;
|
|
||||||
height: 1.875em;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check mark
|
|
||||||
reversed-checkbox displays unchecked checkedboxes as checked, and vice versa.
|
|
||||||
see https://github.com/searxng/searxng/blob/3408d061aab9abc6168fec9bbc6deab71b236dac/searx/templates/simple/preferences.html#L313
|
|
||||||
*/
|
|
||||||
input.checkbox-onoff[type="checkbox"],
|
|
||||||
input.checkbox-onoff.reversed-checkbox[type="checkbox"]:checked {
|
|
||||||
background: var(--color-toolkit-checkbox-onoff-off-background);
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
left: -0.5em;
|
|
||||||
content: "\2715";
|
|
||||||
color: var(--color-toolkit-checkbox-onoff-off-mark-color);
|
|
||||||
background: var(--color-toolkit-checkbox-onoff-off-mark-background);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input.checkbox-onoff[type="checkbox"]:checked,
|
|
||||||
input.checkbox-onoff.reversed-checkbox[type="checkbox"] {
|
|
||||||
background: var(--color-toolkit-checkbox-onoff-on-background);
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
left: calc(100% - 1.5em);
|
|
||||||
content: "\2713";
|
|
||||||
color: var(--color-toolkit-checkbox-onoff-on-mark-color);
|
|
||||||
background: var(--color-toolkit-checkbox-onoff-on-mark-background);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -- checkbox -- */
|
|
||||||
@supports (transform: rotate(-45deg)) {
|
|
||||||
input[type="checkbox"]:not(.checkbox-onoff) {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
-moz-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
border: 2px solid var(--color-toolkit-checkbox-input-border);
|
|
||||||
.rounded-corners(0.3em);
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: "";
|
|
||||||
width: 9px;
|
|
||||||
height: 5px;
|
|
||||||
position: absolute;
|
|
||||||
top: 3px;
|
|
||||||
left: 2px;
|
|
||||||
border: 3px solid var(--color-toolkit-checkbox-label-border);
|
|
||||||
border-top: none;
|
|
||||||
border-right: none;
|
|
||||||
background: transparent;
|
|
||||||
opacity: 0;
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:checked::after {
|
|
||||||
border-color: var(--color-toolkit-checkbox-input-border);
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// disabled : can't be focused, show only the check mark
|
|
||||||
input[type="checkbox"][disabled]:not(.checkbox-onoff) {
|
|
||||||
border: inherit;
|
|
||||||
background-color: transparent !important;
|
|
||||||
cursor: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if not checked and possible to checked then display a "light" check mark on hover
|
|
||||||
input.checkbox[type="checkbox"]:not(
|
|
||||||
:checked,
|
|
||||||
[disabled],
|
|
||||||
.checkbox-onoff
|
|
||||||
):hover::after {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: @phone) {
|
|
||||||
.tabs > label {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -- loader -- */
|
|
||||||
.loader,
|
|
||||||
.loader::after {
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 2em;
|
|
||||||
height: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader {
|
|
||||||
margin: 1em auto;
|
|
||||||
font-size: 10px;
|
|
||||||
position: relative;
|
|
||||||
text-indent: -9999em;
|
|
||||||
border-top: 0.5em solid var(--color-toolkit-loader-border);
|
|
||||||
border-right: 0.5em solid var(--color-toolkit-loader-border);
|
|
||||||
border-bottom: 0.5em solid var(--color-toolkit-loader-border);
|
|
||||||
border-left: 0.5em solid var(--color-toolkit-loader-borderleft);
|
|
||||||
-webkit-transform: translateZ(0);
|
|
||||||
-ms-transform: translateZ(0);
|
|
||||||
transform: translateZ(0);
|
|
||||||
-webkit-animation: load8 1.2s infinite linear;
|
|
||||||
animation: load8 1.2s infinite linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes load8 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
-webkit-transform: rotate(360deg);
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes load8 {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
-webkit-transform: rotate(360deg);
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -- engine-tooltip -- */
|
|
||||||
.engine-tooltip {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
padding: 0.5rem 1rem;
|
|
||||||
margin: 0 0 0 2rem;
|
|
||||||
border: 1px solid var(--color-toolkit-engine-tooltip-border);
|
|
||||||
background: var(--color-toolkit-engine-tooltip-background);
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
z-index: 5000;
|
|
||||||
text-align: left;
|
|
||||||
.rounded-corners;
|
|
||||||
}
|
|
||||||
|
|
||||||
th:hover .engine-tooltip,
|
|
||||||
td:hover .engine-tooltip,
|
|
||||||
.engine-tooltip:hover {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -- stacked bar chart -- */
|
|
||||||
.stacked-bar-chart {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0 0.125rem 0 4rem;
|
|
||||||
width: 100%;
|
|
||||||
width: -moz-available;
|
|
||||||
width: -webkit-fill-available;
|
|
||||||
width: fill;
|
|
||||||
flex-flow: row nowrap;
|
|
||||||
align-items: center;
|
|
||||||
display: inline-flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stacked-bar-chart-value {
|
|
||||||
width: 3rem;
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
padding: 0 0.5rem;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stacked-bar-chart-base {
|
|
||||||
display: flex;
|
|
||||||
flex-shrink: 0;
|
|
||||||
flex-grow: 0;
|
|
||||||
flex-basis: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stacked-bar-chart-median {
|
|
||||||
.stacked-bar-chart-base();
|
|
||||||
|
|
||||||
background: var(--color-base-font);
|
|
||||||
border: 1px solid rgba(var(--color-base-font-rgb), 0.9);
|
|
||||||
padding: 0.3rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stacked-bar-chart-rate80 {
|
|
||||||
.stacked-bar-chart-base();
|
|
||||||
|
|
||||||
background: transparent;
|
|
||||||
border: 1px solid rgba(var(--color-base-font-rgb), 0.3);
|
|
||||||
padding: 0.3rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stacked-bar-chart-rate95 {
|
|
||||||
.stacked-bar-chart-base();
|
|
||||||
|
|
||||||
background: transparent;
|
|
||||||
border-bottom: 1px dotted rgba(var(--color-base-font-rgb), 0.5);
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stacked-bar-chart-rate100 {
|
|
||||||
.stacked-bar-chart-base();
|
|
||||||
|
|
||||||
background: transparent;
|
|
||||||
border-left: 1px solid rgba(var(--color-base-font-rgb), 0.9);
|
|
||||||
padding: 0.4rem 0;
|
|
||||||
width: 1px;
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
.loader,
|
|
||||||
.loader::after {
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 10em;
|
|
||||||
height: 10em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader {
|
|
||||||
margin: 60px auto;
|
|
||||||
font-size: 10px;
|
|
||||||
position: relative;
|
|
||||||
text-indent: -9999em;
|
|
||||||
border-top: 1.1em solid var(--color-loading-indicator);
|
|
||||||
border-right: 1.1em solid var(--color-loading-indicator);
|
|
||||||
border-bottom: 1.1em solid var(--color-loading-indicator);
|
|
||||||
border-left: 1.1em solid var(--color-loading-indicator-gap);
|
|
||||||
transform: translateZ(0);
|
|
||||||
animation: load8 1.1s infinite linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes load8 {
|
|
||||||
0% {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
||||||
<path fill="#58f" d="M11 20.85a.92.92 0 0 1-1.1.93A10 10 0 0 1 2.06 13c-.06-.55.4-1 .95-1h3a1 1 0 0 1 1 1 3 3 0 0 0 3 3 1 1 0 0 1 1 1v3.85Zm6-1.92c0 .77.83 1.23 1.42.74a10 10 0 0 0 2.03-2.32c.39-.61-.09-1.35-.81-1.35H18a1 1 0 0 0-1 1v1.93ZM12 2a10 10 0 0 1 6.65 2.53c.61.55.17 1.47-.65 1.47h-.15A2.85 2.85 0 0 0 15 8.85c0 .33-.18.62-.47.77l-.08.04a1 1 0 0 1-.9 0l-.08-.04a.85.85 0 0 1-.47-.77A2.85 2.85 0 0 0 10.15 6H10a1 1 0 0 1-1-1V3.2c0-.44.28-.84.7-.94C10.45 2.1 11.22 2 12 2Z"/>
|
|
||||||
<path fill="#58f" d="M3.42 10c-.63 0-1.1-.58-.9-1.18.6-1.8 1.7-3.36 3.12-4.53C6.2 3.82 7 4.26 7 5a3 3 0 0 0 3 3h.15c.47 0 .85.38.85.85 0 1.09.61 2.07 1.58 2.56l.08.04a3 3 0 0 0 2.68 0l.08-.04A2.85 2.85 0 0 0 17 8.85c0-.47.38-.85.85-.85h2.66c.4 0 .77.23.9.6a9.98 9.98 0 0 1 .52 4.6.94.94 0 0 1-.95.8H18a3 3 0 0 0-3 3v3.8c0 .44-.28.84-.7.94l-.2.04a.92.92 0 0 1-1.1-.93V17a3 3 0 0 0-3-3 1 1 0 0 1-1-1 3 3 0 0 0-3-3H3.42Z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 989 B |
|
@ -1,6 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
||||||
<path d="M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184 184-82.39 184-184S349.61 64 248 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/>
|
|
||||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 220h32v116"/>
|
|
||||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M208 340h88"/>
|
|
||||||
<path d="M248 130a26 26 0 1026 26 26 26 0 00-26-26z" fill="currentColor" stroke="currentColor" stroke-miterlimit="10" stroke-width="1"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 648 B |
|
@ -1,6 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
||||||
<path d="M368 415.86V72a24.07 24.07 0 00-24-24H72a24.07 24.07 0 00-24 24v352a40.12 40.12 0 0040 40h328" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/>
|
|
||||||
<path d="M416 464h0a48 48 0 01-48-48V128h72a24 24 0 0124 24v264a48 48 0 01-48 48z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/>
|
|
||||||
<path d="M240 128h64M240 192h64M112 256h192M112 320h192M112 384h192" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/>
|
|
||||||
<path d="M176 208h-64a16 16 0 01-16-16v-64a16 16 0 0116-16h64a16 16 0 0116 16v64a16 16 0 01-16 16z" fill="currentColor" stroke="currentColor" stroke-linejoin="round" stroke-width="1" />
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 787 B |
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
|
||||||
<g><polygon fill="#ddd" points="128,192 256,320 384,192"/></g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 196 B |
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
|
||||||
<g><polygon points="128,192 256,320 384,192"/></g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 184 B |
2
client/simple/static/.gitattributes
vendored
|
@ -1,2 +0,0 @@
|
||||||
leaflet.css -diff
|
|
||||||
leaflet.js -diff
|
|
|
@ -1,84 +0,0 @@
|
||||||
/**
|
|
||||||
* Generate icons.html for the jinja templates of the simple theme.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { argv } from "node:process";
|
|
||||||
import { dirname, resolve } from "node:path";
|
|
||||||
import { jinja_svg_sets } from "./tools/jinja_svg_catalog.js";
|
|
||||||
|
|
||||||
const HERE = dirname(argv[1]) + "/";
|
|
||||||
const dest = resolve(HERE, "../../searx/templates/simple/icons.html");
|
|
||||||
|
|
||||||
/** @type import("./tools/jinja_svg_catalog.js").JinjaMacro[] */
|
|
||||||
const searxng_jinja_macros = [
|
|
||||||
{ name: "icon", class: "sxng-icon-set" },
|
|
||||||
{ name: "icon_small", class: "sxng-icon-set-small" },
|
|
||||||
{ name: "icon_big", class: "sxng-icon-set-big" },
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
const sxng_icon_opts ={
|
|
||||||
multipass: true,
|
|
||||||
plugins: [
|
|
||||||
{ name: "removeTitle" },
|
|
||||||
{ name: "removeXMLNS" },
|
|
||||||
{ name: "addAttributesToSVGElement",
|
|
||||||
params: {
|
|
||||||
attributes: [
|
|
||||||
{
|
|
||||||
"aria-hidden": "true",
|
|
||||||
}]}}]
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/** @type import("./tools/jinja_svg_catalog.js").IconSet */
|
|
||||||
const simple_icons = [
|
|
||||||
{
|
|
||||||
base: resolve(HERE, "node_modules/ionicons/dist/svg"),
|
|
||||||
set: {
|
|
||||||
"alert": "alert-outline.svg",
|
|
||||||
"appstore": "apps-outline.svg",
|
|
||||||
"book": "book-outline.svg",
|
|
||||||
"close": "close-outline.svg",
|
|
||||||
"download": "download-outline.svg",
|
|
||||||
"ellipsis-vertical": "ellipsis-vertical-outline.svg",
|
|
||||||
"file-tray-full": "file-tray-full-outline.svg",
|
|
||||||
"film": "film-outline.svg",
|
|
||||||
"globe": "globe-outline.svg",
|
|
||||||
"heart": "heart-outline.svg",
|
|
||||||
"image": "image-outline.svg",
|
|
||||||
"layers": "layers-outline.svg",
|
|
||||||
"leecher": "arrow-down.svg",
|
|
||||||
"location": "location-outline.svg",
|
|
||||||
"magnet": "magnet-outline.svg",
|
|
||||||
"musical-notes": "musical-notes-outline.svg",
|
|
||||||
"navigate-down": "chevron-down-outline.svg",
|
|
||||||
"navigate-left": "chevron-back-outline.svg",
|
|
||||||
"navigate-right": "chevron-forward-outline.svg",
|
|
||||||
"navigate-up": "chevron-up-outline.svg",
|
|
||||||
"people": "people-outline.svg",
|
|
||||||
"play": "play-outline.svg",
|
|
||||||
"radio": "radio-outline.svg",
|
|
||||||
"save": "save-outline.svg",
|
|
||||||
"school": "school-outline.svg",
|
|
||||||
"search": "search-outline.svg",
|
|
||||||
"seeder": "swap-vertical.svg",
|
|
||||||
"settings": "settings-outline.svg",
|
|
||||||
"tv": "tv-outline.svg",
|
|
||||||
},
|
|
||||||
svgo_opts: sxng_icon_opts,
|
|
||||||
},
|
|
||||||
// some of the ionicons are not suitable for a dark theme, we fixed the svg
|
|
||||||
// manually in src/svg/ionicons
|
|
||||||
// - https://github.com/searxng/searxng/pull/4284#issuecomment-2680550342
|
|
||||||
{
|
|
||||||
base: resolve(HERE, "src/svg/ionicons"),
|
|
||||||
set: {
|
|
||||||
"information-circle": "information-circle-outline.svg",
|
|
||||||
"newspaper": "newspaper-outline.svg",
|
|
||||||
},
|
|
||||||
svgo_opts: sxng_icon_opts,
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
jinja_svg_sets(dest, searxng_jinja_macros, simple_icons);
|
|
|
@ -1,78 +0,0 @@
|
||||||
import fs from "fs";
|
|
||||||
import path from "path";
|
|
||||||
import sharp from "sharp";
|
|
||||||
import { optimize as svgo } from "svgo";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {object} Src2Dest - Mapping of src to dest
|
|
||||||
* @property {string} src - Name of the source file.
|
|
||||||
* @property {string} dest - Name of the destination file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a list of SVG files to PNG.
|
|
||||||
*
|
|
||||||
* @param {Src2Dest[]} items - Array of SVG files (src: SVG, dest:PNG) to convert.
|
|
||||||
*/
|
|
||||||
|
|
||||||
async function svg2png (items) {
|
|
||||||
items.forEach(
|
|
||||||
async (item) => {
|
|
||||||
try {
|
|
||||||
fs.mkdir(path.dirname(item.dest), { recursive: true }, (err) => {
|
|
||||||
if (err)
|
|
||||||
throw err;
|
|
||||||
});
|
|
||||||
|
|
||||||
const info = await sharp(item.src).png({
|
|
||||||
force: true,
|
|
||||||
compressionLevel: 9,
|
|
||||||
palette: true,
|
|
||||||
}).toFile(item.dest);
|
|
||||||
|
|
||||||
console.log(
|
|
||||||
`[svg2png] created ${item.dest} -- bytes: ${info.size}, w:${info.width}px, h:${info.height}px`
|
|
||||||
);
|
|
||||||
} catch (err) {
|
|
||||||
console.error(`ERROR: ${item.dest} -- ${err}`);
|
|
||||||
throw(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optimize SVG images for WEB.
|
|
||||||
*
|
|
||||||
* @param {import('svgo').Config} svgo_opts - Options passed to svgo.
|
|
||||||
* @param {Src2Dest[]} items - Array of SVG files (src:SVG, dest:SVG) to optimize.
|
|
||||||
*/
|
|
||||||
|
|
||||||
async function svg2svg(svgo_opts, items) {
|
|
||||||
items.forEach(
|
|
||||||
async (item) => {
|
|
||||||
try {
|
|
||||||
fs.mkdir(path.dirname(item.dest), { recursive: true }, (err) => {
|
|
||||||
if (err)
|
|
||||||
throw err;
|
|
||||||
});
|
|
||||||
|
|
||||||
const raw = fs.readFileSync(item.src, "utf8");
|
|
||||||
const opt = svgo(raw, svgo_opts);
|
|
||||||
fs.writeFileSync(item.dest, opt.data);
|
|
||||||
console.log(
|
|
||||||
`[svg2svg] optimized: ${item.dest} -- src: ${item.src}`
|
|
||||||
);
|
|
||||||
|
|
||||||
} catch (err) {
|
|
||||||
console.error(`ERROR: optimize src: ${item.src} -- ${err}`);
|
|
||||||
throw(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export { svg2png, svg2svg };
|
|
|
@ -1,26 +0,0 @@
|
||||||
{{--
|
|
||||||
This is a EDGE https://edgejs.dev/ template to generate a HTML Jinja template
|
|
||||||
for the backend. Example output of this EDGE template:
|
|
||||||
- https://github.com/searxng/searxng/blob/master/searx/templates/simple/icons.html
|
|
||||||
--}}
|
|
||||||
{#
|
|
||||||
Catalog of SVG symbols that can be inserted into the HTML output of a Jinja
|
|
||||||
template. This file from:
|
|
||||||
|
|
||||||
client/simple/tools/icon_catalog.edge.html
|
|
||||||
#}
|
|
||||||
|
|
||||||
{%-
|
|
||||||
set catalog = {
|
|
||||||
@each((svg, name) in svg_catalog)
|
|
||||||
'{{{name}}}' : '{{{svg}}}',
|
|
||||||
@end
|
|
||||||
}
|
|
||||||
-%}
|
|
||||||
|
|
||||||
@each(macro in macros)
|
|
||||||
|
|
||||||
{% macro {{ macro.name }}(action, alt) -%}
|
|
||||||
{{ open_curly_brace }} catalog[action] | replace("{{__jinja_class_placeholder__}}", "{{ macro.class }}") | safe {{ close_curly_brace }}
|
|
||||||
{%- endmacro %}
|
|
||||||
@end
|
|
|
@ -1,132 +0,0 @@
|
||||||
import fs from "fs";
|
|
||||||
import { resolve, dirname } from "path";
|
|
||||||
import { Edge } from 'edge.js';
|
|
||||||
import { optimize as svgo } from "svgo";
|
|
||||||
import { fileURLToPath } from 'url';
|
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
||||||
const __jinja_class_placeholder__ = "__jinja_class_placeholder__";
|
|
||||||
|
|
||||||
// -- types
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {object} IconSet - A set of icons
|
|
||||||
* @property {object[]} set - Array of SVG icons, where property name is the
|
|
||||||
* name of the icon and value is the src of the SVG (relative to base).
|
|
||||||
* @property {string} base - Folder in which the SVG src files are located.
|
|
||||||
* @property {import("svgo").Config} svgo_opts - svgo options for this set.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {object} IconSVG - Mapping of icon name to SVG source file.
|
|
||||||
* @property {string} name - Name of the icon isource file.
|
|
||||||
* @property {string} src - Name of the destination file.
|
|
||||||
* @property {import("svgo").Config} svgo_opts - Options passed to svgo.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {object} JinjaMacro - Arguments to create a jinja macro
|
|
||||||
* @property {string} name - Name of the jinja macro.
|
|
||||||
* @property {string} class - SVG's class name (value of XML class attribute)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// -- functions
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a jinja template with a catalog of SVG icons that can be
|
|
||||||
* used in in other HTML jinja templates.
|
|
||||||
*
|
|
||||||
* @param {string} dest - filename of the generate jinja template.
|
|
||||||
* @param {JinjaMacro} macros - Jinja macros to create.
|
|
||||||
* @param {IconSVG[]} items - Array of SVG items.
|
|
||||||
*/
|
|
||||||
|
|
||||||
function jinja_svg_catalog(dest, macros, items) {
|
|
||||||
|
|
||||||
const svg_catalog = {};
|
|
||||||
const edge_template = resolve(__dirname, "jinja_svg_catalog.html.edge");
|
|
||||||
|
|
||||||
items.forEach(
|
|
||||||
(item) => {
|
|
||||||
|
|
||||||
/** @type {import("svgo").Config} */
|
|
||||||
// JSON.stringify & JSON.parse are used to create a deep copy of the
|
|
||||||
// item.svgo_opts object
|
|
||||||
const svgo_opts = JSON.parse(JSON.stringify(item.svgo_opts));
|
|
||||||
svgo_opts.plugins.push({
|
|
||||||
name: "addClassesToSVGElement",
|
|
||||||
params: {
|
|
||||||
classNames: [__jinja_class_placeholder__]
|
|
||||||
}}
|
|
||||||
);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const raw = fs.readFileSync(item.src, "utf8");
|
|
||||||
const opt = svgo(raw, svgo_opts);
|
|
||||||
svg_catalog[item.name] = opt.data;
|
|
||||||
} catch (err) {
|
|
||||||
console.error(`ERROR: jinja_svg_catalog processing ${item.name} src: ${item.src} -- ${err}`);
|
|
||||||
throw(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
fs.mkdir(dirname(dest), { recursive: true }, (err) => {
|
|
||||||
if (err) throw err;
|
|
||||||
});
|
|
||||||
|
|
||||||
const ctx = {
|
|
||||||
svg_catalog: svg_catalog,
|
|
||||||
macros: macros,
|
|
||||||
edge_template: edge_template,
|
|
||||||
__jinja_class_placeholder__: __jinja_class_placeholder__,
|
|
||||||
// see https://github.com/edge-js/edge/issues/162
|
|
||||||
open_curly_brace : "{{",
|
|
||||||
close_curly_brace : "}}"
|
|
||||||
};
|
|
||||||
|
|
||||||
const jinjatmpl = Edge.create().renderRawSync(
|
|
||||||
fs.readFileSync(edge_template, "utf-8"),
|
|
||||||
ctx
|
|
||||||
);
|
|
||||||
|
|
||||||
fs.writeFileSync(dest, jinjatmpl);
|
|
||||||
console.log(`[jinja_svg_catalog] created: ${dest}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calls jinja_svg_catalog for a collection of icon sets where each set has its
|
|
||||||
* own parameters.
|
|
||||||
*
|
|
||||||
* @param {string} dest - filename of the generate jinja template.
|
|
||||||
* @param {JinjaMacro} macros - Jinja macros to create.
|
|
||||||
* @param {IconSet[]} sets - Array of SVG sets.
|
|
||||||
*/
|
|
||||||
function jinja_svg_sets(dest, macros, sets) {
|
|
||||||
/** @type IconSVG[] */
|
|
||||||
const items = [];
|
|
||||||
const all = [];
|
|
||||||
for (const obj of sets) {
|
|
||||||
|
|
||||||
for (const [name, file] of Object.entries(obj.set)) {
|
|
||||||
if (all.includes(name)) {
|
|
||||||
throw new Error(`ERROR: ${name} has already been defined`);
|
|
||||||
}
|
|
||||||
items.push({
|
|
||||||
name: name,
|
|
||||||
src: resolve(obj.base, file),
|
|
||||||
svgo_opts: obj.svgo_opts,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
jinja_svg_catalog(dest, macros, items);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- exports
|
|
||||||
|
|
||||||
export {
|
|
||||||
jinja_svg_sets,
|
|
||||||
jinja_svg_catalog,
|
|
||||||
};
|
|
|
@ -1,41 +0,0 @@
|
||||||
/**
|
|
||||||
* Custom vite plugins to build the web-client components of the simple theme.
|
|
||||||
*
|
|
||||||
* HINT:
|
|
||||||
*
|
|
||||||
* This is an inital implementation for the migration of the build process
|
|
||||||
* from grunt to vite. For fully support (vite: build & serve) more work is
|
|
||||||
* needed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { svg2png } from "./img.js";
|
|
||||||
import { svg2svg } from "./img.js";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Vite plugin to convert a list of SVG files to PNG.
|
|
||||||
*
|
|
||||||
* @param {import('./img.js').Src2Dest} items - Array of SVG files (src: SVG, dest:PNG) to convert.
|
|
||||||
*/
|
|
||||||
function plg_svg2png(items) {
|
|
||||||
return {
|
|
||||||
name: 'searxng-simple-svg2png',
|
|
||||||
apply: 'build', // or 'serve'
|
|
||||||
async writeBundle() { svg2png(items); },
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Vite plugin to optimize SVG images for WEB.
|
|
||||||
*
|
|
||||||
* @param {import('svgo').Config} svgo_opts - Options passed to svgo.
|
|
||||||
* @param {import('./img.js').Src2Dest} items - Array of SVG files (src:SVG, dest:SVG) to optimize.
|
|
||||||
*/
|
|
||||||
function plg_svg2svg(svgo_opts, items) {
|
|
||||||
return {
|
|
||||||
name: 'searxng-simple-svg2png',
|
|
||||||
apply: 'build', // or 'serve'
|
|
||||||
async writeBundle() { svg2svg(items, svgo_opts); },
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export { plg_svg2png, plg_svg2svg };
|
|
|
@ -1,185 +0,0 @@
|
||||||
/**
|
|
||||||
* CONFIG: https://vite.dev/config/
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { resolve } from "node:path";
|
|
||||||
import { defineConfig } from "vite";
|
|
||||||
import stylelint from "vite-plugin-stylelint";
|
|
||||||
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
||||||
import { plg_svg2png } from "./tools/plg.js";
|
|
||||||
import { plg_svg2svg } from "./tools/plg.js";
|
|
||||||
|
|
||||||
|
|
||||||
const ROOT = "../.."; // root of the git reposetory
|
|
||||||
|
|
||||||
const PATH = {
|
|
||||||
|
|
||||||
dist: resolve(ROOT, "searx/static/themes/simple"),
|
|
||||||
// dist: resolve(ROOT, "client/simple/dist"),
|
|
||||||
|
|
||||||
src: "src",
|
|
||||||
modules: "node_modules",
|
|
||||||
brand: "src/brand",
|
|
||||||
static: resolve(ROOT, "client/simple/static"),
|
|
||||||
leaflet: resolve(ROOT, "client/simple/node_modules/leaflet/dist"),
|
|
||||||
templates: resolve(ROOT, "searx/templates/simple"),
|
|
||||||
};
|
|
||||||
|
|
||||||
const svg2svg_opts = {
|
|
||||||
plugins: [
|
|
||||||
{ name: "preset-default" },
|
|
||||||
"sortAttrs",
|
|
||||||
"convertStyleToAttrs",
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
const svg2svg_favicon_opts = {
|
|
||||||
plugins: [
|
|
||||||
{ name: "preset-default" },
|
|
||||||
"sortAttrs",
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
|
|
||||||
root: PATH.src,
|
|
||||||
mode: "production",
|
|
||||||
// mode: "development",
|
|
||||||
|
|
||||||
// FIXME: missing CCS sourcemaps!!
|
|
||||||
// see: https://github.com/vitejs/vite/discussions/13845#discussioncomment-11992084
|
|
||||||
//
|
|
||||||
// what I have tried so far (see config below):
|
|
||||||
//
|
|
||||||
// - build.sourcemap
|
|
||||||
// - esbuild.sourcemap
|
|
||||||
// - css.preprocessorOptions.less.sourceMap
|
|
||||||
|
|
||||||
css: {
|
|
||||||
devSourcemap: true,
|
|
||||||
preprocessorOptions: {
|
|
||||||
less: {
|
|
||||||
// FIXME: missing CCS sourcemaps!!
|
|
||||||
sourceMap: {
|
|
||||||
outputSourceFiles: true,
|
|
||||||
sourceMapURL: (name) => { const s = name.split('/'); return s[s.length - 1] + '.map'; },
|
|
||||||
},
|
|
||||||
// env: 'development',
|
|
||||||
// relativeUrls: true,
|
|
||||||
// javascriptEnabled: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}, // end: css
|
|
||||||
|
|
||||||
esbuild : {
|
|
||||||
// FIXME: missing CCS sourcemaps!!
|
|
||||||
sourcemap: true
|
|
||||||
},
|
|
||||||
|
|
||||||
build: {
|
|
||||||
manifest: "manifest.json",
|
|
||||||
emptyOutDir: true,
|
|
||||||
assetsDir: "",
|
|
||||||
outDir: PATH.dist,
|
|
||||||
|
|
||||||
// FIXME: missing CCS sourcemaps!!
|
|
||||||
sourcemap: true,
|
|
||||||
|
|
||||||
// https://vite.dev/config/build-options.html#build-cssminify
|
|
||||||
cssMinify: true,
|
|
||||||
// cssMinify: "esbuild",
|
|
||||||
minify: "esbuild",
|
|
||||||
|
|
||||||
rollupOptions: {
|
|
||||||
input: {
|
|
||||||
|
|
||||||
// build CSS files
|
|
||||||
"css/searxng.min.css": PATH.src + "/less/style-ltr.less",
|
|
||||||
"css/searxng-rtl.min.css": PATH.src + "/less/style-rtl.less",
|
|
||||||
"css/rss.min.css": PATH.src + "/less/rss.less",
|
|
||||||
|
|
||||||
// build JS files
|
|
||||||
"js/searxng.head.min": PATH.src + "/js/searxng.head.js",
|
|
||||||
"js/searxng.min": PATH.src + "/js/searxng.js",
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
// file naming conventions / pathnames are relative to outDir (PATH.dist)
|
|
||||||
output: {
|
|
||||||
entryFileNames: "[name].js",
|
|
||||||
chunkFileNames: "[name].js",
|
|
||||||
assetFileNames: "[name].[ext]",
|
|
||||||
// Vite does not support "rollupOptions.output.sourcemap".
|
|
||||||
// Please use "build.sourcemap" instead.
|
|
||||||
// sourcemap: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
}, // end: build
|
|
||||||
|
|
||||||
plugins: [
|
|
||||||
|
|
||||||
stylelint({
|
|
||||||
build: true,
|
|
||||||
emitWarningAsError: true,
|
|
||||||
fix: true,
|
|
||||||
}),
|
|
||||||
|
|
||||||
// Leaflet
|
|
||||||
|
|
||||||
viteStaticCopy({
|
|
||||||
targets: [
|
|
||||||
{ src: PATH.leaflet + "/leaflet.{js,js.map}", dest: PATH.dist + "/js" },
|
|
||||||
{ src: PATH.leaflet + "/images/*.png", dest: PATH.dist + "/css/images/" },
|
|
||||||
{ src: PATH.leaflet + "/*.{css,css.map}", dest: PATH.dist + "/css" },
|
|
||||||
{ src: PATH.static + "/**/*", dest: PATH.dist },
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
|
|
||||||
// -- svg images
|
|
||||||
|
|
||||||
plg_svg2svg(
|
|
||||||
[
|
|
||||||
{ src: PATH.src + "/svg/empty_favicon.svg", dest: PATH.dist + "/img/empty_favicon.svg" },
|
|
||||||
{ src: PATH.src + "/svg/select-dark.svg", dest: PATH.dist + "/img/select-dark.svg" },
|
|
||||||
{ src: PATH.src + "/svg/select-light.svg", dest: PATH.dist + "/img/select-light.svg" },
|
|
||||||
],
|
|
||||||
svg2svg_opts,
|
|
||||||
),
|
|
||||||
|
|
||||||
// SearXNG brand (static)
|
|
||||||
|
|
||||||
plg_svg2png(
|
|
||||||
[
|
|
||||||
{ src: PATH.brand + "/searxng-wordmark.svg", dest: PATH.dist + "/img/favicon.png" },
|
|
||||||
{ src: PATH.brand + "/searxng.svg", dest: PATH.dist + "/img/searxng.png" },
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
// -- svg
|
|
||||||
plg_svg2svg(
|
|
||||||
[
|
|
||||||
{ src: PATH.brand + "/searxng.svg", dest: PATH.dist + "/img/searxng.svg" },
|
|
||||||
{ src: PATH.brand + "/img_load_error.svg", dest: PATH.dist + "/img/img_load_error.svg" },
|
|
||||||
],
|
|
||||||
svg2svg_opts,
|
|
||||||
),
|
|
||||||
|
|
||||||
// -- favicon
|
|
||||||
plg_svg2svg(
|
|
||||||
[ { src: PATH.brand + "/searxng-wordmark.svg", dest: PATH.dist + "/img/favicon.svg" } ],
|
|
||||||
svg2svg_favicon_opts,
|
|
||||||
),
|
|
||||||
|
|
||||||
// -- simple templates
|
|
||||||
plg_svg2svg(
|
|
||||||
[
|
|
||||||
{ src: PATH.brand + "/searxng-wordmark.svg", dest: PATH.templates + "/searxng-wordmark.min.svg" },
|
|
||||||
],
|
|
||||||
svg2svg_opts
|
|
||||||
),
|
|
||||||
|
|
||||||
] // end: plugins
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,65 +0,0 @@
|
||||||
FROM ghcr.io/searxng/base:searxng-builder AS builder
|
|
||||||
|
|
||||||
COPY ./requirements.txt ./requirements.txt
|
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pip,target=/root/.cache/pip python -m venv ./venv \
|
|
||||||
&& . ./venv/bin/activate \
|
|
||||||
&& pip install -r requirements.txt \
|
|
||||||
&& pip install "uwsgi~=2.0"
|
|
||||||
|
|
||||||
COPY ./searx/ ./searx/
|
|
||||||
|
|
||||||
ARG TIMESTAMP_SETTINGS="0"
|
|
||||||
|
|
||||||
RUN python -m compileall -q searx \
|
|
||||||
&& touch -c --date=@$TIMESTAMP_SETTINGS ./searx/settings.yml \
|
|
||||||
&& find ./searx/static \
|
|
||||||
\( -name "*.html" -o -name "*.css" -o -name "*.js" -o -name "*.svg" -o -name "*.ttf" -o -name "*.eot" \) \
|
|
||||||
-type f -exec gzip -9 -k {} + -exec brotli --best {} +
|
|
||||||
|
|
||||||
FROM ghcr.io/searxng/base:searxng AS dist
|
|
||||||
|
|
||||||
ARG LABEL_DATE="0001-01-01T00:00:00Z"
|
|
||||||
ARG GIT_URL="unspecified"
|
|
||||||
ARG SEARXNG_GIT_VERSION="unspecified"
|
|
||||||
ARG LABEL_VCS_REF="unspecified"
|
|
||||||
ARG LABEL_VCS_URL="unspecified"
|
|
||||||
|
|
||||||
COPY --chown=searxng:searxng --from=builder /usr/local/searxng/venv/ ./venv/
|
|
||||||
COPY --chown=searxng:searxng --from=builder /usr/local/searxng/searx/ ./searx/
|
|
||||||
COPY --chown=searxng:searxng ./container/config/ ./.template/
|
|
||||||
COPY --chown=searxng:searxng ./container/entrypoint.sh ./entrypoint.sh
|
|
||||||
|
|
||||||
ARG TIMESTAMP_UWSGI="0"
|
|
||||||
|
|
||||||
RUN touch -c --date=@$TIMESTAMP_UWSGI ./.template/uwsgi.ini
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="searxng <$GIT_URL>" \
|
|
||||||
org.opencontainers.image.created="$LABEL_DATE" \
|
|
||||||
org.opencontainers.image.description="A privacy-respecting, hackable metasearch engine" \
|
|
||||||
org.opencontainers.image.documentation="https://github.com/searxng/searxng-docker" \
|
|
||||||
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
|
||||||
org.opencontainers.image.revision="$LABEL_VCS_REF" \
|
|
||||||
org.opencontainers.image.source="$LABEL_VCS_URL" \
|
|
||||||
org.opencontainers.image.title="searxng" \
|
|
||||||
org.opencontainers.image.url="$LABEL_VCS_URL" \
|
|
||||||
org.opencontainers.image.version="$SEARXNG_GIT_VERSION"
|
|
||||||
|
|
||||||
ENV SEARXNG_VERSION="$SEARXNG_GIT_VERSION" \
|
|
||||||
INSTANCE_NAME="SearXNG" \
|
|
||||||
AUTOCOMPLETE="" \
|
|
||||||
BASE_URL="" \
|
|
||||||
BIND_ADDRESS="[::]:8080" \
|
|
||||||
SEARXNG_SETTINGS_PATH="$CONFIG_PATH/settings.yml" \
|
|
||||||
UWSGI_SETTINGS_PATH="$CONFIG_PATH/uwsgi.ini" \
|
|
||||||
UWSGI_WORKERS="%k" \
|
|
||||||
UWSGI_THREADS="4"
|
|
||||||
|
|
||||||
VOLUME $CONFIG_PATH
|
|
||||||
VOLUME $DATA_PATH
|
|
||||||
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/searxng/entrypoint.sh"]
|
|
|
@ -1,25 +0,0 @@
|
||||||
contents:
|
|
||||||
keyring:
|
|
||||||
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
|
|
||||||
repositories:
|
|
||||||
- https://packages.wolfi.dev/os
|
|
||||||
packages:
|
|
||||||
- wolfi-base
|
|
||||||
- build-base
|
|
||||||
- python-3.13-dev
|
|
||||||
- py3-pip
|
|
||||||
- brotli
|
|
||||||
|
|
||||||
entrypoint:
|
|
||||||
command: /bin/sh -l
|
|
||||||
|
|
||||||
work-dir: /usr/local/searxng/
|
|
||||||
|
|
||||||
environment:
|
|
||||||
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
||||||
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
|
|
||||||
HISTFILE: /dev/null
|
|
||||||
|
|
||||||
archs:
|
|
||||||
- x86_64
|
|
||||||
- aarch64
|
|
|
@ -1,61 +0,0 @@
|
||||||
contents:
|
|
||||||
keyring:
|
|
||||||
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
|
|
||||||
repositories:
|
|
||||||
- https://packages.wolfi.dev/os
|
|
||||||
packages:
|
|
||||||
- wolfi-baselayout
|
|
||||||
- ca-certificates-bundle
|
|
||||||
- busybox
|
|
||||||
- python-3.13
|
|
||||||
# healthcheck
|
|
||||||
- wget
|
|
||||||
# uwsgi
|
|
||||||
- mailcap
|
|
||||||
|
|
||||||
entrypoint:
|
|
||||||
command: /bin/sh -l
|
|
||||||
|
|
||||||
work-dir: /usr/local/searxng/
|
|
||||||
|
|
||||||
accounts:
|
|
||||||
groups:
|
|
||||||
- groupname: searxng
|
|
||||||
gid: 977
|
|
||||||
users:
|
|
||||||
- username: searxng
|
|
||||||
uid: 977
|
|
||||||
shell: /bin/ash
|
|
||||||
|
|
||||||
environment:
|
|
||||||
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
||||||
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
|
|
||||||
HISTFILE: /dev/null
|
|
||||||
CONFIG_PATH: /etc/searxng
|
|
||||||
DATA_PATH: /var/cache/searxng
|
|
||||||
|
|
||||||
paths:
|
|
||||||
# Workdir
|
|
||||||
- path: /usr/local/searxng/
|
|
||||||
type: directory
|
|
||||||
uid: 977
|
|
||||||
gid: 977
|
|
||||||
permissions: 0o755
|
|
||||||
|
|
||||||
# Config volume
|
|
||||||
- path: /etc/searxng/
|
|
||||||
type: directory
|
|
||||||
uid: 977
|
|
||||||
gid: 977
|
|
||||||
permissions: 0o755
|
|
||||||
|
|
||||||
# Data volume
|
|
||||||
- path: /var/cache/searxng/
|
|
||||||
type: directory
|
|
||||||
uid: 977
|
|
||||||
gid: 977
|
|
||||||
permissions: 0o755
|
|
||||||
|
|
||||||
archs:
|
|
||||||
- x86_64
|
|
||||||
- aarch64
|
|
|
@ -1,55 +0,0 @@
|
||||||
[uwsgi]
|
|
||||||
# Listening address
|
|
||||||
# default value: [::]:8080 (see Dockerfile)
|
|
||||||
http-socket = $(BIND_ADDRESS)
|
|
||||||
|
|
||||||
# Who will run the code
|
|
||||||
uid = searxng
|
|
||||||
gid = searxng
|
|
||||||
|
|
||||||
# Number of workers (usually CPU count)
|
|
||||||
# default value: %k (= number of CPU core, see Dockerfile)
|
|
||||||
workers = $(UWSGI_WORKERS)
|
|
||||||
|
|
||||||
# Number of threads per worker
|
|
||||||
# default value: 4 (see Dockerfile)
|
|
||||||
threads = $(UWSGI_THREADS)
|
|
||||||
|
|
||||||
# The right granted on the created socket
|
|
||||||
chmod-socket = 666
|
|
||||||
|
|
||||||
# Plugin to use and interpreter config
|
|
||||||
single-interpreter = true
|
|
||||||
master = true
|
|
||||||
lazy-apps = true
|
|
||||||
enable-threads = true
|
|
||||||
|
|
||||||
# Module to import
|
|
||||||
module = searx.webapp
|
|
||||||
|
|
||||||
# Virtualenv and python path
|
|
||||||
pythonpath = /usr/local/searxng/
|
|
||||||
chdir = /usr/local/searxng/searx/
|
|
||||||
|
|
||||||
# automatically set processes name to something meaningful
|
|
||||||
auto-procname = true
|
|
||||||
|
|
||||||
# Disable request logging for privacy
|
|
||||||
disable-logging = true
|
|
||||||
log-5xx = true
|
|
||||||
|
|
||||||
# Set the max size of a request (request-body excluded)
|
|
||||||
buffer-size = 8192
|
|
||||||
|
|
||||||
# No keep alive
|
|
||||||
# See https://github.com/searx/searx-docker/issues/24
|
|
||||||
add-header = Connection: close
|
|
||||||
|
|
||||||
# Follow SIGTERM convention
|
|
||||||
# See https://github.com/searxng/searxng/issues/3427
|
|
||||||
die-on-term
|
|
||||||
|
|
||||||
# uwsgi serves the static files
|
|
||||||
static-map = /static=/usr/local/searxng/searx/static
|
|
||||||
static-gzip-all = True
|
|
||||||
offload-threads = %k
|
|
|
@ -1,166 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# shellcheck shell=dash
|
|
||||||
set -u
|
|
||||||
|
|
||||||
check_file() {
|
|
||||||
local target="$1"
|
|
||||||
|
|
||||||
if [ ! -f "$target" ]; then
|
|
||||||
cat <<EOF
|
|
||||||
!!!
|
|
||||||
!!! ERROR
|
|
||||||
!!! "$target" is not a valid file, exiting...
|
|
||||||
!!!
|
|
||||||
EOF
|
|
||||||
exit 127
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
check_directory() {
|
|
||||||
local target="$1"
|
|
||||||
|
|
||||||
if [ ! -d "$target" ]; then
|
|
||||||
cat <<EOF
|
|
||||||
!!!
|
|
||||||
!!! ERROR
|
|
||||||
!!! "$target" is not a valid directory, exiting...
|
|
||||||
!!!
|
|
||||||
EOF
|
|
||||||
exit 127
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_ownership() {
|
|
||||||
local target="$1"
|
|
||||||
local type="$2"
|
|
||||||
|
|
||||||
case "$type" in
|
|
||||||
file | directory) ;;
|
|
||||||
*)
|
|
||||||
cat <<EOF
|
|
||||||
!!!
|
|
||||||
!!! ERROR
|
|
||||||
!!! "$type" is not a valid type, exiting...
|
|
||||||
!!!
|
|
||||||
EOF
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$(stat -c %U:%G "$target")" != "searxng:searxng" ]; then
|
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
|
||||||
chown -R searxng:searxng "$target"
|
|
||||||
else
|
|
||||||
cat <<EOF
|
|
||||||
!!!
|
|
||||||
!!! WARNING
|
|
||||||
!!! "$target" $type is not owned by "searxng"
|
|
||||||
!!! This may cause issues when running SearXNG
|
|
||||||
!!!
|
|
||||||
!!! Run the container as root to fix this issue automatically
|
|
||||||
!!! Alternatively, you can chown the $type manually:
|
|
||||||
!!! $ chown -R searxng:searxng "$target"
|
|
||||||
!!!
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Apply envs to uwsgi.ini
|
|
||||||
setup_uwsgi() {
|
|
||||||
local timestamp
|
|
||||||
|
|
||||||
timestamp=$(stat -c %Y "$UWSGI_SETTINGS_PATH")
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "s|workers = .*|workers = ${UWSGI_WORKERS:-%k}|g" \
|
|
||||||
-e "s|threads = .*|threads = ${UWSGI_THREADS:-4}|g" \
|
|
||||||
"$UWSGI_SETTINGS_PATH"
|
|
||||||
|
|
||||||
# Restore timestamp
|
|
||||||
touch -c -d "@$timestamp" "$UWSGI_SETTINGS_PATH"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Apply envs to settings.yml
|
|
||||||
setup_searxng() {
|
|
||||||
local timestamp
|
|
||||||
|
|
||||||
timestamp=$(stat -c %Y "$SEARXNG_SETTINGS_PATH")
|
|
||||||
|
|
||||||
# Ensure trailing slash in BASE_URL
|
|
||||||
# https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expansion
|
|
||||||
export BASE_URL="${BASE_URL%/}/"
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "s|base_url: false|base_url: ${BASE_URL:-false}|g" \
|
|
||||||
-e "s/instance_name: \"SearXNG\"/instance_name: \"${INSTANCE_NAME:-SearXNG}\"/g" \
|
|
||||||
-e "s/autocomplete: \"\"/autocomplete: \"${AUTOCOMPLETE:-}\"/g" \
|
|
||||||
-e "s/ultrasecretkey/$(head -c 24 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9')/g" \
|
|
||||||
"$SEARXNG_SETTINGS_PATH"
|
|
||||||
|
|
||||||
# Restore timestamp
|
|
||||||
touch -c -d "@$timestamp" "$SEARXNG_SETTINGS_PATH"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Handle volume mounts
|
|
||||||
volume_handler() {
|
|
||||||
local target="$1"
|
|
||||||
|
|
||||||
# Check if it's a valid directory
|
|
||||||
check_directory "$target"
|
|
||||||
setup_ownership "$target" "directory"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Handle configuration file updates
|
|
||||||
config_handler() {
|
|
||||||
local target="$1"
|
|
||||||
local template="$2"
|
|
||||||
local new_template_target="$target.new"
|
|
||||||
|
|
||||||
# Create/Update the configuration file
|
|
||||||
if [ -f "$target" ]; then
|
|
||||||
setup_ownership "$target" "file"
|
|
||||||
|
|
||||||
if [ "$template" -nt "$target" ]; then
|
|
||||||
cp -pfT "$template" "$new_template_target"
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
...
|
|
||||||
... INFORMATION
|
|
||||||
... Update available for "$target"
|
|
||||||
... It is recommended to update the configuration file to ensure proper functionality
|
|
||||||
...
|
|
||||||
... New version placed at "$new_template_target"
|
|
||||||
... Please review and merge changes
|
|
||||||
...
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
cat <<EOF
|
|
||||||
...
|
|
||||||
... INFORMATION
|
|
||||||
... "$target" does not exist, creating from template...
|
|
||||||
...
|
|
||||||
EOF
|
|
||||||
cp -pfT "$template" "$target"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if it's a valid file
|
|
||||||
check_file "$target"
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "SearXNG $SEARXNG_VERSION"
|
|
||||||
|
|
||||||
# Check for volume mounts
|
|
||||||
volume_handler "$CONFIG_PATH"
|
|
||||||
volume_handler "$DATA_PATH"
|
|
||||||
|
|
||||||
# Check for updates in files
|
|
||||||
config_handler "$UWSGI_SETTINGS_PATH" "/usr/local/searxng/.template/uwsgi.ini"
|
|
||||||
config_handler "$SEARXNG_SETTINGS_PATH" "/usr/local/searxng/searx/settings.yml"
|
|
||||||
|
|
||||||
# Update files
|
|
||||||
setup_uwsgi
|
|
||||||
setup_searxng
|
|
||||||
|
|
||||||
exec /usr/local/searxng/venv/bin/uwsgi --http-socket "$BIND_ADDRESS" "$UWSGI_SETTINGS_PATH"
|
|
|
@ -1,107 +0,0 @@
|
||||||
FROM docker.io/library/python:3.13-slim AS builder
|
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
build-essential \
|
|
||||||
brotli \
|
|
||||||
# lxml
|
|
||||||
libxml2-dev \
|
|
||||||
libxslt1-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
# uwsgi
|
|
||||||
libpcre3-dev \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /usr/local/searxng/
|
|
||||||
|
|
||||||
COPY ./requirements.txt ./requirements.txt
|
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pip,target=/root/.cache/pip python -m venv ./venv \
|
|
||||||
&& . ./venv/bin/activate \
|
|
||||||
&& pip install -r requirements.txt \
|
|
||||||
&& pip install "uwsgi~=2.0"
|
|
||||||
|
|
||||||
COPY ./searx/ ./searx/
|
|
||||||
|
|
||||||
ARG TIMESTAMP_SETTINGS=0
|
|
||||||
|
|
||||||
RUN python -m compileall -q searx \
|
|
||||||
&& touch -c --date=@$TIMESTAMP_SETTINGS ./searx/settings.yml \
|
|
||||||
&& find /usr/local/searxng/searx/static \
|
|
||||||
\( -name '*.html' -o -name '*.css' -o -name '*.js' -o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
|
|
||||||
-type f -exec gzip -9 -k {} + -exec brotli --best {} +
|
|
||||||
|
|
||||||
ARG SEARXNG_UID=977
|
|
||||||
ARG SEARXNG_GID=977
|
|
||||||
|
|
||||||
RUN grep -m1 root /etc/group > /tmp/.searxng.group \
|
|
||||||
&& grep -m1 root /etc/passwd > /tmp/.searxng.passwd \
|
|
||||||
&& echo "searxng:x:$SEARXNG_GID:" >> /tmp/.searxng.group \
|
|
||||||
&& echo "searxng:x:$SEARXNG_UID:$SEARXNG_GID:searxng:/usr/local/searxng:/bin/bash" >> /tmp/.searxng.passwd
|
|
||||||
|
|
||||||
FROM docker.io/library/python:3.13-slim
|
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
# healthcheck
|
|
||||||
wget \
|
|
||||||
# lxml (ARMv7)
|
|
||||||
libxslt1.1 \
|
|
||||||
# uwsgi
|
|
||||||
libpcre3 \
|
|
||||||
libxml2 \
|
|
||||||
mailcap \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
COPY --chown=root:root --from=builder /tmp/.searxng.passwd /etc/passwd
|
|
||||||
COPY --chown=root:root --from=builder /tmp/.searxng.group /etc/group
|
|
||||||
|
|
||||||
ARG LABEL_DATE="0001-01-01T00:00:00Z"
|
|
||||||
ARG GIT_URL="unspecified"
|
|
||||||
ARG SEARXNG_GIT_VERSION="unspecified"
|
|
||||||
ARG LABEL_VCS_REF="unspecified"
|
|
||||||
ARG LABEL_VCS_URL="unspecified"
|
|
||||||
|
|
||||||
WORKDIR /usr/local/searxng/
|
|
||||||
|
|
||||||
COPY --chown=searxng:searxng --from=builder /usr/local/searxng/venv/ ./venv/
|
|
||||||
COPY --chown=searxng:searxng --from=builder /usr/local/searxng/searx/ ./searx/
|
|
||||||
COPY --chown=searxng:searxng ./container/config/ ./.template/
|
|
||||||
COPY --chown=searxng:searxng ./container/entrypoint.sh ./entrypoint.sh
|
|
||||||
|
|
||||||
ARG TIMESTAMP_UWSGI="0"
|
|
||||||
|
|
||||||
RUN touch -c --date=@$TIMESTAMP_UWSGI ./.template/uwsgi.ini
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="searxng <$GIT_URL>" \
|
|
||||||
org.opencontainers.image.created=$LABEL_DATE \
|
|
||||||
org.opencontainers.image.description="A privacy-respecting, hackable metasearch engine" \
|
|
||||||
org.opencontainers.image.documentation="https://github.com/searxng/searxng-docker" \
|
|
||||||
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
|
||||||
org.opencontainers.image.revision=$LABEL_VCS_REF \
|
|
||||||
org.opencontainers.image.source=$LABEL_VCS_URL \
|
|
||||||
org.opencontainers.image.title="searxng" \
|
|
||||||
org.opencontainers.image.url=$LABEL_VCS_URL \
|
|
||||||
org.opencontainers.image.version=$SEARXNG_GIT_VERSION
|
|
||||||
|
|
||||||
ENV CONFIG_PATH=/etc/searxng \
|
|
||||||
DATA_PATH=/var/cache/searxng
|
|
||||||
|
|
||||||
ENV SEARXNG_VERSION=$SEARXNG_GIT_VERSION \
|
|
||||||
INSTANCE_NAME=searxng \
|
|
||||||
AUTOCOMPLETE="" \
|
|
||||||
BASE_URL="" \
|
|
||||||
BIND_ADDRESS=[::]:8080 \
|
|
||||||
SEARXNG_SETTINGS_PATH=$CONFIG_PATH/settings.yml \
|
|
||||||
UWSGI_SETTINGS_PATH=$CONFIG_PATH/uwsgi.ini \
|
|
||||||
UWSGI_WORKERS=%k \
|
|
||||||
UWSGI_THREADS=4
|
|
||||||
|
|
||||||
VOLUME $CONFIG_PATH
|
|
||||||
VOLUME $DATA_PATH
|
|
||||||
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/searxng/entrypoint.sh"]
|
|
151
docs/_themes/searxng/static/searxng.css
vendored
|
@ -1,151 +0,0 @@
|
||||||
@import url("pocoo.css");
|
|
||||||
|
|
||||||
a, a.reference, a.footnote-reference {
|
|
||||||
color: #004b6b;
|
|
||||||
border-color: #004b6b;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
color: #6d4100;
|
|
||||||
border-color: #6d4100;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.version-warning {
|
|
||||||
background-color: #004b6b;
|
|
||||||
}
|
|
||||||
|
|
||||||
aside.sidebar {
|
|
||||||
background-color: whitesmoke;
|
|
||||||
border-color: lightsteelblue;
|
|
||||||
border-radius: 3pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar p.caption {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.sidebar-title, .sidebar p {
|
|
||||||
margin: 6pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar li,
|
|
||||||
.hlist li {
|
|
||||||
list-style-type: disclosure-closed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sphinxsidebar .current > a {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* admonitions
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.admonition, div.topic, nav.contents, div.toctree-wrapper {
|
|
||||||
background-color: #fafafa;
|
|
||||||
margin: 8px 0px;
|
|
||||||
padding: 1em;
|
|
||||||
border-radius: 3pt 0 0 3pt;
|
|
||||||
border-top: none;
|
|
||||||
border-right: none;
|
|
||||||
border-bottom: none;
|
|
||||||
border-left: 5pt solid #ccc;
|
|
||||||
list-style-type: disclosure-closed;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.toctree-wrapper p.caption {
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: 24px;
|
|
||||||
margin: 0 0 10px 0;
|
|
||||||
padding: 0;
|
|
||||||
line-height: 1;
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.admonition-title:after {
|
|
||||||
content: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.hint { border-color: #416dc0b0; }
|
|
||||||
.admonition.note { border-color: #6c856cb0; }
|
|
||||||
.admonition.tip { border-color: #85c5c2b0; }
|
|
||||||
.admonition.attention { border-color: #ecec97b0; }
|
|
||||||
.admonition.caution { border-color: #a6c677b0; }
|
|
||||||
.admonition.danger { border-color: #d46262b0; }
|
|
||||||
.admonition.important { border-color: #dfa3a3b0; }
|
|
||||||
.admonition.error { border-color: red; }
|
|
||||||
.admonition.warning { border-color: darkred; }
|
|
||||||
|
|
||||||
.admonition.admonition-generic-admonition-title {
|
|
||||||
border-color: #416dc0b0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* admonitions with (rendered) reST markup examples (:class: rst-example)
|
|
||||||
*
|
|
||||||
* .. admonition:: title of the example
|
|
||||||
* :class: rst-example
|
|
||||||
* ....
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.rst-example {
|
|
||||||
background-color: inherit;
|
|
||||||
margin: 0;
|
|
||||||
border-top: none;
|
|
||||||
border-right: 1px solid #ccc;
|
|
||||||
border-bottom: none;
|
|
||||||
border-left: none;
|
|
||||||
border-radius: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.rst-example > p.admonition-title {
|
|
||||||
font-family: Sans Serif;
|
|
||||||
font-style: italic;
|
|
||||||
font-size: 0.8em;
|
|
||||||
display: block;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
padding: 0.5em 1em;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* code block in figures
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.highlight pre {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Table theme
|
|
||||||
*/
|
|
||||||
|
|
||||||
thead, tfoot {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
th:hover, td:hover {
|
|
||||||
background-color: #ffc;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead th, tfoot th, tfoot td, tbody th {
|
|
||||||
background-color: #fffaef;
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody tr:nth-child(odd) {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody tr:nth-child(even) {
|
|
||||||
background-color: #fafafa;
|
|
||||||
}
|
|
||||||
|
|
||||||
caption {
|
|
||||||
font-family: Sans Serif;
|
|
||||||
padding: 0.5em;
|
|
||||||
margin: 0.5em 0 0.5em 0;
|
|
||||||
caption-side: top;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinx-tabs {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
7
docs/_themes/searxng/theme.conf
vendored
|
@ -1,7 +0,0 @@
|
||||||
[theme]
|
|
||||||
inherit = pocoo
|
|
||||||
stylesheet = searxng.css
|
|
||||||
|
|
||||||
[options]
|
|
||||||
touch_icon =
|
|
||||||
globaltoc_maxdepth = 5
|
|