-
Notifications
You must be signed in to change notification settings - Fork 8
/
the-culture-repository.html
838 lines (741 loc) · 33.1 KB
/
the-culture-repository.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Culture Repository</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Google+Sans|Noto+Sans|Castoro">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎨</text></svg>">
<style>
body {
font-family: 'Google Sans', sans-serif;
background-color: #f4f4f9;
}
.hero {
background-color: #ffffff;
color: black;
padding: 20px;
}
.hero .title {
color: black;
}
.hero .subtitle {
color: #ff3860;
}
.author-block a {
color: #f68946;
font-weight: normal;
}
.organization a {
color: #3273dc;
font-weight: normal;
}
.node {
background-color: #ffffff;
border-radius: 8px;
padding: 10px 20px;
margin: 10px;
display: inline-block;
cursor: pointer;
transition: background-color 0.3s, transform 0.3s;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.node:hover {
background-color: #e8e8e8;
transform: translateY(-2px);
}
.node.active {
background-color: #3273dc;
color: white;
}
.window {
margin: 20px 0;
text-align: center;
display: flex;
justify-content: center;
overflow-x: auto;
}
.window>div {
display: flex;
flex-wrap: nowrap;
justify-content: center;
}
#explore-dataset,
#explore-categories {
margin-top: 20px;
display: none;
background-color: #f68946;
border-color: #f68946;
}
.example-node {
margin-left: 20px;
}
.country-node {
margin-left: 40px;
}
.image-gallery {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
margin-top: 20px;
}
.image-gallery img {
max-width: 100%;
height: auto;
object-fit: contain;
max-height: 200px;
}
.compare-container {
border: 1px solid #ddd;
border-radius: 8px;
padding: 20px;
margin: 20px 10px;
height: 100%;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
/* border-radius: 30px; */
}
.compare-container h3 {
margin-bottom: 20px;
}
.image-gallery .placeholder {
margin: 5px;
border: 1px solid #ddd;
border-radius: 4px;
padding: 5px;
width: 150px;
height: 150px;
display: inline-block;
background-color: #f0f0f0;
text-align: center;
line-height: 150px;
color: #bbb;
font-size: 14px;
}
.level {
margin-bottom: 30px;
}
.collaborators-text {
background-color: #f9f9f9;
border-left: 4px solid #3273dc;
padding: 10px 15px;
margin: 20px 0;
color: #0d47a1;
border-radius: 8px;
}
.collaborators-text h2 {
margin-top: 0;
}
.citation {
background-color: #f9f9f9;
border: 1px solid #ddd;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
}
.citation h2 {
margin-top: 0;
}
.citation pre {
margin: 0;
white-space: pre-wrap;
word-wrap: break-word;
}
.country-section {
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
margin-top: 20px;
}
.country-section .image-gallery {
flex: 1;
}
.country-section .country-examples {
flex: 1;
list-style-type: disc;
padding-left: 20px;
margin: 0;
}
#suggest-changes-container {
margin-top: 20px;
display: none;
text-align: center;
}
#suggest-form {
margin-top: 20px;
display: none;
text-align: left;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 30px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.form-group {
margin-bottom: 20px;
}
.suggestion-heading {
font-weight: bold;
display: block;
margin-bottom: 15px;
font-size: 18px;
}
.checkbox-group {
display: flex;
flex-direction: column;
gap: 10px;
}
.checkbox-item {
display: flex;
align-items: center;
}
.checkbox-item input[type="checkbox"] {
margin-right: 10px;
}
.additional-input {
margin-top: 10px;
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease-out;
}
.additional-input.show {
max-height: 100px;
}
.form-group input[type="text"],
.form-group textarea {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.form-group textarea {
height: 100px;
resize: vertical;
}
.form-group button {
background-color: #3273dc;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s;
}
.form-group button:hover {
background-color: #2258a8;
}
</style>
</head>
<body>
<header class="header", style="background-color:#ff0202; height: 50px; width: 100%; position: fixed; top: 0; z-index: 1000;">
<nav class="navbar", role="navigation", aria-label="main navigation", style="background-color:#ff0202;", align="center">
<a href="./index.html" class="navbar-item" style="font-weight: bold; text-decoration: none;background-color:transparent;" align="center">
<img src="https://cdn-icons-png.flaticon.com/512/954/954591.png" alt="Behavior in the Wild" style="width:20px;height:20px;margin-right:5px;"><b style="color:white;font-weight:bold;height:20px;font-size: 20px;">Behavior in the Wild</b>
</a>
</nav>
</header>
<section class="hero">
<div class="hero-body">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column has-text-centered">
<h1 class="title is-1 publication-title">
<span class="is-size-2"><span class="is-size-1">The Culture Repository</span></span>
</h1>
<div class="is-size-5 publication-authors">
<span class="author-block">
<a href="https://www.linkedin.com/in/ritika-jha-000b71194/" target="_blank">Ritika Jha<sup>*1</sup></a>,
</span>
<span class="author-block">
<a href="https://www.linkedin.com/in/anikethg/" target="_blank">Aniketh Garikaparthi<sup>*1</sup></a>,
</span>
<span class="author-block">
<a href="https://www.linkedin.com/in/aanisha-bhattacharyya/" target="_blank">Aanisha Bhattacharyya<sup>*2</sup></a>,
</span>
<span class="author-block">
<a href="https://sites.google.com/view/yaman-kumar/" target="_blank">Yaman Kumar<sup>*1,2</sup></a></a>
</span>
</div>
<div class="is-size-5 publication-authors">
<span class="organization">
<b style="color:#f68946; font-weight:normal">▶ </b><a href="https://www.iiitd.ac.in/" target="_blank"><sup>1 </sup>IIIT Delhi</a>,
<b style="color:#f68946; font-weight:normal">▶ </b><a href="https://main--dx-portal--adobe.hlx.page/researchers/about" target="_blank"><sup>2 </sup>Adobe, Media and Data Science Research (MDSR) Lab</a>
</span>
</div>
<div class="is-size-6 publication-authors">
<span class="author-block"><sup>*</sup>Equal Contribution</span>
</div>
<p>Get in touch with us at <a href="mailto:behavior-in-the-wild@googlegroups.com">behavior-in-the-wild@googlegroups.com</a></p>
<div class="collaborators-text">
<h2>Looking for Contributors!</h2>
<p>If you want to submit your unique videos, corrections, or vocabulary expansions, please contribute directly to our <a href="mailto:behavior-in-the-wild@googlegroups.com">Google Group</a> or raise a Pull Request on our <a href="https://github.com/behavior-in-the-wild/cultural-repository" target="_blank">GitHub</a> repository.</p>
</div>
<div class="column has-text-centered">
<div class="publication-links">
<span class="link-block">
<a href="https://github.com/behavior-in-the-wild/cultural-repository" target="_blank" class="external-link button is-normal is-rounded is-dark">
<span class="icon"><i class="fab fa-github"></i></span>
<span>GitHub</span>
</a>
</span>
<span class="link-block">
<a href="mailto:behavior-in-the-wild@googlegroups.com" class="button is-normal is-rounded is-dark">
<span class="icon"><i class="fas fa-users"></i></span>
<span>Google Group</span>
</a>
</span>
<span class="link-block">
<a href="https://drive.google.com/drive/folders/1mQFCZtDWeV-H3TdqObF3QoBDKR8KIc_a?usp=drive_link" target="_blank" class="external-link button is-normal is-rounded is-dark" id="dataset-link">
<span class="icon"><i class="fas fa-database"></i></span>
<span>Dataset</span>
</a>
</span>
</div>
</div>
<div id="category-container" class="window level">
<div></div>
</div>
<div id="subcategory-container" class="window level">
<div></div>
</div>
<div id="subsubcategory-container" class="window level">
<div></div>
</div>
<div id="explore-culture-container" class="has-text-centered" style="display: none; margin-top: 20px;">
<button id="explore-culture-button" class="button is-primary">Explore Culture</button>
</div>
<div class="columns is-centered" style="margin-top: 20px;">
<div class="column compare-container" id="country-selection-container" style="display: none;">
<h3>Select Country</h3>
<div id="country-selection" class="window level">
<div></div>
</div>
<div id="image-gallery" class="image-gallery"></div>
</div>
</div>
<div id="suggest-changes-container">
<button id="suggest-changes-button" class="button is-normal is-rounded">Suggest Changes</button>
</div>
<div id="suggest-form">
<div class="form-group">
<label class="suggestion-heading">Reason for Suggestion</label>
<div class="checkbox-group">
<div class="checkbox-item">
<input type="checkbox" id="inappropriate" value="Inappropriate annotation">
<label for="inappropriate">Inappropriate annotation</label>
</div>
<div class="checkbox-item">
<input type="checkbox" id="irrelevant" value="Irrelevant content">
<label for="irrelevant">Irrelevant content</label>
</div>
<div class="checkbox-item">
<input type="checkbox" id="wrong-country" value="Wrong country">
<label for="wrong-country">Wrong country</label>
</div>
<div class="additional-input" id="correct-country-input">
<input type="text" id="correct-country" placeholder="Enter correct country">
</div>
<div class="checkbox-item">
<input type="checkbox" id="mislabelled" value="Mislabelled">
<label for="mislabelled">Mislabelled</label>
</div>
<div class="checkbox-item">
<input type="checkbox" id="missing-details" value="Missing details">
<label for="missing-details">Missing details</label>
</div>
<div class="checkbox-item">
<input type="checkbox" id="other" value="Other">
<label for="other">Other</label>
</div>
<div class="additional-input" id="other-reason-input">
<input type="text" id="other-reason" placeholder="Specify other reason">
</div>
</div>
</div>
<div class="form-group">
<label for="additional-explanation" class="suggestion-heading">Additional Explanation</label>
<textarea id="additional-explanation" placeholder="Provide additional explanation"></textarea>
</div>
<div class="form-group">
<button id="submit-suggestion-button">Submit Suggestion</button>
</div>
<!-- Hidden Fields -->
<input type="hidden" id="video-link" value="https://youtube.com">
<input type="hidden" id="category">
<input type="hidden" id="subcategory">
<input type="hidden" id="subsubcategory">
<input type="hidden" id="country">
</div>
</div>
</div>
</div>
</div>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/js/all.min.js"></script>
<script>
const schema = {
"Regular Practices": {
"Language and Communication": [
"Idioms, slang, and common phrases",
"Gestures and Body language"
],
"Food and Dining": [
"Cuisine and Traditional dishes",
"Cooking methods",
"Dining etiquettes",
"Kitchen Design",
"Cutlery"
],
"Clothing and Fashion": [
"Traditional clothing",
"Dress codes for different occasions",
"Hair and Beard types",
"Accessories and Jewelleries"
],
"Home Design and Decoration": {
"Exterior Styles": [
"Roof design",
"Entrance"
],
"Functional Elements": [],
"Interior Design": [
"Furniture Styles",
"Antique or vintage pieces",
"Wall coverings"
]
},
"Celebrations": [
"Festival",
"Ceremonies such as birth/wedding",
"Decorations"
],
"Religion and Spirituality": [
"Religious practices",
"Religious icons",
"Places of worship/Religious buildings",
"Mythical creatures or heroes"
]
},
"Creative Expressions": {
"Art and Music": [
"Traditional and contemporary music",
"Visual arts (painting)",
"Murals, graffiti, sculptures",
"Performing arts, such as dance and theater"
],
"Entertainment and Leisure": [
"Popular sports",
"Recreational activities",
"Movies/Shows/Books",
"Hobbies"
]
},
"Social Structure": {
"Family and Society": [
"Parenting Styles",
"Family roles and responsibilities"
],
"Legends or Inspirational people": [],
"Education and Work": [
"Work ethics",
"Type of work/employment",
"Educational system",
"Attitude towards hierarchy"
]
},
"Environment and Public Life": {
"Public Spaces": [
"Urban design",
"Architecture and Buildings",
"Historic Monuments and Statues",
"Transportation"
],
"Natural Environment": [
"Vegetation / Plants/ Trees",
"Animals and Wildlife",
"Agricultural Elements",
"Sacred Plants and Animal"
],
"Signage, Symbols and Flags": [
"Script",
"Multilingual signs",
"National emblems",
"Flags",
"National color schemes"
]
}
};
const countries = ["India", "China", "USA", "Brazil", "Nigeria", "France", "Japan"];
let currentPath = [];
let preselectedValues = {
category: null,
subcategory: null,
subsubcategory: null,
country: null
};
function createNode(name, containerId, level, parentNode) {
const node = document.createElement('div');
node.className = 'node';
node.textContent = name;
node.addEventListener('click', function () {
handleNodeClick(name, containerId, level, this, parentNode, false);
});
document.getElementById(containerId).querySelector('div').appendChild(node);
}
function handleNodeClick(name, containerId, level, element, parentNode, isPreselect = false) {
$(element).addClass('active').siblings().removeClass('active');
const containers = ['category-container', 'subcategory-container', 'subsubcategory-container', 'country-container', 'country-selection'];
let currentIndex = containers.indexOf(containerId);
if (currentIndex === -1) {
if (containerId === 'country-selection') {
currentIndex = containers.indexOf('country-container');
}
}
if (!isPreselect) {
for (let i = currentIndex + 1; i < containers.length - 1; i++) {
$(`#${containers[i]} > div`).empty();
}
$('#image-gallery').empty();
}
if (containerId !== 'country-selection') {
updateCurrentPath(name, currentIndex);
}
let currentSchema = schema;
for (let i = 0; i < currentPath.length; i++) {
if (currentSchema && typeof currentSchema === 'object' && !Array.isArray(currentSchema) && currentSchema[currentPath[i]]) {
currentSchema = currentSchema[currentPath[i]];
} else {
currentSchema = undefined;
break;
}
}
if (currentSchema === undefined) {
if (level.startsWith('subcategory')) {
showExploreButton();
}
return;
}
if (typeof currentSchema === 'object' && !Array.isArray(currentSchema)) {
for (const subcategory in currentSchema) {
createNode(subcategory, containers[currentIndex + 1], `subcategory-${currentIndex + 1}`, name);
}
} else if (Array.isArray(currentSchema)) {
if (currentSchema.length === 0) {
showExploreButton();
} else {
for (const item of currentSchema) {
createNode(item, containers[currentIndex + 1], `subcategory-${currentIndex + 1}`, name);
}
}
} else if (level.startsWith('subcategory')) {
showExploreButton();
}
storeSelectedValues();
}
function updateCurrentPath(name, index) {
currentPath = currentPath.slice(0, index);
currentPath.push(name);
}
function showExploreButton() {
$('#explore-culture-container').show();
}
function storeSelectedValues() {
preselectedValues.category = currentPath[0] || null;
preselectedValues.subcategory = currentPath[1] || null;
preselectedValues.subsubcategory = currentPath[2] || null;
preselectedValues.country = $('#country-selection .node.active').text() || null;
}
function populateFields() {
if (preselectedValues.category) {
handleNodeClick(preselectedValues.category, 'category-container', 'category', null, true);
}
if (preselectedValues.subcategory) {
handleNodeClick(preselectedValues.subcategory, 'subcategory-container', 'subcategory-0', null, true);
}
if (preselectedValues.subsubcategory) {
handleNodeClick(preselectedValues.subsubcategory, 'subsubcategory-container', 'subcategory-1', null, true);
}
if (preselectedValues.country) {
$('#country-selection .node').each(function () {
if ($(this).text() === preselectedValues.country) {
$(this).addClass('active');
}
});
showSampleImages(currentPath.concat(preselectedValues.country));
$('#suggest-changes-container').show();
}
}
let jsonData;
$(document).ready(function () {
const isLocal = window.location.protocol === 'file:';
loadJSONData();
$('#explore-culture-button').click(function () {
$('#country-selection-container').show();
if ($('#country-selection .node').length === 0) {
showCountries('country-selection');
}
});
$(document).on('click', '#country-selection .node', function () {
$(this).addClass('active').siblings().removeClass('active');
const countryName = $(this).text();
showSampleImages(currentPath.concat(countryName));
$('#suggest-changes-container').show();
});
$('#suggest-changes-button').click(function () {
openSuggestChangesForm();
});
$('#submit-suggestion-button').click(function () {
submitSuggestion();
});
$('#wrong-country').change(function() {
toggleAdditionalInput(this, '#correct-country-input');
});
$('#other').change(function() {
toggleAdditionalInput(this, '#other-reason-input');
});
populateFields();
});
function toggleAdditionalInput(checkbox, inputId) {
if ($(checkbox).is(':checked')) {
$(inputId).addClass('show');
} else {
$(inputId).removeClass('show');
}
}
function loadJSONData() {
$.getJSON('cultural-repository/culture_data/inverted_result_12v.json', function (data) {
jsonData = data;
initializePage();
}).fail(function () {
console.log('Failed to load JSON data');
});
}
function showCountries(containerId) {
for (const country of countries) {
createNode(country, containerId, 'country');
}
}
function showSampleImages(path) {
const $container = $('#image-gallery');
$container.empty().show();
const selectedCountry = path[path.length - 1].toLowerCase();
const selectedCategory = currentPath[currentPath.length - 1];
let companyCountryKey = null;
for (const key in jsonData[selectedCategory]) {
if (key.endsWith(`-${selectedCountry}`)) {
companyCountryKey = key;
break;
}
}
if (companyCountryKey && jsonData[selectedCategory][companyCountryKey]) {
const images = jsonData[selectedCategory][companyCountryKey];
const imageKeys = Object.keys(images).slice(0, 5);
if (imageKeys.length > 0) {
imageKeys.forEach(imageKey => {
const imgElement = $('<img>').attr('src', `cultural-repository/culture_data/frames/${companyCountryKey}/${imageKey}.jpg`).attr('alt', 'Sample Image');
const textElement = $('<div>').text(images[imageKey]);
const containerElement = $('<div>').append(imgElement).append(textElement);
$container.append(containerElement);
});
} else {
displayPlaceholderImages($container);
}
} else {
displayPlaceholderImages($container);
}
}
function displayPlaceholderImages($container) {
for (let i = 0; i < 3; i++) {
const placeholder = $('<div>').addClass('placeholder').text('No Image');
$container.append(placeholder);
}
}
function openSuggestChangesForm() {
const currentCategory = currentPath[0] || '';
const currentSubcategory = currentPath[1] || '';
const currentSubsubcategory = currentPath[2] || '';
const selectedCountry = $('#country-selection .node.active').text() || '';
$('#category').val(currentCategory);
$('#subcategory').val(currentSubcategory);
$('#subsubcategory').val(currentSubsubcategory);
$('#country').val(selectedCountry);
const selectedOptionsText = `Selected Options: ${currentCategory} -> ${currentSubcategory} -> ${currentSubsubcategory} -> ${selectedCountry}`;
$('#additional-explanation').val(selectedOptionsText);
$('#suggest-form').fadeIn(300);
}
function submitSuggestion() {
const videoLink = $('#video-link').val();
const category = $('#category').val();
const subcategory = $('#subcategory').val();
const subsubcategory = $('#subsubcategory').val();
const country = $('#country').val();
const reasons = [];
$('.checkbox-item input[type="checkbox"]:checked').each(function() {
let reason = $(this).val();
if (reason === "Wrong country") {
reason += ` (Correct country: ${$('#correct-country').val()})`;
} else if (reason === "Other") {
reason += ` (Reason: ${$('#other-reason').val()})`;
}
reasons.push(reason);
});
const additionalExplanation = $('#additional-explanation').val();
const issueTitle = `Suggestion for ${category} - ${subcategory} - ${subsubcategory} (${country})`;
const issueBody = `
**Video Link:** ${videoLink}
**Category:** ${category}
**Subcategory:** ${subcategory}
**Subsubcategory:** ${subsubcategory}
**Country:** ${country}
**Reason for Suggestion:**
${reasons.map(reason => `- [ ] ${reason}`).join('\n')}
**Additional Explanation:**
${additionalExplanation}
`;
const issueUrl = `https://github.com/behavior-in-the-wild/cultural-repository/issues/new?title=${encodeURIComponent(issueTitle)}&body=${encodeURIComponent(issueBody)}`;
window.open(issueUrl, '_blank');
// Reset form after submission
$('#suggest-form')[0].reset();
$('.additional-input').removeClass('show');
$('#suggest-form').fadeOut(300);
}
function initializePage() {
for (const category in schema) {
createNode(category, 'category-container', 'category');
}
const regularPracticesNode = $('#category-container .node:contains("Regular Practices")')[0];
handleNodeClick('Regular Practices', 'category-container', 'category', regularPracticesNode, null, true);
setTimeout(() => {
const languageNode = $('#subcategory-container .node:contains("Language and Communication")')[0];
handleNodeClick('Language and Communication', 'subcategory-container', 'subcategory-1', languageNode, 'Regular Practices', true);
setTimeout(() => {
const gesturesNode = $('#subsubcategory-container .node:contains("Gestures and Body language")')[0];
handleNodeClick('Gestures and Body language', 'subsubcategory-container', 'subcategory-2', gesturesNode, 'Language and Communication', true);
}, 300);
}, 300);
}
</script>
<section class="citation">
<div class="container">
<h2>BibTex</h2>
<pre>
@online{jha2024culture,
author = {Jha, Ritika and Garikaparthi, Aniketh and Bhattacharyya, Aanisha and Kumar, Yaman},
title = {The Culture Repository},
year = {2024},
url = {https://behavior-in-the-wild.github.io/the-culture-repository.html}
}
</pre>
</div>
</section>
</body>
</html>