feat(frontend): Scholarchat-inspired UI refactor with top nav, sidebar, and message actions
- Add TopNav component with AI Chat, Study Guides, Progress tabs - Refactor sidebar to include brand, new chat, subjects, chat history, settings - Add message action buttons (Helpful, Note, Deeper) on assistant responses - Enhance ChatInput with photo, mic attachment icons and AI disclaimer - Improve welcome state with 2x2 suggested prompt grid - Update global layout for proper sidebar offset (fix nav overlap) - Remove obsolete Header component - All styles: strict BEM naming, zero inline CSS, Paper Look theme
This commit is contained in:
@@ -0,0 +1,220 @@
|
||||
/* ========================================
|
||||
Sidebar Component — padhLe
|
||||
======================================== */
|
||||
|
||||
/* Main Sidebar */
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: var(--sidebar-width);
|
||||
height: 100vh;
|
||||
background-color: var(--color-bg);
|
||||
border-right: var(--border-thin);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: var(--spacing-lg);
|
||||
overflow-y: auto;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* Scrollbar styling */
|
||||
.sidebar::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.sidebar::-webkit-scrollbar-thumb {
|
||||
background-color: var(--color-line);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* Brand */
|
||||
.sidebar__brand {
|
||||
padding-bottom: var(--spacing-md);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.sidebar__title {
|
||||
font-family: var(--font-heading);
|
||||
font-size: 2.25rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/* New Chat Button */
|
||||
.sidebar__new-chat {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--spacing-xs);
|
||||
width: 100%;
|
||||
padding: var(--spacing-sm);
|
||||
border: var(--border-thin);
|
||||
border-radius: var(--border-radius);
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 400;
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.sidebar__new-chat:hover {
|
||||
background-color: var(--color-hover);
|
||||
border-color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
/* Section */
|
||||
.sidebar__section {
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.sidebar__section--history {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sidebar__section-title {
|
||||
font-size: 0.7rem;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--color-text-muted);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
padding-left: var(--spacing-sm);
|
||||
}
|
||||
|
||||
/* Subject List */
|
||||
.sidebar__list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.sidebar__link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
width: 100%;
|
||||
padding: var(--spacing-sm);
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: var(--border-radius);
|
||||
cursor: pointer;
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 300;
|
||||
color: var(--color-text-muted);
|
||||
text-align: left;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.sidebar__link:hover {
|
||||
background-color: var(--color-hover);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.sidebar__link--active {
|
||||
background-color: var(--color-accent);
|
||||
color: var(--color-bg);
|
||||
}
|
||||
|
||||
.sidebar__link--active:hover {
|
||||
color: var(--color-bg);
|
||||
}
|
||||
|
||||
.sidebar__icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* Chat List */
|
||||
.sidebar__chat-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.sidebar__chat-link {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
padding: var(--spacing-sm);
|
||||
padding-left: var(--spacing-sm);
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: var(--border-radius);
|
||||
cursor: pointer;
|
||||
font-family: var(--font-body);
|
||||
text-align: left;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.sidebar__chat-link:hover {
|
||||
background-color: var(--color-hover);
|
||||
}
|
||||
|
||||
.sidebar__chat-link--active {
|
||||
background-color: var(--color-hover);
|
||||
}
|
||||
|
||||
.sidebar__chat-preview {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 400;
|
||||
color: var(--color-text);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sidebar__chat-time {
|
||||
font-size: 0.7rem;
|
||||
color: var(--color-text-muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.sidebar__footer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding-top: var(--spacing-sm);
|
||||
border-top: var(--border-thin);
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.sidebar__footer-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
width: 100%;
|
||||
padding: var(--spacing-sm);
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: var(--border-radius);
|
||||
cursor: pointer;
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.85rem;
|
||||
font-weight: 300;
|
||||
color: var(--color-text-muted);
|
||||
text-align: left;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.sidebar__footer-btn:hover {
|
||||
background-color: var(--color-hover);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.sidebar__footer-btn svg {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
Reference in New Issue
Block a user