-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1772 lines (1572 loc) · 68.4 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
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
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⡴⣶⣷⣦⣤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⣿⣿⣿⣿⣿⡎⠙⠻⢿⣶⣄⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣿⡿⢿⣿⠉⠀⠀⠀⠀⠉⠻⣿⣦⡀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⣶⣿⣿⣿⣿⣿⣾⣿⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣦⡀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠟⢻⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣷⡀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣥⡀⢸⣿⡿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣷⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣧⣸⣿⣧⠘⢿⣦⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇
⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣿⡏⠻⣿⣄⠀⠙⢷⣄⠀⠀⠀⠀⠀⠀⣿⣿⣿
⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⠁⠀⢹⣿⣿⣶⣦⣽⣳⠄⠀⠀⠀⠀⣿⣿⣿
⠀⠀⠀⠀⠀⠀⣰⣿⣿⡿⣿⣿⣿⠀⠀⠈⣿⣷⡀⠉⠛⢿⣷⡀⠀⠀⢀⣿⣿⡿
⠀⠀⠀⠀⠀⢠⣿⣿⠟⢁⣸⣿⣿⣀⣠⣾⣿⣿⣿⣦⡀⠀⠉⢹⠄⠀⣼⣿⣿⡇
⠘⡄⠀⠀⠀⣼⣿⣿⣿⣿⣿⢿⣿⣿⠉⠉⠀⠀⠀⠉⠻⠀⠀⠐⠀⣼⣿⣿⡟⠀
⠀⠘⢆⠀⠀⠘⠛⠋⠉⠀⠀⠀⢿⣿⡆⠀⠀⠀⠀⠀⠈⠀⠀⢀⣼⣿⣿⡟⠀⠀
⠀⠀⠈⠳⣄⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⠋⠀⠀⠀
⠀⠀⠀⠀⠈⠻⣦⣄⣀⠀⠀⠀⠀⣿⣷⠀⠀⢀⣀⣤⣾⣿⣿⡿⠛⠁⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠈⠙⠻⢿⣿⣶⣶⣾⣿⣾⣿⣿⣿⣿⠿⠛⠉⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⣿⣿⡉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡟⠀⠀⠀⠀
Written by Sabrina and Zeph for Destination Home <3
*For Destination Home*. Not for you to take.
If you steal my code, and I'll know you did, I'll farm Reddit karma with screenshots of you.
Think you can get away with it? Think again. You'll be cooked and served buddy.
-->
<!DOCTYPE html>
<html lang="en" style="background-color: #191c1e;">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Destination Home Object Catalogue</title>
<meta property="og:title" content="Destination Home Object Catalogue">
<meta property="og:description" content="Browse through items and objects available on Destination Home.">
<meta property="og:url" content="https://objects.destinationhome.live">
<meta property="og:type" content="website">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<style>
.subtitle {
display: flex;
align-items: center;
}
.subtitle img {
margin-right: 10px;
/* Adjust as needed */
border-radius: 10px;
}
.notification {
display: none;
}
.notification.show {
display: block;
animation: fadeInOut 3s ease-in-out;
}
@keyframes fadeInOut {
0%,
100% {
opacity: 0;
}
50% {
opacity: 1;
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* create css animation thats a loading skeleton for lazyloadbg class */
.lazyloadbg {
background-color: #f0f0f0;
background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: loading 1.4s infinite linear;
}
@keyframes loading {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.card-container {
display: flex;
flex-wrap: wrap;
/* Ensures items wrap to the next row if there isn't enough space */
justify-content: space-between;
/* Adjust as needed */
}
.isRewardCard {
background: linear-gradient(#fbcece, rgb(249 186 186 / 79%));
background-size: cover;
background-position: center;
background-blend-mode: overlay;
}
.card {
height: 90%;
/* make sure the bottom corners are NOT rounded but keep the top ones */
border-radius: 10px 10px 0 0;
}
.column {
margin-bottom: 50px;
}
.img-lazyload {
animation: fadeIn 1s;
}
.button-filter-a {
padding: 10px;
border-radius: 10px;
background-color: #3c4042;
color: white;
cursor: pointer;
font-size: 12px;
margin-bottom: 10px;
margin-right: 10px;
user-select: none;
}
.button-filter-a-sel {
padding: 10px;
border-radius: 10px;
background-color: #4b626e;
color: white;
cursor: pointer;
font-size: 12px;
margin-bottom: 10px;
margin-right: 10px;
user-select: none;
}
#container-2 {
display: flex;
flex-wrap: wrap;
}
#item-detail-list {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #fff;
box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
display: none;
}
#item-detail-content {
padding: 10px;
}
.init-element-anim-1 {
animation: fadeInUp;
animation-duration: 0.3s;
}
.init-element-anim-2 {
animation: fadeInUp;
animation-duration: 0.4s;
}
.init-element-anim-3 {
animation: fadeInUp;
animation-duration: 0.5s;
}
.init-element-anim-4 {
animation: fadeInUp;
animation-duration: 0.6s;
}
.init-element-anim-5 {
animation: fadeInUp;
animation-duration: 0.7s;
}
.loading-text-color {
color: #191c1e;
}
.loading-text-anim {
animation: fadeInUp;
animation-duration: 0.3s;
}
#gradient-gif-anim {
background-image: url('https://media2.giphy.com/media/FyoaJE2iah7WYeyxWr/giphy.gif');
background-size: cover;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
display: inline-block;
animation: fadeIn 1s;
}
.card-anim-component {
transition: transform 0.3s ease;
}
.card-anim-component:hover {
transform: scale(1.02);
}
.isFeaturedItem {
background: linear-gradient(#ffd494, rgba(255, 213, 136, 0.8));
background-size: cover;
background-position: center;
background-blend-mode: overlay;
}
.object-container {
max-width: 800px;
padding: 20px;
}
.object-details {
display: flex;
align-items: flex-start;
}
.object-image {
flex: 1;
}
.object-image img {
max-width: 100%;
height: auto;
border-radius: 5px;
}
.object-info {
flex: 2;
padding-left: 20px;
}
.object-title {
font-size: 24px;
margin-bottom: 10px;
}
.object-type,
.object-premium-reward,
.object-description,
.object-obtain-instructions,
.object-age-rating {
margin-bottom: 10px;
font-size: 16px;
}
.object-premium-reward {
color: #007bff;
}
.object-age-rating {
color: #ff0000;
}
.fab {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #007bff;
color: #fff;
width: 50px;
height: 50px;
border-radius: 50%;
text-align: center;
line-height: 50px;
font-size: 24px;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.frosted-glass {
background-color: rgb(19 29 45 / 71%);
-webkit-backdrop-filter: blur(14px);
backdrop-filter: blur(14px);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
color: white;
}
.frosted-alt {
background-color: rgb(9 11 26 / 71%);
-webkit-backdrop-filter: blur(14px);
backdrop-filter: blur(14px);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
color: white;
}
</style>
<body style="background-color: #191c1e;">
<!-- Modal Details -->
<div id="modal-details" class="modal" style="animation: fadeInUp; animation-duration: 0.2s;">
<!--<div class="modal-background" style="animation: fadeIn; animation-duration: 1s;"></div>-->
<div class="modal-card" style="border: 2px solid #d1d1d1; border-radius: 20px;">
<header class="modal-card-head frosted-alt">
<p class="modal-card-title" style="color: white;">Object Details</p>
<button id="close-modal" class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body frosted-glass">
<!-- Content ... -->
<div class="object-container">
<div class="object-details">
<div class="object-image">
<img src="resc/gray.webp" alt="Object Image" style="animation: fadeIn; animation-duration: 0.5s;">
<p class="object-age-rating" style="animation: fadeIn; animation-duration: 0.5s;">Age Rating: 18+</p>
<button onclick="" id="maker-search-btn" class="button" style="width: 130px; word-wrap: break-word; display: none;">Search Studio</button>
</div>
<div class="object-info">
<h1 class="object-title" style="animation: fadeIn; animation-duration: 0.5s;">Object Name</h1>
<p id="object-maker-disp" style="color: #d1d1d1;font-size: 13px;margin-top: -10px; margin-bottom: 10px; animation: fadeIn;animation-duration: 0.5s;">Studio: %MAKER%</p>
<p class="object-type" style="animation: fadeIn; animation-duration: 0.5s;">Type: Type of Object</p>
<!--<p class="object-premium-reward">Premium/Reward</p>-->
<p class="object-description" style="animation: fadeIn; animation-duration: 0.5s;">Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sit amet eleifend nunc.</p>
<p class="object-obtain-instructions" style="animation: fadeIn; animation-duration: 0.5s;">How to Obtain: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sit amet eleifend nunc.</p>
<!--<p class="object-age-rating" style="animation: fadeIn; animation-duration: 0.5s;">Age Rating: 18+</p>-->
</div>
</div>
</div>
<div class="object-container" id="collections-detail-objcont">
<h1 class="object-title" style="font-size: 17px; animation: fadeIn; animation-duration: 0.5s; margin-left: -10px; margin-bottom: 17px;">Collections</h1>
<div id="collections-dyn-cont"></div>
</div>
<div class="object-container">
<h1 class="object-title" style="font-size: 17px; animation: fadeIn; animation-duration: 0.5s; margin-left: -10px; margin-bottom: 17px;">Suggested</h1>
<div id="similar-obj-dyn-cont"></div>
</div>
<!-- Content End-->
</section>
<footer class="modal-card-foot frosted-alt">
<div class="buttons">
<button onclick="" id="obj-detail-save" class="button">Save</button>
<button onclick="" id="obj-detail-copy" class="button">Copy UUID</button>
<button onclick="" id="obj-detail-copy-url" class="button">Share URL</button>
</div>
</footer>
</div>
</div>
<!-- Modal List -->
<div id="modal-list" class="modal" style="animation: fadeInUp; animation-duration: 0.2s;">
<div class="modal-background" style="animation: fadeIn; animation-duration: 1s;"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Saved Objects</span></p>
<button id="close-modal" class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<!-- Replaced Body -->
</section>
<footer class="modal-card-foot">
<div class="buttons">
<button onclick="clearSavedItems();" class="button"><i class="fa-solid fa-trash"></i> Clear List</button>
<button onclick="importList();" class="button"><i class="fa-solid fa-file-import"></i> Import List</button>
<button onclick="exportList();" class="button"><i class="fa-solid fa-file-export"></i> Export List</button>
</div>
</footer>
</div>
</div>
<!-- Header -->
<section class="hero is-primary" style="background-color: #191c1e; margin-bottom: -40px; margin-top: -10px;">
<div class="hero-body">
<div class="container">
<a href="/" style="text-decoration: none; color: inherit;">
<h3 class="subtitle">
<img src="resc/logo.svg" width="35px" style="border-radius: 10px;">
<span id="ahhtitle">Destination Home Object Catalogue <span style="font-size: 10px; color: gray;"><i>BETA</i></span></span>
</h3>
</a>
</div>
</div>
</section>
<!-- Search Bar -->
<section class="section" style="margin-top: -55px; margin-bottom: -53px;">
<div class="container cutsie-anim-fast">
<div class="field has-addons">
<div class="control is-expanded">
<input id="search-input" class="input" type="text" placeholder="Names, Keywords, Brands, etc.">
</div>
<div class="control">
<a id="search-btn" class="button is-info" style="background-color: #24394b;">
Search 🔍
</a>
</div>
</div>
<div id="misc-pages" class="cutsie-anim" style="margin-bottom: 10px;">
<span id="saved-objects-list-button" onclick="toggleList()" class="button is-info saved-object-button" style="background-color: #24394b; margin-right: 10px;">Saved Objects</span>
<!--<span class="button is-info" style="background-color: #24394b;">History</span>-->
</div>
<div id="container-2" class="cutsie-anim">
<span id="filter-clothing" class="filter-button button-filter-a">Clothing</span>
<span id="filter-furniture" class="filter-button button-filter-a">Furniture</span>
<span id="filter-portable" class="filter-button button-filter-a">Portable</span>
<span id="filter-scene" class="filter-button button-filter-a">Scene</span>
<span id="filter-minigame" class="filter-button button-filter-a">Minigame</span>
<span id="filter-other" class="filter-button button-filter-a">Other (Misc.)</span>
<span id="filter-rewards" class="filter-button button-filter-a">Hide Rewards & Bundles</span>
</div>
<br>
<div id="loading-spinner-elem" style="display: flex; align-items: center;">
<img src="https://datapublic.uam.es/open/img-bi/spinner.gif" width="24px" id="loading-spinner" style="display: none;">
<span id="loading-text" class="loading-text-color" style="display: none; margin-left: 10px;">Hang tight...</span>
</div>
<p id="result-amount"></p>
<p id="no-result-text" style="display: none;">No results found 😔</p>
</div>
</section>
<section class="section" id="search-results">
<div class="container">
<div id="featured-objects-title">
<h2 class="subtitle" style="font-size: 24px; color: white;">
✨ <span id="gradient-gif-anim">Featured Objects</span>
</h2>
<br>
</div>
<div id="collection-title-container" style="display: none;">
<h2 id="collection-title-title" class="subtitle" style="font-size: 24px; color: rgb(167, 167, 167);">
Collection Title
</h2>
<h2 id="collection-title-desc" class="subtitle" style="margin-top: -14px; font-size: 14px; color: rgb(167, 167, 167);">
Collection Description
</h2>
<br>
</div>
<div class="columns is-multiline is-mobile" id="search-container">
<!-- Featured Objects -->
<!-- Featured Objects End-->
</div>
</div>
</section>
<section class="section" id="collections-overview">
<div class="container">
<div id="featured-objects-title">
<h2 class="subtitle" style="font-size: 24px; color: white;">
📁 <span id="gradient-gif-anim">Collections</span>
</h2>
<br>
</div>
<div class="columns is-multiline is-mobile" id="collection-container">
<!-- Collections Overview -->
<!-- Collections Overview End -->
</div>
</div>
</section>
<!-- Footer -->
<div class="fab" id="fab" onclick="scrollToTop()"><i class="fa-solid fa-arrow-up"></i></div>
<footer class="footer" style="background-color: #25282A; color: white; padding: 20px 0;">
<div class="content has-text-centered">
<p style="font-size: 16px;">© Destination Home <br>Created with ❤️ by <span style="font-weight: bold;">Zeph</span> x <span style="font-weight: bold;">Sabrinica</span> ( and <i>Knight</i> )</p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.js"></script>
<script>
document.getElementById('search-input').addEventListener('keypress', function(event) {
if (event.key === 'Enter') {
if (document.getElementById('search-input').value.trim() === '') {
window.location.href = '/';
return;
}
event.preventDefault();
document.getElementById('search-btn').click();
}
});
function scrollToTop() {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
var collectionCardsSkeleton = `
<div class="column is-one-fifth-desktop is-one-fifth-tablet is-full-mobile card-anim-component">
<div class="card collection-card" style="background-image: url('[COLLECTION_IMG]'); background-size: cover;">
<div class="card-content">
<div class="media">
<div class="media-content">
<!-- Enhanced text-shadow for the title -->
<p class="title is-4" style="color: white; text-shadow: 3px 3px 10px rgba(0,0,0,0.8), -1px -1px 10px rgba(0,0,0,0.8);">[COLLECTION_NAME]</p>
</div>
</div>
<div class="content" style="font-size: 15px; color: white; text-shadow: 3px 3px 10px rgba(0,0,0,0.8), -1px -1px 10px rgba(0,0,0,0.8);">
[COLLECTION_DESC]
</div>
</div>
</div>
<footer class="card-footer" style="background-color: lightgray; border-radius: 0 0 10px 10px;">
<a onclick="showCollection('[COLLECTION_ID]');" class="card-footer-item">View</a>
<a onclick="collectionURLCopy('[COLLECTION_ID2]');" class="card-footer-item">Copy URL</a>
</footer>
</div>
`;
var resultSkeleton = `
<div class="[INIT_ANIM] column is-one-fifth-desktop is-one-fifth-tablet is-full-mobile card-anim-component" id="[UUID]">
<div class="card [ITEM_CLASS]">
<header class="card-header">
<p class="card-header-title">[HEADER_PLACEHOLDER]</p>
<span class="icon" style="margin-top: 8px; margin-right: 10px;">
[GENDER_ICON]
</span>
</header>
<div class="card-image">
<figure class="image is-4by3 lazyloadbg">
<img id="img-[UUID2]" style="object-fit: cover;" class="img-lazyload" src="[IMAGE_PLACEHOLDER]" alt="">
</figure>
</div>
<div class="card-content">
<div class="media">
<div class="media-content">
<p style="font-size: 10;">[ITEM_TYPE]</p>
<p class="title is-6">[NAME_PLACEHOLDER]</p>
</div>
</div>
<div class="content">
[DESC_PLACEHOLDER]
</div>
</div>
</div>
<footer class="card-footer" style="background-color: lightgray; border-radius: 0 0 10px 10px;">
<a onclick="objectView('[UUID3]');" class="card-footer-item">View</a>
<a onclick="objectSave('[UUID4]');" class="card-footer-item save-button">Save</a>
<a onclick="objectCopy('[UUID5]', '[ITEM_TYPE_2]');" class="card-footer-item">Copy</a>
</footer>
</div>
`;
var similarObjSkeleton = `
<div class="columns is-multiline is-mobile" id="similar-objects">
<div id="saved-item" style="animation: fadeInLeft; width: 100%; margin-bottom: 10px; background-color: rgb(9 11 26 / 71%); border-radius: 10px; padding: 10px; display: flex; justify-content: space-between; align-items: center;">
<div style="display: flex; align-items: center;">
<img id="saved-item-img" class="preview" src="[SIM_OBJ_IMG]" width="50" height="50" style="animation: fadeIn; animation-duration: 2s; object-fit: cover; width: 50px; height: 50px; border-radius: 10px;">
<p style="margin-left: 10px; animation: fadeIn; animation-duration: 0.5s;"><b id="saved-item-name-">[SIM_OBJ_NAME]</b><br><span style="font-size: 13px;">[SIM_OBJ_TYPE]</span></p>
</div>
<div>
<button onclick="objectViewFromSaved('[SIM_OBJ_UUID]');" class="button is-info" style="background-color: #24394b; animation: fadeIn; animation-duration: 0.5s;">View</button>
</div>
</div>
</div>
`;
var partOfCollectionSkeleton = `
<div class="columns is-multiline is-mobile" id="similar-objects">
<div id="saved-item" style="animation: fadeInLeft; width: 100%; margin-bottom: 10px; background-color: rgb(9 11 26 / 71%); border-radius: 10px; padding: 10px; display: flex; justify-content: space-between; align-items: center;">
<div style="display: flex; align-items: center;">
<img id="saved-item-img" class="preview" src="[COLLECTION_IMG]" width="50" height="50" style="animation: fadeIn; animation-duration: 2s; object-fit: cover; width: 50px; height: 50px; border-radius: 10px;">
<p style="margin-left: 10px; animation: fadeIn; animation-duration: 0.5s;"><b id="saved-item-name-">[COLLECTION_NAME]</b><br><span style="font-size: 13px;">[COLLECTION_DESC]</span></p>
</div>
<div>
<button onclick="showCollection('[COLLECTION_ID]');" class="button is-info" style="background-color: #24394b; animation: fadeIn; animation-duration: 0.5s;">View</button>
</div>
</div>
</div>
`;
function capitalized(string) {
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
}
/// Request collections from server
function fetchCollections(callback) {
var url = 'https://catalogue.destinationhome.live';
var xhr = new XMLHttpRequest();
xhr.open('POST', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
var response = JSON.parse(xhr.responseText);
var collections = response.data.collections;
callback(collections);
} else {
console.error('Request failed with status:', xhr.status);
}
}
};
var bodyData = JSON.stringify({
query: `{
collections {
uuid
author {
displayName
}
name
description
imageUrl
objects {
uuid
name
description
images { small }
legal { minimumAge }
type
bundle
}
}
}`
});
xhr.send(bodyData);
}
var result_save = "";
var results_loaded = 0;
var results_total = 0;
var loadingtime = 0;
var collections = undefined;
fetchCollections((collections) => {
this.collections = collections;
populateCollections();
});
document.getElementById('search-btn').addEventListener('click', function() {
if (document.getElementById('search-input').value.trim() === '') {
window.location.href = '/';
return;
}
var searchQuery = document.querySelector('.input').value;
fetchData(searchQuery);
});
function populateCollections() {
var collectionContainer = document.getElementById('collection-container');
collections.forEach(function(collection) {
var collectionCard = collectionCardsSkeleton
.replace('[COLLECTION_IMG]', collection.imageUrl)
.replace('[COLLECTION_NAME]', collection.name)
.replace('[COLLECTION_DESC]', collection.description)
.replace('[COLLECTION_ID]', collection.uuid)
.replace('[COLLECTION_ID2]', collection.uuid);
collectionContainer.innerHTML += collectionCard;
});
}
function loadCollection(collection) {
document.getElementById('search-container').innerHTML = '';
document.getElementById('search-input').value = 'Collection: ' + collection.name;
document.getElementById('featured-objects-title').style.display = 'none';
document.getElementById('collection-title-title').innerHTML = collection.name;
document.getElementById('collection-title-desc').innerHTML = collection.description;
document.getElementById('collection-title-container').style.display = 'block';
collection.objects.forEach(function(object) {
var thisUuid = object.uuid;
var thisImage = object.images.small.replace('[THUMBNAIL_ROOT]', '');
var thisImage = "https://raw.githubusercontent.com/DestinationHome/ImageArchive/master/" + thisUuid + "/" + thisImage;
var thisDescription = "No description available.";
if (object.description !== null) {
thisDescription = object.description.replace('[#Legal]', '');
thisDescription = thisDescription.replace(/\\n+/g, ' ');
}
if (thisDescription.length > 100) {
thisDescription = thisDescription.substring(0, 100) + "...";
}
var gender = "";
var gender_icon = "";
var itemClass = "";
// Non-requestable detection
var isBundle = object.bundle || object.type != "PREMIUM";
if (isBundle) itemClass = "isRewardCard";
var anim_ct = collection.objects.indexOf(object) + 1;
var resultHTML = resultSkeleton
.replace('[IMAGE_PLACEHOLDER]', thisImage)
.replace('[NAME_PLACEHOLDER]', object.name)
.replace('[UUID]', thisUuid)
.replace('[UUID2]', thisUuid)
.replace('[UUID3]', thisUuid)
.replace('[UUID4]', thisUuid)
.replace('[UUID5]', thisUuid)
.replace('[GENDER_ICON]', gender_icon)
.replace('[ITEM_CLASS]', 'isFeaturedItem')
.replace('[ITEM_TYPE]', capitalized(object.type))
.replace('[ITEM_TYPE_2]', itemClass)
.replace('[INIT_ANIM]', 'init-element-anim-'+anim_ct)
.replace('[HEADER_PLACEHOLDER]', '✨ Collection')
.replace('[DESC_PLACEHOLDER]', thisDescription);
document.getElementById('search-container').innerHTML += resultHTML;
setTimeout(removeImgLoading, 500, thisUuid);
}
);
}
function showCollection(uuid) {
var modals = document.getElementsByClassName('modal');
for (var i = 0; i < modals.length; i++) {
modals[i].classList.remove('is-active');
}
window.scrollTo({ top: 0, behavior: 'smooth' });
// Initial load -- we have to wait for them to load so everything has to run after
if (!this.collections) {
fetchCollections((collections) => {
this.collections = collections;
var collection = this.collections.find((collection) => collection.uuid === uuid);
loadCollection(collection);
return;
});
}
// Already loaded -- we can just load the collection
var collection = this.collections.find((collection) => collection.uuid === uuid);
loadCollection(collection);
}
function fetchFeatured() {
// Featured UUIDs to fetch
var featuredUUIDs = ["0922DEF5-DAE44FCE-9CBC3BEF-7DC3C68E",
"1F06C254-A7E64A30-B6D21BDC-AA465F64",
"72D7D4E6-93814E95-9E75EB00-1186F258",
"BC752DC6-D2044B83-A86C680E-B59B06EB",
"65FD7D8F-2E34450D-9FCC311D-55CAE107"];
featuredUUIDs.forEach(function(uuid) {
var url = 'https://catalogue.destinationhome.live';
var xhr = new XMLHttpRequest();
xhr.open('POST', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
var response = JSON.parse(xhr.responseText);
var searchResult = response.data.object;
var thisUuid = searchResult.uuid;
var thisImage = "";
if (searchResult.images !== null) {
thisImage = searchResult.images.small;
thisImage = thisImage.replace('[THUMBNAIL_ROOT]', '');
thisImage = "https://raw.githubusercontent.com/DestinationHome/ImageArchive/master/" + thisUuid + "/" + thisImage;
}
var thisDescription = "No description available.";
if (searchResult.description !== null) {
thisDescription = searchResult.description.replace('[#Legal]', '');
thisDescription = thisDescription.replace(/\\n+/g, ' ');
}
if (thisDescription.length > 100) {
thisDescription = thisDescription.substring(0, 100) + "...";
}
var gender = "";
var gender_icon = "";
var itemClass = "";
var isBundle = searchResult.bundle || searchResult.type != "PREMIUM";
if (isBundle) itemClass = "isRewardCard";
var anim_ct = featuredUUIDs.indexOf(uuid) + 1;
var resultHTML = resultSkeleton
.replace('[IMAGE_PLACEHOLDER]', thisImage)
.replace('[NAME_PLACEHOLDER]', searchResult.name)
.replace('[UUID]', thisUuid)
.replace('[UUID2]', thisUuid)
.replace('[UUID3]', thisUuid)
.replace('[UUID4]', thisUuid)
.replace('[UUID5]', thisUuid)
.replace('[GENDER_ICON]', gender_icon)
.replace('[ITEM_CLASS]', 'isFeaturedItem')
.replace('[ITEM_TYPE]', capitalized(searchResult.type))
.replace('[ITEM_TYPE_2]', itemClass)
.replace('[INIT_ANIM]', 'init-element-anim-'+anim_ct)
.replace('[HEADER_PLACEHOLDER]', '✨ Featured')
.replace('[DESC_PLACEHOLDER]', thisDescription);
document.getElementById('search-container').innerHTML += resultHTML;
setTimeout(removeImgLoading, 500, thisUuid);
console.log("UUID: " + thisUuid + " | Name: " + searchResult.name + " | Type: " + searchResult.type + " | Meta_Type: " + searchResult.metadata.type + "Meta_Genders: " + searchResult.metadata.genders);
} else {
console.error('Request failed with status:', xhr.status);
}
}
};
var bodyData = JSON.stringify({
query: `{ object(uuid:"${uuid}", locale:DEFAULT) { uuid type bundle name description images { small } metadata { type genders } } }`
});
xhr.send(bodyData);
});
}
function fetchData(searchQuery) {
document.getElementById('collection-title-container').style.display = 'none';
var url = 'https://catalogue.destinationhome.live';
var xhr = new XMLHttpRequest();
xhr.open('POST', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
document.getElementById('result-amount').style.display = 'block';
document.getElementById('search-container').innerHTML = '';
// hide no-result-text
document.getElementById('no-result-text').style.display = 'none';
// loop through the search results
var searchResults = JSON.parse(xhr.responseText).data.search;
// Rudimentary Filters Implementation
var filterCollection = [];
var filterTotal = 0;
var hideReward = false;
if (document.getElementById('filter-clothing').classList.contains('button-filter-a-sel')) {
filterCollection.push("CLOTHING");
filterTotal++;
}
if (document.getElementById('filter-furniture').classList.contains('button-filter-a-sel')) {
filterCollection.push("FURNITURE");
filterTotal++;
}
if (document.getElementById('filter-portable').classList.contains('button-filter-a-sel')) {
filterCollection.push("PORTABLE");
filterTotal++;
}
if (document.getElementById('filter-scene').classList.contains('button-filter-a-sel')) {
filterCollection.push("SCENE");
filterTotal++;
}
if (document.getElementById('filter-minigame').classList.contains('button-filter-a-sel')) {
filterCollection.push("MINIGAME");
filterTotal++;
}
if (document.getElementById('filter-other').classList.contains('button-filter-a-sel')) {
filterCollection.push("OTHER");
filterTotal++;
}
if (document.getElementById('filter-rewards').classList.contains('button-filter-a-sel')) {
hideReward = true;
}
var filterSearchResults = [];
if (filterTotal > 0) {
for (var i = 0; i < searchResults.length; i++) {
if (searchResults[i].metadata !== null && searchResults[i].metadata.type !== null) {
if (!filterCollection.includes(searchResults[i].metadata.type)) {
} else {
filterSearchResults.push(searchResults[i]);
}
}
}
searchResults = filterSearchResults;
}
if (hideReward) {
filterSearchResults = [];
for (var i = 0; i < searchResults.length; i++) {
console.log(searchResults[i].type);
if (searchResults[i].type != "REWARD") {
if (searchResults[i].name != null) {
if (searchResults[i].name.toLowerCase().includes("bundle") || searchResults[i].name.toLowerCase().includes("pack") || searchResults[i].name.toLowerCase().includes("set") || searchResults[i].name.toLowerCase().includes("collection")) {
} else {
filterSearchResults.push(searchResults[i]);
}
}
}
}
searchResults = filterSearchResults;
}
result_save = searchResults;
results_loaded = 0;
results_total = searchResults.length;
var totalResults = searchResults.length;
if (totalResults === 0) {
// show no-result-text
document.getElementById('no-result-text').style.display = 'block';
}
document.getElementById('result-amount').textContent = 'Total of ' + totalResults + ' results';
document.getElementById('loading-spinner').style.display = 'none';
document.getElementById('loading-text').style.display = 'none';
document.getElementById('loading-text').classList.remove('loading-text-anim');
if (!document.getElementById('loading-text').classList.contains('loading-text-color')) {
document.getElementById('loading-text').classList.add('loading-text-color');
}
// remove featured-objects-title
document.getElementById('featured-objects-title').style.display = 'none';
var itemsLoaded = 0;
for (var i = 0; itemsLoaded < 20; i++) {
if (i >= searchResults.length) {
break; // Prevents infinite loop if searchResults has less than 20 non-null items
}
results_loaded++;
itemsLoaded++;
var thisUuid = searchResults[i].uuid;
var thisImage = "";
if (searchResults[i].images !== null) {
thisImage = searchResults[i].images.small;
thisImage = thisImage.replace('[THUMBNAIL_ROOT]', '');
thisImage = "https://raw.githubusercontent.com/DestinationHome/ImageArchive/master/" + thisUuid + "/" + thisImage;
}
var thisDescription = "No description available.";
if (searchResults[i].description !== null) {
thisDescription = searchResults[i].description;
thisDescription = thisDescription.replace('[#Legal]', '');
thisDescription = thisDescription.replace(/\\n+/g, ' ');
}
if (thisDescription.length > 100) {
thisDescription = thisDescription.substring(0, 100) + "...";
}
var gender = "";
var gender_icon = "";
if (searchResults[i].metadata !== null) {
var metadata = searchResults[i].metadata;
if (metadata.genders && Array.isArray(metadata.genders)) {
gender = metadata.genders[0];
}
}
if (gender == "FEMALE") {
gender_icon = '<img src="resc/female.png" width="50px">';
}
if (gender == "MALE") {
gender_icon = '<img src="resc/male.png" width="50px">';
}
var itemClass = "";
var isBundle = searchResults[i].bundle || searchResults[i].type != "PREMIUM";
if (isBundle) itemClass = "isRewardCard";
var anim_ct = i + 1;
var resultIndex = result_save.findIndex(x => x.uuid === thisUuid) + 1;
var resultHTML = resultSkeleton
.replace('[IMAGE_PLACEHOLDER]', thisImage)
.replace('[NAME_PLACEHOLDER]', searchResults[i].name)
.replace('[UUID]', thisUuid)
.replace('[UUID2]', thisUuid)
.replace('[UUID3]', thisUuid)
.replace('[UUID4]', thisUuid)
.replace('[UUID5]', thisUuid)
.replace('[GENDER_ICON]', gender_icon)
.replace('[ITEM_CLASS]', itemClass)
.replace('[ITEM_TYPE]', capitalized(searchResults[i].type))
.replace('[ITEM_TYPE_2]', itemClass)
.replace('[INIT_ANIM]', 'init-element-anim-'+anim_ct)
.replace('[HEADER_PLACEHOLDER]', 'Result '+resultIndex)
.replace('[DESC_PLACEHOLDER]', thisDescription);
document.getElementById('search-container').innerHTML += resultHTML;
setTimeout(removeImgLoading, 500, thisUuid);
}
} else {
console.error('Request failed with status:', xhr.status);
}
}
};
var bodyData = JSON.stringify({
query: `{ search(query:"\\"${searchQuery}\\"", locale:DEFAULT) { uuid type bundle name description images { small } metadata { type genders } } }`
});
// show loading-spinner
document.getElementById('result-amount').style.display = 'none';
document.getElementById('loading-spinner').style.display = 'block';
if (!document.getElementById('loading-text').classList.contains('loading-text-color')) {
document.getElementById('loading-text').classList.add('loading-text-color');
}
var loadingText = ["Running through the mall...", "Loading a million results...", "Almost there! Almost...", "Searching. Really. Fast...", "😴...", "Searching as fast as we can...", "Waking up our database...", "Forcing Zeph to hurry...", "Assembling the results...", "Just a moment...", "Loading results...", "Almost there...", "Asking the database to hurry up...", "Exploring the depths of our database..."];