style.less 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. /*
  2. * searx, A privacy-respecting, hackable metasearch engine
  3. *
  4. * To convert "style.less" to "style.css" run: $make styles
  5. */
  6. @stacked-bar-chart: rgb(0, 0, 0);
  7. @import "normalize.less";
  8. @import "definitions.less";
  9. @import "mixins.less";
  10. @import "code.less";
  11. @import "toolkit.less";
  12. @import "autocomplete.less";
  13. // ion-icon
  14. @import "ion.less";
  15. .ion-icon-big {
  16. .ion-icon;
  17. font-size: 149%;
  18. }
  19. // for index.html template
  20. @import "index.less";
  21. // for preferences.html template
  22. @import "preferences.less";
  23. // Search-Field
  24. @import "search.less";
  25. // Main LESS-Code
  26. html {
  27. font-family: arial, sans-serif;
  28. font-size: 0.9em;
  29. .text-size-adjust;
  30. color: @color-font;
  31. padding: 0;
  32. margin: 0;
  33. }
  34. body, main {
  35. padding: 0;
  36. margin: 0;
  37. }
  38. main {
  39. width: 100%;
  40. // position: absolute;
  41. }
  42. footer {
  43. // position:absolute;
  44. bottom:0;
  45. width:100%;
  46. height:50px;
  47. }
  48. #main_preferences, #main_about, #main_stats {
  49. margin: 3em;
  50. width: auto;
  51. }
  52. footer {
  53. bottom: 0;
  54. height: 3em;
  55. margin: 1em 0;
  56. padding: 1em 0;
  57. clear: both;
  58. width: 100%;
  59. text-align: center;
  60. p {
  61. font-size: 0.9em;
  62. }
  63. }
  64. #main_preferences h1, #main_stats h1 {
  65. background: url('../img/searx.png') no-repeat;
  66. background-size: auto 75%;
  67. min-height: 40px;
  68. margin: 0 auto;
  69. span {
  70. visibility: hidden;
  71. }
  72. }
  73. input[type="submit"], #results button[type="submit"] {
  74. padding: 0.5rem;
  75. margin: 2px 4px;
  76. display: inline-block;
  77. background: @color-download-button-background;
  78. color: @color-download-button-font;
  79. .rounded-corners;
  80. border: 0;
  81. cursor: pointer;
  82. }
  83. a {
  84. text-decoration: none;
  85. color: @color-url-font;
  86. &:visited {
  87. color: @color-url-visited-font;
  88. .highlight {
  89. color: @color-url-visited-font;
  90. }
  91. }
  92. }
  93. article[data-vim-selected] {
  94. background: #f7f7f7;
  95. }
  96. article[data-vim-selected]::before {
  97. position: absolute;
  98. left: 1em;
  99. padding: 2px;
  100. content: ">";
  101. font-weight: bold;
  102. color: @color-base;
  103. }
  104. article.result-images[data-vim-selected] {
  105. background: @color-base;
  106. }
  107. article.result-images[data-vim-selected]::before {
  108. display: none;
  109. content: "";
  110. }
  111. .result {
  112. margin: 19px 0 18px 0;
  113. padding: 0;
  114. h3 {
  115. font-size: 1.1em;
  116. word-wrap:break-word;
  117. margin: 5px 0 1px 0;
  118. padding: 0;
  119. margin-bottom: 0;
  120. a {
  121. color: @color-result-link-font;
  122. font-weight: normal;
  123. font-size: 1.1em;
  124. &:visited {
  125. color: @color-result-link-visited-font;
  126. }
  127. &:focus, &:hover {
  128. text-decoration: underline;
  129. border: none;
  130. -webkit-box-shadow: none;
  131. box-shadow: none;
  132. outline:none;
  133. }
  134. }
  135. }
  136. .cache_link, .proxyfied_link {
  137. font-size: 0.9em !important;
  138. }
  139. .content, .stat, .altlink {
  140. font-size: 0.9em;
  141. margin: 0;
  142. padding: 0;
  143. max-width: 54em;
  144. word-wrap:break-word;
  145. line-height: 1.24;
  146. .highlight {
  147. color: @color-black;
  148. background: inherit;
  149. font-weight: bold;
  150. }
  151. }
  152. .codelines {
  153. .highlight {
  154. color: inherit;
  155. background: inherit;
  156. font-weight: normal;
  157. }
  158. }
  159. .url {
  160. font-size: 0.9em;
  161. margin: 0 0 3px 0;
  162. padding: 0;
  163. max-width: 54em;
  164. word-wrap:break-word;
  165. color: @color-result-url-font;
  166. }
  167. .published_date {
  168. font-size: 0.8em;
  169. color: @color-result-publishdate-font;
  170. }
  171. img {
  172. &.thumbnail {
  173. float: left;
  174. padding: 0 5px 10px 0;
  175. width: 20em;
  176. min-width: 20em;
  177. min-height: 8em;
  178. // background: @color-base-light;
  179. }
  180. &.image {
  181. float: left;
  182. padding: 0 5px 10px 0;
  183. width: 100px;
  184. max-height: 100px;
  185. object-fit: scale-down;
  186. object-position: right top;
  187. }
  188. }
  189. .break {
  190. clear: both;
  191. }
  192. }
  193. .category-social .image {
  194. width: auto !important;
  195. min-width: 48px;
  196. min-height: 48px;
  197. padding: 0 5px 25px 0 !important;
  198. }
  199. .result-videos .content {
  200. overflow: hidden;
  201. }
  202. .engines {
  203. float: right;
  204. color: @color-engines-font;
  205. span {
  206. font-size: smaller;
  207. margin: 0 0.5em 0 0;
  208. }
  209. }
  210. .small_font {
  211. font-size: 0.8em;
  212. }
  213. .highlight {
  214. color: @color-highlight;
  215. background: inherit;
  216. font-weight: bold;
  217. }
  218. .result-images {
  219. display: inline-block;
  220. margin: 0;
  221. padding: 0;
  222. position: relative;
  223. max-height: 200px;
  224. img {
  225. float: inherit;
  226. margin: 0;
  227. padding: 0;
  228. border: none;
  229. max-height: 200px;
  230. background: @color-base-dark;
  231. }
  232. span a {
  233. display: none;
  234. color: @color-result-image-span-font;
  235. }
  236. &:hover span a {
  237. display: block;
  238. position: absolute;
  239. bottom: 0;
  240. right: 0;
  241. padding: 4px;
  242. margin: 0 0 4px 4px;
  243. background-color: @color-result-image-span-background-hover;
  244. font-size: 0.7em;
  245. }
  246. }
  247. .torrent_result {
  248. border-left: 10px solid @color-result-torrent-border;
  249. padding-left: 3px;
  250. p {
  251. margin: 3px;
  252. font-size: 0.8em;
  253. }
  254. a {
  255. color: @color-result-link-font;
  256. &:hover {
  257. text-decoration: underline;
  258. }
  259. &:visited {
  260. color: @color-result-link-visited-font;
  261. }
  262. }
  263. }
  264. #results {
  265. margin: 2em 2em 20px 2em;
  266. padding: 0;
  267. width: @results-width;
  268. }
  269. #suggestions {
  270. .wrapper {
  271. display: flex;
  272. flex-flow: row wrap;
  273. justify-content: flex-end;
  274. form {
  275. display: inline-block;
  276. flex: 1 1 50%;
  277. }
  278. }
  279. }
  280. #suggestions, #answers, #corrections {
  281. max-width: @results-width;
  282. }
  283. #suggestions, #answers, #infoboxes, #corrections {
  284. input {
  285. padding: 0;
  286. margin: 3px;
  287. font-size: 0.9em;
  288. display: inline-block;
  289. background: transparent;
  290. color: @color-result-search-url-font;
  291. cursor: pointer;
  292. }
  293. input[type="submit"], .infobox .url a {
  294. color: @color-result-link-font;
  295. text-decoration: none;
  296. font-size: 0.9rem;
  297. &:hover {
  298. text-decoration: underline;
  299. }
  300. }
  301. }
  302. #corrections {
  303. display: flex;
  304. flex-flow: row wrap;
  305. margin: 1em 0;
  306. h4, input[type="submit"] {
  307. display: inline-block;
  308. margin: 0 0.5em 0 0;
  309. }
  310. input[type="submit"]::after {
  311. content: ", "
  312. }
  313. }
  314. #suggestions .title, #search_url .title, #apis .title {
  315. margin: 2em 0 0.5em 0;
  316. color: @color-font;
  317. }
  318. #answers {
  319. margin: 10px 8px 10px 8px;
  320. border: 1px solid #ddd;
  321. padding: 0.9em;
  322. box-shadow: 0px 0px 5px #CCC;
  323. h4 {
  324. display: none;
  325. }
  326. .answer {
  327. display: block;
  328. font-size: 1.2em;
  329. font-weight: bold;
  330. }
  331. }
  332. #answers, #infoboxes {
  333. form {
  334. min-width: 210px;
  335. }
  336. }
  337. #sidebar {
  338. position: absolute;
  339. top: 100px;
  340. left: 57em;
  341. margin: 0px 2px 5px 5px;
  342. padding: 0px 2px 2px;
  343. max-width: 25em;
  344. word-wrap: break-word;
  345. .infobox {
  346. margin: 10px 0 10px;
  347. border: 1px solid #ddd;
  348. padding: 0.9em;
  349. font-size: 0.9em;
  350. box-shadow: 0px 0px 5px #CCC;
  351. h2 {
  352. margin: 0 0 .5em 0;
  353. }
  354. img {
  355. max-width: 100%;
  356. max-height: 12em;
  357. display: block;
  358. margin: 0;
  359. padding: 0;
  360. }
  361. dl {
  362. margin: 0.5em 0;
  363. }
  364. dt {
  365. display: inline;
  366. margin: 0.5em 0.25em 0.5em 0;
  367. padding: 0;
  368. font-weight: bold;
  369. }
  370. dd {
  371. display: inline;
  372. margin: 0.5em 0;
  373. padding: 0;
  374. }
  375. input {
  376. font-size: 1em;
  377. }
  378. br {
  379. clear: both;
  380. }
  381. .attributes, .urls {
  382. clear: both;
  383. }
  384. }
  385. }
  386. #search_url {
  387. margin-top: 8px;
  388. div.selectable_url {
  389. pre {
  390. width: 200em;
  391. }
  392. }
  393. }
  394. #linkto_preferences {
  395. position: absolute;
  396. right: 10px;
  397. top: 0.9em;
  398. padding: 0;
  399. border: 0;
  400. display: block;
  401. font-size: 1.2em;
  402. color: @color-search-font;
  403. a:link *, a:hover *, a:visited *, a:active * {
  404. color: @color-search-font;
  405. }
  406. }
  407. #pagination {
  408. clear: both;
  409. br {
  410. clear: both;
  411. }
  412. }
  413. #apis {
  414. margin-top: 8px;
  415. clear: both;
  416. }
  417. #backToTop {
  418. border: 1px solid #ddd;
  419. margin: 0 0 0 2em;
  420. padding: 0;
  421. font-size: 1em;
  422. box-shadow: 0px 0px 5px #CCC;
  423. background: white;
  424. position: fixed;
  425. bottom: 85px;
  426. left: @results-width;
  427. transition: opacity 0.5s;
  428. opacity: 0;
  429. a {
  430. display: block;
  431. margin: 0;
  432. padding: 0.6em;
  433. }
  434. }
  435. @media screen and (max-width: 75em) {
  436. #main_preferences, #main_about, #main_stats {
  437. margin: 0.5em;
  438. width: auto;
  439. }
  440. #suggestions, #answers {
  441. margin-top: 1em;
  442. }
  443. #infoboxes {
  444. position: inherit;
  445. max-width: inherit;
  446. .infobox {
  447. clear:both;
  448. img {
  449. float: left;
  450. max-width: 10em;
  451. margin: 0.5em 0.5em 0.5em 0;
  452. }
  453. }
  454. }
  455. #sidebar {
  456. position: static;
  457. max-width: @results-width;
  458. margin: 0 0 2px 0;
  459. padding: 0;
  460. float: none;
  461. border: none;
  462. width: auto;
  463. input {
  464. border: 0;
  465. }
  466. }
  467. #apis {
  468. display: none;
  469. }
  470. #search_url {
  471. display: none;
  472. }
  473. .result {
  474. border-bottom: 1px solid @color-result-top-border;
  475. margin: 0;
  476. padding-top: 8px;
  477. padding-bottom: 6px;
  478. h3 {
  479. margin: 0 0 1px 0;
  480. }
  481. .thumbnail {
  482. max-width: 98%;
  483. }
  484. .url {
  485. span.url {
  486. display: block;
  487. white-space: nowrap;
  488. text-overflow: ellipsis;
  489. overflow: hidden;
  490. width: 100%;
  491. }
  492. a {
  493. float: right;
  494. padding: 0 0.5em;
  495. }
  496. }
  497. .engines {
  498. float: right;
  499. padding: 0 0 3px 0;
  500. }
  501. }
  502. .result-images {
  503. border-bottom: none !important;
  504. }
  505. .image_result {
  506. max-width: 98%;
  507. img {
  508. max-width: 98%;
  509. }
  510. }
  511. }
  512. #main_results div#results.only_template_images {
  513. flex-direction: column;
  514. width: auto;
  515. display: flex;
  516. #sidebar {
  517. position: relative;
  518. top: auto;
  519. order: 2;
  520. }
  521. #urls {
  522. position: relative;
  523. order: 1;
  524. }
  525. #backToTop {
  526. right: 0.5em;
  527. left: auto;
  528. }
  529. #pagination {
  530. position: relative;
  531. order: 3;
  532. }
  533. }
  534. @media screen and (max-width: @results-width) {
  535. article[data-vim-selected]::before {
  536. display: none;
  537. content: "";
  538. }
  539. #linkto_preferences {
  540. display: none;
  541. postion: fixed !important;
  542. top: 100px;
  543. right: 0px;
  544. }
  545. #sidebar {
  546. margin: 0 5px 2px 5px;
  547. }
  548. #corrections {
  549. margin: 1em 5px 1em 5px;
  550. }
  551. #results {
  552. margin: 0;
  553. padding: 0;
  554. width: initial;
  555. }
  556. #backToTop {
  557. left: 40em;
  558. bottom: 35px;
  559. }
  560. .result {
  561. padding: 8px 10px 6px 10px;
  562. }
  563. .result-images {
  564. margin: 0;
  565. padding: 0;
  566. border: none;
  567. }
  568. }
  569. @media screen and (max-width: 35em) {
  570. .result-videos {
  571. img.thumbnail {
  572. float: none !important;
  573. }
  574. .content {
  575. overflow: inherit;
  576. }
  577. }
  578. }
  579. pre code {
  580. white-space: pre-wrap;
  581. }