Spaces:
Running
Running
File size: 6,289 Bytes
df9973f 84e1dd3 633f37b df9973f 84e1dd3 df9973f 84e1dd3 df9973f 633f37b 84e1dd3 633f37b df9973f 84e1dd3 633f37b df9973f 633f37b 84e1dd3 633f37b df9973f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Pro Suite - Image Creator</title>
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#0f172a">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
<script>
if (window.pdfjsLib) pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js';
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.10.0/localforage.min.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="overlay" id="overlay"></div>
<div class="topbar">
<div class="menuBtn" onclick="toggleSidebar()">โฐ</div>
<div class="appTitle">AI Pro Suite</div>
</div>
<div class="apiTracker">
<div>๐จ Cloudflare Image Studio</div>
<div>๐ PDF + ๐ผ๏ธ Image context</div>
</div>
<div class="sidebar" id="sidebar" style="overflow-y:auto;">
<button class="sidebar-close-btn" onclick="toggleSidebar()">โ Close Menu</button>
<button onclick="window.location.href='index.html'">๐ Dashboard</button>
<button onclick="window.location.href='lens.html'">โจ Lens Studio</button>
<button onclick="window.location.href='books.html'">๐ Book Deep Study</button>
<button onclick="window.location.href='maths.html'">๐งฎ Math Solver</button>
<button onclick="window.location.href='search.html'">๐ Deep Search</button>
<button onclick="window.location.href='downloader.html'">๐ฅ Video Downloader</button>
<button onclick="window.location.href='board.html'">๐ Whiteboard</button>
<button onclick="window.location.href='clone.html'">๐ Website Cloner</button>
<button onclick="window.location.href='runhtml.html'">๐ Write HTML</button>
<button onclick="window.location.href='youtube.html'">โถ๏ธ YouTube Search</button>
<button onclick="window.location.href='managequiz.html'">โ๏ธ Manage Quiz</button>
<button onclick="window.location.href='tutor.html'">๐จโ๐ซ AI Tutor</button>
<button onclick="window.location.href='quiz.html'">๐ Take a Quiz!</button>
<button onclick="window.location.href='book_quiz.html'">๐ Take a Book Quiz!</button>
<button onclick="window.location.href='tables.html'">๐ข Maths Table</button>
<button onclick="window.location.href='coding.html'">๐ป AI Coding</button>
<button onclick="window.location.href='chess.html'">โ๏ธ Chess AI</button>
<button onclick="window.location.href='translator.html'">๐๏ธ Text Translator</button>
<button onclick="window.location.href='image.html'">๐ผ๏ธ Image Translator</button>
<button onclick="window.location.href='create.html'" style="border-left: 4px solid var(--primary); color: var(--primary); background: var(--border-light);">๐จ Image Creator</button>
<button onclick="window.location.href='qa.html'">๐ Document Q&A</button>
<button onclick="window.location.href='history.html'">๐ History & Downloads</button>
<button onclick="window.location.href='storage.html'">๐ Storage</button>
<button onclick="window.location.href='hub.html'">๐ฐ๏ธ HF Command Center</button>
<button onclick="window.location.href='live.html'">๐ฃ๏ธ Gemini Live</button>
</div>
<div class="page active" id="createPage">
<div class="creator-hero card">
<div class="creator-orb">๐จ</div>
<div>
<h1>Cloudflare Image Creator</h1>
<p class="cardSub">Type your idea, upload a reference image, or attach a PDF. The app extracts helpful context and asks Cloudflare AI to generate a polished image.</p>
</div>
</div>
<div class="creator-layout">
<div class="card creator-panel">
<div class="cardTitle">1. Describe your image</div>
<textarea class="standard" id="createPrompt" rows="6" placeholder="Example: Create a neon cyberpunk classroom poster explaining fractions in Hindi, bright colors, readable text, 16:9..."></textarea>
<div class="create-upload-grid">
<label class="create-upload-card">
<input id="createImageInput" type="file" accept="image/*" hidden>
<span>๐ผ๏ธ</span>
<strong>Upload image</strong>
<small id="createImageName">Reference / inspiration</small>
</label>
<label class="create-upload-card">
<input id="createPdfInput" type="file" accept="application/pdf" hidden>
<span>๐</span>
<strong>Upload PDF</strong>
<small id="createPdfName">Use notes / document text</small>
</label>
</div>
<div class="creator-preview-row">
<img id="createImagePreview" alt="Uploaded reference preview" style="display:none;">
<div id="createPdfPreview" class="create-pdf-chip" style="display:none;">๐ PDF attached</div>
</div>
<button class="btn purple creator-generate-btn" id="createGenerateBtn" onclick="generateCloudflareImage()">โจ Generate Image</button>
<button class="btn red" style="display:none;" id="createClearBtn" onclick="clearCreateInputs()">๐งน Clear Creator</button>
</div>
<div class="card creator-result-card">
<div class="cardTitle">2. Generated result</div>
<div id="createStatus" class="create-status">Ready. Add your prompt and optional files.</div>
<div class="creator-result-stage" id="createResultStage">
<div class="creator-placeholder">
<div>๐</div>
<strong>Your Cloudflare artwork appears here</strong>
<span>No image generated yet.</span>
</div>
</div>
<div class="creator-actions" id="createActions" style="display:none;">
<a class="btn green" id="downloadCreatedImage" download="cloudflare-created-image.png">๐พ Download</a>
<button class="btn blue" onclick="copyCreatedPrompt()">๐ Copy Prompt</button>
</div>
</div>
</div>
</div>
<script src="ui-controls.js" defer></script>
<script src="create.js" defer></script>
</body>
</html>
|