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

1044 lines
17 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
*
* To convert "style.less" to "style.css" run: $make styles
*/
// stylelint-disable no-descending-specificity
@import (inline) "../../node_modules/normalize.css/normalize.css";
2017-02-12 15:06:01 +01:00
@import "definitions.less";
@import "mixins.less";
@import "code.less";
@import "toolkit.less";
@import "autocomplete.less";
@import "detail.less";
@import "animations.less";
@import "embedded.less";
@import "info.less";
2022-05-07 15:11:05 +02:00
@import "new_issue.less";
@import "stats.less";
@import "result_templates.less";
2017-02-12 15:06:01 +01:00
// for index.html template
@import "index.less";
// for preferences.html template
@import "preferences.less";
// Search-Field
@import "search.less";
// to center the results
@import "style-center.less";
// ion-icon
.ion-icon {
display: inline-block;
vertical-align: bottom;
line-height: 1;
text-decoration: inherit;
.ltr-transform();
}
.ion-icon-small {
width: 1rem;
height: 1rem;
.ion-icon;
}
.ion-icon-big {
width: 1.5rem;
height: 1.5rem;
.ion-icon;
}
2017-02-12 15:06:01 +01:00
// Main LESS-Code
html {
font-family: sans-serif;
2017-02-12 15:06:01 +01:00
font-size: 0.9em;
.text-size-adjust;
color: var(--color-base-font);
background-color: var(--color-base-background);
2017-02-12 15:06:01 +01:00
padding: 0;
margin: 0;
}
body,
main {
2017-02-12 15:06:01 +01:00
padding: 0;
margin: 0;
}
2021-06-25 11:31:14 +02:00
body {
display: flex;
flex-direction: column;
height: 100vh;
margin: 0;
}
2017-02-12 15:06:01 +01:00
main {
width: 100%;
2021-06-25 11:31:14 +02:00
margin-bottom: 2rem;
flex: 1;
2017-02-12 15:06:01 +01:00
}
.page_with_header {
margin: 2em auto;
width: 85em;
2017-02-12 15:06:01 +01:00
}
footer {
clear: both;
2021-06-25 11:31:14 +02:00
min-height: 4rem;
padding: 1rem 0;
2017-02-12 15:06:01 +01:00
width: 100%;
text-align: center;
background-color: var(--color-footer-background);
border-top: 1px solid var(--color-footer-border);
2021-06-25 11:31:14 +02:00
overflow: hidden;
2017-02-12 15:06:01 +01:00
p {
font-size: 0.9em;
}
}
.page_with_header .logo {
height: 40px;
2017-02-12 15:06:01 +01:00
}
input[type="submit"],
#results button[type="submit"] {
padding: 0.7rem;
2017-02-12 15:06:01 +01:00
display: inline-block;
background: var(--color-btn-background);
color: var(--color-btn-font);
2017-02-12 15:06:01 +01:00
.rounded-corners;
2017-02-12 15:06:01 +01:00
border: 0;
cursor: pointer;
}
a {
text-decoration: none;
color: var(--color-url-font);
2017-02-12 15:06:01 +01:00
&:visited {
color: var(--color-url-visited-font);
2017-02-12 15:06:01 +01:00
.highlight {
color: var(--color-url-visited-font);
2017-02-12 15:06:01 +01:00
}
}
}
article[data-vim-selected] {
background: var(--color-result-vim-selected);
.ltr-border-left(0.2rem solid var(--color-result-vim-arrow));
.ltr-rounded-right-corners(10px);
2017-02-12 15:06:01 +01:00
}
article.result-images[data-vim-selected] {
background: var(--color-result-vim-arrow);
border: none;
.rounded-corners;
.image_thumbnail {
filter: opacity(60%);
}
span.title,
span.source {
color: var(--color-result-image-span-font-selected);
}
2017-02-12 15:06:01 +01:00
}
article[data-vim-selected].category-videos,
article[data-vim-selected].category-news,
article[data-vim-selected].category-map,
article[data-vim-selected].category-music,
article[data-vim-selected].category-files,
article[data-vim-selected].category-social {
border: 1px solid var(--color-result-vim-arrow);
.rounded-corners;
}
2017-02-12 15:06:01 +01:00
.result {
margin: @results-margin 0;
padding: @result-padding;
.ltr-border-left(0.2rem solid transparent);
2017-02-12 15:06:01 +01:00
h3 {
font-size: 1.2rem;
word-wrap: break-word;
margin: 0.4rem 0 0.4rem 0;
2017-02-12 15:06:01 +01:00
padding: 0;
a {
color: var(--color-result-link-font);
2017-02-12 15:06:01 +01:00
font-weight: normal;
font-size: 1.1em;
&:visited {
color: var(--color-result-link-visited-font);
2017-02-12 15:06:01 +01:00
}
&:focus,
&:hover {
2017-02-12 15:06:01 +01:00
text-decoration: underline;
border: none;
outline: none;
2017-02-12 15:06:01 +01:00
}
}
}
.cache_link,
.proxyfied_link {
2017-02-12 15:06:01 +01:00
font-size: 0.9em !important;
}
.content,
.stat {
2017-02-12 15:06:01 +01:00
font-size: 0.9em;
margin: 0;
padding: 0;
max-width: 54em;
word-wrap: break-word;
2017-02-12 15:06:01 +01:00
line-height: 1.24;
.highlight {
color: var(--color-result-description-highlight-font);
2017-02-12 15:06:01 +01:00
background: inherit;
font-weight: bold;
}
}
.altlink a {
font-size: 0.9em;
margin: 0 10px 0 0;
.show-content-button;
}
2017-02-12 15:06:01 +01:00
.codelines {
.highlight {
color: inherit;
background: inherit;
font-weight: normal;
}
}
.url_wrapper {
display: flex;
font-size: 1rem;
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;
}
}
2017-02-12 15:06:01 +01:00
}
.published_date,
.result_length,
.result_author,
.result_shipping,
.result_source_country {
2017-02-12 15:06:01 +01:00
font-size: 0.8em;
color: var(--color-result-publishdate-font);
2017-02-12 15:06:01 +01:00
}
.result_price {
font-size: 1.2em;
color: var(--color-result-description-highlight-font);
}
2017-02-12 15:06:01 +01:00
img {
&.thumbnail {
.ltr-float-left();
padding-top: 0.6rem;
.ltr-padding-right(1rem);
width: 20rem;
height: unset; // remove heigth value that was needed for lazy loading
2017-02-12 15:06:01 +01:00
}
&.image {
.ltr-float-left();
padding-top: 0.6rem;
.ltr-padding-right(1rem);
width: 7rem;
max-height: 7rem;
2017-02-12 15:06:01 +01:00
object-fit: scale-down;
object-position: right top;
}
}
.break {
clear: both;
2017-02-12 15:06:01 +01:00
}
}
2022-08-26 18:07:18 +02:00
.result-paper {
.attributes {
display: table;
border-spacing: 0.125rem;
div {
display: table-row;
span {
font-size: 0.9rem;
margin-top: 0.25rem;
display: table-cell;
time {
font-size: 0.9rem;
}
}
span:first-child {
color: var(--color-base-font);
min-width: 10rem;
}
span:nth-child(2) {
color: var(--color-result-publishdate-font);
}
}
}
.content {
margin-top: 0.25rem;
}
.comments {
font-size: 0.9rem;
margin: 0.25rem 0 0 0;
padding: 0;
word-wrap: break-word;
line-height: 1.24;
font-style: italic;
}
}
.template_group_images {
display: flex;
flex-wrap: wrap;
}
.template_group_images::after {
flex-grow: 10;
content: "";
}
.category-videos,
.category-news,
.category-map,
.category-music,
.category-files,
.category-social {
border: 1px solid var(--color-result-border);
margin: 1rem @results-tablet-offset 0 @results-tablet-offset !important;
.rounded-corners;
}
2017-02-12 15:06:01 +01:00
.category-social .image {
width: auto !important;
min-width: 48px;
min-height: 48px;
padding: 0 5px 25px 0 !important;
}
.audio-control audio {
width: 100%;
padding: 10px 0 0 0;
}
.embedded-content iframe {
width: 100%;
padding: 10px 0 0 0;
}
2017-02-12 15:06:01 +01:00
.result-videos .content {
overflow: hidden;
}
.result-videos .embedded-video iframe {
width: 100%;
aspect-ratio: 16 / 9;
padding: 10px 0 0 0;
}
@supports not (aspect-ratio: 1 / 1) {
// support older browsers which do not have aspect-ratio
// https://caniuse.com/?search=aspect-ratio
.result-videos .embedded-video iframe {
height: calc(@results-width * 9 / 16);
}
}
2017-02-12 15:06:01 +01:00
.engines {
.ltr-float-right();
color: var(--color-result-engines-font);
2017-02-12 15:06:01 +01:00
span {
font-size: smaller;
margin-top: 0;
margin-bottom: 0;
.ltr-margin-right(0.5rem);
.ltr-margin-left(0);
2017-02-12 15:06:01 +01:00
}
}
.small_font {
font-size: 0.8em;
}
.highlight {
color: var(--color-result-link-font-highlight);
2017-02-12 15:06:01 +01:00
background: inherit;
}
.empty_element {
font-style: italic;
}
2017-02-12 15:06:01 +01:00
.result-images {
flex-grow: 1;
padding: 0.5rem 0.5rem 3rem 0.5rem;
margin: 0.25rem;
border: none !important;
height: @results-image-row-height;
& > a {
position: relative;
}
2017-02-12 15:06:01 +01:00
img {
margin: 0;
2017-02-12 15:06:01 +01:00
padding: 0;
border: none;
height: 100%;
width: 100%;
object-fit: cover;
vertical-align: bottom;
background: var(--color-result-image-background);
2017-02-12 15:06:01 +01:00
}
span.title,
span.source {
2017-02-12 15:06:01 +01:00
display: block;
position: absolute;
width: 100%;
font-size: 0.9rem;
color: var(--color-result-image-span-font);
padding: 0.5rem 0 0 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
2017-02-12 15:06:01 +01:00
}
span.source {
padding: 1.8rem 0 0 0;
font-size: 0.7rem;
}
2017-02-12 15:06:01 +01:00
}
.result-map {
img.image {
.ltr-float-right() !important;
height: 100px !important;
width: auto !important;
}
table {
font-size: 0.9em;
width: auto;
border-collapse: separate;
border-spacing: 0 0.35rem;
th {
font-weight: inherit;
width: 17rem;
vertical-align: top;
.ltr-text-align-left();
}
td {
vertical-align: top;
.ltr-text-align-left();
}
}
}
.hidden {
display: none !important;
}
2017-02-12 15:06:01 +01:00
#results {
margin-top: 1rem;
.ltr-margin-right(2rem);
margin-bottom: 0;
.ltr-margin-left(@results-offset);
2021-06-25 11:31:14 +02:00
display: grid;
grid-template-columns: @results-width @results-sidebar-width;
grid-template-rows: min-content min-content 1fr min-content;
gap: 0 @results-gap;
2021-06-25 11:31:14 +02:00
grid-template-areas:
"corrections sidebar"
2021-06-25 11:31:14 +02:00
"answers sidebar"
"urls sidebar"
"pagination sidebar";
}
#results #sidebar *:first-child,
#results #urls *:first-child {
margin-top: 0;
}
#urls {
2017-02-12 15:06:01 +01:00
padding: 0;
2021-06-25 11:31:14 +02:00
grid-area: urls;
2017-02-12 15:06:01 +01:00
}
#suggestions {
.wrapper {
display: flex;
flex-flow: row wrap;
justify-content: flex-end;
form {
display: inline-block;
flex: 1 1 50%;
}
}
}
#suggestions,
#infoboxes {
2017-02-12 15:06:01 +01:00
input {
padding: 0;
margin: 3px;
font-size: 0.9em;
display: inline-block;
background: transparent;
color: var(--color-result-search-url-font);
2017-02-12 15:06:01 +01:00
cursor: pointer;
}
input[type="submit"],
.infobox .url a {
color: var(--color-result-link-font);
2017-02-12 15:06:01 +01:00
text-decoration: none;
font-size: 0.9rem;
&:hover {
text-decoration: underline;
}
}
}
#corrections {
grid-area: corrections;
2017-02-12 15:06:01 +01:00
display: flex;
flex-flow: row wrap;
margin: 0 0 1em 0;
2017-02-12 15:06:01 +01:00
h4,
input[type="submit"] {
2017-02-12 15:06:01 +01:00
display: inline-block;
padding: 0.5rem;
margin: 0.5rem;
2017-02-12 15:06:01 +01:00
}
input[type="submit"] {
font-size: 0.8rem;
.rounded-corners-tiny;
2017-02-12 15:06:01 +01:00
}
}
#suggestions .title,
#search_url .title,
#apis .title {
2017-02-12 15:06:01 +01:00
margin: 2em 0 0.5em 0;
color: var(--color-base-font);
2017-02-12 15:06:01 +01:00
}
#answers {
2021-06-25 11:31:14 +02:00
grid-area: answers;
background: var(--color-answer-background);
padding: @result-padding;
margin: 1rem 0;
margin-top: 0;
color: var(--color-answer-font);
.rounded-corners;
2017-02-12 15:06:01 +01:00
h4 {
display: none;
}
span {
overflow-wrap: anywhere;
}
2017-02-12 15:06:01 +01:00
}
#infoboxes {
2017-02-12 15:06:01 +01:00
form {
min-width: 210px;
}
}
#sidebar {
2021-06-25 11:31:14 +02:00
grid-area: sidebar;
2017-02-12 15:06:01 +01:00
word-wrap: break-word;
color: var(--color-sidebar-font);
2017-02-12 15:06:01 +01:00
.infobox {
margin: 10px 0 10px;
border: 1px solid var(--color-sidebar-border);
padding: 1rem;
2017-02-12 15:06:01 +01:00
font-size: 0.9em;
.rounded-corners;
2017-02-12 15:06:01 +01:00
h2 {
margin: 0 0 0.5em 0;
2017-02-12 15:06:01 +01:00
}
img {
max-width: 100%;
max-height: 12em;
display: block;
margin: 0 auto;
2017-02-12 15:06:01 +01:00
padding: 0;
}
dt {
font-weight: bold;
}
.attributes {
dl {
margin: 0.5em 0;
}
dt {
display: inline;
margin-top: 0.5em;
.ltr-margin-right(0.25em);
margin-bottom: 0.5em;
.ltr-margin-left(0);
padding: 0;
}
dd {
display: inline;
margin: 0.5em 0;
padding: 0;
}
2017-02-12 15:06:01 +01:00
}
input {
font-size: 1em;
}
br {
clear: both;
}
.attributes,
.urls {
2017-02-12 15:06:01 +01:00
clear: both;
}
}
}
#search_url {
margin-top: 8px;
div.selectable_url {
2017-02-12 15:06:01 +01:00
pre {
width: 200em;
}
}
}
#links_on_top {
2017-02-12 15:06:01 +01:00
position: absolute;
.ltr-right(1.8rem);
.ltr-text-align-right();
top: 2.2rem;
2017-02-12 15:06:01 +01:00
padding: 0;
border: 0;
display: flex;
align-items: center;
font-size: 1em;
color: var(--color-search-font);
2017-02-12 15:06:01 +01:00
a {
display: flex;
align-items: center;
margin-left: 1em;
svg {
font-size: 1.2em;
.ltr-margin-right(0.125em);
}
}
a,
a:link *,
a:hover *,
a:visited *,
a:active * {
color: var(--color-search-font);
2017-02-12 15:06:01 +01:00
}
}
#pagination {
2021-06-25 11:31:14 +02:00
grid-area: pagination;
2017-02-12 15:06:01 +01:00
br {
clear: both;
}
}
#apis {
margin-top: 8px;
clear: both;
}
#backToTop {
border: 1px solid var(--color-backtotop-border);
margin: 0;
2017-02-12 15:06:01 +01:00
padding: 0;
font-size: 1em;
background: var(--color-backtotop-background);
2017-02-12 15:06:01 +01:00
position: fixed;
bottom: 8rem;
.ltr-left(@results-width + @results-offset + (0.5 * @results-gap - 1.2em));
2017-02-12 15:06:01 +01:00
transition: opacity 0.5s;
opacity: 0;
.rounded-corners;
2017-02-12 15:06:01 +01:00
a {
display: block;
margin: 0;
padding: 0.7em;
2017-02-12 15:06:01 +01:00
}
a,
a:visited,
a:hover,
a:active {
color: var(--color-backtotop-font);
}
2017-02-12 15:06:01 +01:00
}
#results.scrolling #backToTop {
opacity: 1;
}
/*
tablet layout
*/
.results-tablet() {
#links_on_top {
span {
display: none;
}
}
.page_with_header {
margin: 2rem 0.5rem;
width: auto;
}
2017-02-12 15:06:01 +01:00
#infoboxes {
position: inherit;
max-width: inherit;
2017-02-12 15:06:01 +01:00
.infobox {
clear: both;
2017-02-12 15:06:01 +01:00
img {
.ltr-float-left();
max-width: 10em;
margin-top: 0.5em;
.ltr-margin-right(0.5em);
margin-bottom: 0.5em;
.ltr-margin-left(0);
2017-02-12 15:06:01 +01:00
}
}
}
2017-02-12 15:06:01 +01:00
#sidebar {
margin: 0 @results-tablet-offset @results-margin @results-tablet-offset;
padding: 0;
float: none;
border: none;
width: auto;
2017-02-12 15:06:01 +01:00
input {
border: 0;
}
}
2017-02-12 15:06:01 +01:00
#apis {
display: none;
}
2017-02-12 15:06:01 +01:00
#search_url {
display: none;
}
.result {
.thumbnail {
max-width: 98%;
}
2017-02-12 15:06:01 +01:00
.url {
span.url {
display: block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
2017-02-12 15:06:01 +01:00
}
}
.engines {
.ltr-float-right();
padding: 0 0 3px 0;
2017-02-12 15:06:01 +01:00
}
}
2017-02-12 15:06:01 +01:00
.result-images {
border-bottom: none !important;
}
2017-02-12 15:06:01 +01:00
.image_result {
max-width: 98%;
img {
max-width: 98%;
2017-02-12 15:06:01 +01:00
}
}
#backToTop {
display: none;
}
#pagination {
margin: 2rem 0 0 0 !important;
}
#main_results div#results {
margin: 1rem auto 0 auto;
justify-content: center;
display: grid;
grid-template-columns: @results-width;
grid-template-rows: min-content min-content min-content 1fr min-content min-content;
gap: 0;
grid-template-areas:
"corrections"
"answers"
"sidebar"
"urls"
"pagination";
}
2017-02-12 15:06:01 +01:00
}
@media screen and (max-width: calc(@tablet - 0.5px)) {
#links_on_top {
span {
display: none;
}
}
}
@media screen and (max-width: 52rem) {
body.results_endpoint {
#links_on_top {
.link_on_top_about,
.link_on_top_donate {
display: none;
}
}
}
}
@media screen and (min-width: @phone) and (max-width: @tablet) {
// when .center-aligment-yes, see style-center.less
// the media query includes "min-width: @phone"
// because the phone layout includes the tablet layout unconditionally.
.center-aligment-no {
.results-tablet();
}
}
/* Misc */
#main_results div#results.only_template_images {
margin: 1rem @results-tablet-offset 0 @results-tablet-offset;
2021-06-25 11:31:14 +02:00
display: grid;
grid-template-columns: 100%;
grid-template-rows: min-content min-content min-content 1fr min-content;
gap: 0;
2021-06-25 11:31:14 +02:00
grid-template-areas:
"corrections"
"answers"
2021-06-25 11:31:14 +02:00
"sidebar"
"urls"
2021-06-25 11:31:14 +02:00
"pagination";
#sidebar {
display: none;
}
#urls {
margin: 0;
display: flex;
flex-wrap: wrap;
}
#urls::after {
flex-grow: 10;
content: "";
}
#backToTop {
.ltr-left(auto);
.ltr-right(1rem);
}
#pagination {
.ltr-margin-right(4rem);
}
2021-06-25 11:31:14 +02:00
}
/*
phone layout
*/
@media screen and (max-width: @phone) {
// based on the tablet layout
.results-tablet();
html {
background-color: var(--color-base-background-mobile);
}
#main_results div#results {
grid-template-columns: 100%;
margin: 1rem 0 0 0;
2017-02-12 15:06:01 +01:00
}
#links_on_top {
top: 0.8rem;
.ltr-right(0.7rem);
}
#main_index #links_on_top {
top: 0.5rem;
.ltr-right(0.5rem);
2017-02-12 15:06:01 +01:00
}
#results {
margin: 0;
padding: 0;
}
#pagination {
margin: 2rem 1rem 0 1rem !important;
2017-02-12 15:06:01 +01:00
}
article[data-vim-selected] {
border: 1px solid var(--color-result-vim-arrow);
.rounded-corners;
2017-02-12 15:06:01 +01:00
}
.result {
background: var(--color-result-background);
margin: 1rem 0;
}
2017-02-12 15:06:01 +01:00
.result-images {
margin: 0;
height: @results-image-row-height-phone;
background: var(--color-base-background-mobile);
}
.infobox {
border: none !important;
background-color: var(--color-sidebar-background);
2017-02-12 15:06:01 +01:00
}
2022-08-26 18:07:18 +02:00
.result-paper {
.attributes {
display: block;
div {
display: block;
span {
display: inline;
}
span:first-child {
font-weight: bold;
}
span:nth-child(2) {
.ltr-margin-left(0.5rem);
}
}
}
}
2017-02-12 15:06:01 +01:00
}
/*
small-phone layout
*/
@media screen and (max-width: @small-phone) {
2017-02-12 15:06:01 +01:00
.result-videos {
img.thumbnail {
float: none !important;
}
2017-02-12 15:06:01 +01:00
.content {
overflow: inherit;
}
}
}
pre code {
white-space: pre-wrap;
}