Compare commits

..

1 Commits

Author SHA1 Message Date
Flatlogic Bot
1efc07748a Autosave: 20260304-085229 2026-03-04 08:52:30 +00:00
7 changed files with 536 additions and 443 deletions

43
admin_edit.php Normal file
View File

@ -0,0 +1,43 @@
<?php
require_once __DIR__ . '/db/config.php';
require_once __DIR__ . '/db/content_manager.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$key = $_POST['key'];
$title = $_POST['title'];
$content = $_POST['content'];
update_content($key, $title, $content);
header('Location: admin_edit.php?updated=1');
exit;
}
$all_content = db()->query("SELECT * FROM site_content")->fetchAll();
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin Edit Content</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light p-5">
<div class="container">
<h1>Edit Page Content</h1>
<?php foreach ($all_content as $item): ?>
<div class="card my-3 p-3">
<form method="POST">
<input type="hidden" name="key" value="<?= $item['section_key'] ?>">
<div class="mb-2">
<label>Title</label>
<input type="text" name="title" class="form-control" value="<?= htmlspecialchars($item['title']) ?>">
</div>
<div class="mb-2">
<label>Content</label>
<textarea name="content" class="form-control"><?= htmlspecialchars($item['content']) ?></textarea>
</div>
<button type="submit" class="btn btn-primary">Save Changes</button>
</form>
</div>
<?php endforeach; ?>
</div>
</body>
</html>

69
admin_messages.php Normal file
View File

@ -0,0 +1,69 @@
<?php
require_once __DIR__ . '/db/config.php';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Inbox | Admin</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css">
</head>
<body class="bg-light">
<nav class="navbar navbar-expand-lg navbar-white bg-white border-bottom sticky-top">
<div class="container">
<a class="navbar-brand fw-bold" href="index.php">Portfolio Admin</a>
<div class="ms-auto">
<a href="index.php" class="btn btn-outline-secondary btn-sm">Back to Site</a>
</div>
</div>
</nav>
<div class="container py-5">
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h3 mb-0">Contact Inquiries</h1>
</div>
<div class="card">
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead class="table-light">
<tr>
<th>Date</th>
<th>Name</th>
<th>Email</th>
<th>Subject</th>
<th>Message</th>
</tr>
</thead>
<tbody>
<?php
$contacts = db()->query("SELECT * FROM contacts ORDER BY created_at DESC")->fetchAll();
if ($contacts):
foreach ($contacts as $c):
?>
<tr>
<td class="text-nowrap small text-muted"><?= htmlspecialchars($c['created_at']) ?></td>
<td class="fw-bold"><?= htmlspecialchars($c['name']) ?></td>
<td><a href="mailto:<?= htmlspecialchars($c['email']) ?>"><?= htmlspecialchars($c['email']) ?></a></td>
<td><?= htmlspecialchars($c['subject']) ?></td>
<td><div class="small text-truncate" style="max-width: 300px;"><?= htmlspecialchars($c['message']) ?></div></td>
</tr>
<?php
endforeach;
else:
?>
<tr>
<td colspan="5" class="text-center py-5 text-muted">No messages found yet.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

37
api/contact.php Normal file
View File

@ -0,0 +1,37 @@
<?php
header('Content-Type: application/json');
require_once __DIR__ . '/../db/config.php';
require_once __DIR__ . '/../mail/MailService.php';
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
echo json_encode(['success' => false, 'message' => 'Invalid request method.']);
exit;
}
$name = trim($_POST['name'] ?? '');
$email = trim($_POST['email'] ?? '');
$subject = trim($_POST['subject'] ?? 'New Contact Inquiry');
$message = trim($_POST['message'] ?? '');
if (empty($name) || empty($email) || empty($message)) {
echo json_encode(['success' => false, 'message' => 'Please fill in all required fields.']);
exit;
}
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
echo json_encode(['success' => false, 'message' => 'Invalid email format.']);
exit;
}
try {
$stmt = db()->prepare("INSERT INTO contacts (name, email, subject, message) VALUES (?, ?, ?, ?)");
$stmt->execute([$name, $email, $subject, $message]);
// Attempt to send email via MailService if configured
MailService::sendContactMessage($name, $email, $message);
echo json_encode(['success' => true, 'message' => 'Message saved successfully.']);
} catch (PDOException $e) {
error_log($e->getMessage());
echo json_encode(['success' => false, 'message' => 'Database error. Please try again later.']);
}

View File

