forked from zaclys/searxng
rebrand
add zaclys menu adjust style
This commit is contained in:
parent
905ce2a6f6
commit
7c4e5b3860
37 changed files with 1347 additions and 109 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"searxng.head.min.js","sources":["../src/js/head/00_init.js"],"sourcesContent":["/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d) {\n 'use strict';\n\n // add data- properties\n var script = d.currentScript || (function () {\n var scripts = d.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n w.searxng = {\n settings: JSON.parse(atob(script.getAttribute('client_settings')))\n };\n\n // update the css\n var hmtlElement = d.getElementsByTagName(\"html\")[0];\n hmtlElement.classList.remove('no-js');\n hmtlElement.classList.add('js');\n\n})(window, document);\n"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searxng","settings","JSON","parse","atob","getAttribute","hmtlElement","classList","remove","add","window","document"],"mappings":"CACA,SAAWA,EAAGC,gBAIZ,IAAIC,EAASD,EAAEE,eAAkB,WAC/B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFD,GAKjCN,EAAEO,QAAU,CACVC,SAAUC,KAAKC,MAAMC,KAAKT,EAAOU,aAAa,sBAIhD,IAAIC,EAAcZ,EAAEI,qBAAqB,QAAQ,GACjDQ,EAAYC,UAAUC,OAAO,SAC7BF,EAAYC,UAAUE,IAAI,OAhB5B,CAkBGC,OAAQC"}
|
||||
{"version":3,"file":"searxng.head.min.js","sources":["../src/js/head/00_init.js"],"sourcesContent":["/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d) {\n 'use strict';\n\n // add data- properties\n var script = d.currentScript || (function () {\n var scripts = d.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n w.searxng = {\n settings: JSON.parse(atob(script.getAttribute('client_settings')))\n };\n\n // update the css\n var hmtlElement = d.getElementsByTagName(\"html\")[0];\n hmtlElement.classList.remove('no-js');\n hmtlElement.classList.add('js');\n\n})(window, document);\n"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searxng","settings","JSON","parse","atob","getAttribute","hmtlElement","classList","remove","add","window","document"],"mappings":"CACA,SAAWA,EAAGC,GACZ,aAGA,IAAIC,EAASD,EAAEE,eAAkB,WAC/B,IAAIC,EAAUH,EAAEI,qBAAqB,QAAQ,EAC7C,OAAOD,EAAQA,EAAQE,OAAS,EACjC,EAAE,EAEHN,EAAEO,QAAU,CACVC,SAAUC,KAAKC,MAAMC,KAAKT,EAAOU,aAAa,iBAAiB,CAAC,CAAC,CACnE,EAGA,IAAIC,EAAcZ,EAAEI,qBAAqB,MAAM,EAAE,GACjDQ,EAAYC,UAAUC,OAAO,OAAO,EACpCF,EAAYC,UAAUE,IAAI,IAAI,CAE/B,GAAEC,OAAQC,QAAQ"}
|
||||
File diff suppressed because one or more lines are too long
29
searx/static/themes/simple/js/zaclys_searx.js
Normal file
29
searx/static/themes/simple/js/zaclys_searx.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
var isHidenUL = true;
|
||||
|
||||
function toggleMobileMenu(event) {
|
||||
event.stopPropagation();
|
||||
|
||||
let hidenUL = document.querySelector('#mobile_menu');
|
||||
|
||||
console.log('click event => toggleMobileMenu called')
|
||||
|
||||
if (hidenUL && isHidenUL) {
|
||||
hidenUL.style.display = 'block';
|
||||
isHidenUL = false;
|
||||
} else if (hidenUL && !isHidenUL) {
|
||||
hidenUL.style.display = 'none';
|
||||
isHidenUL = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
let elEvent = document.querySelector('#et_mobile_nav_menu');
|
||||
|
||||
console.log(elEvent)
|
||||
|
||||
if (elEvent) {
|
||||
document.querySelector('#mobile_menu').style.display = 'none';
|
||||
elEvent.addEventListener("click", toggleMobileMenu);
|
||||
document.querySelector("body").addEventListener("click", toggleMobileMenu);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue