commit 7c9ad6846861418dfb527dbf71cb7de866353564
Author: root <root@hub.scroll.pub> Date: 2025-01-02 21:46:59 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..b7bbcb3 --- /dev/null +++ b/body.html @@ -0,0 +1,38 @@ +<div class="container"> + <header> + <h1>Scribe</h1> + <div class="controls"> + <button id="theme-toggle" aria-label="Toggle theme"> + <span class="icon">🌓</span> + </button> + <button id="clear-btn" aria-label="Clear text">Clear</button> + </div> + </header> + + <main> + <textarea id="editor" placeholder="Start writing your masterpiece..." autofocus></textarea> + + <div class="stats"> + <div class="stat"> + <span class="value" id="word-count">0</span> + <span class="label">Words</span> + </div> + <div class="stat"> + <span class="value" id="char-count">0</span> + <span class="label">Characters</span> + </div> + <div class="stat"> + <span class="value" id="line-count">0</span> + <span class="label">Lines</span> + </div> + <div class="stat"> + <span class="value" id="paragraph-count">0</span> + <span class="label">Paragraphs</span> + </div> + <div class="stat"> + <span class="value" id="reading-time">0</span> + <span class="label">Reading Time</span> + </div> + </div> + </main> +</div> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..2425cf0 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://scribe.scroll.pub +metaTags +editButton /edit.html +title Scribe - A Beautiful Writing Tool +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..99821f5 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "45f412a0-8999-4499-9016-3a3704a4b6ac", + "object": "chat.completion", + "created": 1735854397, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nscribe.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://scribe.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Scribe - A Beautiful Writing Tool\nstyle.css\nbody.html\nscript.js\n---body.html---\n<div class=\"container\">\n <header>\n <h1>Scribe</h1>\n <div class=\"controls\">\n <button id=\"theme-toggle\" aria-label=\"Toggle theme\">\n <span class=\"icon\">🌓</span>\n </button>\n <button id=\"clear-btn\" aria-label=\"Clear text\">Clear</button>\n </div>\n </header>\n \n <main>\n <textarea id=\"editor\" placeholder=\"Start writing your masterpiece...\" autofocus></textarea>\n \n <div class=\"stats\">\n <div class=\"stat\">\n <span class=\"value\" id=\"word-count\">0</span>\n <span class=\"label\">Words</span>\n </div>\n <div class=\"stat\">\n <span class=\"value\" id=\"char-count\">0</span>\n <span class=\"label\">Characters</span>\n </div>\n <div class=\"stat\">\n <span class=\"value\" id=\"line-count\">0</span>\n <span class=\"label\">Lines</span>\n </div>\n <div class=\"stat\">\n <span class=\"value\" id=\"paragraph-count\">0</span>\n <span class=\"label\">Paragraphs</span>\n </div>\n <div class=\"stat\">\n <span class=\"value\" id=\"reading-time\">0</span>\n <span class=\"label\">Reading Time</span>\n </div>\n </div>\n </main>\n</div>\n---style.css---\n:root {\n --bg-color: #ffffff;\n --text-color: #333333;\n --accent-color: #4a90e2;\n --border-color: #e0e0e0;\n}\n\n[data-theme=\"dark\"] {\n --bg-color: #1a1a1a;\n --text-color: #f5f5f5;\n --accent-color: #6cb2eb;\n --border-color: #333333;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Georgia', serif;\n background-color: var(--bg-color);\n color: var(--text-color);\n transition: all 0.3s ease;\n}\n\n.container {\n max-width: 800px;\n margin: 0 auto;\n padding: 2rem;\n}\n\nheader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 2rem;\n}\n\nh1 {\n font-size: 2.5rem;\n color: var(--accent-color);\n}\n\n.controls button {\n background: none;\n border: none;\n color: var(--text-color);\n cursor: pointer;\n padding: 0.5rem;\n font-size: 1rem;\n transition: opacity 0.3s ease;\n}\n\n.controls button:hover {\n opacity: 0.8;\n}\n\n#editor {\n width: 100%;\n height: 60vh;\n border: 1px solid var(--border-color);\n padding: 1rem;\n font-size: 1.1rem;\n line-height: 1.6;\n background-color: var(--bg-color);\n color: var(--text-color);\n resize: none;\n margin-bottom: 2rem;\n transition: all 0.3s ease;\n}\n\n#editor:focus {\n outline: none;\n border-color: var(--accent-color);\n}\n\n.stats {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));\n gap: 1rem;\n padding: 1rem;\n background-color: var(--bg-color);\n border: 1px solid var(--border-color);\n border-radius: 4px;\n}\n\n.stat {\n text-align: center;\n}\n\n.value {\n font-size: 1.5rem;\n font-weight: bold;\n color: var(--accent-color);\n}\n\n.label {\n font-size: 0.9rem;\n color: var(--text-color);\n opacity: 0.8;\n}\n\n@media (max-width: 600px) {\n h1 {\n font-size: 2rem;\n }\n \n .stats {\n grid-template-columns: repeat(2, 1fr);\n }\n}\n---script.js---\nconst editor = document.getElementById('editor');\nconst wordCount = document.getElementById('word-count');\nconst charCount = document.getElementById('char-count');\nconst lineCount = document.getElementById('line-count');\nconst paragraphCount = document.getElementById('paragraph-count');\nconst readingTime = document.getElementById('reading-time');\nconst themeToggle = document.getElementById('theme-toggle');\nconst clearBtn = document.getElementById('clear-btn');\n\n// Load saved text\neditor.value = localStorage.getItem('scribeText') || '';\n\n// Update stats\nfunction updateStats() {\n const text = editor.value;\n \n // Word count\n const words = text.match(/\\b\\w+\\b/g) || [];\n wordCount.textContent = words.length;\n \n // Character count\n charCount.textContent = text.length;\n \n // Line count\n lineCount.textContent = text.split('\\n').length;\n \n // Paragraph count\n paragraphCount.textContent = text.split('\\n\\n').filter(p => p.trim()).length;\n \n // Reading time (200 words per minute)\n const minutes = Math.ceil(words.length / 200);\n readingTime.textContent = `${minutes} min`;\n \n // Save text\n localStorage.setItem('scribeText', text);\n}\n\n// Theme toggle\nfunction toggleTheme() {\n const isDark = document.body.getAttribute('data-theme') === 'dark';\n document.body.setAttribute('data-theme', isDark ? 'light' : 'dark');\n localStorage.setItem('scribeTheme', isDark ? 'light' : 'dark');\n}\n\n// Clear text\nfunction clearText() {\n editor.value = '';\n updateStats();\n}\n\n// Event listeners\neditor.addEventListener('input', updateStats);\nthemeToggle.addEventListener('click', toggleTheme);\nclearBtn.addEventListener('click', clearText);\n\n// Initialize theme\nconst savedTheme = localStorage.getItem('scribeTheme') || 'light';\ndocument.body.setAttribute('data-theme', savedTheme);\n\n// Initial stats update\nupdateStats();\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 285, + "completion_tokens": 1409, + "total_tokens": 1694, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 285 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..af4b9b9 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# scribe.scroll.pub +Website generated by DeepSeek from prompt: an amazing and beautiful tool for writers. dark mode and light mode. saves stuff to local storage. shows you cool stats as you writer, like number of words, and 10 other interesting stats. distraction free. minimal. goergoues though. \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..055c098 --- /dev/null +++ b/script.js @@ -0,0 +1,61 @@ +const editor = document.getElementById('editor'); +const wordCount = document.getElementById('word-count'); +const charCount = document.getElementById('char-count'); +const lineCount = document.getElementById('line-count'); +const paragraphCount = document.getElementById('paragraph-count'); +const readingTime = document.getElementById('reading-time'); +const themeToggle = document.getElementById('theme-toggle'); +const clearBtn = document.getElementById('clear-btn'); + +// Load saved text +editor.value = localStorage.getItem('scribeText') || ''; + +// Update stats +function updateStats() { + const text = editor.value; + + // Word count + const words = text.match(/\b\w+\b/g) || []; + wordCount.textContent = words.length; + + // Character count + charCount.textContent = text.length; + + // Line count + lineCount.textContent = text.split('\n').length; + + // Paragraph count + paragraphCount.textContent = text.split('\n\n').filter(p => p.trim()).length; + + // Reading time (200 words per minute) + const minutes = Math.ceil(words.length / 200); + readingTime.textContent = `${minutes} min`; + + // Save text + localStorage.setItem('scribeText', text); +} + +// Theme toggle +function toggleTheme() { + const isDark = document.body.getAttribute('data-theme') === 'dark'; + document.body.setAttribute('data-theme', isDark ? 'light' : 'dark'); + localStorage.setItem('scribeTheme', isDark ? 'light' : 'dark'); +} + +// Clear text +function clearText() { + editor.value = ''; + updateStats(); +} + +// Event listeners +editor.addEventListener('input', updateStats); +themeToggle.addEventListener('click', toggleTheme); +clearBtn.addEventListener('click', clearText); + +// Initialize theme +const savedTheme = localStorage.getItem('scribeTheme') || 'light'; +document.body.setAttribute('data-theme', savedTheme); + +// Initial stats update +updateStats(); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..0a168fb --- /dev/null +++ b/style.css @@ -0,0 +1,113 @@ +:root { + --bg-color: #ffffff; + --text-color: #333333; + --accent-color: #4a90e2; + --border-color: #e0e0e0; +} + +[data-theme="dark"] { + --bg-color: #1a1a1a; + --text-color: #f5f5f5; + --accent-color: #6cb2eb; + --border-color: #333333; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Georgia', serif; + background-color: var(--bg-color); + color: var(--text-color); + transition: all 0.3s ease; +} + +.container { + max-width: 800px; + margin: 0 auto; + padding: 2rem; +} + +header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 2rem; +} + +h1 { + font-size: 2.5rem; + color: var(--accent-color); +} + +.controls button { + background: none; + border: none; + color: var(--text-color); + cursor: pointer; + padding: 0.5rem; + font-size: 1rem; + transition: opacity 0.3s ease; +} + +.controls button:hover { + opacity: 0.8; +} + +#editor { + width: 100%; + height: 60vh; + border: 1px solid var(--border-color); + padding: 1rem; + font-size: 1.1rem; + line-height: 1.6; + background-color: var(--bg-color); + color: var(--text-color); + resize: none; + margin-bottom: 2rem; + transition: all 0.3s ease; +} + +#editor:focus { + outline: none; + border-color: var(--accent-color); +} + +.stats { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); + gap: 1rem; + padding: 1rem; + background-color: var(--bg-color); + border: 1px solid var(--border-color); + border-radius: 4px; +} + +.stat { + text-align: center; +} + +.value { + font-size: 1.5rem; + font-weight: bold; + color: var(--accent-color); +} + +.label { + font-size: 0.9rem; + color: var(--text-color); + opacity: 0.8; +} + +@media (max-width: 600px) { + h1 { + font-size: 2rem; + } + + .stats { + grid-template-columns: repeat(2, 1fr); + } +} \ No newline at end of file