Spaces:
Running
Running
Update index.html
Browse files- index.html +66 -16
index.html
CHANGED
@@ -3,24 +3,74 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>StreamAI -
|
7 |
|
8 |
-
<script>
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
<link rel="stylesheet" href="styles/main.css" onerror="alert('ERROR: Could not find main.css! Check path.');">
|
13 |
</head>
|
14 |
-
|
15 |
-
|
16 |
-
<
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
</script>
|
25 |
</body>
|
26 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>StreamAI - Personalized Streaming Recommendations</title>
|
7 |
|
8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
10 |
+
<link rel="stylesheet" href="styles/main.css">
|
|
|
|
|
11 |
</head>
|
12 |
+
<body class="bg-gray-100 font-sans">
|
13 |
+
|
14 |
+
<div id="debug-console" style="position: fixed; bottom: 0; left: 0; right: 0; height: 25%; background: rgba(0, 0, 0, 0.85); color: #fff; font-family: monospace; font-size: 14px; overflow-y: scroll; padding: 10px; z-index: 9999; border-top: 2px solid #ff5e62;">
|
15 |
+
<h3 style="margin: 0 0 10px; padding-bottom: 5px; border-bottom: 1px solid #444;">Debug Console</h3>
|
16 |
+
<div id="debug-log"></div>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<div id="notification" class="notification hidden">
|
20 |
+
</div>
|
21 |
+
<header class="gradient-bg text-white shadow-lg">
|
22 |
+
<div class="container mx-auto px-4 py-6">
|
23 |
+
<div class="flex justify-between items-center">
|
24 |
+
<div class="flex items-center space-x-3">
|
25 |
+
<i class="fas fa-stream text-3xl"></i>
|
26 |
+
<h1 class="text-2xl font-bold">StreamAI</h1>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
</div>
|
30 |
+
</header>
|
31 |
+
<section class="py-12 bg-white">
|
32 |
+
<div class="container mx-auto px-4">
|
33 |
+
<div class="max-w-4xl mx-auto bg-gray-50 rounded-xl shadow-lg overflow-hidden">
|
34 |
+
<div class="h-96 overflow-y-auto p-4 space-y-4" id="chat-messages"></div>
|
35 |
+
<div class="border-t border-gray-200 p-4 bg-white">
|
36 |
+
<input type="text" id="user-input" placeholder="Type your message..." class="flex-1 border border-gray-300 rounded-full py-3 px-4">
|
37 |
+
<button id="send-btn" class="ml-3 w-12 h-12 rounded-full bg-indigo-600 text-white">Send</button>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
</section>
|
42 |
+
<div class="production-button" id="production-button">
|
43 |
+
<i class="fas fa-video"></i>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
|
47 |
+
<script type="module">
|
48 |
+
// This code runs immediately. It defines our logger and then tries to load the main app.
|
49 |
+
const logContainer = document.getElementById('debug-log');
|
50 |
+
function logToScreen(message) {
|
51 |
+
if (logContainer) {
|
52 |
+
const div = document.createElement('div');
|
53 |
+
div.innerHTML = `> ${message}`;
|
54 |
+
logContainer.appendChild(div);
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
logToScreen("HTML loaded. Attempting to import app.js...");
|
59 |
+
|
60 |
+
try {
|
61 |
+
// We dynamically import the module. This allows us to catch any errors during the import process.
|
62 |
+
const app = await import('./scripts/app.js');
|
63 |
+
logToScreen("SUCCESS: app.js and all its dependencies were imported successfully.");
|
64 |
+
logToScreen("If buttons still don't work, the error is inside the init() functions.");
|
65 |
+
} catch (error) {
|
66 |
+
// If there's any error loading app.js OR any file it imports (chat.js, video.js, etc.)
|
67 |
+
// it will be caught here.
|
68 |
+
logToScreen("-----------------------------------------");
|
69 |
+
logToScreen("CRITICAL ERROR FAILED TO LOAD JAVASCRIPT:");
|
70 |
+
logToScreen(error.toString());
|
71 |
+
logToScreen("-----------------------------------------");
|
72 |
+
logToScreen("This error means a file is missing, misspelled in an 'import' statement, or has a syntax error.");
|
73 |
+
}
|
74 |
</script>
|
75 |
</body>
|
76 |
</html>
|