File size: 4,598 Bytes
81726c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Study Saathi</title>
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  <link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:wght@300;400;500&display=swap" rel="stylesheet" />
  <link rel="stylesheet" href="/static/css/style.css" />
  <!-- Marked.js for markdown rendering -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/9.1.6/marked.min.js"></script>
  <!-- highlight.js for code blocks -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
</head>
<body>

  <!-- Background grid -->
  <div class="bg-grid"></div>
  <div class="bg-glow"></div>

  <!-- ── Sidebar ── -->
  <aside class="sidebar" id="sidebar">
    <div class="sidebar-header">
      <div class="logo">
        <span class="logo-icon">πŸ“š</span>
        <span class="logo-text">Study<span class="accent">Saathi</span></span>
      </div>
      <button class="sidebar-close" id="sidebarClose" aria-label="Close sidebar">βœ•</button>
    </div>

    <div class="sidebar-section">
      <label class="sidebar-label">Filter by Topic</label>
      <div class="topic-input-wrap">
        <span class="topic-icon">πŸ—‚</span>
        <input
          type="text"
          id="topicInput"
          class="topic-input"
          placeholder="e.g. ch-01-updated"
        />
      </div>
      <p class="sidebar-hint">Leave empty to search all notes</p>
    </div>

    <div class="sidebar-section">
      <label class="sidebar-label">Quick Prompts</label>
      <div class="quick-prompts">
        <button class="quick-btn" data-prompt="Explain this topic in simple Roman Urdu">πŸ“– Explain Topic</button>
        <button class="quick-btn" data-prompt="Generate 5 MCQs from this topic">πŸ“ 5 MCQs</button>
        <button class="quick-btn" data-prompt="Generate 10 MCQs from this topic">πŸ“ 10 MCQs</button>
        <button class="quick-btn" data-prompt="Summarize the key points of this topic">πŸ”‘ Key Points</button>
      </div>
    </div>

    <div class="sidebar-footer">
      <p>Powered by <span class="accent">gpt-oss-120b</span></p>
      <p>RAG Β· Pinecone Β· LangChain</p>
    </div>
  </aside>

  <!-- Overlay for mobile sidebar -->
  <div class="overlay" id="overlay"></div>

  <!-- ── Main ── -->
  <main class="main">

    <!-- Top bar -->
    <header class="topbar">
      <button class="menu-btn" id="menuBtn" aria-label="Open sidebar">
        <span></span><span></span><span></span>
      </button>
      <div class="topbar-title">
        <span class="logo-icon">πŸ“š</span>
        Study<span class="accent">Saathi</span>
      </div>
      <button class="clear-btn" id="clearBtn" title="Clear chat">πŸ—‘</button>
    </header>

    <!-- Chat window -->
    <section class="chat-window" id="chatWindow">
      <!-- Welcome message -->
      <div class="message assistant" id="welcomeMsg">
        <div class="avatar">SS</div>
        <div class="bubble">
          <p>Assalam-o-Alaikum! πŸ‘‹ Main hoon <strong>Study Saathi</strong> β€” tumhara OS notes ka study partner.</p>
          <ul>
            <li>Koi bhi topic <strong>explain</strong> kara sakte ho</li>
            <li><strong>MCQs generate</strong> karo kisi bhi topic se</li>
            <li>Left sidebar se <strong>topic filter</strong> lagao</li>
          </ul>
          <p>Shuru karo! πŸš€</p>
        </div>
      </div>
    </section>

    <!-- Input area -->
    <footer class="input-area">
      <div class="input-wrap">
        <textarea
          id="queryInput"
          class="query-input"
          placeholder="Koi sawaal poochho... (e.g. Explain deadlocks, Generate 5 MCQs)"
          rows="1"
        ></textarea>
        <button class="send-btn" id="sendBtn" aria-label="Send">
          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
            <line x1="22" y1="2" x2="11" y2="13"></line>
            <polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
          </svg>
        </button>
      </div>
      <p class="input-hint">Enter to send Β· Shift+Enter for new line</p>
    </footer>

  </main>

  <script src="/static/js/design.js"></script>
</body>
</html>