GitHub Copilot commited on
Commit
69a2d1e
·
1 Parent(s): cf95c2f

Restore old settings modal and desktop/mobile menu behavior

Browse files
Files changed (1) hide show
  1. static/index.html +61 -9
static/index.html CHANGED
@@ -70,11 +70,20 @@
70
  /* Sidebar */
71
  .sidebar {
72
  width: 260px;
 
73
  background: var(--bg-sidebar);
74
  border-right: 1px solid var(--border);
75
  display: flex;
76
  flex-direction: column;
77
- transition: transform 0.3s, background 0.3s;
 
 
 
 
 
 
 
 
78
  }
79
 
80
  .sidebar-header {
@@ -1439,13 +1448,39 @@
1439
  <!-- Connection Modal -->
1440
  <div class="modal-overlay" id="connectModal">
1441
  <div class="modal">
1442
- <h3 class="modal-title">Connect to Krish Mind Server</h3>
1443
- <p class="modal-subtitle">Enter your Colab ngrok URL to start chatting</p>
1444
- <input type="text" class="modal-input" id="serverUrlInput"
1445
- placeholder="https://xxxx-xx-xx-xxx-xx.ngrok-free.app">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1446
  <div class="modal-actions">
1447
- <button class="modal-btn secondary" onclick="hideConnectModal()">Cancel</button>
1448
- <button class="modal-btn primary" onclick="connectToServer()">Connect</button>
1449
  </div>
1450
  </div>
1451
  </div>
@@ -1562,16 +1597,33 @@
1562
  }
1563
  }
1564
 
 
 
 
 
 
 
 
 
1565
  // Sidebar toggle
1566
  function toggleSidebar() {
1567
- document.getElementById('sidebar').classList.toggle('open');
 
 
 
 
 
 
 
1568
  }
1569
 
1570
  // Close sidebar when clicking outside (mobile)
1571
  document.addEventListener('click', (e) => {
1572
  const sidebar = document.getElementById('sidebar');
1573
  const menuBtn = document.getElementById('menuBtn');
1574
- if (sidebar.classList.contains('open') &&
 
 
1575
  !sidebar.contains(e.target) &&
1576
  !menuBtn.contains(e.target)) {
1577
  sidebar.classList.remove('open');
 
70
  /* Sidebar */
71
  .sidebar {
72
  width: 260px;
73
+ min-width: 260px;
74
  background: var(--bg-sidebar);
75
  border-right: 1px solid var(--border);
76
  display: flex;
77
  flex-direction: column;
78
+ transition: all 0.3s ease;
79
+ flex-shrink: 0;
80
+ }
81
+
82
+ .sidebar.hidden {
83
+ width: 0;
84
+ min-width: 0;
85
+ border-right: none;
86
+ overflow: hidden;
87
  }
88
 
89
  .sidebar-header {
 
1448
  <!-- Connection Modal -->
1449
  <div class="modal-overlay" id="connectModal">
1450
  <div class="modal">
1451
+ <h3 class="modal-title">Connect with Krish CS</h3>
1452
+ <p class="modal-subtitle">Developer of Krish Mind AI</p>
1453
+ <div style="display: flex; flex-direction: column; gap: 12px; margin: 20px 0;">
1454
+ <a href="https://youtube.com/@krishcs-2025?si=-BtwEntUrJ0Si1XG" target="_blank"
1455
+ style="display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text-primary); transition: all 0.2s;"
1456
+ onmouseover="this.style.borderColor='#FF0000'" onmouseout="this.style.borderColor='var(--border)'">
1457
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="#FF0000">
1458
+ <path
1459
+ d="M19.615 3.184c-3.604-.246-11.631-.245-15.23 0-3.897.266-4.356 2.62-4.385 8.816.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0 3.897-.266 4.356-2.62 4.385-8.816-.029-6.185-.484-8.549-4.385-8.816zm-10.615 12.816v-8l8 3.993-8 4.007z" />
1460
+ </svg>
1461
+ <span style="font-size: 14px; font-weight: 500;">YouTube</span>
1462
+ </a>
1463
+ <a href="https://www.linkedin.com/in/krishkanth-k-79b4422a4" target="_blank"
1464
+ style="display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text-primary); transition: all 0.2s;"
1465
+ onmouseover="this.style.borderColor='#0A66C2'" onmouseout="this.style.borderColor='var(--border)'">
1466
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="#0A66C2">
1467
+ <path
1468
+ d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
1469
+ </svg>
1470
+ <span style="font-size: 14px; font-weight: 500;">LinkedIn</span>
1471
+ </a>
1472
+ <a href="mailto:krishkanthkrce@gmail.com"
1473
+ style="display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text-primary); transition: all 0.2s;"
1474
+ onmouseover="this.style.borderColor='#40c9c9'" onmouseout="this.style.borderColor='var(--border)'">
1475
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#40c9c9" stroke-width="2">
1476
+ <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" />
1477
+ <polyline points="22,6 12,13 2,6" />
1478
+ </svg>
1479
+ <span style="font-size: 14px; font-weight: 500;">Email</span>
1480
+ </a>
1481
+ </div>
1482
  <div class="modal-actions">
1483
+ <button class="modal-btn primary" onclick="hideConnectModal()">Close</button>
 
1484
  </div>
1485
  </div>
1486
  </div>
 
1597
  }
1598
  }
1599
 
1600
+ function showConnectModal() {
1601
+ document.getElementById('connectModal').classList.add('show');
1602
+ }
1603
+
1604
+ function hideConnectModal() {
1605
+ document.getElementById('connectModal').classList.remove('show');
1606
+ }
1607
+
1608
  // Sidebar toggle
1609
  function toggleSidebar() {
1610
+ const sidebar = document.getElementById('sidebar');
1611
+ const isMobile = window.innerWidth <= 768;
1612
+
1613
+ if (isMobile) {
1614
+ sidebar.classList.toggle('open');
1615
+ } else {
1616
+ sidebar.classList.toggle('hidden');
1617
+ }
1618
  }
1619
 
1620
  // Close sidebar when clicking outside (mobile)
1621
  document.addEventListener('click', (e) => {
1622
  const sidebar = document.getElementById('sidebar');
1623
  const menuBtn = document.getElementById('menuBtn');
1624
+ const isMobile = window.innerWidth <= 768;
1625
+
1626
+ if (isMobile && sidebar.classList.contains('open') &&
1627
  !sidebar.contains(e.target) &&
1628
  !menuBtn.contains(e.target)) {
1629
  sidebar.classList.remove('open');