commit 2c7bc0a5d304249438afc88f79f627ff4c3a3544
Author: root <root@hub.scroll.pub> Date: 2024-12-28 04:31:05 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..5a32a9d --- /dev/null +++ b/body.html @@ -0,0 +1,12 @@ +<header> + <h1>Paragraph Rewriter</h1> + <p>Paste your article below to rewrite it paragraph by paragraph.</p> +</header> +<main> + <textarea id="inputText" placeholder="Paste your article here..."></textarea> + <button id="splitButton">Split Paragraphs</button> + <div id="paragraphsContainer"></div> +</main> +<footer> + <p>Simple and effective paragraph rewriting tool.</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..a1554e5 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://rewrite.scroll.pub +metaTags +editButton /edit.html +title Paragraph Rewriter +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..e8f195e --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "2046c97e-1388-426b-b766-972864fc22c6", + "object": "chat.completion", + "created": 1735360253, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nrewrite.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://rewrite.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Paragraph Rewriter\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Paragraph Rewriter</h1>\n <p>Paste your article below to rewrite it paragraph by paragraph.</p>\n</header>\n<main>\n <textarea id=\"inputText\" placeholder=\"Paste your article here...\"></textarea>\n <button id=\"splitButton\">Split Paragraphs</button>\n <div id=\"paragraphsContainer\"></div>\n</main>\n<footer>\n <p>Simple and effective paragraph rewriting tool.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f5f5f5;\n --text-color: #333;\n --border-radius: 8px;\n --spacing: 1rem;\n}\n\nbody {\n font-family: 'Arial', sans-serif;\n line-height: 1.6;\n margin: 0;\n padding: var(--spacing);\n color: var(--text-color);\n background-color: var(--secondary-color);\n}\n\nheader {\n text-align: center;\n margin-bottom: calc(var(--spacing) * 2);\n}\n\nh1 {\n color: var(--primary-color);\n margin-bottom: calc(var(--spacing) / 2);\n}\n\nmain {\n max-width: 800px;\n margin: 0 auto;\n}\n\ntextarea {\n width: 100%;\n height: 150px;\n padding: var(--spacing);\n border: 1px solid #ddd;\n border-radius: var(--border-radius);\n margin-bottom: var(--spacing);\n resize: vertical;\n}\n\nbutton {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: calc(var(--spacing) / 2) var(--spacing);\n border-radius: var(--border-radius);\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: darken(var(--primary-color), 10%);\n}\n\n#paragraphsContainer {\n margin-top: var(--spacing);\n}\n\n.paragraph {\n background-color: white;\n padding: var(--spacing);\n border-radius: var(--border-radius);\n margin-bottom: var(--spacing);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.paragraph button {\n margin-top: calc(var(--spacing) / 2);\n}\n\n@media (max-width: 600px) {\n body {\n padding: calc(var(--spacing) / 2);\n }\n\n textarea {\n height: 100px;\n }\n}\n---script.js---\ndocument.getElementById('splitButton').addEventListener('click', function() {\n const inputText = document.getElementById('inputText').value;\n const paragraphs = inputText.split('\\n\\n');\n const paragraphsContainer = document.getElementById('paragraphsContainer');\n paragraphsContainer.innerHTML = '';\n\n paragraphs.forEach((paragraph, index) => {\n if (paragraph.trim() === '') return;\n\n const paragraphDiv = document.createElement('div');\n paragraphDiv.className = 'paragraph';\n paragraphDiv.innerHTML = `\n <p>${paragraph}</p>\n <button onclick=\"rewriteParagraph(${index})\">Rewrite</button>\n `;\n paragraphsContainer.appendChild(paragraphDiv);\n });\n});\n\nfunction rewriteParagraph(index) {\n const paragraphDivs = document.querySelectorAll('.paragraph');\n const paragraphText = paragraphDivs[index].querySelector('p').innerText;\n\n // Simulate a rewrite by reversing the text (replace with actual rewrite logic)\n const rewrittenText = paragraphText.split('').reverse().join('');\n\n paragraphDivs[index].querySelector('p').innerText = rewrittenText;\n}\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 265, + "completion_tokens": 858, + "total_tokens": 1123, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 265 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..e727518 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# rewrite.scroll.pub +Website generated by DeepSeek from prompt: 我需要一个网站,能根据原来的一篇文章,按照段落进行拆分开,然后点击操作改写按钮,针对每一段保留意思只是文字层面的改写 \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..43fa074 --- /dev/null +++ b/script.js @@ -0,0 +1,28 @@ +document.getElementById('splitButton').addEventListener('click', function() { + const inputText = document.getElementById('inputText').value; + const paragraphs = inputText.split('\n\n'); + const paragraphsContainer = document.getElementById('paragraphsContainer'); + paragraphsContainer.innerHTML = ''; + + paragraphs.forEach((paragraph, index) => { + if (paragraph.trim() === '') return; + + const paragraphDiv = document.createElement('div'); + paragraphDiv.className = 'paragraph'; + paragraphDiv.innerHTML = ` + <p>${paragraph}</p> + <button onclick="rewriteParagraph(${index})">Rewrite</button> + `; + paragraphsContainer.appendChild(paragraphDiv); + }); +}); + +function rewriteParagraph(index) { + const paragraphDivs = document.querySelectorAll('.paragraph'); + const paragraphText = paragraphDivs[index].querySelector('p').innerText; + + // Simulate a rewrite by reversing the text (replace with actual rewrite logic) + const rewrittenText = paragraphText.split('').reverse().join(''); + + paragraphDivs[index].querySelector('p').innerText = rewrittenText; +} \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..08622b8 --- /dev/null +++ b/style.css @@ -0,0 +1,81 @@ +:root { + --primary-color: #4a90e2; + --secondary-color: #f5f5f5; + --text-color: #333; + --border-radius: 8px; + --spacing: 1rem; +} + +body { + font-family: 'Arial', sans-serif; + line-height: 1.6; + margin: 0; + padding: var(--spacing); + color: var(--text-color); + background-color: var(--secondary-color); +} + +header { + text-align: center; + margin-bottom: calc(var(--spacing) * 2); +} + +h1 { + color: var(--primary-color); + margin-bottom: calc(var(--spacing) / 2); +} + +main { + max-width: 800px; + margin: 0 auto; +} + +textarea { + width: 100%; + height: 150px; + padding: var(--spacing); + border: 1px solid #ddd; + border-radius: var(--border-radius); + margin-bottom: var(--spacing); + resize: vertical; +} + +button { + background-color: var(--primary-color); + color: white; + border: none; + padding: calc(var(--spacing) / 2) var(--spacing); + border-radius: var(--border-radius); + cursor: pointer; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: darken(var(--primary-color), 10%); +} + +#paragraphsContainer { + margin-top: var(--spacing); +} + +.paragraph { + background-color: white; + padding: var(--spacing); + border-radius: var(--border-radius); + margin-bottom: var(--spacing); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.paragraph button { + margin-top: calc(var(--spacing) / 2); +} + +@media (max-width: 600px) { + body { + padding: calc(var(--spacing) / 2); + } + + textarea { + height: 100px; + } +} \ No newline at end of file