boxes.less 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. /*
  2. * Component: Box
  3. * --------------
  4. */
  5. .box {
  6. position: relative;
  7. .border-radius(@box-border-radius);
  8. background: #ffffff;
  9. border-top: 3px solid @box-default-border-top-color;
  10. margin-bottom: 20px;
  11. width: 100%;
  12. box-shadow: @box-boxshadow;
  13. // Box color variations
  14. &.box-primary {
  15. border-top-color: @light-blue;
  16. }
  17. &.box-info {
  18. border-top-color: @aqua;
  19. }
  20. &.box-danger {
  21. border-top-color: @red;
  22. }
  23. &.box-warning {
  24. border-top-color: @yellow;
  25. }
  26. &.box-success {
  27. border-top-color: @green;
  28. }
  29. &.box-default {
  30. border-top-color: @gray;
  31. }
  32. // collapsed mode
  33. &.collapsed-box {
  34. .box-body,
  35. .box-footer {
  36. display: none;
  37. }
  38. }
  39. .nav-stacked {
  40. > li {
  41. border-bottom: 1px solid @box-border-color;
  42. margin: 0;
  43. &:last-of-type {
  44. border-bottom: none;
  45. }
  46. }
  47. }
  48. // fixed height to 300px
  49. &.height-control {
  50. .box-body {
  51. max-height: 300px;
  52. overflow: auto;
  53. }
  54. }
  55. .border-right {
  56. border-right: 1px solid @box-border-color;
  57. }
  58. .border-left {
  59. border-left: 1px solid @box-border-color;
  60. }
  61. //SOLID BOX
  62. //---------
  63. //use this class to get a colored header and borders
  64. &.box-solid {
  65. border-top: 0px;
  66. > .box-header {
  67. .btn.btn-default {
  68. background: transparent;
  69. }
  70. .btn,
  71. a {
  72. &:hover {
  73. background: rgba(0,0,0,0.1)!important;
  74. }
  75. }
  76. }
  77. // Box color variations
  78. &.box-default {
  79. .box-solid-variant(@gray, #444);
  80. }
  81. &.box-primary {
  82. .box-solid-variant(@light-blue);
  83. }
  84. &.box-info {
  85. .box-solid-variant(@aqua);
  86. }
  87. &.box-danger {
  88. .box-solid-variant(@red);
  89. }
  90. &.box-warning {
  91. .box-solid-variant(@yellow);
  92. }
  93. &.box-success {
  94. .box-solid-variant(@green);
  95. }
  96. > .box-header > .box-tools .btn {
  97. border: 0;
  98. box-shadow: none;
  99. }
  100. // Fix font color for tiles
  101. &[class*='bg'] {
  102. > .box-header {
  103. color: #fff;
  104. }
  105. }
  106. }
  107. //BOX GROUP
  108. .box-group {
  109. > .box {
  110. margin-bottom: 5px;
  111. }
  112. }
  113. // jQuery Knob in a box
  114. .knob-label {
  115. text-align: center;
  116. color: #333;
  117. font-weight: 100;
  118. font-size: 12px;
  119. margin-bottom: 0.3em;
  120. }
  121. // Box overlay for LOADING STATE effect
  122. > .overlay,
  123. > .loading-img {
  124. position: absolute;
  125. top: 0;
  126. left: 0;
  127. width: 100%;
  128. height: 100%;
  129. }
  130. .overlay {
  131. z-index: 50;
  132. background: rgba(255, 255, 255, 0.7);
  133. .border-radius(@box-border-radius);
  134. > .fa {
  135. position: absolute;
  136. top: 50%;
  137. left: 50%;
  138. margin-left: -15px;
  139. margin-top: -15px;
  140. color: #000;
  141. font-size: 30px;
  142. }
  143. }
  144. .overlay.dark {
  145. background: rgba(0, 0, 0, 0.5);
  146. }
  147. }
  148. //Add clearfix to header, body and footer
  149. .box-header,
  150. .box-body,
  151. .box-footer {
  152. .clearfix();
  153. }
  154. //Box header
  155. .box-header {
  156. color: #444;
  157. display: block;
  158. padding: @box-padding;
  159. position: relative;
  160. //Add bottom border
  161. &.with-border {
  162. border-bottom: 1px solid @box-border-color;
  163. .collapsed-box & {
  164. border-bottom: none;
  165. }
  166. }
  167. //Icons and box title
  168. > .fa,
  169. > .glyphicon,
  170. > .ion,
  171. .box-title {
  172. display: inline-block;
  173. font-size: 18px;
  174. margin: 0;
  175. line-height: 1;
  176. }
  177. > .fa,
  178. > .glyphicon,
  179. > .ion {
  180. margin-right: 5px;
  181. }
  182. > .box-tools {
  183. position: absolute;
  184. right: 10px;
  185. top: 5px;
  186. [data-toggle="tooltip"] {
  187. position: relative;
  188. }
  189. //float: none!important;
  190. &.pull-right {
  191. .dropdown-menu {
  192. right: 0;
  193. left: auto;
  194. }
  195. }
  196. }
  197. }
  198. //Box Tools Buttons
  199. .btn-box-tool {
  200. padding: 5px;
  201. font-size: 12px;
  202. background: transparent;
  203. box-shadow: none!important;
  204. color: darken(@box-default-border-top-color, 20%);
  205. .open &,
  206. &:hover {
  207. color: darken(@box-default-border-top-color, 40%);
  208. }
  209. &:active {
  210. outline: none!important;
  211. }
  212. }
  213. //Box Body
  214. .box-body {
  215. .border-radius(0; 0; @box-border-radius; @box-border-radius);
  216. padding: @box-padding;
  217. .no-header & {
  218. .border-top-radius(@box-border-radius);
  219. }
  220. // Tables within the box body
  221. > .table {
  222. margin-bottom: 0;
  223. }
  224. // Calendar within the box body
  225. .fc {
  226. margin-top: 5px;
  227. }
  228. .full-width-chart {
  229. margin: -19px;
  230. }
  231. &.no-padding .full-width-chart {
  232. margin: -9px;
  233. }
  234. .box-pane {
  235. .border-radius(0; 0; @box-border-radius; 0);
  236. }
  237. .box-pane-right {
  238. .border-radius(0; 0; 0; @box-border-radius);
  239. }
  240. }
  241. //Box footer
  242. .box-footer {
  243. .border-radius(0; 0; @box-border-radius; @box-border-radius);
  244. border-top: 1px solid @box-border-color;
  245. padding: @box-padding;
  246. background-color: @box-footer-bg;
  247. }
  248. .chart-legend {
  249. &:extend(.list-unstyled);
  250. margin: 10px 0;
  251. > li {
  252. @media (max-width: @screen-sm-max) {
  253. float: left;
  254. margin-right: 10px;
  255. }
  256. }
  257. }
  258. //Widgets
  259. //-----------
  260. /* Widget: TODO LIST */
  261. .todo-list {
  262. margin: 0;
  263. padding: 0px 0px;
  264. list-style: none;
  265. overflow: auto;
  266. // Todo list element
  267. > li {
  268. .border-radius(2px);
  269. padding: 10px;
  270. background: #f4f4f4;
  271. margin-bottom: 2px;
  272. border-left: 2px solid #e6e7e8;
  273. color: #444;
  274. &:last-of-type {
  275. margin-bottom: 0;
  276. }
  277. // Color varaity
  278. &.danger {
  279. border-left-color: @red;
  280. }
  281. &.warning {
  282. border-left-color: @yellow;
  283. }
  284. &.info {
  285. border-left-color: @aqua;
  286. }
  287. &.success {
  288. border-left-color: @green;
  289. }
  290. &.primary {
  291. border-left-color: @light-blue;
  292. }
  293. > input[type='checkbox'] {
  294. margin: 0 10px 0 5px;
  295. }
  296. .text {
  297. display: inline-block;
  298. margin-left: 5px;
  299. font-weight: 600;
  300. }
  301. // Time labels
  302. .label {
  303. margin-left: 10px;
  304. font-size: 9px;
  305. }
  306. // Tools and options box
  307. .tools {
  308. display: none;
  309. float: right;
  310. color: @red;
  311. // icons
  312. > .fa, > .glyphicon, > .ion {
  313. margin-right: 5px;
  314. cursor: pointer;
  315. }
  316. }
  317. &:hover .tools {
  318. display: inline-block;
  319. }
  320. &.done {
  321. color: #999;
  322. .text {
  323. text-decoration: line-through;
  324. font-weight: 500;
  325. }
  326. .label {
  327. background: @gray!important;
  328. }
  329. }
  330. }
  331. .handle {
  332. display: inline-block;
  333. cursor: move;
  334. margin: 0 5px;
  335. }
  336. }
  337. // END TODO WIDGET
  338. /* Chat widget (DEPRECATED - this will be removed in the next major release. Use Direct Chat instead)*/
  339. .chat {
  340. padding: 5px 20px 5px 10px;
  341. .item {
  342. .clearfix();
  343. margin-bottom: 10px;
  344. // The image
  345. > img {
  346. //display: inline-block;
  347. width: 40px;
  348. height: 40px;
  349. border: 2px solid transparent;
  350. .border-radius(50%)!important;
  351. &.online {
  352. border: 2px solid @green;
  353. }
  354. &.offline {
  355. border: 2px solid @red;
  356. }
  357. }
  358. // The message body
  359. > .message {
  360. margin-left: 55px;
  361. margin-top: -40px;
  362. > .name {
  363. display: block;
  364. font-weight: 600;
  365. }
  366. }
  367. // The attachment
  368. > .attachment {
  369. .border-radius(@attachment-border-radius);
  370. background: #f4f4f4;
  371. margin-left: 65px;
  372. margin-right: 15px;
  373. padding: 10px;
  374. > h4 {
  375. margin: 0 0 5px 0;
  376. font-weight: 600;
  377. font-size: 14px;
  378. }
  379. > p, > .filename {
  380. font-weight: 600;
  381. font-size: 13px;
  382. font-style: italic;
  383. margin: 0;
  384. }
  385. .clearfix();
  386. }
  387. }
  388. }
  389. //END CHAT WIDGET
  390. //Input in box
  391. .box-input {
  392. max-width: 200px;
  393. }