This commit is contained in:
Flatlogic Bot 2025-12-01 04:45:28 +00:00
parent e87822db43
commit 1fddc19e3b
14 changed files with 1423 additions and 286 deletions

32
admin/cron.php Normal file
View File

@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
require_once __DIR__ . '/../db/config.php';
try {
$pdo = db();
$stmt = $pdo->prepare("SELECT `id`, `filename` FROM `published_pages` WHERE `expires_at` < NOW()");
$stmt->execute();
$expired_pages = $stmt->fetchAll();
$deleted_count = 0;
foreach ($expired_pages as $page) {
$filepath = __DIR__ . '/../published/' . $page['filename'];
if (file_exists($filepath)) {
unlink($filepath);
}
$delete_stmt = $pdo->prepare("DELETE FROM `published_pages` WHERE `id` = ?");
$delete_stmt->execute([$page['id']]);
$deleted_count++;
}
echo "Expired pages cleanup completed. $deleted_count pages deleted.\n";
} catch (PDOException $e) {
error_log("DB Error: " . $e->getMessage());
die("An error occurred during cleanup.\n");
}

View File

@ -0,0 +1,4 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="32" cy="32" r="30" fill="#4285F4"/>
<text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="Arial, sans-serif" font-size="32" fill="white">G</text>
</svg>

After

Width:  |  Height:  |  Size: 290 B

20
db/setup.php Normal file
View File

@ -0,0 +1,20 @@
<?php
require_once __DIR__ . '/config.php';
try {
$pdo = db();
$sql = <<<SQL
CREATE TABLE IF NOT EXISTS `published_pages` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`filename` VARCHAR(255) NOT NULL UNIQUE,
`management_token` VARCHAR(255) NOT NULL UNIQUE,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`expires_at` TIMESTAMP NOT NULL
);
SQL;
$pdo->exec($sql);
echo "Table `published_pages` created successfully or already exists.\n";
} catch (PDOException $e) {
die("DB ERROR: " . $e->getMessage());
}

302
editor_13d84da0257b8680.php Normal file
View File

