_cards.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. /*
  2. * Component: Box
  3. * --------------
  4. */
  5. .card {
  6. @extend .mb-3;
  7. @include box-shadow($card-shadow);
  8. &.bg-dark {
  9. &,
  10. .card-body {
  11. color: $white;
  12. }
  13. }
  14. // collapsed mode
  15. &.collapsed-card {
  16. .card-body,
  17. .card-footer {
  18. display: none;
  19. }
  20. }
  21. .nav.flex-column {
  22. > li {
  23. border-bottom: 1px solid $card-border-color;
  24. margin: 0;
  25. &:last-of-type {
  26. border-bottom: none;
  27. }
  28. }
  29. }
  30. // fixed height to 300px
  31. &.height-control {
  32. .card-body {
  33. max-height: 300px;
  34. overflow: auto;
  35. }
  36. }
  37. .border-right {
  38. border-right: 1px solid $card-border-color;
  39. }
  40. .border-left {
  41. border-left: 1px solid $card-border-color;
  42. }
  43. }
  44. .card,
  45. .overlay-wrapper {
  46. // Box overlay for LOADING STATE effect
  47. > .overlay,
  48. > .loading-img {
  49. position: absolute;
  50. top: 0;
  51. left: 0;
  52. width: 100%;
  53. height: 100%;
  54. }
  55. .overlay {
  56. z-index: 50;
  57. background: rgba(255, 255, 255, 0.7);
  58. @include border-radius($border-radius);
  59. > .fa {
  60. position: absolute;
  61. top: 50%;
  62. left: 50%;
  63. margin-left: -15px;
  64. margin-top: -15px;
  65. color: #000;
  66. font-size: 30px;
  67. }
  68. }
  69. .overlay.dark {
  70. background: rgba(0, 0, 0, 0.5);
  71. }
  72. }
  73. // Add clearfix to header, body and footer
  74. .card-header,
  75. .card-body,
  76. .card-footer {
  77. @include clearfix();
  78. }
  79. // Box header
  80. .card-header {
  81. position: relative;
  82. background-color: transparent;
  83. border-bottom: 1px solid $card-border-color;
  84. @if $enable-rounded {
  85. @include border-top-radius($border-radius);
  86. }
  87. .collapsed-card & {
  88. border-bottom: none;
  89. }
  90. > .card-tools {
  91. position: absolute;
  92. right: 1rem;
  93. top: .5rem;
  94. [data-toggle="tooltip"] {
  95. position: relative;
  96. }
  97. }
  98. }
  99. .card-title {
  100. font-size: $card-title-font-size;
  101. font-weight: $card-title-font-weight;
  102. margin: 0;
  103. }
  104. // Box Tools Buttons
  105. .btn-tool {
  106. padding: .25rem .5rem;
  107. font-size: $font-size-sm;
  108. background: transparent;
  109. color: $gray-500;
  110. .btn-group.show &,
  111. &:hover {
  112. color: $gray-700;
  113. }
  114. .show &,
  115. &:focus {
  116. box-shadow: none !important;
  117. }
  118. }
  119. // Box Body
  120. .card-body {
  121. // @include border-radius-sides(0, 0, $border-radius, $border-radius);
  122. .no-header & {
  123. // @include border-top-radius($border-radius);
  124. }
  125. // Tables within the box body
  126. > .table {
  127. margin-bottom: 0;
  128. > thead > tr > th,
  129. > thead > tr > td {
  130. border-top-width: 0;
  131. }
  132. }
  133. // Calendar within the box body
  134. .fc {
  135. margin-top: 5px;
  136. }
  137. .full-width-chart {
  138. margin: -19px;
  139. }
  140. &.p-0 .full-width-chart {
  141. margin: -9px;
  142. }
  143. }
  144. .chart-legend {
  145. @extend .list-unstyled;
  146. margin: 10px 0;
  147. > li {
  148. @media (max-width: map-get($grid-breakpoints, sm)) {
  149. float: left;
  150. margin-right: 10px;
  151. }
  152. }
  153. }
  154. // Comment Box
  155. .card-comments {
  156. background: #f7f7f7;
  157. .card-comment {
  158. @include clearfix();
  159. padding: 8px 0;
  160. border-bottom: 1px solid #eee;
  161. &:last-of-type {
  162. border-bottom: 0;
  163. }
  164. &:first-of-type {
  165. padding-top: 0;
  166. }
  167. img {
  168. @extend .img-sm;
  169. float: left;
  170. }
  171. }
  172. .comment-text {
  173. margin-left: 40px;
  174. color: #555;
  175. }
  176. .username {
  177. color: #444;
  178. display: block;
  179. font-weight: 600;
  180. }
  181. .text-muted {
  182. font-weight: 400;
  183. font-size: 12px;
  184. }
  185. }
  186. // Widgets
  187. //-----------
  188. // Widget: TODO LIST
  189. .todo-list {
  190. margin: 0;
  191. padding: 0;
  192. list-style: none;
  193. overflow: auto;
  194. // Todo list element
  195. > li {
  196. @include border-radius(2px);
  197. padding: 10px;
  198. background: #f4f4f4;
  199. margin-bottom: 2px;
  200. border-left: 2px solid #e6e7e8;
  201. color: #444;
  202. &:last-of-type {
  203. margin-bottom: 0;
  204. }
  205. > input[type='checkbox'] {
  206. margin: 0 10px 0 5px;
  207. }
  208. .text {
  209. display: inline-block;
  210. margin-left: 5px;
  211. font-weight: 600;
  212. }
  213. // Time labels
  214. .label {
  215. margin-left: 10px;
  216. font-size: 9px;
  217. }
  218. // Tools and options box
  219. .tools {
  220. display: none;
  221. float: right;
  222. color: theme-color("danger");
  223. // icons
  224. > .fa, > .glyphicon, > .ion {
  225. margin-right: 5px;
  226. cursor: pointer;
  227. }
  228. }
  229. &:hover .tools {
  230. display: inline-block;
  231. }
  232. &.done {
  233. color: #999;
  234. .text {
  235. text-decoration: line-through;
  236. font-weight: 500;
  237. }
  238. .label {
  239. background: $gray-500 !important;
  240. }
  241. }
  242. }
  243. // Color varaity
  244. .danger {
  245. border-left-color: theme-color("danger");
  246. }
  247. .warning {
  248. border-left-color: theme-color("warning");
  249. }
  250. .info {
  251. border-left-color: theme-color("info");
  252. }
  253. .success {
  254. border-left-color: theme-color("success");
  255. }
  256. .primary {
  257. border-left-color: theme-color("primary");
  258. }
  259. .handle {
  260. display: inline-block;
  261. cursor: move;
  262. margin: 0 5px;
  263. }
  264. }
  265. // END TODO WIDGET
  266. // Input in box
  267. .card-input {
  268. max-width: 200px;
  269. }
  270. @each $name, $color in $theme-colors {
  271. .card-#{$name} {
  272. &:not(.card-outline) {
  273. .card-header {
  274. background-color: $color;
  275. border-bottom: 0;
  276. &,
  277. a {
  278. color: color-yiq($color);
  279. }
  280. }
  281. }
  282. &.card-outline {
  283. border-top: 3px solid $color;
  284. }
  285. }
  286. .bg-#{$name},
  287. .bg-#{$name}-gradient,
  288. .card-#{$name}:not(.card-outline) {
  289. .btn-tool {
  290. color: rgba(color-yiq($color), 0.8);
  291. &:hover {
  292. color: color-yiq($color);
  293. }
  294. }
  295. }
  296. }