You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

413 lines
12 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. @import (reference) "./colortheme-all.less";
  2. @import (reference) "./browser.less";
  3. @import (reference) "./variables.less";
  4. .alertify_main() {
  5. --LessLoader_require: LessLoader_currentFile();
  6. };
  7. & {
  8. @max-z-index: 2147483647;
  9. @alertify-fore: @colortheme_modal-fg;
  10. @alertify-base: @colortheme_modal-bg;
  11. @alertify-dialog-bg: @alertify-base;
  12. @alertify-dialog-fg: @alertify-fore;
  13. @alertify-btn-fg: @alertify-fore;
  14. @alertify-bg: @colortheme_modal-dim;
  15. @alertify-fg: @alertify-fore;
  16. @alertify-input-bg: @colortheme_modal-input;
  17. @alertify-input-fg: @colortheme_modal-input-fg;
  18. @alertify_padding-base: @variables_padding;
  19. @alertify_box-shadow: @variables_shadow;
  20. // Logs to show that something has happened
  21. // These show only once
  22. .alertify-logs {
  23. z-index: 10000; // alertify logs
  24. @media print {
  25. visibility: hidden;
  26. }
  27. > * {
  28. padding: @alertify_padding-base @alertify_padding-base * 4;
  29. color: @colortheme_notification-color;
  30. font-family: @colortheme_font;
  31. font-size: large;
  32. box-shadow: @alertify_box-shadow;
  33. &, &.default {
  34. // FIXME
  35. background: @colortheme_notification-log;
  36. }
  37. &.error {
  38. font-weight: bold;
  39. background: @colortheme_notification-warn;
  40. }
  41. &.success {
  42. background: @colortheme_notification-log;
  43. }
  44. }
  45. }
  46. .alertify {
  47. position: fixed;
  48. background-color: @alertify-bg;
  49. color: @alertify-fg;
  50. left: 0;
  51. right: 0;
  52. top: 0;
  53. bottom: 0;
  54. width: 100%;
  55. height: 100%;
  56. z-index: 100000; // alertify container
  57. font: @colortheme_app-font;
  58. &.forefront {
  59. z-index: @max-z-index; // alertify max forefront
  60. }
  61. .message {
  62. h1, h2, h3, h4, h5, h6 {
  63. color: @alertify-fg;
  64. }
  65. }
  66. h1, h2, h3 {
  67. margin-top: 0;
  68. }
  69. &.hide {
  70. opacity: 0;
  71. pointer-events: none;
  72. }
  73. &, &.show {
  74. box-sizing: border-box;
  75. transition: all .33s cubic-bezier(.25, .8, .25, 1);
  76. }
  77. &, * {
  78. box-sizing: border-box;
  79. }
  80. .dialog {
  81. padding: 12px;
  82. /*
  83. div.tokenfield {
  84. .token {
  85. //border: 1px solid red;
  86. //color: red;
  87. }
  88. color: @colortheme_light-base;
  89. background-color: @alertify-dialog-bg;
  90. input[id$="tokenfield"][type="text"].token-input {
  91. background-color: @alertify-dialog-bg !important;
  92. }
  93. }*/
  94. }
  95. .dialog, .alert {
  96. & > div {
  97. background-color: @alertify-dialog-bg;
  98. &.half {
  99. width: 50%;
  100. max-width: 50%;
  101. @media (max-width: @browser_media-medium-screen) {
  102. width: 100%;
  103. }
  104. }
  105. display: flex;
  106. flex-flow: column;
  107. }
  108. width: 100%;
  109. margin: 0 auto;
  110. position: relative;
  111. top: 50%;
  112. transform: translateY(-50%);
  113. max-height: 100%;
  114. display: flex;
  115. > * {
  116. width: 100%;
  117. min-width: 260px;
  118. max-width: 500px;
  119. margin: 0 auto;
  120. text-align: left;
  121. padding: @alertify_padding-base;
  122. background: #fff;
  123. box-shadow: @alertify_box-shadow;
  124. }
  125. .msg {
  126. padding: @alertify_padding-base;
  127. margin-bottom: @alertify_padding-base;
  128. margin: 0;
  129. overflow: auto;
  130. }
  131. .alertify-tabs {
  132. max-height: 100%;
  133. display: flex;
  134. flex-flow: column;
  135. .alertify-tabs-titles {
  136. height: 30px;
  137. display: flex;
  138. border-bottom: 1px solid @alertify-fore;
  139. margin-bottom: 20px;
  140. box-sizing: content-box;
  141. span {
  142. font-size: 20px;
  143. height: 30px;
  144. line-height: 30px;
  145. box-sizing: border-box;
  146. padding: 0 15px;
  147. border-left: 1px solid lighten(@alertify-base, 10%);
  148. border-right: 1px solid lighten(@alertify-base, 10%);
  149. cursor: pointer;
  150. }
  151. span.alertify-tabs-active {
  152. background-color: @alertify-fore;
  153. border-left: 1px solid @alertify-fore;
  154. border-right: 1px solid @alertify-fore;
  155. color: @alertify-base;
  156. font-weight: bold;
  157. cursor: default;
  158. }
  159. }
  160. .alertify-tabs-contents {
  161. flex: 1 1 auto;
  162. min-height: 0;
  163. & > div {
  164. max-height: 100%;
  165. display: none;
  166. overflow: auto;
  167. }
  168. & > div.alertify-tabs-content-active {
  169. display: block;
  170. }
  171. }
  172. }
  173. input:not(.form-control), textarea {
  174. background-color: @alertify-input-bg;
  175. color: @alertify-input-fg;
  176. border: 0px;
  177. margin-bottom: 15px;
  178. width: 100%;
  179. font-size: 100%;
  180. padding: @alertify_padding-base;
  181. }
  182. span.cp-password-container {
  183. display: flex;
  184. align-items: center;
  185. margin-bottom: 15px;
  186. justify-content: space-between;
  187. & > * {
  188. margin-bottom: 0 !important;
  189. }
  190. button {
  191. margin: 0 !important;
  192. }
  193. }
  194. input[type="checkbox"], input[type="radio"] {
  195. width: auto;
  196. padding: 0;
  197. margin-right: 0.5em;
  198. margin-top: 1px;
  199. margin-bottom: 5px;
  200. vertical-align: middle;
  201. & + label {
  202. margin-bottom: 0;
  203. margin-right: 2em;
  204. }
  205. }
  206. button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button) {
  207. background-color: @colortheme_alertify-cancel;
  208. box-sizing: border-box;
  209. position: relative;
  210. outline: 0;
  211. display: inline-block;
  212. align-items: center;
  213. padding: 0 6px;
  214. margin: 6px 8px;
  215. line-height: 36px;
  216. min-height: 36px;
  217. white-space: nowrap;
  218. min-width: 88px;
  219. text-align: center;
  220. text-transform: uppercase;
  221. font-size: 14px;
  222. text-decoration: none;
  223. cursor: pointer;
  224. border-radius: 0;
  225. color: @alertify-btn-fg;
  226. border: 1px solid @colortheme_alertify-cancel-border;
  227. &.safe, &.danger {
  228. color: @colortheme_old-base;
  229. white-space: normal;
  230. font-weight: bold;
  231. }
  232. &.danger {
  233. background-color: @colortheme_alertify-red;
  234. border-color: @colortheme_alertify-red-border;
  235. color: @colortheme_alertify-red-color;
  236. &:hover, &:active {
  237. background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-red, 10%), lighten(@colortheme_alertify-red, 10%));
  238. }
  239. }
  240. &.safe {
  241. background-color: @colortheme_alertify-green;
  242. border-color: @colortheme_alertify-green-border;
  243. color: @colortheme_alertify-green-color;
  244. &:hover, &:active {
  245. background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-green, 10%), lighten(@colortheme_alertify-green, 10%));
  246. }
  247. }
  248. &.primary {
  249. background-color: @colortheme_alertify-primary;
  250. color: @colortheme_alertify-primary-text;
  251. border-color: @colortheme_alertify-primary-border;
  252. font-weight: bold;
  253. &:hover, &:active {
  254. background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-primary, 10%), lighten(@colortheme_alertify-primary, 10%));
  255. }
  256. }
  257. &:hover, &:active {
  258. background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-cancel, 10%), lighten(@colortheme_alertify-cancel, 10%));
  259. }
  260. &:focus {
  261. //border: 1px dotted @alertify-base;
  262. box-shadow: 0px 0px 5px @colortheme_alertify-primary;
  263. outline: none;
  264. }
  265. &::-moz-focus-inner {
  266. border: 0;
  267. }
  268. }
  269. button.btn {
  270. margin: 6px 4px;
  271. }
  272. nav {
  273. text-align: right;
  274. }
  275. }
  276. }
  277. .alertify-logs {
  278. position: fixed;
  279. z-index: 99999; // alertify logs
  280. &.bottom, &:not(.top) {
  281. bottom: 16px;
  282. /* // Bottom left placement. Default. Use for transitions.
  283. &.left, &:not(.right) {
  284. > * {
  285. }
  286. }
  287. // Top right placement
  288. &.right {
  289. > * {
  290. }
  291. }*/
  292. }
  293. // All left positions.
  294. &.left, &:not(.right) {
  295. left: 16px;
  296. > * {
  297. float: left;
  298. transform: translate3d(0, 0, 0);
  299. height: auto;
  300. &.show {
  301. left: 0;
  302. }
  303. &, &.hide {
  304. left: -110%;
  305. }
  306. }
  307. }
  308. &.right {
  309. right: 16px;
  310. > * {
  311. float: right;
  312. transform: translate3d(0, 0, 0);
  313. &.show {
  314. right: 0;
  315. opacity: 1;
  316. }
  317. &, &.hide {
  318. right: -110%;
  319. opacity: 0;
  320. }
  321. }
  322. }
  323. &.top {
  324. top: 0;
  325. /* // Top left placement, use for transitions.
  326. &.left, &:not(.right) {
  327. > * {
  328. }
  329. }
  330. // Top right placement, use for transitions
  331. &.right {
  332. > * {
  333. }
  334. }*/
  335. }
  336. > * {
  337. box-sizing: border-box;
  338. transition: all .4s cubic-bezier(.25, .8, .25, 1);
  339. position: relative;
  340. clear: both;
  341. backface-visibility: hidden;
  342. perspective: 1000;
  343. & {
  344. max-height: 0;
  345. margin: 0;
  346. padding: 0;
  347. overflow: hidden;
  348. opacity: 0;
  349. pointer-events: none;
  350. }
  351. &.show {
  352. margin-top: @alertify_padding-base;
  353. opacity: 1;
  354. max-height: 1000px;
  355. padding: @alertify_padding-base;
  356. pointer-events: auto;
  357. }
  358. }
  359. }
  360. }