on master help sign in
Merge pull request #1763 from return42/dos2unix

themes: remove CR from newlines

commitb0177847f8e04d0465489b9c906b485c6c7d8018 authorAdam Tauber <asciimoo@gmail.com> dateWed 11 Dec 2019, 15:43 (7 years ago) parent50e1fcaa3b5f32
24 files changed+1538−1545
searx/static/themes/legacy/less/autocompleter.less+61−61 searx/static/themes/oscar/gruntfile.js+3−3 searx/static/themes/oscar/js/searx.js+326−326 searx/static/themes/oscar/js/searx_src/00_requirejs_config.js+23−23 searx/static/themes/oscar/js/searx_src/autocompleter.js+37−37 searx/static/themes/oscar/js/searx_src/element_modifiers.js+99−99 searx/static/themes/oscar/js/searx_src/leaflet_map.js+167−167 searx/static/themes/oscar/less/logicodev-dark/oscar.less+2−2 searx/static/themes/oscar/less/logicodev/code.less+1−3 searx/static/themes/oscar/less/logicodev/infobox.less+1−1 searx/static/themes/oscar/less/logicodev/navbar.less−1 searx/static/themes/oscar/less/pointhi/code.less+1−1 searx/static/themes/oscar/less/pointhi/infobox.less+1−1 searx/static/themes/simple/leaflet/leaflet.css+636−636 searx/templates/oscar/languages.html+8−12 searx/templates/oscar/preferences.html+33−33 searx/templates/oscar/result_templates/code.html+18−18 searx/templates/oscar/result_templates/images.html+1−1 searx/templates/oscar/result_templates/map.html+72−72 searx/templates/oscar/result_templates/videos.html+27−27 searx/templates/oscar/results.html+1−1 searx/templates/oscar/search.html+1−1 searx/templates/oscar/search_full.html+18−18 searx/templates/oscar/time-range.html+1−1
searx/static/themes/legacy/less/autocompleter.less+61−61
@@ -1,61 +1,61 @@
1−/*
2− * searx, A privacy-respecting, hackable metasearch engine
3− */
4−
5−ul {
6− &.autocompleter-choices {
7− position: absolute;
8− margin: 0;
9− padding: 0;
10− list-style: none;
11− border: 1px solid @color-autocompleter-choices-border;
12− border-left-color: @color-autocompleter-choices-border-left-right;
13− border-right-color: @color-autocompleter-choices-border-left-right;
14− border-bottom-color: @color-autocompleter-choices-border-bottom;
15− text-align: left;
16− font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
17− z-index: 50;
18− background-color: @color-autocompleter-choices-background;
19− color: @color-autocompleter-choices-font;
20−
21− li {
22− position: relative;
23− margin: -2px 0 0 0;
24− padding: 0.2em 1.5em 0.2em 1em;
25− display: block;
26− float: none !important;
27− cursor: pointer;
28− font-weight: normal;
29− white-space: nowrap;
30− font-size: 1em;
31− line-height: 1.5em;
32−
33− &.autocompleter-selected {
34− background-color: @color-autocompleter-selected-background;
35− color: @color-autocompleter-selected-font;
36−
37− span.autocompleter-queried {
38− color: @color-autocompleter-selected-queried-font;
39− }
40− }
41− }
42−
43− span.autocompleter-queried {
44− display: inline;
45− float: none;
46− font-weight: bold;
47− margin: 0;
48− padding: 0;
49− }
50− }
51−}
52−
53−/*.autocompleter-loading {
54− //background-image: url(images/spinner.gif);
55− background-repeat: no-repeat;
56− background-position: right 50%;
57−}*/
58−
59−/*textarea.autocompleter-loading {
60− background-position: right bottom;
61−}*/
1+/*
2+ * searx, A privacy-respecting, hackable metasearch engine
3+ */
4+
5+ul {
6+ &.autocompleter-choices {
7+ position: absolute;
8+ margin: 0;
9+ padding: 0;
10+ list-style: none;
11+ border: 1px solid @color-autocompleter-choices-border;
12+ border-left-color: @color-autocompleter-choices-border-left-right;
13+ border-right-color: @color-autocompleter-choices-border-left-right;
14+ border-bottom-color: @color-autocompleter-choices-border-bottom;
15+ text-align: left;
16+ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
17+ z-index: 50;
18+ background-color: @color-autocompleter-choices-background;
19+ color: @color-autocompleter-choices-font;
20+
21+ li {
22+ position: relative;
23+ margin: -2px 0 0 0;
24+ padding: 0.2em 1.5em 0.2em 1em;
25+ display: block;
26+ float: none !important;
27+ cursor: pointer;
28+ font-weight: normal;
29+ white-space: nowrap;
30+ font-size: 1em;
31+ line-height: 1.5em;
32+
33+ &.autocompleter-selected {
34+ background-color: @color-autocompleter-selected-background;
35+ color: @color-autocompleter-selected-font;
36+
37+ span.autocompleter-queried {
38+ color: @color-autocompleter-selected-queried-font;
39+ }
40+ }
41+ }
42+
43+ span.autocompleter-queried {
44+ display: inline;
45+ float: none;
46+ font-weight: bold;
47+ margin: 0;
48+ padding: 0;
49+ }
50+ }
51+}
52+
53+/*.autocompleter-loading {
54+ //background-image: url(images/spinner.gif);
55+ background-repeat: no-repeat;
56+ background-position: right 50%;
57+}*/
58+
59+/*textarea.autocompleter-loading {
60+ background-position: right bottom;
61+}*/
searx/static/themes/oscar/gruntfile.js+3−3
@@ -24,7 +24,7 @@ module.exports = function(grunt) {
2424 jshint: {
2525 files: ['gruntfile.js', 'js/searx_src/*.js'],
2626 options: {
27− reporterOutput: "",
27+ reporterOutput: "",
2828 // options here to override JSHint defaults
2929 globals: {
3030 jQuery: true,
@@ -55,7 +55,7 @@ module.exports = function(grunt) {
5555 "css/logicodev-dark.min.css": "less/logicodev-dark/oscar.less"}
5656 },
5757 /*
58− // built with ./manage.sh styles
58+ // built with ./manage.sh styles
5959 bootstrap: {
6060 options: {
6161 paths: ["less/bootstrap"],
@@ -90,7 +90,7 @@ module.exports = function(grunt) {
9090 grunt.registerTask('test', ['jshint']);
9191
9292 grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less']);
93−
93+
9494 grunt.registerTask('styles', ['less']);
9595
9696};
searx/static/themes/oscar/js/searx.js+326−326
@@ -1,26 +1,26 @@
1−/**
2− * searx is free software: you can redistribute it and/or modify
3− * it under the terms of the GNU Affero General Public License as published by
4− * the Free Software Foundation, either version 3 of the License, or
5− * (at your option) any later version.
6− *
7− * searx is distributed in the hope that it will be useful,
8− * but WITHOUT ANY WARRANTY; without even the implied warranty of
9− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10− * GNU Affero General Public License for more details.
11− *
12− * You should have received a copy of the GNU Affero General Public License
13− * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14− *
15− * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16− */
17−
18−requirejs.config({
19− baseUrl: './static/themes/oscar/js',
20− paths: {
21− app: '../app'
22− }
23−});
1+/**
2+ * searx is free software: you can redistribute it and/or modify
3+ * it under the terms of the GNU Affero General Public License as published by
4+ * the Free Software Foundation, either version 3 of the License, or
5+ * (at your option) any later version.
6+ *
7+ * searx is distributed in the hope that it will be useful,
8+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
9+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+ * GNU Affero General Public License for more details.
11+ *
12+ * You should have received a copy of the GNU Affero General Public License
13+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+ *
15+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16+ */
17+
18+requirejs.config({
19+ baseUrl: './static/themes/oscar/js',
20+ paths: {
21+ app: '../app'
22+ }
23+});
2424;/**
2525 * searx is free software: you can redistribute it and/or modify
2626 * it under the terms of the GNU Affero General Public License as published by
@@ -51,306 +51,306 @@ window.searx = (function(d) {
5151 method: script.getAttribute('data-method')
5252 };
5353})(document);
54−;/**
55− * searx is free software: you can redistribute it and/or modify
56− * it under the terms of the GNU Affero General Public License as published by
57− * the Free Software Foundation, either version 3 of the License, or
58− * (at your option) any later version.
59− *
60− * searx is distributed in the hope that it will be useful,
61− * but WITHOUT ANY WARRANTY; without even the implied warranty of
62− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63− * GNU Affero General Public License for more details.
64− *
65− * You should have received a copy of the GNU Affero General Public License
66− * along with searx. If not, see < http://www.gnu.org/licenses/ >.
67− *
68− * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
69− */
70−
71−if(searx.autocompleter) {
72− searx.searchResults = new Bloodhound({
73− datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
74− queryTokenizer: Bloodhound.tokenizers.whitespace,
75− remote: './autocompleter?q=%QUERY'
76− });
77− searx.searchResults.initialize();
78−}
79−
80−$(document).ready(function(){
81− if(searx.autocompleter) {
82− $('#q').typeahead(null, {
83− name: 'search-results',
84− displayKey: function(result) {
85− return result;
86− },
87− source: searx.searchResults.ttAdapter()
88− });
89− }
90−});
91−;/**
92− * searx is free software: you can redistribute it and/or modify
93− * it under the terms of the GNU Affero General Public License as published by
94− * the Free Software Foundation, either version 3 of the License, or
95− * (at your option) any later version.
96− *
97− * searx is distributed in the hope that it will be useful,
98− * but WITHOUT ANY WARRANTY; without even the implied warranty of
99− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
100− * GNU Affero General Public License for more details.
101− *
102− * You should have received a copy of the GNU Affero General Public License
103− * along with searx. If not, see < http://www.gnu.org/licenses/ >.
104− *
105− * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
106− */
107−
108−$(document).ready(function(){
109− /**
110− * focus element if class="autofocus" and id="q"
111− */
112− $('#q.autofocus').focus();
113−
114− /**
115− * select full content on click if class="select-all-on-click"
116− */
117− $(".select-all-on-click").click(function () {
118− $(this).select();
119− });
120−
121− /**
122− * change text during btn-collapse click if possible
123− */
124− $('.btn-collapse').click(function() {
125− var btnTextCollapsed = $(this).data('btn-text-collapsed');
126− var btnTextNotCollapsed = $(this).data('btn-text-not-collapsed');
127−
128− if(btnTextCollapsed !== '' && btnTextNotCollapsed !== '') {
129− if($(this).hasClass('collapsed')) {
130− new_html = $(this).html().replace(btnTextCollapsed, btnTextNotCollapsed);
131− } else {
132− new_html = $(this).html().replace(btnTextNotCollapsed, btnTextCollapsed);
133− }
134− $(this).html(new_html);
135− }
136− });
137−
138− /**
139− * change text during btn-toggle click if possible
140− */
141− $('.btn-toggle .btn').click(function() {
142− var btnClass = 'btn-' + $(this).data('btn-class');
143− var btnLabelDefault = $(this).data('btn-label-default');
144− var btnLabelToggled = $(this).data('btn-label-toggled');
145− if(btnLabelToggled !== '') {
146− if($(this).hasClass('btn-default')) {
147− new_html = $(this).html().replace(btnLabelDefault, btnLabelToggled);
148− } else {
149− new_html = $(this).html().replace(btnLabelToggled, btnLabelDefault);
150− }
151− $(this).html(new_html);
152− }
153− $(this).toggleClass(btnClass);
154− $(this).toggleClass('btn-default');
155− });
156−
157− /**
158− * change text during btn-toggle click if possible
159− */
160− $('.media-loader').click(function() {
161− var target = $(this).data('target');
162− var iframe_load = $(target + ' > iframe');
163− var srctest = iframe_load.attr('src');
164− if(srctest === undefined || srctest === false){
165− iframe_load.attr('src', iframe_load.data('src'));
166− }
167− });
168−
169− /**
170− * Select or deselect every categories on double clic
171− */
172− $(".btn-sm").dblclick(function() {
173− var btnClass = 'btn-' + $(this).data('btn-class'); // primary
174− if($(this).hasClass('btn-default')) {
175− $(".btn-sm > input").attr('checked', 'checked');
176− $(".btn-sm > input").prop("checked", true);
177− $(".btn-sm").addClass(btnClass);
178− $(".btn-sm").addClass('active');
179− $(".btn-sm").removeClass('btn-default');
180− } else {
181− $(".btn-sm > input").attr('checked', '');
182− $(".btn-sm > input").removeAttr('checked');
183− $(".btn-sm > input").checked = false;
184− $(".btn-sm").removeClass(btnClass);
185− $(".btn-sm").removeClass('active');
186− $(".btn-sm").addClass('btn-default');
187− }
188− });
189−});
190−;/**
191− * searx is free software: you can redistribute it and/or modify
192− * it under the terms of the GNU Affero General Public License as published by
193− * the Free Software Foundation, either version 3 of the License, or
194− * (at your option) any later version.
195− *
196− * searx is distributed in the hope that it will be useful,
197− * but WITHOUT ANY WARRANTY; without even the implied warranty of
198− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
199− * GNU Affero General Public License for more details.
200− *
201− * You should have received a copy of the GNU Affero General Public License
202− * along with searx. If not, see < http://www.gnu.org/licenses/ >.
203− *
204− * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
205− */
206−
207−$(document).ready(function(){
208− $(".searx_overpass_request").on( "click", function( event ) {
209− var overpass_url = "https://overpass-api.de/api/interpreter?data=";
210− var query_start = overpass_url + "[out:json][timeout:25];(";
211− var query_end = ");out meta;";
212−
213− var osm_id = $(this).data('osm-id');
214− var osm_type = $(this).data('osm-type');
215− var result_table = $(this).data('result-table');
216− var result_table_loadicon = "#" + $(this).data('result-table-loadicon');
217−
218− // tags which can be ignored
219− var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
220−
221− if(osm_id && osm_type && result_table) {
222− result_table = "#" + result_table;
223− var query = null;
224− switch(osm_type) {
225− case 'node':
226− query = query_start + "node(" + osm_id + ");" + query_end;
227− break;
228− case 'way':
229− query = query_start + "way(" + osm_id + ");" + query_end;
230− break;
231− case 'relation':
232− query = query_start + "relation(" + osm_id + ");" + query_end;
233− break;
234− default:
235− break;
236− }
237− if(query) {
238− //alert(query);
239− var ajaxRequest = $.ajax( query )
240− .done(function( html) {
241− if(html && html.elements && html.elements[0]) {
242− var element = html.elements[0];
243− var newHtml = $(result_table).html();
244− for (var row in element.tags) {
245− if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
246− newHtml += "<tr><td>" + row + "</td><td>";
247− switch(row) {
248− case "phone":
249− case "fax":
250− newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
251− break;
252− case "email":
253− newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
254− break;
255− case "website":
256− case "url":
257− newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
258− break;
259− case "wikidata":
260− newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
261− break;
262− case "wikipedia":
263− if(element.tags[row].indexOf(":") != -1) {
264− newHtml += "<a href=\"https://" + element.tags[row].substring(0,element.tags[row].indexOf(":")) + ".wikipedia.org/wiki/" + element.tags[row].substring(element.tags[row].indexOf(":")+1) + "\">" + element.tags[row] + "</a>";
265− break;
266− }
267− /* jshint ignore:start */
268− default:
269− /* jshint ignore:end */
270− newHtml += element.tags[row];
271− break;
272− }
273− newHtml += "</td></tr>";
274− }
275− }
276− $(result_table).html(newHtml);
277− $(result_table).removeClass('hidden');
278− $(result_table_loadicon).addClass('hidden');
279− }
280− })
281− .fail(function() {
282− $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>");
283− });
284− }
285− }
286−
287− // this event occour only once per element
288− $( this ).off( event );
289− });
290−
291− $(".searx_init_map").on( "click", function( event ) {
292− var leaflet_target = $(this).data('leaflet-target');
293− var map_lon = $(this).data('map-lon');
294− var map_lat = $(this).data('map-lat');
295− var map_zoom = $(this).data('map-zoom');
296− var map_boundingbox = $(this).data('map-boundingbox');
297− var map_geojson = $(this).data('map-geojson');
298−
299− require(['leaflet-0.7.3.min'], function(leaflet) {
300− if(map_boundingbox) {
301− southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
302− northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
303− map_bounds = L.latLngBounds(southWest, northEast);
304− }
305−
306− // TODO hack
307− // change default imagePath
308− L.Icon.Default.imagePath = "./static/themes/oscar/img/map";
309−
310− // init map
311− var map = L.map(leaflet_target);
312−
313− // create the tile layer with correct attribution
314− var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
315− var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
316− var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
317−
318− var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
319− var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
320− var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
321−
322− // init map view
323− if(map_bounds) {
324− // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
325− setTimeout(function () {
326− map.fitBounds(map_bounds, {
327− maxZoom:17
328− });
329− }, 0);
330− } else if (map_lon && map_lat) {
331− if(map_zoom)
332− map.setView(new L.LatLng(map_lat, map_lon),map_zoom);
333− else
334− map.setView(new L.LatLng(map_lat, map_lon),8);
335− }
336−
337− map.addLayer(osmMapnik);
338−
339− var baseLayers = {
340− "OSM Mapnik": osmMapnik/*,
341− "OSM Wikimedia": osmWikimedia*/
342− };
343−
344− L.control.layers(baseLayers).addTo(map);
345−
346−
347− if(map_geojson)
348− L.geoJson(map_geojson).addTo(map);
349− /*else if(map_bounds)
350− L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/
351− });
352−
353− // this event occour only once per element
354− $( this ).off( event );
355− });
356−});
54+;/**
55+ * searx is free software: you can redistribute it and/or modify
56+ * it under the terms of the GNU Affero General Public License as published by
57+ * the Free Software Foundation, either version 3 of the License, or
58+ * (at your option) any later version.
59+ *
60+ * searx is distributed in the hope that it will be useful,
61+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
62+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63+ * GNU Affero General Public License for more details.
64+ *
65+ * You should have received a copy of the GNU Affero General Public License
66+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
67+ *
68+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
69+ */
70+
71+if(searx.autocompleter) {
72+ searx.searchResults = new Bloodhound({
73+ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
74+ queryTokenizer: Bloodhound.tokenizers.whitespace,
75+ remote: './autocompleter?q=%QUERY'
76+ });
77+ searx.searchResults.initialize();
78+}
79+
80+$(document).ready(function(){
81+ if(searx.autocompleter) {
82+ $('#q').typeahead(null, {
83+ name: 'search-results',
84+ displayKey: function(result) {
85+ return result;
86+ },
87+ source: searx.searchResults.ttAdapter()
88+ });
89+ }
90+});
91+;/**
92+ * searx is free software: you can redistribute it and/or modify
93+ * it under the terms of the GNU Affero General Public License as published by
94+ * the Free Software Foundation, either version 3 of the License, or
95+ * (at your option) any later version.
96+ *
97+ * searx is distributed in the hope that it will be useful,
98+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
99+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
100+ * GNU Affero General Public License for more details.
101+ *
102+ * You should have received a copy of the GNU Affero General Public License
103+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
104+ *
105+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
106+ */
107+
108+$(document).ready(function(){
109+ /**
110+ * focus element if class="autofocus" and id="q"
111+ */
112+ $('#q.autofocus').focus();
113+
114+ /**
115+ * select full content on click if class="select-all-on-click"
116+ */
117+ $(".select-all-on-click").click(function () {
118+ $(this).select();
119+ });
120+
121+ /**
122+ * change text during btn-collapse click if possible
123+ */
124+ $('.btn-collapse').click(function() {
125+ var btnTextCollapsed = $(this).data('btn-text-collapsed');
126+ var btnTextNotCollapsed = $(this).data('btn-text-not-collapsed');
127+
128+ if(btnTextCollapsed !== '' && btnTextNotCollapsed !== '') {
129+ if($(this).hasClass('collapsed')) {
130+ new_html = $(this).html().replace(btnTextCollapsed, btnTextNotCollapsed);
131+ } else {
132+ new_html = $(this).html().replace(btnTextNotCollapsed, btnTextCollapsed);
133+ }
134+ $(this).html(new_html);
135+ }
136+ });
137+
138+ /**
139+ * change text during btn-toggle click if possible
140+ */
141+ $('.btn-toggle .btn').click(function() {
142+ var btnClass = 'btn-' + $(this).data('btn-class');
143+ var btnLabelDefault = $(this).data('btn-label-default');
144+ var btnLabelToggled = $(this).data('btn-label-toggled');
145+ if(btnLabelToggled !== '') {
146+ if($(this).hasClass('btn-default')) {
147+ new_html = $(this).html().replace(btnLabelDefault, btnLabelToggled);
148+ } else {
149+ new_html = $(this).html().replace(btnLabelToggled, btnLabelDefault);
150+ }
151+ $(this).html(new_html);
152+ }
153+ $(this).toggleClass(btnClass);
154+ $(this).toggleClass('btn-default');
155+ });
156+
157+ /**
158+ * change text during btn-toggle click if possible
159+ */
160+ $('.media-loader').click(function() {
161+ var target = $(this).data('target');
162+ var iframe_load = $(target + ' > iframe');
163+ var srctest = iframe_load.attr('src');
164+ if(srctest === undefined || srctest === false){
165+ iframe_load.attr('src', iframe_load.data('src'));
166+ }
167+ });
168+
169+ /**
170+ * Select or deselect every categories on double clic
171+ */
172+ $(".btn-sm").dblclick(function() {
173+ var btnClass = 'btn-' + $(this).data('btn-class'); // primary
174+ if($(this).hasClass('btn-default')) {
175+ $(".btn-sm > input").attr('checked', 'checked');
176+ $(".btn-sm > input").prop("checked", true);
177+ $(".btn-sm").addClass(btnClass);
178+ $(".btn-sm").addClass('active');
179+ $(".btn-sm").removeClass('btn-default');
180+ } else {
181+ $(".btn-sm > input").attr('checked', '');
182+ $(".btn-sm > input").removeAttr('checked');
183+ $(".btn-sm > input").checked = false;
184+ $(".btn-sm").removeClass(btnClass);
185+ $(".btn-sm").removeClass('active');
186+ $(".btn-sm").addClass('btn-default');
187+ }
188+ });
189+});
190+;/**
191+ * searx is free software: you can redistribute it and/or modify
192+ * it under the terms of the GNU Affero General Public License as published by
193+ * the Free Software Foundation, either version 3 of the License, or
194+ * (at your option) any later version.
195+ *
196+ * searx is distributed in the hope that it will be useful,
197+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
198+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
199+ * GNU Affero General Public License for more details.
200+ *
201+ * You should have received a copy of the GNU Affero General Public License
202+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
203+ *
204+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
205+ */
206+
207+$(document).ready(function(){
208+ $(".searx_overpass_request").on( "click", function( event ) {
209+ var overpass_url = "https://overpass-api.de/api/interpreter?data=";
210+ var query_start = overpass_url + "[out:json][timeout:25];(";
211+ var query_end = ");out meta;";
212+
213+ var osm_id = $(this).data('osm-id');
214+ var osm_type = $(this).data('osm-type');
215+ var result_table = $(this).data('result-table');
216+ var result_table_loadicon = "#" + $(this).data('result-table-loadicon');
217+
218+ // tags which can be ignored
219+ var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
220+
221+ if(osm_id && osm_type && result_table) {
222+ result_table = "#" + result_table;
223+ var query = null;
224+ switch(osm_type) {
225+ case 'node':
226+ query = query_start + "node(" + osm_id + ");" + query_end;
227+ break;
228+ case 'way':
229+ query = query_start + "way(" + osm_id + ");" + query_end;
230+ break;
231+ case 'relation':
232+ query = query_start + "relation(" + osm_id + ");" + query_end;
233+ break;
234+ default:
235+ break;
236+ }
237+ if(query) {
238+ //alert(query);
239+ var ajaxRequest = $.ajax( query )
240+ .done(function( html) {
241+ if(html && html.elements && html.elements[0]) {
242+ var element = html.elements[0];
243+ var newHtml = $(result_table).html();
244+ for (var row in element.tags) {
245+ if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
246+ newHtml += "<tr><td>" + row + "</td><td>";
247+ switch(row) {
248+ case "phone":
249+ case "fax":
250+ newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
251+ break;
252+ case "email":
253+ newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
254+ break;
255+ case "website":
256+ case "url":
257+ newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
258+ break;
259+ case "wikidata":
260+ newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
261+ break;
262+ case "wikipedia":
263+ if(element.tags[row].indexOf(":") != -1) {
264+ newHtml += "<a href=\"https://" + element.tags[row].substring(0,element.tags[row].indexOf(":")) + ".wikipedia.org/wiki/" + element.tags[row].substring(element.tags[row].indexOf(":")+1) + "\">" + element.tags[row] + "</a>";
265+ break;
266+ }
267+ /* jshint ignore:start */
268+ default:
269+ /* jshint ignore:end */
270+ newHtml += element.tags[row];
271+ break;
272+ }
273+ newHtml += "</td></tr>";
274+ }
275+ }
276+ $(result_table).html(newHtml);
277+ $(result_table).removeClass('hidden');
278+ $(result_table_loadicon).addClass('hidden');
279+ }
280+ })
281+ .fail(function() {
282+ $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>");
283+ });
284+ }
285+ }
286+
287+ // this event occour only once per element
288+ $( this ).off( event );
289+ });
290+
291+ $(".searx_init_map").on( "click", function( event ) {
292+ var leaflet_target = $(this).data('leaflet-target');
293+ var map_lon = $(this).data('map-lon');
294+ var map_lat = $(this).data('map-lat');
295+ var map_zoom = $(this).data('map-zoom');
296+ var map_boundingbox = $(this).data('map-boundingbox');
297+ var map_geojson = $(this).data('map-geojson');
298+
299+ require(['leaflet-0.7.3.min'], function(leaflet) {
300+ if(map_boundingbox) {
301+ southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
302+ northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
303+ map_bounds = L.latLngBounds(southWest, northEast);
304+ }
305+
306+ // TODO hack
307+ // change default imagePath
308+ L.Icon.Default.imagePath = "./static/themes/oscar/img/map";
309+
310+ // init map
311+ var map = L.map(leaflet_target);
312+
313+ // create the tile layer with correct attribution
314+ var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
315+ var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
316+ var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
317+
318+ var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
319+ var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
320+ var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
321+
322+ // init map view
323+ if(map_bounds) {
324+ // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
325+ setTimeout(function () {
326+ map.fitBounds(map_bounds, {
327+ maxZoom:17
328+ });
329+ }, 0);
330+ } else if (map_lon && map_lat) {
331+ if(map_zoom)
332+ map.setView(new L.LatLng(map_lat, map_lon),map_zoom);
333+ else
334+ map.setView(new L.LatLng(map_lat, map_lon),8);
335+ }
336+
337+ map.addLayer(osmMapnik);
338+
339+ var baseLayers = {
340+ "OSM Mapnik": osmMapnik/*,
341+ "OSM Wikimedia": osmWikimedia*/
342+ };
343+
344+ L.control.layers(baseLayers).addTo(map);
345+
346+
347+ if(map_geojson)
348+ L.geoJson(map_geojson).addTo(map);
349+ /*else if(map_bounds)
350+ L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/
351+ });
352+
353+ // this event occour only once per element
354+ $( this ).off( event );
355+ });
356+});
searx/static/themes/oscar/js/searx_src/00_requirejs_config.js+23−23
@@ -1,23 +1,23 @@
1−/**
2− * searx is free software: you can redistribute it and/or modify
3− * it under the terms of the GNU Affero General Public License as published by
4− * the Free Software Foundation, either version 3 of the License, or
5− * (at your option) any later version.
6− *
7− * searx is distributed in the hope that it will be useful,
8− * but WITHOUT ANY WARRANTY; without even the implied warranty of
9− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10− * GNU Affero General Public License for more details.
11− *
12− * You should have received a copy of the GNU Affero General Public License
13− * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14− *
15− * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16− */
17−
18−requirejs.config({
19− baseUrl: './static/themes/oscar/js',
20− paths: {
21− app: '../app'
22− }
23−});
1+/**
2+ * searx is free software: you can redistribute it and/or modify
3+ * it under the terms of the GNU Affero General Public License as published by
4+ * the Free Software Foundation, either version 3 of the License, or
5+ * (at your option) any later version.
6+ *
7+ * searx is distributed in the hope that it will be useful,
8+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
9+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+ * GNU Affero General Public License for more details.
11+ *
12+ * You should have received a copy of the GNU Affero General Public License
13+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+ *
15+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16+ */
17+
18+requirejs.config({
19+ baseUrl: './static/themes/oscar/js',
20+ paths: {
21+ app: '../app'
22+ }
23+});
searx/static/themes/oscar/js/searx_src/autocompleter.js+37−37
@@ -1,37 +1,37 @@
1−/**
2− * searx is free software: you can redistribute it and/or modify
3− * it under the terms of the GNU Affero General Public License as published by
4− * the Free Software Foundation, either version 3 of the License, or
5− * (at your option) any later version.
6− *
7− * searx is distributed in the hope that it will be useful,
8− * but WITHOUT ANY WARRANTY; without even the implied warranty of
9− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10− * GNU Affero General Public License for more details.
11− *
12− * You should have received a copy of the GNU Affero General Public License
13− * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14− *
15− * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16− */
17−
18−if(searx.autocompleter) {
19− searx.searchResults = new Bloodhound({
20− datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
21− queryTokenizer: Bloodhound.tokenizers.whitespace,
22− remote: './autocompleter?q=%QUERY'
23− });
24− searx.searchResults.initialize();
25−}
26−
27−$(document).ready(function(){
28− if(searx.autocompleter) {
29− $('#q').typeahead(null, {
30− name: 'search-results',
31− displayKey: function(result) {
32− return result;
33− },
34− source: searx.searchResults.ttAdapter()
35− });
36− }
37−});
1+/**
2+ * searx is free software: you can redistribute it and/or modify
3+ * it under the terms of the GNU Affero General Public License as published by
4+ * the Free Software Foundation, either version 3 of the License, or
5+ * (at your option) any later version.
6+ *
7+ * searx is distributed in the hope that it will be useful,
8+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
9+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+ * GNU Affero General Public License for more details.
11+ *
12+ * You should have received a copy of the GNU Affero General Public License
13+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+ *
15+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16+ */
17+
18+if(searx.autocompleter) {
19+ searx.searchResults = new Bloodhound({
20+ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
21+ queryTokenizer: Bloodhound.tokenizers.whitespace,
22+ remote: './autocompleter?q=%QUERY'
23+ });
24+ searx.searchResults.initialize();
25+}
26+
27+$(document).ready(function(){
28+ if(searx.autocompleter) {
29+ $('#q').typeahead(null, {
30+ name: 'search-results',
31+ displayKey: function(result) {
32+ return result;
33+ },
34+ source: searx.searchResults.ttAdapter()
35+ });
36+ }
37+});
searx/static/themes/oscar/js/searx_src/element_modifiers.js+99−99
@@ -1,99 +1,99 @@
1−/**
2− * searx is free software: you can redistribute it and/or modify
3− * it under the terms of the GNU Affero General Public License as published by
4− * the Free Software Foundation, either version 3 of the License, or
5− * (at your option) any later version.
6− *
7− * searx is distributed in the hope that it will be useful,
8− * but WITHOUT ANY WARRANTY; without even the implied warranty of
9− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10− * GNU Affero General Public License for more details.
11− *
12− * You should have received a copy of the GNU Affero General Public License
13− * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14− *
15− * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16− */
17−
18−$(document).ready(function(){
19− /**
20− * focus element if class="autofocus" and id="q"
21− */
22− $('#q.autofocus').focus();
23−
24− /**
25− * select full content on click if class="select-all-on-click"
26− */
27− $(".select-all-on-click").click(function () {
28− $(this).select();
29− });
30−
31− /**
32− * change text during btn-collapse click if possible
33− */
34− $('.btn-collapse').click(function() {
35− var btnTextCollapsed = $(this).data('btn-text-collapsed');
36− var btnTextNotCollapsed = $(this).data('btn-text-not-collapsed');
37−
38− if(btnTextCollapsed !== '' && btnTextNotCollapsed !== '') {
39− if($(this).hasClass('collapsed')) {
40− new_html = $(this).html().replace(btnTextCollapsed, btnTextNotCollapsed);
41− } else {
42− new_html = $(this).html().replace(btnTextNotCollapsed, btnTextCollapsed);
43− }
44− $(this).html(new_html);
45− }
46− });
47−
48− /**
49− * change text during btn-toggle click if possible
50− */
51− $('.btn-toggle .btn').click(function() {
52− var btnClass = 'btn-' + $(this).data('btn-class');
53− var btnLabelDefault = $(this).data('btn-label-default');
54− var btnLabelToggled = $(this).data('btn-label-toggled');
55− if(btnLabelToggled !== '') {
56− if($(this).hasClass('btn-default')) {
57− new_html = $(this).html().replace(btnLabelDefault, btnLabelToggled);
58− } else {
59− new_html = $(this).html().replace(btnLabelToggled, btnLabelDefault);
60− }
61− $(this).html(new_html);
62− }
63− $(this).toggleClass(btnClass);
64− $(this).toggleClass('btn-default');
65− });
66−
67− /**
68− * change text during btn-toggle click if possible
69− */
70− $('.media-loader').click(function() {
71− var target = $(this).data('target');
72− var iframe_load = $(target + ' > iframe');
73− var srctest = iframe_load.attr('src');
74− if(srctest === undefined || srctest === false){
75− iframe_load.attr('src', iframe_load.data('src'));
76− }
77− });
78−
79− /**
80− * Select or deselect every categories on double clic
81− */
82− $(".btn-sm").dblclick(function() {
83− var btnClass = 'btn-' + $(this).data('btn-class'); // primary
84− if($(this).hasClass('btn-default')) {
85− $(".btn-sm > input").attr('checked', 'checked');
86− $(".btn-sm > input").prop("checked", true);
87− $(".btn-sm").addClass(btnClass);
88− $(".btn-sm").addClass('active');
89− $(".btn-sm").removeClass('btn-default');
90− } else {
91− $(".btn-sm > input").attr('checked', '');
92− $(".btn-sm > input").removeAttr('checked');
93− $(".btn-sm > input").checked = false;
94− $(".btn-sm").removeClass(btnClass);
95− $(".btn-sm").removeClass('active');
96− $(".btn-sm").addClass('btn-default');
97− }
98− });
99−});
1+/**
2+ * searx is free software: you can redistribute it and/or modify
3+ * it under the terms of the GNU Affero General Public License as published by
4+ * the Free Software Foundation, either version 3 of the License, or
5+ * (at your option) any later version.
6+ *
7+ * searx is distributed in the hope that it will be useful,
8+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
9+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+ * GNU Affero General Public License for more details.
11+ *
12+ * You should have received a copy of the GNU Affero General Public License
13+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+ *
15+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16+ */
17+
18+$(document).ready(function(){
19+ /**
20+ * focus element if class="autofocus" and id="q"
21+ */
22+ $('#q.autofocus').focus();
23+
24+ /**
25+ * select full content on click if class="select-all-on-click"
26+ */
27+ $(".select-all-on-click").click(function () {
28+ $(this).select();
29+ });
30+
31+ /**
32+ * change text during btn-collapse click if possible
33+ */
34+ $('.btn-collapse').click(function() {
35+ var btnTextCollapsed = $(this).data('btn-text-collapsed');
36+ var btnTextNotCollapsed = $(this).data('btn-text-not-collapsed');
37+
38+ if(btnTextCollapsed !== '' && btnTextNotCollapsed !== '') {
39+ if($(this).hasClass('collapsed')) {
40+ new_html = $(this).html().replace(btnTextCollapsed, btnTextNotCollapsed);
41+ } else {
42+ new_html = $(this).html().replace(btnTextNotCollapsed, btnTextCollapsed);
43+ }
44+ $(this).html(new_html);
45+ }
46+ });
47+
48+ /**
49+ * change text during btn-toggle click if possible
50+ */
51+ $('.btn-toggle .btn').click(function() {
52+ var btnClass = 'btn-' + $(this).data('btn-class');
53+ var btnLabelDefault = $(this).data('btn-label-default');
54+ var btnLabelToggled = $(this).data('btn-label-toggled');
55+ if(btnLabelToggled !== '') {
56+ if($(this).hasClass('btn-default')) {
57+ new_html = $(this).html().replace(btnLabelDefault, btnLabelToggled);
58+ } else {
59+ new_html = $(this).html().replace(btnLabelToggled, btnLabelDefault);
60+ }
61+ $(this).html(new_html);
62+ }
63+ $(this).toggleClass(btnClass);
64+ $(this).toggleClass('btn-default');
65+ });
66+
67+ /**
68+ * change text during btn-toggle click if possible
69+ */
70+ $('.media-loader').click(function() {
71+ var target = $(this).data('target');
72+ var iframe_load = $(target + ' > iframe');
73+ var srctest = iframe_load.attr('src');
74+ if(srctest === undefined || srctest === false){
75+ iframe_load.attr('src', iframe_load.data('src'));
76+ }
77+ });
78+
79+ /**
80+ * Select or deselect every categories on double clic
81+ */
82+ $(".btn-sm").dblclick(function() {
83+ var btnClass = 'btn-' + $(this).data('btn-class'); // primary
84+ if($(this).hasClass('btn-default')) {
85+ $(".btn-sm > input").attr('checked', 'checked');
86+ $(".btn-sm > input").prop("checked", true);
87+ $(".btn-sm").addClass(btnClass);
88+ $(".btn-sm").addClass('active');
89+ $(".btn-sm").removeClass('btn-default');
90+ } else {
91+ $(".btn-sm > input").attr('checked', '');
92+ $(".btn-sm > input").removeAttr('checked');
93+ $(".btn-sm > input").checked = false;
94+ $(".btn-sm").removeClass(btnClass);
95+ $(".btn-sm").removeClass('active');
96+ $(".btn-sm").addClass('btn-default');
97+ }
98+ });
99+});
searx/static/themes/oscar/js/searx_src/leaflet_map.js+167−167
@@ -1,167 +1,167 @@
1−/**
2− * searx is free software: you can redistribute it and/or modify
3− * it under the terms of the GNU Affero General Public License as published by
4− * the Free Software Foundation, either version 3 of the License, or
5− * (at your option) any later version.
6− *
7− * searx is distributed in the hope that it will be useful,
8− * but WITHOUT ANY WARRANTY; without even the implied warranty of
9− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10− * GNU Affero General Public License for more details.
11− *
12− * You should have received a copy of the GNU Affero General Public License
13− * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14− *
15− * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16− */
17−
18−$(document).ready(function(){
19− $(".searx_overpass_request").on( "click", function( event ) {
20− var overpass_url = "https://overpass-api.de/api/interpreter?data=";
21− var query_start = overpass_url + "[out:json][timeout:25];(";
22− var query_end = ");out meta;";
23−
24− var osm_id = $(this).data('osm-id');
25− var osm_type = $(this).data('osm-type');
26− var result_table = $(this).data('result-table');
27− var result_table_loadicon = "#" + $(this).data('result-table-loadicon');
28−
29− // tags which can be ignored
30− var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
31−
32− if(osm_id && osm_type && result_table) {
33− result_table = "#" + result_table;
34− var query = null;
35− switch(osm_type) {
36− case 'node':
37− query = query_start + "node(" + osm_id + ");" + query_end;
38− break;
39− case 'way':
40− query = query_start + "way(" + osm_id + ");" + query_end;
41− break;
42− case 'relation':
43− query = query_start + "relation(" + osm_id + ");" + query_end;
44− break;
45− default:
46− break;
47− }
48− if(query) {
49− //alert(query);
50− var ajaxRequest = $.ajax( query )
51− .done(function( html) {
52− if(html && html.elements && html.elements[0]) {
53− var element = html.elements[0];
54− var newHtml = $(result_table).html();
55− for (var row in element.tags) {
56− if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
57− newHtml += "<tr><td>" + row + "</td><td>";
58− switch(row) {
59− case "phone":
60− case "fax":
61− newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
62− break;
63− case "email":
64− newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
65− break;
66− case "website":
67− case "url":
68− newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
69− break;
70− case "wikidata":
71− newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
72− break;
73− case "wikipedia":
74− if(element.tags[row].indexOf(":") != -1) {
75− newHtml += "<a href=\"https://" + element.tags[row].substring(0,element.tags[row].indexOf(":")) + ".wikipedia.org/wiki/" + element.tags[row].substring(element.tags[row].indexOf(":")+1) + "\">" + element.tags[row] + "</a>";
76− break;
77− }
78− /* jshint ignore:start */
79− default:
80− /* jshint ignore:end */
81− newHtml += element.tags[row];
82− break;
83− }
84− newHtml += "</td></tr>";
85− }
86− }
87− $(result_table).html(newHtml);
88− $(result_table).removeClass('hidden');
89− $(result_table_loadicon).addClass('hidden');
90− }
91− })
92− .fail(function() {
93− $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>");
94− });
95− }
96− }
97−
98− // this event occour only once per element
99− $( this ).off( event );
100− });
101−
102− $(".searx_init_map").on( "click", function( event ) {
103− var leaflet_target = $(this).data('leaflet-target');
104− var map_lon = $(this).data('map-lon');
105− var map_lat = $(this).data('map-lat');
106− var map_zoom = $(this).data('map-zoom');
107− var map_boundingbox = $(this).data('map-boundingbox');
108− var map_geojson = $(this).data('map-geojson');
109−
110− require(['leaflet-0.7.3.min'], function(leaflet) {
111− if(map_boundingbox) {
112− southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
113− northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
114− map_bounds = L.latLngBounds(southWest, northEast);
115− }
116−
117− // TODO hack
118− // change default imagePath
119− L.Icon.Default.imagePath = "./static/themes/oscar/img/map";
120−
121− // init map
122− var map = L.map(leaflet_target);
123−
124− // create the tile layer with correct attribution
125− var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
126− var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
127− var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
128−
129− var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
130− var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
131− var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
132−
133− // init map view
134− if(map_bounds) {
135− // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
136− setTimeout(function () {
137− map.fitBounds(map_bounds, {
138− maxZoom:17
139− });
140− }, 0);
141− } else if (map_lon && map_lat) {
142− if(map_zoom)
143− map.setView(new L.LatLng(map_lat, map_lon),map_zoom);
144− else
145− map.setView(new L.LatLng(map_lat, map_lon),8);
146− }
147−
148− map.addLayer(osmMapnik);
149−
150− var baseLayers = {
151− "OSM Mapnik": osmMapnik/*,
152− "OSM Wikimedia": osmWikimedia*/
153− };
154−
155− L.control.layers(baseLayers).addTo(map);
156−
157−
158− if(map_geojson)
159− L.geoJson(map_geojson).addTo(map);
160− /*else if(map_bounds)
161− L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/
162− });
163−
164− // this event occour only once per element
165− $( this ).off( event );
166− });
167−});
1+/**
2+ * searx is free software: you can redistribute it and/or modify
3+ * it under the terms of the GNU Affero General Public License as published by
4+ * the Free Software Foundation, either version 3 of the License, or
5+ * (at your option) any later version.
6+ *
7+ * searx is distributed in the hope that it will be useful,
8+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
9+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+ * GNU Affero General Public License for more details.
11+ *
12+ * You should have received a copy of the GNU Affero General Public License
13+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+ *
15+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16+ */
17+
18+$(document).ready(function(){
19+ $(".searx_overpass_request").on( "click", function( event ) {
20+ var overpass_url = "https://overpass-api.de/api/interpreter?data=";
21+ var query_start = overpass_url + "[out:json][timeout:25];(";
22+ var query_end = ");out meta;";
23+
24+ var osm_id = $(this).data('osm-id');
25+ var osm_type = $(this).data('osm-type');
26+ var result_table = $(this).data('result-table');
27+ var result_table_loadicon = "#" + $(this).data('result-table-loadicon');
28+
29+ // tags which can be ignored
30+ var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
31+
32+ if(osm_id && osm_type && result_table) {
33+ result_table = "#" + result_table;
34+ var query = null;
35+ switch(osm_type) {
36+ case 'node':
37+ query = query_start + "node(" + osm_id + ");" + query_end;
38+ break;
39+ case 'way':
40+ query = query_start + "way(" + osm_id + ");" + query_end;
41+ break;
42+ case 'relation':
43+ query = query_start + "relation(" + osm_id + ");" + query_end;
44+ break;
45+ default:
46+ break;
47+ }
48+ if(query) {
49+ //alert(query);
50+ var ajaxRequest = $.ajax( query )
51+ .done(function( html) {
52+ if(html && html.elements && html.elements[0]) {
53+ var element = html.elements[0];
54+ var newHtml = $(result_table).html();
55+ for (var row in element.tags) {
56+ if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
57+ newHtml += "<tr><td>" + row + "</td><td>";
58+ switch(row) {
59+ case "phone":
60+ case "fax":
61+ newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
62+ break;
63+ case "email":
64+ newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
65+ break;
66+ case "website":
67+ case "url":
68+ newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
69+ break;
70+ case "wikidata":
71+ newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
72+ break;
73+ case "wikipedia":
74+ if(element.tags[row].indexOf(":") != -1) {
75+ newHtml += "<a href=\"https://" + element.tags[row].substring(0,element.tags[row].indexOf(":")) + ".wikipedia.org/wiki/" + element.tags[row].substring(element.tags[row].indexOf(":")+1) + "\">" + element.tags[row] + "</a>";
76+ break;
77+ }
78+ /* jshint ignore:start */
79+ default:
80+ /* jshint ignore:end */
81+ newHtml += element.tags[row];
82+ break;
83+ }
84+ newHtml += "</td></tr>";
85+ }
86+ }
87+ $(result_table).html(newHtml);
88+ $(result_table).removeClass('hidden');
89+ $(result_table_loadicon).addClass('hidden');
90+ }
91+ })
92+ .fail(function() {
93+ $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>");
94+ });
95+ }
96+ }
97+
98+ // this event occour only once per element
99+ $( this ).off( event );
100+ });
101+
102+ $(".searx_init_map").on( "click", function( event ) {
103+ var leaflet_target = $(this).data('leaflet-target');
104+ var map_lon = $(this).data('map-lon');
105+ var map_lat = $(this).data('map-lat');
106+ var map_zoom = $(this).data('map-zoom');
107+ var map_boundingbox = $(this).data('map-boundingbox');
108+ var map_geojson = $(this).data('map-geojson');
109+
110+ require(['leaflet-0.7.3.min'], function(leaflet) {
111+ if(map_boundingbox) {
112+ southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
113+ northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
114+ map_bounds = L.latLngBounds(southWest, northEast);
115+ }
116+
117+ // TODO hack
118+ // change default imagePath
119+ L.Icon.Default.imagePath = "./static/themes/oscar/img/map";
120+
121+ // init map
122+ var map = L.map(leaflet_target);
123+
124+ // create the tile layer with correct attribution
125+ var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
126+ var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
127+ var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
128+
129+ var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
130+ var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
131+ var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
132+
133+ // init map view
134+ if(map_bounds) {
135+ // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
136+ setTimeout(function () {
137+ map.fitBounds(map_bounds, {
138+ maxZoom:17
139+ });
140+ }, 0);
141+ } else if (map_lon && map_lat) {
142+ if(map_zoom)
143+ map.setView(new L.LatLng(map_lat, map_lon),map_zoom);
144+ else
145+ map.setView(new L.LatLng(map_lat, map_lon),8);
146+ }
147+
148+ map.addLayer(osmMapnik);
149+
150+ var baseLayers = {
151+ "OSM Mapnik": osmMapnik/*,
152+ "OSM Wikimedia": osmWikimedia*/
153+ };
154+
155+ L.control.layers(baseLayers).addTo(map);
156+
157+
158+ if(map_geojson)
159+ L.geoJson(map_geojson).addTo(map);
160+ /*else if(map_bounds)
161+ L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/
162+ });
163+
164+ // this event occour only once per element
165+ $( this ).off( event );
166+ });
167+});
searx/static/themes/oscar/less/logicodev-dark/oscar.less+2−2
@@ -109,7 +109,7 @@ ul.nav li a {
109109
110110.btn:hover {
111111 color:#444 !important;
112− background-color: #BBB !important;
112+ background-color: #BBB !important;
113113}
114114
115115.btn-primary.active {
@@ -221,7 +221,7 @@ p.btn.btn-default{
221221}
222222
223223.table-hover > tbody > tr:hover > td, .table-hover > tbody > tr:hover > th {
224− background: rgb(102, 105, 110) !important;
224+ background: rgb(102, 105, 110) !important;
225225}
226226
227227.btn-success {
searx/static/themes/oscar/less/logicodev/code.less+1−3
@@ -78,7 +78,7 @@ pre, code{
7878 user-select: none;
7979 cursor: default;
8080 color: #556366;
81−
81+
8282 &::selection {
8383 background: transparent; /* WebKit/Blink Browsers */
8484 }
@@ -99,5 +99,3 @@ pre, code{
9999.highlight {
100100 font-weight: 700;
101101}
102−
103−
searx/static/themes/oscar/less/logicodev/infobox.less+1−1
@@ -30,7 +30,7 @@
3030 table-layout: fixed;
3131
3232 }
33−
33+
3434 .infobox_part:last-child {
3535 margin-bottom: 0;
3636 }
searx/static/themes/oscar/less/logicodev/navbar.less−1
@@ -28,4 +28,3 @@
2828 width: 80%;
2929 }
3030}
31−
searx/static/themes/oscar/less/pointhi/code.less+1−1
@@ -69,7 +69,7 @@
6969 -ms-user-select: none;
7070 user-select: none;
7171 cursor: default;
72−
72+
7373 &::selection {
7474 background: transparent; /* WebKit/Blink Browsers */
7575 }
searx/static/themes/oscar/less/pointhi/infobox.less+1−1
@@ -4,7 +4,7 @@
44 word-wrap: break-word;
55 table-layout: fixed;
66 }
7−
7+
88 .infobox_part:last-child {
99 margin-bottom: 0;
1010 }
searx/static/themes/simple/leaflet/leaflet.css+636−636
@@ -1,636 +1,636 @@
1−/* required styles */
2−
3−.leaflet-pane,
4−.leaflet-tile,
5−.leaflet-marker-icon,
6−.leaflet-marker-shadow,
7−.leaflet-tile-container,
8−.leaflet-pane > svg,
9−.leaflet-pane > canvas,
10−.leaflet-zoom-box,
11−.leaflet-image-layer,
12−.leaflet-layer {
13− position: absolute;
14− left: 0;
15− top: 0;
16− }
17−.leaflet-container {
18− overflow: hidden;
19− }
20−.leaflet-tile,
21−.leaflet-marker-icon,
22−.leaflet-marker-shadow {
23− -webkit-user-select: none;
24− -moz-user-select: none;
25− user-select: none;
26− -webkit-user-drag: none;
27− }
28−/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
29−.leaflet-safari .leaflet-tile {
30− image-rendering: -webkit-optimize-contrast;
31− }
32−/* hack that prevents hw layers "stretching" when loading new tiles */
33−.leaflet-safari .leaflet-tile-container {
34− width: 1600px;
35− height: 1600px;
36− -webkit-transform-origin: 0 0;
37− }
38−.leaflet-marker-icon,
39−.leaflet-marker-shadow {
40− display: block;
41− }
42−/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
43−/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
44−.leaflet-container .leaflet-overlay-pane svg,
45−.leaflet-container .leaflet-marker-pane img,
46−.leaflet-container .leaflet-shadow-pane img,
47−.leaflet-container .leaflet-tile-pane img,
48−.leaflet-container img.leaflet-image-layer {
49− max-width: none !important;
50− max-height: none !important;
51− }
52−
53−.leaflet-container.leaflet-touch-zoom {
54− -ms-touch-action: pan-x pan-y;
55− touch-action: pan-x pan-y;
56− }
57−.leaflet-container.leaflet-touch-drag {
58− -ms-touch-action: pinch-zoom;
59− /* Fallback for FF which doesn't support pinch-zoom */
60− touch-action: none;
61− touch-action: pinch-zoom;
62−}
63−.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
64− -ms-touch-action: none;
65− touch-action: none;
66−}
67−.leaflet-container {
68− -webkit-tap-highlight-color: transparent;
69−}
70−.leaflet-container a {
71− -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
72−}
73−.leaflet-tile {
74− filter: inherit;
75− visibility: hidden;
76− }
77−.leaflet-tile-loaded {
78− visibility: inherit;
79− }
80−.leaflet-zoom-box {
81− width: 0;
82− height: 0;
83− -moz-box-sizing: border-box;
84− box-sizing: border-box;
85− z-index: 800;
86− }
87−/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
88−.leaflet-overlay-pane svg {
89− -moz-user-select: none;
90− }
91−
92−.leaflet-pane { z-index: 400; }
93−
94−.leaflet-tile-pane { z-index: 200; }
95−.leaflet-overlay-pane { z-index: 400; }
96−.leaflet-shadow-pane { z-index: 500; }
97−.leaflet-marker-pane { z-index: 600; }
98−.leaflet-tooltip-pane { z-index: 650; }
99−.leaflet-popup-pane { z-index: 700; }
100−
101−.leaflet-map-pane canvas { z-index: 100; }
102−.leaflet-map-pane svg { z-index: 200; }
103−
104−.leaflet-vml-shape {
105− width: 1px;
106− height: 1px;
107− }
108−.lvml {
109− behavior: url(#default#VML);
110− display: inline-block;
111− position: absolute;
112− }
113−
114−
115−/* control positioning */
116−
117−.leaflet-control {
118− position: relative;
119− z-index: 800;
120− pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
121− pointer-events: auto;
122− }
123−.leaflet-top,
124−.leaflet-bottom {
125− position: absolute;
126− z-index: 1000;
127− pointer-events: none;
128− }
129−.leaflet-top {
130− top: 0;
131− }
132−.leaflet-right {
133− right: 0;
134− }
135−.leaflet-bottom {
136− bottom: 0;
137− }
138−.leaflet-left {
139− left: 0;
140− }
141−.leaflet-control {
142− float: left;
143− clear: both;
144− }
145−.leaflet-right .leaflet-control {
146− float: right;
147− }
148−.leaflet-top .leaflet-control {
149− margin-top: 10px;
150− }
151−.leaflet-bottom .leaflet-control {
152− margin-bottom: 10px;
153− }
154−.leaflet-left .leaflet-control {
155− margin-left: 10px;
156− }
157−.leaflet-right .leaflet-control {
158− margin-right: 10px;
159− }
160−
161−
162−/* zoom and fade animations */
163−
164−.leaflet-fade-anim .leaflet-tile {
165− will-change: opacity;
166− }
167−.leaflet-fade-anim .leaflet-popup {
168− opacity: 0;
169− -webkit-transition: opacity 0.2s linear;
170− -moz-transition: opacity 0.2s linear;
171− -o-transition: opacity 0.2s linear;
172− transition: opacity 0.2s linear;
173− }
174−.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
175− opacity: 1;
176− }
177−.leaflet-zoom-animated {
178− -webkit-transform-origin: 0 0;
179− -ms-transform-origin: 0 0;
180− transform-origin: 0 0;
181− }
182−.leaflet-zoom-anim .leaflet-zoom-animated {
183− will-change: transform;
184− }
185−.leaflet-zoom-anim .leaflet-zoom-animated {
186− -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
187− -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
188− -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
189− transition: transform 0.25s cubic-bezier(0,0,0.25,1);
190− }
191−.leaflet-zoom-anim .leaflet-tile,
192−.leaflet-pan-anim .leaflet-tile {
193− -webkit-transition: none;
194− -moz-transition: none;
195− -o-transition: none;
196− transition: none;
197− }
198−
199−.leaflet-zoom-anim .leaflet-zoom-hide {
200− visibility: hidden;
201− }
202−
203−
204−/* cursors */
205−
206−.leaflet-interactive {
207− cursor: pointer;
208− }
209−.leaflet-grab {
210− cursor: -webkit-grab;
211− cursor: -moz-grab;
212− }
213−.leaflet-crosshair,
214−.leaflet-crosshair .leaflet-interactive {
215− cursor: crosshair;
216− }
217−.leaflet-popup-pane,
218−.leaflet-control {
219− cursor: auto;
220− }
221−.leaflet-dragging .leaflet-grab,
222−.leaflet-dragging .leaflet-grab .leaflet-interactive,
223−.leaflet-dragging .leaflet-marker-draggable {
224− cursor: move;
225− cursor: -webkit-grabbing;
226− cursor: -moz-grabbing;
227− }
228−
229−/* marker & overlays interactivity */
230−.leaflet-marker-icon,
231−.leaflet-marker-shadow,
232−.leaflet-image-layer,
233−.leaflet-pane > svg path,
234−.leaflet-tile-container {
235− pointer-events: none;
236− }
237−
238−.leaflet-marker-icon.leaflet-interactive,
239−.leaflet-image-layer.leaflet-interactive,
240−.leaflet-pane > svg path.leaflet-interactive {
241− pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
242− pointer-events: auto;
243− }
244−
245−/* visual tweaks */
246−
247−.leaflet-container {
248− background: #ddd;
249− outline: 0;
250− }
251−.leaflet-container a {
252− color: #0078A8;
253− }
254−.leaflet-container a.leaflet-active {
255− outline: 2px solid orange;
256− }
257−.leaflet-zoom-box {
258− border: 2px dotted #38f;
259− background: rgba(255,255,255,0.5);
260− }
261−
262−
263−/* general typography */
264−.leaflet-container {
265− font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
266− }
267−
268−
269−/* general toolbar styles */
270−
271−.leaflet-bar {
272− box-shadow: 0 1px 5px rgba(0,0,0,0.65);
273− border-radius: 4px;
274− }
275−.leaflet-bar a,
276−.leaflet-bar a:hover {
277− background-color: #fff;
278− border-bottom: 1px solid #ccc;
279− width: 26px;
280− height: 26px;
281− line-height: 26px;
282− display: block;
283− text-align: center;
284− text-decoration: none;
285− color: black;
286− }
287−.leaflet-bar a,
288−.leaflet-control-layers-toggle {
289− background-position: 50% 50%;
290− background-repeat: no-repeat;
291− display: block;
292− }
293−.leaflet-bar a:hover {
294− background-color: #f4f4f4;
295− }
296−.leaflet-bar a:first-child {
297− border-top-left-radius: 4px;
298− border-top-right-radius: 4px;
299− }
300−.leaflet-bar a:last-child {
301− border-bottom-left-radius: 4px;
302− border-bottom-right-radius: 4px;
303− border-bottom: none;
304− }
305−.leaflet-bar a.leaflet-disabled {
306− cursor: default;
307− background-color: #f4f4f4;
308− color: #bbb;
309− }
310−
311−.leaflet-touch .leaflet-bar a {
312− width: 30px;
313− height: 30px;
314− line-height: 30px;
315− }
316−.leaflet-touch .leaflet-bar a:first-child {
317− border-top-left-radius: 2px;
318− border-top-right-radius: 2px;
319− }
320−.leaflet-touch .leaflet-bar a:last-child {
321− border-bottom-left-radius: 2px;
322− border-bottom-right-radius: 2px;
323− }
324−
325−/* zoom control */
326−
327−.leaflet-control-zoom-in,
328−.leaflet-control-zoom-out {
329− font: bold 18px 'Lucida Console', Monaco, monospace;
330− text-indent: 1px;
331− }
332−
333−.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
334− font-size: 22px;
335− }
336−
337−
338−/* layers control */
339−
340−.leaflet-control-layers {
341− box-shadow: 0 1px 5px rgba(0,0,0,0.4);
342− background: #fff;
343− border-radius: 5px;
344− }
345−.leaflet-control-layers-toggle {
346− background-image: url(images/layers.png);
347− width: 36px;
348− height: 36px;
349− }
350−.leaflet-retina .leaflet-control-layers-toggle {
351− background-image: url(images/layers-2x.png);
352− background-size: 26px 26px;
353− }
354−.leaflet-touch .leaflet-control-layers-toggle {
355− width: 44px;
356− height: 44px;
357− }
358−.leaflet-control-layers .leaflet-control-layers-list,
359−.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
360− display: none;
361− }
362−.leaflet-control-layers-expanded .leaflet-control-layers-list {
363− display: block;
364− position: relative;
365− }
366−.leaflet-control-layers-expanded {
367− padding: 6px 10px 6px 6px;
368− color: #333;
369− background: #fff;
370− }
371−.leaflet-control-layers-scrollbar {
372− overflow-y: scroll;
373− overflow-x: hidden;
374− padding-right: 5px;
375− }
376−.leaflet-control-layers-selector {
377− margin-top: 2px;
378− position: relative;
379− top: 1px;
380− }
381−.leaflet-control-layers label {
382− display: block;
383− }
384−.leaflet-control-layers-separator {
385− height: 0;
386− border-top: 1px solid #ddd;
387− margin: 5px -10px 5px -6px;
388− }
389−
390−/* Default icon URLs */
391−.leaflet-default-icon-path {
392− background-image: url(images/marker-icon.png);
393− }
394−
395−
396−/* attribution and scale controls */
397−
398−.leaflet-container .leaflet-control-attribution {
399− background: #fff;
400− background: rgba(255, 255, 255, 0.7);
401− margin: 0;
402− }
403−.leaflet-control-attribution,
404−.leaflet-control-scale-line {
405− padding: 0 5px;
406− color: #333;
407− }
408−.leaflet-control-attribution a {
409− text-decoration: none;
410− }
411−.leaflet-control-attribution a:hover {
412− text-decoration: underline;
413− }
414−.leaflet-container .leaflet-control-attribution,
415−.leaflet-container .leaflet-control-scale {
416− font-size: 11px;
417− }
418−.leaflet-left .leaflet-control-scale {
419− margin-left: 5px;
420− }
421−.leaflet-bottom .leaflet-control-scale {
422− margin-bottom: 5px;
423− }
424−.leaflet-control-scale-line {
425− border: 2px solid #777;
426− border-top: none;
427− line-height: 1.1;
428− padding: 2px 5px 1px;
429− font-size: 11px;
430− white-space: nowrap;
431− overflow: hidden;
432− -moz-box-sizing: border-box;
433− box-sizing: border-box;
434−
435− background: #fff;
436− background: rgba(255, 255, 255, 0.5);
437− }
438−.leaflet-control-scale-line:not(:first-child) {
439− border-top: 2px solid #777;
440− border-bottom: none;
441− margin-top: -2px;
442− }
443−.leaflet-control-scale-line:not(:first-child):not(:last-child) {
444− border-bottom: 2px solid #777;
445− }
446−
447−.leaflet-touch .leaflet-control-attribution,
448−.leaflet-touch .leaflet-control-layers,
449−.leaflet-touch .leaflet-bar {
450− box-shadow: none;
451− }
452−.leaflet-touch .leaflet-control-layers,
453−.leaflet-touch .leaflet-bar {
454− border: 2px solid rgba(0,0,0,0.2);
455− background-clip: padding-box;
456− }
457−
458−
459−/* popup */
460−
461−.leaflet-popup {
462− position: absolute;
463− text-align: center;
464− margin-bottom: 20px;
465− }
466−.leaflet-popup-content-wrapper {
467− padding: 1px;
468− text-align: left;
469− border-radius: 12px;
470− }
471−.leaflet-popup-content {
472− margin: 13px 19px;
473− line-height: 1.4;
474− }
475−.leaflet-popup-content p {
476− margin: 18px 0;
477− }
478−.leaflet-popup-tip-container {
479− width: 40px;
480− height: 20px;
481− position: absolute;
482− left: 50%;
483− margin-left: -20px;
484− overflow: hidden;
485− pointer-events: none;
486− }
487−.leaflet-popup-tip {
488− width: 17px;
489− height: 17px;
490− padding: 1px;
491−
492− margin: -10px auto 0;
493−
494− -webkit-transform: rotate(45deg);
495− -moz-transform: rotate(45deg);
496− -ms-transform: rotate(45deg);
497− -o-transform: rotate(45deg);
498− transform: rotate(45deg);
499− }
500−.leaflet-popup-content-wrapper,
501−.leaflet-popup-tip {
502− background: white;
503− color: #333;
504− box-shadow: 0 3px 14px rgba(0,0,0,0.4);
505− }
506−.leaflet-container a.leaflet-popup-close-button {
507− position: absolute;
508− top: 0;
509− right: 0;
510− padding: 4px 4px 0 0;
511− border: none;
512− text-align: center;
513− width: 18px;
514− height: 14px;
515− font: 16px/14px Tahoma, Verdana, sans-serif;
516− color: #c3c3c3;
517− text-decoration: none;
518− font-weight: bold;
519− background: transparent;
520− }
521−.leaflet-container a.leaflet-popup-close-button:hover {
522− color: #999;
523− }
524−.leaflet-popup-scrolled {
525− overflow: auto;
526− border-bottom: 1px solid #ddd;
527− border-top: 1px solid #ddd;
528− }
529−
530−.leaflet-oldie .leaflet-popup-content-wrapper {
531− zoom: 1;
532− }
533−.leaflet-oldie .leaflet-popup-tip {
534− width: 24px;
535− margin: 0 auto;
536−
537− -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
538− filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
539− }
540−.leaflet-oldie .leaflet-popup-tip-container {
541− margin-top: -1px;
542− }
543−
544−.leaflet-oldie .leaflet-control-zoom,
545−.leaflet-oldie .leaflet-control-layers,
546−.leaflet-oldie .leaflet-popup-content-wrapper,
547−.leaflet-oldie .leaflet-popup-tip {
548− border: 1px solid #999;
549− }
550−
551−
552−/* div icon */
553−
554−.leaflet-div-icon {
555− background: #fff;
556− border: 1px solid #666;
557− }
558−
559−
560−/* Tooltip */
561−/* Base styles for the element that has a tooltip */
562−.leaflet-tooltip {
563− position: absolute;
564− padding: 6px;
565− background-color: #fff;
566− border: 1px solid #fff;
567− border-radius: 3px;
568− color: #222;
569− white-space: nowrap;
570− -webkit-user-select: none;
571− -moz-user-select: none;
572− -ms-user-select: none;
573− user-select: none;
574− pointer-events: none;
575− box-shadow: 0 1px 3px rgba(0,0,0,0.4);
576− }
577−.leaflet-tooltip.leaflet-clickable {
578− cursor: pointer;
579− pointer-events: auto;
580− }
581−.leaflet-tooltip-top:before,
582−.leaflet-tooltip-bottom:before,
583−.leaflet-tooltip-left:before,
584−.leaflet-tooltip-right:before {
585− position: absolute;
586− pointer-events: none;
587− border: 6px solid transparent;
588− background: transparent;
589− content: "";
590− }
591−
592−/* Directions */
593−
594−.leaflet-tooltip-bottom {
595− margin-top: 6px;
596−}
597−.leaflet-tooltip-top {
598− margin-top: -6px;
599−}
600−.leaflet-tooltip-bottom:before,
601−.leaflet-tooltip-top:before {
602− left: 50%;
603− margin-left: -6px;
604− }
605−.leaflet-tooltip-top:before {
606− bottom: 0;
607− margin-bottom: -12px;
608− border-top-color: #fff;
609− }
610−.leaflet-tooltip-bottom:before {
611− top: 0;
612− margin-top: -12px;
613− margin-left: -6px;
614− border-bottom-color: #fff;
615− }
616−.leaflet-tooltip-left {
617− margin-left: -6px;
618−}
619−.leaflet-tooltip-right {
620− margin-left: 6px;
621−}
622−.leaflet-tooltip-left:before,
623−.leaflet-tooltip-right:before {
624− top: 50%;
625− margin-top: -6px;
626− }
627−.leaflet-tooltip-left:before {
628− right: 0;
629− margin-right: -12px;
630− border-left-color: #fff;
631− }
632−.leaflet-tooltip-right:before {
633− left: 0;
634− margin-left: -12px;
635− border-right-color: #fff;
636− }
1+/* required styles */
2+
3+.leaflet-pane,
4+.leaflet-tile,
5+.leaflet-marker-icon,
6+.leaflet-marker-shadow,
7+.leaflet-tile-container,
8+.leaflet-pane > svg,
9+.leaflet-pane > canvas,
10+.leaflet-zoom-box,
11+.leaflet-image-layer,
12+.leaflet-layer {
13+ position: absolute;
14+ left: 0;
15+ top: 0;
16+ }
17+.leaflet-container {
18+ overflow: hidden;
19+ }
20+.leaflet-tile,
21+.leaflet-marker-icon,
22+.leaflet-marker-shadow {
23+ -webkit-user-select: none;
24+ -moz-user-select: none;
25+ user-select: none;
26+ -webkit-user-drag: none;
27+ }
28+/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
29+.leaflet-safari .leaflet-tile {
30+ image-rendering: -webkit-optimize-contrast;
31+ }
32+/* hack that prevents hw layers "stretching" when loading new tiles */
33+.leaflet-safari .leaflet-tile-container {
34+ width: 1600px;
35+ height: 1600px;
36+ -webkit-transform-origin: 0 0;
37+ }
38+.leaflet-marker-icon,
39+.leaflet-marker-shadow {
40+ display: block;
41+ }
42+/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
43+/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
44+.leaflet-container .leaflet-overlay-pane svg,
45+.leaflet-container .leaflet-marker-pane img,
46+.leaflet-container .leaflet-shadow-pane img,
47+.leaflet-container .leaflet-tile-pane img,
48+.leaflet-container img.leaflet-image-layer {
49+ max-width: none !important;
50+ max-height: none !important;
51+ }
52+
53+.leaflet-container.leaflet-touch-zoom {
54+ -ms-touch-action: pan-x pan-y;
55+ touch-action: pan-x pan-y;
56+ }
57+.leaflet-container.leaflet-touch-drag {
58+ -ms-touch-action: pinch-zoom;
59+ /* Fallback for FF which doesn't support pinch-zoom */
60+ touch-action: none;
61+ touch-action: pinch-zoom;
62+}
63+.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
64+ -ms-touch-action: none;
65+ touch-action: none;
66+}
67+.leaflet-container {
68+ -webkit-tap-highlight-color: transparent;
69+}
70+.leaflet-container a {
71+ -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
72+}
73+.leaflet-tile {
74+ filter: inherit;
75+ visibility: hidden;
76+ }
77+.leaflet-tile-loaded {
78+ visibility: inherit;
79+ }
80+.leaflet-zoom-box {
81+ width: 0;
82+ height: 0;
83+ -moz-box-sizing: border-box;
84+ box-sizing: border-box;
85+ z-index: 800;
86+ }
87+/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
88+.leaflet-overlay-pane svg {
89+ -moz-user-select: none;
90+ }
91+
92+.leaflet-pane { z-index: 400; }
93+
94+.leaflet-tile-pane { z-index: 200; }
95+.leaflet-overlay-pane { z-index: 400; }
96+.leaflet-shadow-pane { z-index: 500; }
97+.leaflet-marker-pane { z-index: 600; }
98+.leaflet-tooltip-pane { z-index: 650; }
99+.leaflet-popup-pane { z-index: 700; }
100+
101+.leaflet-map-pane canvas { z-index: 100; }
102+.leaflet-map-pane svg { z-index: 200; }
103+
104+.leaflet-vml-shape {
105+ width: 1px;
106+ height: 1px;
107+ }
108+.lvml {
109+ behavior: url(#default#VML);
110+ display: inline-block;
111+ position: absolute;
112+ }
113+
114+
115+/* control positioning */
116+
117+.leaflet-control {
118+ position: relative;
119+ z-index: 800;
120+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
121+ pointer-events: auto;
122+ }
123+.leaflet-top,
124+.leaflet-bottom {
125+ position: absolute;
126+ z-index: 1000;
127+ pointer-events: none;
128+ }
129+.leaflet-top {
130+ top: 0;
131+ }
132+.leaflet-right {
133+ right: 0;
134+ }
135+.leaflet-bottom {
136+ bottom: 0;
137+ }
138+.leaflet-left {
139+ left: 0;
140+ }
141+.leaflet-control {
142+ float: left;
143+ clear: both;
144+ }
145+.leaflet-right .leaflet-control {
146+ float: right;
147+ }
148+.leaflet-top .leaflet-control {
149+ margin-top: 10px;
150+ }
151+.leaflet-bottom .leaflet-control {
152+ margin-bottom: 10px;
153+ }
154+.leaflet-left .leaflet-control {
155+ margin-left: 10px;
156+ }
157+.leaflet-right .leaflet-control {
158+ margin-right: 10px;
159+ }
160+
161+
162+/* zoom and fade animations */
163+
164+.leaflet-fade-anim .leaflet-tile {
165+ will-change: opacity;
166+ }
167+.leaflet-fade-anim .leaflet-popup {
168+ opacity: 0;
169+ -webkit-transition: opacity 0.2s linear;
170+ -moz-transition: opacity 0.2s linear;
171+ -o-transition: opacity 0.2s linear;
172+ transition: opacity 0.2s linear;
173+ }
174+.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
175+ opacity: 1;
176+ }
177+.leaflet-zoom-animated {
178+ -webkit-transform-origin: 0 0;
179+ -ms-transform-origin: 0 0;
180+ transform-origin: 0 0;
181+ }
182+.leaflet-zoom-anim .leaflet-zoom-animated {
183+ will-change: transform;
184+ }
185+.leaflet-zoom-anim .leaflet-zoom-animated {
186+ -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
187+ -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
188+ -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
189+ transition: transform 0.25s cubic-bezier(0,0,0.25,1);
190+ }
191+.leaflet-zoom-anim .leaflet-tile,
192+.leaflet-pan-anim .leaflet-tile {
193+ -webkit-transition: none;
194+ -moz-transition: none;
195+ -o-transition: none;
196+ transition: none;
197+ }
198+
199+.leaflet-zoom-anim .leaflet-zoom-hide {
200+ visibility: hidden;
201+ }
202+
203+
204+/* cursors */
205+
206+.leaflet-interactive {
207+ cursor: pointer;
208+ }
209+.leaflet-grab {
210+ cursor: -webkit-grab;
211+ cursor: -moz-grab;
212+ }
213+.leaflet-crosshair,
214+.leaflet-crosshair .leaflet-interactive {
215+ cursor: crosshair;
216+ }
217+.leaflet-popup-pane,
218+.leaflet-control {
219+ cursor: auto;
220+ }
221+.leaflet-dragging .leaflet-grab,
222+.leaflet-dragging .leaflet-grab .leaflet-interactive,
223+.leaflet-dragging .leaflet-marker-draggable {
224+ cursor: move;
225+ cursor: -webkit-grabbing;
226+ cursor: -moz-grabbing;
227+ }
228+
229+/* marker & overlays interactivity */
230+.leaflet-marker-icon,
231+.leaflet-marker-shadow,
232+.leaflet-image-layer,
233+.leaflet-pane > svg path,
234+.leaflet-tile-container {
235+ pointer-events: none;
236+ }
237+
238+.leaflet-marker-icon.leaflet-interactive,
239+.leaflet-image-layer.leaflet-interactive,
240+.leaflet-pane > svg path.leaflet-interactive {
241+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
242+ pointer-events: auto;
243+ }
244+
245+/* visual tweaks */
246+
247+.leaflet-container {
248+ background: #ddd;
249+ outline: 0;
250+ }
251+.leaflet-container a {
252+ color: #0078A8;
253+ }
254+.leaflet-container a.leaflet-active {
255+ outline: 2px solid orange;
256+ }
257+.leaflet-zoom-box {
258+ border: 2px dotted #38f;
259+ background: rgba(255,255,255,0.5);
260+ }
261+
262+
263+/* general typography */
264+.leaflet-container {
265+ font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
266+ }
267+
268+
269+/* general toolbar styles */
270+
271+.leaflet-bar {
272+ box-shadow: 0 1px 5px rgba(0,0,0,0.65);
273+ border-radius: 4px;
274+ }
275+.leaflet-bar a,
276+.leaflet-bar a:hover {
277+ background-color: #fff;
278+ border-bottom: 1px solid #ccc;
279+ width: 26px;
280+ height: 26px;
281+ line-height: 26px;
282+ display: block;
283+ text-align: center;
284+ text-decoration: none;
285+ color: black;
286+ }
287+.leaflet-bar a,
288+.leaflet-control-layers-toggle {
289+ background-position: 50% 50%;
290+ background-repeat: no-repeat;
291+ display: block;
292+ }
293+.leaflet-bar a:hover {
294+ background-color: #f4f4f4;
295+ }
296+.leaflet-bar a:first-child {
297+ border-top-left-radius: 4px;
298+ border-top-right-radius: 4px;
299+ }
300+.leaflet-bar a:last-child {
301+ border-bottom-left-radius: 4px;
302+ border-bottom-right-radius: 4px;
303+ border-bottom: none;
304+ }
305+.leaflet-bar a.leaflet-disabled {
306+ cursor: default;
307+ background-color: #f4f4f4;
308+ color: #bbb;
309+ }
310+
311+.leaflet-touch .leaflet-bar a {
312+ width: 30px;
313+ height: 30px;
314+ line-height: 30px;
315+ }
316+.leaflet-touch .leaflet-bar a:first-child {
317+ border-top-left-radius: 2px;
318+ border-top-right-radius: 2px;
319+ }
320+.leaflet-touch .leaflet-bar a:last-child {
321+ border-bottom-left-radius: 2px;
322+ border-bottom-right-radius: 2px;
323+ }
324+
325+/* zoom control */
326+
327+.leaflet-control-zoom-in,
328+.leaflet-control-zoom-out {
329+ font: bold 18px 'Lucida Console', Monaco, monospace;
330+ text-indent: 1px;
331+ }
332+
333+.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
334+ font-size: 22px;
335+ }
336+
337+
338+/* layers control */
339+
340+.leaflet-control-layers {
341+ box-shadow: 0 1px 5px rgba(0,0,0,0.4);
342+ background: #fff;
343+ border-radius: 5px;
344+ }
345+.leaflet-control-layers-toggle {
346+ background-image: url(images/layers.png);
347+ width: 36px;
348+ height: 36px;
349+ }
350+.leaflet-retina .leaflet-control-layers-toggle {
351+ background-image: url(images/layers-2x.png);
352+ background-size: 26px 26px;
353+ }
354+.leaflet-touch .leaflet-control-layers-toggle {
355+ width: 44px;
356+ height: 44px;
357+ }
358+.leaflet-control-layers .leaflet-control-layers-list,
359+.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
360+ display: none;
361+ }
362+.leaflet-control-layers-expanded .leaflet-control-layers-list {
363+ display: block;
364+ position: relative;
365+ }
366+.leaflet-control-layers-expanded {
367+ padding: 6px 10px 6px 6px;
368+ color: #333;
369+ background: #fff;
370+ }
371+.leaflet-control-layers-scrollbar {
372+ overflow-y: scroll;
373+ overflow-x: hidden;
374+ padding-right: 5px;
375+ }
376+.leaflet-control-layers-selector {
377+ margin-top: 2px;
378+ position: relative;
379+ top: 1px;
380+ }
381+.leaflet-control-layers label {
382+ display: block;
383+ }
384+.leaflet-control-layers-separator {
385+ height: 0;
386+ border-top: 1px solid #ddd;
387+ margin: 5px -10px 5px -6px;
388+ }
389+
390+/* Default icon URLs */
391+.leaflet-default-icon-path {
392+ background-image: url(images/marker-icon.png);
393+ }
394+
395+
396+/* attribution and scale controls */
397+
398+.leaflet-container .leaflet-control-attribution {
399+ background: #fff;
400+ background: rgba(255, 255, 255, 0.7);
401+ margin: 0;
402+ }
403+.leaflet-control-attribution,
404+.leaflet-control-scale-line {
405+ padding: 0 5px;
406+ color: #333;
407+ }
408+.leaflet-control-attribution a {
409+ text-decoration: none;
410+ }
411+.leaflet-control-attribution a:hover {
412+ text-decoration: underline;
413+ }
414+.leaflet-container .leaflet-control-attribution,
415+.leaflet-container .leaflet-control-scale {
416+ font-size: 11px;
417+ }
418+.leaflet-left .leaflet-control-scale {
419+ margin-left: 5px;
420+ }
421+.leaflet-bottom .leaflet-control-scale {
422+ margin-bottom: 5px;
423+ }
424+.leaflet-control-scale-line {
425+ border: 2px solid #777;
426+ border-top: none;
427+ line-height: 1.1;
428+ padding: 2px 5px 1px;
429+ font-size: 11px;
430+ white-space: nowrap;
431+ overflow: hidden;
432+ -moz-box-sizing: border-box;
433+ box-sizing: border-box;
434+
435+ background: #fff;
436+ background: rgba(255, 255, 255, 0.5);
437+ }
438+.leaflet-control-scale-line:not(:first-child) {
439+ border-top: 2px solid #777;
440+ border-bottom: none;
441+ margin-top: -2px;
442+ }
443+.leaflet-control-scale-line:not(:first-child):not(:last-child) {
444+ border-bottom: 2px solid #777;
445+ }
446+
447+.leaflet-touch .leaflet-control-attribution,
448+.leaflet-touch .leaflet-control-layers,
449+.leaflet-touch .leaflet-bar {
450+ box-shadow: none;
451+ }
452+.leaflet-touch .leaflet-control-layers,
453+.leaflet-touch .leaflet-bar {
454+ border: 2px solid rgba(0,0,0,0.2);
455+ background-clip: padding-box;
456+ }
457+
458+
459+/* popup */
460+
461+.leaflet-popup {
462+ position: absolute;
463+ text-align: center;
464+ margin-bottom: 20px;
465+ }
466+.leaflet-popup-content-wrapper {
467+ padding: 1px;
468+ text-align: left;
469+ border-radius: 12px;
470+ }
471+.leaflet-popup-content {
472+ margin: 13px 19px;
473+ line-height: 1.4;
474+ }
475+.leaflet-popup-content p {
476+ margin: 18px 0;
477+ }
478+.leaflet-popup-tip-container {
479+ width: 40px;
480+ height: 20px;
481+ position: absolute;
482+ left: 50%;
483+ margin-left: -20px;
484+ overflow: hidden;
485+ pointer-events: none;
486+ }
487+.leaflet-popup-tip {
488+ width: 17px;
489+ height: 17px;
490+ padding: 1px;
491+
492+ margin: -10px auto 0;
493+
494+ -webkit-transform: rotate(45deg);
495+ -moz-transform: rotate(45deg);
496+ -ms-transform: rotate(45deg);
497+ -o-transform: rotate(45deg);
498+ transform: rotate(45deg);
499+ }
500+.leaflet-popup-content-wrapper,
501+.leaflet-popup-tip {
502+ background: white;
503+ color: #333;
504+ box-shadow: 0 3px 14px rgba(0,0,0,0.4);
505+ }
506+.leaflet-container a.leaflet-popup-close-button {
507+ position: absolute;
508+ top: 0;
509+ right: 0;
510+ padding: 4px 4px 0 0;
511+ border: none;
512+ text-align: center;
513+ width: 18px;
514+ height: 14px;
515+ font: 16px/14px Tahoma, Verdana, sans-serif;
516+ color: #c3c3c3;
517+ text-decoration: none;
518+ font-weight: bold;
519+ background: transparent;
520+ }
521+.leaflet-container a.leaflet-popup-close-button:hover {
522+ color: #999;
523+ }
524+.leaflet-popup-scrolled {
525+ overflow: auto;
526+ border-bottom: 1px solid #ddd;
527+ border-top: 1px solid #ddd;
528+ }
529+
530+.leaflet-oldie .leaflet-popup-content-wrapper {
531+ zoom: 1;
532+ }
533+.leaflet-oldie .leaflet-popup-tip {
534+ width: 24px;
535+ margin: 0 auto;
536+
537+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
538+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
539+ }
540+.leaflet-oldie .leaflet-popup-tip-container {
541+ margin-top: -1px;
542+ }
543+
544+.leaflet-oldie .leaflet-control-zoom,
545+.leaflet-oldie .leaflet-control-layers,
546+.leaflet-oldie .leaflet-popup-content-wrapper,
547+.leaflet-oldie .leaflet-popup-tip {
548+ border: 1px solid #999;
549+ }
550+
551+
552+/* div icon */
553+
554+.leaflet-div-icon {
555+ background: #fff;
556+ border: 1px solid #666;
557+ }
558+
559+
560+/* Tooltip */
561+/* Base styles for the element that has a tooltip */
562+.leaflet-tooltip {
563+ position: absolute;
564+ padding: 6px;
565+ background-color: #fff;
566+ border: 1px solid #fff;
567+ border-radius: 3px;
568+ color: #222;
569+ white-space: nowrap;
570+ -webkit-user-select: none;
571+ -moz-user-select: none;
572+ -ms-user-select: none;
573+ user-select: none;
574+ pointer-events: none;
575+ box-shadow: 0 1px 3px rgba(0,0,0,0.4);
576+ }
577+.leaflet-tooltip.leaflet-clickable {
578+ cursor: pointer;
579+ pointer-events: auto;
580+ }
581+.leaflet-tooltip-top:before,
582+.leaflet-tooltip-bottom:before,
583+.leaflet-tooltip-left:before,
584+.leaflet-tooltip-right:before {
585+ position: absolute;
586+ pointer-events: none;
587+ border: 6px solid transparent;
588+ background: transparent;
589+ content: "";
590+ }
591+
592+/* Directions */
593+
594+.leaflet-tooltip-bottom {
595+ margin-top: 6px;
596+}
597+.leaflet-tooltip-top {
598+ margin-top: -6px;
599+}
600+.leaflet-tooltip-bottom:before,
601+.leaflet-tooltip-top:before {
602+ left: 50%;
603+ margin-left: -6px;
604+ }
605+.leaflet-tooltip-top:before {
606+ bottom: 0;
607+ margin-bottom: -12px;
608+ border-top-color: #fff;
609+ }
610+.leaflet-tooltip-bottom:before {
611+ top: 0;
612+ margin-top: -12px;
613+ margin-left: -6px;
614+ border-bottom-color: #fff;
615+ }
616+.leaflet-tooltip-left {
617+ margin-left: -6px;
618+}
619+.leaflet-tooltip-right {
620+ margin-left: 6px;
621+}
622+.leaflet-tooltip-left:before,
623+.leaflet-tooltip-right:before {
624+ top: 50%;
625+ margin-top: -6px;
626+ }
627+.leaflet-tooltip-left:before {
628+ right: 0;
629+ margin-right: -12px;
630+ border-left-color: #fff;
631+ }
632+.leaflet-tooltip-right:before {
633+ left: 0;
634+ margin-left: -12px;
635+ border-right-color: #fff;
636+ }
searx/templates/oscar/languages.html+8−12
@@ -1,12 +1,8 @@
1−{% if preferences -%}
2−<select class="custom-select form-control" name='language'>
3−{%- else -%}
4−<select class="time_range custom-select form-control" id='language' name='language'>
5−{%- endif -%}
6− <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
7− {%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
8− <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>
9− {{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id -}}
10− </option>
11− {%- endfor -%}
12−</select>
1+<select class="language custom-select form-control" id="language" name="language" accesskey="l">
2+ <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
3+{%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
4+ <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>
5+ {{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id -}}
6+ </option>
7+{%- endfor -%}
8+</select>
searx/templates/oscar/preferences.html+33−33
@@ -41,7 +41,7 @@
4141 {% set language_label = _('Search language') %}
4242 {% set language_info = _('What language do you prefer for search?') %}
4343 {{ preferences_item_header(language_info, language_label, rtl) }}
44− {% include 'oscar/languages.html' %}
44+ {% include 'oscar/languages.html' %}
4545 {{ preferences_item_footer(language_info, language_label, rtl) }}
4646
4747 {% set locale_label = _('Interface language') %}
@@ -156,26 +156,26 @@
156156 <div class="container-fluid">
157157 <fieldset>
158158 <div class="table-responsive">
159− <table class="table table-hover table-condensed table-striped">
160− <tr>
159+ <table class="table table-hover table-condensed table-striped">
160+ <tr>
161161 {% if not rtl %}
162− <th>{{ _("Allow") }}</th>
163− <th>{{ _("Engine name") }}</th>
164− <th>{{ _("Shortcut") }}</th>
165− <th>{{ _("Selected language") }}</th>
166− <th>{{ _("SafeSearch") }}</th>
167− <th>{{ _("Time range") }}</th>
168− <th>{{ _("Avg. time") }}</th>
169− <th>{{ _("Max time") }}</th>
162+ <th>{{ _("Allow") }}</th>
163+ <th>{{ _("Engine name") }}</th>
164+ <th>{{ _("Shortcut") }}</th>
165+ <th>{{ _("Selected language") }}</th>
166+ <th>{{ _("SafeSearch") }}</th>
167+ <th>{{ _("Time range") }}</th>
168+ <th>{{ _("Avg. time") }}</th>
169+ <th>{{ _("Max time") }}</th>
170170 {% else %}
171− <th>{{ _("Max time") }}</th>
172− <th>{{ _("Avg. time") }}</th>
173− <th>{{ _("Time range") }}</th>
174− <th>{{ _("SafeSearch") }}</th>
175− <th>{{ _("Selected language") }}</th>
176− <th>{{ _("Shortcut") }}</th>
177− <th>{{ _("Engine name") }}</th>
178− <th>{{ _("Allow") }}</th>
171+ <th>{{ _("Max time") }}</th>
172+ <th>{{ _("Avg. time") }}</th>
173+ <th>{{ _("Time range") }}</th>
174+ <th>{{ _("SafeSearch") }}</th>
175+ <th>{{ _("Selected language") }}</th>
176+ <th>{{ _("Shortcut") }}</th>
177+ <th>{{ _("Engine name") }}</th>
178+ <th>{{ _("Allow") }}</th>
179179 {% endif %}
180180 </tr>
181181 {% for search_engine in engines_by_category[categ] %}
@@ -186,19 +186,19 @@
186186 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
187187 </td>
188188 <th>{{ search_engine.name }}</th>
189− <td class="name">{{ shortcuts[search_engine.name] }}</td>
190− <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
191− <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
192− <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
193− <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
194− <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
195− {% else %}
196− <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
197− <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
198− <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
199− <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
200− <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
201− <td>{{ shortcuts[search_engine.name] }}</td>
189+ <td class="name">{{ shortcuts[search_engine.name] }}</td>
190+ <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
191+ <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
192+ <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
193+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
194+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
195+ {% else %}
196+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
197+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
198+ <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
199+ <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
200+ <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
201+ <td>{{ shortcuts[search_engine.name] }}</td>
202202 <th>{{ search_engine.name }}</th>
203203 <td class="onoff-checkbox">
204204 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
@@ -207,7 +207,7 @@
207207 </tr>
208208 {% endif %}
209209 {% endfor %}
210− </table>
210+ </table>
211211 </div>
212212 </fieldset>
213213 </div>
searx/templates/oscar/result_templates/code.html+18−18
@@ -1,18 +1,18 @@
1−{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
2−
3−{{ result_header(result, favicons) }}
4−{{ result_sub_header(result) }}
5−
6−{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
7−
8−{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
9−
10−<div dir="ltr">
11−{{ result.codelines|code_highlighter(result.code_language)|safe }}
12−</div>
13−
14−{% if rtl %}
15−{{ result_footer_rtl(result) }}
16−{% else %}
17−{{ result_footer(result) }}
18−{% endif %}
1+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
2+
3+{{ result_header(result, favicons) }}
4+{{ result_sub_header(result) }}
5+
6+{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
7+
8+{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
9+
10+<div dir="ltr">
11+{{ result.codelines|code_highlighter(result.code_language)|safe }}
12+</div>
13+
14+{% if rtl %}
15+{{ result_footer_rtl(result) }}
16+{% else %}
17+{{ result_footer(result) }}
18+{% endif %}
searx/templates/oscar/result_templates/images.html+1−1
@@ -22,7 +22,7 @@
2222 <span class="label label-default pull-right">{{ result.engine }}</span>{{- "" -}}
2323 <p class="text-muted pull-left">{{ result.pretty_url }}</p>{{- "" -}}
2424 <div class="clearfix"></div>{{- "" -}}
25− <div class="row">{{- "" -}}
25+ <div class="row">{{- "" -}}
2626 <div class="col-md-6">{{- "" -}}
2727 <a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="btn btn-default">{{ _('Get image') }}</a>{{- "" -}}
2828 </div>{{- "" -}}
searx/templates/oscar/result_templates/map.html+72−72
@@ -1,72 +1,72 @@
1−{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
2−
3−{{ result_header(result, favicons) }}
4−{{ result_sub_header(result) }}
5−
6−{% if (result.latitude and result.longitude) or result.boundingbox %}
7− <small> &bull; <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></small>
8−{% endif %}
9−
10−{% if result.osm and (result.osm.type and result.osm.id) %}
11− <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer searx_overpass_request disabled_if_nojs" data-toggle="collapse" data-target="#result-overpass-{{ index }}" data-osm-type="{{ result.osm.type }}" data-osm-id="{{ result.osm.id }}" data-result-table="result-overpass-table-{{ index }}" data-result-table-loadicon="result-overpass-table-loading-{{ index }}" data-btn-text-collapsed="{{ _('show details') }}" data-btn-text-not-collapsed="{{ _('hide details') }}">{{ icon('map-marker') }} {{ _('show details') }}</a></small>
12−{% endif %}
13−
14−{# {% if (result.latitude and result.longitude) %}
15− <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer disabled_if_nojs" data-toggle="collapse" data-target="#result-geodata-{{ index }}" data-btn-text-collapsed="{{ _('show geodata') }}" data-btn-text-not-collapsed="{{ _('hide geodata') }}">{{ icon('map-marker') }} {{ _('show geodata') }}</a></small>
16−{% endif %} #}
17−
18−<div class="container-fluid">
19−
20−{% if result.address %}
21−<p class="row result-content result-adress col-xs-12 col-sm-5 col-md-4" itemscope itemtype="http://schema.org/PostalAddress">
22− {% if result.address.name %}
23− <strong itemprop="name">{{ result.address.name }}</strong><br/>
24− {% endif %}
25− {% if result.address.road %}
26− <span itemprop="streetAddress">
27− {% if result.address.house_number %}{{ result.address.house_number }}, {% endif %}
28− {{ result.address.road }}
29− </span><br/>
30− {% endif %}
31− {% if result.address.locality %}
32− <span itemprop="addressLocality">{{ result.address.locality }}</span>
33− {% if result.address.postcode %}, <span itemprop="postalCode">{{ result.address.postcode }}</span>{% endif %}
34− <br/>
35− {% endif %}
36− {% if result.address.country %}
37− <span itemprop="addressCountry">{{ result.address.country }}</span>
38− {% endif %}
39−</p>
40−{% endif %}
41−
42−{% if result.osm and (result.osm.type and result.osm.id) %}
43− <div class="row result-content collapse col-xs-12 col-sm-7 col-md-8" id="result-overpass-{{ index }}"{% if rtl %} dir="ltr"{% endif %}>
44− <div class="text-center" id="result-overpass-table-loading-{{ index }}"><img src="{{ url_for('static', filename='img/loader.gif') }}" alt="Loading ..."/></div>
45− <table class="table table-striped table-condensed hidden" id="result-overpass-table-{{ index }}">
46− <tr><th>key</th><th>value</th></tr>
47− </table>
48− </div>
49−{% endif %}
50−
51−{# {% if (result.latitude and result.longitude) %}
52− <div class="row collapse col-xs-12 col-sm-5 col-md-4" id="result-geodata-{{ index }}">
53− <strong>Longitude:</strong> {{ result.longitude }} <br/>
54− <strong>Latitude:</strong> {{ result.latitude }}
55− </div>
56−{% endif %} #}
57−
58−{% if result.content %}<p class="row result-content col-xs-12 col-sm-12 col-md-12">{{ result.content|safe }}</p>{% endif %}
59−
60−</div>
61−
62−{% if (result.latitude and result.longitude) or result.boundingbox %}
63− <div class="collapse" id="result-map-{{ index }}">
64− <div style="height:300px; width:100%; margin: 10px 0;" id="osm-map-{{ index }}"></div>
65− </div>
66−{% endif %}
67−
68−{% if rtl %}
69−{{ result_footer_rtl(result) }}
70−{% else %}
71−{{ result_footer(result) }}
72−{% endif %}
1+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
2+
3+{{ result_header(result, favicons) }}
4+{{ result_sub_header(result) }}
5+
6+{% if (result.latitude and result.longitude) or result.boundingbox %}
7+ <small> &bull; <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></small>
8+{% endif %}
9+
10+{% if result.osm and (result.osm.type and result.osm.id) %}
11+ <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer searx_overpass_request disabled_if_nojs" data-toggle="collapse" data-target="#result-overpass-{{ index }}" data-osm-type="{{ result.osm.type }}" data-osm-id="{{ result.osm.id }}" data-result-table="result-overpass-table-{{ index }}" data-result-table-loadicon="result-overpass-table-loading-{{ index }}" data-btn-text-collapsed="{{ _('show details') }}" data-btn-text-not-collapsed="{{ _('hide details') }}">{{ icon('map-marker') }} {{ _('show details') }}</a></small>
12+{% endif %}
13+
14+{# {% if (result.latitude and result.longitude) %}
15+ <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer disabled_if_nojs" data-toggle="collapse" data-target="#result-geodata-{{ index }}" data-btn-text-collapsed="{{ _('show geodata') }}" data-btn-text-not-collapsed="{{ _('hide geodata') }}">{{ icon('map-marker') }} {{ _('show geodata') }}</a></small>
16+{% endif %} #}
17+
18+<div class="container-fluid">
19+
20+{% if result.address %}
21+<p class="row result-content result-adress col-xs-12 col-sm-5 col-md-4" itemscope itemtype="http://schema.org/PostalAddress">
22+ {% if result.address.name %}
23+ <strong itemprop="name">{{ result.address.name }}</strong><br/>
24+ {% endif %}
25+ {% if result.address.road %}
26+ <span itemprop="streetAddress">
27+ {% if result.address.house_number %}{{ result.address.house_number }}, {% endif %}
28+ {{ result.address.road }}
29+ </span><br/>
30+ {% endif %}
31+ {% if result.address.locality %}
32+ <span itemprop="addressLocality">{{ result.address.locality }}</span>
33+ {% if result.address.postcode %}, <span itemprop="postalCode">{{ result.address.postcode }}</span>{% endif %}
34+ <br/>
35+ {% endif %}
36+ {% if result.address.country %}
37+ <span itemprop="addressCountry">{{ result.address.country }}</span>
38+ {% endif %}
39+</p>
40+{% endif %}
41+
42+{% if result.osm and (result.osm.type and result.osm.id) %}
43+ <div class="row result-content collapse col-xs-12 col-sm-7 col-md-8" id="result-overpass-{{ index }}"{% if rtl %} dir="ltr"{% endif %}>
44+ <div class="text-center" id="result-overpass-table-loading-{{ index }}"><img src="{{ url_for('static', filename='img/loader.gif') }}" alt="Loading ..."/></div>
45+ <table class="table table-striped table-condensed hidden" id="result-overpass-table-{{ index }}">
46+ <tr><th>key</th><th>value</th></tr>
47+ </table>
48+ </div>
49+{% endif %}
50+
51+{# {% if (result.latitude and result.longitude) %}
52+ <div class="row collapse col-xs-12 col-sm-5 col-md-4" id="result-geodata-{{ index }}">
53+ <strong>Longitude:</strong> {{ result.longitude }} <br/>
54+ <strong>Latitude:</strong> {{ result.latitude }}
55+ </div>
56+{% endif %} #}
57+
58+{% if result.content %}<p class="row result-content col-xs-12 col-sm-12 col-md-12">{{ result.content|safe }}</p>{% endif %}
59+
60+</div>
61+
62+{% if (result.latitude and result.longitude) or result.boundingbox %}
63+ <div class="collapse" id="result-map-{{ index }}">
64+ <div style="height:300px; width:100%; margin: 10px 0;" id="osm-map-{{ index }}"></div>
65+ </div>
66+{% endif %}
67+
68+{% if rtl %}
69+{{ result_footer_rtl(result) }}
70+{% else %}
71+{{ result_footer(result) }}
72+{% endif %}
searx/templates/oscar/result_templates/videos.html+27−27
@@ -1,27 +1,27 @@
1−{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
2−
3−{{ result_header(result, favicons) }}
4−{{ result_sub_header(result) }}
5−
6−{% if result.embedded %}
7− <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film') }} {{ _('show video') }}</a></small>
8−{% endif %}
9−
10−{% if result.embedded %}
11−<div id="result-video-{{ index }}" class="collapse">
12− {{ result.embedded|safe }}
13−</div>
14−{% endif %}
15−
16−<div class="container-fluid">
17− <div class="row">
18− <a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail col-xs-6 col-sm-4 col-md-4 result-content" src="{{ image_proxify(result.thumbnail) }}" alt="{{ result.title|striptags }} {{ result.engine }}" /></a>
19− {% if result.content %}<p class="col-xs-12 col-sm-8 col-md-8 result-content">{{ result.content|safe }}</p>{% endif %}
20− </div>
21−</div>
22−
23−{% if rtl %}
24−{{ result_footer_rtl(result) }}
25−{% else %}
26−{{ result_footer(result) }}
27−{% endif %}
1+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
2+
3+{{ result_header(result, favicons) }}
4+{{ result_sub_header(result) }}
5+
6+{% if result.embedded %}
7+ <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film') }} {{ _('show video') }}</a></small>
8+{% endif %}
9+
10+{% if result.embedded %}
11+<div id="result-video-{{ index }}" class="collapse">
12+ {{ result.embedded|safe }}
13+</div>
14+{% endif %}
15+
16+<div class="container-fluid">
17+ <div class="row">
18+ <a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail col-xs-6 col-sm-4 col-md-4 result-content" src="{{ image_proxify(result.thumbnail) }}" alt="{{ result.title|striptags }} {{ result.engine }}" /></a>
19+ {% if result.content %}<p class="col-xs-12 col-sm-8 col-md-8 result-content">{{ result.content|safe }}</p>{% endif %}
20+ </div>
21+</div>
22+
23+{% if rtl %}
24+{{ result_footer_rtl(result) }}
25+{% else %}
26+{{ result_footer(result) }}
27+{% endif %}
searx/templates/oscar/results.html+1−1
@@ -100,7 +100,7 @@
100100 {% if unresponsive_engines and results|length >= 1 -%}
101101 <div class="alert alert-danger fade in" role="alert">
102102 <p>{{ _('Engines cannot retrieve results') }}:</p>
103− {%- for engine_name, error_type in unresponsive_engines -%}AAAA
103+ {%- for engine_name, error_type in unresponsive_engines -%}
104104 {{- engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}{{- "" -}}
105105 {%- endfor -%}
106106 </div>
searx/templates/oscar/search.html+1−1
@@ -3,7 +3,7 @@
33 <div class="row">
44 <div class="col-xs-12 col-md-8">
55 <div class="input-group search-margin">
6− <input type="search" name="q" class="form-control" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}">
6+ <input type="search" name="q" class="form-control" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}" accesskey="s">
77 <span class="input-group-btn">
88 <button type="submit" class="btn btn-default" aria-label="{{ _('Start search') }}"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
99 </span>
searx/templates/oscar/search_full.html+18−18
@@ -1,18 +1,18 @@
1−{% from 'oscar/macros.html' import icon %}
2−
3−<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form" role="search">
4− {% if rtl %}
5− <div class="input-group">
6− {% else %}
7− <div class="input-group col-md-8 col-md-offset-2">
8− {% endif %}
9− <input type="search" name="q" class="form-control input-lg autofocus" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}">
10− <span class="input-group-btn">
11− <button type="submit" class="btn btn-default input-lg" aria-label="{{ _('Start search') }}"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
12− </span>
13− </div>
14− <div class="col-md-8 col-md-offset-2 advanced">
15− {% include 'oscar/advanced.html' %}
16− </div>
17−
18−</form><!-- / #search_form_full -->
1+{% from 'oscar/macros.html' import icon %}
2+
3+<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form" role="search">
4+ {% if rtl %}
5+ <div class="input-group">
6+ {% else %}
7+ <div class="input-group col-md-8 col-md-offset-2">
8+ {% endif %}
9+ <input type="search" name="q" class="form-control input-lg autofocus" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}" accesskey="s">
10+ <span class="input-group-btn">
11+ <button type="submit" class="btn btn-default input-lg" aria-label="{{ _('Start search') }}"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
12+ </span>
13+ </div>
14+ <div class="col-md-8 col-md-offset-2 advanced">
15+ {% include 'oscar/advanced.html' %}
16+ </div>
17+
18+</form><!-- / #search_form_full -->
searx/templates/oscar/time-range.html+1−1
@@ -1,4 +1,4 @@
1−<select name="time_range" id="time-range" class="custom-select form-control">{{- "" -}}
1+<select name="time_range" id="time-range" class="custom-select form-control" accesskey="t">{{- "" -}}
22 <option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}>
33 {{- _('Anytime') -}}
44 </option>{{- "" -}}