style.less 8.2 KB

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