1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-19 02:40:11 +01:00

Merge pull request #510 from mrpaulblack/result-article-improvments

[simple theme] rework select and impove url
This commit is contained in:
Paul Braeuning 2021-11-23 11:04:34 +01:00 committed by GitHub
commit a87f1eb9ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 377 additions and 214 deletions

File diff suppressed because one or more lines are too long

View File

@ -802,11 +802,10 @@ template {
--color-toolkit-dialog-background: #fff; --color-toolkit-dialog-background: #fff;
--color-toolkit-tabs-label-border: #fff; --color-toolkit-tabs-label-border: #fff;
--color-toolkit-tabs-section-border: #ddd; --color-toolkit-tabs-section-border: #ddd;
--color-toolkit-select-background: #f7f7f7;
--color-toolkit-select-border: #ddd; --color-toolkit-select-border: #ddd;
--color-toolkit-select-border-hover: #bbb; --color-toolkit-select-background-hover: #bbb;
--color-toolkit-input-text-font: #222; --color-toolkit-input-text-font: #222;
--color-toolkit-input-text-border: #ddd;
--color-toolkit-input-text-border-hover: #bbb;
--color-toolkit-checkbox-onoff-background: #ddd; --color-toolkit-checkbox-onoff-background: #ddd;
--color-toolkit-checkbox-onoff-label-background: #3050ff; --color-toolkit-checkbox-onoff-label-background: #3050ff;
--color-toolkit-checkbox-onoff-checked-background: #aaa; --color-toolkit-checkbox-onoff-checked-background: #aaa;
@ -863,8 +862,8 @@ template {
--color-result-link-font: #8af; --color-result-link-font: #8af;
--color-result-link-font-highlight: #8af; --color-result-link-font-highlight: #8af;
--color-result-link-visited-font: #96b; --color-result-link-visited-font: #96b;
--color-result-publishdate-font: #777; --color-result-publishdate-font: #888;
--color-result-engines-font: #777; --color-result-engines-font: #888;
--color-result-search-url-border: #555; --color-result-search-url-border: #555;
--color-result-search-url-font: #fff; --color-result-search-url-font: #fff;
--color-result-detail-font: #fff; --color-result-detail-font: #fff;
@ -887,11 +886,10 @@ template {
--color-toolkit-dialog-background: #222; --color-toolkit-dialog-background: #222;
--color-toolkit-tabs-label-border: #222; --color-toolkit-tabs-label-border: #222;
--color-toolkit-tabs-section-border: #555; --color-toolkit-tabs-section-border: #555;
--color-toolkit-select-background: #3c3b31;
--color-toolkit-select-border: #555; --color-toolkit-select-border: #555;
--color-toolkit-select-border-hover: #777; --color-toolkit-select-background-hover: #333;
--color-toolkit-input-text-font: #fff; --color-toolkit-input-text-font: #fff;
--color-toolkit-input-text-border: #555;
--color-toolkit-input-text-border-hover: #777;
--color-toolkit-checkbox-onoff-background: #3c3b31; --color-toolkit-checkbox-onoff-background: #3c3b31;
--color-toolkit-checkbox-onoff-label-background: #58f; --color-toolkit-checkbox-onoff-label-background: #58f;
--color-toolkit-checkbox-onoff-checked-background: #ddd; --color-toolkit-checkbox-onoff-checked-background: #ddd;
@ -948,8 +946,8 @@ template {
--color-result-link-font: #8af; --color-result-link-font: #8af;
--color-result-link-font-highlight: #8af; --color-result-link-font-highlight: #8af;
--color-result-link-visited-font: #96b; --color-result-link-visited-font: #96b;
--color-result-publishdate-font: #777; --color-result-publishdate-font: #888;
--color-result-engines-font: #777; --color-result-engines-font: #888;
--color-result-search-url-border: #555; --color-result-search-url-border: #555;
--color-result-search-url-font: #fff; --color-result-search-url-font: #fff;
--color-result-detail-font: #fff; --color-result-detail-font: #fff;
@ -972,11 +970,10 @@ template {
--color-toolkit-dialog-background: #222; --color-toolkit-dialog-background: #222;
--color-toolkit-tabs-label-border: #222; --color-toolkit-tabs-label-border: #222;
--color-toolkit-tabs-section-border: #555; --color-toolkit-tabs-section-border: #555;
--color-toolkit-select-background: #3c3b31;
--color-toolkit-select-border: #555; --color-toolkit-select-border: #555;
--color-toolkit-select-border-hover: #777; --color-toolkit-select-background-hover: #333;
--color-toolkit-input-text-font: #fff; --color-toolkit-input-text-font: #fff;
--color-toolkit-input-text-border: #555;
--color-toolkit-input-text-border-hover: #777;
--color-toolkit-checkbox-onoff-background: #3c3b31; --color-toolkit-checkbox-onoff-background: #3c3b31;
--color-toolkit-checkbox-onoff-label-background: #58f; --color-toolkit-checkbox-onoff-label-background: #58f;
--color-toolkit-checkbox-onoff-checked-background: #ddd; --color-toolkit-checkbox-onoff-checked-background: #ddd;
@ -1653,11 +1650,11 @@ html body .tabs > input:checked + label + section {
} }
/* -- select -- */ /* -- select -- */
select { select {
height: 28px; height: 2.4rem;
margin: 0 1em 0 0; margin: 0 1rem 0 0;
padding: 2px 8px 2px 0 !important; padding: 0.2rem !important;
color: var(--color-search-font); color: var(--color-search-font);
font-size: 12px; font-size: 0.9rem;
z-index: 2; z-index: 2;
} }
select:hover, select:hover,
@ -1669,17 +1666,22 @@ select:focus {
appearance: none; appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
border: none; border-width: 0 2rem 0 0;
border-bottom: 1px solid var(--color-toolkit-select-border); border-color: transparent;
background: url("data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%0A%3Cg%3E%3Cpolygon%20points%3D%22128%2C192%20256%2C320%20384%2C192%22%2F%3E%3C%2Fg%3E%0A%3C%2Fsvg%3E") no-repeat; background: url("data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%0A%3Cg%3E%3Cpolygon%20points%3D%22128%2C192%20256%2C320%20384%2C192%22%2F%3E%3C%2Fg%3E%0A%3C%2Fsvg%3E") no-repeat;
background-position-x: 105%; background-position-x: calc(100% + 2rem);
background-size: 2em; background-size: 2rem;
background-origin: content-box; background-origin: content-box;
background-color: var(--color-toolkit-select-background);
outline: medium none; outline: medium none;
text-overflow: ellipsis;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
} }
select:hover, select:hover,
select:focus { select:focus {
border-bottom: 1px solid var(--color-toolkit-select-border-hover); background-color: var(--color-toolkit-select-background-hover);
} }
select option { select option {
background-color: var(--color-base-background); background-color: var(--color-base-background);
@ -2203,7 +2205,8 @@ article.result-images .detail {
font-size: 4em; font-size: 4em;
visibility: hidden; visibility: hidden;
} }
.index #search { .index #search,
.index #search_header {
margin: 0 auto; margin: 0 auto;
background: inherit; background: inherit;
border: inherit; border: inherit;
@ -2267,15 +2270,17 @@ article.result-images .detail {
#main_preferences .value input[type="text"] { #main_preferences .value input[type="text"] {
width: 13.25rem; width: 13.25rem;
color: var(--color-toolkit-input-text-font); color: var(--color-toolkit-input-text-font);
border: 1px solid var(--color-toolkit-input-text-border); border: none;
background: none repeat scroll 0 0 var(--color-base-background); background: none repeat scroll 0 0 var(--color-toolkit-select-background);
padding: 0.4rem; padding: 0.2rem 0.4rem;
height: 2rem;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
-moz-border-radius: 5px; -moz-border-radius: 5px;
border-radius: 5px; border-radius: 5px;
} }
#main_preferences .value input[type="text"]:hover { #main_preferences .value input[type="text"]:hover,
border: 1px solid var(--color-toolkit-input-text-border-hover); #main_preferences .value input[type="text"]:focus {
background-color: var(--color-toolkit-select-background-hover);
} }
#main_preferences .value select:focus, #main_preferences .value select:focus,
#main_preferences .value input:focus { #main_preferences .value input:focus {
@ -2319,6 +2324,19 @@ article.result-images .detail {
#main_preferences table.cookies > tbody > tr:nth-child(even) > td { #main_preferences table.cookies > tbody > tr:nth-child(even) > td {
background-color: var(--color-settings-tr-hover); background-color: var(--color-settings-tr-hover);
} }
#main_preferences .category {
margin-right: 0.5rem;
}
#main_preferences .category label {
border: 2px solid transparent;
padding: 0.2rem 0.4rem;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#main_preferences .category input[type="checkbox"]:checked + label {
border: 2px solid var(--color-categories-item-border-selected);
}
#main_preferences .name, #main_preferences .name,
#main_preferences .shortcut { #main_preferences .shortcut {
text-align: left; text-align: left;
@ -2364,6 +2382,10 @@ article.result-images .detail {
* SearXNG, A privacy-respecting, hackable metasearch engine * SearXNG, A privacy-respecting, hackable metasearch engine
*/ */
#search { #search {
padding: 0;
margin: 0;
}
#search_header {
padding: 1.5em 2em 0 7rem; padding: 1.5em 2em 0 7rem;
margin: 0; margin: 0;
background: var(--color-header-background); background: var(--color-header-background);
@ -2422,12 +2444,10 @@ article.result-images .detail {
.search_categories { .search_categories {
grid-area: categories; grid-area: categories;
} }
#search_wrapper { .search_box {
margin: 0;
padding: 0; padding: 0;
grid-area: search; grid-area: search;
}
.search_box {
margin: 0 12px 0 0;
display: inline-flex; display: inline-flex;
flex-direction: row; flex-direction: row;
white-space: nowrap; white-space: nowrap;
@ -2492,18 +2512,30 @@ article.result-images .detail {
background-color: var(--color-search-background-hover); background-color: var(--color-search-background-hover);
color: var(--color-search-background); color: var(--color-search-background);
} }
.no-js #clear_search,
.no-js #send_search { .no-js #send_search {
width: auto !important; width: auto !important;
border-left: 1px solid var(--color-search-border);
padding: 10px;
} }
.search_filters { .search_filters {
display: inline-block; margin: 0.6rem 0 0 10.6rem;
margin: 0.8rem 0 0 0; }
.search_filters select {
background-color: inherit;
}
.search_filters select:hover,
.search_filters select:focus {
color: var(--color-base-font);
} }
@media screen and (max-width: 80em) { @media screen and (max-width: 80em) {
#search { #search_header {
padding: 1.5em 0.5rem 0 0.5rem; padding: 1.5em 0.5rem 0 0.5rem;
column-gap: 0.5rem; column-gap: 0.5rem;
} }
.search_filters {
margin: 0.6rem 0 0 3.5rem;
}
#categories { #categories {
font-size: 90%; font-size: 90%;
clear: both; clear: both;
@ -2534,10 +2566,10 @@ article.result-images .detail {
} }
} }
@media screen and (max-width: 50em) { @media screen and (max-width: 50em) {
#search { #search_header {
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 0.1em 0 0 0; padding: 0.1rem 0 0 0;
column-gap: 0; column-gap: 0;
row-gap: 0; row-gap: 0;
grid-template-areas: "logo search" "categories categories"; grid-template-areas: "logo search" "categories categories";
@ -2545,14 +2577,8 @@ article.result-images .detail {
.search_logo { .search_logo {
padding: 0; padding: 0;
} }
#search_wrapper {
width: 100%;
padding: 0;
}
.search_box { .search_box {
width: 99%; width: 99%;
margin: 0.1em;
padding: 0 0.1em 0 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
@ -2565,8 +2591,7 @@ article.result-images .detail {
transition: margin-right 0.1s; transition: margin-right 0.1s;
} }
.search_filters { .search_filters {
display: block; margin: 0;
margin: 0.8em 0;
} }
.language, .language,
.time_range { .time_range {
@ -2586,7 +2611,7 @@ article.result-images .detail {
} }
} }
@media screen and (max-width: 20rem) { @media screen and (max-width: 20rem) {
#search { #search_header {
grid-template-areas: "search search" "categories categories"; grid-template-areas: "search search" "categories categories";
} }
#search_logo { #search_logo {
@ -2744,7 +2769,7 @@ article[data-vim-selected].category-social {
border-left: 0.2rem solid transparent; border-left: 0.2rem solid transparent;
} }
.result h3 { .result h3 {
font-size: 1.1em; font-size: 1.2rem;
word-wrap: break-word; word-wrap: break-word;
margin: 0.4rem 0 0.4rem 0; margin: 0.4rem 0 0.4rem 0;
padding: 0; padding: 0;
@ -2789,13 +2814,35 @@ article[data-vim-selected].category-social {
background: inherit; background: inherit;
font-weight: normal; font-weight: normal;
} }
.result .url { .result .url_wrapper {
font-size: 0.96em; display: flex;
margin: 0 0 3px 0; font-size: 1rem;
padding: 0;
max-width: 54em;
word-wrap: break-word;
color: var(--color-result-url-font); color: var(--color-result-url-font);
flex-wrap: nowrap;
overflow: hidden;
flex-direction: row;
margin: 0;
padding: 0;
}
.result .url_wrapper .url_o1 {
white-space: nowrap;
flex-shrink: 1;
}
.result .url_wrapper .url_o1::after {
content: " ";
width: 1ch;
display: inline-block;
}
.result .url_wrapper .url_o2 {
overflow: hidden;
white-space: nowrap;
flex-basis: content;
flex-grow: 0;
flex-shrink: 1;
text-align: right;
}
.result .url_wrapper .url_o2 .url_i2 {
float: right;
} }
.result .published_date { .result .published_date {
font-size: 0.8em; font-size: 0.8em;
@ -2803,16 +2850,14 @@ article[data-vim-selected].category-social {
} }
.result img.thumbnail { .result img.thumbnail {
float: left; float: left;
padding: 0 5px 10px 0; padding: 0.6rem 1rem 0 0;
width: 20em; width: 20rem;
min-width: 20em;
min-height: 8em;
} }
.result img.image { .result img.image {
float: left; float: left;
padding: 0 5px 10px 0; padding: 0.6rem 1rem 0 0;
width: 100px; width: 7rem;
max-height: 100px; max-height: 7rem;
object-fit: scale-down; object-fit: scale-down;
object-position: right top; object-position: right top;
} }
@ -2910,7 +2955,7 @@ article[data-vim-selected].category-social {
display: none !important; display: none !important;
} }
#results { #results {
margin: 2rem 2rem 0 10rem; margin: 1rem 2rem 0 10rem;
display: grid; display: grid;
grid-template-columns: 45rem 25rem; grid-template-columns: 45rem 25rem;
grid-template-rows: min-content min-content 1fr min-content; grid-template-rows: min-content min-content 1fr min-content;
@ -3174,7 +3219,7 @@ article[data-vim-selected].category-social {
margin: 2rem 0 0 0 !important; margin: 2rem 0 0 0 !important;
} }
#main_results div#results { #main_results div#results {
margin: 2rem auto 0 auto; margin: 1rem auto 0 auto;
justify-content: center; justify-content: center;
display: grid; display: grid;
grid-template-columns: 45rem; grid-template-columns: 45rem;
@ -3184,7 +3229,7 @@ article[data-vim-selected].category-social {
} }
} }
#main_results div#results.only_template_images { #main_results div#results.only_template_images {
margin: 2rem 0.5rem 0 0.5rem; margin: 1rem 0.5rem 0 0.5rem;
display: grid; display: grid;
grid-template-columns: 100%; grid-template-columns: 100%;
grid-template-rows: min-content min-content 1fr min-content min-content; grid-template-rows: min-content min-content 1fr min-content min-content;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -802,11 +802,10 @@ template {
--color-toolkit-dialog-background: #fff; --color-toolkit-dialog-background: #fff;
--color-toolkit-tabs-label-border: #fff; --color-toolkit-tabs-label-border: #fff;
--color-toolkit-tabs-section-border: #ddd; --color-toolkit-tabs-section-border: #ddd;
--color-toolkit-select-background: #f7f7f7;
--color-toolkit-select-border: #ddd; --color-toolkit-select-border: #ddd;
--color-toolkit-select-border-hover: #bbb; --color-toolkit-select-background-hover: #bbb;
--color-toolkit-input-text-font: #222; --color-toolkit-input-text-font: #222;
--color-toolkit-input-text-border: #ddd;
--color-toolkit-input-text-border-hover: #bbb;
--color-toolkit-checkbox-onoff-background: #ddd; --color-toolkit-checkbox-onoff-background: #ddd;
--color-toolkit-checkbox-onoff-label-background: #3050ff; --color-toolkit-checkbox-onoff-label-background: #3050ff;
--color-toolkit-checkbox-onoff-checked-background: #aaa; --color-toolkit-checkbox-onoff-checked-background: #aaa;
@ -863,8 +862,8 @@ template {
--color-result-link-font: #8af; --color-result-link-font: #8af;
--color-result-link-font-highlight: #8af; --color-result-link-font-highlight: #8af;
--color-result-link-visited-font: #96b; --color-result-link-visited-font: #96b;
--color-result-publishdate-font: #777; --color-result-publishdate-font: #888;
--color-result-engines-font: #777; --color-result-engines-font: #888;
--color-result-search-url-border: #555; --color-result-search-url-border: #555;
--color-result-search-url-font: #fff; --color-result-search-url-font: #fff;
--color-result-detail-font: #fff; --color-result-detail-font: #fff;
@ -887,11 +886,10 @@ template {
--color-toolkit-dialog-background: #222; --color-toolkit-dialog-background: #222;
--color-toolkit-tabs-label-border: #222; --color-toolkit-tabs-label-border: #222;
--color-toolkit-tabs-section-border: #555; --color-toolkit-tabs-section-border: #555;
--color-toolkit-select-background: #3c3b31;
--color-toolkit-select-border: #555; --color-toolkit-select-border: #555;
--color-toolkit-select-border-hover: #777; --color-toolkit-select-background-hover: #333;
--color-toolkit-input-text-font: #fff; --color-toolkit-input-text-font: #fff;
--color-toolkit-input-text-border: #555;
--color-toolkit-input-text-border-hover: #777;
--color-toolkit-checkbox-onoff-background: #3c3b31; --color-toolkit-checkbox-onoff-background: #3c3b31;
--color-toolkit-checkbox-onoff-label-background: #58f; --color-toolkit-checkbox-onoff-label-background: #58f;
--color-toolkit-checkbox-onoff-checked-background: #ddd; --color-toolkit-checkbox-onoff-checked-background: #ddd;
@ -948,8 +946,8 @@ template {
--color-result-link-font: #8af; --color-result-link-font: #8af;
--color-result-link-font-highlight: #8af; --color-result-link-font-highlight: #8af;
--color-result-link-visited-font: #96b; --color-result-link-visited-font: #96b;
--color-result-publishdate-font: #777; --color-result-publishdate-font: #888;
--color-result-engines-font: #777; --color-result-engines-font: #888;
--color-result-search-url-border: #555; --color-result-search-url-border: #555;
--color-result-search-url-font: #fff; --color-result-search-url-font: #fff;
--color-result-detail-font: #fff; --color-result-detail-font: #fff;
@ -972,11 +970,10 @@ template {
--color-toolkit-dialog-background: #222; --color-toolkit-dialog-background: #222;
--color-toolkit-tabs-label-border: #222; --color-toolkit-tabs-label-border: #222;
--color-toolkit-tabs-section-border: #555; --color-toolkit-tabs-section-border: #555;
--color-toolkit-select-background: #3c3b31;
--color-toolkit-select-border: #555; --color-toolkit-select-border: #555;
--color-toolkit-select-border-hover: #777; --color-toolkit-select-background-hover: #333;
--color-toolkit-input-text-font: #fff; --color-toolkit-input-text-font: #fff;
--color-toolkit-input-text-border: #555;
--color-toolkit-input-text-border-hover: #777;
--color-toolkit-checkbox-onoff-background: #3c3b31; --color-toolkit-checkbox-onoff-background: #3c3b31;
--color-toolkit-checkbox-onoff-label-background: #58f; --color-toolkit-checkbox-onoff-label-background: #58f;
--color-toolkit-checkbox-onoff-checked-background: #ddd; --color-toolkit-checkbox-onoff-checked-background: #ddd;
@ -1653,11 +1650,11 @@ html body .tabs > input:checked + label + section {
} }
/* -- select -- */ /* -- select -- */
select { select {
height: 28px; height: 2.4rem;
margin: 0 1em 0 0; margin: 0 1rem 0 0;
padding: 2px 8px 2px 0 !important; padding: 0.2rem !important;
color: var(--color-search-font); color: var(--color-search-font);
font-size: 12px; font-size: 0.9rem;
z-index: 2; z-index: 2;
} }
select:hover, select:hover,
@ -1669,17 +1666,22 @@ select:focus {
appearance: none; appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
border: none; border-width: 0 2rem 0 0;
border-bottom: 1px solid var(--color-toolkit-select-border); border-color: transparent;
background: url("data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%0A%3Cg%3E%3Cpolygon%20points%3D%22128%2C192%20256%2C320%20384%2C192%22%2F%3E%3C%2Fg%3E%0A%3C%2Fsvg%3E") no-repeat; background: url("data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%0A%3Cg%3E%3Cpolygon%20points%3D%22128%2C192%20256%2C320%20384%2C192%22%2F%3E%3C%2Fg%3E%0A%3C%2Fsvg%3E") no-repeat;
background-position-x: 105%; background-position-x: calc(100% + 2rem);
background-size: 2em; background-size: 2rem;
background-origin: content-box; background-origin: content-box;
background-color: var(--color-toolkit-select-background);
outline: medium none; outline: medium none;
text-overflow: ellipsis;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
} }
select:hover, select:hover,
select:focus { select:focus {
border-bottom: 1px solid var(--color-toolkit-select-border-hover); background-color: var(--color-toolkit-select-background-hover);
} }
select option { select option {
background-color: var(--color-base-background); background-color: var(--color-base-background);
@ -2203,7 +2205,8 @@ article.result-images .detail {
font-size: 4em; font-size: 4em;
visibility: hidden; visibility: hidden;
} }
.index #search { .index #search,
.index #search_header {
margin: 0 auto; margin: 0 auto;
background: inherit; background: inherit;
border: inherit; border: inherit;
@ -2267,15 +2270,17 @@ article.result-images .detail {
#main_preferences .value input[type="text"] { #main_preferences .value input[type="text"] {
width: 13.25rem; width: 13.25rem;
color: var(--color-toolkit-input-text-font); color: var(--color-toolkit-input-text-font);
border: 1px solid var(--color-toolkit-input-text-border); border: none;
background: none repeat scroll 0 0 var(--color-base-background); background: none repeat scroll 0 0 var(--color-toolkit-select-background);
padding: 0.4rem; padding: 0.2rem 0.4rem;
height: 2rem;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
-moz-border-radius: 5px; -moz-border-radius: 5px;
border-radius: 5px; border-radius: 5px;
} }
#main_preferences .value input[type="text"]:hover { #main_preferences .value input[type="text"]:hover,
border: 1px solid var(--color-toolkit-input-text-border-hover); #main_preferences .value input[type="text"]:focus {
background-color: var(--color-toolkit-select-background-hover);
} }
#main_preferences .value select:focus, #main_preferences .value select:focus,
#main_preferences .value input:focus { #main_preferences .value input:focus {
@ -2319,6 +2324,19 @@ article.result-images .detail {
#main_preferences table.cookies > tbody > tr:nth-child(even) > td { #main_preferences table.cookies > tbody > tr:nth-child(even) > td {
background-color: var(--color-settings-tr-hover); background-color: var(--color-settings-tr-hover);
} }
#main_preferences .category {
margin-right: 0.5rem;
}
#main_preferences .category label {
border: 2px solid transparent;
padding: 0.2rem 0.4rem;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#main_preferences .category input[type="checkbox"]:checked + label {
border: 2px solid var(--color-categories-item-border-selected);
}
#main_preferences .name, #main_preferences .name,
#main_preferences .shortcut { #main_preferences .shortcut {
text-align: left; text-align: left;
@ -2364,6 +2382,10 @@ article.result-images .detail {
* SearXNG, A privacy-respecting, hackable metasearch engine * SearXNG, A privacy-respecting, hackable metasearch engine
*/ */
#search { #search {
padding: 0;
margin: 0;
}
#search_header {
padding: 1.5em 2em 0 7rem; padding: 1.5em 2em 0 7rem;
margin: 0; margin: 0;
background: var(--color-header-background); background: var(--color-header-background);
@ -2422,12 +2444,10 @@ article.result-images .detail {
.search_categories { .search_categories {
grid-area: categories; grid-area: categories;
} }
#search_wrapper { .search_box {
margin: 0;
padding: 0; padding: 0;
grid-area: search; grid-area: search;
}
.search_box {
margin: 0 12px 0 0;
display: inline-flex; display: inline-flex;
flex-direction: row; flex-direction: row;
white-space: nowrap; white-space: nowrap;
@ -2492,18 +2512,30 @@ article.result-images .detail {
background-color: var(--color-search-background-hover); background-color: var(--color-search-background-hover);
color: var(--color-search-background); color: var(--color-search-background);
} }
.no-js #clear_search,
.no-js #send_search { .no-js #send_search {
width: auto !important; width: auto !important;
border-left: 1px solid var(--color-search-border);
padding: 10px;
} }
.search_filters { .search_filters {
display: inline-block; margin: 0.6rem 0 0 10.6rem;
margin: 0.8rem 0 0 0; }
.search_filters select {
background-color: inherit;
}
.search_filters select:hover,
.search_filters select:focus {
color: var(--color-base-font);
} }
@media screen and (max-width: 80em) { @media screen and (max-width: 80em) {
#search { #search_header {
padding: 1.5em 0.5rem 0 0.5rem; padding: 1.5em 0.5rem 0 0.5rem;
column-gap: 0.5rem; column-gap: 0.5rem;
} }
.search_filters {
margin: 0.6rem 0 0 3.5rem;
}
#categories { #categories {
font-size: 90%; font-size: 90%;
clear: both; clear: both;
@ -2534,10 +2566,10 @@ article.result-images .detail {
} }
} }
@media screen and (max-width: 50em) { @media screen and (max-width: 50em) {
#search { #search_header {
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 0.1em 0 0 0; padding: 0.1rem 0 0 0;
column-gap: 0; column-gap: 0;
row-gap: 0; row-gap: 0;
grid-template-areas: "logo search" "categories categories"; grid-template-areas: "logo search" "categories categories";
@ -2545,14 +2577,8 @@ article.result-images .detail {
.search_logo { .search_logo {
padding: 0; padding: 0;
} }
#search_wrapper {
width: 100%;
padding: 0;
}
.search_box { .search_box {
width: 99%; width: 99%;
margin: 0.1em;
padding: 0 0.1em 0 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
@ -2565,8 +2591,7 @@ article.result-images .detail {
transition: margin-right 0.1s; transition: margin-right 0.1s;
} }
.search_filters { .search_filters {
display: block; margin: 0;
margin: 0.8em 0;
} }
.language, .language,
.time_range { .time_range {
@ -2586,7 +2611,7 @@ article.result-images .detail {
} }
} }
@media screen and (max-width: 20rem) { @media screen and (max-width: 20rem) {
#search { #search_header {
grid-template-areas: "search search" "categories categories"; grid-template-areas: "search search" "categories categories";
} }
#search_logo { #search_logo {
@ -2744,7 +2769,7 @@ article[data-vim-selected].category-social {
border-left: 0.2rem solid transparent; border-left: 0.2rem solid transparent;
} }
.result h3 { .result h3 {
font-size: 1.1em; font-size: 1.2rem;
word-wrap: break-word; word-wrap: break-word;
margin: 0.4rem 0 0.4rem 0; margin: 0.4rem 0 0.4rem 0;
padding: 0; padding: 0;
@ -2789,13 +2814,35 @@ article[data-vim-selected].category-social {
background: inherit; background: inherit;
font-weight: normal; font-weight: normal;
} }
.result .url { .result .url_wrapper {
font-size: 0.96em; display: flex;
margin: 0 0 3px 0; font-size: 1rem;
padding: 0;
max-width: 54em;
word-wrap: break-word;
color: var(--color-result-url-font); color: var(--color-result-url-font);
flex-wrap: nowrap;
overflow: hidden;
flex-direction: row;
margin: 0;
padding: 0;
}
.result .url_wrapper .url_o1 {
white-space: nowrap;
flex-shrink: 1;
}
.result .url_wrapper .url_o1::after {
content: " ";
width: 1ch;
display: inline-block;
}
.result .url_wrapper .url_o2 {
overflow: hidden;
white-space: nowrap;
flex-basis: content;
flex-grow: 0;
flex-shrink: 1;
text-align: right;
}
.result .url_wrapper .url_o2 .url_i2 {
float: right;
} }
.result .published_date { .result .published_date {
font-size: 0.8em; font-size: 0.8em;
@ -2803,16 +2850,14 @@ article[data-vim-selected].category-social {
} }
.result img.thumbnail { .result img.thumbnail {
float: left; float: left;
padding: 0 5px 10px 0; padding: 0.6rem 1rem 0 0;
width: 20em; width: 20rem;
min-width: 20em;
min-height: 8em;
} }
.result img.image { .result img.image {
float: left; float: left;
padding: 0 5px 10px 0; padding: 0.6rem 1rem 0 0;
width: 100px; width: 7rem;
max-height: 100px; max-height: 7rem;
object-fit: scale-down; object-fit: scale-down;
object-position: right top; object-position: right top;
} }
@ -2910,7 +2955,7 @@ article[data-vim-selected].category-social {
display: none !important; display: none !important;
} }
#results { #results {
margin: 2rem 2rem 0 10rem; margin: 1rem 2rem 0 10rem;
display: grid; display: grid;
grid-template-columns: 45rem 25rem; grid-template-columns: 45rem 25rem;
grid-template-rows: min-content min-content 1fr min-content; grid-template-rows: min-content min-content 1fr min-content;
@ -3174,7 +3219,7 @@ article[data-vim-selected].category-social {
margin: 2rem 0 0 0 !important; margin: 2rem 0 0 0 !important;
} }
#main_results div#results { #main_results div#results {
margin: 2rem auto 0 auto; margin: 1rem auto 0 auto;
justify-content: center; justify-content: center;
display: grid; display: grid;
grid-template-columns: 45rem; grid-template-columns: 45rem;
@ -3184,7 +3229,7 @@ article[data-vim-selected].category-social {
} }
} }
#main_results div#results.only_template_images { #main_results div#results.only_template_images {
margin: 2rem 0.5rem 0 0.5rem; margin: 1rem 0.5rem 0 0.5rem;
display: grid; display: grid;
grid-template-columns: 100%; grid-template-columns: 100%;
grid-template-rows: min-content min-content 1fr min-content min-content; grid-template-rows: min-content min-content 1fr min-content min-content;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -861,6 +861,7 @@ searxng.ready(function() {
return false; return false;
}); });
searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);
searxng.on(d.getElementById('time_range'), 'change', submitIfQuery); searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);
searxng.on(d.getElementById('language'), 'change', submitIfQuery); searxng.on(d.getElementById('language'), 'change', submitIfQuery);
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -98,6 +98,7 @@
return false; return false;
}); });
searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);
searxng.on(d.getElementById('time_range'), 'change', submitIfQuery); searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);
searxng.on(d.getElementById('language'), 'change', submitIfQuery); searxng.on(d.getElementById('language'), 'change', submitIfQuery);
} }

