style.less 11 KB

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