Update script.js
Browse files
script.js
CHANGED
@@ -640,15 +640,39 @@ function showInitialPreviewStateUI() {
|
|
640 |
|
641 |
const initialViewContainer = document.createElement('div');
|
642 |
initialViewContainer.id = 'initial-view-content';
|
643 |
-
// Added 'initial-view-animate' for entry animation, adjusted spacing
|
644 |
initialViewContainer.className = 'flex flex-col items-center justify-center text-slate-300 text-lg p-8 space-y-4 h-full initial-view-animate';
|
645 |
|
646 |
-
// Novita.AI Logo
|
647 |
-
const
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
|
653 |
// API Key Input Section
|
654 |
const apiKeySection = document.createElement('div');
|
|
|
640 |
|
641 |
const initialViewContainer = document.createElement('div');
|
642 |
initialViewContainer.id = 'initial-view-content';
|
|
|
643 |
initialViewContainer.className = 'flex flex-col items-center justify-center text-slate-300 text-lg p-8 space-y-4 h-full initial-view-animate';
|
644 |
|
645 |
+
// Novita.AI Logo Container
|
646 |
+
const logoContainer = document.createElement('div');
|
647 |
+
logoContainer.className = 'w-40 mb-2 novita-logo-container'; // Added class for potential specific styling
|
648 |
+
initialViewContainer.appendChild(logoContainer);
|
649 |
+
|
650 |
+
fetch('https://novita.ai/logo/logo.svg')
|
651 |
+
.then(response => {
|
652 |
+
if (!response.ok) {
|
653 |
+
throw new Error(`HTTP error! status: ${response.status}`);
|
654 |
+
}
|
655 |
+
return response.text();
|
656 |
+
})
|
657 |
+
.then(svgText => {
|
658 |
+
logoContainer.innerHTML = svgText;
|
659 |
+
const svgElement = logoContainer.querySelector('svg');
|
660 |
+
if (svgElement) {
|
661 |
+
svgElement.classList.add('novita-logo-svg-themed');
|
662 |
+
// Optionally set width/height directly if not handled by viewBox and container class
|
663 |
+
svgElement.setAttribute('width', '100%');
|
664 |
+
svgElement.setAttribute('height', '100%');
|
665 |
+
} else {
|
666 |
+
console.warn('SVG element not found after fetching Novita logo.');
|
667 |
+
// Fallback to img if SVG injection fails to find svg tag
|
668 |
+
logoContainer.innerHTML = '<img src="https://novita.ai/logo/logo.svg" alt="Novita.AI Logo" class="w-full h-full" />';
|
669 |
+
}
|
670 |
+
})
|
671 |
+
.catch(error => {
|
672 |
+
console.error('Error fetching Novita.AI logo:', error);
|
673 |
+
// Fallback: display the logo as a regular image if fetch fails (e.g., CORS issue)
|
674 |
+
logoContainer.innerHTML = '<img src="https://novita.ai/logo/logo.svg" alt="Novita.AI Logo" class="w-full h-full" />';
|
675 |
+
});
|
676 |
|
677 |
// API Key Input Section
|
678 |
const apiKeySection = document.createElement('div');
|