@ -0,0 +1,302 @@
<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
require_once 'templates/data.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['action'] === 'download') {
// (The download logic remains the same)
// Sanitize and retrieve POST data
$title = htmlspecialchars($_POST['title'] ?? 'Your Awesome Ebook Title');
$description = htmlspecialchars($_POST['description'] ?? 'A compelling description...');
$imageUrl = filter_var($_POST['imageUrl'] ?? '', FILTER_VALIDATE_URL) ?: 'https://images.pexels.com/photos/1907785/pexels-photo-1907785.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1';
$ctaText = htmlspecialchars($_POST['ctaText'] ?? 'Download Now');
$checkoutHtml = $_POST['checkoutHtml'] ?? '<!-- Paste your checkout/buy button code here -->';
// Fetch CSS for inlining
$cssContent = file_get_contents('assets/css/custom.css');
// Prepare image for ZIP
$imageContent = @file_get_contents($imageUrl);
$imageFilename = basename(parse_url($imageUrl, PHP_URL_PATH));
if (empty($imageFilename)) {
$imageFilename = 'featured-image.jpg';
}
// Generate the final HTML content from the selected template structure
$templateId = (int)($_POST['template_id'] ?? 1);
$selectedTemplate = null;
foreach ($templates as $t) {
if ($t['id'] === $templateId) {
$selectedTemplate = $t;
break;
}
}
$templateHtml = $selectedTemplate ? file_get_contents($selectedTemplate['file']) : '<div class="row align-items-center"><div class="col-md-6"><img id="previewImage" src="' . $imageUrl . '" class="img-fluid rounded shadow-sm" alt="Ebook Cover"></div><div class="col-md-6"><h1 id="previewTitle" class="display-5 fw-bold mt-4 mt-md-0">' . $title . '</h1><p id="previewDescription" class="lead fs-4">' . $description . '</p><div id="previewCtaContainer">' . $checkoutHtml . '</div></div></div>';
$templateDom = new DOMDocument();
@$templateDom->loadHTML($templateHtml, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$imgTag = $templateDom->getElementById('previewImage');
if ($imgTag) $imgTag->setAttribute('src', $imageFilename);
$titleTag = $templateDom->getElementById('previewTitle');
if ($titleTag) $titleTag->nodeValue = $title;
$descTag = $templateDom->getElementById('previewDescription');
if ($descTag) $descTag->nodeValue = $description;
$ctaContainer = $templateDom->getElementById('previewCtaContainer');
if ($ctaContainer) {
// Clear existing content
while ($ctaContainer->hasChildNodes()) {
$ctaContainer->removeChild($ctaContainer->firstChild);
}
if (!empty(trim($checkoutHtml))) {
$fragment = $templateDom->createDocumentFragment();
@$fragment->appendXML($checkoutHtml);
$ctaContainer->appendChild($fragment);
} else {
$ctaContainer->nodeValue = $ctaText; // Fallback to simple text if no HTML
}
}
$finalPreviewHtml = $templateDom->saveHTML();
$htmlContent = <<<HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>$title</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #212529;
}
.preview-container { max-width: 960px; }
$cssContent
</style>
</head>
<body>
<main>
<section class="py-5">
<div class="container preview-container">
$finalPreviewHtml
</div>
</section>
</main>
<footer class="text-center py-3 bg-light">
<p class="mb-0">&copy; 2025 <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
</body>
</html>
HTML;
// Create a Zip archive
$zip = new ZipArchive();
$zipFileName = tempnam(sys_get_temp_dir(), 'ebook') . '.zip';
if ($zip->open($zipFileName, ZipArchive::CREATE) === TRUE) {
$zip->addFromString('index.html', $htmlContent);
if ($imageContent) {
$zip->addFromString($imageFilename, $imageContent);
}
$zip->close();
// Force download
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="ebook_page.zip"');
header('Content-Length: ' . filesize($zipFileName));
readfile($zipFileName);
unlink($zipFileName);
exit;
} else {
error_log('Failed to create the ZIP file.');
exit('Could not create ZIP file.');
}
}
$template_id = isset($_GET['template_id']) ? (int)$_GET['template_id'] : null;
$selectedTemplate = null;
$templateContent = '';
if ($template_id) {
foreach ($templates as $t) {
if ($t['id'] === $template_id) {
$selectedTemplate = $t;
break;
}
}
if ($selectedTemplate && file_exists($selectedTemplate['file'])) {
$templateContent = file_get_contents($selectedTemplate['file']);
} else {
$template_id = null; // Reset if template not found
}
}
// Read project preview data from environment
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Create and customize your own ebook landing page.';
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ebook Lead Magnet Generator</title>
<?php if ($projectDescription): ?>
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<?php endif; ?>
<?php if ($projectImageUrl): ?>
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<?php endif; ?>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<header class="py-3 mb-4 border-bottom bg-white">
<div class="container d-flex flex-wrap justify-content-center">
<a href="index.php" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
<span class="fs-4">Ebook Page Builder</span>
</a>
</div>
</header>
<main>
<?php if ($template_id): ?>
<section id="preview-section" class="py-5">
<div class="container preview-container">
<?= $templateContent ?>
</div>
</section>
<section id="editor-section" class="bg-light-subtle py-5 border-top">
<div class="container">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2 class="m-0">Customize Your Page</h2>
<a href="index.php" class="btn btn-outline-secondary">&larr; Back to Home</a>
</div>
<form action="publish.php" method="POST">
<input type="hidden" name="template_id" value="<?= $template_id ?>">
<div class="row g-4">
<div class="col-md-6">
<label for="titleInput" class="form-label">Title</label>
<input type="text" class="form-control" id="titleInput" name="title" placeholder="Enter ebook title">
</div>
<div class="col-md-6">
<label for="ctaInput" class="form-label">Call to Action Button Text</label>
<input type="text" class="form-control" id="ctaInput" name="ctaText" placeholder="e.g., Get Your Free Copy">
</div>
<div class="col-12">
<label for="descriptionInput" class="form-label">Description</label>
<textarea class="form-control" id="descriptionInput" name="description" rows="3" placeholder="Describe your ebook"></textarea>
</div>
<div class="col-12">
<label for="imageUrlInput" class="form-label">Featured Image URL</label>
<input type="url" class="form-control" id="imageUrlInput" name="imageUrl" placeholder="https://example.com/image.jpg">
</div>
<div class="col-12">
<label for="checkoutHtmlInput" class="form-label">Checkout/Buy Button HTML</label>
<textarea class="form-control" id="checkoutHtmlInput" name="checkoutHtml" rows="4" placeholder="Paste your HTML embed code here (e.g., from Stripe, PayPal, Gumroad)"></textarea>
<div class="form-text">This will replace the default button in the preview.</div>
</div>
<div class="col-12 text-center mt-4">
<button type="submit" name="action" value="download" class="btn btn-success btn-lg">Generate and Download ZIP</button>
<button type="submit" name="action" value="publish" class="btn btn-primary btn-lg">Publish Page</button>
</div>
</div>
</form>
</div>
</section>
<?php else: ?>
<section id="gallery-section" class="py-5">
<div class="container">
<div class="text-center mb-5">
<h1 class="display-5 fw-bold">Start with a Beautiful Design</h1>
<p class="lead fs-4 text-muted">Select a professionally designed template to begin.</p>
</div>
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
<?php foreach ($templates as $template):
?>
<div class="col">
<div class="card h-100 shadow-sm">
<img src="<?= htmlspecialchars($template['preview_image']) ?>" class="card-img-top" alt="<?= htmlspecialchars($template['name']) ?>">
<div class="card-body">
<h5 class="card-title"><?= htmlspecialchars($template['name']) ?></h5>
<p class="card-text"><?= htmlspecialchars($template['description']) ?></p>
</div>
<div class="card-footer bg-white border-0">
<a href="?template_id=<?= $template['id'] ?>" class="btn btn-primary w-100">Customize this template</a>
</div>
</div>
</div>
<?php endforeach;
?>
</div>
</div>
</section>
<?php endif; ?>
</main>
<section id="how-to-deploy" class="py-5 bg-light">
<div class="container">
<div class="text-center mb-5">
<h2 class="fw-bold">How to Deploy Your Ebook Page</h2>
<p class="lead fs-4 text-muted">A simple guide to get your page online.</p>
</div>
<div class="row g-4">
<div class="col-md-4">
<div class="text-center">
<div class="mb-3">
<span class="fs-1">1</span>
</div>
<h5>Unzip the File</h5>
<p>The file you downloaded is a ZIP archive. Unzip it to a folder on your computer. You will find an `index.html` file and an image file inside.</p>
</div>
</div>
<div class="col-md-4">
<div class="text-center">
<div class="mb-3">
<span class="fs-1">2</span>
</div>
<h5>Upload to Your Hosting</h5>
<p>Log in to your web hosting control panel (like cPanel, Plesk, or others) or use an FTP client (like FileZilla). Upload the `index.html` file and the image file to the `public_html` or `www` directory of your domain.</p>
</div>
</div>
<div class="col-md-4">
<div class="text-center">
<div class="mb-3">
<span class="fs-1">3</span>
</div>
<h5>Visit Your Page</h5>
<p>Once the files are uploaded, you should be able to visit your domain in your browser and see your new ebook landing page live.</p>
</div>
</div>
</div>
</div>
</section>
<footer class="text-center py-3 mt-5 bg-light border-top">
<p class="mb-0">&copy; <?= date('Y') ?> <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>

