text
stringlengths
0
106k
<select id="model" class="form-control mb-3"></select>
</div>
<div class="input-container">
<label for="style" class="form-label">Style</label>
<select id="style" class="form-control mb-3"></select>
</div>
<div class="input-container">
<label for="ratio" class="form-label">Aspect Ratio</label>
<select id="ratio" class="form-control mb-3"></select>
<div class="input-container">
<label for="num-images" class="form-label">Number of Images</label>
<input type="number" id="num-images" class="form-control mb-3" min="1" max="4" value="4">
</div>
</div>
<button class="btn btn-primary mt-3">Generate</button>
</div>
<!--Bootstrap JS-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!--Custom JS-->
<script src="script.js"></script>
</body>
</html>
body {
background: #f8f9fa;
}
.container {
padding: 2rem;
}
.input-container {
text-align: left;
width: 100%;
}
.form-label {
font-size: 0.8rem;
font-weight: bold;
color: #333;
margin-bottom: 0.5rem;
}
.form-control {
height: auto;
font-size: 1.2rem;
overflow: hidden;
resize: none;
}
.btn {
height: 3rem;
font-size: 1.2rem;
width: 100%;
}
function isMobile() {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
let textareas = document.querySelectorAll('textarea');
textareas.forEach(textarea => {
textarea.addEventListener('input', autoResize, false);
});
function autoResize() {
this.style.height = 'auto';
this.style.height = this.scrollHeight + 'px';
}
['Imagine', 'Replicate', 'Leonardo', 'PlaygroundAI'].forEach(provider => document.getElementById('provider').add(new Option(provider, provider)));
document.getElementById('provider').value = 'Leonardo';
['SDXL', 'Stable Diffusion 2.1', 'Stable Diffusion 1.5', 'Playground V1'].forEach(model => document.getElementById('model').add(new Option(model, model)));
document.getElementById('model').value = 'SDXL';
['Photoreal', 'Pixar 3D', 'Painting', 'None'].forEach(style => document.getElementById('style').add(new Option(style, style)));
document.getElementById('style').value = 'None';
['16:9', '9:16', '4:3', '3:4', "3:2","2:3","1:1"].forEach(ratio => document.getElementById('ratio').add(new Option(ratio, ratio)));
document.getElementById('ratio').value = '16:9';
document.querySelector('.btn').addEventListener('click', generateImages);
function generateImages() {
// Get the values from the form inputs
let provider = document.getElementById('provider').value;
let model = document.getElementById('model').value;
let style = document.getElementById('style').value;
let ratio = document.getElementById('ratio').value;
let numImages = document.getElementById('num-images').value;
// Generate the URLs
let urls = []; // replace this with the logic to generate the URLs
for (let i = 0; i < numImages; i++) {
// Add logic here to generate each URL based on the form values
// For now, I'll just add a placeholder URL
urls.push('http://example.com/image' + i + '.jpg');
}
urls = ["https://i.ibb.co/k0W6V1v/Dream-Shaper-v7-blonde-hermione-emma-watsonpink-dress-silver-ti-3.jpg",
"https://i.ibb.co/4tVHbcq/Dream-Shaper-v7-blonde-hermione-emma-watsonpink-dress-silver-ti-2.jpg",
"https://i.ibb.co/wLzpXb2/Photo-Real-blonde-hermione-emma-watsonpink-dress-blushing-weddi-0.jpg",