simple theme update

- npm package update
- apply #1226
- implement vim help dialog
- display cookies and search URL with preferences
- allow to enable / disable Open Access DOI rewrite
- add a clear text button on the left of the search button
- implement #1011 : the HTML title page is not set when using POST
- remove searx/static/themes/simple/img/loader.gif
- use full width when only there are only images as result
This commit is contained in:
Alex 2018-08-09 16:13:50 +02:00 committed by Alexandre Flament
parent 845ba79e75
commit 3ba0d0516e
39 changed files with 1071 additions and 537 deletions

View File

@ -9,7 +9,7 @@ regex = re.compile(r'10\.\d{4,9}/[^\s]+')
name = gettext('Open Access DOI rewrite') name = gettext('Open Access DOI rewrite')
description = gettext('Avoid paywalls by redirecting to open-access versions of publications when available') description = gettext('Avoid paywalls by redirecting to open-access versions of publications when available')
default_on = False default_on = False
preference_section = 'privacy' preference_section = 'general'
doi_resolvers = settings['doi_resolvers'] doi_resolvers = settings['doi_resolvers']

View File

@ -1,44 +1,30 @@
/*! searx | 03-12-2017 | https://github.com/asciimoo/searx */ /*! searx | 14-08-2018 | https://github.com/asciimoo/searx */
/* /*
* searx, A privacy-respecting, hackable metasearch engine * searx, A privacy-respecting, hackable metasearch engine
* *
* To convert "style.less" to "style.css" run: $make styles * To convert "style.less" to "style.css" run: $make styles
*/ */
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document /* Document
========================================================================== */ ========================================================================== */
/** /**
* 1. Correct the line height in all browsers. * 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in * 2. Prevent adjustments of font size after orientation changes in iOS.
* IE on Windows Phone and in iOS.
*/ */
html { html {
line-height: 1.15; line-height: 1.15;
/* 1 */ /* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
/* 2 */ /* 2 */
} }
/* Sections /* Sections
========================================================================== */ ========================================================================== */
/** /**
* Remove the margin in all browsers (opinionated). * Remove the margin in all browsers.
*/ */
body { body {
margin: 0; margin: 0;
} }
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/** /**
* Correct the font size and margin on `h1` elements within `section` and * Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari. * `article` contexts in Chrome, Firefox, and Safari.
@ -49,22 +35,6 @@ h1 {
} }
/* Grouping content /* Grouping content
========================================================================== */ ========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main {
/* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/** /**
* 1. Add the correct box sizing in Firefox. * 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE. * 2. Show the overflow in Edge and IE.
@ -90,17 +60,13 @@ pre {
/* Text-level semantics /* Text-level semantics
========================================================================== */ ========================================================================== */
/** /**
* 1. Remove the gray background on active links in IE 10. * Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/ */
a { a {
background-color: transparent; background-color: transparent;
/* 1 */
-webkit-text-decoration-skip: objects;
/* 2 */
} }
/** /**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-. * 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/ */
abbr[title] { abbr[title] {
@ -111,13 +77,6 @@ abbr[title] {
text-decoration: underline dotted; text-decoration: underline dotted;
/* 2 */ /* 2 */
} }
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/** /**
* Add the correct font weight in Chrome, Edge, and Safari. * Add the correct font weight in Chrome, Edge, and Safari.
*/ */
@ -137,19 +96,6 @@ samp {
font-size: 1em; font-size: 1em;
/* 2 */ /* 2 */
} }
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/** /**
* Add the correct font size in all browsers. * Add the correct font size in all browsers.
*/ */
@ -176,35 +122,15 @@ sup {
/* Embedded content /* Embedded content
========================================================================== */ ========================================================================== */
/** /**
* Add the correct display in IE 9-. * Remove the border on images inside links in IE 10.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/ */
img { img {
border-style: none; border-style: none;
} }
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms /* Forms
========================================================================== */ ========================================================================== */
/** /**
* 1. Change the font styles in all browsers (opinionated). * 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari. * 2. Remove the margin in Firefox and Safari.
*/ */
button, button,
@ -212,7 +138,7 @@ input,
optgroup, optgroup,
select, select,
textarea { textarea {
font-family: sans-serif; font-family: inherit;
/* 1 */ /* 1 */
font-size: 100%; font-size: 100%;
/* 1 */ /* 1 */
@ -240,16 +166,13 @@ select {
text-transform: none; text-transform: none;
} }
/** /**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` * Correct the inability to style clickable types in iOS and Safari.
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/ */
button, button,
html [type="button"], [type="button"],
[type="reset"], [type="reset"],
[type="submit"] { [type="submit"] {
-webkit-appearance: button; -webkit-appearance: button;
/* 2 */
} }
/** /**
* Remove the inner border and padding in Firefox. * Remove the inner border and padding in Firefox.
@ -297,24 +220,20 @@ legend {
/* 1 */ /* 1 */
} }
/** /**
* 1. Add the correct display in IE 9-. * Add the correct vertical alignment in Chrome, Firefox, and Opera.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/ */
progress { progress {
display: inline-block;
/* 1 */
vertical-align: baseline; vertical-align: baseline;
/* 2 */
} }
/** /**
* Remove the default vertical scrollbar in IE. * Remove the default vertical scrollbar in IE 10+.
*/ */
textarea { textarea {
overflow: auto; overflow: auto;
} }
/** /**
* 1. Add the correct box sizing in IE 10-. * 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10-. * 2. Remove the padding in IE 10.
*/ */
[type="checkbox"], [type="checkbox"],
[type="radio"] { [type="radio"] {
@ -341,9 +260,8 @@ textarea {
/* 2 */ /* 2 */
} }
/** /**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS. * Remove the inner padding in Chrome and Safari on macOS.
*/ */
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration { [type="search"]::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none;
} }
@ -360,11 +278,9 @@ textarea {
/* Interactive /* Interactive
========================================================================== */ ========================================================================== */
/* /*
* Add the correct display in IE 9-. * Add the correct display in Edge, IE 10+, and Firefox.
* 1. Add the correct display in Edge, IE, and Firefox.
*/ */
details, details {
menu {
display: block; display: block;
} }
/* /*
@ -373,24 +289,16 @@ menu {
summary { summary {
display: list-item; display: list-item;
} }
/* Scripting /* Misc
========================================================================== */ ========================================================================== */
/** /**
* Add the correct display in IE 9-. * Add the correct display in IE 10+.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/ */
template { template {
display: none; display: none;
} }
/* Hidden
========================================================================== */
/** /**
* Add the correct display in IE 10-. * Add the correct display in IE 10.
*/ */
[hidden] { [hidden] {
display: none; display: none;
@ -706,7 +614,14 @@ html.js .show_if_nojs {
float: left; float: left;
} }
.invisible { .invisible {
display: none; display: none !important;
}
.list-unstyled {
list-style-type: none;
}
.list-unstyled li {
margin-top: 4px;
margin-bottom: 4px;
} }
.danger { .danger {
background-color: #fae1e1; background-color: #fae1e1;
@ -722,6 +637,13 @@ html.js .show_if_nojs {
padding: 1px 5px; padding: 1px 5px;
border-radius: 5px; border-radius: 5px;
} }
kbd {
padding: 2px 4px;
margin: 1px;
font-size: 90%;
color: white;
background: black;
}
table { table {
width: 100%; width: 100%;
} }
@ -737,6 +659,27 @@ td {
tr:hover { tr:hover {
background: #ececec; background: #ececec;
} }
div.selectable_url {
border: 1px solid #888;
padding: 4px;
color: #444;
width: 100%;
display: block;
margin: 0.1em;
overflow: hidden;
height: 1.2em;
line-height: 1.2em;
}
div.selectable_url pre {
display: block;
font-size: 0.8em;
word-break: break-all;
margin: 0.1em;
-webkit-user-select: all;
-moz-user-select: all;
-ms-user-select: element;
user-select: all;
}
.dialog-error { .dialog-error {
position: relative; position: relative;
width: 70%; width: 70%;
@ -768,6 +711,22 @@ tr:hover {
.dialog-error p { .dialog-error p {
margin: 1px 0 0 0; margin: 1px 0 0 0;
} }
.dialog-error table {
width: auto;
}
.dialog-error tr {
vertical-align: text-top;
}
.dialog-error tr:hover {
background: transparent;
}
.dialog-error td {
padding: 0 1em 0 0;
}
.dialog-error h4 {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
.dialog-error:before { .dialog-error:before {
content: "\f110"; content: "\f110";
} }
@ -802,9 +761,78 @@ tr:hover {
.dialog-warning p { .dialog-warning p {
margin: 1px 0 0 0; margin: 1px 0 0 0;
} }
.dialog-warning table {
width: auto;
}
.dialog-warning tr {
vertical-align: text-top;
}
.dialog-warning tr:hover {
background: transparent;
}
.dialog-warning td {
padding: 0 1em 0 0;
}
.dialog-warning h4 {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
.dialog-warning:before { .dialog-warning:before {
content: "\f10f"; content: "\f10f";
} }
.dialog-modal {
position: relative;
width: 70%;
padding: 1em 1em 1em 2.7em;
margin: 0em 8% 1em 8%;
border: 1px solid black;
border-radius: 4px;
text-align: left;
background: white;
position: fixed;
top: 50%;
left: 50%;
/* bring your own prefixes */
transform: translate(-50%, -50%);
z-index: 100000;
margin: 0 50% 0 0;
box-shadow: 0 0 1em;
}
.dialog-modal:before {
position: absolute;
top: 0.5em;
left: 0.5em;
font-family: "ion";
font-size: 1.5em;
}
.dialog-modal .close {
float: right;
position: relative;
top: -3px;
color: inherit;
font-size: 1.5em;
}
.dialog-modal ul,
.dialog-modal ol,
.dialog-modal p {
margin: 1px 0 0 0;
}
.dialog-modal table {
width: auto;
}
.dialog-modal tr {
vertical-align: text-top;
}
.dialog-modal tr:hover {
background: transparent;
}
.dialog-modal td {
padding: 0 1em 0 0;
}
.dialog-modal h4 {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
.btn-collapse { .btn-collapse {
cursor: pointer; cursor: pointer;
} }
@ -816,6 +844,7 @@ tr:hover {
margin: 0; margin: 0;
border: none; border: none;
} }
/* -- tabs --*/
.tabs .tabs > label { .tabs .tabs > label {
font-size: 90%; font-size: 90%;
} }
@ -894,6 +923,7 @@ html body .tabs > input:checked + label {
html body .tabs > input:checked + label + section { html body .tabs > input:checked + label + section {
display: block; display: block;
} }
/* -- select -- */
select { select {
height: 28px; height: 28px;
margin: 0 1em 0 0; margin: 0 1em 0 0;
@ -924,6 +954,7 @@ select:focus {
border-bottom: 1px solid #3498DB; border-bottom: 1px solid #3498DB;
} }
} }
/* -- checkbox-onoff -- */
@supports (border-radius: 50px) { @supports (border-radius: 50px) {
.checkbox-onoff { .checkbox-onoff {
display: inline-block; display: inline-block;
@ -955,6 +986,7 @@ select:focus {
background: #dcdcdc; background: #dcdcdc;
} }
} }
/* -- checkbox --*/
@supports (transform: rotate(-45deg)) { @supports (transform: rotate(-45deg)) {
.checkbox { .checkbox {
width: 20px; width: 20px;
@ -1007,6 +1039,48 @@ select:focus {
width: 100%; 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 rgba(0, 0, 0, 0.2);
border-right: 0.5em solid rgba(0, 0, 0, 0.2);
border-bottom: 0.5em solid rgba(0, 0, 0, 0.2);
border-left: 0.5em solid rgba(255, 255, 255, 0);
-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);
}
}
/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */ /*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */
.autocomplete { .autocomplete {
position: absolute; position: absolute;
@ -1073,8 +1147,8 @@ select:focus {
} }
@font-face { @font-face {
font-family: "ion"; font-family: "ion";
src: url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e"); src: url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51");
src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"), url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"), url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"), url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg"); src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"), url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"), url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"), url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@ -1154,6 +1228,9 @@ select:focus {
.ion-magnet:before { .ion-magnet:before {
content: "\f114"; content: "\f114";
} }
.ion-close:before {
content: "\f115";
}
.ion-icon-big { .ion-icon-big {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
@ -1240,6 +1317,22 @@ select:focus {
#main_preferences table td { #main_preferences table td {
text-align: center; text-align: center;
} }
#main_preferences table.cookies {
width: auto;
}
#main_preferences table.cookies th,
#main_preferences table.cookies td {
text-align: left;
padding: 0.25em;
}
#main_preferences table.cookies th:first-child,
#main_preferences table.cookies td:first-child {
padding-right: 4em;
}
#main_preferences table.cookies > tbody > tr:nth-child(even) > th,
#main_preferences table.cookies > tbody > tr:nth-child(even) > td {
background-color: #ececec;
}
#main_preferences .name, #main_preferences .name,
#main_preferences .shortcut { #main_preferences .shortcut {
text-align: left; text-align: left;
@ -1263,6 +1356,9 @@ select:focus {
#main_preferences .preferences_back a::first-letter { #main_preferences .preferences_back a::first-letter {
text-transform: uppercase; text-transform: uppercase;
} }
#main_preferences div.selectable_url pre {
width: 100%;
}
@media screen and (max-width: 75em) { @media screen and (max-width: 75em) {
.preferences_back { .preferences_back {
clear: both; clear: both;
@ -1291,12 +1387,40 @@ select:focus {
} }
*/ */
} }
#clear_search {
display: block;
border-collapse: separate;
box-sizing: border-box;
width: 1.8em;
margin: 0;
padding: 2px;
height: 2.2em;
background: none repeat scroll 0 0 #FFF;
border-top: 1px solid #3498DB;
border-bottom: 1px solid #3498DB;
border-right: none;
border-left: none;
border-radius: 0px;
outline: none;
color: #222;
font-size: 16px;
z-index: 10000;
}
#clear_search:hover {
color: #3498DB;
}
#clear_search.empty * {
display: none;
}
#q::-ms-clear,
#q::-webkit-search-cancel-button {
display: none;
}
#q, #q,
#send_search { #send_search {
display: block !important; display: block !important;
border-collapse: separate; border-collapse: separate;
box-sizing: border-box; box-sizing: border-box;
position: relative;
margin: 0; margin: 0;
padding: 2px; padding: 2px;
height: 2.2em; height: 2.2em;
@ -1857,27 +1981,8 @@ article.result-images[data-vim-selected]::before {
#search_url { #search_url {
margin-top: 8px; margin-top: 8px;
} }
#search_url div { #search_url div.selectable_url pre {
border: 1px solid #888;
padding: 4px;
color: #444;
width: 100%;
display: block;
margin: 0.1em;
overflow: hidden;
height: 1.2em;
line-height: 1.2em;
}
#search_url div pre {
display: block;
width: 200em; width: 200em;
font-size: 0.8em;
word-break: break-all;
margin: 0.1em;
-webkit-user-select: all;
-moz-user-select: all;
-ms-user-select: all;
user-select: all;
} }
#linkto_preferences { #linkto_preferences {
position: absolute; position: absolute;
@ -2001,6 +2106,28 @@ article.result-images[data-vim-selected]::before {
max-width: 98%; max-width: 98%;
} }
} }
#main_results div#results.only_template_images {
flex-direction: column;
width: auto;
display: flex;
}
#main_results div#results.only_template_images #sidebar {
position: relative;
top: auto;
order: 2;
}
#main_results div#results.only_template_images #urls {
position: relative;
order: 1;
}
#main_results div#results.only_template_images #backToTop {
right: 0.5em;
left: auto;
}
#main_results div#results.only_template_images #pagination {
position: relative;
order: 3;
}
@media screen and (max-width: 50em) { @media screen and (max-width: 50em) {
article[data-vim-selected]::before { article[data-vim-selected]::before {
display: none; display: none;

Binary file not shown.

View File

@ -1,44 +1,30 @@
/*! searx | 03-12-2017 | https://github.com/asciimoo/searx */ /*! searx | 14-08-2018 | https://github.com/asciimoo/searx */
/* /*
* searx, A privacy-respecting, hackable metasearch engine * searx, A privacy-respecting, hackable metasearch engine
* *
* To convert "style.less" to "style.css" run: $make styles * To convert "style.less" to "style.css" run: $make styles
*/ */
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document /* Document
========================================================================== */ ========================================================================== */
/** /**
* 1. Correct the line height in all browsers. * 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in * 2. Prevent adjustments of font size after orientation changes in iOS.
* IE on Windows Phone and in iOS.
*/ */
html { html {
line-height: 1.15; line-height: 1.15;
/* 1 */ /* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
/* 2 */ /* 2 */
} }
/* Sections /* Sections
========================================================================== */ ========================================================================== */
/** /**
* Remove the margin in all browsers (opinionated). * Remove the margin in all browsers.
*/ */
body { body {
margin: 0; margin: 0;
} }
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/** /**
* Correct the font size and margin on `h1` elements within `section` and * Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari. * `article` contexts in Chrome, Firefox, and Safari.
@ -49,22 +35,6 @@ h1 {
} }
/* Grouping content /* Grouping content
========================================================================== */ ========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main {
/* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/** /**
* 1. Add the correct box sizing in Firefox. * 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE. * 2. Show the overflow in Edge and IE.
@ -90,17 +60,13 @@ pre {
/* Text-level semantics /* Text-level semantics
========================================================================== */ ========================================================================== */
/** /**
* 1. Remove the gray background on active links in IE 10. * Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/ */
a { a {
background-color: transparent; background-color: transparent;
/* 1 */
-webkit-text-decoration-skip: objects;
/* 2 */
} }
/** /**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-. * 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/ */
abbr[title] { abbr[title] {
@ -111,13 +77,6 @@ abbr[title] {
text-decoration: underline dotted; text-decoration: underline dotted;
/* 2 */ /* 2 */
} }
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/** /**
* Add the correct font weight in Chrome, Edge, and Safari. * Add the correct font weight in Chrome, Edge, and Safari.
*/ */
@ -137,19 +96,6 @@ samp {
font-size: 1em; font-size: 1em;
/* 2 */ /* 2 */
} }
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/** /**
* Add the correct font size in all browsers. * Add the correct font size in all browsers.
*/ */
@ -176,35 +122,15 @@ sup {
/* Embedded content /* Embedded content
========================================================================== */ ========================================================================== */
/** /**
* Add the correct display in IE 9-. * Remove the border on images inside links in IE 10.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/ */
img { img {
border-style: none; border-style: none;
} }
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms /* Forms
========================================================================== */ ========================================================================== */
/** /**
* 1. Change the font styles in all browsers (opinionated). * 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari. * 2. Remove the margin in Firefox and Safari.
*/ */
button, button,
@ -212,7 +138,7 @@ input,
optgroup, optgroup,
select, select,
textarea { textarea {
font-family: sans-serif; font-family: inherit;
/* 1 */ /* 1 */
font-size: 100%; font-size: 100%;
/* 1 */ /* 1 */
@ -240,16 +166,13 @@ select {
text-transform: none; text-transform: none;
} }
/** /**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` * Correct the inability to style clickable types in iOS and Safari.
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/ */
button, button,
html [type="button"], [type="button"],
[type="reset"], [type="reset"],
[type="submit"] { [type="submit"] {
-webkit-appearance: button; -webkit-appearance: button;
/* 2 */
} }
/** /**
* Remove the inner border and padding in Firefox. * Remove the inner border and padding in Firefox.
@ -297,24 +220,20 @@ legend {
/* 1 */ /* 1 */
} }
/** /**
* 1. Add the correct display in IE 9-. * Add the correct vertical alignment in Chrome, Firefox, and Opera.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/ */
progress { progress {
display: inline-block;
/* 1 */
vertical-align: baseline; vertical-align: baseline;
/* 2 */
} }
/** /**
* Remove the default vertical scrollbar in IE. * Remove the default vertical scrollbar in IE 10+.
*/ */
textarea { textarea {
overflow: auto; overflow: auto;
} }
/** /**
* 1. Add the correct box sizing in IE 10-. * 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10-. * 2. Remove the padding in IE 10.
*/ */
[type="checkbox"], [type="checkbox"],
[type="radio"] { [type="radio"] {
@ -341,9 +260,8 @@ textarea {
/* 2 */ /* 2 */
} }
/** /**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS. * Remove the inner padding in Chrome and Safari on macOS.
*/ */
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration { [type="search"]::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none;
} }
@ -360,11 +278,9 @@ textarea {
/* Interactive /* Interactive
========================================================================== */ ========================================================================== */
/* /*
* Add the correct display in IE 9-. * Add the correct display in Edge, IE 10+, and Firefox.
* 1. Add the correct display in Edge, IE, and Firefox.
*/ */
details, details {
menu {
display: block; display: block;
} }
/* /*
@ -373,24 +289,16 @@ menu {
summary { summary {
display: list-item; display: list-item;
} }
/* Scripting /* Misc
========================================================================== */ ========================================================================== */
/** /**
* Add the correct display in IE 9-. * Add the correct display in IE 10+.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/ */
template { template {
display: none; display: none;
} }
/* Hidden
========================================================================== */
/** /**
* Add the correct display in IE 10-. * Add the correct display in IE 10.
*/ */
[hidden] { [hidden] {
display: none; display: none;
@ -706,7 +614,14 @@ html.js .show_if_nojs {
float: left; float: left;
} }
.invisible { .invisible {
display: none; display: none !important;
}
.list-unstyled {
list-style-type: none;
}
.list-unstyled li {
margin-top: 4px;
margin-bottom: 4px;
} }
.danger { .danger {
background-color: #fae1e1; background-color: #fae1e1;
@ -722,6 +637,13 @@ html.js .show_if_nojs {
padding: 1px 5px; padding: 1px 5px;
border-radius: 5px; border-radius: 5px;
} }
kbd {
padding: 2px 4px;
margin: 1px;
font-size: 90%;
color: white;
background: black;
}
table { table {
width: 100%; width: 100%;
} }
@ -737,6 +659,27 @@ td {
tr:hover { tr:hover {
background: #ececec; background: #ececec;
} }
div.selectable_url {
border: 1px solid #888;
padding: 4px;
color: #444;
width: 100%;
display: block;
margin: 0.1em;
overflow: hidden;
height: 1.2em;
line-height: 1.2em;
}
div.selectable_url pre {
display: block;
font-size: 0.8em;
word-break: break-all;
margin: 0.1em;
-webkit-user-select: all;
-moz-user-select: all;
-ms-user-select: element;
user-select: all;
}
.dialog-error { .dialog-error {
position: relative; position: relative;
width: 70%; width: 70%;
@ -768,6 +711,22 @@ tr:hover {
.dialog-error p { .dialog-error p {
margin: 1px 0 0 0; margin: 1px 0 0 0;
} }
.dialog-error table {
width: auto;
}
.dialog-error tr {
vertical-align: text-top;
}
.dialog-error tr:hover {
background: transparent;
}
.dialog-error td {
padding: 0 1em 0 0;
}
.dialog-error h4 {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
.dialog-error:before { .dialog-error:before {
content: "\f110"; content: "\f110";
} }
@ -802,9 +761,78 @@ tr:hover {
.dialog-warning p { .dialog-warning p {
margin: 1px 0 0 0; margin: 1px 0 0 0;
} }
.dialog-warning table {
width: auto;
}
.dialog-warning tr {
vertical-align: text-top;
}
.dialog-warning tr:hover {
background: transparent;
}
.dialog-warning td {
padding: 0 1em 0 0;
}
.dialog-warning h4 {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
.dialog-warning:before { .dialog-warning:before {
content: "\f10f"; content: "\f10f";
} }
.dialog-modal {
position: relative;
width: 70%;
padding: 1em 1em 1em 2.7em;
margin: 0em 8% 1em 8%;
border: 1px solid black;
border-radius: 4px;
text-align: left;
background: white;
position: fixed;
top: 50%;
left: 50%;
/* bring your own prefixes */
transform: translate(-50%, -50%);
z-index: 100000;
margin: 0 50% 0 0;
box-shadow: 0 0 1em;
}
.dialog-modal:before {
position: absolute;
top: 0.5em;
left: 0.5em;
font-family: "ion";
font-size: 1.5em;
}
.dialog-modal .close {
float: right;
position: relative;
top: -3px;
color: inherit;
font-size: 1.5em;
}
.dialog-modal ul,
.dialog-modal ol,
.dialog-modal p {
margin: 1px 0 0 0;
}
.dialog-modal table {
width: auto;
}
.dialog-modal tr {
vertical-align: text-top;
}
.dialog-modal tr:hover {
background: transparent;
}
.dialog-modal td {
padding: 0 1em 0 0;
}
.dialog-modal h4 {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
.btn-collapse { .btn-collapse {
cursor: pointer; cursor: pointer;
} }
@ -816,6 +844,7 @@ tr:hover {
margin: 0; margin: 0;
border: none; border: none;
} }
/* -- tabs --*/
.tabs .tabs > label { .tabs .tabs > label {
font-size: 90%; font-size: 90%;
} }
@ -894,6 +923,7 @@ html body .tabs > input:checked + label {
html body .tabs > input:checked + label + section { html body .tabs > input:checked + label + section {
display: block; display: block;
} }
/* -- select -- */
select { select {
height: 28px; height: 28px;
margin: 0 1em 0 0; margin: 0 1em 0 0;
@ -924,6 +954,7 @@ select:focus {
border-bottom: 1px solid #3498DB; border-bottom: 1px solid #3498DB;
} }
} }
/* -- checkbox-onoff -- */
@supports (border-radius: 50px) { @supports (border-radius: 50px) {
.checkbox-onoff { .checkbox-onoff {
display: inline-block; display: inline-block;
@ -955,6 +986,7 @@ select:focus {
background: #dcdcdc; background: #dcdcdc;
} }
} }
/* -- checkbox --*/
@supports (transform: rotate(-45deg)) { @supports (transform: rotate(-45deg)) {
.checkbox { .checkbox {
width: 20px; width: 20px;
@ -1007,6 +1039,48 @@ select:focus {
width: 100%; 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 rgba(0, 0, 0, 0.2);
border-right: 0.5em solid rgba(0, 0, 0, 0.2);
border-bottom: 0.5em solid rgba(0, 0, 0, 0.2);
border-left: 0.5em solid rgba(255, 255, 255, 0);
-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);
}
}
/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */ /*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */
.autocomplete { .autocomplete {
position: absolute; position: absolute;
@ -1073,8 +1147,8 @@ select:focus {
} }
@font-face { @font-face {
font-family: "ion"; font-family: "ion";
src: url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e"); src: url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51");
src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"), url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"), url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"), url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg"); src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"), url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"), url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"), url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@ -1154,6 +1228,9 @@ select:focus {
.ion-magnet:before { .ion-magnet:before {
content: "\f114"; content: "\f114";
} }
.ion-close:before {
content: "\f115";
}
.ion-icon-big { .ion-icon-big {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
@ -1240,6 +1317,22 @@ select:focus {
#main_preferences table td { #main_preferences table td {
text-align: center; text-align: center;
} }
#main_preferences table.cookies {
width: auto;
}
#main_preferences table.cookies th,
#main_preferences table.cookies td {
text-align: left;
padding: 0.25em;
}
#main_preferences table.cookies th:first-child,
#main_preferences table.cookies td:first-child {
padding-right: 4em;
}
#main_preferences table.cookies > tbody > tr:nth-child(even) > th,
#main_preferences table.cookies > tbody > tr:nth-child(even) > td {
background-color: #ececec;
}
#main_preferences .name, #main_preferences .name,
#main_preferences .shortcut { #main_preferences .shortcut {
text-align: left; text-align: left;
@ -1263,6 +1356,9 @@ select:focus {
#main_preferences .preferences_back a::first-letter { #main_preferences .preferences_back a::first-letter {
text-transform: uppercase; text-transform: uppercase;
} }
#main_preferences div.selectable_url pre {
width: 100%;
}
@media screen and (max-width: 75em) { @media screen and (max-width: 75em) {
.preferences_back { .preferences_back {
clear: both; clear: both;
@ -1291,12 +1387,40 @@ select:focus {
} }
*/ */
} }
#clear_search {
display: block;
border-collapse: separate;
box-sizing: border-box;
width: 1.8em;
margin: 0;
padding: 2px;
height: 2.2em;
background: none repeat scroll 0 0 #FFF;
border-top: 1px solid #3498DB;
border-bottom: 1px solid #3498DB;
border-right: none;
border-left: none;
border-radius: 0px;
outline: none;
color: #222;
font-size: 16px;
z-index: 10000;
}
#clear_search:hover {
color: #3498DB;
}
#clear_search.empty * {
display: none;
}
#q::-ms-clear,
#q::-webkit-search-cancel-button {
display: none;
}
#q, #q,
#send_search { #send_search {
display: block !important; display: block !important;
border-collapse: separate; border-collapse: separate;
box-sizing: border-box; box-sizing: border-box;
position: relative;
margin: 0; margin: 0;
padding: 2px; padding: 2px;
height: 2.2em; height: 2.2em;
@ -1857,27 +1981,8 @@ article.result-images[data-vim-selected]::before {
#search_url { #search_url {
margin-top: 8px; margin-top: 8px;
} }
#search_url div { #search_url div.selectable_url pre {
border: 1px solid #888;
padding: 4px;
color: #444;
width: 100%;
display: block;
margin: 0.1em;
overflow: hidden;
height: 1.2em;
line-height: 1.2em;
}
#search_url div pre {
display: block;
width: 200em; width: 200em;
font-size: 0.8em;
word-break: break-all;
margin: 0.1em;
-webkit-user-select: all;
-moz-user-select: all;
-ms-user-select: all;
user-select: all;
} }
#linkto_preferences { #linkto_preferences {
position: absolute; position: absolute;
@ -2001,6 +2106,28 @@ article.result-images[data-vim-selected]::before {
max-width: 98%; max-width: 98%;
} }
} }
#main_results div#results.only_template_images {
flex-direction: column;
width: auto;
display: flex;
}
#main_results div#results.only_template_images #sidebar {
position: relative;
top: auto;
order: 2;
}
#main_results div#results.only_template_images #urls {
position: relative;
order: 1;
}
#main_results div#results.only_template_images #backToTop {
right: 0.5em;
left: auto;
}
#main_results div#results.only_template_images #pagination {
position: relative;
order: 3;
}
@media screen and (max-width: 50em) { @media screen and (max-width: 50em) {
article[data-vim-selected]::before { article[data-vim-selected]::before {
display: none; display: none;

Binary file not shown.

View File

@ -3,12 +3,12 @@
@font-face { @font-face {
font-family:"ion"; font-family:"ion";
src:url("../fonts/ion.eot?492c5e946f5ae6f02467d64ca0f55cd1"); src:url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51");
src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"), src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"),
url("../fonts/ion.woff2?492c5e946f5ae6f02467d64ca0f55cd1") format("woff2"), url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"),
url("../fonts/ion.woff?492c5e946f5ae6f02467d64ca0f55cd1") format("woff"), url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"),
url("../fonts/ion.ttf?492c5e946f5ae6f02467d64ca0f55cd1") format("truetype"), url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"),
url("../fonts/ion.svg?492c5e946f5ae6f02467d64ca0f55cd1#ion") format("svg"); url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
font-weight:normal; font-weight:normal;
font-style:normal; font-style:normal;
} }
@ -132,3 +132,8 @@
.ion-magnet:before { .ion-magnet:before {
content:"\f114"; content:"\f114";
} }
.ion-close:before {
content:"\f115";
}

View File

@ -60,12 +60,12 @@
@font-face { @font-face {
font-family:"ion"; font-family:"ion";
src:url("ion.eot?492c5e946f5ae6f02467d64ca0f55cd1"); src:url("ion.eot?ce7a0ead692560b4405a96d5b8471f51");
src:url("ion.eot?#iefix") format("embedded-opentype"), src:url("ion.eot?#iefix") format("embedded-opentype"),
url("ion.woff2?492c5e946f5ae6f02467d64ca0f55cd1") format("woff2"), url("ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"),
url("ion.woff?492c5e946f5ae6f02467d64ca0f55cd1") format("woff"), url("ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"),
url("ion.ttf?492c5e946f5ae6f02467d64ca0f55cd1") format("truetype"), url("ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"),
url("ion.svg?492c5e946f5ae6f02467d64ca0f55cd1#ion") format("svg"); url("ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
font-weight:normal; font-weight:normal;
font-style:normal; font-style:normal;
} }
@ -190,6 +190,11 @@
content:"\f114"; content:"\f114";
} }
.ion-close:before {
content:"\f115";
}
</style> </style>
</head> </head>
<body> <body>
@ -237,6 +242,8 @@
<div class="icons__item" data-name="magnet"><i class="ion-icon ion-magnet"></i> ion-magnet</div> <div class="icons__item" data-name="magnet"><i class="ion-icon ion-magnet"></i> ion-magnet</div>
<div class="icons__item" data-name="close"><i class="ion-icon ion-close"></i> ion-close</div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -25,6 +25,10 @@ module.exports = function(grunt) {
output: { output: {
comments: 'some' comments: 'some'
}, },
ie8: false,
warnings: true,
compress: false,
mangle: true,
sourceMap: true sourceMap: true
}, },
dist: { dist: {
@ -63,7 +67,7 @@ module.exports = function(grunt) {
plugins: [ plugins: [
new (require('less-plugin-clean-css'))({ new (require('less-plugin-clean-css'))({
advanced: true, advanced: true,
compatibility: 'ie8' compatibility: '*'
}) })
], ],
banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n' banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n'
@ -99,7 +103,8 @@ module.exports = function(grunt) {
'node_modules/ionicons-npm/src/music-note.svg', 'node_modules/ionicons-npm/src/music-note.svg',
'node_modules/ionicons-npm/src/ion-close-round.svg', 'node_modules/ionicons-npm/src/ion-close-round.svg',
'node_modules/ionicons-npm/src/android-more-vertical.svg', 'node_modules/ionicons-npm/src/android-more-vertical.svg',
'magnet.svg' 'magnet.svg',
'node_modules/ionicons-npm/src/android-close.svg',
], ],
dest: 'fonts', dest: 'fonts',
destLess: 'less', destLess: 'less',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -147,10 +147,19 @@
} }
}; };
searx.insertBefore = function (newNode, referenceNode) {
element.parentNode.insertBefore(newNode, referenceNode);
};
searx.insertAfter = function(newNode, referenceNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
};
searx.on('.close', 'click', function(e) { searx.on('.close', 'click', function(e) {
var el = e.target || e.srcElement; var el = e.target || e.srcElement;
this.parentNode.style.display="None"; this.parentNode.classList.add('invisible');
}); });
return searx; return searx;
})(window, document, window.searx); })(window, document, window.searx);
;(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ ;(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
@ -958,7 +967,7 @@ module.exports = AutoComplete;
} }
}; };
searx.on(document, "keyup", function(e) { searx.on(document, "keydown", function(e) {
// check for modifiers so we don't break browser's hotkeys // check for modifiers so we don't break browser's hotkeys
if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) { if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
var tagName = e.target.tagName.toLowerCase(); var tagName = e.target.tagName.toLowerCase();
@ -968,6 +977,7 @@ module.exports = AutoComplete;
} }
} else { } else {
if (e.target === document.body || tagName === 'a' || tagName === 'button') { if (e.target === document.body || tagName === 'a' || tagName === 'button') {
e.preventDefault();
vimKeys[e.keyCode].fun(); vimKeys[e.keyCode].fun();
} }
} }
@ -1132,13 +1142,7 @@ module.exports = AutoComplete;
}; };
} }
function toggleHelp() { function initHelpContent(divElement) {
var helpPanel = document.querySelector('#vim-hotkeys-help');
if (helpPanel.length) {
helpPanel.classList.toggle('hidden');
return;
}
var categories = {}; var categories = {};
for (var k in vimKeys) { for (var k in vimKeys) {
@ -1155,14 +1159,9 @@ module.exports = AutoComplete;
return; return;
} }
var html = '<div id="vim-hotkeys-help" class="well vim-hotkeys-help">'; var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
html += '<div class="container-fluid">'; html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
html += '<table>';
html += '<div class="row">';
html += '<div class="col-sm-12">';
html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
html += '</div>'; // col-sm-12
html += '</div>'; // row
for (var i = 0; i < sorted.length; i++) { for (var i = 0; i < sorted.length; i++) {
var cat = categories[sorted[i]]; var cat = categories[sorted[i]];
@ -1171,13 +1170,11 @@ module.exports = AutoComplete;
var first = i % 2 === 0; var first = i % 2 === 0;
if (first) { if (first) {
html += '<div class="row dflex">'; html += '<tr>';
} }
html += '<div class="col-sm-' + (first && lastCategory ? 12 : 6) + ' dflex">'; html += '<td>';
html += '<div class="panel panel-default iflex">'; html += '<h4>' + cat[0].cat + '</h4>';
html += '<div class="panel-heading">' + cat[0].cat + '</div>';
html += '<div class="panel-body">';
html += '<ul class="list-unstyled">'; html += '<ul class="list-unstyled">';
for (var cj in cat) { for (var cj in cat) {
@ -1185,20 +1182,38 @@ module.exports = AutoComplete;
} }
html += '</ul>'; html += '</ul>';
html += '</div>'; // panel-body html += '</td>'; // col-sm-*
html += '</div>'; // panel
html += '</div>'; // col-sm-*
if (!first || lastCategory) { if (!first || lastCategory) {
html += '</div>'; // row html += '</tr>'; // row
} }
} }
html += '</div>'; // container-fluid html += '</table>';
html += '</div>'; // vim-hotkeys-help
divElement.innerHTML = html;
}
function toggleHelp() {
var helpPanel = document.querySelector('#vim-hotkeys-help');
console.log(helpPanel);
if (helpPanel === undefined || helpPanel === null) {
// first call
helpPanel = document.createElement('div');
helpPanel.id = 'vim-hotkeys-help';
helpPanel.className='dialog-modal';
helpPanel.style='width: 40%';
initHelpContent(helpPanel);
var body = document.getElementsByTagName('body')[0];
body.appendChild(helpPanel);
} else {
// togggle hidden
helpPanel.classList.toggle('invisible');
return;
}
$('body').append(html);
} }
}); });
;/** ;/**
* searx is free software: you can redistribute it and/or modify * searx is free software: you can redistribute it and/or modify
@ -1292,13 +1307,14 @@ module.exports = AutoComplete;
newHtml += "</td></tr>"; newHtml += "</td></tr>";
} }
} }
result_table_loadicon.classList.add('invisible'); result_table_loadicon.parentNode.removeChild(result_table_loadicon);
result_table.classList.remove('invisible'); result_table.classList.remove('invisible');
result_table.querySelector("tbody").innerHTML = newHtml; result_table.querySelector("tbody").innerHTML = newHtml;
} }
}) })
.catch(function() { .catch(function() {
result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "<p class=\"text-muted\">could not load data!</p>"; result_table_loadicon.classList.remove('invisible');
result_table_loadicon.innerHTML = "could not load data!";
}); });
} }
} }
@ -1473,6 +1489,26 @@ module.exports = AutoComplete;
} }
} }
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() {
qinput.value='';
qinput.focus();
updateClearButton();
});
qinput.addEventListener('keyup', updateClearButton, false);
}
searx.ready(function() { searx.ready(function() {
qinput = d.getElementById(qinput_id); qinput = d.getElementById(qinput_id);
@ -1486,6 +1522,9 @@ module.exports = AutoComplete;
} }
if (qinput !== null) { if (qinput !== null) {
// clear button
createClearButton(qinput);
// autocompleter // autocompleter
if (searx.autocompleter) { if (searx.autocompleter) {
searx.autocomplete = AutoComplete.call(w, { searx.autocomplete = AutoComplete.call(w, {

Binary file not shown.

View File

@ -147,9 +147,18 @@
} }
}; };
searx.insertBefore = function (newNode, referenceNode) {
element.parentNode.insertBefore(newNode, referenceNode);
};
searx.insertAfter = function(newNode, referenceNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
};
searx.on('.close', 'click', function(e) { searx.on('.close', 'click', function(e) {
var el = e.target || e.srcElement; var el = e.target || e.srcElement;
this.parentNode.style.display="None"; this.parentNode.classList.add('invisible');
}); });
return searx; return searx;
})(window, document, window.searx); })(window, document, window.searx);

View File

@ -116,7 +116,7 @@ searx.ready(function() {
} }
}; };
searx.on(document, "keyup", function(e) { searx.on(document, "keydown", function(e) {
// check for modifiers so we don't break browser's hotkeys // check for modifiers so we don't break browser's hotkeys
if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) { if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
var tagName = e.target.tagName.toLowerCase(); var tagName = e.target.tagName.toLowerCase();
@ -126,6 +126,7 @@ searx.ready(function() {
} }
} else { } else {
if (e.target === document.body || tagName === 'a' || tagName === 'button') { if (e.target === document.body || tagName === 'a' || tagName === 'button') {
e.preventDefault();
vimKeys[e.keyCode].fun(); vimKeys[e.keyCode].fun();
} }
} }
@ -290,13 +291,7 @@ searx.ready(function() {
}; };
} }
function toggleHelp() { function initHelpContent(divElement) {
var helpPanel = document.querySelector('#vim-hotkeys-help');
if (helpPanel.length) {
helpPanel.classList.toggle('hidden');
return;
}
var categories = {}; var categories = {};
for (var k in vimKeys) { for (var k in vimKeys) {
@ -313,14 +308,9 @@ searx.ready(function() {
return; return;
} }
var html = '<div id="vim-hotkeys-help" class="well vim-hotkeys-help">'; var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
html += '<div class="container-fluid">'; html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
html += '<table>';
html += '<div class="row">';
html += '<div class="col-sm-12">';
html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
html += '</div>'; // col-sm-12
html += '</div>'; // row
for (var i = 0; i < sorted.length; i++) { for (var i = 0; i < sorted.length; i++) {
var cat = categories[sorted[i]]; var cat = categories[sorted[i]];
@ -329,13 +319,11 @@ searx.ready(function() {
var first = i % 2 === 0; var first = i % 2 === 0;
if (first) { if (first) {
html += '<div class="row dflex">'; html += '<tr>';
} }
html += '<div class="col-sm-' + (first && lastCategory ? 12 : 6) + ' dflex">'; html += '<td>';
html += '<div class="panel panel-default iflex">'; html += '<h4>' + cat[0].cat + '</h4>';
html += '<div class="panel-heading">' + cat[0].cat + '</div>';
html += '<div class="panel-body">';
html += '<ul class="list-unstyled">'; html += '<ul class="list-unstyled">';
for (var cj in cat) { for (var cj in cat) {
@ -343,18 +331,36 @@ searx.ready(function() {
} }
html += '</ul>'; html += '</ul>';
html += '</div>'; // panel-body html += '</td>'; // col-sm-*
html += '</div>'; // panel
html += '</div>'; // col-sm-*
if (!first || lastCategory) { if (!first || lastCategory) {
html += '</div>'; // row html += '</tr>'; // row
} }
} }
html += '</div>'; // container-fluid html += '</table>';
html += '</div>'; // vim-hotkeys-help
divElement.innerHTML = html;
}
function toggleHelp() {
var helpPanel = document.querySelector('#vim-hotkeys-help');
console.log(helpPanel);
if (helpPanel === undefined || helpPanel === null) {
// first call
helpPanel = document.createElement('div');
helpPanel.id = 'vim-hotkeys-help';
helpPanel.className='dialog-modal';
helpPanel.style='width: 40%';
initHelpContent(helpPanel);
var body = document.getElementsByTagName('body')[0];
body.appendChild(helpPanel);
} else {
// togggle hidden
helpPanel.classList.toggle('invisible');
return;
}
$('body').append(html);
} }
}); });

View File

@ -90,13 +90,14 @@
newHtml += "</td></tr>"; newHtml += "</td></tr>";
} }
} }
result_table_loadicon.classList.add('invisible'); result_table_loadicon.parentNode.removeChild(result_table_loadicon);
result_table.classList.remove('invisible'); result_table.classList.remove('invisible');
result_table.querySelector("tbody").innerHTML = newHtml; result_table.querySelector("tbody").innerHTML = newHtml;
} }
}) })
.catch(function() { .catch(function() {
result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "<p class=\"text-muted\">could not load data!</p>"; result_table_loadicon.classList.remove('invisible');
result_table_loadicon.innerHTML = "could not load data!";
}); });
} }
} }

View File

@ -33,6 +33,26 @@
} }
} }
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() {
qinput.value='';
qinput.focus();
updateClearButton();
});
qinput.addEventListener('keyup', updateClearButton, false);
}
searx.ready(function() { searx.ready(function() {
qinput = d.getElementById(qinput_id); qinput = d.getElementById(qinput_id);
@ -46,6 +66,9 @@
} }
if (qinput !== null) { if (qinput !== null) {
// clear button
createClearButton(qinput);
// autocompleter // autocompleter
if (searx.autocompleter) { if (searx.autocompleter) {
searx.autocomplete = AutoComplete.call(w, { searx.autocomplete = AutoComplete.call(w, {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1 @@
alexandre@alf-laptop.2449:1533915028

View File

@ -3,12 +3,12 @@
@font-face { @font-face {
font-family:"ion"; font-family:"ion";
src:url("../fonts/ion.eot?492c5e946f5ae6f02467d64ca0f55cd1"); src:url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51");
src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"), src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"),
url("../fonts/ion.woff2?492c5e946f5ae6f02467d64ca0f55cd1") format("woff2"), url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"),
url("../fonts/ion.woff?492c5e946f5ae6f02467d64ca0f55cd1") format("woff"), url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"),
url("../fonts/ion.ttf?492c5e946f5ae6f02467d64ca0f55cd1") format("truetype"), url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"),
url("../fonts/ion.svg?492c5e946f5ae6f02467d64ca0f55cd1#ion") format("svg"); url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
font-weight:normal; font-weight:normal;
font-style:normal; font-style:normal;
} }
@ -172,3 +172,10 @@
} }
} }
.ion-close {
&:before {
content:"\f115";
}
}

View File

@ -30,7 +30,7 @@
.select-all-on-focus() { .select-all-on-focus() {
-webkit-user-select: all; -webkit-user-select: all;
-moz-user-select: all; -moz-user-select: all;
-ms-user-select: all; -ms-user-select: element;
user-select: all; user-select: all;
} }

View File

@ -1,17 +1,15 @@
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document /* Document
========================================================================== */ ========================================================================== */
/** /**
* 1. Correct the line height in all browsers. * 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in * 2. Prevent adjustments of font size after orientation changes in iOS.
* IE on Windows Phone and in iOS.
*/ */
html { html {
line-height: 1.15; /* 1 */ line-height: 1.15; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */
} }
@ -19,26 +17,13 @@ html {
========================================================================== */ ========================================================================== */
/** /**
* Remove the margin in all browsers (opinionated). * Remove the margin in all browsers.
*/ */
body { body {
margin: 0; margin: 0;
} }
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/** /**
* Correct the font size and margin on `h1` elements within `section` and * Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari. * `article` contexts in Chrome, Firefox, and Safari.
@ -52,25 +37,6 @@ h1 {
/* Grouping content /* Grouping content
========================================================================== */ ========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main { /* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/** /**
* 1. Add the correct box sizing in Firefox. * 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE. * 2. Show the overflow in Edge and IE.
@ -96,17 +62,15 @@ pre {
========================================================================== */ ========================================================================== */
/** /**
* 1. Remove the gray background on active links in IE 10. * Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/ */
a { a {
background-color: transparent; /* 1 */ background-color: transparent;
-webkit-text-decoration-skip: objects; /* 2 */
} }
/** /**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-. * 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/ */
@ -116,15 +80,6 @@ abbr[title] {
text-decoration: underline dotted; /* 2 */ text-decoration: underline dotted; /* 2 */
} }
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/** /**
* Add the correct font weight in Chrome, Edge, and Safari. * Add the correct font weight in Chrome, Edge, and Safari.
*/ */
@ -146,23 +101,6 @@ samp {
font-size: 1em; /* 2 */ font-size: 1em; /* 2 */
} }
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/** /**
* Add the correct font size in all browsers. * Add the correct font size in all browsers.
*/ */
@ -196,44 +134,18 @@ sup {
========================================================================== */ ========================================================================== */
/** /**
* Add the correct display in IE 9-. * Remove the border on images inside links in IE 10.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/ */
img { img {
border-style: none; border-style: none;
} }
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms /* Forms
========================================================================== */ ========================================================================== */
/** /**
* 1. Change the font styles in all browsers (opinionated). * 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari. * 2. Remove the margin in Firefox and Safari.
*/ */
@ -242,7 +154,7 @@ input,
optgroup, optgroup,
select, select,
textarea { textarea {
font-family: sans-serif; /* 1 */ font-family: inherit; /* 1 */
font-size: 100%; /* 1 */ font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */ line-height: 1.15; /* 1 */
margin: 0; /* 2 */ margin: 0; /* 2 */
@ -269,16 +181,14 @@ select { /* 1 */
} }
/** /**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` * Correct the inability to style clickable types in iOS and Safari.
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/ */
button, button,
html [type="button"], /* 1 */ [type="button"],
[type="reset"], [type="reset"],
[type="submit"] { [type="submit"] {
-webkit-appearance: button; /* 2 */ -webkit-appearance: button;
} }
/** /**
@ -329,17 +239,15 @@ legend {
} }
/** /**
* 1. Add the correct display in IE 9-. * Add the correct vertical alignment in Chrome, Firefox, and Opera.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/ */
progress { progress {
display: inline-block; /* 1 */ vertical-align: baseline;
vertical-align: baseline; /* 2 */
} }
/** /**
* Remove the default vertical scrollbar in IE. * Remove the default vertical scrollbar in IE 10+.
*/ */
textarea { textarea {
@ -347,8 +255,8 @@ textarea {
} }
/** /**
* 1. Add the correct box sizing in IE 10-. * 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10-. * 2. Remove the padding in IE 10.
*/ */
[type="checkbox"], [type="checkbox"],
@ -377,10 +285,9 @@ textarea {
} }
/** /**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS. * Remove the inner padding in Chrome and Safari on macOS.
*/ */
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration { [type="search"]::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none;
} }
@ -399,12 +306,10 @@ textarea {
========================================================================== */ ========================================================================== */
/* /*
* Add the correct display in IE 9-. * Add the correct display in Edge, IE 10+, and Firefox.
* 1. Add the correct display in Edge, IE, and Firefox.
*/ */
details, /* 1 */ details {
menu {
display: block; display: block;
} }
@ -416,30 +321,19 @@ summary {
display: list-item; display: list-item;
} }
/* Scripting /* Misc
========================================================================== */ ========================================================================== */
/** /**
* Add the correct display in IE 9-. * Add the correct display in IE 10+.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/ */
template { template {
display: none; display: none;
} }
/* Hidden
========================================================================== */
/** /**
* Add the correct display in IE 10-. * Add the correct display in IE 10.
*/ */
[hidden] { [hidden] {

View File

@ -45,6 +45,24 @@
text-align: center; text-align: center;
} }
table.cookies {
width: auto;
th, td {
text-align: left;
padding: 0.25em;
}
th:first-child, td:first-child {
padding-right: 4em;
}
&>tbody>tr:nth-child(even)>th,
&>tbody>tr:nth-child(even)>td {
background-color: @color-settings-tr-hover;
}
}
.name, .shortcut { .name, .shortcut {
text-align: left; text-align: left;
} }
@ -69,6 +87,13 @@
} }
} }
div.selectable_url {
pre {
width: 100%;
}
}
} }
@media screen and (max-width: 75em) { @media screen and (max-width: 75em) {

View File

@ -26,11 +26,43 @@
*/ */
} }
#clear_search {
display: block;
border-collapse: separate;
box-sizing: border-box;
width: 1.8em;
margin: 0;
padding: 2px;
height: 2.2em;
background: none repeat scroll 0 0 @color-search-background;
border-top: 1px solid @color-search-border;
border-bottom: 1px solid @color-search-border;
border-right: none;
border-left: none;
border-radius: 0px;
outline: none;
color: @color-search-font;
font-size: 16px;
z-index: 10000;
&:hover {
color: @color-search-border;
}
&.empty * {
display: none;
}
}
#q::-ms-clear, #q::-webkit-search-cancel-button {
display: none;
}
#q, #send_search { #q, #send_search {
display: block !important; display: block !important;
border-collapse: separate; border-collapse: separate;
box-sizing: border-box; box-sizing: border-box;
position: relative;
margin: 0; margin: 0;
padding: 2px; padding: 2px;

