logo

searx

My custom branche(s) on searx, a meta-search engine git clone https://hacktivis.me/git/searx.git

toolkit.less (8787B)


  1. // other solution : http://stackoverflow.com/questions/1577598/how-to-hide-parts-of-html-when-javascript-is-disabled/13857783#13857783
  2. html.no-js .hide_if_nojs {
  3. display: none;
  4. }
  5. html.js .show_if_nojs {
  6. display: none;
  7. }
  8. .center {
  9. text-align: center;
  10. }
  11. .right {
  12. float: right ;
  13. }
  14. .left {
  15. float: left;
  16. }
  17. .invisible {
  18. display: none !important;
  19. }
  20. .list-unstyled {
  21. list-style-type: none;
  22. li {
  23. margin-top: 4px;
  24. margin-bottom: 4px;
  25. }
  26. }
  27. .danger {
  28. background-color: @color-error-background;
  29. }
  30. .badge {
  31. display: inline-block;
  32. color: #fff;
  33. background-color: #777;
  34. text-align: center;
  35. white-space: nowrap;
  36. vertical-align: baseline;
  37. min-width: 10px;
  38. padding: 1px 5px;
  39. border-radius: 5px;
  40. }
  41. // kbd
  42. kbd {
  43. padding: 2px 4px;
  44. margin: 1px;
  45. font-size: 90%;
  46. color: white;
  47. background: black;
  48. }
  49. // table
  50. table {
  51. width: 100%;
  52. &.striped {
  53. tr {
  54. border-bottom: 1px solid @color-settings-tr-hover;
  55. }
  56. }
  57. }
  58. th {
  59. padding: 0.4em;
  60. }
  61. td {
  62. padding: 0 4px;
  63. }
  64. tr {
  65. &:hover {
  66. background: @color-settings-tr-hover;
  67. }
  68. }
  69. // pre
  70. .pre() {
  71. display: block;
  72. font-size: 0.8em;
  73. word-break: break-all;
  74. margin: 0.1em;
  75. .select-all-on-focus();
  76. }
  77. div.selectable_url {
  78. display: block;
  79. border: 1px solid @color-result-search-url-border;
  80. padding: 4px;
  81. color: @color-result-search-url-font;
  82. width: 100%;
  83. display: block;
  84. margin: 0.1em;
  85. overflow: hidden;
  86. height: 1.2em;
  87. line-height: 1.2em;
  88. pre {
  89. .pre();
  90. }
  91. }
  92. // dialog
  93. .dialog() {
  94. position: relative;
  95. width: 70%;
  96. padding: 1em 1em 1em 2.7em;
  97. margin: 0em 8% 1em 8%;
  98. border: 1px solid black;
  99. border-radius: 4px;
  100. text-align: left;
  101. &:before {
  102. position: absolute;
  103. top: 0.5em;
  104. left: 0.5em;
  105. font-family:"ion";
  106. font-size: 1.5em;
  107. }
  108. .close {
  109. float:right;
  110. position: relative;
  111. top: -3px;
  112. color: inherit;
  113. font-size: 1.5em;
  114. }
  115. ul, ol, p {
  116. margin: 1px 0 0 0;
  117. }
  118. table {
  119. width: auto;
  120. }
  121. tr {
  122. vertical-align: text-top;
  123. &:hover {
  124. background: transparent;
  125. }
  126. }
  127. td {
  128. padding: 0 1em 0 0;
  129. }
  130. h4 {
  131. margin-top: 0.3em;
  132. margin-bottom: 0.3em;
  133. }
  134. }
  135. .dialog-error {
  136. .dialog();
  137. color: @color-error;
  138. background: @color-error-background;
  139. border-color: @color-error;
  140. .ion-error();
  141. }
  142. .dialog-warning {
  143. .dialog();
  144. color: @color-warning;
  145. background: @color-warning-background;
  146. border-color: @color-warning;
  147. .ion-warning();
  148. }
  149. .dialog-modal {
  150. .dialog();
  151. background: white;
  152. position: fixed;
  153. top: 50%;
  154. left: 50%;
  155. /* bring your own prefixes */
  156. transform: translate(-50%, -50%);
  157. z-index: 100000;
  158. margin: 0 50% 0 0;
  159. box-shadow: 0 0 1em;
  160. }
  161. // btn-collapse
  162. .btn-collapse {
  163. cursor: pointer;
  164. }
  165. //
  166. .scrollx {
  167. overflow-x: auto;
  168. overflow-y: hidden;
  169. display: block;
  170. padding: 0;
  171. margin: 0;
  172. border: none;
  173. }
  174. /* -- tabs --*/
  175. .tabs .tabs > label {
  176. font-size: 90%;
  177. }
  178. .tabs {
  179. .flexbox();
  180. flex-wrap: wrap;
  181. width: 100%;
  182. min-width: 100%;
  183. & > * {
  184. order: 2;
  185. }
  186. & > input[type=radio] {
  187. display: none;
  188. }
  189. & > label {
  190. order: 1;
  191. padding: 0.7em;
  192. margin: 0 0.7em;
  193. letter-spacing:0.5px;
  194. text-transform: uppercase;
  195. border: solid white;
  196. border-width: 0px 0px 2px 0;
  197. .disable-user-select();
  198. cursor: pointer;
  199. }
  200. & > label:hover {
  201. border-bottom: 2px solid @color-categories-item-border-selected;
  202. }
  203. & > section {
  204. min-width: 100%;
  205. padding: 0.7rem 0;
  206. box-sizing: border-box;
  207. border-top: 1px solid black;
  208. display: none;
  209. }
  210. // default selection
  211. & > label:last-of-type {
  212. border-bottom: 2px solid @color-categories-item-border-selected;
  213. background: @color-categories-item-selected;
  214. color: @color-categories-item-selected-font;
  215. font-weight: bold;
  216. letter-spacing:-0.1px;
  217. }
  218. & > section:last-of-type {
  219. display: block;
  220. }
  221. }
  222. html body .tabs > input:checked {
  223. ~ section {
  224. display: none;
  225. }
  226. ~ label {
  227. position: inherited;
  228. background: inherit;
  229. border-bottom: 2px solid transparent;
  230. font-weight: normal;
  231. color: inherit;
  232. &:hover {
  233. border-bottom: 2px solid @color-categories-item-border-selected;
  234. }
  235. }
  236. + label {
  237. border-bottom: 2px solid @color-categories-item-border-selected;
  238. background: @color-categories-item-selected;
  239. color: @color-categories-item-selected-font;
  240. font-weight: bold;
  241. letter-spacing:-0.1px;
  242. }
  243. + label + section {
  244. display: block;
  245. }
  246. }
  247. /* -- select -- */
  248. select {
  249. height: 28px;
  250. margin: 0 1em 0 0;
  251. padding: 2px 8px 2px 0 !important;
  252. color: @color-search-font;
  253. font-size: 12px;
  254. z-index: 2;
  255. &:hover, &:focus {
  256. cursor: pointer;
  257. }
  258. }
  259. @supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
  260. select {
  261. appearance: none;
  262. -webkit-appearance: none;
  263. -moz-appearance: none;
  264. border: none;
  265. border-bottom: 1px solid #d7d7d7;
  266. background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;
  267. background-position-x: 105%;
  268. background-size: 2em;
  269. background-origin: content-box;
  270. outline: medium none;
  271. &:hover, &:focus {
  272. border-bottom: 1px solid @color-search-border;
  273. }
  274. }
  275. }
  276. /* -- checkbox-onoff -- */
  277. @supports (border-radius: 50px) {
  278. .checkbox-onoff {
  279. display: inline-block;
  280. width: 40px;
  281. height: 10px;
  282. background: #dcdcdc;
  283. margin: 8px auto;
  284. position: relative;
  285. border-radius: 50px;
  286. label {
  287. display: block;
  288. width: 20px;
  289. height: 20px;
  290. position: absolute;
  291. top: -5px;
  292. cursor: pointer;
  293. border-radius: 50px;
  294. box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
  295. transition: all 0.4s ease;
  296. left: 27px;
  297. background-color: #3498DB;
  298. }
  299. input[type=checkbox] {
  300. visibility: hidden;
  301. &:checked + label {
  302. left: -5px;
  303. background: #dcdcdc;
  304. }
  305. }
  306. }
  307. }
  308. /* -- checkbox --*/
  309. @supports (transform: rotate(-45deg)) {
  310. .checkbox {
  311. width: 20px;
  312. position: relative;
  313. margin: 20px auto;
  314. label {
  315. width: 20px;
  316. height: 20px;
  317. cursor: pointer;
  318. position: absolute;
  319. top: 0;
  320. left: 0;
  321. background: white;
  322. border-radius: 4px;
  323. box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0,0,0,0.5);
  324. &:after {
  325. content: '';
  326. width: 9px;
  327. height: 5px;
  328. position: absolute;
  329. top: 4px;
  330. left: 4px;
  331. border: 3px solid #333;
  332. border-top: none;
  333. border-right: none;
  334. background: transparent;
  335. opacity: 0;
  336. transform: rotate(-45deg);
  337. }
  338. }
  339. input[type=checkbox] {
  340. visibility: hidden;
  341. &:checked + label:after {
  342. border-color: #3498DB;
  343. opacity: 1;
  344. }
  345. }
  346. // disabled : can''t be focused, show only the check mark
  347. input[disabled] + label {
  348. background-color: transparent !important;
  349. box-shadow: none !important;
  350. cursor: inherit;;
  351. }
  352. // if not checked and possible to checked then display a "light" check mark on hover
  353. input:not(:checked):not([readonly]):not([disabled]) + label:hover::after {
  354. opacity: 0.5;
  355. }
  356. }
  357. }
  358. @media screen and (max-width: 50em) {
  359. .tabs > label {
  360. width: 100%;
  361. }
  362. }
  363. /* -- loader -- */
  364. .loader,
  365. .loader:after {
  366. border-radius: 50%;
  367. width: 2em;
  368. height: 2em;
  369. }
  370. .loader {
  371. margin: 1em auto;
  372. font-size: 10px;
  373. position: relative;
  374. text-indent: -9999em;
  375. border-top: 0.5em solid rgba(0, 0, 0, 0.2);
  376. border-right: 0.5em solid rgba(0, 0, 0, 0.2);
  377. border-bottom: 0.5em solid rgba(0, 0, 0, 0.2);
  378. border-left: 0.5em solid rgba(255, 255, 255, 0);
  379. -webkit-transform: translateZ(0);
  380. -ms-transform: translateZ(0);
  381. transform: translateZ(0);
  382. -webkit-animation: load8 1.2s infinite linear;
  383. animation: load8 1.2s infinite linear;
  384. }
  385. @-webkit-keyframes load8 {
  386. 0% {
  387. -webkit-transform: rotate(0deg);
  388. transform: rotate(0deg);
  389. }
  390. 100% {
  391. -webkit-transform: rotate(360deg);
  392. transform: rotate(360deg);
  393. }
  394. }
  395. @keyframes load8 {
  396. 0% {
  397. -webkit-transform: rotate(0deg);
  398. transform: rotate(0deg);
  399. }
  400. 100% {
  401. -webkit-transform: rotate(360deg);
  402. transform: rotate(360deg);
  403. }
  404. }