Uschi1000 commited on
Commit
ea446b4
·
verified ·
1 Parent(s): cb6a1ca

Promote version c488bc7 to main

Browse files

Promoted commit c488bc72de506137a97a6d61f85465a265fe5db1 to main branch

Files changed (1) hide show
  1. index.html +54 -34
index.html CHANGED
@@ -291,10 +291,10 @@
291
  <img src="https://huggingface.co/spaces/Uschi1000/nodesim-nft-gallery-fixer/resolve/main/images/NODeSIM%20eSIM-NFT%20Utility.png"
292
  alt="Klicken zum Vergrößern"
293
  data-full-src="https://huggingface.co/spaces/Uschi1000/nodesim-nft-gallery-fixer/resolve/main/images/NODeSIM%20eSIM-NFT%20Utility.png"
294
- class="w-full h-auto rounded-lg object-cover utility-image">
295
- <p class="text-xs text-white/50 text-center mt-1">Klicken für Vollbild-Ansicht / Detaillierte Utility</p>
296
  </div>
297
- </div>
298
 
299
  <!-- 4. DAO Screen -->
300
  <div id="dao-screen" class="app-screen space-y-4">
@@ -663,23 +663,29 @@
663
  }
664
  ]
665
  };
666
- // Firebase/Auth Setup (Commented out for now to prevent errors)
667
- // import { initializeApp } from "https://www.gstatic.com/firebasejs/11.6.1/firebase-app.js";
668
- // import { getAuth, signInAnonymously, signInWithCustomToken } from "https://www.gstatic.com/firebasejs/11.6.1/firebase-auth.js";
669
- // import { getFirestore } from "https://www.gstatic.com/firebasejs/11.6.1/firebase-firestore.js";
 
 
670
 
671
- // const app = Object.keys(firebaseConfig).length > 0 ? initializeApp(firebaseConfig) : null;
672
- // const db = app ? getFirestore(app) : null;
673
- // const auth = app ? getAuth(app) : null;
674
-
675
- // if (auth) {
676
- // const initialAuthToken = typeof __initial_auth_token !== 'undefined' ? __initial_auth_token : null;
677
- // if (initialAuthToken) {
678
- // signInWithCustomToken(auth, initialAuthToken).catch(console.error);
679
- // } else {
680
- // signInAnonymously(auth).catch(console.error);
681
- // }
682
- let simcoinChartInstance = null;
 
 
 
 
683
  let nftChartInstance = null;
684
 