254
index.php
View File

@ -4,142 +4,6 @@ declare(strict_types=1);
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
require_once 'templates/data.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['action'] === 'download') {
// (The download logic remains the same)
// Sanitize and retrieve POST data
$title = htmlspecialchars($_POST['title'] ?? 'Your Awesome Ebook Title');
$description = htmlspecialchars($_POST['description'] ?? 'A compelling description...');
$imageUrl = filter_var($_POST['imageUrl'] ?? '', FILTER_VALIDATE_URL) ?: 'https://images.pexels.com/photos/1907785/pexels-photo-1907785.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1';
$ctaText = htmlspecialchars($_POST['ctaText'] ?? 'Download Now');
$checkoutHtml = $_POST['checkoutHtml'] ?? '<!-- Paste your checkout/buy button code here -->';
// Fetch CSS for inlining
$cssContent = file_get_contents('assets/css/custom.css');
// Prepare image for ZIP
$imageContent = @file_get_contents($imageUrl);
$imageFilename = basename(parse_url($imageUrl, PHP_URL_PATH));
if (empty($imageFilename)) {
$imageFilename = 'featured-image.jpg';
}
// Generate the final HTML content from the selected template structure
$templateId = (int)($_POST['template_id'] ?? 1);
$selectedTemplate = null;
foreach ($templates as $t) {
if ($t['id'] === $templateId) {
$selectedTemplate = $t;
break;
}
}
$templateHtml = $selectedTemplate ? file_get_contents($selectedTemplate['file']) : '<div class="row align-items-center"><div class="col-md-6"><img id="previewImage" src="' . $imageUrl . '" class="img-fluid rounded shadow-sm" alt="Ebook Cover"></div><div class="col-md-6"><h1 id="previewTitle" class="display-5 fw-bold mt-4 mt-md-0">' . $title . '</h1><p id="previewDescription" class="lead fs-4">' . $description . '</p><div id="previewCtaContainer">' . $checkoutHtml . '</div></div></div>';
$templateDom = new DOMDocument();
@$templateDom->loadHTML($templateHtml, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$imgTag = $templateDom->getElementById('previewImage');
if ($imgTag) $imgTag->setAttribute('src', $imageFilename);
$titleTag = $templateDom->getElementById('previewTitle');
if ($titleTag) $titleTag->nodeValue = $title;
$descTag = $templateDom->getElementById('previewDescription');
if ($descTag) $descTag->nodeValue = $description;
$ctaContainer = $templateDom->getElementById('previewCtaContainer');
if ($ctaContainer) {
// Clear existing content
while ($ctaContainer->hasChildNodes()) {
$ctaContainer->removeChild($ctaContainer->firstChild);
}
if (!empty(trim($checkoutHtml))) {
$fragment = $templateDom->createDocumentFragment();
@$fragment->appendXML($checkoutHtml);
$ctaContainer->appendChild($fragment);
} else {
$ctaContainer->nodeValue = $ctaText; // Fallback to simple text if no HTML
}
}
$finalPreviewHtml = $templateDom->saveHTML();
$htmlContent = <<<HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>$title</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #212529;
}
.preview-container { max-width: 960px; }
$cssContent
</style>
</head>
<body>
<main>
<section class="py-5">
<div class="container preview-container">
$finalPreviewHtml
</div>
</section>
</main>
<footer class="text-center py-3 bg-light">
<p class="mb-0">&copy; 2025 The Contentrepreneur</p>
</footer>
</body>
</html>
HTML;
// Create a Zip archive
$zip = new ZipArchive();
$zipFileName = tempnam(sys_get_temp_dir(), 'ebook') . '.zip';
if ($zip->open($zipFileName, ZipArchive::CREATE) === TRUE) {
$zip->addFromString('index.html', $htmlContent);
if ($imageContent) {
$zip->addFromString($imageFilename, $imageContent);
}
$zip->close();
// Force download
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="ebook_page.zip"');
header('Content-Length: ' . filesize($zipFileName));
readfile($zipFileName);
unlink($zipFileName);
exit;
} else {
error_log('Failed to create the ZIP file.');
exit('Could not create ZIP file.');
}
}
$template_id = isset($_GET['template_id']) ? (int)$_GET['template_id'] : null;
$selectedTemplate = null;
$templateContent = '';
if ($template_id) {
foreach ($templates as $t) {
if ($t['id'] === $template_id) {
$selectedTemplate = $t;
break;
}
}
if ($selectedTemplate && file_exists($selectedTemplate['file'])) {
$templateContent = file_get_contents($selectedTemplate['file']);
} else {
$template_id = null; // Reset if template not found
}
}
// Read project preview data from environment
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Create and customize your own ebook landing page.';
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
@ -147,25 +11,12 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ebook Lead Magnet Generator</title>
<?php if ($projectDescription): ?>
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<?php endif; ?>
<?php if ($projectImageUrl): ?>
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<?php endif; ?>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Landing Page</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="icon" href="assets/images/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="assets/css/custom.css">
</head>
<body>
@ -174,87 +25,38 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
<span class="fs-4">Ebook Page Builder</span>
</a>
</div>
</header>
<main>
<?php if ($template_id): ?>
<section id="preview-section" class="py-5">
<div class="container preview-container">
<?= $templateContent ?>
</div>
</section>
<main class="container">
<div class="p-5 mb-4 bg-light rounded-3">
<div class="container-fluid py-5">
<h1 class="display-5 fw-bold">Create Beautiful Ebook Landing Pages in Minutes</h1>
<p class="col-md-8 fs-4">Our powerful and easy-to-use page builder helps you create stunning landing pages for your ebooks. No coding required. Start building your page today!</p>
<a href="https://www.thecontentrepreneur.com/e-book-builder?preview=true" class="btn btn-success btn-lg">Purchase Access</a>
</div>
</div>
<section id="editor-section" class="bg-light-subtle py-5 border-top">
<div class="container">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2 class="m-0">Customize Your Page</h2>
<a href="/" class="btn btn-outline-secondary">&larr; Back to Gallery</a>
</div>
<form method="POST">
<input type="hidden" name="action" value="download">
<input type="hidden" name="template_id" value="<?= $template_id ?>">
<div class="row g-4">
<div class="col-md-6">
<label for="titleInput" class="form-label">Title</label>
<input type="text" class="form-control" id="titleInput" name="title" placeholder="Enter ebook title">
</div>
<div class="col-md-6">
<label for="ctaInput" class="form-label">Call to Action Button Text</label>
<input type="text" class="form-control" id="ctaInput" name="ctaText" placeholder="e.g., Get Your Free Copy">
</div>
<div class="col-12">
<label for="descriptionInput" class="form-label">Description</label>
<textarea class="form-control" id="descriptionInput" name="description" rows="3" placeholder="Describe your ebook"></textarea>
</div>
<div class="col-12">
<label for="imageUrlInput" class="form-label">Featured Image URL</label>
<input type="url" class="form-control" id="imageUrlInput" name="imageUrl" placeholder="https://example.com/image.jpg">
</div>
<div class="col-12">
<label for="checkoutHtmlInput" class="form-label">Checkout/Buy Button HTML</label>
<textarea class="form-control" id="checkoutHtmlInput" name="checkoutHtml" rows="4" placeholder="Paste your HTML embed code here (e.g., from Stripe, PayPal, Gumroad)"></textarea>
<div class="form-text">This will replace the default button in the preview.</div>
</div>
<div class="col-12 text-center mt-4">
<button type="submit" class="btn btn-success btn-lg">Generate and Download ZIP</button>
</div>
</div>
</form>
<div class="row align-items-md-stretch">
<div class="col-md-6">
<div class="h-100 p-5 text-white bg-dark rounded-3">
<h2>Feature-Rich Editor</h2>
<p>Choose from a variety of templates, customize your content, and see a live preview of your page as you build it. Our editor is designed to be intuitive and flexible.</p>
</div>
</section>
<?php else: ?>
<section id="gallery-section" class="py-5">
<div class="container">
<div class="text-center mb-5">
<h1 class="display-5 fw-bold">Start with a Beautiful Design</h1>
<p class="lead fs-4 text-muted">Select a professionally designed template to begin.</p>
</div>
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
<?php foreach ($templates as $template): ?>
<div class="col">
<div class="card h-100 shadow-sm">
<img src="<?= htmlspecialchars($template['preview_image']) ?>" class="card-img-top" alt="<?= htmlspecialchars($template['name']) ?>">
<div class="card-body">
<h5 class="card-title"><?= htmlspecialchars($template['name']) ?></h5>
<p class="card-text"><?= htmlspecialchars($template['description']) ?></p>
</div>
<div class="card-footer bg-white border-0">
<a href="?template_id=<?= $template['id'] ?>" class="btn btn-primary w-100">Customize this template</a>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<div class="col-md-6">
<div class="h-100 p-5 bg-light border rounded-3">
<h2>Publish with Ease</h2>
<p>Once your page is ready, you can download it as a ZIP file or publish it directly to a unique URL on our platform. Share your ebook with the world in just a few clicks.</p>
</div>
</section>
<?php endif; ?>
</div>
</div>
</main>
<footer class="text-center py-3 mt-5 bg-light border-top">
<p class="mb-0">&copy; <?= date('Y') ?> The Contentrepreneur</p>
<p class="mb-0">&copy; <?= date('Y') ?> <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>