View File

@ -477,25 +477,9 @@ article.result-images[data-vim-selected]::before {
#search_url { #search_url {
margin-top: 8px; margin-top: 8px;
div { div.selectable_url {
display: block;
border: 1px solid @color-result-search-url-border;
padding: 4px;
color: @color-result-search-url-font;
width: 100%;
display: block;
margin: 0.1em;
overflow: hidden;
height: 1.2em;
line-height: 1.2em;
pre { pre {
display: block;
width: 200em; width: 200em;
font-size: 0.8em;
word-break: break-all;
margin: 0.1em;
.select-all-on-focus();
} }
} }
} }
@ -648,6 +632,34 @@ article.result-images[data-vim-selected]::before {
} }
#main_results div#results.only_template_images {
flex-direction: column;
width: auto;
display: flex;
#sidebar {
position: relative;
top: auto;
order: 2;
}
#urls {
position: relative;
order: 1;
}
#backToTop {
right: 0.5em;
left: auto;
}
#pagination {
position: relative;
order: 3;
}
}
@media screen and (max-width: @results-width) { @media screen and (max-width: @results-width) {
article[data-vim-selected]::before { article[data-vim-selected]::before {

View File

@ -20,7 +20,16 @@ html.js .show_if_nojs {
} }
.invisible { .invisible {
display: none; display: none !important;
}
.list-unstyled {
list-style-type: none;
li {
margin-top: 4px;
margin-bottom: 4px;
}
} }
.danger { .danger {
@ -39,6 +48,15 @@ html.js .show_if_nojs {
border-radius: 5px; border-radius: 5px;
} }
// kbd
kbd {
padding: 2px 4px;
margin: 1px;
font-size: 90%;
color: white;
background: black;
}
// table // table
table { table {
@ -65,6 +83,32 @@ tr {
} }
} }
// pre
.pre() {
display: block;
font-size: 0.8em;
word-break: break-all;
margin: 0.1em;
.select-all-on-focus();
}
div.selectable_url {
display: block;
border: 1px solid @color-result-search-url-border;
padding: 4px;
color: @color-result-search-url-font;
width: 100%;
display: block;
margin: 0.1em;
overflow: hidden;
height: 1.2em;
line-height: 1.2em;
pre {
.pre();
}
}
// dialog // dialog
.dialog() { .dialog() {
position: relative; position: relative;
@ -95,6 +139,28 @@ tr {
margin: 1px 0 0 0; margin: 1px 0 0 0;
} }
table {
width: auto;
}
tr {
vertical-align: text-top;
&:hover {
background: transparent;
}
}
td {
padding: 0 1em 0 0;
}
h4 {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
} }
.dialog-error { .dialog-error {
@ -113,6 +179,19 @@ tr {
.ion-warning(); .ion-warning();
} }
.dialog-modal {
.dialog();
background: white;
position: fixed;
top: 50%;
left: 50%;
/* bring your own prefixes */
transform: translate(-50%, -50%);
z-index: 100000;
margin: 0 50% 0 0;
box-shadow: 0 0 1em;
}
// btn-collapse // btn-collapse
.btn-collapse { .btn-collapse {
cursor: pointer; cursor: pointer;
@ -128,7 +207,7 @@ tr {
border: none; border: none;
} }
// tabs /* -- tabs --*/
.tabs .tabs > label { .tabs .tabs > label {
font-size: 90%; font-size: 90%;
} }
@ -215,7 +294,7 @@ html body .tabs > input:checked {
} }
} }
// select /* -- select -- */
select { select {
height: 28px; height: 28px;
margin: 0 1em 0 0; margin: 0 1em 0 0;
@ -251,7 +330,7 @@ select {
} }
// checkbox-onoff /* -- checkbox-onoff -- */
@supports (border-radius: 50px) { @supports (border-radius: 50px) {
.checkbox-onoff { .checkbox-onoff {
display: inline-block; display: inline-block;
@ -285,7 +364,7 @@ select {
} }
} }
// checkbox /* -- checkbox --*/
@supports (transform: rotate(-45deg)) { @supports (transform: rotate(-45deg)) {
.checkbox { .checkbox {
width: 20px; width: 20px;
@ -325,7 +404,7 @@ select {
} }
} }
// disabled : can't be focused, show only the check mark // disabled : can''t be focused, show only the check mark
input[disabled] + label { input[disabled] + label {
background-color: transparent !important; background-color: transparent !important;
box-shadow: none !important; box-shadow: none !important;
@ -344,3 +423,46 @@ select {
width: 100%; 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 rgba(0, 0, 0, 0.2);
border-right: 0.5em solid rgba(0, 0, 0, 0.2);
border-bottom: 0.5em solid rgba(0, 0, 0, 0.2);
border-left: 0.5em solid rgba(255, 255, 255, 0);
-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);
}
}

View File

@ -0,0 +1,41 @@
.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 rgba(255, 255, 255, 0.2);
border-right: 1.1em solid rgba(255, 255, 255, 0.2);
border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
border-left: 1.1em solid #ffffff;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
-webkit-animation: load8 1.1s infinite linear;
animation: load8 1.1s 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);
}
}

View File

@ -1,15 +1,15 @@
{ {
"devDependencies": { "devDependencies": {
"grunt": "~1.0.1", "grunt": "~1.0.3",
"grunt-contrib-concat": "~1.0.1", "grunt-contrib-concat": "~1.0.1",
"grunt-contrib-cssmin": "^2.2.1", "grunt-contrib-cssmin": "^2.2.1",
"grunt-contrib-jshint": "~1.1.0", "grunt-contrib-jshint": "~1.1.0",
"grunt-contrib-less": "^1.4.1", "grunt-contrib-less": "^1.4.1",
"grunt-contrib-uglify": "~3.0.1", "grunt-contrib-uglify": "~3.4.0",
"grunt-contrib-watch": "~1.0.0", "grunt-contrib-watch": "~1.1.0",
"grunt-webfont": "^1.6.0", "grunt-webfont": "^1.7.1",
"ionicons-npm": "^2.0.1", "ionicons-npm": "^2.0.1",
"jslint": "^0.10.3", "jslint": "^0.12.0",
"less-plugin-clean-css": "^1.5.1" "less-plugin-clean-css": "^1.5.1"
}, },
"scripts": { "scripts": {

View File

@ -52,9 +52,9 @@
<p class="value"> <p class="value">
<select name="autocomplete"> <select name="autocomplete">
<option value=""> - </option> <option value=""> - </option>
{% for backend in autocomplete_backends %} {%- for backend in autocomplete_backends -%}
<option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option> <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
{% endfor %} {%- endfor -%}
</select> </select>
</p> </p>
<div class="description">{{ _('Find stuff as you type') }}</div> <div class="description">{{ _('Find stuff as you type') }}</div>
@ -71,6 +71,19 @@
<div class="description">{{ _('Filter content') }}</p> <div class="description">{{ _('Filter content') }}</p>
</fieldset> </fieldset>
{{ plugin_preferences('general') }} {{ plugin_preferences('general') }}
<fieldset>
<legend>{{ _('Open Access DOI resolver') }}</legend>
<p class="value">
<select id='doi_resolver' name='doi_resolver'>
{%- for doi_resolver_name,doi_resolver_url in doi_resolvers.items() -%}
<option value="{{ doi_resolver_name }}" {% if doi_resolver_name == current_doi_resolver %}selected="selected"{% endif %}>
{{- doi_resolver_name }} - {{ doi_resolver_url -}}
</option>
{%- endfor -%}
</select>
</p>
<div class="description"><!-- {{ _('Redirect to open-access versions of publications when available (plugin required)') }} --></div>
</fieldset>
{{ tab_footer() }} {{ tab_footer() }}
{{ tab_header('maintab', 'engines', _('Engines')) }} {{ tab_header('maintab', 'engines', _('Engines')) }}
@ -151,6 +164,38 @@
{{ plugin_preferences('ui') }} {{ plugin_preferences('ui') }}
{{ tab_footer() }} {{ tab_footer() }}
{{ tab_header('maintab', 'cookies', _('Cookies')) }}
<p class="text-muted" style="margin:20px 0;">
{{ _('This is the list of cookies and their values searx is storing on your computer.') }}<br />
{{ _('With that list, you can assess searx transparency.') }}<br />
</p>
{% if cookies %}
<table class="cookies">
<tr>
<th>{{ _('Cookie name') }}</th>
<th>{{ _('Value') }}</th>
</tr>
{% for cookie in cookies %}
<tr>
<td>{{ cookie }}</td>
<td>{{ cookies[cookie] }}</td>
</tr>
{% endfor %}
</table>
{% else %}
{% include 'oscar/messages/no_cookies.html' %}
{% endif %}
<h4>{{ _('Search URL of the currently saved preferences') }} :</h4>
<div class="selectable_url">
<pre>{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&amp;q=%s{% endraw %}</pre>
</div>
<p class="small_font">{{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }}</p>
{{ tab_footer() }}
{{ tab_header('maintab', 'privacy', _('Privacy')) }} {{ tab_header('maintab', 'privacy', _('Privacy')) }}
<fieldset> <fieldset>
<legend>{{ _('Method') }}</legend> <legend>{{ _('Method') }}</legend>
@ -173,6 +218,7 @@
<div class="description">{{ _('Proxying image results through searx') }}</div> <div class="description">{{ _('Proxying image results through searx') }}</div>
</fieldset> </fieldset>
{{ plugin_preferences('privacy') }} {{ plugin_preferences('privacy') }}
{{ tab_footer() }} {{ tab_footer() }}
{{ tabs_close() }} {{ tabs_close() }}
@ -180,7 +226,7 @@
<p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
<br /> <br />
{{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
</p> </p>
<input type="submit" value="{{ _('save') }}" /> <input type="submit" value="{{ _('save') }}" />
<div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div> <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div>

View File

@ -23,17 +23,17 @@
{%- endif -%} {%- endif -%}
{% if result.address.road -%} {% if result.address.road -%}
<span itemprop="streetAddress"> <span itemprop="streetAddress">
{% if result.address.house_number %}{{ result.address.house_number }}, {% endif %} {%- if result.address.house_number -%}{{- result.address.house_number -}}, {% endif %}
{{ result.address.road }} {{- result.address.road -}}
</span><br/> </span><br/>
{%- endif %} {%- endif %}
{%- if result.address.locality -%} {%- if result.address.locality -%}
<span itemprop="addressLocality">{{ result.address.locality }}</span> <span itemprop="addressLocality">{{- result.address.locality -}}</span>
{% if result.address.postcode %}, <span itemprop="postalCode">{{ result.address.postcode }}</span>{% endif %} {%- if result.address.postcode -%}, <span itemprop="postalCode">{{- result.address.postcode -}}</span>{% endif %}
<br/> <br/>
{%- endif -%} {%- endif -%}
{%- if result.address.country -%} {%- if result.address.country -%}
<span itemprop="addressCountry">{{ result.address.country }}</span> <span itemprop="addressCountry">{{- result.address.country -}}</span>
{%- endif -%} {%- endif -%}
</p> </p>
{%- endif -%} {%- endif -%}
@ -44,11 +44,8 @@
{% if result.osm and (result.osm.type and result.osm.id) -%} {% if result.osm and (result.osm.type and result.osm.id) -%}
<div class="result-content invisible" id="result-overpass-{{ index }}"{% if rtl %} dir="ltr"{% endif %}> <div class="result-content invisible" id="result-overpass-{{ index }}"{% if rtl %} dir="ltr"{% endif %}>
<div id="result-overpass-table-loading-{{ index }}"><img src="{{ url_for('static', filename='img/loader.gif') }}" alt="Loading ..."/></div> <div id="result-overpass-table-loading-{{ index }}"><div class="loader">{{ _('Loading...') }}</div></div>
<table id="result-overpass-table-{{ index }}"> <table id="result-overpass-table-{{ index }}">
<thead>
<tr><th>key</th><th>value</th></tr>
</thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>

View File

@ -1,18 +1,25 @@
{% extends "simple/base.html" %} {% extends "simple/base.html" %}
{% from 'simple/macros.html' import icon, icon_small %} {% from 'simple/macros.html' import icon, icon_small %}
{% block title %}{{ q|e }} - {% endblock %} {% block title %}{% if method == 'GET' %}{{- q|e -}} -{% endif %}{% endblock %}
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}&amp;pageno={{ pageno }}&amp;time_range={{ time_range }}&amp;language={{ current_language }}&amp;safesearch={{ safesearch }}&amp;format=rss">{% endblock %} {% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}&amp;pageno={{ pageno }}&amp;time_range={{ time_range }}&amp;language={{ current_language }}&amp;safesearch={{ safesearch }}&amp;format=rss">{% endblock %}
{% block content %} {% block content %}
<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav> <nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav>
{% include 'simple/search.html' %} {% include 'simple/search.html' %}
<div id="results">
{% if answers %} {% if results and results|map(attribute='template')|unique|list|count == 1 %}
{% set only_template = 'only_template_' + results[0]['template']|default('default')|replace('.html', '') %}
{% else %}
{% set unique_template = '' %}
{% endif %}
<div id="results" class="{{ only_template }}">
{% if answers -%}
<div id="answers"><h4 class="title">{{ _('Answers') }} : </h4> <div id="answers"><h4 class="title">{{ _('Answers') }} : </h4>
{% for answer in answers -%} {%- for answer in answers -%}
<div class="answer">{{ answer }}</div> <div class="answer">{{- answer -}}</div>
{%- endfor %} {%- endfor -%}
</div> </div>
{% endif %} {%- endif %}
<div id="sidebar"> <div id="sidebar">
@ -24,16 +31,16 @@
<div class="dialog-error" role="alert"> <div class="dialog-error" role="alert">
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p> <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p>
<p>{% for engine_name, error_type in unresponsive_engines %} <p>{% for engine_name, error_type in unresponsive_engines %}
{{ engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %} {{- engine_name }} ({{- error_type -}}){% if not loop.last %}, {% endif %}
{% endfor %}</p> {% endfor %}</p>
</div> </div>
{% endif %} {% endif %}
{% if infoboxes %} {% if infoboxes %}
<div id="infoboxes"> <div id="infoboxes">
{% for infobox in infoboxes %} {% for infobox in infoboxes -%}
{% include 'simple/infobox.html' %} {% include 'simple/infobox.html' %}
{% endfor %} {%- endfor %}
</div> </div>
{% endif %} {% endif %}
@ -56,7 +63,7 @@
<div id="search_url"> <div id="search_url">
<h4 class="title">{{ _('Search URL') }} :</h4> <h4 class="title">{{ _('Search URL') }} :</h4>
<div><pre>{{ base_url }}?q={{ q|urlencode }}&amp;language={{ current_language }}&amp;time_range={{ time_range }}&amp;safesearch={{ safesearch }}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}</pre></div> <div class="selectable_url"><pre>{{ base_url }}?q={{ q|urlencode }}&amp;language={{ current_language }}&amp;time_range={{ time_range }}&amp;safesearch={{ safesearch }}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}</pre></div>
</div> </div>
<div id="apis"> <div id="apis">
<h4 class="title">{{ _('Download results') }}</h4> <h4 class="title">{{ _('Download results') }}</h4>

View File

@ -2,6 +2,7 @@
<div id="search_wrapper"> <div id="search_wrapper">
<div class="search_box"> <div class="search_box">
<input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} > <input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button>
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button> <button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
</div> </div>
<div class="search_filters"> <div class="search_filters">