mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Merge remote-tracking branch 'origin/latesto'
This commit is contained in:
commit
d008d78cd6
408 changed files with 96618 additions and 55272 deletions
|
|
@ -1,26 +0,0 @@
|
|||
.vim-hotkeys-help {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 9999999;
|
||||
overflow-y: auto;
|
||||
max-height: 80%;
|
||||
box-shadow: 0 0 1em;
|
||||
}
|
||||
|
||||
.dflex {
|
||||
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
|
||||
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
|
||||
display: -ms-flexbox; /* TWEENER - IE 10 */
|
||||
display: -webkit-flex; /* NEW - Chrome */
|
||||
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
||||
}
|
||||
|
||||
.iflex {
|
||||
-webkit-box-flex: 1; /* OLD - iOS 6-, Safari 3.1-6 */
|
||||
-moz-box-flex: 1; /* OLD - Firefox 19- */
|
||||
-webkit-flex: 1; /* Chrome */
|
||||
-ms-flex: 1; /* IE 10 */
|
||||
flex: 1; /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
if($('#q').length) {
|
||||
$('#categories label').click(function(e) {
|
||||
$('#categories input[type="checkbox"]').each(function(i, checkbox) {
|
||||
$(checkbox).prop('checked', false);
|
||||
});
|
||||
$(document.getElementById($(this).attr("for"))).prop('checked', true);
|
||||
if($('#q').val()) {
|
||||
if (getHttpRequest() == "GET") {
|
||||
$('#search_form').attr('action', $('#search_form').serialize());
|
||||
}
|
||||
$('#search_form').submit();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('#time-range').change(function(e) {
|
||||
if($('#q').val()) {
|
||||
if (getHttpRequest() == "GET") {
|
||||
$('#search_form').attr('action', $('#search_form').serialize());
|
||||
}
|
||||
$('#search_form').submit();
|
||||
}
|
||||
});
|
||||
$('#language').change(function(e) {
|
||||
if($('#q').val()) {
|
||||
if (getHttpRequest() == "GET") {
|
||||
$('#search_form').attr('action', $('#search_form').serialize());
|
||||
}
|
||||
$('#search_form').submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function getHttpRequest() {
|
||||
httpRequest = "POST";
|
||||
urlParams = new URLSearchParams(window.location.search);
|
||||
if (urlParams.has('method')) {
|
||||
httpRequest = urlParams.get('method');
|
||||
}
|
||||
return httpRequest;
|
||||
}
|
||||
|
|
@ -1,345 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
highlightResult('top')();
|
||||
|
||||
$('.result').on('click', function() {
|
||||
highlightResult($(this))();
|
||||
});
|
||||
|
||||
var vimKeys = {
|
||||
27: {
|
||||
key: 'Escape',
|
||||
fun: removeFocus,
|
||||
des: 'remove focus from the focused input',
|
||||
cat: 'Control'
|
||||
},
|
||||
73: {
|
||||
key: 'i',
|
||||
fun: searchInputFocus,
|
||||
des: 'focus on the search input',
|
||||
cat: 'Control'
|
||||
},
|
||||
66: {
|
||||
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: pageButtonClick(0),
|
||||
des: 'go to previous page',
|
||||
cat: 'Results'
|
||||
},
|
||||
78: {
|
||||
key: 'n',
|
||||
fun: pageButtonClick(1),
|
||||
des: 'go to next page',
|
||||
cat: 'Results'
|
||||
},
|
||||
79: {
|
||||
key: 'o',
|
||||
fun: openResult(false),
|
||||
des: 'open search result',
|
||||
cat: 'Results'
|
||||
},
|
||||
84: {
|
||||
key: 't',
|
||||
fun: openResult(true),
|
||||
des: 'open the result in a new tab',
|
||||
cat: 'Results'
|
||||
},
|
||||
82: {
|
||||
key: 'r',
|
||||
fun: reloadPage,
|
||||
des: 'reload page from the server',
|
||||
cat: 'Control'
|
||||
},
|
||||
72: {
|
||||
key: 'h',
|
||||
fun: toggleHelp,
|
||||
des: 'toggle help window',
|
||||
cat: 'Other'
|
||||
}
|
||||
};
|
||||
|
||||
$(document).keydown(function(e) {
|
||||
// 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 (e.keyCode === 27) {
|
||||
if (e.target.tagName.toLowerCase() === 'input') {
|
||||
vimKeys[e.keyCode].fun();
|
||||
}
|
||||
} else {
|
||||
if (e.target === document.body) {
|
||||
e.preventDefault();
|
||||
vimKeys[e.keyCode].fun();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function nextResult(current, direction) {
|
||||
var next = current[direction]();
|
||||
while (!next.is('.result') && next.length !== 0) {
|
||||
next = next[direction]();
|
||||
}
|
||||
return next
|
||||
}
|
||||
|
||||
function highlightResult(which) {
|
||||
return function() {
|
||||
var current = $('.result[data-vim-selected]');
|
||||
if (current.length === 0) {
|
||||
current = $('.result:first');
|
||||
if (current.length === 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var next;
|
||||
|
||||
if (typeof which !== 'string') {
|
||||
next = which;
|
||||
} else {
|
||||
switch (which) {
|
||||
case 'visible':
|
||||
var top = $(window).scrollTop();
|
||||
var bot = top + $(window).height();
|
||||
var results = $('.result');
|
||||
|
||||
for (var i = 0; i < results.length; i++) {
|
||||
next = $(results[i]);
|
||||
var etop = next.offset().top;
|
||||
var ebot = etop + next.height();
|
||||
|
||||
if ((ebot <= bot) && (etop > top)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'down':
|
||||
next = nextResult(current, 'next');
|
||||
if (next.length === 0) {
|
||||
next = $('.result:first');
|
||||
}
|
||||
break;
|
||||
case 'up':
|
||||
next = nextResult(current, 'prev');
|
||||
if (next.length === 0) {
|
||||
next = $('.result:last');
|
||||
}
|
||||
break;
|
||||
case 'bottom':
|
||||
next = $('.result:last');
|
||||
break;
|
||||
case 'top':
|
||||
default:
|
||||
next = $('.result:first');
|
||||
}
|
||||
}
|
||||
|
||||
if (next) {
|
||||
current.removeAttr('data-vim-selected').removeClass('well well-sm');
|
||||
next.attr('data-vim-selected', 'true').addClass('well well-sm');
|
||||
scrollPageToSelected();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reloadPage() {
|
||||
document.location.reload(false);
|
||||
}
|
||||
|
||||
function removeFocus() {
|
||||
if (document.activeElement) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
}
|
||||
|
||||
function pageButtonClick(num) {
|
||||
return function() {
|
||||
var buttons = $('div#pagination button[type="submit"]');
|
||||
if (buttons.length !== 2) {
|
||||
console.log('page navigation with this theme is not supported');
|
||||
return;
|
||||
}
|
||||
if (num >= 0 && num < buttons.length) {
|
||||
buttons[num].click();
|
||||
} else {
|
||||
console.log('pageButtonClick(): invalid argument');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function scrollPageToSelected() {
|
||||
var sel = $('.result[data-vim-selected]');
|
||||
if (sel.length !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
var wnd = $(window);
|
||||
|
||||
var wtop = wnd.scrollTop();
|
||||
var etop = sel.offset().top;
|
||||
|
||||
var offset = 30;
|
||||
|
||||
if (wtop > etop) {
|
||||
wnd.scrollTop(etop - offset);
|
||||
} else {
|
||||
var ebot = etop + sel.height();
|
||||
var wbot = wtop + wnd.height();
|
||||
|
||||
if (wbot < ebot) {
|
||||
wnd.scrollTop(ebot - wnd.height() + offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function scrollPage(amount) {
|
||||
return function() {
|
||||
window.scrollBy(0, amount);
|
||||
highlightResult('visible')();
|
||||
}
|
||||
}
|
||||
|
||||
function scrollPageTo(position, nav) {
|
||||
return function() {
|
||||
window.scrollTo(0, position);
|
||||
highlightResult(nav)();
|
||||
}
|
||||
}
|
||||
|
||||
function searchInputFocus() {
|
||||
$('input#q').focus();
|
||||
}
|
||||
|
||||
function openResult(newTab) {
|
||||
return function() {
|
||||
var link = $('.result[data-vim-selected] .result_header a');
|
||||
if (link.length) {
|
||||
var url = link.attr('href');
|
||||
if (newTab) {
|
||||
window.open(url);
|
||||
} else {
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function toggleHelp() {
|
||||
var helpPanel = $('#vim-hotkeys-help');
|
||||
if (helpPanel.length) {
|
||||
helpPanel.toggleClass('hidden');
|
||||
return;
|
||||
}
|
||||
|
||||
var categories = {};
|
||||
|
||||
for (var k in vimKeys) {
|
||||
var key = vimKeys[k];
|
||||
categories[key.cat] = categories[key.cat] || [];
|
||||
categories[key.cat].push(key);
|
||||
}
|
||||
|
||||
var sorted = Object.keys(categories).sort(function(a, b) {
|
||||
return categories[b].length - categories[a].length;
|
||||
});
|
||||
|
||||
if (sorted.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var html = '<div id="vim-hotkeys-help" class="well vim-hotkeys-help">';
|
||||
html += '<div class="container-fluid">';
|
||||
|
||||
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++) {
|
||||
var cat = categories[sorted[i]];
|
||||
|
||||
var lastCategory = i === (sorted.length - 1);
|
||||
var first = i % 2 === 0;
|
||||
|
||||
if (first) {
|
||||
html += '<div class="row dflex">';
|
||||
}
|
||||
html += '<div class="col-sm-' + (first && lastCategory ? 12 : 6) + ' dflex">';
|
||||
|
||||
html += '<div class="panel panel-default iflex">';
|
||||
html += '<div class="panel-heading">' + cat[0].cat + '</div>';
|
||||
html += '<div class="panel-body">';
|
||||
html += '<ul class="list-unstyled">';
|
||||
|
||||
for (var cj in cat) {
|
||||
html += '<li><kbd>' + cat[cj].key + '</kbd> ' + cat[cj].des + '</li>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
html += '</div>'; // panel-body
|
||||
html += '</div>'; // panel
|
||||
html += '</div>'; // col-sm-*
|
||||
|
||||
if (!first || lastCategory) {
|
||||
html += '</div>'; // row
|
||||
}
|
||||
}
|
||||
|
||||
html += '</div>'; // container-fluid
|
||||
html += '</div>'; // vim-hotkeys-help
|
||||
|
||||
$('body').append(html);
|
||||
}
|
||||
});
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
.github-issue-button {
|
||||
display: block;
|
||||
padding: 8px 16px;
|
||||
font-family: sans-serif;
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
background-color: #238636 !important; /* important is needed cause to an !important in logicodev-dark */
|
||||
border: #2ea043;
|
||||
border-radius: 10px !important;
|
||||
box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.github-issue-button:hover {
|
||||
background-color: #2ea043;
|
||||
}
|
||||
|
||||
.issue-hide {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
.osm-map-box {
|
||||
height:300px;
|
||||
width:100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
.engine-stats {
|
||||
|
||||
.engine-name {
|
||||
width: 20rem;
|
||||
}
|
||||
|
||||
.engine-score {
|
||||
width: 7rem;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.result-count {
|
||||
}
|
||||
|
||||
.response-time {
|
||||
}
|
||||
|
||||
.engine-reliability {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table.engine-error {
|
||||
max-width: 1280px;
|
||||
margin: 1rem;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
table.engine-error th.engine-error-type,
|
||||
table.engine-error td.engine-error-type,
|
||||
failed-test {
|
||||
width: 10rem;
|
||||
}
|
||||
|
||||
table.engine-error span.log_parameters
|
||||
{
|
||||
border-right: 1px solid gray;
|
||||
padding: 0 1rem 0 0;
|
||||
margin: 0 0 0 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.bar-chart-value {
|
||||
width: 3em;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
.bar-chart-graph {
|
||||
width: calc(100% - 5rem);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.bar-chart-bar {
|
||||
border: 3px solid #5bc0de;
|
||||
margin: 1px 0;
|
||||
}
|
||||
|
||||
.bar-chart-serie1 {
|
||||
border: 3px solid #5bc0de;
|
||||
margin: 1px 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bar-chart-serie2 {
|
||||
border: 3px solid #deb15b;
|
||||
margin: 1px 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bar0{
|
||||
width: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.generate-bar(100);
|
||||
|
||||
.generate-bar(@n, @i: 1) when (@i =< @n) {
|
||||
.bar@{i} {
|
||||
width: (@i * 100% / @n);
|
||||
}
|
||||
.generate-bar(@n, (@i + 1));
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -44,7 +44,6 @@ module.exports = function (grunt) {
|
|||
'svg4web.svgo.js',
|
||||
'src/js/main/*.js',
|
||||
'src/js/head/*.js',
|
||||
'../__common__/js/*.js'
|
||||
],
|
||||
},
|
||||
stylelint: {
|
||||
|
|
@ -146,7 +145,7 @@ module.exports = function (grunt) {
|
|||
svgo: ['--config', 'svg4web.svgo.js']
|
||||
},
|
||||
files: {
|
||||
'<%= _templates %>/__common__/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg',
|
||||
'<%= _templates %>/simple/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg',
|
||||
'img/searxng.svg': '<%= _brand %>/searxng.svg',
|
||||
'img/img_load_error.svg': '<%= _brand %>/img_load_error.svg'
|
||||
}
|
||||
|
|
@ -190,6 +189,8 @@ module.exports = function (grunt) {
|
|||
'school-outline': 'node_modules/ionicons/dist/svg/school-outline.svg',
|
||||
'file-tray-full-outline': 'node_modules/ionicons/dist/svg/file-tray-full-outline.svg',
|
||||
'people-outline': 'node_modules/ionicons/dist/svg/people-outline.svg',
|
||||
'heart-outline': 'node_modules/ionicons/dist/svg/heart-outline.svg',
|
||||
'information-circle-outline': 'src/svg/information-circle-outline.svg',
|
||||
},
|
||||
dest: '../../../templates/simple/icons.html',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<svg width="92mm" height="92mm" viewBox="0 0 92 92"><path d="M39.581 41.421h-8.954v-1.215q0-2.034.818-3.597.819-1.587 3.448-4.018l1.588-1.439q1.414-1.29 2.059-2.43.67-1.142.67-2.283 0-1.736-1.191-2.703-1.19-.993-3.324-.993-2.01 0-4.341.844-2.332.818-4.862 2.455v-7.788q3.002-1.042 5.482-1.538 2.48-.496 4.787-.496 6.053 0 9.228 2.48 3.175 2.456 3.175 7.194 0 2.43-.968 4.365-.967 1.91-3.299 4.118L42.31 35.79q-1.687 1.538-2.208 2.48-.52.918-.52 2.034zm-8.954 3.671h8.954v8.83h-8.954Z" style="line-height:1;-inkscape-font-specification:'DejaVu Sans Bold'" font-style="normal" font-variant="normal" font-weight="700" font-stretch="normal" font-size="50.80000305px" font-family="DejaVu Sans" display="inline" fill="#db3434" fill-opacity="1" stroke-width=".26458335"/><circle cx="35" cy="36.486" r="30" fill="none" fill-opacity="1" stroke="#db3434" stroke-width="10" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/><rect width="18.846" height="39.963" x="-12.021" y="80.49" ry="0" transform="rotate(-46.235)" opacity="1" fill="#db3434" fill-opacity="1" stroke="none" stroke-width="8" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/></svg>
|
||||
<svg width="92mm" height="92mm" viewBox="0 0 92 92"><path d="M39.581 41.421h-8.954v-1.215q0-2.034.818-3.597.819-1.587 3.448-4.018l1.588-1.439q1.414-1.29 2.059-2.43.67-1.142.67-2.283 0-1.736-1.191-2.703-1.19-.993-3.324-.993-2.01 0-4.341.844-2.332.818-4.862 2.455v-7.788q3.002-1.042 5.482-1.538 2.48-.496 4.787-.496 6.053 0 9.228 2.48 3.175 2.456 3.175 7.194 0 2.43-.968 4.365-.967 1.91-3.299 4.118L42.31 35.79q-1.687 1.538-2.208 2.48-.52.918-.52 2.034zm-8.954 3.671h8.954v8.83h-8.954Z" style="line-height:1;-inkscape-font-specification:"DejaVu Sans Bold"" font-style="normal" font-variant="normal" font-weight="700" font-stretch="normal" font-size="50.80000305px" font-family="DejaVu Sans" display="inline" fill="#db3434" fill-opacity="1" stroke-width=".26458335"/><circle cx="35" cy="36.486" r="30" fill="none" fill-opacity="1" stroke="#db3434" stroke-width="10" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/><rect width="18.846" height="39.963" x="-12.021" y="80.49" ry="0" transform="rotate(-46.235)" opacity="1" fill="#db3434" fill-opacity="1" stroke="none" stroke-width="8" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
|
|
@ -1,8 +1,2 @@
|
|||
/**
|
||||
* @license
|
||||
* (C) Copyright Contributors to the SearXNG project.
|
||||
* (C) Copyright Contributors to the searx project (2014 - 2021).
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
(function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searxng={method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",hotkeys:a.getAttribute("data-hotkeys")==="true",static_path:a.getAttribute("data-static-path"),translations:JSON.parse(a.getAttribute("data-translations")),theme:{img_load_error:"img/img_load_error.svg"}};var r=e.getElementsByTagName("html")[0];r.classList.remove("no-js");r.classList.add("js")})(window,document);
|
||||
(function(t,e){"use strict";var s=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searxng={settings:JSON.parse(atob(s.getAttribute("client_settings")))};var n=e.getElementsByTagName("html")[0];n.classList.remove("no-js");n.classList.add("js")})(window,document);
|
||||
//# sourceMappingURL=searxng.head.min.js.map
|
||||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"searxng.head.min.js","sources":["../src/js/head/00_init.js"],"sourcesContent":["/**\n * @license\n * (C) Copyright Contributors to the SearXNG project.\n * (C) Copyright Contributors to the searx project (2014 - 2021).\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n(function (w, d) {\n 'use strict';\n\n // add data- properties\n var script = d.currentScript || (function () {\n var scripts = d.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n // try to detect touch screen\n w.searxng = {\n method: script.getAttribute('data-method'),\n autocompleter: script.getAttribute('data-autocompleter') === 'true',\n search_on_category_select: script.getAttribute('data-search-on-category-select') === 'true',\n infinite_scroll: script.getAttribute('data-infinite-scroll') === 'true',\n hotkeys: script.getAttribute('data-hotkeys') === 'true',\n static_path: script.getAttribute('data-static-path'),\n translations: JSON.parse(script.getAttribute('data-translations')),\n theme: {\n // image that is displayed if load of <img src='...'> failed\n img_load_error: 'img/img_load_error.svg'\n }\n };\n\n // update the css\n var hmtlElement = d.getElementsByTagName(\"html\")[0];\n hmtlElement.classList.remove('no-js');\n hmtlElement.classList.add('js');\n})(window, document);"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searxng","method","getAttribute","autocompleter","search_on_category_select","infinite_scroll","hotkeys","static_path","translations","JSON","parse","theme","img_load_error","hmtlElement","classList","remove","add","window","document"],"mappings":";;;;;;CAMA,SAAWA,EAAGC,gBAIZ,IAAIC,EAASD,EAAEE,eAAkB,WAC/B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFD,GAMjCN,EAAEO,QAAU,CACVC,OAAQN,EAAOO,aAAa,eAC5BC,cAAeR,EAAOO,aAAa,wBAA0B,OAC7DE,0BAA2BT,EAAOO,aAAa,oCAAsC,OACrFG,gBAAiBV,EAAOO,aAAa,0BAA4B,OACjEI,QAASX,EAAOO,aAAa,kBAAoB,OACjDK,YAAaZ,EAAOO,aAAa,oBACjCM,aAAcC,KAAKC,MAAMf,EAAOO,aAAa,sBAC7CS,MAAO,CAELC,eAAgB,2BAKpB,IAAIC,EAAcnB,EAAEI,qBAAqB,QAAQ,GACjDe,EAAYC,UAAUC,OAAO,SAC7BF,EAAYC,UAAUE,IAAI,OA3B5B,CA4BGC,OAAQC"}
|
||||
{"version":3,"file":"searxng.head.min.js","sources":["../src/js/head/00_init.js"],"sourcesContent":["/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d) {\n 'use strict';\n\n // add data- properties\n var script = d.currentScript || (function () {\n var scripts = d.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n w.searxng = {\n settings: JSON.parse(atob(script.getAttribute('client_settings')))\n };\n\n // update the css\n var hmtlElement = d.getElementsByTagName(\"html\")[0];\n hmtlElement.classList.remove('no-js');\n hmtlElement.classList.add('js');\n\n})(window, document);\n"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searxng","settings","JSON","parse","atob","getAttribute","hmtlElement","classList","remove","add","window","document"],"mappings":"CACA,SAAWA,EAAGC,gBAIZ,IAAIC,EAASD,EAAEE,eAAkB,WAC/B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFD,GAKjCN,EAAEO,QAAU,CACVC,SAAUC,KAAKC,MAAMC,KAAKT,EAAOU,aAAa,sBAIhD,IAAIC,EAAcZ,EAAEI,qBAAqB,QAAQ,GACjDQ,EAAYC,UAAUC,OAAO,SAC7BF,EAAYC,UAAUE,IAAI,OAhB5B,CAkBGC,OAAQC"}
|
||||
2
searx/static/themes/simple/js/searxng.min.js
vendored
2
searx/static/themes/simple/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,7 +1,7 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"eslint": "^8.11.0",
|
||||
"grunt": "~1.5.2",
|
||||
"eslint": "^8.18.0",
|
||||
"grunt": "~1.6.1",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
"grunt-contrib-cssmin": "^4.0.0",
|
||||
"grunt-contrib-less": "~3.0.0",
|
||||
|
|
@ -11,18 +11,18 @@
|
|||
"grunt-eslint": "^24.0.0",
|
||||
"grunt-stylelint": "^0.16.0",
|
||||
"grunt-image": "^6.4.0",
|
||||
"ionicons": "^6.0.1",
|
||||
"less": "^4.1.2",
|
||||
"ionicons": "^6.0.2",
|
||||
"less": "^4.1.3",
|
||||
"less-plugin-clean-css": "^1.5.1",
|
||||
"sharp": "^0.30.3",
|
||||
"sharp": "^0.31.0",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-standard": "^22.0.0",
|
||||
"ejs": "^3.1.6",
|
||||
"svgo": "^2.8.0"
|
||||
"ejs": "^3.1.8",
|
||||
"svgo": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"autocomplete-js": "2.7.1",
|
||||
"leaflet": "^1.7.1",
|
||||
"leaflet": "^1.8.0",
|
||||
"normalize.css": "^8.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
@ -32,8 +32,7 @@
|
|||
"eslint": "grunt eslint",
|
||||
"eslint-fix": "grunt eslint --fix",
|
||||
"watch": "grunt watch",
|
||||
"webfont": "grunt webfont",
|
||||
"clean": "rm -Rf node_modules package-lock.json ion.less",
|
||||
"clean": "rm -Rf node_modules package-lock.json",
|
||||
"stylelint": "grunt stylelint",
|
||||
"stylelint-fix": "grunt stylelint --fix"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
this file is generated automatically by searxng_extra/update/update_pygments.py
|
||||
using pygments version 2.12.0
|
||||
using pygments version 2.14.0
|
||||
*/
|
||||
|
||||
.code-highlight .linenos {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
/**
|
||||
* @license
|
||||
* (C) Copyright Contributors to the SearXNG project.
|
||||
* (C) Copyright Contributors to the searx project (2014 - 2021).
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
||||
(function (w, d) {
|
||||
'use strict';
|
||||
|
||||
|
|
@ -13,23 +8,13 @@
|
|||
return scripts[scripts.length - 1];
|
||||
})();
|
||||
|
||||
// try to detect touch screen
|
||||
w.searxng = {
|
||||
method: script.getAttribute('data-method'),
|
||||
autocompleter: script.getAttribute('data-autocompleter') === 'true',
|
||||
search_on_category_select: script.getAttribute('data-search-on-category-select') === 'true',
|
||||
infinite_scroll: script.getAttribute('data-infinite-scroll') === 'true',
|
||||
hotkeys: script.getAttribute('data-hotkeys') === 'true',
|
||||
static_path: script.getAttribute('data-static-path'),
|
||||
translations: JSON.parse(script.getAttribute('data-translations')),
|
||||
theme: {
|
||||
// image that is displayed if load of <img src='...'> failed
|
||||
img_load_error: 'img/img_load_error.svg'
|
||||
}
|
||||
settings: JSON.parse(atob(script.getAttribute('client_settings')))
|
||||
};
|
||||
|
||||
// update the css
|
||||
var hmtlElement = d.getElementsByTagName("html")[0];
|
||||
hmtlElement.classList.remove('no-js');
|
||||
hmtlElement.classList.add('js');
|
||||
})(window, document);
|
||||
|
||||
})(window, document);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ window.searxng = (function (w, d) {
|
|||
};
|
||||
|
||||
searxng.loadStyle = function (src) {
|
||||
var path = searxng.static_path + src,
|
||||
var path = searxng.settings.theme_static_path + "/" + src,
|
||||
id = "style_" + src.replace('.', '_'),
|
||||
s = d.getElementById(id);
|
||||
if (s === null) {
|
||||
|
|
@ -115,7 +115,7 @@ window.searxng = (function (w, d) {
|
|||
};
|
||||
|
||||
searxng.loadScript = function (src, callback) {
|
||||
var path = searxng.static_path + src,
|
||||
var path = searxng.settings.theme_static_path + "/" + src,
|
||||
id = "script_" + src.replace('.', '_'),
|
||||
s = d.getElementById(id);
|
||||
if (s === null) {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ searxng.ready(function () {
|
|||
function (err) {
|
||||
console.log(err);
|
||||
var e = d.createElement('div');
|
||||
e.textContent = searxng.translations.error_loading_next_page;
|
||||
e.textContent = searxng.settings.translations.error_loading_next_page;
|
||||
e.classList.add('dialog-error');
|
||||
e.setAttribute('role', 'alert');
|
||||
replaceChildrenWith(d.querySelector('#pagination'), [ e ]);
|
||||
|
|
@ -70,7 +70,7 @@ searxng.ready(function () {
|
|||
)
|
||||
}
|
||||
|
||||
if (searxng.infinite_scroll && searxng.infinite_scroll_supported) {
|
||||
if (searxng.settings.infinite_scroll && searxng.infinite_scroll_supported) {
|
||||
const intersectionObserveOptions = {
|
||||
rootMargin: "20rem",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ searxng.ready(function () {
|
|||
|
||||
searxng.on('.result', 'click', function (e) {
|
||||
if (!isElementInDetail(e.target)) {
|
||||
highlightResult(this)(true);
|
||||
highlightResult(this)(true, true);
|
||||
let resultElement = getResultElement(e.target);
|
||||
if (isImageResult(resultElement)) {
|
||||
e.preventDefault();
|
||||
|
|
@ -154,7 +154,7 @@ searxng.ready(function () {
|
|||
}
|
||||
};
|
||||
|
||||
if (searxng.hotkeys) {
|
||||
if (searxng.settings.hotkeys) {
|
||||
searxng.on(document, "keydown", function (e) {
|
||||
// check for modifiers so we don't break browser's hotkeys
|
||||
if (Object.prototype.hasOwnProperty.call(vimKeys, e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
|
||||
|
|
@ -172,7 +172,7 @@ searxng.ready(function () {
|
|||
}
|
||||
|
||||
function highlightResult (which) {
|
||||
return function (noScroll) {
|
||||
return function (noScroll, keepFocus) {
|
||||
var current = document.querySelector('.result[data-vim-selected]'),
|
||||
effectiveWhich = which;
|
||||
if (current === null) {
|
||||
|
|
@ -233,9 +233,11 @@ searxng.ready(function () {
|
|||
if (next) {
|
||||
current.removeAttribute('data-vim-selected');
|
||||
next.setAttribute('data-vim-selected', 'true');
|
||||
var link = next.querySelector('h3 a') || next.querySelector('a');
|
||||
if (link !== null) {
|
||||
link.focus();
|
||||
if (!keepFocus) {
|
||||
var link = next.querySelector('h3 a') || next.querySelector('a');
|
||||
if (link !== null) {
|
||||
link.focus();
|
||||
}
|
||||
}
|
||||
if (!noScroll) {
|
||||
scrollPageToSelected();
|
||||
|
|
@ -317,7 +319,12 @@ searxng.ready(function () {
|
|||
|
||||
function searchInputFocus () {
|
||||
window.scrollTo(0, 0);
|
||||
document.querySelector('#q').focus();
|
||||
var q = document.querySelector('#q');
|
||||
q.focus();
|
||||
if (q.setSelectionRange) {
|
||||
var len = q.value.length;
|
||||
q.setSelectionRange(len, len);
|
||||
}
|
||||
}
|
||||
|
||||
function openResult (newTab) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
for (const [engine_name, description] of Object.entries(engine_descriptions)) {
|
||||
let elements = d.querySelectorAll('[data-engine-name="' + engine_name + '"] .engine-description');
|
||||
for (const element of elements) {
|
||||
let source = ' (<i>' + searxng.translations['Source'] + ': ' + description[1] + '</i>)';
|
||||
let source = ' (<i>' + searxng.settings.translations.Source + ': ' + description[1] + '</i>)';
|
||||
element.innerHTML = description[0] + source;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,10 @@
|
|||
(function (w, d, searxng) {
|
||||
'use strict';
|
||||
|
||||
var firstFocus = true, qinput_id = "q", qinput;
|
||||
var qinput_id = "q", qinput;
|
||||
|
||||
const isMobile = window.matchMedia("only screen and (max-width: 50em)").matches;
|
||||
|
||||
function placeCursorAtEnd (element) {
|
||||
if (element.setSelectionRange) {
|
||||
var len = element.value.length;
|
||||
element.setSelectionRange(len, len);
|
||||
}
|
||||
}
|
||||
|
||||
function submitIfQuery () {
|
||||
if (qinput.value.length > 0) {
|
||||
var search = document.getElementById('search');
|
||||
|
|
@ -45,30 +38,21 @@
|
|||
searxng.ready(function () {
|
||||
qinput = d.getElementById(qinput_id);
|
||||
|
||||
function placeCursorAtEndOnce () {
|
||||
if (firstFocus) {
|
||||
placeCursorAtEnd(qinput);
|
||||
firstFocus = false;
|
||||
} else {
|
||||
// e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
if (qinput !== null) {
|
||||
// clear button
|
||||
createClearButton(qinput);
|
||||
|
||||
// autocompleter
|
||||
if (searxng.autocompleter) {
|
||||
if (searxng.settings.autocomplete_provider) {
|
||||
searxng.autocomplete = AutoComplete.call(w, {
|
||||
Url: "./autocompleter",
|
||||
EmptyMessage: searxng.translations.no_item_found,
|
||||
HttpMethod: searxng.method,
|
||||
EmptyMessage: searxng.settings.translations.no_item_found,
|
||||
HttpMethod: searxng.settings.http_method,
|
||||
HttpHeaders: {
|
||||
"Content-type": "application/x-www-form-urlencoded",
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
},
|
||||
MinChars: 4,
|
||||
MinChars: searxng.settings.autocomplete_min,
|
||||
Delay: 300,
|
||||
_Position: function () {},
|
||||
_Open: function () {
|
||||
|
|
@ -84,15 +68,50 @@
|
|||
}, "#" + qinput_id);
|
||||
}
|
||||
|
||||
qinput.addEventListener('focus', placeCursorAtEndOnce, false);
|
||||
/*
|
||||
Monkey patch autocomplete.js to fix a bug
|
||||
With the POST method, the values are not URL encoded: query like "1 + 1" are sent as "1 1" since space are URL encoded as plus.
|
||||
See HTML specifications:
|
||||
* HTML5: https://url.spec.whatwg.org/#concept-urlencoded-serializer
|
||||
* HTML4: https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1
|
||||
|
||||
if (!isMobile) {
|
||||
autocomplete.js does not URL encode the name and values:
|
||||
https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/src/autocomplete.ts#L665
|
||||
|
||||
The monkey patch overrides the compiled version of the ajax function.
|
||||
See https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/dist/autocomplete.js#L143-L158
|
||||
The patch changes only the line 156 from
|
||||
params.Request.send(params._QueryArg() + "=" + params._Pre());
|
||||
to
|
||||
params.Request.send(encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(params._Pre()));
|
||||
|
||||
Related to:
|
||||
* https://github.com/autocompletejs/autocomplete.js/issues/78
|
||||
* https://github.com/searxng/searxng/issues/1695
|
||||
*/
|
||||
AutoComplete.prototype.ajax = function (params, request, timeout) {
|
||||
if (timeout === void 0) { timeout = true; }
|
||||
if (params.$AjaxTimer) {
|
||||
window.clearTimeout(params.$AjaxTimer);
|
||||
}
|
||||
if (timeout === true) {
|
||||
params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);
|
||||
} else {
|
||||
if (params.Request) {
|
||||
params.Request.abort();
|
||||
}
|
||||
params.Request = request;
|
||||
params.Request.send(encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(params._Pre()));
|
||||
}
|
||||
};
|
||||
|
||||
if (!isMobile && document.querySelector('.index_endpoint')) {
|
||||
qinput.focus();
|
||||
}
|
||||
}
|
||||
|
||||
// vanilla js version of search_on_category_select.js
|
||||
if (qinput !== null && d.querySelector('.help') != null && searxng.search_on_category_select) {
|
||||
if (qinput !== null && d.querySelector('.help') != null && searxng.settings.search_on_category_select) {
|
||||
d.querySelector('.help').className = 'invisible';
|
||||
|
||||
searxng.on('#categories input', 'change', function () {
|
||||
|
|
|
|||
|
|
@ -51,11 +51,12 @@
|
|||
display: block;
|
||||
background-color: var(--color-autocomplete-background);
|
||||
color: var(--color-autocomplete-font);
|
||||
border: 1px solid var(--color-autocomplete-border);
|
||||
max-height: 32rem;
|
||||
overflow-y: auto;
|
||||
z-index: 100;
|
||||
margin-top: 3.2rem;
|
||||
margin-top: 3.5rem;
|
||||
border-radius: 0.8rem;
|
||||
box-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,19 @@
|
|||
--color-base-font: #444;
|
||||
--color-base-font-rgb: 68, 68, 68;
|
||||
--color-base-background: #fff;
|
||||
--color-url-font: #29314d;
|
||||
--color-url-visited-font: #80b;
|
||||
--color-base-background-mobile: #f2f5f8;
|
||||
--color-url-font: #334999;
|
||||
--color-url-visited-font: #9822c3;
|
||||
/// Header Colors
|
||||
--color-header-background: #f7f7f7;
|
||||
--color-header-background: #fdfbff;
|
||||
--color-header-border: #ddd;
|
||||
/// Footer Colors
|
||||
--color-footer-background: #f7f7f7;
|
||||
--color-footer-background: #fdfbff;
|
||||
--color-footer-border: #ddd;
|
||||
/// Sidebar Colors
|
||||
--color-sidebar-border: #ddd;
|
||||
--color-sidebar-font: #000;
|
||||
--color-sidebar-background: #fff;
|
||||
/// BackToTop Colors
|
||||
--color-backtotop-font: #444;
|
||||
--color-backtotop-border: #ddd;
|
||||
|
|
@ -29,9 +31,10 @@
|
|||
--color-btn-background: #3050ff;
|
||||
--color-btn-font: #fff;
|
||||
--color-show-btn-background: #bbb;
|
||||
--color-show-btn-font: #222;
|
||||
--color-show-btn-font: #000;
|
||||
/// Search Input Colors
|
||||
--color-search-border: #bbb;
|
||||
--color-search-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
||||
--color-search-background: #fff;
|
||||
--color-search-font: #222;
|
||||
--color-search-background-hover: #3050ff;
|
||||
|
|
@ -48,13 +51,14 @@
|
|||
/// Autocomplete Colors
|
||||
--color-autocomplete-font: #000;
|
||||
--color-autocomplete-border: #bbb;
|
||||
--color-autocomplete-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
||||
--color-autocomplete-background: #fff;
|
||||
--color-autocomplete-background-hover: #f7f7f7;
|
||||
--color-autocomplete-background-hover: #e3e3e3;
|
||||
/// Answer Colors
|
||||
--color-answer-border: #ddd; // same as --color-header-border
|
||||
--color-answer-font: #444; // same as --color-base-font
|
||||
--color-answer-background: #f7f7f7; // same as --color-header-background:
|
||||
--color-answer-background: #fff;
|
||||
/// Results Colors
|
||||
--color-result-background: #fff;
|
||||
--color-result-border: #ddd;
|
||||
--color-result-url-font: #000;
|
||||
--color-result-vim-selected: #f7f7f7;
|
||||
|
|
@ -62,9 +66,9 @@
|
|||
--color-result-description-highlight-font: #000;
|
||||
--color-result-link-font: #000bbb;
|
||||
--color-result-link-font-highlight: #000bbb;
|
||||
--color-result-link-visited-font: #80b;
|
||||
--color-result-link-visited-font: #9822c3;
|
||||
--color-result-publishdate-font: #777;
|
||||
--color-result-engines-font: #777;
|
||||
--color-result-engines-font: #545454;
|
||||
--color-result-search-url-border: #ddd;
|
||||
--color-result-search-url-font: #000;
|
||||
// Images Colors
|
||||
|
|
@ -72,27 +76,27 @@
|
|||
--color-result-image-span-font-selected: #fff;
|
||||
--color-result-image-background: #fff;
|
||||
/// Settings Colors
|
||||
--color-settings-tr-hover: #f7f7f7;
|
||||
--color-settings-engine-description-font: darken(#dcdcdc, 30%);
|
||||
--color-settings-tr-hover: #ebebeb;
|
||||
--color-settings-engine-description-font: #545454;
|
||||
--color-settings-engine-group-background: #0001;
|
||||
/// Detail modal
|
||||
--color-result-detail-font: #fff;
|
||||
--color-result-detail-label-font: lightgray;
|
||||
--color-result-detail-background: #000;
|
||||
--color-result-detail-background: #242424;
|
||||
--color-result-detail-hr: #555;
|
||||
--color-result-detail-link: #8af;
|
||||
--color-result-detail-loader-border: rgba(255, 255, 255, 0.2);
|
||||
--color-result-detail-loader-borderleft: rgba(0, 0, 0, 0);
|
||||
/// Toolkit Colors
|
||||
--color-toolkit-badge-font: #fff;
|
||||
--color-toolkit-badge-background: #777;
|
||||
--color-toolkit-badge-background: #545454;
|
||||
--color-toolkit-kbd-font: #fff;
|
||||
--color-toolkit-kbd-background: #000;
|
||||
--color-toolkit-dialog-border: #ddd;
|
||||
--color-toolkit-dialog-background: #fff;
|
||||
--color-toolkit-tabs-label-border: #fff;
|
||||
--color-toolkit-tabs-section-border: #ddd;
|
||||
--color-toolkit-select-background: #f7f7f7;
|
||||
--color-toolkit-select-background: #e1e1e1;
|
||||
--color-toolkit-select-border: #ddd;
|
||||
--color-toolkit-select-background-hover: #bbb;
|
||||
--color-toolkit-input-text-font: #222;
|
||||
|
|
@ -117,30 +121,33 @@
|
|||
/// Base Colors
|
||||
--color-base-font: #bbb;
|
||||
--color-base-font-rgb: 187, 187, 187;
|
||||
--color-base-background: #222;
|
||||
--color-base-background: #222428;
|
||||
--color-base-background-mobile: #222428;
|
||||
--color-url-font: #8af;
|
||||
--color-url-visited-font: #96b;
|
||||
--color-url-visited-font: #c09cd9;
|
||||
/// Header Colors
|
||||
--color-header-background: #181818;
|
||||
--color-header-background: #1e1e22;
|
||||
--color-header-border: #333;
|
||||
/// Footer Colors
|
||||
--color-footer-background: #181818;
|
||||
--color-footer-background: #1e1e22;
|
||||
--color-footer-border: #333;
|
||||
/// Sidebar Colors
|
||||
--color-sidebar-border: #555;
|
||||
--color-sidebar-font: #fff;
|
||||
--color-sidebar-background: #292c34;
|
||||
/// BackToTop Colors
|
||||
--color-backtotop-font: #bbb;
|
||||
--color-backtotop-border: #333;
|
||||
--color-backtotop-background: #181818;
|
||||
--color-backtotop-background: #2b2e36;
|
||||
/// Button Colors
|
||||
--color-btn-background: #58f;
|
||||
--color-btn-font: #222;
|
||||
--color-show-btn-background: #555;
|
||||
--color-show-btn-font: #bbb;
|
||||
--color-show-btn-font: #fff;
|
||||
/// Search Input Colors
|
||||
--color-search-border: #555;
|
||||
--color-search-background: #222;
|
||||
--color-search-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
||||
--color-search-background: #2b2e36;
|
||||
--color-search-font: #fff;
|
||||
--color-search-background-hover: #58f;
|
||||
/// Modal Colors
|
||||
|
|
@ -156,29 +163,30 @@
|
|||
/// Autocomplete Colors
|
||||
--color-autocomplete-font: #fff;
|
||||
--color-autocomplete-border: #555;
|
||||
--color-autocomplete-background: #222;
|
||||
--color-autocomplete-background-hover: #181818;
|
||||
--color-autocomplete-shadow: 0 2px 8px rgb(34 38 46 / 25%);
|
||||
--color-autocomplete-background: #2b2e36;
|
||||
--color-autocomplete-background-hover: #1e1e22;
|
||||
/// Answer Colors
|
||||
--color-answer-border: #333; // same as --color-header-border
|
||||
--color-answer-font: #bbb; // same as --color-base-font
|
||||
--color-answer-background: #181818; // same as --color-header-background:
|
||||
--color-answer-background: #26292f;
|
||||
/// Results Colors
|
||||
--color-result-background: #26292f;
|
||||
--color-result-border: #333;
|
||||
--color-result-url-font: #fff;
|
||||
--color-result-vim-selected: #181818;
|
||||
--color-result-vim-selected: #1f1f23cc;
|
||||
--color-result-vim-arrow: #8af;
|
||||
--color-result-description-highlight-font: #fff;
|
||||
--color-result-link-font: #8af;
|
||||
--color-result-link-font-highlight: #8af;
|
||||
--color-result-link-visited-font: #96b;
|
||||
--color-result-link-visited-font: #c09cd9;
|
||||
--color-result-publishdate-font: #888;
|
||||
--color-result-engines-font: #888;
|
||||
--color-result-engines-font: #a4a4a4;
|
||||
--color-result-search-url-border: #555;
|
||||
--color-result-search-url-font: #fff;
|
||||
/// Detail modal : same as the light version
|
||||
--color-result-detail-font: #fff;
|
||||
--color-result-detail-label-font: lightgray;
|
||||
--color-result-detail-background: #000;
|
||||
--color-result-detail-background: #1a1a1c;
|
||||
--color-result-detail-hr: #555;
|
||||
--color-result-detail-link: #8af;
|
||||
--color-result-detail-loader-border: rgba(255, 255, 255, 0.2);
|
||||
|
|
@ -188,24 +196,24 @@
|
|||
--color-result-image-span-font-selected: #222;
|
||||
--color-result-image-background: #222;
|
||||
/// Settings Colors
|
||||
--color-settings-tr-hover: #2d2d2d;
|
||||
--color-settings-tr-hover: #2c2c32;
|
||||
--color-settings-engine-description-font: darken(#dcdcdc, 30%);
|
||||
--color-settings-engine-group-background: #1a1919;
|
||||
--color-settings-engine-group-background: #1b1b21;
|
||||
/// Toolkit Colors
|
||||
--color-toolkit-badge-font: #fff;
|
||||
--color-toolkit-badge-background: #777;
|
||||
--color-toolkit-badge-background: #555;
|
||||
--color-toolkit-kbd-font: #000;
|
||||
--color-toolkit-kbd-background: #fff;
|
||||
--color-toolkit-dialog-border: #555;
|
||||
--color-toolkit-dialog-background: #222;
|
||||
--color-toolkit-dialog-background: #1e1e22;
|
||||
--color-toolkit-tabs-label-border: #222;
|
||||
--color-toolkit-tabs-section-border: #555;
|
||||
--color-toolkit-select-background: #3c3b31;
|
||||
--color-toolkit-select-background: #313338;
|
||||
--color-toolkit-select-border: #555;
|
||||
--color-toolkit-select-background-hover: #333;
|
||||
--color-toolkit-select-background-hover: #373b49;
|
||||
--color-toolkit-input-text-font: #fff;
|
||||
--color-toolkit-checkbox-onoff-off-background: #3c3b31;
|
||||
--color-toolkit-checkbox-onoff-on-background: #3c3b31;
|
||||
--color-toolkit-checkbox-onoff-off-background: #313338;
|
||||
--color-toolkit-checkbox-onoff-on-background: #313338;
|
||||
--color-toolkit-checkbox-onoff-on-mark-background: #58f;
|
||||
--color-toolkit-checkbox-onoff-on-mark-color: #222;
|
||||
--color-toolkit-checkbox-onoff-off-mark-background: #ddd;
|
||||
|
|
@ -235,6 +243,7 @@
|
|||
|
||||
/// General Size
|
||||
@results-width: 45rem;
|
||||
@results-sidebar-width: 25rem;
|
||||
@results-offset: 10rem;
|
||||
@results-tablet-offset: 0.5rem;
|
||||
@results-gap: 5rem;
|
||||
|
|
|
|||
48
searx/static/themes/simple/src/less/new_issue.less
Normal file
48
searx/static/themes/simple/src/less/new_issue.less
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
.stats_endpoint {
|
||||
.github-issue-button {
|
||||
display: block;
|
||||
padding: 8px 16px;
|
||||
font-family: sans-serif;
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
background-color: #238636;
|
||||
border: #2ea043;
|
||||
border-radius: 10px !important;
|
||||
box-shadow: rgba(0, 0, 0, 0) 0 0 0 0;
|
||||
}
|
||||
|
||||
.github-issue-button:hover {
|
||||
background-color: #2ea043;
|
||||
}
|
||||
|
||||
.issue-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
input[type=checked] {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
label {
|
||||
margin: 1rem 1rem 1rem 0;
|
||||
}
|
||||
|
||||
.step_content {
|
||||
margin: 1rem 1rem 1rem 2rem;
|
||||
}
|
||||
|
||||
.step1,
|
||||
.step2 {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.step1_delay {
|
||||
transition: visibility 0s linear 4s;
|
||||
}
|
||||
|
||||
#step1:checked ~ .step1,
|
||||
#step2:checked ~ .step2 {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
.osm-map-box {
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
|
@ -94,12 +94,12 @@
|
|||
}
|
||||
|
||||
.search_box {
|
||||
border: 1px solid var(--color-search-border);
|
||||
border-radius: 0.8rem;
|
||||
width: @search-width;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
white-space: nowrap;
|
||||
box-shadow: var(--color-search-shadow);
|
||||
}
|
||||
|
||||
#clear_search {
|
||||
|
|
@ -283,7 +283,7 @@ html.no-js #clear_search.hide_if_nojs {
|
|||
|
||||
#search_view:focus-within {
|
||||
display: block;
|
||||
background-color: var(--color-base-background);
|
||||
background-color: var(--color-search-background);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
|
|
@ -291,11 +291,10 @@ html.no-js #clear_search.hide_if_nojs {
|
|||
z-index: 10000;
|
||||
|
||||
.search_box {
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--color-search-border);
|
||||
width: 100%;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
|
||||
#send_search {
|
||||
.ltr-margin-right(0) !important; // Delete when send_search button is disabled on mobile.
|
||||
|
|
@ -304,6 +303,7 @@ html.no-js #clear_search.hide_if_nojs {
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
106
searx/static/themes/simple/src/less/stats.less
Normal file
106
searx/static/themes/simple/src/less/stats.less
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
.engine-stats {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
|
||||
tr td,
|
||||
tr th {
|
||||
border-bottom: 1px solid var(--color-result-border);
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
table.engine-tooltip {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
|
||||
td,
|
||||
th {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.engine-name {
|
||||
width: 20rem;
|
||||
}
|
||||
|
||||
.engine-score {
|
||||
width: 7rem;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.engine-reliability {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
table.engine-error th.engine-error-type,
|
||||
table.engine-error td.engine-error-type,
|
||||
failed-test {
|
||||
width: 10rem;
|
||||
}
|
||||
|
||||
.engine-errors {
|
||||
margin-top: 3rem;
|
||||
|
||||
table.engine-error {
|
||||
max-width: 1280px;
|
||||
margin: 1rem 0 3rem 0;
|
||||
border: 1px solid var(--color-result-border);
|
||||
.ltr-text-align-left();
|
||||
|
||||
tr th,
|
||||
tr td {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
& span.log_parameters {
|
||||
border-right: 1px solid solid var(--color-result-border);
|
||||
padding: 0 1rem 0 0;
|
||||
margin: 0 0 0 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bar-chart-value {
|
||||
width: 3em;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
.bar-chart-graph {
|
||||
width: calc(100% - 5rem);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.bar-chart-bar {
|
||||
border: 3px solid #5bc0de;
|
||||
margin: 1px 0;
|
||||
}
|
||||
|
||||
.bar-chart-serie1 {
|
||||
border: 3px solid #5bc0de;
|
||||
margin: 1px 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bar-chart-serie2 {
|
||||
border: 3px solid #deb15b;
|
||||
margin: 1px 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bar0 {
|
||||
width: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.generate-bar(100);
|
||||
|
||||
.generate-bar(@n, @i: 1) when (@i =< @n) {
|
||||
.bar@{i} {
|
||||
width: (@i * 100% / @n);
|
||||
}
|
||||
.generate-bar(@n, (@i + 1));
|
||||
}
|
||||
118
searx/static/themes/simple/src/less/style-center.less
Normal file
118
searx/static/themes/simple/src/less/style-center.less
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
--center-page-width overrides the less variable @results-width when the results are centered
|
||||
see the CSS rules for #results in style.less ( grid-template-columns and gap).
|
||||
|
||||
In this file, the --center-page-width values comes from the Oscar theme (Bootstrap 3).
|
||||
|
||||
All rules starts with ".center-aligment-yes #main_results" to be enabled only
|
||||
on the /search URL and when the "center alignment" preference is enabled.
|
||||
*/
|
||||
|
||||
@media screen and (min-width: @phone) {
|
||||
.center-aligment-yes #main_results {
|
||||
--center-page-width: 48rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 62rem) {
|
||||
.center-aligment-yes #main_results {
|
||||
--center-page-width: 60rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: @tablet) {
|
||||
.center-aligment-yes #main_results {
|
||||
--center-page-width: 73rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: @phone) and (max-width: @tablet) {
|
||||
// any change must be reset in @media screen and (min-width: @tablet) { ... }
|
||||
.center-aligment-yes #main_results {
|
||||
#results {
|
||||
grid-template-columns: 60% calc(40% - @results-gap);
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#urls {
|
||||
.ltr-margin-left(3rem);
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
.ltr-margin-right(1rem);
|
||||
}
|
||||
|
||||
#backToTop {
|
||||
.ltr-left(calc(60% + 1rem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: @tablet) {
|
||||
.center-aligment-yes #main_results {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
#search {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#search_header {
|
||||
grid-template-columns: calc(50% - 4.5rem - var(--center-page-width) / 2) 3rem var(--center-page-width);
|
||||
grid-template-areas: "na logo search" "na spacer categories";
|
||||
column-gap: 1.2rem; // from search.less
|
||||
width: 100%;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.search_filters {
|
||||
.ltr-margin-left(0.5rem);
|
||||
width: var(--center-page-width);
|
||||
}
|
||||
|
||||
#results {
|
||||
// from style.less (when screen width = @tablet, reset layout from tablet)
|
||||
.ltr-margin-right(2rem);
|
||||
.ltr-margin-left(@results-offset);
|
||||
//
|
||||
|
||||
&.only_template_images,
|
||||
&.image-detail-open {
|
||||
// * grid-template-columns and .ltr-margin-left are set in style.less
|
||||
// * With .image-detail-open.only_template_images, the width is set in detail.less
|
||||
// * #results is going to be centered because of the #main_results rules,
|
||||
// align-self aligns the results on the left or right according to the language.
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
&:not(.only_template_images):not(.image-detail-open) {
|
||||
// the gap is set in style.less
|
||||
.ltr-margin-left(1.5rem);
|
||||
grid-template-columns: calc(var(--center-page-width) - @results-gap - @results-sidebar-width) @results-sidebar-width;
|
||||
|
||||
#backToTop {
|
||||
.ltr-left(calc(50% - @results-sidebar-width - @results-gap + 1rem + var(--center-page-width) / 2));
|
||||
}
|
||||
}
|
||||
|
||||
.result .content {
|
||||
max-width: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// from style.less (when screen width = @tablet, reset layout from tablet)
|
||||
#urls {
|
||||
.ltr-margin-left(0);
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
.ltr-margin-right(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -46,10 +46,26 @@
|
|||
border-radius: @radius 0 0 @radius;
|
||||
}
|
||||
|
||||
.ltr-rounded-top-left-corners(@radius) {
|
||||
border-radius: @radius 0 0 0;
|
||||
}
|
||||
|
||||
.ltr-rounded-bottom-left-corners(@radius) {
|
||||
border-radius: 0 0 0 @radius;
|
||||
}
|
||||
|
||||
.ltr-rounded-right-corners(@radius) {
|
||||
border-radius: 0 @radius @radius 0;
|
||||
}
|
||||
|
||||
.ltr-rounded-top-right-corners(@radius) {
|
||||
border-radius: 0 @radius 0 0;
|
||||
}
|
||||
|
||||
.ltr-rounded-bottom-right-corners(@radius) {
|
||||
border-radius: 0 0 @radius 0;
|
||||
}
|
||||
|
||||
.ltr-text-align-left() {
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,10 +46,26 @@
|
|||
border-radius: 0 @radius @radius 0;
|
||||
}
|
||||
|
||||
.ltr-rounded-top-left-corners(@radius) {
|
||||
border-radius: 0 @radius 0 0;
|
||||
}
|
||||
|
||||
.ltr-rounded-bottom-left-corners(@radius) {
|
||||
border-radius: 0 0 @radius 0;
|
||||
}
|
||||
|
||||
.ltr-rounded-right-corners(@radius) {
|
||||
border-radius: @radius 0 0 @radius;
|
||||
}
|
||||
|
||||
.ltr-rounded-top-right-corners(@radius) {
|
||||
border-radius: @radius 0 0 0;
|
||||
}
|
||||
|
||||
.ltr-rounded-bottom-right-corners(@radius) {
|
||||
border-radius: 0 0 0 @radius;
|
||||
}
|
||||
|
||||
.ltr-text-align-left() {
|
||||
text-align: right;
|
||||
}
|
||||
|
|
@ -124,7 +140,7 @@
|
|||
background-position-x: 100%;
|
||||
}
|
||||
|
||||
// patch of searx/static/themes/__common__/less/stats.less
|
||||
// patch of stats.less
|
||||
.bar-chart-serie1,
|
||||
.bar-chart-serie2 {
|
||||
float: right;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@
|
|||
|
||||
// stylelint-disable no-descending-specificity
|
||||
|
||||
@import "../../__common__/less/new_issue.less";
|
||||
@import "../../__common__/less/stats.less";
|
||||
@import "../../__common__/less/result_templates.less";
|
||||
@import (inline) "../../node_modules/normalize.css/normalize.css";
|
||||
@import "definitions.less";
|
||||
@import "mixins.less";
|
||||
|
|
@ -19,6 +16,9 @@
|
|||
@import "animations.less";
|
||||
@import "embedded.less";
|
||||
@import "info.less";
|
||||
@import "new_issue.less";
|
||||
@import "stats.less";
|
||||
@import "result_templates.less";
|
||||
|
||||
// for index.html template
|
||||
@import "index.less";
|
||||
|
|
@ -29,6 +29,9 @@
|
|||
// Search-Field
|
||||
@import "search.less";
|
||||
|
||||
// to center the results
|
||||
@import "style-center.less";
|
||||
|
||||
// ion-icon
|
||||
.ion-icon {
|
||||
display: inline-block;
|
||||
|
|
@ -262,11 +265,18 @@ article[data-vim-selected].category-social {
|
|||
|
||||
.published_date,
|
||||
.result_length,
|
||||
.result_author {
|
||||
.result_author,
|
||||
.result_shipping,
|
||||
.result_source_country {
|
||||
font-size: 0.8em;
|
||||
color: var(--color-result-publishdate-font);
|
||||
}
|
||||
|
||||
.result_price {
|
||||
font-size: 1.2em;
|
||||
color: var(--color-result-description-highlight-font);
|
||||
}
|
||||
|
||||
img {
|
||||
&.thumbnail {
|
||||
.ltr-float-left();
|
||||
|
|
@ -292,6 +302,49 @@ article[data-vim-selected].category-social {
|
|||
}
|
||||
}
|
||||
|
||||
.result-paper {
|
||||
.attributes {
|
||||
display: table;
|
||||
border-spacing: 0.125rem;
|
||||
|
||||
div {
|
||||
display: table-row;
|
||||
|
||||
span {
|
||||
font-size: 0.9rem;
|
||||
margin-top: 0.25rem;
|
||||
display: table-cell;
|
||||
|
||||
time {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
span:first-child {
|
||||
color: var(--color-base-font);
|
||||
min-width: 10rem;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
color: var(--color-result-publishdate-font);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.comments {
|
||||
font-size: 0.9rem;
|
||||
margin: 0.25rem 0 0 0;
|
||||
padding: 0;
|
||||
word-wrap: break-word;
|
||||
line-height: 1.24;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
.template_group_images {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
|
@ -309,7 +362,7 @@ article[data-vim-selected].category-social {
|
|||
.category-files,
|
||||
.category-social {
|
||||
border: 1px solid var(--color-result-border);
|
||||
margin: 1rem 0;
|
||||
margin: 0 @results-tablet-offset 1rem @results-tablet-offset !important;
|
||||
.rounded-corners;
|
||||
}
|
||||
|
||||
|
|
@ -350,6 +403,9 @@ article[data-vim-selected].category-social {
|
|||
|
||||
.engines {
|
||||
.ltr-float-right();
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
color: var(--color-result-engines-font);
|
||||
|
||||
span {
|
||||
|
|
@ -453,7 +509,7 @@ article[data-vim-selected].category-social {
|
|||
margin-bottom: 0;
|
||||
.ltr-margin-left(@results-offset);
|
||||
display: grid;
|
||||
grid-template-columns: @results-width 25rem;
|
||||
grid-template-columns: @results-width @results-sidebar-width;
|
||||
grid-template-rows: min-content min-content 1fr min-content;
|
||||
gap: 0 @results-gap;
|
||||
grid-template-areas:
|
||||
|
|
@ -476,7 +532,7 @@ article[data-vim-selected].category-social {
|
|||
#suggestions {
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
flex-flow: column;
|
||||
justify-content: flex-end;
|
||||
|
||||
form {
|
||||
|
|
@ -496,6 +552,10 @@ article[data-vim-selected].category-social {
|
|||
background: transparent;
|
||||
color: var(--color-result-search-url-font);
|
||||
cursor: pointer;
|
||||
width: calc(100%);
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
input[type="submit"],
|
||||
|
|
@ -538,7 +598,6 @@ article[data-vim-selected].category-social {
|
|||
|
||||
#answers {
|
||||
grid-area: answers;
|
||||
border: 1px solid var(--color-answer-border);
|
||||
background: var(--color-answer-background);
|
||||
padding: @result-padding;
|
||||
margin: 1rem 0;
|
||||
|
|
@ -585,24 +644,29 @@ article[data-vim-selected].category-social {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
display: inline;
|
||||
margin-top: 0.5em;
|
||||
.ltr-margin-right(0.25em);
|
||||
margin-bottom: 0.5em;
|
||||
.ltr-margin-left(0);
|
||||
padding: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dd {
|
||||
display: inline;
|
||||
margin: 0.5em 0;
|
||||
padding: 0;
|
||||
.attributes {
|
||||
dl {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
display: inline;
|
||||
margin-top: 0.5em;
|
||||
.ltr-margin-right(0.25em);
|
||||
margin-bottom: 0.5em;
|
||||
.ltr-margin-left(0);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
dd {
|
||||
display: inline;
|
||||
margin: 0.5em 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
|
|
@ -630,16 +694,30 @@ article[data-vim-selected].category-social {
|
|||
}
|
||||
}
|
||||
|
||||
#linkto_preferences {
|
||||
#links_on_top {
|
||||
position: absolute;
|
||||
.ltr-right(1.8rem);
|
||||
.ltr-text-align-right();
|
||||
top: 2.2rem;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
display: block;
|
||||
font-size: 1.2em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 1em;
|
||||
color: var(--color-search-font);
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 1em;
|
||||
|
||||
svg {
|
||||
font-size: 1.2em;
|
||||
.ltr-margin-right(0.125em);
|
||||
}
|
||||
}
|
||||
|
||||
a,
|
||||
a:link *,
|
||||
a:hover *,
|
||||
a:visited *,
|
||||
|
|
@ -656,6 +734,26 @@ article[data-vim-selected].category-social {
|
|||
}
|
||||
}
|
||||
|
||||
.numbered_pagination {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page_number {
|
||||
background: transparent !important;
|
||||
color: var(--color-result-link-font) !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.page_number_current {
|
||||
background: transparent;
|
||||
color: var(--color-result-link-visited-font);
|
||||
border: none;
|
||||
}
|
||||
|
||||
#apis {
|
||||
margin-top: 8px;
|
||||
clear: both;
|
||||
|
|
@ -692,7 +790,17 @@ article[data-vim-selected].category-social {
|
|||
opacity: 1;
|
||||
}
|
||||
|
||||
@media screen and (max-width: @tablet) {
|
||||
/*
|
||||
tablet layout
|
||||
*/
|
||||
|
||||
.results-tablet() {
|
||||
#links_on_top {
|
||||
span {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.page_with_header {
|
||||
margin: 2rem 0.5rem;
|
||||
width: auto;
|
||||
|
|
@ -717,7 +825,7 @@ article[data-vim-selected].category-social {
|
|||
}
|
||||
|
||||
#sidebar {
|
||||
margin-bottom: @results-margin;
|
||||
margin: 0 @results-tablet-offset @results-margin @results-tablet-offset;
|
||||
padding: 0;
|
||||
float: none;
|
||||
border: none;
|
||||
|
|
@ -753,6 +861,9 @@ article[data-vim-selected].category-social {
|
|||
|
||||
.engines {
|
||||
.ltr-float-right();
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
padding: 0 0 3px 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -793,6 +904,36 @@ article[data-vim-selected].category-social {
|
|||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: calc(@tablet - 0.5px)) {
|
||||
#links_on_top {
|
||||
span {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 52rem) {
|
||||
body.results_endpoint {
|
||||
#links_on_top {
|
||||
.link_on_top_about,
|
||||
.link_on_top_donate {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: @phone) and (max-width: @tablet) {
|
||||
// when .center-aligment-yes, see style-center.less
|
||||
// the media query includes "min-width: @phone"
|
||||
// because the phone layout includes the tablet layout unconditionally.
|
||||
.center-aligment-no {
|
||||
.results-tablet();
|
||||
}
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
|
||||
#main_results div#results.only_template_images {
|
||||
margin: 1rem @results-tablet-offset 0 @results-tablet-offset;
|
||||
display: grid;
|
||||
|
|
@ -831,18 +972,29 @@ article[data-vim-selected].category-social {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
phone layout
|
||||
*/
|
||||
|
||||
@media screen and (max-width: @phone) {
|
||||
#main_results div#results {
|
||||
grid-template-columns: 100%;
|
||||
margin: 2rem @results-tablet-offset 0 @results-tablet-offset;
|
||||
// based on the tablet layout
|
||||
.results-tablet();
|
||||
|
||||
html {
|
||||
background-color: var(--color-base-background-mobile);
|
||||
}
|
||||
|
||||
#linkto_preferences {
|
||||
#main_results div#results {
|
||||
grid-template-columns: 100%;
|
||||
margin: 1rem 0 0 0;
|
||||
}
|
||||
|
||||
#links_on_top {
|
||||
top: 0.8rem;
|
||||
.ltr-right(0.7rem);
|
||||
}
|
||||
|
||||
#main_index #linkto_preferences {
|
||||
#main_index #links_on_top {
|
||||
top: 0.5rem;
|
||||
.ltr-right(0.5rem);
|
||||
}
|
||||
|
|
@ -862,17 +1014,52 @@ article[data-vim-selected].category-social {
|
|||
}
|
||||
|
||||
.result {
|
||||
border: 1px solid var(--color-result-border);
|
||||
background: var(--color-result-background);
|
||||
margin: 1rem 0;
|
||||
.rounded-corners;
|
||||
}
|
||||
|
||||
.result-images {
|
||||
margin: 0;
|
||||
height: @results-image-row-height-phone;
|
||||
background: var(--color-base-background-mobile);
|
||||
}
|
||||
|
||||
.infobox {
|
||||
border: none !important;
|
||||
background-color: var(--color-sidebar-background);
|
||||
}
|
||||
|
||||
.numbered_pagination {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.result-paper {
|
||||
.attributes {
|
||||
display: block;
|
||||
|
||||
div {
|
||||
display: block;
|
||||
|
||||
span {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
span:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
.ltr-margin-left(0.5rem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
small-phone layout
|
||||
*/
|
||||
|
||||
@media screen and (max-width: @small-phone) {
|
||||
.result-videos {
|
||||
img.thumbnail {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512">
|
||||
<title>Information Circle</title>
|
||||
<path d="M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184 184-82.39 184-184S349.61 64 248 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 220h32v116"/>
|
||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M208 340h88"/>
|
||||
<path fill="currentColor" stroke="currentColor" stroke-linecap="round" d="M248 130a26 26 0 1026 26 26 26 0 00-26-26z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 679 B |
Loading…
Add table
Add a link
Reference in a new issue