|
49 | 49 | -2px 0 0 #667C96, |
50 | 50 | 2px 0 0 #667C96, |
51 | 51 | 0 -2px 0 #667C96; |
52 | | - border-bottom: 2px solid rgba(0, 0, 0, 0.3); |
| 52 | + border-bottom: 4px solid rgba(0, 0, 0, 0.3); |
53 | 53 | z-index: 1; |
54 | 54 | justify-content: center; |
55 | 55 | display: flex; |
|
58 | 58 | image-rendering: pixelated; |
59 | 59 | } |
60 | 60 | .tab-btn:hover { |
61 | | - background: #5588cc; |
| 61 | + filter: brightness(1.2); |
62 | 62 | } |
| 63 | + .tab-btn:hover img { |
| 64 | + filter: brightness(0.833); |
| 65 | + } |
| 66 | + /* wyndchyme was here. Yes, I know this is hilariously dumb. */ |
63 | 67 | .tab-btn.active { |
64 | 68 | background: #225588; |
65 | 69 | border-bottom: none; |
66 | 70 | text-decoration: underline; |
67 | 71 | } |
| 72 | + .tab-btn.active:hover img { |
| 73 | + filter: brightness(1); |
| 74 | + } |
| 75 | + .tab-btn.active:hover { |
| 76 | + filter: none; |
| 77 | + } |
68 | 78 | .tab-panel { |
69 | 79 | display: none; |
70 | 80 | padding: 1em; |
71 | | - height: calc(100vh - 9.5em); |
72 | 81 | } |
73 | 82 | .tab-panel.active { |
74 | 83 | display: block; |
|
103 | 112 | display: grid; |
104 | 113 | gap: 1em; |
105 | 114 | padding: 1em; |
106 | | - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); |
| 115 | + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); |
107 | 116 | font-family: 'Minecraft Regular'; |
108 | 117 | font-weight: normal; |
109 | 118 | } |
|
113 | 122 | color: white; |
114 | 123 | border: 2px solid black; |
115 | 124 | outline: 2px solid rgba(255, 255, 255, 0.3); |
116 | | - min-height: 100px; |
| 125 | + min-height: 150px; |
117 | 126 | } |
118 | 127 | .grid-item:hover { |
119 | 128 | background: rgba(255, 255, 255, 0.4); |
|
153 | 162 |
|
154 | 163 | <div class="tab-container" style="margin-top: 7em;"> |
155 | 164 | <div class="tab-buttons"> |
156 | | - <button class="tab-btn active" data-tab="tab1" style="background: rgb(118, 38, 38);"> |
| 165 | + <button class="tab-btn active" data-tab="tab1" style="background: rgb(118, 38, 38); |
| 166 | + box-shadow: |
| 167 | + -2px 0 0 #966666, |
| 168 | + 2px 0 0 #966666, |
| 169 | + 0 -2px 0 #966666;"> |
157 | 170 | <img src="/img/gui/oreui/resourcepacks.png">Structures |
158 | 171 | </button> |
159 | | - <button class="tab-btn" data-tab="tab2" style="background: rgb(29, 86, 55);"> |
| 172 | + <button class="tab-btn" data-tab="tab2" style="background: rgb(29, 86, 55); |
| 173 | + box-shadow: |
| 174 | + -2px 0 0 #7f9666, |
| 175 | + 2px 0 0 #7f9666, |
| 176 | + 0 -2px 0 #7f9666;"> |
160 | 177 | <img src="/img/gui/oreui/maps.png">Terrain |
161 | 178 | </button> |
162 | 179 | <button class="tab-btn" data-tab="tab3"> |
163 | 180 | <img src="/img/gui/oreui/other.png">Other |
164 | 181 | </button> |
165 | 182 | </div> |
166 | 183 | <div class="tab-content"> |
167 | | - <div class="tab-panel active" id="tab1" style="background: rgb(118, 38, 38)"> |
| 184 | + <div class="tab-panel active" id="tab1" style="background: rgb(118, 38, 38); |
| 185 | + box-shadow: |
| 186 | + -2px 0 0 #966666, |
| 187 | + 2px 0 0 #966666, |
| 188 | + 0 2px 0 #966666;"> |
168 | 189 | <div class="grid-container"> |
169 | 190 |
|
170 | 191 | <div class="grid-item"> |
|
193 | 214 | </div> |
194 | 215 | </div> |
195 | 216 |
|
196 | | - <div class="tab-panel" id="tab2" style="background: rgb(29, 86, 55);"> |
| 217 | + <div class="tab-panel" id="tab2" style="background: rgb(29, 86, 55); |
| 218 | + box-shadow: |
| 219 | + -2px 0 0 #7f9666, |
| 220 | + 2px 0 0 #7f9666, |
| 221 | + 0 2px 0 #7f9666;"> |
197 | 222 | <div class="grid-container"> |
198 | 223 |
|
199 | 224 | <div class="grid-item"> |
|
271 | 296 | }); |
272 | 297 | }); |
273 | 298 | </script> |
| 299 | + <script> |
| 300 | + function stretchTabPanel() { |
| 301 | + const tabPanel = document.querySelector('.tab-panel.active'); |
| 302 | + if (!tabPanel) return; |
| 303 | + |
| 304 | + const top = tabPanel.getBoundingClientRect().top + window.scrollY; |
| 305 | + const height = window.innerHeight - top; |
| 306 | + tabPanel.style.height = `${height}px`; |
| 307 | + tabPanel.style.overflowY = 'auto'; |
| 308 | + } |
| 309 | + |
| 310 | + document.querySelectorAll('.tab-btn').forEach(button => { |
| 311 | + button.addEventListener('click', () => { |
| 312 | + const tabId = button.dataset.tab; |
| 313 | + |
| 314 | + document.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active')); |
| 315 | + document.querySelectorAll('.tab-panel').forEach(panel => { |
| 316 | + panel.classList.remove('active'); |
| 317 | + panel.style.height = ''; |
| 318 | + }); |
| 319 | + |
| 320 | + button.classList.add('active'); |
| 321 | + const activePanel = document.getElementById(tabId); |
| 322 | + activePanel.classList.add('active'); |
| 323 | + |
| 324 | + stretchTabPanel(); |
| 325 | + }); |
| 326 | + }); |
| 327 | + |
| 328 | + window.addEventListener('load', stretchTabPanel); |
| 329 | + window.addEventListener('resize', stretchTabPanel); |
| 330 | + </script> |
| 331 | + |
| 332 | + |
274 | 333 |
|
275 | 334 |
|
276 | 335 | </body> |
|
0 commit comments