Make it actually functional and useable https://math-gpt.org/ using this
Browse files- index.html +10 -10
- math-assistant.html +235 -0
index.html
CHANGED
|
@@ -55,10 +55,10 @@
|
|
| 55 |
</div>
|
| 56 |
<div class="hidden md:block">
|
| 57 |
<div class="ml-10 flex items-center space-x-4">
|
| 58 |
-
<a href="
|
| 59 |
-
<a href="#video-tool" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-200 dark:hover:bg-gray-700">Video Tool</a>
|
| 60 |
-
<a href="
|
| 61 |
-
|
| 62 |
<i data-feather="moon" class="hidden dark:block"></i>
|
| 63 |
<i data-feather="sun" class="dark:hidden"></i>
|
| 64 |
</button>
|
|
@@ -86,13 +86,13 @@
|
|
| 86 |
Perfect for creators, students, and educators.
|
| 87 |
</p>
|
| 88 |
<div class="mt-10 flex flex-col sm:flex-row justify-center gap-4">
|
| 89 |
-
<a href="#video-tool" class="px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-primary hover:bg-primary/90 md:py-4 md:text-lg md:px-10">
|
| 90 |
Start Creating
|
| 91 |
</a>
|
| 92 |
-
<a href="
|
| 93 |
Solve Math Now
|
| 94 |
</a>
|
| 95 |
-
|
| 96 |
</div>
|
| 97 |
</div>
|
| 98 |
|
|
@@ -235,13 +235,13 @@
|
|
| 235 |
Join thousands of creators and students using MathVid Studio every day.
|
| 236 |
</p>
|
| 237 |
<div class="flex flex-col sm:flex-row justify-center gap-4">
|
| 238 |
-
<a href="
|
| 239 |
Get Started Free
|
| 240 |
</a>
|
| 241 |
-
<a href="#" class="px-8 py-3 border border-white text-base font-medium rounded-md text-white hover:bg-white/10 md:py-4 md:text-lg md:px-10">
|
| 242 |
Learn More
|
| 243 |
</a>
|
| 244 |
-
|
| 245 |
</div>
|
| 246 |
</section>
|
| 247 |
|
|
|
|
| 55 |
</div>
|
| 56 |
<div class="hidden md:block">
|
| 57 |
<div class="ml-10 flex items-center space-x-4">
|
| 58 |
+
<a href="index.html" class="px-3 py-2 rounded-md text-sm font-medium bg-primary text-white">Home</a>
|
| 59 |
+
<a href="index.html#video-tool" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-200 dark:hover:bg-gray-700">Video Tool</a>
|
| 60 |
+
<a href="math-assistant.html" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-200 dark:hover:bg-gray-700">Math Assistant</a>
|
| 61 |
+
<button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700">
|
| 62 |
<i data-feather="moon" class="hidden dark:block"></i>
|
| 63 |
<i data-feather="sun" class="dark:hidden"></i>
|
| 64 |
</button>
|
|
|
|
| 86 |
Perfect for creators, students, and educators.
|
| 87 |
</p>
|
| 88 |
<div class="mt-10 flex flex-col sm:flex-row justify-center gap-4">
|
| 89 |
+
<a href="index.html#video-tool" class="px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-primary hover:bg-primary/90 md:py-4 md:text-lg md:px-10">
|
| 90 |
Start Creating
|
| 91 |
</a>
|
| 92 |
+
<a href="math-assistant.html" class="px-8 py-3 border border-transparent text-base font-medium rounded-md text-primary bg-white dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 md:py-4 md:text-lg md:px-10">
|
| 93 |
Solve Math Now
|
| 94 |
</a>
|
| 95 |
+
</div>
|
| 96 |
</div>
|
| 97 |
</div>
|
| 98 |
|
|
|
|
| 235 |
Join thousands of creators and students using MathVid Studio every day.
|
| 236 |
</p>
|
| 237 |
<div class="flex flex-col sm:flex-row justify-center gap-4">
|
| 238 |
+
<a href="math-assistant.html" class="px-8 py-3 border border-transparent text-base font-medium rounded-md text-primary bg-white hover:bg-gray-100 md:py-4 md:text-lg md:px-10">
|
| 239 |
Get Started Free
|
| 240 |
</a>
|
| 241 |
+
<a href="index.html#video-tool" class="px-8 py-3 border border-white text-base font-medium rounded-md text-white hover:bg-white/10 md:py-4 md:text-lg md:px-10">
|
| 242 |
Learn More
|
| 243 |
</a>
|
| 244 |
+
</div>
|
| 245 |
</div>
|
| 246 |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="h-full">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Math Assistant | MathVid Studio</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
theme: {
|
| 12 |
+
extend: {
|
| 13 |
+
colors: {
|
| 14 |
+
primary: '#6366f1',
|
| 15 |
+
secondary: '#8b5cf6',
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
</script>
|
| 21 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 22 |
+
<style>
|
| 23 |
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
|
| 24 |
+
body {
|
| 25 |
+
font-family: 'Poppins', sans-serif;
|
| 26 |
+
}
|
| 27 |
+
.gradient-text {
|
| 28 |
+
background-clip: text;
|
| 29 |
+
-webkit-background-clip: text;
|
| 30 |
+
color: transparent;
|
| 31 |
+
background-image: linear-gradient(90deg, #6366f1, #8b5cf6);
|
| 32 |
+
}
|
| 33 |
+
.glass-effect {
|
| 34 |
+
background: rgba(255, 255, 255, 0.1);
|
| 35 |
+
backdrop-filter: blur(10px);
|
| 36 |
+
-webkit-backdrop-filter: blur(10px);
|
| 37 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 38 |
+
}
|
| 39 |
+
</style>
|
| 40 |
+
</head>
|
| 41 |
+
<body class="min-h-full bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800 text-gray-900 dark:text-gray-100 transition-colors duration-300">
|
| 42 |
+
<!-- Navigation -->
|
| 43 |
+
<nav class="glass-effect fixed top-0 left-0 right-0 z-50">
|
| 44 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 45 |
+
<div class="flex justify-between h-16 items-center">
|
| 46 |
+
<div class="flex items-center">
|
| 47 |
+
<div class="flex-shrink-0 flex items-center">
|
| 48 |
+
<i data-feather="video" class="text-primary h-8 w-8"></i>
|
| 49 |
+
<span class="ml-2 text-xl font-bold gradient-text">MathVid Studio</span>
|
| 50 |
+
</div>
|
| 51 |
+
</div>
|
| 52 |
+
<div class="hidden md:block">
|
| 53 |
+
<div class="ml-10 flex items-center space-x-4">
|
| 54 |
+
<a href="index.html" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-200 dark:hover:bg-gray-700">Home</a>
|
| 55 |
+
<a href="index.html#video-tool" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-200 dark:hover:bg-gray-700">Video Tool</a>
|
| 56 |
+
<a href="math-assistant.html" class="px-3 py-2 rounded-md text-sm font-medium bg-primary text-white">Math Assistant</a>
|
| 57 |
+
<button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700">
|
| 58 |
+
<i data-feather="moon" class="hidden dark:block"></i>
|
| 59 |
+
<i data-feather="sun" class="dark:hidden"></i>
|
| 60 |
+
</button>
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
<div class="-mr-2 flex md:hidden">
|
| 64 |
+
<button type="button" id="mobile-menu-button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none">
|
| 65 |
+
<i data-feather="menu"></i>
|
| 66 |
+
</button>
|
| 67 |
+
</div>
|
| 68 |
+
</div>
|
| 69 |
+
</div>
|
| 70 |
+
</nav>
|
| 71 |
+
|
| 72 |
+
<main class="pt-24 pb-12 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
|
| 73 |
+
<div class="text-center mb-12">
|
| 74 |
+
<h1 class="text-3xl md:text-5xl font-bold mb-4 gradient-text">Math Problem Solver</h1>
|
| 75 |
+
<p class="text-lg text-gray-600 dark:text-gray-300 max-w-3xl mx-auto">
|
| 76 |
+
Upload your math problems and get step-by-step solutions instantly.
|
| 77 |
+
</p>
|
| 78 |
+
</div>
|
| 79 |
+
|
| 80 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
| 81 |
+
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-xl p-6">
|
| 82 |
+
<h2 class="text-xl font-bold mb-4">Upload Your Math Problem</h2>
|
| 83 |
+
<form id="math-form" class="space-y-4">
|
| 84 |
+
<div class="border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg p-6 text-center">
|
| 85 |
+
<i data-feather="upload" class="mx-auto h-12 w-12 text-gray-400"></i>
|
| 86 |
+
<h4 class="mt-2 font-medium text-gray-900 dark:text-gray-100">Drag and drop files here</h4>
|
| 87 |
+
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400">PDF, JPG, or PNG up to 10MB</p>
|
| 88 |
+
<input type="file" id="math-file" accept=".pdf,.jpg,.jpeg,.png" class="hidden">
|
| 89 |
+
<button type="button" id="file-select" class="mt-4 px-4 py-2 bg-gray-100 dark:bg-gray-700 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600">
|
| 90 |
+
Select File
|
| 91 |
+
</button>
|
| 92 |
+
<div id="file-info" class="mt-2 text-sm hidden"></div>
|
| 93 |
+
</div>
|
| 94 |
+
<div class="flex items-center justify-between text-sm text-gray-500 dark:text-gray-400">
|
| 95 |
+
<span>Handwritten equations supported</span>
|
| 96 |
+
<i data-feather="check-circle" class="text-green-500"></i>
|
| 97 |
+
</div>
|
| 98 |
+
<button type="submit" class="w-full px-6 py-3 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors flex items-center justify-center">
|
| 99 |
+
<span id="submit-text">Solve Math Problem</span>
|
| 100 |
+
<i data-feather="loader" class="animate-spin h-5 w-5 ml-2 hidden" id="spinner"></i>
|
| 101 |
+
</button>
|
| 102 |
+
</form>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-xl p-6">
|
| 106 |
+
<h2 class="text-xl font-bold mb-4">Solution</h2>
|
| 107 |
+
<div id="solution-container" class="min-h-64 bg-gray-50 dark:bg-gray-700 rounded-lg p-4">
|
| 108 |
+
<div id="solution-placeholder" class="flex flex-col items-center justify-center h-full text-gray-400">
|
| 109 |
+
<i data-feather="file-text" class="h-12 w-12 mb-2"></i>
|
| 110 |
+
<p>Your solution will appear here</p>
|
| 111 |
+
</div>
|
| 112 |
+
<div id="solution-content" class="hidden"></div>
|
| 113 |
+
</div>
|
| 114 |
+
<div class="mt-4 flex justify-end">
|
| 115 |
+
<button id="copy-solution" class="px-4 py-2 bg-gray-100 dark:bg-gray-700 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 hidden">
|
| 116 |
+
<i data-feather="copy" class="w-4 h-4 mr-2"></i> Copy Solution
|
| 117 |
+
</button>
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
|
| 122 |
+
<div class="mt-12 glass-effect p-6 rounded-xl">
|
| 123 |
+
<h2 class="text-xl font-bold mb-4">How it works</h2>
|
| 124 |
+
<ol class="space-y-4">
|
| 125 |
+
<li class="flex items-start">
|
| 126 |
+
<span class="flex-shrink-0 flex items-center justify-center h-6 w-6 rounded-full bg-primary text-white text-sm font-medium">1</span>
|
| 127 |
+
<span class="ml-3 text-gray-700 dark:text-gray-200">Upload your math problem (PDF or image)</span>
|
| 128 |
+
</li>
|
| 129 |
+
<li class="flex items-start">
|
| 130 |
+
<span class="flex-shrink-0 flex items-center justify-center h-6 w-6 rounded-full bg-primary text-white text-sm font-medium">2</span>
|
| 131 |
+
<span class="ml-3 text-gray-700 dark:text-gray-200">Our AI analyzes the problem and identifies the math concepts</span>
|
| 132 |
+
</li>
|
| 133 |
+
<li class="flex items-start">
|
| 134 |
+
<span class="flex-shrink-0 flex items-center justify-center h-6 w-6 rounded-full bg-primary text-white text-sm font-medium">3</span>
|
| 135 |
+
<span class="ml-3 text-gray-700 dark:text-gray-200">Get detailed, step-by-step solutions with explanations</span>
|
| 136 |
+
</li>
|
| 137 |
+
</ol>
|
| 138 |
+
</div>
|
| 139 |
+
</main>
|
| 140 |
+
|
| 141 |
+
<script>
|
| 142 |
+
feather.replace();
|
| 143 |
+
|
| 144 |
+
// File upload handling
|
| 145 |
+
document.getElementById('file-select').addEventListener('click', () => {
|
| 146 |
+
document.getElementById('math-file').click();
|
| 147 |
+
});
|
| 148 |
+
|
| 149 |
+
document.getElementById('math-file').addEventListener('change', (e) => {
|
| 150 |
+
const file = e.target.files[0];
|
| 151 |
+
if (file) {
|
| 152 |
+
const fileInfo = document.getElementById('file-info');
|
| 153 |
+
fileInfo.textContent = `${file.name} (${(file.size / 1024 / 1024).toFixed(2)} MB)`;
|
| 154 |
+
fileInfo.classList.remove('hidden');
|
| 155 |
+
}
|
| 156 |
+
});
|
| 157 |
+
|
| 158 |
+
// Form submission
|
| 159 |
+
document.getElementById('math-form').addEventListener('submit', async (e) => {
|
| 160 |
+
e.preventDefault();
|
| 161 |
+
const fileInput = document.getElementById('math-file');
|
| 162 |
+
const file = fileInput.files[0];
|
| 163 |
+
|
| 164 |
+
if (!file) {
|
| 165 |
+
alert('Please select a file first');
|
| 166 |
+
return;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
const spinner = document.getElementById('spinner');
|
| 170 |
+
const submitText = document.getElementById('submit-text');
|
| 171 |
+
const solutionContent = document.getElementById('solution-content');
|
| 172 |
+
const solutionPlaceholder = document.getElementById('solution-placeholder');
|
| 173 |
+
const copyButton = document.getElementById('copy-solution');
|
| 174 |
+
|
| 175 |
+
spinner.classList.remove('hidden');
|
| 176 |
+
submitText.textContent = 'Processing...';
|
| 177 |
+
|
| 178 |
+
// Simulate API call (replace with actual API call to math-gpt.org)
|
| 179 |
+
setTimeout(() => {
|
| 180 |
+
spinner.classList.add('hidden');
|
| 181 |
+
submitText.textContent = 'Solve Math Problem';
|
| 182 |
+
|
| 183 |
+
// Sample solution (replace with actual API response)
|
| 184 |
+
solutionPlaceholder.classList.add('hidden');
|
| 185 |
+
solutionContent.innerHTML = `
|
| 186 |
+
<div class="prose dark:prose-invert max-w-none">
|
| 187 |
+
<h3 class="text-lg font-semibold">Problem:</h3>
|
| 188 |
+
<p>Find the derivative of f(x) = 3x² + 2x - 5</p>
|
| 189 |
+
|
| 190 |
+
<h3 class="text-lg font-semibold mt-4">Solution:</h3>
|
| 191 |
+
<ol class="list-decimal pl-5 space-y-2">
|
| 192 |
+
<li>Identify each term in the function: 3x², 2x, and -5</li>
|
| 193 |
+
<li>Apply the power rule to each term:
|
| 194 |
+
<ul class="list-disc pl-5 mt-1">
|
| 195 |
+
<li>For 3x²: derivative is 2*3x^(2-1) = 6x</li>
|
| 196 |
+
<li>For 2x: derivative is 1*2x^(1-1) = 2</li>
|
| 197 |
+
<li>For -5: derivative is 0 (constant term)</li>
|
| 198 |
+
</ul>
|
| 199 |
+
</li>
|
| 200 |
+
<li>Combine the derivatives: f'(x) = 6x + 2</li>
|
| 201 |
+
</ol>
|
| 202 |
+
|
| 203 |
+
<h3 class="text-lg font-semibold mt-4">Final Answer:</h3>
|
| 204 |
+
<p class="bg-gray-100 dark:bg-gray-700 p-3 rounded font-mono">f'(x) = 6x + 2</p>
|
| 205 |
+
</div>
|
| 206 |
+
`;
|
| 207 |
+
solutionContent.classList.remove('hidden');
|
| 208 |
+
copyButton.classList.remove('hidden');
|
| 209 |
+
}, 2000);
|
| 210 |
+
});
|
| 211 |
+
|
| 212 |
+
// Copy solution
|
| 213 |
+
document.getElementById('copy-solution').addEventListener('click', () => {
|
| 214 |
+
const solutionText = document.getElementById('solution-content').textContent;
|
| 215 |
+
navigator.clipboard.writeText(solutionText).then(() => {
|
| 216 |
+
const button = document.getElementById('copy-solution');
|
| 217 |
+
const originalText = button.innerHTML;
|
| 218 |
+
button.innerHTML = '<i data-feather="check" class="w-4 h-4 mr-2"></i> Copied!';
|
| 219 |
+
feather.replace();
|
| 220 |
+
setTimeout(() => {
|
| 221 |
+
button.innerHTML = originalText;
|
| 222 |
+
feather.replace();
|
| 223 |
+
}, 2000);
|
| 224 |
+
});
|
| 225 |
+
});
|
| 226 |
+
|
| 227 |
+
// Theme toggle
|
| 228 |
+
document.getElementById('theme-toggle').addEventListener('click', () => {
|
| 229 |
+
document.documentElement.classList.toggle('dark');
|
| 230 |
+
localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light');
|
| 231 |
+
feather.replace();
|
| 232 |
+
});
|
| 233 |
+
</script>
|
| 234 |
+
</body>
|
| 235 |
+
</html>
|