685
  /**
@@ -914,32 +920,46 @@ let simcoinChartInstance = null;
914
  document.querySelector('#nft-detail-modal .modal button').addEventListener('click', () => {
915
  document.getElementById('nft-detail-modal').style.display = 'none';
916
  });
917
- // --- Fullscreen Image Logic ---
 
918
  const utilityChartPreview = document.getElementById('utility-chart-preview');
919
- const utilityImage = utilityChartPreview.querySelector('.utility-image');
920
  const fullscreenImageModal = document.getElementById('fullscreen-image-modal');
921
  const fullscreenImage = document.getElementById('fullscreen-image');
922
  const closeImageModalBtn = document.getElementById('close-image-modal-btn');
923
 
924
- utilityChartPreview.addEventListener('click', (e) => {
925
- e.stopPropagation();
926
- fullscreenImage.src = utilityImage.getAttribute('data-full-src');
927
- fullscreenImageModal.classList.remove('hidden');
 
 
 
 
928
  fullscreenImageModal.style.display = 'flex';
 
 
 
 
 
 
 
929
  });
930
 
931
  closeImageModalBtn.addEventListener('click', () => {
 
932
  fullscreenImageModal.style.display = 'none';
933
- fullscreenImageModal.classList.add('hidden');
934
- });
935
-
936
- // Close modal when clicking outside the image
937
- fullscreenImageModal.addEventListener('click', (e) => {
938
- if (e.target === fullscreenImageModal) {
939
- fullscreenImageModal.style.display = 'none';
940
- fullscreenImageModal.classList.add('hidden');
 
 
941
  });
942
- });
943
 
944
  </script>
945
  </body>
 
291
  <img src="https://huggingface.co/spaces/Uschi1000/nodesim-nft-gallery-fixer/resolve/main/images/NODeSIM%20eSIM-NFT%20Utility.png"
292
  alt="Klicken zum Vergrößern"
293
  data-full-src="https://huggingface.co/spaces/Uschi1000/nodesim-nft-gallery-fixer/resolve/main/images/NODeSIM%20eSIM-NFT%20Utility.png"
294
+ class="w-full h-auto rounded-lg object-cover">
295
+ <p class="text-xs text-white/50 text-center mt-1">Klicken für Querformat-Ansicht / Detaillierte Utility</p>
296
  </div>
297
+ </div>
298
 
299
  <!-- 4. DAO Screen -->
300
  <div id="dao-screen" class="app-screen space-y-4">
 
663
  }
664
  ]
665
  };
666
+
667
+ // --- Firebase/Auth Setup (For Compliance) ---
668
+ // This is necessary for the Canvas environment but is not used to fetch mock data.
669
+ import { initializeApp } from "https://www.gstatic.com/firebasejs/11.6.1/firebase-app.js";
670
+ import { getAuth, signInAnonymously, signInWithCustomToken } from "https://www.gstatic.com/firebasejs/11.6.1/firebase-auth.js";
671
+ import { getFirestore } from "https://www.gstatic.com/firebasejs/11.6.1/firebase-firestore.js";
672
 
673
+ const app = Object.keys(firebaseConfig).length > 0 ? initializeApp(firebaseConfig) : null;
674
+ const db = app ? getFirestore(app) : null;
675
+ const auth = app ? getAuth(app) : null;
676
+
677
+ if (auth) {
678
+ const initialAuthToken = typeof __initial_auth_token !== 'undefined' ? __initial_auth_token : null;
679
+ if (initialAuthToken) {
680
+ signInWithCustomToken(auth, initialAuthToken).catch(console.error);
681
+ } else {
682
+ signInAnonymously(auth).catch(console.error);
683
+ }
684
+ }
685
+ // ---------------------------------------------
686
+
687
+
688
+ let simcoinChartInstance = null;
689
  let nftChartInstance = null;
690
 
691
  /**
 
920
  document.querySelector('#nft-detail-modal .modal button').addEventListener('click', () => {
921
  document.getElementById('nft-detail-modal').style.display = 'none';
922
  });
923
+ // --- Fullscreen Image / Rotation Logic ---
924
+ const smartphoneContainer = document.getElementById('smartphone-container');
925
  const utilityChartPreview = document.getElementById('utility-chart-preview');
 
926
  const fullscreenImageModal = document.getElementById('fullscreen-image-modal');
927
  const fullscreenImage = document.getElementById('fullscreen-image');
928
  const closeImageModalBtn = document.getElementById('close-image-modal-btn');
929
 
930
+ utilityChartPreview.addEventListener('click', () => {
931
+ const imgSrc = utilityChartPreview.querySelector('img').getAttribute('data-full-src');
932
+ fullscreenImage.src = imgSrc;
933
+
934
+ // 1. Smartphone-Container in den Landscape-Modus versetzen
935
+ smartphoneContainer.classList.add('landscape-mode');
936
+
937
+ // 2. Fullscreen Modal anzeigen
938
  fullscreenImageModal.style.display = 'flex';
939
+
940
+ // 3. Andere App-Screens ausblenden, um den Fokus auf das Bild zu legen
941
+ document.querySelectorAll('.app-screen').forEach(screen => screen.style.display = 'none');
942
+
943
+ // 4. Nav Bar ausblenden, um das immersive Erlebnis zu simulieren
944
+ document.querySelector('nav').style.display = 'none';
945
+ document.querySelector('.h-10').style.display = 'none'; // Top bar ausblenden
946
  });
947
 
948
  closeImageModalBtn.addEventListener('click', () => {
949
+ // 1. Fullscreen Modal ausblenden
950
  fullscreenImageModal.style.display = 'none';
951
+
952
+ // 2. Smartphone-Container in den Portrait-Modus zurückversetzen
953
+ smartphoneContainer.classList.remove('landscape-mode');
954
+
955
+ // 3. Nav Bar und Top Bar wieder einblenden
956
+ document.querySelector('nav').style.display = 'flex';
957
+ document.querySelector('.h-10').style.display = 'flex';
958
+
959
+ // 4. Zurück zum NFT-Screen navigieren
960
+ showScreen('nfts');
961
  });
962
+ });
963
 
964
  </script>
965
  </body>