diff options
| author | Alex <alex@al-f.net> | 2018-08-09 16:13:50 +0200 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2018-08-14 17:21:30 +0200 |
| commit | 3ba0d0516e5cabce8ebcc9a27c0fe069fa23f52c (patch) | |
| tree | dffd7311f1bf9bba9386101c67f5e03c30a53116 /searx/static/themes/simple/less | |
| parent | 845ba79e7532dedad2bb96e5d68504b6729bee14 (diff) | |
simple theme update
- npm package update
- apply #1226
- implement vim help dialog
- display cookies and search URL with preferences
- allow to enable / disable Open Access DOI rewrite
- add a clear text button on the left of the search button
- implement #1011 : the HTML title page is not set when using POST
- remove searx/static/themes/simple/img/loader.gif
- use full width when only there are only images as result
Diffstat (limited to 'searx/static/themes/simple/less')
| -rw-r--r-- | searx/static/themes/simple/less/#toolkit_loader.less# | 0 | ||||
| l--------- | searx/static/themes/simple/less/.#toolkit_loader.less | 1 | ||||
| -rw-r--r-- | searx/static/themes/simple/less/ion.less | 17 | ||||
| -rw-r--r-- | searx/static/themes/simple/less/mixins.less | 2 | ||||
| -rw-r--r-- | searx/static/themes/simple/less/normalize.less | 152 | ||||
| -rw-r--r-- | searx/static/themes/simple/less/preferences.less | 25 | ||||
| -rw-r--r-- | searx/static/themes/simple/less/search.less | 34 | ||||
| -rw-r--r-- | searx/static/themes/simple/less/style.less | 46 | ||||
| -rw-r--r-- | searx/static/themes/simple/less/toolkit.less | 134 | ||||
| -rw-r--r-- | searx/static/themes/simple/less/toolkit_loader.less | 41 |
10 files changed, 293 insertions, 159 deletions
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 000000000..e69de29bb --- /dev/null +++ b/searx/static/themes/simple/less/#toolkit_loader.less# diff --git a/searx/static/themes/simple/less/.#toolkit_loader.less b/searx/static/themes/simple/less/.#toolkit_loader.less new file mode 120000 index 000000000..f93593380 --- /dev/null +++ b/searx/static/themes/simple/less/.#toolkit_loader.less @@ -0,0 +1 @@ +alexandre@alf-laptop.2449:1533915028
\ No newline at end of file diff --git a/searx/static/themes/simple/less/ion.less b/searx/static/themes/simple/less/ion.less index f21580623..c9e715591 100644 --- a/searx/static/themes/simple/less/ion.less +++ b/searx/static/themes/simple/less/ion.less @@ -3,12 +3,12 @@ @font-face { font-family:"ion"; - src:url("../fonts/ion.eot?492c5e946f5ae6f02467d64ca0f55cd1"); + src:url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51"); src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"), - url("../fonts/ion.woff2?492c5e946f5ae6f02467d64ca0f55cd1") format("woff2"), - url("../fonts/ion.woff?492c5e946f5ae6f02467d64ca0f55cd1") format("woff"), - url("../fonts/ion.ttf?492c5e946f5ae6f02467d64ca0f55cd1") format("truetype"), - url("../fonts/ion.svg?492c5e946f5ae6f02467d64ca0f55cd1#ion") format("svg"); + url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"), + url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"), + url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"), + url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg"); font-weight:normal; font-style:normal; } @@ -172,3 +172,10 @@ } } + +.ion-close { + &:before { + content:"\f115"; + } +} + diff --git a/searx/static/themes/simple/less/mixins.less b/searx/static/themes/simple/less/mixins.less index 097ab4964..b3aa4e13d 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 fa4e73dd4..47b010e47 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 b8e096cd5..e1e88b51f 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 beeac3e8a..dbcfc932e 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 b79b3eb24..9f69f7a80 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 641747c6c..46ea17b3a 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 000000000..7ef19c19b --- /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 |