step-1-1 / index.html
Design-28's picture
Add 3 files
ec01a81 verified
Raw History Blame Contribute Delete
16.1 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Syllabus Solver — Study Smarter, Not Harder</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Inter', sans-serif;
background-color: #F9FAFC;
color: #1E1E2F;
}
.heading {
font-family: 'Helvetica', sans-serif;
}
.gradient-bg {
background: linear-gradient(135deg, #CABDFF 0%, #A6C8FF 100%);
}
.gradient-bg:hover {
box-shadow: 0 4px 15px rgba(202, 189, 255, 0.4);
}
.neumorphic {
border-radius: 12px;
background: #F9FAFC;
box-shadow: 5px 5px 10px #e6e7ea,
-5px -5px 10px #ffffff;
}
.upload-zone {
border: 2px dashed #A6C8FF;
transition: all 0.3s ease;
}
.upload-zone:hover {
border-color: #CABDFF;
background-color: rgba(202, 189, 255, 0.05);
}
.tab-active {
border-bottom: 3px solid #A6C8FF;
color: #1E1E2F;
font-weight: 600;
}
.fade-in {
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
</style>
</head>
<body class="min-h-screen flex flex-col items-center justify-center p-4">
<div class="w-full max-w-4xl bg-white rounded-2xl shadow-lg overflow-hidden neumorphic">
<!-- Header -->
<div class="gradient-bg p-6 text-white">
<h1 class="heading text-3xl md:text-4xl font-bold">AI Syllabus Solver</h1>
<p class="text-lg opacity-90 mt-2">Study Smarter, Not Harder</p>
</div>
<!-- Main Content -->
<div class="p-6 md:p-8">
<h2 class="heading text-2xl md:text-3xl font-semibold text-gray-800 mb-6">Upload or Enter Your Syllabus</h2>
<!-- Option Selector Tabs -->
<div class="flex border-b border-gray-200 mb-6">
<button id="upload-tab" class="tab-active py-2 px-4 font-medium text-sm md:text-base mr-2 focus:outline-none">
📄 Upload Syllabus (PDF/DOC)
</button>
<button id="manual-tab" class="py-2 px-4 font-medium text-gray-500 text-sm md:text-base focus:outline-none">
📝 Manually Enter Topics
</button>
</div>
<!-- Upload Section -->
<div id="upload-section" class="fade-in">
<div class="upload-zone rounded-lg p-8 text-center mb-6 cursor-pointer transition-all duration-300" id="drop-zone">
<div class="flex flex-col items-center justify-center">
<svg class="w-12 h-12 text-gray-400 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"></path>
</svg>
<p class="text-lg text-gray-600 mb-2">Drag & drop your syllabus file here</p>
<p class="text-sm text-gray-500 mb-4">or</p>
<label for="file-upload" class="gradient-bg text-white px-6 py-2 rounded-full font-medium cursor-pointer hover:shadow-md transition-all duration-300">
Browse Files
</label>
<input id="file-upload" type="file" class="hidden" accept=".pdf,.doc,.docx,.txt">
<p class="text-xs text-gray-500 mt-4">Supports: PDF, DOC, DOCX, TXT</p>
</div>
</div>
<div id="file-preview" class="hidden mb-6">
<h3 class="text-xl font-semibold text-gray-700 mb-3">Detected Topics</h3>
<div class="bg-gray-50 rounded-lg p-4 max-h-60 overflow-y-auto">
<ul id="topic-list" class="space-y-2">
<!-- AI parsed topics will appear here -->
</ul>
</div>
</div>
</div>
<!-- Manual Entry Section -->
<div id="manual-section" class="hidden fade-in">
<div class="mb-6">
<label for="topics-input" class="block text-lg font-medium text-gray-700 mb-2">Enter your syllabus topics:</label>
<textarea id="topics-input" rows="5" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-200 focus:border-blue-500 transition-all" placeholder="Enter topics line-by-line or separate them by commas"></textarea>
<button id="add-topic" class="mt-2 flex items-center text-blue-600 hover:text-blue-800 transition-colors">
<svg class="w-5 h-5 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
</svg>
Add Another Topic
</button>
</div>
<div id="entered-topics" class="hidden mb-6">
<h3 class="text-xl font-semibold text-gray-700 mb-3">Your Topics</h3>
<div class="bg-gray-50 rounded-lg p-4 max-h-60 overflow-y-auto">
<ul id="manual-topic-list" class="space-y-2">
<!-- Manually entered topics will appear here -->
</ul>
</div>
</div>
</div>
<!-- AI Instructions -->
<div class="mb-8">
<h3 class="text-xl font-semibold text-gray-700 mb-3">Tell AI Anything Specific</h3>
<textarea id="ai-instructions" rows="3" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-200 focus:border-blue-500 transition-all" placeholder="Finish in 3 days, skip Unit 4, focus more on Calculus..."></textarea>
</div>
<!-- Continue Button -->
<div class="text-center">
<button id="continue-btn" class="gradient-bg text-white px-8 py-3 rounded-full text-lg font-semibold hover:shadow-lg transition-all duration-300">
Generate Study Plan →
</button>
</div>
</div>
</div>
<script>
// Tab switching functionality
const uploadTab = document.getElementById('upload-tab');
const manualTab = document.getElementById('manual-tab');
const uploadSection = document.getElementById('upload-section');
const manualSection = document.getElementById('manual-section');
uploadTab.addEventListener('click', () => {
uploadTab.classList.add('tab-active');
manualTab.classList.remove('tab-active');
uploadSection.classList.remove('hidden');
manualSection.classList.add('hidden');
});
manualTab.addEventListener('click', () => {
manualTab.classList.add('tab-active');
uploadTab.classList.remove('tab-active');
manualSection.classList.remove('hidden');
uploadSection.classList.add('hidden');
});
// File upload handling
const dropZone = document.getElementById('drop-zone');
const fileInput = document.getElementById('file-upload');
const filePreview = document.getElementById('file-preview');
const topicList = document.getElementById('topic-list');
// Handle drag and drop
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropZone.addEventListener(eventName, preventDefaults, false);
});
function preventDefaults(e) {
e.preventDefault();
e.stopPropagation();
}
['dragenter', 'dragover'].forEach(eventName => {
dropZone.addEventListener(eventName, highlight, false);
});
['dragleave', 'drop'].forEach(eventName => {
dropZone.addEventListener(eventName, unhighlight, false);
});
function highlight() {
dropZone.classList.add('bg-blue-50');
dropZone.classList.add('border-blue-400');
}
function unhighlight() {
dropZone.classList.remove('bg-blue-50');
dropZone.classList.remove('border-blue-400');
}
dropZone.addEventListener('drop', handleDrop, false);
function handleDrop(e) {
const dt = e.dataTransfer;
const files = dt.files;
handleFiles(files);
}
fileInput.addEventListener('change', function() {
handleFiles(this.files);
});
function handleFiles(files) {
if (files.length) {
// Simulate AI parsing (in a real app, this would be an API call)
const fileName = files[0].name;
const fileType = fileName.split('.').pop().toUpperCase();
// Show file preview
dropZone.innerHTML = `
<div class="flex items-center justify-center">
<svg class="w-10 h-10 text-green-500 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<div class="text-left">
<p class="font-medium">${fileName}</p>
<p class="text-sm text-gray-500">${fileType} file • ${(files[0].size / 1024).toFixed(1)} KB</p>
</div>
</div>
`;
// Simulate AI parsing topics (mock data)
setTimeout(() => {
const mockTopics = [
"Introduction to Calculus",
"Limits and Continuity",
"Derivatives: Definition and Basic Rules",
"Applications of Derivatives",
"Integration: Basic Concepts",
"Applications of Integration",
"Differential Equations"
];
topicList.innerHTML = '';
mockTopics.forEach(topic => {
const li = document.createElement('li');
li.className = 'flex items-start';
li.innerHTML = `
<svg class="w-5 h-5 text-blue-500 mr-2 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span>${topic}</span>
`;
topicList.appendChild(li);
});
filePreview.classList.remove('hidden');
}, 1000);
}
}
// Manual topic entry
const topicsInput = document.getElementById('topics-input');
const addTopicBtn = document.getElementById('add-topic');
const enteredTopics = document.getElementById('entered-topics');
const manualTopicList = document.getElementById('manual-topic-list');
topicsInput.addEventListener('input', function() {
if (this.value.trim()) {
enteredTopics.classList.remove('hidden');
updateManualTopics();
} else {
enteredTopics.classList.add('hidden');
}
});
addTopicBtn.addEventListener('click', function() {
if (topicsInput.value.trim()) {
enteredTopics.classList.remove('hidden');
updateManualTopics();
topicsInput.value = '';
}
});
function updateManualTopics() {
const topics = topicsInput.value.split('\n')
.map(t => t.trim())
.filter(t => t.length > 0);
manualTopicList.innerHTML = '';
if (topics.length === 0) {
enteredTopics.classList.add('hidden');
return;
}
topics.forEach(topic => {
const li = document.createElement('li');
li.className = 'flex items-start justify-between group';
li.innerHTML = `
<div class="flex items-start">
<svg class="w-5 h-5 text-blue-500 mr-2 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span>${topic}</span>
</div>
<button class="text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path>
</svg>
</button>
`;
li.querySelector('button').addEventListener('click', function() {
li.remove();
if (manualTopicList.children.length === 0) {
enteredTopics.classList.add('hidden');
}
});
manualTopicList.appendChild(li);
});
}
// Continue button
document.getElementById('continue-btn').addEventListener('click', function() {
// In a real app, this would submit the data and navigate to the next step
alert('Study plan generation started! You will be redirected to your personalized timeline.');
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Design-28/step-1-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>