Skip to content

Commit 275fef3

Browse files
committed
Touched up seeds page layout and responsiveness
1 parent 6384e0b commit 275fef3

File tree

1 file changed

+68
-9
lines changed

1 file changed

+68
-9
lines changed

seeds/index.html

Lines changed: 68 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
-2px 0 0 #667C96,
5050
2px 0 0 #667C96,
5151
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);
5353
z-index: 1;
5454
justify-content: center;
5555
display: flex;
@@ -58,17 +58,26 @@
5858
image-rendering: pixelated;
5959
}
6060
.tab-btn:hover {
61-
background: #5588cc;
61+
filter: brightness(1.2);
6262
}
63+
.tab-btn:hover img {
64+
filter: brightness(0.833);
65+
}
66+
/* wyndchyme was here. Yes, I know this is hilariously dumb. */
6367
.tab-btn.active {
6468
background: #225588;
6569
border-bottom: none;
6670
text-decoration: underline;
6771
}
72+
.tab-btn.active:hover img {
73+
filter: brightness(1);
74+
}
75+
.tab-btn.active:hover {
76+
filter: none;
77+
}
6878
.tab-panel {
6979
display: none;
7080
padding: 1em;
71-
height: calc(100vh - 9.5em);
7281
}
7382
.tab-panel.active {
7483
display: block;
@@ -103,7 +112,7 @@
103112
display: grid;
104113
gap: 1em;
105114
padding: 1em;
106-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
115+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
107116
font-family: 'Minecraft Regular';
108117
font-weight: normal;
109118
}
@@ -113,7 +122,7 @@
113122
color: white;
114123
border: 2px solid black;
115124
outline: 2px solid rgba(255, 255, 255, 0.3);
116-
min-height: 100px;
125+
min-height: 150px;
117126
}
118127
.grid-item:hover {
119128
background: rgba(255, 255, 255, 0.4);
@@ -153,18 +162,30 @@
153162

154163
<div class="tab-container" style="margin-top: 7em;">
155164
<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;">
157170
<img src="/img/gui/oreui/resourcepacks.png">Structures
158171
</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;">
160177
<img src="/img/gui/oreui/maps.png">Terrain
161178
</button>
162179
<button class="tab-btn" data-tab="tab3">
163180
<img src="/img/gui/oreui/other.png">Other
164181
</button>
165182
</div>
166183
<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;">
168189
<div class="grid-container">
169190

170191
<div class="grid-item">
@@ -193,7 +214,11 @@
193214
</div>
194215
</div>
195216

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;">
197222
<div class="grid-container">
198223

199224
<div class="grid-item">
@@ -271,6 +296,40 @@
271296
});
272297
});
273298
</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+
274333

275334

276335
</body>

0 commit comments

Comments
 (0)