commit 22aa15c5abdffa6767c9121ddf2d2f2946e248ba
Author: root <root@hub.scroll.pub> Date: 2024-12-29 12:55:06 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..77b4679 --- /dev/null +++ b/body.html @@ -0,0 +1,33 @@ +<header> + <h1>Noteworthy</h1> + <p>Your digital notebook for capturing ideas in various formats</p> +</header> + +<main> + <section class="note-controls"> + <button id="new-note" aria-label="Create new note">+ New Note</button> + <div class="note-type-selector"> + <button data-type="text" class="active" aria-label="Text note">📝</button> + <button data-type="image" aria-label="Image note">🖼️</button> + <button data-type="video" aria-label="Video note">🎥</button> + </div> + </section> + + <section class="notes-grid"> + <!-- Notes will be dynamically inserted here --> + </section> +</main> + +<footer> + <p>Organize your thoughts, one note at a time</p> +</footer> + +<template id="note-template"> + <article class="note"> + <div class="note-content"></div> + <div class="note-actions"> + <button class="edit" aria-label="Edit note">✏️</button> + <button class="delete" aria-label="Delete note">🗑️</button> + </div> + </article> +</template> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..42467df --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://noteworthy.scroll.pub +metaTags +editButton /edit.html +title Noteworthy - Your Digital Notebook +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..0b3d551 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "ee042fdd-ce82-46fe-ae7f-2e4532839a5c", + "object": "chat.completion", + "created": 1735476883, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nnoteworthy.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://noteworthy.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Noteworthy - Your Digital Notebook\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Noteworthy</h1>\n <p>Your digital notebook for capturing ideas in various formats</p>\n</header>\n\n<main>\n <section class=\"note-controls\">\n <button id=\"new-note\" aria-label=\"Create new note\">+ New Note</button>\n <div class=\"note-type-selector\">\n <button data-type=\"text\" class=\"active\" aria-label=\"Text note\">📝</button>\n <button data-type=\"image\" aria-label=\"Image note\">🖼️</button>\n <button data-type=\"video\" aria-label=\"Video note\">🎥</button>\n </div>\n </section>\n\n <section class=\"notes-grid\">\n <!-- Notes will be dynamically inserted here -->\n </section>\n</main>\n\n<footer>\n <p>Organize your thoughts, one note at a time</p>\n</footer>\n\n<template id=\"note-template\">\n <article class=\"note\">\n <div class=\"note-content\"></div>\n <div class=\"note-actions\">\n <button class=\"edit\" aria-label=\"Edit note\">✏️</button>\n <button class=\"delete\" aria-label=\"Delete note\">🗑️</button>\n </div>\n </article>\n</template>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #50e3c2;\n --background-color: #f5f7fa;\n --text-color: #333;\n --note-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\n* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--background-color);\n padding: 2rem;\n min-height: 100vh;\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nh1 {\n font-size: 2.5rem;\n color: var(--primary-color);\n margin-bottom: 0.5rem;\n}\n\n.note-controls {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 2rem;\n}\n\n#new-note {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: 0.75rem 1.5rem;\n border-radius: 25px;\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\n#new-note:hover {\n background-color: #357abd;\n}\n\n.note-type-selector {\n display: flex;\n gap: 0.5rem;\n}\n\n.note-type-selector button {\n background: none;\n border: 2px solid var(--primary-color);\n padding: 0.5rem;\n border-radius: 50%;\n cursor: pointer;\n transition: all 0.3s;\n}\n\n.note-type-selector button.active {\n background-color: var(--primary-color);\n color: white;\n}\n\n.notes-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 1.5rem;\n}\n\n.note {\n background: white;\n border-radius: 10px;\n padding: 1rem;\n box-shadow: var(--note-shadow);\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.note-content {\n flex: 1;\n}\n\n.note-actions {\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n}\n\n.note-actions button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0.25rem;\n transition: opacity 0.3s;\n}\n\n.note-actions button:hover {\n opacity: 0.7;\n}\n\nfooter {\n text-align: center;\n margin-top: 2rem;\n color: #666;\n}\n\n@media (max-width: 768px) {\n body {\n padding: 1rem;\n }\n \n .notes-grid {\n grid-template-columns: 1fr;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const notesGrid = document.querySelector('.notes-grid');\n const noteTemplate = document.getElementById('note-template');\n const newNoteBtn = document.getElementById('new-note');\n const typeButtons = document.querySelectorAll('.note-type-selector button');\n\n let currentNoteType = 'text';\n\n // Handle note type selection\n typeButtons.forEach(button => {\n button.addEventListener('click', () => {\n typeButtons.forEach(btn => btn.classList.remove('active'));\n button.classList.add('active');\n currentNoteType = button.dataset.type;\n });\n });\n\n // Create new note\n newNoteBtn.addEventListener('click', () => {\n const noteClone = noteTemplate.content.cloneNode(true);\n const noteContent = noteClone.querySelector('.note-content');\n \n switch(currentNoteType) {\n case 'text':\n noteContent.innerHTML = `<textarea placeholder=\"Start typing your note...\"></textarea>`;\n break;\n case 'image':\n noteContent.innerHTML = `\n <input type=\"file\" accept=\"image/*\" class=\"image-upload\">\n <div class=\"image-preview\"></div>\n `;\n break;\n case 'video':\n noteContent.innerHTML = `\n <input type=\"url\" placeholder=\"Paste video URL here\" class=\"video-url\">\n <div class=\"video-preview\"></div>\n `;\n break;\n }\n\n // Add event listeners for new note\n const noteElement = noteClone.querySelector('.note');\n const deleteBtn = noteElement.querySelector('.delete');\n const editBtn = noteElement.querySelector('.edit');\n\n deleteBtn.addEventListener('click', () => {\n noteElement.remove();\n });\n\n editBtn.addEventListener('click', () => {\n // Implement edit functionality\n alert('Edit functionality coming soon!');\n });\n\n notesGrid.prepend(noteElement);\n });\n\n // Handle image upload preview\n notesGrid.addEventListener('change', (e) => {\n if (e.target.classList.contains('image-upload')) {\n const file = e.target.files[0];\n const preview = e.target.nextElementSibling;\n \n if (file) {\n const reader = new FileReader();\n reader.onload = (event) => {\n preview.innerHTML = `<img src=\"${event.target.result}\" alt=\"Uploaded image\">`;\n };\n reader.readAsDataURL(file);\n }\n }\n });\n\n // Handle video URL input\n notesGrid.addEventListener('input', (e) => {\n if (e.target.classList.contains('video-url')) {\n const url = e.target.value;\n const preview = e.target.nextElementSibling;\n \n if (url) {\n preview.innerHTML = `\n <iframe \n src=\"${url}\" \n frameborder=\"0\" \n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" \n allowfullscreen>\n </iframe>\n `;\n } else {\n preview.innerHTML = '';\n }\n }\n });\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 260, + "completion_tokens": 1658, + "total_tokens": 1918, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 260 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..deb6d21 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# noteworthy.scroll.pub +Website generated by DeepSeek from prompt: Create a site that helps record my notes in various areas, with display options of images, writings, videos. Be professional and creative \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..8092cd2 --- /dev/null +++ b/script.js @@ -0,0 +1,94 @@ +document.addEventListener('DOMContentLoaded', () => { + const notesGrid = document.querySelector('.notes-grid'); + const noteTemplate = document.getElementById('note-template'); + const newNoteBtn = document.getElementById('new-note'); + const typeButtons = document.querySelectorAll('.note-type-selector button'); + + let currentNoteType = 'text'; + + // Handle note type selection + typeButtons.forEach(button => { + button.addEventListener('click', () => { + typeButtons.forEach(btn => btn.classList.remove('active')); + button.classList.add('active'); + currentNoteType = button.dataset.type; + }); + }); + + // Create new note + newNoteBtn.addEventListener('click', () => { + const noteClone = noteTemplate.content.cloneNode(true); + const noteContent = noteClone.querySelector('.note-content'); + + switch(currentNoteType) { + case 'text': + noteContent.innerHTML = `<textarea placeholder="Start typing your note..."></textarea>`; + break; + case 'image': + noteContent.innerHTML = ` + <input type="file" accept="image/*" class="image-upload"> + <div class="image-preview"></div> + `; + break; + case 'video': + noteContent.innerHTML = ` + <input type="url" placeholder="Paste video URL here" class="video-url"> + <div class="video-preview"></div> + `; + break; + } + + // Add event listeners for new note + const noteElement = noteClone.querySelector('.note'); + const deleteBtn = noteElement.querySelector('.delete'); + const editBtn = noteElement.querySelector('.edit'); + + deleteBtn.addEventListener('click', () => { + noteElement.remove(); + }); + + editBtn.addEventListener('click', () => { + // Implement edit functionality + alert('Edit functionality coming soon!'); + }); + + notesGrid.prepend(noteElement); + }); + + // Handle image upload preview + notesGrid.addEventListener('change', (e) => { + if (e.target.classList.contains('image-upload')) { + const file = e.target.files[0]; + const preview = e.target.nextElementSibling; + + if (file) { + const reader = new FileReader(); + reader.onload = (event) => { + preview.innerHTML = `<img src="${event.target.result}" alt="Uploaded image">`; + }; + reader.readAsDataURL(file); + } + } + }); + + // Handle video URL input + notesGrid.addEventListener('input', (e) => { + if (e.target.classList.contains('video-url')) { + const url = e.target.value; + const preview = e.target.nextElementSibling; + + if (url) { + preview.innerHTML = ` + <iframe + src="${url}" + frameborder="0" + allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" + allowfullscreen> + </iframe> + `; + } else { + preview.innerHTML = ''; + } + } + }); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..d106122 --- /dev/null +++ b/style.css @@ -0,0 +1,127 @@ +:root { + --primary-color: #4a90e2; + --secondary-color: #50e3c2; + --background-color: #f5f7fa; + --text-color: #333; + --note-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: 'Segoe UI', system-ui, sans-serif; + line-height: 1.6; + color: var(--text-color); + background-color: var(--background-color); + padding: 2rem; + min-height: 100vh; +} + +header { + text-align: center; + margin-bottom: 2rem; +} + +h1 { + font-size: 2.5rem; + color: var(--primary-color); + margin-bottom: 0.5rem; +} + +.note-controls { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 2rem; +} + +#new-note { + background-color: var(--primary-color); + color: white; + border: none; + padding: 0.75rem 1.5rem; + border-radius: 25px; + cursor: pointer; + transition: background-color 0.3s; +} + +#new-note:hover { + background-color: #357abd; +} + +.note-type-selector { + display: flex; + gap: 0.5rem; +} + +.note-type-selector button { + background: none; + border: 2px solid var(--primary-color); + padding: 0.5rem; + border-radius: 50%; + cursor: pointer; + transition: all 0.3s; +} + +.note-type-selector button.active { + background-color: var(--primary-color); + color: white; +} + +.notes-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 1.5rem; +} + +.note { + background: white; + border-radius: 10px; + padding: 1rem; + box-shadow: var(--note-shadow); + display: flex; + flex-direction: column; + gap: 1rem; +} + +.note-content { + flex: 1; +} + +.note-actions { + display: flex; + justify-content: flex-end; + gap: 0.5rem; +} + +.note-actions button { + background: none; + border: none; + cursor: pointer; + padding: 0.25rem; + transition: opacity 0.3s; +} + +.note-actions button:hover { + opacity: 0.7; +} + +footer { + text-align: center; + margin-top: 2rem; + color: #666; +} + +@media (max-width: 768px) { + body { + padding: 1rem; + } + + .notes-grid { + grid-template-columns: 1fr; + } +} \ No newline at end of file