Compare commits

...

1 Commits

Author SHA1 Message Date
Flatlogic Bot
a9fc1f0591 Launch With Me 2025-10-29 18:58:48 +00:00
5 changed files with 287 additions and 144 deletions

106
assets/css/custom.css Normal file
View File

@ -0,0 +1,106 @@
/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Roboto:wght@400;500&display=swap');
/* Base styles */
body {
font-family: 'Roboto', sans-serif;
background-color: #f5f5f5;
color: #212529;
}
/* Navbar */
.navbar {
transition: background-color 0.3s ease;
}
.navbar-brand {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 1.5rem;
}
/* Hero Section */
.hero {
background: linear-gradient(135deg, #512da8 0%, #7e57c2 100%);
color: white;
padding: 6rem 0;
text-align: center;
}
.hero h1 {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 3.5rem;
margin-bottom: 1rem;
}
.hero p {
font-size: 1.25rem;
margin-bottom: 2rem;
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
/* Buttons */
.btn-primary {
background-color: #ffc107;
border-color: #ffc107;
color: #212529;
font-family: 'Poppins', sans-serif;
font-weight: 600;
padding: 0.75rem 1.5rem;
border-radius: 0.75rem;
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: #ffca2c;
border-color: #ffca2c;
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
/* Form Section */
#create-project {
padding: 5rem 0;
}
h2 {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 2.5rem;
margin-bottom: 2rem;
text-align: center;
}
/* Cards and Forms */
.card {
border: none;
border-radius: 0.75rem;
box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}
.form-control {
border-radius: 0.75rem;
padding: 0.75rem 1rem;
}
.form-control:focus {
box-shadow: 0 0 0 0.25rem rgba(81, 45, 168, 0.25);
border-color: #512da8;
}
/* Footer */
footer {
background-color: #ffffff;
padding: 2rem 0;
text-align: center;
border-top: 1px solid #e0e0e0;
}
/* Toast Notifications */
.toast {
border-radius: 0.75rem;
}

35
assets/js/main.js Normal file
View File

@ -0,0 +1,35 @@
document.addEventListener('DOMContentLoaded', function () {
// Smooth scroll for CTA button
const ctaButton = document.querySelector('.btn-primary');
const projectSection = document.getElementById('create-project');
if (ctaButton && projectSection) {
ctaButton.addEventListener('click', function (e) {
e.preventDefault();
projectSection.scrollIntoView({ behavior: 'smooth' });
});
}
// Form validation
const projectForm = document.getElementById('projectForm');
if (projectForm) {
projectForm.addEventListener('submit', function (e) {
if (!projectForm.checkValidity()) {
e.preventDefault();
e.stopPropagation();
}
projectForm.classList.add('was-validated');
}, false);
}
// Show success toast
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('status') === 'success') {
const successToast = document.getElementById('successToast');
if (successToast) {
const toast = new bootstrap.Toast(successToast);
toast.show();
}
}
});

36
create_project.php Normal file
View File

@ -0,0 +1,36 @@
<?php
require_once 'db/config.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$projectName = trim($_POST['project_name'] ?? '');
$tokenName = trim($_POST['token_name'] ?? '');
$tokenSymbol = trim($_POST['token_symbol'] ?? '');
// Basic validation
if (empty($projectName) || empty($tokenName) || empty($tokenSymbol)) {
header('Location: index.php?status=error&message=Please+fill+out+all+fields.');
exit;
}
if (strlen($tokenSymbol) > 10) {
header('Location: index.php?status=error&message=Token+symbol+cannot+be+longer+than+10+characters.');
exit;
}
try {
$pdo = db();
$stmt = $pdo->prepare("INSERT INTO projects (project_name, token_name, token_symbol) VALUES (?, ?, ?)");
$stmt->execute([$projectName, $tokenName, $tokenSymbol]);
header('Location: index.php?status=success');
exit;
} catch (PDOException $e) {
// In a real app, you would log this error.
header('Location: index.php?status=error&message=Database+error.');
exit;
}
}
// Redirect if accessed directly
header('Location: index.php');
exit;

View File

@ -15,3 +15,17 @@ function db() {
} }
return $pdo; return $pdo;
} }
// Create projects table if it doesn't exist
function setup_database() {
$pdo = db();
$pdo->exec("CREATE TABLE IF NOT EXISTS projects (
id INT AUTO_INCREMENT PRIMARY KEY,
project_name VARCHAR(255) NOT NULL,
token_name VARCHAR(255) NOT NULL,
token_symbol VARCHAR(10) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);");
}
setup_database();

232
index.php
View File

