File size: 1,897 Bytes
4b1d4e7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dox AI</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>Dox AI - Unified App & Website Generator</header>
<div class="controls">
<input type="text" id="prompt" placeholder="Enter your prompt..." />
<select id="mode">
<option value="website">Website AI</option>
<option value="app">App AI</option>
<option value="both">Both</option>
</select>
<button id="sendBtn">Send</button>
</div>
<div id="iframes">
<iframe id="website-frame" src="https://dsduded-deepstudio.hf.space" style="display:none;"></iframe>
<iframe id="app-frame" src="https://dsduded-gemini-coder-new.hf.space" style="display:none;"></iframe>
</div>
<script>
const websiteFrame = document.getElementById('website-frame');
const appFrame = document.getElementById('app-frame');
const sendBtn = document.getElementById('sendBtn');
const promptInput = document.getElementById('prompt');
const modeSelect = document.getElementById('mode');
function showFrames() {
const mode = modeSelect.value;
websiteFrame.style.display = 'none';
appFrame.style.display = 'none';
if (mode === 'website') websiteFrame.style.display = 'block';
if (mode === 'app') appFrame.style.display = 'block';
if (mode === 'both') {
websiteFrame.style.display = 'block';
appFrame.style.display = 'block';
}
}
sendBtn.addEventListener('click', () => {
showFrames();
const prompt = promptInput.value;
// FUTURE: postMessage to both iframes for unified chat once you can modify their code
console.log("Prompt to send:", prompt);
});
modeSelect.addEventListener('change', showFrames);
</script>
</body>
</html>
|