mirror of https://github.com/searx/searx
Deploying to gh-pages from @ 75e85f2a38
🚀
This commit is contained in:
parent
9056dafe53
commit
06136ce7a6
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 136e2f2a5b4be30afcaa05306b334941
|
||||
config: 06f69cdd2f33d665ceedcfdda7353eb1
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
@ -18,7 +18,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
|
||||
// Restore group tab selection from session
|
||||
const lastSelected = session.getItem('sphinx-tabs-last-selected');
|
||||
if (lastSelected != null) selectGroupedTabs(lastSelected);
|
||||
if (lastSelected != null) selectNamedTabs(lastSelected);
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -58,16 +58,16 @@ function keyTabs(e) {
|
|||
*/
|
||||
function changeTabs(e) {
|
||||
// Use this instead of the element that was clicked, in case it's a child
|
||||
const selected = this.getAttribute("aria-selected") === "true";
|
||||
const notSelected = this.getAttribute("aria-selected") === "false";
|
||||
const positionBefore = this.parentNode.getBoundingClientRect().top;
|
||||
const closable = this.parentNode.classList.contains("closeable");
|
||||
const notClosable = !this.parentNode.classList.contains("closeable");
|
||||
|
||||
deselectTabList(this);
|
||||
|
||||
if (!selected || !closable) {
|
||||
if (notSelected || notClosable) {
|
||||
selectTab(this);
|
||||
const name = this.getAttribute("name");
|
||||
selectGroupedTabs(name, this.id);
|
||||
selectNamedTabs(name, this.id);
|
||||
|
||||
if (this.classList.contains("group-tab")) {
|
||||
// Persist during session
|
||||
|
@ -81,37 +81,19 @@ function changeTabs(e) {
|
|||
window.scrollTo(0, window.scrollY + positionDelta);
|
||||
}
|
||||
|
||||
function selectTab(target) {
|
||||
target.setAttribute("aria-selected", true);
|
||||
/**
|
||||
* Select tab and show associated panel.
|
||||
* @param {Node} tab tab to select
|
||||
*/
|
||||
function selectTab(tab) {
|
||||
tab.setAttribute("aria-selected", true);
|
||||
|
||||
// Show the associated panel
|
||||
document
|
||||
.getElementById(target.getAttribute("aria-controls"))
|
||||
.getElementById(tab.getAttribute("aria-controls"))
|
||||
.removeAttribute("hidden");
|
||||
}
|
||||
|
||||
/**
|
||||
* Select all other grouped tabs via tab name.
|
||||
* @param {Node} name name of grouped tab to be selected
|
||||
* @param {Node} clickedId id of clicked tab
|
||||
*/
|
||||
function selectGroupedTabs(name, clickedId=null) {
|
||||
const groupedTabs = document.querySelectorAll(`.sphinx-tabs-tab[name="${name}"]`);
|
||||
const tabLists = Array.from(groupedTabs).map(tab => tab.parentNode);
|
||||
|
||||
tabLists
|
||||
.forEach(tabList => {
|
||||
// Don't want to change the tabList containing the clicked tab
|
||||
const clickedTab = tabList.querySelector(`[id="${clickedId}"]`);
|
||||
if (clickedTab === null ) {
|
||||
// Select first tab with matching name
|
||||
const tab = tabList.querySelector(`.sphinx-tabs-tab[name="${name}"]`);
|
||||
deselectTabList(tab);
|
||||
selectTab(tab);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the panels associated with all tabs within the
|
||||
* tablist containing this tab.
|
||||
|
@ -126,5 +108,34 @@ function deselectTabList(tab) {
|
|||
|
||||
Array.from(grandparent.children)
|
||||
.slice(1) // Skip tablist
|
||||
.forEach(p => p.setAttribute("hidden", true));
|
||||
.forEach(panel => panel.setAttribute("hidden", true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Select grouped tabs with the same name, but no the tab
|
||||
* with the given id.
|
||||
* @param {Node} name name of grouped tab to be selected
|
||||
* @param {Node} clickedId id of clicked tab
|
||||
*/
|
||||
function selectNamedTabs(name, clickedId=null) {
|
||||
const groupedTabs = document.querySelectorAll(`.sphinx-tabs-tab[name="${name}"]`);
|
||||
const tabLists = Array.from(groupedTabs).map(tab => tab.parentNode);
|
||||
|
||||
tabLists
|
||||
.forEach(tabList => {
|
||||
// Don't want to change the tabList containing the clicked tab
|
||||
const clickedTab = tabList.querySelector(`[id="${clickedId}"]`);
|
||||
if (clickedTab === null ) {
|
||||
// Select first tab with matching name
|
||||
const tab = tabList.querySelector(`.sphinx-tabs-tab[name="${name}"]`);
|
||||
deselectTabList(tab);
|
||||
selectTab(tab);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
exports.keyTabs = keyTabs;
|
||||
exports.changeTabs = changeTabs;
|
||||
exports.selectTab = selectTab;
|
||||
exports.deselectTabList = deselectTabList;
|
||||
exports.selectNamedTabs = selectNamedTabs;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -184,18 +184,18 @@ inspect service
|
|||
show service status and log
|
||||
option
|
||||
set one of the available options
|
||||
apache (http://fv-az118-826/searx)
|
||||
apache (http://fv-az180-979/searx)
|
||||
:install: apache site with a reverse proxy (ProxyPass)
|
||||
:remove: apache site searx.conf
|
||||
nginx (http://fv-az118-826/searx)
|
||||
nginx (http://fv-az180-979/searx)
|
||||
:install: nginx site with a reverse proxy (ProxyPass)
|
||||
:remove: nginx site searx.conf
|
||||
|
||||
filtron rules: /etc/filtron/rules.json
|
||||
|
||||
If needed, set PUBLIC_URL of your WEB service in the '.config.sh' file::
|
||||
PUBLIC_URL : http://fv-az118-826/searx
|
||||
PUBLIC_HOST : fv-az118-826
|
||||
PUBLIC_URL : http://fv-az180-979/searx
|
||||
PUBLIC_HOST : fv-az180-979
|
||||
SERVICE_USER : filtron
|
||||
FILTRON_TARGET : 127.0.0.1:8888
|
||||
FILTRON_API : 127.0.0.1:4005
|
||||
|
|
|
@ -194,7 +194,7 @@ install
|
|||
:base: prepare LXC; install basic packages
|
||||
:suite: install LXC searx suite into all (or <name>) containers
|
||||
|
||||
LXC suite: searx --> http://fv-az118-826/searx
|
||||
LXC suite: searx --> http://fv-az180-979/searx
|
||||
suite includes searx, morty & filtron
|
||||
suite images:
|
||||
ubu1804 ubu2004 ubu2010 fedora33 archlinux centos7
|
||||
|
|
|
@ -186,22 +186,22 @@ inspect service
|
|||
option
|
||||
set one of the available options
|
||||
:new-key: set new morty key
|
||||
apache : http://fv-az118-826/morty/
|
||||
apache : http://fv-az180-979/morty/
|
||||
:install: apache site with a reverse proxy (ProxyPass)
|
||||
:remove: apache site morty.conf
|
||||
nginx (http://fv-az118-826/morty/)
|
||||
nginx (http://fv-az180-979/morty/)
|
||||
:install: nginx site with a reverse proxy (ProxyPass)
|
||||
:remove: nginx site morty.conf
|
||||
|
||||
If needed, set the environment variables in the '.config.sh' file::
|
||||
PUBLIC_URL_MORTY: http://fv-az118-826/morty/
|
||||
PUBLIC_URL_MORTY: http://fv-az180-979/morty/
|
||||
MORTY_LISTEN: 127.0.0.1:3000
|
||||
SERVICE_USER: morty
|
||||
|
||||
To activate result and image proxy in searx, edit settings.yml (read:
|
||||
https://searx.github.io/searx/admin/morty.html)::
|
||||
result_proxy:
|
||||
url : http://fv-az118-826/morty/
|
||||
url : http://fv-az180-979/morty/
|
||||
server:
|
||||
image_proxy : True
|
||||
</pre></div>
|
||||
|
|
|
@ -113,8 +113,8 @@ apache
|
|||
searx settings: /etc/searx/settings.yml
|
||||
|
||||
If needed, set PUBLIC_URL of your WEB service in the '.config.sh' file::
|
||||
PUBLIC_URL : http://fv-az118-826/searx
|
||||
SEARX_INSTANCE_NAME : searx@fv-az118-826
|
||||
PUBLIC_URL : http://fv-az180-979/searx
|
||||
SEARX_INSTANCE_NAME : searx@fv-az180-979
|
||||
SERVICE_USER : searx
|
||||
SEARX_INTERNAL_HTTP : http://127.0.0.1:8888
|
||||
</pre></div>
|
||||
|
|
Loading…
Reference in New Issue