View File

@ -1,52 +0,0 @@
<?php
require_once 'admin/config.php';
$error = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_POST['username']) && isset($_POST['password'])) {
if ($_POST['username'] === ADMIN_USERNAME && $_POST['password'] === ADMIN_PASSWORD) {
$_SESSION['is_logged_in'] = true;
header('Location: admin.php');
exit;
}
}
$error = 'Invalid username or password.';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Login</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/admin.css">
</head>
<body class="login-page">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-5">
<div class="card login-card">
<div class="card-body">
<h1 class="card-title text-center">Admin Login</h1>
<?php if ($error): ?>
<div class="alert alert-danger"><?php echo $error; ?></div>
<?php endif; ?>
<form method="POST">
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="text" class="form-control" id="username" name="username" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<button type="submit" class="btn btn-primary w-100">Login</button>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -1,7 +0,0 @@
<?php
require_once 'admin/config.php';
$_SESSION['is_logged_in'] = false;
session_destroy();
header('Location: login.php');
exit;
?>

44
manage.php Normal file
View File

@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
require_once 'db/config.php';
if (isset($_GET['token'])) {
$token = $_GET['token'];
try {
$pdo = db();
$stmt = $pdo->prepare("SELECT `id`, `expires_at` FROM `published_pages` WHERE `management_token` = ?");
$stmt->execute([$token]);
$page = $stmt->fetch();
if ($page) {
$new_expires_at = date('Y-m-d H:i:s', strtotime('+60 days'));
$update_stmt = $pdo->prepare("UPDATE `published_pages` SET `expires_at` = ? WHERE `id` = ?");
$update_stmt->execute([$new_expires_at, $page['id']]);
echo "<div style='text-align:center; padding: 50px;'>";
echo "<h2>Success!</h2>";
echo "<p>Your page's lifetime has been extended by 60 days.</p>";
echo "<p>New expiration date: " . $new_expires_at . "</p>";
echo "</div>";
} else {
echo "<div style='text-align:center; padding: 50px;'>";
echo "<h2>Error!</h2>";
echo "<p>Invalid management token.</p>";
echo "</div>";
}
} catch (PDOException $e) {
error_log("DB Error: " . $e->getMessage());
echo "<div style='text-align:center; padding: 50px;'>";
echo "<h2>Error!</h2>";
echo "<p>An error occurred while processing your request.</p>";
echo "</div>";
}
} else {
header('Location: index.php');
exit;
}

