|
| 1 | +--- |
| 2 | +--- |
| 3 | +/*! |
| 4 | + Style for Archives |
| 5 | + © 2019 Cotes Chung |
| 6 | + MIT License |
| 7 | +*/ |
| 8 | + |
| 9 | +#archives { |
| 10 | + letter-spacing: 0.03rem; |
| 11 | +} |
| 12 | + |
| 13 | +#archives li { |
| 14 | + font-size: 1.1rem; |
| 15 | + line-height: 3rem; |
| 16 | +} |
| 17 | + |
| 18 | +#archives li:nth-child(odd) { |
| 19 | + background-color: #fff; |
| 20 | + background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff); |
| 21 | +} |
| 22 | + |
| 23 | +#archives li>div { |
| 24 | + white-space: nowrap; |
| 25 | + overflow: hidden; |
| 26 | + text-overflow: ellipsis; |
| 27 | +} |
| 28 | + |
| 29 | +#archives span.lead { |
| 30 | + font-size: 1.5rem; |
| 31 | + font-family: 'Oswald', sans-serif; |
| 32 | + position: relative; |
| 33 | + left: 8px; |
| 34 | +} |
| 35 | + |
| 36 | +#archives span.lead:not(:first-child) { |
| 37 | + position: relative; |
| 38 | + left: 4px; |
| 39 | +} |
| 40 | + |
| 41 | +#archives span.lead:not(:first-child)::after { |
| 42 | + left: 67px; |
| 43 | +} |
| 44 | + |
| 45 | +#archives span.lead::after { /* Year dot */ |
| 46 | + content: ""; |
| 47 | + display: block; |
| 48 | + position: relative; |
| 49 | + -webkit-border-radius: 50%; |
| 50 | + -moz-border-radius: 50%; |
| 51 | + border-radius: 50%; |
| 52 | + width: 12px; |
| 53 | + height: 12px; |
| 54 | + top: -26px; |
| 55 | + left: 63px; |
| 56 | + border: 3px solid; |
| 57 | + background-color: #ffffff; |
| 58 | + border-color: #c2c6cc; |
| 59 | + box-shadow: 0 0 2px 0 #c2c6cc; |
| 60 | + z-index: 1; |
| 61 | +} |
| 62 | + |
| 63 | +#archives .date { |
| 64 | + white-space: nowrap; |
| 65 | + display: inline-block; |
| 66 | +} |
| 67 | + |
| 68 | +#archives .date.month { |
| 69 | + width: 1.4rem; |
| 70 | + text-align: center; |
| 71 | + font-family: 'Oswald', sans-serif; |
| 72 | +} |
| 73 | + |
| 74 | +#archives .date.day { |
| 75 | + font-size: 85%; |
| 76 | + font-family: sans-serif; |
| 77 | + text-align: center; |
| 78 | + margin-right: -2px; |
| 79 | + width: 1.2rem; |
| 80 | + position: relative; |
| 81 | + left: -.15rem; |
| 82 | +} |
| 83 | + |
| 84 | +#archives ul>li>div>a { |
| 85 | +/* post title in Archvies */ |
| 86 | + margin-left: 2.5rem; |
| 87 | + position: relative; |
| 88 | + top: .1rem; |
| 89 | +} |
| 90 | + |
| 91 | +#archives .date.month ~ a::before { |
| 92 | + /* A dot for Month and Day */ |
| 93 | + content: ""; |
| 94 | + display: inline-block; |
| 95 | + position: relative; |
| 96 | + -webkit-border-radius: 50%; |
| 97 | + -moz-border-radius: 50%; |
| 98 | + border-radius: 50%; |
| 99 | + width: 8px; |
| 100 | + height: 8px; |
| 101 | + float: left; |
| 102 | + top: 1.35rem; |
| 103 | + left: 69px; |
| 104 | + background-color: #c2c6cc; |
| 105 | + box-shadow: 0 0 3px 0 #c2c6cc; |
| 106 | + z-index: 1; |
| 107 | +} |
| 108 | + |
| 109 | +/* timeline for date */ |
| 110 | +#archives ul>li::after, |
| 111 | +#archives ul>li:first-child::before { |
| 112 | + content: ""; |
| 113 | + width: 4px; |
| 114 | + left: 75px; |
| 115 | + display: inline-block; |
| 116 | + float: left; |
| 117 | + position: relative; |
| 118 | + background-color: rgba(0, 0, 0, 0.075); |
| 119 | +} |
| 120 | + |
| 121 | +#archives ul>li::after { |
| 122 | + height: 2.8rem; |
| 123 | + top: -1.3rem; |
| 124 | +} |
| 125 | + |
| 126 | +#archives ul>li:first-child::before { |
| 127 | + height: 3.06rem; |
| 128 | + top: -1.61rem; |
| 129 | +} |
| 130 | + |
| 131 | +#archives ul:not(:last-child)>li:last-child::after { |
| 132 | + height: 3.4rem; |
| 133 | +} |
| 134 | + |
| 135 | +#archives ul:last-child>li:last-child::after { |
| 136 | + display: none; |
| 137 | +} |
| 138 | + |
| 139 | +@media all and (max-width: 576px) { |
| 140 | + |
| 141 | + #archives { |
| 142 | + margin-top: -1rem; |
| 143 | + } |
| 144 | + |
| 145 | + #archives ul { |
| 146 | + letter-spacing: 0; |
| 147 | + } |
| 148 | +} |
0 commit comments