|
| 1 | +// Variables |
| 2 | +//------------------------------------------------------ |
| 3 | +$timeline-division-background-color: $mediumgray-light !default; |
| 4 | +$timeline-years-background-color: $mediumgray-dark !default; |
| 5 | +$timeline-years-color: $white !default; |
| 6 | +$timeline-dotted-color: $aqua-light !default; |
| 7 | +$timeline-dotted-border-color: $lightgray-light !default; |
| 8 | + |
| 9 | +$timeline-radius: 4px !default; |
| 10 | + |
| 11 | +// Exports |
| 12 | +//------------------------------------------------------ |
| 13 | + |
| 14 | +@include exports("timeline") { |
| 15 | + |
| 16 | + /** |
| 17 | + * timeline |
| 18 | + * -------------------------------------------------- |
| 19 | + */ |
| 20 | + |
| 21 | + .timeline { |
| 22 | + & dl { |
| 23 | + position: relative; |
| 24 | + top: 0; |
| 25 | + margin: 0; |
| 26 | + padding: 20px 0; |
| 27 | + |
| 28 | + &:before { |
| 29 | + position: absolute; |
| 30 | + top: 0; |
| 31 | + bottom: 0; |
| 32 | + left: 50%; |
| 33 | + margin-left: -1px; |
| 34 | + width: 2px; |
| 35 | + content: ''; |
| 36 | + background-color: $timeline-division-background-color; |
| 37 | + z-index: 100; |
| 38 | + } |
| 39 | + |
| 40 | + & dt { |
| 41 | + position: relative; |
| 42 | + top: 30px; |
| 43 | + padding: 3px 5px; |
| 44 | + margin: 0 auto 30px; |
| 45 | + text-align: center; |
| 46 | + @include radius($type: border-radius, $value: $timeline-radius); |
| 47 | + background-color: $timeline-years-background-color; |
| 48 | + font-weight: normal; |
| 49 | + color: $timeline-years-color; |
| 50 | + width: 120px; |
| 51 | + z-index: 200; |
| 52 | + } |
| 53 | + |
| 54 | + & dd { |
| 55 | + position: relative; |
| 56 | + z-index: 200; |
| 57 | + & .circ { |
| 58 | + position: absolute; |
| 59 | + top: 40px; |
| 60 | + left: 50%; |
| 61 | + margin-left: -11px; |
| 62 | + border: 4px solid $timeline-dotted-border-color; |
| 63 | + width: 22px; |
| 64 | + height: 22px; |
| 65 | + @include radius($type: border-radius, $value: 50%); |
| 66 | + background-color: $timeline-dotted-color; |
| 67 | + z-index: 200; |
| 68 | + } |
| 69 | + |
| 70 | + & .time { |
| 71 | + position: absolute; |
| 72 | + top: 31px; |
| 73 | + left: 50%; |
| 74 | + padding: 10px 20px; |
| 75 | + width: 100px; |
| 76 | + display: inline-block; |
| 77 | + color: $timeline-dotted-color; |
| 78 | + } |
| 79 | + |
| 80 | + & .events { |
| 81 | + position: relative; |
| 82 | + margin-top: 31px; |
| 83 | + padding: 10px 10px 0; |
| 84 | + @include radius($type: border-radius, $value: $timeline-radius); |
| 85 | + background-color: $white; |
| 86 | + width: 47%; |
| 87 | + |
| 88 | + &:before { |
| 89 | + position: absolute; |
| 90 | + top: 12px; |
| 91 | + width: 0; |
| 92 | + height: 0; |
| 93 | + content: ''; |
| 94 | + border-width: 6px; |
| 95 | + border-style: solid; |
| 96 | + } |
| 97 | + |
| 98 | + & .events-object { |
| 99 | + margin-right: 10px; |
| 100 | + } |
| 101 | + |
| 102 | + & .events-body { |
| 103 | + overflow: hidden; |
| 104 | + zoom: 1; |
| 105 | + |
| 106 | + & .events-heading { |
| 107 | + margin: 0 0 10px; |
| 108 | + font-size: 14px; |
| 109 | + } |
| 110 | + } |
| 111 | + } |
| 112 | + |
| 113 | + &.pos-right { |
| 114 | + |
| 115 | + & .time { |
| 116 | + margin-left: -100px; |
| 117 | + text-align: right; |
| 118 | + } |
| 119 | + & .events { |
| 120 | + float: right; |
| 121 | + |
| 122 | + &:before { |
| 123 | + left: -12px; |
| 124 | + border-color: transparent $white transparent transparent; |
| 125 | + } |
| 126 | + } |
| 127 | + } |
| 128 | + &.pos-left { |
| 129 | + & .time { |
| 130 | + margin-left: 0; |
| 131 | + text-align: left; |
| 132 | + } |
| 133 | + & .events { |
| 134 | + float: left; |
| 135 | + &:before { |
| 136 | + right: -12px; |
| 137 | + border-color: transparent transparent transparent $white; |
| 138 | + } |
| 139 | + } |
| 140 | + } |
| 141 | + } |
| 142 | + } |
| 143 | + } |
| 144 | + @media screen and (max-width: 767px) { |
| 145 | + .timeline dl { |
| 146 | + &:before { |
| 147 | + left: 60px; |
| 148 | + } |
| 149 | + & dt { |
| 150 | + margin: 0 0 30px; |
| 151 | + } |
| 152 | + & dd { |
| 153 | + & .circ { |
| 154 | + left: 60px; |
| 155 | + } |
| 156 | + & .time { |
| 157 | + left: 0; |
| 158 | + } |
| 159 | + &.pos-left { |
| 160 | + & .time { |
| 161 | + margin-left: 0; |
| 162 | + padding: 10px 0; |
| 163 | + text-align: left; |
| 164 | + } |
| 165 | + & .events { |
| 166 | + float: right; |
| 167 | + width: 84%; |
| 168 | + &:before { |
| 169 | + left: -12px; |
| 170 | + border-color: transparent $white transparent transparent; |
| 171 | + } |
| 172 | + } |
| 173 | + } |
| 174 | + &.pos-right { |
| 175 | + & .time { |
| 176 | + margin-left: 0; |
| 177 | + padding: 10px 0; |
| 178 | + text-align: left; |
| 179 | + } |
| 180 | + & .events { |
| 181 | + float: right; |
| 182 | + width: 84%; |
| 183 | + } |
| 184 | + } |
| 185 | + } |
| 186 | + } |
| 187 | + } |
| 188 | + |
| 189 | +} |
0 commit comments