commit 65e5eb3a778d82d8d3b71b28e83dce198dcb473d
Author: root <root@hub.scroll.pub>
Date: 2024-12-27 16:13:43 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..848f184
--- /dev/null
+++ b/body.html
@@ -0,0 +1,23 @@
+<header>
+ <h1>PlantUML Step-by-Step Visualizer</h1>
+ <p>Upload your PlantUML .puml file to split it into interactive sequence diagrams.</p>
+</header>
+<main>
+ <section id="upload-section">
+ <label for="file-input" class="upload-label">
+ <span>Choose a .puml file</span>
+ <input type="file" id="file-input" accept=".puml" />
+ </label>
+ </section>
+ <section id="diagram-section" class="hidden">
+ <div id="step-controls">
+ <button id="prev-step" disabled>Previous</button>
+ <span id="step-indicator">Step 1 of 1</span>
+ <button id="next-step" disabled>Next</button>
+ </div>
+ <div id="diagram-container"></div>
+ </section>
+</main>
+<footer>
+ <p>Visualize your PlantUML diagrams step by step.</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..e4bba64
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://plantsteps.scroll.pub
+metaTags
+editButton /edit.html
+title PlantUML Step-by-Step Visualizer
+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..6abb290
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "1623149d-590a-4143-a6a4-58b1ddd1885c",
+ "object": "chat.completion",
+ "created": 1735316004,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nplantsteps.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://plantsteps.scroll.pub\nmetaTags\neditButton /edit.html\ntitle PlantUML Step-by-Step Visualizer\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>PlantUML Step-by-Step Visualizer</h1>\n <p>Upload your PlantUML .puml file to split it into interactive sequence diagrams.</p>\n</header>\n<main>\n <section id=\"upload-section\">\n <label for=\"file-input\" class=\"upload-label\">\n <span>Choose a .puml file</span>\n <input type=\"file\" id=\"file-input\" accept=\".puml\" />\n </label>\n </section>\n <section id=\"diagram-section\" class=\"hidden\">\n <div id=\"step-controls\">\n <button id=\"prev-step\" disabled>Previous</button>\n <span id=\"step-indicator\">Step 1 of 1</span>\n <button id=\"next-step\" disabled>Next</button>\n </div>\n <div id=\"diagram-container\"></div>\n </section>\n</main>\n<footer>\n <p>Visualize your PlantUML diagrams step by step.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4CAF50;\n --secondary-color: #45a049;\n --background-color: #f5f5f5;\n --text-color: #333;\n --border-color: #ddd;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n line-height: 1.6;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n}\n\nheader {\n background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nmain {\n max-width: 800px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\n#upload-section {\n text-align: center;\n margin: 2rem 0;\n}\n\n.upload-label {\n display: inline-block;\n padding: 1rem 2rem;\n background-color: var(--primary-color);\n color: white;\n border-radius: 4px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\n.upload-label:hover {\n background-color: var(--secondary-color);\n}\n\n#file-input {\n display: none;\n}\n\n#diagram-section {\n margin-top: 2rem;\n}\n\n#step-controls {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n margin-bottom: 1rem;\n}\n\nbutton {\n padding: 0.5rem 1rem;\n background-color: var(--primary-color);\n color: white;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: var(--secondary-color);\n}\n\nbutton:disabled {\n background-color: #ccc;\n cursor: not-allowed;\n}\n\n#diagram-container {\n background-color: white;\n padding: 1rem;\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: 1rem;\n background-color: var(--primary-color);\n color: white;\n margin-top: 2rem;\n}\n\n.hidden {\n display: none;\n}\n\n@media (max-width: 600px) {\n header {\n padding: 1rem;\n }\n \n .upload-label {\n padding: 0.75rem 1.5rem;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const fileInput = document.getElementById('file-input');\n const diagramSection = document.getElementById('diagram-section');\n const diagramContainer = document.getElementById('diagram-container');\n const prevStepButton = document.getElementById('prev-step');\n const nextStepButton = document.getElementById('next-step');\n const stepIndicator = document.getElementById('step-indicator');\n \n let currentStep = 0;\n let steps = [];\n\n fileInput.addEventListener('change', (event) => {\n const file = event.target.files[0];\n if (file) {\n const reader = new FileReader();\n reader.onload = (e) => {\n const content = e.target.result;\n steps = splitPlantUML(content);\n if (steps.length > 0) {\n currentStep = 0;\n updateDiagram();\n diagramSection.classList.remove('hidden');\n }\n };\n reader.readAsText(file);\n }\n });\n\n prevStepButton.addEventListener('click', () => {\n if (currentStep > 0) {\n currentStep--;\n updateDiagram();\n }\n });\n\n nextStepButton.addEventListener('click', () => {\n if (currentStep < steps.length - 1) {\n currentStep++;\n updateDiagram();\n }\n });\n\n function splitPlantUML(content) {\n // Split content based on @startuml and @enduml tags\n const regex = /@startuml[\\s\\S]*?@enduml/g;\n return content.match(regex) || [];\n }\n\n function updateDiagram() {\n diagramContainer.textContent = steps[currentStep];\n stepIndicator.textContent = `Step ${currentStep + 1} of ${steps.length}`;\n prevStepButton.disabled = currentStep === 0;\n nextStepButton.disabled = currentStep === steps.length - 1;\n }\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 262,
+ "completion_tokens": 1254,
+ "total_tokens": 1516,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 262
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..0b4fb78
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# plantsteps.scroll.pub
+Website generated by DeepSeek from prompt: split plantuml diagram into multiple steps based on the markup provided in .puml file and render each step as a interactive sequence diagram
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..f48c1aa
--- /dev/null
+++ b/script.js
@@ -0,0 +1,55 @@
+document.addEventListener('DOMContentLoaded', () => {
+ const fileInput = document.getElementById('file-input');
+ const diagramSection = document.getElementById('diagram-section');
+ const diagramContainer = document.getElementById('diagram-container');
+ const prevStepButton = document.getElementById('prev-step');
+ const nextStepButton = document.getElementById('next-step');
+ const stepIndicator = document.getElementById('step-indicator');
+
+ let currentStep = 0;
+ let steps = [];
+
+ fileInput.addEventListener('change', (event) => {
+ const file = event.target.files[0];
+ if (file) {
+ const reader = new FileReader();
+ reader.onload = (e) => {
+ const content = e.target.result;
+ steps = splitPlantUML(content);
+ if (steps.length > 0) {
+ currentStep = 0;
+ updateDiagram();
+ diagramSection.classList.remove('hidden');
+ }
+ };
+ reader.readAsText(file);
+ }
+ });
+
+ prevStepButton.addEventListener('click', () => {
+ if (currentStep > 0) {
+ currentStep--;
+ updateDiagram();
+ }
+ });
+
+ nextStepButton.addEventListener('click', () => {
+ if (currentStep < steps.length - 1) {
+ currentStep++;
+ updateDiagram();
+ }
+ });
+
+ function splitPlantUML(content) {
+ // Split content based on @startuml and @enduml tags
+ const regex = /@startuml[\s\S]*?@enduml/g;
+ return content.match(regex) || [];
+ }
+
+ function updateDiagram() {
+ diagramContainer.textContent = steps[currentStep];
+ stepIndicator.textContent = `Step ${currentStep + 1} of ${steps.length}`;
+ prevStepButton.disabled = currentStep === 0;
+ nextStepButton.disabled = currentStep === steps.length - 1;
+ }
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..4a185d7
--- /dev/null
+++ b/style.css
@@ -0,0 +1,112 @@
+:root {
+ --primary-color: #4CAF50;
+ --secondary-color: #45a049;
+ --background-color: #f5f5f5;
+ --text-color: #333;
+ --border-color: #ddd;
+}
+
+body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ line-height: 1.6;
+ margin: 0;
+ padding: 0;
+ background-color: var(--background-color);
+ color: var(--text-color);
+}
+
+header {
+ background-color: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+}
+
+main {
+ max-width: 800px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+}
+
+#upload-section {
+ text-align: center;
+ margin: 2rem 0;
+}
+
+.upload-label {
+ display: inline-block;
+ padding: 1rem 2rem;
+ background-color: var(--primary-color);
+ color: white;
+ border-radius: 4px;
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+.upload-label:hover {
+ background-color: var(--secondary-color);
+}
+
+#file-input {
+ display: none;
+}
+
+#diagram-section {
+ margin-top: 2rem;
+}
+
+#step-controls {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 1rem;
+ margin-bottom: 1rem;
+}
+
+button {
+ padding: 0.5rem 1rem;
+ background-color: var(--primary-color);
+ color: white;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+button:hover {
+ background-color: var(--secondary-color);
+}
+
+button:disabled {
+ background-color: #ccc;
+ cursor: not-allowed;
+}
+
+#diagram-container {
+ background-color: white;
+ padding: 1rem;
+ border-radius: 4px;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+}
+
+footer {
+ text-align: center;
+ padding: 1rem;
+ background-color: var(--primary-color);
+ color: white;
+ margin-top: 2rem;
+}
+
+.hidden {
+ display: none;
+}
+
+@media (max-width: 600px) {
+ header {
+ padding: 1rem;
+ }
+
+ .upload-label {
+ padding: 0.75rem 1.5rem;
+ }
+}
\ No newline at end of file