style.less 11 KB

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