View File

@ -89,11 +89,10 @@
--color-toolkit-dialog-background: #fff; --color-toolkit-dialog-background: #fff;
--color-toolkit-tabs-label-border: #fff; --color-toolkit-tabs-label-border: #fff;
--color-toolkit-tabs-section-border: #ddd; --color-toolkit-tabs-section-border: #ddd;
--color-toolkit-select-background: #f7f7f7;
--color-toolkit-select-border: #ddd; --color-toolkit-select-border: #ddd;
--color-toolkit-select-border-hover: #bbb; --color-toolkit-select-background-hover: #bbb;
--color-toolkit-input-text-font: #222; --color-toolkit-input-text-font: #222;
--color-toolkit-input-text-border: #ddd;
--color-toolkit-input-text-border-hover: #bbb;
--color-toolkit-checkbox-onoff-background: #ddd; --color-toolkit-checkbox-onoff-background: #ddd;
--color-toolkit-checkbox-onoff-label-background: #3050ff; --color-toolkit-checkbox-onoff-label-background: #3050ff;
--color-toolkit-checkbox-onoff-checked-background: #aaa; --color-toolkit-checkbox-onoff-checked-background: #aaa;
@ -162,8 +161,8 @@
--color-result-link-font: #8af; --color-result-link-font: #8af;
--color-result-link-font-highlight: #8af; --color-result-link-font-highlight: #8af;
--color-result-link-visited-font: #96b; --color-result-link-visited-font: #96b;
--color-result-publishdate-font: #777; --color-result-publishdate-font: #888;
--color-result-engines-font: #777; --color-result-engines-font: #888;
--color-result-search-url-border: #555; --color-result-search-url-border: #555;
--color-result-search-url-font: #fff; --color-result-search-url-font: #fff;
/// Detail modal : same as the light version /// Detail modal : same as the light version
@ -190,11 +189,10 @@
--color-toolkit-dialog-background: #222; --color-toolkit-dialog-background: #222;
--color-toolkit-tabs-label-border: #222; --color-toolkit-tabs-label-border: #222;
--color-toolkit-tabs-section-border: #555; --color-toolkit-tabs-section-border: #555;
--color-toolkit-select-background: #3c3b31;
--color-toolkit-select-border: #555; --color-toolkit-select-border: #555;
--color-toolkit-select-border-hover: #777; --color-toolkit-select-background-hover: #333;
--color-toolkit-input-text-font: #fff; --color-toolkit-input-text-font: #fff;
--color-toolkit-input-text-border: #555;
--color-toolkit-input-text-border-hover: #777;
--color-toolkit-checkbox-onoff-background: #3c3b31; --color-toolkit-checkbox-onoff-background: #3c3b31;
--color-toolkit-checkbox-onoff-label-background: #58f; --color-toolkit-checkbox-onoff-label-background: #58f;
--color-toolkit-checkbox-onoff-checked-background: #ddd; --color-toolkit-checkbox-onoff-checked-background: #ddd;

