Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 2cb222c

Browse files
authored
Merge pull request #8 from Zexlo/main
fix conflicts again and merge new json page template
2 parents 094dfc8 + c5c4981 commit 2cb222c

File tree

3 files changed

+70
-2
lines changed

3 files changed

+70
-2
lines changed

css/styles.css

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ body {
33
font-family: Arial, sans-serif;
44
margin: 0;
55
padding: 0;
6-
color: #fff;
6+
color: #ffff
7+
text-align: center;
78
background: url("assets/images/blueprintscroll.png");
89
transition: background-color 0.3s, color 0.3s;
910
}
@@ -108,3 +109,30 @@ body.no-bg {
108109
summary {
109110
font-size: x-large;
110111
}
112+
113+
/* Style the button that is used to open and close the collapsible content */
114+
.collapsible {
115+
background-color: #eee;
116+
color: #444;
117+
cursor: pointer;
118+
padding: 18px;
119+
width: 100%;
120+
border: none;
121+
text-align: left;
122+
outline: none;
123+
font-size: 15px;
124+
}
125+
126+
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
127+
.active, .collapsible:hover {
128+
background-color: #ccc;
129+
}
130+
131+
/* Style the collapsible content. Note: hidden by default */
132+
.content {
133+
padding: 0 18px;
134+
background-color: white;
135+
max-height: 0;
136+
overflow: hidden;
137+
transition: max-height 0.2s ease-out;
138+
}

js/main.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,19 @@ document.addEventListener('DOMContentLoaded', () => {
106106
e.preventDefault();
107107
});
108108
});
109+
110+
var coll = document.getElementsByClassName("collapsible");
111+
var i;
112+
113+
for (i = 0; i < coll.length; i++) {
114+
coll[i].addEventListener("click", function() {
115+
this.classList.toggle("active");
116+
var content = this.nextElementSibling;
117+
if (content.style.maxHeight){
118+
content.style.maxHeight = null;
119+
} else {
120+
content.style.maxHeight = content.scrollHeight + "px";
121+
}
122+
});
123+
}
124+

sections/Json editing.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,31 @@
1313

1414
<main>
1515
<h2>How to Edit Json Files</h2>
16-
<p>Learn how to edit json files.</p>
16+
<p>Learn how to edit json files using these json commands for mc3ds,
17+
each command will contain a description and snippet of code</p>
18+
19+
<button type="button" class="collapsible">Minceraft?</button>
20+
<div class="content">
21+
<p>Minceraft!</p>
22+
</div>
23+
24+
<details>
25+
<summary>is_baby</summary>
26+
27+
<h2>minecraft:is_baby</h2>
28+
<p>This command is used for component groups which reflect baby varients</p>
29+
<h2>Code snippet</h2>
30+
<p>"minecraft:is_baby": { },</p>
31+
</details>
32+
33+
<details>
34+
<summary>scale</summary>
35+
36+
<h2>minecraft:scale</h2>
37+
<p>This command is used to rescale a compontent groups model, such as babies</p>
38+
<h2>Code snippet</h2>
39+
<p>"minecraft:scale": {"value": X},</p>
40+
</details>
1741
</main>
1842
</body>
1943
</html>

0 commit comments

Comments
 (0)