Spaces:
Running
Running
| <html lang="fa" dir="rtl"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>داشبورد - چت روم</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap'); | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| :root { | |
| --glass-bg: rgba(255, 255, 255, 0.08); | |
| --glass-border: rgba(255, 255, 255, 0.18); | |
| --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); | |
| --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); | |
| --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); | |
| --text-primary: rgba(255, 255, 255, 0.95); | |
| --text-secondary: rgba(255, 255, 255, 0.7); | |
| --text-muted: rgba(255, 255, 255, 0.5); | |
| --success-color: #00d9a5; | |
| --warning-color: #ffb800; | |
| --danger-color: #ff4757; | |
| } | |
| body { | |
| font-family: 'Vazirmatn', 'Segoe UI', sans-serif; | |
| min-height: 100vh; | |
| background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #1a1a2e); | |
| background-size: 400% 400%; | |
| animation: gradientShift 15s ease infinite; | |
| color: var(--text-primary); | |
| overflow-x: hidden; | |
| position: relative; | |
| } | |
| @keyframes gradientShift { | |
| 0% { background-position: 0% 50%; } | |
| 50% { background-position: 100% 50%; } | |
| 100% { background-position: 0% 50%; } | |
| } | |
| body::before { | |
| content: ''; | |
| position: fixed; | |
| top: -50%; | |
| left: -20%; | |
| width: 70%; | |
| height: 100%; | |
| background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%); | |
| border-radius: 50%; | |
| filter: blur(100px); | |
| z-index: -1; | |
| animation: floatOrb 20s ease-in-out infinite; | |
| } | |
| body::after { | |
| content: ''; | |
| position: fixed; | |
| bottom: -30%; | |
| right: -10%; | |
| width: 60%; | |
| height: 80%; | |
| background: radial-gradient(circle, rgba(240, 147, 251, 0.25) 0%, transparent 70%); | |
| border-radius: 50%; | |
| filter: blur(120px); | |
| z-index: -1; | |
| animation: floatOrb 25s ease-in-out infinite reverse; | |
| } | |
| @keyframes floatOrb { | |
| 0%, 100% { transform: translate(0, 0) scale(1); } | |
| 50% { transform: translate(30px, -30px) scale(1.1); } | |
| } | |
| .dashboard-container { | |
| display: flex; | |
| min-height: 100vh; | |
| padding: 1rem; | |
| gap: 1.5rem; | |
| } | |
| .sidebar { | |
| width: 280px; | |
| min-width: 280px; | |
| background: var(--glass-bg); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 24px; | |
| padding: 1.5rem; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.5rem; | |
| box-shadow: var(--glass-shadow); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .sidebar::before { | |
| content: ''; | |
| position: absolute; | |
| top: -50%; | |
| left: -50%; | |
| width: 200%; | |
| height: 200%; | |
| background: radial-gradient(circle at 30% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%); | |
| animation: shimmer 8s ease-in-out infinite; | |
| } | |
| @keyframes shimmer { | |
| 0%, 100% { opacity: 0.5; transform: rotate(0deg); } | |
| 50% { opacity: 1; transform: rotate(180deg); } | |
| } | |
| .user-info { | |
| text-align: center; | |
| padding-bottom: 1.5rem; | |
| border-bottom: 1px solid var(--glass-border); | |
| position: relative; | |
| z-index: 1; | |
| } | |
| .avatar { | |
| width: 80px; | |
| height: 80px; | |
| margin: 0 auto 1rem; | |
| background: var(--primary-gradient); | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 2.5rem; | |
| color: white; | |
| box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .avatar::after { | |
| content: ''; | |
| position: absolute; | |
| inset: 0; | |
| background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%); | |
| animation: shine 3s infinite; | |
| } | |
| @keyframes shine { | |
| 0% { transform: translateX(-100%); } | |
| 100% { transform: translateX(100%); } | |
| } | |
| .user-info h3 { | |
| font-size: 1.1rem; | |
| font-weight: 600; | |
| margin-bottom: 0.25rem; | |
| } | |
| .user-info p { | |
| font-size: 0.85rem; | |
| color: var(--text-secondary); | |
| margin-bottom: 0.75rem; | |
| } | |
| .status { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.4rem; | |
| padding: 0.4rem 1rem; | |
| background: rgba(0, 217, 165, 0.15); | |
| border: 1px solid rgba(0, 217, 165, 0.3); | |
| border-radius: 20px; | |
| font-size: 0.8rem; | |
| color: var(--success-color); | |
| font-weight: 500; | |
| } | |
| .status i { | |
| font-size: 0.6rem; | |
| animation: pulse 2s ease-in-out infinite; | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 1; transform: scale(1); } | |
| 50% { opacity: 0.5; transform: scale(0.8); } | |
| } | |
| .sidebar-nav { | |
| flex: 1; | |
| position: relative; | |
| z-index: 1; | |
| } | |
| .sidebar-nav ul { | |
| list-style: none; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| } | |
| .sidebar-nav li { | |
| position: relative; | |
| } | |
| .sidebar-nav li a { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| padding: 0.875rem 1rem; | |
| color: var(--text-secondary); | |
| text-decoration: none; | |
| border-radius: 12px; | |
| transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .sidebar-nav li a::before { | |
| content: ''; | |
| position: absolute; | |
| inset: 0; | |
| background: var(--primary-gradient); | |
| opacity: 0; | |
| transition: opacity 0.3s ease; | |
| border-radius: 12px; | |
| } | |
| .sidebar-nav li a:hover, | |
| .sidebar-nav li.active a { | |
| color: var(--text-primary); | |
| background: rgba(255, 255, 255, 0.05); | |
| } | |
| .sidebar-nav li.active a::before { | |
| opacity: 0.15; | |
| } | |
| .sidebar-nav li a i { | |
| width: 24px; | |
| text-align: center; | |
| font-size: 1.1rem; | |
| position: relative; | |
| z-index: 1; | |
| transition: transform 0.3s ease; | |
| } | |
| .sidebar-nav li a:hover i { | |
| transform: scale(1.1); | |
| } | |
| .sidebar-nav li a span { | |
| position: relative; | |
| z-index: 1; | |
| font-weight: 500; | |
| } | |
| .sidebar-footer { | |
| padding-top: 1rem; | |
| border-top: 1px solid var(--glass-border); | |
| text-align: center; | |
| font-size: 0.85rem; | |
| color: var(--text-muted); | |
| position: relative; | |
| z-index: 1; | |
| } | |
| .sidebar-footer #online-count { | |
| color: var(--success-color); | |
| font-weight: 600; | |
| } | |
| .main-content { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.5rem; | |
| min-width: 0; | |
| } | |
| .header { | |
| background: var(--glass-bg); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 20px; | |
| padding: 1.25rem 1.5rem; | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| box-shadow: var(--glass-shadow); | |
| } | |
| .header h1 { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| font-size: 1.4rem; | |
| font-weight: 700; | |
| background: var(--primary-gradient); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| } | |
| .header h1 i { | |
| font-size: 1.2rem; | |
| -webkit-text-fill-color: #667eea; | |
| } | |
| .header-actions { | |
| display: flex; | |
| gap: 0.75rem; | |
| } | |
| .btn { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| padding: 0.75rem 1.25rem; | |
| border: none; | |
| border-radius: 12px; | |
| font-family: inherit; | |
| font-size: 0.9rem; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .btn::before { | |
| content: ''; | |
| position: absolute; | |
| inset: 0; | |
| background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%); | |
| transform: translateX(-100%); | |
| transition: transform 0.5s ease; | |
| } | |
| .btn:hover::before { | |
| transform: translateX(100%); | |
| } | |
| .btn-primary { | |
| background: var(--primary-gradient); | |
| color: white; | |
| box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); | |
| } | |
| .btn-primary:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5); | |
| } | |
| .btn-secondary { | |
| background: rgba(255, 255, 255, 0.1); | |
| color: var(--text-secondary); | |
| border: 1px solid var(--glass-border); | |
| } | |
| .btn-secondary:hover { | |
| background: rgba(255, 255, 255, 0.15); | |
| color: var(--text-primary); | |
| } | |
| .btn-warning { | |
| background: rgba(255, 184, 0, 0.2); | |
| color: var(--warning-color); | |
| border: 1px solid rgba(255, 184, 0, 0.3); | |
| padding: 0.75rem; | |
| } | |
| .btn-warning:hover { | |
| background: rgba(255, 184, 0, 0.3); | |
| } | |
| .content { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.5rem; | |
| } | |
| .announcements-section, | |
| .rooms-section { | |
| background: var(--glass-bg); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 24px; | |
| padding: 1.5rem; | |
| box-shadow: var(--glass-shadow); | |
| position: relative; | |
| } | |
| .announcements-section::before, | |
| .rooms-section::before { | |
| content: ''; | |
| position: absolute; | |
| top: -30%; | |
| right: -20%; | |
| width: 40%; | |
| height: 60%; | |
| background: radial-gradient(circle, rgba(79, 172, 254, 0.15) 0%, transparent 70%); | |
| border-radius: 50%; | |
| filter: blur(60px); | |
| pointer-events: none; | |
| } | |
| .announcements-section h2, | |
| .rooms-section h2 { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| font-size: 1.2rem; | |
| font-weight: 600; | |
| margin-bottom: 1.25rem; | |
| color: var(--text-primary); | |
| } | |
| .announcements-section h2 i { | |
| color: var(--warning-color); | |
| } | |
| .rooms-section h2 i { | |
| color: #4facfe; | |
| } | |
| .announcements-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| .announcement-card { | |
| background: rgba(255, 255, 255, 0.03); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 16px; | |
| padding: 1.25rem; | |
| transition: all 0.3s ease; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .announcement-card::before { | |
| content: ''; | |
| position: absolute; | |
| left: 0; | |
| top: 0; | |
| bottom: 0; | |
| width: 4px; | |
| background: var(--accent-gradient); | |
| border-radius: 16px 0 0 16px; | |
| } | |
| .announcement-card:hover { | |
| background: rgba(255, 255, 255, 0.06); | |
| transform: translateX(-4px); | |
| } | |
| .announcement-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| margin-bottom: 0.75rem; | |
| flex-wrap: wrap; | |
| gap: 0.5rem; | |
| } | |
| .announcement-header h3 { | |
| font-size: 1rem; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .announcement-date { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| padding: 0.25rem 0.75rem; | |
| background: rgba(255, 255, 255, 0.05); | |
| border-radius: 20px; | |
| } | |
| .announcement-content p { | |
| font-size: 0.9rem; | |
| color: var(--text-secondary); | |
| line-height: 1.7; | |
| } | |
| .rooms-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); | |
| gap: 1.25rem; | |
| } | |
| .room-card { | |
| background: rgba(255, 255, 255, 0.03); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 20px; | |
| padding: 1.5rem; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1rem; | |
| transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .room-card::after { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| width: 100px; | |
| height: 100px; | |
| background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%); | |
| filter: blur(40px); | |
| opacity: 0; | |
| transition: opacity 0.3s ease; | |
| } | |
| .room-card:hover { | |
| background: rgba(255, 255, 255, 0.06); | |
| transform: translateY(-4px); | |
| box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); | |
| } | |
| .room-card:hover::after { | |
| opacity: 1; | |
| } | |
| .room-icon { | |
| width: 56px; | |
| height: 56px; | |
| background: var(--primary-gradient); | |
| border-radius: 16px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 1.5rem; | |
| color: white; | |
| box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3); | |
| } | |
| .room-info h3 { | |
| font-size: 1.1rem; | |
| font-weight: 600; | |
| margin-bottom: 0.5rem; | |
| color: var(--text-primary); | |
| } | |
| .room-info > p { | |
| font-size: 0.85rem; | |
| color: var(--text-secondary); | |
| margin-bottom: 1rem; | |
| line-height: 1.6; | |
| display: -webkit-box; | |
| -webkit-line-clamp: 2; | |
| -webkit-box-orient: vertical; | |
| overflow: hidden; | |
| } | |
| .room-stats { | |
| display: flex; | |
| gap: 1rem; | |
| flex-wrap: wrap; | |
| } | |
| .room-stats span { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.4rem; | |
| font-size: 0.8rem; | |
| color: var(--text-muted); | |
| } | |
| .room-stats i { | |
| font-size: 0.9rem; | |
| } | |
| .room-stats .room-user-count { | |
| color: var(--success-color); | |
| font-weight: 600; | |
| } | |
| .room-actions { | |
| display: flex; | |
| gap: 0.75rem; | |
| margin-top: auto; | |
| padding-top: 1rem; | |
| border-top: 1px solid var(--glass-border); | |
| } | |
| .room-actions .btn { | |
| flex: 1; | |
| justify-content: center; | |
| } | |
| .empty-state { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 3rem 2rem; | |
| text-align: center; | |
| color: var(--text-muted); | |
| } | |
| .empty-state i { | |
| font-size: 3rem; | |
| margin-bottom: 1rem; | |
| opacity: 0.5; | |
| } | |
| .empty-state p { | |
| font-size: 0.95rem; | |
| } | |
| .modal { | |
| display: none; | |
| position: fixed; | |
| inset: 0; | |
| background: rgba(0, 0, 0, 0.6); | |
| backdrop-filter: blur(8px); | |
| -webkit-backdrop-filter: blur(8px); | |
| z-index: 1000; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 1rem; | |
| animation: fadeIn 0.3s ease; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| .modal[style*="block"] { | |
| display: flex ; | |
| } | |
| .modal-content { | |
| background: rgba(26, 26, 46, 0.95); | |
| backdrop-filter: blur(30px); | |
| -webkit-backdrop-filter: blur(30px); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 24px; | |
| width: 100%; | |
| max-width: 480px; | |
| max-height: 90vh; | |
| overflow: hidden; | |
| box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); | |
| animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| @keyframes slideUp { | |
| from { | |
| opacity: 0; | |
| transform: translateY(30px) scale(0.95); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0) scale(1); | |
| } | |
| } | |
| .modal-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 1.5rem; | |
| border-bottom: 1px solid var(--glass-border); | |
| } | |
| .modal-header h2 { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| font-size: 1.15rem; | |
| font-weight: 600; | |
| } | |
| .modal-header h2 i { | |
| color: #667eea; | |
| } | |
| .close-btn { | |
| width: 36px; | |
| height: 36px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| background: rgba(255, 255, 255, 0.05); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 10px; | |
| color: var(--text-secondary); | |
| font-size: 1.25rem; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| } | |
| .close-btn:hover { | |
| background: rgba(255, 71, 87, 0.2); | |
| color: var(--danger-color); | |
| border-color: rgba(255, 71, 87, 0.3); | |
| } | |
| .modal-body { | |
| padding: 1.5rem; | |
| overflow-y: auto; | |
| } | |
| .form-group { | |
| margin-bottom: 1.25rem; | |
| } | |
| .form-group label { | |
| display: block; | |
| margin-bottom: 0.5rem; | |
| font-size: 0.9rem; | |
| color: var(--text-secondary); | |
| font-weight: 500; | |
| } | |
| .form-group label:has(input[type="checkbox"]) { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| cursor: pointer; | |
| padding: 0.75rem; | |
| background: rgba(255, 255, 255, 0.03); | |
| border-radius: 12px; | |
| border: 1px solid var(--glass-border); | |
| transition: all 0.2s ease; | |
| } | |
| .form-group label:has(input[type="checkbox"]):hover { | |
| background: rgba(255, 255, 255, 0.06); | |
| } | |
| .form-group input[type="text"], | |
| .form-group textarea { | |
| width: 100%; | |
| padding: 0.875rem 1rem; | |
| background: rgba(255, 255, 255, 0.03); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 12px; | |
| color: var(--text-primary); | |
| font-family: inherit; | |
| font-size: 0.95rem; | |
| transition: all 0.2s ease; | |
| } | |
| .form-group input[type="text"]:focus, | |
| .form-group textarea:focus { | |
| outline: none; | |
| border-color: rgba(102, 126, 234, 0.5); | |
| background: rgba(255, 255, 255, 0.05); | |
| box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); | |
| } | |
| .form-group textarea { | |
| resize: vertical; | |
| min-height: 80px; | |
| } | |
| .form-group input[type="checkbox"] { | |
| width: 20px; | |
| height: 20px; | |
| accent-color: #667eea; | |
| cursor: pointer; | |
| } | |
| .form-actions { | |
| display: flex; | |
| gap: 0.75rem; | |
| margin-top: 1.5rem; | |
| } | |
| .form-actions .btn { | |
| flex: 1; | |
| justify-content: center; | |
| } | |
| @media (max-width: 1024px) { | |
| .dashboard-container { | |
| flex-direction: column; | |
| } | |
| .sidebar { | |
| width: 100%; | |
| min-width: auto; | |
| flex-direction: row; | |
| align-items: center; | |
| padding: 1rem; | |
| } | |
| .user-info { | |
| border-bottom: none; | |
| border-left: 1px solid var(--glass-border); | |
| padding-bottom: 0; | |
| padding-left: 1rem; | |
| text-align: right; | |
| } | |
| .avatar { | |
| width: 60px; | |
| height: 60px; | |
| font-size: 1.75rem; | |
| } | |
| .user-info h3 { | |
| font-size: 1rem; | |
| } | |
| .sidebar-nav { | |
| flex: 2; | |
| } | |
| .sidebar-nav ul { | |
| flex-direction: row; | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| } | |
| .sidebar-footer { | |
| border-top: none; | |
| border-right: 1px solid var(--glass-border); | |
| padding-top: 0; | |
| padding-right: 1rem; | |
| } | |
| } | |
| @media (max-width: 768px) { | |
| .dashboard-container { | |
| padding: 0.75rem; | |
| gap: 1rem; | |
| } | |
| .sidebar { | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| .user-info { | |
| border-left: none; | |
| border-bottom: 1px solid var(--glass-border); | |
| padding-left: 0; | |
| padding-bottom: 1rem; | |
| } | |
| .sidebar-nav ul { | |
| flex-direction: column; | |
| } | |
| .sidebar-footer { | |
| border-right: none; | |
| border-top: 1px solid var(--glass-border); | |
| padding-right: 0; | |
| padding-top: 1rem; | |
| } | |
| .header { | |
| flex-direction: column; | |
| gap: 1rem; | |
| text-align: center; | |
| } | |
| .rooms-grid { | |
| grid-template-columns: 1fr; | |
| } | |
| .room-actions { | |
| flex-direction: column; | |
| } | |
| .modal-content { | |
| max-height: 95vh; | |
| } | |
| } | |
| @media (max-width: 480px) { | |
| .announcement-header { | |
| flex-direction: column; | |
| align-items: flex-start; | |
| } | |
| .room-stats { | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| } | |
| .form-actions { | |
| flex-direction: column; | |
| } | |
| } | |
| .announcement-content br { | |
| display: block; | |
| margin: 0.5rem 0; | |
| content: ""; | |
| } | |
| .announcement-content p { | |
| white-space: pre-wrap; | |
| } | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| height: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: rgba(255, 255, 255, 0.02); | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: rgba(255, 255, 255, 0.1); | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: rgba(255, 255, 255, 0.2); | |
| } | |
| ::placeholder { | |
| color: var(--text-muted); | |
| } | |
| .sidebar-nav li.active { | |
| position: relative; | |
| } | |
| .sidebar-nav li.active::before { | |
| content: ''; | |
| position: absolute; | |
| right: -1.5rem; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| width: 4px; | |
| height: 60%; | |
| background: var(--primary-gradient); | |
| border-radius: 2px; | |
| } | |
| @media (max-width: 1024px) { | |
| .sidebar-nav li.active::before { | |
| display: none; | |
| } | |
| } | |
| .room-card .room-icon { | |
| position: relative; | |
| } | |
| .room-card .room-icon::after { | |
| content: ''; | |
| position: absolute; | |
| inset: -4px; | |
| border-radius: 20px; | |
| background: var(--primary-gradient); | |
| opacity: 0.3; | |
| filter: blur(8px); | |
| z-index: -1; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div style="position: fixed; top: 1rem; left: 1rem; z-index: 9999;"> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" style=" | |
| background: rgba(255,255,255,0.1); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(255,255,255,0.2); | |
| padding: 0.5rem 1rem; | |
| border-radius: 8px; | |
| color: rgba(255,255,255,0.8); | |
| text-decoration: none; | |
| font-size: 0.8rem; | |
| transition: all 0.3s ease; | |
| ">Built with anycoder</a> | |
| </div> | |
| <!-- [Previous HTML content preserved exactly as provided] --> | |
| <div class="dashboard-container"> | |
| <!-- نوار کناری --> | |
| <aside class="sidebar"> | |
| <div class="user-info"> | |
| <div class="avatar"> | |
| <i class="fas fa-user-circle"></i> | |
| </div> | |
| <h3>نام کاربر</h3> | |
| <p>@username</p> | |
| <span class="status online"><i class="fas fa-circle"></i> آنلاین</span> | |
| </div> | |
| <nav class="sidebar-nav"> | |
| <ul> | |
| <li class="active"><a href="dashboard.php"><i class="fas fa-home"></i> صفحه اصلی</a></li> | |
| <li><a href="chat.php?room=1"><i class="fas fa-comments"></i> چت عمومی</a></li> | |
| <li><a href="profile.php"><i class="fas fa-user-cog"></i> تنظیمات پروفایل</a></li> | |
| <li><a href="admin.php"><i class="fas fa-shield-alt"></i> پنل ادمین</a></li> | |
| <li><a href="logout.php"><i class="fas fa-sign-out-alt"></i> خروج</a></li> | |
| </ul> | |
| </nav> | |
| <div class="sidebar-footer"> | |
| <p>کاربران آنلاین: <span id="online-count">12</span></p> | |
| </div> | |
| </aside> | |
| <!-- محتوای اصلی --> | |
| <main class="main-content"> | |
| <header class="header"> | |
| <h1><i class="fas fa-home"></i> صفحه اصلی</h1> | |
| <div class="header-actions"> | |
| <button class="btn btn-primary" onclick="createRoomModal()"> | |
| <i class="fas fa-plus"></i> ایجاد چت روم جدید | |
| </button> | |
| </div> | |
| </header> | |
| <div class="content"> | |
| <!-- بخش اعلانها --> | |
| <section class="announcements-section"> | |
| <h2><i class="fas fa-bullhorn"></i> اعلانها</h2> | |
| <div class="announcements-list"> | |
| <div class="announcement-card"> | |
| <div class="announcement-header"> | |
| <h3>به داشبورد جدید خوش آمدید</h3> | |
| <span class="announcement-date">1403/10/15 14:30</span> | |
| </div> | |
| <div class="announcement-content"> | |
| <p>نسخه جدید داشبورد با طراحی مدرن و امکانات پیشرفته در دسترس است. از تجربه کاربری جدید لذت ببرید!</p> | |
| </div> | |
| </div> | |
| <div class="announcement-card"> | |
| <div class="announcement-header"> | |
| <h3>بهروزرسانی سیستم</h3> | |
| <span class="announcement-date">1403/10/14 09:00</span> | |
| </div> | |
| <div class="announcement-content"> | |
| <p>سیستم چت بهروزرسانی شد. اکنون میتوانید از قابلیتهای جدید استفاده کنید.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- بخش اتاقهای چت --> | |
| <section class="rooms-section"> | |
| <h2><i class="fas fa-door-open"></i> اتاقهای چت موجود</h2> | |
| <div class="rooms-grid"> | |
| <div class="room-card"> | |
| <div class="room-icon"> | |
| <i class="fas fa-comments"></i> | |
| </div> | |
| <div class="room-info"> | |
| <h3>چت عمومی</h3> | |
| <p>اتاق چت عمومی برای گفتگوی آزاد کاربران</p> | |
| <div class="room-stats"> | |
| <span><i class="fas fa-users"></i> <span class="room-user-count" data-room="1">5</span> نفر</span> | |
| <span><i class="fas fa-clock"></i> 1403/01/01</span> | |
| </div> | |
| </div> | |
| <div class="room-actions"> | |
| <a href="chat.php?room=1" class="btn btn-primary"> | |
| <i class="fas fa-sign-in-alt"></i> ورود | |
| </a> | |
| <button class="btn btn-warning" onclick="editRoom(1)"> | |
| <i class="fas fa-edit"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="room-card"> | |
| <div class="room-icon"> | |
| <i class="fas fa-comments"></i> | |
| </div> | |
| <div class="room-info"> | |
| <h3>بحث و گفتگو</h3> | |
| <p>اتاق برای بحثهای تخصصی و موضوعی</p> | |
| <div class="room-stats"> | |
| <span><i class="fas fa-users"></i> <span class="room-user-count" data-room="2">3</span> نفر</span> | |
| <span><i class="fas fa-clock"></i> 1403/05/15</span> | |
| </div> | |
| </div> | |
| <div class="room-actions"> | |
| <a href="chat.php?room=2" class="btn btn-primary"> | |
| <i class="fas fa-sign-in-alt"></i> ورود | |
| </a> | |
| </div> | |
| </div> | |
| <div class="room-card"> | |
| <div class="room-icon"> | |
| <i class="fas fa-comments"></i> | |
| </div> | |
| <div class="room-info"> | |
| <h3>اتاق بازی</h3> | |
| <p>گفتگو و هماهنگی برای بازیهای گروهی</p> | |
| <div class="room-stats"> | |
| <span><i class="fas fa-users"></i> <span class="room-user-count" data-room="3">8</span> نفر</span> | |
| <span><i class="fas fa-clock"></i> 1403/08/20</span> | |
| </div> | |
| </div> | |
| <div class="room-actions"> | |
| <a href="chat.php?room=3" class="btn btn-primary"> | |
| <i class="fas fa-sign-in-alt"></i> ورود | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </div> | |
| </main> | |
| </div> | |
| <!-- مودال ایجاد اتاق چت --> | |
| <div id="createRoomModal" class="modal"> | |
| <div class="modal-content"> | |
| <div class="modal-header"> | |
| <h2><i class="fas fa-plus"></i> ایجاد اتاق چت جدید</h2> | |
| <button class="close-btn" onclick="closeModal()">×</button> | |
| </div> | |
| <div class="modal-body"> | |
| <form id="createRoomForm"> | |
| <div class="form-group"> | |
| <label for="room_name">نام اتاق</label> | |
| <input type="text" id="room_name" name="room_name" required> | |
| </div> | |
| <div class="form-group"> | |
| <label for="room_description">توضیحات</label> | |
| <textarea id="room_description" name="room_description" rows="3"></textarea> | |
| </div> | |
| <div class="form-group"> | |
| <label> | |
| <input type="checkbox" id="room_locked" name="room_locked"> | |
| قفل کردن اتاق (فقط ادمینها میتوانند وارد شوند) | |
| </label> | |
| </div> | |
| <div class="form-actions"> | |
| <button type="button" class="btn btn-secondary" onclick="closeModal()">انصراف</button> | |
| <button type="submit" class="btn btn-primary">ایجاد اتاق</button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // باز کردن مودال ایجاد اتاق | |
| function createRoomModal() { | |
| document.getElementById('createRoomModal').style.display = 'flex'; | |
| } | |
| // بستن مودال | |
| function closeModal() { | |
| document.getElementById('createRoomModal').style.display = 'none'; | |
| } | |
| // بستن مودال با کلیک خارج | |
| document.getElementById('createRoomModal').addEventListener('click', function(e) { | |
| if (e.target === this) { | |
| closeModal(); | |
| } | |
| }); | |
| // ارسال فرم ایجاد اتاق | |
| document.getElementById('createRoomForm').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| alert('اتاق با موفقیت ایجاد شد'); | |
| closeModal(); | |
| }); | |
| // ویرایش اتاق | |
| function editRoom(id) { | |
| alert('ویرایش اتاق ' + id); | |
| } | |
| </script> | |
| </body> | |
| </html> |