style.less 11 KB

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