commit 64480946c524387cb29276f6a8a8f4ef4228e1a4
Author: root <root@hub.scroll.pub> Date: 2024-12-27 22:17:42 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..4a69c09 --- /dev/null +++ b/body.html @@ -0,0 +1,11 @@ +<header> + <h1>Random Family Tree Generator</h1> + <p>Generate unique family trees with 6 to 10 members.</p> +</header> +<main> + <div id="tree-container"></div> + <button id="generate-btn">Generate New Tree</button> +</main> +<footer> + <p>Refresh to create a new family tree.</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..18623a0 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://familytree.scroll.pub +metaTags +editButton /edit.html +title Random Family Tree Generator +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..2df570c --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "3f883803-5f24-443c-b0b8-567d3a820628", + "object": "chat.completion", + "created": 1735337851, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nfamilytree.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://familytree.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Random Family Tree Generator\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Random Family Tree Generator</h1>\n <p>Generate unique family trees with 6 to 10 members.</p>\n</header>\n<main>\n <div id=\"tree-container\"></div>\n <button id=\"generate-btn\">Generate New Tree</button>\n</main>\n<footer>\n <p>Refresh to create a new family tree.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f5f5f5;\n --text-color: #333;\n --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: var(--font-family);\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--secondary-color);\n padding: 20px;\n max-width: 1200px;\n margin: 0 auto;\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nh1 {\n color: var(--primary-color);\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\nmain {\n background: white;\n padding: 2rem;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\n#tree-container {\n display: flex;\n justify-content: center;\n margin-bottom: 2rem;\n min-height: 300px;\n}\n\n#generate-btn {\n display: block;\n width: 100%;\n padding: 10px;\n background-color: var(--primary-color);\n color: white;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n font-size: 1rem;\n}\n\n#generate-btn:hover {\n background-color: darken(var(--primary-color), 10%);\n}\n\nfooter {\n text-align: center;\n margin-top: 2rem;\n font-size: 0.9rem;\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n}\n---script.js---\ndocument.getElementById('generate-btn').addEventListener('click', generateFamilyTree);\n\nfunction generateFamilyTree() {\n const container = document.getElementById('tree-container');\n container.innerHTML = '';\n const memberCount = Math.floor(Math.random() * 5) + 6;\n const tree = createTree(memberCount);\n renderTree(tree, container);\n}\n\nfunction createTree(memberCount) {\n const members = [];\n for (let i = 0; i < memberCount; i++) {\n members.push({\n name: `Member ${i + 1}`,\n children: []\n });\n }\n for (let i = 1; i < memberCount; i++) {\n const parentIndex = Math.floor(Math.random() * i);\n members[parentIndex].children.push(members[i]);\n }\n return members[0];\n}\n\nfunction renderTree(node, container) {\n const nodeElement = document.createElement('div');\n nodeElement.className = 'node';\n nodeElement.textContent = node.name;\n container.appendChild(nodeElement);\n\n if (node.children.length > 0) {\n const childrenContainer = document.createElement('div');\n childrenContainer.className = 'children';\n node.children.forEach(child => renderTree(child, childrenContainer));\n container.appendChild(childrenContainer);\n }\n}\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 260, + "completion_tokens": 832, + "total_tokens": 1092, + "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..f33ce22 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# familytree.scroll.pub +Website generated by DeepSeek from prompt: I want a website that can generate random family trees. The number of family members should be between 6 and 10. \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..ae051d9 --- /dev/null +++ b/script.js @@ -0,0 +1,38 @@ +document.getElementById('generate-btn').addEventListener('click', generateFamilyTree); + +function generateFamilyTree() { + const container = document.getElementById('tree-container'); + container.innerHTML = ''; + const memberCount = Math.floor(Math.random() * 5) + 6; + const tree = createTree(memberCount); + renderTree(tree, container); +} + +function createTree(memberCount) { + const members = []; + for (let i = 0; i < memberCount; i++) { + members.push({ + name: `Member ${i + 1}`, + children: [] + }); + } + for (let i = 1; i < memberCount; i++) { + const parentIndex = Math.floor(Math.random() * i); + members[parentIndex].children.push(members[i]); + } + return members[0]; +} + +function renderTree(node, container) { + const nodeElement = document.createElement('div'); + nodeElement.className = 'node'; + nodeElement.textContent = node.name; + container.appendChild(nodeElement); + + if (node.children.length > 0) { + const childrenContainer = document.createElement('div'); + childrenContainer.className = 'children'; + node.children.forEach(child => renderTree(child, childrenContainer)); + container.appendChild(childrenContainer); + } +} \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..c013cf0 --- /dev/null +++ b/style.css @@ -0,0 +1,75 @@ +:root { + --primary-color: #4a90e2; + --secondary-color: #f5f5f5; + --text-color: #333; + --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: var(--font-family); + line-height: 1.6; + color: var(--text-color); + background-color: var(--secondary-color); + padding: 20px; + max-width: 1200px; + margin: 0 auto; +} + +header { + text-align: center; + margin-bottom: 2rem; +} + +h1 { + color: var(--primary-color); + font-size: 2.5rem; + margin-bottom: 0.5rem; +} + +main { + background: white; + padding: 2rem; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +#tree-container { + display: flex; + justify-content: center; + margin-bottom: 2rem; + min-height: 300px; +} + +#generate-btn { + display: block; + width: 100%; + padding: 10px; + background-color: var(--primary-color); + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + font-size: 1rem; +} + +#generate-btn:hover { + background-color: darken(var(--primary-color), 10%); +} + +footer { + text-align: center; + margin-top: 2rem; + font-size: 0.9rem; +} + +@media (max-width: 768px) { + h1 { + font-size: 2rem; + } +} \ No newline at end of file