style.less 10 KB

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