Skip to content

Commit a924b36

Browse files
committed
jo likha woh dekhega
0 parents  commit a924b36

3 files changed

Lines changed: 89 additions & 0 deletions

File tree

index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>AI Coloring Sheet Generator</title>
5+
<link rel="stylesheet" href="style.css">
6+
</head>
7+
<body>
8+
<div class="container">
9+
<h1>🖍️ Coloring Sheet Generator</h1>
10+
11+
<!-- Text Input -->
12+
<textarea id="prompt" placeholder="Describe your coloring sheet (e.g., 'A lion with a floral mane')"></textarea>
13+
14+
<!-- Generate Button -->
15+
<button onclick="generateImage()">Generate</button>
16+
17+
<!-- Output -->
18+
<div id="loading" style="display: none;">Generating...</div>
19+
<div id="output"></div>
20+
21+
<!-- Print Button (hidden initially) -->
22+
<button id="printBtn" style="display: none;" onclick="window.print()">Print Sheet</button>
23+
</div>
24+
<script src="script.js"></script>
25+
</body>
26+
</html>

script.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
function generateImage() {
2+
const prompt = document.getElementById('prompt').value;
3+
const loading = document.getElementById('loading');
4+
const output = document.getElementById('output');
5+
const printBtn = document.getElementById('printBtn');
6+
7+
if (!prompt) {
8+
alert('Please describe your coloring sheet!');
9+
return;
10+
}
11+
12+
loading.style.display = 'block';
13+
output.innerHTML = '';
14+
printBtn.style.display = 'none';
15+
16+
// Simulate placeholder image generation
17+
setTimeout(() => {
18+
// Use this URL instead
19+
const placeholderUrl = `https://dummyimage.com/600x400/ffffff/000000&text=${encodeURIComponent(prompt)}`;
20+
21+
output.innerHTML = `<img src="${placeholderUrl}" alt="Coloring Sheet">`;
22+
loading.style.display = 'none';
23+
printBtn.style.display = 'inline-block';
24+
}, 2000);
25+
}

style.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
body {
2+
font-family: Arial, sans-serif;
3+
margin: 20px;
4+
background: #f0f8ff;
5+
}
6+
7+
.container {
8+
max-width: 800px;
9+
margin: 0 auto;
10+
text-align: center;
11+
}
12+
13+
textarea {
14+
width: 80%;
15+
height: 100px;
16+
margin: 20px 0;
17+
padding: 10px;
18+
font-size: 16px;
19+
}
20+
21+
button {
22+
background: #4CAF50;
23+
color: white;
24+
padding: 15px 30px;
25+
border: none;
26+
cursor: pointer;
27+
font-size: 16px;
28+
}
29+
30+
button:hover {
31+
opacity: 0.8;
32+
}
33+
34+
#output img {
35+
width: 80%;
36+
border: 2px dashed #333;
37+
margin: 20px 0;
38+
}

0 commit comments

Comments
 (0)