UXInteract / task_023 /solution /code /index.html
DojiSum's picture
Publish the current 141-task UXInteract release
ef987bb verified
Raw History Blame Contribute Delete
2.07 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>demo-1001</title>
<style>
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; background: #fafafa; color: #1a1a1a;
display: flex; flex-direction: column; min-height: 100vh; }
header { background: #222; color: #fff; padding: 16px 24px; }
main { flex: 1; padding: 24px; max-width: 720px; margin: 0 auto; width: 100%; }
.prompt-row { display: flex; gap: 8px; margin-top: 16px; }
.prompt-row input { flex: 1; padding: 12px; border: 1px solid #bbb; border-radius: 8px; }
.prompt-row button { padding: 12px 20px; border: none; border-radius: 8px;
background: #2563eb; color: #fff; cursor: pointer; }
#output { margin-top: 16px; padding: 12px; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; }
footer { padding: 12px 24px; color: #888; }
</style>
</head>
<body>
<header><strong>Demo 1001</strong> &mdash; single page app</header>
<main>
<h1>Prompt Demo</h1>
<p>This project ships with a redundant <code>figma/</code> folder that should be removed; the core app logic must stay unchanged.</p>
<div class="prompt-row">
<input id="prompt" placeholder="Type a prompt and send..." aria-label="prompt input">
<button id="send">Send</button>
</div>
<div id="output">Result will appear here.</div>
</main>
<footer>core logic version: demo-1001</footer>
<script>
// Demo page for the preserved core logic in src/app.js (kept unchanged on disk).
// Inlined here so the static page renders without ES-module file:// loading.
function sendPrompt(input) {
return { title: 'real title', content: String(input).trim() };
}
var out = document.getElementById('output');
document.getElementById('send').addEventListener('click', function () {
var value = document.getElementById('prompt').value;
out.textContent = '[demo-1001] ' + sendPrompt(value).content;
});
</script>
</body>
</html>