Загрузить файлы в «static»
This commit is contained in:
parent
b12b745d2e
commit
3a36e69921
4 changed files with 1329 additions and 0 deletions
810
static/style.css
Normal file
810
static/style.css
Normal file
|
|
@ -0,0 +1,810 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root {
|
||||
--primary-color: #0084ff;
|
||||
--primary-hover: #0073e6;
|
||||
--bg-color: #f0f2f5;
|
||||
--white: #ffffff;
|
||||
--border-color: #e0e0e0;
|
||||
--text-primary: #1a1a1a;
|
||||
--text-secondary: #65676b;
|
||||
--message-sent: #0084ff;
|
||||
--message-received: #ffffff;
|
||||
--sidebar-width: 320px;
|
||||
--header-height: 60px;
|
||||
--input-height: 70px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
background: var(--bg-color);
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* Auth Screen */
|
||||
.auth-screen {
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.auth-container {
|
||||
background: var(--white);
|
||||
border-radius: 16px;
|
||||
padding: 40px;
|
||||
width: 100%;
|
||||
max-width: 420px;
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.auth-container h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
color: var(--text-primary);
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.tab {
|
||||
flex: 1;
|
||||
padding: 12px;
|
||||
border: 2px solid #e0e0e0;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
border-radius: 10px;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.tab:hover {
|
||||
border-color: var(--primary-color);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.tab.active {
|
||||
background: var(--primary-color);
|
||||
color: var(--white);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.auth-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.auth-form input {
|
||||
padding: 14px 16px;
|
||||
border: 2px solid #e8e8e8;
|
||||
border-radius: 10px;
|
||||
font-size: 16px;
|
||||
transition: all 0.3s;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.auth-form input:focus {
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.1);
|
||||
}
|
||||
|
||||
.auth-form button {
|
||||
padding: 14px;
|
||||
background: var(--primary-color);
|
||||
color: var(--white);
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
transition: all 0.3s;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.auth-form button:hover {
|
||||
background: var(--primary-hover);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(0, 132, 255, 0.4);
|
||||
}
|
||||
|
||||
.auth-form button:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.auth-error {
|
||||
margin-top: 15px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
/* Chat Layout */
|
||||
.chat-screen {
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #e8eaed;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
width: 100%;
|
||||
background: var(--white);
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar {
|
||||
width: var(--sidebar-width);
|
||||
border-right: 1px solid var(--border-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #f8f9fa;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
height: var(--header-height);
|
||||
padding: 0 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
background: var(--white);
|
||||
}
|
||||
|
||||
#current-username {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#admin-btn {
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
padding: 5px 10px;
|
||||
border-radius: 8px;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
#admin-btn:hover {
|
||||
background: #e8e8e8;
|
||||
}
|
||||
|
||||
.users-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.users-list::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.users-list::-webkit-scrollbar-thumb {
|
||||
background: #ccc;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.user-item {
|
||||
padding: 15px 20px;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
transition: all 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.user-item:hover {
|
||||
background: #e8eaed;
|
||||
}
|
||||
|
||||
.user-item.active {
|
||||
background: #e7f3ff;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
padding-left: 17px;
|
||||
}
|
||||
|
||||
.user-item .status {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
background: #31a24c;
|
||||
flex-shrink: 0;
|
||||
box-shadow: 0 0 0 3px rgba(49, 162, 76, 0.2);
|
||||
}
|
||||
|
||||
.user-item .username {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Chat Area */
|
||||
.chat-area {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
background: var(--white);
|
||||
}
|
||||
|
||||
.chat-header {
|
||||
height: var(--header-height);
|
||||
padding: 0 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
background: var(--white);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.messages {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 20px;
|
||||
background: #f5f5f5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.messages::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.messages::-webkit-scrollbar-thumb {
|
||||
background: #ccc;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.message {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
animation: fadeIn 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.message.sent {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.message.received {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
max-width: 65%;
|
||||
padding: 10px 16px;
|
||||
border-radius: 18px;
|
||||
word-wrap: break-word;
|
||||
position: relative;
|
||||
line-height: 1.4;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.message.sent .message-content {
|
||||
background: var(--message-sent);
|
||||
color: var(--white);
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.message.received .message-content {
|
||||
background: var(--message-received);
|
||||
color: var(--text-primary);
|
||||
border-bottom-left-radius: 4px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.message-username {
|
||||
font-size: 12px;
|
||||
color: #65676b;
|
||||
margin-bottom: 4px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.message-time {
|
||||
font-size: 11px;
|
||||
opacity: 0.7;
|
||||
margin-top: 4px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.message.sent .message-time {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
.message.received .message-time {
|
||||
color: #65676b;
|
||||
}
|
||||
|
||||
/* Input Area */
|
||||
.message-input {
|
||||
height: var(--input-height);
|
||||
padding: 10px 20px;
|
||||
background: var(--white);
|
||||
border-top: 1px solid var(--border-color);
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.message-input input {
|
||||
flex: 1;
|
||||
padding: 12px 20px;
|
||||
border: 2px solid #e8e8e8;
|
||||
border-radius: 24px;
|
||||
font-size: 15px;
|
||||
outline: none;
|
||||
transition: all 0.3s;
|
||||
background: #f0f2f5;
|
||||
}
|
||||
|
||||
.message-input input:focus {
|
||||
border-color: var(--primary-color);
|
||||
background: var(--white);
|
||||
box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.1);
|
||||
}
|
||||
|
||||
.message-input input:disabled {
|
||||
background: #f5f5f5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
#send-btn {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
padding: 0;
|
||||
font-size: 20px;
|
||||
background: var(--primary-color);
|
||||
color: var(--white);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#send-btn:hover:not(:disabled) {
|
||||
background: var(--primary-hover);
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 2px 8px rgba(0, 132, 255, 0.4);
|
||||
}
|
||||
|
||||
#send-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.empty-chat {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #65676b;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.empty-chat-icon {
|
||||
font-size: 64px;
|
||||
margin-bottom: 20px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.empty-chat-text {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Admin Panel Modal */
|
||||
.modal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100dvh;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
animation: fadeIn 0.3s;
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: var(--white);
|
||||
border-radius: 16px;
|
||||
padding: 30px;
|
||||
max-width: 500px;
|
||||
width: 90%;
|
||||
max-height: 80vh;
|
||||
max-height: 80dvh;
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.modal-content h3 {
|
||||
margin-bottom: 20px;
|
||||
font-size: 20px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.admin-user-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.admin-user-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.admin-user-item .user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.admin-user-item .status-badge {
|
||||
font-size: 12px;
|
||||
padding: 4px 10px;
|
||||
border-radius: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.status-active {
|
||||
background: #e8f5e9;
|
||||
color: #2e7d32;
|
||||
}
|
||||
|
||||
.status-inactive {
|
||||
background: #fce4ec;
|
||||
color: #c62828;
|
||||
}
|
||||
|
||||
.admin-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.toggle-btn {
|
||||
padding: 8px 16px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.toggle-btn.activate {
|
||||
background: #4caf50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.toggle-btn.activate:hover {
|
||||
background: #388e3c;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
|
||||
}
|
||||
|
||||
.toggle-btn.deactivate {
|
||||
background: #f44336;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.toggle-btn.deactivate:hover {
|
||||
background: #d32f2f;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
background: #f0f2f5;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.close-btn:hover {
|
||||
background: #e4e6e9;
|
||||
}
|
||||
|
||||
/* Mobile Back Button */
|
||||
.mobile-back-btn {
|
||||
display: none;
|
||||
margin-right: 15px;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
border-radius: 8px;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.mobile-back-btn:hover {
|
||||
background: #e8e8e8;
|
||||
}
|
||||
|
||||
/* Desktop styles (≥ 769px) */
|
||||
@media (min-width: 769px) {
|
||||
.container {
|
||||
max-width: 1400px;
|
||||
height: calc(100vh - 40px);
|
||||
height: calc(100dvh - 40px);
|
||||
margin: 20px auto;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chat-screen {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
max-width: 55%;
|
||||
}
|
||||
|
||||
.empty-chat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.message-input {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tablet styles (481px - 768px) */
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
z-index: 10;
|
||||
transition: transform 0.3s ease;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.sidebar.hidden {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
.chat-area {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mobile-back-btn {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.chat-header {
|
||||
cursor: default;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
.message-input {
|
||||
padding: 10px 15px 20px 15px;
|
||||
padding-bottom: max(20px, env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.users-list {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile styles (≤ 480px) */
|
||||
@media (max-width: 480px) {
|
||||
.auth-container {
|
||||
padding: 25px 20px;
|
||||
max-height: 90dvh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.auth-container h2 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.tab {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.auth-form input {
|
||||
padding: 12px 14px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.auth-form button {
|
||||
padding: 12px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.user-item {
|
||||
padding: 12px 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.chat-header {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.messages {
|
||||
padding: 15px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
max-width: 85%;
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.message-input {
|
||||
height: auto;
|
||||
min-height: 60px;
|
||||
padding: 8px 12px 15px 12px;
|
||||
padding-bottom: max(15px, env(safe-area-inset-bottom));
|
||||
gap: 8px;
|
||||
background: var(--white);
|
||||
border-top: 1px solid var(--border-color);
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.message-input input {
|
||||
padding: 10px 16px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#send-btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
padding: 20px;
|
||||
max-height: 80dvh;
|
||||
}
|
||||
|
||||
.admin-user-item {
|
||||
padding: 12px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.admin-actions {
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.toggle-btn {
|
||||
padding: 6px 12px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Landscape mode for mobile */
|
||||
@media (max-height: 500px) and (orientation: landscape) {
|
||||
.auth-container {
|
||||
padding: 20px;
|
||||
margin: 10px;
|
||||
max-height: 100dvh;
|
||||
}
|
||||
|
||||
.auth-container h2 {
|
||||
margin-bottom: 15px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.auth-form {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
max-width: 70%;
|
||||
}
|
||||
|
||||
.message-input {
|
||||
min-height: 50px;
|
||||
padding: 5px 15px 10px 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Для очень маленьких экранов */
|
||||
@media (max-width: 320px) {
|
||||
.message-input {
|
||||
padding: 5px 8px 12px 8px;
|
||||
}
|
||||
|
||||
.message-input input {
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
max-width: 90%;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue