Changes to plantsteps.scroll.pub

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

PlantUML Step-by-Step Visualizer

+

Upload your PlantUML .puml file to split it into interactive sequence diagrams.

+
+
+
+
+ Choose a .puml file
+
+
+
+
+
+
+ Step 1 of 1
+
+
+
+
+
+
+

Visualize your PlantUML diagrams step by step.

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://plantsteps.scroll.pub
+ metaTags
+ editButton /edit.html
+ title PlantUML Step-by-Step Visualizer
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "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
\n

PlantUML Step-by-Step Visualizer

\n

Upload your PlantUML .puml file to split it into interactive sequence diagrams.

\n
\n
\n
\n \n
\n
\n
\n \n Step 1 of 1\n \n
\n
\n
\n
\n
\n

Visualize your PlantUML diagrams step by step.

\n
\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"
+ }
readme.scroll
Changed around line 1
+ # 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
script.js
Changed around line 1
+ 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;
+ }
+ });
style.css
Changed around line 1
+ :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;
+ }
+ }