Merge pull request #361 from dalf/searxng-theme-oscar

SearXNG theme oscar
pull/371/head
Alexandre Flament 3 years ago committed by GitHub
commit 458575c221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1532,7 +1532,7 @@ p.btn.btn-default {
.label-danger {
background: #ad1f12 none !important;
}
.searx-navbar {
.searxng-navbar {
background: #333334;
height: 2.3rem;
font-size: 1.3rem;
@ -1541,13 +1541,13 @@ p.btn.btn-default {
font-weight: bold;
margin-bottom: 0.8rem;
}
.searx-navbar a,
.searx-navbar a:hover {
.searxng-navbar a,
.searxng-navbar a:hover {
margin-right: 2rem;
color: white;
text-decoration: none;
}
.searx-navbar .instance a {
.searxng-navbar .instance a {
color: #01D7D4;
margin-left: 2rem;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -732,7 +732,7 @@
color: #D19A66;
}
/* Literal.Number.Integer.Long */
.searx-navbar {
.searxng-navbar {
background: #29314D;
height: 2.3rem;
font-size: 1.3rem;
@ -741,13 +741,13 @@
font-weight: bold;
margin-bottom: 0.8rem;
}
.searx-navbar a,
.searx-navbar a:hover {
.searxng-navbar a,
.searxng-navbar a:hover {
margin-right: 2rem;
color: white;
text-decoration: none;
}
.searx-navbar .instance a {
.searxng-navbar .instance a {
color: #01D7D4;
margin-left: 2rem;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1037,7 +1037,7 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
.cursor-pointer {
cursor: pointer !important;
}
.searx-navbar {
.searxng-navbar {
background: #eee;
color: #aaa;
height: 2.3rem;
@ -1047,12 +1047,12 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
font-weight: bold;
margin-bottom: 1.3rem;
}
.searx-navbar a,
.searx-navbar a:hover {
.searxng-navbar a,
.searxng-navbar a:hover {
margin-right: 2rem;
text-decoration: none;
}
.searx-navbar .instance a {
.searxng-navbar .instance a {
color: #444;
margin-left: 2rem;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -61,29 +61,33 @@ module.exports = function(grunt) {
},
dist: {
src: ['src/js/*.js', '../__common__/js/image_layout.js'],
dest: 'js/searx.js'
dest: 'js/searxng.js'
}
},
uglify: {
options: {
output: {
comments: 'some'
},
sourceMap: true,
},
dist: {
files: {
'js/searx.min.js': ['<%= concat.dist.dest %>']
'js/searxng.min.js': ['<%= concat.dist.dest %>']
}
}
},
jshint: {
files: ['gruntfile.js', 'js/searx_src/*.js', '../__common__/js/image_layout.js'],
files: ['gruntfile.js', 'src/js/*.js', '../__common__/js/image_layout.js'],
options: {
reporterOutput: "",
esversion: 6,
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
document: true,
}
}
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,20 +1,11 @@
/**
* searx is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* searx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with searx. If not, see < http://www.gnu.org/licenses/ >.
*
* (C) 2019 by Alexandre Flament
* @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
*/
window.searx = (function(d) {
window.searxng = (function(d) {
'use strict';
//
@ -32,26 +23,19 @@ window.searx = (function(d) {
translations: JSON.parse(script.getAttribute('data-translations'))
};
})(document);
window.searx = {};
;/**
* searx is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* searx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with searx. If not, see < http://www.gnu.org/licenses/ >.
*
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){
var original_search_value = '';
if(searx.autocompleter) {
if(searxng.autocompleter) {
var searchResults = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
@ -93,20 +77,11 @@ $(document).ready(function(){
}
});
;/**
* searx is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* searx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with searx. If not, see < http://www.gnu.org/licenses/ >.
*
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){
@ -206,10 +181,17 @@ $(document).ready(function(){
/**
* Layout images according to their sizes
*/
searx.image_thumbnail_layout = new searx.ImageLayout('#main_results', '#main_results .result-images', 'img.img-thumbnail', 15, 200);
searx.image_thumbnail_layout.watch();
searxng.image_thumbnail_layout = new searx.ImageLayout('#main_results', '#main_results .result-images', 'img.img-thumbnail', 15, 200);
searxng.image_thumbnail_layout.watch();
});
;window.addEventListener('load', function() {
;/**
* @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
*/
window.addEventListener('load', function() {
// Hide infobox toggle if shrunk size already fits all content.
$('.infobox').each(function() {
var infobox_body = $(this).find('.infobox_body');
@ -221,24 +203,15 @@ $(document).ready(function(){
});
});
;/**
* searx is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* searx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with searx. If not, see < http://www.gnu.org/licenses/ >.
*
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){
$(".searx_init_map").on( "click", function( event ) {
$(".searxng_init_map").on( "click", function( event ) {
var leaflet_target = $(this).data('leaflet-target');
var map_lon = $(this).data('map-lon');
var map_lat = $(this).data('map-lat');
@ -299,7 +272,14 @@ $(document).ready(function(){
$( this ).off( event );
});
});
;$(document).ready(function(){
;/**
* @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
*/
$(document).ready(function(){
let engine_descriptions = null;
function load_engine_descriptions() {
if (engine_descriptions == null) {
@ -308,7 +288,7 @@ $(document).ready(function(){
for (const [engine_name, description] of Object.entries(data)) {
let elements = $('[data-engine-name="' + engine_name + '"] .description');
for(const element of elements) {
let source = ' (<i>' + searx.translations['Source'] + ':&nbsp;' + description[1] + '</i>)';
let source = ' (<i>' + searxng.translations.Source + ':&nbsp;' + description[1] + '</i>)';
element.innerHTML = description[0] + source;
}
}
@ -322,7 +302,14 @@ $(document).ready(function(){
});
}
});
;$(document).ready(function(){
;/**
* @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
*/
$(document).ready(function(){
$("#allow-all-engines").click(function() {
$(".onoffswitch-checkbox").each(function() { this.checked = false;});
});

@ -0,0 +1,65 @@
/**
* @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
*/
window.searxng=function(t){"use strict";t.getElementsByTagName("html")[0].className="js";var e,e=t.currentScript||(e=t.getElementsByTagName("script"))[e.length-1];return{autocompleter:"true"===e.getAttribute("data-autocompleter"),method:e.getAttribute("data-method"),translations:JSON.parse(e.getAttribute("data-translations"))}}(document),window.searx={},
/**
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){var t,a="";searxng.autocompleter&&((t=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{url:"./autocompleter?q=%QUERY",wildcard:"%QUERY"}})).initialize(),$("#q").on("keydown",function(t){13==t.which&&(a=$("#q").val())}),$("#q").typeahead({name:"search-results",highlight:!1,hint:!0,displayKey:function(t){return t},classNames:{input:"tt-input",hint:"tt-hint",menu:"tt-dropdown-menu",dataset:"tt-dataset-search-results"}},{name:"autocomplete",source:t}),$("#q").bind("typeahead:select",function(t,e){a&&$("#q").val(a),$("#search_form").submit()}))}),
/**
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){$("#q.autofocus").focus(),$("#clear_search").click(function(){document.getElementById("q").value=""}),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var t=$(this).data("btn-text-collapsed"),e=$(this).data("btn-text-not-collapsed");""!==t&&""!==e&&(new_html=$(this).hasClass("collapsed")?$(this).html().replace(t,e):$(this).html().replace(e,t),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var t="btn-"+$(this).data("btn-class"),e=$(this).data("btn-label-default"),a=$(this).data("btn-label-toggled");""!==a&&(new_html=$(this).hasClass("btn-default")?$(this).html().replace(e,a):$(this).html().replace(a,e),$(this).html(new_html)),$(this).toggleClass(t),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var t=$(this).data("target"),e=$(t+" > iframe"),t=e.attr("src");void 0!==t&&!1!==t||e.attr("src",e.data("src"))}),$(".btn-sm").dblclick(function(){var t="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(t),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(t),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))}),$(".nav-tabs").click(function(t){$(t.target).parents("ul").children().attr("aria-selected","false"),$(t.target).parent().attr("aria-selected","true")}),searxng.image_thumbnail_layout=new searx.ImageLayout("#main_results","#main_results .result-images","img.img-thumbnail",15,200),searxng.image_thumbnail_layout.watch()}),
/**
* @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
*/
window.addEventListener("load",function(){$(".infobox").each(function(){var t=$(this).find(".infobox_body");t.prop("scrollHeight")+t.find("img.infobox_part").height()<=t.css("max-height").replace("px","")&&$(this).find(".infobox_toggle").hide()})}),
/**
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){$(".searxng_init_map").on("click",function(t){var e=$(this).data("leaflet-target"),a=$(this).data("map-lon"),n=$(this).data("map-lat"),i=$(this).data("map-zoom"),s=$(this).data("map-boundingbox"),o=$(this).data("map-geojson");s&&(southWest=L.latLng(s[0],s[2]),northEast=L.latLng(s[1],s[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/css/images/";var r=L.map(e),e=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});new L.TileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});setTimeout(function(){map_bounds?r.fitBounds(map_bounds,{maxZoom:17}):a&&n&&(i?r.setView(new L.LatLng(n,a),i):r.setView(new L.LatLng(n,a),8))},0),r.addLayer(e),L.control.layers({"OSM Mapnik":e}).addTo(r),o&&L.geoJson(o).addTo(r),$(this).off(t)})}),
/**
* @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
*/
$(document).ready(function(){let s=null;document.querySelector('body[class="preferences_endpoint"]')&&$("[data-engine-name]").hover(function(){null==s&&$.ajax("engine_descriptions.json",dataType="json").done(function(t){s=t;for(var[e,a]of Object.entries(t))for(const i of $('[data-engine-name="'+e+'"] .description')){var n=" (<i>"+searxng.translations.Source+":&nbsp;"+a[1]+"</i>)";i.innerHTML=a[0]+n}})})}),
/**
* @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
*/
$(document).ready(function(){$("#allow-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!1})}),$("#disable-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!0})})}),
/**
*
* Google Image Layout v0.0.1
* Description, by Anh Trinh.
* Heavily modified for searx
* https://ptgamr.github.io/2014-09-12-google-image-layout/
* https://ptgamr.github.io/google-image-layout/src/google-image-layout.js
*
* @license Free to use under the MIT License.
*
*/
function(o,c){function t(t,e,a,n,i){this.container_selector=t,this.results_selector=e,this.img_selector=a,this.margin=n,this.maxHeight=i,this.isAlignDone=!0}t.prototype._getHeigth=function(t,e){for(var a,n=0,i=0;i<t.length;i++)0<(a=t[i]).naturalWidth&&0<a.naturalHeight?n+=a.naturalWidth/a.naturalHeight:n+=1;return(e-t.length*this.margin)/n},t.prototype._setSize=function(t,e){for(var a,n,i=t.length,s=0;s<i;s++)a=0<(n=t[s]).naturalWidth&&0<n.naturalHeight?e*n.naturalWidth/n.naturalHeight:e,n.style.width=a+"px",n.style.height=e+"px",n.style.marginLeft="3px",n.style.marginTop="3px",n.style.marginRight=this.margin-7+"px",n.style.marginBottom=this.margin-7+"px",(n=n.parentNode.parentNode).classList.contains("js")||n.classList.add("js")},t.prototype._alignImgs=function(t){for(var e,a,n,i,s=c.querySelector(this.container_selector),o=window.getComputedStyle(s),r=parseInt(o.getPropertyValue("padding-left"),10),o=parseInt(o.getPropertyValue("padding-right"),10),l=s.clientWidth-r-o;0<t.length;){for(e=!0,n=1;n<=t.length&&e;n++)a=t.slice(0,n),(i=this._getHeigth(a,l))<this.maxHeight&&(this._setSize(a,i),t=t.slice(n),e=!1);if(e){this._setSize(a,Math.min(this.maxHeight,i));break}}},t.prototype.align=function(){for(var t=c.querySelectorAll(this.results_selector),e=t.length,a=null,n=null,i=[],s=0;s<e;s++)(n=t[s]).previousElementSibling!==a&&0<i.length&&(this._alignImgs(i),i=[]),i.push(n.querySelector(this.img_selector)),a=n;0<i.length&&this._alignImgs(i)},t.prototype.watch=function(){var t,e,a=this,n=c.querySelectorAll(this.results_selector),i=n.length;function s(){a.isAlignDone&&(a.isAlignDone=!1,setTimeout(function(){a.align(),a.isAlignDone=!0},100))}for(o.addEventListener("pageshow",s),o.addEventListener("load",s),o.addEventListener("resize",s),t=0;t<i;t++)null!=(e=n[t].querySelector(this.img_selector))&&(e.addEventListener("load",s),e.addEventListener("error",s))},o.searx.ImageLayout=t}(window,document);
//# sourceMappingURL=searxng.min.js.map

File diff suppressed because one or more lines are too long

@ -1,20 +1,11 @@
/**
* searx is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* searx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with searx. If not, see < http://www.gnu.org/licenses/ >.
*
* (C) 2019 by Alexandre Flament
* @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
*/
window.searx = (function(d) {
window.searxng = (function(d) {
'use strict';
//
@ -32,3 +23,5 @@ window.searx = (function(d) {
translations: JSON.parse(script.getAttribute('data-translations'))
};
})(document);
window.searx = {};

@ -1,23 +1,14 @@
/**
* searx is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* searx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with searx. If not, see < http://www.gnu.org/licenses/ >.
*
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){
var original_search_value = '';
if(searx.autocompleter) {
if(searxng.autocompleter) {
var searchResults = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,

@ -1,18 +1,9 @@
/**
* searx is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* searx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with searx. If not, see < http://www.gnu.org/licenses/ >.
*
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){
@ -112,6 +103,6 @@ $(document).ready(function(){
/**
* Layout images according to their sizes
*/
searx.image_thumbnail_layout = new searx.ImageLayout('#main_results', '#main_results .result-images', 'img.img-thumbnail', 15, 200);
searx.image_thumbnail_layout.watch();
searxng.image_thumbnail_layout = new searx.ImageLayout('#main_results', '#main_results .result-images', 'img.img-thumbnail', 15, 200);
searxng.image_thumbnail_layout.watch();
});

@ -1,3 +1,10 @@
/**
* @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
*/
window.addEventListener('load', function() {
// Hide infobox toggle if shrunk size already fits all content.
$('.infobox').each(function() {

@ -1,22 +1,13 @@
/**
* searx is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* searx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with searx. If not, see < http://www.gnu.org/licenses/ >.
*
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$(document).ready(function(){
$(".searx_init_map").on( "click", function( event ) {
$(".searxng_init_map").on( "click", function( event ) {
var leaflet_target = $(this).data('leaflet-target');
var map_lon = $(this).data('map-lon');
var map_lat = $(this).data('map-lat');

@ -1,3 +1,10 @@
/**
* @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
*/
$(document).ready(function(){
let engine_descriptions = null;
function load_engine_descriptions() {
@ -7,7 +14,7 @@ $(document).ready(function(){
for (const [engine_name, description] of Object.entries(data)) {
let elements = $('[data-engine-name="' + engine_name + '"] .description');
for(const element of elements) {
let source = ' (<i>' + searx.translations['Source'] + ':&nbsp;' + description[1] + '</i>)';
let source = ' (<i>' + searxng.translations.Source + ':&nbsp;' + description[1] + '</i>)';
element.innerHTML = description[0] + source;
}
}

@ -1,3 +1,10 @@
/**
* @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
*/
$(document).ready(function(){
$("#allow-all-engines").click(function() {
$(".onoffswitch-checkbox").each(function() { this.checked = false;});

@ -170,7 +170,7 @@ p.btn.btn-default{
background:#ad1f12 none !important;
}
.searx-navbar {
.searxng-navbar {
background: #333334;
height: 2.3rem;
font-size: 1.3rem;

@ -1,4 +1,4 @@
.searx-navbar {
.searxng-navbar {
background: @black;
height: 2.3rem;
font-size: 1.3rem;

@ -1,4 +1,4 @@
.searx-navbar {
.searxng-navbar {
background: #eee;
color: #aaa;
height: 2.3rem;

@ -3,9 +3,9 @@
<html lang="{{ preferences.get_value('locale') }}" xml:lang="{{ preferences.get_value('locale') }}"{% if rtl %} dir="rtl"{% endif %} class="nojs">
<head>
<meta charset="UTF-8" />
<meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" />
<meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
<meta name="generator" content="searx/{{ searx_version }}">
<meta name="description" content="SearXNG - a privacy-respecting, hackable metasearch engine" />
<meta name="keywords" content="SearXNG, search, search engine, metasearch, meta search" />
<meta name="generator" content="SearXNG/{{ searx_version }}">
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=2.0, user-scalable=1" />
{% block meta %}{% endblock %}
@ -97,7 +97,7 @@
{% if load_leaflet %}{{" "}}<script src="{{ url_for('static', filename='js/leaflet.js') }}"></script>{{ "\n" }}{% endif %}
{% if autocomplete %}{{" "}}<script src="{{ url_for('static', filename='js/typeahead.bundle.min.js') }}"></script>{{ "\n" }}{% endif %}
<script src="{{ url_for('static', filename='js/searx.min.js') }}"
<script src="{{ url_for('static', filename='js/searxng.min.js') }}"
data-method="{{ method or 'POST' }}"
data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"
data-translations="{{ translations }}"></script>

@ -4,10 +4,10 @@
<div class="row">{{- "" -}}
<div class="text-center col-sm-12 col-md-12">
{%- if cookies['oscar-style'] == 'pointhi' -%}
<h1 class="text-hide center-block"><img class="center-block img-responsive" src="{{ url_for('static', filename='img/searx_logo.png') }}" alt="searx logo"/>searx</h1>
<h1 class="text-hide center-block"><img class="center-block img-responsive" src="{{ url_for('static', filename='img/searx_logo.png') }}" alt="searx logo"/>SearXNG</h1>
{%- else -%}
<div class="text-hide center-block" id="main-logo">{{- "" -}}
<img class="center-block img-responsive" src="{{ url_for('static', filename='img/logo_searx_a.png') }}" alt="searx logo" />searx{{- "" -}}
<img class="center-block img-responsive" src="{{ url_for('static', filename='img/logo_searx_a.png') }}" alt="searx logo" />SearXNG{{- "" -}}
</div>
{%- endif -%}
</div>{{- "" -}}

@ -4,5 +4,5 @@
<span class="sr-only">{{ _('Close') }}</span>
</button>
<strong class="lead">{{ icon('info-sign') }} {{ _('Heads up!') }}</strong>
{{ _('It look like you are using searx first time.') }}
{{ _('It look like you are using SearXNG first time.') }}
</div>

@ -10,7 +10,7 @@
</a> ){{- '' -}}
</p>
{%- endfor -%}
<p><small>{{ _('Please, try again later or find another searx instance.') }} (<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>)</small></p>
<p><small>{{ _('Please, try again later or find another SearXNG instance.') }} (<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>)</small></p>
</div>
{% else %}
<div class="alert alert-info fade in" role="alert">

@ -1,4 +1,4 @@
<div class="searx-navbar">{{- "" -}}
<div class="searxng-navbar">{{- "" -}}
<span class="instance {% if rtl %}pull-right{% else %}pull-left{% endif%}">{{- "" -}}
<a href="{{ url_for('index') }}">{{ instance_name }}</a>{{- "" -}}
</span>{{- "" -}}

@ -208,7 +208,7 @@
{% if 'theme' not in locked_preferences %}
{% set theme_label = _('Themes') %}
{% set theme_info = _('Change searx layout') %}
{% set theme_info = _('Change SearXNG layout') %}
{{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="theme" id="theme">
{% for name in themes %}
@ -271,7 +271,7 @@
{% if 'image_proxy' not in locked_preferences %}
{% set image_proxy_label = _('Image proxy') %}
{% set image_proxy_info = _('Proxying image results through searx') %}
{% set image_proxy_info = _('Proxying image results through SearXNG') %}
{{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
<select class="form-control {{ custom_select_class(rtl) }}" name="image_proxy" id="image_proxy">
<option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
@ -397,7 +397,7 @@
</thead>
<tbody>
<td></td>
<th scope="colgroup" colspan="4">{{ _('This is the list of searx\'s instant answering modules.') }}</th>
<th scope="colgroup" colspan="4">{{ _('This is the list of SearXNG\'s instant answering modules.') }}</th>
{% for answerer in answerers %}
<tr>
<td></td>
@ -431,8 +431,8 @@
<h3>{{ _('Cookies') }}</h3>
</noscript>
<p class="text-muted">
{{ _('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 />
{{ _('This is the list of cookies and their values SearXNG is storing on your computer.') }}<br />
{{ _('With that list, you can assess SearXNG transparency.') }}<br />
</p>
{% if cookies %}
<table class="table table-striped">

@ -56,7 +56,7 @@
<p class="result-content">
{%- if (result.latitude and result.longitude) or result.boundingbox -%}
<span><a class="text-info btn-collapse collapsed searx_init_map cursor-pointer disabled_if_nojs" data-toggle="collapse" data-target="#result-map-{{ index }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %} data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}">{{ icon('globe') }} {{ _('show map') }}</a></span>
<span><a class="text-info btn-collapse collapsed searxng_init_map cursor-pointer disabled_if_nojs" data-toggle="collapse" data-target="#result-map-{{ index }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %} data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}">{{ icon('globe') }} {{ _('show map') }}</a></span>
{%- endif -%}
</p>

@ -84,7 +84,7 @@ class ViewsTestCase(SearxTestCase):
self.assertEqual(result.status_code, 200)
self.assertIn(b'<div class="text-hide center-block" id="main-logo">'
+ b'<img class="center-block img-responsive" src="/static/themes/oscar/img/logo_searx_a.png"'
+ b' alt="searx logo" />searx</div>', result.data)
+ b' alt="searx logo" />SearXNG</div>', result.data)
def test_index_html_post(self):
result = self.app.post('/', data={'q': 'test'})

Loading…
Cancel
Save