concerts.css (4037B)
1 main h1 { 2 color: var(--gold); 3 } 4 5 #event-list { 6 max-height: 60vh; 7 overflow: auto; 8 scrollbar-width: thin; 9 scrollbar-color: black #ddd; 10 } 11 12 #event-list::-webkit-scrollbar { 13 width: 0.25em; 14 height: 0.25em; 15 } 16 17 #event-list::-webkit-scrollbar-track { 18 background: #ddd; 19 } 20 21 #event-list::-webkit-scrollbar-thumb { 22 background: black; 23 } 24 25 .events { 26 display: grid; 27 grid-gap: 0.8em; 28 } 29 30 .events.next { 31 grid-template-columns: repeat(auto-fit, minmax(var(--cell-width), 1fr)); 32 } 33 34 .events.past { 35 grid-template-columns: repeat(auto-fit, minmax(var(--cell-width), 0.5fr)); 36 } 37 38 .event { 39 position: relative; 40 } 41 42 a.thumbnail { 43 display: flex; 44 justify-content: center; 45 align-items: center; 46 width: 100%; 47 height: var(--cell-height); 48 text-decoration: none; 49 } 50 51 .thumbnail img { 52 object-position: center; 53 object-fit: cover; 54 height: 100%; 55 width: 100%; 56 /* Make sure summary is visible when photo is not available. */ 57 background: black; 58 color: white; 59 } 60 61 .thumbnail .summary { 62 position: absolute; 63 font-weight: bold; 64 color: white; 65 text-align: center; 66 } 67 68 .credits::before { 69 content: '© '; 70 } 71 72 .event.canceled { 73 opacity: 50%; 74 transition: 0.5s; 75 } 76 .summary .canceled { 77 display: block; 78 color: red; 79 } 80 .event.canceled:hover, 81 .event.canceled:focus-within, 82 .event.canceled.active { 83 opacity: 1; 84 } 85 86 .details > .detail { 87 display: grid; 88 grid-template-columns: 2em 1fr; 89 } 90 91 .detail.date::before { 92 content: "📅"; 93 } 94 .detail.time::before { 95 content: "🕗"; 96 } 97 .detail.place::before { 98 content: "📌"; 99 } 100 .detail.program::before { 101 content: "🎼"; 102 } 103 104 .details > .detail::before { 105 grid-column: 1; 106 } 107 .details > .detail > * { 108 grid-column: 2; 109 } 110 111 .detail.program { 112 padding-left: 0; 113 list-style: none; 114 } 115 116 .details.canceled > .canceled { 117 color: red; 118 } 119 .details.canceled > :not(.canceled) { 120 /* Make everything less opaque, except the "canceled" marker. */ 121 opacity: 50%; 122 } 123 124 @media (min-width: 50em) { 125 main { 126 /* Define thumbnail dimension here so that we can align stuff in 127 * #event-details. */ 128 --cell-width: 14em; 129 --cell-height: 12em; 130 131 display: grid; 132 grid-template-columns: 60% 40%; 133 } 134 135 main > div { 136 padding-left: 1em; 137 padding-right: 1em; 138 } 139 140 .thumbnail .summary { 141 opacity: 0; 142 transition: 0.5s; 143 } 144 145 .thumbnail img { 146 transition: 0.5s; 147 } 148 149 .credits { 150 position: absolute; 151 bottom: 0; 152 right: 0; 153 font-size: small; 154 color: white; 155 background: #0008; 156 padding: 0 0.2em; 157 border-top-left-radius: 0.5em; 158 } 159 160 .event:hover img, 161 .event:focus-within img, 162 .event.active img { 163 filter: grayscale(0.8) brightness(0.4); 164 } 165 166 .event:hover .summary, 167 .event:focus-within .summary, 168 .event.active .summary { 169 opacity: 1; 170 } 171 172 .credits:not(:hover) > span:only-child { 173 display: none; 174 } 175 176 /* Try to align with center of thumbnails. */ 177 #event-details > p.hint { 178 margin-top: calc( 179 /* h1: 1.4em (commun.css) with 2*.67em margins (default) */ 180 1.4 * (1em + 2*.67em) 181 /* Half of grid height */ 182 + var(--cell-height) / 2 183 ); 184 } 185 } 186 187 @media not all and (min-width: 50em) { 188 .events { 189 --cell-width: 10em; 190 --cell-height: 8em; 191 } 192 193 .event { 194 display: grid; 195 } 196 197 .thumbnail { 198 position: relative; 199 } 200 201 .thumbnail .summary { 202 bottom: 0; 203 display: flex; 204 /* Make sure "canceled" marker goes above summary. */ 205 flex-direction: column; 206 width: 100%; 207 margin: 0; 208 background: #0008; 209 } 210 .event.active > a.thumbnail .summary { 211 /* No idea why "100%" does not work here: */ 212 height: var(--cell-height); 213 justify-content: center; 214 } 215 216 .credits { 217 justify-self: end; 218 font-size: x-small; 219 } 220 }