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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>AI Image Generator - Content Warning</title>
|
| 8 |
+
<style>
|
| 9 |
+
* {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
box-sizing: border-box;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
body {
|
| 16 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 17 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 18 |
+
min-height: 100vh;
|
| 19 |
+
display: flex;
|
| 20 |
+
flex-direction: column;
|
| 21 |
+
align-items: center;
|
| 22 |
+
justify-content: center;
|
| 23 |
+
padding: 20px;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.container {
|
| 27 |
+
background: rgba(255, 255, 255, 0.95);
|
| 28 |
+
border-radius: 20px;
|
| 29 |
+
padding: 40px;
|
| 30 |
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
| 31 |
+
max-width: 800px;
|
| 32 |
+
width: 100%;
|
| 33 |
+
text-align: center;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.header {
|
| 37 |
+
margin-bottom: 30px;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.header h1 {
|
| 41 |
+
color: #333;
|
| 42 |
+
font-size: 2.5rem;
|
| 43 |
+
margin-bottom: 10px;
|
| 44 |
+
font-weight: 700;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.header p {
|
| 48 |
+
color: #666;
|
| 49 |
+
font-size: 1.1rem;
|
| 50 |
+
line-height: 1.6;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.warning-box {
|
| 54 |
+
background: linear-gradient(135deg, #ff6b6b, #ee5a24);
|
| 55 |
+
color: white;
|
| 56 |
+
padding: 30px;
|
| 57 |
+
border-radius: 15px;
|
| 58 |
+
margin: 30px 0;
|
| 59 |
+
box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.warning-box h2 {
|
| 63 |
+
font-size: 1.8rem;
|
| 64 |
+
margin-bottom: 15px;
|
| 65 |
+
display: flex;
|
| 66 |
+
align-items: center;
|
| 67 |
+
justify-content: center;
|
| 68 |
+
gap: 10px;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.warning-icon {
|
| 72 |
+
font-size: 2rem;
|
| 73 |
+
animation: pulse 2s infinite;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
@keyframes pulse {
|
| 77 |
+
|
| 78 |
+
0%,
|
| 79 |
+
100% {
|
| 80 |
+
transform: scale(1);
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
50% {
|
| 84 |
+
transform: scale(1.1);
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.content-options {
|
| 89 |
+
display: grid;
|
| 90 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 91 |
+
gap: 20px;
|
| 92 |
+
margin: 30px 0;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.option-card {
|
| 96 |
+
background: white;
|
| 97 |
+
border-radius: 15px;
|
| 98 |
+
padding: 25px;
|
| 99 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
| 100 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 101 |
+
border: 2px solid transparent;
|
| 102 |
+
cursor: pointer;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.option-card:hover {
|
| 106 |
+
transform: translateY(-5px);
|
| 107 |
+
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.option-card.sfw {
|
| 111 |
+
border-color: #4CAF50;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.option-card.nsfw {
|
| 115 |
+
border-color: #f44336;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.option-icon {
|
| 119 |
+
font-size: 3rem;
|
| 120 |
+
margin-bottom: 15px;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.option-card h3 {
|
| 124 |
+
color: #333;
|
| 125 |
+
margin-bottom: 10px;
|
| 126 |
+
font-size: 1.3rem;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
.option-card p {
|
| 130 |
+
color: #666;
|
| 131 |
+
font-size: 0.95rem;
|
| 132 |
+
line-height: 1.5;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.controls {
|
| 136 |
+
margin: 30px 0;
|
| 137 |
+
text-align: left;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
.control-group {
|
| 141 |
+
margin-bottom: 20px;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.control-group label {
|
| 145 |
+
display: block;
|
| 146 |
+
margin-bottom: 8px;
|
| 147 |
+
color: #333;
|
| 148 |
+
font-weight: 600;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.control-group input,
|
| 152 |
+
.control-group select {
|
| 153 |
+
width: 100%;
|
| 154 |
+
padding: 12px;
|
| 155 |
+
border: 2px solid #ddd;
|
| 156 |
+
border-radius: 10px;
|
| 157 |
+
font-size: 1rem;
|
| 158 |
+
transition: border-color 0.3s ease;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.control-group input:focus,
|
| 162 |
+
.control-group select:focus {
|
| 163 |
+
outline: none;
|
| 164 |
+
border-color: #667eea;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
.generate-btn {
|
| 168 |
+
background: linear-gradient(135deg, #667eea, #764ba2);
|
| 169 |
+
color: white;
|
| 170 |
+
border: none;
|
| 171 |
+
padding: 15px 40px;
|
| 172 |
+
font-size: 1.1rem;
|
| 173 |
+
border-radius: 50px;
|
| 174 |
+
cursor: pointer;
|
| 175 |
+
transition: all 0.3s ease;
|
| 176 |
+
font-weight: 600;
|
| 177 |
+
margin: 20px 0;
|
| 178 |
+
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
.generate-btn:hover {
|
| 182 |
+
transform: translateY(-2px);
|
| 183 |
+
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
.generate-btn:disabled {
|
| 187 |
+
background: #ccc;
|
| 188 |
+
cursor: not-allowed;
|
| 189 |
+
transform: none;
|
| 190 |
+
box-shadow: none;
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
.image-preview {
|
| 194 |
+
margin: 30px 0;
|
| 195 |
+
display: none;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
.image-preview img {
|
| 199 |
+
max-width: 100%;
|
| 200 |
+
border-radius: 15px;
|
| 201 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.footer {
|
| 205 |
+
margin-top: 30px;
|
| 206 |
+
color: #666;
|
| 207 |
+
font-size: 0.9rem;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
.footer a {
|
| 211 |
+
color: #667eea;
|
| 212 |
+
text-decoration: none;
|
| 213 |
+
font-weight: 600;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
.footer a:hover {
|
| 217 |
+
text-decoration: underline;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
.age-verification {
|
| 221 |
+
background: rgba(0, 0, 0, 0.8);
|
| 222 |
+
position: fixed;
|
| 223 |
+
top: 0;
|
| 224 |
+
left: 0;
|
| 225 |
+
width: 100%;
|
| 226 |
+
height: 100%;
|
| 227 |
+
display: flex;
|
| 228 |
+
align-items: center;
|
| 229 |
+
justify-content: center;
|
| 230 |
+
z-index: 1000;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.verification-box {
|
| 234 |
+
background: white;
|
| 235 |
+
padding: 40px;
|
| 236 |
+
border-radius: 20px;
|
| 237 |
+
text-align: center;
|
| 238 |
+
max-width: 400px;
|
| 239 |
+
width: 90%;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.verification-box h2 {
|
| 243 |
+
color: #333;
|
| 244 |
+
margin-bottom: 20px;
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
.verification-box p {
|
| 248 |
+
color: #666;
|
| 249 |
+
margin-bottom: 25px;
|
| 250 |
+
line-height: 1.6;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
.age-buttons {
|
| 254 |
+
display: flex;
|
| 255 |
+
gap: 15px;
|
| 256 |
+
justify-content: center;
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
.age-btn {
|
| 260 |
+
padding: 12px 30px;
|
| 261 |
+
border: none;
|
| 262 |
+
border-radius: 10px;
|
| 263 |
+
font-size: 1rem;
|
| 264 |
+
cursor: pointer;
|
| 265 |
+
transition: all 0.3s ease;
|
| 266 |
+
font-weight: 600;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.age-btn.yes {
|
| 270 |
+
background: #f44336;
|
| 271 |
+
color: white;
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
.age-btn.no {
|
| 275 |
+
background: #4CAF50;
|
| 276 |
+
color: white;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
.age-btn:hover {
|
| 280 |
+
transform: translateY(-2px);
|
| 281 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
@media (max-width: 768px) {
|
| 285 |
+
.container {
|
| 286 |
+
padding: 20px;
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
.header h1 {
|
| 290 |
+
font-size: 2rem;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
.content-options {
|
| 294 |
+
grid-template-columns: 1fr;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
.age-buttons {
|
| 298 |
+
flex-direction: column;
|
| 299 |
+
}
|
| 300 |
+
}
|
| 301 |
+
</style>
|
| 302 |
+
</head>
|
| 303 |
+
|
| 304 |
+
<body>
|
| 305 |
+
<div class="age-verification" id="ageVerification">
|
| 306 |
+
<div class="verification-box">
|
| 307 |
+
<h2>Age Verification Required</h2>
|
| 308 |
+
<p>This application may generate content intended for adults only. You must be 18 years or older to proceed.</p>
|
| 309 |
+
<div class="age-buttons">
|
| 310 |
+
<button class="age-btn yes" onclick="verifyAge(true)">I am 18 or older</button>
|
| 311 |
+
<button class="age-btn no" onclick="verifyAge(false)">I am under 18</button>
|
| 312 |
+
</div>
|
| 313 |
+
</div>
|
| 314 |
+
</div>
|
| 315 |
+
|
| 316 |
+
<div class="container" id="mainApp" style="display: none;">
|
| 317 |
+
<div class="header">
|
| 318 |
+
<h1>AI Image Generator</h1>
|
| 319 |
+
<p>Create stunning images with artificial intelligence. Choose your content preferences below.</p>
|
| 320 |
+
<p style="margin-top: 10px; font-size: 0.9rem; color: #888;">Built with <a
|
| 321 |
+
href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a></p>
|
| 322 |
+
</div>
|
| 323 |
+
|
| 324 |
+
<div class="warning-box">
|
| 325 |
+
<h2>
|
| 326 |
+
<span class="warning-icon">⚠️</span>
|
| 327 |
+
Content Warning
|
| 328 |
+
</h2>
|
| 329 |
+
<p>This application includes options for generating NSFW (Not Safe For Work) content. Please use responsibly and
|
| 330 |
+
ensure you are in an appropriate environment.</p>
|
| 331 |
+
</div>
|
| 332 |
+
|
| 333 |
+
<div class="content-options">
|
| 334 |
+
<div class="option-card sfw" onclick="selectOption('sfw')">
|
| 335 |
+
<div class="option-icon">🖼️</div>
|
| 336 |
+
<h3>Safe Content Only</h3>
|
| 337 |
+
<p>Generate family-friendly images including landscapes, animals, objects, and appropriate artwork.</p>
|
| 338 |
+
</div>
|
| 339 |
+
<div class="option-card nsfw" onclick="selectOption('nsfw')">
|
| 340 |
+
<div class="option-icon">🔞</div>
|
| 341 |
+
<h3>NSFW Content</h3>
|
| 342 |
+
<p>Generate adult content including artistic nudes, mature themes, and explicit material (18+ only).</p>
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
+
|
| 346 |
+
<div class="controls">
|
| 347 |
+
<div class="control-group">
|
| 348 |
+
<label for="prompt">Image Description</label>
|
| 349 |
+
<input type="text" id="prompt" placeholder="Describe the image you want to generate..." maxlength="200">
|
| 350 |
+
</div>
|
| 351 |
+
|
| 352 |
+
<div class="control-group">
|
| 353 |
+
<label for="style">Art Style</label>
|
| 354 |
+
<select id="style">
|
| 355 |
+
<option value="realistic">Realistic</option>
|
| 356 |
+
<option value="anime">Anime</option>
|
| 357 |
+
<option value="painting">Oil Painting</option>
|
| 358 |
+
<option value="digital">Digital Art</option>
|
| 359 |
+
<option value="photographic">Photographic</option>
|
| 360 |
+
</select>
|
| 361 |
+
</div>
|
| 362 |
+
|
| 363 |
+
<div class="control-group">
|
| 364 |
+
<label for="quality">Image Quality</label>
|
| 365 |
+
<select id="quality">
|
| 366 |
+
<option value="standard">Standard (512x512)</option>
|
| 367 |
+
<option value="high">High (768x768)</option>
|
| 368 |
+
<option value="ultra">Ultra HD (1024x1024)</option>
|
| 369 |
+
</select>
|
| 370 |
+
</div>
|
| 371 |
+
</div>
|
| 372 |
+
|
| 373 |
+
<button class="generate-btn" id="generateBtn" onclick="generateImage()" disabled>
|
| 374 |
+
Generate Image
|
| 375 |
+
</button>
|
| 376 |
+
|
| 377 |
+
<div class="image-preview" id="imagePreview">
|
| 378 |
+
<img id="generatedImage" src="" alt="Generated image">
|
| 379 |
+
</div>
|
| 380 |
+
|
| 381 |
+
<div class="footer">
|
| 382 |
+
<p><strong>Disclaimer:</strong> This is a demonstration interface. Actual image generation would require
|
| 383 |
+
integration with AI services. Please respect content guidelines and use responsibly.</p>
|
| 384 |
+
</div>
|
| 385 |
+
</div>
|
| 386 |
+
|
| 387 |
+
<script>
|
| 388 |
+
let selectedOption = null;
|
| 389 |
+
let isAgeVerified = false;
|
| 390 |
+
|
| 391 |
+
function verifyAge(isAdult) {
|
| 392 |
+
if (isAdult) {
|
| 393 |
+
document.getElementById('ageVerification').style.display = 'none';
|
| 394 |
+
document.getElementById('mainApp').style.display = 'block';
|
| 395 |
+
isAgeVerified = true;
|
| 396 |
+
} else {
|
| 397 |
+
alert('You must be 18 or older to use this application. Redirecting to safe content...');
|
| 398 |
+
window.location.href = 'https://www.google.com';
|
| 399 |
+
}
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
function selectOption(option) {
|
| 403 |
+
selectedOption = option;
|
| 404 |
+
const cards = document.querySelectorAll('.option-card');
|
| 405 |
+
cards.forEach(card => card.style.transform = 'scale(1)');
|
| 406 |
+
|
| 407 |
+
if (option === 'sfw') {
|
| 408 |
+
document.querySelector('.option-card.sfw').style.transform = 'scale(1.05)';
|
| 409 |
+
} else {
|
| 410 |
+
document.querySelector('.option-card.nsfw').style.transform = 'scale(1.05)';
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
document.getElementById('generateBtn').disabled = false;
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
function generateImage() {
|
| 417 |
+
if (!selectedOption) {
|
| 418 |
+
alert('Please select a content option first.');
|
| 419 |
+
return;
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
const prompt = document.getElementById('prompt').value;
|
| 423 |
+
if (!prompt.trim()) {
|
| 424 |
+
alert('Please enter an image description.');
|
| 425 |
+
return;
|
| 426 |
+
}
|
| 427 |
+
|
| 428 |
+
const style = document.getElementById('style').value;
|
| 429 |
+
const quality = document.getElementById('quality').value;
|
| 430 |
+
|
| 431 |
+
// Show loading state
|
| 432 |
+
const btn = document.getElementById('generateBtn');
|
| 433 |
+
btn.innerHTML = 'Generating...';
|
| 434 |
+
btn.disabled = true;
|
| 435 |
+
|
| 436 |
+
// Simulate API call delay
|
| 437 |
+
setTimeout(() => {
|
| 438 |
+
// This is a simulation - in a real application, you would call an AI image generation API
|
| 439 |
+
const imagePreview = document.getElementById('imagePreview');
|
| 440 |
+
const generatedImage = document.getElementById('generatedImage');
|
| 441 |
+
|
| 442 |
+
// Create a placeholder image based on the selected options
|
| 443 |
+
const canvas = document.createElement('canvas');
|
| 444 |
+
const ctx = canvas.getContext('2d');
|
| 445 |
+
canvas.width = 400;
|
| 446 |
+
canvas.height = 400;
|
| 447 |
+
|
| 448 |
+
// Background based on content type
|
| 449 |
+
if (selectedOption === 'sfw') {
|
| 450 |
+
ctx.fillStyle = '#4CAF50';
|
| 451 |
+
} else {
|
| 452 |
+
ctx.fillStyle = '#f44336';
|
| 453 |
+
}
|
| 454 |
+
ctx.fillRect(0, 0, 400, 400);
|
| 455 |
+
|
| 456 |
+
// Text overlay
|
| 457 |
+
ctx.fillStyle = 'white';
|
| 458 |
+
ctx.font = '20px Arial';
|
| 459 |
+
ctx.textAlign = 'center';
|
| 460 |
+
ctx.fillText('AI Generated Image', 200, 150);
|
| 461 |
+
ctx.fillText(`Style: ${style}`, 200, 200);
|
| 462 |
+
ctx.fillText(`Content: ${selectedOption.toUpperCase()}`, 200, 250);
|
| 463 |
+
|
| 464 |
+
generatedImage.src = canvas.toDataURL();
|
| 465 |
+
imagePreview.style.display = 'block';
|
| 466 |
+
|
| 467 |
+
// Reset button
|
| 468 |
+
btn.innerHTML = 'Generate Image';
|
| 469 |
+
btn.disabled = false;
|
| 470 |
+
|
| 471 |
+
// Scroll to preview
|
| 472 |
+
imagePreview.scrollIntoView({ behavior: 'smooth' });
|
| 473 |
+
|
| 474 |
+
console.log('Generation parameters:', {
|
| 475 |
+
prompt,
|
| 476 |
+
style,
|
| 477 |
+
quality,
|
| 478 |
+
contentType: selectedOption
|
| 479 |
+
});
|
| 480 |
+
}, 2000);
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
// Enable generate button when prompt is entered
|
| 484 |
+
document.getElementById('prompt').addEventListener('input', function() {
|
| 485 |
+
if (this.value.trim() && selectedOption) {
|
| 486 |
+
document.getElementById('generateBtn').disabled = false;
|
| 487 |
+
} else {
|
| 488 |
+
document.getElementById('generateBtn').disabled = true;
|
| 489 |
+
}
|
| 490 |
+
});
|
| 491 |
+
</script>
|
| 492 |
+
</body>
|
| 493 |
+
|
| 494 |
+
</html>
|