-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
725 lines (710 loc) · 31.1 KB
/
Copy pathindex.html
File metadata and controls
725 lines (710 loc) · 31.1 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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EVE Image Resolver Demo</title>
<!-- Halfmoon CSS -->
<link
href="https://cdn.jsdelivr.net/npm/halfmoon@2.0.2/css/halfmoon.min.css"
rel="stylesheet"
integrity="sha256-RjeFzczeuZHCyS+Gvz+kleETzBF/o84ZRHukze/yv6o="
crossorigin="anonymous"
/>
<!-- Halfmoon core themes -->
<link
href="https://cdn.jsdelivr.net/npm/halfmoon@2.0.2/css/cores/halfmoon.cores.css"
rel="stylesheet"
integrity="sha256-MAzAVJMU/ze52ZHcA8CeqRrCOVndMZlHwNeS2c73vP4="
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/topcoat/0.8.0/css/topcoat-desktop-dark.min.css"
integrity="sha512-Cwdrdy7iqIj7n5XjgDqvpCOO4aztpoIISOcabdx5igD8Z51YuOWa8BBbI8+2oOI6Rf77xMZ1vAlXvGn6jc6O5Q=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<style>
svg {
overflow: visible;
width: 128px;
height: 64px;
}
#animated-logo {
filter: blur(1px) opacity(1) saturate(2) brightness(2);
}
</style>
<script src="./src/eve-image-helper.js"></script>
</head>
<body data-bs-theme="dark" data-bs-core="modern">
<main class="container text-body">
<header class="bg-secondary bg-opacity-50">
<h1>EVE Image Resolver</h1>
</header>
<div class="row bg-primary-subtle bg-gradient rounded-5 m-3 shadow-lg">
<div class="row bg-primary-subtle bg-gradient rounded-5 m-3 shadow-lg">
<!-- Informational Panel -->
<div
class="container-fluid bg-info bg-opacity-10 rounded-5 rounded-bottom-0 border border-info border-bottom-0 row g-0 mx-auto p-3 pb-0 mb-0"
>
<div
class="container-fluid bg-secondary bg-opacity-75 border border-secondary border-bottom-0 border-end-0 rounded-end-0 rounded rounded-bottom-0"
>
<div class="row container-fluid">
<!-- Section Title -->
<header
class="col-12 bg-primary-subtle rounded rounded-bottom-0 rounded-end-0"
style="border-bottom-right-radius: 50px !important"
>
<h2 class="text-center py-2">What This Does</h2>
</header>
<!-- Introduction & Explanation -->
<div
class="col-7 bg-secondary border border-info border-end-0 rounded rounded-end-0 p-3"
>
<hgroup>
<header
class="bg-primary-subtle text-center py-2 rounded rounded-bottom-0 rounded-end-0"
style="border-bottom-right-radius: 50px !important"
>
<h3>Introduction</h3>
</header>
<p class="text-bg-info rounded px-2 my-4">
EVE Online contains a vast universe filled with numerous
entities such as characters, inventory types,
corporations, alliances, blueprints, and ancient relics.
Each of these entities is uniquely identified by an ID and
can be referenced using the ESI (EVE Swagger Interface).
</p>
<p class="text-bg-info rounded px-2 my-4">
This tool utilizes that ID to determine the type of entity
and generate valid image URLs. Rather than blindly
guessing the URL format, it intelligently resolves the ID
category through ESI’s
<code>universe/names</code> endpoint.
</p>
</hgroup>
</div>
<!-- Supported Categories List -->
<div
class="col-5 border border-info border-start-0 rounded rounded-start-0 p-3"
>
<div class="card">
<header
class="card-header rounded-start-0 bg-primary-subtle text-center"
style="border-bottom-left-radius: 50px !important"
>
Supported ID Categories
</header>
<div class="card-body">
<ul class="topcoat-list__container list-group">
<li class="topcoat-list__item list-group-item bg-body">
Character
</li>
<li class="topcoat-list__item list-group-item bg-body">
Corporation
</li>
<li class="topcoat-list__item list-group-item bg-body">
Alliance
</li>
<li class="topcoat-list__item list-group-item bg-body">
Faction (NPC Corp)
</li>
<li class="topcoat-list__item list-group-item bg-body">
Type (Item)
</li>
<li class="topcoat-list__item list-group-item bg-body">
Blueprint
</li>
<li class="topcoat-list__item list-group-item bg-body">
Ancient Relic
</li>
</ul>
</div>
</div>
</div>
<!-- Example API Response Block -->
<div
class="col-12 col-md-6 col-lg-6 bg-body border border-info rounded-3 p-3 mt-3"
>
<figure class="container-fluid p-1 figure m-0">
<pre
class="bg-secondary rounded fs-5"
style="
background: linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 10ch,
#a7c 10ch,
#a7c 19ch,
white 19ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 10ch,
#a7c 10ch,
#a7c 19ch,
white 19ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 10ch,
#a7c 10ch,
#a7c 16ch,
white 16ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 10ch,
#a7c 10ch,
#a7c 13ch,
white 13ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 10ch,
#a7c 10ch,
#a7c 14ch,
white 14ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 13ch,
#a7c 13ch,
#a7c 16ch,
white 16ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 10ch,
#a7c 10ch,
#a7c 15ch,
white 15ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 10ch,
#a7c 10ch,
#a7c 15ch,
white 15ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 10ch,
#a7c 10ch,
#a7c 20ch,
white 20ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
),
linear-gradient(
to right,
white 0ch,
white 0ch,
white 80ch
);
background-repeat: no-repeat;
background-size: 80ch 22px, 80ch 44px, 80ch 66px,
80ch 88px, 80ch 110px, 80ch 132px, 80ch 154px,
80ch 176px, 80ch 198px, 80ch 220px, 80ch 242px,
80ch 264px, 80ch 286px, 80ch 308px, 80ch 330px,
80ch 352px, 80ch 374px, 80ch 396px, 80ch 418px,
80ch 440px, 80ch 462px, 80ch 484px, 80ch 506px,
80ch 528px, 80ch 550px, 80ch 572px, 80ch 594px,
80ch 616px, 80ch 638px, 80ch 660px, 80ch 682px,
80ch 704px, 80ch 726px, 80ch 748px, 80ch 770px,
80ch 792px, 80ch 814px, 80ch 836px, 80ch 858px,
80ch 880px, 80ch 902px, 80ch 924px;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
width: 80ch;
font-family: monospace;
font-size: 20px;
line-height: 22px;
"
>
[<br> {<br> "category": "alliance",<br> "id": 434243723,<br> "name": "C C P Alliance"<br> },<br> {<br> "category": "corporation",<br> "id": 109299958,<br> "name": "C C P"<br> },<br> {<br> "category": "faction",<br> "id": 500001,<br> "name": "Caldari State"<br> },<br> {<br> "category": "inventory_type",<br> "id": 587,<br> "name": "Rifter"<br> },<br> {<br> "category": "inventory_type",<br> "id": 3082,<br> "name": "250mm Railgun II"<br> },<br> {<br> "category": "inventory_type",<br> "id": 11568,<br> "name": "Avatar Blueprint"<br> },<br> {<br> "category": "inventory_type",<br> "id": 30752,<br> "name": "Intact Hull Section"<br> },<br> {<br> "category": "character",<br> "id": 1338057886,<br> "name": "CCP Alliance Tournament"<br> }<br>] <br>
</pre>
<figcaption class="text-center mt-2">
Sample response from
<abbr title="Application Programming Interface">API</abbr>
lookup.
</figcaption>
</figure>
</div>
<!-- Detailed Breakdown -->
<div class="col-12 col-md-6 col-lg-6">
<div class="bg-body border border-info rounded p-3 mb-2">
<p>
This tool initiates by resolving an ID to its associated
category using the
<code>universe/names</code> endpoint. From there, each
category is treated accordingly.
</p>
</div>
<div class="bg-body border border-info rounded p-3 mb-2">
<p>
If the category is <code>inventory_type</code>, the tool
performs additional lookups to identify the type’s group
and category. This helps distinguish between ships,
blueprints, and relics — ensuring precise URL
construction.
</p>
</div>
<div class="bg-body border border-info rounded p-3">
<p>
Ship types will return <strong>icon</strong> and
<strong>render</strong> images. Blueprints return both
<strong>bp</strong> and <strong>bpc</strong> formats.
Ancient relics return <strong>relic</strong> images. All
other IDs resolve to their appropriate
<strong>portrait</strong> or <strong>logo</strong>.
</p>
</div>
</div>
</div>
</div>
</div>
<div
class="col-12 bg-primary bg-opacity-10 rounded-5 rounded-bottom-0 rounded-top-0 rounded-top-0 border border-primary border-top-0 border-bottom-0 row g-0 mx-auto p-3 py-0 my-0"
>
<div class="col-12">
<fieldset
id="resolver-form"
class="bg-secondary bg-opacity-75 rounded rounded-bottom-0 rounded-top-0 border border-secondary border-bottom-0 border-top-0 p-1 py-4"
>
<legend>
<h2>Demo</h2>
</legend>
<p class="rounded-pill bg-body px-3">
Input an id and click the button to demonstrate the script.
The input field will offer valid ids of each category for the
purpose of the demo.
</p>
<div class="row g-3 align-items-center mt-5">
<div class="d-none col-12">
<label for="size-option-1" class="topcoat-radio-button">
<input id="size-option-1" type="radio" name="size-option" value="32" checked />
<div class="topcoat-radio-button__checkmark"></div>
32</label>
<label for="size-option-2" class="topcoat-radio-button">
<input id="size-option-2" type="radio" name="size-option" value="64" />
<div class="topcoat-radio-button__checkmark"></div>
64</label>
<label for="size-option-3" class="topcoat-radio-button">
<input id="size-option-3" type="radio" name="size-option" value="128" />
<div class="topcoat-radio-button__checkmark"></div>
128</label>
<label for="size-option-4" class="topcoat-radio-button">
<input id="size-option-4" type="radio" name="size-option" value="256" />
<div class="topcoat-radio-button__checkmark"></div>
256</label>
<label for="size-option-5" class="topcoat-radio-button">
<input id="size-option-5" type="radio" name="size-option" value="512" />
<div class="topcoat-radio-button__checkmark"></div>
512</label>
<label for="size-option-6" class="topcoat-radio-button">
<input id="size-option-6" type="radio" name="size-option" value="1024" />
<div class="topcoat-radio-button__checkmark"></div>
1024</label>
</div>
<div class="col-sm-8 col-md-9 col-lg-10">
<div class="form-floating">
<input
type="number"
class="form-control topcoat-text-input"
list="id-suggestions"
id="input-id"
placeholder="Enter EVE ID"
required
/>
<datalist id="id-suggestions">
<option value="434243723">Alliance: 434243723</option>
<option value="109299958">
Corporation: 109299958
</option>
<option value="500001">
Faction (NPC Corp): 500001
</option>
<option value="1338057886">
Character: 1338057886
</option>
<option value="587">Rifter (type): 587</option>
<option value="3082">
250mm Railgun II (type): 3082
</option>
<option value="11568">
Avatar Blueprint (type): 11568
</option>
<option value="30752">
Intact Hull Section (type): 30752
</option>
</datalist>
<label for="input-id">Enter EVE ID</label>
</div>
</div>
<div
class="col-sm-4 col-md-3 col-lg-2 d-flex justify-content-start"
>
<div id="spinner-container" class="d-none mx-auto">
<svg id="animated-logo" viewBox="0 0 360 200" xmlns="http://www.w3.org/2000/svg">
<defs>
<!-- Glowing cyan tail -->
<linearGradient id="glowGradient" x1="1" y1="0" x2="0" y2="0">
<stop offset="0%" stop-color="cyan" stop-opacity="0.9" />
<stop offset="25%" stop-color="teal" stop-opacity="1" />
<stop offset="50%" stop-color="cyan" stop-opacity="0.9" />
<stop offset="75%" stop-color="teal" stop-opacity="1" />
<stop offset="100%" stop-color="cyan" stop-opacity="0.9" />
</linearGradient>
<!-- Glow blur filter -->
<filter id="glowFilter" x="-50%" y="-50%" width="200%" height="200%">
<feGaussianBlur in="SourceGraphic" stdDeviation="13" result="blur" />
<feMerge>
<feMergeNode in="blur" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>
<!-- Glowing tail -->
<path d="
M 160,100
A 40,40 0 1 0 80,100
A 40,40 0 1 0 160,100
A 40,40 0 1 1 240,100
A 40,40 0 1 1 160,100
" stroke="url(#glowGradient)" stroke-width="13" fill="none" filter="url(#glowFilter)" stroke-linecap="round" stroke-dasharray="360 120" stroke-dashoffset="0">
<animate attributeName="stroke-dashoffset" from="-240" to="240" dur="1.25643s" repeatCount="indefinite" />
</path>
</svg>
</div>
<div id="button-container" class="mx-auto">
<button
id="resolve-button"
class="btn btn-primary text-bg-primary topcoat-button--large"
type="submit"
>
Resolve Image
</button>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div
id="result"
class="col-12 bg-success bg-opacity-10 rounded-5 rounded-top-0 border border-success border-top-0 row g-0 mb-auto mx-auto p-3 pt-0 rounded-top-0"
>
<div class="col-12">
<div
class="h-100 bg-secondary bg-opacity-75 border border-secondary border-top-0 rounded rounded-top-0 p-4"
>
<h2>Results</h2>
<div class="bg-body rounded border border-success">
<table
class="table table-striped border-0 table-striped-columns table-hover"
border="1"
cellpadding="6"
>
<caption class="mx-1">
Results from input made above will appear here.
</caption>
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Variant</th>
<th scope="col">URL</th>
<th scope="col" class="text-end">Preview</th>
</tr>
</thead>
<tbody id="result-body"></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<footer class="text-center mt-5">
<p class="mb-0">
Created by
<a
href="https://github.com/PhobiaCide"
target="_blank"
rel="noopener"
>PhobiaCide</a
>
</p>
</footer>
</div>
</main>
<script defer>
let runCount = 0;
const btn = document.getElementById("resolve-button");
const input = document.getElementById("input-id");
const size = document.querySelector('input[name="size-option"]:checked')?.value;
const queryString = `?size=${size}`;
const resultBody = document.getElementById("result-body");
const spinnerContainer = document.getElementById("spinner-container");
const buttonContainer = document.getElementById("button-container");
btn.onclick = async () => {
const id = Number(input.value);
input.value = ""; // Clear the input for new entry
if (!id) return alert("Enter a valid numeric ID");
buttonContainer.classList.toggle("d-none");
spinnerContainer.classList.toggle("d-none");
const resolver = await Image.create(id, queryString);
const variants = resolver.variants;
if (!Object.keys(variants).length) {
alert("No image variants available.");
return;
}
const rows = Object.entries(variants)
.map(([key, url]) => {
runCount++;
return `
<tr>
<th scope="row">${runCount}</th>
<td>${key}</td>
<td><a href="${url}" target="_blank">${url}</a></td>
<td class="text-end"><img src="${url}" alt="${key}" style="max-height:100px" /></td>
</tr>
`;
})
.join("");
resultBody.insertAdjacentHTML("beforeend", rows);
buttonContainer.classList.toggle("d-none");
spinnerContainer.classList.toggle("d-none");
};
</script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"
integrity="sha256-whL0tQWoY1Ku1iskqPFvmZ+CHsvmRWx/PIoEvIeWh4I="
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"
integrity="sha256-3gQJhtmj7YnV1fmtbVcnAV6eI4ws0Tr48bVZCThtCGQ="
crossorigin="anonymous"
></script>
</body>
</html>