Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
FreezaSama authored Jan 3, 2025
1 parent 788e626 commit 02af1db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
object-fit: contain;
}

.placeholder-text {
color: #ccc;
font-size: 16px;
}

button {
width: 300px;
padding: 10px 20px;
Expand Down Expand Up @@ -77,6 +82,7 @@ <h1>AI FORGE</h1>
<div class="square">
<div class="image-box" id="sketchBox">
<img id="sketchPreview" style="display: none;">
<span class="placeholder-text" id="sketchPlaceholder">Sketch goes here</span>
</div>
<input type="file" id="sketchUpload" style="display: none;" accept="image/*">
<button onclick="document.getElementById('sketchUpload').click()">Upload Your Sketch</button>
Expand Down Expand Up @@ -105,8 +111,10 @@ <h1>AI FORGE</h1>
const reader = new FileReader();
reader.onload = function(e) {
const preview = document.getElementById('sketchPreview');
const placeholder = document.getElementById('sketchPlaceholder');
preview.src = e.target.result;
preview.style.display = 'block';
placeholder.style.display = 'none'; // Hide placeholder when image is shown
}
reader.readAsDataURL(file);
}
Expand Down

0 comments on commit 02af1db

Please sign in to comment.