-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathai.html
More file actions
207 lines (185 loc) · 9.03 KB
/
Copy pathai.html
File metadata and controls
207 lines (185 loc) · 9.03 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ==== Core meta ==== -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="360 AI – a Claude‑powered conversational assistant. Upload files, paste images, write code, and explore the web.">
<meta name="theme-color" content="#3b82f6">
<!-- ==== Open Graph / Twitter ==== -->
<meta property="og:title" content="360 AI">
<meta property="og:description" content="Ask anything, paste images, upload files, write code. Powered by Claude Opus on OpenRouter.">
<meta property="og:image" content="/favicon-32x32.png">
<meta property="og:url" content="https://yourdomain.com/">
<meta name="twitter:card" content="summary_large_image">
<title>360 AI</title>
<!-- ==== Favicons & Manifest ==== -->
<link rel="icon" type="image/png" href="/favicon-32x32.png">
<link rel="manifest" href="/manifest.json">
<!-- ==== Styles (critical + async) ==== -->
<link rel="preload" href="/assets/css/main.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="/assets/css/ai.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/assets/css/main.css">
<link rel="stylesheet" href="/assets/css/ai.css">
</noscript>
<!-- Highlight.js dark theme – load async to avoid blocking -->
<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
</noscript>
<!-- ==== Third‑party libraries (deferred) ==== -->
<script defer src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script defer src="https://www.googletagmanager.com/gtag/js?id=G-SCZB3M2PNX"></script>
<!-- ==== Google Analytics (deferred, with CSP‑compatible wrapper) ==== -->
<script defer>
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-SCZB3M2PNX');
</script>
<!-- ==== Google Tag Manager (corrected) ==== -->
<script defer>
(function(w,d,s,l,i){
w[l]=w[l]||[];
w[l].push({'gtm.start': new Date().getTime(), event:'gtm.js'});
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s);
j.async = true;
j.src = i;
f.parentNode.insertBefore(j,f);
})(window, document, 'script', 'dataLayer', '/uw4z/');
</script>
<!-- ==== Content Security Policy (inline‑friendly) ==== -->
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://www.googletagmanager.com 'unsafe-inline'; style-src 'self' https://cdnjs.cloudflare.com 'unsafe-inline'; img-src 'self' data:; connect-src 'self' https://*.supabase.co; font-src 'self';">
</head>
<body class="dark">
<!-- ==== UI structure (semantic tags) ==== -->
<header class="auth-top-right" aria-label="Authentication controls">
<button id="signInBtn" class="auth-btn" aria-label="Sign In">Sign In</button>
<button id="signUpBtn" class="auth-btn" aria-label="Sign Up">Sign Up</button>
<button id="signOutBtn" class="auth-btn" aria-label="Sign Out" hidden>Sign Out</button>
</header>
<button class="sidebar-toggle" id="sidebarToggle" aria-controls="sidebar" aria-expanded="false">☰ Menu</button>
<nav class="sidebar" id="sidebar" aria-label="Chat navigation">
<span id="sidebar-slot"></span>
</nav>
<div class="overlay" id="overlay" hidden></div>
<!-- Settings panel – use <dialog> for native focus trap -->
<dialog class="settings-panel" id="settingsPanel" aria-labelledby="settingsTitle">
<h3 id="settingsTitle">Appearance</h3>
<!-- … (rest of settings unchanged, just add aria‑labels where needed) -->
</dialog>
<!-- Authentication modal – also a <dialog> -->
<dialog id="auth-popup" class="auth-popup hidden" aria-labelledby="authTitle">
<div class="auth-box">
<h2 id="authTitle">Account</h2>
<label for="auth-email">Email</label>
<input id="auth-email" type="email" placeholder="Email" autocomplete="email">
<label for="auth-password">Password</label>
<input id="auth-password" type="password" placeholder="Password" autocomplete="current-password">
<button id="auth-login-btn">Log In</button>
<button id="auth-signup-btn">Sign Up</button>
<!-- OAuth buttons keep their SVGs, just add aria‑label -->
<button id="github-login" class="oauth-btn github" aria-label="Sign in with GitHub">
<!-- SVG omitted for brevity -->
<span>Sign in with GitHub</span>
</button>
<button id="google-login" class="oauth-btn google" aria-label="Sign in with Google">
<!-- SVG omitted for brevity -->
<span>Sign in with Google</span>
</button>
<p id="auth-error" class="auth-error" role="alert"></p>
<button id="auth-close-btn" class="close-btn" aria-label="Close">Close</button>
</div>
</dialog>
<main class="ai-shell">
<!-- Sidebar (chat list) -->
<aside id="ai-sidebar" aria-label="Conversation list">
<div class="sb-head">
<span class="sb-logo" aria-hidden="true">
<!-- SVG omitted -->
Chats
</span>
<button id="new-chat-btn" aria-label="Start a new chat">
<!-- SVG omitted -->
New
</button>
</div>
<div id="conv-list"></div>
</aside>
<!-- Main chat column -->
<section class="ai-main" id="ai-main" aria-label="Chat window">
<header class="ai-topbar">
<div class="ai-topbar-side ai-topbar-left">
<button id="ai-chat-sidebar-toggle" class="icon-btn"
title="Toggle chat history"
aria-controls="ai-sidebar"
aria-expanded="true">
<!-- SVG omitted -->
</button>
</div>
<div class="ai-brand">
<span class="ai-brand-mark" aria-hidden="true">
<!-- SVG omitted -->
</span>
<span class="ai-brand-text">360 AI</span>
</div>
<div class="ai-topbar-side ai-topbar-right">
<a href="/apps" class="ai-topbar-link">Apps</a>
</div>
</header>
<section class="ai-conv-title-bar" id="conv-title-bar">
<input id="conv-title-input" class="conv-title-input" placeholder="Untitled chat"
maxlength="80" aria-label="Chat title">
<svg class="conv-title-pencil" aria-hidden="true" …></svg>
</section>
<section id="ai-output" aria-live="polite">
<!-- Welcome screen (unchanged) -->
<div id="ai-welcome">
<!-- … -->
</div>
</section>
<form class="ai-input-area" id="ai-input-form" novalidate>
<div id="file-preview" hidden>
<div id="fp-thumb"></div>
<span id="fp-name"></span>
<button id="fp-cancel" type="button" title="Remove attachment" aria-label="Remove attachment">
<!-- SVG omitted -->
</button>
</div>
<div class="ai-input-row">
<textarea id="ai-input" rows="1" placeholder="Ask anything…" aria-label="Message input"></textarea>
<div class="ai-input-btns">
<button id="ai-attach-btn" type="button" title="Attach file or image" aria-label="Attach file">
<!-- SVG omitted -->
</button>
<button id="ai-send-btn" type="submit" title="Send (Enter)" aria-label="Send message">
<!-- SVG omitted -->
</button>
</div>
</div>
<div class="ai-input-hint">Enter to send · Shift+Enter for new line · Paste image with Ctrl+V</div>
</form>
</section>
</main>
<!-- Hidden file input (keep it outside of forms) -->
<input type="file" id="ai-file-input" accept="*/*" style="display:none">
<!-- ==== App scripts – load as modules for better scope control ==== -->
<script type="module" src="/assets/js/main.js"></script>
<script type="module" src="/assets/js/auth-fix.js"></script>
<script type="module" src="/assets/js/wide.js"></script>
<script type="module" src="/assets/js/gallium.js"></script>
<script type="module" src="/assets/js/cookie.js"></script>
<script type="module" src="/assets/js/cursor.js"></script>
<script type="module" src="/assets/js/ai.js"></script>
<!-- Cloudflare beacon (deferred, CSP‑compatible) -->
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496"
integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ=="
data-cf-beacon='{"version":"2024.11.0","token":"ff0a2d9a55154fa7bec0287a68d6f56f","r":1}'
crossorigin="anonymous"></script>
</body>
</html>