commit 9f8e1f48a5031c9f8e7d011125b5f190808cbf1a
Author: root <root@hub.scroll.pub>
Date: 2025-01-04 18:20:12 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..cb3d00b
--- /dev/null
+++ b/body.html
@@ -0,0 +1,56 @@
+<header>
+ <h1>Habitly</h1>
+ <p>Your Personal Habit Tracker</p>
+</header>
+
+<main>
+ <section id="habit-form">
+ <h2>Add a New Habit</h2>
+ <form>
+ <label for="habit-name">Habit Name:</label>
+ <input type="text" id="habit-name" required>
+
+ <label for="reminder-time">Reminder Time:</label>
+ <input type="time" id="reminder-time" required>
+
+ <label for="frequency">Frequency:</label>
+ <select id="frequency" required>
+ <option value="daily">Daily</option>
+ <option value="weekly">Weekly</option>
+ <option value="monthly">Monthly</option>
+ </select>
+
+ <button type="submit">Add Habit</button>
+ </form>
+ </section>
+
+ <section id="habit-list">
+ <h2>Your Habits</h2>
+ <ul id="habits"></ul>
+ </section>
+
+ <section id="goals">
+ <h2>Goals</h2>
+ <div class="goal-container">
+ <div class="goal-card">
+ <h3>Short-term Goals</h3>
+ <ul id="short-term-goals"></ul>
+ <button onclick="addGoal('short')">Add Goal</button>
+ </div>
+ <div class="goal-card">
+ <h3>Long-term Goals</h3>
+ <ul id="long-term-goals"></ul>
+ <button onclick="addGoal('long')">Add Goal</button>
+ </div>
+ </div>
+ </section>
+
+ <section id="stats">
+ <h2>Statistics</h2>
+ <canvas id="stats-chart"></canvas>
+ </section>
+</main>
+
+<footer>
+ <p>Track your habits, achieve your goals</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..c34ba2e
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://habitly.scroll.pub
+metaTags
+editButton /edit.html
+title Habitly - Your Personal Habit Tracker
+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..ea0da0d
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "ce4ae64f-c51a-4e48-8bb0-c8be4652b140",
+ "object": "chat.completion",
+ "created": 1736014791,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nhabitly.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://habitly.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Habitly - Your Personal Habit Tracker\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Habitly</h1>\n <p>Your Personal Habit Tracker</p>\n</header>\n\n<main>\n <section id=\"habit-form\">\n <h2>Add a New Habit</h2>\n <form>\n <label for=\"habit-name\">Habit Name:</label>\n <input type=\"text\" id=\"habit-name\" required>\n \n <label for=\"reminder-time\">Reminder Time:</label>\n <input type=\"time\" id=\"reminder-time\" required>\n \n <label for=\"frequency\">Frequency:</label>\n <select id=\"frequency\" required>\n <option value=\"daily\">Daily</option>\n <option value=\"weekly\">Weekly</option>\n <option value=\"monthly\">Monthly</option>\n </select>\n \n <button type=\"submit\">Add Habit</button>\n </form>\n </section>\n\n <section id=\"habit-list\">\n <h2>Your Habits</h2>\n <ul id=\"habits\"></ul>\n </section>\n\n <section id=\"goals\">\n <h2>Goals</h2>\n <div class=\"goal-container\">\n <div class=\"goal-card\">\n <h3>Short-term Goals</h3>\n <ul id=\"short-term-goals\"></ul>\n <button onclick=\"addGoal('short')\">Add Goal</button>\n </div>\n <div class=\"goal-card\">\n <h3>Long-term Goals</h3>\n <ul id=\"long-term-goals\"></ul>\n <button onclick=\"addGoal('long')\">Add Goal</button>\n </div>\n </div>\n </section>\n\n <section id=\"stats\">\n <h2>Statistics</h2>\n <canvas id=\"stats-chart\"></canvas>\n </section>\n</main>\n\n<footer>\n <p>Track your habits, achieve your goals</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4CAF50;\n --secondary-color: #45a049;\n --background-color: #f4f4f4;\n --text-color: #333;\n --card-bg: #fff;\n --shadow: 0 2px 5px rgba(0,0,0,0.1);\n}\n\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\nheader {\n background: var(--primary-color);\n color: white;\n padding: 2rem 1rem;\n text-align: center;\n}\n\nmain {\n padding: 1rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\nsection {\n background: var(--card-bg);\n margin: 1rem 0;\n padding: 1.5rem;\n border-radius: 8px;\n box-shadow: var(--shadow);\n}\n\nh2 {\n color: var(--primary-color);\n margin-bottom: 1rem;\n}\n\nform {\n display: grid;\n gap: 1rem;\n}\n\ninput, select, button {\n padding: 0.5rem;\n border-radius: 4px;\n border: 1px solid #ddd;\n}\n\nbutton {\n background: var(--primary-color);\n color: white;\n border: none;\n cursor: pointer;\n transition: background 0.3s ease;\n}\n\nbutton:hover {\n background: var(--secondary-color);\n}\n\n#habit-list ul {\n list-style: none;\n padding: 0;\n}\n\n#habit-list li {\n background: var(--background-color);\n margin: 0.5rem 0;\n padding: 1rem;\n border-radius: 4px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.goal-container {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 1rem;\n}\n\n.goal-card {\n background: var(--background-color);\n padding: 1rem;\n border-radius: 8px;\n}\n\ncanvas {\n width: 100%;\n max-width: 800px;\n margin: 0 auto;\n display: block;\n}\n\n@media (max-width: 768px) {\n form {\n grid-template-columns: 1fr;\n }\n}\n---script.js---\nlet habits = [];\nlet goals = { short: [], long: [] };\n\ndocument.querySelector('form').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const habit = {\n name: document.getElementById('habit-name').value,\n time: document.getElementById('reminder-time').value,\n frequency: document.getElementById('frequency').value,\n completed: false\n };\n \n habits.push(habit);\n displayHabits();\n this.reset();\n});\n\nfunction displayHabits() {\n const list = document.getElementById('habits');\n list.innerHTML = habits.map((habit, index) => `\n <li>\n <span>${habit.name} - ${habit.time} (${habit.frequency})</span>\n <input type=\"checkbox\" ${habit.completed ? 'checked' : ''} onchange=\"toggleComplete(${index})\">\n </li>\n `).join('');\n}\n\nfunction toggleComplete(index) {\n habits[index].completed = !habits[index].completed;\n displayHabits();\n}\n\nfunction addGoal(type) {\n const goal = prompt(`Enter your ${type}-term goal:`);\n if (goal) {\n goals[type].push(goal);\n displayGoals();\n }\n}\n\nfunction displayGoals() {\n document.getElementById('short-term-goals').innerHTML = goals.short.map(goal => `<li>${goal}</li>`).join('');\n document.getElementById('long-term-goals').innerHTML = goals.long.map(goal => `<li>${goal}</li>`).join('');\n}\n\n// Chart.js implementation would go here\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 285,
+ "completion_tokens": 1388,
+ "total_tokens": 1673,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 285
+ },
+ "system_fingerprint": "fp_3a5770e1b4"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..b2ff8b5
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# habitly.scroll.pub
+Website generated by DeepSeek from prompt: i want to create a habit tracker app for myself, in which I can add a habit, set a reminder for it, set the frequency, check the past stats, add sub task to a habit, also create a long term goal and short term goal
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..95614ef
--- /dev/null
+++ b/script.js
@@ -0,0 +1,47 @@
+let habits = [];
+let goals = { short: [], long: [] };
+
+document.querySelector('form').addEventListener('submit', function(e) {
+ e.preventDefault();
+
+ const habit = {
+ name: document.getElementById('habit-name').value,
+ time: document.getElementById('reminder-time').value,
+ frequency: document.getElementById('frequency').value,
+ completed: false
+ };
+
+ habits.push(habit);
+ displayHabits();
+ this.reset();
+});
+
+function displayHabits() {
+ const list = document.getElementById('habits');
+ list.innerHTML = habits.map((habit, index) => `
+ <li>
+ <span>${habit.name} - ${habit.time} (${habit.frequency})</span>
+ <input type="checkbox" ${habit.completed ? 'checked' : ''} onchange="toggleComplete(${index})">
+ </li>
+ `).join('');
+}
+
+function toggleComplete(index) {
+ habits[index].completed = !habits[index].completed;
+ displayHabits();
+}
+
+function addGoal(type) {
+ const goal = prompt(`Enter your ${type}-term goal:`);
+ if (goal) {
+ goals[type].push(goal);
+ displayGoals();
+ }
+}
+
+function displayGoals() {
+ document.getElementById('short-term-goals').innerHTML = goals.short.map(goal => `<li>${goal}</li>`).join('');
+ document.getElementById('long-term-goals').innerHTML = goals.long.map(goal => `<li>${goal}</li>`).join('');
+}
+
+// Chart.js implementation would go here
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..c89d50b
--- /dev/null
+++ b/style.css
@@ -0,0 +1,106 @@
+:root {
+ --primary-color: #4CAF50;
+ --secondary-color: #45a049;
+ --background-color: #f4f4f4;
+ --text-color: #333;
+ --card-bg: #fff;
+ --shadow: 0 2px 5px rgba(0,0,0,0.1);
+}
+
+body {
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ margin: 0;
+ padding: 0;
+ background-color: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+}
+
+header {
+ background: var(--primary-color);
+ color: white;
+ padding: 2rem 1rem;
+ text-align: center;
+}
+
+main {
+ padding: 1rem;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+section {
+ background: var(--card-bg);
+ margin: 1rem 0;
+ padding: 1.5rem;
+ border-radius: 8px;
+ box-shadow: var(--shadow);
+}
+
+h2 {
+ color: var(--primary-color);
+ margin-bottom: 1rem;
+}
+
+form {
+ display: grid;
+ gap: 1rem;
+}
+
+input, select, button {
+ padding: 0.5rem;
+ border-radius: 4px;
+ border: 1px solid #ddd;
+}
+
+button {
+ background: var(--primary-color);
+ color: white;
+ border: none;
+ cursor: pointer;
+ transition: background 0.3s ease;
+}
+
+button:hover {
+ background: var(--secondary-color);
+}
+
+#habit-list ul {
+ list-style: none;
+ padding: 0;
+}
+
+#habit-list li {
+ background: var(--background-color);
+ margin: 0.5rem 0;
+ padding: 1rem;
+ border-radius: 4px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.goal-container {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 1rem;
+}
+
+.goal-card {
+ background: var(--background-color);
+ padding: 1rem;
+ border-radius: 8px;
+}
+
+canvas {
+ width: 100%;
+ max-width: 800px;
+ margin: 0 auto;
+ display: block;
+}
+
+@media (max-width: 768px) {
+ form {
+ grid-template-columns: 1fr;
+ }
+}
\ No newline at end of file