mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00

* mirror all inline SVGs so that direction SVGs display correctly on RTL * set the bold list element in info box to RTL so the colon gets displayed on the right side * set correct .ltr function for the left border on the search button in #q * move text to the right in autocomplete * move search form in lign with result article on RTL * add the correct padding for img thumbnails in categories like music on RTL * apply RTL to result table for map results * align text in tables part of /preferences on RTL * move burger menu on index page to the left on RTL * fix positioning of drop down arrow on select boxes on RTL * align result URL on the right (written LTR) * align vim hotkeys help on the left since it is not translated * image detail: * labels (author, format, URL, etc...) are written on the right, values are on the left. * URL are written LTR and overflow on the right
300 lines
5.2 KiB
Text
300 lines
5.2 KiB
Text
/*
|
|
* SearXNG, A privacy-respecting, hackable metasearch engine
|
|
*/
|
|
|
|
#search {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
#search_header {
|
|
padding-top: 1.5em;
|
|
.ltr-padding-right(2em);
|
|
.ltr-padding-left(@results-offset - 3rem);
|
|
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";
|
|
}
|
|
|
|
.category {
|
|
display: inline-block;
|
|
position: relative;
|
|
.ltr-margin-right(1rem);
|
|
padding: 0;
|
|
|
|
input {
|
|
display: none;
|
|
}
|
|
|
|
label {
|
|
svg {
|
|
padding-right: 0.2rem;
|
|
}
|
|
|
|
cursor: pointer;
|
|
padding: 0.2rem 0;
|
|
display: inline-flex;
|
|
text-transform: capitalize;
|
|
font-size: 0.9em;
|
|
border-bottom: 2px solid transparent;
|
|
.disable-user-select;
|
|
|
|
div.category_name {
|
|
margin: auto 0;
|
|
}
|
|
}
|
|
|
|
input[type="checkbox"]:checked + label {
|
|
color: var(--color-categories-item-selected-font);
|
|
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
}
|
|
}
|
|
|
|
#search_logo {
|
|
grid-area: logo;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
svg {
|
|
flex: 1;
|
|
width: 30px;
|
|
height: 30px;
|
|
margin: 0.5rem 0 auto 0;
|
|
}
|
|
}
|
|
|
|
.search_categories {
|
|
grid-area: categories;
|
|
}
|
|
|
|
.search_box {
|
|
margin: 0;
|
|
padding: 0;
|
|
grid-area: search;
|
|
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 {
|
|
display: block !important;
|
|
border-collapse: separate;
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 10px;
|
|
background: none repeat scroll 0 0 var(--color-search-background);
|
|
border: 1px solid var(--color-search-border);
|
|
border-radius: 0;
|
|
outline: none;
|
|
color: var(--color-search-font);
|
|
font-size: 16px;
|
|
z-index: 2;
|
|
}
|
|
|
|
#q {
|
|
outline: medium none;
|
|
.ltr-padding-left(12px);
|
|
.ltr-padding-right(0) !important;
|
|
.ltr-border-right(none);
|
|
width: @search-width;
|
|
.ltr-rounded-left-corners();
|
|
}
|
|
|
|
#q::-ms-clear,
|
|
#q::-webkit-search-cancel-button {
|
|
display: none;
|
|
}
|
|
|
|
#send_search {
|
|
.ltr-border-left(none);
|
|
.ltr-rounded-right-corners();
|
|
|
|
&:hover {
|
|
cursor: pointer;
|
|
background-color: var(--color-search-background-hover);
|
|
color: var(--color-search-background);
|
|
}
|
|
}
|
|
|
|
.no-js #clear_search,
|
|
.no-js #send_search {
|
|
width: auto !important;
|
|
.ltr-border-left(1px solid var(--color-search-border));
|
|
padding: 10px;
|
|
}
|
|
|
|
.search_filters {
|
|
margin-top: 0.6rem;
|
|
.ltr-margin-right(0);
|
|
margin-bottom: 0;
|
|
.ltr-margin-left(@results-offset + 0.6rem);
|
|
|
|
select {
|
|
background-color: inherit;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: var(--color-base-font);
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: @tablet) {
|
|
#search_header {
|
|
padding: 1.5em @results-tablet-offset 0 @results-tablet-offset;
|
|
column-gap: @results-tablet-offset;
|
|
}
|
|
|
|
.search_filters {
|
|
margin-top: 0.6rem;
|
|
.ltr-margin-right(0);
|
|
margin-bottom: 0;
|
|
.ltr-margin-left(@results-tablet-offset + 3rem);
|
|
}
|
|
|
|
#categories {
|
|
font-size: 90%;
|
|
clear: both;
|
|
|
|
.checkbox_container {
|
|
margin: auto;
|
|
margin-top: 2px;
|
|
}
|
|
}
|
|
|
|
html.touch {
|
|
#main_index,
|
|
#main_results {
|
|
#categories_container {
|
|
width: max-content;
|
|
|
|
.category {
|
|
display: inline-block;
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
#categories {
|
|
width: 100%;
|
|
.ltr-text-align-left();
|
|
overflow-x: scroll;
|
|
overflow-y: hidden;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: @phone) {
|
|
#search_header {
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0.1rem 0 0 0;
|
|
column-gap: 0;
|
|
row-gap: 0;
|
|
grid-template-areas:
|
|
"logo search"
|
|
"categories categories";
|
|
}
|
|
|
|
.search_logo {
|
|
padding: 0;
|
|
}
|
|
|
|
.search_box {
|
|
// hack, should be 100% ?
|
|
width: 99%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
}
|
|
|
|
#q {
|
|
width: 100%;
|
|
flex: 1;
|
|
}
|
|
|
|
#main_results #q:placeholder-shown ~ #send_search {
|
|
margin-right: 2.6rem;
|
|
transition: margin-right 0.1s; // FIX RTL
|
|
}
|
|
|
|
.search_filters {
|
|
margin: 0;
|
|
}
|
|
|
|
.category {
|
|
display: block;
|
|
width: 100%;
|
|
margin: 0;
|
|
|
|
label {
|
|
padding: 0.8rem !important;
|
|
margin: 0 !important;
|
|
|
|
svg {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: @ultra-small-phone) {
|
|
#search_header {
|
|
grid-template-areas:
|
|
"search search"
|
|
"categories categories";
|
|
}
|
|
|
|
#search_logo {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
#categories {
|
|
.disable-user-select;
|
|
|
|
&::-webkit-scrollbar {
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
}
|
|
|
|
#categories_container {
|
|
position: relative;
|
|
}
|