ExamCraftAI / Backend /templates /index.html
Hkoradiya123
Initial commit
5463318
Raw History Blame Contribute Delete
14.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ExamCraft.ai - AI-Powered Question Paper Generator</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
<div class="container">
<a class="navbar-brand fw-bold" href="/">
<i class="fas fa-brain-circuit me-2 text-gradient"></i>ExamCraft.ai
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link active" href="/">Dashboard</a></li>
<li class="nav-item"><a class="nav-link" href="#">History</a></li>
<li class="nav-item"><a class="nav-link" href="#">Help</a></li>
</ul>
</div>
</div>
</nav>
<!-- <div class="container mt-5">
<header class="text-center mb-5 animate-in">
<div class="d-inline-block px-3 py-1 mb-3 rounded-pill"
style="background: rgba(99, 102, 241, 0.1); border: 1px solid rgba(99, 102, 241, 0.2);">
<span class="status-indicator"></span><span class="small fw-bold text-primary">V2.0 LIVE: Powered by
Llama 3.3</span>
</div>
<h1 class="display-3 fw-bold mb-3">Master Your <span class="text-gradient">Exams</span></h1>
<p class="lead text-white mx-auto" style="max-width: 600px; opacity: 0.9;">Experience the next generation of
academic
assessment. Extract, analyze, and generate professional papers in seconds.</p>
</header> -->
<!-- Stepper -->
<div class="row mb-5 animate-in" style="animation-delay: 0.1s">
<div class="col-md-10 mx-auto">
<div class="d-flex justify-content-between position-relative">
<div class="position-absolute top-50 start-0 end-0 border-top border-secondary"
style="z-index: 0; transform: translateY(-15px); opacity: 0.2;"></div>
<div class="text-center step-active" style="z-index: 1; width: 80px;">
<div class="step-dot mx-auto">1</div>
<span class="small fw-bold">Upload</span>
</div>
<div class="text-center" id="step2Indicator" style="z-index: 1; width: 80px;">
<div class="step-dot mx-auto">2</div>
<span class="small fw-bold">Configure</span>
</div>
<div class="text-center" id="step3Indicator" style="z-index: 1; width: 80px;">
<div class="step-dot mx-auto">3</div>
<span class="small fw-bold">Generate</span>
</div>
</div>
</div>
</div>
<div class="row g-4 animate-in" style="animation-delay: 0.2s">
<!-- Main Content Area -->
<div class="col-lg-8">
<div class="glass-card mb-4" id="uploadCard">
<div class="d-flex align-items-center mb-4">
<div class="p-3 rounded-4 me-3" style="background: rgba(99, 102, 241, 0.1);">
<i class="fas fa-cloud-upload-alt fa-2x text-primary"></i>
</div>
<div>
<h3 class="h4 mb-0">Source Material</h3>
<p class="text-white small mb-0">Upload your syllabus, notes, or textbook chapters.</p>
</div>
</div>
<div class="mb-4">
<div class="upload-zone p-5 text-center rounded-4 border-2 border-dashed"
style="border: 2px dashed rgba(255,255,255,0.1); cursor: pointer;"
onclick="document.getElementById('fileUpload').click()">
<input class="d-none" type="file" id="fileUpload" accept=".pdf,.docx,.txt">
<i class="fas fa-file-pdf fa-3x mb-3 text-white"></i>
<p class="mb-0" id="fileNameDisplay">Click or drag to upload (PDF, DOCX, TXT)</p>
</div>
</div>
<button class="btn btn-primary-custom w-100" id="btnProcessUpload">
<span>Extract Content</span>
<i class="fas fa-arrow-right ms-2"></i>
</button>
<div id="extractionPreview" class="mt-4 d-none">
<div class="d-flex justify-content-between align-items-center mb-2">
<h5 class="small fw-bold text-uppercase tracking-wider text-white mb-0">Extraction Result
</h5>
<span id="extractedFileName"
class="badge bg-primary bg-opacity-25 text-primary border border-primary border-opacity-25 rounded-pill p-1 px-2 small"></span>
<span class="badge bg-success rounded-pill p-1 px-2 small">Success</span>
</div>
<div class="p-3 rounded-4"
style="background: rgba(2, 6, 23, 0.4); border: 1px solid var(--border-glass);">
<p id="previewText" class="small mb-0 text-white"
style="display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;">
</p>
</div>
</div>
</div>
<div class="glass-card d-none" id="configSection">
<div class="d-flex align-items-center mb-4">
<div class="p-3 rounded-4 me-3" style="background: rgba(244, 63, 94, 0.1);">
<i class="fas fa-sliders-h fa-2x text-danger"></i>
</div>
<div>
<h3 class="h4 mb-0">Exam Configuration</h3>
<p class="text-white small mb-0">Fine-tune difficulty and cognitive levels.</p>
</div>
</div>
<div class="row mb-4">
<div class="col-md-6">
<label class="form-label small fw-bold text-white">Difficulty Level</label>
<select class="form-select" id="difficultyLevel">
<option value="Easy">Easy (Level 1-2)</option>
<option value="Medium" selected>Medium (Standard)</option>
<option value="Hard">Hard (Conceptual)</option>
</select>
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-white">Bloom's Levels</label>
<div class="d-flex flex-wrap gap-2">
<input type="checkbox" class="btn-check" id="bloomRemember" value="Remember">
<label class="btn btn-outline-secondary btn-sm rounded-pill px-3"
for="bloomRemember">Remember</label>
<input type="checkbox" class="btn-check" id="bloomUnderstand" value="Understand">
<label class="btn btn-outline-secondary btn-sm rounded-pill px-3"
for="bloomUnderstand">Understand</label>
<input type="checkbox" class="btn-check" id="bloomApply" value="Apply" checked>
<label class="btn btn-outline-secondary btn-sm rounded-pill px-3"
for="bloomApply">Apply</label>
<input type="checkbox" class="btn-check" id="bloomAnalyze" value="Analyze" checked>
<label class="btn btn-outline-secondary btn-sm rounded-pill px-3"
for="bloomAnalyze">Analyze</label>
</div>
</div>
</div>
<div class="mb-4">
<div class="d-flex justify-content-between align-items-center mb-3">
<h5 class="h6 mb-0 fw-bold">Exam Pattern</h5>
<button class="btn btn-link btn-sm text-primary text-decoration-none p-0" id="btnAddSection">
<i class="fas fa-plus-circle me-1"></i>Add Section
</button>
</div>
<div id="patternLines">
<div class="row g-2 mb-3 pattern-line align-items-center">
<div class="col-md-4">
<input type="text" class="form-control" placeholder="Section Name"
value="Section A: MCQs">
</div>
<div class="col-md-2">
<input type="number" class="form-control" placeholder="Qty" value="5">
</div>
<div class="col-md-2">
<input type="number" class="form-control" placeholder="Marks" value="1">
</div>
<div class="col-md-4">
<select class="form-select">
<option value="MCQ">Multiple Choice</option>
<option value="Short Answer">Short Answer</option>
<option value="Long Answer">Long Answer</option>
</select>
</div>
</div>
</div>
</div>
<button class="btn btn-primary-custom w-100 btn-lg" id="btnGenerate">
<i class="fas fa-sparkles me-2" id="genIcon"></i>
<i class="fas fa-circle-notch fa-spin me-2 d-none" id="genSpinner"></i>
Craft Question Paper
</button>
</div>
</div>
<!-- Side Widgets -->
<div class="col-lg-4">
<div class="glass-card mb-4 text-center">
<div class="mb-3">
<i class="fas fa-bolt fa-3x text-warning"></i>
</div>
<h4 class="h5 mb-1">Llama 3.3 Engine</h4>
<p class="small text-white mb-4">Leveraging 70B parameters for deep academic context understanding.
</p>
<div class="d-flex justify-content-around border-top border-secondary pt-3 mt-3" style="opacity: 0.8;">
<div>
<span class="d-block fw-bold h5 mb-0">0.8s</span>
<span class="small text-white">Latency</span>
</div>
<div class="border-start border-secondary"></div>
<div>
<span class="d-block fw-bold h5 mb-0">99%</span>
<span class="small text-white">Accuracy</span>
</div>
</div>
</div>
<div class="glass-card">
<h5 class="h6 mb-4 fw-bold"><i class="fas fa-info-circle me-2 text-primary"></i>Expert Tips</h5>
<div class="d-flex mb-3">
<div class="me-3">
<div class="rounded-circle bg-primary" style="width: 8px; height: 8px; margin-top: 6px;">
</div>
</div>
<p class="small text-white mb-0">For competitive exams, select <b>Analyze</b> and <b>Apply</b>
bloom levels.</p>
</div>
<div class="d-flex">
<div class="me-3">
<div class="rounded-circle bg-primary" style="width: 8px; height: 8px; margin-top: 6px;">
</div>
</div>
<p class="small text-white mb-0">Use high-quality PDF text layers for the most accurate
extraction.</p>
</div>
</div>
</div>
</div>
<!-- Result Preview -->
<div id="resultArea" class="mt-5 d-none animate-in">
<div class="glass-card p-0 overflow-hidden">
<div
class="bg-primary bg-opacity-10 p-4 border-bottom border-primary border-opacity-20 d-flex justify-content-between align-items-center">
<div>
<h3 class="h4 mb-1 fw-bold">Generation Complete</h3>
<p class="text-white small mb-0">Your exam paper is ready for review and export.</p>
</div>
<button class="btn btn-primary-custom" id="btnDownloadPdf">
<i class="fas fa-file-pdf me-2"></i>Export PDF
</button>
</div>
<div class="p-5 shadow-inset" id="paperPreview"
style="min-height: 600px; font-family: 'Times New Roman', Times, serif;">
<!-- Generated content will be injected here -->
</div>
</div>
</div>
</div>
<footer class="mt-5 py-4 text-center text-white border-top border-secondary">
<h1><b>Developed By :</b></h1>
<p>Smit Patel [IU2241050096]</p>
<hr>
<p>Meet Mistry [IU2241050071]</p>
<hr>
<p>Rushil Patel [IU2241050121]</p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
</body>
</html>