-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
217 lines (199 loc) · 11.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blueprint - Download, Read, Explore</title>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/index.css">
<meta property="og:type" content="website">
<meta property="og:title" content="Blueprint"/>
<meta property="og:description" content="Your all in one Create website"/>
<meta property="og:url" content="https://blueprint-site.github.io/"/>
<meta property="og:image" content="https://blueprint-site.github.io/static/logo.webp"/>
<script src="/static/js/darkmode.js" defer></script>
</head>
<body>
<nav>
<a class="logo" href="/"><img src="/static/logo.webp" alt="Logo">Blueprint</a>
<span style="flex-grow: 1;"></span>
<a href="/addons.html"><img src="/static/minecart_coupling.webp" alt="">Addons</a>
<a href="/schematics.html"><img src="/static/schematic.webp" alt="">Schematics</a>
<a href="/about.html"><img src="/static/Clipboard.webp" alt="">About</a>
</nav>
<main>
<div id="dark-mode-toggle"><span>Change theme</span></div>
<div class="home-explore">
<center>
<div class="home-discover-addons">
<h2 class="home-discover-addons-text">Discover Addons</h2>
</div>
<div class="home-slideshow-container">
<img src="static/banner1.webp" alt="" class="home-slideshow-image" id="home-slideshow-image">
<div class="side-box" id="side-box">(w)
</div>
</center>
</div>
<br>
<div class="home-more-addons-button-container">
<a href="/addons.html" class="home-more-addons-button">
<div class="more-addons-inside-text">Show more...</div>
</a>
</div>
<br>
<br>
<div class="random-addons">
<h1 class="random-addon-header">Here is a Random Addon for you to enjoy!</h1>
<div class="random-addon" id="random-addon"></div>
</div>
<br>
<br>
<br>
<div class="for-creators">
<div class="for-creators-textbox">
<h1 class="for-creators-header">For Creators</h1>
<h2>You can't find your addon here?</h2>
<h2>Contact us and request a re-scan of all addons for your addon to join other!</h2>
<h2>You can join our Discord or email us on: blueprint-site@proton.me</h2>
<a href="https://discord.gg/ZF7bwgatrT" class="for-creators-discord">Join our Discord!</a>
<a href="mailto:blueprint-site@proton.me" class="for-creators-email">Email us</a>
</div>
<div class="for-creators-imagebox">
<img src="/static/addon_image1.webp" alt="" class="for-creators-image">
<img src="/static/addon_image2.webp" alt="" class="for-creators-image">
<img src="/static/addon_image3.webp" alt="" class="for-creators-image">
<img src="/static/addon_image4.webp" alt="" class="for-creators-image">
<img src="/static/addon_image5.webp" alt="" class="for-creators-image">
<img src="/static/addon_image6.webp" alt="" class="for-creators-image">
</div>
</div>
</div>
<dir class="site-info">
<br>
<h2 class="h2-blueprint">What is Blueprint?</h2>
<h4 class="h3-blueprint">Blueprint is a site made to help You find Your favorite Create Mod addons</h4>
<h3 class="h3-blueprint">How does it work?</h3>
<p class="h4-blueprint">We collect data from Modrinth (and Curseforge in future) and then use it to show you the addons
(more info <a class="blogpost" href="/blog/howthefuck.html">here</a>)</p>
<h3 class="h3-blueprint">Who is behind the site?</h3>
<p class="h4-blueprint">The creator: @yehorscode on Github, .egorro on Discord</p>
<h3 class="h3-blueprint">Why isn't my addon on the site?</h3>
<p class="h4-blueprint">We probably didn't find it, contact us here: blueprint-site@proton.me</p>
<br>
</dir>
<footer>
<img src="static/logo.webp" alt="" class="bottom-bar-logo">
<h4 class="bottom-bar-sitename">Blueprint Site</h4>
<h6 class="bottom-bar-bug">Found a bug? Report it to blueprint-site@proton.me</h6>
<h6 class="bottom-bar-bug">NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR
MICROSOFT</h6>
<h6 class="bottom-bar-bug">Not affiliated with Create Mod team in any way</h6>
<h6 class="bottom-bar-bug">Made with ❤️ by @yehorscode and @thereal_flo_</h6>
</footer>
</main>
<script>
// JavaScript code for slideshow functionality
var images = ["static/banner1.webp", "static/banner2.webp", "static/banner3.webp", "static/banner4.webp", "static/banner11.webp"]; // Array of image paths
var currentIndex = 0; // Index of the current image
var imageElement = document.getElementById("home-slideshow-image");
var sideBox = document.getElementById("side-box");
function nextSlide() {
// Increment currentIndex and display the next image
currentIndex = (currentIndex + 1) % images.length;
// Fade out current image
imageElement.classList.remove("visible");
imageElement.classList.add("hidden");
// Load and fade in the next image after a short delay
setTimeout(function () {
imageElement.src = images[currentIndex];
imageElement.classList.remove("hidden");
imageElement.classList.add("visible");
// Update side box content based on the current image
updateSideBoxContent(currentIndex);
}, 500); // Change this value to adjust the delay
}
// Function to update side box content based on the current image
function updateSideBoxContent(index) {
if (index === 0) {
sideBox.innerHTML = `
<img src="https://cdn.modrinth.com/data/FTeXqI9v/fe75695f6f2e085ac9fb56204de7f88b6d716e8d.png" alt="Create new age icon">
<h3 class="side-box-text">Create: New Age</h3>
<h4 class="side-box-dsc">Create: New Age is an addon for the Create mod that adds integration with electricity.</h4>
`;
sideBox.onclick = function() {openLink("https://modrinth.com/mod/create-new-age")}
} else if (index === 1) {
// Add content for the second image
sideBox.innerHTML = `
<img src="https://cdn.modrinth.com/data/ihpnEd80/1b6e859ac168a44ad383e36252ad6c563a245056.png" alt="Create Cobblestone icon">
<h3 class="side-box-text">Create Cobblestone</h3>
<h4 class="side-box-dsc">Adds a block generating cobblestone using SU, stopping cobblestone generators from eating your frames.</h4>
`;
sideBox.onclick = function() {openLink("https://modrinth.com/mod/create-cobblestone");}
} else if (index === 2) {
// Add content for the third image
sideBox.innerHTML = `
<img src="https://cdn.modrinth.com/data/sMvUb4Rb/b60e1330b10bd1d7b1f2c0b7337a25f73b0eb555_96.webp" alt="Create Deco icon">
<h3 class="side-box-text">Create Deco</h3>
<h4 class="side-box-dsc">Industrial decoration themed around the aesthetics of the Create mod</h4>
`;
sideBox.onclick = function() {openLink("https://modrinth.com/mod/create-deco");}
} else if (index === 3) {
// Add content for the third image
sideBox.innerHTML = `
<img src="https://cdn.modrinth.com/data/gxoNIjg6/a67aa736ddbd20c45cca55d1dc5ef03c2caf841f.png" alt="Create Track Map icon">
<h3 class="side-box-text">Create Track Map</h3>
<h4 class="side-box-dsc">A web-based track map of your world's Create train system, complete with signals, stations, and trains moving in real time.</h4>
`;
sideBox.onclick = function() {("https://modrinth.com/mod/create-track-map");}
} else if (index === 4) {
// Add content for the third image
sideBox.innerHTML = `
<img src="https://cdn.modrinth.com/data/j6Zt3N7W/7695e7967fd8386954b8b2f13e579b99c7839650.png" alt="Create: Factory icon">
<h3 class="side-box-text">Create: Factory</h3>
<h4 class="side-box-dsc">🍬 A lot of new foods added to Create!</h4>
`;
sideBox.onclick = function() {("https://modrinth.com/mod/create-factory")}
}
}
function openLink(url) {
window.location.href = url;
}
// Call nextSlide() immediately to ensure content is loaded for the first image
nextSlide();
// Change slide every 3 seconds
setInterval(nextSlide, 5000);
document.addEventListener("DOMContentLoaded", function () {
fetch('static/data/final_data.json') // Fetch the JSON file
.then(response => response.json())
.then(data => {
const addonIds = Object.keys(data); // Get all addon IDs
const randomId = addonIds[Math.floor(Math.random() * addonIds.length)]; // Select a random addon ID
const randomAddon = data[randomId]; // Get the addon object by its ID
displayAddon(randomAddon); // Display the random addon
})
.catch(error => console.error('Error fetching addons:', error));
});
function displayAddon(addon) {
let modloaders = "";
if (addon.categories.includes("forge")) modloaders += `<a class="supports-forge" target="_blank" rel="noopener noreferrer" href="https://forums.minecraftforge.net"><img alt="Forge support" height="30" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/forge_46h.png"></a>`;
if (addon.categories.includes("neoforge")) modloaders += `<a class="supports-neoforge" target="_blank" rel="noopener noreferrer" href="https://neoforged.net"><img alt="NeoForge support" height="30" src="/static/neoforge_46h.png"></a>`;
if (addon.categories.includes("fabric")) modloaders += `<a class="supports-fabric" target="_blank" rel="noopener noreferrer" href="https://fabricmc.net"><img alt="Fabric support" height="30" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/fabric_46h.png"></a>`;
if (addon.categories.includes("quilt")) modloaders += `<a class="supports-quilt" target="_blank" rel="noopener noreferrer" href="https://quiltmc.org"><img alt="Quilt support" height="30" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/quilt_46h.png"></a>`;
const randomAddonDiv = document.getElementById('random-addon');
randomAddonDiv.innerHTML = `
<img class="random-addon-logo" src="${addon.icon_url}" alt="">
<div class="modloaders"><center>${modloaders}</center></div>
<div class="random-addon-text-box">
<h3 class="random-addon-name">${addon.title}</h3>
<h4 class="random-addon-description">${addon.description}</h4>
</div>
<a target="_blank" rel="noopener noreferrer" class="addon-button" href="${"https://modrinth.com/mod/" + addon.addon_slug}"><img alt="Download on Modrinth" height="35" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/available/modrinth_46h.png"></a>
`;
}
</script>
</body>
</html>