style.less 9.9 KB

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