Geotoad commited on
Commit
8e8463c
·
verified ·
1 Parent(s): ea48cd1

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +58 -16
index.html CHANGED
@@ -369,6 +369,35 @@
369
  background-color: #d4a5a5;
370
  }
371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
  @media (max-width: 768px) {
373
  .container {
374
  padding: 1rem;
@@ -398,6 +427,13 @@
398
  width: 40px;
399
  height: 40px;
400
  }
 
 
 
 
 
 
 
401
  }
402
 
403
  @media (max-width: 480px) {
@@ -497,6 +533,11 @@
497
  </div>
498
  </div>
499
 
 
 
 
 
 
500
  <div class="toggle-labels" id="toggleLabels">
501
  <i class="fas fa-eye"></i>
502
  </div>
@@ -664,6 +705,7 @@
664
  const toggleLabelsBtn = document.getElementById('toggleLabels');
665
  const searchInput = document.getElementById('searchInput');
666
  const systemButtons = document.querySelectorAll('.controls .btn');
 
667
 
668
  // State
669
  let currentSystem = 'exterior';
@@ -684,11 +726,26 @@
684
 
685
  toggleLabelsBtn.addEventListener('click', toggleLabelsVisibility);
686
  searchInput.addEventListener('input', handleSearch);
 
687
 
688
  // Initialize with exterior view
689
  updateSystemView();
690
  }
691
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
692
  // Update the view based on selected system
693
  function updateSystemView() {
694
  // Update car image class
@@ -822,19 +879,4 @@
822
  }
823
 
824
  // Filter components
825
- document.querySelectorAll('.component-item').forEach(item => {
826
- const componentName = item.dataset.component.toLowerCase();
827
- if (componentName.includes(searchTerm)) {
828
- item.style.display = 'block';
829
- } else {
830
- item.style.display = 'none';
831
- }
832
- });
833
- }
834
-
835
- // Initialize the app when DOM is loaded
836
- document.addEventListener('DOMContentLoaded', init);
837
- </script>
838
- </body>
839
-
840
- </html>
 
369
  background-color: #d4a5a5;
370
  }
371
 
372
+ .new-tab-btn {
373
+ position: fixed;
374
+ bottom: 2rem;
375
+ left: 2rem;
376
+ background-color: var(--primary-color);
377
+ color: white;
378
+ padding: 0.8rem 1.5rem;
379
+ border: none;
380
+ border-radius: 50px;
381
+ cursor: pointer;
382
+ font-weight: 600;
383
+ transition: all 0.3s ease;
384
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
385
+ z-index: 100;
386
+ display: flex;
387
+ align-items: center;
388
+ gap: 0.5rem;
389
+ }
390
+
391
+ .new-tab-btn:hover {
392
+ background-color: var(--secondary-color);
393
+ transform: translateY(-2px);
394
+ box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
395
+ }
396
+
397
+ .new-tab-btn i {
398
+ font-size: 1rem;
399
+ }
400
+
401
  @media (max-width: 768px) {
402
  .container {
403
  padding: 1rem;
 
427
  width: 40px;
428
  height: 40px;
429
  }
430
+
431
+ .new-tab-btn {
432
+ bottom: 1rem;
433
+ left: 1rem;
434
+ padding: 0.6rem 1rem;
435
+ font-size: 0.9rem;
436
+ }
437
  }
438
 
439
  @media (max-width: 480px) {
 
533
  </div>
534
  </div>
535
 
536
+ <button class="new-tab-btn" id="newTabBtn">
537
+ <i class="fas fa-external-link-alt"></i>
538
+ Open in New Tab
539
+ </button>
540
+
541
  <div class="toggle-labels" id="toggleLabels">
542
  <i class="fas fa-eye"></i>
543
  </div>
 
705
  const toggleLabelsBtn = document.getElementById('toggleLabels');
706
  const searchInput = document.getElementById('searchInput');
707
  const systemButtons = document.querySelectorAll('.controls .btn');
708
+ const newTabBtn = document.getElementById('newTabBtn');
709
 
710
  // State
711
  let currentSystem = 'exterior';
 
726
 
727
  toggleLabelsBtn.addEventListener('click', toggleLabelsVisibility);
728
  searchInput.addEventListener('input', handleSearch);
729
+ newTabBtn.addEventListener('click', openInNewTab);
730
 
731
  // Initialize with exterior view
732
  updateSystemView();
733
  }
734
 
735
+ // Open in new tab functionality
736
+ function openInNewTab() {
737
+ // Get the current URL
738
+ const currentUrl = window.location.href;
739
+
740
+ // Open in new tab
741
+ window.open(currentUrl, '_blank');
742
+
743
+ // Alternative approach if the above doesn't work in some browsers
744
+ // const newWindow = window.open('', '_blank');
745
+ // newWindow.document.write(document.documentElement.outerHTML);
746
+ // newWindow.document.close();
747
+ }
748
+
749
  // Update the view based on selected system
750
  function updateSystemView() {
751
  // Update car image class
 
879
  }
880
 
881
  // Filter components
882
+ document.querySelectorAll('.component-item').forEach