@ -1,302 +1,122 @@
:root {
--primary: #111827;
--secondary: #4b5563;
--accent: #2563eb;
--bg: #ffffff;
--surface: #f9fafb;
--border: #e5e7eb;
--radius: 6px;
--font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body {
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
background-size: 400% 400%;
animation: gradient 15s ease infinite;
color: #212529;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-size: 14px;
margin: 0;
min-height: 100vh;
font-family: var(--font-main);
background-color: var(--bg);
color: var(--primary);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
position: relative;
overflow-x: hidden;
}
.main-wrapper {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
width: 100%;
padding: 20px;
box-sizing: border-box;
position: relative;
z-index: 1;
/* Interactive Background */
#bg-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
pointer-events: none;
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
.section-padding {
padding: 80px 0;
}
.chat-container {
width: 100%;
max-width: 600px;
background: rgba(255, 255, 255, 0.85);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 20px;
display: flex;
flex-direction: column;
height: 85vh;
box-shadow: 0 20px 40px rgba(0,0,0,0.2);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
overflow: hidden;
.btn-primary {
background-color: var(--accent);
border-color: var(--accent);
border-radius: var(--radius);
padding: 10px 20px;
font-weight: 500;
transition: all 0.3s ease;
}
.chat-header {
padding: 1.5rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
background: rgba(255, 255, 255, 0.5);
font-weight: 700;
font-size: 1.1rem;
display: flex;
justify-content: space-between;
align-items: center;
.btn-primary:hover {
background-color: #1d4ed8;
border-color: #1d4ed8;
transform: translateY(-2px);
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.25rem;
/* 3D Portfolio Card Effects */
.portfolio-card-container {
perspective: 1000px;
}
/* Custom Scrollbar */
::-webkit-scrollbar {
width: 6px;
.portfolio-card {
transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
transform-style: preserve-3d;
cursor: pointer;
}
::-webkit-scrollbar-track {
background: transparent;
.portfolio-card:hover {
transform: rotateY(10deg) rotateX(5deg) scale(1.05);
box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 10px;
.card {
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: none;
transition: all 0.3s ease;
background-color: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(5px);
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.5);
.card:hover {
border-color: var(--accent);
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.message {
max-width: 85%;
padding: 0.85rem 1.1rem;
border-radius: 16px;
line-height: 1.5;
font-size: 0.95rem;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
.nav-link {
color: var(--secondary);
font-weight: 500;
font-size: 0.95rem;
transition: color 0.2s;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px) scale(0.95); }
to { opacity: 1; transform: translateY(0) scale(1); }
.nav-link:hover {
color: var(--accent);
}
.message.visitor {
align-self: flex-end;
background: linear-gradient(135deg, #212529 0%, #343a40 100%);
color: #fff;
border-bottom-right-radius: 4px;
.hero {
padding: 120px 0 80px;
background-color: transparent;
}
.message.bot {
align-self: flex-start;
background: #ffffff;
color: #212529;
border-bottom-left-radius: 4px;
h1, h2, h3 {
font-weight: 700;
letter-spacing: -0.025em;
}
.chat-input-area {
padding: 1.25rem;
background: rgba(255, 255, 255, 0.5);
border-top: 1px solid rgba(0, 0, 0, 0.05);
.portfolio-img {
width: 100%;
height: 240px;
object-fit: cover;
border-bottom: 1px solid var(--border);
}
.chat-input-area form {
display: flex;
gap: 0.75rem;
.footer {
border-top: 1px solid var(--border);
padding: 40px 0;
background-color: rgba(249, 250, 251, 0.8);
backdrop-filter: blur(5px);
}
.chat-input-area input {
flex: 1;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 12px;
padding: 0.75rem 1rem;
outline: none;
background: rgba(255, 255, 255, 0.9);
transition: all 0.3s ease;
}
.chat-input-area input:focus {
border-color: #23a6d5;
box-shadow: 0 0 0 3px rgba(35, 166, 213, 0.2);
}
.chat-input-area button {
background: #212529;
color: #fff;
border: none;
padding: 0.75rem 1.5rem;
border-radius: 12px;
cursor: pointer;
font-weight: 600;
transition: all 0.3s ease;
}
.chat-input-area button:hover {
background: #000;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
/* Background Animations */
.bg-animations {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
overflow: hidden;
pointer-events: none;
}
.blob {
position: absolute;
width: 500px;
height: 500px;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
filter: blur(80px);
animation: move 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}
.blob-1 {
top: -10%;
left: -10%;
background: rgba(238, 119, 82, 0.4);
}
.blob-2 {
bottom: -10%;
right: -10%;
background: rgba(35, 166, 213, 0.4);
animation-delay: -7s;
width: 600px;
height: 600px;
}
.blob-3 {
top: 40%;
left: 30%;
background: rgba(231, 60, 126, 0.3);
animation-delay: -14s;
width: 450px;
height: 450px;
}
@keyframes move {
0% { transform: translate(0, 0) rotate(0deg) scale(1); }
33% { transform: translate(150px, 100px) rotate(120deg) scale(1.1); }
66% { transform: translate(-50px, 200px) rotate(240deg) scale(0.9); }
100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}
.admin-link {
font-size: 14px;
color: #fff;
text-decoration: none;
background: rgba(0, 0, 0, 0.2);
padding: 0.5rem 1rem;
border-radius: 8px;
transition: all 0.3s ease;
}
.admin-link:hover {
background: rgba(0, 0, 0, 0.4);
text-decoration: none;
}
/* Admin Styles */
.admin-container {
max-width: 900px;
margin: 3rem auto;
padding: 2.5rem;
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-radius: 24px;
box-shadow: 0 20px 50px rgba(0,0,0,0.15);
border: 1px solid rgba(255, 255, 255, 0.4);
position: relative;
z-index: 1;
}
.admin-container h1 {
margin-top: 0;
color: #212529;
font-weight: 800;
}
.table {
width: 100%;
border-collapse: separate;
border-spacing: 0 8px;
margin-top: 1.5rem;
}
.table th {
background: transparent;
border: none;
padding: 1rem;
color: #6c757d;
font-weight: 600;
text-transform: uppercase;
font-size: 0.75rem;
letter-spacing: 1px;
}
.table td {
background: #fff;
padding: 1rem;
border: none;
}
.table tr td:first-child { border-radius: 12px 0 0 12px; }
.table tr td:last-child { border-radius: 0 12px 12px 0; }
.form-group {
margin-bottom: 1.25rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 600;
font-size: 0.9rem;
}
.form-control {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 12px;
background: #fff;
transition: all 0.3s ease;
box-sizing: border-box;
}
.form-control:focus {
outline: none;
border-color: #23a6d5;
box-shadow: 0 0 0 3px rgba(35, 166, 213, 0.1);
.toast-container {
position: fixed;
bottom: 24px;
right: 24px;
z-index: 1050;
}

View File

@ -1,39 +1,109 @@
document.addEventListener('DOMContentLoaded', () => {
const chatForm = document.getElementById('chat-form');
const chatInput = document.getElementById('chat-input');
const chatMessages = document.getElementById('chat-messages');
document.addEventListener('DOMContentLoaded', function() {
const contactForm = document.getElementById('contactForm');
if (contactForm) {
contactForm.addEventListener('submit', function(e) {
e.preventDefault();
const submitBtn = contactForm.querySelector('button[type="submit"]');
const originalBtnText = submitBtn.innerHTML;
submitBtn.disabled = true;
submitBtn.innerHTML = '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> Sending...';
const appendMessage = (text, sender) => {
const msgDiv = document.createElement('div');
msgDiv.classList.add('message', sender);
msgDiv.textContent = text;
chatMessages.appendChild(msgDiv);
chatMessages.scrollTop = chatMessages.scrollHeight;
};
chatForm.addEventListener('submit', async (e) => {
e.preventDefault();
const message = chatInput.value.trim();
if (!message) return;
appendMessage(message, 'visitor');
chatInput.value = '';
try {
const response = await fetch('api/chat.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message })
});
const data = await response.json();
// Artificial delay for realism
setTimeout(() => {
appendMessage(data.reply, 'bot');
}, 500);
} catch (error) {
console.error('Error:', error);
appendMessage("Sorry, something went wrong. Please try again.", 'bot');
const formData = new FormData(contactForm);
fetch('api/contact.php', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
if (data.success) {
showToast('Success', 'Your message has been sent successfully!', 'success');
contactForm.reset();
} else {
showToast('Error', data.message || 'Something went wrong.', 'danger');
}
})
.catch(error => {
showToast('Error', 'Network error. Please try again.', 'danger');
})
.finally(() => {
submitBtn.disabled = false;
submitBtn.innerHTML = originalBtnText;
});
});
}
// Interactive Background Animation
const canvas = document.getElementById('bg-canvas');
const ctx = canvas.getContext('2d');
let particles = [];
function resize() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
window.addEventListener('resize', resize);
resize();
class Particle {
constructor() {
this.reset();
}
reset() {
this.x = Math.random() * canvas.width;
this.y = Math.random() * canvas.height;
this.size = Math.random() * 2 + 1;
this.speedX = Math.random() * 1 - 0.5;
this.speedY = Math.random() * 1 - 0.5;
}
update() {
this.x += this.speedX;
this.y += this.speedY;
if (this.x < 0 || this.x > canvas.width || this.y < 0 || this.y > canvas.height) this.reset();
}
draw() {
ctx.fillStyle = 'rgba(37, 99, 235, 0.2)';
ctx.beginPath();
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
ctx.fill();
}
}
for (let i = 0; i < 50; i++) particles.push(new Particle());
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
particles.forEach(p => { p.update(); p.draw(); });
requestAnimationFrame(animate);
}
animate();
});
function showToast(title, message, type) {
const toastContainer = document.getElementById('toastContainer');
if (!toastContainer) return;
const toastHtml = `
<div class="toast show align-items-center text-white bg-${type} border-0" role="alert" aria-live="assertive" aria-atomic="true">
<div class="d-flex">
<div class="toast-body">
<strong>${title}:</strong> ${message}
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
`;
const toastWrapper = document.createElement('div');
toastWrapper.innerHTML = toastHtml;
const toastElement = toastWrapper.firstElementChild;
toastContainer.appendChild(toastElement);
setTimeout(() => {
toastElement.classList.remove('show');
setTimeout(() => toastElement.remove(), 500);
}, 5000);
}

16
db/content_manager.php Normal file
View File

@ -0,0 +1,16 @@
<?php
require_once __DIR__ . '/config.php';
function get_content($key) {
$stmt = db()->prepare("SELECT * FROM site_content WHERE section_key = ?");
$stmt->execute([$key]);
return $stmt->fetch();
}
function update_content($key, $title, $content) {
$stmt = db()->prepare("INSERT INTO site_content (section_key, title, content)
VALUES (?, ?, ?)
ON DUPLICATE KEY UPDATE title = ?, content = ?");
return $stmt->execute([$key, $title, $content, $title, $content]);
}
?>

318
index.php
View File

@ -1,150 +1,188 @@
<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
require_once __DIR__ . '/db/config.php';
require_once __DIR__ . '/db/content_manager.php';
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Modern Personal Portfolio';
$projectName = $_SERVER['PROJECT_NAME'] ?? 'Portfolio';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>New Style</title>
<?php
// Read project preview data from environment
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
?>
<?php if ($projectDescription): ?>
<!-- Meta description -->
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
<!-- Open Graph meta tags -->
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<!-- Twitter meta tags -->
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<?php endif; ?>
<?php if ($projectImageUrl): ?>
<!-- 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>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?= htmlspecialchars($projectName) ?></title>
<!-- Meta Tags -->
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>">
<meta property="og:title" content="<?= htmlspecialchars($projectName) ?>">
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>">
<?php if (isset($_SERVER['PROJECT_IMAGE_URL'])): ?>
<meta property="og:image" content="<?= htmlspecialchars($_SERVER['PROJECT_IMAGE_URL']) ?>">
<?php endif; ?>
<!-- Fonts & Styles -->
<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;500;600;700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?= time() ?>">
</head>
<body>
<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>
</div>
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : '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>
</div>
</main>
<footer>
Page updated: <?= htmlspecialchars($now) ?> (UTC)
</footer>
<!-- Interactive Background -->
<canvas id="bg-canvas"></canvas>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-white border-bottom fixed-top">
<div class="container">
<a class="navbar-brand fw-bold" href="#"><?= htmlspecialchars($projectName) ?></a>
<button class="navbar-toggler border-0" 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="#portfolio">Portfolio</a></li>
<li class="nav-item"><a class="nav-link" href="#about">About</a></li>
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
</ul>
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="hero d-flex align-items-center">
<div class="container text-center text-lg-start">
<div class="row align-items-center">
<div class="col-lg-6">
<h1 class="display-4 mb-3"><?= htmlspecialchars(get_content('hero_title')['title']) ?></h1>
<p class="lead text-secondary mb-4"><?= htmlspecialchars(get_content('hero_title')['content']) ?></p>
<div class="d-flex gap-3 justify-content-center justify-content-lg-start">
<a href="#portfolio" class="btn btn-primary btn-lg">View My Work</a>
<a href="#contact" class="btn btn-outline-dark btn-lg">Get in Touch</a>
</div>
</div>
<div class="col-lg-6 mt-5 mt-lg-0 text-center">
<img src="https://picsum.photos/seed/profile/600/600" alt="Profile" class="img-fluid rounded-circle shadow-sm" style="max-width: 400px; border: 8px solid white;">
</div>
</div>
</div>
</section>
<!-- Portfolio Section -->
<section id="portfolio" class="section-padding">
<div class="container">
<div class="text-center mb-5">
<h2 class="h1">Selected Work</h2>
<p class="text-secondary">A collection of projects spanning web apps, branding, and UX design.</p>
</div>
<div class="row g-4">
<?php
$projects = [
['title' => 'E-commerce Platform', 'category' => 'Web Development', 'img' => 'https://picsum.photos/seed/project1/800/600'],
['title' => 'Banking App UI', 'category' => 'Product Design', 'img' => 'https://picsum.photos/seed/project2/800/600'],
['title' => 'Travel Explorer', 'category' => 'Mobile App', 'img' => 'https://picsum.photos/seed/project3/800/600'],
['title' => 'SaaS Dashboard', 'category' => 'UX Research', 'img' => 'https://picsum.photos/seed/project4/800/600'],
];
foreach ($projects as $project):
?>
<div class="col-md-6 col-lg-3 portfolio-card-container">
<div class="portfolio-card card h-100 border-0 shadow-sm overflow-hidden">
<img src="<?= $project['img'] ?>" class="portfolio-img" alt="<?= $project['title'] ?>">
<div class="card-body p-3">
<span class="text-primary small fw-bold text-uppercase"><?= $project['category'] ?></span>
<h5 class="card-title mt-1 mb-0"><?= $project['title'] ?></h5>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</section>
<!-- About Section -->
<section id="about" class="section-padding bg-light">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8">
<div class="text-center mb-5">
<h2 class="h1"><?= htmlspecialchars(get_content('about_bio')['title']) ?></h2>
</div>
<div class="card p-4 border-0 shadow-sm">
<p class="lead"><?= htmlspecialchars(get_content('about_bio')['content']) ?></p>
<hr class="my-4 opacity-10">
<div class="row g-3">
<div class="col-6 col-md-3">
<div class="small fw-bold text-uppercase text-secondary">Expertise</div>
<div>Web Dev</div>
</div>
<div class="col-6 col-md-3">
<div class="small fw-bold text-uppercase text-secondary">Location</div>
<div>Remote / NYC</div>
</div>
<div class="col-6 col-md-3">
<div class="small fw-bold text-uppercase text-secondary">Experience</div>
<div>5+ Years</div>
</div>
<div class="col-6 col-md-3">
<div class="small fw-bold text-uppercase text-secondary">Focus</div>
<div>Clean UI</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="section-padding">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-6">
<div class="text-center mb-5">
<h2 class="h1">Let's Connect</h2>
<p class="text-secondary">Have a project in mind or just want to say hi? Drop a message below.</p>
</div>
<div class="card p-4 border-0 shadow-sm">
<form id="contactForm">
<div class="mb-3">
<label class="form-label small fw-bold">Name</label>
<input type="text" name="name" class="form-control" placeholder="John Doe" required>
</div>
<div class="mb-3">
<label class="form-label small fw-bold">Email</label>
<input type="email" name="email" class="form-control" placeholder="john@example.com" required>
</div>
<div class="mb-3">
<label class="form-label small fw-bold">Subject</label>
<input type="text" name="subject" class="form-control" placeholder="Project Inquiry">
</div>
<div class="mb-3">
<label class="form-label small fw-bold">Message</label>
<textarea name="message" class="form-control" rows="4" placeholder="Tell me about your project..." required></textarea>
</div>
<button type="submit" class="btn btn-primary w-100">Send Message</button>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container text-center">
<p class="mb-0 text-secondary">&copy; <?= date('Y') ?> <?= htmlspecialchars($projectName) ?>. All rights reserved.</p>
<div class="mt-2">
<a href="admin_edit.php" class="text-decoration-none small text-muted">Admin Panel</a>
</div>
</div>
</footer>
<!-- Toast Container -->
<div id="toastContainer" class="toast-container"></div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js?v=<?= time() ?>"></script>
</body>
</html>