style.less 12 KB

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