de / index.html
amwolf36's picture
Add 2 files
4acb194 verified
Raw History Blame Contribute Delete
80.7 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>AI Ebook Generator</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .gradient-bg { background: linear-gradient(135deg, #6b73ff 0%, #000dff 100%); } .ebook-preview { min-height: 500px; background: linear-gradient(to bottom, #f8fafc, #e2e8f0); } .chapter-item:hover { transform: translateX(5px); } .loading-dots:after { content: '.'; animation: dots 1.5s steps(5, end) infinite; } @keyframes dots { 0%, 20% { content: '.'; } 40% { content: '..'; } 60% { content: '...'; } 80%, 100% { content: ''; } } .tab-content { display: none; } .tab-content.active { display: block; } .plan-card { transition: all 0.3s ease; } .plan-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); } .premium-badge { position: absolute; top: -10px; right: -10px; background: linear-gradient(45deg, #ff9500, #ff5e00); color: white; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.2); } .api-status { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; } .api-status.connected { background-color: #10B981; } .api-status.disconnected { background-color: #EF4444; } .toggle-checkbox:checked { right: 0; border-color: #3B82F6; } .toggle-checkbox:checked + .toggle-label { background-color: #3B82F6; } .format-card { transition: all 0.2s ease; border-left: 4px solid transparent; } .format-card:hover { transform: translateY(-3px); border-left-color: #3B82F6; } .requirement-item { position: relative; padding-left: 20px; } .requirement-item:before { content: "•"; position: absolute; left: 0; color: #3B82F6; font-weight: bold; } .progress-bar { height: 6px; border-radius: 3px; background-color: #e2e8f0; } .progress-fill { height: 100%; border-radius: 3px; background-color: #3B82F6; transition: width 0.3s ease; } </style> </head> <body class="bg-gray-50"> <div class="min-h-screen"> <!-- Header --> <header class="gradient-bg text-white shadow-lg"> <div class="container mx-auto px-4 py-6"> <div class="flex justify-between items-center"> <div class="flex items-center space-x-2"> <i class="fas fa-book-open text-2xl"></i> <h1 class="text-2xl font-bold">AI Ebook Generator</h1> </div> <nav> <ul class="flex space-x-6"> <li><a href="#" class="hover:underline" onclick="showTab('generator')">Generator</a></li> <li><a href="#" class="hover:underline" onclick="showTab('export')">Export</a></li> <li><a href="#" class="hover:underline" onclick="showTab('api-settings')">API Settings</a></li> </ul> </nav> </div> </div> </header> <!-- Main Content --> <main class="container mx-auto px-4 py-8"> <!-- Generator Tab --> <div id="generator-tab" class="tab-content active"> <div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> <!-- Generator Form --> <div class="lg:col-span-1 bg-white rounded-xl shadow-md p-6 h-fit sticky top-8"> <h2 class="text-xl font-semibold mb-4 text-gray-800">Create Your Ebook</h2> <form id="ebookForm" class="space-y-4"> <div> <label for="ebookTitle" class="block text-sm font-medium text-gray-700 mb-1">Ebook Title</label> <input type="text" id="ebookTitle" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Enter ebook title" required> </div> <div> <label for="ebookTopic" class="block text-sm font-medium text-gray-700 mb-1">Main Topic</label> <input type="text" id="ebookTopic" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="e.g. Digital Marketing" required> </div> <div> <label for="ebookKeywords" class="block text-sm font-medium text-gray-700 mb-1">Keywords (comma separated)</label> <textarea id="ebookKeywords" rows="3" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="SEO, content marketing, social media"></textarea> </div> <div> <label for="ebookSummary" class="block text-sm font-medium text-gray-700 mb-1">Brief Summary</label> <textarea id="ebookSummary" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Describe what your ebook should cover"></textarea> </div> <div> <label for="chapterCount" class="block text-sm font-medium text-gray-700 mb-1">Number of Chapters</label> <select id="chapterCount" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option value="5">5 Chapters</option> <option value="7" selected>7 Chapters</option> <option value="10">10 Chapters</option> <option value="12">12 Chapters</option> </select> </div> <div> <label for="writingStyle" class="block text-sm font-medium text-gray-700 mb-1">Writing Style</label> <select id="writingStyle" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option value="professional">Professional</option> <option value="casual">Casual</option> <option value="academic">Academic</option> <option value="storytelling">Storytelling</option> </select> </div> <div class="pt-2"> <button type="submit" id="generateBtn" class="w-full gradient-bg text-white py-3 px-6 rounded-lg font-medium hover:opacity-90 transition duration-300 flex items-center justify-center"> <i class="fas fa-magic mr-2"></i> Generate Ebook </button> </div> </form> </div> <!-- Ebook Preview --> <div class="lg:col-span-2"> <div class="bg-white rounded-xl shadow-md overflow-hidden"> <div class="p-6 border-b border-gray-200"> <h2 class="text-xl font-semibold text-gray-800">Ebook Preview</h2> <p class="text-sm text-gray-500">Your generated content will appear here</p> </div> <div id="ebookPreview" class="ebook-preview p-8"> <div id="emptyState" class="flex flex-col items-center justify-center h-full text-center py-20"> <i class="fas fa-book-reader text-6xl text-gray-300 mb-4"></i> <h3 class="text-xl font-medium text-gray-500 mb-2">No Ebook Generated Yet</h3> <p class="text-gray-400 max-w-md">Fill out the form and click "Generate Ebook" to create your custom content.</p> </div> <div id="loadingState" class="hidden flex-col items-center justify-center h-full text-center py-20"> <div class="animate-pulse mb-4"> <div class="h-12 w-12 bg-blue-200 rounded-full"></div> </div> <h3 class="text-xl font-medium text-gray-600 mb-2">Generating your ebook<span class="loading-dots"></span></h3> <p class="text-gray-500">This may take a few moments</p> </div> <div id="ebookContent" class="hidden"> <div class="flex justify-between items-center mb-8"> <div> <h1 id="previewTitle" class="text-3xl font-bold text-gray-800 mb-2"></h1> <p id="previewSubtitle" class="text-lg text-gray-600"></p> </div> <div class="bg-blue-100 text-blue-800 px-4 py-2 rounded-full text-sm font-medium"> <i class="fas fa-clock mr-1"></i> <span id="generatedTime"></span> </div> </div> <div class="mb-10"> <h2 class="text-xl font-semibold text-gray-700 mb-3">Table of Contents</h2> <div id="tocList" class="space-y-2 border-l-2 border-blue-200 pl-4"></div> </div> <div id="chaptersContainer" class="space-y-12"></div> <div class="mt-12 pt-8 border-t border-gray-200"> <div class="flex justify-between items-center"> <div> <h3 class="font-medium text-gray-700">Your ebook is ready!</h3> <p class="text-sm text-gray-500">Download or continue editing</p> </div> <div class="space-x-3"> <button class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition"> <i class="fas fa-edit mr-1"></i> Edit </button> <button onclick="showTab('export')" class="px-4 py-2 gradient-bg text-white rounded-lg hover:opacity-90 transition"> <i class="fas fa-download mr-1"></i> Export Options </button> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!-- Export Tab --> <div id="export-tab" class="tab-content"> <div class="max-w-6xl mx-auto"> <div class="bg-white rounded-xl shadow-md overflow-hidden"> <div class="p-6 border-b border-gray-200"> <h2 class="text-2xl font-semibold text-gray-800">Export Your Ebook</h2> <p class="text-sm text-gray-500">Choose from multiple formats optimized for different platforms</p> </div> <div class="p-6"> <!-- Format Selection --> <div class="mb-8"> <h3 class="text-lg font-medium text-gray-800 mb-4">Available Formats</h3> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> <!-- PDF Format --> <div class="format-card bg-white p-5 rounded-lg border border-gray-200 shadow-sm cursor-pointer" onclick="selectFormat('pdf')"> <div class="flex items-center mb-3"> <div class="bg-red-100 p-3 rounded-full mr-3"> <i class="fas fa-file-pdf text-red-600 text-xl"></i> </div> <div> <h4 class="font-bold text-gray-800">PDF</h4> <p class="text-xs text-gray-500">Standard format</p> </div> </div> <p class="text-sm text-gray-600 mb-3">Universal format that works on all devices and maintains formatting.</p> <div class="text-xs text-gray-500 requirement-item mb-1">Fixed layout</div> <div class="text-xs text-gray-500 requirement-item mb-1">Print-ready</div> <div class="text-xs text-gray-500 requirement-item">DRM support</div> </div> <!-- EPUB Format --> <div class="format-card bg-white p-5 rounded-lg border border-gray-200 shadow-sm cursor-pointer" onclick="selectFormat('epub')"> <div class="flex items-center mb-3"> <div class="bg-blue-100 p-3 rounded-full mr-3"> <i class="fas fa-book-open text-blue-600 text-xl"></i> </div> <div> <h4 class="font-bold text-gray-800">EPUB</h4> <p class="text-xs text-gray-500">E-reader optimized</p> </div> </div> <p class="text-sm text-gray-600 mb-3">Reflowable format perfect for Kindle, Kobo, and other e-readers.</p> <div class="text-xs text-gray-500 requirement-item mb-1">Responsive layout</div> <div class="text-xs text-gray-500 requirement-item mb-1">Metadata support</div> <div class="text-xs text-gray-500 requirement-item">Accessibility features</div> </div> <!-- MOBI Format --> <div class="format-card bg-white p-5 rounded-lg border border-gray-200 shadow-sm cursor-pointer" onclick="selectFormat('mobi')"> <div class="flex items-center mb-3"> <div class="bg-yellow-100 p-3 rounded-full mr-3"> <i class="fab fa-amazon text-yellow-600 text-xl"></i> </div> <div> <h4 class="font-bold text-gray-800">MOBI</h4> <p class="text-xs text-gray-500">Amazon Kindle</p> </div> </div> <p class="text-sm text-gray-600 mb-3">Specialized format for Amazon Kindle Direct Publishing (KDP).</p> <div class="text-xs text-gray-500 requirement-item mb-1">Kindle compatible</div> <div class="text-xs text-gray-500 requirement-item mb-1">KDP requirements</div> <div class="text-xs text-gray-500 requirement-item">Fixed/Reflowable</div> </div> <!-- HTML Format --> <div class="format-card bg-white p-5 rounded-lg border border-gray-200 shadow-sm cursor-pointer" onclick="selectFormat('html')"> <div class="flex items-center mb-3"> <div class="bg-green-100 p-3 rounded-full mr-3"> <i class="fab fa-html5 text-green-600 text-xl"></i> </div> <div> <h4 class="font-bold text-gray-800">HTML</h4> <p class="text-xs text-gray-500">Web format</p> </div> </div> <p class="text-sm text-gray-600 mb-3">Perfect for selling directly on your website or blog.</p> <div class="text-xs text-gray-500 requirement-item mb-1">Web responsive</div> <div class="text-xs text-gray-500 requirement-item mb-1">SEO optimized</div> <div class="text-xs text-gray-500 requirement-item">Embeddable</div> </div> <!-- DOCX Format --> <div class="format-card bg-white p-5 rounded-lg border border-gray-200 shadow-sm cursor-pointer" onclick="selectFormat('docx')"> <div class="flex items-center mb-3"> <div class="bg-indigo-100 p-3 rounded-full mr-3"> <i class="fas fa-file-word text-indigo-600 text-xl"></i> </div> <div> <h4 class="font-bold text-gray-800">DOCX</h4> <p class="text-xs text-gray-500">Editable format</p> </div> </div> <p class="text-sm text-gray-600 mb-3">Microsoft Word format for further editing and customization.</p> <div class="text-xs text-gray-500 requirement-item mb-1">Editable</div> <div class="text-xs text-gray-500 requirement-item mb-1">Track changes</div> <div class="text-xs text-gray-500 requirement-item">Comments</div> </div> <!-- Plain Text --> <div class="format-card bg-white p-5 rounded-lg border border-gray-200 shadow-sm cursor-pointer" onclick="selectFormat('txt')"> <div class="flex items-center mb-3"> <div class="bg-gray-100 p-3 rounded-full mr-3"> <i class="fas fa-file-alt text-gray-600 text-xl"></i> </div> <div> <h4 class="font-bold text-gray-800">Plain Text</h4> <p class="text-xs text-gray-500">Minimal format</p> </div> </div> <p class="text-sm text-gray-600 mb-3">Simple text format for maximum compatibility and minimal styling.</p> <div class="text-xs text-gray-500 requirement-item mb-1">Universal</div> <div class="text-xs text-gray-500 requirement-item mb-1">Lightweight</div> <div class="text-xs text-gray-500 requirement-item">No formatting</div> </div> </div> </div> <!-- Selected Format Options --> <div id="formatOptions" class="hidden bg-gray-50 p-6 rounded-lg mb-8"> <div class="flex justify-between items-center mb-4"> <h3 class="text-lg font-medium text-gray-800">Export as <span id="selectedFormatName" class="font-bold"></span></h3> <button onclick="resetFormatSelection()" class="text-sm text-gray-500 hover:text-gray-700"> <i class="fas fa-times mr-1"></i> Change format </button> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <!-- Format Settings --> <div> <h4 class="font-medium text-gray-700 mb-3">Format Settings</h4> <div id="pdfOptions" class="space-y-4"> <div> <label class="block text-sm text-gray-600 mb-1">Page Size</label> <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>A4 (210 × 297 mm)</option> <option>Letter (8.5 × 11 in)</option> <option>5.5 × 8.5 in</option> <option>6 × 9 in</option> </select> </div> <div> <label class="block text-sm text-gray-600 mb-1">Orientation</label> <div class="flex space-x-4"> <label class="flex items-center"> <input type="radio" name="orientation" checked class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Portrait</span> </label> <label class="flex items-center"> <input type="radio" name="orientation" class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Landscape</span> </label> </div> </div> <div> <label class="block text-sm text-gray-600 mb-1">Margins (mm)</label> <div class="grid grid-cols-4 gap-2"> <div> <label class="block text-xs text-gray-500 mb-1">Top</label> <input type="number" value="20" class="w-full px-3 py-1 border border-gray-300 rounded-lg"> </div> <div> <label class="block text-xs text-gray-500 mb-1">Bottom</label> <input type="number" value="20" class="w-full px-3 py-1 border border-gray-300 rounded-lg"> </div> <div> <label class="block text-xs text-gray-500 mb-1">Left</label> <input type="number" value="15" class="w-full px-3 py-1 border border-gray-300 rounded-lg"> </div> <div> <label class="block text-xs text-gray-500 mb-1">Right</label> <input type="number" value="15" class="w-full px-3 py-1 border border-gray-300 rounded-lg"> </div> </div> </div> </div> <div id="epubOptions" class="space-y-4 hidden"> <div> <label class="block text-sm text-gray-600 mb-1">EPUB Version</label> <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>EPUB 3 (recommended)</option> <option>EPUB 2 (compatibility)</option> </select> </div> <div> <label class="block text-sm text-gray-600 mb-1">Layout</label> <div class="flex space-x-4"> <label class="flex items-center"> <input type="radio" name="epubLayout" checked class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Reflowable</span> </label> <label class="flex items-center"> <input type="radio" name="epubLayout" class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Fixed Layout</span> </label> </div> </div> <div> <label class="block text-sm text-gray-600 mb-1">Include</label> <div class="space-y-2"> <label class="flex items-center"> <input type="checkbox" checked class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Table of Contents</span> </label> <label class="flex items-center"> <input type="checkbox" checked class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Cover Image</span> </label> <label class="flex items-center"> <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">DRM Protection</span> </label> </div> </div> </div> <div id="mobiOptions" class="space-y-4 hidden"> <div> <label class="block text-sm text-gray-600 mb-1">Kindle Format</label> <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>KF8 (recommended)</option> <option>MOBI (legacy)</option> <option>Dual Format</option> </select> </div> <div> <label class="block text-sm text-gray-600 mb-1">Kindle Features</label> <div class="space-y-2"> <label class="flex items-center"> <input type="checkbox" checked class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Enhanced Typesetting</span> </label> <label class="flex items-center"> <input type="checkbox" checked class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Page Flip</span> </label> <label class="flex items-center"> <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500"> <span class="ml-2 text-gray-700">Whispersync</span> </label> </div> </div> <div> <label class="block text-sm text-gray-600 mb-1">KDP Requirements</label> <div class="bg-yellow-50 border border-yellow-200 rounded p-3"> <p class="text-xs text-yellow-700">Make sure your ebook meets all <a href="#" class="underline">Kindle Direct Publishing requirements</a> before uploading.</p> </div> </div> </div> </div> <!-- Platform Requirements --> <div> <h4 class="font-medium text-gray-700 mb-3">Platform Requirements</h4> <div id="platformRequirements" class="space-y-4"> <div class="bg-white p-4 rounded-lg border border-gray-200"> <h5 class="font-medium text-gray-700 mb-2">Amazon KDP</h5> <div class="text-xs text-gray-500 requirement-item mb-1">Cover image (2560×1600px min)</div> <div class="text-xs text-gray-500 requirement-item mb-1">Table of Contents</div> <div class="text-xs text-gray-500 requirement-item">Valid ISBN (optional)</div> </div> <div class="bg-white p-4 rounded-lg border border-gray-200"> <h5 class="font-medium text-gray-700 mb-2">Apple Books</h5> <div class="text-xs text-gray-500 requirement-item mb-1">EPUB 3 format</div> <div class="text-xs text-gray-500 requirement-item mb-1">High-res cover</div> <div class="text-xs text-gray-500 requirement-item">Metadata complete</div> </div> <div class="bg-white p-4 rounded-lg border border-gray-200"> <h5 class="font-medium text-gray-700 mb-2">Kobo Writing Life</h5> <div class="text-xs text-gray-500 requirement-item mb-1">EPUB or PDF</div> <div class="text-xs text-gray-500 requirement-item mb-1">Cover image (1400×1873px)</div> <div class="text-xs text-gray-500 requirement-item">DRM options</div> </div> </div> <div class="mt-6"> <label class="block text-sm text-gray-600 mb-2">Metadata</label> <div class="bg-white p-4 rounded-lg border border-gray-200"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-xs text-gray-500 mb-1">Title</label> <input type="text" class="w-full px-3 py-1 border border-gray-300 rounded-lg" value="My Awesome Ebook"> </div> <div> <label class="block text-xs text-gray-500 mb-1">Author</label> <input type="text" class="w-full px-3 py-1 border border-gray-300 rounded-lg" value="John Doe"> </div> <div> <label class="block text-xs text-gray-500 mb-1">ISBN</label> <input type="text" class="w-full px-3 py-1 border border-gray-300 rounded-lg" placeholder="Optional"> </div> <div> <label class="block text-xs text-gray-500 mb-1">Language</label> <select class="w-full px-3 py-1 border border-gray-300 rounded-lg"> <option>English</option> <option>Portuguese</option> <option>Spanish</option> </select> </div> </div> </div> </div> </div> </div> <div class="mt-6 flex justify-between items-center"> <div> <label class="block text-sm text-gray-600 mb-1">Cover Image</label> <div class="flex items-center"> <div class="w-16 h-16 bg-gray-200 rounded flex items-center justify-center mr-3"> <i class="fas fa-image text-gray-400"></i> </div> <button class="text-sm text-blue-600 hover:text-blue-800"> <i class="fas fa-upload mr-1"></i> Upload Cover </button> </div> </div> <div class="flex space-x-3"> <button class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition"> <i class="fas fa-eye mr-1"></i> Preview </button> <button id="exportBtn" class="px-4 py-2 gradient-bg text-white rounded-lg hover:opacity-90 transition"> <i class="fas fa-file-export mr-1"></i> Export Now </button> </div> </div> </div> <!-- Export Progress --> <div id="exportProgress" class="hidden bg-white p-6 rounded-lg border border-gray-200"> <div class="flex items-center mb-4"> <div class="bg-green-100 p-2 rounded-full mr-3"> <i class="fas fa-file-export text-green-600"></i> </div> <div> <h3 class="font-medium text-gray-800">Exporting as <span id="exportingFormat" class="font-bold"></span></h3> <p class="text-sm text-gray-500">Your ebook is being prepared for download</p> </div> </div> <div class="mb-3"> <div class="progress-bar"> <div id="progressFill" class="progress-fill" style="width: 0%"></div> </div> </div> <div class="flex justify-between text-xs text-gray-500 mb-6"> <span>Preparing files...</span> <span id="progressPercent">0%</span> </div> <div class="bg-blue-50 border border-blue-200 rounded-lg p-4"> <div class="flex items-start"> <div class="bg-blue-100 p-2 rounded-full mr-3"> <i class="fas fa-info-circle text-blue-600"></i> </div> <div> <h4 class="font-medium text-blue-800 mb-1">Your ebook is almost ready!</h4> <p class="text-sm text-blue-600">While you wait, consider these next steps to sell your ebook:</p> <ul class="list-disc list-inside text-xs text-blue-600 mt-2 space-y-1"> <li>Upload to Amazon KDP for global distribution</li> <li>Create a sales page on your website</li> <li>Set up email automation for delivery</li> </ul> </div> </div> </div> </div> <!-- Export Complete --> <div id="exportComplete" class="hidden bg-white p-6 rounded-lg border border-gray-200"> <div class="flex items-center mb-4"> <div class="bg-green-100 p-2 rounded-full mr-3"> <i class="fas fa-check-circle text-green-600"></i> </div> <div> <h3 class="font-medium text-gray-800">Export Complete!</h3> <p class="text-sm text-gray-500">Your ebook is ready to download</p> </div> </div> <div class="mb-6"> <div class="progress-bar"> <div class="progress-fill" style="width: 100%"></div> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div class="bg-gray-50 p-4 rounded-lg border border-gray-200"> <h4 class="font-medium text-gray-700 mb-2">Download Options</h4> <div class="space-y-2"> <button class="w-full text-left px-4 py-2 bg-white border border-gray-200 rounded-lg hover:bg-gray-100 transition"> <i class="fas fa-download mr-2 text-blue-600"></i> Download Now </button> <button class="w-full text-left px-4 py-2 bg-white border border-gray-200 rounded-lg hover:bg-gray-100 transition"> <i class="fas fa-envelope mr-2 text-blue-600"></i> Email to Me </button> <button class="w-full text-left px-4 py-2 bg-white border border-gray-200 rounded-lg hover:bg-gray-100 transition"> <i class="fas fa-cloud-upload-alt mr-2 text-blue-600"></i> Upload to Cloud </button> </div> </div> <div class="bg-gray-50 p-4 rounded-lg border border-gray-200"> <h4 class="font-medium text-gray-700 mb-2">Next Steps</h4> <div class="space-y-3"> <div class="flex items-center"> <div class="bg-blue-100 p-1 rounded-full mr-2"> <i class="fas fa-store text-blue-600 text-xs"></i> </div> <span class="text-sm text-gray-600">Publish on Amazon KDP</span> </div> <div class="flex items-center"> <div class="bg-purple-100 p-1 rounded-full mr-2"> <i class="fas fa-globe text-purple-600 text-xs"></i> </div> <span class="text-sm text-gray-600">Create a sales page</span> </div> <div class="flex items-center"> <div class="bg-green-100 p-1 rounded-full mr-2"> <i class="fas fa-envelope text-green-600 text-xs"></i> </div> <span class="text-sm text-gray-600">Set up email delivery</span> </div> </div> </div> </div> <div class="mt-6 flex justify-end"> <button onclick="resetExportProcess()" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition"> <i class="fas fa-redo mr-1"></i> Export Another </button> </div> </div> </div> </div> </div> </div> <!-- API Settings Tab --> <div id="api-settings-tab" class="tab-content"> <div class="max-w-4xl mx-auto"> <div class="bg-white rounded-xl shadow-md overflow-hidden"> <div class="p-6 border-b border-gray-200"> <h2 class="text-2xl font-semibold text-gray-800">API Configuration</h2> <p class="text-sm text-gray-500">Connect to different AI services and customize generation parameters</p> </div> <div class="p-6"> <!-- API Connection Status --> <div class="bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6"> <div class="flex items-center"> <div class="api-status connected"></div> <span class="font-medium text-blue-800">Connected to Free Tier API</span> </div> <p class="text-sm text-blue-600 mt-1">You're using our free community API endpoint with limited requests.</p> </div> <!-- Quick Start Section --> <div class="mb-8"> <h3 class="text-lg font-medium text-gray-800 mb-3">Quick Start</h3> <div class="bg-gray-50 p-4 rounded-lg"> <p class="text-sm text-gray-600 mb-4">You can start generating ebooks immediately with our free community API. No configuration needed!</p> <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> <div class="bg-white p-4 rounded-lg border border-gray-200"> <div class="flex items-center mb-2"> <i class="fas fa-bolt text-yellow-500 mr-2"></i> <h4 class="font-medium">Instant Access</h4> </div> <p class="text-xs text-gray-600">Start generating immediately</p> </div> <div class="bg-white p-4 rounded-lg border border-gray-200"> <div class="flex items-center mb-2"> <i class="fas fa-tachometer-alt text-blue-500 mr-2"></i> <h4 class="font-medium">3 RPM Limit</h4> </div> <p class="text-xs text-gray-600">3 requests per minute</p> </div> <div class="bg-white p-4 rounded-lg border border-gray-200"> <div class="flex items-center mb-2"> <i class="fas fa-robot text-green-500 mr-2"></i> <h4 class="font-medium">GPT-3.5 Turbo</h4> </div> <p class="text-xs text-gray-600">Basic AI model</p> </div> </div> </div> </div> <!-- Advanced Parameters --> <div class="mb-8"> <h3 class="text-lg font-medium text-gray-800 mb-3">Generation Parameters</h3> <div class="bg-gray-50 p-4 rounded-lg"> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <!-- Language Settings --> <div> <h4 class="font-medium text-gray-700 mb-2">Language Settings</h4> <div class="space-y-3"> <div> <label class="block text-sm text-gray-600 mb-1">Content Language</label> <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>English</option> <option>Portuguese</option> <option>Spanish</option> <option>French</option> <option>German</option> <option>Italian</option> </select> </div> <div> <label class="block text-sm text-gray-600 mb-1">Target Audience</label> <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>Global</option> <option>Brazil</option> <option>United States</option> <option>Europe</option> <option>Latin America</option> </select> </div> </div> </div> <!-- Tone and Style --> <div> <h4 class="font-medium text-gray-700 mb-2">Tone & Style</h4> <div class="space-y-3"> <div> <label class="block text-sm text-gray-600 mb-1">Writing Tone</label> <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>Professional</option> <option>Friendly</option> <option>Academic</option> <option>Conversational</option> <option>Authoritative</option> </select> </div> <div> <label class="block text-sm text-gray-600 mb-1">Content Formality</label> <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>Medium</option> <option>Very Formal</option> <option>Formal</option> <option>Casual</option> <option>Very Casual</option> </select> </div> </div> </div> <!-- Content Parameters --> <div> <h4 class="font-medium text-gray-700 mb-2">Content Parameters</h4> <div class="space-y-3"> <div> <label class="block text-sm text-gray-600 mb-1">Creativity Level</label> <input type="range" min="0" max="100" value="70" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"> <div class="flex justify-between text-xs text-gray-500"> <span>Factual</span> <span>Balanced</span> <span>Creative</span> </div> </div> <div> <label class="block text-sm text-gray-600 mb-1">Content Length</label> <input type="range" min="0" max="100" value="50" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"> <div class="flex justify-between text-xs text-gray-500"> <span>Concise</span> <span>Medium</span> <span>Detailed</span> </div> </div> </div> </div> <!-- Visual Elements --> <div> <h4 class="font-medium text-gray-700 mb-2">Visual Elements</h4> <div class="space-y-3"> <div class="flex items-center justify-between"> <label class="block text-sm text-gray-600">Include Images</label> <div class="relative inline-block w-10 mr-2 align-middle select-none"> <input type="checkbox" id="includeImages" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/> <label for="includeImages" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label> </div> </div> <div class="flex items-center justify-between"> <label class="block text-sm text-gray-600">Include Diagrams</label> <div class="relative inline-block w-10 mr-2 align-middle select-none"> <input type="checkbox" id="includeDiagrams" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/> <label for="includeDiagrams" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label> </div> </div> <div> <label class="block text-sm text-gray-600 mb-1">Image Style</label> <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> <option>Photorealistic</option> <option>Illustration</option> <option>Minimalist</option> <option>3D Render</option> </select> </div> </div> </div> </div> <div class="mt-6"> <button class="gradient-bg text-white py-2 px-6 rounded-lg hover:opacity-90 transition"> <i class="fas fa-save mr-2"></i> Save Parameters </button> </div> </div> </div> <!-- Premium Upgrade Section --> <div> <h3 class="text-lg font-medium text-gray-800 mb-3">Upgrade for More Features</h3> <div class="bg-gradient-to-r from-blue-50 to-purple-50 p-6 rounded-lg border border-blue-100"> <div class="flex flex-col md:flex-row items-center"> <div class="md:w-2/3 mb-4 md:mb-0"> <h4 class="font-bold text-lg text-gray-800 mb-1">Unlock Premium Features</h4> <p class="text-sm text-gray-600">Get higher limits, better models, and advanced customization options with our premium plans.</p> </div> <div class="md:w-1/3 flex justify-end"> <button class="gradient-bg text-white py-2 px-6 rounded-lg hover:opacity-90 transition"> View Plans </button> </div> </div> </div> </div> </div> </div> </div> </div> </main> </div> <script> // Tab switching functionality function showTab(tabName) { document.querySelectorAll('.tab-content').forEach(tab => { tab.classList.remove('active'); }); document.getElementById(`${tabName}-tab`).classList.add('active'); } // Ebook generation functionality document.getElementById('ebookForm').addEventListener('submit', function(e) { e.preventDefault(); generateEbook(); }); function generateEbook() { // Show loading state document.getElementById('emptyState').classList.add('hidden'); document.getElementById('ebookContent').classnelist.add('hidden'); document.getElementById('loadingState').classList.remove('hidden'); // Get form values const title = document.getElementById('ebookTitle').value; const topic = document.getElementById('ebookTopic').value; const keywords = document.getElementById('ebookKeywords').value; const summary = document.getElementById('ebookSummary').value; const chapterCount = parseInt(document.getElementById('chapterCount').value); const writingStyle = document.getElementById('writingStyle').value; // Simulate API call with timeout setTimeout(() => { // Hide loading state document.getElementById('loadingState').classList.add('hidden'); // Generate ebook content const ebookData = generateMockEbook(title, topic, keywords, summary, chapterCount, writingStyle); // Display the generated ebook displayEbook(ebookData); // Show content document.getElementById('ebookContent').classList.remove('hidden'); }, 3000); } function generateMockEbook(title, topic, keywords, summary, chapterCount, style) { const styles = { professional: "This comprehensive guide provides professional insights", casual: "This friendly guide walks you through", academic: "This scholarly examination presents", storytelling: "Let me tell you the story of" }; const subtitle = `${styles[style]} ${topic.toLowerCase()}.`; // Generate chapters const chapters = []; const toc = []; for (let i = 1; i <= chapterCount; i++) { const chapterTitle = generateChapterTitle(topic, i, chapterCount); const chapterContent = generateChapterContent(topic, keywords, i, chapterCount, style); chapters.push({ title: chapterTitle, content: chapterContent }); toc.push({ title: chapterTitle, id: `chapter-${i}` }); } return { title, subtitle, toc, chapters, generatedAt: new Date().toLocaleString() }; } function generateChapterTitle(topic, index, total) { const prefixes = [ "Introduction to", "The Fundamentals of", "Advanced Techniques in", "Practical Applications of", "Case Studies in", "Future Trends in", "Best Practices for", "Common Mistakes in", "Tools and Resources for", "Getting Started with" ]; const suffixes = [ "Explained", "Demystified", "Uncovered", "Revealed", "Made Simple", "for Beginners", "for Professionals", "in Practice", "in the Real World", "and Beyond" ]; // Use more specific prefixes for later chapters const prefix = index === 1 ? prefixes[0] : index === total ? prefixes[5] : prefixes[Math.min(index, prefixes.length - 1)]; const suffix = suffixes[Math.floor(Math.random() * suffixes.length)]; return `${prefix} ${topic} ${suffix}`; } function generateChapterContent(topic, keywords, index, total, style) { const keywordList = keywords.split(',').map(k => k.trim()).filter(k => k.length > 0); const paragraphs = []; const paragraphCount = 3 + Math.floor(Math.random() * 3); // 3-5 paragraphs for (let i = 0; i < paragraphCount; i++) { let paragraph = ""; // First paragraph introduces the chapter if (i === 0) { paragraph = `In this chapter, we ${style === 'academic' ? 'examine' : style === 'professional' ? 'explore' : 'look at'} `; paragraph += `the ${index === 1 ? 'basic concepts' : index === total ? 'future implications' : 'key aspects'} `; paragraph += `of ${topic.toLowerCase()}. `; if (keywordList.length > 0) { paragraph += `Particular focus will be given to ${keywordList.join(', ')}. `; } } // Middle paragraphs provide content else { const concepts = [ "This approach has been shown to produce significant results", "Many experts agree that this method is effective", "Recent studies have demonstrated the value of this technique", "When implemented correctly, this strategy can yield benefits", "Organizations that adopt this practice often see improvements", "The data clearly supports the effectiveness of this solution" ]; const examples = [ "For example, a recent case study showed", "Consider how this applies to a typical scenario", "To illustrate this point, imagine a situation where", "A practical example of this would be", "This can be seen in the way that", "We can observe this in action when" ]; const transitions = [ "Building on this concept,", "Taking this a step further,", "In addition to this,", "Furthermore,", "Another important consideration is", "It's also worth noting that" ]; if (i === 1) { paragraph = concepts[Math.floor(Math.random() * concepts.length)] + ". "; paragraph += examples[Math.floor(Math.random() * examples.length)] + " "; paragraph += "this leads to measurable outcomes. "; } else { paragraph = transitions[Math.floor(Math.random() * transitions.length)] + " "; paragraph += concepts[Math.floor(Math.random() * concepts.length)].toLowerCase() + ". "; if (Math.random() > 0.3) { paragraph += examples[Math.floor(Math.random() * examples.length)] + " "; paragraph += "the results speak for themselves. "; } } } // Add some keywords if available if (keywordList.length > 0 && Math.random() > 0.5) { const keyword = keywordList[Math.floor(Math.random() * keywordList.length)]; paragraph += `The role of ${keyword} in this process cannot be overstated. `; } paragraphs.push(paragraph); } // Add a concluding paragraph let conclusion = ""; if (index === 1) { conclusion = "This chapter has introduced the fundamental concepts that will be explored in more depth throughout this ebook. "; } else if (index === total) { conclusion = "In conclusion, this chapter has summarized the key takeaways and looked ahead to future developments in the field. "; } else { conclusion = "The insights from this chapter provide a solid foundation for understanding the more advanced topics that follow. "; } conclusion += "In the next chapter, we will " + (index === total ? "summarize all the key lessons from this ebook." : `explore ${index === total - 1 ? "the final aspects" : "more advanced concepts"} of ${topic.toLowerCase()}.`); paragraphs.push(conclusion); return paragraphs; } function displayEbook(ebookData) { // Set title and metadata document.getElementById('previewTitle').textContent = ebookData.title; document.getElementById('previewSubtitle').textContent = ebookData.subtitle; document.getElementById('generatedTime').textContent = `Generated ${ebookData.generatedAt}`; // Generate table of contents const tocList = document.getElementById('tocList'); tocList.innerHTML = ''; ebookData.toc.forEach((item, index) => { const tocItem = document.createElement('div'); tocItem.className = 'chapter-item transition duration-200'; tocItem.innerHTML = ` <a href="#${item.id}" class="flex items-center text-blue-600 hover:text-blue-800"> <span class="w-6 text-gray-500 font-medium">${index + 1}.</span> <span>${item.title}</span> </a> `; tocList.appendChild(tocItem); }); // Generate chapters const chaptersContainer = document.getElementById('chaptersContainer'); chaptersContainer.innerHTML = ''; ebookData.chapters.forEach((chapter, index) => { const chapterElement = document.createElement('div'); chapterElement.id = `chapter-${index + 1}`; chapterElement.className = 'chapter'; let chapterHTML = ` <div class="mb-6"> <div class="flex items-center mb-4"> <span class="bg-blue-100 text-blue-800 font-bold rounded-full w-8 h-8 flex items-center justify-center mr-3">${index + 1}</span> <h2 class="text-2xl font-bold text-gray-800">${chapter.title}</h2> </div> `; chapter.content.forEach(paragraph => { chapterHTML += `<p class="text-gray-700 mb-4">${paragraph}</p>`; }); chapterHTML += `</div>`; chapterElement.innerHTML = chapterHTML; chaptersContainer.appendChild(chapterElement); }); } // Export functionality function selectFormat(format) { document.getElementById('formatOptions').classList.remove('hidden'); document.getElementById('selectedFormatName').textContent = format.toUpperCase(); // Hide all format options document.querySelectorAll('#formatOptions > div > div[id$="Options"]').forEach(el => { el.classList.add('hidden'); }); // Show selected format options document.getElementById(`${format}Options`).classList.remove('hidden'); } function resetFormatSelection() { document.getElementById('formatOptions').classList.add('hidden'); } document.getElementById('exportBtn').addEventListener('click', function() { document.getElementById('formatOptions').classList.add('hidden'); document.getElementById('exportProgress').classList.remove('hidden'); document.getElementById('exportingFormat').textContent = document.getElementById('selectedFormatName').textContent; // Simulate export progress let progress = 0; const progressInterval = setInterval(() => { progress += Math.floor(Math.random() * 10) + 5; if (progress > 100) progress = 100; document.getElementById('progressFill').style.width = `${progress}%`; document.getElementById('progressPercent').textContent = `${progress}%`; if (progress === 100) { clearInterval(progressInterval); setTimeout(() => { document.getElementById('exportProgress').classList.add('hidden'); document.getElementById('exportComplete').classList.remove('hidden'); }, 500); } }, 300); }); function resetExportProcess() { document.getElementById('exportComplete').classList.add('hidden'); document.getElementById('formatOptions').classList.remove('hidden'); } // Initialize toggle switches document.addEventListener('DOMContentLoaded', function() { const toggleCheckboxes = document.querySelectorAll('.toggle-checkbox'); toggleCheckboxes.forEach(checkbox => { checkbox.addEventListener('change', function() { const label = this.nextElementSibling; if (this.checked) { label.classList.remove('bg-gray-300'); label.classList.add('bg-blue-500'); } else { label.classList.remove('bg-blue-500'); label.classList.add('bg-gray-300'); } }); }); }); </script> <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=amwolf36/de" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Ebook Generator</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #6b73ff 0%, #000dff 100%);
}
.ebook-preview {
min-height: 500px;
background: linear-gradient(to bottom, #f8fafc, #e2e8f0);
}
.chapter-item:hover {
transform: translateX(5px);
}
.loading-dots:after {
content: '.';
animation: dots 1.5s steps(5, end) infinite;
}
@keyframes dots {
0%, 20% { content: '.'; }
40% { content: '..'; }
60% { content: '...'; }
80%, 100% { content: ''; }
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.plan-card {
transition: all 0.3s ease;
}
.plan-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.premium-badge {
position: absolute;
top: -10px;
right: -10px;
background: linear-gradient(45deg, #ff9500, #ff5e00);
color: white;
padding: 3px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: bold;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.api-status {
width: 10px;
height: 10px;
border-radius: 50%;
display: inline-block;
margin-right: 5px;
}
.api-status.connected {
background-color: #10B981;
}
.api-status.disconnected {
background-color: #EF4444;
}
.toggle-checkbox:checked {
right: 0;
border-color: #3B82F6;
}
.toggle-checkbox:checked + .toggle-label {
background-color: #3B82F6;
}
.format-card {
transition: all 0.2s ease;
border-left: 4px solid transparent;
}
.format-card:hover {
transform: translateY(-3px);
border-left-color: #3B82F6;
}
.requirement-item {
position: relative;
padding-left: 20px;
}
.requirement-item:before {
content: "•";
position: absolute;
left: 0;
color: #3B82F6;
font-weight: bold;
}
.progress-bar {
height: 6px;
border-radius: 3px;
background-color: #e2e8f0;
}
.progress-fill {
height: 100%;