diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..79a46d15 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +ide/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..6c2ff60b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "master" + ] +} \ No newline at end of file diff --git a/css/ide.css b/css/ide.css index f6432a7b..c2006812 100755 --- a/css/ide.css +++ b/css/ide.css @@ -1,50 +1,103 @@ -.judge0-file-menu { - min-width: 15rem !important; +.ai-chat-container { + background: var(--bg-color); + border-left: 1px solid #ddd; + height: 100vh; + width: 350px; + display: flex; + flex-direction: column; } -#judge0-chat-container { - display: flex; - flex-direction: column; - height: 100%; - padding: 0; +.chat-messages { + flex: 1; + overflow-y: auto; + padding: 1rem; } -#judge0-chat-container > .ui.menu { - border-bottom: none; +.chat-input { + padding: 1rem; + border-top: 1px solid #eee; + display: flex; + gap: 0.5rem; } -#judge0-chat-messages { - flex-grow: 1; - overflow-y: auto; +.ai-message, .user-message { + padding: 0.8rem; + margin: 0.5rem 0; + border-radius: 8px; + max-width: 80%; } -#judge0-chat-messages pre { - overflow-x: auto; +.user-message { + background: #007bff; + color: white; + margin-left: auto; } -.judge0-user-message { - margin-left: auto !important; - margin-right: 1em !important; - margin-top: 1em !important; - max-width: 66%; - overflow-wrap: break-word; - width: fit-content; +.ai-message { + background: #f0f0f0; + color: #333; } -#judge0-chat-input-container { - margin-top: 0; +.loading-dots::after { + content: '...'; + animation: dots 1s infinite; } -#judge0-status-line:empty { - display: none; +@keyframes dots { + 0%, 20% { content: '.'; } + 40% { content: '..'; } + 60% { content: '...'; } } -.judge0-hidden, .judge0-style-hidden { - display: none !important; -} -@media (display-mode: standalone) { - .judge0-standalone-hidden { - display: none !important; - } -} + +.ai-chat-container { + background: var(--bg-color); + border-left: 1px solid #ddd; + height: 100vh; + width: 350px; + display: flex; + flex-direction: column; + } + + .chat-messages { + flex: 1; + overflow-y: auto; + padding: 1rem; + } + + .chat-input { + padding: 1rem; + border-top: 1px solid #eee; + display: flex; + gap: 0.5rem; + } + + .ai-message, .user-message { + padding: 0.8rem; + margin: 0.5rem 0; + border-radius: 8px; + max-width: 80%; + } + + .user-message { + background: #007bff; + color: white; + margin-left: auto; + } + + .ai-message { + background: #f0f0f0; + color: #333; + } + + .loading-dots::after { + content: '...'; + animation: dots 1s infinite; + } + + @keyframes dots { + 0%, 20% { content: '.'; } + 40% { content: '..'; } + 60% { content: '...'; } + } \ No newline at end of file diff --git a/css/site.css b/css/site.css index 8e94d43f..7477f8fe 100644 --- a/css/site.css +++ b/css/site.css @@ -5,3 +5,55 @@ html, body { padding: 0; overflow: hidden; } + + +#chat-window { + position: fixed; + bottom: 20px; + right: 20px; + width: 300px; + background: #f1f1f1; + border: 1px solid #ccc; + padding: 10px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); +} + +#chat-messages { + height: 200px; + overflow-y: auto; + margin-bottom: 10px; +} + +#chat-input { + width: 100%; + padding: 5px; + box-sizing: border-box; +} + + +/* Light Theme */ +#chat-window { + background: #f1f1f1; + border: 1px solid #ccc; + color: #000; +} + +/* Dark Theme */ +.dark-theme #chat-window { + background: #333; + border: 1px solid #555; + color: #fff; +} + +/* Inline Chat Window */ +#inline-chat-window { + background: #fff; + border: 1px solid #ccc; + color: #000; +} + +.dark-theme #inline-chat-window { + background: #444; + border: 1px solid #666; + color: #fff; +} \ No newline at end of file diff --git a/index.html b/index.html index faf35a96..349d0f30 100644 --- a/index.html +++ b/index.html @@ -21,6 +21,8 @@ } }; + + @@ -228,5 +230,46 @@ navigator.serviceWorker.register("sw.js").then(() => console.log("Service Worker Registered")); } + + +// Here I added the chat interface +