View File

@ -22,7 +22,8 @@
visibility: hidden; visibility: hidden;
} }
#search { #search,
#search_header {
margin: 0 auto; margin: 0 auto;
background: inherit; background: inherit;
border: inherit; border: inherit;

View File

@ -41,13 +41,15 @@
input[type="text"] { input[type="text"] {
width: 13.25rem; width: 13.25rem;
color: var(--color-toolkit-input-text-font); color: var(--color-toolkit-input-text-font);
border: 1px solid var(--color-toolkit-input-text-border); border: none;
background: none repeat scroll 0 0 var(--color-base-background); background: none repeat scroll 0 0 var(--color-toolkit-select-background);
padding: 0.4rem; padding: 0.2rem 0.4rem;
height: 2rem;
.rounded-corners-tiny; .rounded-corners-tiny;
&:hover { &:hover,
border: 1px solid var(--color-toolkit-input-text-border-hover); &:focus {
background-color: var(--color-toolkit-select-background-hover);
} }
} }
@ -103,6 +105,20 @@
} }
} }
.category {
margin-right: 0.5rem;
label {
border: 2px solid transparent;
padding: 0.2rem 0.4rem;
.rounded-corners-tiny;
}
}
.category input[type="checkbox"]:checked + label {
border: 2px solid var(--color-categories-item-border-selected);
}
.name, .name,
.shortcut { .shortcut {
text-align: left; text-align: left;

View File

@ -3,6 +3,11 @@
*/ */
#search { #search {
padding: 0;
margin: 0;
}
#search_header {
padding: 1.5em 2em 0 @results-offset - 3rem; padding: 1.5em 2em 0 @results-offset - 3rem;
margin: 0; margin: 0;
background: var(--color-header-background); background: var(--color-header-background);
@ -68,13 +73,10 @@
grid-area: categories; grid-area: categories;
} }
#search_wrapper { .search_box {
margin: 0;
padding: 0; padding: 0;
grid-area: search; grid-area: search;
}
.search_box {
margin: 0 12px 0 0;
display: inline-flex; display: inline-flex;
flex-direction: row; flex-direction: row;
white-space: nowrap; white-space: nowrap;
@ -148,21 +150,36 @@
} }
} }
.no-js #clear_search,
.no-js #send_search { .no-js #send_search {
width: auto !important; width: auto !important;
border-left: 1px solid var(--color-search-border);
padding: 10px;
} }
.search_filters { .search_filters {
display: inline-block; margin: 0.6rem 0 0 @results-offset + 0.6rem;
margin: 0.8rem 0 0 0;
select {
background-color: inherit;
&:hover,
&:focus {
color: var(--color-base-font);
}
}
} }
@media screen and (max-width: @tablet) { @media screen and (max-width: @tablet) {
#search { #search_header {
padding: 1.5em @results-tablet-offset 0 @results-tablet-offset; padding: 1.5em @results-tablet-offset 0 @results-tablet-offset;
column-gap: @results-tablet-offset; column-gap: @results-tablet-offset;
} }
.search_filters {
margin: 0.6rem 0 0 @results-tablet-offset + 3rem;
}
#categories { #categories {
font-size: 90%; font-size: 90%;
clear: both; clear: both;
@ -200,10 +217,10 @@
} }
@media screen and (max-width: @phone) { @media screen and (max-width: @phone) {
#search { #search_header {
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 0.1em 0 0 0; padding: 0.1rem 0 0 0;
column-gap: 0; column-gap: 0;
row-gap: 0; row-gap: 0;
grid-template-areas: grid-template-areas:
@ -215,16 +232,9 @@
padding: 0; padding: 0;
} }
#search_wrapper {
width: 100%;
padding: 0;
}
.search_box { .search_box {
// hack, should be 100% ? // hack, should be 100% ?
width: 99%; width: 99%;
margin: 0.1em;
padding: 0 0.1em 0 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
@ -240,8 +250,7 @@
} }
.search_filters { .search_filters {
display: block; margin: 0;
margin: 0.8em 0;
} }
.language, .language,
@ -266,7 +275,7 @@
} }
@media screen and (max-width: @ultra-small-phone) { @media screen and (max-width: @ultra-small-phone) {
#search { #search_header {
grid-template-areas: grid-template-areas:
"search search" "search search"
"categories categories"; "categories categories";

View File

@ -168,7 +168,7 @@ article[data-vim-selected].category-social {
border-left: 0.2rem solid transparent; border-left: 0.2rem solid transparent;
h3 { h3 {
font-size: 1.1em; font-size: 1.2rem;
word-wrap: break-word; word-wrap: break-word;
margin: 0.4rem 0 0.4rem 0; margin: 0.4rem 0 0.4rem 0;
padding: 0; padding: 0;
@ -221,13 +221,39 @@ article[data-vim-selected].category-social {
} }
} }
.url { .url_wrapper {
font-size: 0.96em; display: flex;
margin: 0 0 3px 0; font-size: 1rem;
padding: 0;
max-width: 54em;
word-wrap: break-word;
color: var(--color-result-url-font); color: var(--color-result-url-font);
flex-wrap: nowrap;
overflow: hidden;
flex-direction: row;
margin: 0;
padding: 0;
.url_o1 {
white-space: nowrap;
flex-shrink: 1;
}
.url_o1::after {
content: " ";
width: 1ch;
display: inline-block;
}
.url_o2 {
overflow: hidden;
white-space: nowrap;
flex-basis: content;
flex-grow: 0;
flex-shrink: 1;
text-align: right;
.url_i2 {
float: right;
}
}
} }
.published_date { .published_date {
@ -238,17 +264,15 @@ article[data-vim-selected].category-social {
img { img {
&.thumbnail { &.thumbnail {
float: left; float: left;
padding: 0 5px 10px 0; padding: 0.6rem 1rem 0 0;
width: 20em; width: 20rem;
min-width: 20em;
min-height: 8em;
} }
&.image { &.image {
float: left; float: left;
padding: 0 5px 10px 0; padding: 0.6rem 1rem 0 0;
width: 100px; width: 7rem;
max-height: 100px; max-height: 7rem;
object-fit: scale-down; object-fit: scale-down;
object-position: right top; object-position: right top;
} }
@ -367,7 +391,7 @@ article[data-vim-selected].category-social {
} }
#results { #results {
margin: 2rem 2rem 0 @results-offset; margin: 1rem 2rem 0 @results-offset;
display: grid; display: grid;
grid-template-columns: @results-width 25rem; grid-template-columns: @results-width 25rem;
grid-template-rows: min-content min-content 1fr min-content; grid-template-rows: min-content min-content 1fr min-content;
@ -686,7 +710,7 @@ article[data-vim-selected].category-social {
} }
#main_results div#results { #main_results div#results {
margin: 2rem auto 0 auto; margin: 1rem auto 0 auto;
justify-content: center; justify-content: center;
display: grid; display: grid;
grid-template-columns: @results-width; grid-template-columns: @results-width;
@ -702,7 +726,7 @@ article[data-vim-selected].category-social {
} }
#main_results div#results.only_template_images { #main_results div#results.only_template_images {
margin: 2rem @results-tablet-offset 0 @results-tablet-offset; margin: 1rem @results-tablet-offset 0 @results-tablet-offset;
display: grid; display: grid;
grid-template-columns: 100%; grid-template-columns: 100%;
grid-template-rows: min-content min-content 1fr min-content min-content; grid-template-rows: min-content min-content 1fr min-content min-content;

View File

@ -296,11 +296,11 @@ html body .tabs > input:checked {
/* -- select -- */ /* -- select -- */
select { select {
height: 28px; height: 2.4rem;
margin: 0 1em 0 0; margin: 0 1rem 0 0;
padding: 2px 8px 2px 0 !important; padding: 0.2rem !important;
color: var(--color-search-font); color: var(--color-search-font);
font-size: 12px; font-size: 0.9rem;
z-index: 2; z-index: 2;
&:hover, &:hover,
@ -314,17 +314,20 @@ select {
appearance: none; appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
border: none; border-width: 0 2rem 0 0;
border-bottom: 1px solid var(--color-toolkit-select-border); border-color: transparent;
background: data-uri('image/svg+xml;charset=UTF-8', @select-light-svg-path) no-repeat; background: data-uri('image/svg+xml;charset=UTF-8', @select-light-svg-path) no-repeat;
background-position-x: 105%; background-position-x: calc(100% + 2rem);
background-size: 2em; background-size: 2rem;
background-origin: content-box; background-origin: content-box;
background-color: var(--color-toolkit-select-background);
outline: medium none; outline: medium none;
text-overflow: ellipsis;
.rounded-corners-tiny;
&:hover, &:hover,
&:focus { &:focus {
border-bottom: 1px solid var(--color-toolkit-select-border-hover); background-color: var(--color-toolkit-select-background-hover);
} }
option { option {

View File

@ -13,6 +13,7 @@
} -%} } -%}
<div id="categories" class="search_categories">{{- '' -}} <div id="categories" class="search_categories">{{- '' -}}
<div id="categories_container"> <div id="categories_container">
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
{%- for category in categories -%} {%- for category in categories -%}
<div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/> <div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/>
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips"> <label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
@ -21,6 +22,5 @@
</label> </label>
</div> </div>
{%- endfor -%} {%- endfor -%}
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
</div>{{- '' -}} </div>{{- '' -}}
</div> </div>

View File

@ -1,4 +1,4 @@
<select class="language" id="language" name="language" tabindex="2">{{- '' -}} <select class="language" id="language" name="language" tabindex="1">{{- '' -}}
<option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option> <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
{%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%} {%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
<option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}> <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>

View File

@ -0,0 +1,5 @@
<select name="safesearch" id="safesearch" class="safesearch" tabindex="3">
<option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _("SafeSearch") + ": " + _('Strict') }}</option>
<option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _("SafeSearch") + ": " + _('Moderate') }}</option>
<option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _("SafeSearch") + ": " + _('None') }}</option>
</select>

