style.less 10KB

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