AnatoliiG commited on
Commit ·
14bdcff
1
Parent(s): 9f87737
Update styles.py
Browse files- src/ui/styles.py +20 -3
src/ui/styles.py
CHANGED
|
@@ -4,14 +4,17 @@ html, body {
|
|
| 4 |
background-color: #212121 !important;
|
| 5 |
margin: 0 !important;
|
| 6 |
padding: 0 !important;
|
| 7 |
-
height: 100vh !important;
|
| 8 |
-
overflow: hidden !important; /*
|
| 9 |
}
|
| 10 |
|
| 11 |
.gradio-container {
|
| 12 |
background-color: #212121 !important;
|
| 13 |
margin: 0 !important;
|
| 14 |
padding: 0 !important;
|
|
|
|
|
|
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
/* 2. Главный ряд */
|
|
@@ -19,6 +22,9 @@ html, body {
|
|
| 19 |
margin: 0 !important;
|
| 20 |
gap: 0 !important;
|
| 21 |
background-color: #212121 !important;
|
|
|
|
|
|
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
/* 3. Боковая панель */
|
|
@@ -26,9 +32,11 @@ html, body {
|
|
| 26 |
background-color: #171717 !important;
|
| 27 |
border-right: 1px solid #2f2f2f !important;
|
| 28 |
padding: 1.5rem 1.25rem !important;
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
-
/* Кнопк
|
| 32 |
.sidebar-parent button.toggle-button,
|
| 33 |
.sidebar-parent > button {
|
| 34 |
background-color: #171717 !important;
|
|
@@ -55,6 +63,10 @@ html, body {
|
|
| 55 |
background-color: #212121 !important;
|
| 56 |
padding: 0 !important;
|
| 57 |
margin: 0 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
}
|
| 59 |
|
| 60 |
/* Стилизация компонента Chatbot */
|
|
@@ -65,11 +77,14 @@ html, body {
|
|
| 65 |
max-width: 800px !important;
|
| 66 |
margin: 0 auto !important;
|
| 67 |
width: 100% !important;
|
|
|
|
|
|
|
| 68 |
}
|
| 69 |
|
| 70 |
#chatbot > .wrapper {
|
| 71 |
background: transparent !important;
|
| 72 |
border: none !important;
|
|
|
|
| 73 |
}
|
| 74 |
|
| 75 |
/* 5. Настройки пузырей сообщений и текста */
|
|
@@ -117,10 +132,12 @@ html, body {
|
|
| 117 |
/* 6. Поле ввода (ChatGPT стиль) */
|
| 118 |
#input-area {
|
| 119 |
max-width: 800px !important;
|
|
|
|
| 120 |
margin: 0 auto 1.5rem auto !important;
|
| 121 |
padding: 0 1rem !important;
|
| 122 |
background: transparent !important;
|
| 123 |
border: none !important;
|
|
|
|
| 124 |
}
|
| 125 |
|
| 126 |
#input-area > div,
|
|
|
|
| 4 |
background-color: #212121 !important;
|
| 5 |
margin: 0 !important;
|
| 6 |
padding: 0 !important;
|
| 7 |
+
height: 100vh !important;
|
| 8 |
+
overflow: hidden !important; /* Блокируем внешний скролл */
|
| 9 |
}
|
| 10 |
|
| 11 |
.gradio-container {
|
| 12 |
background-color: #212121 !important;
|
| 13 |
margin: 0 !important;
|
| 14 |
padding: 0 !important;
|
| 15 |
+
height: 100vh !important; /* Жестко 100% экрана */
|
| 16 |
+
max-width: 100% !important;
|
| 17 |
+
overflow: hidden !important;
|
| 18 |
}
|
| 19 |
|
| 20 |
/* 2. Главный ряд */
|
|
|
|
| 22 |
margin: 0 !important;
|
| 23 |
gap: 0 !important;
|
| 24 |
background-color: #212121 !important;
|
| 25 |
+
height: 100% !important;
|
| 26 |
+
flex-wrap: nowrap !important; /* Запрещаем перенос колонки чата под сайдбар */
|
| 27 |
+
min-height: 0 !important;
|
| 28 |
}
|
| 29 |
|
| 30 |
/* 3. Боковая панель */
|
|
|
|
| 32 |
background-color: #171717 !important;
|
| 33 |
border-right: 1px solid #2f2f2f !important;
|
| 34 |
padding: 1.5rem 1.25rem !important;
|
| 35 |
+
height: 100% !important;
|
| 36 |
+
overflow-y: auto !important; /* Включаем скролл внутри сайдбара, если много настроек */
|
| 37 |
}
|
| 38 |
|
| 39 |
+
/* Кнопки сайдбара оставляем как у вас... */
|
| 40 |
.sidebar-parent button.toggle-button,
|
| 41 |
.sidebar-parent > button {
|
| 42 |
background-color: #171717 !important;
|
|
|
|
| 63 |
background-color: #212121 !important;
|
| 64 |
padding: 0 !important;
|
| 65 |
margin: 0 !important;
|
| 66 |
+
display: flex !important;
|
| 67 |
+
flex-direction: column !important;
|
| 68 |
+
height: 100% !important;
|
| 69 |
+
min-height: 0 !important; /* КРИТИЧЕСКИ ВАЖНО: защита от расширения колонки */
|
| 70 |
}
|
| 71 |
|
| 72 |
/* Стилизация компонента Chatbot */
|
|
|
|
| 77 |
max-width: 800px !important;
|
| 78 |
margin: 0 auto !important;
|
| 79 |
width: 100% !important;
|
| 80 |
+
flex-grow: 1 !important; /* Заставляем чат занять все свободное место над плашкой */
|
| 81 |
+
min-height: 0 !important; /* КРИТИЧЕСКИ ВАЖНО: убивает бесконечный цикл */
|
| 82 |
}
|
| 83 |
|
| 84 |
#chatbot > .wrapper {
|
| 85 |
background: transparent !important;
|
| 86 |
border: none !important;
|
| 87 |
+
min-height: 0 !important;
|
| 88 |
}
|
| 89 |
|
| 90 |
/* 5. Настройки пузырей сообщений и текста */
|
|
|
|
| 132 |
/* 6. Поле ввода (ChatGPT стиль) */
|
| 133 |
#input-area {
|
| 134 |
max-width: 800px !important;
|
| 135 |
+
width: 100% !important;
|
| 136 |
margin: 0 auto 1.5rem auto !important;
|
| 137 |
padding: 0 1rem !important;
|
| 138 |
background: transparent !important;
|
| 139 |
border: none !important;
|
| 140 |
+
flex-shrink: 0 !important; /* КРИТИЧЕСКИ ВАЖНО: запрещает чату сжимать и выталкивать плашку */
|
| 141 |
}
|
| 142 |
|
| 143 |
#input-area > div,
|