Update templates/index.html
Browse files- templates/index.html +163 -98
templates/index.html
CHANGED
|
@@ -5,12 +5,9 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
| 6 |
<title>ORBIT – Educational Research Assistant</title>
|
| 7 |
<link rel="icon" type="image/png" href="/static/icon.png" />
|
| 8 |
-
<meta name="description" content="ORBIT AI-powered educational research assistant." />
|
| 9 |
-
|
| 10 |
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 11 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 12 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
|
| 13 |
-
|
| 14 |
<link rel="manifest" href="/manifest.json">
|
| 15 |
<meta name="theme-color" content="#2563eb">
|
| 16 |
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
@@ -19,151 +16,219 @@
|
|
| 19 |
|
| 20 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 21 |
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
| 22 |
-
|
| 23 |
<script>
|
| 24 |
tailwind.config = {
|
| 25 |
-
theme: {
|
| 26 |
-
extend: { fontFamily: { sans: ['Inter', 'sans-serif'] }, colors: { accent: { DEFAULT: '#1a73e8', hover: '#1557b0', light: '#e8f0fe' } } },
|
| 27 |
-
},
|
| 28 |
};
|
| 29 |
</script>
|
| 30 |
<style>
|
| 31 |
* { box-sizing: border-box; }
|
| 32 |
body { font-family: 'Inter', sans-serif; }
|
| 33 |
-
::-webkit-scrollbar { width: 5px; }
|
| 34 |
::-webkit-scrollbar-track { background: transparent; }
|
| 35 |
-
::-webkit-scrollbar-thumb { background: #
|
| 36 |
-
#chat-textarea { resize: none; min-height: 24px; max-height:
|
| 37 |
-
.
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
.
|
| 41 |
-
.typing-dot:nth-child(2) { animation-delay: .2s; }
|
| 42 |
-
.typing-dot:nth-child(3) { animation-delay: .4s; }
|
| 43 |
-
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
|
| 44 |
-
.modal-back { animation: fadeIn .18s ease; }
|
| 45 |
-
.modal-box { animation: scaleIn .22s cubic-bezier(.34, 1.56, .64, 1); }
|
| 46 |
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
| 47 |
@keyframes scaleIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
|
| 48 |
-
|
| 49 |
-
.prose-orbit
|
| 50 |
-
.prose-orbit
|
| 51 |
-
.prose-orbit
|
| 52 |
-
.prose-orbit
|
| 53 |
-
.prose-orbit
|
| 54 |
-
.prose-orbit
|
| 55 |
-
.prose-orbit
|
| 56 |
-
.prose-orbit
|
| 57 |
-
.prose-orbit
|
| 58 |
-
.
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
</style>
|
| 61 |
</head>
|
|
|
|
| 62 |
|
| 63 |
-
<
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
</nav>
|
| 69 |
|
| 70 |
-
<div id="sidebar-overlay" class="hidden fixed inset-0 bg-black
|
| 71 |
|
| 72 |
-
<aside id="sidebar" class="fixed md:relative flex flex-col w-64
|
| 73 |
-
<div class="flex items-center
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
<button id="btn-
|
| 79 |
-
|
| 80 |
-
<
|
| 81 |
</div>
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
<
|
|
|
|
|
|
|
|
|
|
| 85 |
</div>
|
| 86 |
-
</aside>
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
<
|
| 91 |
-
|
| 92 |
-
<
|
| 93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
-
<div
|
| 96 |
-
<div class="
|
| 97 |
-
<
|
| 98 |
-
<
|
| 99 |
-
|
|
|
|
| 100 |
</div>
|
|
|
|
|
|
|
|
|
|
| 101 |
</div>
|
|
|
|
| 102 |
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
-
<div id="
|
| 106 |
-
<div
|
| 107 |
-
<
|
| 108 |
-
<
|
|
|
|
| 109 |
</div>
|
| 110 |
</div>
|
| 111 |
|
| 112 |
-
<div class="shrink-0
|
| 113 |
-
<div class="max-w-
|
| 114 |
-
<
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
</div>
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
| 120 |
<input id="pdf-input" type="file" accept=".pdf" class="hidden" />
|
| 121 |
-
|
| 122 |
-
<
|
| 123 |
-
|
| 124 |
-
|
|
|
|
|
|
|
| 125 |
</button>
|
| 126 |
</div>
|
| 127 |
</div>
|
| 128 |
</div>
|
| 129 |
</main>
|
| 130 |
|
| 131 |
-
<div id="settings-modal" class="hidden fixed inset-0 z-50 flex items-center justify-center modal-back bg-black/30 backdrop-blur-sm">
|
| 132 |
-
<div class="modal-box bg-white rounded-2xl shadow-2xl w-full max-w-lg
|
| 133 |
-
<div class="flex items-center justify-between px-6 pt-6 pb-4 border-b border-gray-100">
|
| 134 |
<h2 class="text-base font-bold text-gray-800">Settings</h2>
|
| 135 |
-
<button id="btn-close-settings" class="p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors">
|
|
|
|
|
|
|
| 136 |
</div>
|
| 137 |
-
<div class="px-6 py-5 space-y-5">
|
| 138 |
-
<div>
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
</div>
|
| 144 |
-
<div class="px-6 pb-6 flex gap-3 justify-end border-t border-gray-100 pt-4"><button id="btn-cancel-settings" class="px-5 py-2.5 text-sm font-medium text-gray-600 hover:bg-gray-100 rounded-xl transition-colors">Cancel</button><button id="btn-save-settings" class="px-5 py-2.5 text-sm font-semibold bg-accent hover:bg-accent-hover text-white rounded-xl shadow-sm transition-colors">Save Settings</button></div>
|
| 145 |
</div>
|
| 146 |
</div>
|
| 147 |
|
| 148 |
-
<div id="doi-modal" class="hidden fixed inset-0 z-50 flex items-center justify-center modal-back bg-black/30 backdrop-blur-sm">
|
| 149 |
-
<div class="modal-box bg-white rounded-2xl shadow-2xl w-full max-w-md
|
| 150 |
<div class="flex items-center justify-between px-6 pt-6 pb-4 border-b border-gray-100">
|
| 151 |
<h2 class="text-base font-bold text-gray-800">Validate DOI</h2>
|
| 152 |
-
<button id="btn-close-doi" class="p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors">
|
|
|
|
|
|
|
| 153 |
</div>
|
| 154 |
<div class="px-6 py-5 space-y-4">
|
| 155 |
-
<input id="doi-input" type="text" placeholder="e.g. 10.1000/xyz123
|
| 156 |
-
<button id="btn-validate-doi" class="w-full py-2.5 bg-accent hover:bg-accent-hover text-white text-sm font-semibold rounded-xl shadow-sm transition-colors flex items-center justify-center gap-2">
|
|
|
|
|
|
|
| 157 |
<div id="doi-result" class="hidden bg-[#f8f9fa] border border-gray-200 rounded-xl p-4 text-sm text-gray-700"></div>
|
| 158 |
</div>
|
| 159 |
</div>
|
| 160 |
</div>
|
| 161 |
|
| 162 |
<script src="/static/js/script.js"></script>
|
| 163 |
-
<script>
|
| 164 |
-
if ('serviceWorker' in navigator) {
|
| 165 |
-
window.addEventListener('load', () => navigator.serviceWorker.register('/sw.js', { scope: '/' }));
|
| 166 |
-
}
|
| 167 |
-
</script>
|
| 168 |
</body>
|
| 169 |
</html>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
| 6 |
<title>ORBIT – Educational Research Assistant</title>
|
| 7 |
<link rel="icon" type="image/png" href="/static/icon.png" />
|
|
|
|
|
|
|
| 8 |
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 9 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 10 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
|
|
|
|
| 11 |
<link rel="manifest" href="/manifest.json">
|
| 12 |
<meta name="theme-color" content="#2563eb">
|
| 13 |
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
| 16 |
|
| 17 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 18 |
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
|
|
| 19 |
<script>
|
| 20 |
tailwind.config = {
|
| 21 |
+
theme: { extend: { fontFamily: { sans: ['Inter', 'sans-serif'] }, colors: { accent: { DEFAULT: '#1a73e8', hover: '#1557b0', light: '#e8f0fe' } } } },
|
|
|
|
|
|
|
| 22 |
};
|
| 23 |
</script>
|
| 24 |
<style>
|
| 25 |
* { box-sizing: border-box; }
|
| 26 |
body { font-family: 'Inter', sans-serif; }
|
| 27 |
+
::-webkit-scrollbar { width: 5px; height: 5px; }
|
| 28 |
::-webkit-scrollbar-track { background: transparent; }
|
| 29 |
+
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
|
| 30 |
+
#chat-textarea { resize: none; min-height: 24px; max-height: 150px; overflow-y: auto; }
|
| 31 |
+
.pill-shadow { box-shadow: 0 4px 28px rgba(26, 115, 232, 0.08), 0 1px 6px rgba(0, 0, 0, 0.05); }
|
| 32 |
+
#sidebar { transition: transform 0.3s ease-in-out; }
|
| 33 |
+
.modal-back { animation: fadeIn .2s ease; }
|
| 34 |
+
.modal-box { animation: scaleIn .2s cubic-bezier(.34, 1.56, .64, 1); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
| 36 |
@keyframes scaleIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
|
| 37 |
+
|
| 38 |
+
.prose-orbit { color: #334155; font-size: 0.95rem; line-height: 1.6; }
|
| 39 |
+
.prose-orbit h1, .prose-orbit h2, .prose-orbit h3 { color: #0f172a; font-weight: 700; margin-top: 1.2em; margin-bottom: 0.5em; }
|
| 40 |
+
.prose-orbit p { margin-bottom: 1em; }
|
| 41 |
+
.prose-orbit ul { list-style-type: disc; padding-left: 1.5em; margin-bottom: 1em; }
|
| 42 |
+
.prose-orbit ol { list-style-type: decimal; padding-left: 1.5em; margin-bottom: 1em; }
|
| 43 |
+
.prose-orbit strong { color: #0f172a; font-weight: 600; }
|
| 44 |
+
.prose-orbit a { color: #2563eb; text-decoration: underline; }
|
| 45 |
+
.prose-orbit blockquote { border-left: 4px solid #cbd5e1; padding-left: 1em; color: #64748b; font-style: italic; margin: 1em 0; }
|
| 46 |
+
.prose-orbit code { background-color: #f1f5f9; color: #db2777; padding: 0.2em 0.4em; border-radius: 0.25em; font-family: monospace; font-size: 0.85em; }
|
| 47 |
+
.prose-orbit pre { background-color: #1e293b; padding: 1em; border-radius: 0.5em; overflow-x: auto; margin: 1em 0; }
|
| 48 |
+
.prose-orbit pre code { background-color: transparent; color: #f8fafc; padding: 0; font-size: 0.85em; }
|
| 49 |
+
.prose-orbit table { width: 100%; border-collapse: collapse; margin: 1em 0; }
|
| 50 |
+
.prose-orbit th, .prose-orbit td { border: 1px solid #e2e8f0; padding: 0.5em; text-align: left; }
|
| 51 |
+
.prose-orbit th { background-color: #f8fafc; font-weight: 600; }
|
| 52 |
+
/* Supaya gambar yang digenerate AI tampil rapi */
|
| 53 |
+
.prose-orbit img { border-radius: 0.75rem; margin: 1rem 0; max-width: 100%; height: auto; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
|
| 54 |
</style>
|
| 55 |
</head>
|
| 56 |
+
<body class="flex flex-col md:flex-row h-screen w-full overflow-hidden bg-white text-gray-800 antialiased">
|
| 57 |
|
| 58 |
+
<nav class="md:hidden flex items-center justify-between px-4 h-14 bg-white border-b border-gray-100 shrink-0 z-40 relative shadow-sm">
|
| 59 |
+
<div class="flex items-center gap-3">
|
| 60 |
+
<button id="btn-hamburger" class="p-2 -ml-2 rounded-lg hover:bg-gray-100 transition-colors">
|
| 61 |
+
<svg class="w-6 h-6 text-gray-600" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" /></svg>
|
| 62 |
+
</button>
|
| 63 |
+
<div class="flex items-center gap-2">
|
| 64 |
+
<img src="/static/icon.png" alt="Logo" class="w-7 h-7 rounded-md" onerror="this.style.display='none'">
|
| 65 |
+
<span class="font-bold text-lg text-accent tracking-tight">ORBIT</span>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
<button id="btn-clear-chat-mobile" class="p-2 text-gray-400 hover:text-red-500 transition-colors">
|
| 69 |
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>
|
| 70 |
+
</button>
|
| 71 |
</nav>
|
| 72 |
|
| 73 |
+
<div id="sidebar-overlay" class="hidden fixed inset-0 bg-black/50 z-40 md:hidden transition-opacity"></div>
|
| 74 |
|
| 75 |
+
<aside id="sidebar" class="fixed md:relative flex flex-col w-64 md:w-64 bg-[#F8F9FA] border-r border-gray-100 h-full z-50 shrink-0 -translate-x-full md:translate-x-0">
|
| 76 |
+
<div class="flex items-center justify-between px-5 py-5 border-b border-gray-100 shrink-0">
|
| 77 |
+
<div class="flex items-center gap-3">
|
| 78 |
+
<img src="/static/icon.png" alt="Logo" class="w-8 h-8 rounded-md shadow-sm" onerror="this.style.display='none'">
|
| 79 |
+
<span class="font-bold text-[18px] text-accent tracking-tight">ORBIT AI</span>
|
| 80 |
+
</div>
|
| 81 |
+
<button id="btn-close-sidebar" class="md:hidden text-gray-400 hover:text-gray-600">
|
| 82 |
+
<svg class="w-6 h-6" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>
|
| 83 |
+
</button>
|
| 84 |
</div>
|
| 85 |
+
|
| 86 |
+
<div class="px-4 py-4 shrink-0 border-b border-gray-100">
|
| 87 |
+
<button id="btn-new-chat" class="w-full flex items-center justify-center gap-2 bg-accent hover:bg-accent-hover text-white font-semibold text-sm rounded-xl py-2.5 shadow-sm transition-colors mb-2">
|
| 88 |
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" /></svg>
|
| 89 |
+
New Chat
|
| 90 |
+
</button>
|
| 91 |
</div>
|
|
|
|
| 92 |
|
| 93 |
+
<div class="flex-1 overflow-y-auto px-3 py-3">
|
| 94 |
+
<p class="text-[11px] font-semibold text-gray-400 uppercase tracking-widest mb-2 px-1">Recent Chats</p>
|
| 95 |
+
<div id="history-list" class="space-y-1 mb-6"></div>
|
| 96 |
+
|
| 97 |
+
<p class="text-[11px] font-semibold text-gray-400 uppercase tracking-widest mb-2 px-1 mt-6">Tools & Settings</p>
|
| 98 |
+
<div class="space-y-1">
|
| 99 |
+
<button id="btn-open-doi" class="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-medium text-gray-600 hover:bg-white hover:text-accent hover:shadow-sm transition-all">
|
| 100 |
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" /></svg>
|
| 101 |
+
Validate DOI
|
| 102 |
+
</button>
|
| 103 |
+
<a id="btn-howto" href="/static/docs/dokumen.pdf" target="_blank" class="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-medium text-gray-600 hover:bg-white hover:text-accent hover:shadow-sm transition-all">
|
| 104 |
+
<svg class="w-4 h-4 shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
| 105 |
+
How To
|
| 106 |
+
</a>
|
| 107 |
+
<button id="btn-open-settings" class="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-medium text-gray-600 hover:bg-white hover:text-accent hover:shadow-sm transition-all">
|
| 108 |
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/><path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
|
| 109 |
+
Settings
|
| 110 |
+
</button>
|
| 111 |
+
<button id="btn-install-pwa" class="hidden w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-bold text-blue-600 bg-blue-50 border border-blue-100 hover:bg-blue-100 transition-all mt-2">
|
| 112 |
+
<svg class="w-4 h-4 shrink-0" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /></svg>
|
| 113 |
+
Install App
|
| 114 |
+
</button>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
|
| 118 |
+
<div class="border-t border-gray-100 p-4 shrink-0 flex items-center justify-between bg-[#F8F9FA]">
|
| 119 |
+
<div class="flex items-center gap-3 overflow-hidden">
|
| 120 |
+
<img id="user-avatar" src="" alt="Profile" class="w-9 h-9 rounded-full bg-slate-200 border border-slate-300 shrink-0 object-cover">
|
| 121 |
+
<div class="flex flex-col truncate">
|
| 122 |
+
<span id="user-name" class="text-sm font-semibold text-slate-700 truncate">Loading...</span>
|
| 123 |
+
</div>
|
| 124 |
</div>
|
| 125 |
+
<a href="/auth/logout" class="text-slate-400 hover:text-red-500 transition-colors p-2 shrink-0" title="Sign out">
|
| 126 |
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" /></svg>
|
| 127 |
+
</a>
|
| 128 |
</div>
|
| 129 |
+
</aside>
|
| 130 |
|
| 131 |
+
<main class="flex-1 flex flex-col h-full w-full bg-white relative min-w-0">
|
| 132 |
+
<header class="hidden md:flex items-center justify-between px-6 py-4 border-b border-gray-100 shrink-0">
|
| 133 |
+
<span class="text-sm font-semibold text-gray-500">Research Assistant Session</span>
|
| 134 |
+
<button id="btn-clear-chat-top" class="text-xs font-medium text-gray-400 hover:text-red-500 transition-colors px-3 py-1.5 rounded-lg hover:bg-red-50 border border-transparent hover:border-red-100">Clear Chat</button>
|
| 135 |
+
</header>
|
| 136 |
|
| 137 |
+
<div id="chat-messages" class="flex-1 overflow-y-auto p-4 md:p-8 space-y-6 scroll-smooth">
|
| 138 |
+
<div id="welcome-msg" class="flex flex-col items-center justify-center h-full text-center px-4">
|
| 139 |
+
<img src="/static/icon.png" class="w-16 h-16 mb-4 shadow-sm rounded-2xl" onerror="this.style.display='none'">
|
| 140 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-2">Welcome to ORBIT</h2>
|
| 141 |
+
<p class="text-gray-500 text-sm max-w-md">Your AI-powered Educational Research Assistant. Upload a document or type a prompt below to begin.</p>
|
| 142 |
</div>
|
| 143 |
</div>
|
| 144 |
|
| 145 |
+
<div class="shrink-0 bg-white pt-2 pb-4 px-4 md:px-8 border-t border-gray-50 z-20 shadow-[0_-10px_20px_-10px_rgba(0,0,0,0.02)]">
|
| 146 |
+
<div id="attach-badge" class="hidden max-w-3xl mx-auto px-2 pb-2">
|
| 147 |
+
<div class="inline-flex items-center gap-2 bg-accent-light text-accent text-xs font-semibold px-3 py-1.5 rounded-full border border-blue-100 shadow-sm">
|
| 148 |
+
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>
|
| 149 |
+
<span id="attach-name" class="truncate max-w-[200px]">document.pdf</span>
|
| 150 |
+
<button id="btn-remove-attach" class="ml-1 opacity-60 hover:opacity-100 transition-opacity font-bold">✕</button>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
|
| 154 |
+
<div class="max-w-3xl mx-auto flex items-center justify-between px-3 pb-1">
|
| 155 |
+
<select id="model-select" class="bg-transparent border-none text-[12px] font-semibold text-gray-400 focus:outline-none cursor-pointer px-1 hover:text-accent transition-colors appearance-none outline-none">
|
| 156 |
+
<option value="">Loading models...</option>
|
| 157 |
+
</select>
|
| 158 |
+
<span class="text-[10px] text-gray-300 font-medium hidden sm:block">ORBIT can make mistakes. Verify important information.</span>
|
| 159 |
</div>
|
| 160 |
+
|
| 161 |
+
<div class="max-w-3xl mx-auto bg-[#f8f9fa] rounded-[1.5rem] pill-shadow border border-gray-200/80 px-3 py-2 flex flex-col focus-within:ring-2 focus-within:ring-accent/20 focus-within:border-accent/30 transition-all">
|
| 162 |
+
<div class="flex items-end gap-2">
|
| 163 |
+
<button id="btn-attach" title="Attach PDF" class="shrink-0 w-10 h-10 flex items-center justify-center rounded-full hover:bg-white hover:shadow-sm transition-all text-gray-400 hover:text-accent">
|
| 164 |
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>
|
| 165 |
+
</button>
|
| 166 |
<input id="pdf-input" type="file" accept=".pdf" class="hidden" />
|
| 167 |
+
|
| 168 |
+
<textarea id="chat-textarea" rows="1" placeholder="Ask ORBIT anything..." class="flex-1 bg-transparent border-none outline-none resize-none text-[15px] text-gray-800 placeholder-gray-400 py-2 leading-relaxed m-0"></textarea>
|
| 169 |
+
|
| 170 |
+
<button id="btn-send" class="shrink-0 w-10 h-10 flex items-center justify-center rounded-full bg-accent hover:bg-accent-hover text-white transition-all shadow-sm disabled:opacity-50 disabled:cursor-not-allowed">
|
| 171 |
+
<svg id="send-icon" class="w-4 h-4 transform rotate-90" fill="currentColor" viewBox="0 0 20 20"><path d="M10.894 2.553a1 1 0 00-1.788 0l-7 14a1 1 0 001.169 1.409l5-1.429A1 1 0 009 15.571V11a1 1 0 112 0v4.571a1 1 0 00.725.962l5 1.428a1 1 0 001.17-1.408l-7-14z"></path></svg>
|
| 172 |
+
<svg id="loading-icon" class="w-4 h-4 animate-spin hidden" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v8H4z"></path></svg>
|
| 173 |
</button>
|
| 174 |
</div>
|
| 175 |
</div>
|
| 176 |
</div>
|
| 177 |
</main>
|
| 178 |
|
| 179 |
+
<div id="settings-modal" class="hidden fixed inset-0 z-50 flex items-center justify-center modal-back bg-black/30 backdrop-blur-sm p-4">
|
| 180 |
+
<div class="modal-box bg-white rounded-2xl shadow-2xl w-full max-w-lg max-h-full flex flex-col">
|
| 181 |
+
<div class="flex items-center justify-between px-6 pt-6 pb-4 border-b border-gray-100 shrink-0">
|
| 182 |
<h2 class="text-base font-bold text-gray-800">Settings</h2>
|
| 183 |
+
<button id="btn-close-settings" class="p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors">
|
| 184 |
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M6 18L18 6M6 6l12 12" /></svg>
|
| 185 |
+
</button>
|
| 186 |
</div>
|
| 187 |
+
<div class="px-6 py-5 space-y-5 overflow-y-auto flex-1">
|
| 188 |
+
<div>
|
| 189 |
+
<label class="block text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1.5">Provider</label>
|
| 190 |
+
<select id="settings-provider" class="w-full border border-gray-200 rounded-xl px-3 py-2.5 text-sm text-gray-700 bg-[#f8f9fa]">
|
| 191 |
+
<option value="OpenRouter">OpenRouter</option>
|
| 192 |
+
<option value="Nvidia NIM">Nvidia NIM</option>
|
| 193 |
+
<option value="Google Gemini">Google Gemini</option>
|
| 194 |
+
<option value="AgentRouter">AgentRouter</option>
|
| 195 |
+
<option value="Custom OpenAI">Custom OpenAI-Compatible</option>
|
| 196 |
+
</select>
|
| 197 |
+
</div>
|
| 198 |
+
<div>
|
| 199 |
+
<label class="block text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1.5">Base URL</label>
|
| 200 |
+
<input id="settings-url" type="text" class="w-full border border-gray-200 rounded-xl px-3 py-2.5 text-sm text-gray-700 bg-[#f8f9fa]" />
|
| 201 |
+
</div>
|
| 202 |
+
<div>
|
| 203 |
+
<label class="block text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1.5">API Key</label>
|
| 204 |
+
<input id="settings-apikey" type="password" placeholder="Enter your API Key..." class="w-full border border-gray-200 rounded-xl px-3 py-2.5 text-sm text-gray-700 bg-[#f8f9fa]" />
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
<div class="px-6 pb-6 flex gap-3 justify-end border-t border-gray-100 pt-4 shrink-0">
|
| 208 |
+
<button id="btn-cancel-settings" class="px-5 py-2.5 text-sm font-medium text-gray-600 hover:bg-gray-100 rounded-xl transition-colors">Cancel</button>
|
| 209 |
+
<button id="btn-save-settings" class="px-5 py-2.5 text-sm font-semibold bg-accent hover:bg-accent-hover text-white rounded-xl shadow-sm transition-colors">Save Settings</button>
|
| 210 |
</div>
|
|
|
|
| 211 |
</div>
|
| 212 |
</div>
|
| 213 |
|
| 214 |
+
<div id="doi-modal" class="hidden fixed inset-0 z-50 flex items-center justify-center modal-back bg-black/30 backdrop-blur-sm p-4">
|
| 215 |
+
<div class="modal-box bg-white rounded-2xl shadow-2xl w-full max-w-md">
|
| 216 |
<div class="flex items-center justify-between px-6 pt-6 pb-4 border-b border-gray-100">
|
| 217 |
<h2 class="text-base font-bold text-gray-800">Validate DOI</h2>
|
| 218 |
+
<button id="btn-close-doi" class="p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors">
|
| 219 |
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M6 18L18 6M6 6l12 12" /></svg>
|
| 220 |
+
</button>
|
| 221 |
</div>
|
| 222 |
<div class="px-6 py-5 space-y-4">
|
| 223 |
+
<input id="doi-input" type="text" placeholder="e.g. 10.1000/xyz123" class="w-full border border-gray-200 rounded-xl px-3 py-2.5 text-sm text-gray-700 bg-[#f8f9fa]" />
|
| 224 |
+
<button id="btn-validate-doi-submit" class="w-full py-2.5 bg-accent hover:bg-accent-hover text-white text-sm font-semibold rounded-xl shadow-sm transition-colors flex items-center justify-center gap-2">
|
| 225 |
+
<span>Validate Reference</span>
|
| 226 |
+
</button>
|
| 227 |
<div id="doi-result" class="hidden bg-[#f8f9fa] border border-gray-200 rounded-xl p-4 text-sm text-gray-700"></div>
|
| 228 |
</div>
|
| 229 |
</div>
|
| 230 |
</div>
|
| 231 |
|
| 232 |
<script src="/static/js/script.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
</body>
|
| 234 |
</html>
|