style.less 11 KB

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