147
publish.php Normal file
View File

@ -0,0 +1,147 @@
<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
require_once 'templates/data.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['action'] === 'publish') {
// Sanitize and retrieve POST data
$title = htmlspecialchars($_POST['title'] ?? 'Your Awesome Ebook Title');
$description = htmlspecialchars($_POST['description'] ?? 'A compelling description...');
$imageUrl = filter_var($_POST['imageUrl'] ?? '', FILTER_VALIDATE_URL) ?: 'https://images.pexels.com/photos/1907785/pexels-photo-1907785.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1';
$ctaText = htmlspecialchars($_POST['ctaText'] ?? 'Download Now');
$checkoutHtml = $_POST['checkoutHtml'] ?? '<!-- Paste your checkout/buy button code here -->';
// Fetch CSS for inlining
$cssContent = file_get_contents('assets/css/custom.css');
// Prepare image for embedding or linking
$imageFilename = basename(parse_url($imageUrl, PHP_URL_PATH));
if (empty($imageFilename)) {
$imageFilename = 'featured-image.jpg';
}
// Generate the final HTML content from the selected template structure
$templateId = (int)($_POST['template_id'] ?? 1);
$selectedTemplate = null;
foreach ($templates as $t) {
if ($t['id'] === $templateId) {
$selectedTemplate = $t;
break;
}
}
$templateHtml = $selectedTemplate ? file_get_contents($selectedTemplate['file']) : '<div class="row align-items-center"><div class="col-md-6"><img id="previewImage" src="' . $imageUrl . '" class="img-fluid rounded shadow-sm" alt="Ebook Cover"></div><div class="col-md-6"><h1 id="previewTitle" class="display-5 fw-bold mt-4 mt-md-0">' . $title . '</h1><p id="previewDescription" class="lead fs-4">' . $description . '</p><div id="previewCtaContainer">' . $checkoutHtml . '</div></div></div>';
$templateDom = new DOMDocument();
@$templateDom->loadHTML($templateHtml, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$imgTag = $templateDom->getElementById('previewImage');
if ($imgTag) $imgTag->setAttribute('src', $imageUrl);
$titleTag = $templateDom->getElementById('previewTitle');
if ($titleTag) $titleTag->nodeValue = $title;
$descTag = $templateDom->getElementById('previewDescription');
if ($descTag) $descTag->nodeValue = $description;
$ctaContainer = $templateDom->getElementById('previewCtaContainer');
if ($ctaContainer) {
while ($ctaContainer->hasChildNodes()) {
$ctaContainer->removeChild($ctaContainer->firstChild);
}
if (!empty(trim($checkoutHtml))) {
$fragment = $templateDom->createDocumentFragment();
@$fragment->appendXML($checkoutHtml);
$ctaContainer->appendChild($fragment);
} else {
$ctaContainer->nodeValue = $ctaText; // Fallback to simple text if no HTML
}
}
$finalPreviewHtml = $templateDom->saveHTML();
$htmlContent = <<<HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>$title</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #212529;
}
.preview-container { max-width: 960px; }
$cssContent
</style>
</head>
<body>
<main>
<section class="py-5">
<div class="container preview-container">
$finalPreviewHtml
</div>
</section>
</main>
<footer class="text-center py-3 bg-light">
<p class="mb-0">&copy; 2025 <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
</body>
</html>
HTML;
// Save the page
$publishedDir = 'published';
if (!is_dir($publishedDir)) {
mkdir($publishedDir, 0755, true);
}
$pageId = uniqid();
$filename = $publishedDir . '/' . $pageId . '.html';
file_put_contents($filename, $htmlContent);
$pageUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/' . $filename;
// Database interaction
require_once 'db/config.php';
$management_token = bin2hex(random_bytes(16));
$expires_at = date('Y-m-d H:i:s', strtotime('+60 days'));
try {
$pdo = db();
$stmt = $pdo->prepare("INSERT INTO published_pages (filename, management_token, expires_at) VALUES (?, ?, ?)");
$stmt->execute([$pageId . '.html', $management_token, $expires_at]);
} catch (PDOException $e) {
// Log error, but don't show to user
error_log("DB Error: " . $e->getMessage());
// Fallback to just showing the page URL without management link
echo "<div style='text-align:center; padding: 50px;'>";
echo "<h2>Your page has been published!</h2>";
echo "<p>You can view it here:</p>";
echo "<a href='{$pageUrl}'>{$pageUrl}</a>";
echo "</div>";
exit;
}
$managementUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/manage.php?token=' . $management_token;
// Display the success message and URL
echo "<div style='text-align:center; padding: 50px;'>";
echo "<h2>Your page has been published!</h2>";
echo "<p>You can view it here:</p>";
echo "<p><a href='{$pageUrl}'>{$pageUrl}</a></p>";
echo "<hr style='margin: 20px auto; width: 50%;'>";
echo "<p><strong>Manage your page:</strong></p>";
echo "<p>To prevent your page from being deleted after 60 days, use the following link to extend its lifetime:</p>";
echo "<p><a href='{$managementUrl}'>{$managementUrl}</a></p>";
echo "</div>";
} else {
header('Location: index.php');
exit;
}
?>

