1.1
This commit is contained in:
parent
b975810489
commit
b46b809d97
117
admin.php
Normal file
117
admin.php
Normal file
@ -0,0 +1,117 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin - LAMP Demo</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="assets/css/custom.css">
|
||||
</head>
|
||||
<body class="bg-light">
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.php">
|
||||
<i class="bi bi-lightbulb-fill text-primary"></i>
|
||||
LAMP Demo
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="index.php">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="vibe.php">Vibe</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="sandbox.php">Sandbox</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="seo.php">SEO</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="admin.php">Admin</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="container my-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="card shadow-sm mb-4">
|
||||
<div class="card-body p-4">
|
||||
<h1 class="h3 mb-3 fw-normal text-center">Admin Login</h1>
|
||||
<form>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
|
||||
<label for="floatingInput">Email address</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="password" class="form-control" id="floatingPassword" placeholder="Password">
|
||||
<label for="floatingPassword">Password</label>
|
||||
</div>
|
||||
<button class="w-100 btn btn-lg btn-primary" type="submit">Sign in</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- This section would typically be protected -->
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header">
|
||||
<h2 class="h4 mb-0">Nokia Facts Management</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Fact</th>
|
||||
<th scope="col">Strength (1-10)</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1</th>
|
||||
<td>The Nokia 3310 could survive a drop from a 3-story building.</td>
|
||||
<td>8</td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></button>
|
||||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">2</th>
|
||||
<td>Its battery life was measured in days, not hours.</td>
|
||||
<td>10</td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></button>
|
||||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">3</th>
|
||||
<td>Snake II was the peak of mobile gaming.</td>
|
||||
<td>9</td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></button>
|
||||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button class="btn btn-success"><i class="bi bi-plus-circle"></i> Add New Fact</button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="bg-white text-center text-muted py-4 mt-5 border-top">
|
||||
<div class="container">
|
||||
<p class="mb-0">© 2025 LAMP Demo. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
31
assets/css/custom.css
Normal file
31
assets/css/custom.css
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
body {
|
||||
background-color: #F8FAFC;
|
||||
color: #0F172A;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.hero {
|
||||
background: linear-gradient(45deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
|
||||
padding: 6rem 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #6366F1;
|
||||
border-color: #6366F1;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #4F46E5;
|
||||
border-color: #4F46E5;
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||
}
|
||||
0
assets/js/main.js
Normal file
0
assets/js/main.js
Normal file
200
index.php
200
index.php
@ -1,131 +1,91 @@
|
||||
<?php
|
||||
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>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>New Style</title>
|
||||
<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>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Flatlogic LAMP Demo</title>
|
||||
<meta name="description" content="A playful demo site that shows what the new Flatlogic LAMP template can do.">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">
|
||||
<i class="bi bi-box-seam"></i>
|
||||
Flatlogic<span style="color: #6366F1;">Vibes</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="vibe.php">Vibe Generator</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="sandbox.php">PHP Sandbox</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="seo.php">SEO Checker</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="admin.php">Admin</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your website…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
<section class="hero">
|
||||
<div class="container">
|
||||
<h1 class="display-4">Generate a Website With a Vibe</h1>
|
||||
<p class="lead col-lg-8 mx-auto">Tell our AI your vibe, and we'll spin up a micro-site in seconds. From Synthwave to Brutalism, discover your digital aesthetic.</p>
|
||||
<a href="vibe.php" class="btn btn-primary btn-lg px-4">
|
||||
<i class="bi bi-stars"></i>
|
||||
Create a Vibe Site
|
||||
</a>
|
||||
</div>
|
||||
<p class="hint">Flatlogic AI is collecting your requirements and applying the first changes.</p>
|
||||
<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>
|
||||
</section>
|
||||
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="row text-center g-4">
|
||||
<div class="col-lg-4">
|
||||
<div class="card h-100 p-4">
|
||||
<img src="https://picsum.photos/seed/lamp-vibe/800/600" class="card-img-top rounded mb-3" alt="A colorful, abstract image representing different design vibes.">
|
||||
<div class="card-body">
|
||||
<h3 class="h4">Vibe Generator</h3>
|
||||
<p>Choose a vibe, give us a keyword, and watch the magic happen. Your own micro-site, generated by AI.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card h-100 p-4">
|
||||
<img src="https://picsum.photos/seed/lamp-code/800/600" class="card-img-top rounded mb-3" alt="A snippet of code on a dark background, representing the PHP sandbox.">
|
||||
<div class="card-body">
|
||||
<h3 class="h4">PHP Sandbox</h3>
|
||||
<p>Safely run PHP code snippets in an isolated environment. Perfect for testing and learning.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card h-100 p-4">
|
||||
<img src="https://picsum.photos/seed/lamp-seo/800/600" class="card-img-top rounded mb-3" alt="A magnifying glass over a web page, symbolizing SEO analysis.">
|
||||
<div class="card-body">
|
||||
<h3 class="h4">SEO Checker</h3>
|
||||
<p>Paste your HTML and get instant feedback on your on-page SEO, powered by AI analysis.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
|
||||
<footer class="py-4 mt-auto bg-light">
|
||||
<div class="container text-center">
|
||||
<p class="mb-0 text-muted">© <?php echo date("Y"); ?> Flatlogic. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
81
sandbox.php
Normal file
81
sandbox.php
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
$code = '';
|
||||
$result = '';
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$code = $_POST['code'] ?? '';
|
||||
// For now, just display the code. Execution will be implemented later.
|
||||
$result = "Execution feature coming soon!\n\nYour code:\n" . htmlspecialchars($code);
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>PHP Sandbox - Flatlogic LAMP Demo</title>
|
||||
<meta name="description" content="Safely run PHP code snippets in an isolated environment.">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
</head>
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">
|
||||
<i class="bi bi-box-seam"></i>
|
||||
Flatlogic<span style="color: #6366F1;">Vibes</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="vibe.php">Vibe Generator</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="sandbox.php">PHP Sandbox</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="seo.php">SEO Checker</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="admin.php">Admin</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="container my-5">
|
||||
<div class="text-center">
|
||||
<h1 class="display-5">PHP Sandbox</h1>
|
||||
<p class="lead col-lg-8 mx-auto">Test your PHP code snippets in a safe, isolated environment. Type your code, hit run, and see the output instantly.</p>
|
||||
</div>
|
||||
|
||||
<div class="row mt-5">
|
||||
<div class="col-lg-10 mx-auto">
|
||||
<form action="sandbox.php" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="code" class="form-label">PHP Code</label>
|
||||
<textarea class="form-control" id="code" name="code" rows="10" placeholder="<?php echo 'Hello, World!'; ?>"><?php echo htmlspecialchars($code); ?></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="bi bi-play-fill"></i> Run Code
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<?php if ($_SERVER["REQUEST_METHOD"] == "POST"): ?>
|
||||
<div class="mt-4">
|
||||
<h3>Result</h3>
|
||||
<pre class="bg-light p-3 rounded"><code><?php echo $result; ?></code></pre>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="py-4 mt-auto bg-light">
|
||||
<div class="container text-center">
|
||||
<p class="mb-0 text-muted">© <?php echo date("Y"); ?> Flatlogic. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
137
seo.php
Normal file
137
seo.php
Normal file
@ -0,0 +1,137 @@
|
||||
<?php
|
||||
$page_title = "SEO Checker";
|
||||
$page_description = "Paste your HTML and get instant feedback on your on-page SEO.";
|
||||
$html_input = '';
|
||||
$seo_results = null;
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['html_content'])) {
|
||||
$html_input = $_POST['html_content'];
|
||||
// Basic analysis simulation
|
||||
if (!empty($html_input)) {
|
||||
$doc = new DOMDocument();
|
||||
@$doc->loadHTML($html_input);
|
||||
$title = $doc->getElementsByTagName('title')->item(0)->nodeValue ?? 'Not found';
|
||||
$description = 'Not found';
|
||||
$metas = $doc->getElementsByTagName('meta');
|
||||
for ($i = 0; $i < $metas->length; $i++) {
|
||||
$meta = $metas->item($i);
|
||||
if (strtolower($meta->getAttribute('name')) == 'description') {
|
||||
$description = $meta->getAttribute('content');
|
||||
break;
|
||||
}
|
||||
}
|
||||
$h1_count = $doc->getElementsByTagName('h1')->length;
|
||||
|
||||
$seo_results = [
|
||||
'score' => 75, // Dummy score
|
||||
'title' => $title,
|
||||
'description' => $description,
|
||||
'h1_count' => $h1_count,
|
||||
'advice' => 'This is a basic analysis. For a full report, our AI would check for keyword density, image alt tags, mobile-friendliness, and more!'
|
||||
];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?php echo $page_title; ?> - Flatlogic LAMP Demo</title>
|
||||
<meta name="description" content="<?php echo $page_description; ?>">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
</head>
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">
|
||||
<i class="bi bi-box-seam"></i>
|
||||
Flatlogic<span style="color: #6366F1;">Vibes</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="vibe.php">Vibe Generator</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="sandbox.php">PHP Sandbox</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" aria-current="page" href="seo.php">SEO Checker</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="admin.php">Admin</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="container my-5">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="text-center mb-5">
|
||||
<h1 class="display-5 fw-bold">SEO Checker</h1>
|
||||
<p class="lead">Paste your site's HTML below to get an instant (simulated) SEO analysis.</p>
|
||||
</div>
|
||||
|
||||
<div class="card p-4 shadow-sm">
|
||||
<form action="seo.php" method="POST">
|
||||
<div class="mb-3">
|
||||
<label for="html_content" class="form-label">HTML Content</label>
|
||||
<textarea class="form-control" id="html_content" name="html_content" rows="10" placeholder="<html>...</html>"><?php echo htmlspecialchars($html_input); ?></textarea>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary btn-lg">
|
||||
<i class="bi bi-search"></i> Analyze SEO
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ($seo_results): ?>
|
||||
<div class="card p-4 mt-5 shadow-sm">
|
||||
<h2 class="h3 mb-4 text-center">Analysis Results</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-center">
|
||||
<div class="display-1 fw-bold text-primary"><?php echo $seo_results['score']; ?></div>
|
||||
<div class="h5">Overall Score</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<strong>Title Tag:</strong>
|
||||
<span class="badge bg-light text-dark"><?php echo htmlspecialchars(substr($seo_results['title'], 0, 50)); ?>...</span>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<strong>Meta Description:</strong>
|
||||
<span class="badge bg-light text-dark"><?php echo htmlspecialchars(substr($seo_results['description'], 0, 50)); ?>...</span>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<strong>H1 Tags Found:</strong>
|
||||
<span class="badge bg-<?php echo $seo_results['h1_count'] === 1 ? 'success' : 'warning'; ?>"><?php echo $seo_results['h1_count']; ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="mt-3">
|
||||
<h4 class="h5">AI-Powered Advice:</h4>
|
||||
<p class="mb-0 fst-italic"><?php echo htmlspecialchars($seo_results['advice']); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="py-4 mt-auto bg-light">
|
||||
<div class="container text-center">
|
||||
<p class="mb-0 text-muted">© <?php echo date("Y"); ?> Flatlogic. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
152
vibe.php
Normal file
152
vibe.php
Normal file
@ -0,0 +1,152 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vibe Generator - Flatlogic LAMP Demo</title>
|
||||
<meta name="description" content="Generate a micro-site based on a vibe and keywords.">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
<style>
|
||||
.vibe-option {
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
|
||||
}
|
||||
.vibe-option:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15)!important;
|
||||
}
|
||||
.vibe-option input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
.vibe-option.selected {
|
||||
border-color: #6366F1;
|
||||
border-width: 2px;
|
||||
box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
|
||||
}
|
||||
.vibe-icon {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">
|
||||
<i class="bi bi-box-seam"></i>
|
||||
Flatlogic<span style="color: #6366F1;">Vibes</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link active" href="vibe.php">Vibe Generator</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="sandbox.php">PHP Sandbox</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="seo.php">SEO Checker</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="admin.php">Admin</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="py-5">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-8 text-center">
|
||||
<h1 class="display-5">Create a Vibe Site</h1>
|
||||
<p class="lead">Step 1: Choose your aesthetic and provide a few keywords.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="vibe.php" method="POST" class="mt-5">
|
||||
<div class="row g-4 justify-content-center text-center">
|
||||
<h2 class="h4">1. Choose a Vibe</h2>
|
||||
|
||||
<?php
|
||||
$vibes = [
|
||||
'Tech-retro' => ['icon' => 'bi-pc-display-horizontal', 'desc' => '90s nostalgia, pixelated and chunky.'],
|
||||
'Synthwave' => ['icon' => 'bi-sunset', 'desc' => 'Neon grids, chrome, and 80s futurism.'],
|
||||
'Brutalism' => ['icon' => 'bi-building', 'desc' => 'Raw, blocky, and unapologetically functional.'],
|
||||
'Dad-garage' => ['icon' => 'bi-tools', 'desc' => 'Rugged, practical, and built to last.'],
|
||||
'Zen-mono' => ['icon' => 'bi-yin-yang', 'desc' => 'Minimalist, monochrome, and serene.']
|
||||
];
|
||||
|
||||
foreach ($vibes as $name => $details):
|
||||
?>
|
||||
<div class="col-md-4 col-lg-2">
|
||||
<label class="card h-100 vibe-option p-3">
|
||||
<input type="radio" name="vibe" value="<?php echo htmlspecialchars($name); ?>" required>
|
||||
<div class="vibe-icon"><i class="bi <?php echo $details['icon']; ?>"></i></div>
|
||||
<h5 class="h6"><?php echo htmlspecialchars($name); ?></h5>
|
||||
<small class="text-muted"><?php echo htmlspecialchars($details['desc']); ?></small>
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center mt-5">
|
||||
<div class="col-lg-6">
|
||||
<h2 class="h4 text-center">2. Enter Keywords</h2>
|
||||
<div class="mb-3">
|
||||
<label for="keywords" class="form-label visually-hidden">Keywords</label>
|
||||
<input type="text" class="form-control form-control-lg" id="keywords" name="keywords" placeholder="e.g., My personal blog, AI experiments" required>
|
||||
<div class="form-text text-center">Enter 1-3 key phrases that describe your site.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-4">
|
||||
<button type="submit" class="btn btn-primary btn-lg px-5">
|
||||
<i class="bi bi-stars"></i>
|
||||
Generate
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
// Simple handler for step 2 preview
|
||||
$vibe = $_POST['vibe'] ?? 'None';
|
||||
$keywords = $_POST['keywords'] ?? 'None';
|
||||
|
||||
echo '<div class="row justify-content-center mt-5 pt-5 border-top">';
|
||||
echo '<div class="col-lg-8">';
|
||||
echo '<h2>Submission Received (Step 2 Preview)</h2>';
|
||||
echo '<p>This is where the AI-generated preview will appear. For now, here are the values you submitted:</p>';
|
||||
echo '<div class="card">';
|
||||
echo '<div class="card-body">';
|
||||
echo '<h5 class="card-title">Selected Vibe: ' . htmlspecialchars($vibe) . '</h5>';
|
||||
echo '<p class="card-text">Keywords: ' . htmlspecialchars($keywords) . '</p>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="py-4 mt-auto bg-light">
|
||||
<div class="container text-center">
|
||||
<p class="mb-0 text-muted">© <?php echo date("Y"); ?> Flatlogic. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
document.querySelectorAll('.vibe-option').forEach(item => {
|
||||
item.addEventListener('click', event => {
|
||||
document.querySelectorAll('.vibe-option').forEach(opt => opt.classList.remove('selected'));
|
||||
item.classList.add('selected');
|
||||
// No need to manually check the radio, the label does that.
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user