Ponysearch/searx/static/themes/simple/src/less/search.less

263 lines
4.5 KiB
Text
Raw Normal View History

2017-02-12 15:06:01 +01:00
/*
2021-10-01 16:33:31 +02:00
* SearXNG, A privacy-respecting, hackable metasearch engine
2017-02-12 15:06:01 +01:00
*/
#search {
padding: 1.5em 2em 0 @results-offset - 3rem;
2017-02-12 15:06:01 +01:00
margin: 0;
background: var(--color-header-background);
border-bottom: 1px solid var(--color-header-border);
display: grid;
column-gap: 1.2rem;
row-gap: 1rem;
grid-template-columns: 3rem 1fr;
grid-template-areas:
"logo search"
"spacer categories";
}
#search_logo {
grid-area: logo;
}
.search_logo_img {
width: 40px;
}
.search_categories {
grid-area: categories;
2017-02-12 15:06:01 +01:00
}
#search_wrapper {
padding: 0;
grid-area: search;
2017-02-12 15:06:01 +01:00
}
.search_box {
margin: 0 12px 0 0;
display: inline-flex;
flex-direction: row;
white-space: nowrap;
}
#clear_search {
display: block;
border-collapse: separate;
box-sizing: border-box;
width: 1.8em;
margin: 0;
padding: 8px 2px;
background: none repeat scroll 0 0 var(--color-search-background);
border-top: 1px solid var(--color-search-border);
border-bottom: 1px solid var(--color-search-border);
border-right: none;
border-left: none;
border-radius: 0;
outline: none;
color: var(--color-search-font);
font-size: 16px;
z-index: 10000;
&:hover {
color: var(--color-search-background-hover);
}
&.empty * {
display: none;
}
}
#q,
#send_search {
2017-02-12 15:06:01 +01:00
display: block !important;
border-collapse: separate;
box-sizing: border-box;
margin: 0;
padding: 8px;
background: none repeat scroll 0 0 var(--color-search-background);
border: 1px solid var(--color-search-border);
border-radius: 0;
2017-02-12 15:06:01 +01:00
outline: none;
color: var(--color-search-font);
2017-02-12 15:06:01 +01:00
font-size: 16px;
z-index: 2;
}
#q {
outline: medium none;
padding-left: 12px;
padding-right: 0 !important;
2017-02-12 15:06:01 +01:00
border-right: none;
width: @search-width;
border-radius: 10px 0 0 10px;
2017-02-12 15:06:01 +01:00
}
#q::-ms-clear,
#q::-webkit-search-cancel-button {
display: none;
}
2017-02-12 15:06:01 +01:00
#send_search {
border-left: none;
border-radius: 0 10px 10px 0;
2017-02-12 15:06:01 +01:00
&:hover {
cursor: pointer;
background-color: var(--color-search-background-hover);
color: var(--color-search-background);
2017-02-12 15:06:01 +01:00
}
}
.no-js #send_search {
width: auto !important;
}
.search_filters {
display: inline-block;
margin: 0.8rem 0 0 0;
2017-02-12 15:06:01 +01:00
}
@media screen and (max-width: @tablet) {
#search {
padding: 1.5em @results-tablet-offset 0 @results-tablet-offset;
column-gap: @results-tablet-offset;
}
2017-02-12 15:06:01 +01:00
#categories {
font-size: 90%;
clear: both;
.checkbox_container {
margin: auto;
margin-top: 2px;
2017-02-12 15:06:01 +01:00
}
}
html.touch {
#main_index,
#main_results {
2017-02-12 15:06:01 +01:00
#categories_container {
width: 1000px;
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
.category {
display: inline-block;
width: auto;
}
}
#categories {
width: 100%;
margin: 0;
text-align: left;
overflow-x: scroll;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
}
}
}
}
@media screen and (max-width: @phone) {
2017-02-12 15:06:01 +01:00
#search {
width: 100%;
margin: 0;
padding: 0.1em 0 0 0;
column-gap: 0;
row-gap: 0;
grid-template-areas:
"logo search"
"categories categories";
}
.search_logo {
padding: 0;
2017-02-12 15:06:01 +01:00
}
#search_wrapper {
width: 100%;
padding: 0;
}
.search_box {
// hack, should bew 100% ?
width: 99%;
margin: 0.1em;
padding: 0 0.1em 0 0;
display: flex;
flex-direction: row;
}
#q {
width: auto !important;
flex: 1;
}
#main_results #q:placeholder-shown ~ #send_search {
margin-right: 2.6rem;
transition: margin-right 0.1s;
}
2017-02-12 15:06:01 +01:00
.search_filters {
display: block;
margin: 0.8em 0;
2017-02-12 15:06:01 +01:00
}
.language,
.time_range {
2017-02-12 15:06:01 +01:00
width: 45%;
}
.category {
display: block;
2021-06-25 11:31:14 +02:00
width: 100%;
2017-02-12 15:06:01 +01:00
label {
padding: 10px !important;
2017-02-12 15:06:01 +01:00
}
}
}
#categories {
margin: 0 10px 0 0;
.disable-user-select;
&::-webkit-scrollbar {
width: 0;
height: 0;
}
}
.category {
display: inline-block;
position: relative;
margin: 0 3px;
padding: 0;
2017-02-12 15:06:01 +01:00
input {
display: none;
}
label {
cursor: pointer;
padding: 0.3rem 0.75rem 0.5rem 0.75rem;
2017-02-12 15:06:01 +01:00
margin: 0;
display: block;
text-transform: capitalize;
font-size: 0.9em;
border-bottom: 2px solid transparent;
.disable-user-select;
}
input[type="checkbox"]:checked + label {
color: var(--color-categories-item-selected-font);
border-bottom: 2px solid var(--color-categories-item-border-selected);
2017-02-12 15:06:01 +01:00
}
}
#categories_container {
position: relative;
}