View File

@ -0,0 +1,169 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Shane&#039;s Site</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #212529;
}
.preview-container { max-width: 960px; }
/* assets/css/custom.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
--primary-color: #007bff; /* A vibrant blue */
--primary-hover: #0056b3;
--background-color: #fdfdfd; /* A very light, almost white grey */
--card-bg-color: #ffffff;
--text-color: #333;
--text-light: #666;
--border-color: #eef2f7;
--shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
--border-radius: 12px;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--background-color);
color: var(--text-color);
}
a {
color: var(--primary-color);
}
a:hover {
color: var(--primary-hover);
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: var(--primary-hover);
border-color: var(--primary-hover);
transform: translateY(-2px);
}
.btn-success {
background-color: #28a745;
border-color: #28a745;
}
.btn-success:hover {
background-color: #218838;
border-color: #1e7e34;
}
header.bg-white {
background-color: var(--card-bg-color) !important;
border-bottom-color: var(--border-color) !important;
}
header .fs-4 {
font-weight: 600;
}
#gallery-section .display-5 {
font-weight: 700;
}
#gallery-section .card {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
box-shadow: none;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#gallery-section .card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow);
}
#gallery-section .card-img-top {
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
}
#gallery-section .card-title {
font-weight: 600;
}
#gallery-section .card-footer {
background-color: transparent;
}
#preview-section {
padding-top: 4rem;
padding-bottom: 4rem;
}
.preview-container {
max-width: 960px;
margin: auto;
background: var(--card-bg-color);
padding: 3rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
}
.preview-container img {
border-radius: var(--border-radius);
}
#editor-section {
background-color: #f8f9fa; /* A slightly darker grey for contrast */
}
#editor-section h2 {
font-weight: 600;
}
.form-control, .form-select {
border-radius: 8px;
border-color: var(--border-color);
}
.form-control:focus {
box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
border-color: var(--primary-color);
}
footer.bg-light {
background-color: var(--card-bg-color) !important;
border-top-color: var(--border-color) !important;
}
</style>
</head>
<body>
<main>
<section class="py-5">
<div class="container preview-container">
<div class="row align-items-center">
<div class="col-md-6 order-md-2">
<img id="previewImage" src="https://images.pexels.com/photos/2088205/pexels-photo-2088205.jpeg?auto=compress&amp;cs=tinysrgb&amp;w=1260&amp;h=750&amp;dpr=1" class="img-fluid rounded shadow-sm" alt="Ebook Cover">
</div>
<div class="col-md-6 order-md-1">
<h1 id="previewTitle" class="display-5 fw-bold mt-4 mt-md-0">Shane's Site</h1>
<p id="previewDescription" class="lead fs-4">A vibrant and bold description for the blue-themed template.</p>
<div id="previewCtaContainer">Get It Now!</div>
</div>
</div>
</div>
</section>
</main>
<footer class="text-center py-3 bg-light">
<p class="mb-0">&copy; 2025 <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
</body>
</html>

View File