View File

@ -1,4 +1,4 @@
<select name="time_range" id="time_range" class="time_range" tabindex="3">{{- '' -}} <select name="time_range" id="time_range" class="time_range" tabindex="2">{{- '' -}}
<option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}> <option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}>
{{- _('Anytime') -}} {{- _('Anytime') -}}
</option>{{- '' -}} </option>{{- '' -}}

View File

@ -18,7 +18,11 @@
<!-- Draw result header --> <!-- Draw result header -->
{% macro result_header(result, favicons, image_proxify) -%} {% macro result_header(result, favicons, image_proxify) -%}
<article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}"> <article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}">
<p class="url">{{ result_link(result.url, result.pretty_url, 'url') }}</p> {{- result_open_link(result.url, "url_wrapper") -}}
{%- for part in get_pretty_url(result.parsed_url) -%}
<span class="url_o{{loop.index}}"><span class="url_i{{loop.index}}">{{- part -}}</span></span>
{%- endfor %}
{{- result_close_link() -}}
{%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image" src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="image" />{{ result_close_link() }}{% endif -%} {%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image" src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="image" />{{ result_close_link() }}{% endif -%}
{%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/>{{ result_close_link() }}{% endif -%} {%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/>{{ result_close_link() }}{% endif -%}
<h3>{{ result_link(result.url, result.title|safe) }}</h3> <h3>{{ result_link(result.url, result.title|safe) }}</h3>

View File

@ -1,22 +1,22 @@
<form id="search" method="{{ method or 'POST' }}" action="{{ url_for('search') }}"> <form id="search" method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
<div id="search_header">
<a id="search_logo" href="{{ url_for('index') }}"> <a id="search_logo" href="{{ url_for('index') }}">
<span hidden>SearXNG</span> <span hidden>SearXNG</span>
{% include '__common__/searxng-wordmark.min.svg' without context %} {% include '__common__/searxng-wordmark.min.svg' without context %}
</a> </a>
<div id="search_wrapper">
<div class="search_box"> <div class="search_box">
<input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} > <input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button> <button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button> <button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
</div>
<div class="search_filters">
{% include 'simple/languages.html' %}
{% include 'simple/time-range.html' %}
</div>
</div> </div>
{% set display_tooltip = true %} {% set display_tooltip = true %}
{% include 'simple/categories.html' %} {% include 'simple/categories.html' %}
<input type="hidden" name="safesearch" value="{{ safesearch }}" > </div>
<div class="search_filters">
{% include 'simple/filters/languages.html' %}
{% include 'simple/filters/time_range.html' %}
{% include 'simple/filters/safesearch.html' %}
</div>
<input type="hidden" name="theme" value="{{ theme }}" > <input type="hidden" name="theme" value="{{ theme }}" >
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %} {% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
</form> </form>

View File

@ -1,9 +1,9 @@
<form id="search" method="{{ method or 'POST' }}" action="{{ url_for('search') }}"> <form id="search" method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
<div id="search_wrapper"> <div id="search_header">
<div class="search_box"> <div class="search_box">
<input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} > <input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button> <button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button> <button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -419,6 +419,16 @@ def _get_enable_categories(all_categories):
return [x for x in all_categories if x in enabled_categories] return [x for x in all_categories if x in enabled_categories]
def get_pretty_url(parsed_url):
path = parsed_url.path
path = path[:-1] if len(path) > 0 and path[-1] == '/' else path
path = path.replace("/", " ")
return [
parsed_url.scheme + "://" + parsed_url.netloc,
path
]
def render(template_name, override_theme=None, **kwargs): def render(template_name, override_theme=None, **kwargs):
# values from the HTTP requests # values from the HTTP requests
kwargs['endpoint'] = 'results' if 'q' in kwargs else request.endpoint kwargs['endpoint'] = 'results' if 'q' in kwargs else request.endpoint
@ -457,6 +467,7 @@ def render(template_name, override_theme=None, **kwargs):
kwargs['searx_version'] = VERSION_STRING kwargs['searx_version'] = VERSION_STRING
kwargs['searx_git_url'] = GIT_URL kwargs['searx_git_url'] = GIT_URL
kwargs['get_setting'] = get_setting kwargs['get_setting'] = get_setting
kwargs['get_pretty_url'] = get_pretty_url
# helpers to create links to other pages # helpers to create links to other pages
kwargs['url_for'] = url_for_theme # override url_for function in templates kwargs['url_for'] = url_for_theme # override url_for function in templates