@ -1,150 +1,102 @@
<?php <!DOCTYPE html>
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
?>
<!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>New Style</title> <title>Sol Token LaunchLab</title>
<?php <meta name="description" content="Launch your Solana-based meme coin with ease. Use our simple tools to create, manage, and grow your token project.">
// Read project preview data from environment <meta name="keywords" content="solana, meme coin, token launch, crypto, blockchain, token creator, flatlogic, sol token, launchpad">
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? ''; <meta property="og:title" content="Sol Token LaunchLab">
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; <meta property="og:description" content="The simplest way to launch and manage your Solana meme coin.">
?> <meta property="og:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
<?php if ($projectDescription): ?> <meta name="twitter:card" content="summary_large_image">
<!-- Meta description --> <meta name="twitter:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
<!-- Open Graph meta tags --> <!-- Bootstrap CSS -->
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" /> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Twitter meta tags --> <!-- Bootstrap Icons -->
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<?php endif; ?> <!-- Custom CSS -->
<?php if ($projectImageUrl): ?> <link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
<!-- Open Graph image -->
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<!-- Twitter image -->
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<?php endif; ?>
<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=Inter:wght@400;700&display=swap" rel="stylesheet">
<style>
:root {
--bg-color-start: #6a11cb;
--bg-color-end: #2575fc;
--text-color: #ffffff;
--card-bg-color: rgba(255, 255, 255, 0.01);
--card-border-color: rgba(255, 255, 255, 0.1);
}
body {
margin: 0;
font-family: 'Inter', sans-serif;
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
color: var(--text-color);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
text-align: center;
overflow: hidden;
position: relative;
}
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
animation: bg-pan 20s linear infinite;
z-index: -1;
}
@keyframes bg-pan {
0% { background-position: 0% 0%; }
100% { background-position: 100% 100%; }
}
main {
padding: 2rem;
}
.card {
background: var(--card-bg-color);
border: 1px solid var(--card-border-color);
border-radius: 16px;
padding: 2rem;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
.loader {
margin: 1.25rem auto 1.25rem;
width: 48px;
height: 48px;
border: 3px solid rgba(255, 255, 255, 0.25);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.hint {
opacity: 0.9;
}
.sr-only {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap; border: 0;
}
h1 {
font-size: 3rem;
font-weight: 700;
margin: 0 0 1rem;
letter-spacing: -1px;
}
p {
margin: 0.5rem 0;
font-size: 1.1rem;
}
code {
background: rgba(0,0,0,0.2);
padding: 2px 6px;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
footer {
position: absolute;
bottom: 1rem;
font-size: 0.8rem;
opacity: 0.7;
}
</style>
</head> </head>
<body> <body>
<main>
<div class="card"> <!-- Navbar -->
<h1>Analyzing your requirements and generating your website…</h1> <nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm sticky-top">
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes"> <div class="container">
<span class="sr-only">Loading…</span> <a class="navbar-brand" href="#">
<i class="bi bi-rocket-takeoff-fill" style="color: #512da8;"></i>
Sol LaunchLab
</a>
</div> </div>
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p> </nav>
<p class="hint">This page will update automatically as the plan is implemented.</p>
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p> <!-- Hero Section -->
<header class="hero">
<div class="container">
<h1>Launch Your Solana Meme Coin in Minutes</h1>
<p>No code, no hassle. Just your vision and our platform. Create the next big meme coin on the Solana blockchain today.</p>
<a href="#create-project" class="btn btn-primary btn-lg">Start Your Project Now</a>
</div> </div>
</header>
<!-- Main Content -->
<main class="container">
<!-- Create Project Section -->
<section id="create-project">
<h2>Start Your Project</h2>
<div class="row justify-content-center">
<div class="col-lg-8">
<div class="card p-4 p-md-5">
<form id="projectForm" action="create_project.php" method="POST" class="needs-validation" novalidate>
<div class="mb-4">
<label for="project_name" class="form-label fs-5">Project Name</label>
<input type="text" class="form-control form-control-lg" id="project_name" name="project_name" placeholder="e.g., Galaxy Cat" required>
<div class="invalid-feedback">Please enter a project name.</div>
</div>
<div class="mb-4">
<label for="token_name" class="form-label fs-5">Token Name</label>
<input type="text" class="form-control form-control-lg" id="token_name" name="token_name" placeholder="e.g., GalaxyCat" required>
<div class="invalid-feedback">Please enter a token name.</div>
</div>
<div class="mb-4">
<label for="token_symbol" class="form-label fs-5">Token Symbol</label>
<input type="text" class="form-control form-control-lg" id="token_symbol" name="token_symbol" placeholder="e.g., GCT" required maxlength="10">
<div class="invalid-feedback">Please enter a symbol (max 10 chars).</div>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-primary btn-lg">Create My Coin</button>
</div>
</form>
</div>
</div>
</div>
</section>
</main> </main>
<footer>
Page updated: <?= htmlspecialchars($now) ?> (UTC) <!-- Footer -->
<footer class="mt-5">
<div class="container">
<p class="text-muted">&copy; <?php echo date('Y'); ?> Sol LaunchLab. All Rights Reserved.</p>
</div>
</footer> </footer>
<!-- Success Toast -->
<div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11">
<div id="successToast" class="toast align-items-center text-white bg-success border-0" role="alert" aria-live="assertive" aria-atomic="true">
<div class="d-flex">
<div class="toast-body fs-6">
<i class="bi bi-check-circle-fill me-2"></i>
Project created successfully!
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<!-- Custom JS -->
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body> </body>
</html> </html>