style.less 10 KB

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