Skip to content

armgit / fx0

Public Imported from GitHub
0

A lightweight design agent built with libfx. Describe a page and an agent writes it as one HTML file.

TypeScript
1.2 KB
Raw Blame
<!doctype html><html><head><meta charset="utf-8"><title>Simple House</title><style>body{margin:0;height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(#8fd3ff,#e6f7ff);font-family:sans-serif}svg{width:min(90vw,600px);height:auto}#door{cursor:pointer}</style></head><body><svg viewBox="0 0 400 320"><circle cx="340" cy="50" r="28" fill="#ffd84d"/><rect x="0" y="270" width="400" height="50" fill="#6cc04a"/><rect x="250" y="70" width="30" height="60" fill="#8a4b3a"/><rect x="90" y="150" width="220" height="120" fill="#f4e1c1"/><polygon points="70,155 200,60 330,155" fill="#c0392b"/><rect x="175" y="200" width="50" height="70" fill="#7b4a2a" id="door"/><circle cx="215" cy="237" r="3" fill="#ffd84d"/><g fill="#9fd8ff" stroke="#fff" stroke-width="4"><rect x="110" y="180" width="45" height="40"/><rect x="245" y="180" width="45" height="40"/></g><g stroke="#fff" stroke-width="3"><line x1="132.5" y1="180" x2="132.5" y2="220"/><line x1="110" y1="200" x2="155" y2="200"/><line x1="267.5" y1="180" x2="267.5" y2="220"/><line x1="245" y1="200" x2="290" y2="200"/></g></svg><script>const d=document.getElementById('door');let o=0;d.onclick=()=>{o=!o;d.setAttribute('fill',o?'#2b1a10':'#7b4a2a')}</script></body></html>