Skip to content

Commit f4b6885

Browse files
committed
style: Gradient BG, smooth corners and animations
1 parent 237e1c0 commit f4b6885

2 files changed

Lines changed: 110 additions & 60 deletions

File tree

frontend/assets/css/theme.css

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* ===== Design Tokens ===== */
22
:root {
3-
--bg: #1E1E1E;
3+
--bg: #0a0a0a;
44
--surface: #27272A;
55
--surface-2: #2F2F33;
66
--border: #3F3F46;
@@ -21,14 +21,21 @@
2121
*::before,
2222
*::after {
2323
box-sizing: border-box;
24-
margin: 0;
24+
/* margin: 0; */
2525
/* padding: 0; */
2626
}
2727

28+
@keyframes bg-pulse {
29+
0%, 100% { background-position: 0% 90%; }
30+
50% { background-position: 100% 50%; }
31+
}
32+
2833
html,
2934
body {
3035
height: 100%;
31-
background: var(--bg);
36+
background: linear-gradient(180deg, #171717 60%, #031140 200%);
37+
background-size: 300% 300%;
38+
animation: bg-pulse 8s ease infinite;
3239
color: var(--text);
3340
font-family: 'Inter', system-ui, sans-serif;
3441
font-size: 15px;
@@ -129,7 +136,7 @@ body {
129136
padding: 12px 16px;
130137
word-break: break-word;
131138
line-height: 1.65;
132-
border-radius: var(--radius);
139+
border-radius: var(--radius-xl);
133140
}
134141

135142
.message.user {
@@ -139,8 +146,10 @@ body {
139146
}
140147

141148
.message.bot {
142-
background: var(--bot-bg);
143-
border: 1px solid var(--border);
149+
/* background: var(--bot-bg); */
150+
/* border: 1px solid var(--border); */
151+
padding: 0;
152+
border: none;
144153
font-size: 14.5px;
145154
}
146155

@@ -243,7 +252,7 @@ body {
243252

244253
/* ===== Input Area ===== */
245254
.input-area {
246-
padding: 16px 24px 20px;
255+
padding: 16px 24px;
247256
/* border-top: 1px solid var(--border); */
248257
background: var(--surface);
249258
transition: box-shadow 0.2s ease;
@@ -320,7 +329,6 @@ body {
320329

321330
.input-row {
322331
display: flex;
323-
gap: 10px;
324332
align-items: center;
325333
}
326334

@@ -346,9 +354,9 @@ body {
346354

347355
#send-button {
348356
flex-shrink: 0;
349-
width: 44px;
350-
height: 44px;
351-
background: var(--accent);
357+
/* width: 44px;
358+
height: 44px; */
359+
/* background: var(--accent); */
352360
border: none;
353361
cursor: pointer;
354362
display: flex;
@@ -386,7 +394,7 @@ body {
386394
}
387395

388396
.empty-state-title {
389-
font-size: 17px;
397+
font-size: 2.2rem;
390398
font-weight: 600;
391399
color: var(--text);
392400
}
@@ -396,6 +404,37 @@ body {
396404
max-width: 360px;
397405
}
398406

407+
/* ===== Suggestion Cards ===== */
408+
.suggestion-cards {
409+
display: flex;
410+
flex-wrap: wrap;
411+
gap: 10px;
412+
justify-content: center;
413+
margin-top: 8px;
414+
max-width: 600px;
415+
}
416+
417+
.suggestion-card {
418+
background: rgba(255, 255, 255, 0.05);
419+
border: 1px solid rgba(255, 255, 255, 0.1);
420+
color: var(--text-muted);
421+
font-family: var(--font-mono);
422+
font-size: 13px;
423+
padding: 10px 16px;
424+
border-radius: 10px;
425+
cursor: pointer;
426+
text-align: left;
427+
backdrop-filter: blur(6px);
428+
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
429+
}
430+
431+
.suggestion-card:hover {
432+
background: rgba(91, 136, 178, 0.15);
433+
border-color: var(--accent);
434+
color: var(--text);
435+
transform: translateY(-2px);
436+
}
437+
399438
.cmd-pills {
400439
display: flex;
401440
gap: 8px;
@@ -420,8 +459,8 @@ body {
420459

421460
/* ===== Scope Selector ===== */
422461
#scope-btn {
423-
background: var(--surface-2);
424-
border: 1px solid var(--border);
462+
/* background: var(--surface-2); */
463+
/* border: 1px solid var(--border); */
425464
color: var(--text-muted);
426465
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
427466
}

templates/index.html

Lines changed: 57 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
1313
rel="stylesheet" />
1414

15-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
15+
<link rel="stylesheet"
16+
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
1617
<link rel="stylesheet" href="/assets/css/output.css" />
1718
<link rel="stylesheet" href="/assets/css/theme.css" />
1819
</head>
@@ -22,29 +23,24 @@
2223

2324
<header class="header">
2425
<div class="context-pin-badge" id="context-pin-badge" hidden aria-live="polite"></div>
25-
<div class="header-badge online" id="status-badge">Online</div>
26+
<div class="header-badge online !rounded-2xl" id="status-badge">Online</div>
2627
</header>
2728

2829
<main class="chat-box" id="chat" role="log" aria-live="polite" aria-label="Histórico de mensagens">
2930
<div class="empty-state" id="empty-state">
30-
<div class="empty-state-icon">🗂️</div>
31-
<div class="empty-state-title">Base de conhecimento pronta</div>
32-
<p class="empty-state-sub">Prefixos: <code>/content</code> (RAG geral), <code>/doc</code> (pasta
33-
<code>content/doc</code>), <code>/python</code>, <code>/visualizacao-sql</code>,
34-
<code>/projeto-bloco</code>, <code>/planejamento-curso-carreira</code> (RAG só na disciplina).</p>
35-
<div class="cmd-pills">
36-
<span class="cmd-pill">/reload</span>
37-
<span class="cmd-pill">/python o que são listas?</span>
38-
<span class="cmd-pill">/visualizacao-sql explique GROUP BY</span>
39-
<span class="cmd-pill">/projeto-bloco resuma o pipeline</span>
40-
<span class="cmd-pill">/planejamento-curso-carreira dicas de currículo</span>
41-
<span class="cmd-pill">/doc visão geral do ACL</span>
42-
<span class="cmd-pill">/content o que é BM25?</span>
31+
<!-- <div class="empty-state-icon">🗂️</div> -->
32+
<div class="empty-state-title">Opa, sou o Kernel! O que precisa hoje?</div>
33+
34+
<div class="suggestion-cards">
35+
<button class="suggestion-card" type="button" data-prompt="/python Como listas funcionam?">/python Como listas funcionam?</button>
36+
<button class="suggestion-card" type="button" data-prompt="/sql Como usar GROUP BY?">/sql Como usar GROUP BY?</button>
37+
<button class="suggestion-card" type="button" data-prompt="/carreira Como montar um portfólio?">/carreira Como montar um portfólio?</button>
38+
<button class="suggestion-card" type="button" data-prompt="/doc Como o sistema funciona?">/doc Como o sistema funciona?</button>
4339
</div>
4440
</div>
4541
</main>
4642

47-
<footer class="input-area rounded-4xl">
43+
<footer class="input-area rounded-full mb-3">
4844
<div class="silo-pill" id="silo-pill" hidden aria-live="polite"></div>
4945
<!-- <div class="input-hint">
5046
<span>Enter</span> envia · <span>Shift+Enter</span> nova linha ·
@@ -56,15 +52,15 @@
5652

5753
<!-- Scope selector -->
5854
<div class="relative flex-shrink-0" id="scope-selector">
59-
<button
60-
id="scope-btn"
61-
type="button"
62-
class="rounded-2xl w-11 h-11 flex items-center justify-center cursor-pointer"
63-
aria-label="Selecionar escopo da busca"
64-
title="Selecionar escopo"
65-
aria-haspopup="true"
66-
aria-expanded="false"
67-
>
55+
<button id="scope-btn" type="button"
56+
class="rounded-full p-3 flex items-center justify-center cursor-pointer"
57+
aria-label="Selecionar escopo da busca" title="Selecionar escopo" aria-haspopup="true"
58+
aria-expanded="false">
59+
<!-- <svg xmlns="http://www.w3.org/2000/svg" class="size-3.5 rotate-60"
60+
viewBox="0 0 576 512">
61+
<path fill="rgb(255, 255, 255)"
62+
d="M7-25c9.4-9.4 24.6-9.4 33.9 0L569 503c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 9C-2.3-.4-2.3-15.6 7-25z" />
63+
</svg> -->
6864
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
6965
<rect x="1" y="1" width="6" height="6" rx="1"/>
7066
<rect x="9" y="1" width="6" height="6" rx="1"/>
@@ -73,49 +69,55 @@
7369
</svg>
7470
</button>
7571

76-
<div
77-
id="scope-menu"
78-
role="menu"
79-
aria-labelledby="scope-btn"
80-
class="absolute left-0 z-50 rounded-2xl overflow-hidden"
81-
>
72+
<div id="scope-menu" role="menu" aria-labelledby="scope-btn"
73+
class="absolute left-0 z-50 rounded-2xl overflow-hidden">
8274
<div class="!p-4">
83-
<p class="px-4 pb-1.5 pt-1 text-[10px] font-semibold uppercase tracking-widest scope-menu-label">
75+
<p
76+
class="px-4 pb-1.5 pt-1 text-[10px] font-semibold uppercase tracking-widest scope-menu-label">
8477
Escopo da busca
8578
</p>
8679

8780
<button type="button" role="menuitem" data-cmd="/python"
88-
class="scope-option w-full text-left px-4 py-2.5 flex flex-col gap-0.5 cursor-pointer">
81+
class="scope-option rounded-xl w-full text-left px-4 py-2.5 flex flex-col gap-0.5 cursor-pointer">
8982
<span class="text-sm font-semibold scope-option-cmd">/python</span>
90-
<span class="text-xs leading-snug scope-option-desc">Consultas sobre Python e programação</span>
83+
<span class="text-xs leading-snug scope-option-desc">Consultas sobre Python e
84+
programação</span>
9185
</button>
9286

9387
<button type="button" role="menuitem" data-cmd="/visualizacao-sql"
94-
class="scope-option w-full text-left px-4 py-2.5 flex flex-col gap-0.5 cursor-pointer">
88+
class="scope-option rounded-xl w-full text-left px-4 py-2.5 flex flex-col gap-0.5 cursor-pointer">
9589
<span class="text-sm font-semibold scope-option-cmd">/sql</span>
96-
<span class="text-xs leading-snug scope-option-desc">Visualização SQL e consultas de banco de dados</span>
90+
<span class="text-xs leading-snug scope-option-desc">Visualização SQL e consultas de
91+
banco de dados</span>
9792
</button>
9893

9994
<button type="button" role="menuitem" data-cmd="/planejamento-curso-carreira"
100-
class="scope-option w-full text-left px-4 py-2.5 flex flex-col gap-0.5 cursor-pointer">
95+
class="scope-option rounded-xl w-full text-left px-4 py-2.5 flex flex-col gap-0.5 cursor-pointer">
10196
<span class="text-sm font-semibold scope-option-cmd">/carreira</span>
102-
<span class="text-xs leading-snug scope-option-desc">Planejamento de curso e carreira profissional</span>
97+
<span class="text-xs leading-snug scope-option-desc">Planejamento de curso e carreira
98+
profissional</span>
10399
</button>
104100

105101
<button type="button" role="menuitem" data-cmd="/doc"
106-
class="scope-option w-full text-left px-4 py-2.5 flex flex-col gap-0.5 cursor-pointer">
102+
class="scope-option rounded-xl w-full text-left px-4 py-2.5 flex flex-col gap-0.5 cursor-pointer">
107103
<span class="text-sm font-semibold scope-option-cmd">/doc</span>
108-
<span class="text-xs leading-snug scope-option-desc">Documentação e arquivos internos do sistema</span>
104+
<span class="text-xs leading-snug scope-option-desc">Documentação e arquivos internos do
105+
sistema</span>
109106
</button>
110107
</div>
111108
</div>
112109
</div>
113110
<!-- End scope selector -->
114111

115-
<textarea class="rounded-2xl" id="message-input" rows="1" placeholder="O que vamos revisar hoje?" autocomplete="off"
116-
aria-label="Campo de mensagem"></textarea>
117-
<button class="rounded-2xl" id="send-button" aria-label="Enviar mensagem" title="Enviar">
118-
112+
<textarea class="rounded-2xl" id="message-input" rows="1" placeholder="O que vamos revisar hoje?"
113+
autocomplete="off" aria-label="Campo de mensagem"></textarea>
114+
<button class="bg-blue-500 rounded-full p-3" id="send-button" aria-label="Enviar mensagem" title="Enviar">
115+
<!-- ➤ -->
116+
<svg xmlns="http://www.w3.org/2000/svg" class="size-4"
117+
viewBox="0 0 384 512"><!--!Font Awesome Free v7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.-->
118+
<path fill="rgb(255, 255, 255)"
119+
d="M214.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 109.3 160 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-370.7 105.4 105.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z" />
120+
</svg>
119121
</button>
120122
</div>
121123
</footer>
@@ -125,7 +127,7 @@
125127
<script type="module" src="/src/main.js"></script>
126128
<script>
127129
(function () {
128-
var btn = document.getElementById('scope-btn');
130+
var btn = document.getElementById('scope-btn');
129131
var menu = document.getElementById('scope-menu');
130132
var input = document.getElementById('message-input');
131133

@@ -165,8 +167,17 @@
165167
document.addEventListener('keydown', function (e) {
166168
if (e.key === 'Escape') closeMenu();
167169
});
170+
171+
document.querySelectorAll('.suggestion-card').forEach(function (card) {
172+
card.addEventListener('click', function () {
173+
input.value = card.dataset.prompt;
174+
input.dispatchEvent(new Event('input'));
175+
input.focus();
176+
input.selectionStart = input.selectionEnd = input.value.length;
177+
});
178+
});
168179
})();
169180
</script>
170181
</body>
171182

172-
</html>
183+
</html>

0 commit comments

Comments
 (0)