update to match upstream
This commit is contained in:
parent
3593168cec
commit
4312299bbe
12 changed files with 368 additions and 225 deletions
|
@ -658,4 +658,4 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||||
-webkit-print-color-adjust: exact;
|
-webkit-print-color-adjust: exact;
|
||||||
print-color-adjust: exact;
|
print-color-adjust: exact;
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 466 KiB After Width: | Height: | Size: 45 KiB |
4
beetroot_static/js/searxng.min.js
vendored
4
beetroot_static/js/searxng.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,99 +1,173 @@
|
||||||
/*
|
/*
|
||||||
this file is generated automatically by searxng_extra/update/update_pygments.py
|
this file is generated automatically by searxng_extra/update/update_pygments.py
|
||||||
using pygments version 2.15.1
|
using pygments version 2.16.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.code-highlight .linenos {
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-khtml-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
cursor: default;
|
|
||||||
|
|
||||||
&::selection {
|
.code-highlight {
|
||||||
background: transparent; /* WebKit/Blink Browsers */
|
|
||||||
}
|
|
||||||
&::-moz-selection {
|
|
||||||
background: transparent; /* Gecko Browsers */
|
|
||||||
}
|
|
||||||
|
|
||||||
margin-right: 8px;
|
pre { line-height: 100%; }
|
||||||
text-align: right;
|
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 #FF0000 } /* Error */
|
||||||
|
.k { color: #008000; font-weight: bold } /* Keyword */
|
||||||
|
.o { color: #666666 } /* 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: #0044DD } /* 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: #666666 } /* Literal.Number */
|
||||||
|
.s { color: #BA2121 } /* Literal.String */
|
||||||
|
.na { color: #687822 } /* Name.Attribute */
|
||||||
|
.nb { color: #008000 } /* Name.Builtin */
|
||||||
|
.nc { color: #0000FF; font-weight: bold } /* Name.Class */
|
||||||
|
.no { color: #880000 } /* Name.Constant */
|
||||||
|
.nd { color: #AA22FF } /* Name.Decorator */
|
||||||
|
.ni { color: #717171; font-weight: bold } /* Name.Entity */
|
||||||
|
.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
|
||||||
|
.nf { color: #0000FF } /* Name.Function */
|
||||||
|
.nl { color: #767600 } /* Name.Label */
|
||||||
|
.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
|
||||||
|
.nt { color: #008000; font-weight: bold } /* Name.Tag */
|
||||||
|
.nv { color: #19177C } /* Name.Variable */
|
||||||
|
.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
|
||||||
|
.w { color: #bbbbbb } /* Text.Whitespace */
|
||||||
|
.mb { color: #666666 } /* Literal.Number.Bin */
|
||||||
|
.mf { color: #666666 } /* Literal.Number.Float */
|
||||||
|
.mh { color: #666666 } /* Literal.Number.Hex */
|
||||||
|
.mi { color: #666666 } /* Literal.Number.Integer */
|
||||||
|
.mo { color: #666666 } /* 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: #0000FF } /* 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: #666666 } /* Literal.Number.Integer.Long */
|
||||||
}
|
}
|
||||||
|
|
||||||
.code-highlight pre { line-height: 125%; }
|
.code-highlight-dark(){
|
||||||
.code-highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
.code-highlight {
|
||||||
.code-highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
||||||
.code-highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
pre { line-height: 100%; }
|
||||||
.code-highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
td.linenos .normal { color: #3c4354; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
.code-highlight .hll { background-color: #ffffcc }
|
span.linenos { color: #3c4354; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
.code-highlight { background: #f8f8f8; }
|
td.linenos .special { color: #3c4354; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
.code-highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
|
span.linenos.special { color: #3c4354; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
.code-highlight .err { border: 1px solid #FF0000 } /* Error */
|
.hll { background-color: #6e7681 }
|
||||||
.code-highlight .k { color: #008000; font-weight: bold } /* Keyword */
|
.c { color: #7e8aa1 } /* Comment */
|
||||||
.code-highlight .o { color: #666666 } /* Operator */
|
.err { color: #f88f7f } /* Error */
|
||||||
.code-highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
|
.esc { color: #d4d2c8 } /* Escape */
|
||||||
.code-highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
|
.g { color: #d4d2c8 } /* Generic */
|
||||||
.code-highlight .cp { color: #9C6500 } /* Comment.Preproc */
|
.k { color: #FFAD66 } /* Keyword */
|
||||||
.code-highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
|
.l { color: #D5FF80 } /* Literal */
|
||||||
.code-highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
|
.n { color: #d4d2c8 } /* Name */
|
||||||
.code-highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
|
.o { color: #FFAD66 } /* Operator */
|
||||||
.code-highlight .gd { color: #A00000 } /* Generic.Deleted */
|
.x { color: #d4d2c8 } /* Other */
|
||||||
.code-highlight .ge { font-style: italic } /* Generic.Emph */
|
.p { color: #d4d2c8 } /* Punctuation */
|
||||||
.code-highlight .gr { color: #E40000 } /* Generic.Error */
|
.ch { color: #f88f7f; font-style: italic } /* Comment.Hashbang */
|
||||||
.code-highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
.cm { color: #7e8aa1 } /* Comment.Multiline */
|
||||||
.code-highlight .gi { color: #008400 } /* Generic.Inserted */
|
.cp { color: #FFAD66; font-weight: bold } /* Comment.Preproc */
|
||||||
.code-highlight .go { color: #717171 } /* Generic.Output */
|
.cpf { color: #7e8aa1 } /* Comment.PreprocFile */
|
||||||
.code-highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
|
.c1 { color: #7e8aa1 } /* Comment.Single */
|
||||||
.code-highlight .gs { font-weight: bold } /* Generic.Strong */
|
.cs { color: #7e8aa1; font-style: italic } /* Comment.Special */
|
||||||
.code-highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
.gd { color: #f88f7f; background-color: #3d1e20 } /* Generic.Deleted */
|
||||||
.code-highlight .gt { color: #0044DD } /* Generic.Traceback */
|
.ge { color: #d4d2c8; font-style: italic } /* Generic.Emph */
|
||||||
.code-highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
|
.ges { color: #d4d2c8 } /* Generic.EmphStrong */
|
||||||
.code-highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
|
.gr { color: #f88f7f } /* Generic.Error */
|
||||||
.code-highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
|
.gh { color: #d4d2c8 } /* Generic.Heading */
|
||||||
.code-highlight .kp { color: #008000 } /* Keyword.Pseudo */
|
.gi { color: #6ad4af; background-color: #19362c } /* Generic.Inserted */
|
||||||
.code-highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
|
.go { color: #7e8aa1 } /* Generic.Output */
|
||||||
.code-highlight .kt { color: #B00040 } /* Keyword.Type */
|
.gp { color: #d4d2c8 } /* Generic.Prompt */
|
||||||
.code-highlight .m { color: #666666 } /* Literal.Number */
|
.gs { color: #d4d2c8; font-weight: bold } /* Generic.Strong */
|
||||||
.code-highlight .s { color: #BA2121 } /* Literal.String */
|
.gu { color: #d4d2c8 } /* Generic.Subheading */
|
||||||
.code-highlight .na { color: #687822 } /* Name.Attribute */
|
.gt { color: #f88f7f } /* Generic.Traceback */
|
||||||
.code-highlight .nb { color: #008000 } /* Name.Builtin */
|
.kc { color: #FFAD66 } /* Keyword.Constant */
|
||||||
.code-highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
|
.kd { color: #FFAD66 } /* Keyword.Declaration */
|
||||||
.code-highlight .no { color: #880000 } /* Name.Constant */
|
.kn { color: #FFAD66 } /* Keyword.Namespace */
|
||||||
.code-highlight .nd { color: #AA22FF } /* Name.Decorator */
|
.kp { color: #FFAD66 } /* Keyword.Pseudo */
|
||||||
.code-highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
|
.kr { color: #FFAD66 } /* Keyword.Reserved */
|
||||||
.code-highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
|
.kt { color: #73D0FF } /* Keyword.Type */
|
||||||
.code-highlight .nf { color: #0000FF } /* Name.Function */
|
.ld { color: #D5FF80 } /* Literal.Date */
|
||||||
.code-highlight .nl { color: #767600 } /* Name.Label */
|
.m { color: #DFBFFF } /* Literal.Number */
|
||||||
.code-highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
|
.s { color: #D5FF80 } /* Literal.String */
|
||||||
.code-highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
|
.na { color: #FFD173 } /* Name.Attribute */
|
||||||
.code-highlight .nv { color: #19177C } /* Name.Variable */
|
.nb { color: #FFD173 } /* Name.Builtin */
|
||||||
.code-highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
|
.nc { color: #73D0FF } /* Name.Class */
|
||||||
.code-highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
.no { color: #FFD173 } /* Name.Constant */
|
||||||
.code-highlight .mb { color: #666666 } /* Literal.Number.Bin */
|
.nd { color: #7e8aa1; font-weight: bold; font-style: italic } /* Name.Decorator */
|
||||||
.code-highlight .mf { color: #666666 } /* Literal.Number.Float */
|
.ni { color: #95E6CB } /* Name.Entity */
|
||||||
.code-highlight .mh { color: #666666 } /* Literal.Number.Hex */
|
.ne { color: #73D0FF } /* Name.Exception */
|
||||||
.code-highlight .mi { color: #666666 } /* Literal.Number.Integer */
|
.nf { color: #FFD173 } /* Name.Function */
|
||||||
.code-highlight .mo { color: #666666 } /* Literal.Number.Oct */
|
.nl { color: #d4d2c8 } /* Name.Label */
|
||||||
.code-highlight .sa { color: #BA2121 } /* Literal.String.Affix */
|
.nn { color: #d4d2c8 } /* Name.Namespace */
|
||||||
.code-highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
|
.nx { color: #d4d2c8 } /* Name.Other */
|
||||||
.code-highlight .sc { color: #BA2121 } /* Literal.String.Char */
|
.py { color: #FFD173 } /* Name.Property */
|
||||||
.code-highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
|
.nt { color: #5CCFE6 } /* Name.Tag */
|
||||||
.code-highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
.nv { color: #d4d2c8 } /* Name.Variable */
|
||||||
.code-highlight .s2 { color: #BA2121 } /* Literal.String.Double */
|
.ow { color: #FFAD66 } /* Operator.Word */
|
||||||
.code-highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
|
.pm { color: #d4d2c8 } /* Punctuation.Marker */
|
||||||
.code-highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
|
.w { color: #d4d2c8 } /* Text.Whitespace */
|
||||||
.code-highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
|
.mb { color: #DFBFFF } /* Literal.Number.Bin */
|
||||||
.code-highlight .sx { color: #008000 } /* Literal.String.Other */
|
.mf { color: #DFBFFF } /* Literal.Number.Float */
|
||||||
.code-highlight .sr { color: #A45A77 } /* Literal.String.Regex */
|
.mh { color: #DFBFFF } /* Literal.Number.Hex */
|
||||||
.code-highlight .s1 { color: #BA2121 } /* Literal.String.Single */
|
.mi { color: #DFBFFF } /* Literal.Number.Integer */
|
||||||
.code-highlight .ss { color: #19177C } /* Literal.String.Symbol */
|
.mo { color: #DFBFFF } /* Literal.Number.Oct */
|
||||||
.code-highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
|
.sa { color: #F29E74 } /* Literal.String.Affix */
|
||||||
.code-highlight .fm { color: #0000FF } /* Name.Function.Magic */
|
.sb { color: #D5FF80 } /* Literal.String.Backtick */
|
||||||
.code-highlight .vc { color: #19177C } /* Name.Variable.Class */
|
.sc { color: #D5FF80 } /* Literal.String.Char */
|
||||||
.code-highlight .vg { color: #19177C } /* Name.Variable.Global */
|
.dl { color: #D5FF80 } /* Literal.String.Delimiter */
|
||||||
.code-highlight .vi { color: #19177C } /* Name.Variable.Instance */
|
.sd { color: #7e8aa1 } /* Literal.String.Doc */
|
||||||
.code-highlight .vm { color: #19177C } /* Name.Variable.Magic */
|
.s2 { color: #D5FF80 } /* Literal.String.Double */
|
||||||
.code-highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
|
.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 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -55,121 +55,145 @@ searxng.ready(function () {
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
var vimKeys = {
|
// these bindings are always on
|
||||||
27: {
|
var keyBindings = {
|
||||||
key: 'Escape',
|
'Escape': {
|
||||||
|
key: 'ESC',
|
||||||
fun: removeFocus,
|
fun: removeFocus,
|
||||||
des: 'remove focus from the focused input',
|
des: 'remove focus from the focused input',
|
||||||
cat: 'Control'
|
cat: 'Control'
|
||||||
},
|
},
|
||||||
73: {
|
'ArrowLeft': {
|
||||||
|
key: '⬅',
|
||||||
|
fun: highlightResult('up'),
|
||||||
|
des: 'Use left arrow to select previous search result',
|
||||||
|
cat: 'Results'
|
||||||
|
},
|
||||||
|
'ArrowRight': {
|
||||||
|
key: '➡',
|
||||||
|
fun: highlightResult('down'),
|
||||||
|
des: 'Use right arrow to select next search result',
|
||||||
|
cat: 'Results'
|
||||||
|
},
|
||||||
|
'h': {
|
||||||
|
key: 'h',
|
||||||
|
fun: toggleHelp,
|
||||||
|
des: 'toggle help window',
|
||||||
|
cat: 'Other'
|
||||||
|
},
|
||||||
|
'i': {
|
||||||
key: 'i',
|
key: 'i',
|
||||||
fun: searchInputFocus,
|
fun: searchInputFocus,
|
||||||
des: 'focus on the search input',
|
des: 'focus on the search input',
|
||||||
cat: 'Control'
|
cat: 'Control'
|
||||||
},
|
},
|
||||||
66: {
|
'n': {
|
||||||
key: 'b',
|
|
||||||
fun: scrollPage(-window.innerHeight),
|
|
||||||
des: 'scroll one page up',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
70: {
|
|
||||||
key: 'f',
|
|
||||||
fun: scrollPage(window.innerHeight),
|
|
||||||
des: 'scroll one page down',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
85: {
|
|
||||||
key: 'u',
|
|
||||||
fun: scrollPage(-window.innerHeight / 2),
|
|
||||||
des: 'scroll half a page up',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
68: {
|
|
||||||
key: 'd',
|
|
||||||
fun: scrollPage(window.innerHeight / 2),
|
|
||||||
des: 'scroll half a page down',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
71: {
|
|
||||||
key: 'g',
|
|
||||||
fun: scrollPageTo(-document.body.scrollHeight, 'top'),
|
|
||||||
des: 'scroll to the top of the page',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
86: {
|
|
||||||
key: 'v',
|
|
||||||
fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
|
|
||||||
des: 'scroll to the bottom of the page',
|
|
||||||
cat: 'Navigation'
|
|
||||||
},
|
|
||||||
75: {
|
|
||||||
key: 'k',
|
|
||||||
fun: highlightResult('up'),
|
|
||||||
des: 'select previous search result',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
74: {
|
|
||||||
key: 'j',
|
|
||||||
fun: highlightResult('down'),
|
|
||||||
des: 'select next search result',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
80: {
|
|
||||||
key: 'p',
|
|
||||||
fun: GoToPreviousPage(),
|
|
||||||
des: 'go to previous page',
|
|
||||||
cat: 'Results'
|
|
||||||
},
|
|
||||||
78: {
|
|
||||||
key: 'n',
|
key: 'n',
|
||||||
fun: GoToNextPage(),
|
fun: GoToNextPage(),
|
||||||
des: 'go to next page',
|
des: 'go to next page',
|
||||||
cat: 'Results'
|
cat: 'Results'
|
||||||
},
|
},
|
||||||
79: {
|
'o': {
|
||||||
key: 'o',
|
key: 'o',
|
||||||
fun: openResult(false),
|
fun: openResult(false),
|
||||||
des: 'open search result',
|
des: 'open search result',
|
||||||
cat: 'Results'
|
cat: 'Results'
|
||||||
},
|
},
|
||||||
84: {
|
'p': {
|
||||||
key: 't',
|
key: 'p',
|
||||||
fun: openResult(true),
|
fun: GoToPreviousPage(),
|
||||||
des: 'open the result in a new tab',
|
des: 'go to previous page',
|
||||||
cat: 'Results'
|
cat: 'Results'
|
||||||
},
|
},
|
||||||
82: {
|
'r': {
|
||||||
key: 'r',
|
key: 'r',
|
||||||
fun: reloadPage,
|
fun: reloadPage,
|
||||||
des: 'reload page from the server',
|
des: 'reload page from the server',
|
||||||
cat: 'Control'
|
cat: 'Control'
|
||||||
},
|
},
|
||||||
72: {
|
't': {
|
||||||
key: 'h',
|
key: 't',
|
||||||
fun: toggleHelp,
|
fun: openResult(true),
|
||||||
des: 'toggle help window',
|
des: 'open the result in a new tab',
|
||||||
cat: 'Other'
|
cat: 'Results'
|
||||||
}
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// these bindings are enabled by user preferences
|
||||||
|
var vimKeys = {
|
||||||
|
'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'
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (searxng.settings.hotkeys) {
|
if (searxng.settings.hotkeys) {
|
||||||
searxng.on(document, "keydown", function (e) {
|
// To add Vim-like key bindings, merge the 'vimKeys' into 'keyBindings'.
|
||||||
// check for modifiers so we don't break browser's hotkeys
|
Object.assign(keyBindings, vimKeys);
|
||||||
if (Object.prototype.hasOwnProperty.call(vimKeys, e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
|
}
|
||||||
var tagName = e.target.tagName.toLowerCase();
|
|
||||||
if (e.keyCode === 27) {
|
searxng.on(document, "keydown", function (e) {
|
||||||
vimKeys[e.keyCode].fun(e);
|
// check for modifiers so we don't break browser's hotkeys
|
||||||
} else {
|
if (
|
||||||
if (e.target === document.body || tagName === 'a' || tagName === 'button') {
|
Object.prototype.hasOwnProperty.call(keyBindings, e.key)
|
||||||
e.preventDefault();
|
&& !e.ctrlKey && !e.altKey
|
||||||
vimKeys[e.keyCode].fun();
|
&& !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) {
|
function highlightResult (which) {
|
||||||
return function (noScroll, keepFocus) {
|
return function (noScroll, keepFocus) {
|
||||||
|
@ -189,6 +213,7 @@ searxng.ready(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
var next, results = document.querySelectorAll('.result');
|
var next, results = document.querySelectorAll('.result');
|
||||||
|
results = Array.from(results); // convert NodeList to Array for further use
|
||||||
|
|
||||||
if (typeof effectiveWhich !== 'string') {
|
if (typeof effectiveWhich !== 'string') {
|
||||||
next = effectiveWhich;
|
next = effectiveWhich;
|
||||||
|
@ -209,16 +234,10 @@ searxng.ready(function () {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'down':
|
case 'down':
|
||||||
next = current.nextElementSibling;
|
next = results[results.indexOf(current) + 1] || current;
|
||||||
if (next === null) {
|
|
||||||
next = results[0];
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'up':
|
case 'up':
|
||||||
next = current.previousElementSibling;
|
next = results[results.indexOf(current) - 1] || current;
|
||||||
if (next === null) {
|
|
||||||
next = results[results.length - 1];
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'bottom':
|
case 'bottom':
|
||||||
next = results[results.length - 1];
|
next = results[results.length - 1];
|
||||||
|
@ -347,8 +366,8 @@ searxng.ready(function () {
|
||||||
function initHelpContent (divElement) {
|
function initHelpContent (divElement) {
|
||||||
var categories = {};
|
var categories = {};
|
||||||
|
|
||||||
for (var k in vimKeys) {
|
for (var k in keyBindings) {
|
||||||
var key = vimKeys[k];
|
var key = keyBindings[k];
|
||||||
categories[key.cat] = categories[key.cat] || [];
|
categories[key.cat] = categories[key.cat] || [];
|
||||||
categories[key.cat].push(key);
|
categories[key.cat].push(key);
|
||||||
}
|
}
|
||||||
|
@ -362,7 +381,7 @@ searxng.ready(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
|
var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
|
||||||
html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
|
html += '<h3>How to navigate SearXNG with hotkeys</h3>';
|
||||||
html += '<table>';
|
html += '<table>';
|
||||||
|
|
||||||
for (var i = 0; i < sorted.length; i++) {
|
for (var i = 0; i < sorted.length; i++) {
|
||||||
|
@ -404,8 +423,6 @@ searxng.ready(function () {
|
||||||
helpPanel.id = 'vim-hotkeys-help';
|
helpPanel.id = 'vim-hotkeys-help';
|
||||||
helpPanel.className = 'dialog-modal';
|
helpPanel.className = 'dialog-modal';
|
||||||
initHelpContent(helpPanel);
|
initHelpContent(helpPanel);
|
||||||
initHelpContent(helpPanel);
|
|
||||||
initHelpContent(helpPanel);
|
|
||||||
var body = document.getElementsByTagName('body')[0];
|
var body = document.getElementsByTagName('body')[0];
|
||||||
body.appendChild(helpPanel);
|
body.appendChild(helpPanel);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,9 +1,51 @@
|
||||||
.code-highlight pre {
|
@import "../generated/pygments.less";
|
||||||
overflow: auto;
|
|
||||||
background-color: inherit;
|
.codelines {
|
||||||
color: inherit;
|
margin: @results-margin 0 0 0;
|
||||||
border: inherit;
|
padding: @result-padding 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// stylelint-disable no-invalid-position-at-import-rule
|
.code-highlight-sxng() {
|
||||||
@import "../generated/pygments.less";
|
.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: #64708d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.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();
|
||||||
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
/// Settings Colors
|
/// Settings Colors
|
||||||
--color-settings-tr-hover: #ebebeb;
|
--color-settings-tr-hover: #ebebeb;
|
||||||
--color-settings-engine-description-font: #545454;
|
--color-settings-engine-description-font: #545454;
|
||||||
--color-settings-engine-group-background: #0001;
|
--color-settings-table-group-background: #0001;
|
||||||
/// Detail modal
|
/// Detail modal
|
||||||
--color-result-detail-font: #fff;
|
--color-result-detail-font: #fff;
|
||||||
--color-result-detail-label-font: lightgray;
|
--color-result-detail-label-font: lightgray;
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
/// Settings Colors
|
/// Settings Colors
|
||||||
--color-settings-tr-hover: #2c2c32;
|
--color-settings-tr-hover: #2c2c32;
|
||||||
--color-settings-engine-description-font: darken(#dcdcdc, 30%);
|
--color-settings-engine-description-font: darken(#dcdcdc, 30%);
|
||||||
--color-settings-engine-group-background: #1b1b21;
|
--color-settings-table-group-background: #1b1b21;
|
||||||
/// Toolkit Colors
|
/// Toolkit Colors
|
||||||
--color-toolkit-badge-font: #fff;
|
--color-toolkit-badge-font: #fff;
|
||||||
--color-toolkit-badge-background: #555;
|
--color-toolkit-badge-background: #555;
|
||||||
|
|
|
@ -1,7 +1,18 @@
|
||||||
#tab-content-query table td,
|
table {
|
||||||
#tab-content-query table th {
|
border-collapse: collapse;
|
||||||
.ltr-text-align-right() !important;
|
|
||||||
height: 3rem;
|
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 {
|
#main_preferences {
|
||||||
|
@ -81,14 +92,6 @@
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
table td {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category {
|
.category {
|
||||||
.ltr-margin-right(0.5rem);
|
.ltr-margin-right(0.5rem);
|
||||||
|
|
||||||
|
@ -104,10 +107,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
table.table_engines {
|
table.table_engines {
|
||||||
td {
|
|
||||||
height: 3.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
th.name {
|
th.name {
|
||||||
/* stylelint-disable */
|
/* stylelint-disable */
|
||||||
label {
|
label {
|
||||||
|
@ -130,12 +129,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.engine-group {
|
.checkbox-col,
|
||||||
.ltr-text-align-left();
|
|
||||||
font-weight: normal;
|
|
||||||
background: var(--color-settings-engine-group-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
.name,
|
.name,
|
||||||
.shortcut {
|
.shortcut {
|
||||||
.ltr-text-align-left();
|
.ltr-text-align-left();
|
||||||
|
|
|
@ -64,6 +64,8 @@ html {
|
||||||
background-color: var(--color-base-background);
|
background-color: var(--color-base-background);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
|
|
||||||
body,
|
body,
|
||||||
|
@ -634,6 +636,18 @@ summary.title {
|
||||||
span {
|
span {
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.answer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.answer-url {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#infoboxes {
|
#infoboxes {
|
||||||
|
@ -793,6 +807,7 @@ summary.title {
|
||||||
.ltr-left(@results-width + @results-offset + (0.5 * @results-gap - 1.2em));
|
.ltr-left(@results-width + @results-offset + (0.5 * @results-gap - 1.2em));
|
||||||
transition: opacity 0.5s;
|
transition: opacity 0.5s;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
.rounded-corners;
|
.rounded-corners;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
@ -811,6 +826,7 @@ summary.title {
|
||||||
|
|
||||||
#results.scrolling #backToTop {
|
#results.scrolling #backToTop {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue