style.less 8.2 KB

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