AI Website Builder

Describe Your Website

Generated Website

`); doc.close(); } // AI Website Generator (simplified for demo) function generateWebsiteFromPrompt(prompt) { const lowerPrompt = prompt.toLowerCase(); let theme = 'light'; let layout = 'generic'; if (lowerPrompt.includes('dark')) theme = 'dark'; if (lowerPrompt.includes('portfolio')) layout = 'portfolio'; if (lowerPrompt.includes('blog')) layout = 'blog'; if (lowerPrompt.includes('business')) layout = 'business'; // Generate HTML/CSS/JS based on prompt if (layout === 'portfolio') { return { html: `

My Portfolio

${prompt.substring(0, 100)}

${[1, 2, 3].map(i => `

Project ${i}

Sample project description

`).join('')}
`, css: ` body { font-family: 'Inter', sans-serif; } .container { max-width: 1200px; } `, js: 'console.log("Portfolio website loaded");' }; } else { return { html: `

Your AI-Generated Website

${prompt.substring(0, 200)}

`, css: ` body { font-family: 'Inter', sans-serif; } .container { max-width: 1200px; } `, js: 'console.log("Website loaded");' }; } }