fix: Adjust chat height for admin bar (#21)

- Added CSS variable --header-height (109px for admin, 73px for regular users)
- Fixed chat container height calculation to account for admin bar
- Fixed mobile sidebar position

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-01-31 19:40:58 +01:00
parent 333dc20717
commit 009bcbfc72

View File

@ -7,6 +7,11 @@
{% block extra_css %}
<style>
/* Reset dla pełnoekranowego chatu jak ChatGPT/Claude */
:root {
/* Wysokość nagłówka: 73px navbar + 36px admin bar (jeśli admin) */
--header-height: {% if current_user.is_authenticated and current_user.is_admin %}109px{% else %}73px{% endif %};
}
html, body {
overflow: hidden !important; /* Blokada scrollowania strony */
height: 100% !important;
@ -21,8 +26,8 @@
padding: 0 !important;
display: flex;
flex-direction: column;
height: calc(100vh - 73px) !important; /* Wysokość minus navbar */
max-height: calc(100vh - 73px) !important;
height: calc(100vh - var(--header-height)) !important; /* Wysokość minus navbar (+ admin bar) */
max-height: calc(100vh - var(--header-height)) !important;
overflow: hidden !important;
}
@ -568,7 +573,7 @@
.chat-sidebar {
display: none;
position: fixed;
top: 73px;
top: var(--header-height);
left: 0;
bottom: 0;
z-index: 100;