Changes to healthlog.scroll.pub

root
root
23 days ago
Initial commit
body.html
Changed around line 1
+
+

HealthLog

+

Track your health items with ease.

+
+
+
+

Log a Health Item

+
+
+
+
+
+
+
+
+
+

Logged Items

+
    +
    +
    +
    +

    Your health, your data.

    +
    index.scroll
    Changed around line 1
    + buildHtml
    + baseUrl https://healthlog.scroll.pub
    + metaTags
    + editButton /edit.html
    + title HealthLog - Track Your Health
    + style.css
    + body.html
    + script.js
    prompt.json
    Changed around line 1
    + {
    + "id": "a0aaab56-91fb-4009-8fc3-57d68a72ffab",
    + "object": "chat.completion",
    + "created": 1735521637,
    + "model": "deepseek-chat",
    + "choices": [
    + {
    + "index": 0,
    + "message": {
    + "role": "assistant",
    + "content": "---domain---\nhealthlog.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://healthlog.scroll.pub\nmetaTags\neditButton /edit.html\ntitle HealthLog - Track Your Health\nstyle.css\nbody.html\nscript.js\n---body.html---\n
    \n

    HealthLog

    \n

    Track your health items with ease.

    \n
    \n
    \n
    \n

    Log a Health Item

    \n
    \n \n \n \n \n \n
    \n
    \n
    \n

    Logged Items

    \n
      \n
      \n
      \n
      \n

      Your health, your data.

      \n
      \n---style.css---\nbody {\n font-family: 'Arial', sans-serif;\n margin: 0;\n padding: 0;\n background-color: #f4f4f9;\n color: #333;\n}\n\nheader {\n background-color: #4CAF50;\n color: white;\n padding: 20px;\n text-align: center;\n}\n\nmain {\n padding: 20px;\n}\n\nsection {\n margin-bottom: 20px;\n}\n\nform {\n display: flex;\n flex-direction: column;\n}\n\nlabel {\n margin-bottom: 5px;\n}\n\ninput, textarea {\n margin-bottom: 10px;\n padding: 10px;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n\nbutton {\n padding: 10px;\n background-color: #4CAF50;\n color: white;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n}\n\nbutton:hover {\n background-color: #45a049;\n}\n\nul {\n list-style-type: none;\n padding: 0;\n}\n\nli {\n background-color: white;\n padding: 10px;\n margin-bottom: 10px;\n border-radius: 4px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\nfooter {\n text-align: center;\n padding: 10px;\n background-color: #4CAF50;\n color: white;\n position: fixed;\n bottom: 0;\n width: 100%;\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const form = document.getElementById('health-form');\n const itemsList = document.getElementById('items-list');\n\n form.addEventListener('submit', function(event) {\n event.preventDefault();\n const itemName = document.getElementById('item-name').value;\n const itemDescription = document.getElementById('item-description').value;\n\n const item = {\n name: itemName,\n description: itemDescription\n };\n\n logItem(item);\n saveItemToCookie(item);\n form.reset();\n });\n\n function logItem(item) {\n const li = document.createElement('li');\n li.textContent = `${item.name}: ${item.description}`;\n itemsList.appendChild(li);\n }\n\n function saveItemToCookie(item) {\n const items = getItemsFromCookie();\n items.push(item);\n document.cookie = `healthItems=${JSON.stringify(items)}; path=/`;\n }\n\n function getItemsFromCookie() {\n const cookie = document.cookie.split('; ').find(row => row.startsWith('healthItems='));\n return cookie ? JSON.parse(cookie.split('=')[1]) : [];\n }\n\n function loadItemsFromCookie() {\n const items = getItemsFromCookie();\n items.forEach(item => logItem(item));\n }\n\n loadItemsFromCookie();\n});\n---end---"
      + },
      + "logprobs": null,
      + "finish_reason": "stop"
      + }
      + ],
      + "usage": {
      + "prompt_tokens": 251,
      + "completion_tokens": 878,
      + "total_tokens": 1129,
      + "prompt_cache_hit_tokens": 0,
      + "prompt_cache_miss_tokens": 251
      + },
      + "system_fingerprint": "fp_f1afce2943"
      + }
      readme.scroll
      Changed around line 1
      + # healthlog.scroll.pub
      + Website generated by DeepSeek from prompt: I want crud solution for my health that stores a cookie when i log an item
      script.js
      Changed around line 1
      + document.addEventListener('DOMContentLoaded', function() {
      + const form = document.getElementById('health-form');
      + const itemsList = document.getElementById('items-list');
      +
      + form.addEventListener('submit', function(event) {
      + event.preventDefault();
      + const itemName = document.getElementById('item-name').value;
      + const itemDescription = document.getElementById('item-description').value;
      +
      + const item = {
      + name: itemName,
      + description: itemDescription
      + };
      +
      + logItem(item);
      + saveItemToCookie(item);
      + form.reset();
      + });
      +
      + function logItem(item) {
      + const li = document.createElement('li');
      + li.textContent = `${item.name}: ${item.description}`;
      + itemsList.appendChild(li);
      + }
      +
      + function saveItemToCookie(item) {
      + const items = getItemsFromCookie();
      + items.push(item);
      + document.cookie = `healthItems=${JSON.stringify(items)}; path=/`;
      + }
      +
      + function getItemsFromCookie() {
      + const cookie = document.cookie.split('; ').find(row => row.startsWith('healthItems='));
      + return cookie ? JSON.parse(cookie.split('=')[1]) : [];
      + }
      +
      + function loadItemsFromCookie() {
      + const items = getItemsFromCookie();
      + items.forEach(item => logItem(item));
      + }
      +
      + loadItemsFromCookie();
      + });
      style.css
      Changed around line 1
      + body {
      + font-family: 'Arial', sans-serif;
      + margin: 0;
      + padding: 0;
      + background-color: #f4f4f9;
      + color: #333;
      + }
      +
      + header {
      + background-color: #4CAF50;
      + color: white;
      + padding: 20px;
      + text-align: center;
      + }
      +
      + main {
      + padding: 20px;
      + }
      +
      + section {
      + margin-bottom: 20px;
      + }
      +
      + form {
      + display: flex;
      + flex-direction: column;
      + }
      +
      + label {
      + margin-bottom: 5px;
      + }
      +
      + input, textarea {
      + margin-bottom: 10px;
      + padding: 10px;
      + border: 1px solid #ccc;
      + border-radius: 4px;
      + }
      +
      + button {
      + padding: 10px;
      + background-color: #4CAF50;
      + color: white;
      + border: none;
      + border-radius: 4px;
      + cursor: pointer;
      + }
      +
      + button:hover {
      + background-color: #45a049;
      + }
      +
      + ul {
      + list-style-type: none;
      + padding: 0;
      + }
      +
      + li {
      + background-color: white;
      + padding: 10px;
      + margin-bottom: 10px;
      + border-radius: 4px;
      + box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      + }
      +
      + footer {
      + text-align: center;
      + padding: 10px;
      + background-color: #4CAF50;
      + color: white;
      + position: fixed;
      + bottom: 0;
      + width: 100%;
      + }