Mark-Lasfar
commited on
Commit
·
8879157
1
Parent(s):
eda75b2
add chat
Browse files- static/css/chat/style.css +1 -12
- static/css/footer.css +3 -2
- static/css/style.css +27 -4
- static/css/webkit.css +1 -1
- templates/chat.html +5 -5
static/css/chat/style.css
CHANGED
|
@@ -1,15 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
font-weight: 700;
|
| 3 |
-
font-size: 1rem;
|
| 4 |
-
color: #e6eefc;
|
| 5 |
-
display: flex;
|
| 6 |
-
align-items: center;
|
| 7 |
-
gap: 0.5rem;
|
| 8 |
-
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
| 9 |
-
white-space: nowrap;
|
| 10 |
-
overflow: hidden;
|
| 11 |
-
text-overflow: ellipsis;
|
| 12 |
-
}
|
| 13 |
|
| 14 |
#chatArea {
|
| 15 |
display: flex !important;
|
|
|
|
| 1 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
#chatArea {
|
| 4 |
display: flex !important;
|
static/css/footer.css
CHANGED
|
@@ -15,7 +15,8 @@
|
|
| 15 |
box-sizing: border-box;
|
| 16 |
position: sticky;
|
| 17 |
bottom: 0;
|
| 18 |
-
z-index: 1000;
|
|
|
|
| 19 |
animation: fadeIn 0.3s ease-out forwards;
|
| 20 |
}
|
| 21 |
|
|
@@ -29,4 +30,4 @@
|
|
| 29 |
max-width: 100%;
|
| 30 |
padding: 0.5rem;
|
| 31 |
}
|
| 32 |
-
}
|
|
|
|
| 15 |
box-sizing: border-box;
|
| 16 |
position: sticky;
|
| 17 |
bottom: 0;
|
| 18 |
+
z-index: 1000; /* زيادة الأولوية */
|
| 19 |
+
min-height: 60px; /* تأمين ارتفاع أدنى */
|
| 20 |
animation: fadeIn 0.3s ease-out forwards;
|
| 21 |
}
|
| 22 |
|
|
|
|
| 30 |
max-width: 100%;
|
| 31 |
padding: 0.5rem;
|
| 32 |
}
|
| 33 |
+
}
|
static/css/style.css
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
html, body {
|
| 13 |
width: 100%;
|
| 14 |
height: 100%;
|
| 15 |
-
overflow-x: hidden;
|
| 16 |
font-family: 'Inter', sans-serif;
|
| 17 |
font-size: 1rem;
|
| 18 |
-webkit-font-smoothing: antialiased;
|
|
@@ -24,8 +24,7 @@ body {
|
|
| 24 |
flex-direction: column;
|
| 25 |
background-color: var(--background-dark);
|
| 26 |
color: var(--text-dark);
|
| 27 |
-
overflow: hidden;
|
| 28 |
-
word-wrap: break-word;
|
| 29 |
}
|
| 30 |
|
| 31 |
:root {
|
|
@@ -48,7 +47,7 @@ main {
|
|
| 48 |
display: flex;
|
| 49 |
flex-direction: column;
|
| 50 |
margin-top: var(--header-height);
|
| 51 |
-
height: calc(100vh - var(--header-height));
|
| 52 |
overflow: hidden;
|
| 53 |
}
|
| 54 |
|
|
@@ -68,6 +67,30 @@ main {
|
|
| 68 |
animation: fadeIn 0.8s ease-out forwards;
|
| 69 |
}
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
.title {
|
| 72 |
font-size: clamp(1.5rem, 4vw, 2.5rem);
|
| 73 |
font-weight: 800;
|
|
|
|
| 12 |
html, body {
|
| 13 |
width: 100%;
|
| 14 |
height: 100%;
|
| 15 |
+
overflow-x: hidden; /* تغيير من overflow: hidden */
|
| 16 |
font-family: 'Inter', sans-serif;
|
| 17 |
font-size: 1rem;
|
| 18 |
-webkit-font-smoothing: antialiased;
|
|
|
|
| 24 |
flex-direction: column;
|
| 25 |
background-color: var(--background-dark);
|
| 26 |
color: var(--text-dark);
|
| 27 |
+
overflow-x: hidden; /* لمنع التمرير الأفقي فقط */
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
:root {
|
|
|
|
| 47 |
display: flex;
|
| 48 |
flex-direction: column;
|
| 49 |
margin-top: var(--header-height);
|
| 50 |
+
height: calc(100vh - var(--header-height) - var(--footer-height)); /* إضافة ارتفاع الفوتر */
|
| 51 |
overflow: hidden;
|
| 52 |
}
|
| 53 |
|
|
|
|
| 67 |
animation: fadeIn 0.8s ease-out forwards;
|
| 68 |
}
|
| 69 |
|
| 70 |
+
#chatArea {
|
| 71 |
+
flex: 1;
|
| 72 |
+
display: flex;
|
| 73 |
+
flex-direction: column;
|
| 74 |
+
overflow-y: auto; /* تمكين التمرير العمودي */
|
| 75 |
+
width: 100%;
|
| 76 |
+
box-sizing: border-box;
|
| 77 |
+
padding: 1rem;
|
| 78 |
+
background: transparent;
|
| 79 |
+
max-height: calc(100vh - var(--header-height) - var(--footer-height) - 6rem); /* تحديد ارتفاع صافي */
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
#chatBox {
|
| 83 |
+
display: flex;
|
| 84 |
+
flex-direction: column;
|
| 85 |
+
width: 100%;
|
| 86 |
+
max-width: 800px;
|
| 87 |
+
margin: 0 auto;
|
| 88 |
+
padding: 0.75rem;
|
| 89 |
+
box-sizing: border-box;
|
| 90 |
+
overflow-y: auto; /* تمكين التمرير العمودي */
|
| 91 |
+
max-height: calc(100vh - var(--header-height) - var(--footer-height) - 8rem); /* تحديد ارتفاع صافي */
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
.title {
|
| 95 |
font-size: clamp(1.5rem, 4vw, 2.5rem);
|
| 96 |
font-weight: 800;
|
static/css/webkit.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
| 32 |
}
|
| 33 |
|
| 34 |
#chatBox::-webkit-scrollbar-track {
|
| 35 |
-
background: transparent
|
| 36 |
}
|
| 37 |
|
| 38 |
#chatBox::-webkit-scrollbar-thumb {
|
|
|
|
| 32 |
}
|
| 33 |
|
| 34 |
#chatBox::-webkit-scrollbar-track {
|
| 35 |
+
background: rgba(255, 255, 255, 0.05); /* تغيير من transparent */
|
| 36 |
}
|
| 37 |
|
| 38 |
#chatBox::-webkit-scrollbar-thumb {
|
templates/chat.html
CHANGED
|
@@ -296,11 +296,13 @@
|
|
| 296 |
continue.
|
| 297 |
</div>
|
| 298 |
</div>
|
| 299 |
-
<div id="chatArea" class="flex-1 overflow-y-auto hidden" aria-live="polite">
|
| 300 |
-
|
| 301 |
</div>
|
|
|
|
| 302 |
</div>
|
| 303 |
-
|
|
|
|
| 304 |
<form id="footerForm" class="flex p-4">
|
| 305 |
<div id="inputContainer" class="w-full">
|
| 306 |
<textarea id="userInput" placeholder="Ask anything..." required></textarea>
|
|
@@ -338,7 +340,6 @@
|
|
| 338 |
<div id="filePreview" class="upload-preview" style="display: none;"></div>
|
| 339 |
<div id="audioPreview" class="audio-preview" style="display: none;"></div>
|
| 340 |
</form>
|
| 341 |
-
</main>
|
| 342 |
|
| 343 |
<!-- Settings Modal -->
|
| 344 |
<div id="settingsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
|
@@ -415,7 +416,6 @@
|
|
| 415 |
<button onclick="document.getElementById('pwa-instructions').classList.add('hidden')"
|
| 416 |
class="ml-2 text-sm">Close</button>
|
| 417 |
</div>
|
| 418 |
-
</div>
|
| 419 |
|
| 420 |
<!-- Scripts -->
|
| 421 |
<script src="/static/js/chat.js?v=1.2"></script>
|
|
|
|
| 296 |
continue.
|
| 297 |
</div>
|
| 298 |
</div>
|
| 299 |
+
<div id="chatArea" class="flex-1 overflow-y-auto hidden" aria-live="polite">
|
| 300 |
+
<div id="chatBox" class="flex flex-col w-full" aria-live="polite"></div>
|
| 301 |
</div>
|
| 302 |
+
</main>
|
| 303 |
</div>
|
| 304 |
+
|
| 305 |
+
<!-- Footer Form (منقول خارج main) -->
|
| 306 |
<form id="footerForm" class="flex p-4">
|
| 307 |
<div id="inputContainer" class="w-full">
|
| 308 |
<textarea id="userInput" placeholder="Ask anything..." required></textarea>
|
|
|
|
| 340 |
<div id="filePreview" class="upload-preview" style="display: none;"></div>
|
| 341 |
<div id="audioPreview" class="audio-preview" style="display: none;"></div>
|
| 342 |
</form>
|
|
|
|
| 343 |
|
| 344 |
<!-- Settings Modal -->
|
| 345 |
<div id="settingsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
|
|
|
| 416 |
<button onclick="document.getElementById('pwa-instructions').classList.add('hidden')"
|
| 417 |
class="ml-2 text-sm">Close</button>
|
| 418 |
</div>
|
|
|
|
| 419 |
|
| 420 |
<!-- Scripts -->
|
| 421 |
<script src="/static/js/chat.js?v=1.2"></script>
|