Spaces:
Running
Running
fix "New Chat" button's svg size issue and make a bit smaller sidebar
Browse files- components/sidebar.js +6 -9
- index.html +1 -1
- style.css +1 -1
components/sidebar.js
CHANGED
|
@@ -10,9 +10,8 @@ class CustomSidebar extends HTMLElement {
|
|
| 10 |
<style>
|
| 11 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
|
| 12 |
* { font-family: 'Inter', sans-serif; }
|
| 13 |
-
|
| 14 |
.sidebar {
|
| 15 |
-
width:
|
| 16 |
background: #09090b;
|
| 17 |
border-right: 1px solid #18181b;
|
| 18 |
padding: 16px;
|
|
@@ -26,8 +25,7 @@ class CustomSidebar extends HTMLElement {
|
|
| 26 |
display: flex;
|
| 27 |
flex-direction: column;
|
| 28 |
}
|
| 29 |
-
|
| 30 |
-
.sidebar-header {
|
| 31 |
margin-bottom: 24px;
|
| 32 |
}
|
| 33 |
|
|
@@ -311,18 +309,17 @@ class CustomSidebar extends HTMLElement {
|
|
| 311 |
.sidebar::-webkit-scrollbar-thumb:hover {
|
| 312 |
background: #71717a;
|
| 313 |
}
|
| 314 |
-
|
| 315 |
@media (max-width: 768px) {
|
| 316 |
.sidebar {
|
| 317 |
transform: translateX(-100%);
|
| 318 |
-
width:
|
| 319 |
}
|
| 320 |
|
| 321 |
.sidebar.active {
|
| 322 |
transform: translateX(0);
|
| 323 |
}
|
| 324 |
}
|
| 325 |
-
|
| 326 |
|
| 327 |
<nav class="sidebar">
|
| 328 |
<div class="sidebar-header">
|
|
@@ -332,12 +329,12 @@ class CustomSidebar extends HTMLElement {
|
|
| 332 |
|
| 333 |
<div class="sidebar-buttons">
|
| 334 |
<button onclick="startNewChat()" class="new-chat-btn">
|
| 335 |
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 336 |
<path d="M12 5v14m-7-7h14"/>
|
| 337 |
</svg>
|
| 338 |
<span>New Chat</span>
|
| 339 |
</button>
|
| 340 |
-
|
| 341 |
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 342 |
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
|
| 343 |
<circle cx="8.5" cy="8.5" r="1.5"/>
|
|
|
|
| 10 |
<style>
|
| 11 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
|
| 12 |
* { font-family: 'Inter', sans-serif; }
|
|
|
|
| 13 |
.sidebar {
|
| 14 |
+
width: 260px;
|
| 15 |
background: #09090b;
|
| 16 |
border-right: 1px solid #18181b;
|
| 17 |
padding: 16px;
|
|
|
|
| 25 |
display: flex;
|
| 26 |
flex-direction: column;
|
| 27 |
}
|
| 28 |
+
.sidebar-header {
|
|
|
|
| 29 |
margin-bottom: 24px;
|
| 30 |
}
|
| 31 |
|
|
|
|
| 309 |
.sidebar::-webkit-scrollbar-thumb:hover {
|
| 310 |
background: #71717a;
|
| 311 |
}
|
|
|
|
| 312 |
@media (max-width: 768px) {
|
| 313 |
.sidebar {
|
| 314 |
transform: translateX(-100%);
|
| 315 |
+
width: 260px;
|
| 316 |
}
|
| 317 |
|
| 318 |
.sidebar.active {
|
| 319 |
transform: translateX(0);
|
| 320 |
}
|
| 321 |
}
|
| 322 |
+
</style>
|
| 323 |
|
| 324 |
<nav class="sidebar">
|
| 325 |
<div class="sidebar-header">
|
|
|
|
| 329 |
|
| 330 |
<div class="sidebar-buttons">
|
| 331 |
<button onclick="startNewChat()" class="new-chat-btn">
|
| 332 |
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 333 |
<path d="M12 5v14m-7-7h14"/>
|
| 334 |
</svg>
|
| 335 |
<span>New Chat</span>
|
| 336 |
</button>
|
| 337 |
+
<button onclick="window.location.href='/media'" class="sidebar-btn">
|
| 338 |
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 339 |
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
|
| 340 |
<circle cx="8.5" cy="8.5" r="1.5"/>
|
index.html
CHANGED
|
@@ -64,7 +64,7 @@
|
|
| 64 |
<custom-sidebar></custom-sidebar>
|
| 65 |
<custom-sidebar></custom-sidebar>
|
| 66 |
<!-- Main Chat Area -->
|
| 67 |
-
<main class="flex-1 flex flex-col bg-zinc-950 relative overflow-hidden max-h-full ml-[
|
| 68 |
<!-- Chat Header -->
|
| 69 |
<div class="bg-zinc-900/30 backdrop-blur-lg border-b border-zinc-800 p-4 flex items-center justify-between">
|
| 70 |
<div class="flex items-center space-x-3">
|
|
|
|
| 64 |
<custom-sidebar></custom-sidebar>
|
| 65 |
<custom-sidebar></custom-sidebar>
|
| 66 |
<!-- Main Chat Area -->
|
| 67 |
+
<main class="flex-1 flex flex-col bg-zinc-950 relative overflow-hidden max-h-full ml-[260px]">
|
| 68 |
<!-- Chat Header -->
|
| 69 |
<div class="bg-zinc-900/30 backdrop-blur-lg border-b border-zinc-800 p-4 flex items-center justify-between">
|
| 70 |
<div class="flex items-center space-x-3">
|
style.css
CHANGED
|
@@ -163,7 +163,7 @@ main {
|
|
| 163 |
/* Desktop Responsive */
|
| 164 |
@media (min-width: 769px) {
|
| 165 |
main {
|
| 166 |
-
margin-left:
|
| 167 |
}
|
| 168 |
}
|
| 169 |
/* Loading Skeleton */
|
|
|
|
| 163 |
/* Desktop Responsive */
|
| 164 |
@media (min-width: 769px) {
|
| 165 |
main {
|
| 166 |
+
margin-left: 260px;
|
| 167 |
}
|
| 168 |
}
|
| 169 |
/* Loading Skeleton */
|