commit 0c9a6df4d3628d64e5b4b290ad9071de3fa84683
Author: root <root@hub.scroll.pub>
Date: 2024-12-28 03:59:22 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..ee025e7
--- /dev/null
+++ b/body.html
@@ -0,0 +1,50 @@
+<header>
+ <h1>Teacher Calculator</h1>
+ <p>Efficiently manage grades and track academic performance</p>
+</header>
+
+<main>
+ <section id="grade-management">
+ <h2>Grade Management</h2>
+ <form id="grade-form">
+ <label for="student-name">Student Name:</label>
+ <input type="text" id="student-name" required>
+
+ <label for="subject">Subject:</label>
+ <input type="text" id="subject" required>
+
+ <label for="grade">Grade:</label>
+ <input type="number" id="grade" min="0" max="100" required>
+
+ <button type="submit">Add Grade</button>
+ </form>
+
+ <table id="grade-table">
+ <thead>
+ <tr>
+ <th>Student Name</th>
+ <th>Subject</th>
+ <th>Grade</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- Grades will be dynamically added here -->
+ </tbody>
+ </table>
+ </section>
+
+ <section id="performance-analysis">
+ <h2>Performance Analysis</h2>
+ <div id="stats">
+ <p>Average Grade: <span id="average-grade">0</span></p>
+ <p>Highest Grade: <span id="highest-grade">0</span></p>
+ <p>Lowest Grade: <span id="lowest-grade">0</span></p>
+ </div>
+ <canvas id="grade-chart" width="400" height="200"></canvas>
+ </section>
+</main>
+
+<footer>
+ <p>Simplify your grading process with Teacher Calculator</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..722ea11
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://teachercalc.scroll.pub
+metaTags
+editButton /edit.html
+title Teacher Calculator - Manage Grades & Academic Performance
+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..14a2b3b
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "4db49474-b13e-4f1a-bb62-2b724b2821c2",
+ "object": "chat.completion",
+ "created": 1735358338,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nteachercalc.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://teachercalc.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Teacher Calculator - Manage Grades & Academic Performance\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Teacher Calculator</h1>\n <p>Efficiently manage grades and track academic performance</p>\n</header>\n\n<main>\n <section id=\"grade-management\">\n <h2>Grade Management</h2>\n <form id=\"grade-form\">\n <label for=\"student-name\">Student Name:</label>\n <input type=\"text\" id=\"student-name\" required>\n \n <label for=\"subject\">Subject:</label>\n <input type=\"text\" id=\"subject\" required>\n \n <label for=\"grade\">Grade:</label>\n <input type=\"number\" id=\"grade\" min=\"0\" max=\"100\" required>\n \n <button type=\"submit\">Add Grade</button>\n </form>\n \n <table id=\"grade-table\">\n <thead>\n <tr>\n <th>Student Name</th>\n <th>Subject</th>\n <th>Grade</th>\n <th>Actions</th>\n </tr>\n </thead>\n <tbody>\n <!-- Grades will be dynamically added here -->\n </tbody>\n </table>\n </section>\n \n <section id=\"performance-analysis\">\n <h2>Performance Analysis</h2>\n <div id=\"stats\">\n <p>Average Grade: <span id=\"average-grade\">0</span></p>\n <p>Highest Grade: <span id=\"highest-grade\">0</span></p>\n <p>Lowest Grade: <span id=\"lowest-grade\">0</span></p>\n </div>\n <canvas id=\"grade-chart\" width=\"400\" height=\"200\"></canvas>\n </section>\n</main>\n\n<footer>\n <p>Simplify your grading process with Teacher Calculator</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f5f5f5;\n --accent-color: #ff6b6b;\n --text-color: #333;\n --border-radius: 8px;\n --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n margin: 0;\n padding: 0;\n background-color: var(--secondary-color);\n}\n\nheader {\n background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n border-bottom: 4px solid var(--accent-color);\n}\n\nmain {\n max-width: 1200px;\n margin: 2rem auto;\n padding: 1rem;\n}\n\nsection {\n background: white;\n padding: 2rem;\n margin-bottom: 2rem;\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n}\n\nh2 {\n color: var(--primary-color);\n margin-bottom: 1.5rem;\n}\n\nform {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\nlabel {\n font-weight: bold;\n}\n\ninput {\n padding: 0.5rem;\n border: 1px solid #ddd;\n border-radius: var(--border-radius);\n}\n\nbutton {\n background-color: var(--primary-color);\n color: white;\n padding: 0.75rem;\n border: none;\n border-radius: var(--border-radius);\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: var(--accent-color);\n}\n\ntable {\n width: 100%;\n border-collapse: collapse;\n margin-top: 1rem;\n}\n\nth, td {\n padding: 1rem;\n text-align: left;\n border-bottom: 1px solid #ddd;\n}\n\nth {\n background-color: var(--primary-color);\n color: white;\n}\n\ntr:hover {\n background-color: var(--secondary-color);\n}\n\n#stats {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\n#stats p {\n background: var(--secondary-color);\n padding: 1rem;\n border-radius: var(--border-radius);\n text-align: center;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background-color: var(--primary-color);\n color: white;\n margin-top: 2rem;\n}\n\n@media (max-width: 768px) {\n form {\n grid-template-columns: 1fr;\n }\n \n #stats {\n grid-template-columns: 1fr;\n }\n}\n---script.js---\nconst gradeForm = document.getElementById('grade-form');\nconst gradeTable = document.getElementById('grade-table').getElementsByTagName('tbody')[0];\nconst averageGrade = document.getElementById('average-grade');\nconst highestGrade = document.getElementById('highest-grade');\nconst lowestGrade = document.getElementById('lowest-grade');\nconst gradeChart = document.getElementById('grade-chart').getContext('2d');\n\nlet grades = [];\n\ngradeForm.addEventListener('submit', function(e) {\n e.preventDefault();\n \n const studentName = document.getElementById('student-name').value;\n const subject = document.getElementById('subject').value;\n const grade = parseInt(document.getElementById('grade').value);\n \n const newGrade = {\n id: Date.now(),\n studentName,\n subject,\n grade\n };\n \n grades.push(newGrade);\n addGradeToTable(newGrade);\n updateStats();\n updateChart();\n gradeForm.reset();\n});\n\nfunction addGradeToTable(grade) {\n const row = gradeTable.insertRow();\n \n row.innerHTML = `\n <td>${grade.studentName}</td>\n <td>${grade.subject}</td>\n <td>${grade.grade}</td>\n <td>\n <button onclick=\"editGrade(${grade.id})\">Edit</button>\n <button onclick=\"deleteGrade(${grade.id})\">Delete</button>\n </td>\n `;\n}\n\nfunction updateStats() {\n const gradeValues = grades.map(g => g.grade);\n const total = gradeValues.reduce((sum, grade) => sum + grade, 0);\n const avg = total / gradeValues.length || 0;\n const max = Math.max(...gradeValues) || 0;\n const min = Math.min(...gradeValues) || 0;\n \n averageGrade.textContent = avg.toFixed(2);\n highestGrade.textContent = max;\n lowestGrade.textContent = min;\n}\n\nfunction updateChart() {\n const chart = new Chart(gradeChart, {\n type: 'line',\n data: {\n labels: grades.map((_, i) => `Grade ${i + 1}`),\n datasets: [{\n label: 'Grades',\n data: grades.map(g => g.grade),\n backgroundColor: 'rgba(74, 144, 226, 0.2)',\n borderColor: 'rgba(74, 144, 226, 1)',\n borderWidth: 2\n }]\n },\n options: {\n scales: {\n y: {\n beginAtZero: true,\n max: 100\n }\n }\n }\n });\n}\n\nfunction editGrade(id) {\n const grade = grades.find(g => g.id === id);\n if (grade) {\n document.getElementById('student-name').value = grade.studentName;\n document.getElementById('subject').value = grade.subject;\n document.getElementById('grade').value = grade.grade;\n \n deleteGrade(id);\n }\n}\n\nfunction deleteGrade(id) {\n grades = grades.filter(g => g.id !== id);\n gradeTable.innerHTML = '';\n grades.forEach(addGradeToTable);\n updateStats();\n updateChart();\n}\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 249,
+ "completion_tokens": 1805,
+ "total_tokens": 2054,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 249
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..9ba6613
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# teachercalc.scroll.pub
+Website generated by DeepSeek from prompt: I want teacher calculator crud operation that helps teacher Manage grades and academic performance
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..18fcc9a
--- /dev/null
+++ b/script.js
@@ -0,0 +1,98 @@
+const gradeForm = document.getElementById('grade-form');
+const gradeTable = document.getElementById('grade-table').getElementsByTagName('tbody')[0];
+const averageGrade = document.getElementById('average-grade');
+const highestGrade = document.getElementById('highest-grade');
+const lowestGrade = document.getElementById('lowest-grade');
+const gradeChart = document.getElementById('grade-chart').getContext('2d');
+
+let grades = [];
+
+gradeForm.addEventListener('submit', function(e) {
+ e.preventDefault();
+
+ const studentName = document.getElementById('student-name').value;
+ const subject = document.getElementById('subject').value;
+ const grade = parseInt(document.getElementById('grade').value);
+
+ const newGrade = {
+ id: Date.now(),
+ studentName,
+ subject,
+ grade
+ };
+
+ grades.push(newGrade);
+ addGradeToTable(newGrade);
+ updateStats();
+ updateChart();
+ gradeForm.reset();
+});
+
+function addGradeToTable(grade) {
+ const row = gradeTable.insertRow();
+
+ row.innerHTML = `
+ <td>${grade.studentName}</td>
+ <td>${grade.subject}</td>
+ <td>${grade.grade}</td>
+ <td>
+ <button onclick="editGrade(${grade.id})">Edit</button>
+ <button onclick="deleteGrade(${grade.id})">Delete</button>
+ </td>
+ `;
+}
+
+function updateStats() {
+ const gradeValues = grades.map(g => g.grade);
+ const total = gradeValues.reduce((sum, grade) => sum + grade, 0);
+ const avg = total / gradeValues.length || 0;
+ const max = Math.max(...gradeValues) || 0;
+ const min = Math.min(...gradeValues) || 0;
+
+ averageGrade.textContent = avg.toFixed(2);
+ highestGrade.textContent = max;
+ lowestGrade.textContent = min;
+}
+
+function updateChart() {
+ const chart = new Chart(gradeChart, {
+ type: 'line',
+ data: {
+ labels: grades.map((_, i) => `Grade ${i + 1}`),
+ datasets: [{
+ label: 'Grades',
+ data: grades.map(g => g.grade),
+ backgroundColor: 'rgba(74, 144, 226, 0.2)',
+ borderColor: 'rgba(74, 144, 226, 1)',
+ borderWidth: 2
+ }]
+ },
+ options: {
+ scales: {
+ y: {
+ beginAtZero: true,
+ max: 100
+ }
+ }
+ }
+ });
+}
+
+function editGrade(id) {
+ const grade = grades.find(g => g.id === id);
+ if (grade) {
+ document.getElementById('student-name').value = grade.studentName;
+ document.getElementById('subject').value = grade.subject;
+ document.getElementById('grade').value = grade.grade;
+
+ deleteGrade(id);
+ }
+}
+
+function deleteGrade(id) {
+ grades = grades.filter(g => g.id !== id);
+ gradeTable.innerHTML = '';
+ grades.forEach(addGradeToTable);
+ updateStats();
+ updateChart();
+}
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..79dae67
--- /dev/null
+++ b/style.css
@@ -0,0 +1,128 @@
+:root {
+ --primary-color: #4a90e2;
+ --secondary-color: #f5f5f5;
+ --accent-color: #ff6b6b;
+ --text-color: #333;
+ --border-radius: 8px;
+ --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+}
+
+body {
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ margin: 0;
+ padding: 0;
+ background-color: var(--secondary-color);
+}
+
+header {
+ background-color: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+ border-bottom: 4px solid var(--accent-color);
+}
+
+main {
+ max-width: 1200px;
+ margin: 2rem auto;
+ padding: 1rem;
+}
+
+section {
+ background: white;
+ padding: 2rem;
+ margin-bottom: 2rem;
+ border-radius: var(--border-radius);
+ box-shadow: var(--box-shadow);
+}
+
+h2 {
+ color: var(--primary-color);
+ margin-bottom: 1.5rem;
+}
+
+form {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 1rem;
+ margin-bottom: 2rem;
+}
+
+label {
+ font-weight: bold;
+}
+
+input {
+ padding: 0.5rem;
+ border: 1px solid #ddd;
+ border-radius: var(--border-radius);
+}
+
+button {
+ background-color: var(--primary-color);
+ color: white;
+ padding: 0.75rem;
+ border: none;
+ border-radius: var(--border-radius);
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+button:hover {
+ background-color: var(--accent-color);
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+ margin-top: 1rem;
+}
+
+th, td {
+ padding: 1rem;
+ text-align: left;
+ border-bottom: 1px solid #ddd;
+}
+
+th {
+ background-color: var(--primary-color);
+ color: white;
+}
+
+tr:hover {
+ background-color: var(--secondary-color);
+}
+
+#stats {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
+ gap: 1rem;
+ margin-bottom: 2rem;
+}
+
+#stats p {
+ background: var(--secondary-color);
+ padding: 1rem;
+ border-radius: var(--border-radius);
+ text-align: center;
+}
+
+footer {
+ text-align: center;
+ padding: 1rem;
+ background-color: var(--primary-color);
+ color: white;
+ margin-top: 2rem;
+}
+
+@media (max-width: 768px) {
+ form {
+ grid-template-columns: 1fr;
+ }
+
+ #stats {
+ grid-template-columns: 1fr;
+ }
+}
\ No newline at end of file