_timeline.scss 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /* Timeline */
  2. .timeline {
  3. list-style: none;
  4. padding: 20px 0 20px;
  5. position: relative;
  6. &:before {
  7. top: 0;
  8. bottom: 0;
  9. position: absolute;
  10. content: " ";
  11. width: 3px;
  12. background-color: #eeeeee;
  13. left: 50%;
  14. margin-left: -1.5px;
  15. }
  16. > li {
  17. margin-bottom: 20px;
  18. position: relative;
  19. &:before {
  20. content: " ";
  21. display: table;
  22. }
  23. &:after {
  24. content: " ";
  25. display: table;
  26. clear: both;
  27. }
  28. &:before {
  29. content: " ";
  30. display: table;
  31. }
  32. &:after {
  33. content: " ";
  34. display: table;
  35. clear: both;
  36. }
  37. > .timeline-panel {
  38. width: 50%;
  39. float: left;
  40. border: 1px solid #eeeeee;
  41. background: $white-color;
  42. border-radius: 3px;
  43. padding: 20px;
  44. position: relative;
  45. -webkit-box-shadow: 0px 1px 20px 1px rgba(69, 65, 78, 0.06);
  46. -moz-box-shadow: 0px 1px 20px 1px rgba(69, 65, 78, 0.06);
  47. box-shadow: 0px 1px 20px 1px rgba(69, 65, 78, 0.06);
  48. }
  49. &.timeline-inverted + li:not(.timeline-inverted) {
  50. margin-top: -60px;
  51. }
  52. &:not(.timeline-inverted) {
  53. + li.timeline-inverted {
  54. margin-top: -60px;
  55. }
  56. padding-right: 90px;
  57. }
  58. &.timeline-inverted {
  59. padding-left: 90px;
  60. > .timeline-panel {
  61. float: right;
  62. &:before {
  63. border-left-width: 0;
  64. border-right-width: 15px;
  65. left: -15px;
  66. right: auto;
  67. }
  68. &:after {
  69. border-left-width: 0;
  70. border-right-width: 14px;
  71. left: -14px;
  72. right: auto;
  73. }
  74. }
  75. }
  76. > {
  77. .timeline-panel {
  78. &:before {
  79. position: absolute;
  80. top: 26px;
  81. right: -15px;
  82. display: inline-block;
  83. border-top: 15px solid $transparent-bg;
  84. border-left: 15px solid #eeeeee;
  85. border-right: 0 solid #eeeeee;
  86. border-bottom: 15px solid $transparent-bg;
  87. content: " ";
  88. }
  89. &:after {
  90. position: absolute;
  91. top: 27px;
  92. right: -14px;
  93. display: inline-block;
  94. border-top: 14px solid $transparent-bg;
  95. border-left: 14px solid $white-color;
  96. border-right: 0 solid $white-color;
  97. border-bottom: 14px solid $transparent-bg;
  98. content: " ";
  99. }
  100. }
  101. .timeline-badge {
  102. color: $white-color;
  103. width: 50px;
  104. height: 50px;
  105. line-height: 50px;
  106. font-size: 1.8em;
  107. text-align: center;
  108. position: absolute;
  109. top: 16px;
  110. left: 50%;
  111. margin-left: -25px;
  112. background-color: #999999;
  113. z-index: 100;
  114. border-top-right-radius: 50%;
  115. border-top-left-radius: 50%;
  116. border-bottom-right-radius: 50%;
  117. border-bottom-left-radius: 50%;
  118. }
  119. }
  120. }
  121. }
  122. .timeline-badge {
  123. &.default {
  124. background-color: $dark-color !important;
  125. }
  126. &.primary {
  127. background-color: $primary-color !important;
  128. }
  129. &.secondary {
  130. background-color: $secondary-color !important;
  131. }
  132. &.success {
  133. background-color: $success-color !important;
  134. }
  135. &.warning {
  136. background-color: $warning-color !important;
  137. }
  138. &.danger {
  139. background-color: $danger-color !important;
  140. }
  141. &.info {
  142. background-color: $info-color !important;
  143. }
  144. }
  145. .timeline-title {
  146. font-size: 17px;
  147. margin-top: 0;
  148. color: inherit;
  149. font-weight: $font-weight-normal;
  150. }
  151. .timeline-heading {
  152. i {
  153. font-size: 22px;
  154. display: inline-block;
  155. vertical-align: middle;
  156. margin-right: 5px;
  157. }
  158. }
  159. .timeline-body > {
  160. p, ul {
  161. margin-bottom: 0;
  162. }
  163. p + p {
  164. margin-top: 5px;
  165. }
  166. }