style.less 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. /*
  2. * SearXNG, A privacy-respecting, hackable metasearch engine
  3. *
  4. * To convert "style.less" to "style.css" run: $make styles
  5. */
  6. // stylelint-disable no-descending-specificity
  7. @import "../../__common__/less/new_issue.less";
  8. @import "../../__common__/less/stats.less";
  9. @import "../../__common__/less/result_templates.less";
  10. @import (inline) "../../node_modules/normalize.css/normalize.css";
  11. @import "definitions.less";
  12. @import "mixins.less";
  13. @import "code.less";
  14. @import "toolkit.less";
  15. @import "autocomplete.less";
  16. @import "detail.less";
  17. @import "animations.less";
  18. // for index.html template
  19. @import "index.less";
  20. // for preferences.html template
  21. @import "preferences.less";
  22. // Search-Field
  23. @import "search.less";
  24. // ion-icon
  25. .ion-icon {
  26. display: inline-block;
  27. vertical-align: bottom;
  28. line-height: 1;
  29. text-decoration: inherit;
  30. }
  31. .ion-icon-small {
  32. width: 1rem;
  33. height: 1rem;
  34. .ion-icon;
  35. }
  36. .ion-icon-big {
  37. width: 1.5rem;
  38. height: 1.5rem;
  39. .ion-icon;
  40. }
  41. // Main LESS-Code
  42. html {
  43. font-family: sans-serif;
  44. font-size: 0.9em;
  45. .text-size-adjust;
  46. color: var(--color-base-font);
  47. background-color: var(--color-base-background);
  48. padding: 0;
  49. margin: 0;
  50. }
  51. body,
  52. main {
  53. padding: 0;
  54. margin: 0;
  55. }
  56. body {
  57. display: flex;
  58. flex-direction: column;
  59. height: 100vh;
  60. margin: 0;
  61. }
  62. main {
  63. width: 100%;
  64. margin-bottom: 2rem;
  65. flex: 1;
  66. }
  67. #main_preferences,
  68. #main_about,
  69. #main_stats {
  70. margin: 2em auto;
  71. width: 85em;
  72. }
  73. footer {
  74. clear: both;
  75. min-height: 4rem;
  76. padding: 1rem 0;
  77. width: 100%;
  78. text-align: center;
  79. background-color: var(--color-footer-background);
  80. border-top: 1px solid var(--color-footer-border);
  81. overflow: hidden;
  82. p {
  83. font-size: 0.9em;
  84. }
  85. }
  86. #main_preferences h1,
  87. #main_stats h1 {
  88. background: url('../img/searxng.png') no-repeat;
  89. background-size: contain;
  90. min-height: 40px;
  91. margin: 0 auto;
  92. span {
  93. visibility: hidden;
  94. }
  95. }
  96. input[type="submit"],
  97. #results button[type="submit"] {
  98. padding: 0.7rem;
  99. display: inline-block;
  100. background: var(--color-btn-background);
  101. color: var(--color-btn-font);
  102. .rounded-corners;
  103. border: 0;
  104. cursor: pointer;
  105. }
  106. a {
  107. text-decoration: none;
  108. color: var(--color-url-font);
  109. &:visited {
  110. color: var(--color-url-visited-font);
  111. .highlight {
  112. color: var(--color-url-visited-font);
  113. }
  114. }
  115. }
  116. article[data-vim-selected] {
  117. background: var(--color-result-vim-selected);
  118. border-left: 0.2rem solid var(--color-result-vim-arrow);
  119. .rounded-right-corners;
  120. }
  121. article.result-images[data-vim-selected] {
  122. background: var(--color-result-vim-arrow);
  123. border: none;
  124. .rounded-corners;
  125. .image_thumbnail {
  126. filter: opacity(60%);
  127. }
  128. }
  129. article[data-vim-selected].category-videos,
  130. article[data-vim-selected].category-news,
  131. article[data-vim-selected].category-map,
  132. article[data-vim-selected].category-music,
  133. article[data-vim-selected].category-files,
  134. article[data-vim-selected].category-social {
  135. border: 1px solid var(--color-result-vim-arrow);
  136. .rounded-corners;
  137. }
  138. .result {
  139. margin: @results-margin 0;
  140. padding: @result-padding;
  141. border-left: 0.2rem solid transparent;
  142. h3 {
  143. font-size: 1.2rem;
  144. word-wrap: break-word;
  145. margin: 0.4rem 0 0.4rem 0;
  146. padding: 0;
  147. a {
  148. color: var(--color-result-link-font);
  149. font-weight: normal;
  150. font-size: 1.1em;
  151. &:visited {
  152. color: var(--color-result-link-visited-font);
  153. }
  154. &:focus,
  155. &:hover {
  156. text-decoration: underline;
  157. border: none;
  158. outline: none;
  159. }
  160. }
  161. }
  162. .cache_link,
  163. .proxyfied_link {
  164. font-size: 0.9em !important;
  165. }
  166. .content,
  167. .stat,
  168. .altlink {
  169. font-size: 0.9em;
  170. margin: 0;
  171. padding: 0;
  172. max-width: 54em;
  173. word-wrap: break-word;
  174. line-height: 1.24;
  175. .highlight {
  176. color: var(--color-result-description-highlight-font);
  177. background: inherit;
  178. font-weight: bold;
  179. }
  180. }
  181. .codelines {
  182. .highlight {
  183. color: inherit;
  184. background: inherit;
  185. font-weight: normal;
  186. }
  187. }
  188. .url_wrapper {
  189. display: flex;
  190. font-size: 1rem;
  191. color: var(--color-result-url-font);
  192. flex-wrap: nowrap;
  193. overflow: hidden;
  194. flex-direction: row;
  195. margin: 0;
  196. padding: 0;
  197. .url_o1 {
  198. white-space: nowrap;
  199. flex-shrink: 1;
  200. }
  201. .url_o1::after {
  202. content: " ";
  203. width: 1ch;
  204. display: inline-block;
  205. }
  206. .url_o2 {
  207. overflow: hidden;
  208. white-space: nowrap;
  209. flex-basis: content;
  210. flex-grow: 0;
  211. flex-shrink: 1;
  212. text-align: right;
  213. .url_i2 {
  214. float: right;
  215. }
  216. }
  217. }
  218. .published_date {
  219. font-size: 0.8em;
  220. color: var(--color-result-publishdate-font);
  221. }
  222. img {
  223. &.thumbnail {
  224. float: left;
  225. padding: 0.6rem 1rem 0 0;
  226. width: 20rem;
  227. }
  228. &.image {
  229. float: left;
  230. padding: 0.6rem 1rem 0 0;
  231. width: 7rem;
  232. max-height: 7rem;
  233. object-fit: scale-down;
  234. object-position: right top;
  235. }
  236. }
  237. .break {
  238. clear: both;
  239. }
  240. }
  241. .category-videos,
  242. .category-news,
  243. .category-map,
  244. .category-music,
  245. .category-files,
  246. .category-social {
  247. border: 1px solid var(--color-result-border);
  248. margin: 1rem 0;
  249. .rounded-corners;
  250. }
  251. .category-social .image {
  252. width: auto !important;
  253. min-width: 48px;
  254. min-height: 48px;
  255. padding: 0 5px 25px 0 !important;
  256. }
  257. .result-videos .content {
  258. overflow: hidden;
  259. }
  260. .engines {
  261. float: right;
  262. color: var(--color-result-engines-font);
  263. span {
  264. font-size: smaller;
  265. margin: 0 0.5em 0 0;
  266. }
  267. }
  268. .small_font {
  269. font-size: 0.8em;
  270. }
  271. .highlight {
  272. color: var(--color-result-link-font-highlight);
  273. background: inherit;
  274. }
  275. .empty_element {
  276. font-style: italic;
  277. }
  278. .result-images {
  279. display: inline-block;
  280. margin: 0;
  281. padding: 0;
  282. position: relative;
  283. max-height: 200px;
  284. border: none !important;
  285. img {
  286. float: inherit;
  287. margin: 0.125rem;
  288. padding: 0;
  289. border: none;
  290. max-height: 200px;
  291. background: var(--color-result-image-background);
  292. }
  293. span.title {
  294. display: none;
  295. color: var(--color-result-image-span-font);
  296. }
  297. &:hover span.title {
  298. display: block;
  299. position: absolute;
  300. bottom: 0;
  301. right: 0;
  302. padding: 4px;
  303. margin: 0 0 4px 4px;
  304. // color: @color-result-image-span-font;
  305. background-color: var(--color-result-image-span-background-hover);
  306. font-size: 0.7em;
  307. }
  308. }
  309. .result-map {
  310. img.image {
  311. float: right !important;
  312. height: 100px !important;
  313. width: auto !important;
  314. }
  315. table {
  316. font-size: 0.9em;
  317. width: auto;
  318. border-collapse: separate;
  319. border-spacing: 0 0.35rem;
  320. th {
  321. font-weight: inherit;
  322. width: 17rem;
  323. vertical-align: top;
  324. text-align: left;
  325. }
  326. td {
  327. vertical-align: top;
  328. text-align: left;
  329. }
  330. }
  331. }
  332. .hidden {
  333. display: none !important;
  334. }
  335. #results {
  336. margin: 1rem 2rem 0 @results-offset;
  337. display: grid;
  338. grid-template-columns: @results-width 25rem;
  339. grid-template-rows: min-content min-content 1fr min-content;
  340. gap: 0 @results-gap;
  341. grid-template-areas:
  342. "corrections sidebar"
  343. "answers sidebar"
  344. "urls sidebar"
  345. "pagination sidebar";
  346. }
  347. #results #sidebar *:first-child,
  348. #results #urls *:first-child {
  349. margin-top: 0;
  350. }
  351. #urls {
  352. padding: 0;
  353. grid-area: urls;
  354. }
  355. #suggestions {
  356. .wrapper {
  357. display: flex;
  358. flex-flow: row wrap;
  359. justify-content: flex-end;
  360. form {
  361. display: inline-block;
  362. flex: 1 1 50%;
  363. }
  364. }
  365. }
  366. #suggestions,
  367. #infoboxes {
  368. input {
  369. padding: 0;
  370. margin: 3px;
  371. font-size: 0.9em;
  372. display: inline-block;
  373. background: transparent;
  374. color: var(--color-result-search-url-font);
  375. cursor: pointer;
  376. }
  377. input[type="submit"],
  378. .infobox .url a {
  379. color: var(--color-result-link-font);
  380. text-decoration: none;
  381. font-size: 0.9rem;
  382. &:hover {
  383. text-decoration: underline;
  384. }
  385. }
  386. }
  387. #corrections {
  388. grid-area: corrections;
  389. display: flex;
  390. flex-flow: row wrap;
  391. margin: 0 0 1em 0;
  392. h4,
  393. input[type="submit"] {
  394. display: inline-block;
  395. padding: 0.5rem;
  396. margin: 0.5rem;
  397. }
  398. input[type="submit"] {
  399. font-size: 0.8rem;
  400. .rounded-corners-tiny;
  401. }
  402. }
  403. #suggestions .title,
  404. #search_url .title,
  405. #apis .title {
  406. margin: 2em 0 0.5em 0;
  407. color: var(--color-base-font);
  408. }
  409. #answers {
  410. grid-area: answers;
  411. border: 1px solid var(--color-answer-border);
  412. background: var(--color-answer-background);
  413. padding: @result-padding;
  414. margin: 1rem 0;
  415. margin-top: 0;
  416. color: var(--color-answer-font);
  417. .rounded-corners;
  418. h4 {
  419. display: none;
  420. }
  421. }
  422. #infoboxes {
  423. form {
  424. min-width: 210px;
  425. }
  426. }
  427. #sidebar {
  428. grid-area: sidebar;
  429. word-wrap: break-word;
  430. color: var(--color-sidebar-font);
  431. .infobox {
  432. margin: 10px 0 10px;
  433. border: 1px solid var(--color-sidebar-border);
  434. padding: 1rem;
  435. font-size: 0.9em;
  436. .rounded-corners;
  437. h2 {
  438. margin: 0 0 0.5em 0;
  439. }
  440. img {
  441. max-width: 100%;
  442. max-height: 12em;
  443. display: block;
  444. margin: 0 auto;
  445. padding: 0;
  446. }
  447. dl {
  448. margin: 0.5em 0;
  449. }
  450. dt {
  451. display: inline;
  452. margin: 0.5em 0.25em 0.5em 0;
  453. padding: 0;
  454. font-weight: bold;
  455. }
  456. dd {
  457. display: inline;
  458. margin: 0.5em 0;
  459. padding: 0;
  460. }
  461. input {
  462. font-size: 1em;
  463. }
  464. br {
  465. clear: both;
  466. }
  467. .attributes,
  468. .urls {
  469. clear: both;
  470. }
  471. }
  472. }
  473. #search_url {
  474. margin-top: 8px;
  475. div.selectable_url {
  476. pre {
  477. width: 200em;
  478. }
  479. }
  480. }
  481. #linkto_preferences {
  482. position: absolute;
  483. right: 10px;
  484. top: 2.2rem;
  485. padding: 0;
  486. border: 0;
  487. display: block;
  488. font-size: 1.2em;
  489. color: var(--color-search-font);
  490. a:link *,
  491. a:hover *,
  492. a:visited *,
  493. a:active * {
  494. color: var(--color-search-font);
  495. }
  496. }
  497. #pagination {
  498. grid-area: pagination;
  499. br {
  500. clear: both;
  501. }
  502. }
  503. #apis {
  504. margin-top: 8px;
  505. clear: both;
  506. }
  507. #backToTop {
  508. border: 1px solid var(--color-backtotop-border);
  509. margin: 0;
  510. padding: 0;
  511. font-size: 1em;
  512. background: var(--color-backtotop-background);
  513. position: fixed;
  514. bottom: 8rem;
  515. left: @results-width + @results-offset + (0.5 * @results-gap - 1.2em);
  516. transition: opacity 0.5s;
  517. opacity: 0;
  518. .rounded-corners;
  519. a {
  520. display: block;
  521. margin: 0;
  522. padding: 0.7em;
  523. }
  524. a,
  525. a:visited,
  526. a:hover,
  527. a:active {
  528. color: var(--color-backtotop-font);
  529. }
  530. }
  531. #results.scrolling #backToTop {
  532. opacity: 1;
  533. }
  534. @media screen and (max-width: @tablet) {
  535. #main_preferences,
  536. #main_about,
  537. #main_stats {
  538. margin: 2rem 0.5rem;
  539. width: auto;
  540. }
  541. #infoboxes {
  542. position: inherit;
  543. max-width: inherit;
  544. .infobox {
  545. clear: both;
  546. img {
  547. float: left;
  548. max-width: 10em;
  549. margin: 0.5em 0.5em 0.5em 0;
  550. }
  551. }
  552. }
  553. #sidebar {
  554. margin-bottom: @results-margin;
  555. padding: 0;
  556. float: none;
  557. border: none;
  558. width: auto;
  559. input {
  560. border: 0;
  561. }
  562. }
  563. #apis {
  564. display: none;
  565. }
  566. #search_url {
  567. display: none;
  568. }
  569. .result {
  570. .thumbnail {
  571. max-width: 98%;
  572. }
  573. .url {
  574. span.url {
  575. display: block;
  576. white-space: nowrap;
  577. text-overflow: ellipsis;
  578. overflow: hidden;
  579. width: 100%;
  580. }
  581. }
  582. .engines {
  583. float: right;
  584. padding: 0 0 3px 0;
  585. }
  586. }
  587. .result-images {
  588. border-bottom: none !important;
  589. }
  590. .image_result {
  591. max-width: 98%;
  592. img {
  593. max-width: 98%;
  594. }
  595. }
  596. #backToTop {
  597. display: none;
  598. }
  599. #pagination {
  600. margin: 2rem 0 0 0 !important;
  601. }
  602. #main_results div#results {
  603. margin: 1rem auto 0 auto;
  604. justify-content: center;
  605. display: grid;
  606. grid-template-columns: @results-width;
  607. grid-template-rows: min-content min-content min-content 1fr min-content min-content;
  608. gap: 0;
  609. grid-template-areas:
  610. "corrections"
  611. "answers"
  612. "sidebar"
  613. "urls"
  614. "pagination";
  615. }
  616. }
  617. #main_results div#results.only_template_images {
  618. margin: 1rem @results-tablet-offset 0 @results-tablet-offset;
  619. display: grid;
  620. grid-template-columns: 100%;
  621. grid-template-rows: min-content min-content 1fr min-content min-content;
  622. gap: 0;
  623. grid-template-areas:
  624. "corrections"
  625. "urls"
  626. "answers"
  627. "sidebar"
  628. "pagination";
  629. #urls {
  630. width: inherit;
  631. margin: 0;
  632. }
  633. #backToTop {
  634. left: auto;
  635. right: 1rem;
  636. }
  637. #pagination {
  638. margin-right: 4rem;
  639. }
  640. }
  641. @media screen and (max-width: @phone) {
  642. #main_results div#results {
  643. grid-template-columns: 100%;
  644. margin: 2rem @results-tablet-offset 0 @results-tablet-offset;
  645. }
  646. #linkto_preferences {
  647. top: 0.8rem;
  648. right: 0.7rem;
  649. }
  650. #main_index #linkto_preferences {
  651. top: 0.5rem;
  652. right: 0.5rem;
  653. }
  654. #results {
  655. margin: 0;
  656. padding: 0;
  657. }
  658. #pagination {
  659. margin: 2rem 1rem 0 1rem !important;
  660. }
  661. article[data-vim-selected] {
  662. border: 1px solid var(--color-result-vim-arrow);
  663. .rounded-corners;
  664. }
  665. .result {
  666. border: 1px solid var(--color-result-border);
  667. margin: 1rem 0;
  668. .rounded-corners;
  669. }
  670. .result-images {
  671. margin: 0;
  672. padding: 0;
  673. border: none;
  674. }
  675. }
  676. @media screen and (max-width: @small-phone) {
  677. .result-videos {
  678. img.thumbnail {
  679. float: none !important;
  680. }
  681. .content {
  682. overflow: inherit;
  683. }
  684. }
  685. }
  686. pre code {
  687. white-space: pre-wrap;
  688. }