diff options
Diffstat (limited to 'searx/static')
21 files changed, 395 insertions, 248 deletions
diff --git a/searx/static/plugins/css/infinite_scroll.css b/searx/static/plugins/css/infinite_scroll.css index 7e0ee20..07b9f6d 100644 --- a/searx/static/plugins/css/infinite_scroll.css +++ b/searx/static/plugins/css/infinite_scroll.css @@ -14,3 +14,6 @@ border-radius: 50% !important; margin: 0 auto; } +#pagination button { + visibility: hidden; +} diff --git a/searx/static/plugins/js/vim_hotkeys.js b/searx/static/plugins/js/vim_hotkeys.js index 61500d8..13bd070 100644 --- a/searx/static/plugins/js/vim_hotkeys.js +++ b/searx/static/plugins/js/vim_hotkeys.js @@ -104,7 +104,7 @@ $(document).ready(function() { } }; - $(document).keyup(function(e) { + $(document).keydown(function(e) { // check for modifiers so we don't break browser's hotkeys if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey @@ -118,6 +118,7 @@ $(document).ready(function() { } } else { if (e.target === document.body) { + e.preventDefault(); vimKeys[e.keyCode].fun(); } } diff --git a/searx/static/themes/oscar/gruntfile.js b/searx/static/themes/oscar/gruntfile.js index b86b883..5913994 100644 --- a/searx/static/themes/oscar/gruntfile.js +++ b/searx/static/themes/oscar/gruntfile.js @@ -81,9 +81,16 @@ module.exports = function(grunt) { } }); - grunt.loadNpmTasks('grunt-contrib-uglify', '/usr/lib/nodejs'); - grunt.loadNpmTasks('grunt-contrib-concat', '/usr/lib/nodejs'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-less'); - grunt.registerTask('default', ['concat', 'uglify']); + grunt.registerTask('test', ['jshint']); + + grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less']); + + grunt.registerTask('styles', ['less']); }; diff --git a/searx/static/themes/oscar/img/icons/README.md b/searx/static/themes/oscar/img/icons/README.md deleted file mode 100644 index 0e3ad1c..0000000 --- a/searx/static/themes/oscar/img/icons/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Source: http://www.iconspedia.com/pack/flat-gradient-social-icons-4384/ -License: Free for non commercial use. diff --git a/searx/static/themes/oscar/less/logicodev/search.less b/searx/static/themes/oscar/less/logicodev/search.less index fa1e0e8..d65e305 100644 --- a/searx/static/themes/oscar/less/logicodev/search.less +++ b/searx/static/themes/oscar/less/logicodev/search.less @@ -18,6 +18,7 @@ padding-bottom: 0.4rem; padding-top: 0.4rem; text-align: center; + min-width: 50px; } label:last-child, .input-group-addon:last-child { border-right: @mild-gray 1px solid; diff --git a/searx/static/themes/oscar/less/pointhi/search.less b/searx/static/themes/oscar/less/pointhi/search.less index cea6799..5ff7336 100644 --- a/searx/static/themes/oscar/less/pointhi/search.less +++ b/searx/static/themes/oscar/less/pointhi/search.less @@ -18,6 +18,7 @@ padding-bottom: 0.8rem; padding-top: 0.8rem; text-align: center; + min-width: 50px; } label:last-child, .input-group-addon:last-child { diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 1d53319..a0f9fd7 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -25,6 +25,10 @@ module.exports = function(grunt) { output: { comments: 'some' }, + ie8: false, + warnings: true, + compress: false, + mangle: true, sourceMap: true }, dist: { @@ -60,6 +64,12 @@ module.exports = function(grunt) { production: { options: { paths: ["less"], + plugins: [ + new (require('less-plugin-clean-css'))({ + advanced: true, + compatibility: '*' + }) + ], banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n' }, files: { @@ -93,7 +103,8 @@ module.exports = function(grunt) { 'node_modules/ionicons-npm/src/music-note.svg', 'node_modules/ionicons-npm/src/ion-close-round.svg', 'node_modules/ionicons-npm/src/android-more-vertical.svg', - 'magnet.svg' + 'magnet.svg', + 'node_modules/ionicons-npm/src/android-close.svg', ], dest: 'fonts', destLess: 'less', @@ -133,8 +144,15 @@ module.exports = function(grunt) { } }); - grunt.loadNpmTasks('grunt-contrib-uglify', '/usr/lib/nodejs'); - grunt.loadNpmTasks('grunt-contrib-concat', '/usr/lib/nodejs'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-less'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-webfont'); - grunt.registerTask('default', ['concat', 'uglify']); + grunt.registerTask('test', ['jshint']); + + grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less:development', 'less:production']); }; diff --git a/searx/static/themes/simple/img/loader.gif b/searx/static/themes/simple/img/loader.gif Binary files differdeleted file mode 100644 index 419cdee..0000000 --- a/searx/static/themes/simple/img/loader.gif +++ /dev/null diff --git a/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js b/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js index fca7e16..fb52442 100644 --- a/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js +++ b/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js @@ -147,9 +147,18 @@ } }; + searx.insertBefore = function (newNode, referenceNode) { + element.parentNode.insertBefore(newNode, referenceNode); + }; + + searx.insertAfter = function(newNode, referenceNode) { + referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); + }; + searx.on('.close', 'click', function(e) { var el = e.target || e.srcElement; - this.parentNode.style.display="None"; + this.parentNode.classList.add('invisible'); }); + return searx; })(window, document, window.searx); diff --git a/searx/static/themes/simple/js/searx_src/autocomplete.js b/searx/static/themes/simple/js/searx_src/autocomplete.js index 4bbe017..b95fbcf 100644 --- a/searx/static/themes/simple/js/searx_src/autocomplete.js +++ b/searx/static/themes/simple/js/searx_src/autocomplete.js @@ -1,51 +1,4 @@ -(function(f){ - if(typeof exports=== "object" && typeof module !== "undefined") { - module.exports = f() - } else if(typeof define === "function" && define.amd) { - define([], f) - }else{ - var g; - if(typeof window !== "undefined") { - g = window - } else if(typeof global !== "undefined") { - g = global - } else if(typeof self !== "undefined") { - g = self - } else { - g = this - } - g.AutoComplete = f() - } -})(function(){ - var define, module, exports; - return (function e(t, n, r){ - function s(o, u){ - if(!n[o]){ - if(!t[o]){ - var a = typeof require == "function" && require; - if(!u && a) - return a(o, !0); - if(i) - return i(o, !0); - var f = new Error("Cannot find module '" + o + "'"); - throw f.code = "MODULE_NOT_FOUND", f - } - var l = n[o] = { - exports:{} - }; - t[o][0].call(l.exports,function(e) { - var n = t[o][1][e]; - return s(n?n:e) - }, l, l.exports, e, t, n, r) - } - return n[o].exports - } - var i = typeof require == "function" && require; - for(var o = 0; o < r.length; o++) - s(r[o]); - return s - })({ - 1:[function(require, module, exports){ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ /* * @license MIT * diff --git a/searx/static/themes/simple/js/searx_src/searx_keyboard.js b/searx/static/themes/simple/js/searx_src/searx_keyboard.js index 6365b52..657d9ec 100644 --- a/searx/static/themes/simple/js/searx_src/searx_keyboard.js +++ b/searx/static/themes/simple/js/searx_src/searx_keyboard.js @@ -116,7 +116,7 @@ searx.ready(function() { } }; - searx.on(document, "keyup", function(e) { + searx.on(document, "keydown", function(e) { // check for modifiers so we don't break browser's hotkeys if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) { var tagName = e.target.tagName.toLowerCase(); @@ -126,6 +126,7 @@ searx.ready(function() { } } else { if (e.target === document.body || tagName === 'a' || tagName === 'button') { + e.preventDefault(); vimKeys[e.keyCode].fun(); } } @@ -290,13 +291,7 @@ searx.ready(function() { }; } - function toggleHelp() { - var helpPanel = document.querySelector('#vim-hotkeys-help'); - if (helpPanel.length) { - helpPanel.classList.toggle('hidden'); - return; - } - + function initHelpContent(divElement) { var categories = {}; for (var k in vimKeys) { @@ -313,14 +308,9 @@ searx.ready(function() { return; } - var html = '<div id="vim-hotkeys-help" class="well vim-hotkeys-help">'; - html += '<div class="container-fluid">'; - - html += '<div class="row">'; - html += '<div class="col-sm-12">'; - html += '<h3>How to navigate searx with Vim-like hotkeys</h3>'; - html += '</div>'; // col-sm-12 - html += '</div>'; // row + var html = '<a href="#" class="close" aria-label="close" title="close">×</a>'; + html += '<h3>How to navigate searx with Vim-like hotkeys</h3>'; + html += '<table>'; for (var i = 0; i < sorted.length; i++) { var cat = categories[sorted[i]]; @@ -329,13 +319,11 @@ searx.ready(function() { var first = i % 2 === 0; if (first) { - html += '<div class="row dflex">'; + html += '<tr>'; } - html += '<div class="col-sm-' + (first && lastCategory ? 12 : 6) + ' dflex">'; + html += '<td>'; - html += '<div class="panel panel-default iflex">'; - html += '<div class="panel-heading">' + cat[0].cat + '</div>'; - html += '<div class="panel-body">'; + html += '<h4>' + cat[0].cat + '</h4>'; html += '<ul class="list-unstyled">'; for (var cj in cat) { @@ -343,18 +331,36 @@ searx.ready(function() { } html += '</ul>'; - html += '</div>'; // panel-body - html += '</div>'; // panel - html += '</div>'; // col-sm-* + html += '</td>'; // col-sm-* if (!first || lastCategory) { - html += '</div>'; // row + html += '</tr>'; // row } } - html += '</div>'; // container-fluid - html += '</div>'; // vim-hotkeys-help + html += '</table>'; + + divElement.innerHTML = html; + } + + function toggleHelp() { + var helpPanel = document.querySelector('#vim-hotkeys-help'); + console.log(helpPanel); + if (helpPanel === undefined || helpPanel === null) { + // first call + helpPanel = document.createElement('div'); + helpPanel.id = 'vim-hotkeys-help'; + helpPanel.className='dialog-modal'; + helpPanel.style='width: 40%'; + initHelpContent(helpPanel); + var body = document.getElementsByTagName('body')[0]; + body.appendChild(helpPanel); + } else { + // togggle hidden + helpPanel.classList.toggle('invisible'); + return; + } - $('body').append(html); } + }); diff --git a/searx/static/themes/simple/js/searx_src/searx_mapresult.js b/searx/static/themes/simple/js/searx_src/searx_mapresult.js index 823f648..869d07d 100644 --- a/searx/static/themes/simple/js/searx_src/searx_mapresult.js +++ b/searx/static/themes/simple/js/searx_src/searx_mapresult.js @@ -90,13 +90,14 @@ newHtml += "</td></tr>"; } } - result_table_loadicon.classList.add('invisible'); + result_table_loadicon.parentNode.removeChild(result_table_loadicon); result_table.classList.remove('invisible'); result_table.querySelector("tbody").innerHTML = newHtml; } }) .catch(function() { - result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "<p class=\"text-muted\">could not load data!</p>"; + result_table_loadicon.classList.remove('invisible'); + result_table_loadicon.innerHTML = "could not load data!"; }); } } diff --git a/searx/static/themes/simple/js/searx_src/searx_search.js b/searx/static/themes/simple/js/searx_src/searx_search.js index 1b93f90..964be21 100644 --- a/searx/static/themes/simple/js/searx_src/searx_search.js +++ b/searx/static/themes/simple/js/searx_src/searx_search.js @@ -33,6 +33,26 @@ } } + function createClearButton(qinput) { + var cs = document.getElementById('clear_search'); + var updateClearButton = function() { + if (qinput.value.length === 0) { + cs.classList.add("empty"); + } else { + cs.classList.remove("empty"); + } + }; + + // update status, event listener + updateClearButton(); + cs.addEventListener('click', function() { + qinput.value=''; + qinput.focus(); + updateClearButton(); + }); + qinput.addEventListener('keyup', updateClearButton, false); + } + searx.ready(function() { qinput = d.getElementById(qinput_id); @@ -46,6 +66,9 @@ } if (qinput !== null) { + // clear button + createClearButton(qinput); + // autocompleter if (searx.autocompleter) { searx.autocomplete = AutoComplete.call(w, { diff --git a/searx/static/themes/simple/less/mixins.less b/searx/static/themes/simple/less/mixins.less index 097ab49..b3aa4e1 100644 --- a/searx/static/themes/simple/less/mixins.less +++ b/searx/static/themes/simple/less/mixins.less @@ -30,7 +30,7 @@ .select-all-on-focus() { -webkit-user-select: all; -moz-user-select: all; - -ms-user-select: all; + -ms-user-select: element; user-select: all; } diff --git a/searx/static/themes/simple/less/normalize.less b/searx/static/themes/simple/less/normalize.less index fa4e73d..47b010e 100644 --- a/searx/static/themes/simple/less/normalize.less +++ b/searx/static/themes/simple/less/normalize.less @@ -1,17 +1,15 @@ -/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ +/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ /* Document ========================================================================== */ /** * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in - * IE on Windows Phone and in iOS. + * 2. Prevent adjustments of font size after orientation changes in iOS. */ html { line-height: 1.15; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } @@ -19,7 +17,7 @@ html { ========================================================================== */ /** - * Remove the margin in all browsers (opinionated). + * Remove the margin in all browsers. */ body { @@ -27,19 +25,6 @@ body { } /** - * Add the correct display in IE 9-. - */ - -article, -aside, -footer, -header, -nav, -section { - display: block; -} - -/** * Correct the font size and margin on `h1` elements within `section` and * `article` contexts in Chrome, Firefox, and Safari. */ @@ -53,25 +38,6 @@ h1 { ========================================================================== */ /** - * Add the correct display in IE 9-. - * 1. Add the correct display in IE. - */ - -figcaption, -figure, -main { /* 1 */ - display: block; -} - -/** - * Add the correct margin in IE 8. - */ - -figure { - margin: 1em 40px; -} - -/** * 1. Add the correct box sizing in Firefox. * 2. Show the overflow in Edge and IE. */ @@ -96,17 +62,15 @@ pre { ========================================================================== */ /** - * 1. Remove the gray background on active links in IE 10. - * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + * Remove the gray background on active links in IE 10. */ a { - background-color: transparent; /* 1 */ - -webkit-text-decoration-skip: objects; /* 2 */ + background-color: transparent; } /** - * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 1. Remove the bottom border in Chrome 57- * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. */ @@ -117,15 +81,6 @@ abbr[title] { } /** - * Prevent the duplicate application of `bolder` by the next rule in Safari 6. - */ - -b, -strong { - font-weight: inherit; -} - -/** * Add the correct font weight in Chrome, Edge, and Safari. */ @@ -147,23 +102,6 @@ samp { } /** - * Add the correct font style in Android 4.3-. - */ - -dfn { - font-style: italic; -} - -/** - * Add the correct background and color in IE 9-. - */ - -mark { - background-color: #ff0; - color: #000; -} - -/** * Add the correct font size in all browsers. */ @@ -196,44 +134,18 @@ sup { ========================================================================== */ /** - * Add the correct display in IE 9-. - */ - -audio, -video { - display: inline-block; -} - -/** - * Add the correct display in iOS 4-7. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Remove the border on images inside links in IE 10-. + * Remove the border on images inside links in IE 10. */ img { border-style: none; } -/** - * Hide the overflow in IE. - */ - -svg:not(:root) { - overflow: hidden; -} - /* Forms ========================================================================== */ /** - * 1. Change the font styles in all browsers (opinionated). + * 1. Change the font styles in all browsers. * 2. Remove the margin in Firefox and Safari. */ @@ -242,7 +154,7 @@ input, optgroup, select, textarea { - font-family: sans-serif; /* 1 */ + font-family: inherit; /* 1 */ font-size: 100%; /* 1 */ line-height: 1.15; /* 1 */ margin: 0; /* 2 */ @@ -269,16 +181,14 @@ select { /* 1 */ } /** - * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` - * controls in Android 4. - * 2. Correct the inability to style clickable types in iOS and Safari. + * Correct the inability to style clickable types in iOS and Safari. */ button, -html [type="button"], /* 1 */ +[type="button"], [type="reset"], [type="submit"] { - -webkit-appearance: button; /* 2 */ + -webkit-appearance: button; } /** @@ -329,17 +239,15 @@ legend { } /** - * 1. Add the correct display in IE 9-. - * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + * Add the correct vertical alignment in Chrome, Firefox, and Opera. */ progress { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ + vertical-align: baseline; } /** - * Remove the default vertical scrollbar in IE. + * Remove the default vertical scrollbar in IE 10+. */ textarea { @@ -347,8 +255,8 @@ textarea { } /** - * 1. Add the correct box sizing in IE 10-. - * 2. Remove the padding in IE 10-. + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. */ [type="checkbox"], @@ -377,10 +285,9 @@ textarea { } /** - * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + * Remove the inner padding in Chrome and Safari on macOS. */ -[type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration { -webkit-appearance: none; } @@ -399,12 +306,10 @@ textarea { ========================================================================== */ /* - * Add the correct display in IE 9-. - * 1. Add the correct display in Edge, IE, and Firefox. + * Add the correct display in Edge, IE 10+, and Firefox. */ -details, /* 1 */ -menu { +details { display: block; } @@ -416,30 +321,19 @@ summary { display: list-item; } -/* Scripting +/* Misc ========================================================================== */ /** - * Add the correct display in IE 9-. - */ - -canvas { - display: inline-block; -} - -/** - * Add the correct display in IE. + * Add the correct display in IE 10+. */ template { display: none; } -/* Hidden - ========================================================================== */ - /** - * Add the correct display in IE 10-. + * Add the correct display in IE 10. */ [hidden] { diff --git a/searx/static/themes/simple/less/preferences.less b/searx/static/themes/simple/less/preferences.less index b8e096c..e1e88b5 100644 --- a/searx/static/themes/simple/less/preferences.less +++ b/searx/static/themes/simple/less/preferences.less @@ -45,6 +45,24 @@ text-align: center; } + table.cookies { + width: auto; + + th, td { + text-align: left; + padding: 0.25em; + } + + th:first-child, td:first-child { + padding-right: 4em; + } + + &>tbody>tr:nth-child(even)>th, + &>tbody>tr:nth-child(even)>td { + background-color: @color-settings-tr-hover; + } + } + .name, .shortcut { text-align: left; } @@ -69,6 +87,13 @@ } } + + div.selectable_url { + pre { + width: 100%; + } + } + } @media screen and (max-width: 75em) { diff --git a/searx/static/themes/simple/less/search.less b/searx/static/themes/simple/less/search.less index beeac3e..dbcfc93 100644 --- a/searx/static/themes/simple/less/search.less +++ b/searx/static/themes/simple/less/search.less @@ -26,11 +26,43 @@ */ } +#clear_search { + display: block; + border-collapse: separate; + box-sizing: border-box; + width: 1.8em; + + margin: 0; + padding: 2px; + height: 2.2em; + background: none repeat scroll 0 0 @color-search-background; + border-top: 1px solid @color-search-border; + border-bottom: 1px solid @color-search-border; + border-right: none; + border-left: none; + border-radius: 0px; + outline: none; + color: @color-search-font; + font-size: 16px; + z-index: 10000; + + &:hover { + color: @color-search-border; + } + + &.empty * { + display: none; + } +} + +#q::-ms-clear, #q::-webkit-search-cancel-button { + display: none; +} + #q, #send_search { display: block !important; border-collapse: separate; box-sizing: border-box; - position: relative; margin: 0; padding: 2px; diff --git a/searx/static/themes/simple/less/style.less b/searx/static/themes/simple/less/style.less index b79b3eb..9f69f7a 100644 --- a/searx/static/themes/simple/less/style.less +++ b/searx/static/themes/simple/less/style.less @@ -477,25 +477,9 @@ article.result-images[data-vim-selected]::before { #search_url { margin-top: 8px; - div { - display: block; - border: 1px solid @color-result-search-url-border; - padding: 4px; - color: @color-result-search-url-font; - width: 100%; - display: block; - margin: 0.1em; - overflow: hidden; - height: 1.2em; - line-height: 1.2em; - + div.selectable_url { pre { - display: block; width: 200em; - font-size: 0.8em; - word-break: break-all; - margin: 0.1em; - .select-all-on-focus(); } } } @@ -648,6 +632,34 @@ article.result-images[data-vim-selected]::before { } +#main_results div#results.only_template_images { + flex-direction: column; + width: auto; + display: flex; + + #sidebar { + position: relative; + top: auto; + order: 2; + } + + #urls { + position: relative; + order: 1; + } + + #backToTop { + right: 0.5em; + left: auto; + } + + #pagination { + position: relative; + order: 3; + } +} + + @media screen and (max-width: @results-width) { article[data-vim-selected]::before { diff --git a/searx/static/themes/simple/less/toolkit.less b/searx/static/themes/simple/less/toolkit.less index 641747c..46ea17b 100644 --- a/searx/static/themes/simple/less/toolkit.less +++ b/searx/static/themes/simple/less/toolkit.less @@ -20,7 +20,16 @@ html.js .show_if_nojs { } .invisible { - display: none; + display: none !important; +} + +.list-unstyled { + list-style-type: none; + + li { + margin-top: 4px; + margin-bottom: 4px; + } } .danger { @@ -39,6 +48,15 @@ html.js .show_if_nojs { border-radius: 5px; } +// kbd +kbd { + padding: 2px 4px; + margin: 1px; + font-size: 90%; + color: white; + background: black; +} + // table table { @@ -65,6 +83,32 @@ tr { } } +// pre +.pre() { + display: block; + font-size: 0.8em; + word-break: break-all; + margin: 0.1em; + .select-all-on-focus(); +} + +div.selectable_url { + display: block; + border: 1px solid @color-result-search-url-border; + padding: 4px; + color: @color-result-search-url-font; + width: 100%; + display: block; + margin: 0.1em; + overflow: hidden; + height: 1.2em; + line-height: 1.2em; + + pre { + .pre(); + } +} + // dialog .dialog() { position: relative; @@ -95,6 +139,28 @@ tr { margin: 1px 0 0 0; } + table { + width: auto; + } + + tr { + vertical-align: text-top; + + &:hover { + background: transparent; + } + } + + td { + padding: 0 1em 0 0; + } + + + h4 { + margin-top: 0.3em; + margin-bottom: 0.3em; + } + } .dialog-error { @@ -113,6 +179,19 @@ tr { .ion-warning(); } +.dialog-modal { + .dialog(); + background: white; + position: fixed; + top: 50%; + left: 50%; + /* bring your own prefixes */ + transform: translate(-50%, -50%); + z-index: 100000; + margin: 0 50% 0 0; + box-shadow: 0 0 1em; +} + // btn-collapse .btn-collapse { cursor: pointer; @@ -128,7 +207,7 @@ tr { border: none; } -// tabs +/* -- tabs --*/ .tabs .tabs > label { font-size: 90%; } @@ -215,7 +294,7 @@ html body .tabs > input:checked { } } -// select +/* -- select -- */ select { height: 28px; margin: 0 1em 0 0; @@ -251,7 +330,7 @@ select { } -// checkbox-onoff +/* -- checkbox-onoff -- */ @supports (border-radius: 50px) { .checkbox-onoff { display: inline-block; @@ -285,7 +364,7 @@ select { } } -// checkbox +/* -- checkbox --*/ @supports (transform: rotate(-45deg)) { .checkbox { width: 20px; @@ -325,7 +404,7 @@ select { } } - // disabled : can't be focused, show only the check mark + // disabled : can''t be focused, show only the check mark input[disabled] + label { background-color: transparent !important; box-shadow: none !important; @@ -344,3 +423,46 @@ select { width: 100%; } } + +/* -- loader -- */ +.loader, +.loader:after { + border-radius: 50%; + width: 2em; + height: 2em; +} +.loader { + margin: 1em auto; + font-size: 10px; + position: relative; + text-indent: -9999em; + border-top: 0.5em solid rgba(0, 0, 0, 0.2); + border-right: 0.5em solid rgba(0, 0, 0, 0.2); + border-bottom: 0.5em solid rgba(0, 0, 0, 0.2); + border-left: 0.5em solid rgba(255, 255, 255, 0); + -webkit-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); + -webkit-animation: load8 1.2s infinite linear; + animation: load8 1.2s infinite linear; +} +@-webkit-keyframes load8 { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes load8 { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +}
\ No newline at end of file diff --git a/searx/static/themes/simple/less/toolkit_loader.less b/searx/static/themes/simple/less/toolkit_loader.less new file mode 100644 index 0000000..7ef19c1 --- /dev/null +++ b/searx/static/themes/simple/less/toolkit_loader.less @@ -0,0 +1,41 @@ +.loader, +.loader:after { + border-radius: 50%; + width: 10em; + height: 10em; +} +.loader { + margin: 60px auto; + font-size: 10px; + position: relative; + text-indent: -9999em; + border-top: 1.1em solid rgba(255, 255, 255, 0.2); + border-right: 1.1em solid rgba(255, 255, 255, 0.2); + border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); + border-left: 1.1em solid #ffffff; + -webkit-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); + -webkit-animation: load8 1.1s infinite linear; + animation: load8 1.1s infinite linear; +} +@-webkit-keyframes load8 { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes load8 { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +}
\ No newline at end of file diff --git a/searx/static/themes/simple/package.json b/searx/static/themes/simple/package.json index f3d6bbf..5150e81 100644 --- a/searx/static/themes/simple/package.json +++ b/searx/static/themes/simple/package.json @@ -1,15 +1,15 @@ { "devDependencies": { - "grunt": "~1.0.1", + "grunt": "~1.0.3", "grunt-contrib-concat": "~1.0.1", "grunt-contrib-cssmin": "^2.2.1", "grunt-contrib-jshint": "~1.1.0", "grunt-contrib-less": "^1.4.1", - "grunt-contrib-uglify": "~3.0.1", - "grunt-contrib-watch": "~1.0.0", - "grunt-webfont": "^1.6.0", + "grunt-contrib-uglify": "~3.4.0", + "grunt-contrib-watch": "~1.1.0", + "grunt-webfont": "^1.7.1", "ionicons-npm": "^2.0.1", - "jslint": "^0.10.3", + "jslint": "^0.12.0", "less-plugin-clean-css": "^1.5.1" }, "scripts": { |