Skip to content

Commit 6f31f51

Browse files
committed
🚧 A little format page polish
1 parent 7d41b9e commit 6f31f51

File tree

2 files changed

+54
-11
lines changed

2 files changed

+54
-11
lines changed

src/components/blueprintSettingsDialog.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@
656656
.ko-fi-popup-container {
657657
position: absolute;
658658
top: 30px;
659-
right: -23.8vw;
659+
right: -287px;
660660
font-family: 'MinecraftFull';
661661
font-size: 20px;
662662
display: flex;
@@ -705,9 +705,9 @@
705705
border-radius: 12px;
706706
}
707707
.ko-fi-button {
708-
width: 18vw;
709-
margin-right: 1vw;
710-
margin-top: 1vw;
708+
width: 250px;
709+
margin-right: 8px;
710+
margin-top: 12px;
711711
transition: transform 0.2s ease;
712712
}
713713
.ko-fi-button:hover {
@@ -729,18 +729,18 @@
729729
}
730730
@keyframes slideIn {
731731
0% {
732-
right: 23.8vw;
732+
right: 287px;
733733
}
734734
100% {
735-
right: 0px;
735+
right: 0;
736736
}
737737
}
738738
@keyframes slideInPanel {
739739
0% {
740-
right: 0vw;
740+
right: 0;
741741
}
742742
100% {
743-
right: -23.8vw;
743+
right: -287px;
744744
}
745745
}
746746

src/components/formatPage.svelte

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
<script lang="ts">
22
import { BLUEPRINT_FORMAT } from '../blueprintFormat'
3+
import AnimatedJavaIcon from '../assets/animated_java_icon.svg'
4+
5+
const title = document.querySelector('#format_page_animated_java_blueprint')
6+
?.children[1] as HTMLHeadingElement
7+
8+
if (title) {
9+
let previousID = title.parentElement?.id
10+
if (!title.children.namedItem('format_icon')) {
11+
const img = new Image(48, 48)
12+
img.id = 'format_icon'
13+
img.src = AnimatedJavaIcon
14+
img.style.marginRight = '16px'
15+
img.style.borderRadius = '6px'
16+
img.style.boxShadow = '2px 2px 2px #000000aa'
17+
title.prepend(img)
18+
previousID = undefined
19+
setInterval(() => {
20+
if (title.parentElement?.id === previousID) return
21+
if (title.parentElement?.id === 'format_page_animated_java_blueprint') {
22+
img.style.display = 'block'
23+
title.style.display = 'flex'
24+
title.style.alignItems = 'center'
25+
title.style.fontWeight = 'normal'
26+
} else {
27+
img.style.display = 'none'
28+
title.style.fontWeight = 'lighter'
29+
}
30+
previousID = title.parentElement?.id
31+
}, 16)
32+
}
33+
} else {
34+
throw new Error('Format page title not found!')
35+
}
336
437
function createBlueprint() {
538
newProject(BLUEPRINT_FORMAT)
@@ -9,13 +42,23 @@
942
}
1043
</script>
1144

12-
<p class="format_description">Create advanced animated models in Vanilla Java Edition</p>
45+
<p class="format_description">Create advanced animated models for Vanilla Java Edition</p>
1346

1447
<p class="format_target">
1548
<b>Target</b>:
1649
<span>Minecraft: Java Edition</span>
1750
</p>
1851

52+
<h3 class="markdown">
53+
<p class="markdown">Getting Started</p>
54+
</h3>
55+
56+
<p>
57+
<a href="https://animated-java.dev/docs/getting-started/creating-a-blueprint"
58+
>Check out the Docs</a
59+
> to learn how to use Animated Java.
60+
</p>
61+
1962
<h3 class="markdown">
2063
<p class="markdown">Good to know:</p>
2164
</h3>
@@ -25,8 +68,8 @@
2568
at a time. However, the rotation of bones is not restricted.
2669
</li>
2770
<li class="markdown">
28-
Documentation for Animated Java can be found at <a href="https://animated-java.dev/"
29-
>https://animated-java.dev/</a
71+
Documentation for Animated Java can be found at <a href="https://animated-java.dev/docs"
72+
>https://animated-java.dev/docs</a
3073
>
3174
</li>
3275
</ul>

0 commit comments

Comments
 (0)