/
ingvion
/
PlanerService
Обзор
Документация
Войти
/
ingvion
/
PlanerService
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Frontend/src/index.css
1 446 строк
22 KB
lenadekart
Исправление отображения навыков для непройденных курсов
23 ноя 2025, 03:48
23 ноя 2025, 03:48
b887b42
Код
Авторство
О чём код?
/* --- RESET & VARIABLES --- */ :root { --primary: #ea580c; --primary-bg: #fff7ed; --text-main: #111827; --text-sec: #6b7280; --border: #e5e7eb; --bg-body: #f3f4f6; --white: #ffffff; --green: #10b981; --blue: #3b82f6; --radius: 16px; /* Breakpoints */ --mobile: 480px; --tablet: 768px; --desktop: 1024px; --wide: 1280px; /* Spacing system */ --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; /* Sidebar widths */ --sidebar-width: 280px; --sidebar-collapsed: 70px; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Segoe UI', 'Inter', Roboto, sans-serif; background: var(--bg-body); color: var(--text-main); height: 100vh; width: 100%; margin: 0; } #root { display: flex; width: 100%; height: 100%; overflow: hidden; } /* --- LOGIN PAGE STYLES --- */ .left-panel { display: none; width: 50%; background: linear-gradient(135deg, #fb923c, #ea580c); position: relative; align-items: center; justify-content: center; padding: 3rem; overflow: hidden; } .circle { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.2; } .c1 { width: 300px; height: 300px; background: white; top: 10%; left: 10%; } .c2 { width: 400px; height: 400px; background: #2563eb; bottom: 5%; right: 5%; mix-blend-mode: overlay; } .content-wrapper { position: relative; z-index: 10; max-width: 480px; color: white; } .logo-large { display: flex; align-items: center; gap: 1rem; font-size: 1.8rem; font-weight: bold; margin-bottom: 1.5rem; } .logo-box { width: 40px; height: 40px; background: white; color: #ea580c; border-radius: 8px; display: flex; align-items: center; justify-content: center; } .hero-title { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; } .hero-text { font-size: 1.1rem; opacity: 0.9; color: #fff7ed; line-height: 1.5; } .cards-container { position: relative; height: 260px; width: 100%; margin-top: 3rem; } .glass-card { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 16px; padding: 1rem; position: absolute; color: white; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); animation: float 6s ease-in-out infinite; } .card-1 { top: 0; right: 0; width: 240px; } .card-2 { bottom: 0; left: 0; width: 280px; animation-delay: 3s; } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } } .progress-bg { background: rgba(255, 255, 255, 0.2); height: 6px; border-radius: 10px; margin-top: 8px; width: 100%; } .progress-val { background: #4ade80; height: 100%; width: 80%; border-radius: 10px; } .right-panel { width: 100%; display: flex; align-items: center; justify-content: center; padding: 2rem; overflow-y: auto; } .login-card { width: 100%; max-width: 420px; background: white; padding: 2.5rem; border-radius: 1.5rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01); border: 1px solid #f3f4f6; } .mobile-logo { display: flex; align-items: center; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; font-size: 1.5rem; font-weight: bold; } .mobile-logo .logo-box { background: #f97316; color: white; width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; } .text-orange { color: #f97316; } .header-text { text-align: center; margin-bottom: 2rem; } .header-text h1 { font-size: 1.8rem; margin-bottom: 0.5rem; color: #111827; font-weight: 700; } .header-text p { color: #6b7280; font-size: 0.9rem; } .btn-sso { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0.9rem; background-color: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; border-radius: 0.75rem; font-weight: 600; cursor: pointer; transition: 0.2s; margin-bottom: 1.5rem; font-family: inherit; } .btn-sso:hover { background-color: #dbeafe; } .divider { display: flex; align-items: center; margin-bottom: 1.5rem; font-size: 0.75rem; color: #9ca3af; text-transform: uppercase; } .divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; } .divider span { padding: 0 10px; } .form-group { margin-bottom: 1.2rem; } .label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.4rem; } .label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; } .forgot-link { color: #f97316; font-size: 0.85rem; text-decoration: none; font-weight: 500; } .forgot-link:hover { text-decoration: underline; } .input-wrap { position: relative; } .input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 1.2rem; } .input-field { width: 100%; padding: 0.8rem 1rem 0.8rem 2.8rem; border: 1px solid #e5e7eb; border-radius: 0.75rem; font-size: 0.95rem; outline: none; background: #f9fafb; transition: 0.2s; font-family: inherit; } .input-field:focus { border-color: #f97316; background: white; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1); } .toggle-pass { position: absolute; right: 0; top: 0; bottom: 0; width: 40px; background: none; border: none; cursor: pointer; color: #9ca3af; display: flex; align-items: center; justify-content: center; } .toggle-pass:hover { color: #4b5563; } .btn-submit { width: 100%; padding: 1rem; background: linear-gradient(to right, #f97316, #ea580c); color: white; border: none; display: flex; align-items: center; justify-content: center; border-radius: 0.75rem; font-weight: bold; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); transition: transform 0.1s, opacity 0.2s; font-family: inherit; } .btn-submit:hover { opacity: 0.95; transform: translateY(-1px); } .btn-submit:active { transform: translateY(1px); } .footer { text-align: center; margin-top: 2rem; font-size: 0.85rem; color: #9ca3af; } .footer a { color: #6b7280; text-decoration: underline; } @media (min-width: 1024px) { .left-panel { display: flex; } .right-panel { width: 50%; } .mobile-logo { display: none; } } /* --- DASHBOARD STYLES --- */ aside { width: var(--sidebar-width); background: var(--white); height: 100%; display: flex; flex-direction: column; border-right: 1px solid var(--border); flex-shrink: 0; padding: var(--space-lg); transition: transform 0.3s ease; } .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; } .logo-circle { width: 48px; height: 48px; background: linear-gradient(135deg, #f2994a, #f2c94c); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; font-weight: bold; flex-shrink: 0; } .brand-text h2 { font-size: 18px; font-weight: 800; color: #111; line-height: 1.1; } .brand-text span { font-size: 13px; color: var(--text-sec); font-weight: 400; } nav { flex: 1; display: flex; flex-direction: column; gap: 8px; } .nav-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 12px; color: #4b5563; font-weight: 600; font-size: 15px; cursor: pointer; transition: 0.2s; text-decoration: none; } .nav-item i { font-size: 20px; } .nav-item.active { background-color: var(--primary-bg); color: #d97706; } .nav-item:hover:not(.active) { background-color: #f9fafb; color: #111; } .sidebar-footer { padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; } .user-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .user-details { flex: 1; } .user-details h4 { font-size: 14px; font-weight: 700; color: #111; } .user-details p { font-size: 12px; color: var(--text-sec); margin-top: 2px; } .btn-logout { background: none; border: none; cursor: pointer; color: var(--text-sec); padding: 8px; border-radius: 8px; transition: 0.2s; display: flex; align-items: center; justify-content: center; } .btn-logout:hover { background: #fee2e2; color: #ef4444; } main { flex: 1; padding: 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; } .view-section { display: none; height: 100%; } .view-section.active { display: block; } .dashboard-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; height: 100%; min-height: 500px; } .card { background: var(--white); border-radius: 24px; padding: 24px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); display: flex; flex-direction: column; border: 1px solid rgba(0, 0, 0, 0.04); } .card-header { margin-bottom: 20px; } .card-title { font-size: 18px; font-weight: 700; color: #111; } .card-subtitle { font-size: 13px; color: var(--text-sec); margin-top: 4px; } .chart-wrapper { flex: 1; position: relative; display: flex; justify-content: center; align-items: center; min-height: 300px; } canvas { width: 100%; height: 100%; } .courses-container { overflow: hidden; } .tabs-scroll-wrapper { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 10px; scrollbar-width: thin; scrollbar-color: #ddd transparent; flex-shrink: 0; border-bottom: 1px solid var(--border); } .course-tab { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #f9fafb; border: 1px solid var(--border); border-radius: 50px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text-sec); transition: all 0.2s ease; user-select: none; } .course-tab:hover { background: #f3f4f6; border-color: #d1d5db; } .course-tab.active { background: #111; color: #fff; border-color: #111; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); } .dot-indicator { width: 8px; height: 8px; border-radius: 50%; } .dot-mand { background: var(--primary); } .dot-elec { background: var(--blue); } .dot-all { background: #9ca3af; } .skills-viewport { flex: 1; overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: #d1d5db transparent; } .elective-list { display: flex; flex-direction: column; gap: 16px; padding-top: 10px; } .elective-item { background: #fafafa; padding: 12px 16px; border-radius: 12px; border: 1px solid #f3f4f6; } .elective-header { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 8px; } .segments-track { display: flex; gap: 4px; height: 8px; width: 100%; } .segment { flex: 1; background: #e5e7eb; border-radius: 2px; } .segment.filled { background: var(--primary); } .segment.filled-elec { background: var(--blue); } .segment.potential { background: #f3f4f6; border: 1px dashed #d1d5db; box-sizing: border-box; } .val-text { font-size: 12px; font-weight: bold; } /* --- COURSES LIST VIEW --- */ .simple-list { display: flex; flex-direction: column; gap: 16px; } .list-item { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; } .list-item:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); } .tag { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; } .tag.done { background: #dcfce7; color: #166534; } .tag.process { background: #dbeafe; color: #1e40af; } /* --- ADMIN PANEL BASE STYLES --- */ .admin-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: var(--space-md); } .admin-modal { background: white; border-radius: var(--radius); padding: var(--space-lg); max-width: 500px; width: 100%; max-height: 90vh; overflow: auto; } .admin-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-lg); } .admin-modal-title { font-size: 20px; font-weight: 700; margin: 0; } .admin-btn { padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid; transition: all 0.2s; white-space: nowrap; } .admin-btn-primary { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); } .admin-btn-danger { background: #fee2e2; color: #dc2626; border-color: #fecaca; } .admin-btn-icon { padding: 8px; border: none; background: none; cursor: pointer; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; } .admin-entity-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); } .admin-entity-actions { display: flex; gap: var(--space-xs); flex-shrink: 0; } /* --- RESPONSIVE DESIGN --- */ /* Base responsive utilities */ .hide-mobile { display: block; } .show-mobile { display: none; } @media (max-width: 768px) { .hide-mobile { display: none; } .show-mobile { display: block; } } /* --- ADMIN PANEL RESPONSIVE --- */ /* Tablet and below */ @media (max-width: 1024px) { :root { --space-lg: 20px; --space-xl: 24px; } .dashboard-grid { grid-template-columns: 1fr; gap: var(--space-md); height: auto; min-height: unset; } main { padding: var(--space-lg); } aside { width: 240px; padding: var(--space-md); } .brand-text h2 { font-size: 16px; } .nav-item { padding: 12px 16px; font-size: 14px; } .card { padding: var(--space-md); border-radius: 16px; } .chart-wrapper { min-height: 250px; } } /* Mobile landscape and below */ @media (max-width: 768px) { #root { flex-direction: column; } aside { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: var(--space-md); position: sticky; top: 0; z-index: 100; } .brand { margin-bottom: var(--space-md); } nav { flex-direction: row; overflow-x: auto; gap: var(--space-xs); padding-bottom: var(--space-xs); } .nav-item { flex-shrink: 0; padding: 10px 16px; font-size: 13px; white-space: nowrap; } .sidebar-footer { flex-wrap: wrap; } .user-details { flex: 0 0 auto; } .user-details h4 { font-size: 13px; } .user-details p { font-size: 11px; } main { padding: var(--space-md); overflow-x: hidden; } .card { padding: var(--space-md); } .card-title { font-size: 16px; } .card-subtitle { font-size: 12px; } .tabs-scroll-wrapper { gap: var(--space-xs); } .course-tab { padding: 8px 12px; font-size: 12px; } .simple-list { gap: 12px; } .list-item { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; } .tag { align-self: flex-start; } } /* Mobile portrait */ @media (max-width: 480px) { :root { --space-sm: 8px; --space-md: 12px; --space-lg: 16px; --space-xl: 20px; } .right-panel { padding: 1rem; } .login-card { padding: 1.5rem; } .header-text h1 { font-size: 1.5rem; } aside { padding: var(--space-sm); } .brand { gap: var(--space-xs); margin-bottom: var(--space-sm); } .logo-circle { width: 40px; height: 40px; font-size: 20px; } .brand-text h2 { font-size: 14px; } .brand-text span { font-size: 11px; } nav { gap: 6px; } .nav-item { padding: 8px 12px; font-size: 12px; gap: 8px; } .sidebar-footer { padding-top: var(--space-sm); gap: var(--space-xs); } .user-avatar { width: 36px; height: 36px; } .user-details h4 { font-size: 12px; } .user-details p { font-size: 10px; } main { padding: var(--space-sm); } .card { padding: var(--space-sm); border-radius: 12px; } .card-header { margin-bottom: var(--space-sm); } .card-title { font-size: 14px; } .card-subtitle { font-size: 11px; } .chart-wrapper { min-height: 200px; } .tabs-scroll-wrapper { gap: 6px; margin-bottom: var(--space-xs); } .course-tab { padding: 6px 10px; font-size: 11px; } .elective-list { gap: 12px; } .elective-item { padding: 10px 12px; } .elective-header { font-size: 13px; margin-bottom: 6px; } .list-item { padding: 12px; } .list-item > div:first-child > div:first-child { font-size: 14px; } .list-item > div:first-child > div:last-child { font-size: 12px; } } /* --- ADMIN PANEL SPECIFIC MOBILE STYLES --- */ @media (max-width: 768px) { /* Override inline styles for main container */ body > div > div:first-child { flex-direction: column !important; } /* Sidebar becomes horizontal navbar */ aside { width: 100% !important; height: auto !important; border-right: none !important; border-bottom: 1px solid var(--border); padding: var(--space-md) !important; position: sticky; top: 0; z-index: 100; background: white; } /* Brand compact */ aside .brand { margin-bottom: var(--space-sm); } aside .brand-text h2 { font-size: 16px; } aside .brand-text span { font-size: 12px; } /* Navigation becomes horizontal scrollable */ aside > nav { display: flex !important; flex-direction: row !important; overflow-x: auto; gap: var(--space-xs); padding-bottom: var(--space-xs); -webkit-overflow-scrolling: touch; } aside > nav::-webkit-scrollbar { height: 4px; } aside > nav::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; } aside > nav::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; } .nav-item { flex-shrink: 0; white-space: nowrap; padding: 10px 16px !important; font-size: 13px !important; } /* Logout button horizontal */ aside > div:last-child { margin-top: var(--space-sm) !important; padding: 0 !important; } /* Main content takes full width */ main { padding: var(--space-md) !important; width: 100% !important; } /* Admin buttons full width */ main > button { width: 100% !important; justify-content: center !important; align-items: center !important; padding: 12px 16px !important; font-size: 14px !important; } /* Cards */ .card { padding: var(--space-md) !important; } /* Direction tabs scrollable */ .tabs-scroll-wrapper { overflow-x: auto; display: flex; gap: var(--space-xs); padding-bottom: var(--space-xs); -webkit-overflow-scrolling: touch; } .course-tab { flex-shrink: 0; white-space: nowrap; font-size: 13px !important; padding: 8px 14px !important; } /* List items */ .list-item { flex-direction: column !important; align-items: flex-start !important; gap: var(--space-sm) !important; } .list-item > div:first-child { width: 100%; } .list-item > div:last-child { width: 100%; display: flex; gap: var(--space-xs); } .list-item button { flex: 1; justify-content: center !important; align-items: center !important; font-size: 13px !important; padding: 10px 12px !important; } /* Form inputs */ .input-field, select, textarea { font-size: 16px !important; /* Prevents zoom on iOS */ } /* Modal styles */ .admin-modal { padding: var(--space-md); max-width: 100%; margin: var(--space-md); } } @media (max-width: 480px) { /* Even more compact for small phones */ aside { padding: var(--space-sm) !important; } aside .logo-circle { width: 36px !important; height: 36px !important; font-size: 18px !important; } aside .brand-text h2 { font-size: 14px !important; } aside .brand-text span { font-size: 11px !important; } .nav-item { padding: 8px 12px !important; font-size: 12px !important; } main { padding: var(--space-sm) !important; } main > button { font-size: 13px !important; padding: 10px 14px !important; align-items: center !important; } main > button svg { width: 16px !important; height: 16px !important; } .card { padding: var(--space-sm) !important; border-radius: 12px !important; } .card-title { font-size: 15px !important; } .card-subtitle { font-size: 12px !important; } .course-tab { font-size: 12px !important; padding: 6px 12px !important; } .list-item { padding: var(--space-sm) !important; } .list-item > div:first-child > div:first-child { font-size: 14px !important; } .list-item > div:first-child > div:last-child { font-size: 12px !important; } .list-item button { font-size: 12px !important; padding: 8px 10px !important; align-items: center !important; } .list-item button svg { width: 14px !important; height: 14px !important; } /* Form elements */ .input-field, select, textarea { width: 100% !important; font-size: 16px !important; /* Prevents zoom on iOS */ padding: 12px !important; } input[type="number"], input[type="text"], input[type="email"] { font-size: 16px !important; } /* Modal adjustments */ .admin-modal { padding: var(--space-sm); border-radius: 12px; margin: var(--space-sm); } /* Message banner */ main > div[style*="linear-gradient"] { font-size: 13px !important; padding: 12px !important; } } /* Print styles */ @media print { aside { display: none; } main { padding: 0; } .nav-item, .btn-logout, .sidebar-footer { display: none; } }