Spaces:
Sleeping
Sleeping
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AI Question Generator</title> | |
| <!-- Bootstrap CSS --> | |
| <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"> | |
| <!-- Bootstrap Icons --> | |
| <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet"> | |
| <!-- Google Fonts --> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| <style> | |
| :root { | |
| --primary-color: #6366f1; | |
| --primary-dark: #4f46e5; | |
| --secondary-color: #64748b; | |
| --success-color: #10b981; | |
| --warning-color: #f59e0b; | |
| --danger-color: #ef4444; | |
| --light-bg: #f8fafc; | |
| --card-bg: #ffffff; | |
| --text-primary: #1e293b; | |
| --text-secondary: #64748b; | |
| --border-color: #e2e8f0; | |
| --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); | |
| --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); | |
| --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); | |
| --radius-sm: 0.375rem; | |
| --radius-md: 0.5rem; | |
| --radius-lg: 0.75rem; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; | |
| background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); | |
| min-height: 100vh; | |
| color: var(--text-primary); | |
| line-height: 1.6; | |
| } | |
| .main-container { | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| /* Header */ | |
| .header { | |
| background: rgba(255, 255, 255, 0.9); | |
| backdrop-filter: blur(10px); | |
| border-bottom: 1px solid var(--border-color); | |
| padding: 1rem 0; | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); | |
| } | |
| .header-content { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 1rem; | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| text-decoration: none; | |
| color: var(--text-primary); | |
| } | |
| .logo-icon { | |
| width: 40px; | |
| height: 40px; | |
| background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); | |
| border-radius: var(--radius-md); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: white; | |
| font-size: 1.25rem; | |
| } | |
| .logo-text { | |
| font-weight: 600; | |
| font-size: 1.25rem; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 2rem; | |
| list-style: none; | |
| } | |
| .nav-link { | |
| color: var(--text-secondary); | |
| text-decoration: none; | |
| font-weight: 500; | |
| transition: color 0.2s ease; | |
| } | |
| .nav-link:hover { | |
| color: var(--primary-color); | |
| } | |
| /* Main Content */ | |
| .main-content { | |
| flex: 1; | |
| padding: 2rem 0; | |
| } | |
| .content-wrapper { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 1rem; | |
| } | |
| /* Cards */ | |
| .card { | |
| background: var(--card-bg); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--radius-lg); | |
| box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); | |
| transition: all 0.3s ease; | |
| } | |
| .card:hover { | |
| box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); | |
| transform: translateY(-2px); | |
| } | |
| .card-header { | |
| background: transparent; | |
| border-bottom: 1px solid var(--border-color); | |
| padding: 1.5rem; | |
| } | |
| .card-body { | |
| padding: 1.5rem; | |
| } | |
| .card-title { | |
| font-size: 1.5rem; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| margin-bottom: 0.5rem; | |
| } | |
| .card-subtitle { | |
| color: var(--text-secondary); | |
| font-size: 0.875rem; | |
| margin-bottom: 1rem; | |
| } | |
| /* Buttons */ | |
| .btn { | |
| font-weight: 500; | |
| border-radius: var(--radius-md); | |
| padding: 0.75rem 1.5rem; | |
| transition: all 0.2s ease; | |
| border: none; | |
| cursor: pointer; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| text-decoration: none; | |
| } | |
| .btn-primary { | |
| background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); | |
| color: white; | |
| box-shadow: var(--shadow-sm); | |
| } | |
| .btn-primary:hover { | |
| transform: translateY(-1px); | |
| box-shadow: var(--shadow-md); | |
| color: white; | |
| } | |
| .btn-success { | |
| background: linear-gradient(135deg, var(--success-color), #059669); | |
| color: white; | |
| } | |
| .btn-warning { | |
| background: linear-gradient(135deg, var(--warning-color), #d97706); | |
| color: white; | |
| } | |
| .btn-danger { | |
| background: linear-gradient(135deg, var(--danger-color), #dc2626); | |
| color: white; | |
| } | |
| .btn-outline { | |
| background: transparent; | |
| border: 2px solid var(--border-color); | |
| color: var(--text-secondary); | |
| } | |
| .btn-outline:hover { | |
| background: var(--light-bg); | |
| border-color: var(--primary-color); | |
| color: var(--primary-color); | |
| } | |
| /* Form Elements */ | |
| .form-control { | |
| border: 2px solid var(--border-color); | |
| border-radius: var(--radius-md); | |
| padding: 0.75rem 1rem; | |
| font-size: 0.875rem; | |
| transition: all 0.2s ease; | |
| background: var(--card-bg); | |
| } | |
| .form-control:focus { | |
| border-color: var(--primary-color); | |
| box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); | |
| outline: none; | |
| } | |
| .form-label { | |
| font-weight: 500; | |
| color: var(--text-primary); | |
| margin-bottom: 0.5rem; | |
| } | |
| /* Progress */ | |
| .progress { | |
| height: 0.5rem; | |
| background: var(--border-color); | |
| border-radius: var(--radius-sm); | |
| overflow: hidden; | |
| } | |
| .progress-bar { | |
| background: linear-gradient(90deg, var(--primary-color), var(--primary-dark)); | |
| transition: width 0.3s ease; | |
| } | |
| /* Alerts */ | |
| .alert { | |
| border: none; | |
| border-radius: var(--radius-md); | |
| padding: 1rem 1.25rem; | |
| margin-bottom: 1rem; | |
| } | |
| .alert-success { | |
| background: rgba(16, 185, 129, 0.1); | |
| color: #065f46; | |
| border-left: 4px solid var(--success-color); | |
| } | |
| .alert-danger { | |
| background: rgba(239, 68, 68, 0.1); | |
| color: #991b1b; | |
| border-left: 4px solid var(--danger-color); | |
| } | |
| .alert-warning { | |
| background: rgba(245, 158, 11, 0.1); | |
| color: #92400e; | |
| border-left: 4px solid var(--warning-color); | |
| } | |
| /* Utilities */ | |
| .text-gradient { | |
| background: linear-gradient(135deg, #1e40af, #3b82f6); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| font-weight: 600; | |
| } | |
| .glass-effect { | |
| background: rgba(255, 255, 255, 0.8); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(255, 255, 255, 0.3); | |
| box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); | |
| } | |
| /* Responsive */ | |
| @media (max-width: 768px) { | |
| .header-content { | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| .nav-links { | |
| gap: 1rem; | |
| } | |
| .main-content { | |
| padding: 1rem 0; | |
| } | |
| .card-body { | |
| padding: 1rem; | |
| } | |
| } | |
| /* Loading Animation */ | |
| .loading { | |
| display: inline-block; | |
| width: 20px; | |
| height: 20px; | |
| border: 3px solid rgba(255, 255, 255, 0.3); | |
| border-radius: 50%; | |
| border-top-color: white; | |
| animation: spin 1s ease-in-out infinite; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } | |
| /* Drag and Drop */ | |
| .drop-zone { | |
| border: 2px dashed var(--border-color); | |
| border-radius: var(--radius-lg); | |
| padding: 3rem 2rem; | |
| text-align: center; | |
| transition: all 0.3s ease; | |
| background: var(--light-bg); | |
| cursor: pointer; | |
| } | |
| .drop-zone:hover, | |
| .drop-zone.dragover { | |
| border-color: var(--primary-color); | |
| background: rgba(99, 102, 241, 0.05); | |
| } | |
| .drop-zone-icon { | |
| font-size: 3rem; | |
| color: var(--text-secondary); | |
| margin-bottom: 1rem; | |
| } | |
| /* Topic Cards */ | |
| .topic-card { | |
| min-height: 100px; | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| align-items: center; | |
| transition: all 0.3s ease; | |
| word-wrap: break-word; | |
| overflow-wrap: break-word; | |
| } | |
| .topic-card:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); | |
| } | |
| .topic-text { | |
| font-size: 0.9rem; | |
| line-height: 1.4; | |
| text-align: center; | |
| word-break: break-word; | |
| hyphens: auto; | |
| } | |
| /* Footer */ | |
| .footer { | |
| background: transparent; | |
| margin-top: auto; | |
| } | |
| .footer-card { | |
| background: linear-gradient(135deg, #ffffff, #f0f4ff); | |
| border-radius: 12px; | |
| padding: 1rem 2rem; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); | |
| display: inline-block; | |
| max-width: 400px; | |
| } | |
| .footer-text { | |
| font-family: 'Inter', sans-serif; | |
| font-size: 0.9rem; | |
| font-weight: 500; | |
| color: var(--text-primary); | |
| margin: 0; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="main-container"> | |
| <!-- Header --> | |
| <header class="header"> | |
| <div class="header-content"> | |
| <a href="{{ url_for('index') }}" class="logo"> | |
| <div class="logo-icon"> | |
| <i class="bi bi-robot"></i> | |
| </div> | |
| <div class="logo-text">AI Question Generator</div> | |
| </a> | |
| <nav> | |
| <ul class="nav-links"> | |
| <li><a href="{{ url_for('index') }}" class="nav-link">Home</a></li> | |
| <li><a href="{{ url_for('upload_pdf') }}" class="nav-link">Upload</a></li> | |
| <li><a href="{{ url_for('configure_chunking') }}" class="nav-link">Settings</a></li> | |
| </ul> | |
| </nav> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="main-content"> | |
| <div class="content-wrapper"> | |
| {% with messages = get_flashed_messages(with_categories=true) %} | |
| {% if messages %} | |
| {% for category, message in messages %} | |
| <div class="alert alert-{{ 'danger' if category == 'error' else category }}"> | |
| {{ message }} | |
| </div> | |
| {% endfor %} | |
| {% endif %} | |
| {% endwith %} | |
| {% block content %}{% endblock %} | |
| </div> | |
| </main> | |
| <!-- Footer --> | |
| <footer class="footer mt-auto py-4"> | |
| <div class="content-wrapper"> | |
| <div class="text-center"> | |
| <div class="footer-card"> | |
| <p class="footer-text mb-0">Designed and Developed by Aradhya Pavan H S</p> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| </div> | |
| <!-- Bootstrap JS --> | |
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script> | |
| {% block scripts %}{% endblock %} | |
| </body> | |
| </html> |