diff --git a/src/src/static/css/auth.css b/src/src/static/css/auth.css new file mode 100644 index 0000000..1ee0244 --- /dev/null +++ b/src/src/static/css/auth.css @@ -0,0 +1,206 @@ +/* Authentication Pages Styles */ + +.auth-container { + min-height: calc(100vh - 50px); + display: flex; + align-items: center; + justify-content: center; + padding: 24px; + margin-top: 50px; +} + +.auth-card { + width: 100%; + max-width: 500px; + background: #1A2332; + border: 1px solid #2C3E50; + border-radius: 12px; + padding: 48px 40px; + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); +} + +.auth-header { + text-align: center; + margin-bottom: 32px; +} + +.auth-title { + font-size: 28px; + font-weight: 700; + color: #F0E5D8; + margin-bottom: 8px; +} + +.auth-subtitle { + font-size: 14px; + color: #E8EDF2; + line-height: 1.6; +} + +.section-title { + font-size: 16px; + font-weight: 600; + color: #F0E5D8; + margin: 24px 0 16px; + padding-bottom: 8px; + border-bottom: 1px solid #2C3E50; +} + +.section-title:first-of-type { + margin-top: 0; +} + +.form-group { + margin-bottom: 20px; +} + +.form-label { + display: block; + font-size: 13px; + font-weight: 500; + color: #E8EDF2; + margin-bottom: 8px; +} + +.form-input { + width: 100%; + padding: 12px 16px; + background: #0A0E27; + border: 1px solid #2C3E50; + border-radius: 6px; + color: #E8EDF2; + font-size: 14px; + transition: all 0.3s; +} + +.form-input:focus { + outline: none; + border-color: #FF6B35; + background: #1A2332; + box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1); +} + +.form-input::placeholder { + color: #858585; +} + +.password-requirements { + margin-bottom: 16px; + padding: 12px; + background: #0A0E27; + border: 1px solid #2C3E50; + border-radius: 6px; +} + +.password-requirements p { + font-size: 13px; + color: #E8EDF2; + margin-bottom: 8px; +} + +.password-requirements ul { + list-style: none; + padding: 0; + margin: 0; +} + +.password-requirements li { + font-size: 12px; + color: #858585; + padding: 4px 0; + padding-left: 20px; + position: relative; +} + +.password-requirements li::before { + content: "•"; + position: absolute; + left: 8px; + color: #FF6B35; +} + +.form-footer { + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 24px; + flex-wrap: wrap; + gap: 12px; +} + +.form-link { + font-size: 14px; + color: #858585; +} + +.form-link a { + color: #FF6B35; + text-decoration: none; + font-weight: 500; +} + +.form-link a:hover { + text-decoration: underline; + color: #FF8555; +} + +.submit-btn { + padding: 12px 24px; + background: linear-gradient(135deg, #FF6B35 0%, #FF8555 100%); + color: #fff; + border: none; + border-radius: 6px; + font-size: 14px; + font-weight: 500; + cursor: pointer; + transition: all 0.3s; +} + +.submit-btn:hover { + background: linear-gradient(135deg, #FF8555 0%, #FF6B35 100%); + transform: translateY(-2px); + box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4); +} + +.submit-btn:disabled { + opacity: 0.5; + cursor: not-allowed; + transform: none; +} + +.messages { + max-width: 500px; + margin: 0 auto 20px; +} + +.message { + padding: 12px 16px; + border-radius: 6px; + margin-bottom: 12px; + border-left: 4px solid; + font-size: 14px; +} + +.message.error { + background: rgba(229, 62, 62, 0.15); + border-color: #E53E3E; + color: #E53E3E; +} + +.message.success { + background: rgba(72, 187, 120, 0.15); + border-color: #48BB78; + color: #48BB78; +} + +.message.info { + background: rgba(255, 107, 53, 0.15); + border-color: #FF6B35; + color: #FF6B35; +} + +.message.warning { + background: rgba(212, 165, 116, 0.15); + border-color: #D4A574; + color: #D4A574; +} diff --git a/src/src/static/css/challenge-details.css b/src/src/static/css/challenge-details.css index 025f243..fc7d0a0 100644 --- a/src/src/static/css/challenge-details.css +++ b/src/src/static/css/challenge-details.css @@ -9,16 +9,19 @@ /* Problem Panel */ .problem-panel { width: 50%; - background: #252526; + min-width: 300px; + max-width: calc(100% - 304px); /* 100% minus min editor width + handle */ + background: #1A2332; overflow-y: auto; - border-right: 1px solid #3e3e42; height: calc(100vh - 50px); + flex-shrink: 0; + position: relative; } .problem-header { padding: 24px 32px; - border-bottom: 1px solid #3e3e42; - background: #2d2d30; + border-bottom: 1px solid #2C3E50; + background: #0A0E27; } .problem-title { @@ -40,8 +43,8 @@ } .example-box { - background: #1e1e1e; - border: 1px solid #3e3e42; + background: #0A0E27; + border: 1px solid #2C3E50; border-radius: 6px; padding: 16px; margin-bottom: 12px; @@ -63,18 +66,19 @@ /* Editor Panel */ .editor-panel { - width: 50%; + flex: 1; display: flex; flex-direction: column; - background: #1e1e1e; + background: #0A0E27; overflow: hidden; height: calc(100vh - 50px); + min-width: 300px; } .editor-header { padding: 16px 24px; - background: #2d2d30; - border-bottom: 1px solid #3e3e42; + background: #1A2332; + border-bottom: 1px solid #2C3E50; display: flex; justify-content: space-between; align-items: center; @@ -88,10 +92,10 @@ .editor-tab { padding: 8px 16px; - background: #1e1e1e; - border: 1px solid #3e3e42; + background: #0A0E27; + border: 1px solid #2C3E50; border-radius: 4px 4px 0 0; - color: #cccccc; + color: #E8EDF2; font-size: 13px; display: flex; align-items: center; @@ -99,9 +103,9 @@ } .editor-tab.active { - background: #1e1e1e; + background: #0A0E27; color: #fff; - border-bottom: 2px solid #0e639c; + border-bottom: 2px solid #FF6B35; } .editor-actions { @@ -124,8 +128,8 @@ .editor-footer { padding: 12px 24px; - background: #2d2d30; - border-top: 1px solid #3e3e42; + background: #1A2332; + border-top: 1px solid #2C3E50; display: flex; justify-content: space-between; align-items: center; @@ -147,17 +151,20 @@ /* Test Results Section */ .test-results-section { - background: #1e1e1e; - border-top: 1px solid #3e3e42; - max-height: 200px; + background: #0A0E27; + border-top: 1px solid #2C3E50; + height: 250px; overflow-y: auto; flex-shrink: 0; + min-height: 100px; + max-height: 600px; + position: relative; } .test-results-header { padding: 12px 24px; - background: #252526; - border-bottom: 1px solid #3e3e42; + background: #1A2332; + border-bottom: 1px solid #2C3E50; display: flex; justify-content: space-between; align-items: center; @@ -166,7 +173,7 @@ .test-results-title { font-size: 13px; font-weight: 600; - color: #cccccc; + color: #E8EDF2; display: flex; align-items: center; gap: 8px; @@ -183,7 +190,7 @@ .test-case-item { margin-bottom: 4px; - background: #252526; + background: #1A2332; border-left: 3px solid; border-radius: 4px; overflow: hidden; @@ -199,7 +206,7 @@ } .test-case-header:hover { - background: #2d2d30; + background: #2C3E50; } .test-case-header.locked { @@ -207,16 +214,16 @@ } .test-case-item.passed { - border-left-color: #3fb950; + border-left-color: #48BB78; } .test-case-item.failed { - border-left-color: #f85149; + border-left-color: #E53E3E; } .test-case-name { font-size: 13px; - color: #d4d4d4; + color: #E8EDF2; display: flex; align-items: center; gap: 8px; @@ -237,11 +244,11 @@ } .test-case-status.passed { - color: #3fb950; + color: #48BB78; } .test-case-status.failed { - color: #f85149; + color: #E53E3E; } .test-status-icon { @@ -279,7 +286,7 @@ max-height: 0; overflow: hidden; transition: max-height 0.3s ease; - background: #1e1e1e; + background: #0A0E27; } .test-case-details.expanded { @@ -289,7 +296,7 @@ .test-case-content { padding: 12px 16px; - border-top: 1px solid #3e3e42; + border-top: 1px solid #2C3E50; } .test-io-section { @@ -313,18 +320,18 @@ font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: 12px; color: #4ec9b0; - background: #252526; + background: #1A2332; padding: 8px 12px; border-radius: 4px; - border: 1px solid #3e3e42; + border: 1px solid #2C3E50; white-space: pre-wrap; word-break: break-all; } /* Loading Spinner */ .spinner { - border: 2px solid #3e3e42; - border-top: 2px solid #58a6ff; + border: 2px solid #2C3E50; + border-top: 2px solid #FF6B35; border-radius: 50%; width: 14px; height: 14px; @@ -337,6 +344,92 @@ 100% { transform: rotate(360deg); } } +/* Resize Handles */ +.resize-handle { + width: 5px; + background: #2C3E50; + cursor: col-resize; + flex-shrink: 0; + position: relative; + transition: background 0.2s, width 0.2s; + z-index: 10; +} + +.resize-handle:hover { + background: #FF6B35; + width: 6px; +} + +.resize-handle.resizing { + background: #FF6B35; + width: 6px; +} + +.resize-handle::before { + content: ''; + position: absolute; + top: 0; + left: -4px; + right: -4px; + bottom: 0; + /* Wider hit area for easier grabbing */ +} + +.resize-handle-horizontal { + height: 5px; + background: #2C3E50; + cursor: row-resize; + flex-shrink: 0; + position: relative; + transition: background 0.2s, height 0.2s; + z-index: 10; +} + +.resize-handle-horizontal:hover { + background: #FF6B35; + height: 6px; +} + +.resize-handle-horizontal.resizing { + background: #FF6B35; + height: 6px; +} + +.resize-handle-horizontal::before { + content: ''; + position: absolute; + left: 0; + right: 0; + top: -4px; + bottom: -4px; + /* Taller hit area for easier grabbing */ +} + +/* Prevent text selection during resize */ +body.resizing { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: col-resize !important; +} + +body.resizing * { + cursor: col-resize !important; +} + +body.resizing-horizontal { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: row-resize !important; +} + +body.resizing-horizontal * { + cursor: row-resize !important; +} + /* Responsive */ @media (max-width: 1024px) { .challenge-container { diff --git a/src/src/static/css/challenge-page.css b/src/src/static/css/challenge-page.css index 008c120..4cffb56 100644 --- a/src/src/static/css/challenge-page.css +++ b/src/src/static/css/challenge-page.css @@ -8,7 +8,7 @@ body { /* background: #fff; */ min-height: 100vh; - background-color: #e7ebee; + background-color: #0A0E27; padding: 10px; flex-direction: column; align-items: center; diff --git a/src/src/static/css/challenges-page.css b/src/src/static/css/challenges-page.css index 706547d..fa3ef8e 100644 --- a/src/src/static/css/challenges-page.css +++ b/src/src/static/css/challenges-page.css @@ -30,9 +30,9 @@ } .level-select { - background: #2d2d30; - color: #cccccc; - border: 1px solid #3e3e42; + background: #1A2332; + color: #E8EDF2; + border: 1px solid #2C3E50; padding: 10px 16px; border-radius: 6px; font-size: 14px; @@ -42,12 +42,12 @@ } .level-select:hover { - border-color: #0e639c; + border-color: #FF6B35; } .level-select:focus { - border-color: #0e639c; - box-shadow: 0 0 0 3px rgba(14, 99, 156, 0.1); + border-color: #FF6B35; + box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1); } /* Challenge Cards */ @@ -57,8 +57,8 @@ } .challenge-card { - background: #252526; - border: 1px solid #3e3e42; + background: #1A2332; + border: 1px solid #2C3E50; border-radius: 8px; padding: 20px; display: flex; @@ -69,9 +69,9 @@ } .challenge-card:hover { - border-color: #0e639c; + border-color: #FF6B35; transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); + box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2); } .challenge-info { @@ -119,25 +119,25 @@ /* Button Colors */ button[style*="background-color: #ffa50080"] { - background-color: #d29100 !important; + background-color: #D4A574 !important; } button[style*="background-color: #46e34c"] { - background-color: #238636 !important; + background-color: #48BB78 !important; } button[style*="background-color: #ff4444"] { - background-color: #da3633 !important; + background-color: #E53E3E !important; } .solve-btn:not([style]) { - background: #2d2d30; - color: #cccccc; - border: 1px solid #3e3e42; + background: #1A2332; + color: #E8EDF2; + border: 1px solid #2C3E50; } .solve-btn:not([style]):hover { - background: #3e3e42; + background: #2C3E50; color: #fff; - border-color: #0e639c; + border-color: #FF6B35; } diff --git a/src/src/static/css/leaderboard.css b/src/src/static/css/leaderboard.css index 97fcf63..cdb0a77 100644 --- a/src/src/static/css/leaderboard.css +++ b/src/src/static/css/leaderboard.css @@ -61,7 +61,7 @@ .podium-card { width: 100%; - background: #252526; + background: #1A2332; border: 2px solid; border-radius: 12px; padding: 24px; @@ -77,19 +77,19 @@ /* Rank-specific styling */ .podium-item[data-rank="1"] .podium-card { border-color: #ffd700; - background: linear-gradient(135deg, #252526 0%, #3d3520 100%); + background: linear-gradient(135deg, #1A2332 0%, #3d3520 100%); box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3); } .podium-item[data-rank="2"] .podium-card { border-color: #c0c0c0; - background: linear-gradient(135deg, #252526 0%, #353535 100%); + background: linear-gradient(135deg, #1A2332 0%, #2C3E50 100%); box-shadow: 0 6px 20px rgba(192, 192, 192, 0.2); } .podium-item[data-rank="3"] .podium-card { border-color: #cd7f32; - background: linear-gradient(135deg, #252526 0%, #3d2e20 100%); + background: linear-gradient(135deg, #1A2332 0%, #3d2e20 100%); box-shadow: 0 6px 20px rgba(205, 127, 50, 0.2); } @@ -144,7 +144,7 @@ gap: 8px; margin-top: 16px; padding-top: 16px; - border-top: 1px solid #3e3e42; + border-top: 1px solid #2C3E50; } .total-score { @@ -195,13 +195,13 @@ color: #fff; margin-bottom: 24px; padding-bottom: 12px; - border-bottom: 2px solid #3e3e42; + border-bottom: 2px solid #2C3E50; } .rankings-table { width: 100%; - background: #252526; - border: 1px solid #3e3e42; + background: #1A2332; + border: 1px solid #2C3E50; border-radius: 8px; overflow: hidden; } @@ -212,8 +212,8 @@ } .rankings-table thead { - background: #2d2d30; - border-bottom: 2px solid #3e3e42; + background: #0A0E27; + border-bottom: 2px solid #2C3E50; } .rankings-table th { @@ -221,7 +221,7 @@ text-align: left; font-size: 13px; font-weight: 600; - color: #cccccc; + color: #E8EDF2; text-transform: uppercase; letter-spacing: 0.5px; } @@ -237,12 +237,12 @@ } .rankings-table tbody tr { - border-bottom: 1px solid #3e3e42; + border-bottom: 1px solid #2C3E50; transition: background 0.2s; } .rankings-table tbody tr:hover { - background: #2d2d30; + background: #2C3E50; } .rankings-table tbody tr:last-child { @@ -252,7 +252,7 @@ .rankings-table td { padding: 16px 20px; font-size: 14px; - color: #d4d4d4; + color: #E8EDF2; } .rank-number { @@ -269,7 +269,7 @@ .score-cell { text-align: right; font-weight: 600; - color: #58a6ff; + color: #FF6B35; font-size: 16px; } @@ -306,7 +306,7 @@ left: 0; right: 0; bottom: 0; - background: rgba(30, 30, 30, 0.95); + background: rgba(10, 14, 39, 0.95); backdrop-filter: blur(10px); z-index: 9999; display: flex; @@ -324,7 +324,7 @@ text-align: center; max-width: 600px; padding: 48px; - background: #252526; + background: #1A2332; border: 2px solid #ffd700; border-radius: 16px; box-shadow: 0 0 40px rgba(255, 215, 0, 0.3); @@ -361,7 +361,7 @@ font-size: 14px; color: #858585; padding: 16px; - background: #1e1e1e; + background: #0A0E27; border-radius: 8px; border-left: 3px solid #ffd700; margin-bottom: 24px; diff --git a/src/src/static/css/navbar.css b/src/src/static/css/navbar.css new file mode 100644 index 0000000..ea7e198 --- /dev/null +++ b/src/src/static/css/navbar.css @@ -0,0 +1,87 @@ +/* Navbar Component Styles */ +.top-nav { + height: 50px; + background: #1A2332; + border-bottom: 1px solid #2C3E50; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 24px; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1000; +} + +.nav-logo { + display: flex; + align-items: center; + gap: 12px; + color: #E8EDF2; + text-decoration: none; + font-weight: 600; + font-size: 16px; + transition: color 0.3s; +} + +.nav-logo:hover { + color: #FF6B35; +} + +.nav-logo img { + height: 30px; + filter: drop-shadow(0 0 4px rgba(255, 107, 53, 0.2)); +} + +.nav-center { + color: #858585; + font-size: 14px; +} + +.nav-right { + display: flex; + gap: 16px; + align-items: center; +} + +.nav-link { + color: #E8EDF2; + text-decoration: none; + font-size: 14px; + padding: 6px 12px; + border-radius: 4px; + transition: all 0.3s; + position: relative; +} + +.nav-link:not(.logout)::after { + content: ''; + position: absolute; + bottom: 0; + left: 12px; + right: 12px; + height: 2px; + background: #FF6B35; + transform: scaleX(0); + transition: transform 0.3s; +} + +.nav-link:not(.logout):hover::after { + transform: scaleX(1); +} + +.nav-link:hover { + color: #FF6B35; +} + +.nav-link.logout { + background: #E53E3E; + color: #fff; +} + +.nav-link.logout:hover { + background: #C53030; + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4); +} diff --git a/src/src/static/css/shop.css b/src/src/static/css/shop.css index fe787c3..00a5bd8 100644 --- a/src/src/static/css/shop.css +++ b/src/src/static/css/shop.css @@ -7,12 +7,12 @@ } .coin-balance { - background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); + background: linear-gradient(135deg, #FF6B35 0%, #FF8555 100%); padding: 2rem; border-radius: 12px; text-align: center; margin-bottom: 2rem; - box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3); + box-shadow: 0 8px 16px rgba(255, 107, 53, 0.3); } .coin-amount { @@ -29,8 +29,8 @@ } .cooldown-notice { - background: #3e3e42; - border-left: 4px solid #f59e0b; + background: #1A2332; + border-left: 4px solid #FF6B35; padding: 1rem 1.5rem; border-radius: 8px; margin-bottom: 2rem; @@ -44,8 +44,8 @@ } .power-card { - background: #252526; - border: 1px solid #3e3e42; + background: #1A2332; + border: 1px solid #2C3E50; border-radius: 12px; padding: 1.5rem; transition: all 0.3s ease; @@ -60,13 +60,13 @@ left: 0; right: 0; height: 4px; - background: linear-gradient(90deg, #0066cc, #0099ff); + background: linear-gradient(90deg, #FF6B35, #FF8555); } .power-card:hover { transform: translateY(-4px); - border-color: #0066cc; - box-shadow: 0 12px 24px rgba(0, 102, 204, 0.2); + border-color: #FF6B35; + box-shadow: 0 12px 24px rgba(255, 107, 53, 0.2); } .power-icon { @@ -76,7 +76,7 @@ display: flex; align-items: center; justify-content: center; - background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%); + background: linear-gradient(135deg, #FF6B35 0%, #FF8555 100%); border-radius: 12px; padding: 10px; } @@ -107,17 +107,17 @@ align-items: center; justify-content: space-between; padding-top: 1rem; - border-top: 1px solid #3e3e42; + border-top: 1px solid #2C3E50; } .cost-amount { font-size: 1.25rem; font-weight: 700; - color: #f59e0b; + color: #FF6B35; } .buy-button { - background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%); + background: linear-gradient(135deg, #FF6B35 0%, #FF8555 100%); color: white; border: none; padding: 0.625rem 1.5rem; @@ -129,11 +129,11 @@ .buy-button:hover:not(:disabled) { transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4); + box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4); } .buy-button:disabled { - background: #3e3e42; + background: #2C3E50; cursor: not-allowed; opacity: 0.5; } @@ -148,12 +148,12 @@ color: white; margin-bottom: 1.5rem; padding-bottom: 0.75rem; - border-bottom: 2px solid #3e3e42; + border-bottom: 2px solid #2C3E50; } .purchase-item { - background: #252526; - border: 1px solid #3e3e42; + background: #1A2332; + border: 1px solid #2C3E50; border-radius: 8px; padding: 1rem 1.5rem; margin-bottom: 0.75rem; @@ -178,7 +178,7 @@ } .purchase-cost { - color: #f59e0b; + color: #FF6B35; font-weight: 600; } diff --git a/src/src/static/js/challenge-details.js b/src/src/static/js/challenge-details.js index 53b4cd1..3c50faf 100644 --- a/src/src/static/js/challenge-details.js +++ b/src/src/static/js/challenge-details.js @@ -109,3 +109,108 @@ function toggleTestCase(index) { // Make function globally available for onclick handlers window.toggleTestCase = toggleTestCase; + +// Resizable panels functionality +document.addEventListener("DOMContentLoaded", function () { + // Vertical resize (between problem and editor panels) + const resizeHandle1 = document.getElementById("resizeHandle1"); + const problemPanel = document.getElementById("problemPanel"); + const editorPanel = document.getElementById("editorPanel"); + + if (resizeHandle1 && problemPanel && editorPanel) { + let isResizing = false; + let startX = 0; + let startWidth = 0; + + resizeHandle1.addEventListener("mousedown", function(e) { + isResizing = true; + startX = e.clientX; + startWidth = problemPanel.offsetWidth; + resizeHandle1.classList.add("resizing"); + document.body.classList.add("resizing"); + e.preventDefault(); + }); + + document.addEventListener("mousemove", function(e) { + if (!isResizing) return; + + const delta = e.clientX - startX; + const newWidth = startWidth + delta; + const containerWidth = problemPanel.parentElement.offsetWidth; + const minWidth = 300; // Minimum width in pixels + const handleWidth = 5; // Width of resize handle + const maxWidth = containerWidth - 300 - handleWidth; // Leave space for editor and handle + + if (newWidth >= minWidth && newWidth <= maxWidth) { + problemPanel.style.width = newWidth + "px"; + // Trigger CodeMirror refresh during resize for smooth rendering + if (editor) { + editor.refresh(); + } + } + }); + + document.addEventListener("mouseup", function() { + if (isResizing) { + isResizing = false; + resizeHandle1.classList.remove("resizing"); + document.body.classList.remove("resizing"); + + // Refresh CodeMirror after resize + if (editor) { + setTimeout(() => editor.refresh(), 10); + } + } + }); + } + + // Horizontal resize (between editor and test results) + const resizeHandle2 = document.getElementById("resizeHandle2"); + const editorBody = document.getElementById("editorBody"); + const testResultsSection = document.getElementById("testResultsSection"); + + if (resizeHandle2 && editorBody && testResultsSection) { + let isResizingH = false; + let startY = 0; + let startHeight = 0; + + resizeHandle2.addEventListener("mousedown", function(e) { + isResizingH = true; + startY = e.clientY; + startHeight = testResultsSection.offsetHeight; + resizeHandle2.classList.add("resizing"); + document.body.classList.add("resizing-horizontal"); + e.preventDefault(); + }); + + document.addEventListener("mousemove", function(e) { + if (!isResizingH) return; + + const delta = startY - e.clientY; // Inverted because we're resizing from bottom + const newHeight = startHeight + delta; + const minHeight = 100; // Minimum height for test results + const maxHeight = 600; // Maximum height for test results + + if (newHeight >= minHeight && newHeight <= maxHeight) { + testResultsSection.style.height = newHeight + "px"; + // Trigger CodeMirror refresh during resize for smooth rendering + if (editor) { + editor.refresh(); + } + } + }); + + document.addEventListener("mouseup", function() { + if (isResizingH) { + isResizingH = false; + resizeHandle2.classList.remove("resizing"); + document.body.classList.remove("resizing-horizontal"); + + // Refresh CodeMirror after resize + if (editor) { + setTimeout(() => editor.refresh(), 10); + } + } + }); + } +}); diff --git a/src/src/templates/components/base.html b/src/src/templates/components/base.html index 0b4d871..1144153 100644 --- a/src/src/templates/components/base.html +++ b/src/src/templates/components/base.html @@ -16,8 +16,8 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; - background: #1e1e1e; - color: #d4d4d4; + background: #0A0E27; + color: #E8EDF2; min-height: 100vh; } @@ -28,16 +28,16 @@ } ::-webkit-scrollbar-track { - background: #1e1e1e; + background: #0A0E27; } ::-webkit-scrollbar-thumb { - background: #424242; + background: #2C3E50; border-radius: 6px; } ::-webkit-scrollbar-thumb:hover { - background: #4e4e4e; + background: #FF6B35; } diff --git a/src/src/templates/components/common-styles.html b/src/src/templates/components/common-styles.html index e5d8de9..c7cfe0d 100644 --- a/src/src/templates/components/common-styles.html +++ b/src/src/templates/components/common-styles.html @@ -15,60 +15,62 @@ } .level-easy, .level-tag.easy { - background: #2ea04326; - color: #3fb950; - border: 1px solid #3fb950; + background: rgba(72, 187, 120, 0.15); + color: #48BB78; + border: 1px solid #48BB78; } .level-medium, .level-tag.medium { - background: #d2910033; - color: #f0b341; - border: 1px solid #f0b341; + background: rgba(212, 165, 116, 0.15); + color: #D4A574; + border: 1px solid #D4A574; } .level-hard, .level-tag.hard { - background: #da363733; - color: #f85149; - border: 1px solid #f85149; + background: rgba(255, 107, 53, 0.15); + color: #FF6B35; + border: 1px solid #FF6B35; } .meta-points { - background: #1f6feb26; - color: #58a6ff; - border: 1px solid #58a6ff; + background: rgba(255, 107, 53, 0.15); + color: #FF6B35; + border: 1px solid #FF6B35; } .meta-attempts { - background: #8957e526; - color: #bc8cff; - border: 1px solid #bc8cff; + background: rgba(176, 120, 86, 0.15); + color: #D4A574; + border: 1px solid #B07856; } .meta-score { - background: #3fb95026; - color: #56d364; - border: 1px solid #56d364; + background: rgba(72, 187, 120, 0.15); + color: #48BB78; + border: 1px solid #48BB78; } /* Button Styles - Reusable */ .btn { padding: 8px 16px; - border: 1px solid #3e3e42; - border-radius: 4px; - background: #2d2d30; - color: #cccccc; + border: 1px solid #2C3E50; + border-radius: 6px; + background: #1A2332; + color: #E8EDF2; cursor: pointer; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; - transition: all 0.2s; + transition: all 0.3s ease; } .btn:hover:not(:disabled) { - background: #3e3e42; + background: #2C3E50; color: #fff; + transform: translateY(-1px); + box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2); } .btn:disabled { @@ -77,35 +79,37 @@ } .btn-primary { - background: #0e639c; + background: linear-gradient(135deg, #FF6B35 0%, #FF8555 100%); color: #fff; - border-color: #1177bb; + border-color: #FF6B35; } .btn-primary:hover:not(:disabled) { - background: #1177bb; + background: linear-gradient(135deg, #FF8555 0%, #FF6B35 100%); + box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4); } .btn-success { - background: #238636; + background: #48BB78; color: #fff; - border-color: #2ea043; + border-color: #48BB78; } .btn-success:hover:not(:disabled) { - background: #2ea043; + background: #38A169; + box-shadow: 0 6px 16px rgba(72, 187, 120, 0.4); } .btn-danger { - background: #da3633; + background: #E53E3E; color: #fff; - border-color: #f85149; + border-color: #E53E3E; } .btn-warning { - background: #d29100; - color: #fff; - border-color: #f0b341; + background: #D4A574; + color: #0A0E27; + border-color: #B07856; } /* Status Icons */ @@ -115,22 +119,22 @@ border-radius: 50%; } - .status-icon.ready { background: #3fb950; } - .status-icon.processing { background: #f0b341; } - .status-icon.blocked { background: #f85149; } + .status-icon.ready { background: #48BB78; } + .status-icon.processing { background: #D4A574; } + .status-icon.blocked { background: #E53E3E; } /* Card Styles */ .card { - background: #252526; - border: 1px solid #3e3e42; - border-radius: 8px; - transition: all 0.2s; + background: #1A2332; + border: 1px solid #2C3E50; + border-radius: 12px; + transition: all 0.3s ease; } .card:hover { - border-color: #0e639c; + border-color: #FF6B35; transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); + box-shadow: 0 8px 24px rgba(255, 107, 53, 0.15); } /* Section Styles */ @@ -141,15 +145,15 @@ .section-title { font-size: 18px; font-weight: 600; - color: #fff; + color: #F0E5D8; margin-bottom: 16px; padding-bottom: 8px; - border-bottom: 2px solid #3e3e42; + border-bottom: 2px solid rgba(255, 107, 53, 0.3); } .section-text { line-height: 1.8; - color: #cccccc; + color: #E8EDF2; white-space: pre-wrap; } diff --git a/src/src/templates/components/nav.html b/src/src/templates/components/nav.html deleted file mode 100644 index b6633f0..0000000 --- a/src/src/templates/components/nav.html +++ /dev/null @@ -1,100 +0,0 @@ -{%load static%} - - - - - \ No newline at end of file diff --git a/src/src/templates/components/navbar.html b/src/src/templates/components/navbar.html index 1565e78..12a0a2e 100644 --- a/src/src/templates/components/navbar.html +++ b/src/src/templates/components/navbar.html @@ -1,6 +1,8 @@ {% load static %} + + -{% endblock %} - - - - \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/src/src/templates/registration/login.html b/src/src/templates/registration/login.html index ecc4dad..7aa78fa 100644 --- a/src/src/templates/registration/login.html +++ b/src/src/templates/registration/login.html @@ -4,117 +4,7 @@ {% block title %}Login - Solve It{% endblock %} {% block extra_css %} - + {% endblock %} {% block content %} diff --git a/src/src/templates/registration/signup.html b/src/src/templates/registration/signup.html index d565dd8..024b09e 100644 --- a/src/src/templates/registration/signup.html +++ b/src/src/templates/registration/signup.html @@ -4,156 +4,7 @@ {% block title %}Join Team - Solve It{% endblock %} {% block extra_css %} - + {% endblock %} {% block content %} diff --git a/src/src/templates/tasks/challenge-detailes.html b/src/src/templates/tasks/challenge-detailes.html index 3ae4d76..63ff483 100644 --- a/src/src/templates/tasks/challenge-detailes.html +++ b/src/src/templates/tasks/challenge-detailes.html @@ -16,7 +16,7 @@
-
+

{{task.title}}

@@ -57,8 +57,11 @@

Sample Test Cases

+ +
+ -
+
@@ -81,10 +84,13 @@

Sample Test Cases

-
+
+ +
+