commit 25470848a439b6293b0c7b9fd6db2554985cc41a
Author: root <root@hub.scroll.pub>
Date: 2024-12-27 22:47:59 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..8ec682c
--- /dev/null
+++ b/body.html
@@ -0,0 +1,29 @@
+<header>
+ <h1>Math Genius</h1>
+ <p>Generate detailed math courses with LaTeX and Markdown support.</p>
+</header>
+
+<main>
+ <section id="course-list">
+ <h2>Available Courses</h2>
+ <ul>
+ <li><a href="#course1">Linear Algebra</a></li>
+ <li><a href="#course2">Calculus</a></li>
+ <li><a href="#course3">Probability & Statistics</a></li>
+ </ul>
+ </section>
+
+ <section id="course-content">
+ <h2>Course Content</h2>
+ <div id="course-details"></div>
+ </section>
+
+ <aside id="whiteboard">
+ <button id="toggle-whiteboard">Toggle Whiteboard</button>
+ <div id="drawing-area"></div>
+ </aside>
+</main>
+
+<footer>
+ <p>Math Genius - Your personal math tutor.</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..275000e
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://mathgenius.scroll.pub
+metaTags
+editButton /edit.html
+title Math Genius - Generate Detailed Math Courses
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..0f56a9d
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "8f4e4d2d-7809-43a3-96d7-70510444da9b",
+ "object": "chat.completion",
+ "created": 1735339662,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nmathgenius.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://mathgenius.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Math Genius - Generate Detailed Math Courses\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Math Genius</h1>\n <p>Generate detailed math courses with LaTeX and Markdown support.</p>\n</header>\n\n<main>\n <section id=\"course-list\">\n <h2>Available Courses</h2>\n <ul>\n <li><a href=\"#course1\">Linear Algebra</a></li>\n <li><a href=\"#course2\">Calculus</a></li>\n <li><a href=\"#course3\">Probability & Statistics</a></li>\n </ul>\n </section>\n\n <section id=\"course-content\">\n <h2>Course Content</h2>\n <div id=\"course-details\"></div>\n </section>\n\n <aside id=\"whiteboard\">\n <button id=\"toggle-whiteboard\">Toggle Whiteboard</button>\n <div id=\"drawing-area\"></div>\n </aside>\n</main>\n\n<footer>\n <p>Math Genius - Your personal math tutor.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4CAF50;\n --secondary-color: #2196F3;\n --background-color: #f5f5f5;\n --text-color: #333;\n --whiteboard-width: 300px;\n}\n\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n margin: 0;\n padding: 0;\n color: var(--text-color);\n background-color: var(--background-color);\n line-height: 1.6;\n}\n\nheader {\n background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nmain {\n display: flex;\n flex-wrap: wrap;\n gap: 2rem;\n padding: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n#course-list {\n flex: 1;\n min-width: 250px;\n}\n\n#course-content {\n flex: 3;\n min-width: 300px;\n}\n\n#whiteboard {\n position: fixed;\n right: 0;\n top: 0;\n width: var(--whiteboard-width);\n height: 100vh;\n background-color: white;\n box-shadow: -2px 0 5px rgba(0,0,0,0.1);\n transition: transform 0.3s ease;\n padding: 1rem;\n}\n\n#whiteboard.hidden {\n transform: translateX(var(--whiteboard-width));\n}\n\n#drawing-area {\n width: 100%;\n height: calc(100vh - 60px);\n border: 1px solid #ddd;\n background-color: #fff;\n}\n\n#toggle-whiteboard {\n position: absolute;\n left: -50px;\n top: 20px;\n background-color: var(--secondary-color);\n color: white;\n border: none;\n padding: 0.5rem 1rem;\n cursor: pointer;\n border-radius: 5px 0 0 5px;\n}\n\n@media (max-width: 768px) {\n main {\n flex-direction: column;\n }\n \n #whiteboard {\n width: 100%;\n height: 300px;\n bottom: 0;\n top: auto;\n }\n \n #whiteboard.hidden {\n transform: translateY(300px);\n }\n \n #toggle-whiteboard {\n left: 20px;\n top: -40px;\n border-radius: 5px 5px 0 0;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const whiteboard = document.getElementById('whiteboard');\n const toggleButton = document.getElementById('toggle-whiteboard');\n const courseLinks = document.querySelectorAll('#course-list a');\n const courseDetails = document.getElementById('course-details');\n\n // Whiteboard toggle functionality\n toggleButton.addEventListener('click', () => {\n whiteboard.classList.toggle('hidden');\n });\n\n // Course navigation functionality\n courseLinks.forEach(link => {\n link.addEventListener('click', function(e) {\n e.preventDefault();\n const courseId = this.getAttribute('href').substring(1);\n loadCourseContent(courseId);\n });\n });\n\n // Basic drawing functionality\n const drawingArea = document.getElementById('drawing-area');\n let isDrawing = false;\n\n drawingArea.addEventListener('mousedown', () => {\n isDrawing = true;\n });\n\n drawingArea.addEventListener('mouseup', () => {\n isDrawing = false;\n });\n\n drawingArea.addEventListener('mousemove', (e) => {\n if (isDrawing) {\n const dot = document.createElement('div');\n dot.style.position = 'absolute';\n dot.style.left = `${e.offsetX}px`;\n dot.style.top = `${e.offsetY}px`;\n dot.style.width = '5px';\n dot.style.height = '5px';\n dot.style.backgroundColor = 'black';\n drawingArea.appendChild(dot);\n }\n });\n\n // Load initial course content\n loadCourseContent('course1');\n\n function loadCourseContent(courseId) {\n // This would be replaced with actual course content loading\n const courses = {\n course1: `<h3>Linear Algebra</h3>\n <p>Introduction to vectors, matrices, and linear transformations.</p>\n <p>$$\\\\begin{bmatrix}1 & 2\\\\\\\\3 & 4\\\\end{bmatrix}$$</p>`,\n course2: `<h3>Calculus</h3>\n <p>Understanding limits, derivatives, and integrals.</p>\n <p>$$\\\\int_{a}^{b} f(x) dx$$</p>`,\n course3: `<h3>Probability & Statistics</h3>\n <p>Exploring probability distributions and statistical analysis.</p>\n <p>$$P(A|B) = \\\\frac{P(B|A)P(A)}{P(B)}$$</p>`\n };\n courseDetails.innerHTML = courses[courseId];\n MathJax.typeset();\n }\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 305,
+ "completion_tokens": 1385,
+ "total_tokens": 1690,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 305
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..19ef019
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# mathgenius1.scroll.pub
+Website generated by DeepSeek from prompt: I want a single page webapp that generates full detailed math courses, supporting latex and markdown style, can click on the course and it takes me to said course, and on the right side i want a sliding whiteboard with similar to tldraw, i can hide it whenever i don't need it and pop it back up when i need it
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..6c68e74
--- /dev/null
+++ b/script.js
@@ -0,0 +1,65 @@
+document.addEventListener('DOMContentLoaded', function() {
+ const whiteboard = document.getElementById('whiteboard');
+ const toggleButton = document.getElementById('toggle-whiteboard');
+ const courseLinks = document.querySelectorAll('#course-list a');
+ const courseDetails = document.getElementById('course-details');
+
+ // Whiteboard toggle functionality
+ toggleButton.addEventListener('click', () => {
+ whiteboard.classList.toggle('hidden');
+ });
+
+ // Course navigation functionality
+ courseLinks.forEach(link => {
+ link.addEventListener('click', function(e) {
+ e.preventDefault();
+ const courseId = this.getAttribute('href').substring(1);
+ loadCourseContent(courseId);
+ });
+ });
+
+ // Basic drawing functionality
+ const drawingArea = document.getElementById('drawing-area');
+ let isDrawing = false;
+
+ drawingArea.addEventListener('mousedown', () => {
+ isDrawing = true;
+ });
+
+ drawingArea.addEventListener('mouseup', () => {
+ isDrawing = false;
+ });
+
+ drawingArea.addEventListener('mousemove', (e) => {
+ if (isDrawing) {
+ const dot = document.createElement('div');
+ dot.style.position = 'absolute';
+ dot.style.left = `${e.offsetX}px`;
+ dot.style.top = `${e.offsetY}px`;
+ dot.style.width = '5px';
+ dot.style.height = '5px';
+ dot.style.backgroundColor = 'black';
+ drawingArea.appendChild(dot);
+ }
+ });
+
+ // Load initial course content
+ loadCourseContent('course1');
+
+ function loadCourseContent(courseId) {
+ // This would be replaced with actual course content loading
+ const courses = {
+ course1: `<h3>Linear Algebra</h3>
+ <p>Introduction to vectors, matrices, and linear transformations.</p>
+ <p>$$\\begin{bmatrix}1 & 2\\\\3 & 4\\end{bmatrix}$$</p>`,
+ course2: `<h3>Calculus</h3>
+ <p>Understanding limits, derivatives, and integrals.</p>
+ <p>$$\\int_{a}^{b} f(x) dx$$</p>`,
+ course3: `<h3>Probability & Statistics</h3>
+ <p>Exploring probability distributions and statistical analysis.</p>
+ <p>$$P(A|B) = \\frac{P(B|A)P(A)}{P(B)}$$</p>`
+ };
+ courseDetails.innerHTML = courses[courseId];
+ MathJax.typeset();
+ }
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..2de8228
--- /dev/null
+++ b/style.css
@@ -0,0 +1,100 @@
+:root {
+ --primary-color: #4CAF50;
+ --secondary-color: #2196F3;
+ --background-color: #f5f5f5;
+ --text-color: #333;
+ --whiteboard-width: 300px;
+}
+
+body {
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ margin: 0;
+ padding: 0;
+ color: var(--text-color);
+ background-color: var(--background-color);
+ line-height: 1.6;
+}
+
+header {
+ background-color: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+}
+
+main {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 2rem;
+ padding: 2rem;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+#course-list {
+ flex: 1;
+ min-width: 250px;
+}
+
+#course-content {
+ flex: 3;
+ min-width: 300px;
+}
+
+#whiteboard {
+ position: fixed;
+ right: 0;
+ top: 0;
+ width: var(--whiteboard-width);
+ height: 100vh;
+ background-color: white;
+ box-shadow: -2px 0 5px rgba(0,0,0,0.1);
+ transition: transform 0.3s ease;
+ padding: 1rem;
+}
+
+#whiteboard.hidden {
+ transform: translateX(var(--whiteboard-width));
+}
+
+#drawing-area {
+ width: 100%;
+ height: calc(100vh - 60px);
+ border: 1px solid #ddd;
+ background-color: #fff;
+}
+
+#toggle-whiteboard {
+ position: absolute;
+ left: -50px;
+ top: 20px;
+ background-color: var(--secondary-color);
+ color: white;
+ border: none;
+ padding: 0.5rem 1rem;
+ cursor: pointer;
+ border-radius: 5px 0 0 5px;
+}
+
+@media (max-width: 768px) {
+ main {
+ flex-direction: column;
+ }
+
+ #whiteboard {
+ width: 100%;
+ height: 300px;
+ bottom: 0;
+ top: auto;
+ }
+
+ #whiteboard.hidden {
+ transform: translateY(300px);
+ }
+
+ #toggle-whiteboard {
+ left: 20px;
+ top: -40px;
+ border-radius: 5px 5px 0 0;
+ }
+}
\ No newline at end of file