Spaces:
Running
Running
bob
Browse files- .gitignore +1 -0
- index.html +0 -54
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.aider*
|
index.html
DELETED
|
@@ -1,54 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>HTML Playground</title>
|
| 7 |
-
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
| 8 |
-
</head>
|
| 9 |
-
<body class="m-0 p-0">
|
| 10 |
-
<div class="grid grid-cols-1 md:grid-cols-2 w-screen h-screen divide-x divide-amber-300">
|
| 11 |
-
<div class="bg-gray-100">
|
| 12 |
-
<textarea id="code-input" class="w-full h-full font-mono p-4 resize-none focus:outline-none"><h1>Welcome to the HTML Playground</h1>
|
| 13 |
-
<p id="message">Click the button to change this text.</p>
|
| 14 |
-
<button onclick="changeText()">Change Text</button>
|
| 15 |
-
|
| 16 |
-
<style>
|
| 17 |
-
body {
|
| 18 |
-
font-family: Arial, sans-serif;
|
| 19 |
-
background-color: #f0f0f0;
|
| 20 |
-
padding: 20px;
|
| 21 |
-
}
|
| 22 |
-
h1 {
|
| 23 |
-
color: navy;
|
| 24 |
-
}
|
| 25 |
-
</style>
|
| 26 |
-
|
| 27 |
-
<script>
|
| 28 |
-
function changeText() {
|
| 29 |
-
document.getElementById('message').innerText = 'Text changed!';
|
| 30 |
-
}
|
| 31 |
-
</script></textarea>
|
| 32 |
-
</div>
|
| 33 |
-
<div class="bg-white">
|
| 34 |
-
<iframe id="output" class="w-full h-full border-none"></iframe>
|
| 35 |
-
</div>
|
| 36 |
-
</div>
|
| 37 |
-
<script>
|
| 38 |
-
const codeInput = document.getElementById('code-input');
|
| 39 |
-
const output = document.getElementById('output');
|
| 40 |
-
|
| 41 |
-
function updateOutput() {
|
| 42 |
-
output.contentDocument.open();
|
| 43 |
-
output.contentDocument.write(codeInput.value);
|
| 44 |
-
output.contentDocument.close();
|
| 45 |
-
}
|
| 46 |
-
|
| 47 |
-
// Initial render
|
| 48 |
-
updateOutput();
|
| 49 |
-
|
| 50 |
-
// Update on every input
|
| 51 |
-
codeInput.addEventListener('input', updateOutput);
|
| 52 |
-
</script>
|
| 53 |
-
</body>
|
| 54 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|