Skip to content

Commit 48436d5

Browse files
committed
📱 Mobile site rework!
1 parent b4d7b64 commit 48436d5

File tree

3 files changed

+106
-17
lines changed

3 files changed

+106
-17
lines changed

‎src/components/VideoCarousel.svelte

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,23 @@
111111
padding-bottom: 0.25rem;
112112
text-transform: capitalize;
113113
}
114+
115+
@media (max-width: 768px) {
116+
.grid {
117+
grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
118+
}
119+
.thumbnail-image {
120+
width: 128px;
121+
min-height: 72px;
122+
}
123+
p {
124+
text-align: center;
125+
text-transform: capitalize;
126+
max-width: 128px;
127+
font-size: 0.9rem;
128+
}
129+
:global(.v__title) {
130+
font-size: 1rem;
131+
}
132+
}
114133
</style>

‎src/routes/+layout.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@
9292
--kd-color-brand-rgb: 213, 149, 76;
9393
}
9494
95+
@media (max-width: 768px) {
96+
:global(.on-this-page) {
97+
display: none !important;
98+
}
99+
}
100+
95101
.logo :global(a) {
96102
display: flex;
97103
align-items: center;

‎src/routes/+page.svelte

Lines changed: 81 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,31 @@
2323
if (main) main.style.overflow = 'hidden'
2424
})
2525
26-
const PANELS: Array<{ title: string; description: string; details: string; image: string }> = [
26+
const PANELS: Array<{ title: string; description: string; image: string }> = [
2727
{
2828
title: '100% Vanilla Minecraft!',
29-
description: 'No mods required!',
30-
details: 'Built for Map Makers and Data Pack Developers.',
29+
description: 'Built for Map Makers and Data Pack Developers.',
3130
image: '/img/vanilla.png'
3231
},
3332
{
3433
title: 'Variants',
35-
description: 'Swap out textures on the fly!',
36-
details: 'Swap out textures on a Rig in-game with a single function call.',
34+
description: 'Swap out textures on a Rig in-game with a single function call.',
3735
image: '/img/variants.gif'
3836
},
3937
{
4038
title: 'Advanced Easing Options',
41-
description: 'Make your animations pop!',
42-
details: 'Choose from a variety of easing options to make your animations more dynamic.',
39+
description: 'Choose from a variety of easing options to make your animations more dynamic.',
4340
image: '/img/easing.gif'
4441
},
4542
{
4643
title: 'Vanilla Models',
47-
description: 'Create animations without a Resource Pack!',
48-
details:
44+
description:
4945
'Animated Java supports vanilla item and block models, allowing you to create animated models without a Resource Pack!',
5046
image: '/img/resourcepackless.png'
5147
},
5248
{
5349
title: 'Heavily Optimized',
54-
description: 'Worry less about performance!',
55-
details:
50+
description:
5651
'Animated Java has had hundreds of hours put into performance testing, and optimization. Worry less about performance and more about creating!',
5752
image: '/img/performance.png'
5853
}
@@ -87,9 +82,12 @@
8782
<img src={panel.image} alt={panel.title} />
8883
{/if}
8984
<div>
90-
<h2>{panel.title} <span>- {panel.description}</span></h2>
85+
<h2>
86+
{panel.title}
87+
<!-- <span>{panel.description}</span> -->
88+
</h2>
9189
<hr />
92-
<p>{panel.details}</p>
90+
<p>{panel.description}</p>
9391
</div>
9492
{#if i % 2 == 1}
9593
<img src={panel.image} alt={panel.title} />
@@ -205,10 +203,6 @@
205203
h2 {
206204
font-size: 1.5rem;
207205
}
208-
h2 span {
209-
font-size: 1rem;
210-
vertical-align: middle;
211-
}
212206
213207
.page {
214208
display: flex;
@@ -260,4 +254,74 @@
260254
margin: 0rem 0 0.5rem 0;
261255
border: 1px solid rgb(var(--kd-color-brand));
262256
}
257+
258+
@media (max-width: 768px) {
259+
.panel img {
260+
width: 100%;
261+
}
262+
.panel {
263+
flex-direction: column;
264+
}
265+
.right-panel {
266+
flex-direction: column-reverse;
267+
}
268+
.panel > div {
269+
margin: 16px;
270+
}
271+
.panel > div > h2 {
272+
display: flex;
273+
flex-direction: column;
274+
align-items: stretch;
275+
text-align: center;
276+
}
277+
.panel-container {
278+
gap: 2rem;
279+
}
280+
.header-container {
281+
flex-direction: column;
282+
margin: 2rem 0 0 0;
283+
}
284+
.header-container > div {
285+
margin-left: unset;
286+
}
287+
.header-container img {
288+
width: 128px;
289+
}
290+
.header-container h1 {
291+
font-size: 2.5rem;
292+
text-align: center;
293+
margin-bottom: 0.75rem;
294+
}
295+
.header-container h3 {
296+
font-size: 1.25rem;
297+
text-align: center;
298+
}
299+
.page {
300+
margin: 0px 16px 0 16px;
301+
}
302+
.panel-container {
303+
margin-top: 2rem;
304+
}
305+
.made-with-aj {
306+
margin-top: 4rem;
307+
}
308+
}
309+
310+
@media (max-height: 768px) {
311+
.panel-container {
312+
margin-top: 2rem;
313+
}
314+
.made-with-aj {
315+
margin-top: 4rem;
316+
}
317+
318+
.panel img {
319+
width: 50%;
320+
}
321+
.panel {
322+
display: flex;
323+
align-items: center;
324+
text-align: center;
325+
}
326+
}
263327
</style>

0 commit comments

Comments
 (0)