@ -0,0 +1,169 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Bold &amp; Blue Title</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #212529;
}
.preview-container { max-width: 960px; }
/* assets/css/custom.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
--primary-color: #007bff; /* A vibrant blue */
--primary-hover: #0056b3;
--background-color: #fdfdfd; /* A very light, almost white grey */
--card-bg-color: #ffffff;
--text-color: #333;
--text-light: #666;
--border-color: #eef2f7;
--shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
--border-radius: 12px;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--background-color);
color: var(--text-color);
}
a {
color: var(--primary-color);
}
a:hover {
color: var(--primary-hover);
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: var(--primary-hover);
border-color: var(--primary-hover);
transform: translateY(-2px);
}
.btn-success {
background-color: #28a745;
border-color: #28a745;
}
.btn-success:hover {
background-color: #218838;
border-color: #1e7e34;
}
header.bg-white {
background-color: var(--card-bg-color) !important;
border-bottom-color: var(--border-color) !important;
}
header .fs-4 {
font-weight: 600;
}
#gallery-section .display-5 {
font-weight: 700;
}
#gallery-section .card {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
box-shadow: none;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#gallery-section .card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow);
}
#gallery-section .card-img-top {
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
}
#gallery-section .card-title {
font-weight: 600;
}
#gallery-section .card-footer {
background-color: transparent;
}
#preview-section {
padding-top: 4rem;
padding-bottom: 4rem;
}
.preview-container {
max-width: 960px;
margin: auto;
background: var(--card-bg-color);
padding: 3rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
}
.preview-container img {
border-radius: var(--border-radius);
}
#editor-section {
background-color: #f8f9fa; /* A slightly darker grey for contrast */
}
#editor-section h2 {
font-weight: 600;
}
.form-control, .form-select {
border-radius: 8px;
border-color: var(--border-color);
}
.form-control:focus {
box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
border-color: var(--primary-color);
}
footer.bg-light {
background-color: var(--card-bg-color) !important;
border-top-color: var(--border-color) !important;
}
</style>
</head>
<body>
<main>
<section class="py-5">
<div class="container preview-container">
<div class="row align-items-center">
<div class="col-md-6 order-md-2">
<img id="previewImage" src="https://images.pexels.com/photos/2088205/pexels-photo-2088205.jpeg?auto=compress&amp;cs=tinysrgb&amp;w=1260&amp;h=750&amp;dpr=1" class="img-fluid rounded shadow-sm" alt="Ebook Cover">
</div>
<div class="col-md-6 order-md-1">
<h1 id="previewTitle" class="display-5 fw-bold mt-4 mt-md-0">Bold &amp; Blue Title</h1>
<p id="previewDescription" class="lead fs-4">A vibrant and bold description for the blue-themed template.</p>
<div id="previewCtaContainer">Get It Now!</div>
</div>
</div>
</div>
</section>
</main>
<footer class="text-center py-3 bg-light">
<p class="mb-0">&copy; 2025 <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
</body>
</html>

View File

@ -0,0 +1,169 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Bold &amp; Blue Title</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #212529;
}
.preview-container { max-width: 960px; }
/* assets/css/custom.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
--primary-color: #007bff; /* A vibrant blue */
--primary-hover: #0056b3;
--background-color: #fdfdfd; /* A very light, almost white grey */
--card-bg-color: #ffffff;
--text-color: #333;
--text-light: #666;
--border-color: #eef2f7;
--shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
--border-radius: 12px;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--background-color);
color: var(--text-color);
}
a {
color: var(--primary-color);
}
a:hover {
color: var(--primary-hover);
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: var(--primary-hover);
border-color: var(--primary-hover);
transform: translateY(-2px);
}
.btn-success {
background-color: #28a745;
border-color: #28a745;
}
.btn-success:hover {
background-color: #218838;
border-color: #1e7e34;
}
header.bg-white {
background-color: var(--card-bg-color) !important;
border-bottom-color: var(--border-color) !important;
}
header .fs-4 {
font-weight: 600;
}
#gallery-section .display-5 {
font-weight: 700;
}
#gallery-section .card {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
box-shadow: none;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#gallery-section .card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow);
}
#gallery-section .card-img-top {
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
}
#gallery-section .card-title {
font-weight: 600;
}
#gallery-section .card-footer {
background-color: transparent;
}
#preview-section {
padding-top: 4rem;
padding-bottom: 4rem;
}
.preview-container {
max-width: 960px;
margin: auto;
background: var(--card-bg-color);
padding: 3rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
}
.preview-container img {
border-radius: var(--border-radius);
}
#editor-section {
background-color: #f8f9fa; /* A slightly darker grey for contrast */
}
#editor-section h2 {
font-weight: 600;
}
.form-control, .form-select {
border-radius: 8px;
border-color: var(--border-color);
}
.form-control:focus {
box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
border-color: var(--primary-color);
}
footer.bg-light {
background-color: var(--card-bg-color) !important;
border-top-color: var(--border-color) !important;
}
</style>
</head>
<body>
<main>
<section class="py-5">
<div class="container preview-container">
<div class="row align-items-center">
<div class="col-md-6 order-md-2">
<img id="previewImage" src="https://images.pexels.com/photos/2088205/pexels-photo-2088205.jpeg?auto=compress&amp;cs=tinysrgb&amp;w=1260&amp;h=750&amp;dpr=1" class="img-fluid rounded shadow-sm" alt="Ebook Cover">
</div>
<div class="col-md-6 order-md-1">
<h1 id="previewTitle" class="display-5 fw-bold mt-4 mt-md-0">Bold &amp; Blue Title</h1>
<p id="previewDescription" class="lead fs-4">A vibrant and bold description for the blue-themed template.</p>
<div id="previewCtaContainer">Get It Now!</div>
</div>
</div>
</div>
</section>
</main>
<footer class="text-center py-3 bg-light">
<p class="mb-0">&copy; 2025 <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
</body>
</html>

View File

