style.less 12 KB

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