File size: 5,194 Bytes
5ac8480
 
 
 
 
d97f988
5ac8480
 
 
 
 
73165ec
5ac8480
d97f988
73165ec
 
 
 
 
 
 
 
d97f988
73165ec
 
 
 
 
 
 
d97f988
73165ec
5ac8480
73165ec
 
5ac8480
d97f988
 
5ac8480
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73165ec
 
 
 
 
 
 
 
5ac8480
 
73165ec
5ac8480
 
 
d97f988
 
 
 
 
 
 
 
 
5ac8480
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
122
123
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Sebayhi</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=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600&display=swap" rel="stylesheet" />
  <link rel="stylesheet" href="/static/style.css" />
</head>
<body data-mode="knowledge" data-theme="dark">

  <!-- Mobile top bar (visible on mobile only) -->
  <div class="mobile-topbar">
    <button class="mobile-menu-btn" id="mobileMenuBtn" aria-label="Open sidebar">
      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
        <line x1="3" y1="6" x2="21" y2="6"/>
        <line x1="3" y1="12" x2="21" y2="12"/>
        <line x1="3" y1="18" x2="21" y2="18"/>
      </svg>
    </button>
    <span class="mobile-brand">سيبويه · Sebayhi</span>
    <button class="mobile-theme-btn" id="mobileThemeBtn" aria-label="Toggle theme">
      <svg id="mobileThemeIcon" viewBox="0 0 20 20" fill="currentColor">
        <path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"/>
      </svg>
    </button>
  </div>

  <!-- Sidebar overlay (mobile) -->
  <div class="sidebar-overlay" id="sidebarOverlay"></div>

  <!-- SIDEBAR -->
  <aside class="sidebar" id="sidebar">
    <div class="sidebar-brand">
      <span class="sidebar-brand-ar">سيبويه</span>
      <span class="sidebar-brand-en">Sebayhi</span>
    </div>

    <div class="sidebar-section">
      <p class="sidebar-section-label">Mode</p>
      <div class="mode-toggle">
        <button class="mode-btn mode-btn--active" id="modeKnowledge" data-mode="knowledge" aria-pressed="true">
          <svg viewBox="0 0 20 20" fill="currentColor"><path d="M9 4.804A7.968 7.968 0 005.5 4c-1.255 0-2.443.29-3.5.804v10A7.969 7.969 0 015.5 14c1.669 0 3.218.51 4.5 1.385A7.962 7.962 0 0114.5 14c1.255 0 2.443.29 3.5.804v-10A7.968 7.968 0 0014.5 4c-1.255 0-2.443.29-3.5.804V12a1 1 0 11-2 0V4.804z"/></svg>
          <span class="mode-btn-text">
            <span class="mode-en">Knowledge</span>
            <span class="mode-ar">معرفة</span>
          </span>
        </button>
        <button class="mode-btn" id="modeI3rab" data-mode="i3rab" aria-pressed="false">
          <svg viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z" clip-rule="evenodd"/></svg>
          <span class="mode-btn-text">
            <span class="mode-en">I3rab</span>
            <span class="mode-ar">إعراب</span>
          </span>
        </button>
      </div>
    </div>

    <button class="new-chat-btn" id="newChatBtn">
      <svg viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" clip-rule="evenodd"/></svg>
      New Chat
    </button>

    <div class="sidebar-section sidebar-history-section">
      <p class="sidebar-section-label">History</p>
      <div class="history-list" id="historyList">
        <p class="history-empty" id="historyEmpty">No conversations yet.</p>
      </div>
    </div>

    <div class="sidebar-bottom">
      <button class="theme-btn" id="themeToggle" aria-label="Toggle theme">
        <svg id="themeIcon" viewBox="0 0 20 20" fill="currentColor">
          <path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"/>
        </svg>
        <span id="themeLabel">Light mode</span>
      </button>
    </div>
  </aside>

  <!-- MAIN CHAT -->
  <main class="chat-main">
    <div class="chat-scroll" id="chatScroll">
      <div class="chat-watermark" aria-hidden="true">سيبويه</div>
      <div class="message-list" id="messageList">
        <div class="message message--assistant">
          <div class="msg-avatar">س</div>
          <div class="msg-body">
            <div class="msg-text">
              أهلاً وسهلاً — I'm Sebayhi, your Arabic grammar assistant.<br>
              Select a mode on the left, then type your message below.
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="input-bar">
      <div class="input-inner">
        <textarea
          id="userInput"
          class="input-field"
          rows="1"
          dir="auto"
          placeholder="Ask a grammar question…"
          aria-label="Message input"
        ></textarea>
        <button class="send-btn" id="sendBtn" aria-label="Send">
          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
               stroke-linecap="round" stroke-linejoin="round">
            <line x1="22" y1="2" x2="11" y2="13"/>
            <polygon points="22 2 15 22 11 13 2 9 22 2"/>
          </svg>
        </button>
      </div>
    </div>
  </main>

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