-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
344 lines (320 loc) · 15.4 KB
/
index.html
File metadata and controls
344 lines (320 loc) · 15.4 KB
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE html>
<html lang="en" data-theme="wither">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ModTracker — Minecraft Mod & Datapack Version Support</title>
<meta name="description" content="Track when mods and datapacks are updated to specific Minecraft versions.">
<meta property="og:type" content="website">
<meta property="og:title" content="ModTracker — Mod Version Support">
<meta property="og:description" content="Track when mods and datapacks are updated to specific Minecraft versions.">
<meta property="og:image" content="https://modtracker.bobjoerules.com/preview.png">
<meta property="og:url" content="https://modtracker.bobjoerules.com">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="ModTracker">
<meta name="twitter:description" content="Track when mods and datapacks are updated to specific Minecraft versions.">
<meta name="twitter:image" content="https://modtracker.bobjoerules.com/preview.png">
<link rel="stylesheet" href="styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<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">
<script src="backgrounds.js"></script>
<script>
(function () {
const savedTheme = localStorage.getItem("tswitch-theme");
if (savedTheme) {
document.documentElement.dataset.theme = savedTheme;
} else {
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
document.documentElement.dataset.theme = prefersDark ? 'wither' : 'snow';
}
const isRandom = localStorage.getItem('custom-bg-random') !== 'false';
let bgImg = localStorage.getItem('custom-bg-image');
let isTiled = localStorage.getItem('custom-bg-tiled') === 'true';
let isPixelated = localStorage.getItem('custom-bg-pixelated') === 'true';
if (isRandom) {
const pool = [];
const includeWallpapers = localStorage.getItem('custom-bg-include-wallpapers') !== 'false';
const includePaintings = localStorage.getItem('custom-bg-include-paintings') !== 'false';
const includeBlocks = localStorage.getItem('custom-bg-include-blocks') !== 'false';
if (includeWallpapers && typeof BACKGROUND_IMAGES !== 'undefined') {
BACKGROUND_IMAGES.forEach(s => pool.push({ s, tiled: false, pixelated: false }));
}
if (includePaintings && typeof PAINTING_IMAGES !== 'undefined') {
PAINTING_IMAGES.forEach(s => pool.push({ s, tiled: false, pixelated: true }));
}
if (includeBlocks && typeof BLOCK_IMAGES !== 'undefined') {
BLOCK_IMAGES.forEach(s => pool.push({ s, tiled: true, pixelated: true }));
}
if (pool.length > 0) {
const choice = pool[Math.floor(Math.random() * pool.length)];
bgImg = choice.s;
isTiled = choice.tiled;
isPixelated = choice.pixelated;
try {
localStorage.setItem('custom-bg-image', bgImg);
localStorage.setItem('custom-bg-tiled', isTiled);
localStorage.setItem('custom-bg-pixelated', isPixelated);
} catch (e) { }
}
}
if (bgImg && bgImg !== 'null') {
const style = document.createElement('style');
style.id = 'initial-bg-style';
style.innerHTML = `
body {
background-image: url("${bgImg}") !important;
}
body.has-custom-bg { display: block; }
`;
document.head.appendChild(style);
const observer = new MutationObserver(() => {
if (document.body) {
document.body.classList.add('has-custom-bg');
if (isTiled) document.body.classList.add('tiled');
if (isPixelated) document.body.classList.add('pixelated-bg');
observer.disconnect();
}
});
observer.observe(document.documentElement, { childList: true });
}
})();
</script>
</head>
<body>
<div class="app-container">
<header>
<div class="logo">
<h1>ModTracker</h1>
</div>
<div class="controls">
<div class="select-wrapper">
<select id="mc-version" aria-label="Minecraft Version">
<option value="" disabled selected>Loading...</option>
</select>
</div>
</div>
</header>
<main class="content-grid">
<section class="glass-panel">
<div style="display: flex; justify-content: space-between; align-items: center;">
<h2>Find Mods & Datapacks</h2>
</div>
<div class="search-box">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-search">
<circle cx="11" cy="11" r="8" />
<path d="m21 21-4.3-4.3" />
</svg>
<input type="text" id="mod-search" placeholder="Search Modrinth..." autocomplete="off">
</div>
<div id="search-results" class="results-container">
<div class="empty-state">Type to search for mods & datapacks</div>
</div>
</section>
<section class="glass-panel">
<div style="display: flex; justify-content: space-between; align-items: center;">
<div style="display: flex; align-items: center; gap: 12px;">
<h2>Tracked</h2>
<div class="select-wrapper sort-wrapper">
<select id="tracked-sort" aria-label="Sort Order">
<option value="added">Date Added</option>
<option value="alphabetical">Name</option>
<option value="updated">Last Updated</option>
<option value="unsupported">Incompatible First</option>
</select>
</div>
</div>
<div class="summary-badges">
<div id="optimal-version" class="optimal-badge mobile-hide"></div>
<div id="status-summary" class="status-summary">0 / 0 Updated</div>
</div>
</div>
<div id="tracked-list" class="tracked-list">
<div class="empty-state">No content tracked yet</div>
</div>
</section>
</main>
<footer class="glass-panel" style="margin-top: 2rem;">
<div class="footer-inner">
<div class="theme-controls">
<form id="theme-switcher-form">
<div class="theme-option">
<input type="radio" id="snow-theme" name="theme-choice" value="snow" />
<label for="snow-theme" title="Snow Theme"></label>
</div>
<div class="theme-option">
<input type="radio" id="stone-theme" name="theme-choice" value="stone" />
<label for="stone-theme" title="Stone Theme"></label>
</div>
<div class="theme-option">
<input type="radio" id="wither-theme" name="theme-choice" value="wither" />
<label for="wither-theme" title="Wither Theme"></label>
</div>
</form>
</div>
<div class="footer-actions">
<button id="export-btn" class="footer-btn" title="Export Tracked List">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
</svg>
<span class="mobile-hide">Export</span>
</button>
<button id="import-btn" class="footer-btn" title="Import Tracked List">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
<polyline points="17 8 12 3 7 8" />
<line x1="12" y1="3" x2="12" y2="15" />
</svg>
<span class="mobile-hide">Import</span>
</button>
<input type="file" id="import-input" accept=".json" style="display: none;">
<button id="open-timeline-btn" class="footer-btn" title="Update Timeline">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="18" y1="20" x2="18" y2="10" />
<line x1="12" y1="20" x2="12" y2="4" />
<line x1="6" y1="20" x2="6" y2="14" />
</svg>
<span class="mobile-hide">Timeline</span>
</button>
<button id="open-gallery-btn" class="footer-btn" title="Background Gallery">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
<circle cx="8.5" cy="8.5" r="1.5" />
<polyline points="21 15 16 10 5 21" />
</svg>
<span class="mobile-hide">Backgrounds</span>
</button>
</div>
</div>
</footer>
</div>
<div id="timeline-modal" class="modal">
<div class="modal-content timeline-modal-content">
<div class="modal-header timeline-header">
<div style="display: flex; flex-direction: column; gap: 4px;">
<h2 id="timeline-title" style="margin:0; font-size: 1.2rem;">Mod Update Timeline</h2>
<div class="timeline-mode-toggle">
<button id="timeline-mode-initial" class="mode-btn active" title="Show when support was first added">Initial
Support</button>
<button id="timeline-mode-latest" class="mode-btn"
title="Show the most recent update for this version">Latest Update</button>
</div>
</div>
<span class="close-btn" id="close-timeline-btn">×</span>
</div>
<div id="timeline-chart-container" class="timeline-container">
</div>
<div class="modal-footer" style="padding: 15px 25px; font-size: 0.9rem; color: var(--text-secondary);">
</div>
</div>
</div>
<div id="bg-gallery-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h2 style="margin:0;">Choose Background</h2>
<span class="close-btn" id="close-gallery-btn">×</span>
</div>
<div class="gallery-grid" id="gallery-grid">
</div>
<div class="gallery-footer"
style="display: flex; justify-content: space-between; align-items: center; padding: 15px 25px;">
<div style="display: flex; gap: 10px; align-items: center;">
<label for="bg-image-input" class="upload-btn">Upload Custom Background...</label>
<div class="gallery-filter-group">
<button id="filter-wallpapers" class="filter-btn active" title="Toggle Wallpapers">
<svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
<path
d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" />
</svg>
</button>
<button id="filter-paintings" class="filter-btn active" title="Toggle Paintings">
<svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
<path
d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9s1.5.67 1.5 1.5S7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" />
</svg>
</button>
<button id="filter-blocks" class="filter-btn active" title="Toggle Blocks">
<svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
<path
d="M21 16.5c0 .38-.21.71-.53.88l-7.97 4.41c-.32.17-.69.17-1 0l-7.97-4.41c-.32-.17-.53-.5-.53-.88V7.5c0-.38.21-.71.53-.88l7.97-4.41c.32-.17.69-.17 1 0l7.97 4.41c.32.17.53.5.53.88v9z" />
</svg>
</button>
</div>
<button id="random-bg-toggle" class="gallery-toggle-btn" title="Random on Reload">
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
<circle cx="8.5" cy="8.5" r="1" fill="currentColor" />
<circle cx="15.5" cy="8.5" r="1" fill="currentColor" />
<circle cx="15.5" cy="15.5" r="1" fill="currentColor" />
<circle cx="8.5" cy="15.5" r="1" fill="currentColor" />
<circle cx="12" cy="12" r="1" fill="currentColor" />
</svg>
</button>
</div>
<input type="file" id="bg-image-input" accept="image/*" style="display: none;">
</div>
<input type="file" id="bg-image-input" accept="image/*" style="display: none;">
</div>
</div>
</div>
<div id="gallery-custom-tooltip"></div>
<template id="search-result-template">
<div class="mod-card">
<img class="mod-icon" src="" alt="">
<div class="mod-info">
<h3 class="mod-title"></h3>
<div class="mod-meta-row">
<span class="mod-type mobile-hide"></span>
<span class="mod-author mobile-hide"></span>
<span class="mod-stats mobile-hide"></span>
</div>
</div>
<button class="add-button" title="Add to track list">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-plus">
<path d="M5 12h14" />
<path d="M12 5v14" />
</svg>
</button>
</div>
</template>
<template id="tracked-mod-template">
<div class="tracked-card">
<img class="mod-icon" src="" alt="">
<div class="mod-info">
<div class="tracked-header">
<div class="header-left">
<h3 class="mod-title"></h3>
<div class="mod-meta-row">
<span class="mod-type mobile-hide"></span>
<span class="mod-date mobile-hide"></span>
</div>
</div>
<span class="status-badge"></span>
</div>
</div>
<button class="remove-button" title="Stop tracking">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-trash-2">
<path d="M3 6h18" />
<path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" />
<path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" />
<line x1="10" y1="11" x2="10" y2="17" />
<line x1="14" y1="11" x2="14" y2="17" />
</svg>
</button>
</div>
</template>
<script src="app.js"></script>
</body>
</html>