@ -0,0 +1,169 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>My Shane Ebook</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #212529;
}
.preview-container { max-width: 960px; }
/* assets/css/custom.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
--primary-color: #007bff; /* A vibrant blue */
--primary-hover: #0056b3;
--background-color: #fdfdfd; /* A very light, almost white grey */
--card-bg-color: #ffffff;
--text-color: #333;
--text-light: #666;
--border-color: #eef2f7;
--shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
--border-radius: 12px;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--background-color);
color: var(--text-color);
}
a {
color: var(--primary-color);
}
a:hover {
color: var(--primary-hover);
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: var(--primary-hover);
border-color: var(--primary-hover);
transform: translateY(-2px);
}
.btn-success {
background-color: #28a745;
border-color: #28a745;
}
.btn-success:hover {
background-color: #218838;
border-color: #1e7e34;
}
header.bg-white {
background-color: var(--card-bg-color) !important;
border-bottom-color: var(--border-color) !important;
}
header .fs-4 {
font-weight: 600;
}
#gallery-section .display-5 {
font-weight: 700;
}
#gallery-section .card {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
box-shadow: none;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#gallery-section .card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow);
}
#gallery-section .card-img-top {
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
}
#gallery-section .card-title {
font-weight: 600;
}
#gallery-section .card-footer {
background-color: transparent;
}
#preview-section {
padding-top: 4rem;
padding-bottom: 4rem;
}
.preview-container {
max-width: 960px;
margin: auto;
background: var(--card-bg-color);
padding: 3rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
}
.preview-container img {
border-radius: var(--border-radius);
}
#editor-section {
background-color: #f8f9fa; /* A slightly darker grey for contrast */
}
#editor-section h2 {
font-weight: 600;
}
.form-control, .form-select {
border-radius: 8px;
border-color: var(--border-color);
}
.form-control:focus {
box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
border-color: var(--primary-color);
}
footer.bg-light {
background-color: var(--card-bg-color) !important;
border-top-color: var(--border-color) !important;
}
</style>
</head>
<body>
<main>
<section class="py-5">
<div class="container preview-container">
<div class="row align-items-center">
<div class="col-md-6">
<img id="previewImage" src="https://images.pexels.com/photos/1907785/pexels-photo-1907785.jpeg?auto=compress&amp;cs=tinysrgb&amp;w=1260&amp;h=750&amp;dpr=1" class="img-fluid rounded shadow-sm" alt="Ebook Cover">
</div>
<div class="col-md-6">
<h1 id="previewTitle" class="display-5 fw-bold mt-4 mt-md-0">My Shane Ebook</h1>
<p id="previewDescription" class="lead fs-4">A compelling description for the minimalist modern template. BLAJ</p>
<div id="previewCtaContainer">MY PAYMENT FORM</div>
</div>
</div>
</div>
</section>
</main>
<footer class="text-center py-3 bg-light">
<p class="mb-0">&copy; 2025 <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
</body>
</html>

View File

@ -0,0 +1,169 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ava&#039;s Ebook</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #212529;
}
.preview-container { max-width: 960px; }
/* assets/css/custom.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
--primary-color: #007bff; /* A vibrant blue */
--primary-hover: #0056b3;
--background-color: #fdfdfd; /* A very light, almost white grey */
--card-bg-color: #ffffff;
--text-color: #333;
--text-light: #666;
--border-color: #eef2f7;
--shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
--border-radius: 12px;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--background-color);
color: var(--text-color);
}
a {
color: var(--primary-color);
}
a:hover {
color: var(--primary-hover);
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: var(--primary-hover);
border-color: var(--primary-hover);
transform: translateY(-2px);
}
.btn-success {
background-color: #28a745;
border-color: #28a745;
}
.btn-success:hover {
background-color: #218838;
border-color: #1e7e34;
}
header.bg-white {
background-color: var(--card-bg-color) !important;
border-bottom-color: var(--border-color) !important;
}
header .fs-4 {
font-weight: 600;
}
#gallery-section .display-5 {
font-weight: 700;
}
#gallery-section .card {
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
box-shadow: none;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#gallery-section .card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow);
}
#gallery-section .card-img-top {
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
}
#gallery-section .card-title {
font-weight: 600;
}
#gallery-section .card-footer {
background-color: transparent;
}
#preview-section {
padding-top: 4rem;
padding-bottom: 4rem;
}
.preview-container {
max-width: 960px;
margin: auto;
background: var(--card-bg-color);
padding: 3rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
}
.preview-container img {
border-radius: var(--border-radius);
}
#editor-section {
background-color: #f8f9fa; /* A slightly darker grey for contrast */
}
#editor-section h2 {
font-weight: 600;
}
.form-control, .form-select {
border-radius: 8px;
border-color: var(--border-color);
}
.form-control:focus {
box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
border-color: var(--primary-color);
}
footer.bg-light {
background-color: var(--card-bg-color) !important;
border-top-color: var(--border-color) !important;
}
</style>
</head>
<body>
<main>
<section class="py-5">
<div class="container preview-container">
<div class="row align-items-center">
<div class="col-md-6">
<img id="previewImage" src="https://images.pexels.com/photos/1907785/pexels-photo-1907785.jpeg?auto=compress&amp;cs=tinysrgb&amp;w=1260&amp;h=750&amp;dpr=1" class="img-fluid rounded shadow-sm" alt="Ebook Cover">
</div>
<div class="col-md-6">
<h1 id="previewTitle" class="display-5 fw-bold mt-4 mt-md-0">Ava's Ebook</h1>
<p id="previewDescription" class="lead fs-4">All About AVA</p>
<div id="previewCtaContainer">MY PAYMENT FORM</div>
</div>
</div>
</div>
</section>
</main>
<footer class="text-center py-3 bg-light">
<p class="mb-0">&copy; 2025 <a href="https://www.thecontentrepreneur.com/">The Contentrepreneur</a></p>
</footer>
</body>
</html>