style.less 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  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. }
  280. .definition_result {
  281. border-left: 10px solid @color-result-definition-border;
  282. padding-left: 3px;
  283. }
  284. .percentage {
  285. position: relative;
  286. width: 300px;
  287. div {
  288. background: @color-percentage-div-background;
  289. }
  290. }
  291. table {
  292. width: 100%;
  293. }
  294. td {
  295. padding: 0 4px;
  296. }
  297. tr {
  298. &:hover {
  299. background: @color-settings-tr-hover;
  300. }
  301. }
  302. #results {
  303. margin: auto;
  304. padding: 0;
  305. width: @results-width;
  306. margin-bottom: 20px;
  307. }
  308. #sidebar {
  309. position: fixed;
  310. bottom: 10px;
  311. left: 10px;
  312. margin: 0 2px 5px 5px;
  313. padding: 0 2px 2px 2px;
  314. width: 14em;
  315. input {
  316. padding: 0;
  317. margin: 3px;
  318. font-size: 0.8em;
  319. display: inline-block;
  320. background: transparent;
  321. color: @color-result-search-url-font;
  322. cursor: pointer;
  323. }
  324. input[type="submit"] {
  325. text-decoration: underline;
  326. }
  327. }
  328. #suggestions {
  329. form {
  330. display: inline;
  331. }
  332. }
  333. #suggestions, #answers {
  334. margin-top: 20px;
  335. max-width: 45em;
  336. }
  337. #suggestions, #answers, #infoboxes {
  338. input {
  339. padding: 0;
  340. margin: 3px;
  341. font-size: 0.8em;
  342. display: inline-block;
  343. background: transparent;
  344. color: @color-result-search-url-font;
  345. cursor: pointer;
  346. }
  347. input[type="submit"] {
  348. text-decoration: underline;
  349. }
  350. }
  351. #answers, #infoboxes {
  352. form {
  353. min-width: 210px;
  354. }
  355. }
  356. #infoboxes {
  357. position: absolute;
  358. top: 100px;
  359. right: 20px;
  360. margin: 0px 2px 5px 5px;
  361. padding: 0px 2px 2px;
  362. max-width: 21em;
  363. .infobox {
  364. margin: 10px 0 10px;
  365. border: 1px solid #ddd;
  366. padding: 5px;
  367. font-size: 0.8em;
  368. /* box-shadow: 0px 0px 5px #CCC; */
  369. img {
  370. max-width: 20em;
  371. max-heigt: 12em;
  372. display: block;
  373. margin: 5px;
  374. padding: 5px;
  375. }
  376. h2 {
  377. margin: 0;
  378. }
  379. table {
  380. width: auto;
  381. td {
  382. vertical-align: top;
  383. }
  384. }
  385. input {
  386. font-size: 1em;
  387. }
  388. br {
  389. clear: both;
  390. }
  391. }
  392. }
  393. #search_url {
  394. margin-top: 8px;
  395. input {
  396. border: 1px solid @color-result-search-url-border;
  397. padding: 4px;
  398. color: @color-result-search-url-font;
  399. width: 14em;
  400. display: block;
  401. margin: 4px;
  402. font-size: 0.8em;
  403. }
  404. }
  405. #preferences {
  406. top: 10px;
  407. padding: 0;
  408. border: 0;
  409. background: url('../img/preference-icon.png') no-repeat;
  410. background-size: 28px 28px;
  411. opacity: 0.8;
  412. width: 28px;
  413. height: 30px;
  414. display: block;
  415. * {
  416. display: none;
  417. }
  418. }
  419. #pagination {
  420. clear: both;
  421. br {
  422. clear: both;
  423. }
  424. }
  425. #apis {
  426. margin-top: 8px;
  427. clear: both;
  428. }
  429. #categories_container {
  430. position: relative;
  431. }
  432. @media screen and (max-width: @results-width) {
  433. #results {
  434. margin: auto;
  435. padding: 0;
  436. width: 90%;
  437. }
  438. .github {
  439. display: none;
  440. }
  441. .checkbox_container {
  442. display: block;
  443. width: 90%;
  444. //float: left;
  445. label {
  446. border-bottom: 0;
  447. }
  448. }
  449. .preferences_container {
  450. display: none;
  451. postion: fixed !important;
  452. top: 100px;
  453. right: 0px;
  454. }
  455. }
  456. @media screen and (max-width: 75em) {
  457. div.title {
  458. h1 {
  459. font-size: 1em;
  460. }
  461. }
  462. html.touch #categories {
  463. width: 95%;
  464. height: 30px;
  465. text-align: left;
  466. overflow-x: scroll;
  467. overflow-y: hidden;
  468. -webkit-overflow-scrolling: touch;
  469. #categories_container {
  470. width: 1000px;
  471. width: -moz-max-content;
  472. width: -webkit-max-content;
  473. width: max-content;
  474. .checkbox_container {
  475. display: inline-block;
  476. width: auto;
  477. }
  478. }
  479. }
  480. #categories {
  481. font-size: 90%;
  482. clear: both;
  483. .checkbox_container {
  484. margin-top: 2px;
  485. margin: auto;
  486. }
  487. }
  488. #suggestions, #answers {
  489. margin-top: 5px;
  490. }
  491. #infoboxes {
  492. position: inherit;
  493. max-width: inherit;
  494. .infobox {
  495. clear:both;
  496. img {
  497. float: left;
  498. max-width: 10em;
  499. }
  500. }
  501. }
  502. #categories {
  503. font-size: 90%;
  504. clear: both;
  505. .checkbox_container {
  506. margin-top: 2px;
  507. margin: auto;
  508. }
  509. }
  510. #sidebar {
  511. position: static;
  512. max-width: @results-width;
  513. margin: 0 0 2px 0;
  514. padding: 0;
  515. float: none;
  516. border: none;
  517. width: auto;
  518. input {
  519. border: 0;
  520. }
  521. }
  522. #apis {
  523. display: none;
  524. }
  525. #search_url {
  526. display: none;
  527. }
  528. .result {
  529. border-top: 1px solid @color-result-top-border;
  530. margin: 8px 0 8px 0;
  531. .thumbnail {
  532. max-width: 98%;
  533. }
  534. }
  535. .image_result {
  536. max-width: 98%;
  537. img {
  538. max-width: 98%;
  539. }
  540. }
  541. }
  542. .favicon {
  543. float: left;
  544. margin-right: 4px;
  545. margin-top: 2px;
  546. }
  547. .preferences_back {
  548. background: none repeat scroll 0 0 @color-settings-return-background;
  549. border: 0 none;
  550. .rounded-corners;
  551. cursor: pointer;
  552. display: inline-block;
  553. margin: 2px 4px;
  554. padding: 4px 6px;
  555. a {
  556. color: @color-settings-return-font;
  557. }
  558. }
  559. .hidden {
  560. opacity: 0;
  561. overflow: hidden;
  562. font-size: 0.8em;
  563. position: absolute;
  564. bottom: -20px;
  565. width: 100%;
  566. text-position: center;
  567. background: white;
  568. transition: opacity 1s ease;
  569. }
  570. #categories_container:hover .hidden {
  571. transition: opacity 1s ease;
  572. opacity: 0.8;
  573. }